@openspecui/web 2.2.2 → 2.2.4

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.
Files changed (68) hide show
  1. package/dist/assets/CanvasRenderer-CSU1mZCS.js +1 -0
  2. package/dist/assets/WebGLRenderer-BWsZhyvF.js +1 -0
  3. package/dist/assets/WebGPURenderer-Dhm03njt.js +1 -0
  4. package/dist/assets/browserAll-C2SVTxiZ.js +1 -0
  5. package/dist/assets/{dist-CTHOp2HH.js → dist-2Hdh5Vgr.js} +1 -1
  6. package/dist/assets/{dist-CPk7tHs1.js → dist-37zOX9gO.js} +1 -1
  7. package/dist/assets/{dist-C2Y7kb_l.js → dist-BiakFiXv.js} +1 -1
  8. package/dist/assets/dist-Bpqiuij8.js +1 -0
  9. package/dist/assets/{dist-wgCtmKd4.js → dist-CK_RJW9a.js} +1 -1
  10. package/dist/assets/{dist-Db3Nzxbm.js → dist-CUUb4d2o.js} +1 -1
  11. package/dist/assets/{dist-D6u2SljY.js → dist-CXNHfQrS.js} +1 -1
  12. package/dist/assets/{dist-Ddb7TC4V.js → dist-CkDh_aHQ.js} +1 -1
  13. package/dist/assets/dist-D8_Nhb_E.js +1 -0
  14. package/dist/assets/{dist-v1VbIWxM.js → dist-DW-savk9.js} +1 -1
  15. package/dist/assets/dist-chDDg3tV.js +1 -0
  16. package/dist/assets/{dist-DkB8rcXn.js → dist-vGxOx14l.js} +1 -1
  17. package/dist/assets/{ghostty-web-CKyK2O5y.js → ghostty-web-vPHHRwzY.js} +1 -1
  18. package/dist/assets/index-BIBAwnwo.css +1 -0
  19. package/dist/assets/{index-DuXWqE8s.js → index-Drwz4q1f.js} +7 -7
  20. package/dist/assets/{init-C5f2r12K.js → init-C9VTlvZ6.js} +1 -1
  21. package/dist/assets/trpc-DhmVhQ6w.js +1 -0
  22. package/dist/assets/webworkerAll-BjzNDx-n.js +1 -0
  23. package/dist/index.html +2 -2
  24. package/dist-ssg/client/.vite/ssr-manifest.json +15 -15
  25. package/dist-ssg/client/assets/CanvasRenderer-_rkDbGyt.js +1 -0
  26. package/dist-ssg/client/assets/WebGLRenderer-zj4O-BXA.js +1 -0
  27. package/dist-ssg/client/assets/WebGPURenderer-Ds9pl2QI.js +1 -0
  28. package/dist-ssg/client/assets/browserAll-KPlmIcVp.js +1 -0
  29. package/dist-ssg/client/assets/{dist-BMJt_HM-.js → dist-1nwMeJUA.js} +1 -1
  30. package/dist-ssg/client/assets/dist-B9ueEMfZ.js +1 -0
  31. package/dist-ssg/client/assets/dist-BskBU7yO.js +1 -0
  32. package/dist-ssg/client/assets/{dist-DK_jCypF.js → dist-By3UiL49.js} +1 -1
  33. package/dist-ssg/client/assets/{dist-BBFs-o6i.js → dist-Ct3FM91l.js} +1 -1
  34. package/dist-ssg/client/assets/{dist-VQharc8F.js → dist-CytpaEqb.js} +1 -1
  35. package/dist-ssg/client/assets/dist-D-BF5LWe.js +1 -0
  36. package/dist-ssg/client/assets/{dist-D1Hz30ok.js → dist-DFgcUnjT.js} +1 -1
  37. package/dist-ssg/client/assets/{dist-9f7q7pf1.js → dist-DmJYAQMy.js} +1 -1
  38. package/dist-ssg/client/assets/{dist-0ndjmvCP.js → dist-hluiEWM3.js} +1 -1
  39. package/dist-ssg/client/assets/{dist-Cb7E0E8X.js → dist-iFM-Stdc.js} +1 -1
  40. package/dist-ssg/client/assets/{dist-BTePqz62.js → dist-nN5cS9Ml.js} +1 -1
  41. package/dist-ssg/client/assets/{ghostty-web-BGiNwCXN.js → ghostty-web-DKtIwsaO.js} +1 -1
  42. package/dist-ssg/client/assets/index-D1E4y6nR.css +2 -0
  43. package/dist-ssg/client/assets/{index.ssg-BaUTVjyM.js → index.ssg-DDtGYN4t.js} +6 -6
  44. package/dist-ssg/client/assets/{init-CgNOo2HL.js → init-BkKcTbcQ.js} +1 -1
  45. package/dist-ssg/client/assets/trpc-DOd88nCm.js +1 -0
  46. package/dist-ssg/client/assets/webworkerAll-B9z3mtyN.js +1 -0
  47. package/dist-ssg/client/index.ssg.html +2 -2
  48. package/package.json +2 -2
  49. package/dist/assets/CanvasRenderer-Dx0drFSn.js +0 -1
  50. package/dist/assets/WebGLRenderer-A1e0ZREU.js +0 -1
  51. package/dist/assets/WebGPURenderer-DyDyQxQi.js +0 -1
  52. package/dist/assets/browserAll-4AdbiChd.js +0 -1
  53. package/dist/assets/dist-B4C_F61L.js +0 -1
  54. package/dist/assets/dist-B7Fp1Wdq.js +0 -1
  55. package/dist/assets/dist-DLjZnpQY.js +0 -1
  56. package/dist/assets/index-xWMjNkWU.css +0 -1
  57. package/dist/assets/trpc-CibonjNv.js +0 -1
  58. package/dist/assets/webworkerAll-D9jIoGRN.js +0 -1
  59. package/dist-ssg/client/assets/CanvasRenderer-D6IJkyan.js +0 -1
  60. package/dist-ssg/client/assets/WebGLRenderer-DA3t8HBv.js +0 -1
  61. package/dist-ssg/client/assets/WebGPURenderer-D4n0TYNW.js +0 -1
  62. package/dist-ssg/client/assets/browserAll-CnZVyRSV.js +0 -1
  63. package/dist-ssg/client/assets/dist-Cs2mkO00.js +0 -1
  64. package/dist-ssg/client/assets/dist-DqIo3qzf.js +0 -1
  65. package/dist-ssg/client/assets/dist-xWQ4FzFW.js +0 -1
  66. package/dist-ssg/client/assets/index-NsRiPrwI.css +0 -2
  67. package/dist-ssg/client/assets/trpc-B2tmt2mY.js +0 -1
  68. package/dist-ssg/client/assets/webworkerAll-BqaG29Qu.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BngumzOu.js","assets/chunk-DECur_0Z.js","assets/html-UgL0pUTh.js","assets/css-MgOOddo9.js","assets/javascript-DweALdcl.js","assets/angular-ts-C6vKMqNQ.js","assets/scss-CPtRJnQJ.js","assets/apl-CanOX78I.js","assets/json-BsydYQ7o.js","assets/xml-DY6OW6fx.js","assets/java-CJzioqY5.js","assets/astro-D3RhqyEX.js","assets/postcss-BtHn3WbL.js","assets/tsx-D6BgBzWj.js","assets/typescript-C5zt0SwC.js","assets/blade-DL2UFKF3.js","assets/html-derivative-CWqzWmfe.js","assets/sql-C-Fa9hzb.js","assets/bsl-baasCE8P.js","assets/sdbl-lyJ_q2qY.js","assets/c-BOqe9lRQ.js","assets/cairo-BkvliMUx.js","assets/python-B0QK5ArY.js","assets/cobol-Bh6VT3qK.js","assets/coffee-B0QZgCFK.js","assets/cpp-K7si_9PA.js","assets/glsl-COhnwF2O.js","assets/regexp-ClEH90rn.js","assets/crystal-CkrKPPPJ.js","assets/shellscript-BO8cBTbG.js","assets/edge-QC_gsDDT.js","assets/elixir-CLr7lZvD.js","assets/elm-C7vdad3p.js","assets/erb-CpyGfXUh.js","assets/ruby-D8NfXwCK.js","assets/graphql-DKIR2AFZ.js","assets/jsx-DfCzNrFp.js","assets/haml-BwSG8gbZ.js","assets/lua-Cl7HpIv3.js","assets/yaml-hSl-jO2_.js","assets/erlang-vfCdWglx.js","assets/markdown-jQZFZ3m0.js","assets/fortran-fixed-form-eRZkDVxE.js","assets/fortran-free-form-dGWJP-PE.js","assets/fsharp-lKBUVRnt.js","assets/gdresource-C_R0x-CQ.js","assets/gdscript-CW6S_vBb.js","assets/gdshader-BqnlaYeo.js","assets/git-commit-SMAxcXsl.js","assets/diff-Eg5NxGYi.js","assets/git-rebase-3yOGJ52K.js","assets/glimmer-js-B4B76dDY.js","assets/glimmer-ts-DQpCtGkl.js","assets/hack-483kQD0h.js","assets/handlebars-BTt4M9z6.js","assets/http-XCrN_CGn.js","assets/hurl-CfAoEXjj.js","assets/csv-DkOKkcud.js","assets/hxml-BNnDhNNK.js","assets/haxe-BPFrQPtj.js","assets/jinja-CAumwAh3.js","assets/jison-DXiwFEpC.js","assets/julia-D_rxuOJz.js","assets/r-Bxdh_Vt4.js","assets/latex-D0WE8LAX.js","assets/tex-BJpc6dbv.js","assets/liquid-CBi5ZjV2.js","assets/marko-Wx-5ycuy.js","assets/less-BZZ-PLfd.js","assets/mdc-Cnw__bfS.js","assets/nginx-CSLtRIGs.js","assets/nim-Bl94tPNK.js","assets/perl-AQuNRAmj.js","assets/php-Bm5VHYVk.js","assets/pug-Qd0aeXah.js","assets/qml-DdPnfnAH.js","assets/razor-BIPGoiD9.js","assets/csharp-_SaU5MOa.js","assets/rst-C5Xv_6wF.js","assets/cmake-BHzgnx8G.js","assets/sas-DTaGstnC.js","assets/shaderlab-DhaYSNG2.js","assets/hlsl-g9gCsmqR.js","assets/shellsession-mh7kK8rm.js","assets/soy-Y4jbujLe.js","assets/sparql-CbwLv0Nv.js","assets/turtle-CrO-XU5O.js","assets/stata-DGls8UgY.js","assets/svelte-gQr6WDsc.js","assets/templ-CAmLeg1s.js","assets/go-qASC_aC8.js","assets/ts-tags-CTBvtuWV.js","assets/twig-BC4BZrit.js","assets/vue-CWweBK92.js","assets/vue-html-B29OwJ5K.js","assets/vue-vine-Caa--IjA.js","assets/stylus-DBx-JbUM.js","assets/xsl-CAbj-pad.js","assets/dist-DVFW0GyF.js","assets/dist-BGaHY1kO.js","assets/dist-QUHuPJsA.js","assets/dist-DltQmFDE.js","assets/dist-B4C_F61L.js","assets/dist-CLKxKEQH.js","assets/dist-D6u2SljY.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-Ddb7TC4V.js","assets/dist-DLjZnpQY.js","assets/dist-CPk7tHs1.js","assets/dist-v1VbIWxM.js","assets/dist-Db3Nzxbm.js","assets/dist-C2Y7kb_l.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-wgCtmKd4.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-B7Fp1Wdq.js","assets/dockerfile-Ci0-ApQC.js","assets/simple-mode-kdHrpFjq.js","assets/factor-DMvifS-k.js","assets/nsis-BbRIeGvl.js","assets/pug-D1ZtszdL.js","assets/javascript-BcqCeS4O.js","assets/dist-DkB8rcXn.js","assets/dist-CTHOp2HH.js","assets/browserAll-4AdbiChd.js","assets/Geometry-CNDxiJq_.js","assets/init-C5f2r12K.js","assets/webworkerAll-D9jIoGRN.js","assets/WebGPURenderer-DyDyQxQi.js","assets/WebGLRenderer-A1e0ZREU.js","assets/CanvasRenderer-Dx0drFSn.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-BngumzOu.js","assets/chunk-DECur_0Z.js","assets/html-UgL0pUTh.js","assets/css-MgOOddo9.js","assets/javascript-DweALdcl.js","assets/angular-ts-C6vKMqNQ.js","assets/scss-CPtRJnQJ.js","assets/apl-CanOX78I.js","assets/json-BsydYQ7o.js","assets/xml-DY6OW6fx.js","assets/java-CJzioqY5.js","assets/astro-D3RhqyEX.js","assets/postcss-BtHn3WbL.js","assets/tsx-D6BgBzWj.js","assets/typescript-C5zt0SwC.js","assets/blade-DL2UFKF3.js","assets/html-derivative-CWqzWmfe.js","assets/sql-C-Fa9hzb.js","assets/bsl-baasCE8P.js","assets/sdbl-lyJ_q2qY.js","assets/c-BOqe9lRQ.js","assets/cairo-BkvliMUx.js","assets/python-B0QK5ArY.js","assets/cobol-Bh6VT3qK.js","assets/coffee-B0QZgCFK.js","assets/cpp-K7si_9PA.js","assets/glsl-COhnwF2O.js","assets/regexp-ClEH90rn.js","assets/crystal-CkrKPPPJ.js","assets/shellscript-BO8cBTbG.js","assets/edge-QC_gsDDT.js","assets/elixir-CLr7lZvD.js","assets/elm-C7vdad3p.js","assets/erb-CpyGfXUh.js","assets/ruby-D8NfXwCK.js","assets/graphql-DKIR2AFZ.js","assets/jsx-DfCzNrFp.js","assets/haml-BwSG8gbZ.js","assets/lua-Cl7HpIv3.js","assets/yaml-hSl-jO2_.js","assets/erlang-vfCdWglx.js","assets/markdown-jQZFZ3m0.js","assets/fortran-fixed-form-eRZkDVxE.js","assets/fortran-free-form-dGWJP-PE.js","assets/fsharp-lKBUVRnt.js","assets/gdresource-C_R0x-CQ.js","assets/gdscript-CW6S_vBb.js","assets/gdshader-BqnlaYeo.js","assets/git-commit-SMAxcXsl.js","assets/diff-Eg5NxGYi.js","assets/git-rebase-3yOGJ52K.js","assets/glimmer-js-B4B76dDY.js","assets/glimmer-ts-DQpCtGkl.js","assets/hack-483kQD0h.js","assets/handlebars-BTt4M9z6.js","assets/http-XCrN_CGn.js","assets/hurl-CfAoEXjj.js","assets/csv-DkOKkcud.js","assets/hxml-BNnDhNNK.js","assets/haxe-BPFrQPtj.js","assets/jinja-CAumwAh3.js","assets/jison-DXiwFEpC.js","assets/julia-D_rxuOJz.js","assets/r-Bxdh_Vt4.js","assets/latex-D0WE8LAX.js","assets/tex-BJpc6dbv.js","assets/liquid-CBi5ZjV2.js","assets/marko-Wx-5ycuy.js","assets/less-BZZ-PLfd.js","assets/mdc-Cnw__bfS.js","assets/nginx-CSLtRIGs.js","assets/nim-Bl94tPNK.js","assets/perl-AQuNRAmj.js","assets/php-Bm5VHYVk.js","assets/pug-Qd0aeXah.js","assets/qml-DdPnfnAH.js","assets/razor-BIPGoiD9.js","assets/csharp-_SaU5MOa.js","assets/rst-C5Xv_6wF.js","assets/cmake-BHzgnx8G.js","assets/sas-DTaGstnC.js","assets/shaderlab-DhaYSNG2.js","assets/hlsl-g9gCsmqR.js","assets/shellsession-mh7kK8rm.js","assets/soy-Y4jbujLe.js","assets/sparql-CbwLv0Nv.js","assets/turtle-CrO-XU5O.js","assets/stata-DGls8UgY.js","assets/svelte-gQr6WDsc.js","assets/templ-CAmLeg1s.js","assets/go-qASC_aC8.js","assets/ts-tags-CTBvtuWV.js","assets/twig-BC4BZrit.js","assets/vue-CWweBK92.js","assets/vue-html-B29OwJ5K.js","assets/vue-vine-Caa--IjA.js","assets/stylus-DBx-JbUM.js","assets/xsl-CAbj-pad.js","assets/dist-DVFW0GyF.js","assets/dist-BGaHY1kO.js","assets/dist-QUHuPJsA.js","assets/dist-DltQmFDE.js","assets/dist-chDDg3tV.js","assets/dist-CLKxKEQH.js","assets/dist-CXNHfQrS.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-CkDh_aHQ.js","assets/dist-Bpqiuij8.js","assets/dist-37zOX9gO.js","assets/dist-DW-savk9.js","assets/dist-CUUb4d2o.js","assets/dist-BiakFiXv.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-CK_RJW9a.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-D8_Nhb_E.js","assets/dockerfile-Ci0-ApQC.js","assets/simple-mode-kdHrpFjq.js","assets/factor-DMvifS-k.js","assets/nsis-BbRIeGvl.js","assets/pug-D1ZtszdL.js","assets/javascript-BcqCeS4O.js","assets/dist-vGxOx14l.js","assets/dist-2Hdh5Vgr.js","assets/browserAll-C2SVTxiZ.js","assets/Geometry-CNDxiJq_.js","assets/init-C9VTlvZ6.js","assets/webworkerAll-BjzNDx-n.js","assets/WebGPURenderer-Dhm03njt.js","assets/WebGLRenderer-BWsZhyvF.js","assets/CanvasRenderer-CSU1mZCS.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,r as t,t as n}from"./chunk-DECur_0Z.js";import{$ as r,A as i,At as a,B as o,C as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,H as g,I as _,It as v,K as y,L as b,Lt as x,M as S,Mt as C,Nt as w,O as T,Ot as E,P as D,Pt as O,Q as k,R as A,S as j,St as M,T as N,Tt as P,U as F,V as I,W as L,X as R,Y as z,Z as B,_ as ee,a as V,at as te,b as H,bt as ne,c as re,ct as ie,d as U,dt as ae,et as oe,f as se,ft as ce,g as le,gt as ue,h as de,i as fe,it as pe,j as me,jt as he,k as ge,kt as _e,l as W,lt as ve,m as ye,mt as be,n as xe,nt as Se,o as Ce,p as we,pt as Te,q as Ee,r as De,rt as Oe,s as ke,st as Ae,t as je,u as Me,ut as Ne,v as Pe,vt as Fe,w as Ie,wt as Le,x as Re,xt as ze,z as Be}from"./dist-QUHuPJsA.js";import{a as Ve,i as He,n as Ue,o as We,r as Ge}from"./dist--FTL3P_Y.js";import{i as Ke,n as qe,o as Je,r as Ye,t as Xe}from"./dist-BGaHY1kO.js";import{$ as Ze,A as Qe,B as $e,C as et,E as tt,F as nt,G as rt,H as it,I as at,J as ot,K as st,L as ct,N as lt,O as ut,P as dt,Q as ft,R as pt,T as mt,U as ht,W as gt,X as _t,Y as vt,Z as yt,_ as bt,a as xt,b as St,c as Ct,d as wt,et as Tt,f as Et,g as Dt,h as Ot,i as kt,it as At,j as jt,k as Mt,l as Nt,m as Pt,n as Ft,nt as It,o as Lt,q as Rt,r as zt,rt as G,s as Bt,t as Vt,tt as Ht,u as Ut,v as Wt,w as Gt,x as Kt,y as qt,z as Jt}from"./Geometry-CNDxiJq_.js";import{t as Yt}from"./ImageSource-DsthkIsU.js";import{C as Xt,D as Zt,E as Qt,O as $t,S as en,T as tn,_ as nn,a as rn,b as an,c as on,d as sn,f as cn,g as ln,h as un,i as dn,k as fn,l as pn,m as mn,n as hn,o as gn,p as _n,r as vn,s as yn,t as bn,u as xn,v as Sn,w as Cn,x as wn,y as Tn}from"./RenderTargetSystem-CLQIFvVz.js";import{t as En}from"./getTextureBatchBindGroup-CqvclRGr.js";import{a as Dn,c as On,d as kn,f as An,i as jn,l as Mn,n as Nn,o as Pn,p as Fn,r as In,s as Ln,t as Rn,u as zn}from"./BufferResource-DKNednNt.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Bn=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Vn=n(((e,t)=>{t.exports=Bn()})),Hn=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.0`})),Un=n(((e,t)=>{t.exports=Hn()})),Wn=n((e=>{var t=Un();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.0`})),Gn=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Wn()})),Kn=n((e=>{var t=Vn(),n=Un(),r=Gn();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var A=Symbol.for(`react.client.reference`);function j(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===A?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?j(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var M=Array.isArray,N=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],L=-1;function R(e){return{current:e}}function z(e){0>L||(e.current=I[L],I[L]=null,L--)}function B(e,t){L++,I[L]=e.current,e.current=t}var ee=R(null),V=R(null),te=R(null),H=R(null);function ne(e,t){switch(B(te,t),B(V,e),B(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(ee),B(ee,e)}function re(){z(ee),z(V),z(te)}function ie(e){e.memoizedState!==null&&B(H,e);var t=ee.current,n=Kd(t,e.type);t!==n&&(B(V,e),B(ee,n))}function U(e){V.current===e&&(z(ee),z(V)),H.current===e&&(z(H),np._currentValue=F)}var ae,oe;function se(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``,oe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+ae+e+oe}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -7,7 +7,7 @@ import{n as e,r as t,t as n}from"./chunk-DECur_0Z.js";import{$ as r,A as i,At as
7
7
  `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?se(n):``}function ue(e,t){switch(e.tag){case 26:case 27:case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return e.child!==t&&t!==null?se(`Suspense Fallback`):se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 15:return le(e.type,!1);case 11:return le(e.type.render,!1);case 1:return le(e.type,!0);case 31:return se(`Activity`);default:return``}}function de(e){try{var t=``,n=null;do t+=ue(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
8
  Error generating stack: `+e.message+`
9
9
  `+e.stack}}var fe=Object.prototype.hasOwnProperty,pe=t.unstable_scheduleCallback,me=t.unstable_cancelCallback,he=t.unstable_shouldYield,ge=t.unstable_requestPaint,_e=t.unstable_now,W=t.unstable_getCurrentPriorityLevel,ve=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,xe=t.unstable_LowPriority,Se=t.unstable_IdlePriority,Ce=t.log,we=t.unstable_setDisableYieldValue,Te=null,Ee=null;function De(e){if(typeof Ce==`function`&&we(e),Ee&&typeof Ee.setStrictMode==`function`)try{Ee.setStrictMode(Te,e)}catch{}}var Oe=Math.clz32?Math.clz32:je,ke=Math.log,Ae=Math.LN2;function je(e){return e>>>=0,e===0?32:31-(ke(e)/Ae|0)|0}var Me=256,Ne=262144,Pe=4194304;function Fe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ie(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Fe(n))):i=Fe(o):i=Fe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Fe(n))):i=Fe(o)):i=Fe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Le(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Re(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ze(){var e=Pe;return Pe<<=1,!(Pe&62914560)&&(Pe=4194304),e}function Be(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ve(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function He(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Oe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ue(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ue(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Oe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function We(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Oe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ge(e,t){var n=t&-t;return n=n&42?1:Ke(n),(n&(e.suspendedLanes|t))===0?n:0}function Ke(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function qe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Je(){var e=P.p;return e===0?(e=window.event,e===void 0?32:vp(e.type)):e}function Ye(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Xe=Math.random().toString(36).slice(2),Ze=`__reactFiber$`+Xe,Qe=`__reactProps$`+Xe,$e=`__reactContainer$`+Xe,et=`__reactEvents$`+Xe,tt=`__reactListeners$`+Xe,nt=`__reactHandles$`+Xe,rt=`__reactResources$`+Xe,it=`__reactMarker$`+Xe;function at(e){delete e[Ze],delete e[Qe],delete e[et],delete e[tt],delete e[nt]}function ot(e){var t=e[Ze];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$e]||n[Ze]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hf(e);e!==null;){if(n=e[Ze])return n;e=hf(e)}return t}e=n,n=e.parentNode}return null}function st(e){if(e=e[Ze]||e[$e]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ct(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function lt(e){var t=e[rt];return t||=e[rt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ut(e){e[it]=!0}var dt=new Set,ft={};function pt(e,t){mt(e,t),mt(e+`Capture`,t)}function mt(e,t){for(ft[e]=t,e=0;e<t.length;e++)dt.add(t[e])}var ht=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),gt={},_t={};function vt(e){return fe.call(_t,e)?!0:fe.call(gt,e)?!1:ht.test(e)?_t[e]=!0:(gt[e]=!0,!1)}function yt(e,t,n){if(vt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function bt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function xt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function St(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ct(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function wt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tt(e){if(!e._valueTracker){var t=Ct(e)?`checked`:`value`;e._valueTracker=wt(e,t,``+e[t])}}function Et(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ct(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Dt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Ot=/[\n"\\]/g;function kt(e){return e.replace(Ot,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function At(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+St(t)):e.value!==``+St(t)&&(e.value=``+St(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Mt(e,o,St(n)):Mt(e,o,St(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+St(s):e.removeAttribute(`name`)}function jt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Tt(e);return}n=n==null?``:``+St(n),t=t==null?n:``+St(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Tt(e)}function Mt(e,t,n){t===`number`&&Dt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Nt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+St(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Pt(e,t,n){if(t!=null&&(t=``+St(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+St(n)}function Ft(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(M(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=St(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Tt(e)}function It(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Rt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Lt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Rt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Rt(e,o,t[o])}function G(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Bt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Vt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ht(e){return Vt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Ut(){}var Wt=null;function Gt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kt=null,qt=null;function Jt(e){var t=st(e);if(t&&(e=t.stateNode)){var n=e[Qe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(At(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+kt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Qe]||null;if(!a)throw Error(i(90));At(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Et(r)}break a;case`textarea`:Pt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Nt(e,!!n.multiple,t,!1)}}}var Yt=!1;function Xt(e,t,n){if(Yt)return e(t,n);Yt=!0;try{return e(t)}finally{if(Yt=!1,(Kt!==null||qt!==null)&&(xu(),Kt&&(t=Kt,e=qt,qt=Kt=null,Jt(t),e)))for(t=0;t<e.length;t++)Jt(e[t])}}function Zt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Qe]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Qt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),$t=!1;if(Qt)try{var en={};Object.defineProperty(en,`passive`,{get:function(){$t=!0}}),window.addEventListener(`test`,en,en),window.removeEventListener(`test`,en,en)}catch{$t=!1}var tn=null,nn=null,rn=null;function an(){if(rn)return rn;var e,t=nn,n=t.length,r,i=`value`in tn?tn.value:tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return rn=i.slice(e,1<r?1-r:void 0)}function on(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function sn(){return!0}function cn(){return!1}function ln(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?sn:cn,this.isPropagationStopped=cn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=sn)},persist:function(){},isPersistent:sn}),t}var un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=ln(un),fn=f({},un,{view:0,detail:0}),pn=ln(fn),mn,hn,gn,_n=f({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==gn&&(gn&&e.type===`mousemove`?(mn=e.screenX-gn.screenX,hn=e.screenY-gn.screenY):hn=mn=0,gn=e),mn)},movementY:function(e){return`movementY`in e?e.movementY:hn}}),vn=ln(_n),yn=ln(f({},_n,{dataTransfer:0})),bn=ln(f({},fn,{relatedTarget:0})),xn=ln(f({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),Sn=ln(f({},un,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Cn=ln(f({},un,{data:0})),wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Tn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},En={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=En[e])?!!t[e]:!1}function On(){return Dn}var kn=ln(f({},fn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=on(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Tn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return e.type===`keypress`?on(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?on(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),An=ln(f({},_n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),jn=ln(f({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Mn=ln(f({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=ln(f({},_n,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Pn=ln(f({},un,{newState:0,oldState:0})),Fn=[9,13,27,32],In=Qt&&`CompositionEvent`in window,Ln=null;Qt&&`documentMode`in document&&(Ln=document.documentMode);var Rn=Qt&&`TextEvent`in window&&!Ln,zn=Qt&&(!In||Ln&&8<Ln&&11>=Ln),Bn=` `,Hn=!1;function Wn(e,t){switch(e){case`keyup`:return Fn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Kn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var qn=!1;function Jn(e,t){switch(e){case`compositionend`:return Kn(t);case`keypress`:return t.which===32?(Hn=!0,Bn):null;case`textInput`:return e=t.data,e===Bn&&Hn?null:e;default:return null}}function Yn(e,t){if(qn)return e===`compositionend`||!In&&Wn(e,t)?(e=an(),rn=nn=tn=null,qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return zn&&t.locale!==`ko`?null:t.data;default:return null}}var Xn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Xn[e.type]:t===`textarea`}function Qn(e,t,n,r){Kt?qt?qt.push(r):qt=[r]:Kt=r,t=kd(t,`onChange`),0<t.length&&(n=new dn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var $n=null,er=null;function tr(e){xd(e,0)}function nr(e){if(Et(ct(e)))return e}function rr(e,t){if(e===`change`)return t}var ir=!1;if(Qt){var ar;if(Qt){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;ir=ar&&(!document.documentMode||9<document.documentMode)}function cr(){$n&&($n.detachEvent(`onpropertychange`,lr),er=$n=null)}function lr(e){if(e.propertyName===`value`&&nr(er)){var t=[];Qn(t,er,e,Gt(e)),Xt(tr,t)}}function ur(e,t,n){e===`focusin`?(cr(),$n=t,er=n,$n.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return nr(er)}function fr(e,t){if(e===`click`)return nr(t)}function pr(e,t){if(e===`input`||e===`change`)return nr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!fe.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dt(e.document)}return t}function xr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Sr=Qt&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,Er=!1;function Dr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Er||Cr==null||Cr!==Dt(r)||(r=Cr,`selectionStart`in r&&xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&gr(Tr,r)||(Tr=r,r=kd(wr,`onSelect`),0<r.length&&(t=new dn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var kr={animationend:Or(`Animation`,`AnimationEnd`),animationiteration:Or(`Animation`,`AnimationIteration`),animationstart:Or(`Animation`,`AnimationStart`),transitionrun:Or(`Transition`,`TransitionRun`),transitionstart:Or(`Transition`,`TransitionStart`),transitioncancel:Or(`Transition`,`TransitionCancel`),transitionend:Or(`Transition`,`TransitionEnd`)},Ar={},jr={};Qt&&(jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),`TransitionEvent`in window||delete kr.transitionend.transition);function Mr(e){if(Ar[e])return Ar[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jr)return Ar[e]=t[n];return e}var Nr=Mr(`animationend`),Pr=Mr(`animationiteration`),Fr=Mr(`animationstart`),Ir=Mr(`transitionrun`),Lr=Mr(`transitionstart`),Rr=Mr(`transitioncancel`),zr=Mr(`transitionend`),Br=new Map,Vr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Vr.push(`scrollEnd`);function Hr(e,t){Br.set(e,t),pt(t,[e])}var Ur=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Wr=[],Gr=0,Kr=0;function qr(){for(var e=Gr,t=Kr=Gr=0;t<e;){var n=Wr[t];Wr[t++]=null;var r=Wr[t];Wr[t++]=null;var i=Wr[t];Wr[t++]=null;var a=Wr[t];if(Wr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Zr(n,i,a)}}function Jr(e,t,n,r){Wr[Gr++]=e,Wr[Gr++]=t,Wr[Gr++]=n,Wr[Gr++]=r,Kr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Yr(e,t,n,r){return Jr(e,t,n,r),Qr(e)}function Xr(e,t){return Jr(e,null,null,t),Qr(e)}function Zr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Oe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Qr(e){if(50<fu)throw fu=0,pu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(e,t,n,r){return new ei(e,t,n,r)}function ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ri(e,t){var n=e.alternate;return n===null?(n=ti(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ii(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ai(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ni(e)&&(s=1);else if(typeof e==`string`)s=qf(e,n,ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ti(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return oi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ti(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ti(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ti(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ti(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function oi(e,t,n,r){return e=ti(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ti(6,e,null,t),e.lanes=n,e}function ci(e){var t=ti(18,null,null,0);return t.stateNode=e,t}function K(e,t,n){return t=ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var q=new WeakMap;function li(e,t){if(typeof e==`object`&&e){var n=q.get(e);return n===void 0?(t={value:e,source:t,stack:de(t)},q.set(e,t),t):n}return{value:e,source:t,stack:de(t)}}var ui=[],di=0,fi=null,pi=0,mi=[],hi=0,gi=null,_i=1,vi=``;function yi(e,t){ui[di++]=pi,ui[di++]=fi,fi=e,pi=t}function bi(e,t,n){mi[hi++]=_i,mi[hi++]=vi,mi[hi++]=gi,gi=e;var r=_i;e=vi;var i=32-Oe(r)-1;r&=~(1<<i),n+=1;var a=32-Oe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,_i=1<<32-Oe(t)+i|n<<i|r,vi=a+e}else _i=1<<a|n<<i|r,vi=e}function xi(e){e.return!==null&&(yi(e,1),bi(e,1,0))}function Si(e){for(;e===fi;)fi=ui[--di],ui[di]=null,pi=ui[--di],ui[di]=null;for(;e===gi;)gi=mi[--hi],mi[hi]=null,vi=mi[--hi],mi[hi]=null,_i=mi[--hi],mi[hi]=null}function Ci(e,t){mi[hi++]=_i,mi[hi++]=vi,mi[hi++]=gi,_i=t.id,vi=t.overflow,gi=e}var wi=null,Ti=null,Ei=!1,Di=null,Oi=!1,ki=Error(i(519));function Ai(e){throw Ii(li(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ze]=e,t[Qe]=r,n){case`dialog`:Sd(`cancel`,t),Sd(`close`,t);break;case`iframe`:case`object`:case`embed`:Sd(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)Sd(yd[n],t);break;case`source`:Sd(`error`,t);break;case`img`:case`image`:case`link`:Sd(`error`,t),Sd(`load`,t);break;case`details`:Sd(`toggle`,t);break;case`input`:Sd(`invalid`,t),jt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Sd(`invalid`,t);break;case`textarea`:Sd(`invalid`,t),Ft(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Fd(t.textContent,n)?(r.popover!=null&&(Sd(`beforetoggle`,t),Sd(`toggle`,t)),r.onScroll!=null&&Sd(`scroll`,t),r.onScrollEnd!=null&&Sd(`scrollend`,t),r.onClick!=null&&(t.onclick=Ut),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(wi=e.return;wi;)switch(wi.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:wi=wi.return}}function Ni(e){if(e!==wi)return!1;if(!Ei)return Mi(e),Ei=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||qd(e.type,e.memoizedProps)),n=!n),n&&Ti&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ti=mf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ti=mf(e)}else t===27?(t=Ti,tf(e.type)?(e=pf,pf=null,Ti=e):Ti=t):Ti=wi?ff(e.stateNode.nextSibling):null;return!0}function Pi(){Ti=wi=null,Ei=!1}function Fi(){var e=Di;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Di=null),e}function Ii(e){Di===null?Di=[e]:Di.push(e)}var Li=R(null),Ri=null,zi=null;function Bi(e,t,n){B(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,z(Li)}function Hi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ui(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Hi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Hi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Wi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;hr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===H.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[np]:e.push(np))}a=a.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(i(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Zi=t.unstable_scheduleCallback,Qi=t.unstable_NormalPriority,$i={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=pd(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=N.S;N.S=function(e,t){tu=_e(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=R(null);function da(){var e=ua.current;return e===null?Ll.pooledCache:e}function fa(e,t){t===null?B(ua,ua.current):B(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(i(460)),ha=Error(i(474)),ga=Error(i(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ut,Ut),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Ut,Ut);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(i(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(i(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ri(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=si(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&ba(i)===t.type)?(t=a(t,n.props),Da(t,n),t.return=e,t):(t=ai(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=K(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=oi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ai(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case h:return t=K(t,e.mode,n),t.return=e,t;case T:return t=ba(t),f(e,t,n)}if(M(t)||k(t))return t=oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===b)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=ba(n),p(e,t,n,r)}if(M(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===b)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=ba(r),_(e,t,n,r,i)}if(M(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Ea(r),i);if(r.$$typeof===b)return _(e,t,n,Ji(t,r),i);Oa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ei&&yi(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Ei&&yi(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Ei&&yi(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ei&&yi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ei&&yi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&ba(l)===r.type){n(e,r.sibling),c=a(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=oi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ai(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=K(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=ba(o),x(e,r,o,c)}if(M(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ea(o),c);if(o.$$typeof===b)return x(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=x(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Qr(e),Zr(e,null,n),t}return Jr(e,r,t,n),Qr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,We(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Rl&p)===p:(r&p)===p){p!==0&&p===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ma=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=R(null),Ga=R(0);function Ka(e,t){e=Wl,B(Ga,e),B(Wa,t),Wl=e|t.baseLanes}function qa(){B(Ga,Wl),B(Wa,Wa.current)}function Ja(){Wl=Ga.current,z(Wa),z(Ga)}var Ya=R(null),Xa=null;function Za(e){var t=e.alternate;B(no,no.current&1),B(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){B(no,no.current),B(Ya,Ya.current)}function to(e){z(Ya),Xa===e&&(Xa=null),z(no)}var no=R(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lf(n)||uf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var io=0,ao=null,oo=null,so=null,co=!1,lo=!1,uo=!1,fo=0,po=0,mo=null,ho=0;function go(){throw Error(i(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function vo(e,t,n,r,i,a){return io=a,ao=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Fs:Is,uo=!1,a=n(r,i),uo=!1,lo&&(a=bo(t,n,r,i)),yo(e),a}function yo(e){N.H=Ps;var t=oo!==null&&oo.next!==null;if(io=0,so=oo=ao=null,co=!1,po=0,mo=null,t)throw Error(i(300));e===null||$s||(e=e.dependencies,e!==null&&Gi(e)&&($s=!0))}function bo(e,t,n,r){ao=e;var a=0;do{if(lo&&(mo=null),po=0,lo=!1,25<=a)throw Error(i(301));if(a+=1,so=oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}N.H=Ls,o=t(n,r)}while(lo);return o}function xo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Oo(t):t,e=e.useState()[0],(oo===null?null:oo.memoizedState)!==e&&(ao.flags|=1024),t}function So(){var e=fo!==0;return fo=0,e}function Co(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wo(e){if(co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}co=!1}io=0,so=oo=ao=null,lo=!1,po=fo=0,mo=null}function To(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return so===null?ao.memoizedState=so=e:so=so.next=e,so}function Eo(){if(oo===null){var e=ao.alternate;e=e===null?null:e.memoizedState}else e=oo.next;var t=so===null?ao.memoizedState:so.next;if(t!==null)so=t,oo=e;else{if(e===null)throw ao.alternate===null?Error(i(467)):Error(i(310));oo=e,e={memoizedState:oo.memoizedState,baseState:oo.baseState,baseQueue:oo.baseQueue,queue:oo.queue,next:null},so===null?ao.memoizedState=so=e:so=so.next=e}return so}function Do(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oo(e){var t=po;return po+=1,mo===null&&(mo=[]),e=ya(mo,e,t),t=ao,(so===null?t.memoizedState:so.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Fs:Is),e}function ko(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Oo(e);if(e.$$typeof===b)return qi(e)}throw Error(i(438,String(e)))}function Ao(e){var t=null,n=ao.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ao.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Do(),ao.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function jo(e,t){return typeof t==`function`?t(e):t}function Mo(e){return No(Eo(),oo,e)}function No(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(Rl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ao.lanes|=p,Kl|=p;f=u.action,uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ao.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&($s=!0,d&&(n=aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Po(e){var t=Eo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);hr(o,t.memoizedState)||($s=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Fo(e,t,n){var r=ao,a=Eo(),o=Ei;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!hr((oo||a).memoizedState,n);if(s&&(a.memoizedState=n,$s=!0),a=a.queue,os(Ro.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||so!==null&&so.memoizedState.tag&1){if(r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,a,n,t),null),Ll===null)throw Error(i(349));o||io&127||Io(r,t,n)}return n}function Io(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ao.updateQueue,t===null?(t=Do(),ao.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lo(e,t,n,r){t.value=n,t.getSnapshot=r,zo(t)&&Bo(e)}function Ro(e,t,n){return n(function(){zo(t)&&Bo(e)})}function zo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function Bo(e){var t=Xr(e,2);t!==null&&gu(t,e,2)}function Vo(e){var t=To();if(typeof e==`function`){var n=e;if(e=n(),uo){De(!0);try{n()}finally{De(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Ho(e,t,n,r){return e.baseState=n,No(e,oo,typeof r==`function`?r:jo)}function Uo(e,t,n,r,a){if(js(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};N.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Wo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Wo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=N.T,o={};N.T=o;try{var s=n(i,r),c=N.S;c!==null&&c(o,s),Go(e,t,s)}catch(n){qo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Go(e,t,a)}catch(n){qo(e,t,n)}}function Go(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ko(e,t,n)},function(n){return qo(e,t,n)}):Ko(e,t,n)}function Ko(e,t,n){t.status=`fulfilled`,t.value=n,Jo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Wo(e,n)))}function qo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Jo(t),t=t.next;while(t!==r)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yo(e,t){return t}function Xo(e,t){if(Ei){var n=Ll.formState;if(n!==null){a:{var r=ao;if(Ei){if(Ti){b:{for(var i=Ti,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=ff(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ti=ff(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=To(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:t},n.queue=r,n=Os.bind(null,ao,r),r.dispatch=n,r=Vo(!1),a=As.bind(null,ao,!1,r.queue),r=To(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Uo.bind(null,ao,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zo(e){return Qo(Eo(),oo,e)}function Qo(e,t,n){if(t=No(e,t,Yo)[0],e=Mo(jo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Oo(t)}catch(e){throw e===ma?ga:e}else r=t;t=Eo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ao.flags|=2048,ts(9,{destroy:void 0},$o.bind(null,i,n),null)),[r,a,e]}function $o(e,t){e.action=t}function es(e){var t=Eo(),n=oo;if(n!==null)return Qo(t,n,e);Eo(),t=t.memoizedState,n=Eo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ts(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ao.updateQueue,t===null&&(t=Do(),ao.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ns(){return Eo().memoizedState}function rs(e,t,n,r){var i=To();ao.flags|=e,i.memoizedState=ts(1|t,{destroy:void 0},n,r===void 0?null:r)}function is(e,t,n,r){var i=Eo();r=r===void 0?null:r;var a=i.memoizedState.inst;oo!==null&&r!==null&&_o(r,oo.memoizedState.deps)?i.memoizedState=ts(t,a,n,r):(ao.flags|=e,i.memoizedState=ts(1|t,a,n,r))}function as(e,t){rs(8390656,8,e,t)}function os(e,t){is(2048,8,e,t)}function ss(e){ao.flags|=4;var t=ao.updateQueue;if(t===null)t=Do(),ao.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function cs(e){var t=Eo().memoizedState;return ss({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ls(e,t){return is(4,2,e,t)}function us(e,t){return is(4,4,e,t)}function ds(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fs(e,t,n){n=n==null?null:n.concat([e]),is(4,4,ds.bind(null,t,e),n)}function ps(){}function ms(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hs(e,t){var n=Eo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&_o(t,r[1]))return r[0];if(r=e(),uo){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r}function gs(e,t,n){return n===void 0||io&1073741824&&!(Rl&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),ao.lanes|=e,Kl|=e,n)}function _s(e,t,n,r){return hr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(Rl&261930)?($s=!0,e.memoizedState=n):(e=hu(),ao.lanes|=e,Kl|=e,t):(e=gs(e,n,r),hr(e,t)||($s=!0),e)}function vs(e,t,n,r,i){var a=P.p;P.p=a!==0&&8>a?a:8;var o=N.T,s={};N.T=s,As(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ks(e,t,ca(c,r),mu(e)):ks(e,t,r,mu(e))}catch(n){ks(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function ys(){}function bs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=xs(e).queue;vs(e,a,t,F,n===null?ys:function(){return Ss(e),n(r)})}function xs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ss(e){var t=xs(e);t.next===null&&(t=e.alternate.memoizedState),ks(e,t.next.queue,{},mu())}function Cs(){return qi(np)}function ws(){return Eo().memoizedState}function Ts(){return Eo().memoizedState}function Es(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(gu(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ds(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},js(e)?Ms(t,n):(n=Yr(e,t,n,r),n!==null&&(gu(n,e,r),Ns(n,t,r)))}function Os(e,t,n){ks(e,t,n,mu())}function ks(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(js(e))Ms(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,o))return Jr(e,t,i,0),Ll===null&&qr(),!1}catch{}if(n=Yr(e,t,i,r),n!==null)return gu(n,e,r),Ns(n,t,r),!0}return!1}function As(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},js(e)){if(t)throw Error(i(479))}else t=Yr(e,n,r,2),t!==null&&gu(t,e,2)}function js(e){var t=e.alternate;return e===ao||t!==null&&t===ao}function Ms(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ns(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,We(e,n)}}var Ps={readContext:qi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ps.useEffectEvent=go;var Fs={readContext:qi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:as,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),rs(4194308,4,ds.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){De(!0);try{n(t)}finally{De(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ds.bind(null,ao,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,n=Os.bind(null,ao,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ps,useDeferredValue:function(e,t){return gs(To(),e,t)},useTransition:function(){var e=Vo(!1);return e=vs.bind(null,ao,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ao,a=To();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Ll===null)throw Error(i(349));Rl&127||Io(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,as(Ro.bind(null,r,o,e),[e]),r.flags|=2048,ts(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Ll.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Oe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=ho++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Cs,useFormState:Xo,useActionState:Xo,useOptimistic:function(e){var t=To();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=As.bind(null,ao,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ao,useCacheRefresh:function(){return To().memoizedState=Es.bind(null,ao)},useEffectEvent:function(e){var t=To(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Is={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Mo,useRef:ns,useState:function(){return Mo(jo)},useDebugValue:ps,useDeferredValue:function(e,t){return _s(Eo(),oo.memoizedState,e,t)},useTransition:function(){var e=Mo(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){return Ho(Eo(),oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Is.useEffectEvent=cs;var Ls={readContext:qi,use:ko,useCallback:ms,useContext:qi,useEffect:os,useImperativeHandle:fs,useInsertionEffect:ls,useLayoutEffect:us,useMemo:hs,useReducer:Po,useRef:ns,useState:function(){return Po(jo)},useDebugValue:ps,useDeferredValue:function(e,t){var n=Eo();return oo===null?gs(n,e,t):_s(n,oo.memoizedState,e,t)},useTransition:function(){var e=Po(jo)[0],t=Eo().memoizedState;return[typeof e==`boolean`?e:Oo(e),t]},useSyncExternalStore:Fo,useId:ws,useHostTransitionStatus:Cs,useFormState:es,useActionState:es,useOptimistic:function(e,t){var n=Eo();return oo===null?(n.baseState=e,[e,n.queue.dispatch]):Ho(n,oo,e,t)},useMemoCache:Ao,useCacheRefresh:Ts};Ls.useEffectEvent=cs;function Rs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var zs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(gu(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(gu(t,e,n),La(t,e,n))}};function Bs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(i,a):!0}function Vs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&zs.enqueueReplaceState(t,t.state,null)}function Hs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Us(e){Ur(e)}function Ws(e){console.error(e)}function Gs(e){Ur(e)}function Ks(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Js(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ks(e,t)},n}function Ys(e){return e=Fa(e),e.tag=3,e}function Xs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){qs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){qs(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Zs(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,a,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,a)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),qu(e,r,a)),!1}throw Error(i(435,n.tag))}return qu(e,r,a),Ou(),!1}if(Ei)return t=Ya.current,t===null?(r!==ki&&(t=Error(i(423),{cause:r}),Ii(li(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=li(r,n),a=Js(e.stateNode,r,a),Ra(e,a),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ki&&(e=Error(i(422),{cause:r}),Ii(li(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=li(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=li(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Js(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ys(a),Xs(a,e,n,r),Ra(n,a),!1}n=n.return}while(n!==null);return!1}var Qs=Error(i(461)),$s=!1;function ec(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function tc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ki(t),r=vo(e,t,n,o,a,i),s=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Ei&&s&&xi(t),t.flags|=1,ec(e,t,r,i),t.child)}function nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,rc(e,t,a,r,i)):(e=ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ec(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return Tc(e,t,i)}return t.flags|=1,e=ri(a,r),e.ref=t.ref,e.return=t,t.child=e}function rc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref)if($s=!1,t.pendingProps=r=a,Ec(e,i))e.flags&131072&&($s=!0);else return t.lanes=e.lanes,Tc(e,t,i)}return dc(e,t,n,r,i)}function ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return oc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,oc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return ec(e,t,i,n),t.child}function ac(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oc(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function sc(e,t){return t=bc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cc(e,t,n){return Aa(t,e.child,null,n),e=sc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function lc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ei){if(r.mode===`hidden`)return e=sc(t,r),t.lanes=536870912,ac(null,e);if(Qa(t),(e=Ti)?(e=cf(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return sc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),a)if(t.flags&256)t.flags&=-257,t=cc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if($s||Wi(e,t,n,!1),a=(n&e.childLanes)!==0,$s||a){if(r=Ll,r!==null&&(s=Ge(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xr(e,s),gu(r,e,s),Qs;Ou(),t=cc(e,t,n)}else e=o.treeContext,Ti=ff(s.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=sc(t,r),t.flags|=4096;return t}return e=ri(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function dc(e,t,n,r,i){return Ki(t),n=vo(e,t,n,r,void 0,i),r=So(),e!==null&&!$s?(Co(e,t,i),Tc(e,t,i)):(Ei&&r&&xi(t),t.flags|=1,ec(e,t,n,i),t.child)}function fc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=bo(t,r,n,i),yo(e),r=So(),e!==null&&!$s?(Co(e,t,a),Tc(e,t,a)):(Ei&&r&&xi(t),t.flags|=1,ec(e,t,n,a),t.child)}function pc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=$r,o=n.contextType;typeof o==`object`&&o&&(a=qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=zs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):$r,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Rs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&zs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Hs(n,s);a.props=c;var l=a.context,u=n.contextType;o=$r,typeof u==`object`&&u&&(o=qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Vs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Rs(t,n,d,r),l=t.memoizedState),(c=Ma||Bs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Hs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=$r,typeof l==`object`&&l&&(c=qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Vs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Rs(t,n,s,r),p=t.memoizedState),(u=Ma||Bs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,uc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):ec(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Tc(e,t,i),e}function mc(e,t,n,r){return Pi(),t.flags|=256,ec(e,t,n,r),t.child}var hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:pa()}}function _c(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function vc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ei){if(a?Za(t):eo(t),(e=Ti)?(e=cf(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:gi===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return uf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(eo(t),a=t.mode,c=bc({mode:`hidden`,children:c},a),r=oi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(null,r)):(Za(t),yc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=xc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,a=t.mode,r=bc({mode:`visible`,children:r.children},a),c=oi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=gc(n),r.childLanes=_c(e,s,n),t.memoizedState=hc,t=ac(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),uf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=xc(e,t,n)}else if($s||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,$s||s){if(s=Ll,s!==null&&(r=Ge(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Xr(e,r),gu(s,e,r),Qs;lf(c)||Ou(),t=xc(e,t,n)}else lf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ti=ff(c.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=yc(t,r.children),t.flags|=4096);return t}return a?(eo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ri(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=oi(c,a,n,null),c.flags|=2):c=ri(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ac(null,r),r=t.child,c=e.child.memoizedState,c===null?c=gc(n):(a=c.cachePool,a===null?a=pa():(l=$i._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=_c(e,s,n),t.memoizedState=hc,ac(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ri(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function yc(e,t){return t=bc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function bc(e,t){return e=ti(22,e,null,t),e.lanes=0,e}function xc(e,t,n){return Aa(t,e.child,null,n),e=yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Cc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(no,o),ec(e,t,r,n),r=Ei?pi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sc(e,n,t);else if(e.tag===19)Sc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cc(t,!0,n,null,a,r);break;case`together`:Cc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ec(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Dc(e,t,n){switch(t.tag){case 3:ne(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:ie(t);break;case 4:ne(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=Tc(e,t,n),e===null?null:e.sibling):vc(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return wc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(no,no.current),r)break;return null;case 22:return t.lanes=0,ic(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return Tc(e,t,n)}function Oc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)$s=!0;else{if(!Ec(e,n)&&!(t.flags&128))return $s=!1,Dc(e,t,n);$s=!!(e.flags&131072)}else $s=!1,Ei&&t.flags&1048576&&bi(t,pi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ni(e)?(r=Hs(e,r),t.tag=1,t=pc(null,t,e,r,n)):(t.tag=0,t=dc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=tc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=nc(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return dc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Hs(r,t.pendingProps),pc(e,t,r,a,n);case 3:a:{if(ne(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=mc(e,t,r,n);break a}else if(r!==a){a=li(Error(i(424)),t),Ii(a),t=mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ti=ff(e.firstChild),wi=t,Ei=!0,Di=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===a){t=Tc(e,t,n);break a}ec(e,t,r,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=Nf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ei||(n=t.type,e=t.pendingProps,r=Wd(te.current).createElement(n),r[Ze]=t,r[Qe]=e,Rd(r,n,e),ut(r),t.stateNode=r):t.memoizedState=Nf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Ei&&(r=t.stateNode=gf(t.type,t.pendingProps,te.current),wi=t,Oi=!0,a=Ti,tf(t.type)?(pf=a,Ti=ff(r.firstChild)):Ti=a),ec(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ei&&((a=r=Ti)&&(r=of(r,t.type,t.pendingProps,Oi),r===null?a=!1:(t.stateNode=r,wi=t,Ti=ff(r.firstChild),Oi=!1,a=!0)),a||Ai(t)),ie(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,qd(a,o)?r=null:s!==null&&qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=vo(e,t,xo,null,null,n),np._currentValue=a),uc(e,t),ec(e,t,r,n),t.child;case 6:return e===null&&Ei&&((e=n=Ti)&&(n=sf(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,wi=t,Ti=null,e=!0)),e||Ai(t)),null;case 13:return vc(e,t,n);case 4:return ne(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):ec(e,t,r,n),t.child;case 11:return tc(e,t,t.type,t.pendingProps,n);case 7:return ec(e,t,t.pendingProps,n),t.child;case 8:return ec(e,t,t.pendingProps.children,n),t.child;case 12:return ec(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),ec(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ki(t),a=qi(a),r=r(a),t.flags|=1,ec(e,t,r,n),t.child;case 14:return nc(e,t,t.type,t.pendingProps,n);case 15:return rc(e,t,t.type,t.pendingProps,n);case 19:return wc(e,t,n);case 31:return lc(e,t,n);case 22:return ic(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(a=da(),a===null&&(a=Ll,o=ea(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Na(t),Bi(t,$i,a)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Bi(t,$i,r),r!==a.cache&&Ui(t,[$i],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Bi(t,$i,r))),ec(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function kc(e){e.flags|=4}function Ac(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Tu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function jc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Jf(t))if(Tu())e.flags|=8192;else throw xa=_a,ha}function Mc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ze(),e.lanes|=t,Xl|=t)}function Nc(e,t){if(!Ei)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Fc(e,t,n){var r=t.pendingProps;switch(Si(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pc(t),null;case 1:return Pc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?kc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Pc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(kc(t),o===null?(Pc(t),Ac(t,a,null,r,n)):(Pc(t),jc(t,o))):o?o===e.memoizedState?(Pc(t),t.flags&=-16777217):(kc(t),Pc(t),jc(t,o)):(e=e.memoizedProps,e!==r&&kc(t),Pc(t),Ac(t,a,e,r,n)),null;case 27:if(U(t),n=te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}e=ee.current,Ni(t)?ji(t,e):(e=gf(a,r,n),t.stateNode=e,kc(t))}return Pc(t),null;case 5:if(U(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Pc(t),null}if(o=ee.current,Ni(t))ji(t,o);else{var s=Wd(te.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ze]=t,o[Qe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Rd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&kc(t)}}return Pc(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&kc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=wi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Ai(t,!0)}else e=Wd(e).createTextNode(r),e[Ze]=t,t.stateNode=e}return Pc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ze]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(i(558))}return Pc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ze]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Mc(t,t.updateQueue),Pc(t),null);case 4:return re(),e===null&&Td(t.stateNode.containerInfo),Pc(t),null;case 10:return Vi(t.type),Pc(t),null;case 19:if(z(no),r=t.memoizedState,r===null)return Pc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Nc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Nc(r,!1),e=o.updateQueue,t.updateQueue=e,Mc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ii(n,e),n=n.sibling;return B(no,no.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_e()>nu&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304)}else{if(!a)if(e=ro(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Mc(t,e),Nc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Pc(t),null}else 2*_e()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,Nc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Pc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_e(),e.sibling=null,n=no.current,B(no,a?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Pc(t),t.subtreeFlags&6&&(t.flags|=8192)):Pc(t),n=t.updateQueue,n!==null&&Mc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Pc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Ic(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),re(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return U(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(no),null;case 4:return re(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&z(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Lc(e,t){switch(Si(t),t.tag){case 3:Vi($i),re();break;case 26:case 27:case 5:U(t);break;case 4:re();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:z(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&z(ua);break;case 24:Vi($i)}}function Rc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function zc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Bc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){Ku(e,e.return,t)}}}function Vc(e,t,n){n.props=Hs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Hc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function J(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;zd(r,e.type,n,t),r[Qe]=t}catch(t){Ku(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tf(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&tf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ut));else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Rd(t,r,n),t[Ze]=e,t[Qe]=n}catch(t){Ku(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Hd=dp,e=br(e),xr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ud={focusedElem:e,selectionRange:n},dp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Hs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ku(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)af(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:af(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Rc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ku(n,n.return,e)}else{var i=Hs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ku(n,n.return,e)}}r&64&&Bc(n),r&512&&Hc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){Ku(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Hc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Xu.bind(null,n),df(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&at(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(Ee&&typeof Ee.onCommitFiberUnmount==`function`)try{Ee.onCommitFiberUnmount(Te,n)}catch{}switch(n.tag){case 26:Zc||J(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||J(n,t);var r=il,i=al;tf(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),_f(n.stateNode),il=r,al=i;break;case 5:Zc||J(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){Ku(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Ku(n,t,e)}break;case 18:il!==null&&(al?(e=il,nf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Lp(e)):nf(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:zc(2,n,t),Zc||zc(4,n,t),ol(e,t,n);break;case 1:Zc||(J(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Vc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Lp(e)}catch(e){Ku(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Lp(e)}catch(e){Ku(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(i(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Zu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(tf(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(i(160));sl(o,s,a),il=null,al=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(zc(3,e,e.return),Rc(3,e),zc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||J(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||J(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[it]||o[Ze]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Rd(o,r,n),o[Ze]=e,ut(o),r=o;break a;case`link`:var s=Gf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Rd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Gf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Rd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Ze]=e,ut(o),r=o}e.stateNode=r}else Kf(a,e.type,e.stateNode);else e.stateNode=Bf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Kf(a,e.type,e.stateNode):Bf(a,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||J(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||J(n,n.return)),e.flags&32){a=e.stateNode;try{It(a,``)}catch(t){Ku(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Wc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ku(e,e.return,t)}}break;case 3:if(Wf=null,a=pl,pl=bf(t.containerInfo),fl(t,e),pl=a,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Lp(t.containerInfo)}catch(t){Ku(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=bf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=_e()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||a,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Xc||Zc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ku(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Ku(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?rf(m,!0):rf(l.stateNode,!1)}catch(e){Ku(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Jc(e,Kc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(It(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(i(161))}}catch(t){Ku(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zc(4,t,t.return),vl(t);break;case 1:J(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Vc(t,t.return,n),vl(t);break;case 27:_f(t.stateNode);case 26:case 5:J(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Rc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ku(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){Ku(r,r.return,e)}}n&&o&64&&Bc(a),Hc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Hc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Hc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ta(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Rc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ku(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Rc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Yf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=bf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&zc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:zc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Y=null,Rl=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Il&2&&Rl!==0?Rl&-Rl:N.T===null?Je():pd()}function hu(){if(Yl===0)if(!(Rl&536870912)||Ei){var e=Ne;Ne<<=1,!(Ne&3932160)&&(Ne=262144),Yl=e}else Yl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Ll&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Rl,Yl,!1)),Ve(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(ql|=n),Gl===4&&bu(e,Rl,Yl,!1)),ad(e))}function _u(e,t,n){if(Il&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Le(e,t),a=r?ju(e,t):ku(e,t,!0),o=r;do{if(a===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!yu(n)){a=ku(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,a=4;break a}o=Ql,Ql=a,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Cu(e,0),bu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=eu+300-_e(),10<a)){if(bu(r,t,Yl,!Vl),Ie(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Xd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),a);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);ad(e)}function vu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},Ol(t,a,d);var m=(a&62914560)===a?eu-_e():(a&4194048)===a?tu-_e():0;if(m=Zf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Oe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ue(e,n,t)}function xu(){return Il&6?!0:(od(0,!1),!1)}function Su(){if(Y!==null){if(zl===0)var e=Y.return;else e=Y,zi=Ri=null,wo(e),wa=null,Ta=0,e=Y;for(;e!==null;)Lc(e.alternate,e),e=e.return;Y=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Ll=e,Y=n=ri(e.current,null),Rl=t,zl=0,Bl=null,Vl=!1,Hl=Le(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Oe(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,qr(),n}function wu(e,t){ao=null,N.H=Ps,t===ma||t===ga?(t=Sa(),zl=3):t===ha?(t=Sa(),zl=4):zl=t===Qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,Y===null&&(Gl=1,Ks(e,li(t,e.current)))}function Tu(){var e=Ya.current;return e===null?!0:(Rl&4194048)===Rl?Xa===null:(Rl&62914560)===Rl||Rl&536870912?e===Xa:!1}function Eu(){var e=N.H;return N.H=Ps,e===null?Ps:e}function Du(){var e=N.A;return N.A=Pl,e}function Ou(){Gl=4,Vl||(Rl&4194048)!==Rl&&Ya.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Ll===null||bu(Ll,Rl,Yl,!1)}function ku(e,t,n){var r=Il;Il|=2;var i=Eu(),a=Du();(Ll!==e||Rl!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&Y!==null){var s=Y,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Il=r,N.H=i,N.A=a,Y===null&&(Ll=null,Rl=0,qr()),o}function Au(){for(;Y!==null;)Nu(Y)}function ju(e,t){var n=Il;Il|=2;var r=Eu(),a=Du();Ll!==e||Rl!==t?(ru=null,nu=_e()+500,Cu(e,t)):Hl=Le(e,t);a:do try{if(zl!==0&&Y!==null){t=Y;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(va(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Ll!==e||(zl=7),ad(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:va(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(e,t,o,7));break;case 5:var s=null;switch(Y.tag){case 26:s=Y.memoizedState;case 5:case 27:var c=Y;if(s?Jf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)Y=l;else{var u=c.return;u===null?Y=null:(Y=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(i(462))}}Mu();break}catch(t){wu(e,t)}while(1);return zi=Ri=null,N.H=r,N.A=a,Il=n,Y===null?(Ll=null,Rl=0,qr(),Gl):0}function Mu(){for(;Y!==null&&!he();)Nu(Y)}function Nu(e){var t=Oc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):Y=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=fc(n,t,t.pendingProps,t.type,void 0,Rl);break;case 11:t=fc(n,t,t.pendingProps,t.type.render,t.ref,Rl);break;case 5:wo(t);default:Lc(n,t),t=Y=ii(t,Wl),t=Oc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):Y=t}function Fu(e,t,n,r){zi=Ri=null,wo(t),wa=null,Ta=0;var i=t.return;try{if(Zs(e,i,t,n,Rl)){Gl=1,Ks(e,li(n,e.current)),Y=null;return}}catch(t){if(i!==null)throw Y=i,t;Gl=1,Ks(e,li(n,e.current)),Y=null;return}t.flags&32768?(Ei||r===1?e=!0:Hl||Rl&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Fc(t.alternate,t,Wl);if(n!==null){Y=n;return}if(t=t.sibling,t!==null){Y=t;return}Y=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(e,t){do{var n=Ic(e.alternate,e);if(n!==null){n.flags&=32767,Y=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Y=e;return}Y=e=n}while(e!==null);Gl=6,Y=null}function Ru(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==0);if(Il&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Kr,He(e,n,o,s,c,l),e===Ll&&(Y=Ll=null,Rl=0),su=t,ou=e,cu=n,lu=o,uu=a,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(be,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=N.T,N.T=null,a=P.p,P.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,P.p=a,N.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Ud,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=vr(s,h),v=vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}dp=!!Hd,Ud=Hd=null}finally{Il=i,P.p=r,N.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=N.T,N.T=null;var r=P.p;P.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,P.p=r,N.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,ge();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),qe(n),t=t.stateNode,Ee&&typeof Ee.onCommitFiberRoot==`function`)try{Ee.onCommitFiberRoot(Te,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=N.T,i=P.p,P.p=2,N.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{N.T=t,P.p=i}}cu&3&&Uu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,od(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=qe(cu),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Il&6)throw Error(i(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,od(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot==`function`)try{Ee.onPostCommitFiberRoot(Te,o)}catch{}return!0}finally{P.p=a,N.T=r,Hu(e,t)}}function Gu(e,t,n){t=li(n,t),t=Js(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ve(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=li(n,e),n=Ys(2),r=Ia(t,n,2),r!==null&&(Xs(n,r,t,e),Ve(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>_e()-eu?!(Il&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=ze()),e=Xr(e,t),e!==null&&(Ve(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return pe(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Oe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Rl,a=Ie(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Le(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Yd()&&(e=id);for(var t=_e(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Oe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Re(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=Rl,n=Ie(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&me(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Le(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&me(r),qe(n)){case 2:case 8:n=ye;break;case 32:n=be;break;case 268435456:n=Se;break;default:n=be}return r=ud.bind(null,e),n=pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&me(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Rl;return r=Ie(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),ld(e,_e()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Uu())return null;_u(e,t,!0)}function fd(){$d(function(){Il&6?pe(ve,sd):cd()})}function pd(){if(id===0){var e=ia;e===0&&(e=Me,Me<<=1,!(Me&261888)&&(Me=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Ht(``+e)}function hd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[Qe]||null).action),o=r.submitter;o&&(t=(t=o[Qe]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new dn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);bs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),bs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<Vr.length;_d++){var vd=Vr[_d];Hr(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}Hr(Nr,`onAnimationEnd`),Hr(Pr,`onAnimationIteration`),Hr(Fr,`onAnimationStart`),Hr(`dblclick`,`onDoubleClick`),Hr(`focusin`,`onFocus`),Hr(`focusout`,`onBlur`),Hr(Ir,`onTransitionRun`),Hr(Lr,`onTransitionStart`),Hr(Rr,`onTransitionCancel`),Hr(zr,`onTransitionEnd`),mt(`onMouseEnter`,[`mouseout`,`mouseover`]),mt(`onMouseLeave`,[`mouseout`,`mouseover`]),mt(`onPointerEnter`,[`pointerout`,`pointerover`]),mt(`onPointerLeave`,[`pointerout`,`pointerover`]),pt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),pt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),pt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),pt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),pt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),pt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}}}}function Sd(e,t){var n=t[et];n===void 0&&(n=t[et]=new Set);var r=e+`__bubble`;n.has(r)||(Ed(t,e,2,!1),n.add(r))}function Cd(e,t,n){var r=0;t&&(r|=4),Ed(n,e,r,t)}var wd=`_reactListening`+Math.random().toString(36).slice(2);function Td(e){if(!e[wd]){e[wd]=!0,dt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Cd(t,!1,e),Cd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wd]||(t[wd]=!0,Cd(`selectionchange`,!1,t))}}function Ed(e,t,n,r){switch(vp(t)){case 2:var i=fp;break;case 8:i=pp;break;default:i=mp}n=i.bind(null,t,n,e),i=void 0,!$t||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Dd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Xt(function(){var r=a,i=Gt(n),s=[];a:{var c=Br.get(e);if(c!==void 0){var l=dn,u=e;switch(e){case`keypress`:if(on(n)===0)break a;case`keydown`:case`keyup`:l=kn;break;case`focusin`:u=`focus`,l=bn;break;case`focusout`:u=`blur`,l=bn;break;case`beforeblur`:case`afterblur`:l=bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=yn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=jn;break;case Nr:case Pr:case Fr:l=xn;break;case zr:l=Mn;break;case`scroll`:case`scrollend`:l=pn;break;case`wheel`:l=Nn;break;case`copy`:case`cut`:case`paste`:l=Sn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=An;break;case`toggle`:case`beforetoggle`:l=Pn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Zt(m,p),g!=null&&d.push(Od(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Wt&&(u=n.relatedTarget||n.fromElement)&&(ot(u)||u[$e]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=An,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ct(l),h=u==null?c:ct(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ad,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&jd(s,c,l,d,!1),u!==null&&f!==null&&jd(s,f,u,d,!0)}}a:{if(c=r?ct(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=rr;else if(Zn(c))if(ir)v=pr;else{v=dr;var y=ur}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&G(r.elementType)&&(v=rr):v=fr;if(v&&=v(e,r)){Qn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Mt(c,`number`,c.value)}switch(y=r?ct(r):window,e){case`focusin`:(Zn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:Er=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Er=!1,Dr(s,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Dr(s,n,i)}var b;if(In)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else qn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(zn&&n.locale!==`ko`&&(qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&qn&&(b=an()):(tn=i,nn=`value`in tn?tn.value:tn.textContent,qn=!0)),y=kd(r,x),0<y.length&&(x=new Cn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Kn(n),b!==null&&(x.data=b)))),(b=Rn?Jn(e,n):Yn(e,n))&&(x=kd(r,`onBeforeInput`),0<x.length&&(y=new Cn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),gd(s,e,r,n,i)}xd(s,t)})}function Od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Zt(e,n),i!=null&&r.unshift(Od(e,i,a)),i=Zt(e,t),i!=null&&r.push(Od(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ad(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Zt(n,a),l!=null&&o.unshift(Od(n,l,c))):i||(l=Zt(n,a),l!=null&&o.push(Od(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Md=/\r\n?/g,Nd=/\u0000|\uFFFD/g;function Pd(e){return(typeof e==`string`?e:``+e).replace(Md,`
10
- `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Id(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||It(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&It(e,``+r);break;case`className`:bt(e,`class`,r);break;case`tabIndex`:bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:bt(e,n,r);break;case`style`:zt(e,r,o);break;case`data`:if(t!==`object`){bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Id(e,t,`name`,a.name,a,null),Id(e,t,`formEncType`,a.formEncType,a,null),Id(e,t,`formMethod`,a.formMethod,a,null),Id(e,t,`formTarget`,a.formTarget,a,null)):(Id(e,t,`encType`,a.encType,a,null),Id(e,t,`method`,a.method,a,null),Id(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ht(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Sd(`beforetoggle`,e),Sd(`toggle`,e),yt(e,`popover`,r);break;case`xlinkActuate`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:yt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Bt.get(n)||n,yt(e,n,r))}}function Ld(e,t,n,r,a,o){switch(n){case`style`:zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?It(e,r):(typeof r==`number`||typeof r==`bigint`)&&It(e,``+r);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ft.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[Qe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):yt(e,n,r)}}}function Rd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Sd(`error`,e),Sd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,o,s,n,null)}}a&&Id(e,t,`srcSet`,n.srcSet,n,null),r&&Id(e,t,`src`,n.src,n,null);return;case`input`:Sd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Id(e,t,r,d,n,null)}}jt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Sd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Id(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Nt(e,!!r,n,!0):Nt(e,!!r,t,!1);return;case`textarea`:for(s in Sd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Id(e,t,s,c,n,null)}Ft(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Id(e,t,l,r,n,null)}return;case`dialog`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Sd(`cancel`,e),Sd(`close`,e);break;case`iframe`:case`object`:Sd(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)Sd(yd[r],e);break;case`image`:Sd(`error`,e),Sd(`load`,e);break;case`details`:Sd(`toggle`,e);break;case`embed`:case`source`:case`link`:Sd(`error`,e),Sd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,u,r,n,null)}return;default:if(G(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Id(e,t,c,r,n,null))}function zd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Id(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Id(e,t,p,m,r,f)}}At(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Id(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Id(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Nt(e,!!n,n?[]:``,!1):Nt(e,!!n,t,!0)):Nt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Id(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Id(e,t,s,a,r,o)}Pt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Id(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Id(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Id(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Id(e,t,u,p,r,m)}return;default:if(G(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Id(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Id(e,t,f,p,r,m)}function Bd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Vd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Bd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Bd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Hd=null,Ud=null;function Wd(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Kd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jd=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e===Jd?!1:(Jd=e,!0):(Jd=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,Qd=typeof Promise==`function`?Promise:void 0,$d=typeof queueMicrotask==`function`?queueMicrotask:Qd===void 0?Xd:function(e){return Qd.resolve(null).then(e).catch(ef)};function ef(e){setTimeout(function(){throw e})}function tf(e){return e===`head`}function nf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Lp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_f(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_f(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[it]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_f(e.ownerDocument.body);n=i}while(n);Lp(t)}function rf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function af(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:af(n),at(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function of(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[it])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=ff(e.nextSibling),e===null)break}return null}function sf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ff(e.nextSibling),e===null))return null;return e}function cf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ff(e.nextSibling),e===null))return null;return e}function lf(e){return e.data===`$?`||e.data===`$~`}function uf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function df(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function ff(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pf=null;function mf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ff(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gf(e,t,n){switch(t=Wd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _f(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);at(e)}var vf=new Map,yf=new Set;function bf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xf=P.d;P.d={f:Sf,r:Cf,D:Ef,C:Df,L:Of,m:kf,X:jf,S:Af,M:Mf};function Sf(){var e=xf.f(),t=xu();return e||t}function Cf(e){var t=st(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):xf.r(e)}var wf=typeof document>`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),yf.has(i)||(yf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function Ef(e){xf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){xf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){xf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+kt(n.imageSizes)+`"]`)):i+=`[href="`+kt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Rf(e)}vf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function kf(e,t){xf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+kt(r)+`"][href="`+kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!vf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),vf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),ut(r),n.head.appendChild(r)}}}function Af(e,t,n){xf.S(e,t,n);var r=wf;if(r&&e){var i=lt(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);ut(c),Rd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){xf.X(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=f({src:e,async:!0},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){xf.M(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=te.current)?bf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Pf(n.href),n=lt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pf(n.href);var o=lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),vf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vf.set(e,n),o||Lf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Rf(n),n=lt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pf(e){return`href="`+kt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Rd(t,`link`,n),ut(t),e.head.appendChild(t))}function Rf(e){return`[src="`+kt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+kt(n.href)+`"]`);if(r)return t.instance=r,ut(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ut(r),Rd(r,`style`,a),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,ut(o),o;r=If(n),(a=vf.get(a))&&Hf(r,a),o=(e.ownerDocument||e).createElement(`link`),ut(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(a=e.querySelector(zf(o)))?(t.instance=a,ut(a),a):(r=n,(a=vf.get(o))&&(r=f({},n),Uf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ut(a),Rd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vf(r,n.precedence,e));return t.instance}function Vf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wf=null;function Gf(e,t,n){if(Wf===null){var r=new Map,i=Wf=new Map;i.set(n,r)}else i=Wf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[it]||a[Ze]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Kf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ut(a);return}a=t.ownerDocument||t,r=If(r),(i=vf.get(i))&&Hf(r,i),a=a.createElement(`link`),ut(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Xf===0&&(Xf=62500*Vd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Qf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var np={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function rp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Be(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Be(0),this.hiddenUpdates=Be(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ip(e,t,n,r,i,a,o,s,c,l,u,d){return e=new rp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ap(e){return e?(e=$r,e):$r}function op(e,t,n,r,i,a){i=ap(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(gu(n,e,t),La(n,e,t))}function sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cp(e,t){sp(e,t),(e=e.alternate)&&sp(e,t)}function lp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&gu(t,e,67108864),cp(e,67108864)}}function up(e){if(e.tag===13||e.tag===31){var t=mu();t=Ke(t);var n=Xr(e,t);n!==null&&gu(n,e,t),cp(e,t)}}var dp=!0;function fp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,mp(e,t,n,r)}finally{P.p=a,N.T=i}}function pp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,mp(e,t,n,r)}finally{P.p=a,N.T=i}}function mp(e,t,n,r){if(dp){var i=hp(r);if(i===null)Dd(e,t,r,gp,n),Dp(e,r);else if(kp(i,e,t,n,r))r.stopPropagation();else if(Dp(e,r),t&4&&-1<Ep.indexOf(e)){for(;i!==null;){var a=st(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Fe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Oe(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Il&6)&&(nu=_e()+500,od(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&gu(s,a,2),xu(),cp(a,2)}if(a=hp(r),a===null&&Dd(e,t,r,gp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function hp(e){return e=Gt(e),_p(e)}var gp=null;function _p(e){if(gp=null,e=ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gp=e,null}function vp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(W()){case ve:return 2;case ye:return 8;case be:case xe:return 32;case Se:return 268435456;default:return 32}default:return 32}}var yp=!1,bp=null,xp=null,Sp=null,Cp=new Map,wp=new Map,Tp=[],Ep=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Dp(e,t){switch(e){case`focusin`:case`focusout`:bp=null;break;case`dragenter`:case`dragleave`:xp=null;break;case`mouseover`:case`mouseout`:Sp=null;break;case`pointerover`:case`pointerout`:Cp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:wp.delete(t.pointerId)}}function Op(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=st(t),t!==null&&lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kp(e,t,n,r,i){switch(t){case`focusin`:return bp=Op(bp,e,t,n,r,i),!0;case`dragenter`:return xp=Op(xp,e,t,n,r,i),!0;case`mouseover`:return Sp=Op(Sp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Cp.set(a,Op(Cp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,wp.set(a,Op(wp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ap(e){var t=ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){up(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){up(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=st(n),t!==null&&lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Mp(e,t,n){jp(e)&&n.delete(t)}function Np(){yp=!1,bp!==null&&jp(bp)&&(bp=null),xp!==null&&jp(xp)&&(xp=null),Sp!==null&&jp(Sp)&&(Sp=null),Cp.forEach(Mp),wp.forEach(Mp)}function Pp(e,n){e.blockedOn===n&&(e.blockedOn=null,yp||(yp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Np)))}var Fp=null;function Ip(e){Fp!==e&&(Fp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fp===e&&(Fp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(_p(r||n)===null)continue;break}var a=st(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Lp(e){function t(t){return Pp(t,e)}bp!==null&&Pp(bp,e),xp!==null&&Pp(xp,e),Sp!==null&&Pp(Sp,e),Cp.forEach(t),wp.forEach(t);for(var n=0;n<Tp.length;n++){var r=Tp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Tp.length&&(n=Tp[0],n.blockedOn===null);)Ap(n),n.blockedOn===null&&Tp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Qe]||null;if(typeof a==`function`)o||Ip(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Qe]||null)s=o.formAction;else if(_p(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Ip(n)}}}function Rp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function zp(e){this._internalRoot=e}Bp.prototype.render=zp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;op(n,mu(),e,t,null,null)},Bp.prototype.unmount=zp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),xu(),t[$e]=null}};function Bp(e){this._internalRoot=e}Bp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Je();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tp.length&&t!==0&&t<Tp[n].priority;n++);Tp.splice(n,0,e),n===0&&Ap(e)}};var Vp=n.version;if(Vp!==`19.2.0`)throw Error(i(527,Vp,`19.2.0`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:`19.2.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Up.isDisabled&&Up.supportsFiber)try{Te=Up.inject(Hp),Ee=Up}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ip(e,1,!1,null,null,n,r,null,o,s,c,Rp),e[$e]=t.current,Td(e),new zp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Us,c=Ws,l=Gs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ip(e,1,!0,t,n??null,r,o,u,s,c,l,Rp),t.context=ap(null),n=t.current,r=mu(),r=Ke(r),o=Fa(r),o.callback=null,Ia(n,o,r),n=r,t.current.lanes=n,Ve(t,n),ad(t),e[$e]=t.current,Td(e),new Bp(t)}})),qn=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Kn()})),Jn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xn=new class{#e=Yn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Zn(e){setTimeout(e,0)}var Qn=typeof window>`u`||`Deno`in globalThis;function $n(){}function er(e,t){return typeof e==`function`?e(t):e}function tr(e){return typeof e==`number`&&e>=0&&e!==1/0}function nr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e==`function`?e(t):e}function ir(e,t){return typeof e==`function`?e(t):e}function ar(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==sr(o,t.options))return!1}else if(!lr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function or(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(cr(t.options.mutationKey)!==cr(a))return!1}else if(!lr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function sr(e,t){return(t?.queryKeyHashFn||cr)(e)}function cr(e){return JSON.stringify(e,(e,t)=>mr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function lr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>lr(e[n],t[n])):!1}var ur=Object.prototype.hasOwnProperty;function dr(e,t){if(e===t)return e;let n=pr(e)&&pr(t);if(!n&&!(mr(e)&&mr(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],u=t[a];if(l===u){o[a]=l,(n?c<r:ur.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=dr(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function fr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function pr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mr(e){if(!hr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!hr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function hr(e){return Object.prototype.toString.call(e)===`[object Object]`}function gr(e){return new Promise(t=>{Xn.setTimeout(t,e)})}function _r(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:dr(e,t)}function vr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function yr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var br=Symbol();function xr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===br?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sr(e,t){return typeof e==`function`?e(...t):!!e}var Cr=new class extends Jn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Qn&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function wr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Tr=Zn;function Er(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Tr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Dr=Er(),Or=new class extends Jn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Qn&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function kr(e){return Math.min(1e3*2**e,3e4)}function Ar(e){return(e??`online`)===`online`?Or.isOnline():!0}var jr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Mr(e){let t=!1,n=0,r,i=wr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new jr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Cr.isFocused()&&(e.networkMode===`always`||Or.isOnline())&&e.canRun(),u=()=>Ar(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Qn?0:3),o=e.retryDelay??kr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),gr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Nr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tr(this.gcTime)&&(this.#e=Xn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qn?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Xn.clearTimeout(this.#e),void 0)}},Pr=class extends Nr{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Lr(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Lr(this.options);e.data!==void 0&&(this.setState(Ir(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=_r(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then($n).catch($n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===br||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>rr(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!nr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=xr(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Mr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof jr&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof jr){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Fr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ir(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Dr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Fr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ar(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ir(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Lr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Rr=class extends Jn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=wr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Br(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ir(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!fr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Hr(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||rr(this.options.staleTime,this.#t)!==rr(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Wr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch($n)),t}#g(){this.#b();let e=rr(this.options.staleTime,this.#t);if(Qn||this.#r.isStale||!tr(e))return;let t=nr(this.#r.dataUpdatedAt,e)+1;this.#d=Xn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Qn||ir(this.options.enabled,this.#t)===!1||!tr(this.#p)||this.#p===0)&&(this.#f=Xn.setInterval(()=>{(this.options.refetchIntervalInBackground||Cr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Xn.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Xn.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Br(e,t),o=i&&Hr(e,n,t,r);(a||o)&&(l={...l,...Fr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=_r(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=_r(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ur(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ir(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=e=>{x.status===`error`?e.reject(x.error):x.data!==void 0&&e.resolve(x.data)},r=()=>{t(this.#o=x.promise=wr())},i=this.#o;switch(i.status){case`pending`:e.queryHash===n.queryHash&&t(i);break;case`fulfilled`:(x.status===`error`||x.data!==i.value)&&r();break;case`rejected`:(x.status!==`error`||x.error!==i.reason)&&r();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!fr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Dr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function zr(e,t){return ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Br(e,t){return zr(e,t)||e.state.data!==void 0&&Vr(e,t,t.refetchOnMount)}function Vr(e,t,n){if(ir(t.enabled,e)!==!1&&rr(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Ur(e,t)}return!1}function Hr(e,t,n,r){return(e!==t||ir(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ur(e,n)}function Ur(e,t){return ir(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function Wr(e,t){return!fr(e.getCurrentResult(),t)}function Gr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener(`abort`,()=>{n=!0}),t.signal)})},u=xr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?yr:vr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?qr:Kr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Kr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Kr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Jr(e,t){return t?Kr(e,t)!=null:!1}function Yr(e,t){return!t||!e.getPreviousPageParam?!1:qr(e,t)!=null}var Xr=class extends Rr{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Gr()})}getOptimisticResult(e){return e.behavior=Gr(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Jr(t,n.data),hasPreviousPage:Yr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Zr=class extends Nr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Qr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Mr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{throw await this.#n.config.onError?.(t,e,this.state.context,this,n),await this.options.onError?.(t,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,t,e,this.state.context,n),t}finally{this.#i({type:`error`,error:t})}}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Dr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Qr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var $r=class extends Jn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Zr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ei(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Dr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>or(t,e))}findAll(e={}){return this.getAll().filter(t=>or(e,t))}notify(e){Dr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Dr.batch(()=>Promise.all(e.map(e=>e.continue().catch($n))))}};function ei(e){return e.options.scope?.id}var ti=class extends Jn{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),fr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&cr(t.mutationKey)!==cr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Qr();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Dr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type===`success`?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type===`error`&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}};function ni(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ri(e,t,n){let r=e.slice(0);return r[t]=n,r}var ii=class extends Jn{#e;#t;#n;#r;#i;#a;#o;#s;#c=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Dr.batch(()=>{let e=this.#i,t=this.#d(this.#n);this.#c=t,t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!fr(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ni(e,n).forEach(e=>{e.destroy()}),ni(n,e).forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})),this.#p()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#d(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[r,e=>this.#u(e??r,t),()=>this.#l(r,n)]}#l(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#u(e,t){return t?((!this.#a||this.#t!==this.#s||t!==this.#o)&&(this.#o=t,this.#s=this.#t,this.#a=dr(this.#a,t(e))),this.#a):e}#d(e){let t=new Map(this.#i.map(e=>[e.options.queryHash,e])),n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash);i?n.push({defaultedQueryOptions:r,observer:i}):n.push({defaultedQueryOptions:r,observer:new Rr(this.#e,r)})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ri(this.#t,n,t),this.#p())}#p(){if(this.hasListeners()){let e=this.#a,t=this.#l(this.#t,this.#c);e!==this.#u(t,this.#r?.combine)&&Dr.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ai=class extends Jn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??sr(r,t),a=this.get(i);return a||(a=new Pr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Dr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ar(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ar(e,t)):t}notify(e){Dr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Dr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Dr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oi=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ai,this.#t=e.mutationCache||new $r,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Cr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=er(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Dr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Dr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Dr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Dr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then($n).catch($n)}invalidateQueries(e,t={}){return Dr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Dr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch($n)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then($n)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($n).catch($n)}fetchInfiniteQuery(e){return e.behavior=Gr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($n).catch($n)}ensureInfiniteQueryData(e){return e.behavior=Gr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(cr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{lr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(cr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{lr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=sr(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===br&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},si=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ci=n(((e,t)=>{t.exports=si()})),K=t(Un(),1),q=ci(),li=K.createContext(void 0),ui=e=>{let t=K.useContext(li);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},di=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,q.jsx)(li.Provider,{value:e,children:t})),fi=K.createContext(!1),pi=()=>K.useContext(fi);fi.Provider;function mi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hi=K.createContext(mi()),gi=()=>K.useContext(hi),_i=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vi=e=>{K.useEffect(()=>{e.clearReset()},[e])},yi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Sr(n,[e.error,r])),bi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},xi=(e,t)=>e.isLoading&&e.isFetching&&!t,Si=(e,t)=>e?.suspense&&t.isPending,Ci=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wi({queries:e,...t},n){let r=ui(n),i=pi(),a=gi(),o=K.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{bi(e),_i(e,a)}),vi(a);let[s]=K.useState(()=>new ii(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;K.useSyncExternalStore(K.useCallback(e=>d?s.subscribe(Dr.batchCalls(e)):$n,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),K.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>Si(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new Rr(r,n);if(Si(n,e))return Ci(n,t,a);xi(e,i)&&Ci(n,t,a)}return[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&yi({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function Ti(e,t,n){let r=pi(),i=gi(),a=ui(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=r?`isRestoring`:`optimistic`,bi(o),_i(o,i),vi(i);let s=!a.getQueryCache().get(o.queryHash),[c]=K.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(e=>{let t=u?c.subscribe(Dr.batchCalls(e)):$n;return c.updateResult(),t},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),K.useEffect(()=>{c.setOptions(o)},[o,c]),Si(o,l))throw Ci(o,c,i);if(yi({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,l),o.experimental_prefetchInRender&&!Qn&&xi(l,r)&&(s?Ci(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch($n).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?l:c.trackResult(l)}function Ei(e,t){return Ti(e,Rr,t)}function Di(e){return e}function Oi(e){return e}function ki(e,t){let n=ui(t),[r]=K.useState(()=>new ti(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);let i=K.useSyncExternalStore(K.useCallback(e=>r.subscribe(Dr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=K.useCallback((e,t)=>{r.mutate(e,t).catch($n)},[r]);if(i.error&&Sr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Ai(e,t){return Ti(e,Xr,t)}var ji=new WeakMap,Mi=new WeakMap,Ni={current:[]},Pi=!1,Fi=0,Ii=new Set,Li=new Map;function Ri(e){for(let t of e){if(Ni.current.includes(t))continue;Ni.current.push(t),t.recompute();let e=Mi.get(t);if(e)for(let t of e){let e=ji.get(t);e?.length&&Ri(e)}}}function zi(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Bi(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Vi(e){if(Fi>0&&!Li.has(e)&&Li.set(e,e.prevState),Ii.add(e),!(Fi>0)&&!Pi)try{for(Pi=!0;Ii.size>0;){let e=Array.from(Ii);Ii.clear();for(let t of e)t.prevState=Li.get(t)??t.prevState,zi(t);for(let t of e){let e=ji.get(t);e&&(Ni.current.push(t),Ri(e))}for(let t of e){let e=ji.get(t);if(e)for(let t of e)Bi(t)}}}finally{Pi=!1,Ni.current=[],Li.clear()}}function Hi(e){Fi++;try{e()}finally{if(Fi--,Fi===0){let e=Ii.values().next().value;e&&Vi(e)}}}function Ui(e){return typeof e==`function`}var Wi=class{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t;this.listeners.add(e);let n=((t=this.options)?.onSubscribe)?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n;this.prevState=this.state,this.options?.updateFn?this.state=this.options.updateFn(this.prevState)(e):Ui(e)?this.state=e(this.prevState):this.state=e,(n=(t=this.options)?.onUpdate)==null||n.call(t),Vi(this)}},Gi=`__TSR_index`,Ki=`popstate`,qi=`beforeunload`;function Ji(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Zi(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Gi];i=Yi(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Gi];i=Yi(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Gi]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Yi(e,t){t||={};let n=Qi();return{...t,key:n,__TSR_key:n,[Gi]:e}}function Xi(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>Zi(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Qi();t.history.replaceState({[Gi]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=Zi(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Gi]-l.state[Gi],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Ji({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(qi,S,{capture:!0}),t.removeEventListener(Ki,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(qi,S,{capture:!0}),t.addEventListener(Ki,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Zi(e,t){let n=e.indexOf(`#`),r=e.indexOf(`?`),i=Qi();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):``,search:r>-1?e.slice(r,n===-1?void 0:n):``,state:t||{[Gi]:0,key:i,__TSR_key:i}}}function Qi(){return(Math.random()+1).toString(36).substring(7)}function $i(e){return e[e.length-1]}function ea(e){return typeof e==`function`}function ta(e,t){return ea(e)?e(t):e}var na=Object.prototype.hasOwnProperty;function ra(e,t){if(e===t)return e;let n=t,r=sa(e)&&sa(n);if(!r&&!(aa(e)&&aa(n)))return n;let i=r?e:ia(e);if(!i)return n;let a=r?n:ia(n);if(!a)return n;let o=i.length,s=a.length,c=r?Array(s):{},l=0;for(let t=0;t<s;t++){let i=r?t:a[t],s=e[i],u=n[i];if(s===u){c[i]=s,(r?t<o:na.call(e,i))&&l++;continue}if(s===null||u===null||typeof s!=`object`||typeof u!=`object`){c[i]=u;continue}let d=ra(s,u);c[i]=d,d===s&&l++}return o===s&&l===o?e:c}function ia(e){let t=[],n=Object.getOwnPropertyNames(e);for(let r of n){if(!Object.prototype.propertyIsEnumerable.call(e,r))return!1;t.push(r)}let r=Object.getOwnPropertySymbols(e);for(let n of r){if(!Object.prototype.propertyIsEnumerable.call(e,n))return!1;t.push(n)}return t}function aa(e){if(!oa(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!oa(n)||!n.hasOwnProperty(`isPrototypeOf`))}function oa(e){return Object.prototype.toString.call(e)===`[object Object]`}function sa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ca(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ca(e[r],t[r],n))return!1;return!0}if(aa(e)&&aa(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ca(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ca(e[o],t[o],n)))return!1;return i===a}return!1}function la(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function ua(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function da(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function fa(e,t){if(!e)return e;let n=t?RegExp(`${t.join(`|`)}`,`gi`):/%25|%5C/gi,r=0,i=``,a;for(;(a=n.exec(e))!==null;)i+=da(e.slice(r,a.index))+a[0],r=n.lastIndex;return i+da(r?e.slice(r):e)}var pa=!0,ma=`Invariant failed`;function ha(e,t){if(!e){if(pa)throw Error(ma);var n=typeof t==`function`?t():t,r=n?`${ma}: ${n}`:ma;throw Error(r)}}function ga(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var _a=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,va=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ya=/^([^{]*)\{\$\}([^}]*)$/;function ba(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.match(ya);if(o){let r=o[1].length;return n[0]=2,n[1]=t+r,n[2]=t+r+1,n[3]=t+r+2,n[4]=t+r+3,n[5]=e.length,n}let s=a.match(va);if(s){let e=s[1],r=s[2],a=s[3],o=e.length;return n[0]=3,n[1]=t+o,n[2]=t+o+3,n[3]=t+o+3+r.length,n[4]=i-a.length,n[5]=i,n}let c=a.match(_a);if(c){let e=c[1],r=c[2],a=c[3],o=e.length;return n[0]=1,n[1]=t+o,n[2]=t+o+2,n[3]=t+o+2+r.length,n[4]=i-a.length,n[5]=i,n}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function xa(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e;for(;s<o;){let e=ba(r,s,t),o,l=s,u=e[5];switch(s=u+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=wa(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=wa(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=i.dynamic?.find(e=>e.caseSensitive===d&&e.prefix===f&&e.suffix===p);if(m)o=m;else{let e=Ta(1,n.fullPath??n.from,d,f,p);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=i.optional?.find(e=>e.caseSensitive===d&&e.prefix===f&&e.suffix===p);if(m)o=m;else{let e=Ta(3,n.fullPath??n.from,d,f,p);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=Ta(2,n.fullPath??n.from,d,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if((n.path||!n.children)&&!n.isRoot){let e=r.endsWith(`/`);e||(i.notFound=n),(!i.route||!i.isIndex&&e)&&(i.route=n),i.isIndex||=e}}if(n.children)for(let r of n.children)xa(e,t,r,s,i,a,o)}function Sa(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ca(e){if(e.static)for(let t of e.static.values())Ca(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())Ca(t);if(e.dynamic?.length){e.dynamic.sort(Sa);for(let t of e.dynamic)Ca(t)}if(e.optional?.length){e.optional.sort(Sa);for(let t of e.optional)Ca(t)}if(e.wildcard?.length){e.wildcard.sort(Sa);for(let t of e.wildcard)Ca(t)}}function wa(e){return{kind:0,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ta(e,t,n,r,i){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:i}}function Ea(e,t){let n=wa(`/`),r=new Uint16Array(6);for(let t of e)xa(!1,r,t,1,n,0);Ca(n),t.masksTree=n,t.flatCache=ga(1e3)}function Da(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Ma(e,t.masksTree);return t.flatCache.set(e,r),r}function Oa(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=wa(`/`),xa(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Ma(r,o,n)}function ka(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a=Ma(e,t.segmentTree,n);return a&&(a.branch=Pa(a.route)),t.matchCache.set(r,a),a}function Aa(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ja(e,t=!1,n){let r=wa(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return xa(t,i,e,1,r,0,e=>{if(n?.(e,s),ha(!(e.id in a),`Duplicate routes found with id: ${String(e.id)}`),a[e.id]=e,s!==0&&e.path){let t=Aa(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),Ca(r),{processedTree:{segmentTree:r,singleCache:ga(1e3),matchCache:ga(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Ma(e,t,n=!1){let r=e.split(`/`),i=Ia(e,r,t,n);if(!i)return null;let a=Na(e,r,i),o=`**`in i;return o&&(a[`**`]=i[`**`]),{route:o?i.node.notFound??i.node.route:i.node.route,params:a}}function Na(e,t,n){let r=Fa(n.node),i=null,a={};for(let o=0,s=0,c=0;s<r.length;o++,s++,c++){let l=r[s],u=t[o],d=c;if(u&&(c+=u.length),l.kind===1){i??=n.node.fullPath.split(`/`);let e=i[s],t=l.prefix?.length??0;if(e.charCodeAt(t)===123){let n=l.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=u.substring(t,u.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(u)}}else if(l.kind===3){if(n.skipped&1<<s){o--;continue}i??=n.node.fullPath.split(`/`);let e=i[s],t=l.prefix?.length??0,r=l.suffix?.length??0,c=e.substring(t+3,e.length-r-1),d=l.suffix||l.prefix?u.substring(t,u.length-r):u;d&&(a[c]=decodeURIComponent(d))}else if(l.kind===2){let t=l,n=e.substring(d+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return a}function Pa(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Fa(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ia(e,t,n,r){let i=!$i(t),a=i&&e!==`/`,o=t.length-(i?1:0),s=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}],c=null,l=null,u=null;for(;s.length;){let e=s.pop(),{node:n,index:i,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=e;r&&n.notFound&&La(l,e)&&(l=e);let g=i===o;if(g){if(n.route&&(!a||n.isIndex)&&(La(u,e)&&(u=e),p===o&&n.isIndex))return u;if(!n.optional&&!n.wildcard)continue}let _=g?void 0:t[i],v;if(n.wildcard&&La(c,e))for(let e of n.wildcard){let{prefix:n,suffix:r}=e;if(!(n&&(g||!(e.caseSensitive?_:v??=_.toLowerCase()).startsWith(n)))){if(r){if(g)continue;let n=t.slice(i).join(`/`).slice(-r.length);if((e.caseSensitive?n:n.toLowerCase())!==r)continue}c={node:e,index:i,skipped:d,depth:f,statics:p,dynamics:m,optionals:h};break}}if(n.optional){let e=d|1<<f,t=f+1;for(let r=n.optional.length-1;r>=0;r--){let a=n.optional[r];s.push({node:a,index:i,skipped:e,depth:t,statics:p,dynamics:m,optionals:h})}if(!g)for(let e=n.optional.length-1;e>=0;e--){let r=n.optional[e],{prefix:a,suffix:o}=r;if(a||o){let e=r.caseSensitive?_:v??=_.toLowerCase();if(a&&!e.startsWith(a)||o&&!e.endsWith(o))continue}s.push({node:r,index:i+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+1})}}if(!g&&n.dynamic&&_)for(let e=n.dynamic.length-1;e>=0;e--){let t=n.dynamic[e],{prefix:r,suffix:a}=t;if(r||a){let e=t.caseSensitive?_:v??=_.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:t,index:i+1,skipped:d,depth:f+1,statics:p,dynamics:m+1,optionals:h})}if(!g&&n.staticInsensitive){let e=n.staticInsensitive.get(v??=_.toLowerCase());e&&s.push({node:e,index:i+1,skipped:d,depth:f+1,statics:p+1,dynamics:m,optionals:h})}if(!g&&n.static){let e=n.static.get(_);e&&s.push({node:e,index:i+1,skipped:d,depth:f+1,statics:p+1,dynamics:m,optionals:h})}}if(u)return u;if(c)return c;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return{node:l.node,skipped:l.skipped,"**":decodeURIComponent(r)}}return null}function La(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function Ra(e){return za(e.filter(e=>e!==void 0).join(`/`))}function za(e){return e.replace(/\/{2,}/g,`/`)}function Ba(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Va(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Ha(e){return Va(Ba(e))}function Ua(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Wa(e,t,n){return Ua(e,n)===Ua(t,n)}function Ga({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&$i(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&($i(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c,l=``;for(let e=0;e<s.length;e++){e>0&&(l+=`/`);let t=s[e];if(!t)continue;c=ba(t,0,c);let n=c[0];if(n===0){l+=t;continue}let r=c[5],i=t.substring(0,c[1]),a=t.substring(c[4],r),o=t.substring(c[2],c[3]);n===1?l+=i||a?`${i}{$${o}}${a}`:`$${o}`:n===2?l+=i||a?`${i}{$}${a}`:`$`:l+=`${i}{-$${o}}${a}`}l=za(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Ka(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?encodeURI(r):Ja(r,n):r}function qa({path:e,params:t,decodeCharMap:n}){let r=!1,i={};if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:i,isMissingParams:r};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:i,isMissingParams:r};let a=e.length,o=0,s,c=``;for(;o<a;){let a=o;s=ba(e,a,s);let l=s[5];if(o=l+1,a===l)continue;let u=s[0];if(u===0){c+=`/`+e.substring(a,l);continue}if(u===2){let o=t._splat;i._splat=o,i[`*`]=o;let u=e.substring(a,s[1]),d=e.substring(s[4],l);if(!o){r=!0,(u||d)&&(c+=`/`+u+d);continue}let f=Ka(`_splat`,t,n);c+=`/`+u+f+d;continue}if(u===1){let o=e.substring(s[2],s[3]);!r&&!(o in t)&&(r=!0),i[o]=t[o];let u=e.substring(a,s[1]),d=e.substring(s[4],l),f=Ka(o,t,n)??`undefined`;c+=`/`+u+f+d;continue}if(u===3){let r=e.substring(s[2],s[3]),o=t[r];if(o==null)continue;i[r]=o;let u=e.substring(a,s[1]),d=e.substring(s[4],l),f=Ka(r,t,n)??``;c+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(c+=`/`),{usedParams:i,interpolatedPath:c||`/`,isMissingParams:r}}function Ja(e,t){let n=encodeURIComponent(e);if(t)for(let[e,r]of t)n=n.replaceAll(e,r);return n}function Ya(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Xa(e){return!!e?.isNotFound}function Za(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var Qa=`tsr-scroll-restoration-v1_3`,$a=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function eo(){let e=Za();if(!e)return null;let t=e.getItem(Qa),n=t?JSON.parse(t):{};return{state:n,set:t=>(n=ta(t,n)||n,e.setItem(Qa,JSON.stringify(n)))}}var to=eo(),no=e=>e.state.__TSR_key||e.href;function ro(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var io=!1;function ao({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:a}){let o;try{o=JSON.parse(sessionStorage.getItem(e)||`{}`)}catch(e){console.error(e);return}let s=t||window.history.state?.__TSR_key,c=o[s];io=!0;scroll:{if(r&&c&&Object.keys(c).length>0){for(let e in c){let t=c[e];if(e===`window`)window.scrollTo({top:t.scrollY,left:t.scrollX,behavior:n});else if(e){let n=document.querySelector(e);n&&(n.scrollLeft=t.scrollX,n.scrollTop=t.scrollY)}}break scroll}let e=(a??window.location).hash.split(`#`,2)[1];if(e){let t=window.history.state?.__hashScrollIntoViewOptions??!0;if(t){let n=document.getElementById(e);n&&n.scrollIntoView(t)}break scroll}let t={top:0,left:0,behavior:n};if(window.scrollTo(t),i)for(let e of i){if(e===`window`)continue;let n=typeof e==`function`?e():document.querySelector(e);n&&n.scrollTo(t)}}io=!1}function oo(e,t){if(!to&&!e.isServer||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!to))return;e.isScrollRestorationSetup=!0,io=!1;let n=e.options.getScrollRestorationKey||no;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,$a(t=>{if(io||!e.isScrollRestoring)return;let r=``;if(t.target===document||t.target===window)r=`window`;else{let e=t.target.getAttribute(`data-scroll-restoration-id`);r=e?`[data-scroll-restoration-id="${e}"]`:ro(t.target)}let i=n(e.state.location);to.set(e=>{let t=e[i]||={},n=t[r]||={};if(r===`window`)n.scrollX=window.scrollX||0,n.scrollY=window.scrollY||0;else if(r){let e=document.querySelector(r);e&&(n.scrollX=e.scrollLeft||0,n.scrollY=e.scrollTop||0)}return e})},100),!0),e.subscribe(`onRendered`,t=>{let r=n(t.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation})||(ao({storageKey:Qa,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&to.set(e=>(e[r]||={},e)))})}function so(e){if(typeof document<`u`&&document.querySelector){let t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==``){let n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function co(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function lo(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function uo(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=lo(r):Array.isArray(t)?t.push(lo(r)):n[e]=[t,lo(r)]}return n}var fo=mo(JSON.parse),po=ho(JSON.stringify,JSON.parse);function mo(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=uo(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ho(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=co(e,r);return t?`?${t}`:``}}var go=`__root__`;function _o(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vo(e){return e instanceof Response&&!!e.options}var yo=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},bo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(e=>e.id===t)),xo=(e,t)=>{let n=e.router.routesById[t.routeId??``]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),ha(n.options.notFoundComponent,`No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.`);let r=e.matches.find(e=>e.routeId===n.id);ha(r,`Could not find match for route: `+n.id),e.updateMatch(r.id,e=>({...e,status:`notFound`,error:t,isFetching:!1})),t.routerCode===`BEFORE_LOAD`&&n.parentRoute&&(t.routeId=n.parentRoute.id,xo(e,t))},So=(e,t,n)=>{if(!(!vo(n)&&!Xa(n))){if(vo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;let r=vo(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,e=>({...e,status:r,isFetching:!1,error:n})),Xa(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw vo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(xo(e,n),n)}},Co=(e,t)=>{let n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},wo=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,So(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,So(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},To=(e,t,n,r)=>{let i=e.router.getMatch(t),a=e.matches[n-1]?.id,o=a?e.router.getMatch(a):void 0;if(e.router.isShell()){i.ssr=r.id===go;return}if(o?.ssr===!1){i.ssr=!1;return}let s=e=>e===!0&&o?.ssr===`data-only`?`data-only`:e,c=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=s(c);return}if(typeof r.options.ssr!=`function`){i.ssr=s(r.options.ssr);return}let{search:l,params:u}=i,d={search:Io(l,i.searchError),params:Io(u,i.paramsError),location:e.location,matches:e.matches.map(e=>({index:e.index,pathname:e.pathname,fullPath:e.fullPath,staticData:e.staticData,id:e.id,routeId:e.routeId,search:Io(e.search,e.searchError),params:Io(e.params,e.paramsError),ssr:e.ssr}))},f=r.options.ssr(d);if(ua(f))return f.then(e=>{i.ssr=s(e??c)});i.ssr=s(f??c)},Eo=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!e.router.isServer&&!bo(e,t)&&(n.options.loader||n.options.beforeLoad||Lo(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{yo(e)},i);r._nonReactive.pendingTimeout=t}},Do=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Eo(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&So(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Oo=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=la(()=>{a?.resolve()});let{paramsError:o,searchError:s}=i;o&&wo(e,n,o,`PARSE_PARAMS`),s&&wo(e,n,s,`VALIDATE_SEARCH`),Eo(e,t,r,i);let c=new AbortController,l=e.matches[n-1]?.id,u={...(l?e.router.getMatch(l):void 0)?.context??e.router.options.context??void 0,...i.__routeContext},d=!1,f=()=>{d||(d=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c,context:u})))},p=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){Hi(()=>{f(),p()});return}i._nonReactive.beforeLoadPromise=la();let{search:m,params:h,cause:g}=i,_=bo(e,t),v={search:m,abortController:c,params:h,preload:_,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?`preload`:g,matches:e.matches,...e.router.options.additionalContext},y=r=>{if(r===void 0){Hi(()=>{f(),p()});return}(vo(r)||Xa(r))&&(f(),wo(e,n,r,`BEFORE_LOAD`)),Hi(()=>{f(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r,context:{...e.context,...r}})),p()})},b;try{if(b=r.options.beforeLoad(v),ua(b))return f(),b.catch(t=>{wo(e,n,t,`BEFORE_LOAD`)}).then(y)}catch(t){f(),wo(e,n,t,`BEFORE_LOAD`)}y(b)},ko=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>{if(e.router.isServer){let r=To(e,n,t,i);if(ua(r))return r.then(s)}return s()},o=()=>Oo(e,n,t,i),s=()=>{if(Co(e,n))return;let t=Do(e,n,i);return ua(t)?t.then(o):o()};return a()},Ao=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},jo=(e,t,n,r)=>{let i=e.matchPromises[n-1],{params:a,loaderDeps:o,abortController:s,cause:c}=e.router.getMatch(t),l=e.router.options.context??{};for(let t=0;t<=n;t++){let n=e.matches[t];if(!n)continue;let r=e.router.getMatch(n.id);r&&(l={...l,...r.__routeContext??{},...r.__beforeLoadContext??{}})}let u=bo(e,t);return{params:a,deps:o,preload:!!u,parentMatchPromise:i,abortController:s,context:l,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:u?`preload`:c,route:r,...e.router.options.additionalContext}},Mo=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Fo(r);let a=r.options.loader?.(jo(e,t,n,r)),o=r.options.loader&&ua(a);if((o||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,e=>({...e,isFetching:`loader`})),r.options.loader){let n=o?await a:a;So(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let s=Ao(e,t,r),c=s?await s:void 0,l=i._nonReactive.minPendingPromise;l&&await l,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,e=>({...e,error:void 0,status:`success`,isFetching:!1,updatedAt:Date.now(),...c}))}catch(n){let a=n,o=i._nonReactive.minPendingPromise;o&&await o,Xa(n)&&await r.options.notFoundComponent?.preload?.(),So(e,e.router.getMatch(t),n);try{r.options.onError?.(n)}catch(n){a=n,So(e,e.router.getMatch(t),n)}let s=Ao(e,t,r),c=s?await s:void 0;e.updateMatch(t,e=>({...e,error:a,status:`error`,isFetching:!1,...c}))}}catch(n){let i=e.router.getMatch(t);if(i){let n=Ao(e,t,r);if(n){let r=await n;e.updateMatch(t,e=>({...e,...r}))}i._nonReactive.loaderPromise=void 0}So(e,i,n)}},No=async(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=!1,a=!1,o=e.router.looseRoutesById[r];if(Co(e,n)){if(e.router.isServer){let t=Ao(e,n,o);if(t){let r=await t;e.updateMatch(n,e=>({...e,...r}))}return e.router.getMatch(n)}}else{let r=e.router.getMatch(n);if(r._nonReactive.loaderPromise){if(r.status===`success`&&!e.sync&&!r.preload)return r;await r._nonReactive.loaderPromise;let t=e.router.getMatch(n),i=t._nonReactive.error||t.error;i&&So(e,t,i)}else{let s=Date.now()-r.updatedAt,c=bo(e,n),l=c?o.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:o.options.staleTime??e.router.options.defaultStaleTime??0,u=o.options.shouldReload,d=typeof u==`function`?u(jo(e,n,t,o)):u,f=!!c&&!e.router.state.matches.some(e=>e.id===n),p=e.router.getMatch(n);p._nonReactive.loaderPromise=la(),f!==p.preload&&e.updateMatch(n,e=>({...e,preload:f}));let{status:m,invalid:h}=p;if(i=m===`success`&&(h||(d??s>l)),!(c&&o.options.preload===!1))if(i&&!e.sync)a=!0,(async()=>{try{await Mo(e,n,t,o);let r=e.router.getMatch(n);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0}catch(t){vo(t)&&await e.router.navigate(t.options)}})();else if(m!==`success`||i&&e.sync)await Mo(e,n,t,o);else{let t=Ao(e,n,o);if(t){let r=await t;e.updateMatch(n,e=>({...e,...r}))}}}}let s=e.router.getMatch(n);a||(s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loadPromise?.resolve()),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0,a||(s._nonReactive.loaderPromise=void 0),s._nonReactive.dehydrated=void 0;let c=a?s.isFetching:!1;return c!==s.isFetching||s.invalid!==!1?(e.updateMatch(n,e=>({...e,isFetching:c,invalid:!1})),e.router.getMatch(n)):s};async function Po(e){let t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(e=>e._forcePending)&&yo(t);try{for(let e=0;e<t.matches.length;e++){let n=ko(t,e);ua(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push(No(t,n));await Promise.all(t.matchPromises);let n=yo(t);ua(n)&&await n}catch(e){if(Xa(e)&&!t.preload){let n=yo(t);throw ua(n)&&await n,e}if(vo(e))throw e}return t.matches}async function Fo(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){let t=()=>{let t=[];for(let n of Ro){let r=e.options[n]?.preload;r&&t.push(r())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Io(e,t){return t?{status:`error`,error:t}:{status:`success`,value:e}}function Lo(e){for(let t of Ro)if(e.options[t]?.preload)return!0;return!1}var Ro=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function zo(e){return{input:({url:t})=>{for(let n of e)t=Vo(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ho(e[n],t);return t}}}function Bo(e){let t=Ha(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ra([`/`,t,e.pathname]),e)}}function Vo(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ho(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Uo(e){let t=e.resolvedLocation,n=e.location;return{fromLocation:t,toLocation:n,pathChanged:t?.pathname!==n.pathname,hrefChanged:t?.href!==n.href,hashChanged:t?.hash!==n.hash}}var Wo=class{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn(`The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.`);let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(e=>[encodeURIComponent(e),e])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Xi())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Wi(qo(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),oo(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[];Ha(o)!==``&&e.push(Bo({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:zo(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let{routesById:e,routesByPath:t,processedTree:n}=ja(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});this.options.routeMasks&&Ea(this.options.routeMasks,n),this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({href:e,state:n})=>{let r=new URL(e,this.origin),i=Vo(this.rewrite,r),a=this.options.parseSearch(i.search),o=this.options.stringifySearch(a);i.search=o;let s=i.href.replace(i.origin,``),{pathname:c,hash:l}=i;return{href:s,publicHref:e,url:i.href,pathname:fa(c),searchStr:o,search:ra(t?.search,a),hash:l.split(`#`).reverse()[0]??``,state:ra(t?.state,n)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathCache=ga(1e3),this.resolvePathWithBase=(e,t)=>Ga({base:e,to:za(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Yo({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{let e=this.state.matches.filter(e=>e.status===`pending`),t=this.state.matches.filter(e=>e.isFetching===`loader`);new Set([...this.state.pendingMatches??[],...e,...t]).forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=$i(this.matchRoutes(n,{_buildLocation:!0}));t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=this.resolvePathWithBase(i,`.`),o=r.search,s={...r.params},c=t.to?this.resolvePathWithBase(a,`${t.to}`):this.resolvePathWithBase(a,`.`),l=t.params===!1||t.params===null?{}:(t.params??!0)===!0?s:Object.assign(s,ta(t.params,s)),u=qa({path:c,params:l}).interpolatedPath,d=this.matchRoutes(u,void 0,{_buildLocation:!0}).map(e=>this.looseRoutesById[e.routeId]);if(Object.keys(l).length>0)for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;t&&Object.assign(l,t(l))}let f=e.leaveParams?c:fa(qa({path:c,params:l,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath),p=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Jo(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=Xo({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=ra(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?ta(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?ta(t.state,n.state):{};_=ra(n.state,_);let v=`${f}${m}${g}`,y=new URL(v,this.origin),b=Ho(this.rewrite,y);return{publicHref:b.pathname+b.search+b.hash,href:v,url:b.href,pathname:f,search:p,searchStr:m,state:_,hash:h??``,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n={};if(this.options.routeMasks){let o=Da(i.pathname,this.processedTree);if(o){Object.assign(n,o.params);let{from:i,...s}=o.route;r={from:e.from,...s,params:n},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=({viewTransition:e,ignoreBlocker:t,...n})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=ca(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=Va(this.latestLocation.href)===Va(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=la(()=>{a?.resolve()}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=Zi(a,{__TSR_index:e?t:t+1});o.to=n.pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,...r})=>{if(!t&&n)try{new URL(`${n}`),t=!0}catch{}if(t){if(n||=this.buildLocation({to:e,...r}).url,!r.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return r.replace?window.location.replace(n):window.location.href=n,Promise.resolve()}return this.buildAndCommitLocation({...r,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){let e=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),t=e=>{try{return encodeURI(decodeURI(e))}catch{return e}};if(Ha(t(this.latestLocation.href))!==Ha(t(e.href))){let t=e.url;throw this.origin&&t.startsWith(this.origin)&&(t=t.replace(this.origin,``)||`/`),_o({href:t})}}let e=this.matchRoutes(this.latestLocation);this.__store.setState(t=>({...t,status:`pending`,statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:t.cachedMatches.filter(t=>!e.some(e=>e.id===t.id))}))},this.load=async e=>{let t,n,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.state.resolvedLocation;this.state.redirect||this.emit({type:`onBeforeNavigate`,...Uo({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...Uo({resolvedLocation:n,location:t})}),await Po({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=[],t=[],n=[];Hi(()=>{this.__store.setState(r=>{let i=r.matches,a=r.pendingMatches||r.matches;return e=i.filter(e=>!a.some(t=>t.id===e.id)),t=a.filter(e=>!i.some(t=>t.id===e.id)),n=a.filter(e=>i.some(t=>t.id===e.id)),{...r,isLoading:!1,loadedAt:Date.now(),matches:a,pendingMatches:void 0,cachedMatches:[...r.cachedMatches,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`)]}}),this.clearExpiredCache()}),[[e,`onLeave`],[t,`onEnter`],[n,`onStay`]].forEach(([e,t])=>{e.forEach(e=>{this.looseRoutesById[e.routeId].options[t]?.(e)})})})})}})}catch(e){vo(e)?(t=e,this.isServer||this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):Xa(e)&&(n=e),this.__store.setState(e=>({...e,statusCode:t?t.status:n?404:e.matches.some(e=>e.status===`error`)?500:200,redirect:t}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(e=>e.status===`error`)&&(i=500),i!==void 0&&this.__store.setState(e=>({...e,statusCode:i}))},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.state.resolvedLocation,a=typeof t.types==`function`?t.types(Uo({resolvedLocation:i,location:r})):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.state.pendingMatches?.some(t=>t.id===e)?`pendingMatches`:this.state.matches.some(t=>t.id===e)?`matches`:this.state.cachedMatches.some(t=>t.id===e)?`cachedMatches`:``;n&&this.__store.setState(r=>({...r,[n]:r[n]?.map(n=>n.id===e?t(n):n)}))})},this.getMatch=e=>{let t=t=>t.id===e;return this.state.cachedMatches.find(t)??this.state.pendingMatches?.find(t)??this.state.matches.find(t)},this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.__store.setState(e=>({...e,matches:e.matches.map(t),cachedMatches:e.cachedMatches.map(t),pendingMatches:e.pendingMatches?.map(t)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{if(!e.options.href){let t=this.buildLocation(e.options),n=t.url;this.origin&&n.startsWith(this.origin)&&(n=n.replace(this.origin,``)||`/`),e.options.href=t.href,e.headers.set(`Location`,n)}return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.__store.setState(e=>({...e,cachedMatches:[]})):this.__store.setState(e=>({...e,cachedMatches:e.cachedMatches.filter(e=>!t(e))}))},this.clearExpiredCache=()=>{this.clearCache({filter:e=>{let t=this.looseRoutesById[e.routeId];if(!t.options.loader)return!0;let n=(e.preload?t.options.preloadGcTime??this.options.defaultPreloadGcTime:t.options.gcTime??this.options.defaultGcTime)??300*1e3;return e.status===`error`?!0:Date.now()-e.updatedAt>=n}})},this.loadRouteChunk=Fo,this.preloadRoute=async e=>{let t=this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(e=>e.id)),i=new Set([...r,...this.state.cachedMatches.map(e=>e.id)]);Hi(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await Po({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(vo(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Xa(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.state.status!==`pending`)return!1;let i=(t?.pending===void 0?!this.state.isLoading:t.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=Oa(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!ca(a.params,e.params,{partial:!0})?!1:t?.includeSearch??!0?ca(i.search,r.search,{partial:!0})?a.params:!1:a.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status===`notFound`||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??po,parseSearch:e.parseSearch??fo}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:Va(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=(()=>{if(o){if(this.options.notFoundMode!==`root`)for(let e=a.length-1;e>=0;e--){let t=a[e];if(t.children)return t.id}return go}})(),c=[],l=e=>e?.id?e.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((n,r)=>{let a=c[r-1],[o,u,d]=(()=>{let r=a?.search??e.search,i=a?._strictSearch??void 0;try{let e=Jo(n.options.validateSearch,{...r})??void 0;return[{...r,...e},{...i,...e},void 0]}catch(e){let n=e;if(e instanceof Go||(n=new Go(e.message,{cause:e})),t?.throwOnError)throw n;return[r,{},n]}})(),f=n.options.loaderDeps?.({search:o})??``,p=f?JSON.stringify(f):``,{interpolatedPath:m,usedParams:h}=qa({path:n.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),g=n.id+m+p,_=this.getMatch(g),v=this.state.matches.find(e=>e.routeId===n.id),y=_?._strictParams??h,b;if(!_){let e=n.options.params?.parse??n.options.parseParams;if(e)try{Object.assign(y,e(y))}catch(e){if(b=Xa(e)||vo(e)?e:new Ko(e.message,{cause:e}),t?.throwOnError)throw b}}Object.assign(i,y);let x=v?`stay`:`enter`,S;if(_)S={..._,cause:x,params:v?ra(v.params,i):i,_strictParams:y,search:ra(v?v.search:_.search,o),_strictSearch:u};else{let e=n.options.loader||n.options.beforeLoad||n.lazyFn||Lo(n)?`pending`:`success`;S={id:g,index:r,routeId:n.id,params:v?ra(v.params,i):i,_strictParams:y,pathname:m,updatedAt:Date.now(),search:v?ra(v.search,o):o,_strictSearch:u,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:b,__routeContext:void 0,_nonReactive:{loadPromise:la()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:x,loaderDeps:v?ra(v.loaderDeps,f):f,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:n.options.staticData||{},fullPath:n.fullPath}}t?.preload||(S.globalNotFound=s===n.id),S.searchError=d;let C=l(a);S.context={...C,...S.__routeContext,...S.__beforeLoadContext},c.push(S)}),c.forEach((n,r)=>{let i=this.looseRoutesById[n.routeId];if(!this.getMatch(n.id)&&t?._buildLocation!==!0){let t=c[r-1],a=l(t);if(i.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c};n.__routeContext=i.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}),c}},Go=class extends Error{},Ko=class extends Error{};function qo(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Jo(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Go(`Async validation not supported`);if(n.issues)throw new Go(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Yo({pathname:e,routesById:t,processedTree:n}){let r={},i=Va(e),a,o=ka(i,n,!0);return o&&(a=o.route,Object.assign(r,o.params)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Xo({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){let i=n.reduce((e,t)=>{let n=[];return`search`in t.options?t.options.search?.middlewares&&n.push(...t.options.search.middlewares):(t.options.preSearchFilters||t.options.postSearchFilters)&&n.push(({search:e,next:n})=>{let r=e;`preSearchFilters`in t.options&&t.options.preSearchFilters&&(r=t.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=n(r);return`postSearchFilters`in t.options&&t.options.postSearchFilters?t.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),r&&t.options.validateSearch&&n.push(({search:e,next:n})=>{let r=n(e);try{return{...r,...Jo(t.options.validateSearch,r)??void 0}}catch{return r}}),e.concat(n)},[])??[];i.push(({search:e})=>t.search?t.search===!0?e:ta(t.search,e):{});let a=(e,t)=>{if(e>=i.length)return t;let n=i[e];return n({search:t,next:t=>a(e+1,t)})};return a(0,e)}var Zo=`Error preloading route! ☝️`,Qo=class{constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=go:this.parentRoute||ha(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?go:t?.path;r&&r!==`/`&&(r=Ba(r));let i=t?.id||r,a=n?go:Ra([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ra([`/`,a]));let o=a===`__root__`?`/`:Ra([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=o},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}},$o=class{constructor({id:e}){this.notFound=e=>Ya({routeId:this.id,...e}),this.id=e}},es=class extends Qo{constructor(e){super(e)}};function ts(e){let t=e.errorComponent??rs;return(0,q.jsx)(ns,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?K.createElement(t,{error:n,reset:r}):e.children})}var ns=class extends K.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function rs({error:e}){let[t,n]=K.useState(!1);return(0,q.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,q.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,q.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,q.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,q.jsx)(`div`,{children:(0,q.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,q.jsx)(`code`,{children:e.message}):null})}):null]})}function is({children:e,fallback:t=null}){return as()?(0,q.jsx)(K.Fragment,{children:e}):(0,q.jsx)(K.Fragment,{children:t})}function as(){return K.useSyncExternalStore(os,()=>!0,()=>!1)}function os(){return()=>{}}var ss=!0;function cs(e,t){if(!ss){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var ls=n((e=>{var t=Un();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),us=n(((e,t)=>{t.exports=ls()})),ds=n((e=>{var t=Un(),n=us();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),fs=n(((e,t)=>{t.exports=ds()}))();function ps(e,t=e=>e,n={}){let r=n.equal??ms;return(0,fs.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,r)}function ms(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=hs(e);if(n.length!==hs(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function hs(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var gs=K.createContext(null);function _s(){return typeof document>`u`?gs:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=gs,gs)}function vs(e){let t=K.useContext(_s());return cs(!((e?.warn??!0)&&!t),`useRouter must be used inside a <RouterProvider> component!`),t}function ys(e){let t=vs({warn:e?.router===void 0}),n=e?.router||t,r=(0,K.useRef)(void 0);return ps(n.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=ra(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var bs=K.createContext(void 0),xs=K.createContext(void 0);function Ss(e){let t=K.useContext(e.from?xs:bs);return ys({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(ha(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:`a nearest match!`}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function Cs(e){return Ss({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ws(e){let{select:t,...n}=e;return Ss({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ts(e){return Ss({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Es(e){return Ss({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Ds=typeof window<`u`?K.useLayoutEffect:K.useEffect;function Os(e){let t=K.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ks(e,t,n={},r={}){K.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function As(e){let t=K.useRef(null);return K.useImperativeHandle(e,()=>t.current,[]),t}function js(e){let t=vs();return K.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Ms=t(Gn(),1);function Ns(e,t){let n=vs(),[r,i]=K.useState(!1),a=K.useRef(!1),o=As(t),{activeProps:s,inactiveProps:c,activeOptions:l,to:u,preload:d,preloadDelay:f,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onFocus:w,onMouseEnter:T,onMouseLeave:E,onTouchStart:D,ignoreBlocker:O,params:k,search:A,hash:j,state:M,mask:N,reloadDocument:P,unsafeRelative:F,from:I,_fromLocation:L,...R}=e,z=ys({select:e=>e.location.search,structuralSharing:!0}),B=e.from,ee=K.useMemo(()=>({...e,from:B}),[n,z,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),V=K.useMemo(()=>n.buildLocation({...ee}),[n,ee]),te=K.useMemo(()=>{if(b)return;let e=V.maskedLocation?V.maskedLocation.url:V.url,t=!1;return n.origin&&(e.startsWith(n.origin)?e=n.history.createHref(e.replace(n.origin,``))||`/`:t=!0),{href:e,external:t}},[b,V.maskedLocation,V.url,n.origin,n.history]),H=K.useMemo(()=>{if(te?.external)return te.href;try{return new URL(u),u}catch{}},[u,te]),ne=e.reloadDocument||H?!1:d??n.options.defaultPreload,re=f??n.options.defaultPreloadDelay??0,ie=ys({select:e=>{if(H)return!1;if(l?.exact){if(!Wa(e.location.pathname,V.pathname,n.basepath))return!1}else{let t=Ua(e.location.pathname,n.basepath),r=Ua(V.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(l?.includeSearch??!0)&&!ca(e.location.search,V.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?e.location.hash===V.hash:!0}}),U=K.useCallback(()=>{n.preloadRoute({...ee}).catch(e=>{console.warn(e),console.warn(Zo)})},[n,ee]);ks(o,K.useCallback(e=>{e?.isIntersecting&&U()},[U]),Bs,{disabled:!!b||ne!==`viewport`}),K.useEffect(()=>{a.current||!b&&ne===`render`&&(U(),a.current=!0)},[b,U,ne]);let ae=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Us(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Ms.flushSync)(()=>{i(!0)});let t=n.subscribe(`onResolved`,()=>{t(),i(!1)});n.navigate({...ee,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:O})}};if(H)return{...R,ref:o,href:H,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onFocus:w},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...D&&{onTouchStart:D}};let oe=e=>{b||ne&&U()},se=oe,ce=e=>{if(!(b||!ne))if(!re)U();else{let t=e.target;if(zs.has(t))return;let n=setTimeout(()=>{zs.delete(t),U()},re);zs.set(t,n)}},le=e=>{if(b||!ne||!re)return;let t=e.target,n=zs.get(t);n&&(clearTimeout(n),zs.delete(t))},ue=ie?ta(s,{})??Fs:Ps,de=ie?Ps:ta(c,{})??Ps,fe=[S,ue.className,de.className].filter(Boolean).join(` `),pe=(x||ue.style||de.style)&&{...x,...ue.style,...de.style};return{...R,...ue,...de,href:te?.href,ref:o,onClick:Vs([C,ae]),onFocus:Vs([w,oe]),onMouseEnter:Vs([T,ce]),onMouseLeave:Vs([E,le]),onTouchStart:Vs([D,se]),disabled:!!b,target:y,...pe&&{style:pe},...fe&&{className:fe},...b&&Is,...ie&&Ls,...r&&Rs}}var Ps={},Fs={className:`active`},Is={role:`link`,"aria-disabled":!0},Ls={"data-status":`active`,"aria-current":`page`},Rs={"data-transitioning":`transitioning`},zs=new WeakMap,Bs={rootMargin:`100px`},Vs=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}},Hs=K.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,ref:a,...o}=Ns(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;return n===void 0&&delete o.disabled,K.createElement(n||`a`,{...o,ref:a},s)});function Us(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ws(e){return new Gs({id:e})}var Gs=class extends $o{constructor({id:e}){super({id:e}),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Cs({...e,from:this.id,strict:!1}),this.useNavigate=()=>js({from:vs().routesById[this.id].fullPath}),this.notFound=e=>Ya({routeId:this.id,...e}),this.Link=K.forwardRef((e,t)=>{let n=vs().routesById[this.id].fullPath;return(0,q.jsx)(Hs,{ref:t,from:n,...e})})}},Ks=class extends Qo{constructor(e){super(e),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id}),this.useLoaderData=e=>Cs({...e,from:this.id}),this.useNavigate=()=>js({from:this.fullPath}),this.Link=K.forwardRef((e,t)=>(0,q.jsx)(Hs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function qs(e){return new Ks(e)}var Js=class extends es{constructor(e){super(e),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id}),this.useLoaderData=e=>Cs({...e,from:this.id}),this.useNavigate=()=>js({from:this.fullPath}),this.Link=K.forwardRef((e,t)=>(0,q.jsx)(Hs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Ys(e){return new Js(e)}function Xs(e){return typeof e==`object`?new Zs(e,{silent:!0}).createRoute(e):new Zs(e,{silent:!0}).createRoute}var Zs=class{constructor(e,t){this.path=e,this.createRoute=e=>{cs(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=qs(e);return t.isRoot=!1,t},this.silent=t?.silent}},Qs=class{constructor(e){this.useMatch=e=>Ss({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ws({...e,from:this.options.id}),this.useLoaderData=e=>Cs({...e,from:this.options.id}),this.useNavigate=()=>js({from:vs().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function $s(e){return typeof e==`object`?new Qs(e):t=>new Qs({id:e,...t})}function ec(){let e=vs(),t=K.useRef({router:e,mounted:!1}),[n,r]=K.useState(!1),{hasPendingMatches:i,isLoading:a}=ys({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=Os(a),s=a||n||i,c=Os(s),l=a||i,u=Os(l);return e.startTransition=e=>{r(!0),K.startTransition(()=>{e(),r(!1)})},K.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Va(e.latestLocation.href)!==Va(n.href)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ds(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),Ds(()=>{o&&!a&&e.emit({type:`onLoad`,...Uo(e.state)})},[o,e,a]),Ds(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Uo(e.state)})},[l,u,e]),Ds(()=>{if(c&&!s){let t=Uo(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&so(e)}},[s,c,e]),null}function tc(e){let t=ys({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,q.jsx)(ts,{getResetKey:()=>t,onCatch:(t,n)=>{if(Xa(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Xa(t))return e.fallback?.(t);throw t},children:e.children})}function nc(){return(0,q.jsx)(`p`,{children:`Not Found`})}function rc(e){return(0,q.jsx)(q.Fragment,{children:e.children})}function ic(e,t,n){return t.options.notFoundComponent?(0,q.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,q.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,q.jsx)(nc,{})}function ac({children:e}){let t=vs();return t.isServer?(0,q.jsx)(`script`,{nonce:t.options.ssr?.nonce,className:`$tsr`,dangerouslySetInnerHTML:{__html:e+`;typeof $_TSR !== "undefined" && $_TSR.c()`}}):null}function oc(){let e=vs();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return null;let t=(e.options.getScrollRestorationKey||no)(e.latestLocation),n=t===no(e.latestLocation)?void 0:t,r={storageKey:Qa,shouldScrollRestoration:!0};return n&&(r.key=n),(0,q.jsx)(ac,{children:`(${ao.toString()})(${JSON.stringify(r)})`})}var sc=K.memo(function({matchId:e}){let t=vs(),n=ys({select:t=>{let n=t.matches.find(t=>t.id===e);return ha(n,`Could not find match for matchId "${e}". Please file an issue!`),{routeId:n.routeId,ssr:n.ssr,_displayPending:n._displayPending}},structuralSharing:!0}),r=t.routesById[n.routeId],i=r.options.pendingComponent??t.options.defaultPendingComponent,a=i?(0,q.jsx)(i,{}):null,o=r.options.errorComponent??t.options.defaultErrorComponent,s=r.options.onCatch??t.options.defaultOnCatch,c=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,l=n.ssr===!1||n.ssr===`data-only`,u=(!r.isRoot||r.options.wrapInSuspense||l)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||l))?K.Suspense:rc,d=o?ts:rc,f=c?tc:rc,p=ys({select:e=>e.loadedAt}),m=ys({select:t=>{let n=t.matches.findIndex(t=>t.id===e);return t.matches[n-1]?.routeId}});return(0,q.jsxs)(r.isRoot?r.options.shellComponent??rc:rc,{children:[(0,q.jsx)(bs.Provider,{value:e,children:(0,q.jsx)(u,{fallback:a,children:(0,q.jsx)(d,{getResetKey:()=>p,errorComponent:o||rs,onCatch:(t,n)=>{if(Xa(t))throw t;cs(!1,`Error in route match: ${e}`),s?.(t,n)},children:(0,q.jsx)(f,{fallback:e=>{if(!c||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return K.createElement(c,e)},children:l||n._displayPending?(0,q.jsx)(is,{fallback:a,children:(0,q.jsx)(lc,{matchId:e})}):(0,q.jsx)(lc,{matchId:e})})})})}),m===`__root__`&&t.options.scrollRestoration?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(cc,{}),(0,q.jsx)(oc,{})]}):null]})});function cc(){let e=vs(),t=K.useRef(void 0);return(0,q.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...Uo(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var lc=K.memo(function({matchId:e}){let t=vs(),{match:n,key:r,routeId:i}=ys({select:n=>{let r=n.matches.find(t=>t.id===e),i=r.routeId,a=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return{key:a?JSON.stringify(a):void 0,routeId:i,match:{id:r.id,status:r.status,error:r.error,_forcePending:r._forcePending,_displayPending:r._displayPending}}},structuralSharing:!0}),a=t.routesById[i],o=K.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,q.jsx)(e,{},r):(0,q.jsx)(uc,{})},[r,a.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let r=t.getMatch(n.id);if(r&&!r._nonReactive.minPendingPromise&&!t.isServer){let t=la();r._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),r._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status===`notFound`)return ha(Xa(n.error),`Expected a notFound error`),ic(t,a,n.error);if(n.status===`redirected`)throw ha(vo(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`){if(t.isServer)return(0,q.jsx)((a.options.errorComponent??t.options.defaultErrorComponent)||rs,{error:n.error,reset:void 0,info:{componentStack:``}});throw n.error}return o}),uc=K.memo(function(){let e=vs(),t=K.useContext(bs),n=ys({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=ys({select:e=>{let n=e.matches.find(e=>e.id===t);return ha(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),a=ys({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),o=e.options.defaultPendingComponent?(0,q.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return ic(e,r,void 0);if(!a)return null;let s=(0,q.jsx)(sc,{matchId:a});return n===`__root__`?(0,q.jsx)(K.Suspense,{fallback:o,children:s}):s});function dc(){let e=vs(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,q.jsx)(t,{}):null,r=(0,q.jsxs)(e.isServer||typeof document<`u`&&e.ssr?rc:K.Suspense,{fallback:n,children:[!e.isServer&&(0,q.jsx)(ec,{}),(0,q.jsx)(fc,{})]});return e.options.InnerWrap?(0,q.jsx)(e.options.InnerWrap,{children:r}):r}function fc(){let e=vs(),t=ys({select:e=>e.matches[0]?.id}),n=ys({select:e=>e.loadedAt}),r=t?(0,q.jsx)(sc,{matchId:t}):null;return(0,q.jsx)(bs.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,q.jsx)(ts,{getResetKey:()=>n,errorComponent:rs,onCatch:e=>{cs(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),cs(!1,e.message||e.toString())},children:r})})}var pc=e=>new mc(e),mc=class extends Wo{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=Xs,globalThis.createLazyFileRoute=$s):typeof window<`u`&&(window.createFileRoute=Xs,window.createLazyFileRoute=$s);function hc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,q.jsx)(_s().Provider,{value:e,children:t});return e.options.Wrap?(0,q.jsx)(e.options.Wrap,{children:r}):r}function gc({router:e,...t}){return(0,q.jsx)(hc,{router:e,...t,children:(0,q.jsx)(dc,{})})}function _c(e){return ys({select:t=>e?.select?e.select(t.location):t.location})}var vc=qn(),yc=/^\/versions\/[^/]+(?:\/|$)/;function bc(e){let t=e.trim();if(!t)return null;let n;try{n=new URL(t)}catch{return null}n.hash=``,n.search=``;let r=n.pathname.replace(/\/+$/,``);return n.pathname=r.length>0?r:`/`,n.toString().replace(/\/$/,(n.pathname,``))}function xc(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function Sc(e){return yc.test(e)}function Cc(e){let t=Sc(e.pathname);return{hosted:t,apiBaseUrl:bc(xc(e.search,`api`)??``),sessionId:t?xc(e.search,`session`):null}}function wc(e,t){let n=Cc(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Tc(){return typeof window<`u`&&window.location!==void 0}function Ec(){return Tc()?Cc(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Dc(){return Tc()?Ec().apiBaseUrl??``:``}function Oc(e){if(!Tc())return``;let t=Dc();if(t){let n=new URL(t);return`${n.protocol===`https:`?`wss:`:`ws:`}//${n.host}${e}`}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${e}`}function kc(){return Oc(`/trpc`)}function Ac(){return Oc(`/ws/pty`)}function jc(){let e=Dc();return e?`${e}/trpc`:`/trpc`}function Mc(){let e=Dc();return e?`${e}/api/health`:`/api/health`}var Nc=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Nc=!0,console.log(`[static-mode] Detected static export mode (via flag)`));async function Pc(){return Nc===null&&(Nc=typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0),Nc}function Fc(){return Nc===!0}function Ic(e){Nc=e}var Lc=null;function Rc(){return Lc===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Lc}function zc(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Bc=`modulepreload`,Vc=function(e){return`/`+e},Hc={},J=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vc(t,n),t in Hc)return;Hc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Uc=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Wc=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Gc=Fc()?[]:[`/git`,`/terminal`],Kc=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function qc(){return wc(`nav-layout`,window.location)}function Jc(e){return wc(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Yc=300;function Xc(e){return Uc.includes(e)}function Zc(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&Xc(e)):[]}function Qc(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:Zc(t.mainTabs),bottomTabs:Zc(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function $c(e,t){if(typeof e!=`object`||!e)return{__TSR_index:0,key:t,__TSR_key:t};let n=e,r=typeof n.key==`string`?n.key:t,i=typeof n.__TSR_key==`string`?n.__TSR_key:r,a=typeof n.__TSR_index==`number`?n.__TSR_index:0;return{...n,key:r,__TSR_key:i,__TSR_index:a}}function el(e,t){let n=new URL(e,`http://nav.local`),r=`${n.pathname}${n.search}${n.hash}`,i=Math.random().toString(36).slice(2);return{href:r,pathname:n.pathname||`/`,search:n.search,hash:n.hash,state:$c(t,i)}}function tl(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function nl(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function rl(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function il(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=tl(Rc());return t.pathname=nl(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function al(e,t){for(let n of[`api`,`session`]){let r=t.searchParams.get(n);r&&!e.searchParams.has(n)&&e.searchParams.set(n,r)}}function ol(e){for(let t of Uc)if(e===t||e.startsWith(t+`/`))return t;return null}function sl(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=ol(n.pathname);return i&&r.includes(i)?i:null}function cl(e){return Kc.some(t=>e===t||e.startsWith(t+`/`))}function ll(e,t){if(cl(t))return`pop`;let n=ol(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function ul(e){let t=new Set,n=[],r=[];for(let r of e.mainTabs)t.has(r)||(n.push(r),t.add(r));for(let n of e.bottomTabs)t.has(n)||(r.push(n),t.add(n));for(let e of Uc)t.has(e)||(Gc.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function dl(e,t){if(t.length===0)return el(`/`);let n=ol(e.pathname);return n&&!t.includes(n)?el(`/`):e}function fl(e,t){if(t.length===0)return el(`/`);if(e.pathname===`/`)return el(`/`,e.state);let n=ol(e.pathname);return!n||!t.includes(n)?el(`/`):e}function pl(e){return e.pathname===`/`?el(`/`,e.state):cl(e.pathname)?e:el(`/`)}function ml(e){let t=ul({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:dl(e.mainLocation,t.mainTabs),bottomLocation:fl(e.bottomLocation,t.bottomTabs),popLocation:pl(e.popLocation)}}function hl(e,t){let n=new URL(e.href),r=tl(Rc());n.pathname=nl(n.pathname,r);let i=n.searchParams.get(`_b`),a=n.searchParams.get(`_p`);n.searchParams.delete(`_b`),n.searchParams.delete(`_p`);let o=window.history.state,s=el(`${n.pathname}${n.search}${n.hash}`,o?.main),c=el(i??`/`,o?.bottom),l=el(a??`/`,o?.pop);if(!i&&!a){let e=ll(t,s.pathname);e===`bottom`?(c=s,s=el(`/`,o?.main)):e===`pop`&&(l=s,s=el(`/`,o?.main))}return{main:dl(s,t.mainTabs),bottom:fl(c,t.bottomTabs),pop:pl(l)}}function gl(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=tl(Rc());return n.pathname=rl(n.pathname,r),al(n,t),n.searchParams.delete(`_b`),n.searchParams.delete(`_p`),e.bottomTabs.length>0&&n.searchParams.set(`_b`,e.bottomLocation.href),e.popLocation.pathname!==`/`&&n.searchParams.set(`_p`,e.popLocation.href),`${n.pathname}${n.search}${n.hash}`}function _l(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function vl(){return{mainTabs:[...Wc],bottomTabs:[...Gc],updatedAt:0,mainLocation:el(`/dashboard`),bottomLocation:el(`/`),popLocation:el(`/`)}}function yl(){try{let e=localStorage.getItem(qc());return e?Qc(JSON.parse(e)):null}catch{return null}}function bl(e){try{let t=localStorage.getItem(e);return t?Qc(JSON.parse(t)):null}catch{return null}}function xl(e,t=qc()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Sl(e){let t=ol(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?el(t,e.state):e}var Cl=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(sl(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=el(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||sl(e,`main`)!=null?e:{...e,mainLocation:el(e.mainTabs[0])}];function wl(e,t,n){let r=t;for(let t of Cl)r=t({prevState:e,nextState:r,event:n});return r}function Tl(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:ll(e,t.location.pathname);return{nextState:n===`main`?{...e,mainLocation:t.location}:n===`bottom`?{...e,bottomLocation:t.location}:{...e,popLocation:t.location},changed:!0,urlAction:t.action,notify:n===t.sourceArea?[]:[{area:n,type:t.action}],persist:`none`}}case`POPSTATE`:return{nextState:{...e,mainLocation:t.mainLocation,bottomLocation:t.bottomLocation,popLocation:t.popLocation},changed:!0,notify:[{area:`main`,type:`BACK`},{area:`bottom`,type:`BACK`},{area:`pop`,type:`BACK`}],persist:`none`};case`MOVE_TAB`:{let n=e.bottomTabs.includes(t.tabId)?`bottom`:`main`;if(n===t.targetArea)return{nextState:e,changed:!1,notify:[],persist:`none`};let r=e.mainTabs.filter(e=>e!==t.tabId),i=e.bottomTabs.filter(e=>e!==t.tabId),a=t.targetArea===`main`?[...r,t.tabId]:r,o=t.targetArea===`bottom`?[...i,t.tabId]:i,s=e.mainLocation,c=e.bottomLocation;return ol((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=el(`/`):c=el(`/`)),{nextState:{...e,mainTabs:a,bottomTabs:o,mainLocation:s,bottomLocation:c},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_and_remote`}}case`REORDER`:{let n=t.area===`main`?e.mainTabs:e.bottomTabs,r=new Set(n),i=t.tabIds.filter(e=>r.has(e));for(let e of n)i.includes(e)||i.push(e);return _l(n,i)?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:t.area===`main`?{...e,mainTabs:i}:{...e,bottomTabs:i},changed:!0,notify:[],persist:`local_and_remote`}}case`CLOSE_TAB`:{let n=e.bottomTabs.includes(t.tabId),r=e.mainTabs.includes(t.tabId);return!n&&!r?{nextState:e,changed:!1,notify:[],persist:`none`}:n?ol(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:ol(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return ll(e,t.location.pathname)===`bottom`?{nextState:{...e,bottomLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`bottom`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_BOTTOM`:return e.bottomLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,bottomLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return ll(e,t.location.pathname)===`pop`?{nextState:{...e,popLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`pop`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_POP`:return e.popLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,popLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`APPLY_LAYOUT`:{if(t.layout.updatedAt<=e.updatedAt)return{nextState:e,changed:!1,notify:[],persist:`none`};let n=ul(t.layout);return{nextState:{...e,mainTabs:n.mainTabs,bottomTabs:n.bottomTabs,updatedAt:t.layout.updatedAt},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_only`}}}}function El(e,t,n){return n===`main`?e.mainLocation.href!==t.mainLocation.href:n===`bottom`?e.bottomLocation.href!==t.bottomLocation.href:e.popLocation.href!==t.popLocation.href}function Dl(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])El(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Ol=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=vl();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:wc(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=Fc()?null:yl();if(e!=null){let t=ul(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=hl(window.location,this.state),n=ml({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=ml(wl(n,n,{type:`BOOTSTRAP`})),this.state=n,this.normalizeUrl(),window.addEventListener(`popstate`,this.handlePopState)}setHistoryRef(e,t){e===`main`?this.mainHistory=t:e===`bottom`?this.bottomHistory=t:this.popHistory=t}getLocation(e){return e===`main`?this.state.mainLocation:e===`bottom`?this.state.bottomLocation:this.state.popLocation}push(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:el(il(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:el(il(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:el(il(t),n)});return gl(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return ll(this.state,e)}moveTab(e,t){this.dispatch({type:`MOVE_TAB`,tabId:e,targetArea:t})}reorder(e,t){this.dispatch({type:`REORDER`,area:e,tabIds:t})}closeTab(e){this.dispatch({type:`CLOSE_TAB`,tabId:e})}activateBottom(e){this.dispatch({type:`ACTIVATE_BOTTOM`,location:el(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:el(e)})}deactivatePop(){this.dispatch({type:`DEACTIVATE_POP`})}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=ol(this.state.bottomLocation.pathname);return this.snapshotCache={mainTabs:[...this.state.mainTabs],bottomTabs:[...this.state.bottomTabs],mainLocation:this.state.mainLocation,bottomLocation:this.state.bottomLocation,popLocation:this.state.popLocation,bottomActive:e!=null&&this.state.bottomTabs.includes(e),popActive:this.state.popLocation.pathname!==`/`},this.snapshotCache}async init(){if(!(this.initialized||Fc())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await J(async()=>{let{trpcClient:e}=await import(`./trpc-CibonjNv.js`);return{trpcClient:e}},[]),n=Qc(await t.kv.get.query({key:this.storageKey}));n?n.updatedAt>this.state.updatedAt?this.dispatch({type:`APPLY_LAYOUT`,layout:n}):this.state.updatedAt>n.updatedAt&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{}):this.state.updatedAt>0&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{});let r=t.kv.subscribe.subscribe({key:this.storageKey},{onData:e=>{let t=Qc(e);t&&this.dispatch({type:`APPLY_LAYOUT`,layout:t})}});this.kvUnsubscribe=()=>r.unsubscribe()}catch{}}}destroy(){typeof window<`u`&&window.removeEventListener(`popstate`,this.handlePopState),this.cancelPersistTimer(),this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}handlePopState=()=>{let e=hl(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Tl(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=wl(this.state,t.nextState,e);return n=ml(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=hl(window.location,this.state);this.state=ml({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Tl(this.state,e);if(!t.changed)return;let n=this.state,r=wl(n,t.nextState,e);r=ml(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),xl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(El(n,this.state,`main`)||El(n,this.state,`bottom`)||El(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=Dl(t.notify,n,this.state);this.notifyRouters(a),this.notifyListeners()}notifyRouters(e){for(let t of e)(t.area===`main`?this.mainHistory:t.area===`bottom`?this.bottomHistory:this.popHistory)?.notify({type:t.type})}notifyListeners(){this.snapshotCache=null;for(let e of this.listeners)e()}syncToUrl(e){let t=gl(this.state),n=`${window.location.pathname}${window.location.search}${window.location.hash}`;if(e===`REPLACE`&&t===n)return;let r={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};e===`PUSH`?window.history.pushState(r,``,t):window.history.replaceState(r,``,t)}normalizeUrl(){let e=gl(this.state);if(e===`${window.location.pathname}${window.location.search}${window.location.hash}`)return;let t={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};window.history.replaceState(t,``,e)}cancelPersistTimer(){this.persistTimer&&=(clearTimeout(this.persistTimer),null)}persistLayout(){let e=Date.now();this.state={...this.state,updatedAt:e},xl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,J(async()=>{let{trpcClient:e}=await import(`./trpc-CibonjNv.js`);return{trpcClient:e}},[]).then(({trpcClient:t})=>t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e}})).catch(()=>{})},Yc)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Mc());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Jc(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=bl(e);if(t){let e=ul(t);this.state=ml({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=ml({...this.state,mainLocation:Sl(this.state.mainLocation),bottomLocation:Sl(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!Fc()&&Ol.init();function kl(e){let t=new MutationObserver(t=>{for(let n of t)n.attributeName===`class`&&e()});return t.observe(document.documentElement,{attributes:!0}),()=>t.disconnect()}function Al(){return document.documentElement.classList.contains(`dark`)}function jl(){return!1}function Ml(){return(0,K.useSyncExternalStore)(kl,Al,jl)}function Nl(){return(0,K.useSyncExternalStore)(e=>Ol.subscribe(e),()=>Ol.getSnapshot(),()=>Ol.getSnapshot())}var Pl=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Fl=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Il={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ll=(0,K.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,K.createElement)(`svg`,{ref:c,...Il,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fl(`lucide`,i),...s},[...o.map(([e,t])=>(0,K.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Y=(e,t)=>{let n=(0,K.forwardRef)(({className:n,...r},i)=>(0,K.createElement)(Ll,{ref:i,iconNode:t,className:Fl(`lucide-${Pl(e)}`,n),...r}));return n.displayName=`${e}`,n},Rl=Y(`Archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),zl=Y(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Bl=Y(`ArrowRightLeft`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),Vl=Y(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Hl=Y(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ul=Y(`Camera`,[[`path`,{d:`M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z`,key:`1tc9qg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Wl=Y(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Gl=Y(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Kl=Y(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ql=Y(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Jl=Y(`CircleCheckBig`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Yl=Y(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Xl=Y(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Zl=Y(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ql=Y(`Clock1`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 14.5 8`,key:`12zbmj`}]]),$l=Y(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),eu=Y(`Clock6`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 12 16.5`,key:`hb2qv6`}]]),tu=Y(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),nu=Y(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),ru=Y(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),iu=Y(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),au=Y(`FilePlus`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),ou=Y(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),su=Y(`FileWarning`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),cu=Y(`File`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}]]),lu=Y(`Files`,[[`path`,{d:`M20 7h-3a2 2 0 0 1-2-2V2`,key:`x099mo`}],[`path`,{d:`M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z`,key:`18t6ie`}],[`path`,{d:`M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8`,key:`1nja0z`}]]),uu=Y(`FolderClosed`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`M2 10h20`,key:`1ir3d8`}]]),du=Y(`FolderOpenDot`,[[`path`,{d:`m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2`,key:`1nmvlm`}],[`circle`,{cx:`14`,cy:`15`,r:`1`,key:`1gm4qj`}]]),fu=Y(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),pu=Y(`FolderPlus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),mu=Y(`FolderTree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),hu=Y(`Folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),gu=Y(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),_u=Y(`GitCommitHorizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),vu=Y(`Github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),yu=Y(`GripVertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),bu=Y(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),xu=Y(`Keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),Su=Y(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Cu=Y(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),wu=Y(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Tu=Y(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),Eu=Y(`ListTree`,[[`path`,{d:`M21 12h-8`,key:`1bmf0i`}],[`path`,{d:`M21 6H8`,key:`1pqkrb`}],[`path`,{d:`M21 18h-8`,key:`1tm79t`}],[`path`,{d:`M3 6v4c0 1.1.9 2 2 2h3`,key:`1ywdgy`}],[`path`,{d:`M3 10v6c0 1.1.9 2 2 2h3`,key:`2wc746`}]]),Du=Y(`List`,[[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 18h.01`,key:`1tta3j`}],[`path`,{d:`M3 6h.01`,key:`1rqtza`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 18h13`,key:`1lx6n3`}],[`path`,{d:`M8 6h13`,key:`ik3vkj`}]]),Ou=Y(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ku=Y(`Menu`,[[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}],[`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`,key:`1owob3`}],[`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`,key:`yk5zj1`}]]),Au=Y(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ju=Y(`Monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Mu=Y(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),Nu=Y(`PanelBottomClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`m15 8-3 3-3-3`,key:`1oxy1z`}]]),Pu=Y(`PanelTopClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 16 3-3 3 3`,key:`1idcnm`}]]),Fu=Y(`Pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Iu=Y(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),Lu=Y(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ru=Y(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),zu=Y(`Rocket`,[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`,key:`m3kijz`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`,key:`1fmvmk`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`,key:`1f8sc4`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}]]),Bu=Y(`Save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Vu=Y(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Hu=Y(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Uu=Y(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Wu=Y(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Gu=Y(`SlidersHorizontal`,[[`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,key:`obuewd`}],[`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,key:`1q6298`}],[`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,key:`1iu8h1`}],[`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,key:`ntss68`}],[`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,key:`14d8ph`}],[`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,key:`m0wm8r`}],[`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,key:`14e1ph`}],[`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,key:`1i6ji0`}],[`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,key:`1lctlv`}]]),Ku=Y(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),qu=Y(`SquareTerminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Ju=Y(`Sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Yu=Y(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Xu=Y(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Zu=Y(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Qu=Y(`Unlink2`,[[`path`,{d:`M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2`,key:`1re2ne`}]]),$u=Y(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ed=[{to:`/dashboard`,icon:Cu,label:`Dashboard`,defaultArea:`main`},{to:`/config`,icon:Gu,label:`Config`,defaultArea:`main`},{to:`/git`,icon:iu,label:`Git`,defaultArea:`bottom`},{to:`/specs`,icon:ou,label:`Specs`,defaultArea:`main`},{to:`/changes`,icon:gu,label:`Changes`,defaultArea:`main`},{to:`/archive`,icon:Rl,label:`Archive`,defaultArea:`main`},{to:`/settings`,icon:Uu,label:`Settings`,defaultArea:`main`},{to:`/terminal`,icon:Yu,label:`Terminal`,defaultArea:`bottom`}],td=ed.filter(e=>e.defaultArea===`main`&&e.to!==`/settings`),nd=ed.filter(e=>e.to!==`/settings`),rd=ed.find(e=>e.to===`/settings`),id=null;function ad({area:e,tabs:t,className:n,useLinks:r,onNavigate:i}){let[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(null),l=(0,K.useRef)(null),{bottomLocation:u}=Nl(),d=e===`bottom`?t.find(e=>u.pathname===e||u.pathname.startsWith(e+`/`))??null:null,f=(0,K.useCallback)(e=>{l.current=e,c(e)},[]),p=(0,K.useCallback)((e,t)=>{e.dataTransfer&&(id=t,e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`move`)},[]),m=(0,K.useCallback)(()=>{id=null},[]),h=(0,K.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`,o(!0)},[]),g=(0,K.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||(o(!1),f(null))},[f]),_=(0,K.useCallback)((e,n)=>{if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,t[n]===id){f(null);return}let r=e.currentTarget.getBoundingClientRect(),i=r.top+r.height/2;f({index:n,position:e.clientY<i?`before`:`after`}),o(!0)},[t,f]),v=(0,K.useCallback)(n=>{n.preventDefault();let r=n.dataTransfer.getData(`text/plain`),i=l.current;if(o(!1),f(null),id=null,!r)return;let a=t.includes(r),s=i==null?void 0:t[i.index];if(a||Ol.moveTab(r,e),s&&s!==r){let t=[...e===`main`?Ol.mainTabs:Ol.bottomTabs].filter(e=>e!==r),n=t.indexOf(s);if(n>=0){let a=i.position===`before`?n:n+1;t.splice(a,0,r),Ol.reorder(e,t)}}},[e,t,f]),y=t.map(e=>ed.find(t=>t.to===e)).filter(Boolean),b=e===`main`||r;return(0,q.jsx)(`ul`,{className:`min-h-[2rem] space-y-1 ${a?`bg-muted/50 rounded-md`:``} ${n??``}`,onDragOver:h,onDragLeave:g,onDrop:v,children:y.map((t,n)=>{let r=e===`bottom`&&t.to===d,a=s?.index===n&&s.position===`before`,o=s?.index===n&&s.position===`after`;return(0,q.jsxs)(`li`,{draggable:!0,onDragStart:e=>p(e,t.to),onDragEnd:m,onDragOver:e=>_(e,n),className:`group relative cursor-grab`,children:[a&&(0,q.jsx)(`div`,{className:`bg-border -top-0.25 pointer-events-none absolute left-4 right-4 h-0.5 -translate-y-0.5 rounded`}),b?(0,q.jsxs)(Hs,{to:t.to,draggable:!1,onDragStart:e=>e.preventDefault(),onClick:i,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(yu,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,q.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}):(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{r?Ol.deactivateBottom():Ol.activateBottom(t.to),i?.()},className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left ${r?`bg-primary text-primary-foreground`:`hover:bg-muted`}`,children:[(0,q.jsx)(yu,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,q.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}),o&&(0,q.jsx)(`div`,{className:`bg-border -bottom-0.25 pointer-events-none absolute left-4 right-4 h-0.5 translate-y-0.5 rounded`})]},t.to)})})}function od(){let e=Ml(),t=Nl(),n=Rc(),r=Fc();return(0,q.jsxs)(`nav`,{className:`desktop-sidebar border-border bg-muted/30 flex w-64 shrink-0 flex-col border-r p-4`,children:[(0,q.jsx)(`div`,{className:`mb-6`,children:(0,q.jsx)(`img`,{src:e?`${n}openspec_pixel_dark.svg`:`${n}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-6`})}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>Ol.activatePop(`/search`),className:`hover:bg-muted border-primary mb-4 flex items-center gap-2 rounded-md border px-3 py-2 text-left`,children:[(0,q.jsx)(Vu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:`Search`})]}),r?(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,q.jsx)(`ul`,{className:`flex-1 space-y-1`,children:td.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(Hs,{to:e.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,q.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,q.jsxs)(Hs,{to:rd.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(rd.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:rd.label})]})})]}):(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2`,children:[(0,q.jsx)(`div`,{className:`flex-1`,children:(0,q.jsx)(ad,{area:`main`,tabs:t.mainTabs,className:`h-full`})}),(0,q.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,q.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,q.jsx)(ad,{area:`bottom`,tabs:t.bottomTabs})})]})]})}var sd=Object.create,cd=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,ud=Object.getOwnPropertyNames,dd=Object.getPrototypeOf,fd=Object.prototype.hasOwnProperty,pd=(e,t)=>function(){return t||(0,e[ud(e)[0]])((t={exports:{}}).exports,t),t.exports},md=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ud(t),a=0,o=i.length,s;a<o;a++)s=i[a],!fd.call(e,s)&&s!==n&&cd(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ld(t,s))||r.enumerable});return e},hd=(e,t,n)=>(n=e==null?{}:sd(dd(e)),md(t||!e||!e.__esModule?cd(n,`default`,{value:e,enumerable:!0}):n,e)),gd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),_d=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=gd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),vd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=gd().default,r=_d();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),yd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=vd();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),bd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=yd();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function xd(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(Sd,t)}};return t}function Sd(e,t){return t(e)}function Cd(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function wd(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return xd(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function Td(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=xd(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function Ed(e){return xd(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function Dd(e){return Array.isArray(e)?e:[e]}function Od(e){return t=>{let n=Dd(e.true).map(e=>e(t)),r=Dd(e.false).map(e=>e(t));return t=>xd(i=>{let a=e.condition(t.op)?n:r;return Ed({op:t.op,links:a}).subscribe(i)})}}var kd={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};kd.BAD_GATEWAY,kd.SERVICE_UNAVAILABLE,kd.GATEWAY_TIMEOUT,kd.INTERNAL_SERVER_ERROR;function Ad(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function jd(e){return typeof e==`function`}var Md=typeof Symbol==`function`&&!!Symbol.asyncIterator;function Nd(e){return Md&&Ad(e)&&Symbol.asyncIterator in e}var Pd=e=>e();function Fd(e=0){return new Promise(t=>setTimeout(t,e))}var Id=Object.create,Ld=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,zd=Object.getOwnPropertyNames,Bd=Object.getPrototypeOf,Vd=Object.prototype.hasOwnProperty,Hd=(e,t)=>function(){return t||(0,e[zd(e)[0]])((t={exports:{}}).exports,t),t.exports},Ud=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=zd(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Vd.call(e,s)&&s!==n&&Ld(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Rd(t,s))||r.enumerable});return e},Wd=(e,t,n)=>(n=e==null?{}:Id(Bd(e)),Ud(t||!e||!e.__esModule?Ld(n,`default`,{value:e,enumerable:!0}):n,e)),Gd=()=>{},Kd=e=>{Object.freeze&&Object.freeze(e)};function qd(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(Gd,{get(r,i){if(!(typeof i!=`string`||i===`then`))return qd(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1],o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),Kd(o.args),Kd(o.path),e(o)}})),n[r]}var Jd=e=>qd(e,[],Object.create(null)),Yd=e=>new Proxy(Gd,{get(t,n){if(n!==`then`)return e(n)}}),Xd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Zd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Xd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Qd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Xd().default,r=Zd();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),$d=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Qd();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ef=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=$d();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});Wd(ef(),1);var tf=Wd($d(),1),nf=class extends Error{};function rf(e){if(e instanceof Error)return e;let t=typeof e;if(!(t===`undefined`||t===`function`||e===null)){if(t!==`object`)return Error(String(e));if(Ad(e))return Object.assign(new nf,e)}}var af=class extends Error{constructor(e){let t=rf(e.cause),n=e.message??t?.message??e.code;super(n,{cause:t}),(0,tf.default)(this,`cause`,void 0),(0,tf.default)(this,`code`,void 0),this.code=e.code,this.name=`TRPCError`,this.cause??=t}},of=Wd(ef(),1);function sf(e,t){if(`error`in e){let n=t.deserialize(e.error);return{ok:!1,error:(0,of.default)((0,of.default)({},e),{},{error:n})}}return{ok:!0,result:(0,of.default)((0,of.default)({},e.result),(!e.result.type||e.result.type===`data`)&&{type:`data`,data:t.deserialize(e.result.data)})}}var cf=class extends Error{constructor(){super(`Unable to transform response from server`)}};function lf(e,t){let n;try{n=sf(e,t)}catch{throw new cf}if(!n.ok&&(!Ad(n.error.error)||typeof n.error.error.code!=`number`)||n.ok&&!Ad(n.result))throw new cf;return n}Wd(ef(),1);function uf(e){return typeof e==`function`}async function df(e,t){let{_def:n}=e,r=n.procedures[t];for(;!r;){let e=Object.keys(n.lazy).find(e=>t.startsWith(e));if(!e)return null;await n.lazy[e].load(),r=n.procedures[t]}return r}async function ff(e){let{type:t,path:n}=e,r=await df(e.router,n);if(!r||!uf(r)||r._def.type!==t&&!e.allowMethodOverride)throw new af({code:`NOT_FOUND`,message:`No "${t}"-procedure on path "${n}"`});if(r._def.type!==t&&e.allowMethodOverride&&r._def.type===`subscription`)throw new af({code:`METHOD_NOT_SUPPORTED`,message:`Method override is not supported for subscriptions`});return r(e)}var pf=hd(yd(),1),mf=hd(bd(),1);function hf(e){return e instanceof vf}function gf(e){return Ad(e)&&Ad(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function _f(e,t){return typeof e==`string`?e:Ad(e)&&typeof e.message==`string`?e.message:t}var vf=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,pf.default)(this,`cause`,void 0),(0,pf.default)(this,`shape`,void 0),(0,pf.default)(this,`data`,void 0),(0,pf.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return hf(r)?(n.meta&&(r.meta=(0,mf.default)((0,mf.default)({},r.meta),n.meta)),r):gf(r)?new e(r.error.message,(0,mf.default)((0,mf.default)({},n),{},{result:r})):new e(_f(r,`Unknown error`),(0,mf.default)((0,mf.default)({},n),{},{cause:r}))}};function yf(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var bf=e=>typeof e==`function`;function xf(e){if(e)return e;if(typeof window<`u`&&bf(window.fetch))return window.fetch;if(typeof globalThis<`u`&&bf(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var Sf=hd(bd(),1);function Cf(e){return{url:e.url.toString(),fetch:e.fetch,transformer:yf(e.transformer),methodOverride:e.methodOverride}}function wf(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var Tf={query:`GET`,mutation:`POST`,subscription:`PATCH`};function Ef(e){return`input`in e?e.transformer.input.serialize(e.input):wf(e.inputs.map(t=>e.transformer.input.serialize(t)))}var Df=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=Ef(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},Of=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=Ef(e);return t===void 0?void 0:JSON.stringify(t)},kf=e=>Nf((0,Sf.default)((0,Sf.default)({},e),{},{contentTypeHeader:`application/json`,getUrl:Df,getBody:Of})),Af=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},jf=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new Af};async function Mf(e){jf(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??Tf[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,Sf.default)((0,Sf.default)((0,Sf.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return xf(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}async function Nf(e){let t={},n=await Mf(e);t.response=n;let r=await n.json();return t.responseJSON=r,{json:r,meta:t}}hd(bd(),1);var Pf=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function Ff(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:Pf,reject:Pf},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function If(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}var Lf=hd(bd(),1);function Rf(e){let t=Cf(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return Df((0,Lf.default)((0,Lf.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=If(...n.map(e=>e.signal)),s=await kf((0,Lf.default)((0,Lf.default)({},t),{},{path:r,inputs:a,type:i,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}},signal:o}));return(Array.isArray(s.json)?s.json:n.map(()=>s.json)).map(e=>({meta:s.meta,json:e}))}}),a={query:Ff(i(`query`)),mutation:Ff(i(`mutation`))};return({op:e})=>xd(n=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let r=a[e.type].load(e),i;return r.then(e=>{i=e;let r=lf(e.json,t.transformer.output);if(!r.ok){n.error(vf.from(r.error,{meta:e.meta}));return}n.next({context:e.meta,result:r.result}),n.complete()}).catch(e=>{n.error(vf.from(e,{meta:i?.meta}))}),()=>{}})}}hd(bd(),1);var zf={enabled:!1,closeMs:0},Bf={enabled:!1,pongTimeoutMs:1e3,intervalMs:5e3},Vf=e=>e===0?0:Math.min(1e3*2**e,3e4),Hf=(e,...t)=>typeof e==`function`?e(...t):e,Uf=hd(yd(),1),Wf=class e extends Error{constructor(t){super(t.message,{cause:t.cause}),this.name=`TRPCWebSocketClosedError`,Object.setPrototypeOf(this,e.prototype)}},Gf=class{constructor(e,t){this.onTimeout=e,this.timeoutMs=t,(0,Uf.default)(this,`timeout`,void 0)}reset(){this.timeout&&=(clearTimeout(this.timeout),setTimeout(this.onTimeout,this.timeoutMs))}start(){clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs)}stop(){clearTimeout(this.timeout),this.timeout=void 0}};function Kf(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function qf(e){let t=await Hf(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function Jf(e){let t={method:`connectionParams`,data:await Hf(e)};return JSON.stringify(t)}var Yf=hd(yd(),1),Xf=class{constructor(){(0,Yf.default)(this,`outgoingRequests`,[]),(0,Yf.default)(this,`pendingRequests`,{})}register(e,t){let{promise:n,resolve:r}=Kf();return this.outgoingRequests.push({id:String(e.id),message:e,end:n,callbacks:{next:t.next,complete:()=>{t.complete(),r()},error:e=>{t.error(e),r()}}}),()=>{this.delete(e.id),t.complete(),r()}}delete(e){e!==null&&(this.outgoingRequests=this.outgoingRequests.filter(({id:t})=>t!==String(e)),delete this.pendingRequests[String(e)])}flush(){let e=this.outgoingRequests;this.outgoingRequests=[];for(let t of e)this.pendingRequests[t.id]=t;return e}getPendingRequests(){return Object.values(this.pendingRequests)}getPendingRequest(e){return e===null?null:this.pendingRequests[String(e)]}getOutgoingRequests(){return this.outgoingRequests}getRequests(){return[...this.getOutgoingRequests().map(e=>({state:`outgoing`,message:e.message,end:e.end,callbacks:e.callbacks})),...this.getPendingRequests().map(e=>({state:`pending`,message:e.message,end:e.end,callbacks:e.callbacks}))]}hasPendingRequests(){return this.getPendingRequests().length>0}hasPendingSubscriptions(){return this.getPendingRequests().some(e=>e.message.method===`subscription`)}hasOutgoingRequests(){return this.outgoingRequests.length>0}},Zf=hd(yd(),1);function Qf(e){let{promise:t,resolve:n,reject:r}=Kf();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function $f(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var ep=class e{constructor(t){if((0,Zf.default)(this,`id`,++e.connectCount),(0,Zf.default)(this,`WebSocketPonyfill`,void 0),(0,Zf.default)(this,`urlOptions`,void 0),(0,Zf.default)(this,`keepAliveOpts`,void 0),(0,Zf.default)(this,`wsObservable`,Td(null)),(0,Zf.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=qf(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&$f(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await Qf(e),t.urlOptions.connectionParams&&e.send(await Jf(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,Zf.default)(ep,`connectCount`,0);function tp(e){return e.isOpen()?{id:e.id,state:`open`,ws:e.ws}:e.isClosed()?{id:e.id,state:`closed`,ws:e.ws}:e.ws?{id:e.id,state:`connecting`,ws:e.ws}:null}var np=hd(yd(),1),rp=hd(bd(),1),ip=class{constructor(e){(0,np.default)(this,`connectionState`,void 0),(0,np.default)(this,`allowReconnect`,!1),(0,np.default)(this,`requestManager`,new Xf),(0,np.default)(this,`activeConnection`,void 0),(0,np.default)(this,`reconnectRetryDelay`,void 0),(0,np.default)(this,`inactivityTimeout`,void 0),(0,np.default)(this,`callbacks`,void 0),(0,np.default)(this,`lazyMode`,void 0),(0,np.default)(this,`reconnecting`,null),this.callbacks={onOpen:e.onOpen,onClose:e.onClose,onError:e.onError};let t=(0,rp.default)((0,rp.default)({},zf),e.lazy);this.inactivityTimeout=new Gf(()=>{if(this.requestManager.hasOutgoingRequests()||this.requestManager.hasPendingRequests()){this.inactivityTimeout.reset();return}this.close().catch(()=>null)},t.closeMs),this.activeConnection=new ep({WebSocketPonyfill:e.WebSocket,urlOptions:e,keepAlive:(0,rp.default)((0,rp.default)({},Bf),e.keepAlive)}),this.activeConnection.wsObservable.subscribe({next:e=>{e&&this.setupWebSocketListeners(e)}}),this.reconnectRetryDelay=e.retryDelayMs??Vf,this.lazyMode=t.enabled,this.connectionState=Td({type:`state`,state:t.enabled?`idle`:`connecting`,error:null}),this.lazyMode||this.open().catch(()=>null)}async open(){var e=this;e.allowReconnect=!0,e.connectionState.get().state===`idle`&&e.connectionState.next({type:`state`,state:`connecting`,error:null});try{await e.activeConnection.open()}catch(t){return e.reconnect(new Wf({message:`Initialization error`,cause:t})),e.reconnecting}}async close(){var e=this;e.allowReconnect=!1,e.inactivityTimeout.stop();let t=[];for(let n of e.requestManager.getRequests())n.message.method===`subscription`?n.callbacks.complete():n.state===`outgoing`?n.callbacks.error(vf.from(new Wf({message:`Closed before connection was established`}))):t.push(n.end);await Promise.all(t).catch(()=>null),await e.activeConnection.close().catch(()=>null),e.connectionState.next({type:`state`,state:`idle`,error:null})}request({op:{id:e,type:t,path:n,input:r,signal:i},transformer:a,lastEventId:o}){return xd(s=>{let c=this.batchSend({id:e,method:t,params:{input:a.input.serialize(r),path:n,lastEventId:o}},(0,rp.default)((0,rp.default)({},s),{},{next(e){let t=lf(e,a.output);if(!t.ok){s.error(vf.from(t.error));return}s.next({result:t.result})}}));return()=>{c(),t===`subscription`&&this.activeConnection.isOpen()&&this.send({id:e,method:`subscription.stop`}),i?.removeEventListener(`abort`,c)}})}get connection(){return tp(this.activeConnection)}reconnect(e){var t=this;if(this.connectionState.next({type:`state`,state:`connecting`,error:vf.from(e)}),this.reconnecting)return;let n=async e=>{try{await Fd(t.reconnectRetryDelay(e)),t.allowReconnect&&(await t.activeConnection.close(),await t.activeConnection.open(),t.requestManager.hasPendingRequests()&&t.send(t.requestManager.getPendingRequests().map(({message:e})=>e))),t.reconnecting=null}catch{await n(e+1)}};this.reconnecting=n(0)}setupWebSocketListeners(e){var t=this;let n=e=>{let t=this.requestManager.getPendingRequests();for(let{message:n,callbacks:r}of t)n.method!==`subscription`&&(r.error(vf.from(e??new Wf({message:`WebSocket closed`,cause:e}))),this.requestManager.delete(n.id))};e.addEventListener(`open`,()=>{Pd(async()=>{var e,n;t.lazyMode&&t.inactivityTimeout.start(),(e=(n=t.callbacks).onOpen)==null||e.call(n),t.connectionState.next({type:`state`,state:`pending`,error:null})}).catch(t=>{e.close(3e3),n(t)})}),e.addEventListener(`message`,({data:e})=>{if(this.inactivityTimeout.reset(),typeof e!=`string`||[`PING`,`PONG`].includes(e))return;let t=JSON.parse(e);if(`method`in t){this.handleIncomingRequest(t);return}this.handleResponseMessage(t)}),e.addEventListener(`close`,e=>{var t,r;n(e),(t=(r=this.callbacks).onClose)==null||t.call(r,e),(!this.lazyMode||this.requestManager.hasPendingSubscriptions())&&this.reconnect(new Wf({message:`WebSocket closed`,cause:e}))}),e.addEventListener(`error`,e=>{var t,r;n(e),(t=(r=this.callbacks).onError)==null||t.call(r,e),this.reconnect(new Wf({message:`WebSocket closed`,cause:e}))})}handleResponseMessage(e){let t=this.requestManager.getPendingRequest(e.id);if(!t)return;t.callbacks.next(e);let n=!0;`result`in e&&t.message.method===`subscription`&&(e.result.type===`data`&&(t.message.params.lastEventId=e.result.id),e.result.type!==`stopped`&&(n=!1)),n&&(t.callbacks.complete(),this.requestManager.delete(e.id))}handleIncomingRequest(e){e.method===`reconnect`&&this.reconnect(new Wf({message:`Server requested reconnect`}))}send(e){if(!this.activeConnection.isOpen())throw Error(`Active connection is not open`);let t=e instanceof Array?e:[e];this.activeConnection.ws.send(JSON.stringify(t.length===1?t[0]:t))}batchSend(e,t){var n=this;return this.inactivityTimeout.reset(),Pd(async()=>{n.activeConnection.isOpen()||await n.open(),await Fd(0),n.requestManager.hasOutgoingRequests()&&n.send(n.requestManager.flush().map(({message:e})=>e))}).catch(n=>{this.requestManager.delete(e.id),t.error(vf.from(n))}),this.requestManager.register(e,t)}};function ap(e){return new ip(e)}function op(e){let{client:t}=e,n=yf(e.transformer);return()=>({op:e})=>xd(r=>{let i=e.type===`subscription`?t.connectionState.subscribe({next(t){r.next({result:t,context:e.context})}}):null,a=t.request({op:e,transformer:n}).subscribe(r);return()=>{a.unsubscribe(),i?.unsubscribe()}})}var sp=hd(yd(),1),cp=hd(bd(),1),lp=class{constructor(e){(0,sp.default)(this,`links`,void 0),(0,sp.default)(this,`runtime`,void 0),(0,sp.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return Ed({links:this.links,op:(0,cp.default)((0,cp.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(wd())}async requestAsPromise(e){var t=this;try{return(await Cd(t.$request(e))).result.data}catch(e){throw vf.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},up=Symbol.for(`trpc_untypedClient`),dp={query:`query`,mutate:`mutation`,subscribe:`subscription`},fp=e=>dp[e];function pp(e){let t=Jd(({path:t,args:n})=>{let r=[...t],i=fp(r.pop()),a=r.join(`.`);return e[i](a,...n)});return Yd(n=>n===up?e:t[n])}function mp(e){return pp(new lp(e))}function hp(e){return e[up]}hd(bd(),1),hd(bd(),1),hd(pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),hd(bd(),1);var gp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),_p=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),vp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=_p();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),yp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=_p();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});hd(gp(),1),hd(vp(),1),hd(yp(),1),hd(bd(),1);var bp=Object.create,xp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Cp=Object.getOwnPropertyNames,wp=Object.getPrototypeOf,Tp=Object.prototype.hasOwnProperty,Ep=(e,t)=>function(){return t||(0,e[Cp(e)[0]])((t={exports:{}}).exports,t),t.exports},Dp=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Cp(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Tp.call(e,s)&&s!==n&&xp(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Sp(t,s))||r.enumerable});return e},Op=(e,t,n)=>(n=e==null?{}:bp(wp(e)),Dp(t||!e||!e.__esModule?xp(n,`default`,{value:e,enumerable:!0}):n,e)),kp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ap=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=kp().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),jp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=kp().default,r=Ap();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Mp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=jp();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Np=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Mp();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Pp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Fp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function n(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ip=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var n=Fp();function r(e,t){if(e==null)return{};var r,i,a=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Lp=Op(Np(),1),Rp=Op(Pp(),1),zp=Op(Ip(),1),Bp=[`cursor`,`direction`];function Vp(e){return{path:e.path.join(`.`)}}function Hp(e){return e.length>=3}function Up(e){return Hp(e)?{type:`prefixed`,prefix:e[0],path:e[1],args:e[2]}:{type:`unprefixed`,prefix:void 0,path:e[0],args:e[1]}}function Wp(e,t,n){let r=Up(e),i=r.args?.input;return n&&(i=(0,Lp.default)((0,Lp.default)((0,Lp.default)({},r.args?.input??{}),n.pageParam===void 0?{}:{cursor:n.pageParam}),{},{direction:n.direction})),[r.path.join(`.`),i,t?.trpc]}async function eee(e,t,n){let r=t.getQueryCache().build(t,{queryKey:n});r.setState({data:[],status:`success`});let i=[];var a=!1,o=!1,s;try{for(var c=(0,Rp.default)(e),l;a=!(l=await c.next()).done;a=!1){let e=l.value;i.push(e),r.setState({data:[...i]})}}catch(e){o=!0,s=e}finally{try{a&&c.return!=null&&await c.return()}finally{if(o)throw s}}return i}function Gp(e){let t=Pd(()=>{let{input:t,type:n}=e,r=e.path.flatMap(e=>e.split(`.`));if(!t&&n===`any`)return r.length?[r]:[];if(n===`infinite`&&Ad(t)&&(`direction`in t||`cursor`in t)){let{cursor:e,direction:n}=t;return[r,{input:(0,zp.default)(t,Bp),type:`infinite`}]}return[r,(0,Lp.default)((0,Lp.default)({},t!==void 0&&t!==br&&{input:t}),n&&n!==`any`&&{type:n})]});return e.prefix&&t.unshift([e.prefix]),t}function Kp(e){let t=[e.path.flatMap(e=>e.split(`.`))];return e.prefix&&t.unshift([e.prefix]),t}function qp(e){return jd(e)?e():e}var Jp=Op(Np());function tee(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=t===br;return Object.assign(Oi((0,Jp.default)((0,Jp.default)({},a??{}),{},{queryKey:i,queryFn:o?br:async e=>{var t;return await n(...Wp(i,(0,Jp.default)((0,Jp.default)({},a),{},{trpc:(0,Jp.default)((0,Jp.default)({},a?.trpc),!(a==null||(t=a.trpc)==null)&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),{direction:e.direction,pageParam:e.pageParam}))},initialPageParam:a?.initialCursor??t?.cursor})),{trpc:Vp({path:r})})}var Yp=Op(Np());function nee(e){let{mutate:t,path:n,opts:r,overrides:i}=e,a=qp(e.queryClient),o=Kp({path:n,prefix:r?.keyPrefix}),s=a.defaultMutationOptions(a.getMutationDefaults(o)),c=i?.onSuccess??(e=>e.originalFn());return(0,Yp.default)((0,Yp.default)({},r),{},{mutationKey:o,mutationFn:async e=>await t(...Wp([...o,{input:e}],r)),onSuccess(...e){return c({originalFn:()=>{var t,n;return(r==null||(t=r.onSuccess)==null?void 0:t.call(r,...e))??(s==null||(n=s.onSuccess)==null?void 0:n.call(s,...e))},queryClient:a,meta:r?.meta??s?.meta??{}})},trpc:Vp({path:n})})}var Xp=Op(Np());function ree(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=qp(e.queryClient),s=t===br;return Object.assign(Di((0,Xp.default)((0,Xp.default)({},a),{},{queryKey:i,queryFn:s?br:async e=>{var t;let r=(0,Xp.default)((0,Xp.default)({},a),{},{trpc:(0,Xp.default)((0,Xp.default)({},a?.trpc),!(a==null||(t=a.trpc)==null)&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),i=e.queryKey,s=await n(...Wp(i,r));return Nd(s)?eee(s,o,i):s}})),{trpc:Vp({path:r})})}var Zp=Op(Np(),1),Qp=e=>{var t;let{subscribe:n,path:r,queryKey:i,opts:a={}}=e,o=(t=Up(i))==null||(t=t.args)==null?void 0:t.input,s=`enabled`in a?!!a.enabled:o!==br;return(0,Zp.default)((0,Zp.default)({},a),{},{enabled:s,subscribe:e=>n(r.join(`.`),o??void 0,e),queryKey:i,trpc:Vp({path:r})})},$p=Op(Np(),1);function em(e){let t=e.keyPrefix,n=t=>(n,r,i)=>`router`in e?Promise.resolve(qp(e.ctx)).then(i=>ff({router:e.router,path:n,getRawInput:async()=>r,ctx:i,type:t,signal:void 0})):(e.client instanceof lp?e.client:hp(e.client))[t](n,r,i);return Jd(({args:r,path:i})=>{let a=[...i],o=a.pop(),[s,c]=r;return{"~types":void 0,pathKey:()=>Gp({path:a,type:`any`,prefix:t}),pathFilter:()=>(0,$p.default)((0,$p.default)({},s),{},{queryKey:Gp({path:a,type:`any`,prefix:t})}),queryOptions:()=>ree({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:Gp({path:a,input:s,type:`query`,prefix:t}),query:n(`query`)}),queryKey:()=>Gp({path:a,input:s,type:`query`,prefix:t}),queryFilter:()=>(0,$p.default)((0,$p.default)({},c),{},{queryKey:Gp({path:a,input:s,type:`query`,prefix:t})}),infiniteQueryOptions:()=>tee({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:Gp({path:a,input:s,type:`infinite`,prefix:t}),query:n(`query`)}),infiniteQueryKey:()=>Gp({path:a,input:s,type:`infinite`,prefix:t}),infiniteQueryFilter:()=>(0,$p.default)((0,$p.default)({},c),{},{queryKey:Gp({path:a,input:s,type:`infinite`,prefix:t})}),mutationOptions:()=>nee({opts:s,path:a,queryClient:e.queryClient,mutate:n(`mutation`),overrides:e.overrides?.mutations}),mutationKey:()=>Kp({path:a,prefix:t}),subscriptionOptions:()=>Qp({opts:c,path:a,queryKey:Gp({path:a,input:s,type:`any`,prefix:t}),subscribe:n(`subscription`)})}[o]()})}var tm=typeof window<`u`,nm=new oi({defaultOptions:{queries:{staleTime:60*1e3}}}),rm=3e3,im=null;function am(){if(!tm||Fc())return null;if(!im)try{im=ap({url:kc(),retryDelayMs:()=>rm,keepAlive:{enabled:!0,intervalMs:2e4,pongTimeoutMs:5e3},onOpen:()=>{},onClose:e=>{Fc()||console.log(`WebSocket closed:`,e)}})}catch(e){return Fc()||console.error(`Failed to create WebSocket client:`,e),null}return im}function om(){return am()}function sm(){return tm?mp({links:[Od({condition:e=>e.type===`subscription`&&!Fc(),true:(e=>{let t=am();return t?op({client:t})(e):Rf({url:jc()})(e)}),false:Rf({url:jc()})})]}):null}var cm=sm(),lm=tm?em({client:cm,queryClient:nm}):null;function um(){let[e,t]=(0,K.useState)({connected:!1,projectDir:null,dirName:null,watcherEnabled:!1,error:null,wsState:`idle`,reconnectCountdown:null}),n=(0,K.useRef)(null),r=(0,K.useRef)(null),i=(0,K.useCallback)(()=>{r.current=Date.now(),n.current&&clearInterval(n.current),t(e=>({...e,reconnectCountdown:Math.ceil(rm/1e3)})),n.current=setInterval(()=>{if(r.current===null)return;let e=Date.now()-r.current,i=Math.max(0,Math.ceil((rm-e)/1e3));t(e=>({...e,reconnectCountdown:i>0?i:null})),i<=0&&n.current&&(clearInterval(n.current),n.current=null,r.current=null)},200)},[]),a=(0,K.useCallback)(()=>{n.current&&=(clearInterval(n.current),null),r.current=null,t(e=>({...e,reconnectCountdown:null}))},[]);return(0,K.useEffect)(()=>{if(Fc())return;let e=om();if(!e)return;let n=e.connectionState.subscribe({next:e=>{t(t=>({...t,wsState:e.state})),e.state===`connecting`&&e.error?i():a()}});return()=>{n.unsubscribe(),a()}},[i,a]),(0,K.useEffect)(()=>{if(Fc()){t(e=>({...e,connected:!0,projectDir:`Static Export`,dirName:`Static Export`,watcherEnabled:!1,error:null})),document.title=`OpenSpec UI (Static)`;return}let e=cm.system.subscribe.subscribe(void 0,{onData:e=>{let n=e.projectDir,r=n.split(`/`).pop()||n;t(t=>({...t,connected:!0,projectDir:n,dirName:r,watcherEnabled:e.watcherEnabled,error:null})),document.title=`${r} - OpenSpec UI`},onError:e=>{t(t=>({...t,connected:!1,error:e.message})),document.title=`OpenSpec UI (Disconnected)`}});return()=>{e.unsubscribe()}},[]),e}function iee(){return(0,K.useCallback)(()=>{window.location.reload()},[])}function dm({children:e,maxWidth:t=300,duration:n=10,gap:r=20,className:i=``}){let[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(!1),l=(0,K.useRef)(null),u=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=()=>{if(l.current&&u.current){let e=l.current.offsetWidth,t=u.current.scrollWidth;c(t>e)}};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e]);let d=(0,K.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy path:`,e)}},[e]),f=typeof t==`number`?`${t}px`:t;return(0,q.jsxs)(`button`,{onClick:d,className:`hover:bg-muted/50 group flex cursor-pointer items-center gap-1.5 rounded transition-colors ${i}`,title:`${e}\n\nClick to copy`,children:[(0,q.jsx)(`div`,{ref:l,className:`relative overflow-hidden whitespace-nowrap`,style:{maxWidth:f},children:(0,q.jsx)(`div`,{ref:u,"data-content":e,className:`relative inline-block ${s?`animate-marquee group-hover:[animation-play-state:paused]!`:``}`,style:s?{"--marquee-duration":`${n}s`,"--marquee-gap":`${r}px`}:void 0,children:e})}),(0,q.jsx)(`span`,{className:`text-muted-foreground group-hover:text-foreground shrink-0 transition-colors`,children:a?(0,q.jsx)(Wl,{className:`h-3.5 w-3.5 text-green-500`}):(0,q.jsx)(tu,{className:`h-3.5 w-3.5`})})]})}function aee(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function oee(e){return[...e].sort(aee)}function fm(e,t=10){return oee(e).slice(0,Math.max(0,Math.trunc(t)))}var see=`project`,cee=/^[A-Za-z]:\//;function pm(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function lee(e){return e.startsWith(`/`)||cee.test(e)}function uee(e){return e.replace(/^\.?\//,``)}function mm(e){return pm(e).split(`/`).filter(Boolean)}function dee(e){let t=pm(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function hm(e){return`${see}:${uee(e)}`}function fee(e,t){let n=pm(e),r=pm(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function pee(e,t){let n=mm(e),r=mm(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function mee(e){let t=mm(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function gm(e,t){let n=pm(e),r=dee(n);return(t?.source===`package`||r)&&r?r:lee(n)?t?.projectDir&&fee(t.projectDir,n)?hm(pee(t.projectDir,n)):hm(mee(n)||mm(n).slice(-4).join(`/`)):hm(n)}var _m=Symbol.for(`yaml.alias`),vm=Symbol.for(`yaml.document`),ym=Symbol.for(`yaml.map`),bm=Symbol.for(`yaml.pair`),xm=Symbol.for(`yaml.scalar`),Sm=Symbol.for(`yaml.seq`),Cm=Symbol.for(`yaml.node.type`),wm=e=>!!e&&typeof e==`object`&&e[Cm]===_m,Tm=e=>!!e&&typeof e==`object`&&e[Cm]===vm,Em=e=>!!e&&typeof e==`object`&&e[Cm]===ym,Dm=e=>!!e&&typeof e==`object`&&e[Cm]===bm,Om=e=>!!e&&typeof e==`object`&&e[Cm]===xm,km=e=>!!e&&typeof e==`object`&&e[Cm]===Sm;function Am(e){if(e&&typeof e==`object`)switch(e[Cm]){case ym:case Sm:return!0}return!1}function jm(e){if(e&&typeof e==`object`)switch(e[Cm]){case _m:case ym:case xm:case Sm:return!0}return!1}var Mm=e=>(Om(e)||Am(e))&&!!e.anchor,Nm=Symbol(`break visit`),Pm=Symbol(`skip children`),Fm=Symbol(`remove node`);function Im(e,t){let n=Bm(t);Tm(e)?Lm(null,e.contents,n,Object.freeze([e]))===Fm&&(e.contents=null):Lm(null,e,n,Object.freeze([]))}Im.BREAK=Nm,Im.SKIP=Pm,Im.REMOVE=Fm;function Lm(e,t,n,r){let i=Vm(e,t,n,r);if(jm(i)||Dm(i))return Hm(e,r,i),Lm(e,i,n,r);if(typeof i!=`symbol`){if(Am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Lm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Nm)return Nm;else i===Fm&&(t.items.splice(e,1),--e)}}else if(Dm(t)){r=Object.freeze(r.concat(t));let e=Lm(`key`,t.key,n,r);if(e===Nm)return Nm;e===Fm&&(t.key=null);let i=Lm(`value`,t.value,n,r);if(i===Nm)return Nm;i===Fm&&(t.value=null)}}return i}async function Rm(e,t){let n=Bm(t);Tm(e)?await zm(null,e.contents,n,Object.freeze([e]))===Fm&&(e.contents=null):await zm(null,e,n,Object.freeze([]))}Rm.BREAK=Nm,Rm.SKIP=Pm,Rm.REMOVE=Fm;async function zm(e,t,n,r){let i=await Vm(e,t,n,r);if(jm(i)||Dm(i))return Hm(e,r,i),zm(e,i,n,r);if(typeof i!=`symbol`){if(Am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await zm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Nm)return Nm;else i===Fm&&(t.items.splice(e,1),--e)}}else if(Dm(t)){r=Object.freeze(r.concat(t));let e=await zm(`key`,t.key,n,r);if(e===Nm)return Nm;e===Fm&&(t.key=null);let i=await zm(`value`,t.value,n,r);if(i===Nm)return Nm;i===Fm&&(t.value=null)}}return i}function Bm(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Vm(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Em(t))return n.Map?.(e,t,r);if(km(t))return n.Seq?.(e,t,r);if(Dm(t))return n.Pair?.(e,t,r);if(Om(t))return n.Scalar?.(e,t,r);if(wm(t))return n.Alias?.(e,t,r)}function Hm(e,t,n){let r=t[t.length-1];if(Am(r))r.items[e]=n;else if(Dm(r))e===`key`?r.key=n:r.value=n;else if(Tm(r))r.contents=n;else{let e=wm(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var hee={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},gee=e=>e.replace(/[!,[\]{}]/g,e=>hee[e]),Um=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+gee(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&jm(e.contents)){let t={};Im(e.contents,(e,n)=>{jm(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
10
+ `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Id(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||It(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&It(e,``+r);break;case`className`:bt(e,`class`,r);break;case`tabIndex`:bt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:bt(e,n,r);break;case`style`:zt(e,r,o);break;case`data`:if(t!==`object`){bt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Id(e,t,`name`,a.name,a,null),Id(e,t,`formEncType`,a.formEncType,a,null),Id(e,t,`formMethod`,a.formMethod,a,null),Id(e,t,`formTarget`,a.formTarget,a,null)):(Id(e,t,`encType`,a.encType,a,null),Id(e,t,`method`,a.method,a,null),Id(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Ht(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Ht(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Sd(`beforetoggle`,e),Sd(`toggle`,e),yt(e,`popover`,r);break;case`xlinkActuate`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:xt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:xt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:yt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Bt.get(n)||n,yt(e,n,r))}}function Ld(e,t,n,r,a,o){switch(n){case`style`:zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?It(e,r):(typeof r==`number`||typeof r==`bigint`)&&It(e,``+r);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ut);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ft.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[Qe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):yt(e,n,r)}}}function Rd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Sd(`error`,e),Sd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,o,s,n,null)}}a&&Id(e,t,`srcSet`,n.srcSet,n,null),r&&Id(e,t,`src`,n.src,n,null);return;case`input`:Sd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Id(e,t,r,d,n,null)}}jt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Sd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Id(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Nt(e,!!r,n,!0):Nt(e,!!r,t,!1);return;case`textarea`:for(s in Sd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Id(e,t,s,c,n,null)}Ft(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Id(e,t,l,r,n,null)}return;case`dialog`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Sd(`cancel`,e),Sd(`close`,e);break;case`iframe`:case`object`:Sd(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)Sd(yd[r],e);break;case`image`:Sd(`error`,e),Sd(`load`,e);break;case`details`:Sd(`toggle`,e);break;case`embed`:case`source`:case`link`:Sd(`error`,e),Sd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Id(e,t,u,r,n,null)}return;default:if(G(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Id(e,t,c,r,n,null))}function zd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Id(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Id(e,t,p,m,r,f)}}At(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Id(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Id(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Nt(e,!!n,n?[]:``,!1):Nt(e,!!n,t,!0)):Nt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Id(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Id(e,t,s,a,r,o)}Pt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Id(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Id(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Id(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Id(e,t,u,p,r,m)}return;default:if(G(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Id(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Id(e,t,f,p,r,m)}function Bd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Vd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Bd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Bd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Hd=null,Ud=null;function Wd(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Kd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function qd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jd=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e===Jd?!1:(Jd=e,!0):(Jd=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,Qd=typeof Promise==`function`?Promise:void 0,$d=typeof queueMicrotask==`function`?queueMicrotask:Qd===void 0?Xd:function(e){return Qd.resolve(null).then(e).catch(ef)};function ef(e){setTimeout(function(){throw e})}function tf(e){return e===`head`}function nf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Lp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_f(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_f(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[it]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_f(e.ownerDocument.body);n=i}while(n);Lp(t)}function rf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function af(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:af(n),at(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function of(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[it])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=ff(e.nextSibling),e===null)break}return null}function sf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=ff(e.nextSibling),e===null))return null;return e}function cf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=ff(e.nextSibling),e===null))return null;return e}function lf(e){return e.data===`$?`||e.data===`$~`}function uf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function df(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function ff(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pf=null;function mf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ff(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gf(e,t,n){switch(t=Wd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _f(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);at(e)}var vf=new Map,yf=new Set;function bf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xf=P.d;P.d={f:Sf,r:Cf,D:Ef,C:Df,L:Of,m:kf,X:jf,S:Af,M:Mf};function Sf(){var e=xf.f(),t=xu();return e||t}function Cf(e){var t=st(e);t!==null&&t.tag===5&&t.type===`form`?Ss(t):xf.r(e)}var wf=typeof document>`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),yf.has(i)||(yf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function Ef(e){xf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){xf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){xf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+kt(n.imageSizes)+`"]`)):i+=`[href="`+kt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Rf(e)}vf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function kf(e,t){xf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+kt(r)+`"][href="`+kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!vf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),vf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),ut(r),n.head.appendChild(r)}}}function Af(e,t,n){xf.S(e,t,n);var r=wf;if(r&&e){var i=lt(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);ut(c),Rd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){xf.X(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=f({src:e,async:!0},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){xf.M(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=te.current)?bf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Pf(n.href),n=lt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pf(n.href);var o=lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),vf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vf.set(e,n),o||Lf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Rf(n),n=lt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pf(e){return`href="`+kt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Rd(t,`link`,n),ut(t),e.head.appendChild(t))}function Rf(e){return`[src="`+kt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+kt(n.href)+`"]`);if(r)return t.instance=r,ut(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ut(r),Rd(r,`style`,a),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,ut(o),o;r=If(n),(a=vf.get(a))&&Hf(r,a),o=(e.ownerDocument||e).createElement(`link`),ut(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(a=e.querySelector(zf(o)))?(t.instance=a,ut(a),a):(r=n,(a=vf.get(o))&&(r=f({},n),Uf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ut(a),Rd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vf(r,n.precedence,e));return t.instance}function Vf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Wf=null;function Gf(e,t,n){if(Wf===null){var r=new Map,i=Wf=new Map;i.set(n,r)}else i=Wf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[it]||a[Ze]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Kf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ut(a);return}a=t.ownerDocument||t,r=If(r),(i=vf.get(i))&&Hf(r,i),a=a.createElement(`link`),ut(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Xf===0&&(Xf=62500*Vd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ep(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Qf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var np={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function rp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Be(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Be(0),this.hiddenUpdates=Be(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ip(e,t,n,r,i,a,o,s,c,l,u,d){return e=new rp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ap(e){return e?(e=$r,e):$r}function op(e,t,n,r,i,a){i=ap(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(gu(n,e,t),La(n,e,t))}function sp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cp(e,t){sp(e,t),(e=e.alternate)&&sp(e,t)}function lp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&gu(t,e,67108864),cp(e,67108864)}}function up(e){if(e.tag===13||e.tag===31){var t=mu();t=Ke(t);var n=Xr(e,t);n!==null&&gu(n,e,t),cp(e,t)}}var dp=!0;function fp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,mp(e,t,n,r)}finally{P.p=a,N.T=i}}function pp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,mp(e,t,n,r)}finally{P.p=a,N.T=i}}function mp(e,t,n,r){if(dp){var i=hp(r);if(i===null)Dd(e,t,r,gp,n),Dp(e,r);else if(kp(i,e,t,n,r))r.stopPropagation();else if(Dp(e,r),t&4&&-1<Ep.indexOf(e)){for(;i!==null;){var a=st(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Fe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Oe(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Il&6)&&(nu=_e()+500,od(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&gu(s,a,2),xu(),cp(a,2)}if(a=hp(r),a===null&&Dd(e,t,r,gp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function hp(e){return e=Gt(e),_p(e)}var gp=null;function _p(e){if(gp=null,e=ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gp=e,null}function vp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(W()){case ve:return 2;case ye:return 8;case be:case xe:return 32;case Se:return 268435456;default:return 32}default:return 32}}var yp=!1,bp=null,xp=null,Sp=null,Cp=new Map,wp=new Map,Tp=[],Ep=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Dp(e,t){switch(e){case`focusin`:case`focusout`:bp=null;break;case`dragenter`:case`dragleave`:xp=null;break;case`mouseover`:case`mouseout`:Sp=null;break;case`pointerover`:case`pointerout`:Cp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:wp.delete(t.pointerId)}}function Op(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=st(t),t!==null&&lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kp(e,t,n,r,i){switch(t){case`focusin`:return bp=Op(bp,e,t,n,r,i),!0;case`dragenter`:return xp=Op(xp,e,t,n,r,i),!0;case`mouseover`:return Sp=Op(Sp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Cp.set(a,Op(Cp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,wp.set(a,Op(wp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ap(e){var t=ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){up(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){up(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function jp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wt=r,n.target.dispatchEvent(r),Wt=null}else return t=st(n),t!==null&&lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Mp(e,t,n){jp(e)&&n.delete(t)}function Np(){yp=!1,bp!==null&&jp(bp)&&(bp=null),xp!==null&&jp(xp)&&(xp=null),Sp!==null&&jp(Sp)&&(Sp=null),Cp.forEach(Mp),wp.forEach(Mp)}function Pp(e,n){e.blockedOn===n&&(e.blockedOn=null,yp||(yp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Np)))}var Fp=null;function Ip(e){Fp!==e&&(Fp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fp===e&&(Fp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(_p(r||n)===null)continue;break}var a=st(n);a!==null&&(e.splice(t,3),t-=3,bs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Lp(e){function t(t){return Pp(t,e)}bp!==null&&Pp(bp,e),xp!==null&&Pp(xp,e),Sp!==null&&Pp(Sp,e),Cp.forEach(t),wp.forEach(t);for(var n=0;n<Tp.length;n++){var r=Tp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Tp.length&&(n=Tp[0],n.blockedOn===null);)Ap(n),n.blockedOn===null&&Tp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Qe]||null;if(typeof a==`function`)o||Ip(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Qe]||null)s=o.formAction;else if(_p(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Ip(n)}}}function Rp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function zp(e){this._internalRoot=e}Bp.prototype.render=zp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;op(n,mu(),e,t,null,null)},Bp.prototype.unmount=zp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;op(e.current,2,null,e,null,null),xu(),t[$e]=null}};function Bp(e){this._internalRoot=e}Bp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Je();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tp.length&&t!==0&&t<Tp[n].priority;n++);Tp.splice(n,0,e),n===0&&Ap(e)}};var Vp=n.version;if(Vp!==`19.2.0`)throw Error(i(527,Vp,`19.2.0`));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:`19.2.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Up=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Up.isDisabled&&Up.supportsFiber)try{Te=Up.inject(Hp),Ee=Up}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Us,s=Ws,c=Gs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ip(e,1,!1,null,null,n,r,null,o,s,c,Rp),e[$e]=t.current,Td(e),new zp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Us,c=Ws,l=Gs,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ip(e,1,!0,t,n??null,r,o,u,s,c,l,Rp),t.context=ap(null),n=t.current,r=mu(),r=Ke(r),o=Fa(r),o.callback=null,Ia(n,o,r),n=r,t.current.lanes=n,Ve(t,n),ad(t),e[$e]=t.current,Td(e),new Bp(t)}})),qn=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Kn()})),Jn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xn=new class{#e=Yn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Zn(e){setTimeout(e,0)}var Qn=typeof window>`u`||`Deno`in globalThis;function $n(){}function er(e,t){return typeof e==`function`?e(t):e}function tr(e){return typeof e==`number`&&e>=0&&e!==1/0}function nr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function rr(e,t){return typeof e==`function`?e(t):e}function ir(e,t){return typeof e==`function`?e(t):e}function ar(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==sr(o,t.options))return!1}else if(!lr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function or(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(cr(t.options.mutationKey)!==cr(a))return!1}else if(!lr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function sr(e,t){return(t?.queryKeyHashFn||cr)(e)}function cr(e){return JSON.stringify(e,(e,t)=>mr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function lr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>lr(e[n],t[n])):!1}var ur=Object.prototype.hasOwnProperty;function dr(e,t){if(e===t)return e;let n=pr(e)&&pr(t);if(!n&&!(mr(e)&&mr(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],u=t[a];if(l===u){o[a]=l,(n?c<r:ur.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=dr(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function fr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function pr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mr(e){if(!hr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!hr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function hr(e){return Object.prototype.toString.call(e)===`[object Object]`}function gr(e){return new Promise(t=>{Xn.setTimeout(t,e)})}function _r(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:dr(e,t)}function vr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function yr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var br=Symbol();function xr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===br?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sr(e,t){return typeof e==`function`?e(...t):!!e}var Cr=new class extends Jn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Qn&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function wr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Tr=Zn;function Er(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Tr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Dr=Er(),Or=new class extends Jn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Qn&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function kr(e){return Math.min(1e3*2**e,3e4)}function Ar(e){return(e??`online`)===`online`?Or.isOnline():!0}var jr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Mr(e){let t=!1,n=0,r,i=wr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new jr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Cr.isFocused()&&(e.networkMode===`always`||Or.isOnline())&&e.canRun(),u=()=>Ar(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Qn?0:3),o=e.retryDelay??kr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),gr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Nr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),tr(this.gcTime)&&(this.#e=Xn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qn?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Xn.clearTimeout(this.#e),void 0)}},Pr=class extends Nr{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Lr(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Lr(this.options);e.data!==void 0&&(this.setState(Ir(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=_r(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then($n).catch($n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ir(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===br||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>rr(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!nr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=xr(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Mr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof jr&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof jr){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Fr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ir(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),Dr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Fr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ar(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ir(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Lr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Rr=class extends Jn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=wr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Br(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Vr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Vr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof ir(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!fr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Hr(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||rr(this.options.staleTime,this.#t)!==rr(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ir(this.options.enabled,this.#t)!==ir(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Wr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch($n)),t}#g(){this.#b();let e=rr(this.options.staleTime,this.#t);if(Qn||this.#r.isStale||!tr(e))return;let t=nr(this.#r.dataUpdatedAt,e)+1;this.#d=Xn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Qn||ir(this.options.enabled,this.#t)===!1||!tr(this.#p)||this.#p===0)&&(this.#f=Xn.setInterval(()=>{(this.options.refetchIntervalInBackground||Cr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Xn.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Xn.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Br(e,t),o=i&&Hr(e,n,t,r);(a||o)&&(l={...l,...Fr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=_r(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=_r(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ur(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ir(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=e=>{x.status===`error`?e.reject(x.error):x.data!==void 0&&e.resolve(x.data)},r=()=>{t(this.#o=x.promise=wr())},i=this.#o;switch(i.status){case`pending`:e.queryHash===n.queryHash&&t(i);break;case`fulfilled`:(x.status===`error`||x.data!==i.value)&&r();break;case`rejected`:(x.status!==`error`||x.error!==i.reason)&&r();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!fr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Dr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function zr(e,t){return ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Br(e,t){return zr(e,t)||e.state.data!==void 0&&Vr(e,t,t.refetchOnMount)}function Vr(e,t,n){if(ir(t.enabled,e)!==!1&&rr(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Ur(e,t)}return!1}function Hr(e,t,n,r){return(e!==t||ir(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ur(e,n)}function Ur(e,t){return ir(t.enabled,e)!==!1&&e.isStaleByTime(rr(t.staleTime,e))}function Wr(e,t){return!fr(e.getCurrentResult(),t)}function Gr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(t.signal.aborted?n=!0:t.signal.addEventListener(`abort`,()=>{n=!0}),t.signal)})},u=xr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?yr:vr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?qr:Kr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Kr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Kr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Jr(e,t){return t?Kr(e,t)!=null:!1}function Yr(e,t){return!t||!e.getPreviousPageParam?!1:qr(e,t)!=null}var Xr=class extends Rr{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Gr()})}getOptimisticResult(e){return e.behavior=Gr(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Jr(t,n.data),hasPreviousPage:Yr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Zr=class extends Nr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Qr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Mr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{throw await this.#n.config.onError?.(t,e,this.state.context,this,n),await this.options.onError?.(t,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,t,e,this.state.context,n),t}finally{this.#i({type:`error`,error:t})}}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),Dr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Qr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var $r=class extends Jn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Zr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ei(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Dr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>or(t,e))}findAll(e={}){return this.getAll().filter(t=>or(e,t))}notify(e){Dr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Dr.batch(()=>Promise.all(e.map(e=>e.continue().catch($n))))}};function ei(e){return e.options.scope?.id}var ti=class extends Jn{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),fr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&cr(t.mutationKey)!==cr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Qr();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Dr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type===`success`?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type===`error`&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}};function ni(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ri(e,t,n){let r=e.slice(0);return r[t]=n,r}var ii=class extends Jn{#e;#t;#n;#r;#i;#a;#o;#s;#c=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,Dr.batch(()=>{let e=this.#i,t=this.#d(this.#n);this.#c=t,t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!fr(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ni(e,n).forEach(e=>{e.destroy()}),ni(n,e).forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})),this.#p()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#d(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[r,e=>this.#u(e??r,t),()=>this.#l(r,n)]}#l(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#u(e,t){return t?((!this.#a||this.#t!==this.#s||t!==this.#o)&&(this.#o=t,this.#s=this.#t,this.#a=dr(this.#a,t(e))),this.#a):e}#d(e){let t=new Map(this.#i.map(e=>[e.options.queryHash,e])),n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash);i?n.push({defaultedQueryOptions:r,observer:i}):n.push({defaultedQueryOptions:r,observer:new Rr(this.#e,r)})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ri(this.#t,n,t),this.#p())}#p(){if(this.hasListeners()){let e=this.#a,t=this.#l(this.#t,this.#c);e!==this.#u(t,this.#r?.combine)&&Dr.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ai=class extends Jn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??sr(r,t),a=this.get(i);return a||(a=new Pr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Dr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ar(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ar(e,t)):t}notify(e){Dr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Dr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Dr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oi=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ai,this.#t=e.mutationCache||new $r,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Cr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(rr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=er(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Dr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Dr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Dr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Dr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then($n).catch($n)}invalidateQueries(e,t={}){return Dr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Dr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch($n)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then($n)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(rr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($n).catch($n)}fetchInfiniteQuery(e){return e.behavior=Gr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($n).catch($n)}ensureInfiniteQueryData(e){return e.behavior=Gr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(cr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{lr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(cr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{lr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=sr(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===br&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},si=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ci=n(((e,t)=>{t.exports=si()})),K=t(Un(),1),q=ci(),li=K.createContext(void 0),ui=e=>{let t=K.useContext(li);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},di=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,q.jsx)(li.Provider,{value:e,children:t})),fi=K.createContext(!1),pi=()=>K.useContext(fi);fi.Provider;function mi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hi=K.createContext(mi()),gi=()=>K.useContext(hi),_i=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},vi=e=>{K.useEffect(()=>{e.clearReset()},[e])},yi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Sr(n,[e.error,r])),bi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},xi=(e,t)=>e.isLoading&&e.isFetching&&!t,Si=(e,t)=>e?.suspense&&t.isPending,Ci=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wi({queries:e,...t},n){let r=ui(n),i=pi(),a=gi(),o=K.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{bi(e),_i(e,a)}),vi(a);let[s]=K.useState(()=>new ii(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;K.useSyncExternalStore(K.useCallback(e=>d?s.subscribe(Dr.batchCalls(e)):$n,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),K.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>Si(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new Rr(r,n);if(Si(n,e))return Ci(n,t,a);xi(e,i)&&Ci(n,t,a)}return[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&yi({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(p?.error)throw p.error;return l(u())}function Ti(e,t,n){let r=pi(),i=gi(),a=ui(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=r?`isRestoring`:`optimistic`,bi(o),_i(o,i),vi(i);let s=!a.getQueryCache().get(o.queryHash),[c]=K.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(K.useSyncExternalStore(K.useCallback(e=>{let t=u?c.subscribe(Dr.batchCalls(e)):$n;return c.updateResult(),t},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),K.useEffect(()=>{c.setOptions(o)},[o,c]),Si(o,l))throw Ci(o,c,i);if(yi({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw l.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,l),o.experimental_prefetchInRender&&!Qn&&xi(l,r)&&(s?Ci(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch($n).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?l:c.trackResult(l)}function Ei(e,t){return Ti(e,Rr,t)}function Di(e){return e}function Oi(e){return e}function ki(e,t){let n=ui(t),[r]=K.useState(()=>new ti(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);let i=K.useSyncExternalStore(K.useCallback(e=>r.subscribe(Dr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=K.useCallback((e,t)=>{r.mutate(e,t).catch($n)},[r]);if(i.error&&Sr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Ai(e,t){return Ti(e,Xr,t)}var ji=new WeakMap,Mi=new WeakMap,Ni={current:[]},Pi=!1,Fi=0,Ii=new Set,Li=new Map;function Ri(e){for(let t of e){if(Ni.current.includes(t))continue;Ni.current.push(t),t.recompute();let e=Mi.get(t);if(e)for(let t of e){let e=ji.get(t);e?.length&&Ri(e)}}}function zi(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Bi(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Vi(e){if(Fi>0&&!Li.has(e)&&Li.set(e,e.prevState),Ii.add(e),!(Fi>0)&&!Pi)try{for(Pi=!0;Ii.size>0;){let e=Array.from(Ii);Ii.clear();for(let t of e)t.prevState=Li.get(t)??t.prevState,zi(t);for(let t of e){let e=ji.get(t);e&&(Ni.current.push(t),Ri(e))}for(let t of e){let e=ji.get(t);if(e)for(let t of e)Bi(t)}}}finally{Pi=!1,Ni.current=[],Li.clear()}}function Hi(e){Fi++;try{e()}finally{if(Fi--,Fi===0){let e=Ii.values().next().value;e&&Vi(e)}}}function Ui(e){return typeof e==`function`}var Wi=class{constructor(e,t){this.listeners=new Set,this.subscribe=e=>{var t;this.listeners.add(e);let n=((t=this.options)?.onSubscribe)?.call(t,e,this);return()=>{this.listeners.delete(e),n?.()}},this.prevState=e,this.state=e,this.options=t}setState(e){var t,n;this.prevState=this.state,this.options?.updateFn?this.state=this.options.updateFn(this.prevState)(e):Ui(e)?this.state=e(this.prevState):this.state=e,(n=(t=this.options)?.onUpdate)==null||n.call(t),Vi(this)}},Gi=`__TSR_index`,Ki=`popstate`,qi=`beforeunload`;function Ji(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Zi(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Gi];i=Yi(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Gi];i=Yi(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Gi]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Yi(e,t){t||={};let n=Qi();return{...t,key:n,__TSR_key:n,[Gi]:e}}function Xi(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>Zi(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Qi();t.history.replaceState({[Gi]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=Zi(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Gi]-l.state[Gi],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Ji({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(qi,S,{capture:!0}),t.removeEventListener(Ki,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(qi,S,{capture:!0}),t.addEventListener(Ki,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Zi(e,t){let n=e.indexOf(`#`),r=e.indexOf(`?`),i=Qi();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):``,search:r>-1?e.slice(r,n===-1?void 0:n):``,state:t||{[Gi]:0,key:i,__TSR_key:i}}}function Qi(){return(Math.random()+1).toString(36).substring(7)}function $i(e){return e[e.length-1]}function ea(e){return typeof e==`function`}function ta(e,t){return ea(e)?e(t):e}var na=Object.prototype.hasOwnProperty;function ra(e,t){if(e===t)return e;let n=t,r=sa(e)&&sa(n);if(!r&&!(aa(e)&&aa(n)))return n;let i=r?e:ia(e);if(!i)return n;let a=r?n:ia(n);if(!a)return n;let o=i.length,s=a.length,c=r?Array(s):{},l=0;for(let t=0;t<s;t++){let i=r?t:a[t],s=e[i],u=n[i];if(s===u){c[i]=s,(r?t<o:na.call(e,i))&&l++;continue}if(s===null||u===null||typeof s!=`object`||typeof u!=`object`){c[i]=u;continue}let d=ra(s,u);c[i]=d,d===s&&l++}return o===s&&l===o?e:c}function ia(e){let t=[],n=Object.getOwnPropertyNames(e);for(let r of n){if(!Object.prototype.propertyIsEnumerable.call(e,r))return!1;t.push(r)}let r=Object.getOwnPropertySymbols(e);for(let n of r){if(!Object.prototype.propertyIsEnumerable.call(e,n))return!1;t.push(n)}return t}function aa(e){if(!oa(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!oa(n)||!n.hasOwnProperty(`isPrototypeOf`))}function oa(e){return Object.prototype.toString.call(e)===`[object Object]`}function sa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ca(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ca(e[r],t[r],n))return!1;return!0}if(aa(e)&&aa(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ca(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ca(e[o],t[o],n)))return!1;return i===a}return!1}function la(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function ua(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function da(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function fa(e,t){if(!e)return e;let n=t?RegExp(`${t.join(`|`)}`,`gi`):/%25|%5C/gi,r=0,i=``,a;for(;(a=n.exec(e))!==null;)i+=da(e.slice(r,a.index))+a[0],r=n.lastIndex;return i+da(r?e.slice(r):e)}var pa=!0,ma=`Invariant failed`;function ha(e,t){if(!e){if(pa)throw Error(ma);var n=typeof t==`function`?t():t,r=n?`${ma}: ${n}`:ma;throw Error(r)}}function ga(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var _a=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,va=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ya=/^([^{]*)\{\$\}([^}]*)$/;function ba(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.match(ya);if(o){let r=o[1].length;return n[0]=2,n[1]=t+r,n[2]=t+r+1,n[3]=t+r+2,n[4]=t+r+3,n[5]=e.length,n}let s=a.match(va);if(s){let e=s[1],r=s[2],a=s[3],o=e.length;return n[0]=3,n[1]=t+o,n[2]=t+o+3,n[3]=t+o+3+r.length,n[4]=i-a.length,n[5]=i,n}let c=a.match(_a);if(c){let e=c[1],r=c[2],a=c[3],o=e.length;return n[0]=1,n[1]=t+o,n[2]=t+o+2,n[3]=t+o+2+r.length,n[4]=i-a.length,n[5]=i,n}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function xa(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e;for(;s<o;){let e=ba(r,s,t),o,l=s,u=e[5];switch(s=u+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=wa(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=wa(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=i.dynamic?.find(e=>e.caseSensitive===d&&e.prefix===f&&e.suffix===p);if(m)o=m;else{let e=Ta(1,n.fullPath??n.from,d,f,p);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=i.optional?.find(e=>e.caseSensitive===d&&e.prefix===f&&e.suffix===p);if(m)o=m;else{let e=Ta(3,n.fullPath??n.from,d,f,p);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(l,e[1]),s=r.substring(e[4],u),d=c&&!!(t||s),f=t?d?t:t.toLowerCase():void 0,p=s?d?s:s.toLowerCase():void 0,m=Ta(2,n.fullPath??n.from,d,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if((n.path||!n.children)&&!n.isRoot){let e=r.endsWith(`/`);e||(i.notFound=n),(!i.route||!i.isIndex&&e)&&(i.route=n),i.isIndex||=e}}if(n.children)for(let r of n.children)xa(e,t,r,s,i,a,o)}function Sa(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ca(e){if(e.static)for(let t of e.static.values())Ca(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())Ca(t);if(e.dynamic?.length){e.dynamic.sort(Sa);for(let t of e.dynamic)Ca(t)}if(e.optional?.length){e.optional.sort(Sa);for(let t of e.optional)Ca(t)}if(e.wildcard?.length){e.wildcard.sort(Sa);for(let t of e.wildcard)Ca(t)}}function wa(e){return{kind:0,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Ta(e,t,n,r,i){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:i}}function Ea(e,t){let n=wa(`/`),r=new Uint16Array(6);for(let t of e)xa(!1,r,t,1,n,0);Ca(n),t.masksTree=n,t.flatCache=ga(1e3)}function Da(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Ma(e,t.masksTree);return t.flatCache.set(e,r),r}function Oa(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=wa(`/`),xa(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Ma(r,o,n)}function ka(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a=Ma(e,t.segmentTree,n);return a&&(a.branch=Pa(a.route)),t.matchCache.set(r,a),a}function Aa(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ja(e,t=!1,n){let r=wa(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return xa(t,i,e,1,r,0,e=>{if(n?.(e,s),ha(!(e.id in a),`Duplicate routes found with id: ${String(e.id)}`),a[e.id]=e,s!==0&&e.path){let t=Aa(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),Ca(r),{processedTree:{segmentTree:r,singleCache:ga(1e3),matchCache:ga(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Ma(e,t,n=!1){let r=e.split(`/`),i=Ia(e,r,t,n);if(!i)return null;let a=Na(e,r,i),o=`**`in i;return o&&(a[`**`]=i[`**`]),{route:o?i.node.notFound??i.node.route:i.node.route,params:a}}function Na(e,t,n){let r=Fa(n.node),i=null,a={};for(let o=0,s=0,c=0;s<r.length;o++,s++,c++){let l=r[s],u=t[o],d=c;if(u&&(c+=u.length),l.kind===1){i??=n.node.fullPath.split(`/`);let e=i[s],t=l.prefix?.length??0;if(e.charCodeAt(t)===123){let n=l.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=u.substring(t,u.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(u)}}else if(l.kind===3){if(n.skipped&1<<s){o--;continue}i??=n.node.fullPath.split(`/`);let e=i[s],t=l.prefix?.length??0,r=l.suffix?.length??0,c=e.substring(t+3,e.length-r-1),d=l.suffix||l.prefix?u.substring(t,u.length-r):u;d&&(a[c]=decodeURIComponent(d))}else if(l.kind===2){let t=l,n=e.substring(d+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return a}function Pa(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Fa(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ia(e,t,n,r){let i=!$i(t),a=i&&e!==`/`,o=t.length-(i?1:0),s=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}],c=null,l=null,u=null;for(;s.length;){let e=s.pop(),{node:n,index:i,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=e;r&&n.notFound&&La(l,e)&&(l=e);let g=i===o;if(g){if(n.route&&(!a||n.isIndex)&&(La(u,e)&&(u=e),p===o&&n.isIndex))return u;if(!n.optional&&!n.wildcard)continue}let _=g?void 0:t[i],v;if(n.wildcard&&La(c,e))for(let e of n.wildcard){let{prefix:n,suffix:r}=e;if(!(n&&(g||!(e.caseSensitive?_:v??=_.toLowerCase()).startsWith(n)))){if(r){if(g)continue;let n=t.slice(i).join(`/`).slice(-r.length);if((e.caseSensitive?n:n.toLowerCase())!==r)continue}c={node:e,index:i,skipped:d,depth:f,statics:p,dynamics:m,optionals:h};break}}if(n.optional){let e=d|1<<f,t=f+1;for(let r=n.optional.length-1;r>=0;r--){let a=n.optional[r];s.push({node:a,index:i,skipped:e,depth:t,statics:p,dynamics:m,optionals:h})}if(!g)for(let e=n.optional.length-1;e>=0;e--){let r=n.optional[e],{prefix:a,suffix:o}=r;if(a||o){let e=r.caseSensitive?_:v??=_.toLowerCase();if(a&&!e.startsWith(a)||o&&!e.endsWith(o))continue}s.push({node:r,index:i+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+1})}}if(!g&&n.dynamic&&_)for(let e=n.dynamic.length-1;e>=0;e--){let t=n.dynamic[e],{prefix:r,suffix:a}=t;if(r||a){let e=t.caseSensitive?_:v??=_.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:t,index:i+1,skipped:d,depth:f+1,statics:p,dynamics:m+1,optionals:h})}if(!g&&n.staticInsensitive){let e=n.staticInsensitive.get(v??=_.toLowerCase());e&&s.push({node:e,index:i+1,skipped:d,depth:f+1,statics:p+1,dynamics:m,optionals:h})}if(!g&&n.static){let e=n.static.get(_);e&&s.push({node:e,index:i+1,skipped:d,depth:f+1,statics:p+1,dynamics:m,optionals:h})}}if(u)return u;if(c)return c;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return{node:l.node,skipped:l.skipped,"**":decodeURIComponent(r)}}return null}function La(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function Ra(e){return za(e.filter(e=>e!==void 0).join(`/`))}function za(e){return e.replace(/\/{2,}/g,`/`)}function Ba(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Va(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Ha(e){return Va(Ba(e))}function Ua(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Wa(e,t,n){return Ua(e,n)===Ua(t,n)}function Ga({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&$i(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&($i(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c,l=``;for(let e=0;e<s.length;e++){e>0&&(l+=`/`);let t=s[e];if(!t)continue;c=ba(t,0,c);let n=c[0];if(n===0){l+=t;continue}let r=c[5],i=t.substring(0,c[1]),a=t.substring(c[4],r),o=t.substring(c[2],c[3]);n===1?l+=i||a?`${i}{$${o}}${a}`:`$${o}`:n===2?l+=i||a?`${i}{$}${a}`:`$`:l+=`${i}{-$${o}}${a}`}l=za(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Ka(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?encodeURI(r):Ja(r,n):r}function qa({path:e,params:t,decodeCharMap:n}){let r=!1,i={};if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:i,isMissingParams:r};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:i,isMissingParams:r};let a=e.length,o=0,s,c=``;for(;o<a;){let a=o;s=ba(e,a,s);let l=s[5];if(o=l+1,a===l)continue;let u=s[0];if(u===0){c+=`/`+e.substring(a,l);continue}if(u===2){let o=t._splat;i._splat=o,i[`*`]=o;let u=e.substring(a,s[1]),d=e.substring(s[4],l);if(!o){r=!0,(u||d)&&(c+=`/`+u+d);continue}let f=Ka(`_splat`,t,n);c+=`/`+u+f+d;continue}if(u===1){let o=e.substring(s[2],s[3]);!r&&!(o in t)&&(r=!0),i[o]=t[o];let u=e.substring(a,s[1]),d=e.substring(s[4],l),f=Ka(o,t,n)??`undefined`;c+=`/`+u+f+d;continue}if(u===3){let r=e.substring(s[2],s[3]),o=t[r];if(o==null)continue;i[r]=o;let u=e.substring(a,s[1]),d=e.substring(s[4],l),f=Ka(r,t,n)??``;c+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(c+=`/`),{usedParams:i,interpolatedPath:c||`/`,isMissingParams:r}}function Ja(e,t){let n=encodeURIComponent(e);if(t)for(let[e,r]of t)n=n.replaceAll(e,r);return n}function Ya(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Xa(e){return!!e?.isNotFound}function Za(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var Qa=`tsr-scroll-restoration-v1_3`,$a=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function eo(){let e=Za();if(!e)return null;let t=e.getItem(Qa),n=t?JSON.parse(t):{};return{state:n,set:t=>(n=ta(t,n)||n,e.setItem(Qa,JSON.stringify(n)))}}var to=eo(),no=e=>e.state.__TSR_key||e.href;function ro(e){let t=[],n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(` > `)}`.toLowerCase()}var io=!1;function ao({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:i,location:a}){let o;try{o=JSON.parse(sessionStorage.getItem(e)||`{}`)}catch(e){console.error(e);return}let s=t||window.history.state?.__TSR_key,c=o[s];io=!0;scroll:{if(r&&c&&Object.keys(c).length>0){for(let e in c){let t=c[e];if(e===`window`)window.scrollTo({top:t.scrollY,left:t.scrollX,behavior:n});else if(e){let n=document.querySelector(e);n&&(n.scrollLeft=t.scrollX,n.scrollTop=t.scrollY)}}break scroll}let e=(a??window.location).hash.split(`#`,2)[1];if(e){let t=window.history.state?.__hashScrollIntoViewOptions??!0;if(t){let n=document.getElementById(e);n&&n.scrollIntoView(t)}break scroll}let t={top:0,left:0,behavior:n};if(window.scrollTo(t),i)for(let e of i){if(e===`window`)continue;let n=typeof e==`function`?e():document.querySelector(e);n&&n.scrollTo(t)}}io=!1}function oo(e,t){if(!to&&!e.isServer||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!to))return;e.isScrollRestorationSetup=!0,io=!1;let n=e.options.getScrollRestorationKey||no;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,$a(t=>{if(io||!e.isScrollRestoring)return;let r=``;if(t.target===document||t.target===window)r=`window`;else{let e=t.target.getAttribute(`data-scroll-restoration-id`);r=e?`[data-scroll-restoration-id="${e}"]`:ro(t.target)}let i=n(e.state.location);to.set(e=>{let t=e[i]||={},n=t[r]||={};if(r===`window`)n.scrollX=window.scrollX||0,n.scrollY=window.scrollY||0;else if(r){let e=document.querySelector(r);e&&(n.scrollX=e.scrollLeft||0,n.scrollY=e.scrollTop||0)}return e})},100),!0),e.subscribe(`onRendered`,t=>{let r=n(t.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation})||(ao({storageKey:Qa,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&to.set(e=>(e[r]||={},e)))})}function so(e){if(typeof document<`u`&&document.querySelector){let t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==``){let n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function co(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function lo(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function uo(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=lo(r):Array.isArray(t)?t.push(lo(r)):n[e]=[t,lo(r)]}return n}var fo=mo(JSON.parse),po=ho(JSON.stringify,JSON.parse);function mo(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=uo(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ho(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=co(e,r);return t?`?${t}`:``}}var go=`__root__`;function _o(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function vo(e){return e instanceof Response&&!!e.options}var yo=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},bo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(e=>e.id===t)),xo=(e,t)=>{let n=e.router.routesById[t.routeId??``]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),ha(n.options.notFoundComponent,`No notFoundComponent found. Please set a notFoundComponent on your route or provide a defaultNotFoundComponent to the router.`);let r=e.matches.find(e=>e.routeId===n.id);ha(r,`Could not find match for route: `+n.id),e.updateMatch(r.id,e=>({...e,status:`notFound`,error:t,isFetching:!1})),t.routerCode===`BEFORE_LOAD`&&n.parentRoute&&(t.routeId=n.parentRoute.id,xo(e,t))},So=(e,t,n)=>{if(!(!vo(n)&&!Xa(n))){if(vo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;let r=vo(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,e=>({...e,status:r,isFetching:!1,error:n})),Xa(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw vo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(xo(e,n),n)}},Co=(e,t)=>{let n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},wo=(e,t,n,r)=>{let{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,So(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,So(e,e.router.getMatch(i),n)}e.updateMatch(i,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},To=(e,t,n,r)=>{let i=e.router.getMatch(t),a=e.matches[n-1]?.id,o=a?e.router.getMatch(a):void 0;if(e.router.isShell()){i.ssr=r.id===go;return}if(o?.ssr===!1){i.ssr=!1;return}let s=e=>e===!0&&o?.ssr===`data-only`?`data-only`:e,c=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){i.ssr=s(c);return}if(typeof r.options.ssr!=`function`){i.ssr=s(r.options.ssr);return}let{search:l,params:u}=i,d={search:Io(l,i.searchError),params:Io(u,i.paramsError),location:e.location,matches:e.matches.map(e=>({index:e.index,pathname:e.pathname,fullPath:e.fullPath,staticData:e.staticData,id:e.id,routeId:e.routeId,search:Io(e.search,e.searchError),params:Io(e.params,e.paramsError),ssr:e.ssr}))},f=r.options.ssr(d);if(ua(f))return f.then(e=>{i.ssr=s(e??c)});i.ssr=s(f??c)},Eo=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!e.router.isServer&&!bo(e,t)&&(n.options.loader||n.options.beforeLoad||Lo(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{yo(e)},i);r._nonReactive.pendingTimeout=t}},Do=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Eo(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&So(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Oo=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=la(()=>{a?.resolve()});let{paramsError:o,searchError:s}=i;o&&wo(e,n,o,`PARSE_PARAMS`),s&&wo(e,n,s,`VALIDATE_SEARCH`),Eo(e,t,r,i);let c=new AbortController,l=e.matches[n-1]?.id,u={...(l?e.router.getMatch(l):void 0)?.context??e.router.options.context??void 0,...i.__routeContext},d=!1,f=()=>{d||(d=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c,context:u})))},p=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){Hi(()=>{f(),p()});return}i._nonReactive.beforeLoadPromise=la();let{search:m,params:h,cause:g}=i,_=bo(e,t),v={search:m,abortController:c,params:h,preload:_,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?`preload`:g,matches:e.matches,...e.router.options.additionalContext},y=r=>{if(r===void 0){Hi(()=>{f(),p()});return}(vo(r)||Xa(r))&&(f(),wo(e,n,r,`BEFORE_LOAD`)),Hi(()=>{f(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r,context:{...e.context,...r}})),p()})},b;try{if(b=r.options.beforeLoad(v),ua(b))return f(),b.catch(t=>{wo(e,n,t,`BEFORE_LOAD`)}).then(y)}catch(t){f(),wo(e,n,t,`BEFORE_LOAD`)}y(b)},ko=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>{if(e.router.isServer){let r=To(e,n,t,i);if(ua(r))return r.then(s)}return s()},o=()=>Oo(e,n,t,i),s=()=>{if(Co(e,n))return;let t=Do(e,n,i);return ua(t)?t.then(o):o()};return a()},Ao=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},jo=(e,t,n,r)=>{let i=e.matchPromises[n-1],{params:a,loaderDeps:o,abortController:s,cause:c}=e.router.getMatch(t),l=e.router.options.context??{};for(let t=0;t<=n;t++){let n=e.matches[t];if(!n)continue;let r=e.router.getMatch(n.id);r&&(l={...l,...r.__routeContext??{},...r.__beforeLoadContext??{}})}let u=bo(e,t);return{params:a,deps:o,preload:!!u,parentMatchPromise:i,abortController:s,context:l,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:u?`preload`:c,route:r,...e.router.options.additionalContext}},Mo=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&Fo(r);let a=r.options.loader?.(jo(e,t,n,r)),o=r.options.loader&&ua(a);if((o||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(t,e=>({...e,isFetching:`loader`})),r.options.loader){let n=o?await a:a;So(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let s=Ao(e,t,r),c=s?await s:void 0,l=i._nonReactive.minPendingPromise;l&&await l,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,e=>({...e,error:void 0,status:`success`,isFetching:!1,updatedAt:Date.now(),...c}))}catch(n){let a=n,o=i._nonReactive.minPendingPromise;o&&await o,Xa(n)&&await r.options.notFoundComponent?.preload?.(),So(e,e.router.getMatch(t),n);try{r.options.onError?.(n)}catch(n){a=n,So(e,e.router.getMatch(t),n)}let s=Ao(e,t,r),c=s?await s:void 0;e.updateMatch(t,e=>({...e,error:a,status:`error`,isFetching:!1,...c}))}}catch(n){let i=e.router.getMatch(t);if(i){let n=Ao(e,t,r);if(n){let r=await n;e.updateMatch(t,e=>({...e,...r}))}i._nonReactive.loaderPromise=void 0}So(e,i,n)}},No=async(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=!1,a=!1,o=e.router.looseRoutesById[r];if(Co(e,n)){if(e.router.isServer){let t=Ao(e,n,o);if(t){let r=await t;e.updateMatch(n,e=>({...e,...r}))}return e.router.getMatch(n)}}else{let r=e.router.getMatch(n);if(r._nonReactive.loaderPromise){if(r.status===`success`&&!e.sync&&!r.preload)return r;await r._nonReactive.loaderPromise;let t=e.router.getMatch(n),i=t._nonReactive.error||t.error;i&&So(e,t,i)}else{let s=Date.now()-r.updatedAt,c=bo(e,n),l=c?o.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:o.options.staleTime??e.router.options.defaultStaleTime??0,u=o.options.shouldReload,d=typeof u==`function`?u(jo(e,n,t,o)):u,f=!!c&&!e.router.state.matches.some(e=>e.id===n),p=e.router.getMatch(n);p._nonReactive.loaderPromise=la(),f!==p.preload&&e.updateMatch(n,e=>({...e,preload:f}));let{status:m,invalid:h}=p;if(i=m===`success`&&(h||(d??s>l)),!(c&&o.options.preload===!1))if(i&&!e.sync)a=!0,(async()=>{try{await Mo(e,n,t,o);let r=e.router.getMatch(n);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0}catch(t){vo(t)&&await e.router.navigate(t.options)}})();else if(m!==`success`||i&&e.sync)await Mo(e,n,t,o);else{let t=Ao(e,n,o);if(t){let r=await t;e.updateMatch(n,e=>({...e,...r}))}}}}let s=e.router.getMatch(n);a||(s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loadPromise?.resolve()),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0,a||(s._nonReactive.loaderPromise=void 0),s._nonReactive.dehydrated=void 0;let c=a?s.isFetching:!1;return c!==s.isFetching||s.invalid!==!1?(e.updateMatch(n,e=>({...e,isFetching:c,invalid:!1})),e.router.getMatch(n)):s};async function Po(e){let t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(e=>e._forcePending)&&yo(t);try{for(let e=0;e<t.matches.length;e++){let n=ko(t,e);ua(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push(No(t,n));await Promise.all(t.matchPromises);let n=yo(t);ua(n)&&await n}catch(e){if(Xa(e)&&!t.preload){let n=yo(t);throw ua(n)&&await n,e}if(vo(e))throw e}return t.matches}async function Fo(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){let t=()=>{let t=[];for(let n of Ro){let r=e.options[n]?.preload;r&&t.push(r())}if(t.length)return Promise.all(t).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Io(e,t){return t?{status:`error`,error:t}:{status:`success`,value:e}}function Lo(e){for(let t of Ro)if(e.options[t]?.preload)return!0;return!1}var Ro=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function zo(e){return{input:({url:t})=>{for(let n of e)t=Vo(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Ho(e[n],t);return t}}}function Bo(e){let t=Ha(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ra([`/`,t,e.pathname]),e)}}function Vo(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Ho(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function Uo(e){let t=e.resolvedLocation,n=e.location;return{fromLocation:t,toLocation:n,pathChanged:t?.pathname!==n.pathname,hrefChanged:t?.href!==n.href,hashChanged:t?.hash!==n.hash}}var Wo=class{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn(`The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.`);let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(e=>[encodeURIComponent(e),e])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=Xi())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new Wi(qo(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),oo(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[];Ha(o)!==``&&e.push(Bo({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:zo(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a)`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let{routesById:e,routesByPath:t,processedTree:n}=ja(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});this.options.routeMasks&&Ea(this.options.routeMasks,n),this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({href:e,state:n})=>{let r=new URL(e,this.origin),i=Vo(this.rewrite,r),a=this.options.parseSearch(i.search),o=this.options.stringifySearch(a);i.search=o;let s=i.href.replace(i.origin,``),{pathname:c,hash:l}=i;return{href:s,publicHref:e,url:i.href,pathname:fa(c),searchStr:o,search:ra(t?.search,a),hash:l.split(`#`).reverse()[0]??``,state:ra(t?.state,n)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathCache=ga(1e3),this.resolvePathWithBase=(e,t)=>Ga({base:e,to:za(t),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Yo({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{let e=this.state.matches.filter(e=>e.status===`pending`),t=this.state.matches.filter(e=>e.isFetching===`loader`);new Set([...this.state.pendingMatches??[],...e,...t]).forEach(e=>{this.cancelMatch(e.id)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=$i(this.matchRoutes(n,{_buildLocation:!0}));t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=this.resolvePathWithBase(i,`.`),o=r.search,s={...r.params},c=t.to?this.resolvePathWithBase(a,`${t.to}`):this.resolvePathWithBase(a,`.`),l=t.params===!1||t.params===null?{}:(t.params??!0)===!0?s:Object.assign(s,ta(t.params,s)),u=qa({path:c,params:l}).interpolatedPath,d=this.matchRoutes(u,void 0,{_buildLocation:!0}).map(e=>this.looseRoutesById[e.routeId]);if(Object.keys(l).length>0)for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;t&&Object.assign(l,t(l))}let f=e.leaveParams?c:fa(qa({path:c,params:l,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath),p=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Jo(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=Xo({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=ra(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?ta(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?ta(t.state,n.state):{};_=ra(n.state,_);let v=`${f}${m}${g}`,y=new URL(v,this.origin),b=Ho(this.rewrite,y);return{publicHref:b.pathname+b.search+b.hash,href:v,url:b.href,pathname:f,search:p,searchStr:m,state:_,hash:h??``,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n={};if(this.options.routeMasks){let o=Da(i.pathname,this.processedTree);if(o){Object.assign(n,o.params);let{from:i,...s}=o.route;r={from:e.from,...s,params:n},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=({viewTransition:e,ignoreBlocker:t,...n})=>{let r=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=ca(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=Va(this.latestLocation.href)===Va(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=la(()=>{a?.resolve()}),i&&r())this.load();else{let{maskedLocation:r,hashScrollIntoView:i,...a}=n;r&&(a={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=i??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,this.history[n.replace?`replace`:`push`](a.publicHref,a.state,{ignoreBlocker:t})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=Zi(a,{__TSR_index:e?t:t+1});o.to=n.pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,...r})=>{if(!t&&n)try{new URL(`${n}`),t=!0}catch{}if(t){if(n||=this.buildLocation({to:e,...r}).url,!r.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return r.replace?window.location.replace(n):window.location.href=n,Promise.resolve()}return this.buildAndCommitLocation({...r,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){let e=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),t=e=>{try{return encodeURI(decodeURI(e))}catch{return e}};if(Ha(t(this.latestLocation.href))!==Ha(t(e.href))){let t=e.url;throw this.origin&&t.startsWith(this.origin)&&(t=t.replace(this.origin,``)||`/`),_o({href:t})}}let e=this.matchRoutes(this.latestLocation);this.__store.setState(t=>({...t,status:`pending`,statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:e,cachedMatches:t.cachedMatches.filter(t=>!e.some(e=>e.id===t.id))}))},this.load=async e=>{let t,n,r;for(r=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();let t=this.latestLocation,n=this.state.resolvedLocation;this.state.redirect||this.emit({type:`onBeforeNavigate`,...Uo({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...Uo({resolvedLocation:n,location:t})}),await Po({router:this,sync:e?.sync,matches:this.state.pendingMatches,location:t,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=[],t=[],n=[];Hi(()=>{this.__store.setState(r=>{let i=r.matches,a=r.pendingMatches||r.matches;return e=i.filter(e=>!a.some(t=>t.id===e.id)),t=a.filter(e=>!i.some(t=>t.id===e.id)),n=a.filter(e=>i.some(t=>t.id===e.id)),{...r,isLoading:!1,loadedAt:Date.now(),matches:a,pendingMatches:void 0,cachedMatches:[...r.cachedMatches,...e.filter(e=>e.status!==`error`&&e.status!==`notFound`)]}}),this.clearExpiredCache()}),[[e,`onLeave`],[t,`onEnter`],[n,`onStay`]].forEach(([e,t])=>{e.forEach(e=>{this.looseRoutesById[e.routeId].options[t]?.(e)})})})})}})}catch(e){vo(e)?(t=e,this.isServer||this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):Xa(e)&&(n=e),this.__store.setState(e=>({...e,statusCode:t?t.status:n?404:e.matches.some(e=>e.status===`error`)?500:200,redirect:t}))}this.latestLoadPromise===r&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=r,await r;this.latestLoadPromise&&r!==this.latestLoadPromise;)await this.latestLoadPromise;let i;this.hasNotFoundMatch()?i=404:this.__store.state.matches.some(e=>e.status===`error`)&&(i=500),i!==void 0&&this.__store.setState(e=>({...e,statusCode:i}))},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.state.resolvedLocation,a=typeof t.types==`function`?t.types(Uo({resolvedLocation:i,location:r})):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.state.pendingMatches?.some(t=>t.id===e)?`pendingMatches`:this.state.matches.some(t=>t.id===e)?`matches`:this.state.cachedMatches.some(t=>t.id===e)?`cachedMatches`:``;n&&this.__store.setState(r=>({...r,[n]:r[n]?.map(n=>n.id===e?t(n):n)}))})},this.getMatch=e=>{let t=t=>t.id===e;return this.state.cachedMatches.find(t)??this.state.pendingMatches?.find(t)??this.state.matches.find(t)},this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.__store.setState(e=>({...e,matches:e.matches.map(t),cachedMatches:e.cachedMatches.map(t),pendingMatches:e.pendingMatches?.map(t)})),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{if(!e.options.href){let t=this.buildLocation(e.options),n=t.url;this.origin&&n.startsWith(this.origin)&&(n=n.replace(this.origin,``)||`/`),e.options.href=t.href,e.headers.set(`Location`,n)}return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.__store.setState(e=>({...e,cachedMatches:[]})):this.__store.setState(e=>({...e,cachedMatches:e.cachedMatches.filter(e=>!t(e))}))},this.clearExpiredCache=()=>{this.clearCache({filter:e=>{let t=this.looseRoutesById[e.routeId];if(!t.options.loader)return!0;let n=(e.preload?t.options.preloadGcTime??this.options.defaultPreloadGcTime:t.options.gcTime??this.options.defaultGcTime)??300*1e3;return e.status===`error`?!0:Date.now()-e.updatedAt>=n}})},this.loadRouteChunk=Fo,this.preloadRoute=async e=>{let t=this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(e=>e.id)),i=new Set([...r,...this.state.cachedMatches.map(e=>e.id)]);Hi(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await Po({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(vo(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Xa(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.state.status!==`pending`)return!1;let i=(t?.pending===void 0?!this.state.isLoading:t.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,a=Oa(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!ca(a.params,e.params,{partial:!0})?!1:t?.includeSearch??!0?ca(i.search,r.search,{partial:!0})?a.params:!1:a.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(e=>e.status===`notFound`||e.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??po,parseSearch:e.parseSearch??fo}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:Va(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=(()=>{if(o){if(this.options.notFoundMode!==`root`)for(let e=a.length-1;e>=0;e--){let t=a[e];if(t.children)return t.id}return go}})(),c=[],l=e=>e?.id?e.context??this.options.context??void 0:this.options.context??void 0;return a.forEach((n,r)=>{let a=c[r-1],[o,u,d]=(()=>{let r=a?.search??e.search,i=a?._strictSearch??void 0;try{let e=Jo(n.options.validateSearch,{...r})??void 0;return[{...r,...e},{...i,...e},void 0]}catch(e){let n=e;if(e instanceof Go||(n=new Go(e.message,{cause:e})),t?.throwOnError)throw n;return[r,{},n]}})(),f=n.options.loaderDeps?.({search:o})??``,p=f?JSON.stringify(f):``,{interpolatedPath:m,usedParams:h}=qa({path:n.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),g=n.id+m+p,_=this.getMatch(g),v=this.state.matches.find(e=>e.routeId===n.id),y=_?._strictParams??h,b;if(!_){let e=n.options.params?.parse??n.options.parseParams;if(e)try{Object.assign(y,e(y))}catch(e){if(b=Xa(e)||vo(e)?e:new Ko(e.message,{cause:e}),t?.throwOnError)throw b}}Object.assign(i,y);let x=v?`stay`:`enter`,S;if(_)S={..._,cause:x,params:v?ra(v.params,i):i,_strictParams:y,search:ra(v?v.search:_.search,o),_strictSearch:u};else{let e=n.options.loader||n.options.beforeLoad||n.lazyFn||Lo(n)?`pending`:`success`;S={id:g,index:r,routeId:n.id,params:v?ra(v.params,i):i,_strictParams:y,pathname:m,updatedAt:Date.now(),search:v?ra(v.search,o):o,_strictSearch:u,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:b,__routeContext:void 0,_nonReactive:{loadPromise:la()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:x,loaderDeps:v?ra(v.loaderDeps,f):f,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:n.options.staticData||{},fullPath:n.fullPath}}t?.preload||(S.globalNotFound=s===n.id),S.searchError=d;let C=l(a);S.context={...C,...S.__routeContext,...S.__beforeLoadContext},c.push(S)}),c.forEach((n,r)=>{let i=this.looseRoutesById[n.routeId];if(!this.getMatch(n.id)&&t?._buildLocation!==!0){let t=c[r-1],a=l(t);if(i.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c};n.__routeContext=i.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}),c}},Go=class extends Error{},Ko=class extends Error{};function qo(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Jo(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Go(`Async validation not supported`);if(n.issues)throw new Go(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Yo({pathname:e,routesById:t,processedTree:n}){let r={},i=Va(e),a,o=ka(i,n,!0);return o&&(a=o.route,Object.assign(r,o.params)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Xo({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){let i=n.reduce((e,t)=>{let n=[];return`search`in t.options?t.options.search?.middlewares&&n.push(...t.options.search.middlewares):(t.options.preSearchFilters||t.options.postSearchFilters)&&n.push(({search:e,next:n})=>{let r=e;`preSearchFilters`in t.options&&t.options.preSearchFilters&&(r=t.options.preSearchFilters.reduce((e,t)=>t(e),e));let i=n(r);return`postSearchFilters`in t.options&&t.options.postSearchFilters?t.options.postSearchFilters.reduce((e,t)=>t(e),i):i}),r&&t.options.validateSearch&&n.push(({search:e,next:n})=>{let r=n(e);try{return{...r,...Jo(t.options.validateSearch,r)??void 0}}catch{return r}}),e.concat(n)},[])??[];i.push(({search:e})=>t.search?t.search===!0?e:ta(t.search,e):{});let a=(e,t)=>{if(e>=i.length)return t;let n=i[e];return n({search:t,next:t=>a(e+1,t)})};return a(0,e)}var Zo=`Error preloading route! ☝️`,Qo=class{constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=go:this.parentRoute||ha(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?go:t?.path;r&&r!==`/`&&(r=Ba(r));let i=t?.id||r,a=n?go:Ra([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ra([`/`,a]));let o=a===`__root__`?`/`:Ra([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=o},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}},$o=class{constructor({id:e}){this.notFound=e=>Ya({routeId:this.id,...e}),this.id=e}},es=class extends Qo{constructor(e){super(e)}};function ts(e){let t=e.errorComponent??rs;return(0,q.jsx)(ns,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?K.createElement(t,{error:n,reset:r}):e.children})}var ns=class extends K.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey===this.props.getResetKey()?this.state.error:null,reset:()=>{this.reset()}})}};function rs({error:e}){let[t,n]=K.useState(!1);return(0,q.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,q.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,q.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,q.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,q.jsx)(`div`,{children:(0,q.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,q.jsx)(`code`,{children:e.message}):null})}):null]})}function is({children:e,fallback:t=null}){return as()?(0,q.jsx)(K.Fragment,{children:e}):(0,q.jsx)(K.Fragment,{children:t})}function as(){return K.useSyncExternalStore(os,()=>!0,()=>!1)}function os(){return()=>{}}var ss=!0;function cs(e,t){if(!ss){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var ls=n((e=>{var t=Un();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),us=n(((e,t)=>{t.exports=ls()})),ds=n((e=>{var t=Un(),n=us();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),fs=n(((e,t)=>{t.exports=ds()}))();function ps(e,t=e=>e,n={}){let r=n.equal??ms;return(0,fs.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,r)}function ms(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=hs(e);if(n.length!==hs(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function hs(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var gs=K.createContext(null);function _s(){return typeof document>`u`?gs:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=gs,gs)}function vs(e){let t=K.useContext(_s());return cs(!((e?.warn??!0)&&!t),`useRouter must be used inside a <RouterProvider> component!`),t}function ys(e){let t=vs({warn:e?.router===void 0}),n=e?.router||t,r=(0,K.useRef)(void 0);return ps(n.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=ra(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var bs=K.createContext(void 0),xs=K.createContext(void 0);function Ss(e){let t=K.useContext(e.from?xs:bs);return ys({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(ha(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:`a nearest match!`}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function Cs(e){return Ss({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ws(e){let{select:t,...n}=e;return Ss({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Ts(e){return Ss({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Es(e){return Ss({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Ds=typeof window<`u`?K.useLayoutEffect:K.useEffect;function Os(e){let t=K.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ks(e,t,n={},r={}){K.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function As(e){let t=K.useRef(null);return K.useImperativeHandle(e,()=>t.current,[]),t}function js(e){let t=vs();return K.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Ms=t(Gn(),1);function Ns(e,t){let n=vs(),[r,i]=K.useState(!1),a=K.useRef(!1),o=As(t),{activeProps:s,inactiveProps:c,activeOptions:l,to:u,preload:d,preloadDelay:f,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onFocus:w,onMouseEnter:T,onMouseLeave:E,onTouchStart:D,ignoreBlocker:O,params:k,search:A,hash:j,state:M,mask:N,reloadDocument:P,unsafeRelative:F,from:I,_fromLocation:L,...R}=e,z=ys({select:e=>e.location.search,structuralSharing:!0}),B=e.from,ee=K.useMemo(()=>({...e,from:B}),[n,z,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),V=K.useMemo(()=>n.buildLocation({...ee}),[n,ee]),te=K.useMemo(()=>{if(b)return;let e=V.maskedLocation?V.maskedLocation.url:V.url,t=!1;return n.origin&&(e.startsWith(n.origin)?e=n.history.createHref(e.replace(n.origin,``))||`/`:t=!0),{href:e,external:t}},[b,V.maskedLocation,V.url,n.origin,n.history]),H=K.useMemo(()=>{if(te?.external)return te.href;try{return new URL(u),u}catch{}},[u,te]),ne=e.reloadDocument||H?!1:d??n.options.defaultPreload,re=f??n.options.defaultPreloadDelay??0,ie=ys({select:e=>{if(H)return!1;if(l?.exact){if(!Wa(e.location.pathname,V.pathname,n.basepath))return!1}else{let t=Ua(e.location.pathname,n.basepath),r=Ua(V.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(l?.includeSearch??!0)&&!ca(e.location.search,V.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?e.location.hash===V.hash:!0}}),U=K.useCallback(()=>{n.preloadRoute({...ee}).catch(e=>{console.warn(e),console.warn(Zo)})},[n,ee]);ks(o,K.useCallback(e=>{e?.isIntersecting&&U()},[U]),Bs,{disabled:!!b||ne!==`viewport`}),K.useEffect(()=>{a.current||!b&&ne===`render`&&(U(),a.current=!0)},[b,U,ne]);let ae=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Us(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Ms.flushSync)(()=>{i(!0)});let t=n.subscribe(`onResolved`,()=>{t(),i(!1)});n.navigate({...ee,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:O})}};if(H)return{...R,ref:o,href:H,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onFocus:w},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...D&&{onTouchStart:D}};let oe=e=>{b||ne&&U()},se=oe,ce=e=>{if(!(b||!ne))if(!re)U();else{let t=e.target;if(zs.has(t))return;let n=setTimeout(()=>{zs.delete(t),U()},re);zs.set(t,n)}},le=e=>{if(b||!ne||!re)return;let t=e.target,n=zs.get(t);n&&(clearTimeout(n),zs.delete(t))},ue=ie?ta(s,{})??Fs:Ps,de=ie?Ps:ta(c,{})??Ps,fe=[S,ue.className,de.className].filter(Boolean).join(` `),pe=(x||ue.style||de.style)&&{...x,...ue.style,...de.style};return{...R,...ue,...de,href:te?.href,ref:o,onClick:Vs([C,ae]),onFocus:Vs([w,oe]),onMouseEnter:Vs([T,ce]),onMouseLeave:Vs([E,le]),onTouchStart:Vs([D,se]),disabled:!!b,target:y,...pe&&{style:pe},...fe&&{className:fe},...b&&Is,...ie&&Ls,...r&&Rs}}var Ps={},Fs={className:`active`},Is={role:`link`,"aria-disabled":!0},Ls={"data-status":`active`,"aria-current":`page`},Rs={"data-transitioning":`transitioning`},zs=new WeakMap,Bs={rootMargin:`100px`},Vs=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}},Hs=K.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,ref:a,...o}=Ns(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;return n===void 0&&delete o.disabled,K.createElement(n||`a`,{...o,ref:a},s)});function Us(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ws(e){return new Gs({id:e})}var Gs=class extends $o{constructor({id:e}){super({id:e}),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Cs({...e,from:this.id,strict:!1}),this.useNavigate=()=>js({from:vs().routesById[this.id].fullPath}),this.notFound=e=>Ya({routeId:this.id,...e}),this.Link=K.forwardRef((e,t)=>{let n=vs().routesById[this.id].fullPath;return(0,q.jsx)(Hs,{ref:t,from:n,...e})})}},Ks=class extends Qo{constructor(e){super(e),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id}),this.useLoaderData=e=>Cs({...e,from:this.id}),this.useNavigate=()=>js({from:this.fullPath}),this.Link=K.forwardRef((e,t)=>(0,q.jsx)(Hs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function qs(e){return new Ks(e)}var Js=class extends es{constructor(e){super(e),this.useMatch=e=>Ss({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ws({...e,from:this.id}),this.useLoaderData=e=>Cs({...e,from:this.id}),this.useNavigate=()=>js({from:this.fullPath}),this.Link=K.forwardRef((e,t)=>(0,q.jsx)(Hs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Ys(e){return new Js(e)}function Xs(e){return typeof e==`object`?new Zs(e,{silent:!0}).createRoute(e):new Zs(e,{silent:!0}).createRoute}var Zs=class{constructor(e,t){this.path=e,this.createRoute=e=>{cs(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=qs(e);return t.isRoot=!1,t},this.silent=t?.silent}},Qs=class{constructor(e){this.useMatch=e=>Ss({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Ss({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>Es({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Ts({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>ws({...e,from:this.options.id}),this.useLoaderData=e=>Cs({...e,from:this.options.id}),this.useNavigate=()=>js({from:vs().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function $s(e){return typeof e==`object`?new Qs(e):t=>new Qs({id:e,...t})}function ec(){let e=vs(),t=K.useRef({router:e,mounted:!1}),[n,r]=K.useState(!1),{hasPendingMatches:i,isLoading:a}=ys({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=Os(a),s=a||n||i,c=Os(s),l=a||i,u=Os(l);return e.startTransition=e=>{r(!0),K.startTransition(()=>{e(),r(!1)})},K.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Va(e.latestLocation.href)!==Va(n.href)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ds(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),Ds(()=>{o&&!a&&e.emit({type:`onLoad`,...Uo(e.state)})},[o,e,a]),Ds(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Uo(e.state)})},[l,u,e]),Ds(()=>{if(c&&!s){let t=Uo(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&so(e)}},[s,c,e]),null}function tc(e){let t=ys({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,q.jsx)(ts,{getResetKey:()=>t,onCatch:(t,n)=>{if(Xa(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Xa(t))return e.fallback?.(t);throw t},children:e.children})}function nc(){return(0,q.jsx)(`p`,{children:`Not Found`})}function rc(e){return(0,q.jsx)(q.Fragment,{children:e.children})}function ic(e,t,n){return t.options.notFoundComponent?(0,q.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,q.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,q.jsx)(nc,{})}function ac({children:e}){let t=vs();return t.isServer?(0,q.jsx)(`script`,{nonce:t.options.ssr?.nonce,className:`$tsr`,dangerouslySetInnerHTML:{__html:e+`;typeof $_TSR !== "undefined" && $_TSR.c()`}}):null}function oc(){let e=vs();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return null;let t=(e.options.getScrollRestorationKey||no)(e.latestLocation),n=t===no(e.latestLocation)?void 0:t,r={storageKey:Qa,shouldScrollRestoration:!0};return n&&(r.key=n),(0,q.jsx)(ac,{children:`(${ao.toString()})(${JSON.stringify(r)})`})}var sc=K.memo(function({matchId:e}){let t=vs(),n=ys({select:t=>{let n=t.matches.find(t=>t.id===e);return ha(n,`Could not find match for matchId "${e}". Please file an issue!`),{routeId:n.routeId,ssr:n.ssr,_displayPending:n._displayPending}},structuralSharing:!0}),r=t.routesById[n.routeId],i=r.options.pendingComponent??t.options.defaultPendingComponent,a=i?(0,q.jsx)(i,{}):null,o=r.options.errorComponent??t.options.defaultErrorComponent,s=r.options.onCatch??t.options.defaultOnCatch,c=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,l=n.ssr===!1||n.ssr===`data-only`,u=(!r.isRoot||r.options.wrapInSuspense||l)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||l))?K.Suspense:rc,d=o?ts:rc,f=c?tc:rc,p=ys({select:e=>e.loadedAt}),m=ys({select:t=>{let n=t.matches.findIndex(t=>t.id===e);return t.matches[n-1]?.routeId}});return(0,q.jsxs)(r.isRoot?r.options.shellComponent??rc:rc,{children:[(0,q.jsx)(bs.Provider,{value:e,children:(0,q.jsx)(u,{fallback:a,children:(0,q.jsx)(d,{getResetKey:()=>p,errorComponent:o||rs,onCatch:(t,n)=>{if(Xa(t))throw t;cs(!1,`Error in route match: ${e}`),s?.(t,n)},children:(0,q.jsx)(f,{fallback:e=>{if(!c||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return K.createElement(c,e)},children:l||n._displayPending?(0,q.jsx)(is,{fallback:a,children:(0,q.jsx)(lc,{matchId:e})}):(0,q.jsx)(lc,{matchId:e})})})})}),m===`__root__`&&t.options.scrollRestoration?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(cc,{}),(0,q.jsx)(oc,{})]}):null]})});function cc(){let e=vs(),t=K.useRef(void 0);return(0,q.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...Uo(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var lc=K.memo(function({matchId:e}){let t=vs(),{match:n,key:r,routeId:i}=ys({select:n=>{let r=n.matches.find(t=>t.id===e),i=r.routeId,a=(t.routesById[i].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:i,loaderDeps:r.loaderDeps,params:r._strictParams,search:r._strictSearch});return{key:a?JSON.stringify(a):void 0,routeId:i,match:{id:r.id,status:r.status,error:r.error,_forcePending:r._forcePending,_displayPending:r._displayPending}}},structuralSharing:!0}),a=t.routesById[i],o=K.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,q.jsx)(e,{},r):(0,q.jsx)(uc,{})},[r,a.options.component,t.options.defaultComponent]);if(n._displayPending)throw t.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw t.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status===`pending`){let e=a.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let r=t.getMatch(n.id);if(r&&!r._nonReactive.minPendingPromise&&!t.isServer){let t=la();r._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),r._nonReactive.minPendingPromise=void 0},e)}}throw t.getMatch(n.id)?._nonReactive.loadPromise}if(n.status===`notFound`)return ha(Xa(n.error),`Expected a notFound error`),ic(t,a,n.error);if(n.status===`redirected`)throw ha(vo(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`){if(t.isServer)return(0,q.jsx)((a.options.errorComponent??t.options.defaultErrorComponent)||rs,{error:n.error,reset:void 0,info:{componentStack:``}});throw n.error}return o}),uc=K.memo(function(){let e=vs(),t=K.useContext(bs),n=ys({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=ys({select:e=>{let n=e.matches.find(e=>e.id===t);return ha(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),a=ys({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),o=e.options.defaultPendingComponent?(0,q.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return ic(e,r,void 0);if(!a)return null;let s=(0,q.jsx)(sc,{matchId:a});return n===`__root__`?(0,q.jsx)(K.Suspense,{fallback:o,children:s}):s});function dc(){let e=vs(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,q.jsx)(t,{}):null,r=(0,q.jsxs)(e.isServer||typeof document<`u`&&e.ssr?rc:K.Suspense,{fallback:n,children:[!e.isServer&&(0,q.jsx)(ec,{}),(0,q.jsx)(fc,{})]});return e.options.InnerWrap?(0,q.jsx)(e.options.InnerWrap,{children:r}):r}function fc(){let e=vs(),t=ys({select:e=>e.matches[0]?.id}),n=ys({select:e=>e.loadedAt}),r=t?(0,q.jsx)(sc,{matchId:t}):null;return(0,q.jsx)(bs.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,q.jsx)(ts,{getResetKey:()=>n,errorComponent:rs,onCatch:e=>{cs(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),cs(!1,e.message||e.toString())},children:r})})}var pc=e=>new mc(e),mc=class extends Wo{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=Xs,globalThis.createLazyFileRoute=$s):typeof window<`u`&&(window.createFileRoute=Xs,window.createLazyFileRoute=$s);function hc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,q.jsx)(_s().Provider,{value:e,children:t});return e.options.Wrap?(0,q.jsx)(e.options.Wrap,{children:r}):r}function gc({router:e,...t}){return(0,q.jsx)(hc,{router:e,...t,children:(0,q.jsx)(dc,{})})}function _c(e){return ys({select:t=>e?.select?e.select(t.location):t.location})}var vc=qn(),yc=/^\/versions\/[^/]+(?:\/|$)/;function bc(e){let t=e.trim();if(!t)return null;let n;try{n=new URL(t)}catch{return null}n.hash=``,n.search=``;let r=n.pathname.replace(/\/+$/,``);return n.pathname=r.length>0?r:`/`,n.toString().replace(/\/$/,(n.pathname,``))}function xc(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function Sc(e){return yc.test(e)}function Cc(e){let t=Sc(e.pathname);return{hosted:t,apiBaseUrl:bc(xc(e.search,`api`)??``),sessionId:t?xc(e.search,`session`):null}}function wc(e,t){let n=Cc(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Tc(){return typeof window<`u`&&window.location!==void 0}function Ec(){return Tc()?Cc(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Dc(){return Tc()?Ec().apiBaseUrl??``:``}function Oc(e){if(!Tc())return``;let t=Dc();if(t){let n=new URL(t);return`${n.protocol===`https:`?`wss:`:`ws:`}//${n.host}${e}`}return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}${e}`}function kc(){return Oc(`/trpc`)}function Ac(){return Oc(`/ws/pty`)}function jc(){let e=Dc();return e?`${e}/trpc`:`/trpc`}function Mc(){let e=Dc();return e?`${e}/api/health`:`/api/health`}var Nc=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(Nc=!0,console.log(`[static-mode] Detected static export mode (via flag)`));async function Pc(){return Nc===null&&(Nc=typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0),Nc}function Fc(){return Nc===!0}function Ic(e){Nc=e}var Lc=null;function Rc(){return Lc===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:Lc}function zc(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}var Bc=`modulepreload`,Vc=function(e){return`/`+e},Hc={},J=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Vc(t,n),t in Hc)return;Hc[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Bc,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Uc=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Wc=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],Gc=Fc()?[]:[`/git`,`/terminal`],Kc=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function qc(){return wc(`nav-layout`,window.location)}function Jc(e){return wc(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Yc=300;function Xc(e){return Uc.includes(e)}function Zc(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&Xc(e)):[]}function Qc(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:Zc(t.mainTabs),bottomTabs:Zc(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function $c(e,t){if(typeof e!=`object`||!e)return{__TSR_index:0,key:t,__TSR_key:t};let n=e,r=typeof n.key==`string`?n.key:t,i=typeof n.__TSR_key==`string`?n.__TSR_key:r,a=typeof n.__TSR_index==`number`?n.__TSR_index:0;return{...n,key:r,__TSR_key:i,__TSR_index:a}}function el(e,t){let n=new URL(e,`http://nav.local`),r=`${n.pathname}${n.search}${n.hash}`,i=Math.random().toString(36).slice(2);return{href:r,pathname:n.pathname||`/`,search:n.search,hash:n.hash,state:$c(t,i)}}function tl(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function nl(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function rl(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function il(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=tl(Rc());return t.pathname=nl(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function al(e,t){for(let n of[`api`,`session`]){let r=t.searchParams.get(n);r&&!e.searchParams.has(n)&&e.searchParams.set(n,r)}}function ol(e){for(let t of Uc)if(e===t||e.startsWith(t+`/`))return t;return null}function sl(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=ol(n.pathname);return i&&r.includes(i)?i:null}function cl(e){return Kc.some(t=>e===t||e.startsWith(t+`/`))}function ll(e,t){if(cl(t))return`pop`;let n=ol(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function ul(e){let t=new Set,n=[],r=[];for(let r of e.mainTabs)t.has(r)||(n.push(r),t.add(r));for(let n of e.bottomTabs)t.has(n)||(r.push(n),t.add(n));for(let e of Uc)t.has(e)||(Gc.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function dl(e,t){if(t.length===0)return el(`/`);let n=ol(e.pathname);return n&&!t.includes(n)?el(`/`):e}function fl(e,t){if(t.length===0)return el(`/`);if(e.pathname===`/`)return el(`/`,e.state);let n=ol(e.pathname);return!n||!t.includes(n)?el(`/`):e}function pl(e){return e.pathname===`/`?el(`/`,e.state):cl(e.pathname)?e:el(`/`)}function ml(e){let t=ul({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:dl(e.mainLocation,t.mainTabs),bottomLocation:fl(e.bottomLocation,t.bottomTabs),popLocation:pl(e.popLocation)}}function hl(e,t){let n=new URL(e.href),r=tl(Rc());n.pathname=nl(n.pathname,r);let i=n.searchParams.get(`_b`),a=n.searchParams.get(`_p`);n.searchParams.delete(`_b`),n.searchParams.delete(`_p`);let o=window.history.state,s=el(`${n.pathname}${n.search}${n.hash}`,o?.main),c=el(i??`/`,o?.bottom),l=el(a??`/`,o?.pop);if(!i&&!a){let e=ll(t,s.pathname);e===`bottom`?(c=s,s=el(`/`,o?.main)):e===`pop`&&(l=s,s=el(`/`,o?.main))}return{main:dl(s,t.mainTabs),bottom:fl(c,t.bottomTabs),pop:pl(l)}}function gl(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=tl(Rc());return n.pathname=rl(n.pathname,r),al(n,t),n.searchParams.delete(`_b`),n.searchParams.delete(`_p`),e.bottomTabs.length>0&&n.searchParams.set(`_b`,e.bottomLocation.href),e.popLocation.pathname!==`/`&&n.searchParams.set(`_p`,e.popLocation.href),`${n.pathname}${n.search}${n.hash}`}function _l(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function vl(){return{mainTabs:[...Wc],bottomTabs:[...Gc],updatedAt:0,mainLocation:el(`/dashboard`),bottomLocation:el(`/`),popLocation:el(`/`)}}function yl(){try{let e=localStorage.getItem(qc());return e?Qc(JSON.parse(e)):null}catch{return null}}function bl(e){try{let t=localStorage.getItem(e);return t?Qc(JSON.parse(t)):null}catch{return null}}function xl(e,t=qc()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function Sl(e){let t=ol(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?el(t,e.state):e}var Cl=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(sl(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=el(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||sl(e,`main`)!=null?e:{...e,mainLocation:el(e.mainTabs[0])}];function wl(e,t,n){let r=t;for(let t of Cl)r=t({prevState:e,nextState:r,event:n});return r}function Tl(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:ll(e,t.location.pathname);return{nextState:n===`main`?{...e,mainLocation:t.location}:n===`bottom`?{...e,bottomLocation:t.location}:{...e,popLocation:t.location},changed:!0,urlAction:t.action,notify:n===t.sourceArea?[]:[{area:n,type:t.action}],persist:`none`}}case`POPSTATE`:return{nextState:{...e,mainLocation:t.mainLocation,bottomLocation:t.bottomLocation,popLocation:t.popLocation},changed:!0,notify:[{area:`main`,type:`BACK`},{area:`bottom`,type:`BACK`},{area:`pop`,type:`BACK`}],persist:`none`};case`MOVE_TAB`:{let n=e.bottomTabs.includes(t.tabId)?`bottom`:`main`;if(n===t.targetArea)return{nextState:e,changed:!1,notify:[],persist:`none`};let r=e.mainTabs.filter(e=>e!==t.tabId),i=e.bottomTabs.filter(e=>e!==t.tabId),a=t.targetArea===`main`?[...r,t.tabId]:r,o=t.targetArea===`bottom`?[...i,t.tabId]:i,s=e.mainLocation,c=e.bottomLocation;return ol((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=el(`/`):c=el(`/`)),{nextState:{...e,mainTabs:a,bottomTabs:o,mainLocation:s,bottomLocation:c},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_and_remote`}}case`REORDER`:{let n=t.area===`main`?e.mainTabs:e.bottomTabs,r=new Set(n),i=t.tabIds.filter(e=>r.has(e));for(let e of n)i.includes(e)||i.push(e);return _l(n,i)?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:t.area===`main`?{...e,mainTabs:i}:{...e,bottomTabs:i},changed:!0,notify:[],persist:`local_and_remote`}}case`CLOSE_TAB`:{let n=e.bottomTabs.includes(t.tabId),r=e.mainTabs.includes(t.tabId);return!n&&!r?{nextState:e,changed:!1,notify:[],persist:`none`}:n?ol(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:ol(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return ll(e,t.location.pathname)===`bottom`?{nextState:{...e,bottomLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`bottom`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_BOTTOM`:return e.bottomLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,bottomLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return ll(e,t.location.pathname)===`pop`?{nextState:{...e,popLocation:t.location},changed:!0,urlAction:`PUSH`,notify:[{area:`pop`,type:`PUSH`}],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`};case`DEACTIVATE_POP`:return e.popLocation.pathname===`/`?{nextState:e,changed:!1,notify:[],persist:`none`}:{nextState:{...e,popLocation:el(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`APPLY_LAYOUT`:{if(t.layout.updatedAt<=e.updatedAt)return{nextState:e,changed:!1,notify:[],persist:`none`};let n=ul(t.layout);return{nextState:{...e,mainTabs:n.mainTabs,bottomTabs:n.bottomTabs,updatedAt:t.layout.updatedAt},changed:!0,urlAction:`REPLACE`,notify:[{area:`main`,type:`REPLACE`},{area:`bottom`,type:`REPLACE`}],persist:`local_only`}}}}function El(e,t,n){return n===`main`?e.mainLocation.href!==t.mainLocation.href:n===`bottom`?e.bottomLocation.href!==t.bottomLocation.href:e.popLocation.href!==t.popLocation.href}function Dl(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])El(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Ol=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=vl();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:wc(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=Fc()?null:yl();if(e!=null){let t=ul(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=hl(window.location,this.state),n=ml({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=ml(wl(n,n,{type:`BOOTSTRAP`})),this.state=n,this.normalizeUrl(),window.addEventListener(`popstate`,this.handlePopState)}setHistoryRef(e,t){e===`main`?this.mainHistory=t:e===`bottom`?this.bottomHistory=t:this.popHistory=t}getLocation(e){return e===`main`?this.state.mainLocation:e===`bottom`?this.state.bottomLocation:this.state.popLocation}push(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:el(il(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:el(il(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:el(il(t),n)});return gl(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return ll(this.state,e)}moveTab(e,t){this.dispatch({type:`MOVE_TAB`,tabId:e,targetArea:t})}reorder(e,t){this.dispatch({type:`REORDER`,area:e,tabIds:t})}closeTab(e){this.dispatch({type:`CLOSE_TAB`,tabId:e})}activateBottom(e){this.dispatch({type:`ACTIVATE_BOTTOM`,location:el(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:el(e)})}deactivatePop(){this.dispatch({type:`DEACTIVATE_POP`})}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=ol(this.state.bottomLocation.pathname);return this.snapshotCache={mainTabs:[...this.state.mainTabs],bottomTabs:[...this.state.bottomTabs],mainLocation:this.state.mainLocation,bottomLocation:this.state.bottomLocation,popLocation:this.state.popLocation,bottomActive:e!=null&&this.state.bottomTabs.includes(e),popActive:this.state.popLocation.pathname!==`/`},this.snapshotCache}async init(){if(!(this.initialized||Fc())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await J(async()=>{let{trpcClient:e}=await import(`./trpc-DhmVhQ6w.js`);return{trpcClient:e}},[]),n=Qc(await t.kv.get.query({key:this.storageKey}));n?n.updatedAt>this.state.updatedAt?this.dispatch({type:`APPLY_LAYOUT`,layout:n}):this.state.updatedAt>n.updatedAt&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{}):this.state.updatedAt>0&&t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt}}).catch(()=>{});let r=t.kv.subscribe.subscribe({key:this.storageKey},{onData:e=>{let t=Qc(e);t&&this.dispatch({type:`APPLY_LAYOUT`,layout:t})}});this.kvUnsubscribe=()=>r.unsubscribe()}catch{}}}destroy(){typeof window<`u`&&window.removeEventListener(`popstate`,this.handlePopState),this.cancelPersistTimer(),this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}handlePopState=()=>{let e=hl(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Tl(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=wl(this.state,t.nextState,e);return n=ml(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=hl(window.location,this.state);this.state=ml({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Tl(this.state,e);if(!t.changed)return;let n=this.state,r=wl(n,t.nextState,e);r=ml(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),xl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(El(n,this.state,`main`)||El(n,this.state,`bottom`)||El(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=Dl(t.notify,n,this.state);this.notifyRouters(a),this.notifyListeners()}notifyRouters(e){for(let t of e)(t.area===`main`?this.mainHistory:t.area===`bottom`?this.bottomHistory:this.popHistory)?.notify({type:t.type})}notifyListeners(){this.snapshotCache=null;for(let e of this.listeners)e()}syncToUrl(e){let t=gl(this.state),n=`${window.location.pathname}${window.location.search}${window.location.hash}`;if(e===`REPLACE`&&t===n)return;let r={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};e===`PUSH`?window.history.pushState(r,``,t):window.history.replaceState(r,``,t)}normalizeUrl(){let e=gl(this.state);if(e===`${window.location.pathname}${window.location.search}${window.location.hash}`)return;let t={main:this.state.mainLocation.state,bottom:this.state.bottomLocation.state,pop:this.state.popLocation.state};window.history.replaceState(t,``,e)}cancelPersistTimer(){this.persistTimer&&=(clearTimeout(this.persistTimer),null)}persistLayout(){let e=Date.now();this.state={...this.state,updatedAt:e},xl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,J(async()=>{let{trpcClient:e}=await import(`./trpc-DhmVhQ6w.js`);return{trpcClient:e}},[]).then(({trpcClient:t})=>t.kv.set.mutate({key:this.storageKey,value:{mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e}})).catch(()=>{})},Yc)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Mc());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Jc(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=bl(e);if(t){let e=ul(t);this.state=ml({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=ml({...this.state,mainLocation:Sl(this.state.mainLocation),bottomLocation:Sl(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!Fc()&&Ol.init();function kl(e){let t=new MutationObserver(t=>{for(let n of t)n.attributeName===`class`&&e()});return t.observe(document.documentElement,{attributes:!0}),()=>t.disconnect()}function Al(){return document.documentElement.classList.contains(`dark`)}function jl(){return!1}function Ml(){return(0,K.useSyncExternalStore)(kl,Al,jl)}function Nl(){return(0,K.useSyncExternalStore)(e=>Ol.subscribe(e),()=>Ol.getSnapshot(),()=>Ol.getSnapshot())}var Pl=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Fl=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Il={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ll=(0,K.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,K.createElement)(`svg`,{ref:c,...Il,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Fl(`lucide`,i),...s},[...o.map(([e,t])=>(0,K.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Y=(e,t)=>{let n=(0,K.forwardRef)(({className:n,...r},i)=>(0,K.createElement)(Ll,{ref:i,iconNode:t,className:Fl(`lucide-${Pl(e)}`,n),...r}));return n.displayName=`${e}`,n},Rl=Y(`Archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),zl=Y(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Bl=Y(`ArrowRightLeft`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),Vl=Y(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Hl=Y(`ArrowUp`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Ul=Y(`Camera`,[[`path`,{d:`M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z`,key:`1tc9qg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Wl=Y(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Gl=Y(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Kl=Y(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ql=Y(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Jl=Y(`CircleCheckBig`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Yl=Y(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Xl=Y(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Zl=Y(`Circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ql=Y(`Clock1`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 14.5 8`,key:`12zbmj`}]]),$l=Y(`Clock3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16.5 12`,key:`1aq6pp`}]]),eu=Y(`Clock6`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 12 16.5`,key:`hb2qv6`}]]),tu=Y(`Copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),nu=Y(`Download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),ru=Y(`EllipsisVertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),iu=Y(`FileCode2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m5 12-3 3 3 3`,key:`oke12k`}],[`path`,{d:`m9 18 3-3-3-3`,key:`112psh`}]]),au=Y(`FilePlus`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M9 15h6`,key:`cctwl0`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}]]),ou=Y(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),su=Y(`FileWarning`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),cu=Y(`File`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}]]),lu=Y(`Files`,[[`path`,{d:`M20 7h-3a2 2 0 0 1-2-2V2`,key:`x099mo`}],[`path`,{d:`M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z`,key:`18t6ie`}],[`path`,{d:`M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8`,key:`1nja0z`}]]),uu=Y(`FolderClosed`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}],[`path`,{d:`M2 10h20`,key:`1ir3d8`}]]),du=Y(`FolderOpenDot`,[[`path`,{d:`m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2`,key:`1nmvlm`}],[`circle`,{cx:`14`,cy:`15`,r:`1`,key:`1gm4qj`}]]),fu=Y(`FolderOpen`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),pu=Y(`FolderPlus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),mu=Y(`FolderTree`,[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`hod4my`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`,key:`w4yl2u`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`,key:`f2jnh7`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`,key:`k8epm1`}]]),hu=Y(`Folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),gu=Y(`GitBranch`,[[`line`,{x1:`6`,x2:`6`,y1:`3`,y2:`15`,key:`17qcm7`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}],[`path`,{d:`M18 9a9 9 0 0 1-9 9`,key:`n2h4wq`}]]),_u=Y(`GitCommitHorizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),vu=Y(`Github`,[[`path`,{d:`M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4`,key:`tonef`}],[`path`,{d:`M9 18c-4.51 2-5-2-7-2`,key:`9comsn`}]]),yu=Y(`GripVertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),bu=Y(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),xu=Y(`Keyboard`,[[`path`,{d:`M10 8h.01`,key:`1r9ogq`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M14 8h.01`,key:`1primd`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`M18 8h.01`,key:`emo2bl`}],[`path`,{d:`M6 8h.01`,key:`x9i8wu`}],[`path`,{d:`M7 16h10`,key:`wp8him`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}]]),Su=Y(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Cu=Y(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),wu=Y(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Tu=Y(`ListChecks`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),Eu=Y(`ListTree`,[[`path`,{d:`M21 12h-8`,key:`1bmf0i`}],[`path`,{d:`M21 6H8`,key:`1pqkrb`}],[`path`,{d:`M21 18h-8`,key:`1tm79t`}],[`path`,{d:`M3 6v4c0 1.1.9 2 2 2h3`,key:`1ywdgy`}],[`path`,{d:`M3 10v6c0 1.1.9 2 2 2h3`,key:`2wc746`}]]),Du=Y(`List`,[[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 18h.01`,key:`1tta3j`}],[`path`,{d:`M3 6h.01`,key:`1rqtza`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 18h13`,key:`1lx6n3`}],[`path`,{d:`M8 6h13`,key:`ik3vkj`}]]),Ou=Y(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ku=Y(`Menu`,[[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}],[`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`,key:`1owob3`}],[`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`,key:`yk5zj1`}]]),Au=Y(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),ju=Y(`Monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Mu=Y(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),Nu=Y(`PanelBottomClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}],[`path`,{d:`m15 8-3 3-3-3`,key:`1oxy1z`}]]),Pu=Y(`PanelTopClose`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 16 3-3 3 3`,key:`1idcnm`}]]),Fu=Y(`Pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Iu=Y(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),Lu=Y(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ru=Y(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),zu=Y(`Rocket`,[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`,key:`m3kijz`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`,key:`1fmvmk`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`,key:`1f8sc4`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}]]),Bu=Y(`Save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Vu=Y(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Hu=Y(`Send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Uu=Y(`Settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Wu=Y(`ShieldCheck`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Gu=Y(`SlidersHorizontal`,[[`line`,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,key:`obuewd`}],[`line`,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,key:`1q6298`}],[`line`,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,key:`1iu8h1`}],[`line`,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,key:`ntss68`}],[`line`,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,key:`14d8ph`}],[`line`,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,key:`m0wm8r`}],[`line`,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,key:`14e1ph`}],[`line`,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,key:`1i6ji0`}],[`line`,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,key:`1lctlv`}]]),Ku=Y(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),qu=Y(`SquareTerminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Ju=Y(`Sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Yu=Y(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Xu=Y(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Zu=Y(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Qu=Y(`Unlink2`,[[`path`,{d:`M15 7h2a5 5 0 0 1 0 10h-2m-6 0H7A5 5 0 0 1 7 7h2`,key:`1re2ne`}]]),$u=Y(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ed=[{to:`/dashboard`,icon:Cu,label:`Dashboard`,defaultArea:`main`},{to:`/config`,icon:Gu,label:`Config`,defaultArea:`main`},{to:`/git`,icon:iu,label:`Git`,defaultArea:`bottom`},{to:`/specs`,icon:ou,label:`Specs`,defaultArea:`main`},{to:`/changes`,icon:gu,label:`Changes`,defaultArea:`main`},{to:`/archive`,icon:Rl,label:`Archive`,defaultArea:`main`},{to:`/settings`,icon:Uu,label:`Settings`,defaultArea:`main`},{to:`/terminal`,icon:Yu,label:`Terminal`,defaultArea:`bottom`}],td=ed.filter(e=>e.defaultArea===`main`&&e.to!==`/settings`),nd=ed.filter(e=>e.to!==`/settings`),rd=ed.find(e=>e.to===`/settings`),id=null;function ad({area:e,tabs:t,className:n,useLinks:r,onNavigate:i}){let[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(null),l=(0,K.useRef)(null),{bottomLocation:u}=Nl(),d=e===`bottom`?t.find(e=>u.pathname===e||u.pathname.startsWith(e+`/`))??null:null,f=(0,K.useCallback)(e=>{l.current=e,c(e)},[]),p=(0,K.useCallback)((e,t)=>{e.dataTransfer&&(id=t,e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`move`)},[]),m=(0,K.useCallback)(()=>{id=null},[]),h=(0,K.useCallback)(e=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`,o(!0)},[]),g=(0,K.useCallback)(e=>{e.currentTarget.contains(e.relatedTarget)||(o(!1),f(null))},[f]),_=(0,K.useCallback)((e,n)=>{if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,t[n]===id){f(null);return}let r=e.currentTarget.getBoundingClientRect(),i=r.top+r.height/2;f({index:n,position:e.clientY<i?`before`:`after`}),o(!0)},[t,f]),v=(0,K.useCallback)(n=>{n.preventDefault();let r=n.dataTransfer.getData(`text/plain`),i=l.current;if(o(!1),f(null),id=null,!r)return;let a=t.includes(r),s=i==null?void 0:t[i.index];if(a||Ol.moveTab(r,e),s&&s!==r){let t=[...e===`main`?Ol.mainTabs:Ol.bottomTabs].filter(e=>e!==r),n=t.indexOf(s);if(n>=0){let a=i.position===`before`?n:n+1;t.splice(a,0,r),Ol.reorder(e,t)}}},[e,t,f]),y=t.map(e=>ed.find(t=>t.to===e)).filter(Boolean),b=e===`main`||r;return(0,q.jsx)(`ul`,{className:`min-h-[2rem] space-y-1 ${a?`bg-muted/50 rounded-md`:``} ${n??``}`,onDragOver:h,onDragLeave:g,onDrop:v,children:y.map((t,n)=>{let r=e===`bottom`&&t.to===d,a=s?.index===n&&s.position===`before`,o=s?.index===n&&s.position===`after`;return(0,q.jsxs)(`li`,{draggable:!0,onDragStart:e=>p(e,t.to),onDragEnd:m,onDragOver:e=>_(e,n),className:`group relative cursor-grab`,children:[a&&(0,q.jsx)(`div`,{className:`bg-border -top-0.25 pointer-events-none absolute left-4 right-4 h-0.5 -translate-y-0.5 rounded`}),b?(0,q.jsxs)(Hs,{to:t.to,draggable:!1,onDragStart:e=>e.preventDefault(),onClick:i,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(yu,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,q.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}):(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{r?Ol.deactivateBottom():Ol.activateBottom(t.to),i?.()},className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left ${r?`bg-primary text-primary-foreground`:`hover:bg-muted`}`,children:[(0,q.jsx)(yu,{className:`-ml-2.5 -mr-1.5 h-3 w-3 shrink-0 opacity-0 group-hover:opacity-40`}),(0,q.jsx)(t.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:t.label})]}),o&&(0,q.jsx)(`div`,{className:`bg-border -bottom-0.25 pointer-events-none absolute left-4 right-4 h-0.5 translate-y-0.5 rounded`})]},t.to)})})}function od(){let e=Ml(),t=Nl(),n=Rc(),r=Fc();return(0,q.jsxs)(`nav`,{className:`desktop-sidebar border-border bg-muted/30 flex w-64 shrink-0 flex-col border-r p-4`,children:[(0,q.jsx)(`div`,{className:`mb-6`,children:(0,q.jsx)(`img`,{src:e?`${n}openspec_pixel_dark.svg`:`${n}openspec_pixel_light.svg`,alt:`OpenSpec`,className:`h-6`})}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>Ol.activatePop(`/search`),className:`hover:bg-muted border-primary mb-4 flex items-center gap-2 rounded-md border px-3 py-2 text-left`,children:[(0,q.jsx)(Vu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:`Search`})]}),r?(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col`,children:[(0,q.jsx)(`ul`,{className:`flex-1 space-y-1`,children:td.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(Hs,{to:e.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(e.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:e.label})]})},e.to))}),(0,q.jsx)(`div`,{className:`border-border space-y-1 border-t pt-4`,children:(0,q.jsxs)(Hs,{to:rd.to,className:`hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2`,children:[(0,q.jsx)(rd.icon,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`font-nav text-base tracking-[0.04em]`,children:rd.label})]})})]}):(0,q.jsxs)(`div`,{className:`flex flex-1 flex-col gap-2`,children:[(0,q.jsx)(`div`,{className:`flex-1`,children:(0,q.jsx)(ad,{area:`main`,tabs:t.mainTabs,className:`h-full`})}),(0,q.jsx)(`div`,{className:`text-muted-foreground text-[10px] font-medium uppercase tracking-wider`,children:`Bottom`}),(0,q.jsx)(`div`,{className:`border-border border-t pt-2`,children:(0,q.jsx)(ad,{area:`bottom`,tabs:t.bottomTabs})})]})]})}var sd=Object.create,cd=Object.defineProperty,ld=Object.getOwnPropertyDescriptor,ud=Object.getOwnPropertyNames,dd=Object.getPrototypeOf,fd=Object.prototype.hasOwnProperty,pd=(e,t)=>function(){return t||(0,e[ud(e)[0]])((t={exports:{}}).exports,t),t.exports},md=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ud(t),a=0,o=i.length,s;a<o;a++)s=i[a],!fd.call(e,s)&&s!==n&&cd(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=ld(t,s))||r.enumerable});return e},hd=(e,t,n)=>(n=e==null?{}:sd(dd(e)),md(t||!e||!e.__esModule?cd(n,`default`,{value:e,enumerable:!0}):n,e)),gd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),_d=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=gd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),vd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=gd().default,r=_d();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),yd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=vd();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),bd=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=yd();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function xd(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(Sd,t)}};return t}function Sd(e,t){return t(e)}function Cd(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function wd(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return xd(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function Td(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=xd(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function Ed(e){return xd(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function Dd(e){return Array.isArray(e)?e:[e]}function Od(e){return t=>{let n=Dd(e.true).map(e=>e(t)),r=Dd(e.false).map(e=>e(t));return t=>xd(i=>{let a=e.condition(t.op)?n:r;return Ed({op:t.op,links:a}).subscribe(i)})}}var kd={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};kd.BAD_GATEWAY,kd.SERVICE_UNAVAILABLE,kd.GATEWAY_TIMEOUT,kd.INTERNAL_SERVER_ERROR;function Ad(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function jd(e){return typeof e==`function`}var Md=typeof Symbol==`function`&&!!Symbol.asyncIterator;function Nd(e){return Md&&Ad(e)&&Symbol.asyncIterator in e}var Pd=e=>e();function Fd(e=0){return new Promise(t=>setTimeout(t,e))}var Id=Object.create,Ld=Object.defineProperty,Rd=Object.getOwnPropertyDescriptor,zd=Object.getOwnPropertyNames,Bd=Object.getPrototypeOf,Vd=Object.prototype.hasOwnProperty,Hd=(e,t)=>function(){return t||(0,e[zd(e)[0]])((t={exports:{}}).exports,t),t.exports},Ud=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=zd(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Vd.call(e,s)&&s!==n&&Ld(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Rd(t,s))||r.enumerable});return e},Wd=(e,t,n)=>(n=e==null?{}:Id(Bd(e)),Ud(t||!e||!e.__esModule?Ld(n,`default`,{value:e,enumerable:!0}):n,e)),Gd=()=>{},Kd=e=>{Object.freeze&&Object.freeze(e)};function qd(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(Gd,{get(r,i){if(!(typeof i!=`string`||i===`then`))return qd(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1],o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),Kd(o.args),Kd(o.path),e(o)}})),n[r]}var Jd=e=>qd(e,[],Object.create(null)),Yd=e=>new Proxy(Gd,{get(t,n){if(n!==`then`)return e(n)}}),Xd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Zd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Xd().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Qd=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Xd().default,r=Zd();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),$d=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=Qd();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),ef=Hd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=$d();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});Wd(ef(),1);var tf=Wd($d(),1),nf=class extends Error{};function rf(e){if(e instanceof Error)return e;let t=typeof e;if(!(t===`undefined`||t===`function`||e===null)){if(t!==`object`)return Error(String(e));if(Ad(e))return Object.assign(new nf,e)}}var af=class extends Error{constructor(e){let t=rf(e.cause),n=e.message??t?.message??e.code;super(n,{cause:t}),(0,tf.default)(this,`cause`,void 0),(0,tf.default)(this,`code`,void 0),this.code=e.code,this.name=`TRPCError`,this.cause??=t}},of=Wd(ef(),1);function sf(e,t){if(`error`in e){let n=t.deserialize(e.error);return{ok:!1,error:(0,of.default)((0,of.default)({},e),{},{error:n})}}return{ok:!0,result:(0,of.default)((0,of.default)({},e.result),(!e.result.type||e.result.type===`data`)&&{type:`data`,data:t.deserialize(e.result.data)})}}var cf=class extends Error{constructor(){super(`Unable to transform response from server`)}};function lf(e,t){let n;try{n=sf(e,t)}catch{throw new cf}if(!n.ok&&(!Ad(n.error.error)||typeof n.error.error.code!=`number`)||n.ok&&!Ad(n.result))throw new cf;return n}Wd(ef(),1);function uf(e){return typeof e==`function`}async function df(e,t){let{_def:n}=e,r=n.procedures[t];for(;!r;){let e=Object.keys(n.lazy).find(e=>t.startsWith(e));if(!e)return null;await n.lazy[e].load(),r=n.procedures[t]}return r}async function ff(e){let{type:t,path:n}=e,r=await df(e.router,n);if(!r||!uf(r)||r._def.type!==t&&!e.allowMethodOverride)throw new af({code:`NOT_FOUND`,message:`No "${t}"-procedure on path "${n}"`});if(r._def.type!==t&&e.allowMethodOverride&&r._def.type===`subscription`)throw new af({code:`METHOD_NOT_SUPPORTED`,message:`Method override is not supported for subscriptions`});return r(e)}var pf=hd(yd(),1),mf=hd(bd(),1);function hf(e){return e instanceof vf}function gf(e){return Ad(e)&&Ad(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function _f(e,t){return typeof e==`string`?e:Ad(e)&&typeof e.message==`string`?e.message:t}var vf=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,pf.default)(this,`cause`,void 0),(0,pf.default)(this,`shape`,void 0),(0,pf.default)(this,`data`,void 0),(0,pf.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return hf(r)?(n.meta&&(r.meta=(0,mf.default)((0,mf.default)({},r.meta),n.meta)),r):gf(r)?new e(r.error.message,(0,mf.default)((0,mf.default)({},n),{},{result:r})):new e(_f(r,`Unknown error`),(0,mf.default)((0,mf.default)({},n),{},{cause:r}))}};function yf(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var bf=e=>typeof e==`function`;function xf(e){if(e)return e;if(typeof window<`u`&&bf(window.fetch))return window.fetch;if(typeof globalThis<`u`&&bf(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var Sf=hd(bd(),1);function Cf(e){return{url:e.url.toString(),fetch:e.fetch,transformer:yf(e.transformer),methodOverride:e.methodOverride}}function wf(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var Tf={query:`GET`,mutation:`POST`,subscription:`PATCH`};function Ef(e){return`input`in e?e.transformer.input.serialize(e.input):wf(e.inputs.map(t=>e.transformer.input.serialize(t)))}var Df=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=Ef(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},Of=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=Ef(e);return t===void 0?void 0:JSON.stringify(t)},kf=e=>Nf((0,Sf.default)((0,Sf.default)({},e),{},{contentTypeHeader:`application/json`,getUrl:Df,getBody:Of})),Af=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},jf=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new Af};async function Mf(e){jf(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??Tf[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,Sf.default)((0,Sf.default)((0,Sf.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return xf(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}async function Nf(e){let t={},n=await Mf(e);t.response=n;let r=await n.json();return t.responseJSON=r,{json:r,meta:t}}hd(bd(),1);var Pf=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function Ff(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:Pf,reject:Pf},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function If(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}var Lf=hd(bd(),1);function Rf(e){let t=Cf(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return Df((0,Lf.default)((0,Lf.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=If(...n.map(e=>e.signal)),s=await kf((0,Lf.default)((0,Lf.default)({},t),{},{path:r,inputs:a,type:i,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}},signal:o}));return(Array.isArray(s.json)?s.json:n.map(()=>s.json)).map(e=>({meta:s.meta,json:e}))}}),a={query:Ff(i(`query`)),mutation:Ff(i(`mutation`))};return({op:e})=>xd(n=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let r=a[e.type].load(e),i;return r.then(e=>{i=e;let r=lf(e.json,t.transformer.output);if(!r.ok){n.error(vf.from(r.error,{meta:e.meta}));return}n.next({context:e.meta,result:r.result}),n.complete()}).catch(e=>{n.error(vf.from(e,{meta:i?.meta}))}),()=>{}})}}hd(bd(),1);var zf={enabled:!1,closeMs:0},Bf={enabled:!1,pongTimeoutMs:1e3,intervalMs:5e3},Vf=e=>e===0?0:Math.min(1e3*2**e,3e4),Hf=(e,...t)=>typeof e==`function`?e(...t):e,Uf=hd(yd(),1),Wf=class e extends Error{constructor(t){super(t.message,{cause:t.cause}),this.name=`TRPCWebSocketClosedError`,Object.setPrototypeOf(this,e.prototype)}},Gf=class{constructor(e,t){this.onTimeout=e,this.timeoutMs=t,(0,Uf.default)(this,`timeout`,void 0)}reset(){this.timeout&&=(clearTimeout(this.timeout),setTimeout(this.onTimeout,this.timeoutMs))}start(){clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs)}stop(){clearTimeout(this.timeout),this.timeout=void 0}};function Kf(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function qf(e){let t=await Hf(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function Jf(e){let t={method:`connectionParams`,data:await Hf(e)};return JSON.stringify(t)}var Yf=hd(yd(),1),Xf=class{constructor(){(0,Yf.default)(this,`outgoingRequests`,[]),(0,Yf.default)(this,`pendingRequests`,{})}register(e,t){let{promise:n,resolve:r}=Kf();return this.outgoingRequests.push({id:String(e.id),message:e,end:n,callbacks:{next:t.next,complete:()=>{t.complete(),r()},error:e=>{t.error(e),r()}}}),()=>{this.delete(e.id),t.complete(),r()}}delete(e){e!==null&&(this.outgoingRequests=this.outgoingRequests.filter(({id:t})=>t!==String(e)),delete this.pendingRequests[String(e)])}flush(){let e=this.outgoingRequests;this.outgoingRequests=[];for(let t of e)this.pendingRequests[t.id]=t;return e}getPendingRequests(){return Object.values(this.pendingRequests)}getPendingRequest(e){return e===null?null:this.pendingRequests[String(e)]}getOutgoingRequests(){return this.outgoingRequests}getRequests(){return[...this.getOutgoingRequests().map(e=>({state:`outgoing`,message:e.message,end:e.end,callbacks:e.callbacks})),...this.getPendingRequests().map(e=>({state:`pending`,message:e.message,end:e.end,callbacks:e.callbacks}))]}hasPendingRequests(){return this.getPendingRequests().length>0}hasPendingSubscriptions(){return this.getPendingRequests().some(e=>e.message.method===`subscription`)}hasOutgoingRequests(){return this.outgoingRequests.length>0}},Zf=hd(yd(),1);function Qf(e){let{promise:t,resolve:n,reject:r}=Kf();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function $f(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var ep=class e{constructor(t){if((0,Zf.default)(this,`id`,++e.connectCount),(0,Zf.default)(this,`WebSocketPonyfill`,void 0),(0,Zf.default)(this,`urlOptions`,void 0),(0,Zf.default)(this,`keepAliveOpts`,void 0),(0,Zf.default)(this,`wsObservable`,Td(null)),(0,Zf.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=qf(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&$f(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await Qf(e),t.urlOptions.connectionParams&&e.send(await Jf(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,Zf.default)(ep,`connectCount`,0);function tp(e){return e.isOpen()?{id:e.id,state:`open`,ws:e.ws}:e.isClosed()?{id:e.id,state:`closed`,ws:e.ws}:e.ws?{id:e.id,state:`connecting`,ws:e.ws}:null}var np=hd(yd(),1),rp=hd(bd(),1),ip=class{constructor(e){(0,np.default)(this,`connectionState`,void 0),(0,np.default)(this,`allowReconnect`,!1),(0,np.default)(this,`requestManager`,new Xf),(0,np.default)(this,`activeConnection`,void 0),(0,np.default)(this,`reconnectRetryDelay`,void 0),(0,np.default)(this,`inactivityTimeout`,void 0),(0,np.default)(this,`callbacks`,void 0),(0,np.default)(this,`lazyMode`,void 0),(0,np.default)(this,`reconnecting`,null),this.callbacks={onOpen:e.onOpen,onClose:e.onClose,onError:e.onError};let t=(0,rp.default)((0,rp.default)({},zf),e.lazy);this.inactivityTimeout=new Gf(()=>{if(this.requestManager.hasOutgoingRequests()||this.requestManager.hasPendingRequests()){this.inactivityTimeout.reset();return}this.close().catch(()=>null)},t.closeMs),this.activeConnection=new ep({WebSocketPonyfill:e.WebSocket,urlOptions:e,keepAlive:(0,rp.default)((0,rp.default)({},Bf),e.keepAlive)}),this.activeConnection.wsObservable.subscribe({next:e=>{e&&this.setupWebSocketListeners(e)}}),this.reconnectRetryDelay=e.retryDelayMs??Vf,this.lazyMode=t.enabled,this.connectionState=Td({type:`state`,state:t.enabled?`idle`:`connecting`,error:null}),this.lazyMode||this.open().catch(()=>null)}async open(){var e=this;e.allowReconnect=!0,e.connectionState.get().state===`idle`&&e.connectionState.next({type:`state`,state:`connecting`,error:null});try{await e.activeConnection.open()}catch(t){return e.reconnect(new Wf({message:`Initialization error`,cause:t})),e.reconnecting}}async close(){var e=this;e.allowReconnect=!1,e.inactivityTimeout.stop();let t=[];for(let n of e.requestManager.getRequests())n.message.method===`subscription`?n.callbacks.complete():n.state===`outgoing`?n.callbacks.error(vf.from(new Wf({message:`Closed before connection was established`}))):t.push(n.end);await Promise.all(t).catch(()=>null),await e.activeConnection.close().catch(()=>null),e.connectionState.next({type:`state`,state:`idle`,error:null})}request({op:{id:e,type:t,path:n,input:r,signal:i},transformer:a,lastEventId:o}){return xd(s=>{let c=this.batchSend({id:e,method:t,params:{input:a.input.serialize(r),path:n,lastEventId:o}},(0,rp.default)((0,rp.default)({},s),{},{next(e){let t=lf(e,a.output);if(!t.ok){s.error(vf.from(t.error));return}s.next({result:t.result})}}));return()=>{c(),t===`subscription`&&this.activeConnection.isOpen()&&this.send({id:e,method:`subscription.stop`}),i?.removeEventListener(`abort`,c)}})}get connection(){return tp(this.activeConnection)}reconnect(e){var t=this;if(this.connectionState.next({type:`state`,state:`connecting`,error:vf.from(e)}),this.reconnecting)return;let n=async e=>{try{await Fd(t.reconnectRetryDelay(e)),t.allowReconnect&&(await t.activeConnection.close(),await t.activeConnection.open(),t.requestManager.hasPendingRequests()&&t.send(t.requestManager.getPendingRequests().map(({message:e})=>e))),t.reconnecting=null}catch{await n(e+1)}};this.reconnecting=n(0)}setupWebSocketListeners(e){var t=this;let n=e=>{let t=this.requestManager.getPendingRequests();for(let{message:n,callbacks:r}of t)n.method!==`subscription`&&(r.error(vf.from(e??new Wf({message:`WebSocket closed`,cause:e}))),this.requestManager.delete(n.id))};e.addEventListener(`open`,()=>{Pd(async()=>{var e,n;t.lazyMode&&t.inactivityTimeout.start(),(e=(n=t.callbacks).onOpen)==null||e.call(n),t.connectionState.next({type:`state`,state:`pending`,error:null})}).catch(t=>{e.close(3e3),n(t)})}),e.addEventListener(`message`,({data:e})=>{if(this.inactivityTimeout.reset(),typeof e!=`string`||[`PING`,`PONG`].includes(e))return;let t=JSON.parse(e);if(`method`in t){this.handleIncomingRequest(t);return}this.handleResponseMessage(t)}),e.addEventListener(`close`,e=>{var t,r;n(e),(t=(r=this.callbacks).onClose)==null||t.call(r,e),(!this.lazyMode||this.requestManager.hasPendingSubscriptions())&&this.reconnect(new Wf({message:`WebSocket closed`,cause:e}))}),e.addEventListener(`error`,e=>{var t,r;n(e),(t=(r=this.callbacks).onError)==null||t.call(r,e),this.reconnect(new Wf({message:`WebSocket closed`,cause:e}))})}handleResponseMessage(e){let t=this.requestManager.getPendingRequest(e.id);if(!t)return;t.callbacks.next(e);let n=!0;`result`in e&&t.message.method===`subscription`&&(e.result.type===`data`&&(t.message.params.lastEventId=e.result.id),e.result.type!==`stopped`&&(n=!1)),n&&(t.callbacks.complete(),this.requestManager.delete(e.id))}handleIncomingRequest(e){e.method===`reconnect`&&this.reconnect(new Wf({message:`Server requested reconnect`}))}send(e){if(!this.activeConnection.isOpen())throw Error(`Active connection is not open`);let t=e instanceof Array?e:[e];this.activeConnection.ws.send(JSON.stringify(t.length===1?t[0]:t))}batchSend(e,t){var n=this;return this.inactivityTimeout.reset(),Pd(async()=>{n.activeConnection.isOpen()||await n.open(),await Fd(0),n.requestManager.hasOutgoingRequests()&&n.send(n.requestManager.flush().map(({message:e})=>e))}).catch(n=>{this.requestManager.delete(e.id),t.error(vf.from(n))}),this.requestManager.register(e,t)}};function ap(e){return new ip(e)}function op(e){let{client:t}=e,n=yf(e.transformer);return()=>({op:e})=>xd(r=>{let i=e.type===`subscription`?t.connectionState.subscribe({next(t){r.next({result:t,context:e.context})}}):null,a=t.request({op:e,transformer:n}).subscribe(r);return()=>{a.unsubscribe(),i?.unsubscribe()}})}var sp=hd(yd(),1),cp=hd(bd(),1),lp=class{constructor(e){(0,sp.default)(this,`links`,void 0),(0,sp.default)(this,`runtime`,void 0),(0,sp.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return Ed({links:this.links,op:(0,cp.default)((0,cp.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe(wd())}async requestAsPromise(e){var t=this;try{return(await Cd(t.$request(e))).result.data}catch(e){throw vf.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},up=Symbol.for(`trpc_untypedClient`),dp={query:`query`,mutate:`mutation`,subscribe:`subscription`},fp=e=>dp[e];function pp(e){let t=Jd(({path:t,args:n})=>{let r=[...t],i=fp(r.pop()),a=r.join(`.`);return e[i](a,...n)});return Yd(n=>n===up?e:t[n])}function mp(e){return pp(new lp(e))}function hp(e){return e[up]}hd(bd(),1),hd(bd(),1),hd(pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),hd(bd(),1);var gp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),_p=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),vp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=_p();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),yp=pd({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=_p();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});hd(gp(),1),hd(vp(),1),hd(yp(),1),hd(bd(),1);var bp=Object.create,xp=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,Cp=Object.getOwnPropertyNames,wp=Object.getPrototypeOf,Tp=Object.prototype.hasOwnProperty,Ep=(e,t)=>function(){return t||(0,e[Cp(e)[0]])((t={exports:{}}).exports,t),t.exports},Dp=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Cp(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Tp.call(e,s)&&s!==n&&xp(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Sp(t,s))||r.enumerable});return e},Op=(e,t,n)=>(n=e==null?{}:bp(wp(e)),Dp(t||!e||!e.__esModule?xp(n,`default`,{value:e,enumerable:!0}):n,e)),kp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ap=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=kp().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),jp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=kp().default,r=Ap();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Mp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=jp();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Np=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Mp();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Pp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Fp=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function n(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Ip=Ep({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var n=Fp();function r(e,t){if(e==null)return{};var r,i,a=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Lp=Op(Np(),1),Rp=Op(Pp(),1),zp=Op(Ip(),1),Bp=[`cursor`,`direction`];function Vp(e){return{path:e.path.join(`.`)}}function Hp(e){return e.length>=3}function Up(e){return Hp(e)?{type:`prefixed`,prefix:e[0],path:e[1],args:e[2]}:{type:`unprefixed`,prefix:void 0,path:e[0],args:e[1]}}function Wp(e,t,n){let r=Up(e),i=r.args?.input;return n&&(i=(0,Lp.default)((0,Lp.default)((0,Lp.default)({},r.args?.input??{}),n.pageParam===void 0?{}:{cursor:n.pageParam}),{},{direction:n.direction})),[r.path.join(`.`),i,t?.trpc]}async function eee(e,t,n){let r=t.getQueryCache().build(t,{queryKey:n});r.setState({data:[],status:`success`});let i=[];var a=!1,o=!1,s;try{for(var c=(0,Rp.default)(e),l;a=!(l=await c.next()).done;a=!1){let e=l.value;i.push(e),r.setState({data:[...i]})}}catch(e){o=!0,s=e}finally{try{a&&c.return!=null&&await c.return()}finally{if(o)throw s}}return i}function Gp(e){let t=Pd(()=>{let{input:t,type:n}=e,r=e.path.flatMap(e=>e.split(`.`));if(!t&&n===`any`)return r.length?[r]:[];if(n===`infinite`&&Ad(t)&&(`direction`in t||`cursor`in t)){let{cursor:e,direction:n}=t;return[r,{input:(0,zp.default)(t,Bp),type:`infinite`}]}return[r,(0,Lp.default)((0,Lp.default)({},t!==void 0&&t!==br&&{input:t}),n&&n!==`any`&&{type:n})]});return e.prefix&&t.unshift([e.prefix]),t}function Kp(e){let t=[e.path.flatMap(e=>e.split(`.`))];return e.prefix&&t.unshift([e.prefix]),t}function qp(e){return jd(e)?e():e}var Jp=Op(Np());function tee(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=t===br;return Object.assign(Oi((0,Jp.default)((0,Jp.default)({},a??{}),{},{queryKey:i,queryFn:o?br:async e=>{var t;return await n(...Wp(i,(0,Jp.default)((0,Jp.default)({},a),{},{trpc:(0,Jp.default)((0,Jp.default)({},a?.trpc),!(a==null||(t=a.trpc)==null)&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),{direction:e.direction,pageParam:e.pageParam}))},initialPageParam:a?.initialCursor??t?.cursor})),{trpc:Vp({path:r})})}var Yp=Op(Np());function nee(e){let{mutate:t,path:n,opts:r,overrides:i}=e,a=qp(e.queryClient),o=Kp({path:n,prefix:r?.keyPrefix}),s=a.defaultMutationOptions(a.getMutationDefaults(o)),c=i?.onSuccess??(e=>e.originalFn());return(0,Yp.default)((0,Yp.default)({},r),{},{mutationKey:o,mutationFn:async e=>await t(...Wp([...o,{input:e}],r)),onSuccess(...e){return c({originalFn:()=>{var t,n;return(r==null||(t=r.onSuccess)==null?void 0:t.call(r,...e))??(s==null||(n=s.onSuccess)==null?void 0:n.call(s,...e))},queryClient:a,meta:r?.meta??s?.meta??{}})},trpc:Vp({path:n})})}var Xp=Op(Np());function ree(e){let{input:t,query:n,path:r,queryKey:i,opts:a}=e,o=qp(e.queryClient),s=t===br;return Object.assign(Di((0,Xp.default)((0,Xp.default)({},a),{},{queryKey:i,queryFn:s?br:async e=>{var t;let r=(0,Xp.default)((0,Xp.default)({},a),{},{trpc:(0,Xp.default)((0,Xp.default)({},a?.trpc),!(a==null||(t=a.trpc)==null)&&t.abortOnUnmount?{signal:e.signal}:{signal:null})}),i=e.queryKey,s=await n(...Wp(i,r));return Nd(s)?eee(s,o,i):s}})),{trpc:Vp({path:r})})}var Zp=Op(Np(),1),Qp=e=>{var t;let{subscribe:n,path:r,queryKey:i,opts:a={}}=e,o=(t=Up(i))==null||(t=t.args)==null?void 0:t.input,s=`enabled`in a?!!a.enabled:o!==br;return(0,Zp.default)((0,Zp.default)({},a),{},{enabled:s,subscribe:e=>n(r.join(`.`),o??void 0,e),queryKey:i,trpc:Vp({path:r})})},$p=Op(Np(),1);function em(e){let t=e.keyPrefix,n=t=>(n,r,i)=>`router`in e?Promise.resolve(qp(e.ctx)).then(i=>ff({router:e.router,path:n,getRawInput:async()=>r,ctx:i,type:t,signal:void 0})):(e.client instanceof lp?e.client:hp(e.client))[t](n,r,i);return Jd(({args:r,path:i})=>{let a=[...i],o=a.pop(),[s,c]=r;return{"~types":void 0,pathKey:()=>Gp({path:a,type:`any`,prefix:t}),pathFilter:()=>(0,$p.default)((0,$p.default)({},s),{},{queryKey:Gp({path:a,type:`any`,prefix:t})}),queryOptions:()=>ree({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:Gp({path:a,input:s,type:`query`,prefix:t}),query:n(`query`)}),queryKey:()=>Gp({path:a,input:s,type:`query`,prefix:t}),queryFilter:()=>(0,$p.default)((0,$p.default)({},c),{},{queryKey:Gp({path:a,input:s,type:`query`,prefix:t})}),infiniteQueryOptions:()=>tee({input:s,opts:c,path:a,queryClient:e.queryClient,queryKey:Gp({path:a,input:s,type:`infinite`,prefix:t}),query:n(`query`)}),infiniteQueryKey:()=>Gp({path:a,input:s,type:`infinite`,prefix:t}),infiniteQueryFilter:()=>(0,$p.default)((0,$p.default)({},c),{},{queryKey:Gp({path:a,input:s,type:`infinite`,prefix:t})}),mutationOptions:()=>nee({opts:s,path:a,queryClient:e.queryClient,mutate:n(`mutation`),overrides:e.overrides?.mutations}),mutationKey:()=>Kp({path:a,prefix:t}),subscriptionOptions:()=>Qp({opts:c,path:a,queryKey:Gp({path:a,input:s,type:`any`,prefix:t}),subscribe:n(`subscription`)})}[o]()})}var tm=typeof window<`u`,nm=new oi({defaultOptions:{queries:{staleTime:60*1e3}}}),rm=3e3,im=null;function am(){if(!tm||Fc())return null;if(!im)try{im=ap({url:kc(),retryDelayMs:()=>rm,keepAlive:{enabled:!0,intervalMs:2e4,pongTimeoutMs:5e3},onOpen:()=>{},onClose:e=>{Fc()||console.log(`WebSocket closed:`,e)}})}catch(e){return Fc()||console.error(`Failed to create WebSocket client:`,e),null}return im}function om(){return am()}function sm(){return tm?mp({links:[Od({condition:e=>e.type===`subscription`&&!Fc(),true:(e=>{let t=am();return t?op({client:t})(e):Rf({url:jc()})(e)}),false:Rf({url:jc()})})]}):null}var cm=sm(),lm=tm?em({client:cm,queryClient:nm}):null;function um(){let[e,t]=(0,K.useState)({connected:!1,projectDir:null,dirName:null,watcherEnabled:!1,error:null,wsState:`idle`,reconnectCountdown:null}),n=(0,K.useRef)(null),r=(0,K.useRef)(null),i=(0,K.useCallback)(()=>{r.current=Date.now(),n.current&&clearInterval(n.current),t(e=>({...e,reconnectCountdown:Math.ceil(rm/1e3)})),n.current=setInterval(()=>{if(r.current===null)return;let e=Date.now()-r.current,i=Math.max(0,Math.ceil((rm-e)/1e3));t(e=>({...e,reconnectCountdown:i>0?i:null})),i<=0&&n.current&&(clearInterval(n.current),n.current=null,r.current=null)},200)},[]),a=(0,K.useCallback)(()=>{n.current&&=(clearInterval(n.current),null),r.current=null,t(e=>({...e,reconnectCountdown:null}))},[]);return(0,K.useEffect)(()=>{if(Fc())return;let e=om();if(!e)return;let n=e.connectionState.subscribe({next:e=>{t(t=>({...t,wsState:e.state})),e.state===`connecting`&&e.error?i():a()}});return()=>{n.unsubscribe(),a()}},[i,a]),(0,K.useEffect)(()=>{if(Fc()){t(e=>({...e,connected:!0,projectDir:`Static Export`,dirName:`Static Export`,watcherEnabled:!1,error:null})),document.title=`OpenSpec UI (Static)`;return}let e=cm.system.subscribe.subscribe(void 0,{onData:e=>{let n=e.projectDir,r=n.split(`/`).pop()||n;t(t=>({...t,connected:!0,projectDir:n,dirName:r,watcherEnabled:e.watcherEnabled,error:null})),document.title=`${r} - OpenSpec UI`},onError:e=>{t(t=>({...t,connected:!1,error:e.message})),document.title=`OpenSpec UI (Disconnected)`}});return()=>{e.unsubscribe()}},[]),e}function iee(){return(0,K.useCallback)(()=>{window.location.reload()},[])}function dm({children:e,maxWidth:t=300,duration:n=10,gap:r=20,className:i=``}){let[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(!1),l=(0,K.useRef)(null),u=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=()=>{if(l.current&&u.current){let e=l.current.offsetWidth,t=u.current.scrollWidth;c(t>e)}};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[e]);let d=(0,K.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(e){console.error(`Failed to copy path:`,e)}},[e]),f=typeof t==`number`?`${t}px`:t;return(0,q.jsxs)(`button`,{onClick:d,className:`hover:bg-muted/50 group flex cursor-pointer items-center gap-1.5 rounded transition-colors ${i}`,title:`${e}\n\nClick to copy`,children:[(0,q.jsx)(`div`,{ref:l,className:`relative overflow-hidden whitespace-nowrap`,style:{maxWidth:f},children:(0,q.jsx)(`div`,{ref:u,"data-content":e,className:`relative inline-block ${s?`animate-marquee group-hover:[animation-play-state:paused]!`:``}`,style:s?{"--marquee-duration":`${n}s`,"--marquee-gap":`${r}px`}:void 0,children:e})}),(0,q.jsx)(`span`,{className:`text-muted-foreground group-hover:text-foreground shrink-0 transition-colors`,children:a?(0,q.jsx)(Wl,{className:`h-3.5 w-3.5 text-green-500`}):(0,q.jsx)(tu,{className:`h-3.5 w-3.5`})})]})}function aee(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function oee(e){return[...e].sort(aee)}function fm(e,t=10){return oee(e).slice(0,Math.max(0,Math.trunc(t)))}var see=`project`,cee=/^[A-Za-z]:\//;function pm(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function lee(e){return e.startsWith(`/`)||cee.test(e)}function uee(e){return e.replace(/^\.?\//,``)}function mm(e){return pm(e).split(`/`).filter(Boolean)}function dee(e){let t=pm(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function hm(e){return`${see}:${uee(e)}`}function fee(e,t){let n=pm(e),r=pm(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function pee(e,t){let n=mm(e),r=mm(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function mee(e){let t=mm(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function gm(e,t){let n=pm(e),r=dee(n);return(t?.source===`package`||r)&&r?r:lee(n)?t?.projectDir&&fee(t.projectDir,n)?hm(pee(t.projectDir,n)):hm(mee(n)||mm(n).slice(-4).join(`/`)):hm(n)}var _m=Symbol.for(`yaml.alias`),vm=Symbol.for(`yaml.document`),ym=Symbol.for(`yaml.map`),bm=Symbol.for(`yaml.pair`),xm=Symbol.for(`yaml.scalar`),Sm=Symbol.for(`yaml.seq`),Cm=Symbol.for(`yaml.node.type`),wm=e=>!!e&&typeof e==`object`&&e[Cm]===_m,Tm=e=>!!e&&typeof e==`object`&&e[Cm]===vm,Em=e=>!!e&&typeof e==`object`&&e[Cm]===ym,Dm=e=>!!e&&typeof e==`object`&&e[Cm]===bm,Om=e=>!!e&&typeof e==`object`&&e[Cm]===xm,km=e=>!!e&&typeof e==`object`&&e[Cm]===Sm;function Am(e){if(e&&typeof e==`object`)switch(e[Cm]){case ym:case Sm:return!0}return!1}function jm(e){if(e&&typeof e==`object`)switch(e[Cm]){case _m:case ym:case xm:case Sm:return!0}return!1}var Mm=e=>(Om(e)||Am(e))&&!!e.anchor,Nm=Symbol(`break visit`),Pm=Symbol(`skip children`),Fm=Symbol(`remove node`);function Im(e,t){let n=Bm(t);Tm(e)?Lm(null,e.contents,n,Object.freeze([e]))===Fm&&(e.contents=null):Lm(null,e,n,Object.freeze([]))}Im.BREAK=Nm,Im.SKIP=Pm,Im.REMOVE=Fm;function Lm(e,t,n,r){let i=Vm(e,t,n,r);if(jm(i)||Dm(i))return Hm(e,r,i),Lm(e,i,n,r);if(typeof i!=`symbol`){if(Am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=Lm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Nm)return Nm;else i===Fm&&(t.items.splice(e,1),--e)}}else if(Dm(t)){r=Object.freeze(r.concat(t));let e=Lm(`key`,t.key,n,r);if(e===Nm)return Nm;e===Fm&&(t.key=null);let i=Lm(`value`,t.value,n,r);if(i===Nm)return Nm;i===Fm&&(t.value=null)}}return i}async function Rm(e,t){let n=Bm(t);Tm(e)?await zm(null,e.contents,n,Object.freeze([e]))===Fm&&(e.contents=null):await zm(null,e,n,Object.freeze([]))}Rm.BREAK=Nm,Rm.SKIP=Pm,Rm.REMOVE=Fm;async function zm(e,t,n,r){let i=await Vm(e,t,n,r);if(jm(i)||Dm(i))return Hm(e,r,i),zm(e,i,n,r);if(typeof i!=`symbol`){if(Am(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await zm(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===Nm)return Nm;else i===Fm&&(t.items.splice(e,1),--e)}}else if(Dm(t)){r=Object.freeze(r.concat(t));let e=await zm(`key`,t.key,n,r);if(e===Nm)return Nm;e===Fm&&(t.key=null);let i=await zm(`value`,t.value,n,r);if(i===Nm)return Nm;i===Fm&&(t.value=null)}}return i}function Bm(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Vm(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(Em(t))return n.Map?.(e,t,r);if(km(t))return n.Seq?.(e,t,r);if(Dm(t))return n.Pair?.(e,t,r);if(Om(t))return n.Scalar?.(e,t,r);if(wm(t))return n.Alias?.(e,t,r)}function Hm(e,t,n){let r=t[t.length-1];if(Am(r))r.items[e]=n;else if(Dm(r))e===`key`?r.key=n:r.value=n;else if(Tm(r))r.contents=n;else{let e=wm(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var hee={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},gee=e=>e.replace(/[!,[\]{}]/g,e=>hee[e]),Um=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+gee(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&jm(e.contents)){let t={};Im(e.contents,(e,n)=>{jm(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)i===`!!`&&a===`tag:yaml.org,2002:`||(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
11
11
  `)}};Um.defaultYaml={explicit:!1,version:`1.2`},Um.defaultTags={"!!":`tag:yaml.org,2002:`};function Wm(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function Gm(e){let t=new Set;return Im(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function Km(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function _ee(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Gm(e);let a=Km(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(Om(t.node)||Am(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function qm(e,t,n,r){if(r&&typeof r==`object`)if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=qm(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=qm(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=qm(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=qm(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function Jm(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Jm(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!Mm(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var Ym=class{constructor(e){Object.defineProperty(this,Cm,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!Tm(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=Jm(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?qm(i,{"":o},``,o):o}},Xm=class extends Ym{constructor(e){super(_m),this.source=e,Object.defineProperty(this,`tag`,{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],Im(e,{Node:(e,t)=>{(wm(t)||Mm(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(Jm(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=Zm(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(Wm(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function Zm(e,t,n){if(wm(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(Am(t)){let r=0;for(let i of t.items){let t=Zm(e,i,n);t>r&&(r=t)}return r}else if(Dm(t)){let r=Zm(e,t.key,n),i=Zm(e,t.value,n);return Math.max(r,i)}return 1}var Qm=e=>!e||typeof e!=`function`&&typeof e!=`object`,$m=class extends Ym{constructor(e){super(xm),this.value=e}toJSON(e,t){return t?.keep?this.value:Jm(this.value,e,t)}toString(){return String(this.value)}};$m.BLOCK_FOLDED=`BLOCK_FOLDED`,$m.BLOCK_LITERAL=`BLOCK_LITERAL`,$m.PLAIN=`PLAIN`,$m.QUOTE_DOUBLE=`QUOTE_DOUBLE`,$m.QUOTE_SINGLE=`QUOTE_SINGLE`;var vee=`tag:yaml.org,2002:`;function yee(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function eh(e,t,n){if(Tm(e)&&(e=e.contents),jm(e))return e;if(Dm(e)){let t=n.schema[ym].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??=i(e),new Xm(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=vee+t.slice(2));let l=yee(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new $m(e);return c&&(c.node=t),t}l=e instanceof Map?o[ym]:Symbol.iterator in Object(e)?o[Sm]:o[ym]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new $m(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function th(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return eh(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var nh=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,rh=class extends Ym{constructor(e,t){super(e),Object.defineProperty(this,`schema`,{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>jm(t)||Dm(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(nh(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(Am(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,th(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(Am(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&Om(i)?i.value:i:Am(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!Dm(t))return!1;let n=t.value;return n==null||e&&Om(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return Am(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(Am(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,th(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},bee=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function ih(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var ah=(e,t,n)=>e.endsWith(`
12
12
  `)?ih(n,t):n.includes(`
13
13
  `)?`
@@ -320,7 +320,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
320
320
  `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=$O(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=Sde;if(t.end=e,e>=this.to)t.text=``;else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let e=this.absoluteLineStart,n=this.rangeI;for(;this.ranges[n].to<t.end;){n++;let r=this.ranges[n].from,i=this.lineChunkAt(r);t.end=r+i.length,t.text=t.text.slice(0,this.ranges[n-1].to-e)+i,e=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=n,e.reset(t);e.depth<this.stack.length;e.depth++){let t=this.stack[e.depth],n=this.parser.skipContextMarkup[t.type];if(!n)throw Error(`Unhandled block context `+Z[t.type]);let r=this.line.markers.length;if(!n(t,this,e)){this.line.markers.length>r&&(t.end=this.line.markers[this.line.markers.length-1].to);break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(this.input.lineChunks)n=t==`
321
321
  `?``:t;else{let e=t.indexOf(`
322
322
  `);n=e<0?t:t.slice(0,e)}return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=aO.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){typeof e==`number`&&(e=new v(this.parser.nodeSet.types[e],FO,FO,(n??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(ZO(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?kO(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let t of e.parsers)if(t.finish(this,e))return;let t=ZO(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Z.Paragraph,e.content.length),e.start)}elt(e,t,n,r){return typeof e==`string`?zO(this.parser.getNodeType(e),t,n,r):new RO(e,t)}get buffer(){return new IO(this.parser.nodeSet)}};function kO(e,t,n,r,i){let a=e[t].to,o=[],s=[],c=n.from+r;function l(n,i){for(;i?n>=a:n>a;){let i=e[t+1].from-a;r+=i,n+=i,t++,a=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){l(u.from+r,!0);let n=u.from+r,d,f=i.get(u.tree);f?d=f:u.to+r>a?(d=kO(e,t,u,r,i),l(u.to+r,!1)):d=u.toTree(),o.push(d),s.push(n-c)}return l(n.to+r,!1),new v(n.type,o,s,n.to+r-c,n.tree?n.tree.propValues:void 0)}var AO=class e extends m{constructor(e,t,n,r,i,a,o,s,c){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=i,this.skipContextMarkup=a,this.inlineParsers=o,this.inlineNames=s,this.wrappers=c,this.nodeTypes=Object.create(null);for(let t of e.types)this.nodeTypes[t.name]=t.id}createParse(e,t,n){let r=new Cde(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=MO(t);if(!n)return this;let{nodeSet:r,skipContextMarkup:i}=this,a=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),s=this.blockNames.slice(),c=this.inlineParsers.slice(),l=this.inlineNames.slice(),u=this.endLeafBlock.slice(),d=this.wrappers;if(jO(n.defineNodes)){i=Object.assign({},i);let e=r.types.slice(),t;for(let r of n.defineNodes){let{name:n,block:a,composite:o,style:s}=typeof r==`string`?{name:r}:r;if(e.some(e=>e.name==n))continue;o&&(i[e.length]=(e,t,n)=>o(t,n,e.value));let c=e.length,l=o?[`Block`,`BlockContext`]:a?c>=Z.ATXHeading1&&c<=Z.SetextHeading2?[`Block`,`LeafBlock`,`Heading`]:[`Block`,`LeafBlock`]:void 0;e.push(w.define({id:c,name:n,props:l&&[[he.group,l]]})),s&&(t||={},Array.isArray(s)||s instanceof _?t[n]=s:Object.assign(t,s))}r=new C(e),t&&(r=r.extend(b(t)))}if(jO(n.props)&&(r=r.extend(...n.props)),jO(n.remove))for(let e of n.remove){let t=this.blockNames.indexOf(e),n=this.inlineNames.indexOf(e);t>-1&&(a[t]=o[t]=void 0),n>-1&&(c[n]=void 0)}if(jO(n.parseBlock))for(let e of n.parseBlock){let t=s.indexOf(e.name);if(t>-1)a[t]=e.parse,o[t]=e.leaf;else{let t=e.before?NO(s,e.before):e.after?NO(s,e.after)+1:s.length-1;a.splice(t,0,e.parse),o.splice(t,0,e.leaf),s.splice(t,0,e.name)}e.endLeaf&&u.push(e.endLeaf)}if(jO(n.parseInline))for(let e of n.parseInline){let t=l.indexOf(e.name);if(t>-1)c[t]=e.parse;else{let t=e.before?NO(l,e.before):e.after?NO(l,e.after)+1:l.length-1;c.splice(t,0,e.parse),l.splice(t,0,e.name)}}return n.wrap&&(d=d.concat(n.wrap)),new e(r,a,o,s,u,i,c,l,d)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new XO(this,e,t);outer:for(let e=t;e<n.end;){let t=n.char(e);for(let r of this.inlineParsers)if(r){let i=r(n,t,e);if(i>=0){e=i;continue outer}}e++}return n.resolveMarkers(0)}};function jO(e){return e!=null&&e.length>0}function MO(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=MO(e[0]);if(e.length==1)return t;let n=MO(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||FO).concat(t||FO),i=t.wrap,a=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:i?a?(e,t,n,r)=>i(a(e,t,n,r),t,n,r):i:a}}function NO(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var PO=[w.none];for(let e=1,t;t=Z[e];e++)PO[e]=w.define({id:e,name:t,props:e>=Z.Escape?[]:[[he.group,e in sO?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var FO=[],IO=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return v.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}},LO=class{constructor(e,t,n,r=FO){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new IO(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},RO=class{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return FO}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}};function zO(e,t,n,r){return new LO(e,t,n,r)}var BO={resolve:`Emphasis`,mark:`EmphasisMark`},VO={resolve:`Emphasis`,mark:`EmphasisMark`},HO={},UO={},WO=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},wde=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,GO=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{GO=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var KO={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let t=0;t<32;t++)if(wde.charCodeAt(t)==r)return e.append(zO(Z.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(zO(Z.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;for(;r<e.end&&e.char(r)==96;)r++;let i=r-n,a=0;for(;r<e.end;r++)if(e.char(r)==96){if(a++,a==i&&e.char(r+1)!=96)return e.append(zO(Z.InlineCode,n,r+1,[zO(Z.CodeMark,n,n+i),zO(Z.CodeMark,r+1-i,r+1)]))}else a=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return e.append(zO(Z.Autolink,n,n+1+i[0].length,[zO(Z.LinkMark,n,n+1),zO(Z.URL,n+1,n+i[0].length),zO(Z.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(zO(Z.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(zO(Z.ProcessingInstruction,n,n+1+o[0].length));let s=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return s?e.append(zO(Z.HTMLTag,n,n+1+s[0].length)):-1},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;for(;e.char(r)==t;)r++;let i=e.slice(n-1,n),a=e.slice(r,r+1),o=GO.test(i),s=GO.test(a),c=/\s|^$/.test(i),l=/\s|^$/.test(a),u=!l&&(!s||c||o),d=!c&&(!o||l||s),f=u&&(t==42||!d||o),p=d&&(t==42||!u||s);return e.append(new WO(t==95?BO:VO,n,r,(f?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(zO(Z.HardBreak,n,n+2));if(t==32){let t=n+1;for(;e.char(t)==32;)t++;if(e.char(t)==10&&t>=n+2)return e.append(zO(Z.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new WO(HO,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new WO(UO,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let t=e.parts.length-1;t>=0;t--){let r=e.parts[t];if(r instanceof WO&&(r.type==HO||r.type==UO)){if(!r.side||e.skipSpace(r.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[t]=null,-1;let i=e.takeContent(t),a=e.parts[t]=Tde(e,i,r.type==HO?Z.Link:Z.Image,r.from,n+1);if(r.type==HO)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof WO&&t.type==HO&&(t.side=0)}return a.to}}return-1}};function Tde(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(zO(Z.LinkMark,r,r+(n==Z.Image?2:1))),t.push(zO(Z.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=qO(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=JO(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(zO(Z.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(zO(Z.LinkMark,n,s)))}else if(o==91){let n=YO(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return zO(n,r,s,t)}function qO(e,t,n){if(e.charCodeAt(t)==60){for(let r=t+1;r<e.length;r++){let i=e.charCodeAt(r);if(i==62)return zO(Z.URL,t+n,r+1+n);if(i==60||i==10)return!1}return null}else{let r=0,i=t;for(let t=!1;i<e.length;i++){let n=e.charCodeAt(i);if(cO(n))break;if(t)t=!1;else if(n==40)r++;else if(n==41){if(!r)break;r--}else n==92&&(t=!0)}return i>t?zO(Z.URL,t+n,i+n):i==e.length?null:!1}}function JO(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let r=t+1,a=!1;r<e.length;r++){let o=e.charCodeAt(r);if(a)a=!1;else if(o==i)return zO(Z.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function YO(e,t,n,r){for(let i=!1,a=t+1,o=Math.min(e.length,a+999);a<o;a++){let o=e.charCodeAt(a);if(i)i=!1;else if(o==93)return r?!1:zO(Z.LinkLabel,t+n,a+1+n);else{if(r&&!cO(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var XO=class{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,i){return this.append(new WO(e,t,n,(r?1:0)|(i?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof WO&&(t.type==HO||t.type==UO))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let t=e;t<this.parts.length;t++){let n=this.parts[t];if(!(n instanceof WO&&n.type.resolve&&n.side&2))continue;let r=n.type==BO||n.type==VO,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof WO&&e.side&1&&e.type==n.type&&!(r&&(n.side&1||e.side&2)&&(e.to-e.from+i)%3==0&&((e.to-e.from)%3||i%3))){a=e;break}}if(!a)continue;let s=n.type.resolve,c=[],l=a.from,u=n.to;if(r){let e=Math.min(2,a.to-a.from,i);l=a.to-e,u=n.from+e,s=e==1?`Emphasis`:`StrongEmphasis`}a.type.mark&&c.push(this.elt(a.type.mark,l,a.to));for(let e=o+1;e<t;e++)this.parts[e]instanceof LO&&c.push(this.parts[e]),this.parts[e]=null;n.type.mark&&c.push(this.elt(n.type.mark,n.from,u));let d=this.elt(s,l,u,c);this.parts[o]=r&&a.from!=l?new WO(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new WO(n.type,u,n.to,n.side):null)?this.parts.splice(t,0,d):this.parts[t]=d}let t=[];for(let n=e;n<this.parts.length;n++){let e=this.parts[n];e instanceof LO&&t.push(e)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof WO&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof WO?t:null}skipSpace(e){return lO(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?zO(this.parser.getNodeType(e),t,n,r):new RO(e,t)}};XO.linkStart=HO,XO.imageStart=UO;function ZO(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let e of t){for(;r<n.length&&n[r].to<e.to;)r++;if(r<n.length&&n[r].from<e.from){let t=n[r];t instanceof LO&&(n[r]=new LO(t.type,t.from,t.to,ZO(t.children,[e])))}else n.splice(r++,0,e)}return n}var Ede=[Z.CodeBlock,Z.ListItem,Z.OrderedList,Z.BulletList],QO=class{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let e=this.fragment.to;for(;e>0&&this.input.read(e-1,e)!=`
323
- `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(he.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=$O(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new v(e.parser.nodeSet.types[Z.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(Ede.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c,s=t.to-n,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function $O(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var ek=b({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),tk=new AO(new C(PO).extend(ek),Object.keys(EO).map(e=>EO[e]),Object.keys(EO).map(e=>OO[e]),Object.keys(EO),xde,sO,Object.keys(KO).map(e=>KO[e]),Object.keys(KO),[]);function nk(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function rk(e){let{codeParser:t,htmlParser:n}=e;return{wrap:x((e,r)=>{let i=e.type.id;if(t&&(i==Z.CodeBlock||i==Z.FencedCode)){let n=``;if(i==Z.FencedCode){let t=e.node.getChild(Z.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Z.CodeText}}else if(n&&(i==Z.HTMLBlock||i==Z.HTMLTag||i==Z.CommentBlock))return{parser:n,overlay:nk(e.node,e.from,e.to)};return null})}}var ik={resolve:`Strikethrough`,mark:`StrikethroughMark`},ak={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":A.strikethrough}},{name:`StrikethroughMark`,style:A.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=GO.test(r),c=GO.test(i);return e.addDelimiter(ik,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function ok(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function sk(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var ck=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,lk=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&ck.test(r=t.text.slice(t.pos))){let i=[];ok(e,n.content,0,i,n.start)==ok(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];ok(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},uk={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":A.heading}},`TableRow`,{name:`TableCell`,style:A.content},{name:`TableDelimiter`,style:A.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return sk(t.content,0)?new lk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof lk)||!sk(t.text,t.basePos))return!1;let r=e.peekLine();return ck.test(r)&&ok(e,t.text,t.basePos)==ok(e,r,t.basePos)},before:`SetextHeading`}]},dk=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},fk={defineNodes:[{name:`Task`,block:!0,style:A.list},{name:`TaskMarker`,style:A.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new dk:null},after:`SetextHeading`}]},pk=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,mk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,hk=/[\w-]+\.[\w-]+($|\/)/,gk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,_k=/\/[a-zA-Z\d@.]+/gy;function vk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function yk(e,t){mk.lastIndex=t;let n=mk.exec(e);if(!n||hk.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&vk(e,t,r,`)`)>vk(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function bk(e,t){gk.lastIndex=t;let n=gk.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-(r==`.`?1:0)}var xk=[uk,fk,ak,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;pk.lastIndex=r;let i=pk.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=yk(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=bk(e.text,r):(a=bk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(_k.lastIndex=a,i=_k.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Sk(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),cO(s))break}return-1}}var Ck={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Sk(94,`Superscript`,`SuperscriptMark`)}]},wk={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Sk(126,`Subscript`,`SubscriptMark`)}]},Tk={defineNodes:[{name:`Emoji`,style:A.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},Ek=55,Dk=1,Ok=56,kk=2,Ak=57,jk=3,Mk=4,Nk=5,Pk=6,Fk=7,Ik=8,Lk=9,Rk=10,zk=11,Bk=12,Dde=13,Vk=58,Ode=14,kde=15,Hk=59,Uk=21,Ade=23,Wk=24,jde=25,Gk=27,Kk=28,Mde=29,Nde=32,Pde=35,Fde=37,Ide=38,Lde=0,Rde=1,zde={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Bde={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},qk={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Vde(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Jk=null,Yk=null,Xk=0;function Zk(e,t){let n=e.pos+t;if(Xk==n&&Yk==e)return Jk;let r=e.peek(t),i=``;for(;Vde(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Yk=e,Xk=n,Jk=i?i.toLowerCase():r==Hde||r==Ude?void 0:null}var Qk=60,$k=62,eA=47,Hde=63,Ude=33,Wde=45;function tA(e,t){this.name=e,this.parent=t}var Gde=[Pk,Rk,Fk,Ik,Lk],Kde=new je({start:null,shift(e,t,n,r){return Gde.indexOf(t)>-1?new tA(Zk(r,1)||``,e):e},reduce(e,t){return t==Uk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Pk||i==Fde?new tA(Zk(r,1)||``,e):e},strict:!1}),qde=new xe((e,t)=>{if(e.next!=Qk){e.next<0&&t.context&&e.acceptToken(Vk);return}e.advance();let n=e.next==eA;n&&e.advance();let r=Zk(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?kde:Ode);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(zk);if(i&&Bde[i])return e.acceptToken(Vk,-2);if(t.dialectEnabled(Lde))return e.acceptToken(Bk);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(Dde)}else{if(r==`script`)return e.acceptToken(Fk);if(r==`style`)return e.acceptToken(Ik);if(r==`textarea`)return e.acceptToken(Lk);if(zde.hasOwnProperty(r))return e.acceptToken(Rk);i&&qk[i]&&qk[i][r]?e.acceptToken(Vk,-1):e.acceptToken(Pk)}},{contextual:!0}),Jde=new xe(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Hk);break}if(e.next==Wde)t++;else if(e.next==$k&&t>=2){n>=3&&e.acceptToken(Hk,-2);break}else t=0;e.advance()}});function Yde(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Xde=new xe((e,t)=>{if(e.next==eA&&e.peek(1)==$k){let n=t.dialectEnabled(Rde)||Yde(t.context);e.acceptToken(n?Nk:Mk,2)}else e.next==$k&&e.acceptToken(Mk,1)});function nA(e,t,n){let r=2+e.length;return new xe(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==Qk||a==1&&i.next==eA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==$k){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Zde=nA(`script`,Ek,Dk),Qde=nA(`style`,Ok,kk),$de=nA(`textarea`,Ak,jk),efe=b({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),tfe=De.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:`,c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Kde,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[efe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Zde,Qde,$de,Xde,qde,Jde,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function rA(e,t){let n=Object.create(null);for(let r of e.getChildren(Wk)){let e=r.getChild(jde),i=r.getChild(Gk)||r.getChild(Kk);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Gk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function iA(e,t){let n=e.getChild(Ade);return n?t.read(n.from,n.to):` `}function aA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=rA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function oA(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return x((e,t)=>{let s=e.type.id;if(s==Mde)return aA(e,t,n);if(s==Nde)return aA(e,t,r);if(s==Pde)return aA(e,t,i);if(s==Uk&&a.length){let n=e.node,r=n.firstChild,i=r&&iA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=rA(r,t)))){let t=n.lastChild,i=t.type.id==Ide?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==Wk){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=iA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Gk){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}]}}else if(e.type.id==Kk)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var nfe=122,sA=1,rfe=123,ife=124,cA=2,afe=125,ofe=3,sfe=4,lA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],cfe=58,lfe=40,uA=95,ufe=91,dA=45,dfe=46,ffe=35,pfe=37,mfe=38,hfe=92,gfe=10,_fe=42;function fA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function pA(e){return e>=48&&e<=57}function mA(e){return pA(e)||e>=97&&e<=102||e>=65&&e<=70}var hA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(fA(c)||c==dA||c==uA||a&&pA(c))!a&&(c!=dA||s>0)&&(a=!0),o===s&&c==dA&&o++,r.advance();else if(c==hfe&&r.peek(1)!=gfe){if(r.advance(),mA(r.next)){do r.advance();while(mA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(cA)?t:c==lfe?n:e);break}}},vfe=new xe(hA(rfe,cA,ife)),yfe=new xe(hA(afe,ofe,sfe)),bfe=new xe(e=>{if(lA.includes(e.peek(-1))){let{next:t}=e;(fA(t)||t==uA||t==ffe||t==dfe||t==_fe||t==ufe||t==cfe&&fA(e.peek(1))||t==dA||t==mfe)&&e.acceptToken(nfe)}}),xfe=new xe(e=>{if(!lA.includes(e.peek(-1))){let{next:t}=e;if(t==pfe&&(e.advance(),e.acceptToken(sA)),fA(t)){do e.advance();while(fA(e.next)||pA(e.next));e.acceptToken(sA)}}}),Sfe=b({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),Cfe={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},wfe={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Tfe={__proto__:null,selector:112,layer:166},Efe={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Dfe={__proto__:null,to:207},Ofe=De.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles`,maxTerm:143,nodeProps:[[`isolate`,-2,5,36,``],[`openedBy`,20,`(`,28,`[`,31,`{`],[`closedBy`,21,`)`,29,`]`,32,`}`]],propSources:[Sfe],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[bfe,xfe,vfe,yfe,1,2,3,4,new fe(`m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~`,28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>Cfe[e]||-1},{term:125,get:e=>wfe[e]||-1},{term:4,get:e=>Tfe[e]||-1},{term:25,get:e=>Efe[e]||-1},{term:123,get:e=>Dfe[e]||-1}],tokenPrec:1963}),gA=null;function _A(){if(!gA&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));gA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return gA||[]}var vA=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),yA=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),kfe=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),Afe=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),bA=/^(\w[\w-]*|-\w[\w-]*|)$/,jfe=/^-(-[\w-]*)?$/;function Mfe(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var xA=new O,Nfe=[`Declaration`];function Pfe(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function SA(e,t,n){if(t.to-t.from>4096){let r=xA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of SA(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return xA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(Nfe)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var CA=e=>t=>{let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:_A(),validFor:bA};if(i.name==`ValueName`)return{from:i.from,options:yA,validFor:bA};if(i.name==`PseudoClassName`)return{from:i.from,options:vA,validFor:bA};if(e(i)||(t.explicit||a)&&Mfe(i,n.doc))return{from:e(i)||a?i.from:r,options:SA(n.doc,Pfe(i),e),validFor:jfe};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:_A(),validFor:bA};return{from:i.from,options:kfe,validFor:bA}}if(i.name==`AtKeyword`)return{from:i.from,options:Afe,validFor:bA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:vA,validFor:bA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:yA,validFor:bA}:o.name==`Block`||o.name==`Styles`?{from:r,options:_A(),validFor:bA}:null},wA=CA(e=>e.name==`VariableName`),TA=ke.define({name:`css`,parser:Ofe.configure({props:[l.add({Declaration:de()}),s.add({"Block KeyframeList":Re})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function EA(){return new Me(TA,TA.data.of({autocomplete:wA}))}var DA=[`_blank`,`_self`,`_top`,`_parent`],OA=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],kA=[`get`,`post`,`put`,`delete`],AA=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],jA=[`true`,`false`],MA={},Ffe={a:{attrs:{href:null,ping:null,type:null,media:null,target:DA,hreflang:null}},abbr:MA,address:MA,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:MA,aside:MA,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:MA,base:{attrs:{href:null,target:DA}},bdi:MA,bdo:MA,blockquote:{attrs:{cite:null}},body:MA,br:MA,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:AA,formmethod:kA,formnovalidate:[`novalidate`],formtarget:DA,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:MA,center:MA,cite:MA,code:MA,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:MA,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:MA,div:MA,dl:MA,dt:MA,em:MA,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:MA,figure:MA,footer:MA,form:{attrs:{action:null,name:null,"accept-charset":OA,autocomplete:[`on`,`off`],enctype:AA,method:kA,novalidate:[`novalidate`],target:DA}},h1:MA,h2:MA,h3:MA,h4:MA,h5:MA,h6:MA,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:MA,hgroup:MA,hr:MA,html:{attrs:{manifest:null}},i:MA,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:AA,formmethod:kA,formnovalidate:[`novalidate`],formtarget:DA,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:MA,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:MA,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:MA,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:OA,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:MA,noscript:MA,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:MA,param:{attrs:{name:null,value:null}},pre:MA,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:MA,rt:MA,ruby:MA,samp:MA,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:OA}},section:MA,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:MA,source:{attrs:{src:null,type:null,media:null}},span:MA,strong:MA,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:MA,summary:MA,sup:MA,table:MA,tbody:MA,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:MA,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:MA,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:MA,time:{attrs:{datetime:null}},title:MA,tr:MA,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:MA,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:MA},NA={accesskey:null,class:null,contenteditable:jA,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:jA,autocorrect:jA,autocapitalize:jA,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":jA,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":jA,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":jA,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":jA,"aria-hidden":jA,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":jA,"aria-multiselectable":jA,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":jA,"aria-relevant":null,"aria-required":jA,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},PA=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of PA)NA[e]=null;var FA=class{constructor(e,t){this.tags={...Ffe,...e},this.globalAttrs={...NA,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};FA.default=new FA;function IA(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function LA(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function RA(e,t,n){return n.tags[IA(e,LA(t))]?.children||n.allTags}function zA(e,t){let n=[];for(let r=LA(t);r&&!r.type.isTop;r=LA(r.parent)){let i=IA(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var BA=/^[:\-\.\w\u00b7-\uffff]*$/;function VA(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=LA(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:RA(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(zA(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function HA(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:zA(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:BA}}function Ife(e,t,n,r){let i=[],a=0;for(let r of RA(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of zA(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Lfe(e,t,n,r,i){let a=LA(n),o=a?t.tags[IA(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:BA}}function Rfe(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=LA(n),i=r?t.tags[IA(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function UA(e,t){let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?HA(n,i,i.from,r):VA(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?VA(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?HA(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Lfe(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Rfe(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Ife(n,e,i,r):null}function WA(e){return UA(FA.default,e)}function GA(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new FA(t,n):FA.default;return e=>UA(r,e)}var zfe=Ge.parser.configure({top:`SingleExpression`}),KA=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:We.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:He.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:Ve.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:zfe},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Ge.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:TA.parser}],qA=[{name:`style`,parser:TA.parser.configure({top:`Styles`})}].concat(PA.map(e=>({name:e,parser:Ge.parser}))),JA=ke.define({name:`html`,parser:tfe.configure({props:[l.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),ye.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),YA=JA.configure({wrap:oA(KA,qA)});function XA(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=oA((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(qA))),new Me(n?JA.configure({wrap:n,dialect:t}):t?YA.configure({dialect:t}):YA,[YA.data.of({autocomplete:GA(e)}),e.autoCloseTags===!1?[]:QA,Ue().support,EA().support])}var ZA=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),QA=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!YA.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=p(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=IA(o.doc,t.parent,n))&&!ZA.has(a))return{range:e,changes:{from:n,to:n+(o.doc.sliceString(n,n+1)===`>`?1:0),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=IA(o.doc,e,n))&&!ZA.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:ce.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),$A=ee({commentTokens:{block:{open:`<!--`,close:`-->`}}}),ej=new he,tj=tk.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||nj(e)!=null||Bfe(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),ej.add(nj),l.add({Document:()=>null}),me.add({Document:$A})]});function nj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Bfe(e){return e.name==`OrderedList`||e.name==`BulletList`}function Vfe(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=nj(e.type))!=null&&r<=t)break;n=e}return n.to}var Hfe=Ie.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(ej);if(e==null)continue;let t=Vfe(r,e);if(t>n)return{from:n,to:t}}return null});function rj(e){return new re($A,e,[],`markdown`)}var ij=rj(tj),aj=rj(tj.configure([xk,wk,Ck,Tk,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Ufe(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):W.matchLanguageName(e,n,!0),t instanceof W)return t.support?t.support.language.parser:U.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var oj=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+cj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function sj(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new oj(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new oj(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new oj(i.parent,s,s+t,a[1],e,n,i))}}return r}function cj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function lj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=cj(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function uj(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i)!=` `)return e;let r=u(e,4,n),a=``;for(let e=r;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(n)}var dj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!aj.isActiveAt(t,n.from,-1)&&!aj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=sj(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let d=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&d){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&lj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&lj(e.item,i,r),{range:ce.cursor(t+n.length),changes:r}}else{let e=mj(c,t,s);return{range:ce.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&d&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let f=[];l.node.name==`OrderedList`&&lj(l.item,i,f);let p=l.item&&l.item.from<s.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)m+=e==t&&!p?c[e].marker(i,1):c[e].blank(e<t?u(s.text,4,c[e+1].from)-m.length:null);let h=o;for(;h>s.from&&/\s/.test(s.text.charAt(h-s.from-1));)h--;return m=uj(m,t),Wfe(l.node,t.doc)&&(m=mj(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:ce.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},fj=dj();function pj(e){return e.name==`QuoteMark`||e.name==`ListMark`}function Wfe(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<a.number}function mj(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?u(n.text,4,e[t+1].from)-r.length:null,t<i);return uj(r,t)}function Gfe(e,t){let n=e.resolveInner(t,-1),r=t;pj(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(pj(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var hj=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&aj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=sj(Gfe(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+(n.spaceAfter?1:0);if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:ce.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(u(t.text,4,n.to)-u(t.text,4,n.from));return r==t.from&&(i=uj(i,e)),{range:ce.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:ce.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},gj=[{key:`Enter`,run:fj},{key:`Backspace`,run:hj}],_j=XA({matchClosingTags:!1});function vj(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=ij,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=_j}=e;if(!(a instanceof AO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,Hfe],d;s&&u.push(bj),n instanceof Me?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Ufe(t,d):void 0;l.push(rk({codeParser:f,htmlParser:c.language.parser})),i&&u.push(ue.high(r.of(gj)));let p=rj(a.configure(l));return o&&u.push(p.data.of({autocomplete:Kfe})),new Me(p,u)}function Kfe(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:qfe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yj=null;function qfe(){if(yj)return yj;let e=WA(new Xe(Te.create({extensions:_j}),0,!0));return yj=e?e.options:[]}var Jfe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,bj=I.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!aj.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||Jfe.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),xj=63,Sj=64,Yfe=1,Xfe=2,Cj=3,Zfe=4,wj=5,Qfe=6,$fe=7,Tj=65,epe=66,tpe=8,npe=9,rpe=10,ipe=11,Ej=12,Dj=13,Oj=19,kj=20,Aj=29,jj=33,Mj=34,Nj=47,Pj=0,Fj=1,Ij=2,Lj=3,Rj=4,zj=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};zj.top=new zj(null,-1,Pj);function Bj(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(Hj(t)||t==-1)return n}}function Vj(e){return e==32||e==9}function Hj(e){return e==10||e==13}function Uj(e){return Vj(e)||Hj(e)}function Wj(e){return e<0||Uj(e)}var Gj=new je({start:zj.top,reduce(e,t){return e.type==Lj&&(t==kj||t==Mj)?e.parent:e},shift(e,t,n,r){if(t==Cj)return new zj(e,Bj(r,r.pos),Fj);if(t==Tj||t==wj)return new zj(e,Bj(r,r.pos),Ij);if(t==xj)return e.parent;if(t==Oj||t==jj)return new zj(e,0,Lj);if(t==Dj&&e.type==Rj)return e.parent;if(t==Nj){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new zj(e,e.depth+ +t[0],Rj)}return e},hash(e){return e.hash}});function Kj(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Wj(e.peek(n+3))}var qj=new xe((e,t)=>{if(e.next==-1&&t.canShift(Sj))return e.acceptToken(Sj);let n=e.peek(-1);if((Hj(n)||n<0)&&t.context.type!=Lj){if(Kj(e,45))if(t.canShift(xj))e.acceptToken(xj);else return e.acceptToken(Yfe,3);if(Kj(e,46))if(t.canShift(xj))e.acceptToken(xj);else return e.acceptToken(Xfe,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==Fj&&(e.next!=45||!Wj(e.peek(1))))&&e.next!=-1&&!Hj(e.next)&&e.next!=35&&e.acceptToken(xj,-n)}},{contextual:!0}),Jj=new xe((e,t)=>{if(t.context.type==Lj){e.next==63&&(e.advance(),Wj(e.next)&&e.acceptToken($fe));return}if(e.next==45)e.advance(),Wj(e.next)&&e.acceptToken(t.context.type==Fj&&t.context.depth==Bj(e,e.pos-1)?Zfe:Cj);else if(e.next==63)e.advance(),Wj(e.next)&&e.acceptToken(t.context.type==Ij&&t.context.depth==Bj(e,e.pos-1)?Qfe:wj);else{let n=e.pos;for(;;)if(Vj(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)Qj(e);else if(e.next==38)$j(e);else if(e.next==42){$j(e);break}else if(e.next==39||e.next==34){if(eM(e,!0))break;return}else if(e.next==91||e.next==123){if(!tM(e))return;break}else{aM(e,!0,!1,0);break}for(;Vj(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Aj))return;Wj(e.peek(1))&&e.acceptTokenTo(t.context.type==Ij&&t.context.depth==Bj(e,n)?epe:Tj,n)}}},{contextual:!0});function Yj(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Xj(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Zj(e,t){return e.next==37?(e.advance(),Xj(e.next)&&e.advance(),Xj(e.next)&&e.advance(),!0):Yj(e.next)||t&&e.next==44?(e.advance(),!0):!1}function Qj(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Zj(e,!0)){e.next==62&&e.advance();break}}else for(;Zj(e,!1););}function $j(e){for(e.advance();!Wj(e.next)&&rM(e.tag)!=`f`;)e.advance()}function eM(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(Hj(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function tM(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!eM(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||Hj(e.next))return!1;else e.advance()}var nM=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function rM(e){return e<33?`u`:e>125?`s`:nM[e-33]}function iM(e,t){let n=rM(e);return n!=`u`&&!(t&&n==`f`)}function aM(e,t,n,r){if(rM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&iM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;Uj(a);){if(Hj(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?iM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:iM(a,n)))||!n&&s<=r||s==0&&!n&&(Kj(e,45,o)||Kj(e,46,o)))break;if(t&&rM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var oM=new xe((e,t)=>{if(e.next==33)Qj(e),e.acceptToken(Ej);else if(e.next==38||e.next==42){let t=e.next==38?rpe:ipe;$j(e),e.acceptToken(t)}else e.next==39||e.next==34?(eM(e,!1),e.acceptToken(npe)):aM(e,!1,t.context.type==Lj,t.context.depth)&&e.acceptToken(tpe)}),sM=new xe((e,t)=>{let n=t.context.type==Rj?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(Kj(e,45,i)||Kj(e,46,i))||!Hj(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=Hj(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(Dj,r)}),cM=b({DirectiveName:A.keyword,DirectiveContent:A.attributeValue,"DirectiveEnd DocEnd":A.meta,QuotedLiteral:A.string,BlockLiteralHeader:A.special(A.string),BlockLiteralContent:A.content,Literal:A.content,"Key/Literal Key/QuotedLiteral":A.definition(A.propertyName),"Anchor Alias":A.labelName,Tag:A.typeName,Comment:A.lineComment,": , -":A.separator,"?":A.punctuation,"[ ]":A.squareBracket,"{ }":A.brace}),lM=De.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:Gj,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[cM],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[qj,Jj,oM,sM,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),uM=De.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),dM=ke.define({name:`yaml`,parser:lM.configure({props:[l.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Pe({closing:`}`}),FlowSequence:Pe({closing:`]`})}),s.add({"FlowMapping FlowSequence":Re,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function fM(){return new Me(dM)}ke.define({name:`yaml-frontmatter`,parser:uM.configure({props:[b({DashLine:A.meta})]})});function Q(e){return new Me(se.define(e))}function pM(e){return J(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var mM=[W.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return J(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),W.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return J(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),W.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return pM(`Cassandra`)}}),W.of({name:`CSS`,extensions:[`css`],load(){return J(()=>import(`./dist-B4C_F61L.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),W.of({name:`Go`,extensions:[`go`],load(){return J(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),W.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return J(()=>import(`./dist-D6u2SljY.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),W.of({name:`Java`,extensions:[`java`],load(){return J(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),W.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return J(()=>import(`./dist-Ddb7TC4V.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),W.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return J(()=>import(`./dist-DLjZnpQY.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),W.of({name:`JSX`,extensions:[`jsx`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`LESS`,extensions:[`less`],load(){return J(()=>import(`./dist-CPk7tHs1.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),W.of({name:`Liquid`,extensions:[`liquid`],load(){return J(()=>import(`./dist-v1VbIWxM.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),W.of({name:`MariaDB SQL`,load(){return pM(`MariaSQL`)}}),W.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return J(()=>import(`./dist-Db3Nzxbm.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),W.of({name:`MS SQL`,load(){return pM(`MSSQL`)}}),W.of({name:`MySQL`,load(){return pM(`MySQL`)}}),W.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return J(()=>import(`./dist-C2Y7kb_l.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),W.of({name:`PLSQL`,extensions:[`pls`],load(){return pM(`PLSQL`)}}),W.of({name:`PostgreSQL`,load(){return pM(`PostgreSQL`)}}),W.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return J(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),W.of({name:`Rust`,extensions:[`rs`],load(){return J(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),W.of({name:`Sass`,extensions:[`sass`],load(){return J(()=>import(`./dist-wgCtmKd4.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),W.of({name:`SCSS`,extensions:[`scss`],load(){return J(()=>import(`./dist-wgCtmKd4.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),W.of({name:`SQL`,extensions:[`sql`],load(){return pM(`StandardSQL`)}}),W.of({name:`SQLite`,load(){return pM(`SQLite`)}}),W.of({name:`TSX`,extensions:[`tsx`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return J(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),W.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return J(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),W.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return J(()=>import(`./dist-B7Fp1Wdq.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),W.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return J(()=>import(`./apl-CJPt5sW7.js`).then(e=>Q(e.apl)),[])}}),W.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return J(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>Q(e.asciiArmor)),[])}}),W.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return J(()=>import(`./asn1-8xgVfRoq.js`).then(e=>Q(e.asn1({}))),[])}}),W.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return J(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>Q(e.asterisk)),[])}}),W.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return J(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>Q(e.brainfuck)),[])}}),W.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return J(()=>import(`./cobol-D3WLbLVy.js`).then(e=>Q(e.cobol)),[])}}),W.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.csharp)),[])}}),W.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`ClojureScript`,extensions:[`cljs`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return J(()=>import(`./css-_6KgQwpu.js`).then(e=>Q(e.gss)),[])}}),W.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return J(()=>import(`./cmake-wWuF5ifR.js`).then(e=>Q(e.cmake)),[])}}),W.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return J(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>Q(e.coffeeScript)),[])}}),W.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return J(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>Q(e.commonLisp)),[])}}),W.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return J(()=>import(`./cypher-B3uWx7jm.js`).then(e=>Q(e.cypher)),[])}}),W.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return J(()=>import(`./python-2pwcWoy7.js`).then(e=>Q(e.cython)),[])}}),W.of({name:`Crystal`,extensions:[`cr`],load(){return J(()=>import(`./crystal-C7mEw92C.js`).then(e=>Q(e.crystal)),[])}}),W.of({name:`D`,extensions:[`d`],load(){return J(()=>import(`./d-D3kOh3JF.js`).then(e=>Q(e.d)),[])}}),W.of({name:`Dart`,extensions:[`dart`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.dart)),[])}}),W.of({name:`diff`,extensions:[`diff`,`patch`],load(){return J(()=>import(`./diff-CoamybWh.js`).then(e=>Q(e.diff)),[])}}),W.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return J(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([119,120]))}}),W.of({name:`DTD`,extensions:[`dtd`],load(){return J(()=>import(`./dtd-BjGQwMWL.js`).then(e=>Q(e.dtd)),[])}}),W.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return J(()=>import(`./dylan-B9W3X2GI.js`).then(e=>Q(e.dylan)),[])}}),W.of({name:`EBNF`,load(){return J(()=>import(`./ebnf-d5D0otVn.js`).then(e=>Q(e.ebnf)),[])}}),W.of({name:`ECL`,extensions:[`ecl`],load(){return J(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>Q(e.ecl)),[])}}),W.of({name:`edn`,extensions:[`edn`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`Eiffel`,extensions:[`e`],load(){return J(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>Q(e.eiffel)),[])}}),W.of({name:`Elm`,extensions:[`elm`],load(){return J(()=>import(`./elm-unPS17vB.js`).then(e=>Q(e.elm)),[])}}),W.of({name:`Erlang`,extensions:[`erl`],load(){return J(()=>import(`./erlang-R8nOsUTx.js`).then(e=>Q(e.erlang)),[])}}),W.of({name:`Esper`,load(){return J(()=>import(`./sql-CwA10oIk.js`).then(e=>Q(e.esper)),[])}}),W.of({name:`Factor`,extensions:[`factor`],load(){return J(()=>import(`./factor-DMvifS-k.js`).then(e=>Q(e.factor)),__vite__mapDeps([121,120]))}}),W.of({name:`FCL`,load(){return J(()=>import(`./fcl-CVAfW9wK.js`).then(e=>Q(e.fcl)),[])}}),W.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return J(()=>import(`./forth-DHbsK8X8.js`).then(e=>Q(e.forth)),[])}}),W.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return J(()=>import(`./fortran-4jMwxW9-.js`).then(e=>Q(e.fortran)),[])}}),W.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.fSharp)),[])}}),W.of({name:`Gas`,extensions:[`s`],load(){return J(()=>import(`./gas-zC_XGrQT.js`).then(e=>Q(e.gas)),[])}}),W.of({name:`Gherkin`,extensions:[`feature`],load(){return J(()=>import(`./gherkin-CPBQou3u.js`).then(e=>Q(e.gherkin)),[])}}),W.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return J(()=>import(`./groovy-Cqopym0q.js`).then(e=>Q(e.groovy)),[])}}),W.of({name:`Haskell`,extensions:[`hs`],load(){return J(()=>import(`./haskell-imzbNPgF.js`).then(e=>Q(e.haskell)),[])}}),W.of({name:`Haxe`,extensions:[`hx`],load(){return J(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.haxe)),[])}}),W.of({name:`HXML`,extensions:[`hxml`],load(){return J(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.hxml)),[])}}),W.of({name:`HTTP`,load(){return J(()=>import(`./http-j4R5uEso.js`).then(e=>Q(e.http)),[])}}),W.of({name:`IDL`,extensions:[`pro`],load(){return J(()=>import(`./idl-l9d1__Hj.js`).then(e=>Q(e.idl)),[])}}),W.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return J(()=>import(`./javascript-BcqCeS4O.js`).then(e=>Q(e.jsonld)),[])}}),W.of({name:`Julia`,extensions:[`jl`],load(){return J(()=>import(`./julia-BU0qBb1w.js`).then(e=>Q(e.julia)),[])}}),W.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.kotlin)),[])}}),W.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return J(()=>import(`./livescript-uk34VDGK.js`).then(e=>Q(e.liveScript)),[])}}),W.of({name:`Lua`,extensions:[`lua`],load(){return J(()=>import(`./lua-ClQGOv84.js`).then(e=>Q(e.lua)),[])}}),W.of({name:`mIRC`,extensions:[`mrc`],load(){return J(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>Q(e.mirc)),[])}}),W.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return J(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>Q(e.mathematica)),[])}}),W.of({name:`Modelica`,extensions:[`mo`],load(){return J(()=>import(`./modelica-DP8T2DKM.js`).then(e=>Q(e.modelica)),[])}}),W.of({name:`MUMPS`,extensions:[`mps`],load(){return J(()=>import(`./mumps-BKUS05-y.js`).then(e=>Q(e.mumps)),[])}}),W.of({name:`Mbox`,extensions:[`mbox`],load(){return J(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>Q(e.mbox)),[])}}),W.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return J(()=>import(`./nginx-CzYOtr2G.js`).then(e=>Q(e.nginx)),[])}}),W.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return J(()=>import(`./nsis-BbRIeGvl.js`).then(e=>Q(e.nsis)),__vite__mapDeps([122,120]))}}),W.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return J(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>Q(e.ntriples)),[])}}),W.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveC)),[])}}),W.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveCpp)),[])}}),W.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.oCaml)),[])}}),W.of({name:`Octave`,extensions:[`m`],load(){return J(()=>import(`./octave-CnOndUN3.js`).then(e=>Q(e.octave)),[])}}),W.of({name:`Oz`,extensions:[`oz`],load(){return J(()=>import(`./oz-DjW322Rn.js`).then(e=>Q(e.oz)),[])}}),W.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return J(()=>import(`./pascal-BdeW5uRX.js`).then(e=>Q(e.pascal)),[])}}),W.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return J(()=>import(`./perl-_CDvIe1D.js`).then(e=>Q(e.perl)),[])}}),W.of({name:`Pig`,extensions:[`pig`],load(){return J(()=>import(`./pig-inWo_B4W.js`).then(e=>Q(e.pig)),[])}}),W.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return J(()=>import(`./powershell-CO5KWJsy.js`).then(e=>Q(e.powerShell)),[])}}),W.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return J(()=>import(`./properties-CjVp4a6M.js`).then(e=>Q(e.properties)),[])}}),W.of({name:`ProtoBuf`,extensions:[`proto`],load(){return J(()=>import(`./protobuf-DybFT2KT.js`).then(e=>Q(e.protobuf)),[])}}),W.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return J(()=>import(`./pug-D1ZtszdL.js`).then(e=>Q(e.pug)),__vite__mapDeps([123,124]))}}),W.of({name:`Puppet`,extensions:[`pp`],load(){return J(()=>import(`./puppet-Dw_NDgko.js`).then(e=>Q(e.puppet)),[])}}),W.of({name:`Q`,extensions:[`q`],load(){return J(()=>import(`./q-C47l8kdS.js`).then(e=>Q(e.q)),[])}}),W.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return J(()=>import(`./r-BmcXGVZ5.js`).then(e=>Q(e.r)),[])}}),W.of({name:`RPM Changes`,load(){return J(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmChanges)),[])}}),W.of({name:`RPM Spec`,extensions:[`spec`],load(){return J(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmSpec)),[])}}),W.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return J(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>Q(e.ruby)),[])}}),W.of({name:`SAS`,extensions:[`sas`],load(){return J(()=>import(`./sas-Bxkg4GVX.js`).then(e=>Q(e.sas)),[])}}),W.of({name:`Scala`,extensions:[`scala`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.scala)),[])}}),W.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return J(()=>import(`./scheme-CO3zogua.js`).then(e=>Q(e.scheme)),[])}}),W.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return J(()=>import(`./shell-gYrTvBTP.js`).then(e=>Q(e.shell)),[])}}),W.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return J(()=>import(`./sieve-COX4Kn1X.js`).then(e=>Q(e.sieve)),[])}}),W.of({name:`Smalltalk`,extensions:[`st`],load(){return J(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>Q(e.smalltalk)),[])}}),W.of({name:`Solr`,load(){return J(()=>import(`./solr-BvhcdkNH.js`).then(e=>Q(e.solr)),[])}}),W.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.sml)),[])}}),W.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return J(()=>import(`./sparql-gX7W9xeh.js`).then(e=>Q(e.sparql)),[])}}),W.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return J(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>Q(e.spreadsheet)),[])}}),W.of({name:`Squirrel`,extensions:[`nut`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.squirrel)),[])}}),W.of({name:`Stylus`,extensions:[`styl`],load(){return J(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>Q(e.stylus)),[])}}),W.of({name:`Swift`,extensions:[`swift`],load(){return J(()=>import(`./swift-CurfpLXH.js`).then(e=>Q(e.swift)),[])}}),W.of({name:`sTeX`,load(){return J(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),W.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return J(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),W.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return J(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),W.of({name:`Tcl`,extensions:[`tcl`],load(){return J(()=>import(`./tcl-BPvzXR-t.js`).then(e=>Q(e.tcl)),[])}}),W.of({name:`Textile`,extensions:[`textile`],load(){return J(()=>import(`./textile-BUq3vgBH.js`).then(e=>Q(e.textile)),[])}}),W.of({name:`TiddlyWiki`,load(){return J(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>Q(e.tiddlyWiki)),[])}}),W.of({name:`Tiki wiki`,load(){return J(()=>import(`./tiki-C1XMixgx.js`).then(e=>Q(e.tiki)),[])}}),W.of({name:`TOML`,extensions:[`toml`],load(){return J(()=>import(`./toml-BQjoWSzq.js`).then(e=>Q(e.toml)),[])}}),W.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return J(()=>import(`./troff-DbgTp3Cj.js`).then(e=>Q(e.troff)),[])}}),W.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return J(()=>import(`./ttcn-1OxchGWH.js`).then(e=>Q(e.ttcn)),[])}}),W.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return J(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>Q(e.ttcnCfg)),[])}}),W.of({name:`Turtle`,extensions:[`ttl`],load(){return J(()=>import(`./turtle-D1WjVU4-.js`).then(e=>Q(e.turtle)),[])}}),W.of({name:`Web IDL`,extensions:[`webidl`],load(){return J(()=>import(`./webidl-advQMGTP.js`).then(e=>Q(e.webIDL)),[])}}),W.of({name:`VB.NET`,extensions:[`vb`],load(){return J(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>Q(e.vb)),[])}}),W.of({name:`VBScript`,extensions:[`vbs`],load(){return J(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>Q(e.vbScript)),[])}}),W.of({name:`Velocity`,extensions:[`vtl`],load(){return J(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>Q(e.velocity)),[])}}),W.of({name:`Verilog`,extensions:[`v`],load(){return J(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),W.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return J(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>Q(e.vhdl)),[])}}),W.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return J(()=>import(`./xquery-CNzoFgd7.js`).then(e=>Q(e.xQuery)),[])}}),W.of({name:`Yacas`,extensions:[`ys`],load(){return J(()=>import(`./yacas-BsmlDKac.js`).then(e=>Q(e.yacas)),[])}}),W.of({name:`Z80`,extensions:[`z80`],load(){return J(()=>import(`./z80-Bnez4vZ_.js`).then(e=>Q(e.z80)),[])}}),W.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.mscgen)),[])}}),W.of({name:`Xù`,extensions:[`xu`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.xu)),[])}}),W.of({name:`MsGenny`,extensions:[`msgenny`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.msgenny)),[])}}),W.of({name:`Vue`,extensions:[`vue`],load(){return J(()=>import(`./dist-DkB8rcXn.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),W.of({name:`Angular Template`,load(){return J(()=>import(`./dist-CTHOp2HH.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],hM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},gM={borderLeftWidth:`2px`},_M={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},vM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},yM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},bM={borderRadius:`2px`},xM={borderRadius:`2px`},SM={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},CM={width:`12px`,height:`12px`,borderRadius:`6px`},wM={borderRadius:`4px`,padding:`2px 6px`},TM={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},EM=`#0d1117`,DM=`#c9d1d9`,OM=`#264F78`,kM=`#8b949e`,AM=`#ffffff`,jM=`#7ee787`,MM=`#d2a8ff`,NM=`#79c0ff`,PM=`#ff7b72`,FM=`#a5d6ff`,IM=`#2c333a`,LM=`#3c444d`,RM=`#ffab70`,zM=`#161b22`,BM=`#30363d`,VM=`#21262d`,HM=`#f97583`,UM=`#2d333b1a`,WM=`#21262d`,GM=AM,KM=OM,qM=`#3a587a75`,JM=`#4d90fe`,YM=`#d29922`,XM=`#3a587a55`,ZM=`#58a6ff`,QM=`#bc8cff`,$M=`#2ea04350`,eN=`#f8514940`,tN=`#7ee787`,nN=`#ff7b72`,rN=[I.theme({"&":{color:DM,backgroundColor:EM,fontSize:hM.fontSize,fontFamily:hM.fontFamily},".cm-content":{caretColor:GM,lineHeight:hM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:GM,borderLeftWidth:gM.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${GM}99`,color:EM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KM},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${NM}`,color:DM,borderRadius:wM.borderRadius,"& span":{color:DM}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:JM,color:AM,padding:wM.padding,"& span":{color:AM}},".cm-search.cm-panel.cm-textfield":{color:DM,borderRadius:wM.borderRadius,padding:wM.padding},".cm-panels":{backgroundColor:WM,color:DM,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${BM}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${BM}`},".cm-panel button":{backgroundColor:WM,color:DM,border:yM.border,borderRadius:yM.borderRadius,padding:yM.padding},".cm-panel button:hover":{backgroundColor:IM},".cm-activeLine":{backgroundColor:UM,borderRadius:bM.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:zM,color:kM,border:vM.border,borderRight:`1px solid #30363d`,paddingRight:vM.paddingRight},".cm-activeLineGutter":{backgroundColor:VM,color:DM,fontWeight:vM.fontWeight},".cm-lineNumbers":{fontSize:vM.fontSize,lineHeight:vM.lineHeight},".cm-foldGutter":{fontSize:vM.fontSize,lineHeight:vM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:kM,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:DM},".cm-insertedLine":{textDecoration:_M.insertedTextDecoration,backgroundColor:$M,color:tN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:_M.insertedTextDecoration,backgroundColor:`${$M} !important`,color:tN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious,border:`1px solid ${tN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:_M.deletedTextDecoration,backgroundColor:eN,color:nN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:_M.deletedTextDecoration,backgroundColor:`${eN} !important`,color:nN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious,border:`1px solid ${nN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:WM,border:`1px solid ${BM}`,borderRadius:TM.borderRadius,padding:TM.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:WM,border:`none`},"& > ul > li":{padding:TM.padding,lineHeight:TM.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KM,color:AM,borderRadius:TM.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:kM,paddingRight:TM.paddingRight},"& > ul > li > span.cm-completionDetail":{color:kM,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:WM,borderBottomColor:WM},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HM}`},"&-warning":{borderLeft:`3px solid ${YM}`},"&-info":{borderLeft:`3px solid ${ZM}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HM}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${YM}`},".cm-matchingBracket":{backgroundColor:qM,outline:`1px solid ${JM}`,borderRadius:xM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${HM}`,borderRadius:xM.borderRadius},".cm-selectionMatch":{backgroundColor:XM,outline:`1px solid ${OM}50`,borderRadius:xM.borderRadius},".cm-foldPlaceholder":{backgroundColor:WM,color:kM,border:`1px dotted ${BM}70`,borderRadius:SM.borderRadius,padding:SM.padding,margin:SM.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${EM}, 0 0 0 3px ${ZM}40`},"& .cm-scroller::-webkit-scrollbar":{width:CM.width,height:CM.height},"& .cm-scroller::-webkit-scrollbar-track":{background:zM},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:BM,borderRadius:CM.borderRadius,border:`3px solid ${zM}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:LM},".cm-ghostText":{opacity:`0.5`,color:kM}},{dark:!0}),D(V.define([{tag:A.keyword,color:PM,fontWeight:`bold`},{tag:A.controlKeyword,color:PM,fontWeight:`bold`},{tag:A.moduleKeyword,color:PM,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:NM},{tag:[A.variableName],color:NM},{tag:[A.propertyName],color:MM,fontStyle:`normal`},{tag:[A.typeName],color:PM},{tag:[A.className],color:MM,fontStyle:`italic`},{tag:[A.namespace],color:NM,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:DM},{tag:[A.bracket],color:kM},{tag:[A.brace],color:kM},{tag:[A.punctuation],color:kM},{tag:[A.function(A.variableName),A.labelName],color:jM},{tag:[A.definition(A.variableName)],color:NM},{tag:A.number,color:RM},{tag:A.changed,color:RM},{tag:A.annotation,color:HM,fontStyle:`italic`},{tag:A.modifier,color:RM,fontStyle:`italic`},{tag:A.self,color:RM},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:RM},{tag:[A.atom,A.bool,A.special(A.variableName)],color:RM},{tag:[A.processingInstruction,A.inserted],color:jM},{tag:[A.special(A.string),A.regexp],color:FM},{tag:A.string,color:FM},{tag:A.definition(A.typeName),color:PM,fontWeight:`bold`},{tag:A.meta,color:kM},{tag:A.comment,fontStyle:`italic`,color:kM},{tag:A.docComment,fontStyle:`italic`,color:kM},{tag:[A.tagName],color:jM},{tag:[A.attributeName],color:MM},{tag:[A.heading],fontWeight:`bold`,color:NM},{tag:[A.strong],fontWeight:`bold`,color:NM},{tag:[A.emphasis],fontStyle:`italic`,color:FM},{tag:[A.link],color:QM,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:ZM,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:DM,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HM}`},{tag:[A.strikethrough],color:HM,textDecoration:`line-through`},{tag:A.constant(A.name),color:RM},{tag:A.deleted,color:HM},{tag:A.squareBracket,color:kM},{tag:A.angleBracket,color:kM},{tag:A.monospace,color:DM},{tag:[A.contentSeparator],color:NM},{tag:A.quote,color:kM}]))],iN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},aN={borderLeftWidth:`2px`},oN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},sN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},cN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},lN={borderRadius:`2px`},uN={borderRadius:`2px`},dN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},fN={width:`12px`,height:`12px`,borderRadius:`6px`},pN={borderRadius:`4px`,padding:`2px 6px`},mN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},hN=`#ffffff`,gN=`#24292e`,_N=`#BBDFFF`,vN=`#6e7781`,yN=`#f6f8fa`,bN=`#116329`,xN=`#6a737d`,SN=`#6f42c1`,CN=`#005cc5`,wN=`#d73a49`,TN=`#032f62`,EN=`#22863a`,DN=`#e36209`,ape=`#f1f8ff`,ON=`#e1e4e8`,ope=`#f8f9fa`,kN=`#cb2431`,spe=`#BBDFFF20`,AN=ope,jN=gN,cpe=_N,lpe=`#e8f0fe`,upe=`#0366d6`,MN=`#b08800`,NN=`#79b8ff40`,PN=`#0969da`,dpe=`#8250df`,FN=`#e6ffec80`,IN=`#ffebe980`,LN=`#0f6d31`,RN=`#cf222e`,zN=[I.theme({"&":{color:gN,backgroundColor:hN,fontSize:iN.fontSize,fontFamily:iN.fontFamily},".cm-content":{caretColor:jN,lineHeight:iN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:jN,borderLeftWidth:aN.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${jN}99`,color:hN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:cpe,color:gN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${CN}`,color:gN,borderRadius:pN.borderRadius,"& span":{color:gN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:hN,padding:pN.padding,"& span":{color:hN}},".cm-search.cm-panel.cm-textfield":{color:gN,borderRadius:pN.borderRadius,padding:pN.padding},".cm-panels":{backgroundColor:yN,color:vN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ON}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ON}`},".cm-panel button":{backgroundColor:hN,color:gN,border:cN.border,borderRadius:cN.borderRadius,padding:cN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:spe,borderRadius:lN.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yN,color:vN,border:sN.border,borderRight:`1px solid ${ON}`,paddingRight:sN.paddingRight},".cm-activeLineGutter":{backgroundColor:ape,color:gN,fontWeight:sN.fontWeight},".cm-lineNumbers":{fontSize:sN.fontSize,lineHeight:sN.lineHeight},".cm-foldGutter":{fontSize:sN.fontSize,lineHeight:sN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:vN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:gN},".cm-insertedLine":{textDecoration:oN.insertedTextDecoration,backgroundColor:FN,color:LN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:oN.insertedTextDecoration,backgroundColor:`${FN} !important`,color:LN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious,border:`1px solid ${LN}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:oN.deletedTextDecoration,backgroundColor:IN,color:RN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:oN.deletedTextDecoration,backgroundColor:`${IN} !important`,color:RN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious,border:`1px solid ${RN}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:AN,border:`1px solid ${ON}`,borderRadius:mN.borderRadius,padding:mN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:AN,border:`none`},"& > ul > li":{padding:mN.padding,lineHeight:mN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:gN,borderRadius:mN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:vN,paddingRight:mN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:vN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:AN,borderBottomColor:AN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${kN}`},"&-warning":{borderLeft:`3px solid ${MN}`},"&-info":{borderLeft:`3px solid ${PN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${kN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${MN}`},".cm-matchingBracket":{backgroundColor:lpe,outline:`1px solid ${upe}80`,borderRadius:uN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${kN}`,borderRadius:uN.borderRadius},".cm-selectionMatch":{backgroundColor:NN,outline:`1px solid ${_N}50`,borderRadius:uN.borderRadius},".cm-foldPlaceholder":{backgroundColor:NN,color:vN,border:`1px dotted ${ON}70`,borderRadius:dN.borderRadius,padding:dN.padding,margin:dN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${hN}, 0 0 0 3px ${PN}40`},"& .cm-scroller::-webkit-scrollbar":{width:fN.width,height:fN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ON},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:gN,borderRadius:fN.borderRadius,border:`3px solid ${ON}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:xN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(V.define([{tag:A.keyword,color:wN,fontWeight:`bold`},{tag:A.controlKeyword,color:wN,fontWeight:`bold`},{tag:A.moduleKeyword,color:wN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:CN},{tag:[A.variableName],color:CN},{tag:[A.propertyName],color:SN,fontStyle:`normal`},{tag:[A.typeName],color:wN},{tag:[A.className],color:SN,fontStyle:`italic`},{tag:[A.namespace],color:CN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:gN},{tag:[A.bracket],color:xN},{tag:[A.brace],color:xN},{tag:[A.punctuation],color:xN},{tag:[A.function(A.variableName),A.labelName],color:EN},{tag:[A.definition(A.variableName)],color:CN},{tag:A.number,color:DN},{tag:A.changed,color:DN},{tag:A.annotation,color:kN,fontStyle:`italic`},{tag:A.modifier,color:DN,fontStyle:`italic`},{tag:A.self,color:DN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:DN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:DN},{tag:[A.processingInstruction,A.inserted],color:EN},{tag:[A.special(A.string),A.regexp],color:TN},{tag:A.string,color:TN},{tag:A.definition(A.typeName),color:wN,fontWeight:`bold`},{tag:A.meta,color:xN},{tag:A.comment,fontStyle:`italic`,color:xN},{tag:A.docComment,fontStyle:`italic`,color:xN},{tag:[A.tagName],color:bN},{tag:[A.attributeName],color:SN},{tag:[A.heading],fontWeight:`bold`,color:CN},{tag:[A.strong],fontWeight:`bold`,color:CN},{tag:[A.emphasis],fontStyle:`italic`,color:TN},{tag:[A.link],color:dpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:PN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${kN}`},{tag:[A.strikethrough],color:kN,textDecoration:`line-through`},{tag:A.constant(A.name),color:DN},{tag:A.deleted,color:kN},{tag:A.squareBracket,color:xN},{tag:A.angleBracket,color:xN},{tag:A.monospace,color:gN},{tag:[A.contentSeparator],color:CN},{tag:A.quote,color:xN}]))],BN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},fpe={borderLeftWidth:`2px`},VN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},HN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},UN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ppe={borderRadius:`2px`},WN={borderRadius:`2px`},GN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},KN={width:`12px`,height:`12px`,borderRadius:`6px`},qN={borderRadius:`4px`,padding:`2px 6px`},JN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},YN=`#282828`,XN=`#3c3836`,ZN=`#504945`,QN=`#665c54`,mpe=`#7c6f64`,$N=`#928374`,eP=`#fbf1c7`,tP=`#ebdbb2`,nP=`#fb4934`,rP=`#b8bb26`,iP=`#fabd2f`,aP=`#83a598`,oP=`#d3869b`,sP=`#8ec07c`,cP=`#fe8019`,lP=nP,hpe=XN,gpe=`#3c383660`,_pe=YN,uP=XN,dP=ZN,vpe=`#665c5480`,fP=cP,ype=`#504945cc`,bpe=iP,pP=iP,mP=aP,xpe=oP,hP=`#32361a80`,gP=`#3c1f1e80`,_P=`#b8bb26`,vP=`#fb4934`,Spe=[I.theme({"&":{color:tP,backgroundColor:_pe,fontSize:BN.fontSize,fontFamily:BN.fontFamily},".cm-content":{caretColor:fP,lineHeight:BN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:fP,borderLeftWidth:fpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${fP}99`,color:YN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:dP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${iP}`,color:eP,borderRadius:qN.borderRadius,"& span":{color:eP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:cP,color:YN,padding:qN.padding,"& span":{color:YN}},".cm-search.cm-panel.cm-textfield":{color:tP,borderRadius:qN.borderRadius,padding:qN.padding},".cm-panels":{backgroundColor:uP,color:tP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${QN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${QN}`},".cm-panel button":{backgroundColor:uP,color:tP,border:UN.border,borderRadius:UN.borderRadius,padding:UN.padding},".cm-panel button:hover":{backgroundColor:ZN},".cm-activeLine":{backgroundColor:gpe,borderRadius:ppe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:XN,color:$N,border:HN.border,borderRight:`1px solid ${ZN}`,paddingRight:HN.paddingRight},".cm-activeLineGutter":{backgroundColor:hpe,color:tP,fontWeight:HN.fontWeight},".cm-lineNumbers":{fontSize:HN.fontSize,lineHeight:HN.lineHeight},".cm-foldGutter":{fontSize:HN.fontSize,lineHeight:HN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$N,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:tP},".cm-insertedLine":{textDecoration:VN.insertedTextDecoration,backgroundColor:hP,color:_P,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:VN.insertedTextDecoration,backgroundColor:`${hP} !important`,color:_P,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious,border:`1px solid ${_P}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:VN.deletedTextDecoration,backgroundColor:gP,color:vP,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:VN.deletedTextDecoration,backgroundColor:`${gP} !important`,color:vP,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious,border:`1px solid ${vP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:uP,border:`1px solid ${QN}`,borderRadius:JN.borderRadius,padding:JN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:uP,border:`none`},"& > ul > li":{padding:JN.padding,lineHeight:JN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:dP,color:eP,borderRadius:JN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$N,paddingRight:JN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$N,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:uP,borderBottomColor:uP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${lP}`},"&-warning":{borderLeft:`3px solid ${pP}`},"&-info":{borderLeft:`3px solid ${mP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${lP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${pP}`},".cm-matchingBracket":{backgroundColor:ype,outline:`1px solid ${bpe}`,borderRadius:WN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${lP}`,borderRadius:WN.borderRadius},".cm-selectionMatch":{backgroundColor:vpe,outline:`1px solid ${QN}`,borderRadius:WN.borderRadius},".cm-foldPlaceholder":{backgroundColor:uP,color:$N,border:`1px dotted ${QN}`,borderRadius:GN.borderRadius,padding:GN.padding,margin:GN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${YN}, 0 0 0 3px ${cP}40`},"& .cm-scroller::-webkit-scrollbar":{width:KN.width,height:KN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:XN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:QN,borderRadius:KN.borderRadius,border:`3px solid ${XN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:mpe},".cm-ghostText":{opacity:`0.5`,color:$N}},{dark:!0}),D(V.define([{tag:A.keyword,color:nP,fontWeight:`bold`},{tag:A.controlKeyword,color:nP,fontWeight:`bold`},{tag:A.moduleKeyword,color:nP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:aP},{tag:[A.variableName],color:aP},{tag:[A.propertyName],color:sP,fontStyle:`normal`},{tag:[A.typeName],color:sP},{tag:[A.className],color:iP,fontStyle:`italic`},{tag:[A.namespace],color:aP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:tP},{tag:[A.bracket],color:$N},{tag:[A.brace],color:$N},{tag:[A.punctuation],color:$N},{tag:[A.function(A.variableName),A.labelName],color:iP},{tag:[A.definition(A.variableName)],color:aP},{tag:A.number,color:oP},{tag:A.changed,color:oP},{tag:A.annotation,color:lP,fontStyle:`italic`},{tag:A.modifier,color:oP,fontStyle:`italic`},{tag:A.self,color:oP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:cP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:cP},{tag:[A.processingInstruction,A.inserted],color:rP},{tag:[A.special(A.string),A.regexp],color:rP},{tag:A.string,color:rP},{tag:A.definition(A.typeName),color:sP,fontWeight:`bold`},{tag:A.meta,color:$N},{tag:A.comment,fontStyle:`italic`,color:$N},{tag:A.docComment,fontStyle:`italic`,color:$N},{tag:[A.tagName],color:nP},{tag:[A.attributeName],color:iP},{tag:[A.heading],fontWeight:`bold`,color:iP},{tag:[A.strong],fontWeight:`bold`,color:iP},{tag:[A.emphasis],fontStyle:`italic`,color:rP},{tag:[A.link],color:xpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:mP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:tP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${lP}`},{tag:[A.strikethrough],color:lP,textDecoration:`line-through`},{tag:A.constant(A.name),color:cP},{tag:A.deleted,color:lP},{tag:A.squareBracket,color:$N},{tag:A.angleBracket,color:$N},{tag:A.monospace,color:tP},{tag:[A.contentSeparator],color:aP},{tag:A.quote,color:$N}]))],yP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Cpe={borderLeftWidth:`2px`},bP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},xP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},SP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},wpe={borderRadius:`2px`},CP={borderRadius:`2px`},wP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},TP={width:`12px`,height:`12px`,borderRadius:`6px`},EP={borderRadius:`4px`,padding:`2px 6px`},DP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},OP=`#3c3836`,Tpe=`#504945`,Epe=`#665c54`,kP=`#7c6f64`,AP=`#928374`,jP=`#fbf1c7`,MP=`#ebdbb2`,NP=`#d5c4a1`,PP=`#bdae93`,Dpe=`#a89984`,FP=`#9d0006`,IP=`#79740e`,LP=`#b57614`,RP=`#076678`,zP=`#8f3f71`,BP=`#427b58`,VP=`#af3a03`,HP=FP,Ope=MP,kpe=`#ffc42e25`,Ape=jP,UP=MP,jpe=Ope,Mpe=`#ffc42e40`,WP=VP,Npe=`#d5c4a180`,Ppe=VP,GP=LP,KP=RP,Fpe=zP,qP=`#d8e5bc80`,JP=`#f7cfcf80`,YP=`#79740e`,XP=`#9d0006`,Ipe=[I.theme({"&":{color:OP,backgroundColor:Ape,fontSize:yP.fontSize,fontFamily:yP.fontFamily},".cm-content":{caretColor:WP,lineHeight:yP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:WP,borderLeftWidth:Cpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${WP}99`,color:jP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:jpe,color:OP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${VP}`,color:OP,borderRadius:EP.borderRadius,"& span":{color:OP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:VP,color:jP,padding:EP.padding,"& span":{color:jP}},".cm-search.cm-panel.cm-textfield":{color:OP,borderRadius:EP.borderRadius,padding:EP.padding},".cm-panels":{backgroundColor:MP,color:Tpe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${PP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${PP}`},".cm-panel button":{backgroundColor:jP,color:OP,border:SP.border,borderRadius:SP.borderRadius,padding:SP.padding},".cm-panel button:hover":{backgroundColor:NP},".cm-activeLine":{backgroundColor:kpe,borderRadius:wpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:MP,color:kP,border:xP.border,borderRight:`1px solid ${PP}`,paddingRight:xP.paddingRight},".cm-activeLineGutter":{backgroundColor:NP,color:OP,fontWeight:xP.fontWeight},".cm-lineNumbers":{fontSize:xP.fontSize,lineHeight:xP.lineHeight},".cm-foldGutter":{fontSize:xP.fontSize,lineHeight:xP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:kP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:OP},".cm-insertedLine":{textDecoration:bP.insertedTextDecoration,backgroundColor:qP,color:YP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:bP.insertedTextDecoration,backgroundColor:`${qP} !important`,color:YP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious,border:`1px solid ${YP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:bP.deletedTextDecoration,backgroundColor:JP,color:XP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:bP.deletedTextDecoration,backgroundColor:`${JP} !important`,color:XP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious,border:`1px solid ${XP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:UP,border:`1px solid ${PP}`,borderRadius:DP.borderRadius,padding:DP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:UP,border:`none`},"& > ul > li":{padding:DP.padding,lineHeight:DP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:VP+`30`,color:OP,borderRadius:DP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:VP+`15`},"& > ul > li > span.cm-completionIcon":{color:kP,paddingRight:DP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:kP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:UP,borderBottomColor:UP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HP}`},"&-warning":{borderLeft:`3px solid ${GP}`},"&-info":{borderLeft:`3px solid ${KP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${GP}`},".cm-matchingBracket":{backgroundColor:Npe,outline:`1px solid ${Ppe}`,borderRadius:CP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${HP}`,borderRadius:CP.borderRadius},".cm-selectionMatch":{backgroundColor:Mpe,outline:`1px solid ${PP}`,borderRadius:CP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:Epe,border:`1px dotted ${PP}`,borderRadius:wP.borderRadius,padding:wP.padding,margin:wP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${jP}, 0 0 0 3px ${VP}40`},"& .cm-scroller::-webkit-scrollbar":{width:TP.width,height:TP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:jP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:PP,borderRadius:TP.borderRadius,border:`3px solid ${jP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Dpe},".cm-ghostText":{opacity:`0.5`,color:AP}},{dark:!1}),D(V.define([{tag:A.keyword,color:FP,fontWeight:`bold`},{tag:A.controlKeyword,color:FP,fontWeight:`bold`},{tag:A.moduleKeyword,color:FP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:RP},{tag:[A.variableName],color:RP},{tag:[A.propertyName],color:BP,fontStyle:`normal`},{tag:[A.typeName],color:BP},{tag:[A.className],color:LP,fontStyle:`italic`},{tag:[A.namespace],color:RP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:OP},{tag:[A.bracket],color:AP},{tag:[A.brace],color:AP},{tag:[A.punctuation],color:AP},{tag:[A.function(A.variableName),A.labelName],color:LP},{tag:[A.definition(A.variableName)],color:RP},{tag:A.number,color:zP},{tag:A.changed,color:zP},{tag:A.annotation,color:HP,fontStyle:`italic`},{tag:A.modifier,color:zP,fontStyle:`italic`},{tag:A.self,color:zP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:VP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:VP},{tag:[A.processingInstruction,A.inserted],color:IP},{tag:[A.special(A.string),A.regexp],color:IP},{tag:A.string,color:IP},{tag:A.definition(A.typeName),color:BP,fontWeight:`bold`},{tag:A.meta,color:AP},{tag:A.comment,fontStyle:`italic`,color:AP},{tag:A.docComment,fontStyle:`italic`,color:AP},{tag:[A.tagName],color:FP},{tag:[A.attributeName],color:LP},{tag:[A.heading],fontWeight:`bold`,color:LP},{tag:[A.strong],fontWeight:`bold`,color:LP},{tag:[A.emphasis],fontStyle:`italic`,color:IP},{tag:[A.link],color:Fpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:KP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:OP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HP}`},{tag:[A.strikethrough],color:HP,textDecoration:`line-through`},{tag:A.constant(A.name),color:VP},{tag:A.deleted,color:HP},{tag:A.squareBracket,color:AP},{tag:A.angleBracket,color:AP},{tag:A.monospace,color:OP},{tag:[A.contentSeparator],color:RP},{tag:A.quote,color:AP}]))],ZP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Lpe={borderLeftWidth:`2px`},QP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},$P={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},eF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Rpe={borderRadius:`2px`},tF={borderRadius:`2px`},nF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},rF={width:`12px`,height:`12px`,borderRadius:`6px`},iF={borderRadius:`4px`,padding:`2px 6px`},aF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},oF=`#212121`,sF=`#505d64`,cF=`#606f7a`,lF=`#707d8b`,zpe=`#a0a4ae`,uF=`#bdbdbd`,dF=`#e0e0e0`,Bpe=`#202325`,fF=`#ff5f52`,pF=`#ff6e40`,Vpe=`#fa5788`,mF=`#facf4e`,hF=`#ffad42`,gF=`#56c8d8`,_F=`#7186f0`,vF=`#cf6edf`,Hpe=`#6abf69`,Upe=`#99d066`,Wpe=`#4ebaaa`,yF=fF,bF=Bpe,Gpe=`#2d333b30`,xF=oF,SF=sF,CF=`#ffffff1f`,Kpe=`#4A707A80`,wF=zpe,qpe=`#39496650`,Jpe=gF,TF=hF,EF=gF,Ype=vF,DF=`#1e3d2780`,OF=`#4e282880`,kF=`#6abf69`,AF=`#ff5f52`,Xpe=[I.theme({"&":{color:uF,backgroundColor:xF,fontSize:ZP.fontSize,fontFamily:ZP.fontFamily},".cm-content":{caretColor:wF,lineHeight:ZP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:wF,borderLeftWidth:Lpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${wF}99`,color:xF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:CF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${gF}`,color:dF,borderRadius:iF.borderRadius,"& span":{color:dF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:gF,color:xF,padding:iF.padding,"& span":{color:xF}},".cm-search.cm-panel.cm-textfield":{color:uF,borderRadius:iF.borderRadius,padding:iF.padding},".cm-panels":{backgroundColor:oF,color:uF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${lF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${lF}`},".cm-panel button":{backgroundColor:SF,color:uF,border:eF.border,borderRadius:eF.borderRadius,padding:eF.padding},".cm-panel button:hover":{backgroundColor:cF},".cm-activeLine":{backgroundColor:Gpe,borderRadius:Rpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:bF,color:lF,border:$P.border,borderRight:`1px solid ${sF}`,paddingRight:$P.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:uF,fontWeight:$P.fontWeight},".cm-lineNumbers":{fontSize:$P.fontSize,lineHeight:$P.lineHeight},".cm-foldGutter":{fontSize:$P.fontSize,lineHeight:$P.lineHeight},".cm-foldGutter .cm-gutterElement":{color:lF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:uF},".cm-insertedLine":{textDecoration:QP.insertedTextDecoration,backgroundColor:DF,color:kF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:QP.insertedTextDecoration,backgroundColor:`${DF} !important`,color:kF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious,border:`1px solid ${kF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:QP.deletedTextDecoration,backgroundColor:OF,color:AF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:QP.deletedTextDecoration,backgroundColor:`${OF} !important`,color:AF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious,border:`1px solid ${AF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:SF,border:`1px solid ${lF}`,borderRadius:aF.borderRadius,padding:aF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:SF,border:`none`},"& > ul > li":{padding:aF.padding,lineHeight:aF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:CF,color:dF,borderRadius:aF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:lF,paddingRight:aF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:lF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:SF,borderBottomColor:SF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${yF}`},"&-warning":{borderLeft:`3px solid ${TF}`},"&-info":{borderLeft:`3px solid ${EF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${yF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${TF}`},".cm-matchingBracket":{backgroundColor:qpe,outline:`1px solid ${Jpe}`,borderRadius:tF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${yF}`,borderRadius:tF.borderRadius},".cm-selectionMatch":{backgroundColor:Kpe,outline:`1px solid ${cF}50`,borderRadius:tF.borderRadius},".cm-foldPlaceholder":{backgroundColor:SF,color:lF,border:`1px dotted ${lF}70`,borderRadius:nF.borderRadius,padding:nF.padding,margin:nF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${xF}, 0 0 0 3px ${gF}40`},"& .cm-scroller::-webkit-scrollbar":{width:rF.width,height:rF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:bF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:cF,borderRadius:rF.borderRadius,border:`3px solid ${bF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:lF},".cm-ghostText":{opacity:`0.5`,color:lF}},{dark:!0}),D(V.define([{tag:A.keyword,color:fF,fontWeight:`bold`},{tag:A.controlKeyword,color:fF,fontWeight:`bold`},{tag:A.moduleKeyword,color:fF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:_F},{tag:[A.variableName],color:Upe},{tag:[A.propertyName],color:vF,fontStyle:`normal`},{tag:[A.typeName],color:fF},{tag:[A.className],color:mF,fontStyle:`italic`},{tag:[A.namespace],color:_F,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:uF},{tag:[A.bracket],color:lF},{tag:[A.brace],color:lF},{tag:[A.punctuation],color:lF},{tag:[A.function(A.variableName)],color:gF},{tag:[A.labelName],color:gF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:gF},{tag:[A.definition(A.variableName)],color:_F},{tag:A.number,color:mF},{tag:A.changed,color:mF},{tag:A.annotation,color:yF,fontStyle:`italic`},{tag:A.modifier,color:pF,fontStyle:`italic`},{tag:A.self,color:pF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:pF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:pF},{tag:[A.processingInstruction,A.inserted],color:Hpe},{tag:[A.special(A.string),A.regexp],color:Vpe},{tag:A.string,color:hF},{tag:A.definition(A.typeName),color:fF,fontWeight:`bold`},{tag:A.meta,color:lF},{tag:A.comment,fontStyle:`italic`,color:lF},{tag:A.docComment,fontStyle:`italic`,color:lF},{tag:[A.tagName],color:vF},{tag:[A.attributeName],color:mF},{tag:[A.heading],fontWeight:`bold`,color:Wpe},{tag:A.heading1,color:mF},{tag:A.heading2,color:hF},{tag:A.heading3,color:gF},{tag:A.heading4,color:_F},{tag:A.heading5,color:vF},{tag:A.heading6,color:fF},{tag:[A.strong],fontWeight:`bold`,color:_F},{tag:[A.emphasis],fontStyle:`italic`,color:hF},{tag:[A.link],color:Ype,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:EF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:uF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${yF}`},{tag:[A.strikethrough],color:yF,textDecoration:`line-through`},{tag:A.constant(A.name),color:pF},{tag:A.deleted,color:yF},{tag:A.squareBracket,color:lF},{tag:A.angleBracket,color:lF},{tag:A.monospace,color:uF},{tag:[A.contentSeparator],color:_F},{tag:A.quote,color:lF}]))],jF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Zpe={borderLeftWidth:`2px`},MF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},NF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},PF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Qpe={borderRadius:`2px`},FF={borderRadius:`2px`},IF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},LF={width:`12px`,height:`12px`,borderRadius:`6px`},RF={borderRadius:`4px`,padding:`2px 6px`},zF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},$pe=`#ffffff`,BF=`#f5f5f5`,VF=`#212121`,HF=`#757575`,UF=`#9e9e9e`,WF=`#424242`,eme=`#eeeeee`,GF=`#fafafa`,KF=`#f44336`,qF=`#ff3e00`,JF=`#FF00E9FF`,tme=`#ffc107`,YF=`#ff9800`,XF=`#00acc1`,ZF=`#3949ab`,QF=`#8e24aa`,$F=`#43a047`,eI=`#00897b`,tI=`#1e88e5`,nI=KF,nme=`#00000008`,rI=$pe,iI=BF,rme=`#DDEEFF`,ime=`#90a4ae26`,aI=UF,ame=`#DDEEFF80`,ome=XF,oI=YF,sI=XF,sme=QF,cI=`#ECEFF180`,lI=`#e6ffed80`,uI=`#ffebe980`,dI=`#28a745`,fI=`#d73a49`,cme=[I.theme({"&":{color:VF,backgroundColor:rI,fontSize:jF.fontSize,fontFamily:jF.fontFamily},".cm-content":{caretColor:aI,lineHeight:jF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:aI,borderLeftWidth:Zpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${VF}99`,color:rI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:rme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${tme}`,color:VF,borderRadius:RF.borderRadius,"& span":{color:VF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:XF,color:rI,padding:RF.padding,"& span":{color:rI}},".cm-search.cm-panel.cm-textfield":{color:VF,borderRadius:RF.borderRadius,padding:RF.padding},".cm-panels":{backgroundColor:eme,color:VF,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${UF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${UF}`},".cm-panel button":{backgroundColor:iI,color:VF,border:PF.border,borderRadius:PF.borderRadius,padding:PF.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:nme,borderRadius:Qpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:GF,color:HF,border:NF.border,borderRight:`1px solid ${UF}`,paddingRight:NF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:VF,fontWeight:NF.fontWeight},".cm-lineNumbers":{fontSize:NF.fontSize,lineHeight:NF.lineHeight},".cm-foldGutter":{fontSize:NF.fontSize,lineHeight:NF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:HF,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:VF},".cm-insertedLine":{textDecoration:MF.insertedTextDecoration,backgroundColor:lI,color:dI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:MF.insertedTextDecoration,backgroundColor:`${lI} !important`,color:dI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious,border:`1px solid ${dI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:MF.deletedTextDecoration,backgroundColor:uI,color:fI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:MF.deletedTextDecoration,backgroundColor:`${uI} !important`,color:fI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious,border:`1px solid ${fI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:iI,border:`1px solid ${UF}`,borderRadius:zF.borderRadius,padding:zF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:iI,border:`none`},"& > ul > li":{padding:zF.padding,lineHeight:zF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:cI,color:VF,borderRadius:zF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:cI},"& > ul > li > span.cm-completionIcon":{color:HF,paddingRight:zF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:HF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:iI,borderBottomColor:iI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${nI}`},"&-warning":{borderLeft:`3px solid ${oI}`},"&-info":{borderLeft:`3px solid ${sI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${nI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${oI}`},".cm-matchingBracket":{backgroundColor:ame,outline:`1px solid ${ome}`,borderRadius:FF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${nI}20`,outline:`1px solid ${nI}`,borderRadius:FF.borderRadius},".cm-selectionMatch":{backgroundColor:ime,outline:`1px solid ${HF}30`,borderRadius:FF.borderRadius},".cm-foldPlaceholder":{backgroundColor:BF,color:HF,border:`1px dotted ${HF}70`,borderRadius:IF.borderRadius,padding:IF.padding,margin:IF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${rI}, 0 0 0 3px ${XF}40`},"& .cm-scroller::-webkit-scrollbar":{width:LF.width,height:LF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:GF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:HF,borderRadius:LF.borderRadius,border:`3px solid ${GF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:VF},".cm-ghostText":{opacity:`0.5`,color:HF}},{dark:!1}),D(V.define([{tag:A.keyword,color:XF,fontWeight:`bold`},{tag:A.controlKeyword,color:XF,fontWeight:`bold`},{tag:A.moduleKeyword,color:XF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WF},{tag:[A.variableName],color:WF},{tag:[A.propertyName],color:eI,fontStyle:`normal`},{tag:[A.typeName],color:YF},{tag:[A.className],color:YF,fontStyle:`italic`},{tag:[A.namespace],color:ZF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:ZF},{tag:[A.bracket],color:QF},{tag:[A.brace],color:QF},{tag:[A.punctuation],color:HF},{tag:[A.function(A.variableName)],color:qF},{tag:[A.labelName],color:tI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:qF},{tag:[A.definition(A.variableName)],color:JF},{tag:A.number,color:YF},{tag:A.changed,color:YF},{tag:A.annotation,color:nI,fontStyle:`italic`},{tag:A.modifier,color:YF,fontStyle:`italic`},{tag:A.self,color:YF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:YF},{tag:[A.atom,A.bool],color:QF},{tag:[A.processingInstruction,A.inserted],color:$F},{tag:A.string,color:$F},{tag:[A.special(A.string),A.regexp],color:JF},{tag:A.definition(A.typeName),color:JF,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:JF},{tag:A.meta,color:HF},{tag:A.comment,fontStyle:`italic`,color:HF},{tag:A.docComment,fontStyle:`italic`,color:HF},{tag:[A.tagName],color:qF},{tag:[A.attributeName],color:WF},{tag:[A.heading],fontWeight:`bold`,color:eI},{tag:A.heading1,color:tI},{tag:A.heading2,color:YF},{tag:A.heading3,color:XF},{tag:A.heading4,color:ZF},{tag:A.heading5,color:QF},{tag:A.heading6,color:$F},{tag:[A.strong],fontWeight:`bold`,color:ZF},{tag:[A.emphasis],fontStyle:`italic`,color:YF},{tag:[A.link],color:sme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:sI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:VF,textDecoration:`underline wavy`,borderBottom:`1px dotted ${KF}`},{tag:[A.strikethrough],color:nI,textDecoration:`line-through`},{tag:A.constant(A.name),color:qF},{tag:A.deleted,color:nI},{tag:A.squareBracket,color:KF},{tag:A.angleBracket,color:VF},{tag:A.monospace,color:VF},{tag:[A.contentSeparator],color:XF},{tag:A.quote,color:$F}]))],pI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},lme={borderLeftWidth:`2px`},mI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},hI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},gI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ume={borderRadius:`2px`},_I={borderRadius:`2px`},vI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},yI={width:`12px`,height:`12px`,borderRadius:`6px`},bI={borderRadius:`4px`,padding:`2px 6px`},xI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},SI=`#272822`,CI=`#f8f8f2`,wI=`#88846f`,dme=`#f8f8f0`,TI=`#F92672`,EI=`#FD971F`,DI=`#66D9EF`,OI=`#E6DB74`,kI=`#AE81FF`,AI=`#A6E22E`,jI=`#F44747`,MI=`#414339`,fme=`#3e3d3257`,NI=`#34352f`,PI=`#49483E`,pme=`#75715e70`,FI=dme,mme=`#75715E55`,hme=DI,II=EI,LI=DI,gme=kI,RI=`#3d4d3880`,zI=`#4d393980`,BI=`#A6E22E`,VI=`#F92672`,_me=[I.theme({"&":{color:CI,backgroundColor:SI,fontSize:pI.fontSize,fontFamily:pI.fontFamily},".cm-content":{caretColor:FI,lineHeight:pI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:FI,borderLeftWidth:lme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${FI}99`,color:SI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:PI},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${OI}`,color:CI,borderRadius:bI.borderRadius,"& span":{color:CI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TI,color:SI,padding:bI.padding,"& span":{color:SI}},".cm-search.cm-panel.cm-textfield":{color:CI,borderRadius:bI.borderRadius,padding:bI.padding},".cm-panels":{backgroundColor:MI,color:CI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${wI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${wI}80`},".cm-panel button":{backgroundColor:NI,color:CI,border:gI.border,borderRadius:gI.borderRadius,padding:gI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:fme,borderRadius:ume.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:MI,color:wI,border:hI.border,borderRight:`1px solid #3e3d32`,paddingRight:hI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:CI,fontWeight:hI.fontWeight},".cm-lineNumbers":{fontSize:hI.fontSize,lineHeight:hI.lineHeight},".cm-foldGutter":{fontSize:hI.fontSize,lineHeight:hI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:wI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:CI},".cm-insertedLine":{textDecoration:mI.insertedTextDecoration,backgroundColor:RI,color:BI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:mI.insertedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious,border:`1px solid ${BI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:mI.deletedTextDecoration,backgroundColor:zI,color:VI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:mI.deletedTextDecoration,backgroundColor:`${zI} !important`,color:VI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious,border:`1px solid ${VI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:NI,border:`1px solid #49483E`,borderRadius:xI.borderRadius,padding:xI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:NI,border:`none`},"& > ul > li":{padding:xI.padding,lineHeight:xI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:PI,color:CI,borderRadius:xI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:wI,paddingRight:xI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:wI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:NI,borderBottomColor:NI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${jI}`},"&-warning":{borderLeft:`3px solid ${II}`},"&-info":{borderLeft:`3px solid ${LI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${jI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${II}`},".cm-matchingBracket":{backgroundColor:mme,outline:`1px solid ${hme}`,borderRadius:_I.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${jI}`,borderRadius:_I.borderRadius},".cm-selectionMatch":{backgroundColor:pme,outline:`1px solid ${wI}50`,borderRadius:_I.borderRadius},".cm-foldPlaceholder":{backgroundColor:NI,color:wI,border:`1px dotted ${wI}70`,borderRadius:vI.borderRadius,padding:vI.padding,margin:vI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${SI}, 0 0 0 3px ${DI}40`},"& .cm-scroller::-webkit-scrollbar":{width:yI.width,height:yI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:MI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:yI.borderRadius,border:`3px solid ${MI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:wI}},{dark:!0}),D(V.define([{tag:A.keyword,color:TI,fontWeight:`bold`},{tag:A.controlKeyword,color:TI,fontWeight:`bold`},{tag:A.moduleKeyword,color:TI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:EI},{tag:[A.variableName],color:EI},{tag:[A.propertyName],color:AI,fontStyle:`normal`},{tag:[A.typeName],color:DI,fontStyle:`italic`},{tag:[A.className],color:AI,fontStyle:`italic`},{tag:[A.namespace],color:EI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:TI},{tag:[A.bracket],color:CI},{tag:[A.brace],color:CI},{tag:[A.punctuation],color:CI},{tag:[A.function(A.variableName),A.labelName],color:DI},{tag:[A.definition(A.function(A.variableName))],color:DI},{tag:[A.definition(A.variableName)],color:EI},{tag:A.number,color:kI},{tag:A.changed,color:kI},{tag:A.annotation,color:jI,fontStyle:`italic`},{tag:A.modifier,color:kI,fontStyle:`italic`},{tag:A.self,color:kI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:kI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:kI},{tag:[A.processingInstruction,A.inserted],color:AI},{tag:[A.special(A.string),A.regexp],color:OI},{tag:A.string,color:OI},{tag:A.definition(A.typeName),color:DI,fontWeight:`bold`},{tag:A.meta,color:wI},{tag:A.comment,fontStyle:`italic`,color:wI},{tag:A.docComment,fontStyle:`italic`,color:wI},{tag:[A.tagName],color:TI},{tag:[A.attributeName],color:AI},{tag:[A.heading],fontWeight:`bold`,color:AI},{tag:[A.strong],fontWeight:`bold`,color:EI},{tag:[A.emphasis],fontStyle:`italic`,color:EI},{tag:[A.link],color:gme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:LI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:CI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${jI}`},{tag:[A.strikethrough],color:jI,textDecoration:`line-through`},{tag:A.constant(A.name),color:kI},{tag:A.deleted,color:jI},{tag:A.squareBracket,color:CI},{tag:A.angleBracket,color:CI},{tag:A.monospace,color:CI},{tag:[A.contentSeparator],color:EI},{tag:A.quote,color:wI}]))],HI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},vme={borderLeftWidth:`2px`},UI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},yme={borderRadius:`2px`},KI={borderRadius:`2px`},qI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JI={width:`12px`,height:`12px`,borderRadius:`6px`},YI={borderRadius:`4px`,padding:`2px 6px`},XI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},bme=`#2e3440`,ZI=`#3b4252`,QI=`#434c5e`,$I=`#4c566a`,eL=`#d8dee9`,tL=`#eceff4`,nL=`#8fbcbb`,rL=`#88c0d0`,iL=`#81a1c1`,aL=`#5e81ac`,oL=`#bf616a`,sL=`#d08770`,cL=`#ebcb8b`,lL=`#a3be8c`,uL=`#b48ead`,xme=`#d30102`,dL=`#252a33`,Sme=`#3b425277`,fL=bme,pL=ZI,Cme=QI,wme=`#4c566a80`,mL=eL,Tme=`#4c566a55`,Eme=rL,hL=cL,gL=iL,Dme=uL,_L=`#3b4a3880`,vL=`#4a393a80`,yL=`#a3be8c`,bL=`#bf616a`,Ome=[I.theme({"&":{color:eL,backgroundColor:fL,fontSize:HI.fontSize,fontFamily:HI.fontFamily},".cm-content":{caretColor:mL,lineHeight:HI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:mL,borderLeftWidth:vme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${mL}99`,color:fL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${nL}`,color:eL,borderRadius:YI.borderRadius,"& span":{color:eL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:iL,color:tL,padding:YI.padding,"& span":{color:tL}},".cm-search.cm-panel.cm-textfield":{color:eL,borderRadius:YI.borderRadius,padding:YI.padding},".cm-panels":{backgroundColor:dL,color:eL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$I}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$I}`},".cm-panel button":{backgroundColor:pL,color:eL,border:GI.border,borderRadius:GI.borderRadius,padding:GI.padding},".cm-panel button:hover":{backgroundColor:QI},".cm-activeLine":{backgroundColor:Sme,borderRadius:yme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:dL,color:$I,border:WI.border,borderRight:`1px solid ${QI}`,paddingRight:WI.paddingRight},".cm-activeLineGutter":{backgroundColor:ZI,color:eL,fontWeight:WI.fontWeight},".cm-lineNumbers":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$I,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:eL},".cm-insertedLine":{textDecoration:UI.insertedTextDecoration,backgroundColor:_L,color:yL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UI.insertedTextDecoration,backgroundColor:`${_L} !important`,color:yL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${yL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UI.deletedTextDecoration,backgroundColor:vL,color:bL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UI.deletedTextDecoration,backgroundColor:`${vL} !important`,color:bL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${bL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:pL,border:`1px solid ${$I}`,borderRadius:XI.borderRadius,padding:XI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:pL,border:`none`},"& > ul > li":{padding:XI.padding,lineHeight:XI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:QI,color:tL,borderRadius:XI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$I,paddingRight:XI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pL,borderBottomColor:pL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${oL}`},"&-warning":{borderLeft:`3px solid ${hL}`},"&-info":{borderLeft:`3px solid ${gL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${oL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${hL}`},".cm-matchingBracket":{backgroundColor:Tme,outline:`1px solid ${Eme}`,borderRadius:KI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${oL}40`,outline:`1px solid ${xme}`,borderRadius:KI.borderRadius},".cm-selectionMatch":{backgroundColor:wme,outline:`1px solid ${QI}50`,borderRadius:KI.borderRadius},".cm-foldPlaceholder":{backgroundColor:pL,color:$I,border:`1px dotted ${$I}70`,borderRadius:qI.borderRadius,padding:qI.padding,margin:qI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${fL}, 0 0 0 3px ${rL}40`},"& .cm-scroller::-webkit-scrollbar":{width:JI.width,height:JI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:dL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:QI,borderRadius:JI.borderRadius,border:`3px solid ${dL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:$I},".cm-ghostText":{opacity:`0.5`,color:$I}},{dark:!0}),D(V.define([{tag:A.keyword,color:aL,fontWeight:`bold`},{tag:A.controlKeyword,color:aL,fontWeight:`bold`},{tag:A.moduleKeyword,color:aL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:rL},{tag:[A.variableName],color:eL},{tag:[A.propertyName],color:rL,fontStyle:`normal`},{tag:[A.typeName],color:cL},{tag:[A.className],color:cL,fontStyle:`italic`},{tag:[A.namespace],color:iL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:uL},{tag:[A.bracket],color:eL},{tag:[A.brace],color:nL},{tag:[A.punctuation],color:eL},{tag:[A.function(A.variableName),A.labelName],color:nL},{tag:[A.definition(A.function(A.variableName))],color:nL},{tag:[A.definition(A.variableName)],color:sL},{tag:A.number,color:sL},{tag:A.changed,color:uL},{tag:A.annotation,color:oL,fontStyle:`italic`},{tag:A.modifier,color:uL,fontStyle:`italic`},{tag:A.self,color:uL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:sL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:uL},{tag:[A.processingInstruction,A.inserted],color:nL},{tag:[A.special(A.string),A.regexp],color:uL},{tag:A.string,color:lL},{tag:A.definition(A.typeName),color:cL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:lL},{tag:A.meta,color:$I},{tag:A.comment,fontStyle:`italic`,color:$I},{tag:A.docComment,fontStyle:`italic`,color:$I},{tag:[A.tagName],color:oL},{tag:[A.attributeName],color:cL},{tag:[A.heading],fontWeight:`bold`,color:iL},{tag:[A.strong],fontWeight:`bold`,color:rL},{tag:[A.emphasis],fontStyle:`italic`,color:cL},{tag:[A.link],color:Dme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:gL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:eL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${oL}`},{tag:[A.strikethrough],color:oL,textDecoration:`line-through`},{tag:A.constant(A.name),color:sL},{tag:A.deleted,color:oL},{tag:A.squareBracket,color:oL},{tag:A.angleBracket,color:sL},{tag:A.monospace,color:eL,fontStyle:`italic`},{tag:[A.contentSeparator],color:iL},{tag:A.quote,color:uL}]))],xL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},kme={borderLeftWidth:`2px`},SL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},CL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},wL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ame={borderRadius:`2px`},TL={borderRadius:`2px`},EL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},DL={width:`12px`,height:`12px`,borderRadius:`6px`},OL={borderRadius:`4px`,padding:`2px 6px`},kL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},jme=`#e1e2e7`,AL=`#3760bf`,jL=`#99a7df`,ML=`#848cb5`,Mme=`#8c91a8`,NL=`#3760bf`,PL=`#e9e9ec`,FL=`#d5d6db`,IL=`#f52a65`,LL=`#b15c00`,RL=`#8c6c3e`,zL=`#587539`,BL=`#007197`,VL=`#2e7de9`,HL=`#7847bd`,Nme=`#9854f1`,UL=IL,WL=FL,Pme=`#5F5FAF5A`,GL=jme,KL=PL,qL=`#99a7df40`,Fme=`#99a7df60`,JL=AL,Ime=`#0e639c20`,Lme=BL,YL=LL,XL=BL,Rme=HL,ZL=`#58753920`,QL=`#f52a6520`,$L=`#587539`,eR=`#f52a65`,zme=[I.theme({"&":{color:NL,backgroundColor:GL,fontSize:xL.fontSize,fontFamily:xL.fontFamily},".cm-content":{caretColor:JL,lineHeight:xL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:JL,borderLeftWidth:kme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${JL}99`,color:GL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${BL}`,color:NL,borderRadius:OL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BL,color:GL,padding:OL.padding,"& span":{color:GL}},".cm-search.cm-panel.cm-textfield":{color:NL,borderRadius:OL.borderRadius,padding:OL.padding},".cm-panels":{backgroundColor:PL,color:NL,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ML}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ML}30`},".cm-panel button":{backgroundColor:KL,color:NL,border:wL.border,borderRadius:wL.borderRadius,padding:wL.padding},".cm-panel button:hover":{backgroundColor:FL,border:`1px solid ${jL}`},".cm-activeLine":{backgroundColor:Pme,borderRadius:Ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:WL,color:ML,border:CL.border,borderRight:`1px solid ${FL}`,paddingRight:CL.paddingRight},".cm-activeLineGutter":{color:AL,fontWeight:CL.fontWeight},".cm-lineNumbers":{fontSize:CL.fontSize,lineHeight:CL.lineHeight},".cm-foldGutter":{fontSize:CL.fontSize,lineHeight:CL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:ML,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:AL},".cm-insertedLine":{textDecoration:SL.insertedTextDecoration,backgroundColor:ZL,color:$L,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:SL.insertedTextDecoration,backgroundColor:`${ZL} !important`,color:$L,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious,border:`1px solid ${$L}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:SL.deletedTextDecoration,backgroundColor:QL,color:eR,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:SL.deletedTextDecoration,backgroundColor:`${QL} !important`,color:eR,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious,border:`1px solid ${eR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:KL,border:`1px solid ${Mme}40`,borderRadius:kL.borderRadius,padding:kL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:KL,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:kL.padding,lineHeight:kL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:qL,color:AL,borderRadius:kL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:ML,paddingRight:kL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:ML,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:KL,borderBottomColor:KL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${UL}`},"&-warning":{borderLeft:`3px solid ${YL}`},"&-info":{borderLeft:`3px solid ${XL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${UL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${YL}`},".cm-matchingBracket":{backgroundColor:Ime,outline:`1px solid ${Lme}`,borderRadius:TL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${IL}20`,outline:`1px solid ${UL}`,borderRadius:TL.borderRadius},".cm-selectionMatch":{backgroundColor:Fme,outline:`1px solid ${jL}50`,borderRadius:TL.borderRadius},".cm-foldPlaceholder":{backgroundColor:KL,color:ML,border:`1px dotted ${ML}70`,borderRadius:EL.borderRadius,padding:EL.padding,margin:EL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${GL}, 0 0 0 3px ${BL}40`},"& .cm-scroller::-webkit-scrollbar":{width:DL.width,height:DL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:WL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ML,borderRadius:DL.borderRadius,border:`3px solid ${WL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:jL},".cm-ghostText":{opacity:`0.5`,color:ML}},{dark:!1}),D(V.define([{tag:A.keyword,color:BL,fontWeight:`bold`},{tag:A.controlKeyword,color:BL,fontWeight:`bold`},{tag:A.moduleKeyword,color:BL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:VL},{tag:[A.variableName],color:AL},{tag:[A.propertyName],color:VL,fontStyle:`normal`},{tag:[A.typeName],color:BL},{tag:[A.className],color:RL,fontStyle:`italic`},{tag:[A.namespace],color:HL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:HL},{tag:[A.bracket],color:ML},{tag:[A.brace],color:ML},{tag:[A.punctuation],color:ML},{tag:[A.function(A.variableName)],color:BL},{tag:[A.labelName],color:HL,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:BL},{tag:[A.definition(A.variableName)],color:VL},{tag:A.number,color:LL},{tag:A.changed,color:LL},{tag:A.annotation,color:UL,fontStyle:`italic`},{tag:A.modifier,color:LL,fontStyle:`italic`},{tag:A.self,color:LL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:LL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:LL},{tag:[A.processingInstruction,A.inserted],color:zL},{tag:[A.special(A.string),A.regexp],color:Nme},{tag:A.string,color:zL},{tag:A.definition(A.typeName),color:BL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:VL},{tag:A.meta,color:ML},{tag:A.comment,fontStyle:`italic`,color:ML},{tag:A.docComment,fontStyle:`italic`,color:ML},{tag:[A.tagName],color:HL},{tag:[A.attributeName],color:RL},{tag:[A.heading],fontWeight:`bold`,color:LL},{tag:A.heading1,color:LL,fontWeight:`bold`},{tag:A.heading2,color:LL},{tag:A.heading3,color:LL},{tag:A.heading4,color:BL},{tag:A.heading5,color:BL},{tag:A.heading6,color:BL},{tag:[A.strong],fontWeight:`bold`,color:AL},{tag:[A.emphasis],fontStyle:`italic`,color:zL},{tag:[A.link],color:Rme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:XL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:AL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${UL}`},{tag:[A.strikethrough],color:UL,textDecoration:`line-through`},{tag:A.constant(A.name),color:LL},{tag:A.deleted,color:UL},{tag:A.squareBracket,color:ML},{tag:A.angleBracket,color:ML},{tag:A.monospace,color:AL},{tag:[A.contentSeparator],color:VL},{tag:A.quote,color:ML}]))],tR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Bme={borderLeftWidth:`2px`},nR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},rR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},iR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Vme={borderRadius:`2px`},aR={borderRadius:`2px`},oR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},sR={width:`12px`,height:`12px`,borderRadius:`6px`},cR={borderRadius:`4px`,padding:`2px 6px`},lR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Hme=`#24283b`,uR=`#414868`,dR=`#565f89`,fR=`#c0caf5`,pR=`#282e44`,mR=`#1f2335`,Ume=`#f7768e`,hR=`#ff9e64`,gR=`#e0af68`,_R=`#9ece6a`,vR=`#2ac3de`,yR=`#7aa2f7`,bR=`#bb9af7`,xR=`#f7768e`,SR=mR,Wme=`#292e427a`,CR=Hme,wR=pR,TR=`#6f7bb630`,Gme=`#6f7bb650`,ER=fR,Kme=`#3d59a150`,qme=yR,DR=hR,OR=vR,Jme=bR,kR=`#3b4a3880`,AR=`#4a393a80`,jR=`#9ece6a`,MR=`#f7768e`,Yme=[I.theme({"&":{color:fR,backgroundColor:CR,fontSize:tR.fontSize,fontFamily:tR.fontFamily},".cm-content":{caretColor:ER,lineHeight:tR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:ER,borderLeftWidth:Bme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${ER}99`,color:CR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:TR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${yR}`,color:fR,borderRadius:cR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:yR,color:CR,padding:cR.padding,"& span":{color:CR}},".cm-search.cm-panel.cm-textfield":{color:fR,borderRadius:cR.borderRadius,padding:cR.padding},".cm-panels":{backgroundColor:pR,color:fR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${dR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${dR}`},".cm-panel button":{backgroundColor:wR,color:fR,border:iR.border,borderRadius:iR.borderRadius,padding:iR.padding},".cm-panel button:hover":{backgroundColor:mR},".cm-activeLine":{backgroundColor:Wme,borderRadius:Vme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:SR,color:dR,border:rR.border,borderRight:`1px solid ${mR}`,paddingRight:rR.paddingRight},".cm-activeLineGutter":{backgroundColor:mR,color:fR,fontWeight:rR.fontWeight},".cm-lineNumbers":{fontSize:rR.fontSize,lineHeight:rR.lineHeight},".cm-foldGutter":{fontSize:rR.fontSize,lineHeight:rR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:dR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:fR},".cm-insertedLine":{textDecoration:nR.insertedTextDecoration,backgroundColor:kR,color:jR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:nR.insertedTextDecoration,backgroundColor:`${kR} !important`,color:jR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious,border:`1px solid ${jR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:nR.deletedTextDecoration,backgroundColor:AR,color:MR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:nR.deletedTextDecoration,backgroundColor:`${AR} !important`,color:MR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious,border:`1px solid ${MR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:wR,border:`1px solid ${dR}`,borderRadius:lR.borderRadius,padding:lR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:wR,border:`none`},"& > ul > li":{padding:lR.padding,lineHeight:lR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:TR,color:fR,borderRadius:lR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:dR,paddingRight:lR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:dR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:wR,borderBottomColor:wR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${xR}`},"&-warning":{borderLeft:`3px solid ${DR}`},"&-info":{borderLeft:`3px solid ${OR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${xR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${DR}`},".cm-matchingBracket":{backgroundColor:Kme,outline:`1px solid ${qme}`,borderRadius:aR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Ume}20`,outline:`1px solid ${xR}`,borderRadius:aR.borderRadius},".cm-selectionMatch":{backgroundColor:Gme,outline:`1px solid ${uR}50`,borderRadius:aR.borderRadius},".cm-foldPlaceholder":{backgroundColor:wR,color:dR,border:`1px dotted ${dR}70`,borderRadius:oR.borderRadius,padding:oR.padding,margin:oR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${CR}, 0 0 0 3px ${yR}40`},"& .cm-scroller::-webkit-scrollbar":{width:sR.width,height:sR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:SR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:uR,borderRadius:sR.borderRadius,border:`3px solid ${SR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:dR},".cm-ghostText":{opacity:`0.5`,color:dR}},{dark:!0}),D(V.define([{tag:A.keyword,color:bR,fontWeight:`bold`},{tag:A.controlKeyword,color:bR,fontWeight:`bold`},{tag:A.moduleKeyword,color:bR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:fR},{tag:[A.variableName],color:fR},{tag:[A.propertyName],color:yR,fontStyle:`normal`},{tag:[A.typeName],color:vR},{tag:[A.className],color:gR,fontStyle:`italic`},{tag:[A.namespace],color:yR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:bR},{tag:[A.bracket],color:dR},{tag:[A.brace],color:dR},{tag:[A.punctuation],color:dR},{tag:[A.function(A.variableName)],color:yR},{tag:[A.labelName],color:yR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:yR},{tag:[A.definition(A.variableName)],color:fR},{tag:A.number,color:hR},{tag:A.changed,color:hR},{tag:A.annotation,color:xR,fontStyle:`italic`},{tag:A.modifier,color:hR,fontStyle:`italic`},{tag:A.self,color:hR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:bR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:hR},{tag:[A.processingInstruction,A.inserted],color:_R},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:_R},{tag:A.definition(A.typeName),color:vR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:fR},{tag:A.meta,color:dR},{tag:A.comment,fontStyle:`italic`,color:dR},{tag:A.docComment,fontStyle:`italic`,color:dR},{tag:[A.tagName],color:bR},{tag:[A.attributeName],color:gR},{tag:[A.heading],fontWeight:`bold`,color:`#89ddff`},{tag:A.heading1,color:`#89ddff`,fontWeight:`bold`},{tag:A.heading2,color:`#89ddff`},{tag:A.heading3,color:`#89ddff`},{tag:A.heading4,color:`#89ddff`},{tag:A.heading5,color:`#89ddff`},{tag:A.heading6,color:`#89ddff`},{tag:[A.strong],fontWeight:`bold`,color:fR},{tag:[A.emphasis],fontStyle:`italic`,color:vR},{tag:[A.link],color:Jme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:OR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${xR}`},{tag:[A.strikethrough],color:xR,textDecoration:`line-through`},{tag:A.constant(A.name),color:hR},{tag:A.deleted,color:xR},{tag:A.squareBracket,color:dR},{tag:A.angleBracket,color:dR},{tag:A.monospace,color:fR},{tag:[A.contentSeparator],color:yR},{tag:A.quote,color:dR}]))],NR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Xme={borderLeftWidth:`2px`},PR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},FR={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},IR={borderRadius:`4px`,padding:`2px 10px`},Zme={borderRadius:`2px`},LR={borderRadius:`2px`},RR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},zR={width:`12px`,height:`12px`,borderRadius:`6px`},BR={borderRadius:`4px`,padding:`2px 6px`},VR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Qme=`#1e1e1e`,HR=`#252526`,UR=`#2d2d30`,WR=`#838383`,$me=`#c6c6c6`,GR=`#d4d4d4`,KR=`#e9e9e9`,ehe=`#1c1c1c`,qR=`#569cd6`,the=`#c586c0`,JR=`#9cdcfe`,YR=`#4ec9b0`,XR=`#dcdcaa`,nhe=`#b5cea8`,ZR=`#ce9178`,QR=`#f44747`,$R=`#d7ba7d`,ez=`#6a9955`,tz=QR,nz=`#FFFFFF08`,rz=Qme,iz=HR,rhe=`#264F7899`,ihe=`#72a1ff59`,az=$me,ahe=`#ffffff15`,ohe=qR,oz=$R,sz=`#3794ff`,she=`#c586c0`,cz=`#1e3f1e80`,lz=`#4b1c1c80`,uz=`#6cc26f`,dz=`#f14c4c`,che=[I.theme({"&":{color:GR,backgroundColor:rz,fontSize:NR.fontSize,fontFamily:NR.fontFamily},".cm-content":{caretColor:az,lineHeight:NR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:az,borderLeftWidth:Xme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${az}99`,color:rz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:rhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${qR}90`,color:KR,borderRadius:BR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:KR,padding:BR.padding,"& span":{color:KR}},".cm-search.cm-panel.cm-textfield":{color:GR,borderRadius:BR.borderRadius,padding:BR.padding},".cm-panels":{backgroundColor:HR,color:GR,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${UR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${UR}`},".cm-panel button":{backgroundColor:UR,color:GR,border:`1px solid ${UR}`,borderRadius:IR.borderRadius,padding:IR.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${WR}80`},".cm-activeLine":{backgroundColor:nz,borderRadius:Zme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ehe,color:WR,border:`none`,borderRight:`1px solid ${UR}`,paddingRight:FR.paddingRight},".cm-activeLineGutter":{backgroundColor:nz,color:KR,fontWeight:FR.fontWeight},".cm-lineNumbers":{fontSize:FR.fontSize,lineHeight:FR.lineHeight},".cm-foldGutter":{fontSize:FR.fontSize,lineHeight:FR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:WR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:KR},".cm-insertedLine":{textDecoration:PR.insertedTextDecoration,backgroundColor:cz,color:uz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:PR.insertedTextDecoration,backgroundColor:`${cz} !important`,color:uz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious,border:`1px solid ${uz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:PR.deletedTextDecoration,backgroundColor:lz,color:dz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:PR.deletedTextDecoration,backgroundColor:`${lz} !important`,color:dz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious,border:`1px solid ${dz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:iz,border:`1px solid ${UR}`,borderRadius:VR.borderRadius,padding:VR.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:iz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:VR.padding,lineHeight:VR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:KR,borderRadius:VR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:WR,paddingRight:VR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:WR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:iz,borderBottomColor:iz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${tz}`},"&-warning":{borderLeft:`3px solid ${oz}`},"&-info":{borderLeft:`3px solid ${sz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${tz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${oz}`},".cm-matchingBracket":{backgroundColor:ahe,outline:`1px solid ${ohe}80`,borderRadius:LR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${QR}40`,outline:`1px solid ${tz}`,borderRadius:LR.borderRadius},".cm-selectionMatch":{backgroundColor:ihe,outline:`1px solid ${UR}70`,borderRadius:LR.borderRadius},".cm-foldPlaceholder":{backgroundColor:iz,color:WR,border:`1px dotted ${WR}70`,borderRadius:RR.borderRadius,padding:RR.padding,margin:RR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${UR}`},"& .cm-scroller::-webkit-scrollbar":{width:zR.width,height:zR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:rz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:zR.borderRadius,border:`3px solid ${rz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:WR}},{dark:!0}),D(V.define([{tag:A.keyword,color:qR,fontWeight:`bold`},{tag:A.controlKeyword,color:the,fontWeight:`bold`},{tag:A.moduleKeyword,color:qR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:GR},{tag:[A.variableName],color:JR},{tag:[A.propertyName],color:JR,fontStyle:`normal`},{tag:[A.typeName],color:YR},{tag:[A.className],color:YR,fontStyle:`normal`},{tag:[A.namespace],color:GR,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:GR},{tag:[A.bracket],color:GR},{tag:[A.brace],color:GR},{tag:[A.punctuation],color:GR},{tag:[A.function(A.variableName)],color:XR},{tag:[A.labelName],color:XR,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:XR},{tag:[A.definition(A.variableName)],color:JR},{tag:A.number,color:nhe},{tag:A.changed,color:$R},{tag:A.annotation,color:$R,fontStyle:`italic`},{tag:A.modifier,color:qR,fontStyle:`normal`},{tag:A.self,color:qR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:qR},{tag:[A.processingInstruction,A.inserted],color:ZR},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:ZR},{tag:A.definition(A.typeName),color:YR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:GR},{tag:A.meta,color:WR},{tag:A.comment,fontStyle:`italic`,color:ez},{tag:A.docComment,fontStyle:`italic`,color:ez},{tag:[A.tagName],color:qR},{tag:[A.attributeName],color:JR},{tag:[A.heading],fontWeight:`bold`,color:qR},{tag:A.heading1,color:qR,fontWeight:`bold`},{tag:A.heading2,color:qR},{tag:A.heading3,color:qR},{tag:A.heading4,color:qR},{tag:A.heading5,color:qR},{tag:A.heading6,color:qR},{tag:[A.strong],fontWeight:`bold`,color:qR},{tag:[A.emphasis],fontStyle:`italic`,color:YR},{tag:[A.link],color:she,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:sz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:GR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${tz}`},{tag:[A.strikethrough],color:tz,textDecoration:`line-through`},{tag:A.constant(A.name),color:JR},{tag:A.deleted,color:tz},{tag:A.squareBracket,color:GR},{tag:A.angleBracket,color:GR},{tag:A.monospace,color:GR},{tag:[A.contentSeparator],color:GR},{tag:A.quote,color:ez}]))],fz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},lhe={borderLeftWidth:`2px`},pz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},mz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},hz={borderRadius:`4px`,padding:`2px 10px`},uhe={borderRadius:`2px`},gz={borderRadius:`2px`},_z={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},vz={width:`12px`,height:`12px`,borderRadius:`6px`},yz={borderRadius:`4px`,padding:`2px 6px`},bz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},dhe=`#ffffff`,xz=`#f3f3f3`,Sz=`#d6d6d6`,Cz=`#6b6b6b`,fhe=`#000000`,wz=`#383a42`,Tz=`#1f1f1f`,phe=`#f5f5f5`,Ez=`#0064ff`,Dz=`#af00db`,Oz=`#0070c1`,kz=`#267f99`,Az=`#795e26`,mhe=`#098658`,jz=`#a31515`,Mz=`#e51400`,Nz=`#795e26`,Pz=`#008000`,Fz=Mz,Iz=`#99999926`,Lz=dhe,Rz=xz,hhe=`#add6ff`,ghe=`#a8ac9480`,zz=fhe,_he=`#007acc20`,vhe=`#007acc`,Bz=`#bf8803`,Vz=`#006ab1`,yhe=`#9e46d0`,Hz=`#ddfbe0`,Uz=`#ffebec`,Wz=`#22863a`,Gz=`#e51400`,bhe=[I.theme({"&":{color:wz,backgroundColor:Lz,fontSize:fz.fontSize,fontFamily:fz.fontFamily},".cm-content":{caretColor:zz,lineHeight:fz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:zz,borderLeftWidth:lhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${zz}99`,color:Lz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:hhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Oz}90`,color:Tz,borderRadius:yz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:Tz,padding:yz.padding,"& span":{color:Tz}},".cm-search.cm-panel.cm-textfield":{color:wz,borderRadius:yz.borderRadius,padding:yz.padding},".cm-panels":{backgroundColor:xz,color:wz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${Sz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${Sz}`},".cm-panel button":{backgroundColor:Lz,color:wz,border:`1px solid ${Sz}`,borderRadius:hz.borderRadius,padding:hz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Cz}80`},".cm-activeLine":{backgroundColor:Iz,borderRadius:uhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:phe,color:`#237893`,border:`none`,borderRight:`1px solid ${Sz}`,paddingRight:mz.paddingRight},".cm-activeLineGutter":{backgroundColor:Iz,color:`#0b216f`,fontWeight:mz.fontWeight},".cm-lineNumbers":{fontSize:mz.fontSize,lineHeight:mz.lineHeight},".cm-foldGutter":{fontSize:mz.fontSize,lineHeight:mz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:pz.insertedTextDecoration,backgroundColor:Hz,color:Wz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:pz.insertedTextDecoration,backgroundColor:`${Hz} !important`,color:Wz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious,border:`1px solid ${Wz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:pz.deletedTextDecoration,backgroundColor:Uz,color:Gz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:pz.deletedTextDecoration,backgroundColor:`${Uz} !important`,color:Gz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious,border:`1px solid ${Gz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Rz,border:`1px solid ${Sz}`,borderRadius:bz.borderRadius,padding:bz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Rz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:bz.padding,lineHeight:bz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:Tz,borderRadius:bz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Cz,paddingRight:bz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Cz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Rz,borderBottomColor:Rz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Fz}`},"&-warning":{borderLeft:`3px solid ${Bz}`},"&-info":{borderLeft:`3px solid ${Vz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Fz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Bz}`},".cm-matchingBracket":{backgroundColor:_he,outline:`1px solid ${vhe}80`,borderRadius:gz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Mz}20`,outline:`1px solid ${Fz}`,borderRadius:gz.borderRadius},".cm-selectionMatch":{backgroundColor:ghe,outline:`1px solid ${Sz}70`,borderRadius:gz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Rz,color:Cz,border:`1px dotted ${Cz}70`,borderRadius:_z.borderRadius,padding:_z.padding,margin:_z.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${Sz}`},"& .cm-scroller::-webkit-scrollbar":{width:vz.width,height:vz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Lz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:vz.borderRadius,border:`3px solid ${Lz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Cz}},{dark:!1}),D(V.define([{tag:A.keyword,color:Ez,fontWeight:`bold`},{tag:A.controlKeyword,color:Dz,fontWeight:`bold`},{tag:A.moduleKeyword,color:Ez,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:wz},{tag:[A.variableName],color:Oz},{tag:[A.propertyName],color:Oz,fontStyle:`normal`},{tag:[A.typeName],color:kz},{tag:[A.className],color:kz,fontStyle:`normal`},{tag:[A.namespace],color:wz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:wz},{tag:[A.bracket],color:wz},{tag:[A.brace],color:wz},{tag:[A.punctuation],color:wz},{tag:[A.function(A.variableName)],color:Az},{tag:[A.labelName],color:Az,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:Az},{tag:[A.definition(A.variableName)],color:Oz},{tag:A.number,color:mhe},{tag:A.changed,color:Nz},{tag:A.annotation,color:Nz,fontStyle:`italic`},{tag:A.modifier,color:Ez,fontStyle:`normal`},{tag:A.self,color:Ez},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Oz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Ez},{tag:[A.processingInstruction,A.inserted],color:jz},{tag:[A.special(A.string),A.regexp],color:Dz},{tag:A.string,color:jz},{tag:A.definition(A.typeName),color:kz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:wz},{tag:A.meta,color:Cz},{tag:A.comment,fontStyle:`italic`,color:Pz},{tag:A.docComment,fontStyle:`italic`,color:Pz},{tag:[A.tagName],color:Ez},{tag:[A.attributeName],color:Oz},{tag:[A.heading],fontWeight:`bold`,color:Ez},{tag:A.heading1,color:Ez,fontWeight:`bold`},{tag:A.heading2,color:Ez},{tag:A.heading3,color:Ez},{tag:A.heading4,color:Ez},{tag:A.heading5,color:Ez},{tag:A.heading6,color:Ez},{tag:[A.strong],fontWeight:`bold`,color:Ez},{tag:[A.emphasis],fontStyle:`italic`,color:Oz},{tag:[A.link],color:yhe,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Vz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:wz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Fz}`},{tag:[A.strikethrough],color:Fz,textDecoration:`line-through`},{tag:A.constant(A.name),color:Oz},{tag:A.deleted,color:Fz},{tag:A.squareBracket,color:wz},{tag:A.angleBracket,color:wz},{tag:A.monospace,color:wz},{tag:[A.contentSeparator],color:wz},{tag:A.quote,color:Pz}]))];function Kz(){return Kz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kz.apply(null,arguments)}function xhe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qz=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Jz=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(qz(e)):qz,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Le(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=_e(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=P(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(Jz.prototype[Symbol.iterator]=function(){return this});var Yz={from:-1,to:-1,match:/.*/.exec(``)},Xz=`gm`+(/x/.unicode==null?``:`u`),Zz=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Yz,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new eB(e,t,n,r,i);this.re=new RegExp(t,Xz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=tB(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=tB(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Qz=new WeakMap,$z=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=Qz.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Qz.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),Qz.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},eB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Yz,this.matchPos=tB(e,r),this.re=new RegExp(t,Xz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=$z.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=tB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=$z.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Zz.prototype[Symbol.iterator]=eB.prototype[Symbol.iterator]=function(){return this});function She(e){try{return new RegExp(e,Xz),!0}catch{return!1}}function tB(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function nB(e){let t=Ae(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=Ae(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:rB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},Ae(`label`,e.state.phrase(`Go to line`),`: `,t),` `,Ae(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),Ae(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:rB.of(!1)}),e.focus()},"aria-label":e.state.phrase(`close`),type:`button`},[`×`]));function r(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,a,o,s,c]=n,l=s?+s.slice(1):0,u=o?+o:i.number;if(o&&c){let e=u/100;a&&(e=e*(a==`-`?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&a&&(u=u*(a==`-`?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),f=ce.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[rB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var rB=ne.define(),iB=ze.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(rB)&&(e=n.value);return e},provide:e=>te.from(e,e=>e?nB:null)}),Che=e=>{let t=Ee(e,nB);if(!t){let n=[rB.of(!0)];e.state.field(iB,!1)??n.push(ne.appendConfig.of([iB,whe])),e.dispatch({effects:n}),t=Ee(e,nB)}return t&&t.dom.querySelector(`input`).select(),!0},whe=I.baseTheme({".cm-panel.cm-gotoLine":{padding:`2px 6px 4px`,position:`relative`,"& label":{fontSize:`80%`},"& [name=close]":{position:`absolute`,top:`0`,bottom:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:`0`}}}),The={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},aB=be.define({combine(e){return f(e,The,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Ehe(e){let t=[jhe,Ahe];return e&&t.push(aB.of(e)),t}var Dhe=Be.mark({class:`cm-selectionMatch`}),Ohe=Be.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function oB(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=ae.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=ae.Word)}function khe(e,t,n,r){return e(t.sliceDoc(n,n+1))==ae.Word&&e(t.sliceDoc(r-1,r))==ae.Word}var Ahe=g.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(aB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Be.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return Be.none;let e=n.wordAt(i.head);if(!e)return Be.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Be.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(oB(o,n,i.from,i.to)&&khe(o,n,i.from,i.to)))return Be.none}else if(a=n.sliceDoc(i.from,i.to),!a)return Be.none}let s=[];for(let r of e.visibleRanges){let e=new Jz(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||oB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Ohe.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Dhe.range(r,a)),s.length>t.maxMatches))return Be.none}}return Be.set(s)}},{decorations:e=>e.decorations}),jhe=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Mhe=({state:e,dispatch:t})=>{let{selection:n}=e,r=ce.create(n.ranges.map(t=>e.wordAt(t.head)||ce.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function Nhe(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Jz(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Jz(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Phe=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Mhe({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Nhe(e,r);return i?(t(e.update({selection:e.selection.addRange(ce.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},sB=be.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Khe(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),cB=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||She(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
323
+ `;)e--;this.fragmentEnd=e?e-1:0}let n=this.cursor;n||(n=this.cursor=this.fragment.tree.cursor(),n.firstChild());let r=e+this.fragment.offset;for(;n.to<=r;)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(he.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),i=e.absoluteLineStart,a=i,o=e.block.children.length,s=a,c=o;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let i=$O(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,i);else{let n=new v(e.parser.nodeSet.types[Z.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(n,t.tree),e.addNode(n,i)}if(t.type.is(`Block`)&&(Ede.indexOf(t.type.id)<0?(a=t.to-n,o=e.block.children.length):(a=s,o=c,s=t.to-n,c=e.block.children.length)),!t.nextSibling())break}for(;e.block.children.length>o;)e.block.children.pop(),e.block.positions.pop();return a-i}};function $O(e,t){let n=e;for(let r=1;r<t.length;r++){let i=t[r-1].to,a=t[r].from;i<e&&(n-=a-i)}return n}var ek=b({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),tk=new AO(new C(PO).extend(ek),Object.keys(EO).map(e=>EO[e]),Object.keys(EO).map(e=>OO[e]),Object.keys(EO),xde,sO,Object.keys(KO).map(e=>KO[e]),Object.keys(KO),[]);function nk(e,t,n){let r=[];for(let i=e.firstChild,a=t;;i=i.nextSibling){let e=i?i.from:n;if(e>a&&r.push({from:a,to:e}),!i)break;a=i.to}return r}function rk(e){let{codeParser:t,htmlParser:n}=e;return{wrap:x((e,r)=>{let i=e.type.id;if(t&&(i==Z.CodeBlock||i==Z.FencedCode)){let n=``;if(i==Z.FencedCode){let t=e.node.getChild(Z.CodeInfo);t&&(n=r.read(t.from,t.to))}let a=t(n);if(a)return{parser:a,overlay:e=>e.type.id==Z.CodeText}}else if(n&&(i==Z.HTMLBlock||i==Z.HTMLTag||i==Z.CommentBlock))return{parser:n,overlay:nk(e.node,e.from,e.to)};return null})}}var ik={resolve:`Strikethrough`,mark:`StrikethroughMark`},ak={defineNodes:[{name:`Strikethrough`,style:{"Strikethrough/...":A.strikethrough}},{name:`StrikethroughMark`,style:A.processingInstruction}],parseInline:[{name:`Strikethrough`,parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),i=e.slice(n+2,n+3),a=/\s|^$/.test(r),o=/\s|^$/.test(i),s=GO.test(r),c=GO.test(i);return e.addDelimiter(ik,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function ok(e,t,n=0,r,i=0){let a=0,o=!0,s=-1,c=-1,l=!1,u=()=>{r.push(e.elt(`TableCell`,i+s,i+c,e.parser.parseInline(t.slice(s,c),i+s)))};for(let d=n;d<t.length;d++){let n=t.charCodeAt(d);n==124&&!l?((!o||s>-1)&&a++,o=!1,r&&(s>-1&&u(),r.push(e.elt(`TableDelimiter`,d+i,d+i+1))),s=c=-1):(l||n!=32&&n!=9)&&(s<0&&(s=d),c=d+1),l=!l&&n==92}return s>-1&&(a++,r&&u()),a}function sk(e,t){for(let n=t;n<e.length;n++){let t=e.charCodeAt(n);if(t==124)return!0;t==92&&n++}return!1}var ck=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,lk=class{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&ck.test(r=t.text.slice(t.pos))){let i=[];ok(e,n.content,0,i,n.start)==ok(e,r,t.pos)&&(this.rows=[e.elt(`TableHeader`,n.start,n.start+n.content.length,i),e.elt(`TableDelimiter`,e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let n=[];ok(e,t.text,t.pos,n,e.lineStart),this.rows.push(e.elt(`TableRow`,e.lineStart+t.pos,e.lineStart+t.text.length,n))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt(`Table`,t.start,t.start+t.content.length,this.rows)),!0):!1}},uk={defineNodes:[{name:`Table`,block:!0},{name:`TableHeader`,style:{"TableHeader/...":A.heading}},`TableRow`,{name:`TableCell`,style:A.content},{name:`TableDelimiter`,style:A.processingInstruction}],parseBlock:[{name:`Table`,leaf(e,t){return sk(t.content,0)?new lk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof lk)||!sk(t.text,t.basePos))return!1;let r=e.peekLine();return ck.test(r)&&ok(e,t.text,t.basePos)==ok(e,r,t.basePos)},before:`SetextHeading`}]},dk=class{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt(`Task`,t.start,t.start+t.content.length,[e.elt(`TaskMarker`,t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}},fk={defineNodes:[{name:`Task`,block:!0,style:A.list},{name:`TaskMarker`,style:A.atom}],parseBlock:[{name:`TaskList`,leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name==`ListItem`?new dk:null},after:`SetextHeading`}]},pk=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,mk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,hk=/[\w-]+\.[\w-]+($|\/)/,gk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,_k=/\/[a-zA-Z\d@.]+/gy;function vk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function yk(e,t){mk.lastIndex=t;let n=mk.exec(e);if(!n||hk.exec(n[0])[0].indexOf(`_`)>-1)return-1;let r=t+n[0].length;for(;;){let n=e[r-1],i;if(/[?!.,:*_~]/.test(n)||n==`)`&&vk(e,t,r,`)`)>vk(e,t,r,`(`))r--;else if(n==`;`&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function bk(e,t){gk.lastIndex=t;let n=gk.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r==`_`||r==`-`?-1:t+n[0].length-(r==`.`?1:0)}var xk=[uk,fk,ak,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;pk.lastIndex=r;let i=pk.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=yk(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=bk(e.text,r):(a=bk(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(_k.lastIndex=a,i=_k.exec(e.text),i&&(a=i.index+i[0].length))),a<0)?-1:(e.addElement(e.elt(`URL`,n,a+e.offset)),a+e.offset)}}]}];function Sk(e,t,n){return(r,i,a)=>{if(i!=e||r.char(a+1)==e)return-1;let o=[r.elt(n,a,a+1)];for(let i=a+1;i<r.end;i++){let s=r.char(i);if(s==e)return r.addElement(r.elt(t,a,i+1,o.concat(r.elt(n,i,i+1))));if(s==92&&o.push(r.elt(`Escape`,i,i+++2)),cO(s))break}return-1}}var Ck={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:Sk(94,`Superscript`,`SuperscriptMark`)}]},wk={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:Sk(126,`Subscript`,`SubscriptMark`)}]},Tk={defineNodes:[{name:`Emoji`,style:A.character}],parseInline:[{name:`Emoji`,parse(e,t,n){let r;return t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end)))?-1:e.addElement(e.elt(`Emoji`,n,n+1+r[0].length))}}]},Ek=55,Dk=1,Ok=56,kk=2,Ak=57,jk=3,Mk=4,Nk=5,Pk=6,Fk=7,Ik=8,Lk=9,Rk=10,zk=11,Bk=12,Dde=13,Vk=58,Ode=14,kde=15,Hk=59,Uk=21,Ade=23,Wk=24,jde=25,Gk=27,Kk=28,Mde=29,Nde=32,Pde=35,Fde=37,Ide=38,Lde=0,Rde=1,zde={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Bde={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},qk={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Vde(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Jk=null,Yk=null,Xk=0;function Zk(e,t){let n=e.pos+t;if(Xk==n&&Yk==e)return Jk;let r=e.peek(t),i=``;for(;Vde(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Yk=e,Xk=n,Jk=i?i.toLowerCase():r==Hde||r==Ude?void 0:null}var Qk=60,$k=62,eA=47,Hde=63,Ude=33,Wde=45;function tA(e,t){this.name=e,this.parent=t}var Gde=[Pk,Rk,Fk,Ik,Lk],Kde=new je({start:null,shift(e,t,n,r){return Gde.indexOf(t)>-1?new tA(Zk(r,1)||``,e):e},reduce(e,t){return t==Uk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Pk||i==Fde?new tA(Zk(r,1)||``,e):e},strict:!1}),qde=new xe((e,t)=>{if(e.next!=Qk){e.next<0&&t.context&&e.acceptToken(Vk);return}e.advance();let n=e.next==eA;n&&e.advance();let r=Zk(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?kde:Ode);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(zk);if(i&&Bde[i])return e.acceptToken(Vk,-2);if(t.dialectEnabled(Lde))return e.acceptToken(Bk);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(Dde)}else{if(r==`script`)return e.acceptToken(Fk);if(r==`style`)return e.acceptToken(Ik);if(r==`textarea`)return e.acceptToken(Lk);if(zde.hasOwnProperty(r))return e.acceptToken(Rk);i&&qk[i]&&qk[i][r]?e.acceptToken(Vk,-1):e.acceptToken(Pk)}},{contextual:!0}),Jde=new xe(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Hk);break}if(e.next==Wde)t++;else if(e.next==$k&&t>=2){n>=3&&e.acceptToken(Hk,-2);break}else t=0;e.advance()}});function Yde(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Xde=new xe((e,t)=>{if(e.next==eA&&e.peek(1)==$k){let n=t.dialectEnabled(Rde)||Yde(t.context);e.acceptToken(n?Nk:Mk,2)}else e.next==$k&&e.acceptToken(Mk,1)});function nA(e,t,n){let r=2+e.length;return new xe(i=>{for(let a=0,o=0,s=0;;s++){if(i.next<0){s&&i.acceptToken(t);break}if(a==0&&i.next==Qk||a==1&&i.next==eA||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==$k){s>o?i.acceptToken(t,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&s){i.acceptToken(t,1);break}else a=o=0;i.advance()}})}var Zde=nA(`script`,Ek,Dk),Qde=nA(`style`,Ok,kk),$de=nA(`textarea`,Ak,jk),efe=b({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),tfe=De.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+SOMhO'#CwOOQW1G.z1G.zOOO`1G/Q1G/QOOO`1G/T1G/TOOO`1G/W1G/WOOOO'#D]'#D]O+eO7[O,59cOOQW,59c,59cOOOO'#D^'#D^O+vOMhO,59cOOOO-E7Z-E7ZOOQW1G.}1G.}OOOO-E7[-E7[",stateData:`,c~O!_OS~OUSOVPOWQOXROYTO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~`,goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:`⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl`,maxTerm:68,context:Kde,nodeProps:[[`closedBy`,-10,1,2,3,7,8,9,10,11,12,13,`EndTag`,6,`EndTag SelfClosingEndTag`,-4,22,31,34,37,`CloseTag`],[`openedBy`,4,`StartTag StartCloseTag`,5,`StartTag`,-4,30,33,36,38,`OpenTag`],[`group`,-10,14,15,18,19,20,21,40,41,42,43,`Entity`,17,`Entity TextContent`,-3,29,32,35,`TextContent Entity`],[`isolate`,-11,22,30,31,33,34,36,37,38,39,42,43,`ltr`,-3,27,28,40,``]],propSources:[efe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYlWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`aP!b`!dp!_^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ebiSlWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0rXiSqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0mS1bP;=`<%l0m[1hP;=`<%l/^!V1vciSaP!b`!dpOq&Xqr1krs&}sv1kvw0mwx(tx!P1k!P!Q&X!Q!^1k!^!_*V!_!a&X!a#s1k#s$f&X$f;'S1k;'S;=`3R<%l?Ah1k?Ah?BY&X?BY?Mn1k?MnO&X!V3UP;=`<%l1k!_3[P;=`<%l-_!Z3hV!ahaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_4WiiSlWd!ROX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst>]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zblWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOb!R!R7tP;=`<%l7S!Z8OYlWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{iiSlWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbiSlWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!V<QciSOp7Sqr;{rs7Sst0mtw;{wx7Sx!P;{!P!Q7S!Q!];{!]!^=]!^!a7S!a#s;{#s$f7S$f;'S;{;'S;=`>P<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXiSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TalWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOc!R!RAwP;=`<%lAY!ZBRYlWc!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhiSlWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbiSlWc!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbiSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXiSc!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!cxaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYliSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_kiSaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_XaP!b`!dp!fQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZiSgQaPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!b`!dpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!b`!dpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!b`!dp!ePOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!b`!dpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!b`!dpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!b`!dpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!b`!dpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!b`!dpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!b`!dpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!b`!dpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!dpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO|PP!-nP;=`<%l!-Sq!-xS!dp|POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!b`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!b`|POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!b`!dp|POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!b`!dpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!b`!dpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!b`!dpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!b`!dpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!b`!dpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!b`!dpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[Zde,Qde,$de,Xde,qde,Jde,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function rA(e,t){let n=Object.create(null);for(let r of e.getChildren(Wk)){let e=r.getChild(jde),i=r.getChild(Gk)||r.getChild(Kk);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Gk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function iA(e,t){let n=e.getChild(Ade);return n?t.read(n.from,n.to):` `}function aA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=rA(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function oA(e=[],t=[]){let n=[],r=[],i=[],a=[];for(let t of e)(t.tag==`script`?n:t.tag==`style`?r:t.tag==`textarea`?i:a).push(t);let o=t.length?Object.create(null):null;for(let e of t)(o[e.name]||(o[e.name]=[])).push(e);return x((e,t)=>{let s=e.type.id;if(s==Mde)return aA(e,t,n);if(s==Nde)return aA(e,t,r);if(s==Pde)return aA(e,t,i);if(s==Uk&&a.length){let n=e.node,r=n.firstChild,i=r&&iA(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=rA(r,t)))){let t=n.lastChild,i=t.type.id==Ide?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==Wk){let n=e.node,r;if(r=n.firstChild){let e=o[t.read(r.from,r.to)];if(e)for(let r of e){if(r.tagName&&r.tagName!=iA(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Gk){let t=e.from+1,n=e.lastChild,i=e.to-(n&&n.isError?0:1);if(i>t)return{parser:r.parser,overlay:[{from:t,to:i}]}}else if(e.type.id==Kk)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var nfe=122,sA=1,rfe=123,ife=124,cA=2,afe=125,ofe=3,sfe=4,lA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],cfe=58,lfe=40,uA=95,ufe=91,dA=45,dfe=46,ffe=35,pfe=37,mfe=38,hfe=92,gfe=10,_fe=42;function fA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function pA(e){return e>=48&&e<=57}function mA(e){return pA(e)||e>=97&&e<=102||e>=65&&e<=70}var hA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(fA(c)||c==dA||c==uA||a&&pA(c))!a&&(c!=dA||s>0)&&(a=!0),o===s&&c==dA&&o++,r.advance();else if(c==hfe&&r.peek(1)!=gfe){if(r.advance(),mA(r.next)){do r.advance();while(mA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(cA)?t:c==lfe?n:e);break}}},vfe=new xe(hA(rfe,cA,ife)),yfe=new xe(hA(afe,ofe,sfe)),bfe=new xe(e=>{if(lA.includes(e.peek(-1))){let{next:t}=e;(fA(t)||t==uA||t==ffe||t==dfe||t==_fe||t==ufe||t==cfe&&fA(e.peek(1))||t==dA||t==mfe)&&e.acceptToken(nfe)}}),xfe=new xe(e=>{if(!lA.includes(e.peek(-1))){let{next:t}=e;if(t==pfe&&(e.advance(),e.acceptToken(sA)),fA(t)){do e.advance();while(fA(e.next)||pA(e.next));e.acceptToken(sA)}}}),Sfe=b({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),Cfe={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},wfe={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Tfe={__proto__:null,selector:112,layer:166},Efe={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Dfe={__proto__:null,to:207},Ofe=De.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",stateData:"Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",goto:"2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:`⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles`,maxTerm:143,nodeProps:[[`isolate`,-2,5,36,``],[`openedBy`,20,`(`,28,`[`,31,`{`],[`closedBy`,21,`)`,29,`]`,32,`}`]],propSources:[Sfe],skippedNodes:[0,5,106],repeatNodeCount:15,tokenData:"JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",tokenizers:[bfe,xfe,vfe,yfe,1,2,3,4,new fe(`m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~`,28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:e=>Cfe[e]||-1},{term:125,get:e=>wfe[e]||-1},{term:4,get:e=>Tfe[e]||-1},{term:25,get:e=>Efe[e]||-1},{term:123,get:e=>Dfe[e]||-1}],tokenPrec:1963}),gA=null;function _A(){if(!gA&&typeof document==`object`&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)r!=`cssText`&&r!=`cssFloat`&&typeof e[r]==`string`&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));gA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return gA||[]}var vA=`active.after.any-link.autofill.backdrop.before.checked.cue.default.defined.disabled.empty.enabled.file-selector-button.first.first-child.first-letter.first-line.first-of-type.focus.focus-visible.focus-within.fullscreen.has.host.host-context.hover.in-range.indeterminate.invalid.is.lang.last-child.last-of-type.left.link.marker.modal.not.nth-child.nth-last-child.nth-last-of-type.nth-of-type.only-child.only-of-type.optional.out-of-range.part.placeholder.placeholder-shown.read-only.read-write.required.right.root.scope.selection.slotted.target.target-text.valid.visited.where`.split(`.`).map(e=>({type:`class`,label:e})),yA=`above.absolute.activeborder.additive.activecaption.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.antialiased.appworkspace.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.button-bevel.buttonface.buttonhighlight.buttonshadow.buttontext.calc.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic-abegede-gez.ethiopic-halehame-aa-er.ethiopic-halehame-gez.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.graytext.grid.groove.hand.hard-light.help.hidden.hide.higher.highlight.highlighttext.horizontal.hsl.hsla.hue.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.justify.keep-all.landscape.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-hexadecimal.lower-latin.lower-norwegian.lowercase.ltr.luminosity.manipulation.match.matrix.matrix3d.medium.menu.menutext.message-box.middle.min-intrinsic.mix.monospace.move.multiple.multiple_mask_images.multiply.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.opacity.open-quote.optimizeLegibility.optimizeSpeed.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.self-start.self-end.semi-condensed.semi-expanded.separate.serif.show.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.text.text-bottom.text-top.textarea.textfield.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.to.top.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-latin.uppercase.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`).map(e=>({type:`keyword`,label:e})).concat(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`).map(e=>({type:`constant`,label:e}))),kfe=`a.abbr.address.article.aside.b.bdi.bdo.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.dd.del.details.dfn.dialog.div.dl.dt.em.figcaption.figure.footer.form.header.hgroup.h1.h2.h3.h4.h5.h6.hr.html.i.iframe.img.input.ins.kbd.label.legend.li.main.meter.nav.ol.output.p.pre.ruby.section.select.small.source.span.strong.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.tr.u.ul`.split(`.`).map(e=>({type:`type`,label:e})),Afe=[`@charset`,`@color-profile`,`@container`,`@counter-style`,`@font-face`,`@font-feature-values`,`@font-palette-values`,`@import`,`@keyframes`,`@layer`,`@media`,`@namespace`,`@page`,`@position-try`,`@property`,`@scope`,`@starting-style`,`@supports`,`@view-transition`].map(e=>({type:`keyword`,label:e})),bA=/^(\w[\w-]*|-\w[\w-]*|)$/,jfe=/^-(-[\w-]*)?$/;function Mfe(e,t){if((e.name==`(`||e.type.isError)&&(e=e.parent||e),e.name!=`ArgList`)return!1;let n=e.parent?.firstChild;return n?.name==`Callee`?t.sliceString(n.from,n.to)==`var`:!1}var xA=new O,Nfe=[`Declaration`];function Pfe(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function SA(e,t,n){if(t.to-t.from>4096){let r=xA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of SA(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return xA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(Nfe)&&t.node.nextSibling?.name==`:`){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:`variable`}))}}),r}}var CA=e=>t=>{let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)==`-`;if(i.name==`PropertyName`||(a||i.name==`TagName`)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:_A(),validFor:bA};if(i.name==`ValueName`)return{from:i.from,options:yA,validFor:bA};if(i.name==`PseudoClassName`)return{from:i.from,options:vA,validFor:bA};if(e(i)||(t.explicit||a)&&Mfe(i,n.doc))return{from:e(i)||a?i.from:r,options:SA(n.doc,Pfe(i),e),validFor:jfe};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:_A(),validFor:bA};return{from:i.from,options:kfe,validFor:bA}}if(i.name==`AtKeyword`)return{from:i.from,options:Afe,validFor:bA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:vA,validFor:bA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:yA,validFor:bA}:o.name==`Block`||o.name==`Styles`?{from:r,options:_A(),validFor:bA}:null},wA=CA(e=>e.name==`VariableName`),TA=ke.define({name:`css`,parser:Ofe.configure({props:[l.add({Declaration:de()}),s.add({"Block KeyframeList":Re})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function EA(){return new Me(TA,TA.data.of({autocomplete:wA}))}var DA=[`_blank`,`_self`,`_top`,`_parent`],OA=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],kA=[`get`,`post`,`put`,`delete`],AA=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],jA=[`true`,`false`],MA={},Ffe={a:{attrs:{href:null,ping:null,type:null,media:null,target:DA,hreflang:null}},abbr:MA,address:MA,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:MA,aside:MA,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:MA,base:{attrs:{href:null,target:DA}},bdi:MA,bdo:MA,blockquote:{attrs:{cite:null}},body:MA,br:MA,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:AA,formmethod:kA,formnovalidate:[`novalidate`],formtarget:DA,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:MA,center:MA,cite:MA,code:MA,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:MA,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:MA,div:MA,dl:MA,dt:MA,em:MA,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:MA,figure:MA,footer:MA,form:{attrs:{action:null,name:null,"accept-charset":OA,autocomplete:[`on`,`off`],enctype:AA,method:kA,novalidate:[`novalidate`],target:DA}},h1:MA,h2:MA,h3:MA,h4:MA,h5:MA,h6:MA,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:MA,hgroup:MA,hr:MA,html:{attrs:{manifest:null}},i:MA,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:AA,formmethod:kA,formnovalidate:[`novalidate`],formtarget:DA,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:MA,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:MA,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:MA,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:OA,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:MA,noscript:MA,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:MA,param:{attrs:{name:null,value:null}},pre:MA,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:MA,rt:MA,ruby:MA,samp:MA,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:OA}},section:MA,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:MA,source:{attrs:{src:null,type:null,media:null}},span:MA,strong:MA,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:MA,summary:MA,sup:MA,table:MA,tbody:MA,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:MA,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:MA,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:MA,time:{attrs:{datetime:null}},title:MA,tr:MA,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:MA,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:MA},NA={accesskey:null,class:null,contenteditable:jA,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:jA,autocorrect:jA,autocapitalize:jA,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":jA,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":jA,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":jA,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":jA,"aria-hidden":jA,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":jA,"aria-multiselectable":jA,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":jA,"aria-relevant":null,"aria-required":jA,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},PA=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of PA)NA[e]=null;var FA=class{constructor(e,t){this.tags={...Ffe,...e},this.globalAttrs={...NA,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};FA.default=new FA;function IA(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function LA(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function RA(e,t,n){return n.tags[IA(e,LA(t))]?.children||n.allTags}function zA(e,t){let n=[];for(let r=LA(t);r&&!r.type.isTop;r=LA(r.parent)){let i=IA(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var BA=/^[:\-\.\w\u00b7-\uffff]*$/;function VA(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=LA(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:RA(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(zA(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function HA(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:zA(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:BA}}function Ife(e,t,n,r){let i=[],a=0;for(let r of RA(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of zA(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Lfe(e,t,n,r,i){let a=LA(n),o=a?t.tags[IA(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:BA}}function Rfe(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=LA(n),i=r?t.tags[IA(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function UA(e,t){let{state:n,pos:r}=t,i=p(n).resolveInner(r,-1),a=i.resolve(r);for(let e=r,t;a==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;a=i=t,e=n.from}return i.name==`TagName`?i.parent&&/CloseTag$/.test(i.parent.name)?HA(n,i,i.from,r):VA(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?VA(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?HA(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?Lfe(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?Rfe(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?Ife(n,e,i,r):null}function WA(e){return UA(FA.default,e)}function GA(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new FA(t,n):FA.default;return e=>UA(r,e)}var zfe=Ge.parser.configure({top:`SingleExpression`}),KA=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:We.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:He.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:Ve.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:zfe},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Ge.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:TA.parser}],qA=[{name:`style`,parser:TA.parser.configure({top:`Styles`})}].concat(PA.map(e=>({name:e,parser:Ge.parser}))),JA=ke.define({name:`html`,parser:tfe.configure({props:[l.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),s.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),ye.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),YA=JA.configure({wrap:oA(KA,qA)});function XA(e={}){let t=``,n;return e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=oA((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(qA))),new Me(n?JA.configure({wrap:n,dialect:t}):t?YA.configure({dialect:t}):YA,[YA.data.of({autocomplete:GA(e)}),e.autoCloseTags===!1?[]:QA,Ue().support,EA().support])}var ZA=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `)),QA=I.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!YA.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let t=o.doc.sliceString(e.from-1,e.to)==r,{head:n}=e,i=p(o).resolveInner(n,-1),a;if(t&&r==`>`&&i.name==`EndTag`){let t=i.parent;if(t.parent?.lastChild?.name!=`CloseTag`&&(a=IA(o.doc,t.parent,n))&&!ZA.has(a))return{range:e,changes:{from:n,to:n+(o.doc.sliceString(n,n+1)===`>`?1:0),insert:`</${a}>`}}}else if(t&&r==`/`&&i.name==`IncompleteCloseTag`){let e=i.parent;if(i.from==n-2&&e.lastChild?.name!=`CloseTag`&&(a=IA(o.doc,e,n))&&!ZA.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:ce.cursor(n+t.length,-1),changes:{from:n,to:e,insert:t}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),$A=ee({commentTokens:{block:{open:`<!--`,close:`-->`}}}),ej=new he,tj=tk.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||nj(e)!=null||Bfe(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),ej.add(nj),l.add({Document:()=>null}),me.add({Document:$A})]});function nj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function Bfe(e){return e.name==`OrderedList`||e.name==`BulletList`}function Vfe(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=nj(e.type))!=null&&r<=t)break;n=e}return n.to}var Hfe=Ie.of((e,t,n)=>{for(let r=p(e).resolveInner(n,-1);r&&!(r.from<t);r=r.parent){let e=r.type.prop(ej);if(e==null)continue;let t=Vfe(r,e);if(t>n)return{from:n,to:t}}return null});function rj(e){return new re($A,e,[],`markdown`)}var ij=rj(tj),aj=rj(tj.configure([xk,wk,Ck,Tk,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function Ufe(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):W.matchLanguageName(e,n,!0),t instanceof W)return t.support?t.support.language.parser:U.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var oj=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}else{for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}}marker(e,t){let n=this.node.name==`OrderedList`?String(+cj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function sj(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new oj(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new oj(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new oj(i.parent,s,s+t,a[1],e,n,i))}}return r}function cj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function lj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=cj(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function uj(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(i)!=` `)return e;let r=u(e,4,n),a=``;for(let e=r;e>0;)e>=4?(a+=` `,e-=4):(a+=` `,e--);return a+e.slice(n)}var dj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!aj.isActiveAt(t,n.from,-1)&&!aj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=sj(r.resolveInner(o,-1),i);for(;c.length&&c[c.length-1].from>o-s.from;)c.pop();if(!c.length)return a={range:n};let l=c[c.length-1];if(l.to-l.spaceAfter.length>o-s.from)return a={range:n};let d=o>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&d){let n=l.node.firstChild,r=l.node.getChild(`ListItem`,`ListItem`);if(n.to>=o||r&&r.to<o||s.from>0&&!/[^\s>]/.test(i.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(i,1)):t=s.from+(e?e.to:0);let r=[{from:t,to:o,insert:n}];return l.node.name==`OrderedList`&&lj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&lj(e.item,i,r),{range:ce.cursor(t+n.length),changes:r}}else{let e=mj(c,t,s);return{range:ce.cursor(o+e.length+1),changes:{from:s.from,insert:e+t.lineBreak}}}}if(l.node.name==`Blockquote`&&d&&s.from){let e=i.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=t.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:n.map(i),changes:i}}}let f=[];l.node.name==`OrderedList`&&lj(l.item,i,f);let p=l.item&&l.item.from<s.from,m=``;if(!p||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)m+=e==t&&!p?c[e].marker(i,1):c[e].blank(e<t?u(s.text,4,c[e+1].from)-m.length:null);let h=o;for(;h>s.from&&/\s/.test(s.text.charAt(h-s.from-1));)h--;return m=uj(m,t),Wfe(l.node,t.doc)&&(m=mj(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:ce.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},fj=dj();function pj(e){return e.name==`QuoteMark`||e.name==`ListMark`}function Wfe(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<a.number}function mj(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?u(n.text,4,e[t+1].from)-r.length:null,t<i);return uj(r,t)}function Gfe(e,t){let n=e.resolveInner(t,-1),r=t;pj(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(pj(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var hj=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&aj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=sj(Gfe(n,i),a);if(r.length){let n=r[r.length-1],a=n.to-n.spaceAfter.length+(n.spaceAfter?1:0);if(i-t.from>a&&!/\S/.test(t.text.slice(a,i-t.from)))return{range:ce.cursor(t.from+a),changes:{from:t.from+a,to:i}};if(i-t.from==a&&(!n.item||t.from<=n.item.from||!/\S/.test(t.text.slice(0,n.to)))){let r=t.from+n.from;if(n.item&&n.node.from<n.item.from&&/\S/.test(t.text.slice(n.from,n.to))){let i=n.blank(u(t.text,4,n.to)-u(t.text,4,n.from));return r==t.from&&(i=uj(i,e)),{range:ce.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:ce.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},gj=[{key:`Enter`,run:fj},{key:`Backspace`,run:hj}],_j=XA({matchClosingTags:!1});function vj(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=ij,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=_j}=e;if(!(a instanceof AO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,Hfe],d;s&&u.push(bj),n instanceof Me?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?Ufe(t,d):void 0;l.push(rk({codeParser:f,htmlParser:c.language.parser})),i&&u.push(ue.high(r.of(gj)));let p=rj(a.configure(l));return o&&u.push(p.data.of({autocomplete:Kfe})),new Me(p,u)}function Kfe(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let i=p(t).resolveInner(n,-1);for(;i&&!i.type.isTop;){if(i.name==`CodeBlock`||i.name==`FencedCode`||i.name==`ProcessingInstructionBlock`||i.name==`CommentBlock`||i.name==`Link`||i.name==`Image`)return null;i=i.parent}return{from:n-r[0].length,to:n,options:qfe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var yj=null;function qfe(){if(yj)return yj;let e=WA(new Xe(Te.create({extensions:_j}),0,!0));return yj=e?e.options:[]}var Jfe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,bj=I.domEventHandlers({paste:(e,t)=>{let{main:n}=t.state.selection;if(n.empty)return!1;let r=e.clipboardData?.getData(`text/plain`);if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r=`https://`+r),!aj.isActiveAt(t.state,n.from,1)))return!1;let i=p(t.state),a=!1;return i.iterate({from:n.from,to:n.to,enter:e=>{(e.from>n.from||Jfe.test(e.name))&&(a=!0)},leave:e=>{e.to<n.to&&(a=!0)}}),a?!1:(t.dispatch({changes:[{from:n.from,insert:`[`},{from:n.to,insert:`](${r})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}}),xj=63,Sj=64,Yfe=1,Xfe=2,Cj=3,Zfe=4,wj=5,Qfe=6,$fe=7,Tj=65,epe=66,tpe=8,npe=9,rpe=10,ipe=11,Ej=12,Dj=13,Oj=19,kj=20,Aj=29,jj=33,Mj=34,Nj=47,Pj=0,Fj=1,Ij=2,Lj=3,Rj=4,zj=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};zj.top=new zj(null,-1,Pj);function Bj(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(Hj(t)||t==-1)return n}}function Vj(e){return e==32||e==9}function Hj(e){return e==10||e==13}function Uj(e){return Vj(e)||Hj(e)}function Wj(e){return e<0||Uj(e)}var Gj=new je({start:zj.top,reduce(e,t){return e.type==Lj&&(t==kj||t==Mj)?e.parent:e},shift(e,t,n,r){if(t==Cj)return new zj(e,Bj(r,r.pos),Fj);if(t==Tj||t==wj)return new zj(e,Bj(r,r.pos),Ij);if(t==xj)return e.parent;if(t==Oj||t==jj)return new zj(e,0,Lj);if(t==Dj&&e.type==Rj)return e.parent;if(t==Nj){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new zj(e,e.depth+ +t[0],Rj)}return e},hash(e){return e.hash}});function Kj(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Wj(e.peek(n+3))}var qj=new xe((e,t)=>{if(e.next==-1&&t.canShift(Sj))return e.acceptToken(Sj);let n=e.peek(-1);if((Hj(n)||n<0)&&t.context.type!=Lj){if(Kj(e,45))if(t.canShift(xj))e.acceptToken(xj);else return e.acceptToken(Yfe,3);if(Kj(e,46))if(t.canShift(xj))e.acceptToken(xj);else return e.acceptToken(Xfe,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==Fj&&(e.next!=45||!Wj(e.peek(1))))&&e.next!=-1&&!Hj(e.next)&&e.next!=35&&e.acceptToken(xj,-n)}},{contextual:!0}),Jj=new xe((e,t)=>{if(t.context.type==Lj){e.next==63&&(e.advance(),Wj(e.next)&&e.acceptToken($fe));return}if(e.next==45)e.advance(),Wj(e.next)&&e.acceptToken(t.context.type==Fj&&t.context.depth==Bj(e,e.pos-1)?Zfe:Cj);else if(e.next==63)e.advance(),Wj(e.next)&&e.acceptToken(t.context.type==Ij&&t.context.depth==Bj(e,e.pos-1)?Qfe:wj);else{let n=e.pos;for(;;)if(Vj(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)Qj(e);else if(e.next==38)$j(e);else if(e.next==42){$j(e);break}else if(e.next==39||e.next==34){if(eM(e,!0))break;return}else if(e.next==91||e.next==123){if(!tM(e))return;break}else{aM(e,!0,!1,0);break}for(;Vj(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Aj))return;Wj(e.peek(1))&&e.acceptTokenTo(t.context.type==Ij&&t.context.depth==Bj(e,n)?epe:Tj,n)}}},{contextual:!0});function Yj(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Xj(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Zj(e,t){return e.next==37?(e.advance(),Xj(e.next)&&e.advance(),Xj(e.next)&&e.advance(),!0):Yj(e.next)||t&&e.next==44?(e.advance(),!0):!1}function Qj(e){if(e.advance(),e.next==60){for(e.advance();;)if(!Zj(e,!0)){e.next==62&&e.advance();break}}else for(;Zj(e,!1););}function $j(e){for(e.advance();!Wj(e.next)&&rM(e.tag)!=`f`;)e.advance()}function eM(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n)if(a==39)if(e.next==39)e.advance();else break;else break;else if(a==92&&n==34)e.next>=0&&e.advance();else if(Hj(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function tM(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!eM(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||Hj(e.next))return!1;else e.advance()}var nM=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function rM(e){return e<33?`u`:e>125?`s`:nM[e-33]}function iM(e,t){let n=rM(e);return n!=`u`&&!(t&&n==`f`)}function aM(e,t,n,r){if(rM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&iM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;Uj(a);){if(Hj(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?iM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:iM(a,n)))||!n&&s<=r||s==0&&!n&&(Kj(e,45,o)||Kj(e,46,o)))break;if(t&&rM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var oM=new xe((e,t)=>{if(e.next==33)Qj(e),e.acceptToken(Ej);else if(e.next==38||e.next==42){let t=e.next==38?rpe:ipe;$j(e),e.acceptToken(t)}else e.next==39||e.next==34?(eM(e,!1),e.acceptToken(npe)):aM(e,!1,t.context.type==Lj,t.context.depth)&&e.acceptToken(tpe)}),sM=new xe((e,t)=>{let n=t.context.type==Rj?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(Kj(e,45,i)||Kj(e,46,i))||!Hj(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=Hj(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(Dj,r)}),cM=b({DirectiveName:A.keyword,DirectiveContent:A.attributeValue,"DirectiveEnd DocEnd":A.meta,QuotedLiteral:A.string,BlockLiteralHeader:A.special(A.string),BlockLiteralContent:A.content,Literal:A.content,"Key/Literal Key/QuotedLiteral":A.definition(A.propertyName),"Anchor Alias":A.labelName,Tag:A.typeName,Comment:A.lineComment,": , -":A.separator,"?":A.punctuation,"[ ]":A.squareBracket,"{ }":A.brace}),lM=De.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:Gj,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[cM],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[qj,Jj,oM,sM,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),uM=De.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:`!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~`,goto:`vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS`,nodeNames:`⚠ Document Frontmatter DashLine FrontmatterContent Body`,maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),dM=ke.define({name:`yaml`,parser:lM.configure({props:[l.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Pe({closing:`}`}),FlowSequence:Pe({closing:`]`})}),s.add({"FlowMapping FlowSequence":Re,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function fM(){return new Me(dM)}ke.define({name:`yaml-frontmatter`,parser:uM.configure({props:[b({DashLine:A.meta})]})});function Q(e){return new Me(se.define(e))}function pM(e){return J(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var mM=[W.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return J(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),W.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return J(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),W.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return pM(`Cassandra`)}}),W.of({name:`CSS`,extensions:[`css`],load(){return J(()=>import(`./dist-chDDg3tV.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),W.of({name:`Go`,extensions:[`go`],load(){return J(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),W.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return J(()=>import(`./dist-CXNHfQrS.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),W.of({name:`Java`,extensions:[`java`],load(){return J(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),W.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return J(()=>import(`./dist-CkDh_aHQ.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),W.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return J(()=>import(`./dist-Bpqiuij8.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),W.of({name:`JSX`,extensions:[`jsx`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`LESS`,extensions:[`less`],load(){return J(()=>import(`./dist-37zOX9gO.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),W.of({name:`Liquid`,extensions:[`liquid`],load(){return J(()=>import(`./dist-DW-savk9.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),W.of({name:`MariaDB SQL`,load(){return pM(`MariaSQL`)}}),W.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return J(()=>import(`./dist-CUUb4d2o.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),W.of({name:`MS SQL`,load(){return pM(`MSSQL`)}}),W.of({name:`MySQL`,load(){return pM(`MySQL`)}}),W.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return J(()=>import(`./dist-BiakFiXv.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),W.of({name:`PLSQL`,extensions:[`pls`],load(){return pM(`PLSQL`)}}),W.of({name:`PostgreSQL`,load(){return pM(`PostgreSQL`)}}),W.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return J(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),W.of({name:`Rust`,extensions:[`rs`],load(){return J(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),W.of({name:`Sass`,extensions:[`sass`],load(){return J(()=>import(`./dist-CK_RJW9a.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),W.of({name:`SCSS`,extensions:[`scss`],load(){return J(()=>import(`./dist-CK_RJW9a.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),W.of({name:`SQL`,extensions:[`sql`],load(){return pM(`StandardSQL`)}}),W.of({name:`SQLite`,load(){return pM(`SQLite`)}}),W.of({name:`TSX`,extensions:[`tsx`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return J(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),W.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return J(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),W.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return J(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),W.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return J(()=>import(`./dist-D8_Nhb_E.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),W.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return J(()=>import(`./apl-CJPt5sW7.js`).then(e=>Q(e.apl)),[])}}),W.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return J(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>Q(e.asciiArmor)),[])}}),W.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return J(()=>import(`./asn1-8xgVfRoq.js`).then(e=>Q(e.asn1({}))),[])}}),W.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return J(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>Q(e.asterisk)),[])}}),W.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return J(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>Q(e.brainfuck)),[])}}),W.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return J(()=>import(`./cobol-D3WLbLVy.js`).then(e=>Q(e.cobol)),[])}}),W.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.csharp)),[])}}),W.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`ClojureScript`,extensions:[`cljs`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return J(()=>import(`./css-_6KgQwpu.js`).then(e=>Q(e.gss)),[])}}),W.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return J(()=>import(`./cmake-wWuF5ifR.js`).then(e=>Q(e.cmake)),[])}}),W.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return J(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>Q(e.coffeeScript)),[])}}),W.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return J(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>Q(e.commonLisp)),[])}}),W.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return J(()=>import(`./cypher-B3uWx7jm.js`).then(e=>Q(e.cypher)),[])}}),W.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return J(()=>import(`./python-2pwcWoy7.js`).then(e=>Q(e.cython)),[])}}),W.of({name:`Crystal`,extensions:[`cr`],load(){return J(()=>import(`./crystal-C7mEw92C.js`).then(e=>Q(e.crystal)),[])}}),W.of({name:`D`,extensions:[`d`],load(){return J(()=>import(`./d-D3kOh3JF.js`).then(e=>Q(e.d)),[])}}),W.of({name:`Dart`,extensions:[`dart`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.dart)),[])}}),W.of({name:`diff`,extensions:[`diff`,`patch`],load(){return J(()=>import(`./diff-CoamybWh.js`).then(e=>Q(e.diff)),[])}}),W.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return J(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([119,120]))}}),W.of({name:`DTD`,extensions:[`dtd`],load(){return J(()=>import(`./dtd-BjGQwMWL.js`).then(e=>Q(e.dtd)),[])}}),W.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return J(()=>import(`./dylan-B9W3X2GI.js`).then(e=>Q(e.dylan)),[])}}),W.of({name:`EBNF`,load(){return J(()=>import(`./ebnf-d5D0otVn.js`).then(e=>Q(e.ebnf)),[])}}),W.of({name:`ECL`,extensions:[`ecl`],load(){return J(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>Q(e.ecl)),[])}}),W.of({name:`edn`,extensions:[`edn`],load(){return J(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),W.of({name:`Eiffel`,extensions:[`e`],load(){return J(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>Q(e.eiffel)),[])}}),W.of({name:`Elm`,extensions:[`elm`],load(){return J(()=>import(`./elm-unPS17vB.js`).then(e=>Q(e.elm)),[])}}),W.of({name:`Erlang`,extensions:[`erl`],load(){return J(()=>import(`./erlang-R8nOsUTx.js`).then(e=>Q(e.erlang)),[])}}),W.of({name:`Esper`,load(){return J(()=>import(`./sql-CwA10oIk.js`).then(e=>Q(e.esper)),[])}}),W.of({name:`Factor`,extensions:[`factor`],load(){return J(()=>import(`./factor-DMvifS-k.js`).then(e=>Q(e.factor)),__vite__mapDeps([121,120]))}}),W.of({name:`FCL`,load(){return J(()=>import(`./fcl-CVAfW9wK.js`).then(e=>Q(e.fcl)),[])}}),W.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return J(()=>import(`./forth-DHbsK8X8.js`).then(e=>Q(e.forth)),[])}}),W.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return J(()=>import(`./fortran-4jMwxW9-.js`).then(e=>Q(e.fortran)),[])}}),W.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.fSharp)),[])}}),W.of({name:`Gas`,extensions:[`s`],load(){return J(()=>import(`./gas-zC_XGrQT.js`).then(e=>Q(e.gas)),[])}}),W.of({name:`Gherkin`,extensions:[`feature`],load(){return J(()=>import(`./gherkin-CPBQou3u.js`).then(e=>Q(e.gherkin)),[])}}),W.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return J(()=>import(`./groovy-Cqopym0q.js`).then(e=>Q(e.groovy)),[])}}),W.of({name:`Haskell`,extensions:[`hs`],load(){return J(()=>import(`./haskell-imzbNPgF.js`).then(e=>Q(e.haskell)),[])}}),W.of({name:`Haxe`,extensions:[`hx`],load(){return J(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.haxe)),[])}}),W.of({name:`HXML`,extensions:[`hxml`],load(){return J(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.hxml)),[])}}),W.of({name:`HTTP`,load(){return J(()=>import(`./http-j4R5uEso.js`).then(e=>Q(e.http)),[])}}),W.of({name:`IDL`,extensions:[`pro`],load(){return J(()=>import(`./idl-l9d1__Hj.js`).then(e=>Q(e.idl)),[])}}),W.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return J(()=>import(`./javascript-BcqCeS4O.js`).then(e=>Q(e.jsonld)),[])}}),W.of({name:`Julia`,extensions:[`jl`],load(){return J(()=>import(`./julia-BU0qBb1w.js`).then(e=>Q(e.julia)),[])}}),W.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.kotlin)),[])}}),W.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return J(()=>import(`./livescript-uk34VDGK.js`).then(e=>Q(e.liveScript)),[])}}),W.of({name:`Lua`,extensions:[`lua`],load(){return J(()=>import(`./lua-ClQGOv84.js`).then(e=>Q(e.lua)),[])}}),W.of({name:`mIRC`,extensions:[`mrc`],load(){return J(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>Q(e.mirc)),[])}}),W.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return J(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>Q(e.mathematica)),[])}}),W.of({name:`Modelica`,extensions:[`mo`],load(){return J(()=>import(`./modelica-DP8T2DKM.js`).then(e=>Q(e.modelica)),[])}}),W.of({name:`MUMPS`,extensions:[`mps`],load(){return J(()=>import(`./mumps-BKUS05-y.js`).then(e=>Q(e.mumps)),[])}}),W.of({name:`Mbox`,extensions:[`mbox`],load(){return J(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>Q(e.mbox)),[])}}),W.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return J(()=>import(`./nginx-CzYOtr2G.js`).then(e=>Q(e.nginx)),[])}}),W.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return J(()=>import(`./nsis-BbRIeGvl.js`).then(e=>Q(e.nsis)),__vite__mapDeps([122,120]))}}),W.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return J(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>Q(e.ntriples)),[])}}),W.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveC)),[])}}),W.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveCpp)),[])}}),W.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.oCaml)),[])}}),W.of({name:`Octave`,extensions:[`m`],load(){return J(()=>import(`./octave-CnOndUN3.js`).then(e=>Q(e.octave)),[])}}),W.of({name:`Oz`,extensions:[`oz`],load(){return J(()=>import(`./oz-DjW322Rn.js`).then(e=>Q(e.oz)),[])}}),W.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return J(()=>import(`./pascal-BdeW5uRX.js`).then(e=>Q(e.pascal)),[])}}),W.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return J(()=>import(`./perl-_CDvIe1D.js`).then(e=>Q(e.perl)),[])}}),W.of({name:`Pig`,extensions:[`pig`],load(){return J(()=>import(`./pig-inWo_B4W.js`).then(e=>Q(e.pig)),[])}}),W.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return J(()=>import(`./powershell-CO5KWJsy.js`).then(e=>Q(e.powerShell)),[])}}),W.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return J(()=>import(`./properties-CjVp4a6M.js`).then(e=>Q(e.properties)),[])}}),W.of({name:`ProtoBuf`,extensions:[`proto`],load(){return J(()=>import(`./protobuf-DybFT2KT.js`).then(e=>Q(e.protobuf)),[])}}),W.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return J(()=>import(`./pug-D1ZtszdL.js`).then(e=>Q(e.pug)),__vite__mapDeps([123,124]))}}),W.of({name:`Puppet`,extensions:[`pp`],load(){return J(()=>import(`./puppet-Dw_NDgko.js`).then(e=>Q(e.puppet)),[])}}),W.of({name:`Q`,extensions:[`q`],load(){return J(()=>import(`./q-C47l8kdS.js`).then(e=>Q(e.q)),[])}}),W.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return J(()=>import(`./r-BmcXGVZ5.js`).then(e=>Q(e.r)),[])}}),W.of({name:`RPM Changes`,load(){return J(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmChanges)),[])}}),W.of({name:`RPM Spec`,extensions:[`spec`],load(){return J(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmSpec)),[])}}),W.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return J(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>Q(e.ruby)),[])}}),W.of({name:`SAS`,extensions:[`sas`],load(){return J(()=>import(`./sas-Bxkg4GVX.js`).then(e=>Q(e.sas)),[])}}),W.of({name:`Scala`,extensions:[`scala`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.scala)),[])}}),W.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return J(()=>import(`./scheme-CO3zogua.js`).then(e=>Q(e.scheme)),[])}}),W.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return J(()=>import(`./shell-gYrTvBTP.js`).then(e=>Q(e.shell)),[])}}),W.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return J(()=>import(`./sieve-COX4Kn1X.js`).then(e=>Q(e.sieve)),[])}}),W.of({name:`Smalltalk`,extensions:[`st`],load(){return J(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>Q(e.smalltalk)),[])}}),W.of({name:`Solr`,load(){return J(()=>import(`./solr-BvhcdkNH.js`).then(e=>Q(e.solr)),[])}}),W.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return J(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.sml)),[])}}),W.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return J(()=>import(`./sparql-gX7W9xeh.js`).then(e=>Q(e.sparql)),[])}}),W.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return J(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>Q(e.spreadsheet)),[])}}),W.of({name:`Squirrel`,extensions:[`nut`],load(){return J(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.squirrel)),[])}}),W.of({name:`Stylus`,extensions:[`styl`],load(){return J(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>Q(e.stylus)),[])}}),W.of({name:`Swift`,extensions:[`swift`],load(){return J(()=>import(`./swift-CurfpLXH.js`).then(e=>Q(e.swift)),[])}}),W.of({name:`sTeX`,load(){return J(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),W.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return J(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),W.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return J(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),W.of({name:`Tcl`,extensions:[`tcl`],load(){return J(()=>import(`./tcl-BPvzXR-t.js`).then(e=>Q(e.tcl)),[])}}),W.of({name:`Textile`,extensions:[`textile`],load(){return J(()=>import(`./textile-BUq3vgBH.js`).then(e=>Q(e.textile)),[])}}),W.of({name:`TiddlyWiki`,load(){return J(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>Q(e.tiddlyWiki)),[])}}),W.of({name:`Tiki wiki`,load(){return J(()=>import(`./tiki-C1XMixgx.js`).then(e=>Q(e.tiki)),[])}}),W.of({name:`TOML`,extensions:[`toml`],load(){return J(()=>import(`./toml-BQjoWSzq.js`).then(e=>Q(e.toml)),[])}}),W.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return J(()=>import(`./troff-DbgTp3Cj.js`).then(e=>Q(e.troff)),[])}}),W.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return J(()=>import(`./ttcn-1OxchGWH.js`).then(e=>Q(e.ttcn)),[])}}),W.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return J(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>Q(e.ttcnCfg)),[])}}),W.of({name:`Turtle`,extensions:[`ttl`],load(){return J(()=>import(`./turtle-D1WjVU4-.js`).then(e=>Q(e.turtle)),[])}}),W.of({name:`Web IDL`,extensions:[`webidl`],load(){return J(()=>import(`./webidl-advQMGTP.js`).then(e=>Q(e.webIDL)),[])}}),W.of({name:`VB.NET`,extensions:[`vb`],load(){return J(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>Q(e.vb)),[])}}),W.of({name:`VBScript`,extensions:[`vbs`],load(){return J(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>Q(e.vbScript)),[])}}),W.of({name:`Velocity`,extensions:[`vtl`],load(){return J(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>Q(e.velocity)),[])}}),W.of({name:`Verilog`,extensions:[`v`],load(){return J(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),W.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return J(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>Q(e.vhdl)),[])}}),W.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return J(()=>import(`./xquery-CNzoFgd7.js`).then(e=>Q(e.xQuery)),[])}}),W.of({name:`Yacas`,extensions:[`ys`],load(){return J(()=>import(`./yacas-BsmlDKac.js`).then(e=>Q(e.yacas)),[])}}),W.of({name:`Z80`,extensions:[`z80`],load(){return J(()=>import(`./z80-Bnez4vZ_.js`).then(e=>Q(e.z80)),[])}}),W.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.mscgen)),[])}}),W.of({name:`Xù`,extensions:[`xu`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.xu)),[])}}),W.of({name:`MsGenny`,extensions:[`msgenny`],load(){return J(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.msgenny)),[])}}),W.of({name:`Vue`,extensions:[`vue`],load(){return J(()=>import(`./dist-vGxOx14l.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),W.of({name:`Angular Template`,load(){return J(()=>import(`./dist-2Hdh5Vgr.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],hM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},gM={borderLeftWidth:`2px`},_M={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},vM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},yM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},bM={borderRadius:`2px`},xM={borderRadius:`2px`},SM={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},CM={width:`12px`,height:`12px`,borderRadius:`6px`},wM={borderRadius:`4px`,padding:`2px 6px`},TM={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},EM=`#0d1117`,DM=`#c9d1d9`,OM=`#264F78`,kM=`#8b949e`,AM=`#ffffff`,jM=`#7ee787`,MM=`#d2a8ff`,NM=`#79c0ff`,PM=`#ff7b72`,FM=`#a5d6ff`,IM=`#2c333a`,LM=`#3c444d`,RM=`#ffab70`,zM=`#161b22`,BM=`#30363d`,VM=`#21262d`,HM=`#f97583`,UM=`#2d333b1a`,WM=`#21262d`,GM=AM,KM=OM,qM=`#3a587a75`,JM=`#4d90fe`,YM=`#d29922`,XM=`#3a587a55`,ZM=`#58a6ff`,QM=`#bc8cff`,$M=`#2ea04350`,eN=`#f8514940`,tN=`#7ee787`,nN=`#ff7b72`,rN=[I.theme({"&":{color:DM,backgroundColor:EM,fontSize:hM.fontSize,fontFamily:hM.fontFamily},".cm-content":{caretColor:GM,lineHeight:hM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:GM,borderLeftWidth:gM.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${GM}99`,color:EM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KM},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${NM}`,color:DM,borderRadius:wM.borderRadius,"& span":{color:DM}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:JM,color:AM,padding:wM.padding,"& span":{color:AM}},".cm-search.cm-panel.cm-textfield":{color:DM,borderRadius:wM.borderRadius,padding:wM.padding},".cm-panels":{backgroundColor:WM,color:DM,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${BM}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${BM}`},".cm-panel button":{backgroundColor:WM,color:DM,border:yM.border,borderRadius:yM.borderRadius,padding:yM.padding},".cm-panel button:hover":{backgroundColor:IM},".cm-activeLine":{backgroundColor:UM,borderRadius:bM.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:zM,color:kM,border:vM.border,borderRight:`1px solid #30363d`,paddingRight:vM.paddingRight},".cm-activeLineGutter":{backgroundColor:VM,color:DM,fontWeight:vM.fontWeight},".cm-lineNumbers":{fontSize:vM.fontSize,lineHeight:vM.lineHeight},".cm-foldGutter":{fontSize:vM.fontSize,lineHeight:vM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:kM,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:DM},".cm-insertedLine":{textDecoration:_M.insertedTextDecoration,backgroundColor:$M,color:tN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:_M.insertedTextDecoration,backgroundColor:`${$M} !important`,color:tN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious,border:`1px solid ${tN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:_M.deletedTextDecoration,backgroundColor:eN,color:nN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:_M.deletedTextDecoration,backgroundColor:`${eN} !important`,color:nN,padding:_M.insertedLinePadding,borderRadius:_M.borderRadious,border:`1px solid ${nN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:WM,border:`1px solid ${BM}`,borderRadius:TM.borderRadius,padding:TM.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:WM,border:`none`},"& > ul > li":{padding:TM.padding,lineHeight:TM.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KM,color:AM,borderRadius:TM.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:kM,paddingRight:TM.paddingRight},"& > ul > li > span.cm-completionDetail":{color:kM,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:WM,borderBottomColor:WM},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HM}`},"&-warning":{borderLeft:`3px solid ${YM}`},"&-info":{borderLeft:`3px solid ${ZM}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HM}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${YM}`},".cm-matchingBracket":{backgroundColor:qM,outline:`1px solid ${JM}`,borderRadius:xM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${HM}`,borderRadius:xM.borderRadius},".cm-selectionMatch":{backgroundColor:XM,outline:`1px solid ${OM}50`,borderRadius:xM.borderRadius},".cm-foldPlaceholder":{backgroundColor:WM,color:kM,border:`1px dotted ${BM}70`,borderRadius:SM.borderRadius,padding:SM.padding,margin:SM.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${EM}, 0 0 0 3px ${ZM}40`},"& .cm-scroller::-webkit-scrollbar":{width:CM.width,height:CM.height},"& .cm-scroller::-webkit-scrollbar-track":{background:zM},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:BM,borderRadius:CM.borderRadius,border:`3px solid ${zM}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:LM},".cm-ghostText":{opacity:`0.5`,color:kM}},{dark:!0}),D(V.define([{tag:A.keyword,color:PM,fontWeight:`bold`},{tag:A.controlKeyword,color:PM,fontWeight:`bold`},{tag:A.moduleKeyword,color:PM,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:NM},{tag:[A.variableName],color:NM},{tag:[A.propertyName],color:MM,fontStyle:`normal`},{tag:[A.typeName],color:PM},{tag:[A.className],color:MM,fontStyle:`italic`},{tag:[A.namespace],color:NM,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:DM},{tag:[A.bracket],color:kM},{tag:[A.brace],color:kM},{tag:[A.punctuation],color:kM},{tag:[A.function(A.variableName),A.labelName],color:jM},{tag:[A.definition(A.variableName)],color:NM},{tag:A.number,color:RM},{tag:A.changed,color:RM},{tag:A.annotation,color:HM,fontStyle:`italic`},{tag:A.modifier,color:RM,fontStyle:`italic`},{tag:A.self,color:RM},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:RM},{tag:[A.atom,A.bool,A.special(A.variableName)],color:RM},{tag:[A.processingInstruction,A.inserted],color:jM},{tag:[A.special(A.string),A.regexp],color:FM},{tag:A.string,color:FM},{tag:A.definition(A.typeName),color:PM,fontWeight:`bold`},{tag:A.meta,color:kM},{tag:A.comment,fontStyle:`italic`,color:kM},{tag:A.docComment,fontStyle:`italic`,color:kM},{tag:[A.tagName],color:jM},{tag:[A.attributeName],color:MM},{tag:[A.heading],fontWeight:`bold`,color:NM},{tag:[A.strong],fontWeight:`bold`,color:NM},{tag:[A.emphasis],fontStyle:`italic`,color:FM},{tag:[A.link],color:QM,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:ZM,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:DM,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HM}`},{tag:[A.strikethrough],color:HM,textDecoration:`line-through`},{tag:A.constant(A.name),color:RM},{tag:A.deleted,color:HM},{tag:A.squareBracket,color:kM},{tag:A.angleBracket,color:kM},{tag:A.monospace,color:DM},{tag:[A.contentSeparator],color:NM},{tag:A.quote,color:kM}]))],iN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},aN={borderLeftWidth:`2px`},oN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},sN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},cN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},lN={borderRadius:`2px`},uN={borderRadius:`2px`},dN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},fN={width:`12px`,height:`12px`,borderRadius:`6px`},pN={borderRadius:`4px`,padding:`2px 6px`},mN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},hN=`#ffffff`,gN=`#24292e`,_N=`#BBDFFF`,vN=`#6e7781`,yN=`#f6f8fa`,bN=`#116329`,xN=`#6a737d`,SN=`#6f42c1`,CN=`#005cc5`,wN=`#d73a49`,TN=`#032f62`,EN=`#22863a`,DN=`#e36209`,ape=`#f1f8ff`,ON=`#e1e4e8`,ope=`#f8f9fa`,kN=`#cb2431`,spe=`#BBDFFF20`,AN=ope,jN=gN,cpe=_N,lpe=`#e8f0fe`,upe=`#0366d6`,MN=`#b08800`,NN=`#79b8ff40`,PN=`#0969da`,dpe=`#8250df`,FN=`#e6ffec80`,IN=`#ffebe980`,LN=`#0f6d31`,RN=`#cf222e`,zN=[I.theme({"&":{color:gN,backgroundColor:hN,fontSize:iN.fontSize,fontFamily:iN.fontFamily},".cm-content":{caretColor:jN,lineHeight:iN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:jN,borderLeftWidth:aN.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${jN}99`,color:hN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:cpe,color:gN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${CN}`,color:gN,borderRadius:pN.borderRadius,"& span":{color:gN}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#79b8ff`,color:hN,padding:pN.padding,"& span":{color:hN}},".cm-search.cm-panel.cm-textfield":{color:gN,borderRadius:pN.borderRadius,padding:pN.padding},".cm-panels":{backgroundColor:yN,color:vN,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ON}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ON}`},".cm-panel button":{backgroundColor:hN,color:gN,border:cN.border,borderRadius:cN.borderRadius,padding:cN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:spe,borderRadius:lN.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yN,color:vN,border:sN.border,borderRight:`1px solid ${ON}`,paddingRight:sN.paddingRight},".cm-activeLineGutter":{backgroundColor:ape,color:gN,fontWeight:sN.fontWeight},".cm-lineNumbers":{fontSize:sN.fontSize,lineHeight:sN.lineHeight},".cm-foldGutter":{fontSize:sN.fontSize,lineHeight:sN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:vN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:gN},".cm-insertedLine":{textDecoration:oN.insertedTextDecoration,backgroundColor:FN,color:LN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:oN.insertedTextDecoration,backgroundColor:`${FN} !important`,color:LN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious,border:`1px solid ${LN}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:oN.deletedTextDecoration,backgroundColor:IN,color:RN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:oN.deletedTextDecoration,backgroundColor:`${IN} !important`,color:RN,padding:oN.insertedLinePadding,borderRadius:oN.borderRadious,border:`1px solid ${RN}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:AN,border:`1px solid ${ON}`,borderRadius:mN.borderRadius,padding:mN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:AN,border:`none`},"& > ul > li":{padding:mN.padding,lineHeight:mN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#0366d630`,color:gN,borderRadius:mN.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:`#0366d615`},"& > ul > li > span.cm-completionIcon":{color:vN,paddingRight:mN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:vN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:AN,borderBottomColor:AN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${kN}`},"&-warning":{borderLeft:`3px solid ${MN}`},"&-info":{borderLeft:`3px solid ${PN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${kN}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${MN}`},".cm-matchingBracket":{backgroundColor:lpe,outline:`1px solid ${upe}80`,borderRadius:uN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${kN}`,borderRadius:uN.borderRadius},".cm-selectionMatch":{backgroundColor:NN,outline:`1px solid ${_N}50`,borderRadius:uN.borderRadius},".cm-foldPlaceholder":{backgroundColor:NN,color:vN,border:`1px dotted ${ON}70`,borderRadius:dN.borderRadius,padding:dN.padding,margin:dN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${hN}, 0 0 0 3px ${PN}40`},"& .cm-scroller::-webkit-scrollbar":{width:fN.width,height:fN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:ON},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:gN,borderRadius:fN.borderRadius,border:`3px solid ${ON}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:xN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(V.define([{tag:A.keyword,color:wN,fontWeight:`bold`},{tag:A.controlKeyword,color:wN,fontWeight:`bold`},{tag:A.moduleKeyword,color:wN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:CN},{tag:[A.variableName],color:CN},{tag:[A.propertyName],color:SN,fontStyle:`normal`},{tag:[A.typeName],color:wN},{tag:[A.className],color:SN,fontStyle:`italic`},{tag:[A.namespace],color:CN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:gN},{tag:[A.bracket],color:xN},{tag:[A.brace],color:xN},{tag:[A.punctuation],color:xN},{tag:[A.function(A.variableName),A.labelName],color:EN},{tag:[A.definition(A.variableName)],color:CN},{tag:A.number,color:DN},{tag:A.changed,color:DN},{tag:A.annotation,color:kN,fontStyle:`italic`},{tag:A.modifier,color:DN,fontStyle:`italic`},{tag:A.self,color:DN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:DN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:DN},{tag:[A.processingInstruction,A.inserted],color:EN},{tag:[A.special(A.string),A.regexp],color:TN},{tag:A.string,color:TN},{tag:A.definition(A.typeName),color:wN,fontWeight:`bold`},{tag:A.meta,color:xN},{tag:A.comment,fontStyle:`italic`,color:xN},{tag:A.docComment,fontStyle:`italic`,color:xN},{tag:[A.tagName],color:bN},{tag:[A.attributeName],color:SN},{tag:[A.heading],fontWeight:`bold`,color:CN},{tag:[A.strong],fontWeight:`bold`,color:CN},{tag:[A.emphasis],fontStyle:`italic`,color:TN},{tag:[A.link],color:dpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:PN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${kN}`},{tag:[A.strikethrough],color:kN,textDecoration:`line-through`},{tag:A.constant(A.name),color:DN},{tag:A.deleted,color:kN},{tag:A.squareBracket,color:xN},{tag:A.angleBracket,color:xN},{tag:A.monospace,color:gN},{tag:[A.contentSeparator],color:CN},{tag:A.quote,color:xN}]))],BN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},fpe={borderLeftWidth:`2px`},VN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},HN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},UN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ppe={borderRadius:`2px`},WN={borderRadius:`2px`},GN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},KN={width:`12px`,height:`12px`,borderRadius:`6px`},qN={borderRadius:`4px`,padding:`2px 6px`},JN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},YN=`#282828`,XN=`#3c3836`,ZN=`#504945`,QN=`#665c54`,mpe=`#7c6f64`,$N=`#928374`,eP=`#fbf1c7`,tP=`#ebdbb2`,nP=`#fb4934`,rP=`#b8bb26`,iP=`#fabd2f`,aP=`#83a598`,oP=`#d3869b`,sP=`#8ec07c`,cP=`#fe8019`,lP=nP,hpe=XN,gpe=`#3c383660`,_pe=YN,uP=XN,dP=ZN,vpe=`#665c5480`,fP=cP,ype=`#504945cc`,bpe=iP,pP=iP,mP=aP,xpe=oP,hP=`#32361a80`,gP=`#3c1f1e80`,_P=`#b8bb26`,vP=`#fb4934`,Spe=[I.theme({"&":{color:tP,backgroundColor:_pe,fontSize:BN.fontSize,fontFamily:BN.fontFamily},".cm-content":{caretColor:fP,lineHeight:BN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:fP,borderLeftWidth:fpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${fP}99`,color:YN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:dP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${iP}`,color:eP,borderRadius:qN.borderRadius,"& span":{color:eP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:cP,color:YN,padding:qN.padding,"& span":{color:YN}},".cm-search.cm-panel.cm-textfield":{color:tP,borderRadius:qN.borderRadius,padding:qN.padding},".cm-panels":{backgroundColor:uP,color:tP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${QN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${QN}`},".cm-panel button":{backgroundColor:uP,color:tP,border:UN.border,borderRadius:UN.borderRadius,padding:UN.padding},".cm-panel button:hover":{backgroundColor:ZN},".cm-activeLine":{backgroundColor:gpe,borderRadius:ppe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:XN,color:$N,border:HN.border,borderRight:`1px solid ${ZN}`,paddingRight:HN.paddingRight},".cm-activeLineGutter":{backgroundColor:hpe,color:tP,fontWeight:HN.fontWeight},".cm-lineNumbers":{fontSize:HN.fontSize,lineHeight:HN.lineHeight},".cm-foldGutter":{fontSize:HN.fontSize,lineHeight:HN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$N,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:tP},".cm-insertedLine":{textDecoration:VN.insertedTextDecoration,backgroundColor:hP,color:_P,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:VN.insertedTextDecoration,backgroundColor:`${hP} !important`,color:_P,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious,border:`1px solid ${_P}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:VN.deletedTextDecoration,backgroundColor:gP,color:vP,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:VN.deletedTextDecoration,backgroundColor:`${gP} !important`,color:vP,padding:VN.insertedLinePadding,borderRadius:VN.borderRadious,border:`1px solid ${vP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:uP,border:`1px solid ${QN}`,borderRadius:JN.borderRadius,padding:JN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:uP,border:`none`},"& > ul > li":{padding:JN.padding,lineHeight:JN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:dP,color:eP,borderRadius:JN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$N,paddingRight:JN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$N,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:uP,borderBottomColor:uP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${lP}`},"&-warning":{borderLeft:`3px solid ${pP}`},"&-info":{borderLeft:`3px solid ${mP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${lP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${pP}`},".cm-matchingBracket":{backgroundColor:ype,outline:`1px solid ${bpe}`,borderRadius:WN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${lP}`,borderRadius:WN.borderRadius},".cm-selectionMatch":{backgroundColor:vpe,outline:`1px solid ${QN}`,borderRadius:WN.borderRadius},".cm-foldPlaceholder":{backgroundColor:uP,color:$N,border:`1px dotted ${QN}`,borderRadius:GN.borderRadius,padding:GN.padding,margin:GN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${YN}, 0 0 0 3px ${cP}40`},"& .cm-scroller::-webkit-scrollbar":{width:KN.width,height:KN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:XN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:QN,borderRadius:KN.borderRadius,border:`3px solid ${XN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:mpe},".cm-ghostText":{opacity:`0.5`,color:$N}},{dark:!0}),D(V.define([{tag:A.keyword,color:nP,fontWeight:`bold`},{tag:A.controlKeyword,color:nP,fontWeight:`bold`},{tag:A.moduleKeyword,color:nP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:aP},{tag:[A.variableName],color:aP},{tag:[A.propertyName],color:sP,fontStyle:`normal`},{tag:[A.typeName],color:sP},{tag:[A.className],color:iP,fontStyle:`italic`},{tag:[A.namespace],color:aP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:tP},{tag:[A.bracket],color:$N},{tag:[A.brace],color:$N},{tag:[A.punctuation],color:$N},{tag:[A.function(A.variableName),A.labelName],color:iP},{tag:[A.definition(A.variableName)],color:aP},{tag:A.number,color:oP},{tag:A.changed,color:oP},{tag:A.annotation,color:lP,fontStyle:`italic`},{tag:A.modifier,color:oP,fontStyle:`italic`},{tag:A.self,color:oP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:cP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:cP},{tag:[A.processingInstruction,A.inserted],color:rP},{tag:[A.special(A.string),A.regexp],color:rP},{tag:A.string,color:rP},{tag:A.definition(A.typeName),color:sP,fontWeight:`bold`},{tag:A.meta,color:$N},{tag:A.comment,fontStyle:`italic`,color:$N},{tag:A.docComment,fontStyle:`italic`,color:$N},{tag:[A.tagName],color:nP},{tag:[A.attributeName],color:iP},{tag:[A.heading],fontWeight:`bold`,color:iP},{tag:[A.strong],fontWeight:`bold`,color:iP},{tag:[A.emphasis],fontStyle:`italic`,color:rP},{tag:[A.link],color:xpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:mP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:tP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${lP}`},{tag:[A.strikethrough],color:lP,textDecoration:`line-through`},{tag:A.constant(A.name),color:cP},{tag:A.deleted,color:lP},{tag:A.squareBracket,color:$N},{tag:A.angleBracket,color:$N},{tag:A.monospace,color:tP},{tag:[A.contentSeparator],color:aP},{tag:A.quote,color:$N}]))],yP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Cpe={borderLeftWidth:`2px`},bP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},xP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},SP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},wpe={borderRadius:`2px`},CP={borderRadius:`2px`},wP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},TP={width:`12px`,height:`12px`,borderRadius:`6px`},EP={borderRadius:`4px`,padding:`2px 6px`},DP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},OP=`#3c3836`,Tpe=`#504945`,Epe=`#665c54`,kP=`#7c6f64`,AP=`#928374`,jP=`#fbf1c7`,MP=`#ebdbb2`,NP=`#d5c4a1`,PP=`#bdae93`,Dpe=`#a89984`,FP=`#9d0006`,IP=`#79740e`,LP=`#b57614`,RP=`#076678`,zP=`#8f3f71`,BP=`#427b58`,VP=`#af3a03`,HP=FP,Ope=MP,kpe=`#ffc42e25`,Ape=jP,UP=MP,jpe=Ope,Mpe=`#ffc42e40`,WP=VP,Npe=`#d5c4a180`,Ppe=VP,GP=LP,KP=RP,Fpe=zP,qP=`#d8e5bc80`,JP=`#f7cfcf80`,YP=`#79740e`,XP=`#9d0006`,Ipe=[I.theme({"&":{color:OP,backgroundColor:Ape,fontSize:yP.fontSize,fontFamily:yP.fontFamily},".cm-content":{caretColor:WP,lineHeight:yP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:WP,borderLeftWidth:Cpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${WP}99`,color:jP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:jpe,color:OP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${VP}`,color:OP,borderRadius:EP.borderRadius,"& span":{color:OP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:VP,color:jP,padding:EP.padding,"& span":{color:jP}},".cm-search.cm-panel.cm-textfield":{color:OP,borderRadius:EP.borderRadius,padding:EP.padding},".cm-panels":{backgroundColor:MP,color:Tpe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${PP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${PP}`},".cm-panel button":{backgroundColor:jP,color:OP,border:SP.border,borderRadius:SP.borderRadius,padding:SP.padding},".cm-panel button:hover":{backgroundColor:NP},".cm-activeLine":{backgroundColor:kpe,borderRadius:wpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:MP,color:kP,border:xP.border,borderRight:`1px solid ${PP}`,paddingRight:xP.paddingRight},".cm-activeLineGutter":{backgroundColor:NP,color:OP,fontWeight:xP.fontWeight},".cm-lineNumbers":{fontSize:xP.fontSize,lineHeight:xP.lineHeight},".cm-foldGutter":{fontSize:xP.fontSize,lineHeight:xP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:kP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:OP},".cm-insertedLine":{textDecoration:bP.insertedTextDecoration,backgroundColor:qP,color:YP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:bP.insertedTextDecoration,backgroundColor:`${qP} !important`,color:YP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious,border:`1px solid ${YP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:bP.deletedTextDecoration,backgroundColor:JP,color:XP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:bP.deletedTextDecoration,backgroundColor:`${JP} !important`,color:XP,padding:bP.insertedLinePadding,borderRadius:bP.borderRadious,border:`1px solid ${XP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:UP,border:`1px solid ${PP}`,borderRadius:DP.borderRadius,padding:DP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:UP,border:`none`},"& > ul > li":{padding:DP.padding,lineHeight:DP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:VP+`30`,color:OP,borderRadius:DP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:VP+`15`},"& > ul > li > span.cm-completionIcon":{color:kP,paddingRight:DP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:kP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:UP,borderBottomColor:UP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HP}`},"&-warning":{borderLeft:`3px solid ${GP}`},"&-info":{borderLeft:`3px solid ${KP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${GP}`},".cm-matchingBracket":{backgroundColor:Npe,outline:`1px solid ${Ppe}`,borderRadius:CP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${HP}`,borderRadius:CP.borderRadius},".cm-selectionMatch":{backgroundColor:Mpe,outline:`1px solid ${PP}`,borderRadius:CP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:Epe,border:`1px dotted ${PP}`,borderRadius:wP.borderRadius,padding:wP.padding,margin:wP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${jP}, 0 0 0 3px ${VP}40`},"& .cm-scroller::-webkit-scrollbar":{width:TP.width,height:TP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:jP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:PP,borderRadius:TP.borderRadius,border:`3px solid ${jP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Dpe},".cm-ghostText":{opacity:`0.5`,color:AP}},{dark:!1}),D(V.define([{tag:A.keyword,color:FP,fontWeight:`bold`},{tag:A.controlKeyword,color:FP,fontWeight:`bold`},{tag:A.moduleKeyword,color:FP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:RP},{tag:[A.variableName],color:RP},{tag:[A.propertyName],color:BP,fontStyle:`normal`},{tag:[A.typeName],color:BP},{tag:[A.className],color:LP,fontStyle:`italic`},{tag:[A.namespace],color:RP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:OP},{tag:[A.bracket],color:AP},{tag:[A.brace],color:AP},{tag:[A.punctuation],color:AP},{tag:[A.function(A.variableName),A.labelName],color:LP},{tag:[A.definition(A.variableName)],color:RP},{tag:A.number,color:zP},{tag:A.changed,color:zP},{tag:A.annotation,color:HP,fontStyle:`italic`},{tag:A.modifier,color:zP,fontStyle:`italic`},{tag:A.self,color:zP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:VP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:VP},{tag:[A.processingInstruction,A.inserted],color:IP},{tag:[A.special(A.string),A.regexp],color:IP},{tag:A.string,color:IP},{tag:A.definition(A.typeName),color:BP,fontWeight:`bold`},{tag:A.meta,color:AP},{tag:A.comment,fontStyle:`italic`,color:AP},{tag:A.docComment,fontStyle:`italic`,color:AP},{tag:[A.tagName],color:FP},{tag:[A.attributeName],color:LP},{tag:[A.heading],fontWeight:`bold`,color:LP},{tag:[A.strong],fontWeight:`bold`,color:LP},{tag:[A.emphasis],fontStyle:`italic`,color:IP},{tag:[A.link],color:Fpe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:KP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:OP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HP}`},{tag:[A.strikethrough],color:HP,textDecoration:`line-through`},{tag:A.constant(A.name),color:VP},{tag:A.deleted,color:HP},{tag:A.squareBracket,color:AP},{tag:A.angleBracket,color:AP},{tag:A.monospace,color:OP},{tag:[A.contentSeparator],color:RP},{tag:A.quote,color:AP}]))],ZP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Lpe={borderLeftWidth:`2px`},QP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},$P={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},eF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Rpe={borderRadius:`2px`},tF={borderRadius:`2px`},nF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},rF={width:`12px`,height:`12px`,borderRadius:`6px`},iF={borderRadius:`4px`,padding:`2px 6px`},aF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},oF=`#212121`,sF=`#505d64`,cF=`#606f7a`,lF=`#707d8b`,zpe=`#a0a4ae`,uF=`#bdbdbd`,dF=`#e0e0e0`,Bpe=`#202325`,fF=`#ff5f52`,pF=`#ff6e40`,Vpe=`#fa5788`,mF=`#facf4e`,hF=`#ffad42`,gF=`#56c8d8`,_F=`#7186f0`,vF=`#cf6edf`,Hpe=`#6abf69`,Upe=`#99d066`,Wpe=`#4ebaaa`,yF=fF,bF=Bpe,Gpe=`#2d333b30`,xF=oF,SF=sF,CF=`#ffffff1f`,Kpe=`#4A707A80`,wF=zpe,qpe=`#39496650`,Jpe=gF,TF=hF,EF=gF,Ype=vF,DF=`#1e3d2780`,OF=`#4e282880`,kF=`#6abf69`,AF=`#ff5f52`,Xpe=[I.theme({"&":{color:uF,backgroundColor:xF,fontSize:ZP.fontSize,fontFamily:ZP.fontFamily},".cm-content":{caretColor:wF,lineHeight:ZP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:wF,borderLeftWidth:Lpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${wF}99`,color:xF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:CF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${gF}`,color:dF,borderRadius:iF.borderRadius,"& span":{color:dF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:gF,color:xF,padding:iF.padding,"& span":{color:xF}},".cm-search.cm-panel.cm-textfield":{color:uF,borderRadius:iF.borderRadius,padding:iF.padding},".cm-panels":{backgroundColor:oF,color:uF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${lF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${lF}`},".cm-panel button":{backgroundColor:SF,color:uF,border:eF.border,borderRadius:eF.borderRadius,padding:eF.padding},".cm-panel button:hover":{backgroundColor:cF},".cm-activeLine":{backgroundColor:Gpe,borderRadius:Rpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:bF,color:lF,border:$P.border,borderRight:`1px solid ${sF}`,paddingRight:$P.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:uF,fontWeight:$P.fontWeight},".cm-lineNumbers":{fontSize:$P.fontSize,lineHeight:$P.lineHeight},".cm-foldGutter":{fontSize:$P.fontSize,lineHeight:$P.lineHeight},".cm-foldGutter .cm-gutterElement":{color:lF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:uF},".cm-insertedLine":{textDecoration:QP.insertedTextDecoration,backgroundColor:DF,color:kF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:QP.insertedTextDecoration,backgroundColor:`${DF} !important`,color:kF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious,border:`1px solid ${kF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:QP.deletedTextDecoration,backgroundColor:OF,color:AF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:QP.deletedTextDecoration,backgroundColor:`${OF} !important`,color:AF,padding:QP.insertedLinePadding,borderRadius:QP.borderRadious,border:`1px solid ${AF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:SF,border:`1px solid ${lF}`,borderRadius:aF.borderRadius,padding:aF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:SF,border:`none`},"& > ul > li":{padding:aF.padding,lineHeight:aF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:CF,color:dF,borderRadius:aF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:lF,paddingRight:aF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:lF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:SF,borderBottomColor:SF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${yF}`},"&-warning":{borderLeft:`3px solid ${TF}`},"&-info":{borderLeft:`3px solid ${EF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${yF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${TF}`},".cm-matchingBracket":{backgroundColor:qpe,outline:`1px solid ${Jpe}`,borderRadius:tF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${yF}`,borderRadius:tF.borderRadius},".cm-selectionMatch":{backgroundColor:Kpe,outline:`1px solid ${cF}50`,borderRadius:tF.borderRadius},".cm-foldPlaceholder":{backgroundColor:SF,color:lF,border:`1px dotted ${lF}70`,borderRadius:nF.borderRadius,padding:nF.padding,margin:nF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${xF}, 0 0 0 3px ${gF}40`},"& .cm-scroller::-webkit-scrollbar":{width:rF.width,height:rF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:bF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:cF,borderRadius:rF.borderRadius,border:`3px solid ${bF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:lF},".cm-ghostText":{opacity:`0.5`,color:lF}},{dark:!0}),D(V.define([{tag:A.keyword,color:fF,fontWeight:`bold`},{tag:A.controlKeyword,color:fF,fontWeight:`bold`},{tag:A.moduleKeyword,color:fF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:_F},{tag:[A.variableName],color:Upe},{tag:[A.propertyName],color:vF,fontStyle:`normal`},{tag:[A.typeName],color:fF},{tag:[A.className],color:mF,fontStyle:`italic`},{tag:[A.namespace],color:_F,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:uF},{tag:[A.bracket],color:lF},{tag:[A.brace],color:lF},{tag:[A.punctuation],color:lF},{tag:[A.function(A.variableName)],color:gF},{tag:[A.labelName],color:gF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:gF},{tag:[A.definition(A.variableName)],color:_F},{tag:A.number,color:mF},{tag:A.changed,color:mF},{tag:A.annotation,color:yF,fontStyle:`italic`},{tag:A.modifier,color:pF,fontStyle:`italic`},{tag:A.self,color:pF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:pF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:pF},{tag:[A.processingInstruction,A.inserted],color:Hpe},{tag:[A.special(A.string),A.regexp],color:Vpe},{tag:A.string,color:hF},{tag:A.definition(A.typeName),color:fF,fontWeight:`bold`},{tag:A.meta,color:lF},{tag:A.comment,fontStyle:`italic`,color:lF},{tag:A.docComment,fontStyle:`italic`,color:lF},{tag:[A.tagName],color:vF},{tag:[A.attributeName],color:mF},{tag:[A.heading],fontWeight:`bold`,color:Wpe},{tag:A.heading1,color:mF},{tag:A.heading2,color:hF},{tag:A.heading3,color:gF},{tag:A.heading4,color:_F},{tag:A.heading5,color:vF},{tag:A.heading6,color:fF},{tag:[A.strong],fontWeight:`bold`,color:_F},{tag:[A.emphasis],fontStyle:`italic`,color:hF},{tag:[A.link],color:Ype,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:EF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:uF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${yF}`},{tag:[A.strikethrough],color:yF,textDecoration:`line-through`},{tag:A.constant(A.name),color:pF},{tag:A.deleted,color:yF},{tag:A.squareBracket,color:lF},{tag:A.angleBracket,color:lF},{tag:A.monospace,color:uF},{tag:[A.contentSeparator],color:_F},{tag:A.quote,color:lF}]))],jF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Zpe={borderLeftWidth:`2px`},MF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},NF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},PF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Qpe={borderRadius:`2px`},FF={borderRadius:`2px`},IF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},LF={width:`12px`,height:`12px`,borderRadius:`6px`},RF={borderRadius:`4px`,padding:`2px 6px`},zF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},$pe=`#ffffff`,BF=`#f5f5f5`,VF=`#212121`,HF=`#757575`,UF=`#9e9e9e`,WF=`#424242`,eme=`#eeeeee`,GF=`#fafafa`,KF=`#f44336`,qF=`#ff3e00`,JF=`#FF00E9FF`,tme=`#ffc107`,YF=`#ff9800`,XF=`#00acc1`,ZF=`#3949ab`,QF=`#8e24aa`,$F=`#43a047`,eI=`#00897b`,tI=`#1e88e5`,nI=KF,nme=`#00000008`,rI=$pe,iI=BF,rme=`#DDEEFF`,ime=`#90a4ae26`,aI=UF,ame=`#DDEEFF80`,ome=XF,oI=YF,sI=XF,sme=QF,cI=`#ECEFF180`,lI=`#e6ffed80`,uI=`#ffebe980`,dI=`#28a745`,fI=`#d73a49`,cme=[I.theme({"&":{color:VF,backgroundColor:rI,fontSize:jF.fontSize,fontFamily:jF.fontFamily},".cm-content":{caretColor:aI,lineHeight:jF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:aI,borderLeftWidth:Zpe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${VF}99`,color:rI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:rme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${tme}`,color:VF,borderRadius:RF.borderRadius,"& span":{color:VF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:XF,color:rI,padding:RF.padding,"& span":{color:rI}},".cm-search.cm-panel.cm-textfield":{color:VF,borderRadius:RF.borderRadius,padding:RF.padding},".cm-panels":{backgroundColor:eme,color:VF,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${UF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${UF}`},".cm-panel button":{backgroundColor:iI,color:VF,border:PF.border,borderRadius:PF.borderRadius,padding:PF.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:nme,borderRadius:Qpe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:GF,color:HF,border:NF.border,borderRight:`1px solid ${UF}`,paddingRight:NF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:VF,fontWeight:NF.fontWeight},".cm-lineNumbers":{fontSize:NF.fontSize,lineHeight:NF.lineHeight},".cm-foldGutter":{fontSize:NF.fontSize,lineHeight:NF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:HF,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:VF},".cm-insertedLine":{textDecoration:MF.insertedTextDecoration,backgroundColor:lI,color:dI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:MF.insertedTextDecoration,backgroundColor:`${lI} !important`,color:dI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious,border:`1px solid ${dI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:MF.deletedTextDecoration,backgroundColor:uI,color:fI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:MF.deletedTextDecoration,backgroundColor:`${uI} !important`,color:fI,padding:MF.insertedLinePadding,borderRadius:MF.borderRadious,border:`1px solid ${fI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:iI,border:`1px solid ${UF}`,borderRadius:zF.borderRadius,padding:zF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:iI,border:`none`},"& > ul > li":{padding:zF.padding,lineHeight:zF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:cI,color:VF,borderRadius:zF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:cI},"& > ul > li > span.cm-completionIcon":{color:HF,paddingRight:zF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:HF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:iI,borderBottomColor:iI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${nI}`},"&-warning":{borderLeft:`3px solid ${oI}`},"&-info":{borderLeft:`3px solid ${sI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${nI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${oI}`},".cm-matchingBracket":{backgroundColor:ame,outline:`1px solid ${ome}`,borderRadius:FF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${nI}20`,outline:`1px solid ${nI}`,borderRadius:FF.borderRadius},".cm-selectionMatch":{backgroundColor:ime,outline:`1px solid ${HF}30`,borderRadius:FF.borderRadius},".cm-foldPlaceholder":{backgroundColor:BF,color:HF,border:`1px dotted ${HF}70`,borderRadius:IF.borderRadius,padding:IF.padding,margin:IF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${rI}, 0 0 0 3px ${XF}40`},"& .cm-scroller::-webkit-scrollbar":{width:LF.width,height:LF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:GF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:HF,borderRadius:LF.borderRadius,border:`3px solid ${GF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:VF},".cm-ghostText":{opacity:`0.5`,color:HF}},{dark:!1}),D(V.define([{tag:A.keyword,color:XF,fontWeight:`bold`},{tag:A.controlKeyword,color:XF,fontWeight:`bold`},{tag:A.moduleKeyword,color:XF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WF},{tag:[A.variableName],color:WF},{tag:[A.propertyName],color:eI,fontStyle:`normal`},{tag:[A.typeName],color:YF},{tag:[A.className],color:YF,fontStyle:`italic`},{tag:[A.namespace],color:ZF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:ZF},{tag:[A.bracket],color:QF},{tag:[A.brace],color:QF},{tag:[A.punctuation],color:HF},{tag:[A.function(A.variableName)],color:qF},{tag:[A.labelName],color:tI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:qF},{tag:[A.definition(A.variableName)],color:JF},{tag:A.number,color:YF},{tag:A.changed,color:YF},{tag:A.annotation,color:nI,fontStyle:`italic`},{tag:A.modifier,color:YF,fontStyle:`italic`},{tag:A.self,color:YF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:YF},{tag:[A.atom,A.bool],color:QF},{tag:[A.processingInstruction,A.inserted],color:$F},{tag:A.string,color:$F},{tag:[A.special(A.string),A.regexp],color:JF},{tag:A.definition(A.typeName),color:JF,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:JF},{tag:A.meta,color:HF},{tag:A.comment,fontStyle:`italic`,color:HF},{tag:A.docComment,fontStyle:`italic`,color:HF},{tag:[A.tagName],color:qF},{tag:[A.attributeName],color:WF},{tag:[A.heading],fontWeight:`bold`,color:eI},{tag:A.heading1,color:tI},{tag:A.heading2,color:YF},{tag:A.heading3,color:XF},{tag:A.heading4,color:ZF},{tag:A.heading5,color:QF},{tag:A.heading6,color:$F},{tag:[A.strong],fontWeight:`bold`,color:ZF},{tag:[A.emphasis],fontStyle:`italic`,color:YF},{tag:[A.link],color:sme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:sI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:VF,textDecoration:`underline wavy`,borderBottom:`1px dotted ${KF}`},{tag:[A.strikethrough],color:nI,textDecoration:`line-through`},{tag:A.constant(A.name),color:qF},{tag:A.deleted,color:nI},{tag:A.squareBracket,color:KF},{tag:A.angleBracket,color:VF},{tag:A.monospace,color:VF},{tag:[A.contentSeparator],color:XF},{tag:A.quote,color:$F}]))],pI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},lme={borderLeftWidth:`2px`},mI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},hI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},gI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ume={borderRadius:`2px`},_I={borderRadius:`2px`},vI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},yI={width:`12px`,height:`12px`,borderRadius:`6px`},bI={borderRadius:`4px`,padding:`2px 6px`},xI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},SI=`#272822`,CI=`#f8f8f2`,wI=`#88846f`,dme=`#f8f8f0`,TI=`#F92672`,EI=`#FD971F`,DI=`#66D9EF`,OI=`#E6DB74`,kI=`#AE81FF`,AI=`#A6E22E`,jI=`#F44747`,MI=`#414339`,fme=`#3e3d3257`,NI=`#34352f`,PI=`#49483E`,pme=`#75715e70`,FI=dme,mme=`#75715E55`,hme=DI,II=EI,LI=DI,gme=kI,RI=`#3d4d3880`,zI=`#4d393980`,BI=`#A6E22E`,VI=`#F92672`,_me=[I.theme({"&":{color:CI,backgroundColor:SI,fontSize:pI.fontSize,fontFamily:pI.fontFamily},".cm-content":{caretColor:FI,lineHeight:pI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:FI,borderLeftWidth:lme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${FI}99`,color:SI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:PI},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${OI}`,color:CI,borderRadius:bI.borderRadius,"& span":{color:CI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:TI,color:SI,padding:bI.padding,"& span":{color:SI}},".cm-search.cm-panel.cm-textfield":{color:CI,borderRadius:bI.borderRadius,padding:bI.padding},".cm-panels":{backgroundColor:MI,color:CI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${wI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${wI}80`},".cm-panel button":{backgroundColor:NI,color:CI,border:gI.border,borderRadius:gI.borderRadius,padding:gI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:fme,borderRadius:ume.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:MI,color:wI,border:hI.border,borderRight:`1px solid #3e3d32`,paddingRight:hI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:CI,fontWeight:hI.fontWeight},".cm-lineNumbers":{fontSize:hI.fontSize,lineHeight:hI.lineHeight},".cm-foldGutter":{fontSize:hI.fontSize,lineHeight:hI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:wI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:CI},".cm-insertedLine":{textDecoration:mI.insertedTextDecoration,backgroundColor:RI,color:BI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:mI.insertedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious,border:`1px solid ${BI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:mI.deletedTextDecoration,backgroundColor:zI,color:VI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:mI.deletedTextDecoration,backgroundColor:`${zI} !important`,color:VI,padding:mI.insertedLinePadding,borderRadius:mI.borderRadious,border:`1px solid ${VI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:NI,border:`1px solid #49483E`,borderRadius:xI.borderRadius,padding:xI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:NI,border:`none`},"& > ul > li":{padding:xI.padding,lineHeight:xI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:PI,color:CI,borderRadius:xI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:wI,paddingRight:xI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:wI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:NI,borderBottomColor:NI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${jI}`},"&-warning":{borderLeft:`3px solid ${II}`},"&-info":{borderLeft:`3px solid ${LI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${jI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${II}`},".cm-matchingBracket":{backgroundColor:mme,outline:`1px solid ${hme}`,borderRadius:_I.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${jI}`,borderRadius:_I.borderRadius},".cm-selectionMatch":{backgroundColor:pme,outline:`1px solid ${wI}50`,borderRadius:_I.borderRadius},".cm-foldPlaceholder":{backgroundColor:NI,color:wI,border:`1px dotted ${wI}70`,borderRadius:vI.borderRadius,padding:vI.padding,margin:vI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${SI}, 0 0 0 3px ${DI}40`},"& .cm-scroller::-webkit-scrollbar":{width:yI.width,height:yI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:MI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:yI.borderRadius,border:`3px solid ${MI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:wI}},{dark:!0}),D(V.define([{tag:A.keyword,color:TI,fontWeight:`bold`},{tag:A.controlKeyword,color:TI,fontWeight:`bold`},{tag:A.moduleKeyword,color:TI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:EI},{tag:[A.variableName],color:EI},{tag:[A.propertyName],color:AI,fontStyle:`normal`},{tag:[A.typeName],color:DI,fontStyle:`italic`},{tag:[A.className],color:AI,fontStyle:`italic`},{tag:[A.namespace],color:EI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:TI},{tag:[A.bracket],color:CI},{tag:[A.brace],color:CI},{tag:[A.punctuation],color:CI},{tag:[A.function(A.variableName),A.labelName],color:DI},{tag:[A.definition(A.function(A.variableName))],color:DI},{tag:[A.definition(A.variableName)],color:EI},{tag:A.number,color:kI},{tag:A.changed,color:kI},{tag:A.annotation,color:jI,fontStyle:`italic`},{tag:A.modifier,color:kI,fontStyle:`italic`},{tag:A.self,color:kI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:kI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:kI},{tag:[A.processingInstruction,A.inserted],color:AI},{tag:[A.special(A.string),A.regexp],color:OI},{tag:A.string,color:OI},{tag:A.definition(A.typeName),color:DI,fontWeight:`bold`},{tag:A.meta,color:wI},{tag:A.comment,fontStyle:`italic`,color:wI},{tag:A.docComment,fontStyle:`italic`,color:wI},{tag:[A.tagName],color:TI},{tag:[A.attributeName],color:AI},{tag:[A.heading],fontWeight:`bold`,color:AI},{tag:[A.strong],fontWeight:`bold`,color:EI},{tag:[A.emphasis],fontStyle:`italic`,color:EI},{tag:[A.link],color:gme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:LI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:CI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${jI}`},{tag:[A.strikethrough],color:jI,textDecoration:`line-through`},{tag:A.constant(A.name),color:kI},{tag:A.deleted,color:jI},{tag:A.squareBracket,color:CI},{tag:A.angleBracket,color:CI},{tag:A.monospace,color:CI},{tag:[A.contentSeparator],color:EI},{tag:A.quote,color:wI}]))],HI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},vme={borderLeftWidth:`2px`},UI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},WI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},GI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},yme={borderRadius:`2px`},KI={borderRadius:`2px`},qI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},JI={width:`12px`,height:`12px`,borderRadius:`6px`},YI={borderRadius:`4px`,padding:`2px 6px`},XI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},bme=`#2e3440`,ZI=`#3b4252`,QI=`#434c5e`,$I=`#4c566a`,eL=`#d8dee9`,tL=`#eceff4`,nL=`#8fbcbb`,rL=`#88c0d0`,iL=`#81a1c1`,aL=`#5e81ac`,oL=`#bf616a`,sL=`#d08770`,cL=`#ebcb8b`,lL=`#a3be8c`,uL=`#b48ead`,xme=`#d30102`,dL=`#252a33`,Sme=`#3b425277`,fL=bme,pL=ZI,Cme=QI,wme=`#4c566a80`,mL=eL,Tme=`#4c566a55`,Eme=rL,hL=cL,gL=iL,Dme=uL,_L=`#3b4a3880`,vL=`#4a393a80`,yL=`#a3be8c`,bL=`#bf616a`,Ome=[I.theme({"&":{color:eL,backgroundColor:fL,fontSize:HI.fontSize,fontFamily:HI.fontFamily},".cm-content":{caretColor:mL,lineHeight:HI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:mL,borderLeftWidth:vme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${mL}99`,color:fL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Cme},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${nL}`,color:eL,borderRadius:YI.borderRadius,"& span":{color:eL}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:iL,color:tL,padding:YI.padding,"& span":{color:tL}},".cm-search.cm-panel.cm-textfield":{color:eL,borderRadius:YI.borderRadius,padding:YI.padding},".cm-panels":{backgroundColor:dL,color:eL,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${$I}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${$I}`},".cm-panel button":{backgroundColor:pL,color:eL,border:GI.border,borderRadius:GI.borderRadius,padding:GI.padding},".cm-panel button:hover":{backgroundColor:QI},".cm-activeLine":{backgroundColor:Sme,borderRadius:yme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:dL,color:$I,border:WI.border,borderRight:`1px solid ${QI}`,paddingRight:WI.paddingRight},".cm-activeLineGutter":{backgroundColor:ZI,color:eL,fontWeight:WI.fontWeight},".cm-lineNumbers":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter":{fontSize:WI.fontSize,lineHeight:WI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:$I,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:eL},".cm-insertedLine":{textDecoration:UI.insertedTextDecoration,backgroundColor:_L,color:yL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:UI.insertedTextDecoration,backgroundColor:`${_L} !important`,color:yL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${yL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:UI.deletedTextDecoration,backgroundColor:vL,color:bL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:UI.deletedTextDecoration,backgroundColor:`${vL} !important`,color:bL,padding:UI.insertedLinePadding,borderRadius:UI.borderRadious,border:`1px solid ${bL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:pL,border:`1px solid ${$I}`,borderRadius:XI.borderRadius,padding:XI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:pL,border:`none`},"& > ul > li":{padding:XI.padding,lineHeight:XI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:QI,color:tL,borderRadius:XI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:$I,paddingRight:XI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:$I,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pL,borderBottomColor:pL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${oL}`},"&-warning":{borderLeft:`3px solid ${hL}`},"&-info":{borderLeft:`3px solid ${gL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${oL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${hL}`},".cm-matchingBracket":{backgroundColor:Tme,outline:`1px solid ${Eme}`,borderRadius:KI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${oL}40`,outline:`1px solid ${xme}`,borderRadius:KI.borderRadius},".cm-selectionMatch":{backgroundColor:wme,outline:`1px solid ${QI}50`,borderRadius:KI.borderRadius},".cm-foldPlaceholder":{backgroundColor:pL,color:$I,border:`1px dotted ${$I}70`,borderRadius:qI.borderRadius,padding:qI.padding,margin:qI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${fL}, 0 0 0 3px ${rL}40`},"& .cm-scroller::-webkit-scrollbar":{width:JI.width,height:JI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:dL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:QI,borderRadius:JI.borderRadius,border:`3px solid ${dL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:$I},".cm-ghostText":{opacity:`0.5`,color:$I}},{dark:!0}),D(V.define([{tag:A.keyword,color:aL,fontWeight:`bold`},{tag:A.controlKeyword,color:aL,fontWeight:`bold`},{tag:A.moduleKeyword,color:aL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:rL},{tag:[A.variableName],color:eL},{tag:[A.propertyName],color:rL,fontStyle:`normal`},{tag:[A.typeName],color:cL},{tag:[A.className],color:cL,fontStyle:`italic`},{tag:[A.namespace],color:iL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:uL},{tag:[A.bracket],color:eL},{tag:[A.brace],color:nL},{tag:[A.punctuation],color:eL},{tag:[A.function(A.variableName),A.labelName],color:nL},{tag:[A.definition(A.function(A.variableName))],color:nL},{tag:[A.definition(A.variableName)],color:sL},{tag:A.number,color:sL},{tag:A.changed,color:uL},{tag:A.annotation,color:oL,fontStyle:`italic`},{tag:A.modifier,color:uL,fontStyle:`italic`},{tag:A.self,color:uL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:sL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:uL},{tag:[A.processingInstruction,A.inserted],color:nL},{tag:[A.special(A.string),A.regexp],color:uL},{tag:A.string,color:lL},{tag:A.definition(A.typeName),color:cL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:lL},{tag:A.meta,color:$I},{tag:A.comment,fontStyle:`italic`,color:$I},{tag:A.docComment,fontStyle:`italic`,color:$I},{tag:[A.tagName],color:oL},{tag:[A.attributeName],color:cL},{tag:[A.heading],fontWeight:`bold`,color:iL},{tag:[A.strong],fontWeight:`bold`,color:rL},{tag:[A.emphasis],fontStyle:`italic`,color:cL},{tag:[A.link],color:Dme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:gL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:eL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${oL}`},{tag:[A.strikethrough],color:oL,textDecoration:`line-through`},{tag:A.constant(A.name),color:sL},{tag:A.deleted,color:oL},{tag:A.squareBracket,color:oL},{tag:A.angleBracket,color:sL},{tag:A.monospace,color:eL,fontStyle:`italic`},{tag:[A.contentSeparator],color:iL},{tag:A.quote,color:uL}]))],xL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},kme={borderLeftWidth:`2px`},SL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},CL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},wL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ame={borderRadius:`2px`},TL={borderRadius:`2px`},EL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},DL={width:`12px`,height:`12px`,borderRadius:`6px`},OL={borderRadius:`4px`,padding:`2px 6px`},kL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},jme=`#e1e2e7`,AL=`#3760bf`,jL=`#99a7df`,ML=`#848cb5`,Mme=`#8c91a8`,NL=`#3760bf`,PL=`#e9e9ec`,FL=`#d5d6db`,IL=`#f52a65`,LL=`#b15c00`,RL=`#8c6c3e`,zL=`#587539`,BL=`#007197`,VL=`#2e7de9`,HL=`#7847bd`,Nme=`#9854f1`,UL=IL,WL=FL,Pme=`#5F5FAF5A`,GL=jme,KL=PL,qL=`#99a7df40`,Fme=`#99a7df60`,JL=AL,Ime=`#0e639c20`,Lme=BL,YL=LL,XL=BL,Rme=HL,ZL=`#58753920`,QL=`#f52a6520`,$L=`#587539`,eR=`#f52a65`,zme=[I.theme({"&":{color:NL,backgroundColor:GL,fontSize:xL.fontSize,fontFamily:xL.fontFamily},".cm-content":{caretColor:JL,lineHeight:xL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:JL,borderLeftWidth:kme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${JL}99`,color:GL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${BL}`,color:NL,borderRadius:OL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BL,color:GL,padding:OL.padding,"& span":{color:GL}},".cm-search.cm-panel.cm-textfield":{color:NL,borderRadius:OL.borderRadius,padding:OL.padding},".cm-panels":{backgroundColor:PL,color:NL,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ML}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ML}30`},".cm-panel button":{backgroundColor:KL,color:NL,border:wL.border,borderRadius:wL.borderRadius,padding:wL.padding},".cm-panel button:hover":{backgroundColor:FL,border:`1px solid ${jL}`},".cm-activeLine":{backgroundColor:Pme,borderRadius:Ame.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:WL,color:ML,border:CL.border,borderRight:`1px solid ${FL}`,paddingRight:CL.paddingRight},".cm-activeLineGutter":{color:AL,fontWeight:CL.fontWeight},".cm-lineNumbers":{fontSize:CL.fontSize,lineHeight:CL.lineHeight},".cm-foldGutter":{fontSize:CL.fontSize,lineHeight:CL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:ML,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:AL},".cm-insertedLine":{textDecoration:SL.insertedTextDecoration,backgroundColor:ZL,color:$L,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:SL.insertedTextDecoration,backgroundColor:`${ZL} !important`,color:$L,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious,border:`1px solid ${$L}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:SL.deletedTextDecoration,backgroundColor:QL,color:eR,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:SL.deletedTextDecoration,backgroundColor:`${QL} !important`,color:eR,padding:SL.insertedLinePadding,borderRadius:SL.borderRadious,border:`1px solid ${eR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:KL,border:`1px solid ${Mme}40`,borderRadius:kL.borderRadius,padding:kL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:KL,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:kL.padding,lineHeight:kL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:qL,color:AL,borderRadius:kL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:ML,paddingRight:kL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:ML,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:KL,borderBottomColor:KL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${UL}`},"&-warning":{borderLeft:`3px solid ${YL}`},"&-info":{borderLeft:`3px solid ${XL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${UL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${YL}`},".cm-matchingBracket":{backgroundColor:Ime,outline:`1px solid ${Lme}`,borderRadius:TL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${IL}20`,outline:`1px solid ${UL}`,borderRadius:TL.borderRadius},".cm-selectionMatch":{backgroundColor:Fme,outline:`1px solid ${jL}50`,borderRadius:TL.borderRadius},".cm-foldPlaceholder":{backgroundColor:KL,color:ML,border:`1px dotted ${ML}70`,borderRadius:EL.borderRadius,padding:EL.padding,margin:EL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${GL}, 0 0 0 3px ${BL}40`},"& .cm-scroller::-webkit-scrollbar":{width:DL.width,height:DL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:WL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ML,borderRadius:DL.borderRadius,border:`3px solid ${WL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:jL},".cm-ghostText":{opacity:`0.5`,color:ML}},{dark:!1}),D(V.define([{tag:A.keyword,color:BL,fontWeight:`bold`},{tag:A.controlKeyword,color:BL,fontWeight:`bold`},{tag:A.moduleKeyword,color:BL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:VL},{tag:[A.variableName],color:AL},{tag:[A.propertyName],color:VL,fontStyle:`normal`},{tag:[A.typeName],color:BL},{tag:[A.className],color:RL,fontStyle:`italic`},{tag:[A.namespace],color:HL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:HL},{tag:[A.bracket],color:ML},{tag:[A.brace],color:ML},{tag:[A.punctuation],color:ML},{tag:[A.function(A.variableName)],color:BL},{tag:[A.labelName],color:HL,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:BL},{tag:[A.definition(A.variableName)],color:VL},{tag:A.number,color:LL},{tag:A.changed,color:LL},{tag:A.annotation,color:UL,fontStyle:`italic`},{tag:A.modifier,color:LL,fontStyle:`italic`},{tag:A.self,color:LL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:LL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:LL},{tag:[A.processingInstruction,A.inserted],color:zL},{tag:[A.special(A.string),A.regexp],color:Nme},{tag:A.string,color:zL},{tag:A.definition(A.typeName),color:BL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:VL},{tag:A.meta,color:ML},{tag:A.comment,fontStyle:`italic`,color:ML},{tag:A.docComment,fontStyle:`italic`,color:ML},{tag:[A.tagName],color:HL},{tag:[A.attributeName],color:RL},{tag:[A.heading],fontWeight:`bold`,color:LL},{tag:A.heading1,color:LL,fontWeight:`bold`},{tag:A.heading2,color:LL},{tag:A.heading3,color:LL},{tag:A.heading4,color:BL},{tag:A.heading5,color:BL},{tag:A.heading6,color:BL},{tag:[A.strong],fontWeight:`bold`,color:AL},{tag:[A.emphasis],fontStyle:`italic`,color:zL},{tag:[A.link],color:Rme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:XL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:AL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${UL}`},{tag:[A.strikethrough],color:UL,textDecoration:`line-through`},{tag:A.constant(A.name),color:LL},{tag:A.deleted,color:UL},{tag:A.squareBracket,color:ML},{tag:A.angleBracket,color:ML},{tag:A.monospace,color:AL},{tag:[A.contentSeparator],color:VL},{tag:A.quote,color:ML}]))],tR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Bme={borderLeftWidth:`2px`},nR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},rR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},iR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Vme={borderRadius:`2px`},aR={borderRadius:`2px`},oR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},sR={width:`12px`,height:`12px`,borderRadius:`6px`},cR={borderRadius:`4px`,padding:`2px 6px`},lR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Hme=`#24283b`,uR=`#414868`,dR=`#565f89`,fR=`#c0caf5`,pR=`#282e44`,mR=`#1f2335`,Ume=`#f7768e`,hR=`#ff9e64`,gR=`#e0af68`,_R=`#9ece6a`,vR=`#2ac3de`,yR=`#7aa2f7`,bR=`#bb9af7`,xR=`#f7768e`,SR=mR,Wme=`#292e427a`,CR=Hme,wR=pR,TR=`#6f7bb630`,Gme=`#6f7bb650`,ER=fR,Kme=`#3d59a150`,qme=yR,DR=hR,OR=vR,Jme=bR,kR=`#3b4a3880`,AR=`#4a393a80`,jR=`#9ece6a`,MR=`#f7768e`,Yme=[I.theme({"&":{color:fR,backgroundColor:CR,fontSize:tR.fontSize,fontFamily:tR.fontFamily},".cm-content":{caretColor:ER,lineHeight:tR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:ER,borderLeftWidth:Bme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${ER}99`,color:CR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:TR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${yR}`,color:fR,borderRadius:cR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:yR,color:CR,padding:cR.padding,"& span":{color:CR}},".cm-search.cm-panel.cm-textfield":{color:fR,borderRadius:cR.borderRadius,padding:cR.padding},".cm-panels":{backgroundColor:pR,color:fR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${dR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${dR}`},".cm-panel button":{backgroundColor:wR,color:fR,border:iR.border,borderRadius:iR.borderRadius,padding:iR.padding},".cm-panel button:hover":{backgroundColor:mR},".cm-activeLine":{backgroundColor:Wme,borderRadius:Vme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:SR,color:dR,border:rR.border,borderRight:`1px solid ${mR}`,paddingRight:rR.paddingRight},".cm-activeLineGutter":{backgroundColor:mR,color:fR,fontWeight:rR.fontWeight},".cm-lineNumbers":{fontSize:rR.fontSize,lineHeight:rR.lineHeight},".cm-foldGutter":{fontSize:rR.fontSize,lineHeight:rR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:dR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:fR},".cm-insertedLine":{textDecoration:nR.insertedTextDecoration,backgroundColor:kR,color:jR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:nR.insertedTextDecoration,backgroundColor:`${kR} !important`,color:jR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious,border:`1px solid ${jR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:nR.deletedTextDecoration,backgroundColor:AR,color:MR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:nR.deletedTextDecoration,backgroundColor:`${AR} !important`,color:MR,padding:nR.insertedLinePadding,borderRadius:nR.borderRadious,border:`1px solid ${MR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:wR,border:`1px solid ${dR}`,borderRadius:lR.borderRadius,padding:lR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:wR,border:`none`},"& > ul > li":{padding:lR.padding,lineHeight:lR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:TR,color:fR,borderRadius:lR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:dR,paddingRight:lR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:dR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:wR,borderBottomColor:wR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${xR}`},"&-warning":{borderLeft:`3px solid ${DR}`},"&-info":{borderLeft:`3px solid ${OR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${xR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${DR}`},".cm-matchingBracket":{backgroundColor:Kme,outline:`1px solid ${qme}`,borderRadius:aR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Ume}20`,outline:`1px solid ${xR}`,borderRadius:aR.borderRadius},".cm-selectionMatch":{backgroundColor:Gme,outline:`1px solid ${uR}50`,borderRadius:aR.borderRadius},".cm-foldPlaceholder":{backgroundColor:wR,color:dR,border:`1px dotted ${dR}70`,borderRadius:oR.borderRadius,padding:oR.padding,margin:oR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${CR}, 0 0 0 3px ${yR}40`},"& .cm-scroller::-webkit-scrollbar":{width:sR.width,height:sR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:SR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:uR,borderRadius:sR.borderRadius,border:`3px solid ${SR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:dR},".cm-ghostText":{opacity:`0.5`,color:dR}},{dark:!0}),D(V.define([{tag:A.keyword,color:bR,fontWeight:`bold`},{tag:A.controlKeyword,color:bR,fontWeight:`bold`},{tag:A.moduleKeyword,color:bR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:fR},{tag:[A.variableName],color:fR},{tag:[A.propertyName],color:yR,fontStyle:`normal`},{tag:[A.typeName],color:vR},{tag:[A.className],color:gR,fontStyle:`italic`},{tag:[A.namespace],color:yR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:bR},{tag:[A.bracket],color:dR},{tag:[A.brace],color:dR},{tag:[A.punctuation],color:dR},{tag:[A.function(A.variableName)],color:yR},{tag:[A.labelName],color:yR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:yR},{tag:[A.definition(A.variableName)],color:fR},{tag:A.number,color:hR},{tag:A.changed,color:hR},{tag:A.annotation,color:xR,fontStyle:`italic`},{tag:A.modifier,color:hR,fontStyle:`italic`},{tag:A.self,color:hR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:bR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:hR},{tag:[A.processingInstruction,A.inserted],color:_R},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:_R},{tag:A.definition(A.typeName),color:vR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:fR},{tag:A.meta,color:dR},{tag:A.comment,fontStyle:`italic`,color:dR},{tag:A.docComment,fontStyle:`italic`,color:dR},{tag:[A.tagName],color:bR},{tag:[A.attributeName],color:gR},{tag:[A.heading],fontWeight:`bold`,color:`#89ddff`},{tag:A.heading1,color:`#89ddff`,fontWeight:`bold`},{tag:A.heading2,color:`#89ddff`},{tag:A.heading3,color:`#89ddff`},{tag:A.heading4,color:`#89ddff`},{tag:A.heading5,color:`#89ddff`},{tag:A.heading6,color:`#89ddff`},{tag:[A.strong],fontWeight:`bold`,color:fR},{tag:[A.emphasis],fontStyle:`italic`,color:vR},{tag:[A.link],color:Jme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:OR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:fR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${xR}`},{tag:[A.strikethrough],color:xR,textDecoration:`line-through`},{tag:A.constant(A.name),color:hR},{tag:A.deleted,color:xR},{tag:A.squareBracket,color:dR},{tag:A.angleBracket,color:dR},{tag:A.monospace,color:fR},{tag:[A.contentSeparator],color:yR},{tag:A.quote,color:dR}]))],NR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Xme={borderLeftWidth:`2px`},PR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},FR={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},IR={borderRadius:`4px`,padding:`2px 10px`},Zme={borderRadius:`2px`},LR={borderRadius:`2px`},RR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},zR={width:`12px`,height:`12px`,borderRadius:`6px`},BR={borderRadius:`4px`,padding:`2px 6px`},VR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Qme=`#1e1e1e`,HR=`#252526`,UR=`#2d2d30`,WR=`#838383`,$me=`#c6c6c6`,GR=`#d4d4d4`,KR=`#e9e9e9`,ehe=`#1c1c1c`,qR=`#569cd6`,the=`#c586c0`,JR=`#9cdcfe`,YR=`#4ec9b0`,XR=`#dcdcaa`,nhe=`#b5cea8`,ZR=`#ce9178`,QR=`#f44747`,$R=`#d7ba7d`,ez=`#6a9955`,tz=QR,nz=`#FFFFFF08`,rz=Qme,iz=HR,rhe=`#264F7899`,ihe=`#72a1ff59`,az=$me,ahe=`#ffffff15`,ohe=qR,oz=$R,sz=`#3794ff`,she=`#c586c0`,cz=`#1e3f1e80`,lz=`#4b1c1c80`,uz=`#6cc26f`,dz=`#f14c4c`,che=[I.theme({"&":{color:GR,backgroundColor:rz,fontSize:NR.fontSize,fontFamily:NR.fontFamily},".cm-content":{caretColor:az,lineHeight:NR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:az,borderLeftWidth:Xme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${az}99`,color:rz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:rhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${qR}90`,color:KR,borderRadius:BR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:KR,padding:BR.padding,"& span":{color:KR}},".cm-search.cm-panel.cm-textfield":{color:GR,borderRadius:BR.borderRadius,padding:BR.padding},".cm-panels":{backgroundColor:HR,color:GR,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${UR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${UR}`},".cm-panel button":{backgroundColor:UR,color:GR,border:`1px solid ${UR}`,borderRadius:IR.borderRadius,padding:IR.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${WR}80`},".cm-activeLine":{backgroundColor:nz,borderRadius:Zme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:ehe,color:WR,border:`none`,borderRight:`1px solid ${UR}`,paddingRight:FR.paddingRight},".cm-activeLineGutter":{backgroundColor:nz,color:KR,fontWeight:FR.fontWeight},".cm-lineNumbers":{fontSize:FR.fontSize,lineHeight:FR.lineHeight},".cm-foldGutter":{fontSize:FR.fontSize,lineHeight:FR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:WR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:KR},".cm-insertedLine":{textDecoration:PR.insertedTextDecoration,backgroundColor:cz,color:uz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:PR.insertedTextDecoration,backgroundColor:`${cz} !important`,color:uz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious,border:`1px solid ${uz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:PR.deletedTextDecoration,backgroundColor:lz,color:dz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:PR.deletedTextDecoration,backgroundColor:`${lz} !important`,color:dz,padding:PR.insertedLinePadding,borderRadius:PR.borderRadious,border:`1px solid ${dz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:iz,border:`1px solid ${UR}`,borderRadius:VR.borderRadius,padding:VR.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:iz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:VR.padding,lineHeight:VR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:KR,borderRadius:VR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:WR,paddingRight:VR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:WR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:iz,borderBottomColor:iz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${tz}`},"&-warning":{borderLeft:`3px solid ${oz}`},"&-info":{borderLeft:`3px solid ${sz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${tz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${oz}`},".cm-matchingBracket":{backgroundColor:ahe,outline:`1px solid ${ohe}80`,borderRadius:LR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${QR}40`,outline:`1px solid ${tz}`,borderRadius:LR.borderRadius},".cm-selectionMatch":{backgroundColor:ihe,outline:`1px solid ${UR}70`,borderRadius:LR.borderRadius},".cm-foldPlaceholder":{backgroundColor:iz,color:WR,border:`1px dotted ${WR}70`,borderRadius:RR.borderRadius,padding:RR.padding,margin:RR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${UR}`},"& .cm-scroller::-webkit-scrollbar":{width:zR.width,height:zR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:rz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:zR.borderRadius,border:`3px solid ${rz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:WR}},{dark:!0}),D(V.define([{tag:A.keyword,color:qR,fontWeight:`bold`},{tag:A.controlKeyword,color:the,fontWeight:`bold`},{tag:A.moduleKeyword,color:qR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:GR},{tag:[A.variableName],color:JR},{tag:[A.propertyName],color:JR,fontStyle:`normal`},{tag:[A.typeName],color:YR},{tag:[A.className],color:YR,fontStyle:`normal`},{tag:[A.namespace],color:GR,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:GR},{tag:[A.bracket],color:GR},{tag:[A.brace],color:GR},{tag:[A.punctuation],color:GR},{tag:[A.function(A.variableName)],color:XR},{tag:[A.labelName],color:XR,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:XR},{tag:[A.definition(A.variableName)],color:JR},{tag:A.number,color:nhe},{tag:A.changed,color:$R},{tag:A.annotation,color:$R,fontStyle:`italic`},{tag:A.modifier,color:qR,fontStyle:`normal`},{tag:A.self,color:qR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:qR},{tag:[A.processingInstruction,A.inserted],color:ZR},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:ZR},{tag:A.definition(A.typeName),color:YR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:GR},{tag:A.meta,color:WR},{tag:A.comment,fontStyle:`italic`,color:ez},{tag:A.docComment,fontStyle:`italic`,color:ez},{tag:[A.tagName],color:qR},{tag:[A.attributeName],color:JR},{tag:[A.heading],fontWeight:`bold`,color:qR},{tag:A.heading1,color:qR,fontWeight:`bold`},{tag:A.heading2,color:qR},{tag:A.heading3,color:qR},{tag:A.heading4,color:qR},{tag:A.heading5,color:qR},{tag:A.heading6,color:qR},{tag:[A.strong],fontWeight:`bold`,color:qR},{tag:[A.emphasis],fontStyle:`italic`,color:YR},{tag:[A.link],color:she,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:sz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:GR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${tz}`},{tag:[A.strikethrough],color:tz,textDecoration:`line-through`},{tag:A.constant(A.name),color:JR},{tag:A.deleted,color:tz},{tag:A.squareBracket,color:GR},{tag:A.angleBracket,color:GR},{tag:A.monospace,color:GR},{tag:[A.contentSeparator],color:GR},{tag:A.quote,color:ez}]))],fz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},lhe={borderLeftWidth:`2px`},pz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},mz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},hz={borderRadius:`4px`,padding:`2px 10px`},uhe={borderRadius:`2px`},gz={borderRadius:`2px`},_z={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},vz={width:`12px`,height:`12px`,borderRadius:`6px`},yz={borderRadius:`4px`,padding:`2px 6px`},bz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},dhe=`#ffffff`,xz=`#f3f3f3`,Sz=`#d6d6d6`,Cz=`#6b6b6b`,fhe=`#000000`,wz=`#383a42`,Tz=`#1f1f1f`,phe=`#f5f5f5`,Ez=`#0064ff`,Dz=`#af00db`,Oz=`#0070c1`,kz=`#267f99`,Az=`#795e26`,mhe=`#098658`,jz=`#a31515`,Mz=`#e51400`,Nz=`#795e26`,Pz=`#008000`,Fz=Mz,Iz=`#99999926`,Lz=dhe,Rz=xz,hhe=`#add6ff`,ghe=`#a8ac9480`,zz=fhe,_he=`#007acc20`,vhe=`#007acc`,Bz=`#bf8803`,Vz=`#006ab1`,yhe=`#9e46d0`,Hz=`#ddfbe0`,Uz=`#ffebec`,Wz=`#22863a`,Gz=`#e51400`,bhe=[I.theme({"&":{color:wz,backgroundColor:Lz,fontSize:fz.fontSize,fontFamily:fz.fontFamily},".cm-content":{caretColor:zz,lineHeight:fz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:zz,borderLeftWidth:lhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${zz}99`,color:Lz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:hhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Oz}90`,color:Tz,borderRadius:yz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:Tz,padding:yz.padding,"& span":{color:Tz}},".cm-search.cm-panel.cm-textfield":{color:wz,borderRadius:yz.borderRadius,padding:yz.padding},".cm-panels":{backgroundColor:xz,color:wz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${Sz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${Sz}`},".cm-panel button":{backgroundColor:Lz,color:wz,border:`1px solid ${Sz}`,borderRadius:hz.borderRadius,padding:hz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Cz}80`},".cm-activeLine":{backgroundColor:Iz,borderRadius:uhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:phe,color:`#237893`,border:`none`,borderRight:`1px solid ${Sz}`,paddingRight:mz.paddingRight},".cm-activeLineGutter":{backgroundColor:Iz,color:`#0b216f`,fontWeight:mz.fontWeight},".cm-lineNumbers":{fontSize:mz.fontSize,lineHeight:mz.lineHeight},".cm-foldGutter":{fontSize:mz.fontSize,lineHeight:mz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:pz.insertedTextDecoration,backgroundColor:Hz,color:Wz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:pz.insertedTextDecoration,backgroundColor:`${Hz} !important`,color:Wz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious,border:`1px solid ${Wz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:pz.deletedTextDecoration,backgroundColor:Uz,color:Gz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:pz.deletedTextDecoration,backgroundColor:`${Uz} !important`,color:Gz,padding:pz.insertedLinePadding,borderRadius:pz.borderRadious,border:`1px solid ${Gz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Rz,border:`1px solid ${Sz}`,borderRadius:bz.borderRadius,padding:bz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Rz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:bz.padding,lineHeight:bz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:Tz,borderRadius:bz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Cz,paddingRight:bz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Cz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Rz,borderBottomColor:Rz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Fz}`},"&-warning":{borderLeft:`3px solid ${Bz}`},"&-info":{borderLeft:`3px solid ${Vz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Fz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${Bz}`},".cm-matchingBracket":{backgroundColor:_he,outline:`1px solid ${vhe}80`,borderRadius:gz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${Mz}20`,outline:`1px solid ${Fz}`,borderRadius:gz.borderRadius},".cm-selectionMatch":{backgroundColor:ghe,outline:`1px solid ${Sz}70`,borderRadius:gz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Rz,color:Cz,border:`1px dotted ${Cz}70`,borderRadius:_z.borderRadius,padding:_z.padding,margin:_z.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${Sz}`},"& .cm-scroller::-webkit-scrollbar":{width:vz.width,height:vz.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Lz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:vz.borderRadius,border:`3px solid ${Lz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Cz}},{dark:!1}),D(V.define([{tag:A.keyword,color:Ez,fontWeight:`bold`},{tag:A.controlKeyword,color:Dz,fontWeight:`bold`},{tag:A.moduleKeyword,color:Ez,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:wz},{tag:[A.variableName],color:Oz},{tag:[A.propertyName],color:Oz,fontStyle:`normal`},{tag:[A.typeName],color:kz},{tag:[A.className],color:kz,fontStyle:`normal`},{tag:[A.namespace],color:wz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:wz},{tag:[A.bracket],color:wz},{tag:[A.brace],color:wz},{tag:[A.punctuation],color:wz},{tag:[A.function(A.variableName)],color:Az},{tag:[A.labelName],color:Az,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:Az},{tag:[A.definition(A.variableName)],color:Oz},{tag:A.number,color:mhe},{tag:A.changed,color:Nz},{tag:A.annotation,color:Nz,fontStyle:`italic`},{tag:A.modifier,color:Ez,fontStyle:`normal`},{tag:A.self,color:Ez},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Oz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Ez},{tag:[A.processingInstruction,A.inserted],color:jz},{tag:[A.special(A.string),A.regexp],color:Dz},{tag:A.string,color:jz},{tag:A.definition(A.typeName),color:kz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:wz},{tag:A.meta,color:Cz},{tag:A.comment,fontStyle:`italic`,color:Pz},{tag:A.docComment,fontStyle:`italic`,color:Pz},{tag:[A.tagName],color:Ez},{tag:[A.attributeName],color:Oz},{tag:[A.heading],fontWeight:`bold`,color:Ez},{tag:A.heading1,color:Ez,fontWeight:`bold`},{tag:A.heading2,color:Ez},{tag:A.heading3,color:Ez},{tag:A.heading4,color:Ez},{tag:A.heading5,color:Ez},{tag:A.heading6,color:Ez},{tag:[A.strong],fontWeight:`bold`,color:Ez},{tag:[A.emphasis],fontStyle:`italic`,color:Oz},{tag:[A.link],color:yhe,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Vz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:wz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Fz}`},{tag:[A.strikethrough],color:Fz,textDecoration:`line-through`},{tag:A.constant(A.name),color:Oz},{tag:A.deleted,color:Fz},{tag:A.squareBracket,color:wz},{tag:A.angleBracket,color:wz},{tag:A.monospace,color:wz},{tag:[A.contentSeparator],color:wz},{tag:A.quote,color:Pz}]))];function Kz(){return Kz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kz.apply(null,arguments)}function xhe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qz=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Jz=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(qz(e)):qz,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Le(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=_e(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=P(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n;;e++){let a=r.charCodeAt(e),o=this.match(a,i,this.bufferPos+this.bufferStart);if(e==r.length-1){if(o)return this.value=o,this;break}i==n&&e<t.length&&t.charCodeAt(e)==a&&i++}}}match(e,t,n){let r=null;for(let t=0;t<this.matches.length;t+=2){let i=this.matches[t],a=!1;this.query.charCodeAt(i)==e&&(i==this.query.length-1?r={from:this.matches[t+1],to:n}:(this.matches[t]++,a=!0)),a||(this.matches.splice(t,2),t-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:t,to:n}:this.matches.push(1,t)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}};typeof Symbol<`u`&&(Jz.prototype[Symbol.iterator]=function(){return this});var Yz={from:-1,to:-1,match:/.*/.exec(``)},Xz=`gm`+(/x/.unicode==null?``:`u`),Zz=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Yz,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new eB(e,t,n,r,i);this.re=new RegExp(t,Xz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=tB(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=tB(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Qz=new WeakMap,$z=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=Qz.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Qz.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),Qz.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},eB=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Yz,this.matchPos=tB(e,r),this.re=new RegExp(t,Xz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=$z.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=tB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=$z.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Zz.prototype[Symbol.iterator]=eB.prototype[Symbol.iterator]=function(){return this});function She(e){try{return new RegExp(e,Xz),!0}catch{return!1}}function tB(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}function nB(e){let t=Ae(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=Ae(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:rB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},Ae(`label`,e.state.phrase(`Go to line`),`: `,t),` `,Ae(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),Ae(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:rB.of(!1)}),e.focus()},"aria-label":e.state.phrase(`close`),type:`button`},[`×`]));function r(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,a,o,s,c]=n,l=s?+s.slice(1):0,u=o?+o:i.number;if(o&&c){let e=u/100;a&&(e=e*(a==`-`?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else o&&a&&(u=u*(a==`-`?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u))),f=ce.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[rB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var rB=ne.define(),iB=ze.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(rB)&&(e=n.value);return e},provide:e=>te.from(e,e=>e?nB:null)}),Che=e=>{let t=Ee(e,nB);if(!t){let n=[rB.of(!0)];e.state.field(iB,!1)??n.push(ne.appendConfig.of([iB,whe])),e.dispatch({effects:n}),t=Ee(e,nB)}return t&&t.dom.querySelector(`input`).select(),!0},whe=I.baseTheme({".cm-panel.cm-gotoLine":{padding:`2px 6px 4px`,position:`relative`,"& label":{fontSize:`80%`},"& [name=close]":{position:`absolute`,top:`0`,bottom:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:`0`}}}),The={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},aB=be.define({combine(e){return f(e,The,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Ehe(e){let t=[jhe,Ahe];return e&&t.push(aB.of(e)),t}var Dhe=Be.mark({class:`cm-selectionMatch`}),Ohe=Be.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function oB(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=ae.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=ae.Word)}function khe(e,t,n,r){return e(t.sliceDoc(n,n+1))==ae.Word&&e(t.sliceDoc(r-1,r))==ae.Word}var Ahe=g.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(aB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return Be.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return Be.none;let e=n.wordAt(i.head);if(!e)return Be.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return Be.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(oB(o,n,i.from,i.to)&&khe(o,n,i.from,i.to)))return Be.none}else if(a=n.sliceDoc(i.from,i.to),!a)return Be.none}let s=[];for(let r of e.visibleRanges){let e=new Jz(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||oB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Ohe.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Dhe.range(r,a)),s.length>t.maxMatches))return Be.none}}return Be.set(s)}},{decorations:e=>e.decorations}),jhe=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Mhe=({state:e,dispatch:t})=>{let{selection:n}=e,r=ce.create(n.ranges.map(t=>e.wordAt(t.head)||ce.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function Nhe(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Jz(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Jz(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Phe=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Mhe({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Nhe(e,r);return i?(t(e.update({selection:e.selection.addRange(ce.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},sB=be.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Khe(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),cB=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||She(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
324
324
  `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new Rhe(this):new Ihe(this)}getCursor(e,t=0,n){let r=e.doc?e:Te.create({doc:e});return n??=r.doc.length,this.regexp?dB(this,r,t,n):uB(this,r,t,n)}},lB=class{constructor(e){this.spec=e}};function uB(e,t,n,r){return new Jz(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?Fhe(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function Fhe(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(fB(i,n-a))!=ae.Word||t(pB(i,n-a))!=ae.Word)&&(t(pB(i,r-a))!=ae.Word||t(fB(i,r-a))!=ae.Word))}var Ihe=class extends lB{constructor(e){super(e)}nextMatch(e,t,n){let r=uB(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=uB(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=uB(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=uB(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=uB(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function dB(e,t,n,r){return new Zz(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?Lhe(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function fB(e,t){return e.slice(E(e,t,!1),t)}function pB(e,t){return e.slice(t,E(e,t))}function Lhe(e){return(t,n,r)=>!r[0].length||(e(fB(r.input,r.index))!=ae.Word||e(pB(r.input,r.index))!=ae.Word)&&(e(pB(r.input,r.index+r[0].length))!=ae.Word||e(fB(r.input,r.index+r[0].length))!=ae.Word)}var Rhe=class extends lB{nextMatch(e,t,n){let r=dB(this.spec,e,n,e.doc.length).next();return r.done&&(r=dB(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=dB(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=dB(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=dB(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},mB=ne.define(),hB=ne.define(),gB=ze.define({create(e){return new _B(CB(e).create(),null)},update(e,t){for(let n of t.effects)n.is(mB)?e=new _B(n.value.create(),e.panel):n.is(hB)&&(e=new _B(e.query,n.value?SB:null));return e},provide:e=>te.from(e,e=>e.panel)}),_B=class{constructor(e,t){this.query=e,this.panel=t}},zhe=Be.mark({class:`cm-searchMatch`}),Bhe=Be.mark({class:`cm-searchMatch cm-searchMatch-selected`}),Vhe=g.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(gB))}update(e){let t=e.state.field(gB);(t!=e.startState.field(gB)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Be.none;let{view:n}=this,r=new Fe;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Bhe:zhe)})}return r.finish()}},{decorations:e=>e.decorations});function vB(e){return t=>{let n=t.state.field(gB,!1);return n&&n.query.spec.valid?e(t,n):EB(t)}}var yB=vB((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=ce.single(r.from,r.to),a=e.state.facet(sB);return e.dispatch({selection:i,effects:[jB(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),TB(e),!0}),bB=vB((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=ce.single(i.from,i.to),o=e.state.facet(sB);return e.dispatch({selection:a,effects:[jB(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),TB(e),!0}),Hhe=vB((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:ce.create(n.map(e=>ce.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),Uhe=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Jz(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(ce.range(t.value.from,t.value.to))}return t(e.update({selection:ce.create(a,o),userEvent:`select.search.matches`})),!0},xB=vB((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(I.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`)));let d=e.state.changes(s);return o&&(c=ce.single(o.from,o.to).map(d),u.push(jB(e,o)),u.push(n.facet(sB).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),Whe=vB((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:I.announce.of(r),userEvent:`input.replace.all`}),!0});function SB(e){return e.state.facet(sB).createPanel(e)}function CB(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(sB);return new cB({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function wB(e){let t=Ee(e,SB);return t&&t.dom.querySelector(`[main-field]`)}function TB(e){let t=wB(e);t&&t==e.root.activeElement&&t.select()}var EB=e=>{let t=e.state.field(gB,!1);if(t&&t.panel){let n=wB(e);if(n&&n!=e.root.activeElement){let r=CB(e.state,t.query.spec);r.valid&&e.dispatch({effects:mB.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[hB.of(!0),t?mB.of(CB(e.state,t.query.spec)):ne.appendConfig.of(Jhe)]});return!0},DB=e=>{let t=e.state.field(gB,!1);if(!t||!t.panel)return!1;let n=Ee(e,SB);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:hB.of(!1)}),!0},Ghe=[{key:`Mod-f`,run:EB,scope:`editor search-panel`},{key:`F3`,run:yB,shift:bB,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:yB,shift:bB,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:DB,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:Uhe},{key:`Mod-Alt-g`,run:Che},{key:`Mod-d`,run:Phe,preventDefault:!0}],Khe=class{constructor(e){this.view=e;let t=this.query=e.state.field(gB).query.spec;this.commit=this.commit.bind(this),this.searchField=Ae(`input`,{value:t.search,placeholder:OB(e,`Find`),"aria-label":OB(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=Ae(`input`,{value:t.replace,placeholder:OB(e,`Replace`),"aria-label":OB(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=Ae(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=Ae(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=Ae(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return Ae(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=Ae(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>yB(e),[OB(e,`next`)]),n(`prev`,()=>bB(e),[OB(e,`previous`)]),n(`select`,()=>Hhe(e),[OB(e,`all`)]),Ae(`label`,null,[this.caseField,OB(e,`match case`)]),Ae(`label`,null,[this.reField,OB(e,`regexp`)]),Ae(`label`,null,[this.wordField,OB(e,`by word`)]),...e.state.readOnly?[]:[Ae(`br`),this.replaceField,n(`replace`,()=>xB(e),[OB(e,`replace`)]),n(`replaceAll`,()=>Whe(e),[OB(e,`replace all`)])],Ae(`button`,{name:`close`,onclick:()=>DB(e),"aria-label":OB(e,`close`),type:`button`},[`×`])])}commit(){let e=new cB({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:mB.of(e)}))}keydown(e){pe(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?bB:yB)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),xB(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(mB)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(sB).top}};function OB(e,t){return e.state.phrase(t)}var kB=30,AB=/[\s\.,:;?!]/;function jB(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-kB),o=Math.min(i,n+kB),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<kB;e++)if(!AB.test(s[e+1])&&AB.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-kB;e--)if(!AB.test(s[e-1])&&AB.test(s[e])){s=s.slice(0,e);break}}return I.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var qhe=I.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Jhe=[gB,ue.low(Vhe),qhe],MB=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},NB=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(BB).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new Fe,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=ZB(s);if(i)o.add(n,n,Be.widget({widget:new WB(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,Be.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,PB(f))}};function PB(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new MB(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new MB(r.from,n,r.diagnostic)}),r}function Yhe(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(BB).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(FB))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function Xhe(e,t){return e.field(RB,!1)?t:t.concat(ne.appendConfig.of(QB))}var FB=ne.define(),IB=ne.define(),LB=ne.define(),RB=ze.define({create(){return new NB(Be.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=PB(n,e.selected.diagnostic,i)||PB(n,null,i)}!n.size&&i&&t.state.facet(BB).autoPanel&&(i=null),e=new NB(n,i,r)}for(let n of t.effects)if(n.is(FB)){let r=t.state.facet(BB).autoPanel?n.value.length?KB.open:null:e.panel;e=NB.init(n.value,r,t.state)}else n.is(IB)?e=new NB(e.diagnostics,n.value?KB.open:null,e.selected):n.is(LB)&&(e=new NB(e.diagnostics,e.panel,n.value));return e},provide:e=>[te.from(e,e=>e.panel),I.decorations.from(e,e=>e.diagnostics)]}),Zhe=Be.mark({class:`cm-lintRange cm-lintRange-active`});function Qhe(e,t,n){let{diagnostics:r}=e.state.field(RB),i,a=-1,o=-1;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(BB).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:$he(e,i)}}}:null}function $he(e,t){return Ae(`ul`,{class:`cm-tooltip-lint`},t.map(t=>UB(e,t,!1)))}var ege=e=>{let t=e.state.field(RB,!1);(!t||!t.panel)&&e.dispatch({effects:Xhe(e.state,[IB.of(!0)])});let n=Ee(e,KB.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},zB=e=>{let t=e.state.field(RB,!1);return!t||!t.panel?!1:(e.dispatch({effects:IB.of(!1)}),!0)},tge=[{key:`Mod-Shift-m`,run:ege,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(RB,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],BB=be.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...f(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:VB,tooltipFilter:VB,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function VB(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function HB(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function UB(e,t,n){let r=n?HB(t.actions):[];return Ae(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},Ae(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=PB(e.state.field(RB).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),Ae(`u`,s.slice(c,c+1)),s.slice(c+1)];return Ae(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&Ae(`div`,{class:`cm-diagnosticSource`},t.source))}var WB=class extends F{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return Ae(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},GB=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=UB(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},KB=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)zB(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=HB(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=PB(this.view.state.field(RB).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=Ae(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=Ae(`div`,{class:`cm-panel-lint`},this.list,Ae(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>zB(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(RB).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(RB),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new GB(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new GB(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=PB(this.view.state.field(RB).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:LB.of(t)})}static open(t){return new e(t)}};function qB(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function JB(e){return qB(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var YB=I.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:JB(`#d11`)},".cm-lintRange-warning":{backgroundImage:JB(`orange`)},".cm-lintRange-info":{backgroundImage:JB(`#999`)},".cm-lintRange-hint":{backgroundImage:JB(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}}});function XB(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function ZB(e){let t=`hint`,n=1;for(let r of e){let e=XB(r.severity);e>n&&(n=e,t=r.severity)}return t}var QB=[RB,I.decorations.compute([RB],e=>{let{selected:t,panel:n}=e.field(RB);return!t||!n||t.from==t.to?Be.none:Be.set([Zhe.range(t.from,t.to)])}),k(Qhe,{hideOn:Yhe}),YB],$B=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(Ke)),e.defaultKeymap!==!1&&(n=n.concat(pde)),e.searchKeymap!==!1&&(n=n.concat(Ghe)),e.historyKeymap!==!1&&(n=n.concat(Lue)),e.foldKeymap!==!1&&(n=n.concat(j)),e.completionKeymap!==!1&&(n=n.concat(Je)),e.lintKeymap!==!1&&(n=n.concat(tge));var a=[];return e.lineNumbers!==!1&&a.push(oe()),e.highlightActiveLineGutter!==!1&&a.push(R()),e.highlightSpecialChars!==!1&&a.push(B()),e.history!==!1&&a.push(Oue()),e.foldGutter!==!1&&a.push(H()),e.drawSelection!==!1&&a.push(h()),e.dropCursor!==!1&&a.push(y()),e.allowMultipleSelections!==!1&&a.push(Te.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(T()),e.syntaxHighlighting!==!1&&a.push(D(le,{fallback:!0})),e.bracketMatching!==!1&&a.push(we()),e.closeBrackets!==!1&&a.push(Ye()),e.autocompletion!==!1&&a.push(qe()),e.rectangularSelection!==!1&&a.push(Oe()),t!==!1&&a.push(L()),e.highlightActiveLine!==!1&&a.push(z()),e.highlightSelectionMatches!==!1&&a.push(Ehe()),e.tabSize&&typeof e.tabSize==`number`&&a.push(i.of(` `.repeat(e.tabSize))),a.concat([r.of(n.flat())]).filter(Boolean)},eV=`#e5c07b`,tV=`#e06c75`,nV=`#56b6c2`,rV=`#ffffff`,iV=`#abb2bf`,aV=`#7d8799`,oV=`#61afef`,sV=`#98c379`,cV=`#d19a66`,lV=`#c678dd`,uV=`#21252b`,dV=`#2c313a`,fV=`#282c34`,pV=`#353a42`,mV=`#3E4451`,hV=`#528bff`,gV=[I.theme({"&":{color:iV,backgroundColor:fV},".cm-content":{caretColor:hV},".cm-cursor, .cm-dropCursor":{borderLeftColor:hV},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:mV},".cm-panels":{backgroundColor:uV,color:iV},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:fV,color:aV,border:`none`},".cm-activeLineGutter":{backgroundColor:dV},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:pV},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:pV,borderBottomColor:pV},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:dV,color:iV}}},{dark:!0}),D(V.define([{tag:A.keyword,color:lV},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:tV},{tag:[A.function(A.variableName),A.labelName],color:oV},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:cV},{tag:[A.definition(A.name),A.separator],color:iV},{tag:[A.typeName,A.className,A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:eV},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:nV},{tag:[A.meta,A.comment],color:aV},{tag:A.strong,fontWeight:`bold`},{tag:A.emphasis,fontStyle:`italic`},{tag:A.strikethrough,textDecoration:`line-through`},{tag:A.link,color:aV,textDecoration:`underline`},{tag:A.heading,fontWeight:`bold`,color:tV},{tag:[A.atom,A.bool,A.special(A.variableName)],color:cV},{tag:[A.processingInstruction,A.string,A.inserted],color:sV},{tag:A.invalid,color:rV}]))],_V=I.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),vV=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:i=!1,theme:a=`light`,placeholder:o=``,basicSetup:s=!0}=e,c=[];switch(t&&c.unshift(r.of([mde])),s&&(typeof s==`boolean`?c.unshift($B()):c.unshift($B(s))),o&&c.unshift(Se(o)),a){case`light`:c.push(_V);break;case`dark`:c.push(gV);break;case`none`:break;default:c.push(a);break}return n===!1&&c.push(I.editable.of(!1)),i&&c.push(Te.readOnly.of(!0)),[...c]},yV=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),bV=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},xV=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},SV=null,CV=()=>typeof window>`u`?new xV:(SV||=new xV,SV),wV=ie.define(),TV=200,EV=[];function DV(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=EV,autoFocus:c,theme:l=`light`,height:u=null,minHeight:d=null,maxHeight:f=null,width:p=null,minWidth:m=null,maxWidth:h=null,placeholder:g=``,editable:_=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:b=!0,root:x,initialState:S}=e,[C,w]=(0,K.useState)(),[T,E]=(0,K.useState)(),[D,O]=(0,K.useState)(),k=(0,K.useState)(()=>({current:null}))[0],A=(0,K.useState)(()=>({current:null}))[0],j=I.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:h},"& .cm-scroller":{height:`100% !important`}}),M=[I.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(wV))&&(k.current?k.current.reset():(k.current=new bV(()=>{if(A.current){var e=A.current;A.current=null,e()}k.current=null},TV),CV().add(k.current)),r(e.state.doc.toString(),e)),i&&i(yV(e))}),j,...vV({theme:l,editable:_,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:b})];return o&&typeof o==`function`&&M.push(I.updateListener.of(o)),M=M.concat(s),(0,K.useLayoutEffect)(()=>{if(C&&!D){var e={doc:t,selection:n,extensions:M},r=S?Te.fromJSON(S.json,e,S.fields):Te.create(e);if(O(r),!T){var i=new I({state:r,parent:C,root:x});E(i),a&&a(i,r)}}return()=>{T&&(O(void 0),E(void 0))}},[C,D]),(0,K.useEffect)(()=>{e.container&&w(e.container)},[e.container]),(0,K.useEffect)(()=>()=>{T&&(T.destroy(),E(void 0)),k.current&&=(k.current.cancel(),null)},[T]),(0,K.useEffect)(()=>{c&&T&&T.focus()},[c,T]),(0,K.useEffect)(()=>{T&&T.dispatch({effects:ne.reconfigure.of(M)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,K.useEffect)(()=>{if(t!==void 0){var e=T?T.state.doc.toString():``;if(T&&t!==e){var n=k.current&&!k.current.isDone,r=()=>{T&&t!==T.state.doc.toString()&&T.dispatch({changes:{from:0,to:T.state.doc.toString().length,insert:t||``},annotations:[wV.of(!0)]})};n?A.current=r:r()}}},[t,T]),{state:D,setState:O,view:T,setView:E,container:C,setContainer:w}}var OV=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],kV=(0,K.forwardRef)((e,t)=>{var{className:n,value:r=``,selection:i,extensions:a=[],onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,autoFocus:u,theme:d=`light`,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,root:C,initialState:w}=e,T=xhe(e,OV),E=(0,K.useRef)(null),{state:D,view:O,container:k,setContainer:A}=DV({root:C,value:r,autoFocus:u,theme:d,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,selection:i,onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,extensions:a,initialState:w});(0,K.useImperativeHandle)(t,()=>({editor:E.current,state:D,view:O}),[E,k,D,O]);var j=(0,K.useCallback)(e=>{E.current=e,A(e)},[A]);if(typeof r!=`string`)throw Error(`value must be typeof string but got `+typeof r);return(0,q.jsx)(`div`,Kz({ref:j,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},T))});kV.displayName=`CodeMirror`;function AV(e){if(!e)return`plain`;let t=e.toLowerCase();return t.endsWith(`.md`)?`markdown`:t.endsWith(`.ts`)||t.endsWith(`.tsx`)?`typescript`:t.endsWith(`.js`)||t.endsWith(`.jsx`)?`javascript`:t.endsWith(`.json`)?`json`:t.endsWith(`.yml`)||t.endsWith(`.yaml`)?`yaml`:`plain`}function jV(e,t){switch(e){case`markdown`:return[vj({base:aj,codeLanguages:mM}),vue()];case`typescript`:return[Ue({typescript:!0,jsx:t?.endsWith(`.tsx`)})];case`javascript`:return[Ue({jsx:t?.endsWith(`.jsx`)})];case`json`:return[iO()];case`yaml`:return[fM()];default:return[]}}function MV(e,t){switch(e){case`github`:return t?rN:zN;case`material`:return t?Xpe:cme;case`vscode`:return t?che:bhe;case`tokyo`:return t?Yme:zme;case`gruvbox`:return t?Spe:Ipe;case`monokai`:return _me;case`nord`:return Ome;default:return t?rN:zN}}function NV({value:e,onChange:t,readOnly:n=!1,language:i,filename:a,lineNumbers:o=!0,lineWrapping:s=!0,fontSize:c=13,className:l=``,style:u,placeholder:d,editorMinHeight:f=`240px`}){let p=i??AV(a),m=Ml(),{data:h}=X_(),g=h?.codeEditor?.theme??`github`,_=(0,K.useMemo)(()=>{let e=[Te.readOnly.of(n),...jV(p,a)];return e.push(MV(g,m)),e.push(I.theme({".cm-line":{lineHeight:`21px`},"&":{borderRadius:`6px`,border:`1px solid var(--code-editor-border)`,height:`100%`,minHeight:`var(--code-editor-min-height, 240px)`},".cm-content":{fontFamily:`var(--font-mono)`},".cm-gutters":{fontFamily:`var(--font-mono)`},".cm-scroller":{fontFamily:`var(--font-mono)`,overflow:`auto`,scrollbarWidth:`thin`},".cm-md-codeblock":{padding:`0`,borderRadius:0}})),e.push(r.of([{key:`Mod-a`,run:jD}])),s&&e.push(I.lineWrapping),e},[p,a,n,s,g,m]);return(0,q.jsx)(kV,{value:e,onChange:t,placeholder:d,theme:`none`,basicSetup:{lineNumbers:o,foldGutter:!n,highlightActiveLine:!n,highlightActiveLineGutter:!n,autocompletion:!n,closeBrackets:!n,bracketMatching:!n},extensions:_,className:`scrollbar-thin scrollbar-track-transparent overflow-auto ${l}`,style:{fontSize:c,"--code-editor-min-height":f,...u}})}function PV(e){if(!e)return null;if(e.type===`point`)return{x:e.x,y:e.y};let t=e.element;if(!t)return null;let n=t.getBoundingClientRect();switch(e.placement??`bottom-start`){case`bottom-end`:return{x:n.right,y:n.bottom};case`top-start`:return{x:n.left,y:n.top};case`top-end`:return{x:n.right,y:n.top};default:return{x:n.left,y:n.bottom}}}function FV(e,t,n){let r=n?.left??0,i=n?.top??0,a=n?.right??window.innerWidth,o=n?.bottom??window.innerHeight,s=r+12,c=i+12,l=Math.max(s,a-t.width-12),u=Math.max(c,o-t.height-12);return{x:Math.max(s,Math.min(e.x,l)),y:Math.max(c,Math.min(e.y,u))}}function IV(e,t){if(!t)return{position:`fixed`,left:e.x,top:e.y};let n=t.getBoundingClientRect();return{position:`absolute`,left:e.x-n.left+t.scrollLeft,top:e.y-n.top+t.scrollTop}}function LV(e){return e?.type===`target`?e.placement??`bottom-start`:`bottom-start`}function RV({open:e,items:t,anchor:n,wrapperElement:r,boundaryElement:i,position:a,onClose:o}){let s=(0,K.useRef)(null),c=(0,K.useMemo)(()=>a?{type:`point`,x:a.x,y:a.y}:null,[a]),l=n??c,u=r??i??null,d=(0,K.useMemo)(()=>PV(l),[l]),[f,p]=(0,K.useState)(null),m=(0,K.useId)().replace(/[^a-zA-Z0-9_-]/g,``),h=`--context-menu-anchor-${m}`,g=`context-menu-${m}`,_=LV(l),v=(0,K.useMemo)(()=>t.filter(e=>e.label.length>0),[t]),y=e&&!!d&&v.length>0;(0,K.useLayoutEffect)(()=>{if(!e||!d){p(null);return}let t=s.current;if(!t){p(d);return}let n=u?.getBoundingClientRect()??null;p(FV(d,t.getBoundingClientRect(),n))},[d,u,e]),(0,K.useEffect)(()=>{let e=()=>o();return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[e,o]),(0,K.useEffect)(()=>{if(!y)return;let e=e=>{if(e.button===2)return;let t=e.target;t instanceof Node&&(s.current?.contains(t)||l?.type===`target`&&l.element?.contains(t)||o())},t=e=>{e.key===`Escape`&&o()};return window.addEventListener(`pointerdown`,e,!0),window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`keydown`,t)}},[l,o,y]),(0,K.useEffect)(()=>{if(!e||l?.type!==`target`||!l.element)return;let t=l.element,n=t.style.getPropertyValue(`anchor-name`),r=t.style.getPropertyPriority(`anchor-name`);return t.style.setProperty(`anchor-name`,h),()=>{n?t.style.setProperty(`anchor-name`,n,r):t.style.removeProperty(`anchor-name`)}},[l,h,e]);let b=f??d,x=b===null?{left:0,top:0}:{left:b.x,top:b.y},S=l?.type===`point`&&d?IV(d,u):null;if((0,K.useEffect)(()=>{let e=s.current;e&&(y?e.matches(`:popover-open`)||e.showPopover?.():e.matches(`:popover-open`)&&e.hidePopover?.())},[y]),!y)return null;let C=String.raw;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`style`,{children:C`
325
325
  .context-menu-anchor[data-context-menu-id='${g}'] {
326
326
  width: 1px;
@@ -918,7 +918,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
918
918
  @pointerdown=${e=>this._onResizeStart(e,`br`)}
919
919
  ></div>
920
920
  ${e}
921
- </dialog>`:e}};customElements.define(`input-panel`,gve);var _ve={extension:{type:G.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await J(()=>import(`./browserAll-4AdbiChd.js`),__vite__mapDeps([127,128,1,129]))}},vve={extension:{type:G.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await J(()=>import(`./webworkerAll-D9jIoGRN.js`),__vite__mapDeps([130,128,1,129]))}},yve=new pt;function ZX(e,t,n){let r=yve;e.measurable=!0,Mt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function QX(e,t,n){let r=Qe.get();e.measurable=!0;let i=jt.get().identity();mt(e,r,$X(e,n,i)),e.measurable=!1,t.addBoundsMask(r),jt.return(i),Qe.return(r)}function $X(e,t,n){return e?(e!==t&&($X(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(at(`Mask bounds, renderable is not inside the root container`),n)}var eZ=class{constructor(e){this.priority=0,this.inverse=!1,this.pipe=`alphaMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof qt),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||ZX(this.mask,e,t)}addLocalBounds(e,t){QX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof qt}};eZ.extension=G.MaskEffect;var tZ=class{constructor(e){this.priority=0,this.pipe=`colorMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e==`number`}};tZ.extension=G.MaskEffect;var nZ=class{constructor(e){this.priority=0,this.pipe=`stencilMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){ZX(this.mask,e,t)}addLocalBounds(e,t){QX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Kt}};nZ.extension=G.MaskEffect;var rZ;async function bve(){return rZ??=(async()=>{let e=Wt.get().createCanvas(1,1).getContext(`webgl`);if(!e)return`premultiply-alpha-on-upload`;let t=await new Promise(e=>{let t=document.createElement(`video`);t.onloadeddata=()=>e(t),t.onerror=()=>e(null),t.autoplay=!1,t.crossOrigin=`anonymous`,t.preload=`auto`,t.src=`data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=`,t.load()});if(!t)return`premultiply-alpha-on-upload`;let n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);let i=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,i),e.deleteFramebuffer(r),e.deleteTexture(n),e.getExtension(`WEBGL_lose_context`)?.loseContext(),i[0]<=i[3]?`premultiplied-alpha`:`premultiply-alpha-on-upload`})(),rZ}var iZ=class e extends ht{constructor(t){super(t),this.isReady=!1,this.uploadMethodId=`video`,t={...e.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??`premultiply-alpha-on-upload`,this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let e=Ot.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let e=this.resource,t=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener(`play`,this._onPlayStart),e.addEventListener(`pause`,this._onPlayStop),e.addEventListener(`seeked`,this._onSeeked),this._isSourceReady()?this._mediaReady():(t.preload||e.addEventListener(`canplay`,this._onCanPlay),e.addEventListener(`canplaythrough`,this._onCanPlayThrough),e.addEventListener(`error`,this._onError,!0)),this.alphaMode=await bve(),this._load=new Promise((n,r)=>{this.isValid?n(this):(this._resolve=n,this._reject=r,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener(`error`,this._onError,!0),this.emit(`error`,e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){let e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener(`canplay`,this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener(`canplaythrough`,this._onCanPlay),this._preloadTimeout&&=(clearTimeout(this._preloadTimeout),void 0),this._mediaReady()}_mediaReady(){let e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let e=this.resource;e&&(e.removeEventListener(`play`,this._onPlayStart),e.removeEventListener(`pause`,this._onPlayStop),e.removeEventListener(`seeked`,this._onSeeked),e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlayThrough),e.removeEventListener(`error`,this._onError,!0),e.pause(),e.src=``,e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Ot.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Ot.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Ot.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};iZ.extension=G.TextureSource,iZ.defaultOptions={...ht.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},iZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var xve=iZ,aZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),oZ=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||at(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=aZ(e),r;for(let e=0;e<this.parsers.length;e++){let i=this.parsers[e];if(i.test(t)){r=i.getCacheableAssets(n,t);break}}let i=new Map(Object.entries(r||{}));r||n.forEach(e=>{i.set(e,t)});let a=[...i.keys()],o={cacheKeys:a,keys:n};n.forEach(e=>{this._cacheMap.set(e,o)}),a.forEach(e=>{let n=r?r[e]:t;this._cache.has(e)&&this._cache.get(e)!==n&&at(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){at(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(e=>{this._cache.delete(e)}),t.keys.forEach(e=>{this._cacheMap.delete(e)})}get parsers(){return this._parsers}},sZ=[];At.handleByList(G.TextureSource,sZ);function cZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<sZ.length;e++){let t=sZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Sve(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&oZ.has(r))return oZ.get(r);let a=new $e({source:cZ(i)});return a.on(`destroy`,()=>{oZ.has(r)&&oZ.remove(r)}),t||oZ.set(r,a),a}function Cve(e,t=!1){return typeof e==`string`?oZ.get(e):e instanceof ht?new $e({source:e}):Sve(e,t)}$e.from=Cve,ht.from=cZ,At.add(eZ,tZ,nZ,xve,Yt,bt,it);var lZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(lZ||{});function uZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function dZ(e){return e.split(`?`)[0].split(`#`)[0]}function wve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Tve(e,t,n){return e.replace(new RegExp(wve(t),`g`),n)}function Eve(e,t){let n=``,r=0,i=-1,a=0,o=-1;for(let s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){let e=n.lastIndexOf(`/`);if(e!==n.length-1){e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}var fZ={toPosix(e){return Tve(e,`\\`,`/`)},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},isBlobUrl(e){return e.startsWith(`blob:`)},hasProtocol(e){return/^[^/:]+:/.test(this.toPosix(e))},getProtocol(e){uZ(e),e=this.toPosix(e);let t=/^file:\/\/\//.exec(e);if(t)return t[0];let n=/^[^/:]+:\/{0,2}/.exec(e);return n?n[0]:``},toAbsolute(e,t,n){if(uZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=dZ(this.toPosix(t??Wt.get().getBaseUrl())),i=dZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?fZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(uZ(e),e.length===0)return`.`;if(this.isDataUrl(e)||this.isBlobUrl(e))return e;e=this.toPosix(e);let t=``,n=e.startsWith(`/`);this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));let r=e.endsWith(`/`);return e=Eve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return uZ(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith(`/`)},join(...e){if(e.length===0)return`.`;let t;for(let n=0;n<e.length;++n){let r=e[n];if(uZ(r),r.length>0)if(t===void 0)t=r;else{let i=e[n-1]??``;this.joinExtensions.includes(this.extname(i).toLowerCase())?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?`.`:this.normalize(t)},dirname(e){if(uZ(e),e.length===0)return`.`;e=this.toPosix(e);let t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=this.getProtocol(e),o=e;e=e.slice(a.length);for(let n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!i){r=n;break}}else i=!1;return r===-1?n?`/`:this.isUrl(o)?a+e:a:n&&r===1?`//`:a+e.slice(0,r)},rootname(e){uZ(e),e=this.toPosix(e);let t=``;if(t=e.startsWith(`/`)?`/`:this.getProtocol(e),this.isUrl(e)){let n=e.indexOf(`/`,t.length);t=n===-1?e:e.slice(0,n),t.endsWith(`/`)||(t+=`/`)}return t},basename(e,t){uZ(e),t&&uZ(t),e=dZ(this.toPosix(e));let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){let c=e.charCodeAt(a);if(c===47){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){uZ(e),e=dZ(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){let s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?``:e.slice(t,r)},parse(e){uZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=dZ(this.toPosix(e));let n=e.charCodeAt(0),r=this.isAbsolute(e),i;t.root=this.rootname(e),i=r||this.hasProtocol(e)?1:0;let a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;for(;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(o===0&&r?t.base=t.name=e.slice(1,s):t.base=t.name=e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),t.dir=this.dirname(e),t},sep:`/`,delimiter:`:`,joinExtensions:[`.html`]};function pZ(e,t,n,r,i){let a=t[n];for(let o=0;o<a.length;o++){let s=a[o];n<t.length-1?pZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function Dve(e){let t=e.match(/\{(.*?)\}/g),n=[];if(t){let r=[];t.forEach(e=>{let t=e.substring(1,e.length-1).split(`,`);r.push(t)}),pZ(e,r,0,t,n)}else n.push(e);return n}var mZ=e=>!Array.isArray(e),hZ=class{constructor(){this._defaultBundleIdentifierOptions={connector:`-`,createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,``)},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle(`foo`,this._createBundleAssetId(`foo`,`bar`))!==`bar`)throw Error(`[Resolver] GenerateBundleAssetId are not working correctly`)}prefer(...e){e.forEach(e=>{this._preferredOrder.push(e),e.priority||=Object.keys(e.params)}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e==`string`)this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join(`&`)}}getAlias(e){let{alias:t,src:n}=e;return aZ(t||n,e=>typeof e==`string`?e:Array.isArray(e)?e.map(e=>e?.src??e):e?.src?e.src:e,!0)}addManifest(e){this._manifest&&at(`[Resolver] Manifest already exists, this will be overwritten`),this._manifest=e,e.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(e,t){let n=[],r=t;Array.isArray(t)||(r=Object.entries(t).map(([e,t])=>typeof t==`string`||Array.isArray(t)?{alias:e,src:t}:{alias:e,...t})),r.forEach(t=>{let r=t.src,i=t.alias,a;if(typeof i==`string`){let t=this._createBundleAssetId(e,i);n.push(t),a=[i,t]}else{let t=i.map(t=>this._createBundleAssetId(e,t));n.push(...t),a=[...i,...t]}this.add({...t,alias:a,src:r})}),this._bundles[e]=n}add(e){let t=[];Array.isArray(e)?t.push(...e):t.push(e);let n=e=>{this.hasKey(e)&&at(`[Resolver] already has key: ${e} overwriting`)};aZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=aZ(t).map(e=>typeof e==`string`?Dve(e):Array.isArray(e)?e:[e]),c=this.getAlias(e);Array.isArray(c)?c.forEach(n):n(c);let l=[],u=e=>({src:e,...this._parsers.find(t=>t.test(e))?.parse(e)});s.forEach(t=>{t.forEach(t=>{let n={};if(typeof t==`object`?(r=t.data??r,i=t.format??i,(t.loadParser||t.parser)&&(a=t.loadParser??a,o=t.parser??o),n={...u(t.src),...t}):n=u(t),!c)throw Error(`[Resolver] alias is undefined for this asset: ${n.src}`);n=this._buildResolvedAsset(n,{aliases:c,data:r,format:i,loadParser:a,parser:o,progressSize:e.progressSize}),l.push(n)})}),c.forEach(e=>{this._assetMap[e]=l})})}resolveBundle(e){let t=mZ(e);e=aZ(e);let n={};return e.forEach(e=>{let t=this._bundles[e];if(t){let r=this.resolve(t),i={};for(let t in r){let n=r[t];i[this._extractAssetIdFromBundle(e,t)]=n}n[e]=i}}),t?n[e[0]]:n}resolveUrl(e){let t=this.resolve(e);if(typeof e!=`string`){let e={};for(let n in t)e[n]=t[n].src;return e}return t.src}resolve(e){let t=mZ(e);e=aZ(e);let n={};return e.forEach(e=>{if(!this._resolverHash[e])if(this._assetMap[e]){let t=this._assetMap[e],n=this._getPreferredOrder(t);n?.priority.forEach(e=>{n.params[e].forEach(n=>{let r=t.filter(t=>t[e]?t[e]===n:!1);r.length&&(t=r)})}),this._resolverHash[e]=t[0]}else this._resolverHash[e]=this._buildResolvedAsset({alias:[e],src:e},{});n[e]=this._resolverHash[e]}),t?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let n=e[t],r=this._preferredOrder.find(e=>e.params.format.includes(n.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(e){return this._defaultSearchParams?`${e}${/\?/.test(e)?`&`:`?`}${this._defaultSearchParams}`:e}_buildResolvedAsset(e,t){let{aliases:n,data:r,loadParser:i,parser:a,format:o,progressSize:s}=t;return(this._basePath||this._rootPath)&&(e.src=fZ.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...r||{},...e.data},e.loadParser=i??e.loadParser,e.parser=a??e.parser,e.format=o??e.format??Ove(e.src),s!==void 0&&(e.progressSize=s),e}};hZ.RETINA_PREFIX=/@([0-9\.]+)x/;function Ove(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var gZ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},_Z=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof ht&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof $e?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=i;let o=parseFloat(i.meta.scale);o?(this.resolution=o,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=e.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let r=t,i=n?1/0:e.BATCH_SIZE;for(;r-t<i&&r<this._frameKeys.length;){let e=this._frameKeys[r],t=this._frames[e],n=t.frame;if(n){let r=null,i=null,a=t.trimmed!==!1&&t.sourceSize?t.sourceSize:t.frame,o=new yt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new yt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):new yt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),t.trimmed!==!1&&t.spriteSourceSize&&(i=new yt(Math.floor(t.spriteSourceSize.x)/this.resolution,Math.floor(t.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[e]=new $e({source:this.textureSource,frame:r,orig:o,trim:i,rotate:t.rotated?2:0,defaultAnchor:t.anchor,defaultBorders:t.borders,label:e.toString()})}r++}}_processAnimations(){let e=this.data.animations||{};for(let t in e){this.animations[t]=[];for(let n=0;n<e[t].length;n++){let r=e[t][n];this.animations[t].push(this.textures[r])}}}_parseComplete(){let e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*e.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*e.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};_Z.BATCH_SIZE=1e3;var vZ=_Z,kve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function yZ(e,t,n){let r={};if(e.forEach(e=>{r[e]=t}),Object.keys(t.textures).forEach(e=>{r[`${t.cachePrefix}${e}`]=t.textures[e]}),!n){let n=fZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=yZ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var Ave={extension:G.Asset,cache:{test:e=>e instanceof vZ,getCacheableAssets:(e,t)=>yZ(e,t,!1)},resolver:{extension:{type:G.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&kve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(hZ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:G.LoadParser,priority:lZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return fZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=fZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof $e)c=r;else{let r=gZ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new vZ({texture:c.source,data:e,cachePrefix:o});await l.parse();let u=e?.meta?.related_multi_packs;if(Array.isArray(u)){let e=[];for(let r of u){if(typeof r!=`string`)continue;let i=s+r;t.data?.ignoreMultiPack||(i=gZ(i,t.src),e.push(n.load({src:i,data:{textureOptions:a,ignoreMultiPack:!0}})))}let r=await Promise.all(e);l.linkedSheets=r,r.forEach(e=>{e.linkedSheets=[l].concat(l.linkedSheets.filter(t=>t!==e))})}return l},async unload(e,t,n){await n.unload(e.textureSource._sourceOrigin),e.destroy(!1)}}};At.add(Ave);var jve=class{constructor(e){this._lastTransform=``,this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;let e=this._canvas.getBoundingClientRect(),t=this._canvas.width,n=this._canvas.height,r=e.width/t*this._renderer.resolution,i=e.height/n*this._renderer.resolution,a=`translate(${e.left}px, ${e.top}px) scale(${r}, ${i})`;a!==this._lastTransform&&(this._domElement.style.transform=a,this._lastTransform=a)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){`ResizeObserver`in globalThis?(this._observer&&=(this._observer.disconnect(),null),this._observer=new ResizeObserver(e=>{for(let t of e){if(t.target!==this._canvas)continue;let e=this.canvas.width,n=this.canvas.height,r=t.contentRect.width/e*this._renderer.resolution,i=t.contentRect.height/n*this._renderer.resolution;(this._lastScaleX!==r||this._lastScaleY!==i)&&(this.updateTranslation(),this._lastScaleX=r,this._lastScaleY=i)}}),this._observer.observe(this._canvas)):this._tickerAttached||Ot.shared.add(this.updateTranslation,this,Dt.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Ot.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},bZ=class e{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=e.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Tt,this.page=new Tt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,n){throw Error(`initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}initUIEvent(e,t,n,r,i){throw Error(`initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}},xZ=/iPhone/i,SZ=/iPod/i,CZ=/iPad/i,wZ=/\biOS-universal(?:.+)Mac\b/i,TZ=/\bAndroid(?:.+)Mobile\b/i,EZ=/Android/i,DZ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,OZ=/Silk/i,kZ=/Windows Phone/i,AZ=/\bWindows(?:.+)ARM\b/i,jZ=/BlackBerry/i,MZ=/BB10/i,NZ=/Opera Mini/i,PZ=/\b(CriOS|Chrome)(?:.+)Mobile/i,FZ=/Mobile(?:.+)Firefox\b/i,IZ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Mve(e){return function(t){return t.test(e)}}function LZ(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Mve(n),a={apple:{phone:i(xZ)&&!i(kZ),ipod:i(SZ),tablet:!i(xZ)&&(i(CZ)||IZ(t))&&!i(kZ),universal:i(wZ),device:(i(xZ)||i(SZ)||i(CZ)||i(wZ)||IZ(t))&&!i(kZ)},amazon:{phone:i(DZ),tablet:!i(DZ)&&i(OZ),device:i(DZ)||i(OZ)},android:{phone:!i(kZ)&&i(DZ)||!i(kZ)&&i(TZ),tablet:!i(kZ)&&!i(DZ)&&!i(TZ)&&(i(OZ)||i(EZ)),device:!i(kZ)&&(i(DZ)||i(OZ)||i(TZ)||i(EZ))||i(/\bokhttp\b/i)},windows:{phone:i(kZ),tablet:i(AZ),device:i(kZ)||i(AZ)},other:{blackberry:i(jZ),blackberry10:i(MZ),opera:i(NZ),firefox:i(FZ),chrome:i(PZ),device:i(jZ)||i(MZ)||i(NZ)||i(FZ)||i(PZ)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Nve=(LZ.default??LZ)(globalThis.navigator),Pve=9,RZ=100,Fve=0,Ive=0,zZ=2,BZ=1,Lve=-1e3,Rve=-1e3,zve=2,VZ=class e{constructor(e,t=Nve){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){let e=document.createElement(`button`);e.style.width=`${BZ}px`,e.style.height=`${BZ}px`,e.style.position=`absolute`,e.style.top=`${Lve}px`,e.style.left=`${Rve}px`,e.style.zIndex=zve.toString(),e.style.backgroundColor=`#FF0000`,e.title=`select to enable accessibility for this content`,e.addEventListener(`focus`,()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&=(document.body.removeChild(this._hookDiv),null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement(`div`),this._div.style.position=`absolute`,this._div.style.top=`${Fve}px`,this._div.style.left=`${Ive}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=zZ.toString(),this._canvasObserver=new jve({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener(`mousemove`,this._boundOnMouseMove,!0);let e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{let t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(let e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(let e in this._pools)this._pools[e].forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);let t=e.children;if(t)for(let e=0;e<t.length;e++)this._updateAccessibleObjects(t[e])}init(t){let n={accessibilityOptions:{...e.defaultOptions,...t?.accessibilityOptions||{}}};this.debug=n.accessibilityOptions.debug,this._activateOnTab=n.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=n.accessibilityOptions.deactivateOnMouseMove,n.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){let e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;let t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(let e of this._children)e._renderId===this._renderId&&t.add(this._children.indexOf(e))}for(let e=this._children.length-1;e>=0;e--){let n=this._children[e];t.has(e)||(n._accessibleDiv&&n._accessibleDiv.parentNode&&(n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),this._getPool(n.accessibleType).push(n._accessibleDiv),n._accessibleDiv=null),n._accessibleActive=!1,lt(this._children,e,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let e=0;e<this._children.length;e++){let t=this._children[e];if(!t._accessibleActive||!t._accessibleDiv)continue;let n=t._accessibleDiv,r=t.hitArea||t.getBounds().rectangle;if(t.hitArea){let e=t.worldTransform;n.style.left=`${e.tx+r.x*e.a}px`,n.style.top=`${e.ty+r.y*e.d}px`,n.style.width=`${r.width*e.a}px`,n.style.height=`${r.height*e.d}px`}else this._capHitArea(r),n.style.left=`${r.x}px`,n.style.top=`${r.y}px`,n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:n}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>n&&(e.height=n-e.y)}_addChild(e){let t=this._getPool(e.accessibleType).pop();t?(t.innerHTML=``,t.removeAttribute(`title`),t.removeAttribute(`aria-label`),t.tabIndex=0):(e.accessibleType===`button`?t=document.createElement(`button`):(t=document.createElement(e.accessibleType),t.style.cssText=`
921
+ </dialog>`:e}};customElements.define(`input-panel`,gve);var _ve={extension:{type:G.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await J(()=>import(`./browserAll-C2SVTxiZ.js`),__vite__mapDeps([127,128,1,129]))}},vve={extension:{type:G.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await J(()=>import(`./webworkerAll-BjzNDx-n.js`),__vite__mapDeps([130,128,1,129]))}},yve=new pt;function ZX(e,t,n){let r=yve;e.measurable=!0,Mt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function QX(e,t,n){let r=Qe.get();e.measurable=!0;let i=jt.get().identity();mt(e,r,$X(e,n,i)),e.measurable=!1,t.addBoundsMask(r),jt.return(i),Qe.return(r)}function $X(e,t,n){return e?(e!==t&&($X(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(at(`Mask bounds, renderable is not inside the root container`),n)}var eZ=class{constructor(e){this.priority=0,this.inverse=!1,this.pipe=`alphaMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof qt),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,t){this.inverse||ZX(this.mask,e,t)}addLocalBounds(e,t){QX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof qt}};eZ.extension=G.MaskEffect;var tZ=class{constructor(e){this.priority=0,this.pipe=`colorMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e==`number`}};tZ.extension=G.MaskEffect;var nZ=class{constructor(e){this.priority=0,this.pipe=`stencilMask`,e?.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,t){ZX(this.mask,e,t)}addLocalBounds(e,t){QX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Kt}};nZ.extension=G.MaskEffect;var rZ;async function bve(){return rZ??=(async()=>{let e=Wt.get().createCanvas(1,1).getContext(`webgl`);if(!e)return`premultiply-alpha-on-upload`;let t=await new Promise(e=>{let t=document.createElement(`video`);t.onloadeddata=()=>e(t),t.onerror=()=>e(null),t.autoplay=!1,t.crossOrigin=`anonymous`,t.preload=`auto`,t.src=`data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=`,t.load()});if(!t)return`premultiply-alpha-on-upload`;let n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);let r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t);let i=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,i),e.deleteFramebuffer(r),e.deleteTexture(n),e.getExtension(`WEBGL_lose_context`)?.loseContext(),i[0]<=i[3]?`premultiplied-alpha`:`premultiply-alpha-on-upload`})(),rZ}var iZ=class e extends ht{constructor(t){super(t),this.isReady=!1,this.uploadMethodId=`video`,t={...e.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??`premultiply-alpha-on-upload`,this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){let e=Ot.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;let e=this.resource,t=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener(`play`,this._onPlayStart),e.addEventListener(`pause`,this._onPlayStop),e.addEventListener(`seeked`,this._onSeeked),this._isSourceReady()?this._mediaReady():(t.preload||e.addEventListener(`canplay`,this._onCanPlay),e.addEventListener(`canplaythrough`,this._onCanPlayThrough),e.addEventListener(`error`,this._onError,!0)),this.alphaMode=await bve(),this._load=new Promise((n,r)=>{this.isValid?n(this):(this._resolve=n,this._reject=r,t.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${t.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener(`error`,this._onError,!0),this.emit(`error`,e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){let e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener(`canplay`,this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener(`canplaythrough`,this._onCanPlay),this._preloadTimeout&&=(clearTimeout(this._preloadTimeout),void 0),this._mediaReady()}_mediaReady(){let e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();let e=this.resource;e&&(e.removeEventListener(`play`,this._onPlayStart),e.removeEventListener(`pause`,this._onPlayStop),e.removeEventListener(`seeked`,this._onSeeked),e.removeEventListener(`canplay`,this._onCanPlay),e.removeEventListener(`canplaythrough`,this._onCanPlayThrough),e.removeEventListener(`error`,this._onError,!0),e.pause(),e.src=``,e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Ot.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Ot.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Ot.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};iZ.extension=G.TextureSource,iZ.defaultOptions={...ht.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},iZ.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var xve=iZ,aZ=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),oZ=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||at(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=aZ(e),r;for(let e=0;e<this.parsers.length;e++){let i=this.parsers[e];if(i.test(t)){r=i.getCacheableAssets(n,t);break}}let i=new Map(Object.entries(r||{}));r||n.forEach(e=>{i.set(e,t)});let a=[...i.keys()],o={cacheKeys:a,keys:n};n.forEach(e=>{this._cacheMap.set(e,o)}),a.forEach(e=>{let n=r?r[e]:t;this._cache.has(e)&&this._cache.get(e)!==n&&at(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){at(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(e=>{this._cache.delete(e)}),t.keys.forEach(e=>{this._cacheMap.delete(e)})}get parsers(){return this._parsers}},sZ=[];At.handleByList(G.TextureSource,sZ);function cZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<sZ.length;e++){let t=sZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Sve(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&oZ.has(r))return oZ.get(r);let a=new $e({source:cZ(i)});return a.on(`destroy`,()=>{oZ.has(r)&&oZ.remove(r)}),t||oZ.set(r,a),a}function Cve(e,t=!1){return typeof e==`string`?oZ.get(e):e instanceof ht?new $e({source:e}):Sve(e,t)}$e.from=Cve,ht.from=cZ,At.add(eZ,tZ,nZ,xve,Yt,bt,it);var lZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(lZ||{});function uZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function dZ(e){return e.split(`?`)[0].split(`#`)[0]}function wve(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Tve(e,t,n){return e.replace(new RegExp(wve(t),`g`),n)}function Eve(e,t){let n=``,r=0,i=-1,a=0,o=-1;for(let s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){let e=n.lastIndexOf(`/`);if(e!==n.length-1){e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}var fZ={toPosix(e){return Tve(e,`\\`,`/`)},isUrl(e){return/^https?:/.test(this.toPosix(e))},isDataUrl(e){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e)},isBlobUrl(e){return e.startsWith(`blob:`)},hasProtocol(e){return/^[^/:]+:/.test(this.toPosix(e))},getProtocol(e){uZ(e),e=this.toPosix(e);let t=/^file:\/\/\//.exec(e);if(t)return t[0];let n=/^[^/:]+:\/{0,2}/.exec(e);return n?n[0]:``},toAbsolute(e,t,n){if(uZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=dZ(this.toPosix(t??Wt.get().getBaseUrl())),i=dZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?fZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(uZ(e),e.length===0)return`.`;if(this.isDataUrl(e)||this.isBlobUrl(e))return e;e=this.toPosix(e);let t=``,n=e.startsWith(`/`);this.hasProtocol(e)&&(t=this.rootname(e),e=e.slice(t.length));let r=e.endsWith(`/`);return e=Eve(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return uZ(e),e=this.toPosix(e),this.hasProtocol(e)?!0:e.startsWith(`/`)},join(...e){if(e.length===0)return`.`;let t;for(let n=0;n<e.length;++n){let r=e[n];if(uZ(r),r.length>0)if(t===void 0)t=r;else{let i=e[n-1]??``;this.joinExtensions.includes(this.extname(i).toLowerCase())?t+=`/../${r}`:t+=`/${r}`}}return t===void 0?`.`:this.normalize(t)},dirname(e){if(uZ(e),e.length===0)return`.`;e=this.toPosix(e);let t=e.charCodeAt(0),n=t===47,r=-1,i=!0,a=this.getProtocol(e),o=e;e=e.slice(a.length);for(let n=e.length-1;n>=1;--n)if(t=e.charCodeAt(n),t===47){if(!i){r=n;break}}else i=!1;return r===-1?n?`/`:this.isUrl(o)?a+e:a:n&&r===1?`//`:a+e.slice(0,r)},rootname(e){uZ(e),e=this.toPosix(e);let t=``;if(t=e.startsWith(`/`)?`/`:this.getProtocol(e),this.isUrl(e)){let n=e.indexOf(`/`,t.length);t=n===-1?e:e.slice(0,n),t.endsWith(`/`)||(t+=`/`)}return t},basename(e,t){uZ(e),t&&uZ(t),e=dZ(this.toPosix(e));let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;let o=t.length-1,s=-1;for(a=e.length-1;a>=0;--a){let c=e.charCodeAt(a);if(c===47){if(!i){n=a+1;break}}else s===-1&&(i=!1,s=a+1),o>=0&&(c===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=s))}return n===r?r=s:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?``:e.slice(n,r)},extname(e){uZ(e),e=dZ(this.toPosix(e));let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){let s=e.charCodeAt(o);if(s===47){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),s===46?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?``:e.slice(t,r)},parse(e){uZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=dZ(this.toPosix(e));let n=e.charCodeAt(0),r=this.isAbsolute(e),i;t.root=this.rootname(e),i=r||this.hasProtocol(e)?1:0;let a=-1,o=0,s=-1,c=!0,l=e.length-1,u=0;for(;l>=i;--l){if(n=e.charCodeAt(l),n===47){if(!c){o=l+1;break}continue}s===-1&&(c=!1,s=l+1),n===46?a===-1?a=l:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||s===-1||u===0||u===1&&a===s-1&&a===o+1?s!==-1&&(o===0&&r?t.base=t.name=e.slice(1,s):t.base=t.name=e.slice(o,s)):(o===0&&r?(t.name=e.slice(1,a),t.base=e.slice(1,s)):(t.name=e.slice(o,a),t.base=e.slice(o,s)),t.ext=e.slice(a,s)),t.dir=this.dirname(e),t},sep:`/`,delimiter:`:`,joinExtensions:[`.html`]};function pZ(e,t,n,r,i){let a=t[n];for(let o=0;o<a.length;o++){let s=a[o];n<t.length-1?pZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function Dve(e){let t=e.match(/\{(.*?)\}/g),n=[];if(t){let r=[];t.forEach(e=>{let t=e.substring(1,e.length-1).split(`,`);r.push(t)}),pZ(e,r,0,t,n)}else n.push(e);return n}var mZ=e=>!Array.isArray(e),hZ=class{constructor(){this._defaultBundleIdentifierOptions={connector:`-`,createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,``)},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle(`foo`,this._createBundleAssetId(`foo`,`bar`))!==`bar`)throw Error(`[Resolver] GenerateBundleAssetId are not working correctly`)}prefer(...e){e.forEach(e=>{this._preferredOrder.push(e),e.priority||=Object.keys(e.params)}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e==`string`)this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join(`&`)}}getAlias(e){let{alias:t,src:n}=e;return aZ(t||n,e=>typeof e==`string`?e:Array.isArray(e)?e.map(e=>e?.src??e):e?.src?e.src:e,!0)}addManifest(e){this._manifest&&at(`[Resolver] Manifest already exists, this will be overwritten`),this._manifest=e,e.bundles.forEach(e=>{this.addBundle(e.name,e.assets)})}addBundle(e,t){let n=[],r=t;Array.isArray(t)||(r=Object.entries(t).map(([e,t])=>typeof t==`string`||Array.isArray(t)?{alias:e,src:t}:{alias:e,...t})),r.forEach(t=>{let r=t.src,i=t.alias,a;if(typeof i==`string`){let t=this._createBundleAssetId(e,i);n.push(t),a=[i,t]}else{let t=i.map(t=>this._createBundleAssetId(e,t));n.push(...t),a=[...i,...t]}this.add({...t,alias:a,src:r})}),this._bundles[e]=n}add(e){let t=[];Array.isArray(e)?t.push(...e):t.push(e);let n=e=>{this.hasKey(e)&&at(`[Resolver] already has key: ${e} overwriting`)};aZ(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=aZ(t).map(e=>typeof e==`string`?Dve(e):Array.isArray(e)?e:[e]),c=this.getAlias(e);Array.isArray(c)?c.forEach(n):n(c);let l=[],u=e=>({src:e,...this._parsers.find(t=>t.test(e))?.parse(e)});s.forEach(t=>{t.forEach(t=>{let n={};if(typeof t==`object`?(r=t.data??r,i=t.format??i,(t.loadParser||t.parser)&&(a=t.loadParser??a,o=t.parser??o),n={...u(t.src),...t}):n=u(t),!c)throw Error(`[Resolver] alias is undefined for this asset: ${n.src}`);n=this._buildResolvedAsset(n,{aliases:c,data:r,format:i,loadParser:a,parser:o,progressSize:e.progressSize}),l.push(n)})}),c.forEach(e=>{this._assetMap[e]=l})})}resolveBundle(e){let t=mZ(e);e=aZ(e);let n={};return e.forEach(e=>{let t=this._bundles[e];if(t){let r=this.resolve(t),i={};for(let t in r){let n=r[t];i[this._extractAssetIdFromBundle(e,t)]=n}n[e]=i}}),t?n[e[0]]:n}resolveUrl(e){let t=this.resolve(e);if(typeof e!=`string`){let e={};for(let n in t)e[n]=t[n].src;return e}return t.src}resolve(e){let t=mZ(e);e=aZ(e);let n={};return e.forEach(e=>{if(!this._resolverHash[e])if(this._assetMap[e]){let t=this._assetMap[e],n=this._getPreferredOrder(t);n?.priority.forEach(e=>{n.params[e].forEach(n=>{let r=t.filter(t=>t[e]?t[e]===n:!1);r.length&&(t=r)})}),this._resolverHash[e]=t[0]}else this._resolverHash[e]=this._buildResolvedAsset({alias:[e],src:e},{});n[e]=this._resolverHash[e]}),t?n[e[0]]:n}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let n=e[t],r=this._preferredOrder.find(e=>e.params.format.includes(n.format));if(r)return r}return this._preferredOrder[0]}_appendDefaultSearchParams(e){return this._defaultSearchParams?`${e}${/\?/.test(e)?`&`:`?`}${this._defaultSearchParams}`:e}_buildResolvedAsset(e,t){let{aliases:n,data:r,loadParser:i,parser:a,format:o,progressSize:s}=t;return(this._basePath||this._rootPath)&&(e.src=fZ.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=n??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...r||{},...e.data},e.loadParser=i??e.loadParser,e.parser=a??e.parser,e.format=o??e.format??Ove(e.src),s!==void 0&&(e.progressSize=s),e}};hZ.RETINA_PREFIX=/@([0-9\.]+)x/;function Ove(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var gZ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},_Z=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof ht&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof $e?r:null,this.textureSource=r.source,this.textures={},this.animations={},this.data=i;let o=parseFloat(i.meta.scale);o?(this.resolution=o,r.source.resolution=this.resolution):this.resolution=r.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=e.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let r=t,i=n?1/0:e.BATCH_SIZE;for(;r-t<i&&r<this._frameKeys.length;){let e=this._frameKeys[r],t=this._frames[e],n=t.frame;if(n){let r=null,i=null,a=t.trimmed!==!1&&t.sourceSize?t.sourceSize:t.frame,o=new yt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new yt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):new yt(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),t.trimmed!==!1&&t.spriteSourceSize&&(i=new yt(Math.floor(t.spriteSourceSize.x)/this.resolution,Math.floor(t.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[e]=new $e({source:this.textureSource,frame:r,orig:o,trim:i,rotate:t.rotated?2:0,defaultAnchor:t.anchor,defaultBorders:t.borders,label:e.toString()})}r++}}_processAnimations(){let e=this.data.animations||{};for(let t in e){this.animations[t]=[];for(let n=0;n<e[t].length;n++){let r=e[t][n];this.animations[t].push(this.textures[r])}}}_parseComplete(){let e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*e.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*e.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&(this._texture?.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};_Z.BATCH_SIZE=1e3;var vZ=_Z,kve=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function yZ(e,t,n){let r={};if(e.forEach(e=>{r[e]=t}),Object.keys(t.textures).forEach(e=>{r[`${t.cachePrefix}${e}`]=t.textures[e]}),!n){let n=fZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=yZ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var Ave={extension:G.Asset,cache:{test:e=>e instanceof vZ,getCacheableAssets:(e,t)=>yZ(e,t,!1)},resolver:{extension:{type:G.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&kve.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(hZ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:G.LoadParser,priority:lZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return fZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=fZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof $e)c=r;else{let r=gZ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new vZ({texture:c.source,data:e,cachePrefix:o});await l.parse();let u=e?.meta?.related_multi_packs;if(Array.isArray(u)){let e=[];for(let r of u){if(typeof r!=`string`)continue;let i=s+r;t.data?.ignoreMultiPack||(i=gZ(i,t.src),e.push(n.load({src:i,data:{textureOptions:a,ignoreMultiPack:!0}})))}let r=await Promise.all(e);l.linkedSheets=r,r.forEach(e=>{e.linkedSheets=[l].concat(l.linkedSheets.filter(t=>t!==e))})}return l},async unload(e,t,n){await n.unload(e.textureSource._sourceOrigin),e.destroy(!1)}}};At.add(Ave);var jve=class{constructor(e){this._lastTransform=``,this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;let e=this._canvas.getBoundingClientRect(),t=this._canvas.width,n=this._canvas.height,r=e.width/t*this._renderer.resolution,i=e.height/n*this._renderer.resolution,a=`translate(${e.left}px, ${e.top}px) scale(${r}, ${i})`;a!==this._lastTransform&&(this._domElement.style.transform=a,this._lastTransform=a)},this._domElement=e.domElement,this._renderer=e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){`ResizeObserver`in globalThis?(this._observer&&=(this._observer.disconnect(),null),this._observer=new ResizeObserver(e=>{for(let t of e){if(t.target!==this._canvas)continue;let e=this.canvas.width,n=this.canvas.height,r=t.contentRect.width/e*this._renderer.resolution,i=t.contentRect.height/n*this._renderer.resolution;(this._lastScaleX!==r||this._lastScaleY!==i)&&(this.updateTranslation(),this._lastScaleX=r,this._lastScaleY=i)}}),this._observer.observe(this._canvas)):this._tickerAttached||Ot.shared.add(this.updateTranslation,this,Dt.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Ot.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},bZ=class e{constructor(t){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=e.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Tt,this.page=new Tt,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,n){throw Error(`initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}initUIEvent(e,t,n,r,i){throw Error(`initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.`)}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}},xZ=/iPhone/i,SZ=/iPod/i,CZ=/iPad/i,wZ=/\biOS-universal(?:.+)Mac\b/i,TZ=/\bAndroid(?:.+)Mobile\b/i,EZ=/Android/i,DZ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,OZ=/Silk/i,kZ=/Windows Phone/i,AZ=/\bWindows(?:.+)ARM\b/i,jZ=/BlackBerry/i,MZ=/BB10/i,NZ=/Opera Mini/i,PZ=/\b(CriOS|Chrome)(?:.+)Mobile/i,FZ=/Mobile(?:.+)Firefox\b/i,IZ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function Mve(e){return function(t){return t.test(e)}}function LZ(e){var t={userAgent:``,platform:``,maxTouchPoints:0};!e&&typeof navigator<`u`?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e==`string`?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var n=t.userAgent,r=n.split(`[FBAN`);r[1]!==void 0&&(n=r[0]),r=n.split(`Twitter`),r[1]!==void 0&&(n=r[0]);var i=Mve(n),a={apple:{phone:i(xZ)&&!i(kZ),ipod:i(SZ),tablet:!i(xZ)&&(i(CZ)||IZ(t))&&!i(kZ),universal:i(wZ),device:(i(xZ)||i(SZ)||i(CZ)||i(wZ)||IZ(t))&&!i(kZ)},amazon:{phone:i(DZ),tablet:!i(DZ)&&i(OZ),device:i(DZ)||i(OZ)},android:{phone:!i(kZ)&&i(DZ)||!i(kZ)&&i(TZ),tablet:!i(kZ)&&!i(DZ)&&!i(TZ)&&(i(OZ)||i(EZ)),device:!i(kZ)&&(i(DZ)||i(OZ)||i(TZ)||i(EZ))||i(/\bokhttp\b/i)},windows:{phone:i(kZ),tablet:i(AZ),device:i(kZ)||i(AZ)},other:{blackberry:i(jZ),blackberry10:i(MZ),opera:i(NZ),firefox:i(FZ),chrome:i(PZ),device:i(jZ)||i(MZ)||i(NZ)||i(FZ)||i(PZ)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}var Nve=(LZ.default??LZ)(globalThis.navigator),Pve=9,RZ=100,Fve=0,Ive=0,zZ=2,BZ=1,Lve=-1e3,Rve=-1e3,zve=2,VZ=class e{constructor(e,t=Nve){this._mobileInfo=t,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook(),this._renderer=e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){let e=document.createElement(`button`);e.style.width=`${BZ}px`,e.style.height=`${BZ}px`,e.style.position=`absolute`,e.style.top=`${Lve}px`,e.style.left=`${Rve}px`,e.style.zIndex=zve.toString(),e.style.backgroundColor=`#FF0000`,e.title=`select to enable accessibility for this content`,e.addEventListener(`focus`,()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&=(document.body.removeChild(this._hookDiv),null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement(`div`),this._div.style.position=`absolute`,this._div.style.top=`${Fve}px`,this._div.style.left=`${Ive}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=zZ.toString(),this._canvasObserver=new jve({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener(`mousemove`,this._boundOnMouseMove,!0);let e=this._renderer.view.canvas;if(e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{let t=new MutationObserver(()=>{e.parentNode&&(t.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});t.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener(`keydown`,this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(let e of this._children)e._accessibleDiv?.parentNode&&(e._accessibleDiv.parentNode.removeChild(e._accessibleDiv),e._accessibleDiv=null),e._accessibleActive=!1;for(let e in this._pools)this._pools[e].forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}),delete this._pools[e];this._div?.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);let t=e.children;if(t)for(let e=0;e<t.length;e++)this._updateAccessibleObjects(t[e])}init(t){let n={accessibilityOptions:{...e.defaultOptions,...t?.accessibilityOptions||{}}};this.debug=n.accessibilityOptions.debug,this._activateOnTab=n.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=n.accessibilityOptions.deactivateOnMouseMove,n.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){let e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;let t=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(let e of this._children)e._renderId===this._renderId&&t.add(this._children.indexOf(e))}for(let e=this._children.length-1;e>=0;e--){let n=this._children[e];t.has(e)||(n._accessibleDiv&&n._accessibleDiv.parentNode&&(n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),this._getPool(n.accessibleType).push(n._accessibleDiv),n._accessibleDiv=null),n._accessibleActive=!1,lt(this._children,e,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let e=0;e<this._children.length;e++){let t=this._children[e];if(!t._accessibleActive||!t._accessibleDiv)continue;let n=t._accessibleDiv,r=t.hitArea||t.getBounds().rectangle;if(t.hitArea){let e=t.worldTransform;n.style.left=`${e.tx+r.x*e.a}px`,n.style.top=`${e.ty+r.y*e.d}px`,n.style.width=`${r.width*e.a}px`,n.style.height=`${r.height*e.d}px`}else this._capHitArea(r),n.style.left=`${r.x}px`,n.style.top=`${r.y}px`,n.style.width=`${r.width}px`,n.style.height=`${r.height}px`}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:n}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>n&&(e.height=n-e.y)}_addChild(e){let t=this._getPool(e.accessibleType).pop();t?(t.innerHTML=``,t.removeAttribute(`title`),t.removeAttribute(`aria-label`),t.tabIndex=0):(e.accessibleType===`button`?t=document.createElement(`button`):(t=document.createElement(e.accessibleType),t.style.cssText=`
922
922
  color: transparent;
923
923
  pointer-events: none;
924
924
  padding: 0;
@@ -931,7 +931,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
931
931
  -webkit-user-select: none;
932
932
  -moz-user-select: none;
933
933
  -ms-user-select: none;
934
- `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${RZ}px`,t.style.height=`${RZ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=zZ.toString(),t.style.borderStyle=`none`,navigator.userAgent.toLowerCase().includes(`chrome`)?t.setAttribute(`aria-live`,`off`):t.setAttribute(`aria-live`,`polite`),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute(`aria-relevant`,`additions`):t.setAttribute(`aria-relevant`,`text`),t.addEventListener(`click`,this._onClick.bind(this)),t.addEventListener(`focus`,this._onFocus.bind(this)),t.addEventListener(`focusout`,this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute(`aria-label`,e.accessibleHint),e.interactive?t.tabIndex=e.tabIndex:t.tabIndex=0,this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv)}_dispatchEvent(e,t){let{container:n}=e.target,r=this._renderer.events.rootBoundary,i=Object.assign(new bZ(r),{target:n});r.rootTarget=this._renderer.lastObjectRendered,t.forEach(e=>r.dispatchEvent(i,e))}_onClick(e){this._dispatchEvent(e,[`click`,`pointertap`,`tap`])}_onFocus(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`assertive`),this._dispatchEvent(e,[`mouseover`])}_onFocusOut(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`polite`),this._dispatchEvent(e,[`mouseout`])}_onKeyDown(e){e.keyCode!==Pve||!this._activateOnTab||this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._canvasObserver?.destroy(),this._canvasObserver=null,this._div=null,this._pools=null,this._children=null,this._renderer=null,this._hookDiv=null,globalThis.removeEventListener(`keydown`,this._boundOnKeyDown),this._boundOnKeyDown=null,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._boundOnMouseMove=null}setAccessibilityEnabled(e){e?this._activate():this._deactivate()}_getPool(e){return this._pools[e]||(this._pools[e]=[]),this._pools[e]}};VZ.extension={type:[G.WebGLSystem,G.WebGPUSystem],name:`accessibility`},VZ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var Bve=VZ,Vve={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},HZ;function Hve(e){return HZ===void 0&&(HZ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Zt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Wt.get().getWebGLRenderingContext())return!1;let e=Wt.get().createCanvas().getContext(`webgl`,t),n=!!e?.getContextAttributes()?.stencil;if(e){let t=e.getExtension(`WEBGL_lose_context`);t&&t.loseContext()}return e=null,n}catch{return!1}})()),HZ}var UZ;async function Uve(e={}){return UZ===void 0&&(UZ=await(async()=>{let t=Wt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),UZ}var WZ=[`webgl`,`webgpu`,`canvas`];async function Wve(e){let t=[];e.preference?(t.push(e.preference),WZ.forEach(n=>{n!==e.preference&&t.push(n)})):t=WZ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await Uve()){let{WebGPURenderer:t}=await J(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-DyDyQxQi.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&Hve(e.failIfMajorPerformanceCaveat??Zt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await J(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-A1e0ZREU.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await J(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-Dx0drFSn.js`);return{CanvasRenderer:e}},__vite__mapDeps([133,128,1]));n=t,r={...e,...e.canvasOptions};break}}if(delete r.webgpu,delete r.webgl,delete r.canvasOptions,!n)throw Error(`No available renderer for the current environment`);let i=new n;return await i.init(r),i}var GZ=class{static init(e){Object.defineProperty(this,`resizeTo`,{configurable:!0,set(e){globalThis.removeEventListener(`resize`,this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener(`resize`,this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&=(cancelAnimationFrame(this._resizeId),null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,t;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:n,clientHeight:r}=this._resizeTo;e=n,t=r}this.renderer.resize(e,t),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener(`resize`,this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};GZ.extension=G.Application;var KZ=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,`ticker`,{configurable:!0,set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,Dt.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Ot.shared:new Ot,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};KZ.extension=G.Application,At.add(GZ),At.add(KZ);var qZ=class e{constructor(...e){this.stage=new Kt,e[0]!==void 0&&Rt(ot,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new Kt,this.renderer=await Wve(t),e._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return Rt(ot,`Application.view is deprecated, please use Application.canvas instead.`),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){let r=e._plugins.slice(0);r.reverse(),r.forEach(e=>{e.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};qZ._plugins=[];var JZ=qZ;At.handleByList(G.Application,JZ._plugins),At.add(Qt);var Gve=t(n(((e,t)=>{t.exports=i;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function i(e){var t=[];return e.replace(r,function(e,r,i){var a=r.toLowerCase();for(i=o(i),a==`m`&&i.length>2&&(t.push([r].concat(i.splice(0,2))),a=`l`,r=r==`m`?`l`:`L`);;){if(i.length==n[a])return i.unshift(r),t.push(i);if(i.length<n[a])throw Error(`malformed path data`);t.push([r].concat(i.splice(0,n[a])))}}),t}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function o(e){var t=e.match(a);return t?t.map(Number):[]}}))(),1);function Kve(e,t){let n=(0,Gve.default)(e),r=[],i=null,a=0,o=0;for(let e=0;e<n.length;e++){let s=n[e],c=s[0],l=s;switch(c){case`M`:a=l[1],o=l[2],t.moveTo(a,o);break;case`m`:a+=l[1],o+=l[2],t.moveTo(a,o);break;case`H`:a=l[1],t.lineTo(a,o);break;case`h`:a+=l[1],t.lineTo(a,o);break;case`V`:o=l[1],t.lineTo(a,o);break;case`v`:o+=l[1],t.lineTo(a,o);break;case`L`:a=l[1],o=l[2],t.lineTo(a,o);break;case`l`:a+=l[1],o+=l[2],t.lineTo(a,o);break;case`C`:a=l[5],o=l[6],t.bezierCurveTo(l[1],l[2],l[3],l[4],a,o);break;case`c`:t.bezierCurveTo(a+l[1],o+l[2],a+l[3],o+l[4],a+l[5],o+l[6]),a+=l[5],o+=l[6];break;case`S`:a=l[3],o=l[4],t.bezierCurveToShort(l[1],l[2],a,o);break;case`s`:t.bezierCurveToShort(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`Q`:a=l[3],o=l[4],t.quadraticCurveTo(l[1],l[2],a,o);break;case`q`:t.quadraticCurveTo(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`T`:a=l[1],o=l[2],t.quadraticCurveToShort(a,o);break;case`t`:a+=l[1],o+=l[2],t.quadraticCurveToShort(a,o);break;case`A`:a=l[6],o=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`a`:a+=l[6],o+=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`Z`:case`z`:t.closePath(),r.length>0&&(i=r.pop(),i?(a=i.startX,o=i.startY):(a=0,o=0)),i=null;break;default:at(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var qve=class e{constructor(e=0,t=0,n=0){this.type=`circle`,this.x=e,this.y=t,this.radius=n}clone(){return new e(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n}strokeContains(e,t,n,r=.5){if(this.radius===0)return!1;let i=this.x-e,a=this.y-t,o=this.radius,s=(1-r)*n,c=Math.sqrt(i*i+a*a);return c<=o+s&&c>o-(n-s)}getBounds(e){return e||=new yt,e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}},Jve=class e{constructor(e=0,t=0,n=0,r=0){this.type=`ellipse`,this.x=e,this.y=t,this.halfWidth=n,this.halfHeight=r}clone(){return new e(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,t){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let n=(e-this.x)/this.halfWidth,r=(t-this.y)/this.halfHeight;return n*=n,r*=r,n+r<=1}strokeContains(e,t,n,r=.5){let{halfWidth:i,halfHeight:a}=this;if(i<=0||a<=0)return!1;let o=n*(1-r),s=n-o,c=i-s,l=a-s,u=i+o,d=a+o,f=e-this.x,p=t-this.y,m=f*f/(c*c)+p*p/(l*l),h=f*f/(u*u)+p*p/(d*d);return m>1&&h<=1}getBounds(e){return e||=new yt,e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}};function Yve(e,t,n,r,i,a){let o=e-n,s=t-r,c=i-n,l=a-r,u=o*c+s*l,d=c*c+l*l,f=-1;d!==0&&(f=u/d);let p,m;f<0?(p=n,m=r):f>1?(p=i,m=a):(p=n+f*c,m=r+f*l);let h=e-p,g=t-m;return h*h+g*g}var Xve,Zve,YZ=class e{constructor(...e){this.type=`polygon`;let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!=`number`){let e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n].x,t[n].y);t=e}this.points=t,this.closePath=!0}isClockwise(){let e=0,t=this.points,n=t.length;for(let r=0;r<n;r+=2){let i=t[r],a=t[r+1],o=t[(r+2)%n],s=t[(r+3)%n];e+=(o-i)*(s+a)}return e<0}containsPolygon(e){let t=this.getBounds(Xve),n=e.getBounds(Zve);if(!t.containsRect(n))return!1;let r=e.points;for(let e=0;e<r.length;e+=2){let t=r[e],n=r[e+1];if(!this.contains(t,n))return!1}return!0}clone(){let t=new e(this.points.slice());return t.closePath=this.closePath,t}contains(e,t){let n=!1,r=this.points.length/2;for(let i=0,a=r-1;i<r;a=i++){let r=this.points[i*2],o=this.points[i*2+1],s=this.points[a*2],c=this.points[a*2+1];o>t!=c>t&&e<(s-r)*((t-o)/(c-o))+r&&(n=!n)}return n}strokeContains(e,t,n,r=.5){let i=n*n,a=i*(1-r),o=i-a,{points:s}=this,c=s.length-(this.closePath?0:2);for(let n=0;n<c;n+=2){let r=s[n],i=s[n+1],c=s[(n+2)%s.length],l=s[(n+3)%s.length];if(Yve(e,t,r,i,c,l)<=(Math.sign((c-r)*(t-i)-(l-i)*(e-r))<0?o:a))return!0}return!1}getBounds(e){e||=new yt;let t=this.points,n=1/0,r=-1/0,i=1/0,a=-1/0;for(let e=0,o=t.length;e<o;e+=2){let o=t[e],s=t[e+1];n=o<n?o:n,r=o>r?o:r,i=s<i?s:i,a=s>a?s:a}return e.x=n,e.width=r-n,e.y=i,e.height=a-i,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,t)=>`${e}, ${t}`,``)}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return Rt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return Rt(`8.11.0`,`Polygon.y is deprecated, please use Polygon.lastY instead.`),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}},XZ=(e,t,n,r,i,a,o)=>{let s=e-n,c=t-r,l=Math.sqrt(s*s+c*c);return l>=i-a&&l<=i+o},Qve=class e{constructor(e=0,t=0,n=0,r=0,i=20){this.type=`roundedRectangle`,this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i}getBounds(e){return e||=new yt,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new e(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1}strokeContains(e,t,n,r=.5){let{x:i,y:a,width:o,height:s,radius:c}=this,l=n*(1-r),u=n-l,d=i+c,f=a+c,p=o-c*2,m=s-c*2,h=i+o,g=a+s;return(e>=i-l&&e<=i+u||e>=h-u&&e<=h+l)&&t>=f&&t<=f+m||(t>=a-l&&t<=a+u||t>=g-u&&t<=g+l)&&e>=d&&e<=d+p?!0:e<d&&t<f&&XZ(e,t,d,f,c,u,l)||e>h-c&&t<f&&XZ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&XZ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&XZ(e,t,d,g-c,c,u,l)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};function $ve(e,t,n,r,i,a,o,s=null){let c=0;n*=t,i*=a;let l=s.a,u=s.b,d=s.c,f=s.d,p=s.tx,m=s.ty;for(;c<o;){let o=e[n],s=e[n+1];r[i]=l*o+d*s+p,r[i+1]=u*o+f*s+m,i+=a,n+=t,c++}}function eye(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function ZZ(e,t,n,r,i){let a=t.a,o=t.b,s=t.c,c=t.d,l=t.tx,u=t.ty;n||=0,r||=2,i||=e.length/r-n;let d=n*r;for(let t=0;t<i;t++){let t=e[d],n=e[d+1];e[d]=a*t+s*n+l,e[d+1]=o*t+c*n+u,d+=r}}var tye=new Ze,QZ=class{constructor(){this.packAsQuad=!1,this.batcherName=`default`,this.topology=`triangle-list`,this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:`normal`}get color(){let e=this.baseColor,t=e>>16|e&65280|(e&255)<<16,n=this.renderable;return n?ut(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||tye}copyTo(e){e.indexOffset=this.indexOffset,e.indexSize=this.indexSize,e.attributeOffset=this.attributeOffset,e.attributeSize=this.attributeSize,e.baseColor=this.baseColor,e.alpha=this.alpha,e.texture=this.texture,e.geometryData=this.geometryData,e.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology=`triangle-list`}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}},$Z={extension:{type:G.ShapeBuilder,name:`circle`},build(e,t){let n,r,i,a,o,s;if(e.type===`circle`){let t=e;if(o=s=t.radius,o<=0)return!1;n=t.x,r=t.y,i=a=0}else if(e.type===`ellipse`){let t=e;if(o=t.halfWidth,s=t.halfHeight,o<=0||s<=0)return!1;n=t.x,r=t.y,i=a=0}else{let t=e,c=t.width/2,l=t.height/2;n=t.x+c,r=t.y+l,o=s=Math.max(0,Math.min(t.radius,Math.min(c,l))),i=c-o,a=l-s}if(i<0||a<0)return!1;let c=Math.ceil(2.3*Math.sqrt(o+s)),l=c*8+(i?4:0)+(a?4:0);if(l===0)return!1;if(c===0)return t[0]=t[6]=n+i,t[1]=t[3]=r+a,t[2]=t[4]=n-i,t[5]=t[7]=r-a,!0;let u=0,d=c*4+(i?2:0)+2,f=d,p=l,m=i+o,h=a,g=n+m,_=n-m,v=r+h;if(t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,a){let e=r-h;t[f++]=_,t[f++]=e,t[--p]=e,t[--p]=g}for(let e=1;e<c;e++){let l=Math.PI/2*(e/c),m=i+Math.cos(l)*o,h=a+Math.sin(l)*s,g=n+m,_=n-m,v=r+h,y=r-h;t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,t[f++]=_,t[f++]=y,t[--p]=y,t[--p]=g}m=i,h=a+s,g=n+m,_=n-m,v=r+h;let y=r-h;return t[u++]=g,t[u++]=v,t[--p]=y,t[--p]=g,i&&(t[u++]=_,t[u++]=v,t[--p]=y,t[--p]=_),!0},triangulate(e,t,n,r,i,a){if(e.length===0)return;let o=0,s=0;for(let t=0;t<e.length;t+=2)o+=e[t],s+=e[t+1];o/=e.length/2,s/=e.length/2;let c=r;t[c*n]=o,t[c*n+1]=s;let l=c++;for(let r=0;r<e.length;r+=2)t[c*n]=e[r],t[c*n+1]=e[r+1],r>0&&(i[a++]=c,i[a++]=l,i[a++]=c-1),c++;i[a++]=l+1,i[a++]=l,i[a++]=c-1}},nye={...$Z,extension:{...$Z.extension,name:`ellipse`}},rye={...$Z,extension:{...$Z.extension,name:`roundedRectangle`}},eQ=1e-4,tQ=1e-4;function iye(e){let t=e.length;if(t<6)return 1;let n=0;for(let r=0,i=e[t-2],a=e[t-1];r<t;r+=2){let t=e[r],o=e[r+1];n+=(t-i)*(o+a),i=t,a=o}return n<0?-1:1}function nQ(e,t,n,r,i,a,o,s){let c=e-n*i,l=t-r*i,u=e+n*a,d=t+r*a,f,p;o?(f=r,p=-n):(f=-r,p=n);let m=c+f,h=l+p,g=u+f,_=d+p;return s.push(m,h),s.push(g,_),2}function rQ(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=Math.atan2(c,l),d=Math.atan2(i-e,a-t);s&&u<d?u+=Math.PI*2:!s&&u>d&&(d+=Math.PI*2);let f=u,p=d-u,m=Math.abs(p),h=Math.sqrt(c*c+l*l),g=(15*m*Math.sqrt(h)/Math.PI>>0)+1,_=p/g;if(f+=_,s){o.push(e,t),o.push(n,r);for(let n=1,r=f;n<g;n++,r+=_)o.push(e,t),o.push(e+Math.sin(r)*h,t+Math.cos(r)*h);o.push(e,t),o.push(i,a)}else{o.push(n,r),o.push(e,t);for(let n=1,r=f;n<g;n++,r+=_)o.push(e+Math.sin(r)*h,t+Math.cos(r)*h),o.push(e,t);o.push(i,a),o.push(e,t)}return g*2}function iQ(e,t,n,r,i,a){let o=eQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=iye(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new Tt(e[0],e[1]),u=new Tt(e[e.length-2],e[e.length-1]),d=r,f=Math.abs(l.x-u.x)<o&&Math.abs(l.y-u.y)<o;if(d){e=e.slice(),f&&(e.pop(),e.pop(),u.set(e[e.length-2],e[e.length-1]));let t=(l.x+u.x)*.5,n=(u.y+l.y)*.5;e.unshift(t,n),e.push(t,n)}let p=i,m=e.length/2,h=e.length,g=p.length/2,_=s.width/2,v=_*_,y=s.miterLimit*s.miterLimit,b=e[0],x=e[1],S=e[2],C=e[3],w=0,T=0,E=-(x-C),D=b-S,O=0,k=0,A=Math.sqrt(E*E+D*D);E/=A,D/=A,E*=_,D*=_;let j=c,M=(1-j)*2,N=j*2;d||(s.cap===`round`?h+=rQ(b-E*(M-N)*.5,x-D*(M-N)*.5,b-E*M,x-D*M,b+E*N,x+D*N,p,!0)+2:s.cap===`square`&&(h+=nQ(b,x,E,D,M,N,!0,p))),p.push(b-E*M,x-D*M),p.push(b+E*N,x+D*N);for(let t=1;t<m-1;++t){b=e[(t-1)*2],x=e[(t-1)*2+1],S=e[t*2],C=e[t*2+1],w=e[(t+1)*2],T=e[(t+1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,O=-(C-T),k=S-w,A=Math.sqrt(O*O+k*k),O/=A,k/=A,O*=_,k*=_;let n=S-b,r=x-C,i=S-w,a=T-C,o=n*i+r*a,c=r*i-a*n,l=c<0;if(Math.abs(c)<.001*Math.abs(o)){p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),o>=0&&(s.join===`round`?h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4:h+=2,p.push(S-O*N,C-k*N),p.push(S+O*M,C+k*M));continue}let u=(-E+b)*(-D+C)-(-E+S)*(-D+x),d=(-O+w)*(-k+C)-(-O+S)*(-k+T),f=(n*d-i*u)/c,m=(a*u-r*d)/c,g=(f-S)*(f-S)+(m-C)*(m-C),j=S+(f-S)*M,P=C+(m-C)*M,F=S-(f-S)*N,I=C-(m-C)*N,L=Math.min(n*n+r*r,i*i+a*a),R=l?M:N;g<=L+R*R*v?s.join===`bevel`||g/v>y?(l?(p.push(j,P),p.push(S+E*N,C+D*N),p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),p.push(S-O*M,C-k*M),p.push(F,I)),h+=2):s.join===`round`?l?(p.push(j,P),p.push(S+E*N,C+D*N),h+=rQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+4,p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4,p.push(S-O*M,C-k*M),p.push(F,I)):(p.push(j,P),p.push(F,I)):(p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),s.join===`round`?l?h+=rQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+2:s.join===`miter`&&g/v<=y&&(l?(p.push(F,I),p.push(F,I)):(p.push(j,P),p.push(j,P)),h+=2),p.push(S-O*M,C-k*M),p.push(S+O*N,C+k*N),h+=2)}b=e[(m-2)*2],x=e[(m-2)*2+1],S=e[(m-1)*2],C=e[(m-1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),d||(s.cap===`round`?h+=rQ(S-E*(M-N)*.5,C-D*(M-N)*.5,S-E*M,C-D*M,S+E*N,C+D*N,p,!1)+2:s.cap===`square`&&(h+=nQ(S,C,E,D,M,N,!1,p)));let P=tQ*tQ;for(let e=g;e<h+g-2;++e)b=p[e*2],x=p[e*2+1],S=p[(e+1)*2],C=p[(e+1)*2+1],w=p[(e+2)*2],T=p[(e+2)*2+1],!(Math.abs(b*(C-T)+S*(T-x)+w*(x-C))<P)&&a.push(e,e+1,e+2)}function aye(e,t,n,r){let i=eQ;if(e.length===0)return;let a=e[0],o=e[1],s=e[e.length-2],c=e[e.length-1],l=t||Math.abs(a-s)<i&&Math.abs(o-c)<i,u=n,d=e.length/2,f=u.length/2;for(let t=0;t<d;t++)u.push(e[t*2]),u.push(e[t*2+1]);for(let e=0;e<d-1;e++)r.push(f+e,f+e+1);l&&r.push(f+d-1,f)}function aQ(e,t,n,r,i,a,o){let s=fn(e,t,2);if(!s)return;for(let e=0;e<s.length;e+=3)a[o++]=s[e]+i,a[o++]=s[e+1]+i,a[o++]=s[e+2]+i;let c=i*r;for(let t=0;t<e.length;t+=2)n[c]=e[t],n[c+1]=e[t+1],c+=r}var oye=[],sye={extension:{type:G.ShapeBuilder,name:`polygon`},build(e,t){for(let n=0;n<e.points.length;n++)t[n]=e.points[n];return!0},triangulate(e,t,n,r,i,a){aQ(e,oye,t,n,r,i,a)}},cye={extension:{type:G.ShapeBuilder,name:`rectangle`},build(e,t){let n=e,r=n.x,i=n.y,a=n.width,o=n.height;return a>0&&o>0?(t[0]=r,t[1]=i,t[2]=r+a,t[3]=i,t[4]=r+a,t[5]=i+o,t[6]=r,t[7]=i+o,!0):!1},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[6],t[r+o+1]=e[7],o+=n,t[r+o]=e[4],t[r+o+1]=e[5],o+=n;let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2,i[a++]=s+1,i[a++]=s+3,i[a++]=s+2}},lye={extension:{type:G.ShapeBuilder,name:`triangle`},build(e,t){return t[0]=e.x,t[1]=e.y,t[2]=e.x2,t[3]=e.y2,t[4]=e.x3,t[5]=e.y3,!0},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[4],t[r+o+1]=e[5];let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2}},oQ=[{offset:0,color:`white`},{offset:1,color:`black`}],sQ=class e{constructor(...t){this.uid=_t(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=uye(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...rt(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type===`radial`?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(e=>{this.addColorStop(e.offset,e.color)})}addColorStop(e,t){return this.colorStops.push({offset:e,color:ct.shared.setValue(t).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:e,y:t}=this.start,{x:n,y:r}=this.end,i=n-e,a=r-t,o=i<0||a<0;if(this._wrapMode===`clamp-to-edge`){if(i<0){let t=e;e=n,n=t,i*=-1}if(a<0){let e=t;t=r,r=e,a*=-1}}let s=this.colorStops.length?this.colorStops:oQ,c=this._textureSize,{canvas:l,context:u}=uQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);lQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new $e({source:new Yt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Ze;m.scale(f/c,1),m.rotate(p),m.translate(e,t),this.textureSpace===`local`&&m.scale(c,c),this.transform=m}buildGradient(){this.texture||this._tick++,this.type===`linear`?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let e=this.colorStops.length?this.colorStops:oQ,t=this._textureSize,{canvas:n,context:r}=uQ(t,t),{x:i,y:a}=this.center,{x:o,y:s}=this.outerCenter,c=this.innerRadius,l=this.outerRadius,u=o-l,d=s-l,f=t/(l*2),p=(i-u)*f,m=(a-d)*f,h=r.createRadialGradient(p,m,c*f,(o-u)*f,(s-d)*f,l*f);lQ(h,e),r.fillStyle=e[e.length-1].color,r.fillRect(0,0,t,t),r.fillStyle=h,r.translate(p,m),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-p,-m),r.fillRect(0,0,t,t),this.texture=new $e({source:new Yt({resource:n,addressMode:this._wrapMode})});let g=new Ze;g.scale(1/f,1/f),g.translate(u,d),this.textureSpace===`local`&&g.scale(t,t),this.transform=g}destroy(){this.texture?.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};sQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},sQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var cQ=sQ;function lQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function uQ(e,t){let n=Wt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function uye(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(Rt(`8.5.2`,`use options object instead`),t={type:`linear`,start:{x:e[0],y:e[1]},end:{x:e[2],y:e[3]},textureSpace:e[4],textureSize:e[5]??cQ.defaultLinearOptions.textureSize}),t}var dye=new Ze,fye=new yt;function dQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(fye);t.width&&e.pad(t.width);let{x:r,y:a}=e,o=1/e.width,s=1/e.height,c=-r*o,l=-a*s,u=i.a,d=i.b,f=i.c,p=i.d;i.a*=o,i.b*=o,i.c*=s,i.d*=s,i.tx=c*u+l*f+i.tx,i.ty=c*d+l*p+i.ty}else i.translate(t.texture.frame.x,t.texture.frame.y),i.scale(1/t.texture.source.width,1/t.texture.source.height);let a=t.texture.source.style;return!(t.fill instanceof cQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(dye.copyFrom(r).invert()),i}var fQ={};At.handleByMap(G.ShapeBuilder,fQ),At.add(cye,sye,lye,$Z,nye,rye);var pye=new yt,mye=new Ze;function hye(e,t){let{geometryData:n,batches:r}=t;r.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let t=0;t<e.instructions.length;t++){let i=e.instructions[t];if(i.action===`texture`)gye(i.data,r,n);else if(i.action===`fill`||i.action===`stroke`){let e=i.action===`stroke`,t=i.data.path.shapePath,a=i.data.style,o=i.data.hole;e&&o&&pQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),pQ(t,a,e,r,n)}}}function gye(e,t,n){let r=[],i=fQ.rectangle,a=pye;a.x=e.dx,a.y=e.dy,a.width=e.dw,a.height=e.dh;let o=e.transform;if(!i.build(a,r))return;let{vertices:s,uvs:c,indices:l}=n,u=l.length,d=s.length/2;o&&ZZ(r,o),i.triangulate(r,s,2,d,l,u);let f=e.image,p=f.uvs;c.push(p.x0,p.y0,p.x1,p.y1,p.x3,p.y3,p.x2,p.y2);let m=dt.get(QZ);m.indexOffset=u,m.indexSize=l.length-u,m.attributeOffset=d,m.attributeSize=s.length/2-d,m.baseColor=e.style,m.alpha=e.alpha,m.texture=f,m.geometryData=n,t.push(m)}function pQ(e,t,n,r,i){let{vertices:a,uvs:o,indices:s}=i;e.shapePrimitives.forEach(({shape:e,transform:c,holes:l})=>{let u=[],d=fQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&ZZ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(aye(u,n,a,s),m=`line-list`):iQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();_ye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),aQ(t,e,a,2,p,s,f)}else d.triangulate(u,a,2,p,s,f);let h=o.length/2,g=t.texture;if(g!==$e.WHITE){let n=dQ(mye,t,e,c);$ve(a,2,p,o,h,2,a.length/2-p,n)}else eye(o,h,2,a.length/2-p);let _=dt.get(QZ);_.indexOffset=f,_.indexSize=s.length-f,_.attributeOffset=p,_.attributeSize=a.length/2-p,_.baseColor=t.color,_.alpha=t.alpha,_.texture=g,_.geometryData=i,_.topology=m,r.push(_)})}function _ye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];fQ[r.type].build(r,i)&&t.push(i)}return t}var vye=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{dt.return(e)}),this.graphicsData&&dt.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}},yye=class{constructor(){this.instructions=new Gt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new _n({maxTextures:t}),this.instructions.reset()}get geometry(){return Rt(vt,`GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead.`),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}},mQ=class e{constructor(e){this._renderer=e,this._managedContexts=new cn({renderer:e,type:`resource`,name:`graphicsContext`})}init(t){e.defaultOptions.bezierSmoothness=t?.bezierSmoothness??e.defaultOptions.bezierSmoothness}getContextRenderData(e){return e._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(e)}updateGpuContext(e){let t=!!e._gpuData[this._renderer.uid],n=e._gpuData[this._renderer.uid]||this._initContext(e);if(e.dirty||!t){t&&n.reset(),hye(e,n);let r=e.batchMode;e.customShader||r===`no-batch`?n.isBatchable=!1:r===`auto`?n.isBatchable=n.geometryData.vertices.length<400:n.isBatchable=!0,e.dirty=!1}return n}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){let t=dt.get(yye,{maxTextures:this._renderer.limits.maxBatchableTextures}),n=e._gpuData[this._renderer.uid],{batches:r,geometryData:i}=n;n.graphicsData=t;let a=i.vertices.length,o=i.indices.length;for(let e=0;e<r.length;e++)r[e].applyTransform=!1;let s=t.batcher;s.ensureAttributeBuffer(a),s.ensureIndexBuffer(o),s.begin();for(let e=0;e<r.length;e++){let t=r[e];s.add(t)}s.finish(t.instructions);let c=s.geometry;c.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),c.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!0);let l=s.batches;for(let e=0;e<l.length;e++){let t=l[e];t.bindGroup=En(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new vye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};mQ.extension={type:[G.WebGLSystem,G.WebGPUSystem],name:`graphicsContext`},mQ.defaultOptions={bezierSmoothness:.5};var hQ=mQ,bye=8,gQ=1.1920929e-7,xye=1,_Q=.01,vQ=0,yQ=0;function bQ(e,t,n,r,i,a,o,s,c,l){let u=(xye-Math.min(.99,Math.max(0,l??hQ.defaultOptions.bezierSmoothness)))/1;return u*=u,Sye(t,n,r,i,a,o,s,c,e,u),e}function Sye(e,t,n,r,i,a,o,s,c,l){xQ(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function xQ(e,t,n,r,i,a,o,s,c,l,u){if(u>bye)return;let d=Math.PI,f=(e+n)/2,p=(t+r)/2,m=(n+i)/2,h=(r+a)/2,g=(i+o)/2,_=(a+s)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2;if(u>0){let u=o-e,f=s-t,p=Math.abs((n-o)*f-(r-s)*u),m=Math.abs((i-o)*f-(a-s)*u),h,g;if(p>gQ&&m>gQ){if((p+m)*(p+m)<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}let l=Math.atan2(a-r,i-n);if(h=Math.abs(l-Math.atan2(r-t,n-e)),g=Math.abs(Math.atan2(s-a,o-i)-l),h>=d&&(h=2*d-h),g>=d&&(g=2*d-g),h+g<vQ){c.push(S,C);return}if(yQ!==0){if(h>yQ){c.push(n,r);return}if(g>yQ){c.push(i,a);return}}}}else if(p>gQ){if(p*p<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}if(h=Math.abs(Math.atan2(a-r,i-n)-Math.atan2(r-t,n-e)),h>=d&&(h=2*d-h),h<vQ){c.push(n,r),c.push(i,a);return}if(yQ!==0&&h>yQ){c.push(n,r);return}}}else if(m>gQ){if(m*m<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}if(h=Math.abs(Math.atan2(s-a,o-i)-Math.atan2(a-r,i-n)),h>=d&&(h=2*d-h),h<vQ){c.push(n,r),c.push(i,a);return}if(yQ!==0&&h>yQ){c.push(i,a);return}}}else if(u=S-(e+o)/2,f=C-(t+s)/2,u*u+f*f<=l){c.push(S,C);return}}xQ(e,t,f,p,v,y,S,C,c,l,u+1),xQ(S,C,b,x,g,_,o,s,c,l,u+1)}var Cye=8,wye=1.1920929e-7,Tye=1,Eye=.01,SQ=0;function Dye(e,t,n,r,i,a,o,s){let c=(Tye-Math.min(.99,Math.max(0,s??hQ.defaultOptions.bezierSmoothness)))/1;return c*=c,Oye(t,n,r,i,a,o,e,c),e}function Oye(e,t,n,r,i,a,o,s){CQ(o,e,t,n,r,i,a,s,0),o.push(i,a)}function CQ(e,t,n,r,i,a,o,s,c){if(c>Cye)return;let l=Math.PI,u=(t+r)/2,d=(n+i)/2,f=(r+a)/2,p=(i+o)/2,m=(u+f)/2,h=(d+p)/2,g=a-t,_=o-n,v=Math.abs((r-a)*_-(i-o)*g);if(v>wye){if(v*v<=s*(g*g+_*_)){if(SQ<Eye){e.push(m,h);return}let s=Math.abs(Math.atan2(o-i,a-r)-Math.atan2(i-n,r-t));if(s>=l&&(s=2*l-s),s<SQ){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}CQ(e,t,n,u,d,m,h,s,c+1),CQ(e,m,h,f,p,a,o,s,c+1)}function wQ(e,t,n,r,i,a,o,s){let c=Math.abs(i-a);(!o&&i>a||o&&a>i)&&(c=2*Math.PI-c),s||=Math.max(6,Math.floor(6*r**(1/3)*(c/Math.PI))),s=Math.max(s,3);let l=c/s,u=i;l*=o?-1:1;for(let i=0;i<s+1;i++){let i=Math.cos(u),a=Math.sin(u),o=t+i*r,s=n+a*r;e.push(o,s),u+=l}}function kye(e,t,n,r,i,a){let o=e[e.length-2],s=e[e.length-1]-n,c=o-t,l=i-n,u=r-t,d=Math.abs(s*u-c*l);if(d<1e-8||a===0){(e[e.length-2]!==t||e[e.length-1]!==n)&&e.push(t,n);return}let f=s*s+c*c,p=l*l+u*u,m=s*l+c*u,h=a*Math.sqrt(f)/d,g=a*Math.sqrt(p)/d,_=h*m/f,v=g*m/p,y=h*u+g*c,b=h*l+g*s,x=c*(g+_),S=s*(g+_),C=u*(h+v),w=l*(h+v),T=Math.atan2(S-b,x-y),E=Math.atan2(w-b,C-y);wQ(e,y+t,b+n,a,T,E,c*l>u*s)}var TQ=Math.PI*2,EQ={centerX:0,centerY:0,ang1:0,ang2:0},DQ=({x:e,y:t},n,r,i,a,o,s,c)=>{e*=n,t*=r;let l=i*e-a*t,u=a*e+i*t;return c.x=l+o,c.y=u+s,c};function Aye(e,t){let n=t===-1.5707963267948966?-.551915024494:4/3*Math.tan(t/4),r=t===1.5707963267948966?.551915024494:n,i=Math.cos(e),a=Math.sin(e),o=Math.cos(e+t),s=Math.sin(e+t);return[{x:i-a*r,y:a+i*r},{x:o+s*r,y:s-o*r},{x:o,y:s}]}var OQ=(e,t,n,r)=>{let i=e*r-t*n<0?-1:1,a=e*n+t*r;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)},jye=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=i**2,m=a**2,h=u**2,g=d**2,_=p*m-p*g-m*h;_<0&&(_=0),_/=p*g+m*h,_=Math.sqrt(_)*(o===s?-1:1);let v=_*i/a*d,y=_*-a/i*u,b=l*v-c*y+(e+n)/2,x=c*v+l*y+(t+r)/2,S=(u-v)/i,C=(d-y)/a,w=(-u-v)/i,T=(-d-y)/a,E=OQ(1,0,S,C),D=OQ(S,C,w,T);s===0&&D>0&&(D-=TQ),s===1&&D<0&&(D+=TQ),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function Mye(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*TQ/360),d=Math.cos(s*TQ/360),f=d*(t-r)/2+u*(n-i)/2,p=-u*(t-r)/2+d*(n-i)/2;if(f===0&&p===0)return;a=Math.abs(a),o=Math.abs(o);let m=f**2/a**2+p**2/o**2;m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m)),jye(t,n,r,i,a,o,c,l,u,d,f,p,EQ);let{ang1:h,ang2:g}=EQ,{centerX:_,centerY:v}=EQ,y=Math.abs(g)/(TQ/4);Math.abs(1-y)<1e-7&&(y=1);let b=Math.max(Math.ceil(y),1);g/=b;let x=e[e.length-2],S=e[e.length-1],C={x:0,y:0};for(let t=0;t<b;t++){let t=Aye(h,g),{x:n,y:r}=DQ(t[0],a,o,d,u,_,v,C),{x:i,y:s}=DQ(t[1],a,o,d,u,_,v,C),{x:c,y:l}=DQ(t[2],a,o,d,u,_,v,C);bQ(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function Nye(e,t,n){let r=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{len:i,nx:n/i,ny:r/i}},i=(t,n)=>{t===0?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)},a=t[t.length-1];for(let o=0;o<t.length;o++){let s=t[o%t.length],c=s.radius??n;if(c<=0){i(o,s),a=s;continue}let l=t[(o+1)%t.length],u=r(s,a),d=r(s,l);if(u.len<1e-4||d.len<1e-4){i(o,s),a=s;continue}let f=Math.asin(u.nx*d.ny-u.ny*d.nx),p=1,m=!1;u.nx*d.nx-u.ny*-d.ny<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,m=!0):f>0&&(p=-1,m=!0);let h=f/2,g,_=Math.abs(Math.cos(h)*c/Math.sin(h));_>Math.min(u.len/2,d.len/2)?(_=Math.min(u.len/2,d.len/2),g=Math.abs(_*Math.sin(h)/Math.cos(h))):g=c;let v=s.x+d.nx*_+-d.ny*g*p,y=s.y+d.ny*_+d.nx*g*p,b=Math.atan2(u.ny,u.nx)+Math.PI/2*p,x=Math.atan2(d.ny,d.nx)-Math.PI/2*p;o===0&&e.moveTo(v+Math.cos(b)*g,y+Math.sin(b)*g),e.arc(v,y,g,b,x,m),a=s}}function Pye(e,t,n,r){let i=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),a=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),o=t.length;for(let s=0;s<o;s++){let c=t[(s+1)%o],l=c.radius??n;if(l<=0){s===0?e.moveTo(c.x,c.y):e.lineTo(c.x,c.y);continue}let u=t[s],d=t[(s+2)%o],f=i(u,c),p;p=f<1e-4?c:a(c,u,Math.min(f/2,l)/f);let m=i(d,c),h;h=m<1e-4?c:a(c,d,Math.min(m/2,l)/m),s===0?e.moveTo(p.x,p.y):e.lineTo(p.x,p.y),e.quadraticCurveTo(c.x,c.y,h.x,h.y,r)}}var Fye=new yt,Iye=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new pt,this._graphicsPath2D=e,this.signed=e.checkForHoles}moveTo(e,t){return this.startPoly(e,t),this}lineTo(e,t){this._ensurePoly();let n=this._currentPoly.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}arc(e,t,n,r,i,a){this._ensurePoly(!1);let o=this._currentPoly.points;return wQ(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return kye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return Mye(s,this._currentPoly.lastX,this._currentPoly.lastY,a,o,e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,a,o){this._ensurePoly();let s=this._currentPoly;return bQ(this._currentPoly.points,s.lastX,s.lastY,e,t,n,r,i,a,o),this}quadraticCurveTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly;return Dye(this._currentPoly.points,a.lastX,a.lastY,e,t,n,r,i),this}closePath(){return this.endPoly(!0),this}addPath(e,t){this.endPoly(),t&&!t.isIdentity()&&(e=e.clone(!0),e.transform(t));let n=this.shapePrimitives,r=n.length;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}if(e.checkForHoles&&n.length-r>1){let e=null;for(let t=r;t<n.length;t++){let r=n[t];if(r.shape.type===`polygon`){let i=r.shape,a=e?.shape;a&&a.containsPolygon(i)?(e.holes||=[],e.holes.push(r),n.copyWithin(t,t+1),n.length--,t--):e=r}}}return this}finish(e=!1){this.endPoly(e)}rect(e,t,n,r,i){return this.drawShape(new yt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new qve(e,t,n),r),this}poly(e,t,n){let r=new YZ(e);return r.closePath=t,this.drawShape(r,n),this}regularPoly(e,t,n,r,i=0,a){r=Math.max(r|0,3);let o=-1*Math.PI/2+i,s=Math.PI*2/r,c=[];for(let i=0;i<r;i++){let r=o-i*s;c.push(e+n*Math.cos(r),t+n*Math.sin(r))}return this.poly(c,!0,a),this}roundPoly(e,t,n,r,i,a=0,o){if(r=Math.max(r|0,3),i<=0)return this.regularPoly(e,t,n,r,a);let s=n*Math.sin(Math.PI/r)-.001;i=Math.min(i,s);let c=-1*Math.PI/2+a,l=Math.PI*2/r,u=(r-2)*Math.PI/r/2;for(let a=0;a<r;a++){let r=a*l+c,s=e+n*Math.cos(r),d=t+n*Math.sin(r),f=r+Math.PI+u,p=r-Math.PI-u,m=s+i*Math.cos(f),h=d+i*Math.sin(f),g=s+i*Math.cos(p),_=d+i*Math.sin(p);a===0?this.moveTo(m,h):this.lineTo(m,h),this.quadraticCurveTo(s,d,g,_,o)}return this.closePath()}roundShape(e,t,n=!1,r){return e.length<3?this:(n?Pye(this,e,t,r):Nye(this,e,t),this.closePath())}filletRect(e,t,n,r,i){if(i===0)return this.rect(e,t,n,r);let a=Math.min(n,r)/2,o=Math.min(a,Math.max(-a,i)),s=e+n,c=t+r,l=o<0?-o:0,u=Math.abs(o);return this.moveTo(e,t+u).arcTo(e+l,t+l,e+u,t,u).lineTo(s-u,t).arcTo(s-l,t+l,s,t+u,u).lineTo(s,c-u).arcTo(s-l,c-l,e+n-u,c,u).lineTo(e+u,c).arcTo(e+l,c-l,e,c-u,u).closePath()}chamferRect(e,t,n,r,i,a){if(i<=0)return this.rect(e,t,n,r);let o=Math.min(i,Math.min(n,r)/2),s=e+n,c=t+r,l=[e+o,t,s-o,t,s,t+o,s,c-o,s-o,c,e+o,c,e,c-o,e,t+o];for(let e=l.length-1;e>=2;e-=2)l[e]===l[e-2]&&l[e-1]===l[e-3]&&l.splice(e-1,2);return this.poly(l,!0,a)}ellipse(e,t,n,r,i){return this.drawShape(new Jve(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Qve(e,t,n,r,i),a),this}drawShape(e,t){return this.endPoly(),this.shapePrimitives.push({shape:e,transform:t}),this}startPoly(e,t){let n=this._currentPoly;return n&&this.endPoly(),n=new YZ,n.points.push(e,t),this._currentPoly=n,this}endPoly(e=!1){let t=this._currentPoly;return t&&t.points.length>2&&(t.closePath=e,this.shapePrimitives.push({shape:t})),this._currentPoly=null,this}_ensurePoly(e=!0){if(!this._currentPoly&&(this._currentPoly=new YZ,e)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let t=e.shape.x,n=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let r=e.transform,i=t;t=r.a*t+r.c*n+r.tx,n=r.b*i+r.d*n+r.ty}this._currentPoly.points.push(t,n)}else this._currentPoly.points.push(0,0)}}buildPath(){let e=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}this.finish()}get bounds(){let e=this._bounds;e.clear();let t=this.shapePrimitives;for(let n=0;n<t.length;n++){let r=t[n],i=r.shape.getBounds(Fye);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},kQ=class e{constructor(e,t=!1){this.instructions=[],this.uid=_t(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?Kve(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new Iye(this),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(e,t){return e=e.clone(),this.instructions.push({action:`addPath`,data:[e,t]}),this._dirty=!0,this}arc(...e){return this.instructions.push({action:`arc`,data:e}),this._dirty=!0,this}arcTo(...e){return this.instructions.push({action:`arcTo`,data:e}),this._dirty=!0,this}arcToSvg(...e){return this.instructions.push({action:`arcToSvg`,data:e}),this._dirty=!0,this}bezierCurveTo(...e){return this.instructions.push({action:`bezierCurveTo`,data:e}),this._dirty=!0,this}bezierCurveToShort(e,t,n,r,i){let a=this.instructions[this.instructions.length-1],o=this.getLastPoint(Tt.shared),s=0,c=0;if(!a||a.action!==`bezierCurveTo`)s=o.x,c=o.y;else{s=a.data[2],c=a.data[3];let e=o.x,t=o.y;s=e+(e-s),c=t+(t-c)}return this.instructions.push({action:`bezierCurveTo`,data:[s,c,e,t,n,r,i]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:`closePath`,data:[]}),this._dirty=!0,this}ellipse(...e){return this.instructions.push({action:`ellipse`,data:e}),this._dirty=!0,this}lineTo(...e){return this.instructions.push({action:`lineTo`,data:e}),this._dirty=!0,this}moveTo(...e){return this.instructions.push({action:`moveTo`,data:e}),this}quadraticCurveTo(...e){return this.instructions.push({action:`quadraticCurveTo`,data:e}),this._dirty=!0,this}quadraticCurveToShort(e,t,n){let r=this.instructions[this.instructions.length-1],i=this.getLastPoint(Tt.shared),a=0,o=0;if(!r||r.action!==`quadraticCurveTo`)a=i.x,o=i.y;else{a=r.data[0],o=r.data[1];let e=i.x,t=i.y;a=e+(e-a),o=t+(t-o)}return this.instructions.push({action:`quadraticCurveTo`,data:[a,o,e,t,n]}),this._dirty=!0,this}rect(e,t,n,r,i){return this.instructions.push({action:`rect`,data:[e,t,n,r,i]}),this._dirty=!0,this}circle(e,t,n,r){return this.instructions.push({action:`circle`,data:[e,t,n,r]}),this._dirty=!0,this}roundRect(...e){return this.instructions.push({action:`roundRect`,data:e}),this._dirty=!0,this}poly(...e){return this.instructions.push({action:`poly`,data:e}),this._dirty=!0,this}regularPoly(...e){return this.instructions.push({action:`regularPoly`,data:e}),this._dirty=!0,this}roundPoly(...e){return this.instructions.push({action:`roundPoly`,data:e}),this._dirty=!0,this}roundShape(...e){return this.instructions.push({action:`roundShape`,data:e}),this._dirty=!0,this}filletRect(...e){return this.instructions.push({action:`filletRect`,data:e}),this._dirty=!0,this}chamferRect(...e){return this.instructions.push({action:`chamferRect`,data:e}),this._dirty=!0,this}star(e,t,n,r,i,a,o){i||=r/2;let s=-1*Math.PI/2+a,c=n*2,l=Math.PI*2/c,u=[];for(let n=0;n<c;n++){let a=n%2?i:r,o=n*l+s;u.push(e+a*Math.cos(o),t+a*Math.sin(o))}return this.poly(u,!0,o),this}clone(t=!1){let n=new e;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let e=0;e<this.instructions.length;e++){let t=this.instructions[e];n.instructions.push({action:t.action,data:t.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(e){if(e.isIdentity())return this;let t=e.a,n=e.b,r=e.c,i=e.d,a=e.tx,o=e.ty,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;for(let h=0;h<this.instructions.length;h++){let g=this.instructions[h],_=g.data;switch(g.action){case`moveTo`:case`lineTo`:s=_[0],c=_[1],_[0]=t*s+r*c+a,_[1]=n*s+i*c+o;break;case`bezierCurveTo`:l=_[0],u=_[1],d=_[2],f=_[3],s=_[4],c=_[5],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*d+r*f+a,_[3]=n*d+i*f+o,_[4]=t*s+r*c+a,_[5]=n*s+i*c+o;break;case`quadraticCurveTo`:l=_[0],u=_[1],s=_[2],c=_[3],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*s+r*c+a,_[3]=n*s+i*c+o;break;case`arcToSvg`:s=_[5],c=_[6],p=_[0],m=_[1],_[0]=t*p+r*m,_[1]=n*p+i*m,_[5]=t*s+r*c+a,_[6]=n*s+i*c+o;break;case`circle`:_[4]=AQ(_[3],e);break;case`rect`:_[4]=AQ(_[4],e);break;case`ellipse`:_[8]=AQ(_[8],e);break;case`roundRect`:_[5]=AQ(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=AQ(_[2],e);break;default:at(`unknown transform action`,g.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(e){let t=this.instructions.length-1,n=this.instructions[t];if(!n)return e.x=0,e.y=0,e;for(;n.action===`closePath`;){if(t--,t<0)return e.x=0,e.y=0,e;n=this.instructions[t]}switch(n.action){case`moveTo`:case`lineTo`:e.x=n.data[0],e.y=n.data[1];break;case`quadraticCurveTo`:e.x=n.data[2],e.y=n.data[3];break;case`bezierCurveTo`:e.x=n.data[4],e.y=n.data[5];break;case`arc`:case`arcToSvg`:e.x=n.data[5],e.y=n.data[6];break;case`addPath`:n.data[0].getLastPoint(e);break}return e}};function AQ(e,t){return e?e.prepend(t):t.clone()}function jQ(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function Lye(e,t){let n=e.querySelectorAll(`defs`);for(let e=0;e<n.length;e++){let r=n[e];for(let e=0;e<r.children.length;e++){let n=r.children[e];switch(n.nodeName.toLowerCase()){case`lineargradient`:t.defs[n.id]=Rye(n);break;case`radialgradient`:t.defs[n.id]=zye(n);break;default:break}}}}function Rye(e){let t=new cQ(jQ(e,`x1`,0),jQ(e,`y1`,0),jQ(e,`x2`,1),jQ(e,`y2`,0),(e.getAttribute(`gradientUnits`)||`objectBoundingBox`)===`objectBoundingBox`?`local`:`global`);for(let n=0;n<e.children.length;n++){let r=e.children[n],i=jQ(r,`offset`,0),a=ct.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function zye(e){return at(`[SVG Parser] Radial gradients are not yet supported`),new cQ(0,0,1,0)}function MQ(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var NQ={fill:{type:`paint`,default:0},"fill-opacity":{type:`number`,default:1},stroke:{type:`paint`,default:0},"stroke-width":{type:`number`,default:1},"stroke-opacity":{type:`number`,default:1},"stroke-linecap":{type:`string`,default:`butt`},"stroke-linejoin":{type:`string`,default:`miter`},"stroke-miterlimit":{type:`number`,default:10},"stroke-dasharray":{type:`string`,default:`none`},"stroke-dashoffset":{type:`number`,default:0},opacity:{type:`number`,default:1}};function PQ(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in NQ){let r=e.getAttribute(n);r&&FQ(t,a,n,r.trim())}if(n){let e=n.split(`;`);for(let n=0;n<e.length;n++){let[r,i]=e[n].trim().split(`:`);NQ[r]&&FQ(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function FQ(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=MQ(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=ct.shared.setValue(r).toNumber();t.useStroke=!0}break;case`stroke-width`:t.strokeStyle.width=Number(r);break;case`fill`:if(r!==`none`){if(r.startsWith(`url(`)){let n=MQ(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=ct.shared.setValue(r).toNumber();t.useFill=!0}break;case`fill-opacity`:t.fillStyle.alpha=Number(r);break;case`stroke-opacity`:t.strokeStyle.alpha=Number(r);break;case`opacity`:t.fillStyle.alpha=Number(r),t.strokeStyle.alpha=Number(r);break}}function Bye(e){if(e.length<=2)return!0;let t=e.map(e=>e.area).sort((e,t)=>t-e),[n,r]=t,i=t[t.length-1],a=n/r,o=r/i;return!(a>3&&o<2)}function Vye(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function Hye(e){let t=e.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;let n=t.map(Number),r=[],i=[];for(let e=0;e<n.length;e+=2)e+1<n.length&&(r.push(n[e]),i.push(n[e+1]));if(r.length===0||i.length===0)return 0;let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);return(o-a)*(c-s)}function IQ(e,t){let n=new kQ(e,!1);for(let e of n.instructions)t.instructions.push(e)}function Uye(e,t){if(typeof e==`string`){let t=document.createElement(`div`);t.innerHTML=e.trim(),e=t.querySelector(`svg`)}let n={context:t,defs:{},path:new kQ};Lye(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=PQ(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&LQ(t,n,i,a)}return t}function LQ(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=PQ(e,t);a&&n?n={...n,...a}:a&&(n=a),o&&r?r={...r,...o}:o&&(r=o);let s=!n&&!r;s&&(n={color:0});let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;switch(e.nodeName.toLowerCase()){case`path`:{x=e.getAttribute(`d`);let i=e.getAttribute(`fill-rule`),a=Vye(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:Hye(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!Bye(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new kQ(void 0,!0);IQ(a.path,s),t.context.path(s),o?(n&&t.context.fill(n),r&&t.context.stroke(r)):t.context.cut()}else for(let i=0;i<e.length;i++){let a=e[i],o=i%2==1;t.context.beginPath();let s=new kQ(void 0,!0);IQ(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new kQ(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=jQ(e,`cx`,0),h=jQ(e,`cy`,0),g=jQ(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=jQ(e,`x`,0),l=jQ(e,`y`,0),C=jQ(e,`width`,0),w=jQ(e,`height`,0),_=jQ(e,`rx`,0),v=jQ(e,`ry`,0),_||v?t.context.roundRect(c,l,C,w,_||v):t.context.rect(c,l,C,w),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`ellipse`:m=jQ(e,`cx`,0),h=jQ(e,`cy`,0),_=jQ(e,`rx`,0),v=jQ(e,`ry`,0),t.context.beginPath(),t.context.ellipse(m,h,_,v),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`line`:u=jQ(e,`x1`,0),d=jQ(e,`y1`,0),f=jQ(e,`x2`,0),p=jQ(e,`y2`,0),t.context.beginPath(),t.context.moveTo(u,d),t.context.lineTo(f,p),r&&t.context.stroke(r);break;case`polygon`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!0),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`polyline`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!1),r&&t.context.stroke(r);break;case`g`:case`svg`:break;default:at(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)LQ(i[e],t,n,r)}var RQ={repeat:{addressModeU:`repeat`,addressModeV:`repeat`},"repeat-x":{addressModeU:`repeat`,addressModeV:`clamp-to-edge`},"repeat-y":{addressModeU:`clamp-to-edge`,addressModeV:`repeat`},"no-repeat":{addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}},zQ=class{constructor(e,t){this.uid=_t(`fillPattern`),this._tick=0,this.transform=new Ze,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=RQ[t].addressModeU,e.source.style.addressModeV=RQ[t].addressModeV)}setTransform(e){let t=this.texture;this.transform.copyFrom(e),this.transform.invert(),this.transform.scale(1/t.frame.width,1/t.frame.height),this._tick++}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture=e,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}};function Wye(e){return ct.isColorLike(e)}function BQ(e){return e instanceof zQ}function VQ(e){return e instanceof cQ}function Gye(e){return e instanceof $e}function Kye(e,t,n){let r=ct.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=$e.WHITE,{...n,...e}}function qye(e,t,n){return e.texture=t,{...n,...e}}function HQ(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function UQ(e,t,n){return t.buildGradient(),e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,e.textureSpace=t.textureSpace,{...n,...e}}function Jye(e,t){let n={...t,...e},r=ct.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function WQ(e,t){if(e==null)return null;let n={},r=e;return Wye(e)?Kye(n,e,t):Gye(e)?qye(n,e,t):BQ(e)?HQ(n,e,t):VQ(e)?UQ(n,e,t):r.fill&&BQ(r.fill)?HQ(r,r.fill,t):r.fill&&VQ(r.fill)?UQ(r,r.fill,t):Jye(r,t)}function GQ(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=WQ(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var Yye=new Tt,KQ=new Ze,qQ=class e extends Ht{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=_t(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new kQ,this._transform=new Ze,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new pt,this._boundsDirty=!0}clone(){let t=new e;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=WQ(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=GQ(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=WQ(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=WQ(t,e.defaultStrokeStyle),this}texture(e,t,n,r,i,a){return this.instructions.push({action:`texture`,data:{image:e,dx:n||0,dy:r||0,dw:i||e.frame.width,dh:a||e.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:t||t===0?ct.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new kQ,this}fill(t,n){let r,i=this.instructions[this.instructions.length-1];return r=this._tick===0&&i?.action===`stroke`?i.data.path:this._activePath.clone(),r?(t!=null&&(n!==void 0&&typeof t==`number`&&(Rt(ot,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=WQ(t,e.defaultFillStyle)),this.instructions.push({action:`fill`,data:{style:this.fillStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:e,y:t}=this._activePath.getLastPoint(Tt.shared);this._activePath.clear(),this._activePath.moveTo(e,t)}stroke(t){let n,r=this.instructions[this.instructions.length-1];return n=this._tick===0&&r?.action===`fill`?r.data.path:this._activePath.clone(),n?(t!=null&&(this._strokeStyle=GQ(t,e.defaultStrokeStyle)),this.instructions.push({action:`stroke`,data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let e=0;e<2;e++){let t=this.instructions[this.instructions.length-1-e],n=this._activePath.clone();if(t&&(t.action===`stroke`||t.action===`fill`))if(t.data.hole)t.data.hole.addPath(n);else{t.data.hole=n;break}}return this._initNextPathLocation(),this}arc(e,t,n,r,i,a){this._tick++;let o=this._transform;return this._activePath.arc(o.a*e+o.c*t+o.tx,o.b*e+o.d*t+o.ty,n,r,i,a),this}arcTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.arcTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}arcToSvg(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.arcToSvg(e,t,n,r,i,s.a*a+s.c*o+s.tx,s.b*a+s.d*o+s.ty),this}bezierCurveTo(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.bezierCurveTo(s.a*e+s.c*t+s.tx,s.b*e+s.d*t+s.ty,s.a*n+s.c*r+s.tx,s.b*n+s.d*r+s.ty,s.a*i+s.c*a+s.tx,s.b*i+s.d*a+s.ty,o),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(e,t,n,r){return this._tick++,this._activePath.ellipse(e,t,n,r,this._transform.clone()),this}circle(e,t,n){return this._tick++,this._activePath.circle(e,t,n,this._transform.clone()),this}path(e){return this._tick++,this._activePath.addPath(e,this._transform.clone()),this}lineTo(e,t){this._tick++;let n=this._transform;return this._activePath.lineTo(n.a*e+n.c*t+n.tx,n.b*e+n.d*t+n.ty),this}moveTo(e,t){this._tick++;let n=this._transform,r=this._activePath.instructions,i=n.a*e+n.c*t+n.tx,a=n.b*e+n.d*t+n.ty;return r.length===1&&r[0].action===`moveTo`?(r[0].data[0]=i,r[0].data[1]=a,this):(this._activePath.moveTo(i,a),this)}quadraticCurveTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.quadraticCurveTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}rect(e,t,n,r){return this._tick++,this._activePath.rect(e,t,n,r,this._transform.clone()),this}roundRect(e,t,n,r,i){return this._tick++,this._activePath.roundRect(e,t,n,r,i,this._transform.clone()),this}poly(e,t){return this._tick++,this._activePath.poly(e,t,this._transform.clone()),this}regularPoly(e,t,n,r,i=0,a){return this._tick++,this._activePath.regularPoly(e,t,n,r,i,a),this}roundPoly(e,t,n,r,i,a){return this._tick++,this._activePath.roundPoly(e,t,n,r,i,a),this}roundShape(e,t,n,r){return this._tick++,this._activePath.roundShape(e,t,n,r),this}filletRect(e,t,n,r,i){return this._tick++,this._activePath.filletRect(e,t,n,r,i),this}chamferRect(e,t,n,r,i,a){return this._tick++,this._activePath.chamferRect(e,t,n,r,i,a),this}star(e,t,n,r,i=0,a=0){return this._tick++,this._activePath.star(e,t,n,r,i,a,this._transform.clone()),this}svg(e){return this._tick++,Uye(e,this),this}restore(){let e=this._stateStack.pop();return e&&(this._transform=e.transform,this._fillStyle=e.fillStyle,this._strokeStyle=e.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(e){return this._transform.rotate(e),this}scale(e,t=e){return this._transform.scale(e,t),this}setTransform(e,t,n,r,i,a){return e instanceof Ze?(this._transform.set(e.a,e.b,e.c,e.d,e.tx,e.ty),this):(this._transform.set(e,t,n,r,i,a),this)}transform(e,t,n,r,i,a){return e instanceof Ze?(this._transform.append(e),this):(KQ.set(e,t,n,r,i,a),this._transform.append(KQ),this)}translate(e,t=e){return this._transform.translate(e,t),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,!this.dirty&&(this.emit(`update`,this,16),this.dirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;let e=this._bounds;e.clear();for(let t=0;t<this.instructions.length;t++){let n=this.instructions[t],r=n.action;if(r===`fill`){let t=n.data;e.addBounds(t.path.bounds)}else if(r===`texture`){let t=n.data;e.addFrame(t.dx,t.dy,t.dx+t.dw,t.dy+t.dh,t.transform)}if(r===`stroke`){let t=n.data,r=t.style.alignment,i=t.style.width*(1-r),a=t.path.bounds;e.addFrame(a.minX-i,a.minY-i,a.maxX+i,a.maxY+i)}}return e}containsPoint(e){if(!this.bounds.containsPoint(e.x,e.y))return!1;let t=this.instructions,n=!1;for(let r=0;r<t.length;r++){let i=t[r],a=i.data,o=a.path;if(!i.action||!o)continue;let s=a.style,c=o.shapePath.shapePrimitives;for(let t=0;t<c.length;t++){let r=c[t].shape;if(!s||!r)continue;let o=c[t].transform,l=o?o.applyInverse(e,Yye):e;if(i.action===`fill`)n=r.contains(l.x,l.y);else{let e=s;n=r.strokeContains(l.x,l.y,e.width,e.alignment)}let u=a.hole;if(u){let e=u.shapePath?.shapePrimitives;if(e)for(let t=0;t<e.length;t++)e[t].shape.contains(l.x,l.y)&&(n=!1)}if(n)return!0}}return n}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null)}destroy(e=!1){if(!this.destroyed){if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit(`destroy`,this),this.removeAllListeners(),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&`uid`in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(t)),this._strokeStyle.texture&&(this._strokeStyle.fill&&`uid`in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(t))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}}};qQ.defaultFillStyle={color:16777215,alpha:1,texture:$e.WHITE,matrix:null,fill:null,textureSpace:`local`},qQ.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:$e.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var JQ=qQ,YQ=new class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(Ot.system.add(this._tickerUpdate,this,Dt.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(Ot.system.remove(this._tickerUpdate,this),!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType===`touch`||globalThis.document.dispatchEvent(this.events.supportsPointerEvents?new PointerEvent(`pointermove`,{clientX:e.clientX,clientY:e.clientY,pointerType:e.pointerType,pointerId:e.pointerId}):new MouseEvent(`mousemove`,{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}destroy(){this.removeTickerListener(),this.events=null,this.domElement=null,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}},XQ=class extends bZ{constructor(){super(...arguments),this.client=new Tt,this.movement=new Tt,this.offset=new Tt,this.global=new Tt,this.screen=new Tt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)}getModifierState(e){return`getModifierState`in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){throw Error(`Method not implemented.`)}},ZQ=class extends XQ{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type===`pointermove`||this.type===`mousemove`||this.type===`touchmove`?[this]:[]}getPredictedEvents(){throw Error(`getPredictedEvents is not supported!`)}},QQ=class extends XQ{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};QQ.DOM_DELTA_PIXEL=0,QQ.DOM_DELTA_LINE=1,QQ.DOM_DELTA_PAGE=2;var Xye=2048,Zye=new Tt,$Q=new Tt,Qye=class{constructor(e){this.dispatch=new Ht,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping(`pointerdown`,this.mapPointerDown),this.addEventMapping(`pointermove`,this.mapPointerMove),this.addEventMapping(`pointerout`,this.mapPointerOut),this.addEventMapping(`pointerleave`,this.mapPointerOut),this.addEventMapping(`pointerover`,this.mapPointerOver),this.addEventMapping(`pointerup`,this.mapPointerUp),this.addEventMapping(`pointerupoutside`,this.mapPointerUpOutside),this.addEventMapping(`wheel`,this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((e,t)=>e.priority-t.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let n=0,r=t.length;n<r;n++)t[n].fn(e);else at(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){YQ.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,Zye.set(e,t),this.hitTestFn,this.hitPruneFn);return r&&r[0]}propagate(e,t){if(!e.target)return;let n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let r=0,i=n.length-1;r<i;r++)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let r=n.length-2;r>=0;r--)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let r=Array.isArray(t)?t:[t];for(let t=n.length-1;t>=0;t--)r.forEach(r=>{e.currentTarget=n[t],this.notifyTarget(e,r)})}propagationPath(e){let t=[e];for(let n=0;n<Xye&&e!==this.rootTarget&&e.parent;n++){if(!e.parent)throw Error(`Cannot find propagation path to disconnected target`);t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,n,r,i,a=!1){let o=!1;if(this._interactivePrune(e))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(YQ.pauseUpdate=!1),e.interactiveChildren&&e.children){let s=e.children;for(let c=s.length-1;c>=0;c--){let l=s[c],u=this.hitTestMoveRecursive(l,this._isInteractive(t)?t:l.eventMode,n,r,i,a||i(e,n));if(u){if(u.length>0&&!u[u.length-1].parent)continue;let t=e.isInteractive();(u.length>0||t)&&(t&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),o=!0}}}let s=this._isInteractive(t),c=e.isInteractive();return c&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:s&&!i(e,n)&&r(e,n)?c?[e]:[]:null}hitTestRecursive(e,t,n,r,i){if(this._interactivePrune(e)||i(e,n))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(YQ.pauseUpdate=!1),e.interactiveChildren&&e.children){let a=e.children,o=n;for(let n=a.length-1;n>=0;n--){let s=a[n],c=this.hitTestRecursive(s,this._isInteractive(t)?t:s.eventMode,o,r,i);if(c){if(c.length>0&&!c[c.length-1].parent)continue;let t=e.isInteractive();return(c.length>0||t)&&c.push(e),c}}}let a=this._isInteractive(t),o=e.isInteractive();return a&&r(e,n)?o?[e]:[]:null}_isInteractive(e){return e===`static`||e===`dynamic`}_interactivePrune(e){return!e||!e.visible||!e.renderable||!e.measurable||e.eventMode===`none`||e.eventMode===`passive`&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,$Q),!e.hitArea.contains($Q.x,$Q.y)))return!0;if(e.effects&&e.effects.length)for(let n=0;n<e.effects.length;n++){let r=e.effects[n];if(r.containsPoint&&!r.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,$Q),e.containsPoint($Q)):!1}notifyTarget(e,t){if(!e.currentTarget.isInteractive())return;t??=e.type;let n=`on${t}`;e.currentTarget[n]?.(e);let r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,`pointerdown`),t.pointerType===`touch`)this.dispatchEvent(t,`touchstart`);else if(t.pointerType===`mouse`||t.pointerType===`pen`){let e=t.button===2;this.dispatchEvent(t,e?`rightdown`:`mousedown`)}let n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let n=t.pointerType===`mouse`||t.pointerType===`pen`,r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.overTargets);if(r.overTargets?.length>0&&i!==t.target){let r=e.type===`mousemove`?`mouseout`:`pointerout`,a=this.createPointerEvent(e,r,i);if(this.dispatchEvent(a,`pointerout`),n&&this.dispatchEvent(a,`mouseout`),!t.composedPath().includes(i)){let r=this.createPointerEvent(e,`pointerleave`,i);for(r.eventPhase=r.AT_TARGET;r.target&&!t.composedPath().includes(r.target);)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,`mouseleave`),r.target=r.target.parent;this.freeEvent(r)}this.freeEvent(a)}if(i!==t.target){let r=e.type===`mousemove`?`mouseover`:`pointerover`,a=this.clonePointerEvent(t,r);this.dispatchEvent(a,`pointerover`),n&&this.dispatchEvent(a,`mouseover`);let o=i?.parent;for(;o&&o!==this.rootTarget.parent&&o!==t.target;)o=o.parent;if(!o||o===this.rootTarget.parent){let e=this.clonePointerEvent(t,`pointerenter`);for(e.eventPhase=e.AT_TARGET;e.target&&e.target!==i&&e.target!==this.rootTarget.parent;)e.currentTarget=e.target,this.notifyTarget(e),n&&this.notifyTarget(e,`mouseenter`),e.target=e.target.parent;this.freeEvent(e)}this.freeEvent(a)}let a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push(`pointermove`):this.dispatchEvent(t,`pointermove`),o&&a.push(`globalpointermove`),t.pointerType===`touch`&&(this.moveOnAll?a.splice(1,0,`touchmove`):this.dispatchEvent(t,`touchmove`),o&&a.push(`globaltouchmove`)),n&&(this.moveOnAll?a.splice(1,0,`mousemove`):this.dispatchEvent(t,`mousemove`),o&&a.push(`globalmousemove`),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,r.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.createPointerEvent(e),r=n.pointerType===`mouse`||n.pointerType===`pen`;this.dispatchEvent(n,`pointerover`),r&&this.dispatchEvent(n,`mouseover`),n.pointerType===`mouse`&&(this.cursor=n.target?.cursor);let i=this.clonePointerEvent(n,`pointerenter`);for(i.eventPhase=i.AT_TARGET;i.target&&i.target!==this.rootTarget.parent;)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,`mouseenter`),i.target=i.target.parent;t.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i)}mapPointerOut(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId);if(t.overTargets){let n=e.pointerType===`mouse`||e.pointerType===`pen`,r=this.findMountedTarget(t.overTargets),i=this.createPointerEvent(e,`pointerout`,r);this.dispatchEvent(i),n&&this.dispatchEvent(i,`mouseout`);let a=this.createPointerEvent(e,`pointerleave`,r);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),n&&this.notifyTarget(a,`mouseleave`),a.target=a.target.parent;t.overTargets=null,this.freeEvent(i),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,`pointerup`),n.pointerType===`touch`)this.dispatchEvent(n,`touchend`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.dispatchEvent(n,e?`rightup`:`mouseup`)}let r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[e.button]),a=i;if(i&&!n.composedPath().includes(i)){let t=i;for(;t&&!n.composedPath().includes(t);){if(n.currentTarget=t,this.notifyTarget(n,`pointerupoutside`),n.pointerType===`touch`)this.notifyTarget(n,`touchendoutside`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.notifyTarget(n,e?`rightupoutside`:`mouseupoutside`)}t=t.parent}delete r.pressTargetsByButton[e.button],a=t}if(a){let i=this.clonePointerEvent(n,`click`);i.target=a,i.path=null,r.clicksByButton[e.button]||(r.clicksByButton[e.button]={clickCount:0,target:i.target,timeStamp:t});let o=r.clicksByButton[e.button];if(o.target===i.target&&t-o.timeStamp<200?++o.clickCount:o.clickCount=1,o.target=i.target,o.timeStamp=t,i.detail=o.clickCount,i.pointerType===`mouse`){let e=i.button===2;this.dispatchEvent(i,e?`rightclick`:`click`)}else i.pointerType===`touch`&&this.dispatchEvent(i,`tap`);this.dispatchEvent(i,`pointertap`),this.freeEvent(i)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.findMountedTarget(t.pressTargetsByButton[e.button]),r=this.createPointerEvent(e);if(n){let i=n;for(;i;)r.currentTarget=i,this.notifyTarget(r,`pointerupoutside`),r.pointerType===`touch`?this.notifyTarget(r,`touchendoutside`):(r.pointerType===`mouse`||r.pointerType===`pen`)&&this.notifyTarget(r,r.button===2?`rightupoutside`:`mouseupoutside`),i=i.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(r)}mapWheel(e){if(!(e instanceof QQ)){at(`EventBoundary cannot map a non-wheel event as a wheel event`);return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let n=1;n<e.length&&e[n].parent===t;n++)t=e[n];return t}createPointerEvent(e,t,n){let r=this.allocateEvent(ZQ);return this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=n??this.hitTest(r.global.x,r.global.y)??this._hitElements[0],typeof t==`string`&&(r.type=t),r}createWheelEvent(e){let t=this.allocateEvent(QQ);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let n=this.allocateEvent(ZQ);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=t??n.type,n}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof ZQ&&t instanceof ZQ&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof XQ&&t instanceof XQ&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.defaultPrevented=!1,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw Error(`It is illegal to free an event not managed by this EventBoundary!`);let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){let n=e.currentTarget._events[t];if(n)if(`fn`in n)n.once&&e.currentTarget.removeListener(t,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let r=0,i=n.length;r<i&&!e.propagationImmediatelyStopped;r++)n[r].once&&e.currentTarget.removeListener(t,n[r].fn,void 0,!0),n[r].fn.call(n[r].context,e)}},$ye=1,ebe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},e$=class e{constructor(t){this.supportsTouchEvents=`ontouchstart`in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new Qye(null),YQ.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new ZQ(null),this._rootWheelEvent=new QQ(null),this.cursorStyles={default:`inherit`,pointer:`pointer`},this.features=new Proxy({...e.defaultEventFeatures},{set:(e,t,n)=>(t===`globalMove`&&(this.rootBoundary.enableGlobalMoveEvents=n),e[t]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:n,resolution:r}=this.renderer;this.setTargetElement(n),this.resolution=r,e._defaultEventMode=t.eventMode??`passive`,Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){YQ.destroy(),this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e||=`default`;let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;let n=this.cursorStyles[e];if(n)switch(typeof n){case`string`:t&&(this.domElement.style.cursor=n);break;case`function`:n(e);break;case`object`:t&&Object.assign(this.domElement.style,n);break}else t&&typeof e==`string`&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!(`cancelable`in e))&&e.preventDefault();for(let e=0,n=t.length;e<n;e++){let n=t[e],r=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,YQ.pointerMoved();let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);let n=t===this.domElement?``:`outside`,r=this._normalizeToPointerData(e);for(let e=0,t=r.length;e<t;e++){let t=this._bootstrapEvent(this._rootPointerEvent,r[e]);t.type+=n,this.rootBoundary.mapEvent(t)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;let t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,YQ.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;YQ.addTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`)),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.addEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.addEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.addEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.addEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.addEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.addEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.addEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.addEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.addEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.addEventListener(`touchend`,this._onPointerUp,!0),this.domElement.addEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.addEventListener(`wheel`,this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;YQ.removeTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``)),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.removeEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.removeEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.removeEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.removeEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.removeEventListener(`touchend`,this._onPointerUp,!0),this.domElement.removeEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.removeEventListener(`wheel`,this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,n){let r=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},i=1/this.resolution;e.x=(t-r.left)*(this.domElement.width/r.width)*i,e.y=(n-r.top)*(this.domElement.height/r.height)*i}_normalizeToPointerData(e){let t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches[n];r.button===void 0&&(r.button=0),r.buttons===void 0&&(r.buttons=1),r.isPrimary===void 0&&(r.isPrimary=e.touches.length===1&&e.type===`touchstart`),r.width===void 0&&(r.width=r.radiusX||1),r.height===void 0&&(r.height=r.radiusY||1),r.tiltX===void 0&&(r.tiltX=0),r.tiltY===void 0&&(r.tiltY=0),r.pointerType===void 0&&(r.pointerType=`touch`),r.pointerId===void 0&&(r.pointerId=r.identifier||0),r.pressure===void 0&&(r.pressure=r.force||.5),r.twist===void 0&&(r.twist=0),r.tangentialPressure===void 0&&(r.tangentialPressure=0),r.layerX===void 0&&(r.layerX=r.offsetX=r.clientX),r.layerY===void 0&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){let n=e;n.isPrimary===void 0&&(n.isPrimary=!0),n.width===void 0&&(n.width=1),n.height===void 0&&(n.height=1),n.tiltX===void 0&&(n.tiltX=0),n.tiltY===void 0&&(n.tiltY=0),n.pointerType===void 0&&(n.pointerType=`mouse`),n.pointerId===void 0&&(n.pointerId=$ye),n.pressure===void 0&&(n.pressure=.5),n.twist===void 0&&(n.twist=0),n.tangentialPressure===void 0&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){let t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type===`pointerleave`&&(e.type=`pointerout`),e.type.startsWith(`mouse`)&&(e.type=e.type.replace(`mouse`,`pointer`)),e.type.startsWith(`touch`)&&(e.type=ebe[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};e$.extension={name:`events`,type:[G.WebGLSystem,G.CanvasSystem,G.WebGPUSystem],priority:-1},e$.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var t$=e$,tbe={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode===`dynamic`||this.eventMode===`static`},set interactive(e){this.eventMode=e?`static`:`passive`},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??t$.defaultEventMode},set eventMode(e){this._internalEventMode=e},isInteractive(){return this.eventMode===`static`||this.eventMode===`dynamic`},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof n==`object`?n.signal:void 0,a=typeof n==`object`?n.once===!0:!1,o=typeof t==`function`?void 0:t;e=r?`${e}capture`:e;let s=typeof t==`function`?t:t.handleEvent,c=this;i&&i.addEventListener(`abort`,()=>{c.off(e,s,o)}),a?c.once(e,s,o):c.on(e,s,o)},removeEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof t==`function`?void 0:t;e=r?`${e}capture`:e,t=typeof t==`function`?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof bZ))throw Error(`Container cannot propagate events outside of the Federated Events API`);return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}},nbe=`in vec2 aPosition;
934
+ `,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${RZ}px`,t.style.height=`${RZ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=zZ.toString(),t.style.borderStyle=`none`,navigator.userAgent.toLowerCase().includes(`chrome`)?t.setAttribute(`aria-live`,`off`):t.setAttribute(`aria-live`,`polite`),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute(`aria-relevant`,`additions`):t.setAttribute(`aria-relevant`,`text`),t.addEventListener(`click`,this._onClick.bind(this)),t.addEventListener(`focus`,this._onFocus.bind(this)),t.addEventListener(`focusout`,this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute(`aria-label`,e.accessibleHint),e.interactive?t.tabIndex=e.tabIndex:t.tabIndex=0,this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv)}_dispatchEvent(e,t){let{container:n}=e.target,r=this._renderer.events.rootBoundary,i=Object.assign(new bZ(r),{target:n});r.rootTarget=this._renderer.lastObjectRendered,t.forEach(e=>r.dispatchEvent(i,e))}_onClick(e){this._dispatchEvent(e,[`click`,`pointertap`,`tap`])}_onFocus(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`assertive`),this._dispatchEvent(e,[`mouseover`])}_onFocusOut(e){e.target.getAttribute(`aria-live`)||e.target.setAttribute(`aria-live`,`polite`),this._dispatchEvent(e,[`mouseout`])}_onKeyDown(e){e.keyCode!==Pve||!this._activateOnTab||this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._deactivate(),this._destroyTouchHook(),this._canvasObserver?.destroy(),this._canvasObserver=null,this._div=null,this._pools=null,this._children=null,this._renderer=null,this._hookDiv=null,globalThis.removeEventListener(`keydown`,this._boundOnKeyDown),this._boundOnKeyDown=null,globalThis.document.removeEventListener(`mousemove`,this._boundOnMouseMove,!0),this._boundOnMouseMove=null}setAccessibilityEnabled(e){e?this._activate():this._deactivate()}_getPool(e){return this._pools[e]||(this._pools[e]=[]),this._pools[e]}};VZ.extension={type:[G.WebGLSystem,G.WebGPUSystem],name:`accessibility`},VZ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var Bve=VZ,Vve={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},HZ;function Hve(e){return HZ===void 0&&(HZ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Zt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Wt.get().getWebGLRenderingContext())return!1;let e=Wt.get().createCanvas().getContext(`webgl`,t),n=!!e?.getContextAttributes()?.stencil;if(e){let t=e.getExtension(`WEBGL_lose_context`);t&&t.loseContext()}return e=null,n}catch{return!1}})()),HZ}var UZ;async function Uve(e={}){return UZ===void 0&&(UZ=await(async()=>{let t=Wt.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),UZ}var WZ=[`webgl`,`webgpu`,`canvas`];async function Wve(e){let t=[];e.preference?(t.push(e.preference),WZ.forEach(n=>{n!==e.preference&&t.push(n)})):t=WZ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await Uve()){let{WebGPURenderer:t}=await J(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-Dhm03njt.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&Hve(e.failIfMajorPerformanceCaveat??Zt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await J(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-BWsZhyvF.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await J(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-CSU1mZCS.js`);return{CanvasRenderer:e}},__vite__mapDeps([133,128,1]));n=t,r={...e,...e.canvasOptions};break}}if(delete r.webgpu,delete r.webgl,delete r.canvasOptions,!n)throw Error(`No available renderer for the current environment`);let i=new n;return await i.init(r),i}var GZ=class{static init(e){Object.defineProperty(this,`resizeTo`,{configurable:!0,set(e){globalThis.removeEventListener(`resize`,this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener(`resize`,this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&=(cancelAnimationFrame(this._resizeId),null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let e,t;if(this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:n,clientHeight:r}=this._resizeTo;e=n,t=r}this.renderer.resize(e,t),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener(`resize`,this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};GZ.extension=G.Application;var KZ=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,`ticker`,{configurable:!0,set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,Dt.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Ot.shared:new Ot,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};KZ.extension=G.Application,At.add(GZ),At.add(KZ);var qZ=class e{constructor(...e){this.stage=new Kt,e[0]!==void 0&&Rt(ot,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new Kt,this.renderer=await Wve(t),e._plugins.forEach(e=>{e.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return Rt(ot,`Application.view is deprecated, please use Application.canvas instead.`),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){let r=e._plugins.slice(0);r.reverse(),r.forEach(e=>{e.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};qZ._plugins=[];var JZ=qZ;At.handleByList(G.Application,JZ._plugins),At.add(Qt);var Gve=t(n(((e,t)=>{t.exports=i;var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},r=/([astvzqmhlc])([^astvzqmhlc]*)/gi;function i(e){var t=[];return e.replace(r,function(e,r,i){var a=r.toLowerCase();for(i=o(i),a==`m`&&i.length>2&&(t.push([r].concat(i.splice(0,2))),a=`l`,r=r==`m`?`l`:`L`);;){if(i.length==n[a])return i.unshift(r),t.push(i);if(i.length<n[a])throw Error(`malformed path data`);t.push([r].concat(i.splice(0,n[a])))}}),t}var a=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function o(e){var t=e.match(a);return t?t.map(Number):[]}}))(),1);function Kve(e,t){let n=(0,Gve.default)(e),r=[],i=null,a=0,o=0;for(let e=0;e<n.length;e++){let s=n[e],c=s[0],l=s;switch(c){case`M`:a=l[1],o=l[2],t.moveTo(a,o);break;case`m`:a+=l[1],o+=l[2],t.moveTo(a,o);break;case`H`:a=l[1],t.lineTo(a,o);break;case`h`:a+=l[1],t.lineTo(a,o);break;case`V`:o=l[1],t.lineTo(a,o);break;case`v`:o+=l[1],t.lineTo(a,o);break;case`L`:a=l[1],o=l[2],t.lineTo(a,o);break;case`l`:a+=l[1],o+=l[2],t.lineTo(a,o);break;case`C`:a=l[5],o=l[6],t.bezierCurveTo(l[1],l[2],l[3],l[4],a,o);break;case`c`:t.bezierCurveTo(a+l[1],o+l[2],a+l[3],o+l[4],a+l[5],o+l[6]),a+=l[5],o+=l[6];break;case`S`:a=l[3],o=l[4],t.bezierCurveToShort(l[1],l[2],a,o);break;case`s`:t.bezierCurveToShort(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`Q`:a=l[3],o=l[4],t.quadraticCurveTo(l[1],l[2],a,o);break;case`q`:t.quadraticCurveTo(a+l[1],o+l[2],a+l[3],o+l[4]),a+=l[3],o+=l[4];break;case`T`:a=l[1],o=l[2],t.quadraticCurveToShort(a,o);break;case`t`:a+=l[1],o+=l[2],t.quadraticCurveToShort(a,o);break;case`A`:a=l[6],o=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`a`:a+=l[6],o+=l[7],t.arcToSvg(l[1],l[2],l[3],l[4],l[5],a,o);break;case`Z`:case`z`:t.closePath(),r.length>0&&(i=r.pop(),i?(a=i.startX,o=i.startY):(a=0,o=0)),i=null;break;default:at(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var qve=class e{constructor(e=0,t=0,n=0){this.type=`circle`,this.x=e,this.y=t,this.radius=n}clone(){return new e(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let n=this.radius*this.radius,r=this.x-e,i=this.y-t;return r*=r,i*=i,r+i<=n}strokeContains(e,t,n,r=.5){if(this.radius===0)return!1;let i=this.x-e,a=this.y-t,o=this.radius,s=(1-r)*n,c=Math.sqrt(i*i+a*a);return c<=o+s&&c>o-(n-s)}getBounds(e){return e||=new yt,e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}},Jve=class e{constructor(e=0,t=0,n=0,r=0){this.type=`ellipse`,this.x=e,this.y=t,this.halfWidth=n,this.halfHeight=r}clone(){return new e(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,t){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let n=(e-this.x)/this.halfWidth,r=(t-this.y)/this.halfHeight;return n*=n,r*=r,n+r<=1}strokeContains(e,t,n,r=.5){let{halfWidth:i,halfHeight:a}=this;if(i<=0||a<=0)return!1;let o=n*(1-r),s=n-o,c=i-s,l=a-s,u=i+o,d=a+o,f=e-this.x,p=t-this.y,m=f*f/(c*c)+p*p/(l*l),h=f*f/(u*u)+p*p/(d*d);return m>1&&h<=1}getBounds(e){return e||=new yt,e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}};function Yve(e,t,n,r,i,a){let o=e-n,s=t-r,c=i-n,l=a-r,u=o*c+s*l,d=c*c+l*l,f=-1;d!==0&&(f=u/d);let p,m;f<0?(p=n,m=r):f>1?(p=i,m=a):(p=n+f*c,m=r+f*l);let h=e-p,g=t-m;return h*h+g*g}var Xve,Zve,YZ=class e{constructor(...e){this.type=`polygon`;let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!=`number`){let e=[];for(let n=0,r=t.length;n<r;n++)e.push(t[n].x,t[n].y);t=e}this.points=t,this.closePath=!0}isClockwise(){let e=0,t=this.points,n=t.length;for(let r=0;r<n;r+=2){let i=t[r],a=t[r+1],o=t[(r+2)%n],s=t[(r+3)%n];e+=(o-i)*(s+a)}return e<0}containsPolygon(e){let t=this.getBounds(Xve),n=e.getBounds(Zve);if(!t.containsRect(n))return!1;let r=e.points;for(let e=0;e<r.length;e+=2){let t=r[e],n=r[e+1];if(!this.contains(t,n))return!1}return!0}clone(){let t=new e(this.points.slice());return t.closePath=this.closePath,t}contains(e,t){let n=!1,r=this.points.length/2;for(let i=0,a=r-1;i<r;a=i++){let r=this.points[i*2],o=this.points[i*2+1],s=this.points[a*2],c=this.points[a*2+1];o>t!=c>t&&e<(s-r)*((t-o)/(c-o))+r&&(n=!n)}return n}strokeContains(e,t,n,r=.5){let i=n*n,a=i*(1-r),o=i-a,{points:s}=this,c=s.length-(this.closePath?0:2);for(let n=0;n<c;n+=2){let r=s[n],i=s[n+1],c=s[(n+2)%s.length],l=s[(n+3)%s.length];if(Yve(e,t,r,i,c,l)<=(Math.sign((c-r)*(t-i)-(l-i)*(e-r))<0?o:a))return!0}return!1}getBounds(e){e||=new yt;let t=this.points,n=1/0,r=-1/0,i=1/0,a=-1/0;for(let e=0,o=t.length;e<o;e+=2){let o=t[e],s=t[e+1];n=o<n?o:n,r=o>r?o:r,i=s<i?s:i,a=s>a?s:a}return e.x=n,e.width=r-n,e.y=i,e.height=a-i,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,t)=>`${e}, ${t}`,``)}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return Rt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return Rt(`8.11.0`,`Polygon.y is deprecated, please use Polygon.lastY instead.`),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}},XZ=(e,t,n,r,i,a,o)=>{let s=e-n,c=t-r,l=Math.sqrt(s*s+c*c);return l>=i-a&&l<=i+o},Qve=class e{constructor(e=0,t=0,n=0,r=0,i=20){this.type=`roundedRectangle`,this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i}getBounds(e){return e||=new yt,e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new e(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+n&&t<=this.y+this.height-n||e>=this.x+n&&e<=this.x+this.width-n)return!0;let r=e-(this.x+n),i=t-(this.y+n),a=n*n;if(r*r+i*i<=a||(r=e-(this.x+this.width-n),r*r+i*i<=a)||(i=t-(this.y+this.height-n),r*r+i*i<=a)||(r=e-(this.x+n),r*r+i*i<=a))return!0}return!1}strokeContains(e,t,n,r=.5){let{x:i,y:a,width:o,height:s,radius:c}=this,l=n*(1-r),u=n-l,d=i+c,f=a+c,p=o-c*2,m=s-c*2,h=i+o,g=a+s;return(e>=i-l&&e<=i+u||e>=h-u&&e<=h+l)&&t>=f&&t<=f+m||(t>=a-l&&t<=a+u||t>=g-u&&t<=g+l)&&e>=d&&e<=d+p?!0:e<d&&t<f&&XZ(e,t,d,f,c,u,l)||e>h-c&&t<f&&XZ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&XZ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&XZ(e,t,d,g-c,c,u,l)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};function $ve(e,t,n,r,i,a,o,s=null){let c=0;n*=t,i*=a;let l=s.a,u=s.b,d=s.c,f=s.d,p=s.tx,m=s.ty;for(;c<o;){let o=e[n],s=e[n+1];r[i]=l*o+d*s+p,r[i+1]=u*o+f*s+m,i+=a,n+=t,c++}}function eye(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function ZZ(e,t,n,r,i){let a=t.a,o=t.b,s=t.c,c=t.d,l=t.tx,u=t.ty;n||=0,r||=2,i||=e.length/r-n;let d=n*r;for(let t=0;t<i;t++){let t=e[d],n=e[d+1];e[d]=a*t+s*n+l,e[d+1]=o*t+c*n+u,d+=r}}var tye=new Ze,QZ=class{constructor(){this.packAsQuad=!1,this.batcherName=`default`,this.topology=`triangle-list`,this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:`normal`}get color(){let e=this.baseColor,t=e>>16|e&65280|(e&255)<<16,n=this.renderable;return n?ut(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||tye}copyTo(e){e.indexOffset=this.indexOffset,e.indexSize=this.indexSize,e.attributeOffset=this.attributeOffset,e.attributeSize=this.attributeSize,e.baseColor=this.baseColor,e.alpha=this.alpha,e.texture=this.texture,e.geometryData=this.geometryData,e.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology=`triangle-list`}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}},$Z={extension:{type:G.ShapeBuilder,name:`circle`},build(e,t){let n,r,i,a,o,s;if(e.type===`circle`){let t=e;if(o=s=t.radius,o<=0)return!1;n=t.x,r=t.y,i=a=0}else if(e.type===`ellipse`){let t=e;if(o=t.halfWidth,s=t.halfHeight,o<=0||s<=0)return!1;n=t.x,r=t.y,i=a=0}else{let t=e,c=t.width/2,l=t.height/2;n=t.x+c,r=t.y+l,o=s=Math.max(0,Math.min(t.radius,Math.min(c,l))),i=c-o,a=l-s}if(i<0||a<0)return!1;let c=Math.ceil(2.3*Math.sqrt(o+s)),l=c*8+(i?4:0)+(a?4:0);if(l===0)return!1;if(c===0)return t[0]=t[6]=n+i,t[1]=t[3]=r+a,t[2]=t[4]=n-i,t[5]=t[7]=r-a,!0;let u=0,d=c*4+(i?2:0)+2,f=d,p=l,m=i+o,h=a,g=n+m,_=n-m,v=r+h;if(t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,a){let e=r-h;t[f++]=_,t[f++]=e,t[--p]=e,t[--p]=g}for(let e=1;e<c;e++){let l=Math.PI/2*(e/c),m=i+Math.cos(l)*o,h=a+Math.sin(l)*s,g=n+m,_=n-m,v=r+h,y=r-h;t[u++]=g,t[u++]=v,t[--d]=v,t[--d]=_,t[f++]=_,t[f++]=y,t[--p]=y,t[--p]=g}m=i,h=a+s,g=n+m,_=n-m,v=r+h;let y=r-h;return t[u++]=g,t[u++]=v,t[--p]=y,t[--p]=g,i&&(t[u++]=_,t[u++]=v,t[--p]=y,t[--p]=_),!0},triangulate(e,t,n,r,i,a){if(e.length===0)return;let o=0,s=0;for(let t=0;t<e.length;t+=2)o+=e[t],s+=e[t+1];o/=e.length/2,s/=e.length/2;let c=r;t[c*n]=o,t[c*n+1]=s;let l=c++;for(let r=0;r<e.length;r+=2)t[c*n]=e[r],t[c*n+1]=e[r+1],r>0&&(i[a++]=c,i[a++]=l,i[a++]=c-1),c++;i[a++]=l+1,i[a++]=l,i[a++]=c-1}},nye={...$Z,extension:{...$Z.extension,name:`ellipse`}},rye={...$Z,extension:{...$Z.extension,name:`roundedRectangle`}},eQ=1e-4,tQ=1e-4;function iye(e){let t=e.length;if(t<6)return 1;let n=0;for(let r=0,i=e[t-2],a=e[t-1];r<t;r+=2){let t=e[r],o=e[r+1];n+=(t-i)*(o+a),i=t,a=o}return n<0?-1:1}function nQ(e,t,n,r,i,a,o,s){let c=e-n*i,l=t-r*i,u=e+n*a,d=t+r*a,f,p;o?(f=r,p=-n):(f=-r,p=n);let m=c+f,h=l+p,g=u+f,_=d+p;return s.push(m,h),s.push(g,_),2}function rQ(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=Math.atan2(c,l),d=Math.atan2(i-e,a-t);s&&u<d?u+=Math.PI*2:!s&&u>d&&(d+=Math.PI*2);let f=u,p=d-u,m=Math.abs(p),h=Math.sqrt(c*c+l*l),g=(15*m*Math.sqrt(h)/Math.PI>>0)+1,_=p/g;if(f+=_,s){o.push(e,t),o.push(n,r);for(let n=1,r=f;n<g;n++,r+=_)o.push(e,t),o.push(e+Math.sin(r)*h,t+Math.cos(r)*h);o.push(e,t),o.push(i,a)}else{o.push(n,r),o.push(e,t);for(let n=1,r=f;n<g;n++,r+=_)o.push(e+Math.sin(r)*h,t+Math.cos(r)*h),o.push(e,t);o.push(i,a),o.push(e,t)}return g*2}function iQ(e,t,n,r,i,a){let o=eQ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=iye(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new Tt(e[0],e[1]),u=new Tt(e[e.length-2],e[e.length-1]),d=r,f=Math.abs(l.x-u.x)<o&&Math.abs(l.y-u.y)<o;if(d){e=e.slice(),f&&(e.pop(),e.pop(),u.set(e[e.length-2],e[e.length-1]));let t=(l.x+u.x)*.5,n=(u.y+l.y)*.5;e.unshift(t,n),e.push(t,n)}let p=i,m=e.length/2,h=e.length,g=p.length/2,_=s.width/2,v=_*_,y=s.miterLimit*s.miterLimit,b=e[0],x=e[1],S=e[2],C=e[3],w=0,T=0,E=-(x-C),D=b-S,O=0,k=0,A=Math.sqrt(E*E+D*D);E/=A,D/=A,E*=_,D*=_;let j=c,M=(1-j)*2,N=j*2;d||(s.cap===`round`?h+=rQ(b-E*(M-N)*.5,x-D*(M-N)*.5,b-E*M,x-D*M,b+E*N,x+D*N,p,!0)+2:s.cap===`square`&&(h+=nQ(b,x,E,D,M,N,!0,p))),p.push(b-E*M,x-D*M),p.push(b+E*N,x+D*N);for(let t=1;t<m-1;++t){b=e[(t-1)*2],x=e[(t-1)*2+1],S=e[t*2],C=e[t*2+1],w=e[(t+1)*2],T=e[(t+1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,O=-(C-T),k=S-w,A=Math.sqrt(O*O+k*k),O/=A,k/=A,O*=_,k*=_;let n=S-b,r=x-C,i=S-w,a=T-C,o=n*i+r*a,c=r*i-a*n,l=c<0;if(Math.abs(c)<.001*Math.abs(o)){p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),o>=0&&(s.join===`round`?h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4:h+=2,p.push(S-O*N,C-k*N),p.push(S+O*M,C+k*M));continue}let u=(-E+b)*(-D+C)-(-E+S)*(-D+x),d=(-O+w)*(-k+C)-(-O+S)*(-k+T),f=(n*d-i*u)/c,m=(a*u-r*d)/c,g=(f-S)*(f-S)+(m-C)*(m-C),j=S+(f-S)*M,P=C+(m-C)*M,F=S-(f-S)*N,I=C-(m-C)*N,L=Math.min(n*n+r*r,i*i+a*a),R=l?M:N;g<=L+R*R*v?s.join===`bevel`||g/v>y?(l?(p.push(j,P),p.push(S+E*N,C+D*N),p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),p.push(S-O*M,C-k*M),p.push(F,I)),h+=2):s.join===`round`?l?(p.push(j,P),p.push(S+E*N,C+D*N),h+=rQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+4,p.push(j,P),p.push(S+O*N,C+k*N)):(p.push(S-E*M,C-D*M),p.push(F,I),h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+4,p.push(S-O*M,C-k*M),p.push(F,I)):(p.push(j,P),p.push(F,I)):(p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),s.join===`round`?l?h+=rQ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=rQ(S,C,S-E*M,C-D*M,S-O*M,C-k*M,p,!1)+2:s.join===`miter`&&g/v<=y&&(l?(p.push(F,I),p.push(F,I)):(p.push(j,P),p.push(j,P)),h+=2),p.push(S-O*M,C-k*M),p.push(S+O*N,C+k*N),h+=2)}b=e[(m-2)*2],x=e[(m-2)*2+1],S=e[(m-1)*2],C=e[(m-1)*2+1],E=-(x-C),D=b-S,A=Math.sqrt(E*E+D*D),E/=A,D/=A,E*=_,D*=_,p.push(S-E*M,C-D*M),p.push(S+E*N,C+D*N),d||(s.cap===`round`?h+=rQ(S-E*(M-N)*.5,C-D*(M-N)*.5,S-E*M,C-D*M,S+E*N,C+D*N,p,!1)+2:s.cap===`square`&&(h+=nQ(S,C,E,D,M,N,!1,p)));let P=tQ*tQ;for(let e=g;e<h+g-2;++e)b=p[e*2],x=p[e*2+1],S=p[(e+1)*2],C=p[(e+1)*2+1],w=p[(e+2)*2],T=p[(e+2)*2+1],!(Math.abs(b*(C-T)+S*(T-x)+w*(x-C))<P)&&a.push(e,e+1,e+2)}function aye(e,t,n,r){let i=eQ;if(e.length===0)return;let a=e[0],o=e[1],s=e[e.length-2],c=e[e.length-1],l=t||Math.abs(a-s)<i&&Math.abs(o-c)<i,u=n,d=e.length/2,f=u.length/2;for(let t=0;t<d;t++)u.push(e[t*2]),u.push(e[t*2+1]);for(let e=0;e<d-1;e++)r.push(f+e,f+e+1);l&&r.push(f+d-1,f)}function aQ(e,t,n,r,i,a,o){let s=fn(e,t,2);if(!s)return;for(let e=0;e<s.length;e+=3)a[o++]=s[e]+i,a[o++]=s[e+1]+i,a[o++]=s[e+2]+i;let c=i*r;for(let t=0;t<e.length;t+=2)n[c]=e[t],n[c+1]=e[t+1],c+=r}var oye=[],sye={extension:{type:G.ShapeBuilder,name:`polygon`},build(e,t){for(let n=0;n<e.points.length;n++)t[n]=e.points[n];return!0},triangulate(e,t,n,r,i,a){aQ(e,oye,t,n,r,i,a)}},cye={extension:{type:G.ShapeBuilder,name:`rectangle`},build(e,t){let n=e,r=n.x,i=n.y,a=n.width,o=n.height;return a>0&&o>0?(t[0]=r,t[1]=i,t[2]=r+a,t[3]=i,t[4]=r+a,t[5]=i+o,t[6]=r,t[7]=i+o,!0):!1},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[6],t[r+o+1]=e[7],o+=n,t[r+o]=e[4],t[r+o+1]=e[5],o+=n;let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2,i[a++]=s+1,i[a++]=s+3,i[a++]=s+2}},lye={extension:{type:G.ShapeBuilder,name:`triangle`},build(e,t){return t[0]=e.x,t[1]=e.y,t[2]=e.x2,t[3]=e.y2,t[4]=e.x3,t[5]=e.y3,!0},triangulate(e,t,n,r,i,a){let o=0;r*=n,t[r+o]=e[0],t[r+o+1]=e[1],o+=n,t[r+o]=e[2],t[r+o+1]=e[3],o+=n,t[r+o]=e[4],t[r+o+1]=e[5];let s=r/n;i[a++]=s,i[a++]=s+1,i[a++]=s+2}},oQ=[{offset:0,color:`white`},{offset:1,color:`black`}],sQ=class e{constructor(...t){this.uid=_t(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=uye(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...rt(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type===`radial`?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(e=>{this.addColorStop(e.offset,e.color)})}addColorStop(e,t){return this.colorStops.push({offset:e,color:ct.shared.setValue(t).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:e,y:t}=this.start,{x:n,y:r}=this.end,i=n-e,a=r-t,o=i<0||a<0;if(this._wrapMode===`clamp-to-edge`){if(i<0){let t=e;e=n,n=t,i*=-1}if(a<0){let e=t;t=r,r=e,a*=-1}}let s=this.colorStops.length?this.colorStops:oQ,c=this._textureSize,{canvas:l,context:u}=uQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);lQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new $e({source:new Yt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Ze;m.scale(f/c,1),m.rotate(p),m.translate(e,t),this.textureSpace===`local`&&m.scale(c,c),this.transform=m}buildGradient(){this.texture||this._tick++,this.type===`linear`?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;let e=this.colorStops.length?this.colorStops:oQ,t=this._textureSize,{canvas:n,context:r}=uQ(t,t),{x:i,y:a}=this.center,{x:o,y:s}=this.outerCenter,c=this.innerRadius,l=this.outerRadius,u=o-l,d=s-l,f=t/(l*2),p=(i-u)*f,m=(a-d)*f,h=r.createRadialGradient(p,m,c*f,(o-u)*f,(s-d)*f,l*f);lQ(h,e),r.fillStyle=e[e.length-1].color,r.fillRect(0,0,t,t),r.fillStyle=h,r.translate(p,m),r.rotate(this.rotation),r.scale(1,this.scale),r.translate(-p,-m),r.fillRect(0,0,t,t),this.texture=new $e({source:new Yt({resource:n,addressMode:this._wrapMode})});let g=new Ze;g.scale(1/f,1/f),g.translate(u,d),this.textureSpace===`local`&&g.scale(t,t),this.transform=g}destroy(){this.texture?.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};sQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},sQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var cQ=sQ;function lQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function uQ(e,t){let n=Wt.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function uye(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(Rt(`8.5.2`,`use options object instead`),t={type:`linear`,start:{x:e[0],y:e[1]},end:{x:e[2],y:e[3]},textureSpace:e[4],textureSize:e[5]??cQ.defaultLinearOptions.textureSize}),t}var dye=new Ze,fye=new yt;function dQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(fye);t.width&&e.pad(t.width);let{x:r,y:a}=e,o=1/e.width,s=1/e.height,c=-r*o,l=-a*s,u=i.a,d=i.b,f=i.c,p=i.d;i.a*=o,i.b*=o,i.c*=s,i.d*=s,i.tx=c*u+l*f+i.tx,i.ty=c*d+l*p+i.ty}else i.translate(t.texture.frame.x,t.texture.frame.y),i.scale(1/t.texture.source.width,1/t.texture.source.height);let a=t.texture.source.style;return!(t.fill instanceof cQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(dye.copyFrom(r).invert()),i}var fQ={};At.handleByMap(G.ShapeBuilder,fQ),At.add(cye,sye,lye,$Z,nye,rye);var pye=new yt,mye=new Ze;function hye(e,t){let{geometryData:n,batches:r}=t;r.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let t=0;t<e.instructions.length;t++){let i=e.instructions[t];if(i.action===`texture`)gye(i.data,r,n);else if(i.action===`fill`||i.action===`stroke`){let e=i.action===`stroke`,t=i.data.path.shapePath,a=i.data.style,o=i.data.hole;e&&o&&pQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),pQ(t,a,e,r,n)}}}function gye(e,t,n){let r=[],i=fQ.rectangle,a=pye;a.x=e.dx,a.y=e.dy,a.width=e.dw,a.height=e.dh;let o=e.transform;if(!i.build(a,r))return;let{vertices:s,uvs:c,indices:l}=n,u=l.length,d=s.length/2;o&&ZZ(r,o),i.triangulate(r,s,2,d,l,u);let f=e.image,p=f.uvs;c.push(p.x0,p.y0,p.x1,p.y1,p.x3,p.y3,p.x2,p.y2);let m=dt.get(QZ);m.indexOffset=u,m.indexSize=l.length-u,m.attributeOffset=d,m.attributeSize=s.length/2-d,m.baseColor=e.style,m.alpha=e.alpha,m.texture=f,m.geometryData=n,t.push(m)}function pQ(e,t,n,r,i){let{vertices:a,uvs:o,indices:s}=i;e.shapePrimitives.forEach(({shape:e,transform:c,holes:l})=>{let u=[],d=fQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&ZZ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(aye(u,n,a,s),m=`line-list`):iQ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();_ye(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),aQ(t,e,a,2,p,s,f)}else d.triangulate(u,a,2,p,s,f);let h=o.length/2,g=t.texture;if(g!==$e.WHITE){let n=dQ(mye,t,e,c);$ve(a,2,p,o,h,2,a.length/2-p,n)}else eye(o,h,2,a.length/2-p);let _=dt.get(QZ);_.indexOffset=f,_.indexSize=s.length-f,_.attributeOffset=p,_.attributeSize=a.length/2-p,_.baseColor=t.color,_.alpha=t.alpha,_.texture=g,_.geometryData=i,_.topology=m,r.push(_)})}function _ye(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];fQ[r.type].build(r,i)&&t.push(i)}return t}var vye=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{dt.return(e)}),this.graphicsData&&dt.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}},yye=class{constructor(){this.instructions=new Gt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new _n({maxTextures:t}),this.instructions.reset()}get geometry(){return Rt(vt,`GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead.`),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}},mQ=class e{constructor(e){this._renderer=e,this._managedContexts=new cn({renderer:e,type:`resource`,name:`graphicsContext`})}init(t){e.defaultOptions.bezierSmoothness=t?.bezierSmoothness??e.defaultOptions.bezierSmoothness}getContextRenderData(e){return e._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(e)}updateGpuContext(e){let t=!!e._gpuData[this._renderer.uid],n=e._gpuData[this._renderer.uid]||this._initContext(e);if(e.dirty||!t){t&&n.reset(),hye(e,n);let r=e.batchMode;e.customShader||r===`no-batch`?n.isBatchable=!1:r===`auto`?n.isBatchable=n.geometryData.vertices.length<400:n.isBatchable=!0,e.dirty=!1}return n}getGpuContext(e){return e._gpuData[this._renderer.uid]||this._initContext(e)}_initContextRenderData(e){let t=dt.get(yye,{maxTextures:this._renderer.limits.maxBatchableTextures}),n=e._gpuData[this._renderer.uid],{batches:r,geometryData:i}=n;n.graphicsData=t;let a=i.vertices.length,o=i.indices.length;for(let e=0;e<r.length;e++)r[e].applyTransform=!1;let s=t.batcher;s.ensureAttributeBuffer(a),s.ensureIndexBuffer(o),s.begin();for(let e=0;e<r.length;e++){let t=r[e];s.add(t)}s.finish(t.instructions);let c=s.geometry;c.indexBuffer.setDataWithSize(s.indexBuffer,s.indexSize,!0),c.buffers[0].setDataWithSize(s.attributeBuffer.float32View,s.attributeSize,!0);let l=s.batches;for(let e=0;e<l.length;e++){let t=l[e];t.bindGroup=En(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new vye;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};mQ.extension={type:[G.WebGLSystem,G.WebGPUSystem],name:`graphicsContext`},mQ.defaultOptions={bezierSmoothness:.5};var hQ=mQ,bye=8,gQ=1.1920929e-7,xye=1,_Q=.01,vQ=0,yQ=0;function bQ(e,t,n,r,i,a,o,s,c,l){let u=(xye-Math.min(.99,Math.max(0,l??hQ.defaultOptions.bezierSmoothness)))/1;return u*=u,Sye(t,n,r,i,a,o,s,c,e,u),e}function Sye(e,t,n,r,i,a,o,s,c,l){xQ(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function xQ(e,t,n,r,i,a,o,s,c,l,u){if(u>bye)return;let d=Math.PI,f=(e+n)/2,p=(t+r)/2,m=(n+i)/2,h=(r+a)/2,g=(i+o)/2,_=(a+s)/2,v=(f+m)/2,y=(p+h)/2,b=(m+g)/2,x=(h+_)/2,S=(v+b)/2,C=(y+x)/2;if(u>0){let u=o-e,f=s-t,p=Math.abs((n-o)*f-(r-s)*u),m=Math.abs((i-o)*f-(a-s)*u),h,g;if(p>gQ&&m>gQ){if((p+m)*(p+m)<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}let l=Math.atan2(a-r,i-n);if(h=Math.abs(l-Math.atan2(r-t,n-e)),g=Math.abs(Math.atan2(s-a,o-i)-l),h>=d&&(h=2*d-h),g>=d&&(g=2*d-g),h+g<vQ){c.push(S,C);return}if(yQ!==0){if(h>yQ){c.push(n,r);return}if(g>yQ){c.push(i,a);return}}}}else if(p>gQ){if(p*p<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}if(h=Math.abs(Math.atan2(a-r,i-n)-Math.atan2(r-t,n-e)),h>=d&&(h=2*d-h),h<vQ){c.push(n,r),c.push(i,a);return}if(yQ!==0&&h>yQ){c.push(n,r);return}}}else if(m>gQ){if(m*m<=l*(u*u+f*f)){if(vQ<_Q){c.push(S,C);return}if(h=Math.abs(Math.atan2(s-a,o-i)-Math.atan2(a-r,i-n)),h>=d&&(h=2*d-h),h<vQ){c.push(n,r),c.push(i,a);return}if(yQ!==0&&h>yQ){c.push(i,a);return}}}else if(u=S-(e+o)/2,f=C-(t+s)/2,u*u+f*f<=l){c.push(S,C);return}}xQ(e,t,f,p,v,y,S,C,c,l,u+1),xQ(S,C,b,x,g,_,o,s,c,l,u+1)}var Cye=8,wye=1.1920929e-7,Tye=1,Eye=.01,SQ=0;function Dye(e,t,n,r,i,a,o,s){let c=(Tye-Math.min(.99,Math.max(0,s??hQ.defaultOptions.bezierSmoothness)))/1;return c*=c,Oye(t,n,r,i,a,o,e,c),e}function Oye(e,t,n,r,i,a,o,s){CQ(o,e,t,n,r,i,a,s,0),o.push(i,a)}function CQ(e,t,n,r,i,a,o,s,c){if(c>Cye)return;let l=Math.PI,u=(t+r)/2,d=(n+i)/2,f=(r+a)/2,p=(i+o)/2,m=(u+f)/2,h=(d+p)/2,g=a-t,_=o-n,v=Math.abs((r-a)*_-(i-o)*g);if(v>wye){if(v*v<=s*(g*g+_*_)){if(SQ<Eye){e.push(m,h);return}let s=Math.abs(Math.atan2(o-i,a-r)-Math.atan2(i-n,r-t));if(s>=l&&(s=2*l-s),s<SQ){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}CQ(e,t,n,u,d,m,h,s,c+1),CQ(e,m,h,f,p,a,o,s,c+1)}function wQ(e,t,n,r,i,a,o,s){let c=Math.abs(i-a);(!o&&i>a||o&&a>i)&&(c=2*Math.PI-c),s||=Math.max(6,Math.floor(6*r**(1/3)*(c/Math.PI))),s=Math.max(s,3);let l=c/s,u=i;l*=o?-1:1;for(let i=0;i<s+1;i++){let i=Math.cos(u),a=Math.sin(u),o=t+i*r,s=n+a*r;e.push(o,s),u+=l}}function kye(e,t,n,r,i,a){let o=e[e.length-2],s=e[e.length-1]-n,c=o-t,l=i-n,u=r-t,d=Math.abs(s*u-c*l);if(d<1e-8||a===0){(e[e.length-2]!==t||e[e.length-1]!==n)&&e.push(t,n);return}let f=s*s+c*c,p=l*l+u*u,m=s*l+c*u,h=a*Math.sqrt(f)/d,g=a*Math.sqrt(p)/d,_=h*m/f,v=g*m/p,y=h*u+g*c,b=h*l+g*s,x=c*(g+_),S=s*(g+_),C=u*(h+v),w=l*(h+v),T=Math.atan2(S-b,x-y),E=Math.atan2(w-b,C-y);wQ(e,y+t,b+n,a,T,E,c*l>u*s)}var TQ=Math.PI*2,EQ={centerX:0,centerY:0,ang1:0,ang2:0},DQ=({x:e,y:t},n,r,i,a,o,s,c)=>{e*=n,t*=r;let l=i*e-a*t,u=a*e+i*t;return c.x=l+o,c.y=u+s,c};function Aye(e,t){let n=t===-1.5707963267948966?-.551915024494:4/3*Math.tan(t/4),r=t===1.5707963267948966?.551915024494:n,i=Math.cos(e),a=Math.sin(e),o=Math.cos(e+t),s=Math.sin(e+t);return[{x:i-a*r,y:a+i*r},{x:o+s*r,y:s-o*r},{x:o,y:s}]}var OQ=(e,t,n,r)=>{let i=e*r-t*n<0?-1:1,a=e*n+t*r;return a>1&&(a=1),a<-1&&(a=-1),i*Math.acos(a)},jye=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{let p=i**2,m=a**2,h=u**2,g=d**2,_=p*m-p*g-m*h;_<0&&(_=0),_/=p*g+m*h,_=Math.sqrt(_)*(o===s?-1:1);let v=_*i/a*d,y=_*-a/i*u,b=l*v-c*y+(e+n)/2,x=c*v+l*y+(t+r)/2,S=(u-v)/i,C=(d-y)/a,w=(-u-v)/i,T=(-d-y)/a,E=OQ(1,0,S,C),D=OQ(S,C,w,T);s===0&&D>0&&(D-=TQ),s===1&&D<0&&(D+=TQ),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function Mye(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*TQ/360),d=Math.cos(s*TQ/360),f=d*(t-r)/2+u*(n-i)/2,p=-u*(t-r)/2+d*(n-i)/2;if(f===0&&p===0)return;a=Math.abs(a),o=Math.abs(o);let m=f**2/a**2+p**2/o**2;m>1&&(a*=Math.sqrt(m),o*=Math.sqrt(m)),jye(t,n,r,i,a,o,c,l,u,d,f,p,EQ);let{ang1:h,ang2:g}=EQ,{centerX:_,centerY:v}=EQ,y=Math.abs(g)/(TQ/4);Math.abs(1-y)<1e-7&&(y=1);let b=Math.max(Math.ceil(y),1);g/=b;let x=e[e.length-2],S=e[e.length-1],C={x:0,y:0};for(let t=0;t<b;t++){let t=Aye(h,g),{x:n,y:r}=DQ(t[0],a,o,d,u,_,v,C),{x:i,y:s}=DQ(t[1],a,o,d,u,_,v,C),{x:c,y:l}=DQ(t[2],a,o,d,u,_,v,C);bQ(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function Nye(e,t,n){let r=(e,t)=>{let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);return{len:i,nx:n/i,ny:r/i}},i=(t,n)=>{t===0?e.moveTo(n.x,n.y):e.lineTo(n.x,n.y)},a=t[t.length-1];for(let o=0;o<t.length;o++){let s=t[o%t.length],c=s.radius??n;if(c<=0){i(o,s),a=s;continue}let l=t[(o+1)%t.length],u=r(s,a),d=r(s,l);if(u.len<1e-4||d.len<1e-4){i(o,s),a=s;continue}let f=Math.asin(u.nx*d.ny-u.ny*d.nx),p=1,m=!1;u.nx*d.nx-u.ny*-d.ny<0?f<0?f=Math.PI+f:(f=Math.PI-f,p=-1,m=!0):f>0&&(p=-1,m=!0);let h=f/2,g,_=Math.abs(Math.cos(h)*c/Math.sin(h));_>Math.min(u.len/2,d.len/2)?(_=Math.min(u.len/2,d.len/2),g=Math.abs(_*Math.sin(h)/Math.cos(h))):g=c;let v=s.x+d.nx*_+-d.ny*g*p,y=s.y+d.ny*_+d.nx*g*p,b=Math.atan2(u.ny,u.nx)+Math.PI/2*p,x=Math.atan2(d.ny,d.nx)-Math.PI/2*p;o===0&&e.moveTo(v+Math.cos(b)*g,y+Math.sin(b)*g),e.arc(v,y,g,b,x,m),a=s}}function Pye(e,t,n,r){let i=(e,t)=>Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),a=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),o=t.length;for(let s=0;s<o;s++){let c=t[(s+1)%o],l=c.radius??n;if(l<=0){s===0?e.moveTo(c.x,c.y):e.lineTo(c.x,c.y);continue}let u=t[s],d=t[(s+2)%o],f=i(u,c),p;p=f<1e-4?c:a(c,u,Math.min(f/2,l)/f);let m=i(d,c),h;h=m<1e-4?c:a(c,d,Math.min(m/2,l)/m),s===0?e.moveTo(p.x,p.y):e.lineTo(p.x,p.y),e.quadraticCurveTo(c.x,c.y,h.x,h.y,r)}}var Fye=new yt,Iye=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new pt,this._graphicsPath2D=e,this.signed=e.checkForHoles}moveTo(e,t){return this.startPoly(e,t),this}lineTo(e,t){this._ensurePoly();let n=this._currentPoly.points,r=n[n.length-2],i=n[n.length-1];return(r!==e||i!==t)&&n.push(e,t),this}arc(e,t,n,r,i,a){this._ensurePoly(!1);let o=this._currentPoly.points;return wQ(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return kye(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return Mye(s,this._currentPoly.lastX,this._currentPoly.lastY,a,o,e,t,n,r,i),this}bezierCurveTo(e,t,n,r,i,a,o){this._ensurePoly();let s=this._currentPoly;return bQ(this._currentPoly.points,s.lastX,s.lastY,e,t,n,r,i,a,o),this}quadraticCurveTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly;return Dye(this._currentPoly.points,a.lastX,a.lastY,e,t,n,r,i),this}closePath(){return this.endPoly(!0),this}addPath(e,t){this.endPoly(),t&&!t.isIdentity()&&(e=e.clone(!0),e.transform(t));let n=this.shapePrimitives,r=n.length;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}if(e.checkForHoles&&n.length-r>1){let e=null;for(let t=r;t<n.length;t++){let r=n[t];if(r.shape.type===`polygon`){let i=r.shape,a=e?.shape;a&&a.containsPolygon(i)?(e.holes||=[],e.holes.push(r),n.copyWithin(t,t+1),n.length--,t--):e=r}}}return this}finish(e=!1){this.endPoly(e)}rect(e,t,n,r,i){return this.drawShape(new yt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new qve(e,t,n),r),this}poly(e,t,n){let r=new YZ(e);return r.closePath=t,this.drawShape(r,n),this}regularPoly(e,t,n,r,i=0,a){r=Math.max(r|0,3);let o=-1*Math.PI/2+i,s=Math.PI*2/r,c=[];for(let i=0;i<r;i++){let r=o-i*s;c.push(e+n*Math.cos(r),t+n*Math.sin(r))}return this.poly(c,!0,a),this}roundPoly(e,t,n,r,i,a=0,o){if(r=Math.max(r|0,3),i<=0)return this.regularPoly(e,t,n,r,a);let s=n*Math.sin(Math.PI/r)-.001;i=Math.min(i,s);let c=-1*Math.PI/2+a,l=Math.PI*2/r,u=(r-2)*Math.PI/r/2;for(let a=0;a<r;a++){let r=a*l+c,s=e+n*Math.cos(r),d=t+n*Math.sin(r),f=r+Math.PI+u,p=r-Math.PI-u,m=s+i*Math.cos(f),h=d+i*Math.sin(f),g=s+i*Math.cos(p),_=d+i*Math.sin(p);a===0?this.moveTo(m,h):this.lineTo(m,h),this.quadraticCurveTo(s,d,g,_,o)}return this.closePath()}roundShape(e,t,n=!1,r){return e.length<3?this:(n?Pye(this,e,t,r):Nye(this,e,t),this.closePath())}filletRect(e,t,n,r,i){if(i===0)return this.rect(e,t,n,r);let a=Math.min(n,r)/2,o=Math.min(a,Math.max(-a,i)),s=e+n,c=t+r,l=o<0?-o:0,u=Math.abs(o);return this.moveTo(e,t+u).arcTo(e+l,t+l,e+u,t,u).lineTo(s-u,t).arcTo(s-l,t+l,s,t+u,u).lineTo(s,c-u).arcTo(s-l,c-l,e+n-u,c,u).lineTo(e+u,c).arcTo(e+l,c-l,e,c-u,u).closePath()}chamferRect(e,t,n,r,i,a){if(i<=0)return this.rect(e,t,n,r);let o=Math.min(i,Math.min(n,r)/2),s=e+n,c=t+r,l=[e+o,t,s-o,t,s,t+o,s,c-o,s-o,c,e+o,c,e,c-o,e,t+o];for(let e=l.length-1;e>=2;e-=2)l[e]===l[e-2]&&l[e-1]===l[e-3]&&l.splice(e-1,2);return this.poly(l,!0,a)}ellipse(e,t,n,r,i){return this.drawShape(new Jve(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Qve(e,t,n,r,i),a),this}drawShape(e,t){return this.endPoly(),this.shapePrimitives.push({shape:e,transform:t}),this}startPoly(e,t){let n=this._currentPoly;return n&&this.endPoly(),n=new YZ,n.points.push(e,t),this._currentPoly=n,this}endPoly(e=!1){let t=this._currentPoly;return t&&t.points.length>2&&(t.closePath=e,this.shapePrimitives.push({shape:t})),this._currentPoly=null,this}_ensurePoly(e=!0){if(!this._currentPoly&&(this._currentPoly=new YZ,e)){let e=this.shapePrimitives[this.shapePrimitives.length-1];if(e){let t=e.shape.x,n=e.shape.y;if(e.transform&&!e.transform.isIdentity()){let r=e.transform,i=t;t=r.a*t+r.c*n+r.tx,n=r.b*i+r.d*n+r.ty}this._currentPoly.points.push(t,n)}else this._currentPoly.points.push(0,0)}}buildPath(){let e=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let t=0;t<e.instructions.length;t++){let n=e.instructions[t];this[n.action](...n.data)}this.finish()}get bounds(){let e=this._bounds;e.clear();let t=this.shapePrimitives;for(let n=0;n<t.length;n++){let r=t[n],i=r.shape.getBounds(Fye);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},kQ=class e{constructor(e,t=!1){this.instructions=[],this.uid=_t(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?Kve(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new Iye(this),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(e,t){return e=e.clone(),this.instructions.push({action:`addPath`,data:[e,t]}),this._dirty=!0,this}arc(...e){return this.instructions.push({action:`arc`,data:e}),this._dirty=!0,this}arcTo(...e){return this.instructions.push({action:`arcTo`,data:e}),this._dirty=!0,this}arcToSvg(...e){return this.instructions.push({action:`arcToSvg`,data:e}),this._dirty=!0,this}bezierCurveTo(...e){return this.instructions.push({action:`bezierCurveTo`,data:e}),this._dirty=!0,this}bezierCurveToShort(e,t,n,r,i){let a=this.instructions[this.instructions.length-1],o=this.getLastPoint(Tt.shared),s=0,c=0;if(!a||a.action!==`bezierCurveTo`)s=o.x,c=o.y;else{s=a.data[2],c=a.data[3];let e=o.x,t=o.y;s=e+(e-s),c=t+(t-c)}return this.instructions.push({action:`bezierCurveTo`,data:[s,c,e,t,n,r,i]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:`closePath`,data:[]}),this._dirty=!0,this}ellipse(...e){return this.instructions.push({action:`ellipse`,data:e}),this._dirty=!0,this}lineTo(...e){return this.instructions.push({action:`lineTo`,data:e}),this._dirty=!0,this}moveTo(...e){return this.instructions.push({action:`moveTo`,data:e}),this}quadraticCurveTo(...e){return this.instructions.push({action:`quadraticCurveTo`,data:e}),this._dirty=!0,this}quadraticCurveToShort(e,t,n){let r=this.instructions[this.instructions.length-1],i=this.getLastPoint(Tt.shared),a=0,o=0;if(!r||r.action!==`quadraticCurveTo`)a=i.x,o=i.y;else{a=r.data[0],o=r.data[1];let e=i.x,t=i.y;a=e+(e-a),o=t+(t-o)}return this.instructions.push({action:`quadraticCurveTo`,data:[a,o,e,t,n]}),this._dirty=!0,this}rect(e,t,n,r,i){return this.instructions.push({action:`rect`,data:[e,t,n,r,i]}),this._dirty=!0,this}circle(e,t,n,r){return this.instructions.push({action:`circle`,data:[e,t,n,r]}),this._dirty=!0,this}roundRect(...e){return this.instructions.push({action:`roundRect`,data:e}),this._dirty=!0,this}poly(...e){return this.instructions.push({action:`poly`,data:e}),this._dirty=!0,this}regularPoly(...e){return this.instructions.push({action:`regularPoly`,data:e}),this._dirty=!0,this}roundPoly(...e){return this.instructions.push({action:`roundPoly`,data:e}),this._dirty=!0,this}roundShape(...e){return this.instructions.push({action:`roundShape`,data:e}),this._dirty=!0,this}filletRect(...e){return this.instructions.push({action:`filletRect`,data:e}),this._dirty=!0,this}chamferRect(...e){return this.instructions.push({action:`chamferRect`,data:e}),this._dirty=!0,this}star(e,t,n,r,i,a,o){i||=r/2;let s=-1*Math.PI/2+a,c=n*2,l=Math.PI*2/c,u=[];for(let n=0;n<c;n++){let a=n%2?i:r,o=n*l+s;u.push(e+a*Math.cos(o),t+a*Math.sin(o))}return this.poly(u,!0,o),this}clone(t=!1){let n=new e;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let e=0;e<this.instructions.length;e++){let t=this.instructions[e];n.instructions.push({action:t.action,data:t.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(e){if(e.isIdentity())return this;let t=e.a,n=e.b,r=e.c,i=e.d,a=e.tx,o=e.ty,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;for(let h=0;h<this.instructions.length;h++){let g=this.instructions[h],_=g.data;switch(g.action){case`moveTo`:case`lineTo`:s=_[0],c=_[1],_[0]=t*s+r*c+a,_[1]=n*s+i*c+o;break;case`bezierCurveTo`:l=_[0],u=_[1],d=_[2],f=_[3],s=_[4],c=_[5],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*d+r*f+a,_[3]=n*d+i*f+o,_[4]=t*s+r*c+a,_[5]=n*s+i*c+o;break;case`quadraticCurveTo`:l=_[0],u=_[1],s=_[2],c=_[3],_[0]=t*l+r*u+a,_[1]=n*l+i*u+o,_[2]=t*s+r*c+a,_[3]=n*s+i*c+o;break;case`arcToSvg`:s=_[5],c=_[6],p=_[0],m=_[1],_[0]=t*p+r*m,_[1]=n*p+i*m,_[5]=t*s+r*c+a,_[6]=n*s+i*c+o;break;case`circle`:_[4]=AQ(_[3],e);break;case`rect`:_[4]=AQ(_[4],e);break;case`ellipse`:_[8]=AQ(_[8],e);break;case`roundRect`:_[5]=AQ(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=AQ(_[2],e);break;default:at(`unknown transform action`,g.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(e){let t=this.instructions.length-1,n=this.instructions[t];if(!n)return e.x=0,e.y=0,e;for(;n.action===`closePath`;){if(t--,t<0)return e.x=0,e.y=0,e;n=this.instructions[t]}switch(n.action){case`moveTo`:case`lineTo`:e.x=n.data[0],e.y=n.data[1];break;case`quadraticCurveTo`:e.x=n.data[2],e.y=n.data[3];break;case`bezierCurveTo`:e.x=n.data[4],e.y=n.data[5];break;case`arc`:case`arcToSvg`:e.x=n.data[5],e.y=n.data[6];break;case`addPath`:n.data[0].getLastPoint(e);break}return e}};function AQ(e,t){return e?e.prepend(t):t.clone()}function jQ(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function Lye(e,t){let n=e.querySelectorAll(`defs`);for(let e=0;e<n.length;e++){let r=n[e];for(let e=0;e<r.children.length;e++){let n=r.children[e];switch(n.nodeName.toLowerCase()){case`lineargradient`:t.defs[n.id]=Rye(n);break;case`radialgradient`:t.defs[n.id]=zye(n);break;default:break}}}}function Rye(e){let t=new cQ(jQ(e,`x1`,0),jQ(e,`y1`,0),jQ(e,`x2`,1),jQ(e,`y2`,0),(e.getAttribute(`gradientUnits`)||`objectBoundingBox`)===`objectBoundingBox`?`local`:`global`);for(let n=0;n<e.children.length;n++){let r=e.children[n],i=jQ(r,`offset`,0),a=ct.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function zye(e){return at(`[SVG Parser] Radial gradients are not yet supported`),new cQ(0,0,1,0)}function MQ(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var NQ={fill:{type:`paint`,default:0},"fill-opacity":{type:`number`,default:1},stroke:{type:`paint`,default:0},"stroke-width":{type:`number`,default:1},"stroke-opacity":{type:`number`,default:1},"stroke-linecap":{type:`string`,default:`butt`},"stroke-linejoin":{type:`string`,default:`miter`},"stroke-miterlimit":{type:`number`,default:10},"stroke-dasharray":{type:`string`,default:`none`},"stroke-dashoffset":{type:`number`,default:0},opacity:{type:`number`,default:1}};function PQ(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in NQ){let r=e.getAttribute(n);r&&FQ(t,a,n,r.trim())}if(n){let e=n.split(`;`);for(let n=0;n<e.length;n++){let[r,i]=e[n].trim().split(`:`);NQ[r]&&FQ(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function FQ(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=MQ(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=ct.shared.setValue(r).toNumber();t.useStroke=!0}break;case`stroke-width`:t.strokeStyle.width=Number(r);break;case`fill`:if(r!==`none`){if(r.startsWith(`url(`)){let n=MQ(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=ct.shared.setValue(r).toNumber();t.useFill=!0}break;case`fill-opacity`:t.fillStyle.alpha=Number(r);break;case`stroke-opacity`:t.strokeStyle.alpha=Number(r);break;case`opacity`:t.fillStyle.alpha=Number(r),t.strokeStyle.alpha=Number(r);break}}function Bye(e){if(e.length<=2)return!0;let t=e.map(e=>e.area).sort((e,t)=>t-e),[n,r]=t,i=t[t.length-1],a=n/r,o=r/i;return!(a>3&&o<2)}function Vye(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function Hye(e){let t=e.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;let n=t.map(Number),r=[],i=[];for(let e=0;e<n.length;e+=2)e+1<n.length&&(r.push(n[e]),i.push(n[e+1]));if(r.length===0||i.length===0)return 0;let a=Math.min(...r),o=Math.max(...r),s=Math.min(...i),c=Math.max(...i);return(o-a)*(c-s)}function IQ(e,t){let n=new kQ(e,!1);for(let e of n.instructions)t.instructions.push(e)}function Uye(e,t){if(typeof e==`string`){let t=document.createElement(`div`);t.innerHTML=e.trim(),e=t.querySelector(`svg`)}let n={context:t,defs:{},path:new kQ};Lye(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=PQ(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&LQ(t,n,i,a)}return t}function LQ(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=PQ(e,t);a&&n?n={...n,...a}:a&&(n=a),o&&r?r={...r,...o}:o&&(r=o);let s=!n&&!r;s&&(n={color:0});let c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w;switch(e.nodeName.toLowerCase()){case`path`:{x=e.getAttribute(`d`);let i=e.getAttribute(`fill-rule`),a=Vye(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:Hye(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!Bye(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new kQ(void 0,!0);IQ(a.path,s),t.context.path(s),o?(n&&t.context.fill(n),r&&t.context.stroke(r)):t.context.cut()}else for(let i=0;i<e.length;i++){let a=e[i],o=i%2==1;t.context.beginPath();let s=new kQ(void 0,!0);IQ(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new kQ(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=jQ(e,`cx`,0),h=jQ(e,`cy`,0),g=jQ(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=jQ(e,`x`,0),l=jQ(e,`y`,0),C=jQ(e,`width`,0),w=jQ(e,`height`,0),_=jQ(e,`rx`,0),v=jQ(e,`ry`,0),_||v?t.context.roundRect(c,l,C,w,_||v):t.context.rect(c,l,C,w),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`ellipse`:m=jQ(e,`cx`,0),h=jQ(e,`cy`,0),_=jQ(e,`rx`,0),v=jQ(e,`ry`,0),t.context.beginPath(),t.context.ellipse(m,h,_,v),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`line`:u=jQ(e,`x1`,0),d=jQ(e,`y1`,0),f=jQ(e,`x2`,0),p=jQ(e,`y2`,0),t.context.beginPath(),t.context.moveTo(u,d),t.context.lineTo(f,p),r&&t.context.stroke(r);break;case`polygon`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!0),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`polyline`:b=e.getAttribute(`points`),y=b.match(/-?\d+/g).map(e=>parseInt(e,10)),t.context.poly(y,!1),r&&t.context.stroke(r);break;case`g`:case`svg`:break;default:at(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)LQ(i[e],t,n,r)}var RQ={repeat:{addressModeU:`repeat`,addressModeV:`repeat`},"repeat-x":{addressModeU:`repeat`,addressModeV:`clamp-to-edge`},"repeat-y":{addressModeU:`clamp-to-edge`,addressModeV:`repeat`},"no-repeat":{addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}},zQ=class{constructor(e,t){this.uid=_t(`fillPattern`),this._tick=0,this.transform=new Ze,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=RQ[t].addressModeU,e.source.style.addressModeV=RQ[t].addressModeV)}setTransform(e){let t=this.texture;this.transform.copyFrom(e),this.transform.invert(),this.transform.scale(1/t.frame.width,1/t.frame.height),this._tick++}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture=e,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}};function Wye(e){return ct.isColorLike(e)}function BQ(e){return e instanceof zQ}function VQ(e){return e instanceof cQ}function Gye(e){return e instanceof $e}function Kye(e,t,n){let r=ct.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=$e.WHITE,{...n,...e}}function qye(e,t,n){return e.texture=t,{...n,...e}}function HQ(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function UQ(e,t,n){return t.buildGradient(),e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,e.textureSpace=t.textureSpace,{...n,...e}}function Jye(e,t){let n={...t,...e},r=ct.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function WQ(e,t){if(e==null)return null;let n={},r=e;return Wye(e)?Kye(n,e,t):Gye(e)?qye(n,e,t):BQ(e)?HQ(n,e,t):VQ(e)?UQ(n,e,t):r.fill&&BQ(r.fill)?HQ(r,r.fill,t):r.fill&&VQ(r.fill)?UQ(r,r.fill,t):Jye(r,t)}function GQ(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=WQ(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var Yye=new Tt,KQ=new Ze,qQ=class e extends Ht{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=_t(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new kQ,this._transform=new Ze,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new pt,this._boundsDirty=!0}clone(){let t=new e;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=WQ(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=GQ(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=WQ(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=WQ(t,e.defaultStrokeStyle),this}texture(e,t,n,r,i,a){return this.instructions.push({action:`texture`,data:{image:e,dx:n||0,dy:r||0,dw:i||e.frame.width,dh:a||e.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:t||t===0?ct.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new kQ,this}fill(t,n){let r,i=this.instructions[this.instructions.length-1];return r=this._tick===0&&i?.action===`stroke`?i.data.path:this._activePath.clone(),r?(t!=null&&(n!==void 0&&typeof t==`number`&&(Rt(ot,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=WQ(t,e.defaultFillStyle)),this.instructions.push({action:`fill`,data:{style:this.fillStyle,path:r}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){let{x:e,y:t}=this._activePath.getLastPoint(Tt.shared);this._activePath.clear(),this._activePath.moveTo(e,t)}stroke(t){let n,r=this.instructions[this.instructions.length-1];return n=this._tick===0&&r?.action===`fill`?r.data.path:this._activePath.clone(),n?(t!=null&&(this._strokeStyle=GQ(t,e.defaultStrokeStyle)),this.instructions.push({action:`stroke`,data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let e=0;e<2;e++){let t=this.instructions[this.instructions.length-1-e],n=this._activePath.clone();if(t&&(t.action===`stroke`||t.action===`fill`))if(t.data.hole)t.data.hole.addPath(n);else{t.data.hole=n;break}}return this._initNextPathLocation(),this}arc(e,t,n,r,i,a){this._tick++;let o=this._transform;return this._activePath.arc(o.a*e+o.c*t+o.tx,o.b*e+o.d*t+o.ty,n,r,i,a),this}arcTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.arcTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}arcToSvg(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.arcToSvg(e,t,n,r,i,s.a*a+s.c*o+s.tx,s.b*a+s.d*o+s.ty),this}bezierCurveTo(e,t,n,r,i,a,o){this._tick++;let s=this._transform;return this._activePath.bezierCurveTo(s.a*e+s.c*t+s.tx,s.b*e+s.d*t+s.ty,s.a*n+s.c*r+s.tx,s.b*n+s.d*r+s.ty,s.a*i+s.c*a+s.tx,s.b*i+s.d*a+s.ty,o),this}closePath(){return this._tick++,this._activePath?.closePath(),this}ellipse(e,t,n,r){return this._tick++,this._activePath.ellipse(e,t,n,r,this._transform.clone()),this}circle(e,t,n){return this._tick++,this._activePath.circle(e,t,n,this._transform.clone()),this}path(e){return this._tick++,this._activePath.addPath(e,this._transform.clone()),this}lineTo(e,t){this._tick++;let n=this._transform;return this._activePath.lineTo(n.a*e+n.c*t+n.tx,n.b*e+n.d*t+n.ty),this}moveTo(e,t){this._tick++;let n=this._transform,r=this._activePath.instructions,i=n.a*e+n.c*t+n.tx,a=n.b*e+n.d*t+n.ty;return r.length===1&&r[0].action===`moveTo`?(r[0].data[0]=i,r[0].data[1]=a,this):(this._activePath.moveTo(i,a),this)}quadraticCurveTo(e,t,n,r,i){this._tick++;let a=this._transform;return this._activePath.quadraticCurveTo(a.a*e+a.c*t+a.tx,a.b*e+a.d*t+a.ty,a.a*n+a.c*r+a.tx,a.b*n+a.d*r+a.ty,i),this}rect(e,t,n,r){return this._tick++,this._activePath.rect(e,t,n,r,this._transform.clone()),this}roundRect(e,t,n,r,i){return this._tick++,this._activePath.roundRect(e,t,n,r,i,this._transform.clone()),this}poly(e,t){return this._tick++,this._activePath.poly(e,t,this._transform.clone()),this}regularPoly(e,t,n,r,i=0,a){return this._tick++,this._activePath.regularPoly(e,t,n,r,i,a),this}roundPoly(e,t,n,r,i,a){return this._tick++,this._activePath.roundPoly(e,t,n,r,i,a),this}roundShape(e,t,n,r){return this._tick++,this._activePath.roundShape(e,t,n,r),this}filletRect(e,t,n,r,i){return this._tick++,this._activePath.filletRect(e,t,n,r,i),this}chamferRect(e,t,n,r,i,a){return this._tick++,this._activePath.chamferRect(e,t,n,r,i,a),this}star(e,t,n,r,i=0,a=0){return this._tick++,this._activePath.star(e,t,n,r,i,a,this._transform.clone()),this}svg(e){return this._tick++,Uye(e,this),this}restore(){let e=this._stateStack.pop();return e&&(this._transform=e.transform,this._fillStyle=e.fillStyle,this._strokeStyle=e.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(e){return this._transform.rotate(e),this}scale(e,t=e){return this._transform.scale(e,t),this}setTransform(e,t,n,r,i,a){return e instanceof Ze?(this._transform.set(e.a,e.b,e.c,e.d,e.tx,e.ty),this):(this._transform.set(e,t,n,r,i,a),this)}transform(e,t,n,r,i,a){return e instanceof Ze?(this._transform.append(e),this):(KQ.set(e,t,n,r,i,a),this._transform.append(KQ),this)}translate(e,t=e){return this._transform.translate(e,t),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,!this.dirty&&(this.emit(`update`,this,16),this.dirty=!0)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;let e=this._bounds;e.clear();for(let t=0;t<this.instructions.length;t++){let n=this.instructions[t],r=n.action;if(r===`fill`){let t=n.data;e.addBounds(t.path.bounds)}else if(r===`texture`){let t=n.data;e.addFrame(t.dx,t.dy,t.dx+t.dw,t.dy+t.dh,t.transform)}if(r===`stroke`){let t=n.data,r=t.style.alignment,i=t.style.width*(1-r),a=t.path.bounds;e.addFrame(a.minX-i,a.minY-i,a.maxX+i,a.maxY+i)}}return e}containsPoint(e){if(!this.bounds.containsPoint(e.x,e.y))return!1;let t=this.instructions,n=!1;for(let r=0;r<t.length;r++){let i=t[r],a=i.data,o=a.path;if(!i.action||!o)continue;let s=a.style,c=o.shapePath.shapePrimitives;for(let t=0;t<c.length;t++){let r=c[t].shape;if(!s||!r)continue;let o=c[t].transform,l=o?o.applyInverse(e,Yye):e;if(i.action===`fill`)n=r.contains(l.x,l.y);else{let e=s;n=r.strokeContains(l.x,l.y,e.width,e.alignment)}let u=a.hole;if(u){let e=u.shapePath?.shapePrimitives;if(e)for(let t=0;t<e.length;t++)e[t].shape.contains(l.x,l.y)&&(n=!1)}if(n)return!0}}return n}unload(){this.emit(`unload`,this);for(let e in this._gpuData)this._gpuData[e]?.destroy();this._gpuData=Object.create(null)}destroy(e=!1){if(!this.destroyed){if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit(`destroy`,this),this.removeAllListeners(),typeof e==`boolean`?e:e?.texture){let t=typeof e==`boolean`?e:e?.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&`uid`in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(t)),this._strokeStyle.texture&&(this._strokeStyle.fill&&`uid`in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(t))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}}};qQ.defaultFillStyle={color:16777215,alpha:1,texture:$e.WHITE,matrix:null,fill:null,textureSpace:`local`},qQ.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:$e.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var JQ=qQ,YQ=new class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(Ot.system.add(this._tickerUpdate,this,Dt.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(Ot.system.remove(this._tickerUpdate,this),!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType===`touch`||globalThis.document.dispatchEvent(this.events.supportsPointerEvents?new PointerEvent(`pointermove`,{clientX:e.clientX,clientY:e.clientY,pointerType:e.pointerType,pointerId:e.pointerId}):new MouseEvent(`mousemove`,{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}destroy(){this.removeTickerListener(),this.events=null,this.domElement=null,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}},XQ=class extends bZ{constructor(){super(...arguments),this.client=new Tt,this.movement=new Tt,this.offset=new Tt,this.global=new Tt,this.screen=new Tt}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,n){return e.worldTransform.applyInverse(n||this.global,t)}getModifierState(e){return`getModifierState`in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m){throw Error(`Method not implemented.`)}},ZQ=class extends XQ{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type===`pointermove`||this.type===`mousemove`||this.type===`touchmove`?[this]:[]}getPredictedEvents(){throw Error(`getPredictedEvents is not supported!`)}},QQ=class extends XQ{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};QQ.DOM_DELTA_PIXEL=0,QQ.DOM_DELTA_LINE=1,QQ.DOM_DELTA_PAGE=2;var Xye=2048,Zye=new Tt,$Q=new Tt,Qye=class{constructor(e){this.dispatch=new Ht,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping(`pointerdown`,this.mapPointerDown),this.addEventMapping(`pointermove`,this.mapPointerMove),this.addEventMapping(`pointerout`,this.mapPointerOut),this.addEventMapping(`pointerleave`,this.mapPointerOut),this.addEventMapping(`pointerover`,this.mapPointerOver),this.addEventMapping(`pointerup`,this.mapPointerUp),this.addEventMapping(`pointerupoutside`,this.mapPointerUpOutside),this.addEventMapping(`wheel`,this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((e,t)=>e.priority-t.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let n=0,r=t.length;n<r;n++)t[n].fn(e);else at(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){YQ.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,Zye.set(e,t),this.hitTestFn,this.hitPruneFn);return r&&r[0]}propagate(e,t){if(!e.target)return;let n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let r=0,i=n.length-1;r<i;r++)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let r=n.length-2;r>=0;r--)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,n=this._allInteractiveElements){if(n.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let r=Array.isArray(t)?t:[t];for(let t=n.length-1;t>=0;t--)r.forEach(r=>{e.currentTarget=n[t],this.notifyTarget(e,r)})}propagationPath(e){let t=[e];for(let n=0;n<Xye&&e!==this.rootTarget&&e.parent;n++){if(!e.parent)throw Error(`Cannot find propagation path to disconnected target`);t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,n,r,i,a=!1){let o=!1;if(this._interactivePrune(e))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(YQ.pauseUpdate=!1),e.interactiveChildren&&e.children){let s=e.children;for(let c=s.length-1;c>=0;c--){let l=s[c],u=this.hitTestMoveRecursive(l,this._isInteractive(t)?t:l.eventMode,n,r,i,a||i(e,n));if(u){if(u.length>0&&!u[u.length-1].parent)continue;let t=e.isInteractive();(u.length>0||t)&&(t&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),o=!0}}}let s=this._isInteractive(t),c=e.isInteractive();return c&&c&&this._allInteractiveElements.push(e),a||this._hitElements.length>0?null:o?this._hitElements:s&&!i(e,n)&&r(e,n)?c?[e]:[]:null}hitTestRecursive(e,t,n,r,i){if(this._interactivePrune(e)||i(e,n))return null;if((e.eventMode===`dynamic`||t===`dynamic`)&&(YQ.pauseUpdate=!1),e.interactiveChildren&&e.children){let a=e.children,o=n;for(let n=a.length-1;n>=0;n--){let s=a[n],c=this.hitTestRecursive(s,this._isInteractive(t)?t:s.eventMode,o,r,i);if(c){if(c.length>0&&!c[c.length-1].parent)continue;let t=e.isInteractive();return(c.length>0||t)&&c.push(e),c}}}let a=this._isInteractive(t),o=e.isInteractive();return a&&r(e,n)?o?[e]:[]:null}_isInteractive(e){return e===`static`||e===`dynamic`}_interactivePrune(e){return!e||!e.visible||!e.renderable||!e.measurable||e.eventMode===`none`||e.eventMode===`passive`&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,$Q),!e.hitArea.contains($Q.x,$Q.y)))return!0;if(e.effects&&e.effects.length)for(let n=0;n<e.effects.length;n++){let r=e.effects[n];if(r.containsPoint&&!r.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,$Q),e.containsPoint($Q)):!1}notifyTarget(e,t){if(!e.currentTarget.isInteractive())return;t??=e.type;let n=`on${t}`;e.currentTarget[n]?.(e);let r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,`pointerdown`),t.pointerType===`touch`)this.dispatchEvent(t,`touchstart`);else if(t.pointerType===`mouse`||t.pointerType===`pen`){let e=t.button===2;this.dispatchEvent(t,e?`rightdown`:`mousedown`)}let n=this.trackingData(e.pointerId);n.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let n=t.pointerType===`mouse`||t.pointerType===`pen`,r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.overTargets);if(r.overTargets?.length>0&&i!==t.target){let r=e.type===`mousemove`?`mouseout`:`pointerout`,a=this.createPointerEvent(e,r,i);if(this.dispatchEvent(a,`pointerout`),n&&this.dispatchEvent(a,`mouseout`),!t.composedPath().includes(i)){let r=this.createPointerEvent(e,`pointerleave`,i);for(r.eventPhase=r.AT_TARGET;r.target&&!t.composedPath().includes(r.target);)r.currentTarget=r.target,this.notifyTarget(r),n&&this.notifyTarget(r,`mouseleave`),r.target=r.target.parent;this.freeEvent(r)}this.freeEvent(a)}if(i!==t.target){let r=e.type===`mousemove`?`mouseover`:`pointerover`,a=this.clonePointerEvent(t,r);this.dispatchEvent(a,`pointerover`),n&&this.dispatchEvent(a,`mouseover`);let o=i?.parent;for(;o&&o!==this.rootTarget.parent&&o!==t.target;)o=o.parent;if(!o||o===this.rootTarget.parent){let e=this.clonePointerEvent(t,`pointerenter`);for(e.eventPhase=e.AT_TARGET;e.target&&e.target!==i&&e.target!==this.rootTarget.parent;)e.currentTarget=e.target,this.notifyTarget(e),n&&this.notifyTarget(e,`mouseenter`),e.target=e.target.parent;this.freeEvent(e)}this.freeEvent(a)}let a=[],o=this.enableGlobalMoveEvents??!0;this.moveOnAll?a.push(`pointermove`):this.dispatchEvent(t,`pointermove`),o&&a.push(`globalpointermove`),t.pointerType===`touch`&&(this.moveOnAll?a.splice(1,0,`touchmove`):this.dispatchEvent(t,`touchmove`),o&&a.push(`globaltouchmove`)),n&&(this.moveOnAll?a.splice(1,0,`mousemove`):this.dispatchEvent(t,`mousemove`),o&&a.push(`globalmousemove`),this.cursor=t.target?.cursor),a.length>0&&this.all(t,a),this._allInteractiveElements.length=0,this._hitElements.length=0,r.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.createPointerEvent(e),r=n.pointerType===`mouse`||n.pointerType===`pen`;this.dispatchEvent(n,`pointerover`),r&&this.dispatchEvent(n,`mouseover`),n.pointerType===`mouse`&&(this.cursor=n.target?.cursor);let i=this.clonePointerEvent(n,`pointerenter`);for(i.eventPhase=i.AT_TARGET;i.target&&i.target!==this.rootTarget.parent;)i.currentTarget=i.target,this.notifyTarget(i),r&&this.notifyTarget(i,`mouseenter`),i.target=i.target.parent;t.overTargets=n.composedPath(),this.freeEvent(n),this.freeEvent(i)}mapPointerOut(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId);if(t.overTargets){let n=e.pointerType===`mouse`||e.pointerType===`pen`,r=this.findMountedTarget(t.overTargets),i=this.createPointerEvent(e,`pointerout`,r);this.dispatchEvent(i),n&&this.dispatchEvent(i,`mouseout`);let a=this.createPointerEvent(e,`pointerleave`,r);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==this.rootTarget.parent;)a.currentTarget=a.target,this.notifyTarget(a),n&&this.notifyTarget(a,`mouseleave`),a.target=a.target.parent;t.overTargets=null,this.freeEvent(i),this.freeEvent(a)}this.cursor=null}mapPointerUp(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=performance.now(),n=this.createPointerEvent(e);if(this.dispatchEvent(n,`pointerup`),n.pointerType===`touch`)this.dispatchEvent(n,`touchend`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.dispatchEvent(n,e?`rightup`:`mouseup`)}let r=this.trackingData(e.pointerId),i=this.findMountedTarget(r.pressTargetsByButton[e.button]),a=i;if(i&&!n.composedPath().includes(i)){let t=i;for(;t&&!n.composedPath().includes(t);){if(n.currentTarget=t,this.notifyTarget(n,`pointerupoutside`),n.pointerType===`touch`)this.notifyTarget(n,`touchendoutside`);else if(n.pointerType===`mouse`||n.pointerType===`pen`){let e=n.button===2;this.notifyTarget(n,e?`rightupoutside`:`mouseupoutside`)}t=t.parent}delete r.pressTargetsByButton[e.button],a=t}if(a){let i=this.clonePointerEvent(n,`click`);i.target=a,i.path=null,r.clicksByButton[e.button]||(r.clicksByButton[e.button]={clickCount:0,target:i.target,timeStamp:t});let o=r.clicksByButton[e.button];if(o.target===i.target&&t-o.timeStamp<200?++o.clickCount:o.clickCount=1,o.target=i.target,o.timeStamp=t,i.detail=o.clickCount,i.pointerType===`mouse`){let e=i.button===2;this.dispatchEvent(i,e?`rightclick`:`click`)}else i.pointerType===`touch`&&this.dispatchEvent(i,`tap`);this.dispatchEvent(i,`pointertap`),this.freeEvent(i)}this.freeEvent(n)}mapPointerUpOutside(e){if(!(e instanceof ZQ)){at(`EventBoundary cannot map a non-pointer event as a pointer event`);return}let t=this.trackingData(e.pointerId),n=this.findMountedTarget(t.pressTargetsByButton[e.button]),r=this.createPointerEvent(e);if(n){let i=n;for(;i;)r.currentTarget=i,this.notifyTarget(r,`pointerupoutside`),r.pointerType===`touch`?this.notifyTarget(r,`touchendoutside`):(r.pointerType===`mouse`||r.pointerType===`pen`)&&this.notifyTarget(r,r.button===2?`rightupoutside`:`mouseupoutside`),i=i.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(r)}mapWheel(e){if(!(e instanceof QQ)){at(`EventBoundary cannot map a non-wheel event as a wheel event`);return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let n=1;n<e.length&&e[n].parent===t;n++)t=e[n];return t}createPointerEvent(e,t,n){let r=this.allocateEvent(ZQ);return this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e,r.target=n??this.hitTest(r.global.x,r.global.y)??this._hitElements[0],typeof t==`string`&&(r.type=t),r}createWheelEvent(e){let t=this.allocateEvent(QQ);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let n=this.allocateEvent(ZQ);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=t??n.type,n}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof ZQ&&t instanceof ZQ&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof XQ&&t instanceof XQ&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.defaultPrevented=!1,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw Error(`It is illegal to free an event not managed by this EventBoundary!`);let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){let n=e.currentTarget._events[t];if(n)if(`fn`in n)n.once&&e.currentTarget.removeListener(t,n.fn,void 0,!0),n.fn.call(n.context,e);else for(let r=0,i=n.length;r<i&&!e.propagationImmediatelyStopped;r++)n[r].once&&e.currentTarget.removeListener(t,n[r].fn,void 0,!0),n[r].fn.call(n[r].context,e)}},$ye=1,ebe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},e$=class e{constructor(t){this.supportsTouchEvents=`ontouchstart`in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=t,this.rootBoundary=new Qye(null),YQ.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new ZQ(null),this._rootWheelEvent=new QQ(null),this.cursorStyles={default:`inherit`,pointer:`pointer`},this.features=new Proxy({...e.defaultEventFeatures},{set:(e,t,n)=>(t===`globalMove`&&(this.rootBoundary.enableGlobalMoveEvents=n),e[t]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(t){let{canvas:n,resolution:r}=this.renderer;this.setTargetElement(n),this.resolution=r,e._defaultEventMode=t.eventMode??`passive`,Object.assign(this.features,t.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){YQ.destroy(),this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e||=`default`;let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;let n=this.cursorStyles[e];if(n)switch(typeof n){case`string`:t&&(this.domElement.style.cursor=n);break;case`function`:n(e);break;case`object`:t&&Object.assign(this.domElement.style,n);break}else t&&typeof e==`string`&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!(`cancelable`in e))&&e.preventDefault();for(let e=0,n=t.length;e<n;e++){let n=t[e],r=this._bootstrapEvent(this._rootPointerEvent,n);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,YQ.pointerMoved();let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);let n=t===this.domElement?``:`outside`,r=this._normalizeToPointerData(e);for(let e=0,t=r.length;e<t;e++){let t=this._bootstrapEvent(this._rootPointerEvent,r[e]);t.type+=n,this.rootBoundary.mapEvent(t)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=this._normalizeToPointerData(e);for(let e=0,n=t.length;e<n;e++){let n=this._bootstrapEvent(this._rootPointerEvent,t[e]);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;let t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,YQ.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;YQ.addTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=`none`,e.msTouchAction=`none`):this.supportsPointerEvents&&(e.touchAction=`none`)),this.supportsPointerEvents?(globalThis.document.addEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.addEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.addEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.addEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.addEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.addEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.addEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.addEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.addEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.addEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.addEventListener(`touchend`,this._onPointerUp,!0),this.domElement.addEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.addEventListener(`wheel`,this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;YQ.removeTickerListener();let e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming=``,e.msTouchAction=``):this.supportsPointerEvents&&(e.touchAction=``)),this.supportsPointerEvents?(globalThis.document.removeEventListener(`pointermove`,this._onPointerMove,!0),this.domElement.removeEventListener(`pointerdown`,this._onPointerDown,!0),this.domElement.removeEventListener(`pointerleave`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`pointerover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`pointerup`,this._onPointerUp,!0)):(globalThis.document.removeEventListener(`mousemove`,this._onPointerMove,!0),this.domElement.removeEventListener(`mousedown`,this._onPointerDown,!0),this.domElement.removeEventListener(`mouseout`,this._onPointerOverOut,!0),this.domElement.removeEventListener(`mouseover`,this._onPointerOverOut,!0),globalThis.removeEventListener(`mouseup`,this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener(`touchstart`,this._onPointerDown,!0),this.domElement.removeEventListener(`touchend`,this._onPointerUp,!0),this.domElement.removeEventListener(`touchmove`,this._onPointerMove,!0))),this.domElement.removeEventListener(`wheel`,this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,n){let r=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},i=1/this.resolution;e.x=(t-r.left)*(this.domElement.width/r.width)*i,e.y=(n-r.top)*(this.domElement.height/r.height)*i}_normalizeToPointerData(e){let t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let n=0,r=e.changedTouches.length;n<r;n++){let r=e.changedTouches[n];r.button===void 0&&(r.button=0),r.buttons===void 0&&(r.buttons=1),r.isPrimary===void 0&&(r.isPrimary=e.touches.length===1&&e.type===`touchstart`),r.width===void 0&&(r.width=r.radiusX||1),r.height===void 0&&(r.height=r.radiusY||1),r.tiltX===void 0&&(r.tiltX=0),r.tiltY===void 0&&(r.tiltY=0),r.pointerType===void 0&&(r.pointerType=`touch`),r.pointerId===void 0&&(r.pointerId=r.identifier||0),r.pressure===void 0&&(r.pressure=r.force||.5),r.twist===void 0&&(r.twist=0),r.tangentialPressure===void 0&&(r.tangentialPressure=0),r.layerX===void 0&&(r.layerX=r.offsetX=r.clientX),r.layerY===void 0&&(r.layerY=r.offsetY=r.clientY),r.isNormalized=!0,r.type=e.type,t.push(r)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){let n=e;n.isPrimary===void 0&&(n.isPrimary=!0),n.width===void 0&&(n.width=1),n.height===void 0&&(n.height=1),n.tiltX===void 0&&(n.tiltX=0),n.tiltY===void 0&&(n.tiltY=0),n.pointerType===void 0&&(n.pointerType=`mouse`),n.pointerId===void 0&&(n.pointerId=$ye),n.pressure===void 0&&(n.pressure=.5),n.twist===void 0&&(n.twist=0),n.tangentialPressure===void 0&&(n.tangentialPressure=0),n.isNormalized=!0,t.push(n)}else t.push(e);return t}normalizeWheelEvent(e){let t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type===`pointerleave`&&(e.type=`pointerout`),e.type.startsWith(`mouse`)&&(e.type=e.type.replace(`mouse`,`pointer`)),e.type.startsWith(`touch`)&&(e.type=ebe[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};e$.extension={name:`events`,type:[G.WebGLSystem,G.CanvasSystem,G.WebGPUSystem],priority:-1},e$.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var t$=e$,tbe={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode===`dynamic`||this.eventMode===`static`},set interactive(e){this.eventMode=e?`static`:`passive`},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??t$.defaultEventMode},set eventMode(e){this._internalEventMode=e},isInteractive(){return this.eventMode===`static`||this.eventMode===`dynamic`},interactiveChildren:!0,hitArea:null,addEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof n==`object`?n.signal:void 0,a=typeof n==`object`?n.once===!0:!1,o=typeof t==`function`?void 0:t;e=r?`${e}capture`:e;let s=typeof t==`function`?t:t.handleEvent,c=this;i&&i.addEventListener(`abort`,()=>{c.off(e,s,o)}),a?c.once(e,s,o):c.on(e,s,o)},removeEventListener(e,t,n){let r=typeof n==`boolean`&&n||typeof n==`object`&&n.capture,i=typeof t==`function`?void 0:t;e=r?`${e}capture`:e,t=typeof t==`function`?t:t.handleEvent,this.off(e,t,i)},dispatchEvent(e){if(!(e instanceof bZ))throw Error(`Container cannot propagate events outside of the Federated Events API`);return e.defaultPrevented=!1,e.path=null,e.target=this,e.manager.dispatchEvent(e),!e.defaultPrevented}},nbe=`in vec2 aPosition;
935
935
  out vec2 vTextureCoord;
936
936
 
937
937
  uniform vec4 uInputSize;
@@ -1366,7 +1366,7 @@ fn mainFragment(
1366
1366
  <div class="pixi-host">
1367
1367
  <div class="edge-glow"></div>
1368
1368
  </div>
1369
- `}};customElements.define(`virtual-trackpad-tab`,oCe);var sCe=/^\/versions\/[^/]+(?:\/|$)/;function cCe(e){return sCe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function Y0(e,t=window.location){let n=cCe(t);return n?`hosted-session:${n}:${e}`:e}var X0=1.5,Z0=30,lCe=50,Q0=15;function $0(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function e2(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function t2(e){return typeof e==`object`&&!!e}function n2(){try{let e=localStorage.getItem(Y0(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return t2(t)?t:{}}catch{return{}}}function r2(e){try{localStorage.setItem(Y0(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function uCe(e){let t=n2().sessions;if(!t)return null;let n=t[e];if(!t2(n))return null;let r={activeTab:`input`,inputDraft:``};return e2(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function i2(){let e=n2();return e2(e.lastActiveTab)?e.lastActiveTab:`input`}var a2=class e{static _lastActiveTab=`input`;static _active=null;static _lastFocused=null;static _instances=new Set;static _onActiveChangeFn=null;static _mountTarget=null;static get activeInstance(){return e._active}static set onActiveChange(t){e._onActiveChangeFn=t}static set mountTarget(t){e._mountTarget=t,e._fabEl&&t&&t.appendChild(e._fabEl)}static get mountTarget(){return e._mountTarget}static _fabEl=null;static _fabSubscriberCount=0;static _ensureFab(t){if(e._fabEl){e._fabEl.parentElement!==t&&t.appendChild(e._fabEl);return}let n=document.createElement(`button`);n.type=`button`,n.title=`Open InputPanel`,n.replaceChildren(UX(24)),Object.assign(n.style,{position:`fixed`,zIndex:`50`,width:`56px`,height:`56px`,borderRadius:`50%`,border:`2px solid currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,touchAction:`none`,userSelect:`none`,webkitUserSelect:`none`,webkitTouchCallout:`none`,cursor:`pointer`,boxShadow:`0 4px 12px rgba(0,0,0,0.3)`,background:`var(--primary, #e04a2f)`,color:`var(--primary-foreground, #fff)`,padding:`0`,margin:`0`,outline:`none`});let r=window.innerWidth-72,i=window.innerHeight-140;try{let e=localStorage.getItem(`input-panel-fab-pos`);if(e){let t=JSON.parse(e);r=t.x??r,i=t.y??i}}catch{}r=Math.max(0,Math.min(window.innerWidth-56,r)),i=Math.max(0,Math.min(window.innerHeight-56,i)),n.style.left=`${r}px`,n.style.top=`${i}px`;let a=!1,o=!1,s=0,c=0,l=0,u=0,d=()=>{let t=e._lastFocused,n=(t&&e._instances.has(t)?t:null)??[...e._instances].find(e=>e._terminal!=null)??null;n&&(e._lastFocused=n,n.open())};n.addEventListener(`pointerdown`,e=>{a=!0,o=!1,s=e.clientX,c=e.clientY,l=parseInt(n.style.left)||0,u=parseInt(n.style.top)||0,n.setPointerCapture(e.pointerId),e.preventDefault()}),n.addEventListener(`pointermove`,e=>{if(!a)return;let t=e.clientX-s,r=e.clientY-c;(Math.abs(t)>4||Math.abs(r)>4)&&(o=!0);let i=Math.max(0,Math.min(window.innerWidth-56,l+t)),d=Math.max(0,Math.min(window.innerHeight-56,u+r));n.style.left=`${i}px`,n.style.top=`${d}px`}),n.addEventListener(`pointerup`,()=>{if(a){a=!1;try{localStorage.setItem(`input-panel-fab-pos`,JSON.stringify({x:parseInt(n.style.left),y:parseInt(n.style.top)}))}catch{}o||d()}}),n.addEventListener(`pointercancel`,()=>{a=!1});let f=!1;n.addEventListener(`pointerdown`,()=>{f=!0},{capture:!0}),n.addEventListener(`click`,()=>{if(f){f=!1;return}d()}),n.addEventListener(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener(`dragstart`,e=>{e.preventDefault()}),window.addEventListener(`resize`,()=>{let e=Math.min(parseInt(n.style.left)||0,window.innerWidth-56),t=Math.min(parseInt(n.style.top)||0,window.innerHeight-56);n.style.left=`${Math.max(0,e)}px`,n.style.top=`${Math.max(0,t)}px`}),t.appendChild(n),e._fabEl=n}static _setFabVisible(t){e._fabEl&&(e._fabEl.style.display=t&&e._fabSubscriberCount>0?`flex`:`none`)}_terminal=null;_panel=null;_cursorEl=null;_cursorPos={x:0,y:0};_isDragging=!1;_isOpen=!1;_edgeScrollTimer=null;_cleanups=[];_persistentCleanups=[];_listenersAttached=!1;_onInput;_onOpenCb;_onCloseCb;_getHistory;_addHistory;_subscribeHistory;_onSettingsChange;_platform;_defaultLayout;_showFab;_fabSubscribed;_panelSessionState;_stateKey;_hasOwnPersistedState;constructor(t){this._onInput=t?.onInput??(()=>{}),this._onOpenCb=t?.onOpen??null,this._onCloseCb=t?.onClose??null,this._getHistory=t?.getHistory??null,this._addHistory=t?.addHistory??null,this._subscribeHistory=t?.subscribeHistory??null,this._onSettingsChange=t?.onSettingsChange??null,this._platform=t?.platform??`common`,this._defaultLayout=t?.defaultLayout??`floating`,this._showFab=t?.showFab??!0,this._fabSubscribed=!1,this._stateKey=t?.stateKey?.trim()?t.stateKey:`default`,this._hasOwnPersistedState=!1,this._panelSessionState={activeTab:`input`,inputDraft:``};let n=uCe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||i2()}get isOpen(){return this._isOpen}set onOpen(e){this._onOpenCb=e}set onClose(e){this._onCloseCb=e}set onInput(e){this._onInput=e}setPlatform(e){this._platform=e,this._applyPlatformToPanel()}setDefaultLayout(e){this._defaultLayout=e}_persistPanelState(){e._lastActiveTab=this._panelSessionState.activeTab;let t=n2(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};r2({...t,lastActiveTab:this._panelSessionState.activeTab,sessions:n})}_getMountTarget(){return e._mountTarget??this._getTerminalHostElement()??document.body}_getTerminalHostElement(){let e=this._terminal?.element;return e instanceof HTMLElement?e.classList.contains(`xterm`)&&e.parentElement instanceof HTMLElement?e.parentElement:e:null}_detectTerminalEngine(){let e=this._terminal?.element;return e instanceof HTMLElement&&e.classList.contains(`xterm`)?`xterm`:`non-xterm`}activate(t){this._terminal=t,e._instances.add(this)}dispose(){this.close();for(let e of this._persistentCleanups)e();this._persistentCleanups=[],this._listenersAttached=!1,this._fabSubscribed&&(e._fabSubscriberCount=Math.max(0,e._fabSubscriberCount-1),this._fabSubscribed=!1,e._setFabVisible(e._active===null)),e._instances.delete(this),e._lastFocused===this&&(e._lastFocused=null),this._terminal=null}attachListeners(){if(this._listenersAttached||!this._terminal)return;let t=this._terminal.textarea;if(!t)return;this._listenersAttached=!0,this._showFab?(e._ensureFab(this._getMountTarget()),this._fabSubscribed||=(e._fabSubscriberCount+=1,!0),e._setFabVisible(!0)):e._fabSubscriberCount===0&&e._setFabVisible(!1),e._lastFocused||=this;let n=()=>{e._lastFocused=this,$0()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),$0()&&t.setAttribute(`inputmode`,`none`)}open(){if(!this._terminal)return;if(this._isOpen){if(this._panel?.isConnected)return;this.close()}if(e._active&&e._active!==this&&e._active.close(),this._isOpen=!0,e._active=this,e._lastFocused=this,this._showFab&&e._setFabVisible(!1),this._suppressKeyboard(),!this._hasOwnPersistedState){let t=i2();this._panelSessionState.activeTab=t,e._lastActiveTab=t}let t=document.createElement(`input-panel`);t.setAttribute(`layout`,this._defaultLayout),this._applyPanelThemeBindings(t),t.activeTab=this._panelSessionState.activeTab;let n=document.createElement(`input-method-tab`);n.setAttribute(`slot`,`input`),n.value=this._panelSessionState.inputDraft,t.appendChild(n);let r=document.createElement(`virtual-keyboard-tab`);r.setAttribute(`slot`,`keys`),r.setAttribute(`floating`,``),r.setAttribute(`platform`,this._platform),t.appendChild(r);let i=document.createElement(`shortcut-tab`);i.setAttribute(`slot`,`shortcuts`),i.setAttribute(`platform`,this._platform),t.appendChild(i);let a=document.createElement(`virtual-trackpad-tab`);a.setAttribute(`slot`,`trackpad`),a.setAttribute(`floating`,``),t.appendChild(a),this._panel=t;let o=e=>{this._renderHistory(n,e)};if(this._getHistory&&this._getHistory().then(e=>o(e)).catch(()=>{}),this._subscribeHistory)try{let e=this._subscribeHistory(e=>{o(e)});this._cleanups.push(e)}catch{}this._on(t,`input-panel:close`,()=>this.close()),this._on(t,`input-panel:send`,e=>{let t=e.detail?.data;if(t&&this._onInput(t),e.composedPath()[0]===n&&this._addHistory&&t){let e=this._normalizeHistoryText(t);e&&Promise.resolve(this._addHistory(e)).then(()=>this._getHistory?.()).then(e=>{e&&o(e)}).catch(()=>{})}}),this._on(n,`input-panel:input-change`,e=>{let t=e.detail?.value;typeof t==`string`&&(this._panelSessionState.inputDraft=t,this._hasOwnPersistedState=!0,this._persistPanelState())}),this._on(t,`input-panel:tab-change`,e=>{let t=e.detail?.tab;e2(t)&&(this._panelSessionState.activeTab=t,this._hasOwnPersistedState=!0,this._persistPanelState()),t===`trackpad`?this._showCursor():this._hideCursor()}),this._on(t,`input-panel:settings-change`,e=>{if(!this._onSettingsChange)return;let t=e.detail;if(typeof t!=`object`||!t)return;let n=t;typeof n.fixedHeight!=`number`||typeof n.floatingWidth!=`number`||typeof n.floatingHeight!=`number`||typeof n.vibrationIntensity!=`number`||typeof n.historyLimit!=`number`||this._onSettingsChange({fixedHeight:n.fixedHeight,floatingWidth:n.floatingWidth,floatingHeight:n.floatingHeight,vibrationIntensity:n.vibrationIntensity,historyLimit:n.historyLimit})}),this._on(t,`trackpad:move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n)}),this._on(t,`trackpad:tap`,()=>this._dispatchClick(1)),this._on(t,`trackpad:double-tap`,()=>this._dispatchDblClick()),this._on(t,`trackpad:long-press`,()=>this._dispatchRightClick()),this._on(t,`trackpad:two-finger-tap`,()=>this._dispatchRightClick()),this._on(t,`trackpad:drag-start`,()=>{this._isDragging=!0,this._dispatchMouse(`mousedown`,{detail:1})}),this._on(t,`trackpad:drag-move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n),this._dispatchMouse(`mousemove`,{buttons:1}),this._updateEdgeScroll()}),this._on(t,`trackpad:drag-end`,()=>{this._isDragging=!1,this._stopEdgeScroll(),this._dispatchMouse(`mouseup`,{detail:1})}),this._on(t,`trackpad:scroll`,e=>{let{deltaY:t}=e.detail;this._dispatchWheel(t)}),this._getMountTarget().appendChild(t),this._createCursor(),this._focusTerminal(),this._onOpenCb?.(),e._onActiveChangeFn?.(this)}_applyPlatformToPanel(){if(!this._panel)return;let e=this._panel.querySelector(`virtual-keyboard-tab`),t=this._panel.querySelector(`shortcut-tab`);e?.setAttribute(`platform`,this._platform),t?.setAttribute(`platform`,this._platform)}_readThemeVar(e,t,n){for(let n of t){let t=e.getPropertyValue(n).trim();if(t)return t}return n}_applyPanelThemeBindings(e){let t=this._getTerminalHostElement()??this._getMountTarget(),n=getComputedStyle(t),r=this._readThemeVar(n,[`--input-panel-background`,`--terminal`,`--background`],`#1a1a1a`),i=this._readThemeVar(n,[`--input-panel-foreground`,`--terminal-foreground`,`--foreground`],`#ffffff`),a=this._readThemeVar(n,[`--input-panel-primary`,`--primary`],`#e04a2f`),o=this._readThemeVar(n,[`--input-panel-primary-foreground`,`--primary-foreground`],`#ffffff`),s=this._readThemeVar(n,[`--input-panel-border`,`--border`],`color-mix(in srgb, ${i} 24%, transparent)`),c=this._readThemeVar(n,[`--input-panel-muted`,`--muted`],`color-mix(in srgb, ${r} 86%, ${i} 14%)`),l=this._readThemeVar(n,[`--input-panel-muted-foreground`,`--muted-foreground`],`color-mix(in srgb, ${i} 62%, transparent)`);e.style.setProperty(`--input-panel-background`,r),e.style.setProperty(`--input-panel-foreground`,i),e.style.setProperty(`--input-panel-primary`,a),e.style.setProperty(`--input-panel-primary-foreground`,o),e.style.setProperty(`--input-panel-border`,s),e.style.setProperty(`--input-panel-muted`,c),e.style.setProperty(`--input-panel-muted-foreground`,l)}close(){if(this._isOpen){this._isOpen=!1,e._active===this&&(e._active=null),this._stopEdgeScroll();for(let e of this._cleanups)e();this._cleanups=[],this._panel?.remove(),this._panel=null,this._cursorEl?.remove(),this._cursorEl=null,$0()||this._restoreKeyboard(),this._showFab&&e._setFabVisible(!0),this._onCloseCb?.(),e._onActiveChangeFn?.(null)}}toggle(){if(this._isOpen){this.close();return}this.open()}syncFocusLifecycle(){if(e._lastFocused=this,this._isOpen&&!this._panel?.isConnected){this.open();return}if(e._active&&e._active!==this){this.open();return}this._isOpen&&this._focusTerminal()}_focusTerminal(){let e=this._terminal?.textarea;e&&($0()&&e.setAttribute(`inputmode`,`none`),e.focus())}_createCursor(){let e=this._getTerminalHostElement();if(!e)return;let t=document.createElement(`div`);t.setAttribute(`data-input-panel-cursor`,`virtual-mouse`),t.setAttribute(`data-terminal-engine`,this._detectTerminalEngine()),t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;z-index:10;pointer-events:none;opacity:0;transition:opacity 0.15s;color:#fff;`;let n=cve(20);n.style.filter=`drop-shadow(0 0 1px rgba(0,0,0,0.9))`,t.replaceChildren(n),e.appendChild(t),this._cursorEl=t;let r=e.getBoundingClientRect();this._cursorPos={x:r.width/2,y:r.height/2},this._positionCursor()}_positionCursor(){this._cursorEl&&(this._cursorEl.style.left=`${this._cursorPos.x-4}px`,this._cursorEl.style.top=`${this._cursorPos.y-2}px`)}_showCursor(){if(this._cursorEl||this._createCursor(),this._cursorEl){let e=this._getTerminalHostElement();if(e){let t=e.getBoundingClientRect();this._cursorPos={x:t.width/2,y:t.height/2},this._positionCursor()}this._cursorEl.style.opacity=`1`}}_hideCursor(){this._cursorEl&&(this._cursorEl.style.opacity=`0.3`)}_moveCursor(e,t){let n=this._getTerminalHostElement();if(!n)return;let r=n.getBoundingClientRect();this._cursorPos.x=Math.max(0,Math.min(r.width,this._cursorPos.x+e*X0)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*X0)),this._positionCursor()}_getClientCoords(){let e=this._getTerminalHostElement();if(!e)return null;let t=e.getBoundingClientRect();return{clientX:t.left+this._cursorPos.x,clientY:t.top+this._cursorPos.y}}_resolveTarget(e,t){let n=this._getTerminalHostElement();if(!n)return document.body;let r=document.elementFromPoint(e,t);return r&&n.contains(r)?r:n.querySelector(`.xterm-screen`)??n}_dispatchMouse(e,t={}){let n=this._getClientCoords();if(!n)return;let r=t.button??0,i=t.detail??1,a=t.buttons??(e===`mousedown`?r===0?1:r===2?2:4:0);this._resolveTarget(n.clientX,n.clientY).dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:i,clientX:n.clientX,clientY:n.clientY,button:r,buttons:a}))}_dispatchClick(e){this._dispatchMouse(`mousedown`,{detail:e}),this._dispatchMouse(`mouseup`,{detail:e}),this._dispatchMouse(`click`,{detail:e})}_dispatchDblClick(){this._dispatchMouse(`mousedown`,{detail:2}),this._dispatchMouse(`mouseup`,{detail:2}),this._dispatchMouse(`click`,{detail:2}),this._dispatchMouse(`dblclick`,{detail:2})}_dispatchRightClick(){this._dispatchMouse(`mousedown`,{button:2}),this._dispatchMouse(`mouseup`,{button:2}),this._dispatchMouse(`contextmenu`,{button:2})}_dispatchWheel(e){let t=this._getClientCoords();t&&this._resolveTarget(t.clientX,t.clientY).dispatchEvent(new WheelEvent(`wheel`,{bubbles:!0,cancelable:!0,view:window,clientX:t.clientX,clientY:t.clientY,deltaY:e,deltaMode:WheelEvent.DOM_DELTA_PIXEL}))}_updateEdgeScroll(){let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=this._cursorPos.y<Z0,r=this._cursorPos.y>t.height-Z0;if(!n&&!r){this._stopEdgeScroll();return}this._stopEdgeScroll(),this._edgeScrollTimer=setInterval(()=>{let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=t.left+this._cursorPos.x,r=this._cursorPos.y<Z0?t.top-Q0:t.bottom+Q0;this._resolveTarget(t.left+this._cursorPos.x,t.top+this._cursorPos.y).dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0,view:window,clientX:n,clientY:r,button:0,buttons:1}))},lCe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!$0())return;let e=this._terminal?.textarea;e&&e.setAttribute(`inputmode`,`none`)}_restoreKeyboard(){let e=this._terminal?.textarea;e&&e.removeAttribute(`inputmode`)}_on(e,t,n){e.addEventListener(t,n),this._cleanups.push(()=>e.removeEventListener(t,n))}_normalizeHistoryText(e){return e.replace(/[\r\n]+$/u,``).trim()||null}_renderHistory(e,t){if(e.querySelectorAll(`[data-input-history-root="true"]`).forEach(e=>e.remove()),t.length===0)return;let n=document.createElement(`div`);n.dataset.inputHistoryRoot=`true`,n.setAttribute(`slot`,`history`),n.style.display=`flex`,n.style.flexDirection=`column`,n.style.gap=`4px`,n.style.padding=`4px 0`;for(let e of t){let t=document.createElement(`button`);t.type=`button`,t.title=e.text,t.style.display=`flex`,t.style.alignItems=`center`,t.style.gap=`8px`,t.style.width=`100%`,t.style.padding=`4px 6px`,t.style.border=`1px solid transparent`,t.style.borderRadius=`4px`,t.style.background=`transparent`,t.style.color=`var(--foreground, #fff)`,t.style.fontFamily=`inherit`,t.style.fontSize=`12px`,t.style.textAlign=`left`;let r=document.createElement(`span`);r.textContent=new Date(e.time).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),r.style.opacity=`0.65`,r.style.fontSize=`10px`,r.style.flexShrink=`0`;let i=document.createElement(`span`);i.textContent=e.text,i.style.overflow=`hidden`,i.style.textOverflow=`ellipsis`,i.style.whiteSpace=`nowrap`,t.appendChild(r),t.appendChild(i),t.addEventListener(`click`,()=>{this._onInput(`${e.text}\n`)}),n.appendChild(t)}e.appendChild(n)}},o2=`xtermInputPanelSettings`,dCe=50,fCe=1e3,pCe=1,mCe=1,s2=`terminal-meta`;function c2(){return wc(`terminal-input-history`,window.location)}function hCe(){return wc(`openspecui-terminal`,window.location)}function l2(){return wc(`input-history`,window.location)}function u2(){return wc(`terminal-input-history-fallback`,window.location)}function d2(e){return Math.max(pCe,Math.min(fCe,Math.round(e)))}function f2(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(typeof e.text!=`string`||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let r=e.text.trim();r&&t.push({text:r,time:e.time})}return t}function p2(e,t){let n=new Map;for(let t of e){let e=`${t.time}::${t.text}`;n.has(e)||n.set(e,t)}return[...n.values()].sort((e,t)=>t.time-e.time).slice(0,d2(t))}function m2(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]?.text!==t[n]?.text||e[n]?.time!==t[n]?.time)return!1;return!0}function h2(){try{let e=localStorage.getItem(o2);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function gCe(e){let t=h2();try{localStorage.setItem(o2,JSON.stringify({...t,...e}))}catch{}}async function g2(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(hCe(),mCe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(s2)||e.createObjectStore(s2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function _Ce(){let e=await g2();return e?await new Promise(t=>{let n=e.transaction(s2,`readonly`),r=n.objectStore(s2).get(l2());r.onsuccess=()=>{t(f2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function vCe(e){let t=await g2();return t?await new Promise(n=>{let r=t.transaction(s2,`readwrite`);r.objectStore(s2).put(e,l2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function yCe(){try{let e=localStorage.getItem(u2());return e?f2(JSON.parse(e)):[]}catch{return[]}}function bCe(e){try{localStorage.setItem(u2(),JSON.stringify(e))}catch{}}async function xCe(){return await _Ce()||yCe()}async function _2(e){await vCe(e)||bCe(e)}var SCe=class{records=[];listeners=new Set;kvUnsubscribe=null;initPromise=null;subscribe(e){return this.listeners.add(e),this.ensureInitialized(),e(this.records),()=>{this.listeners.delete(e)}}async list(){return await this.ensureInitialized(),[...this.records]}getLimit(){let e=h2().historyLimit;return typeof e==`number`&&Number.isFinite(e)?d2(e):dCe}async setLimit(e){let t=d2(e);gCe({historyLimit:t}),await this.ensureInitialized();let n=p2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=p2([{text:t,time:Date.now()},...this.records],this.getLimit());await this.commit(n,{persistRemote:!0})}destroy(){this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}async ensureInitialized(){if(this.initPromise){await this.initPromise;return}this.initPromise=this.initialize(),await this.initPromise}async initialize(){if(this.records=p2(await xCe(),this.getLimit()),this.emit(),!Fc())try{let e=f2(await cm.kv.get.query({key:c2()})),t=p2([...this.records,...e],this.getLimit());m2(this.records,t)||(this.records=t,await _2(this.records),this.emit()),m2(e,this.records)||this.persistRemote(this.records);let n=cm.kv.subscribe.subscribe({key:c2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=f2(e),n=p2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){m2(this.records,e)||(this.records=e,await _2(this.records),this.emit(),t.persistRemote&&!Fc()&&this.persistRemote(this.records))}async persistRemote(e){try{await cm.kv.set.mutate({key:c2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},v2=[`xterm`,`ghostty`];function y2(e){return v2.includes(e)}var b2=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,CCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},x2=1500,S2=1e3,wCe=1e4,C2=`common`,TCe=512*1024,ECe=8,DCe=32,w2=13,OCe=800,T2=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],E2=new Set;function D2(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function kCe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(E2.has(t))return D2(t);try{let e=(await fetch(t,{method:`HEAD`})).headers.get(`content-type`)??``;if(e.includes(`text/css`)){let e=document.createElement(`link`);return e.rel=`stylesheet`,e.href=t,e.dataset.fontSrc=t,document.head.appendChild(e),E2.add(t),``}if(e.startsWith(`font/`)){let e=D2(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),E2.add(t),e}}catch{}return t}function ACe(e){let t=`google:${e}`;if(E2.has(t))return;let n=navigator.language??``,r=/^zh\b/i.test(n)?`https://fonts.googleapis.cn`:`https://fonts.googleapis.com`,i=document.createElement(`link`);i.rel=`stylesheet`,i.href=`${r}/css2?family=${e.replace(/ /g,`+`)}&display=swap`,i.dataset.fontSrc=t,document.head.appendChild(i),E2.add(t)}var jCe=class{instances=new Map;listeners=new Set;idCounter=0;config={...CCe};snapshotCache=null;inputHistoryStore=new SCe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=S2;pendingCreates=[];pendingCloseSessionIds=new Set;serverToLocalSessionId=new Map;hasDiscoveredSessions=!1;inputPanelDefaultLayout=`floating`;createSession(e){let t=`term-${++this.idCounter}`,n=e?.label??`Shell ${this.idCounter}`,r=this.createTerminalInstance(t,{label:n,command:e?.command,args:e?.args,isDedicated:e?.isDedicated??!1,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,restored:!1,serverSessionId:null,platform:C2});return this.instances.set(t,r),this._applyFonts(),this.bindTerminalInput(r),this.wsConnected&&this.ws?this.wsSend({type:`create`,requestId:t,cols:r.terminal.cols||80,rows:r.terminal.rows||24,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl}):(this.pendingCreates.push({requestId:t,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,cols:r.terminal.cols||80,rows:r.terminal.rows||24}),this.ensureWsConnected()),this.notify(),t}createTerminalInstance(e,t){let{terminal:n,fitAddon:r,afterOpenHook:i,engine:a}=this.createRendererTerminal(),o=this.createInputPanelAddon(e,t.platform);return n.loadAddon(o),this.attachTerminalShortcuts(n,a),{id:e,serverSessionId:t.serverSessionId,terminal:n,fitAddon:r,inputPanelAddon:o,isConnected:!1,label:t.label,customTitle:null,processTitle:null,isDedicated:t.isDedicated,isExited:!1,exitCode:null,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,mountedContainer:null,resizeObserver:null,hasOpened:!1,afterOpenHook:i,pendingOutput:[],pendingOutputBytes:0,lastOutputTime:0,outputIdleTimer:null,restored:t.restored,platform:t.platform,rendererEngine:a}}getTerminalOptions(){return{cursorBlink:this.config.cursorBlink,cursorStyle:this.config.cursorStyle,fontSize:this.config.fontSize,fontFamily:b2,theme:{background:`transparent`},allowTransparency:!0,convertEol:!0,macOptionIsMeta:!0,macOptionClickForcesSelection:!0,scrollback:this.config.scrollback}}createRendererTerminal(){let e=this.getTerminalOptions();if(this.config.rendererEngine===`xterm`){let t=new w_e(e),n=new KW;return t.loadAddon(n),t.loadAddon(new QW),{terminal:t,fitAddon:n,afterOpenHook:null,engine:`xterm`}}let t=this.ghosttyModule;if(!t)throw Error(`ghostty-web is not initialized. Open Settings and switch engine again.`);let n=new t.Terminal(e),r=new t.FitAddon;return n.loadAddon(r),{terminal:n,fitAddon:r,afterOpenHook:()=>{let e=n;e.registerLinkProvider&&e.registerLinkProvider(new t.UrlRegexProvider(n))},engine:`ghostty`}}createInputPanelAddon(e,t){return new a2({onInput:t=>this.writeToSession(e,t),getHistory:async()=>this.inputHistoryStore.list(),addHistory:async e=>this.inputHistoryStore.add(e),subscribeHistory:e=>this.inputHistoryStore.subscribe(e),platform:t,defaultLayout:this.inputPanelDefaultLayout,showFab:!1,stateKey:e,onSettingsChange:async e=>{await this.inputHistoryStore.setLimit(e.historyLimit)}})}applyGhosttyBackground(e,t){if(e.rendererEngine!==`ghostty`)return;let n=this.resolveNearestOpaqueBackground(t),r=e.terminal.options.theme??{};e.terminal.options.allowTransparency=!1,e.terminal.options.theme={...r,background:n}}isTransparentColor(e){let t=e.trim().toLowerCase();return t.length===0||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0,0,0,0)`}resolveNearestOpaqueBackground(e){let t=e;for(;t;){let e=window.getComputedStyle(t).backgroundColor;if(!this.isTransparentColor(e))return e;t=t.parentElement}return`rgb(26, 26, 26)`}attachTerminalShortcuts(e,t){e.attachCustomKeyEventHandler(e=>{let n=e.metaKey||e.ctrlKey;if(e.type!==`keydown`||!n)return t===`xterm`;let r=!1;return(e.key===`=`||e.key===`+`)&&n&&(this.zoomFont(1),r=!0),e.key===`-`&&n&&!r&&(this.zoomFont(-1),r=!0),e.key===`0`&&n&&!r&&(this.resetFontSize(),r=!0),t===`xterm`?!r:r})}bindTerminalInput(e){e.terminal.onData(t=>{if(e.isExited){this.closeSession(e.id);return}let n=this.resolveServerSessionId(e.id);n&&this.wsSend({type:`input`,sessionId:n,data:t})})}isTerminalNotOpenedError(e){if(!(e instanceof Error))return!1;let t=e.message;return t.includes(`Terminal must be opened before use`)||t.includes(`Call terminal.open(parent) first`)}enqueuePendingOutput(e,t){if(t)for(e.pendingOutput.push(t),e.pendingOutputBytes+=t.length;e.pendingOutputBytes>TCe&&e.pendingOutput.length;){let t=e.pendingOutput.shift();if(!t)break;e.pendingOutputBytes-=t.length}}writeTerminalOutput(e,t){if(t){if(!e.hasOpened){this.enqueuePendingOutput(e,t);return}try{e.terminal.write(t)}catch(n){if(this.isTerminalNotOpenedError(n)){this.enqueuePendingOutput(e,t);return}console.error(`[terminal] failed to write output:`,n)}}}flushPendingOutput(e){if(!e.hasOpened||e.pendingOutput.length===0)return;let t=e.pendingOutput.join(``);e.pendingOutput=[],e.pendingOutputBytes=0,this.writeTerminalOutput(e,t)}replaceInstanceRenderer(e){let t=e.mountedContainer,n=e.serverSessionId;e.mountedContainer&&this.unmount(e.id),e.terminal.dispose();let{terminal:r,fitAddon:i,afterOpenHook:a,engine:o}=this.createRendererTerminal(),s=this.createInputPanelAddon(e.id,e.platform);r.loadAddon(s),this.attachTerminalShortcuts(r,o),e.terminal=r,e.fitAddon=i,e.inputPanelAddon=s,e.hasOpened=!1,e.afterOpenHook=a,e.mountedContainer=null,e.resizeObserver=null,e.rendererEngine=o,this.bindTerminalInput(e),t&&this.mount(e.id,t),n&&this.wsSend({type:`attach`,sessionId:n,cols:e.terminal.cols||80,rows:e.terminal.rows||24})}async ensureGhosttyModule(){return this.ghosttyModule?this.ghosttyModule:(this.ghosttyInitPromise||=J(()=>import(`./ghostty-web-CKyK2O5y.js`).then(async e=>(await e.init(),this.ghosttyModule=e,e)),[]).finally(()=>{this.ghosttyInitPromise=null}),this.ghosttyInitPromise)}async setRendererEngine(e){if(e!==this.config.rendererEngine){e===`ghostty`&&await this.ensureGhosttyModule(),this.config.rendererEngine=e;for(let e of this.instances.values())this.replaceInstanceRenderer(e);this._applyFonts(),this.notify()}}closeSession(e,t){let n=this.instances.get(e);if(!n)return;let r=t?.triggerCloseCallback!==!1;if(n.mountedContainer&&this.unmount(e),n.outputIdleTimer&&=(clearTimeout(n.outputIdleTimer),null),this.pendingCreates=this.pendingCreates.filter(t=>t.requestId!==e),n.serverSessionId){let e=n.serverSessionId;this.serverToLocalSessionId.delete(e),this.wsConnected&&this.ws?.readyState===WebSocket.OPEN?this.wsSend({type:`close`,sessionId:e}):this.pendingCloseSessionIds.add(e)}n.terminal.dispose(),r&&this.runCloseCallback(n),this.instances.delete(e),this.notify()}closeAll(){for(let e of this.instances.keys())this.closeSession(e,{triggerCloseCallback:!1})}mount(e,t){let n=this.instances.get(e);if(!n)return;if(n.mountedContainer===t){requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});return}if(n.mountedContainer&&this.unmount(e),!n.hasOpened)this.applyGhosttyBackground(n,t),n.terminal.open(t),n.hasOpened=!0,n.afterOpenHook?.(),n.afterOpenHook=null,this.flushPendingOutput(n),n.inputPanelAddon.attachListeners();else{let e=n.terminal.element;e&&!e.contains(t)&&e.parentNode!==t&&t.appendChild(e),this.flushPendingOutput(n),this.applyGhosttyBackground(n,t)}n.mountedContainer=t,requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});let r=new ResizeObserver(()=>{try{if(n.fitAddon.fit(),n.terminal.cols&&n.terminal.rows){let t=this.resolveServerSessionId(e);if(!t)return;this.wsSend({type:`resize`,sessionId:t,cols:n.terminal.cols,rows:n.terminal.rows})}}catch{}});r.observe(t),n.resizeObserver=r,requestAnimationFrame(()=>{this.focusSession(e)})}unmount(e){let t=this.instances.get(e);!t||!t.mountedContainer||(t.resizeObserver&&=(t.resizeObserver.disconnect(),null),t.mountedContainer=null)}focusSession(e){let t=this.instances.get(e);if(!t||!t.hasOpened)return;let n=!1;try{t.terminal.focus?.(),n=!0}catch{}if(!n){let e=t.terminal.element;if(e instanceof HTMLElement)try{e.focus()}catch{}}t.inputPanelAddon.syncFocusLifecycle()}setCustomTitle(e,t){let n=this.instances.get(e);n&&(n.customTitle=t,this.notify())}getDisplayTitle(e){let t=this.instances.get(e);return t?t.customTitle??t.processTitle??t.label:``}getConfig(){return{...this.config}}applyConfig(e){let{rendererEngine:t,...n}=e;Object.assign(this.config,n);for(let e of this.instances.values()){let t=e.terminal;t.options.fontSize=this.config.fontSize,t.options.cursorBlink=this.config.cursorBlink,t.options.cursorStyle=this.config.cursorStyle,t.options.scrollback=this.config.scrollback}this._applyFonts(),t&&t!==this.config.rendererEngine&&this.setRendererEngine(t).catch(e=>{console.error(`[terminal] failed to switch renderer engine:`,e)}),this.notify()}async _applyFonts(){let e=this.config.fontFamily;if(!e){this._setFontFamily(b2);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(T2.includes(e))ACe(e),n.push(e);else{let t=await kCe(e);t&&n.push(t)}n.push(b2),this._setFontFamily(n.join(`, `))}_setFontFamily(e){for(let t of this.instances.values())if(t.terminal.options.fontFamily=e,t.mountedContainer)try{t.fitAddon.fit()}catch{}}configPersistTimer=null;persistFontSize(){this.configPersistTimer&&clearTimeout(this.configPersistTimer),this.configPersistTimer=setTimeout(()=>{this.configPersistTimer=null,J(async()=>{let{trpcClient:e}=await import(`./trpc-CibonjNv.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},OCe)}zoomFont(e){let t=Math.min(DCe,Math.max(ECe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==w2&&(this.applyConfig({fontSize:w2}),this.persistFontSize())}writeToSession(e,t){let n=this.resolveServerSessionId(e);return n?this.wsSend({type:`input`,sessionId:n,data:t}):!1}openInputPanel(e){let t=[e?this.instances.get(e):void 0,...this.instances.values()],n=t.find(e=>e&&e.mountedContainer)?.id??t.find(e=>e)?.id;if(!n)return!1;this.focusSession(n);let r=this.instances.get(n);return r?(r.inputPanelAddon.open(),!0):!1}async addInputHistory(e){await this.inputHistoryStore.add(e)}resolveServerSessionId(e){let t=this.instances.get(e);return t?t.serverSessionId:null}getInstanceByServerSessionId(e){let t=this.serverToLocalSessionId.get(e)??e;return this.instances.get(t)}getLocalSessionIdByServerSessionId(e){return this.serverToLocalSessionId.get(e)??e}handleCreatedResponse(e){let t=this.instances.get(e.requestId);if(!t){this.wsSend({type:`close`,sessionId:e.sessionId});return}t.serverSessionId=e.sessionId,t.platform=e.platform,t.inputPanelAddon.setPlatform(e.platform),t.isConnected=!0,this.serverToLocalSessionId.set(e.sessionId,e.requestId),this.notify()}handleOutputResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(this.writeTerminalOutput(t,e.data),t.lastOutputTime=Date.now(),this.notify(),t.outputIdleTimer&&clearTimeout(t.outputIdleTimer),t.outputIdleTimer=setTimeout(()=>{t.outputIdleTimer=null,this.notify()},x2))}handleExitResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);if(t){if(t.isExited=!0,t.exitCode=e.exitCode,t.closeTip||t.isDedicated){let n=t.closeTip??`Press any key to close (equivalent to close action).`;this.writeTerminalOutput(t,`\r\n\x1b[90m[Process exited with code ${e.exitCode}. ${n}]\x1b[0m`)}this.notify()}}handleTitleResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(t.processTitle=e.title,this.notify())}handleBufferResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);!t||!e.data||this.writeTerminalOutput(t,e.data)}handleErrorResponse(e){if(e.code===`PTY_CREATE_FAILED`&&e.sessionId){let t=this.instances.get(e.sessionId);t&&!t.serverSessionId&&(t.isExited=!0,t.exitCode=-1,this.writeTerminalOutput(t,`\r\n\x1b[31m[Failed to start PTY: ${e.message}]\x1b[0m`),this.notify())}console.warn(`[pty] ${e.code}: ${e.message}`,e)}setInputPanelMountTarget(e){a2.mountTarget=e}setInputPanelDefaultLayout(e){this.inputPanelDefaultLayout=e;for(let t of this.instances.values())t.inputPanelAddon.setDefaultLayout(e)}getTerminalDimensions(e){let t=this.instances.get(e);return t?{cols:t.terminal.cols||80,rows:t.terminal.rows||24}:null}subscribe(e){return this.listeners.add(e),this.ensureWsConnected(),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=[];for(let t of this.instances.values())e.push({id:t.id,label:t.label,customTitle:t.customTitle,processTitle:t.processTitle,displayTitle:t.customTitle??t.processTitle??t.label,isDedicated:t.isDedicated,isExited:t.isExited,exitCode:t.exitCode,outputActive:t.lastOutputTime>0&&Date.now()-t.lastOutputTime<x2,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,platform:t.platform});return this.snapshotCache={sessions:e},this.snapshotCache}notify(){this.snapshotCache=null;for(let e of this.listeners)e()}ensureWsConnected(){this.ws&&(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)||this.connectSharedWebSocket()}connectSharedWebSocket(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null);let e=new WebSocket(Ac());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=S2;for(let e of this.pendingCloseSessionIds)this.wsSend({type:`close`,sessionId:e});this.pendingCloseSessionIds.clear(),this.wsSend({type:`list`});for(let e of this.pendingCreates)this.wsSend({type:`create`,requestId:e.requestId,cols:e.cols,rows:e.rows,command:e.command,args:e.args,closeTip:e.closeTip,closeCallbackUrl:e.closeCallbackUrl});this.pendingCreates=[];for(let e of this.instances.values())if(!e.restored)continue;this.notify()},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=VW.safeParse(t);n.success&&this.handleServerMessage(n.data)},e.onclose=()=>{this.wsConnected=!1,this.ws=null,this.notify(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,(this.listeners.size>0||this.instances.size>0)&&this.connectSharedWebSocket()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.5,wCe)},e.onerror=()=>{}}handleServerMessage(e){switch(e.type){case`list`:this.handleListResponse(e);break;case`created`:this.handleCreatedResponse(e);break;case`buffer`:this.handleBufferResponse(e);break;case`output`:this.handleOutputResponse(e);break;case`exit`:this.handleExitResponse(e);break;case`title`:this.handleTitleResponse(e);break;case`error`:this.handleErrorResponse(e);break}}handleListResponse(e){let t=new Set(e.sessions.map(e=>e.id));for(let t of e.sessions){let e=this.getLocalSessionIdByServerSessionId(t.id),n=this.instances.get(e);if(n)n.serverSessionId||=t.id;else{let e=t.title||`${t.command} ${t.args.join(` `)}`.trim();n=this.createTerminalInstance(t.id,{label:e.length>40?`${e.slice(0,37)}...`:e,command:t.command,args:t.args,isDedicated:!1,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,restored:!0,serverSessionId:t.id,platform:t.platform??C2}),t.isExited&&(n.isExited=!0,n.exitCode=t.exitCode),this.bindTerminalInput(n),this.instances.set(n.id,n),this._applyFonts()}n.closeTip=t.closeTip,n.closeCallbackUrl=t.closeCallbackUrl,n.platform=t.platform??C2,n.inputPanelAddon.setPlatform(n.platform),this.serverToLocalSessionId.set(t.id,n.id),this.wsSend({type:`attach`,sessionId:t.id,cols:n.terminal.cols||80,rows:n.terminal.rows||24})}for(let e of this.instances.values())e.restored&&e.serverSessionId&&!t.has(e.serverSessionId)&&!e.isExited&&(e.isExited=!0,e.exitCode=-1);this.hasDiscoveredSessions=!0,this.notify()}get discoveredSessions(){return this.hasDiscoveredSessions}runCloseCallback(e){if(!e.isExited)return;let t=MCe(e.closeCallbackUrl,e.exitCode);t&&NCe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function MCe(e,t){if(!e)return null;if(typeof e==`string`){let t=e.trim();return t.length>0?t:null}let n=e[t==null?`null`:String(t)];if(typeof n==`string`&&n.trim().length>0)return n.trim();let r=e[`*`];return typeof r==`string`&&r.trim().length>0?r.trim():null}function NCe(e){let t;try{t=new URL(e,window.location.origin)}catch{return}if(t.origin===window.location.origin){let e=`${t.pathname}${t.search}${t.hash}`,n=Ol.getAreaForPath(t.pathname);Ol.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}var O2=new jCe,k2=(0,K.createContext)(null);function PCe({children:e}){let t=Fc(),n=(0,K.useSyncExternalStore)(e=>O2.subscribe(e),()=>O2.getSnapshot(),()=>O2.getSnapshot()),[r,i]=(0,K.useState)(null),a=(0,K.useCallback)(e=>{if(t)return``;let n=O2.createSession(e);return i(n),n},[t]),o=(0,K.useCallback)((e,n,r)=>{if(t)return``;let a=`${e} ${n.join(` `)}`.trim(),o=O2.createSession({label:a.length>40?`${a.slice(0,37)}...`:a,command:e,args:n,isDedicated:!0,closeTip:r?.closeTip,closeCallbackUrl:r?.closeCallbackUrl});return i(o),o},[t]),s=(0,K.useCallback)(e=>{O2.closeSession(e),i(t=>t===e?null:t)},[]),c=(0,K.useCallback)(e=>{i(e),O2.focusSession(e)},[]),l=(0,K.useCallback)((e,t)=>{},[]),u=(0,K.useCallback)((e,t)=>{O2.setCustomTitle(e,t)},[]),d=n.sessions,f=(0,K.useMemo)(()=>r&&d.some(e=>e.id===r)?r:d[d.length-1]?.id??null,[r,d]);(0,K.useEffect)(()=>{f&&O2.focusSession(f)},[f]);let p=(0,K.useRef)(!1);(0,K.useEffect)(()=>{p.current||d.length!==0&&O2.discoveredSessions&&(p.current=!0,i(e=>e??d[0].id))},[d]);let{data:m}=X_();return(0,K.useEffect)(()=>{if(!m?.terminal)return;let{rendererEngine:e,...t}=m.terminal;e&&y2(e)?O2.setRendererEngine(e).catch(e=>{console.error(`[terminal] failed to apply renderer engine from config:`,e)}):e&&console.error(`[terminal] invalid renderer engine in config:`,e),O2.applyConfig(t)},[m?.terminal]),(0,q.jsx)(k2,{value:(0,K.useMemo)(()=>({sessions:d,activeSessionId:f,createSession:a,createDedicatedSession:o,closeSession:s,setActiveSession:c,markExited:l,setCustomTitle:u}),[d,f,a,o,s,c,l,u]),children:e})}function A2(){let e=(0,K.useContext)(k2);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}var FCe=`schema: spec-driven
1369
+ `}};customElements.define(`virtual-trackpad-tab`,oCe);var sCe=/^\/versions\/[^/]+(?:\/|$)/;function cCe(e){return sCe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function Y0(e,t=window.location){let n=cCe(t);return n?`hosted-session:${n}:${e}`:e}var X0=1.5,Z0=30,lCe=50,Q0=15;function $0(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function e2(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function t2(e){return typeof e==`object`&&!!e}function n2(){try{let e=localStorage.getItem(Y0(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return t2(t)?t:{}}catch{return{}}}function r2(e){try{localStorage.setItem(Y0(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function uCe(e){let t=n2().sessions;if(!t)return null;let n=t[e];if(!t2(n))return null;let r={activeTab:`input`,inputDraft:``};return e2(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function i2(){let e=n2();return e2(e.lastActiveTab)?e.lastActiveTab:`input`}var a2=class e{static _lastActiveTab=`input`;static _active=null;static _lastFocused=null;static _instances=new Set;static _onActiveChangeFn=null;static _mountTarget=null;static get activeInstance(){return e._active}static set onActiveChange(t){e._onActiveChangeFn=t}static set mountTarget(t){e._mountTarget=t,e._fabEl&&t&&t.appendChild(e._fabEl)}static get mountTarget(){return e._mountTarget}static _fabEl=null;static _fabSubscriberCount=0;static _ensureFab(t){if(e._fabEl){e._fabEl.parentElement!==t&&t.appendChild(e._fabEl);return}let n=document.createElement(`button`);n.type=`button`,n.title=`Open InputPanel`,n.replaceChildren(UX(24)),Object.assign(n.style,{position:`fixed`,zIndex:`50`,width:`56px`,height:`56px`,borderRadius:`50%`,border:`2px solid currentColor`,display:`flex`,alignItems:`center`,justifyContent:`center`,touchAction:`none`,userSelect:`none`,webkitUserSelect:`none`,webkitTouchCallout:`none`,cursor:`pointer`,boxShadow:`0 4px 12px rgba(0,0,0,0.3)`,background:`var(--primary, #e04a2f)`,color:`var(--primary-foreground, #fff)`,padding:`0`,margin:`0`,outline:`none`});let r=window.innerWidth-72,i=window.innerHeight-140;try{let e=localStorage.getItem(`input-panel-fab-pos`);if(e){let t=JSON.parse(e);r=t.x??r,i=t.y??i}}catch{}r=Math.max(0,Math.min(window.innerWidth-56,r)),i=Math.max(0,Math.min(window.innerHeight-56,i)),n.style.left=`${r}px`,n.style.top=`${i}px`;let a=!1,o=!1,s=0,c=0,l=0,u=0,d=()=>{let t=e._lastFocused,n=(t&&e._instances.has(t)?t:null)??[...e._instances].find(e=>e._terminal!=null)??null;n&&(e._lastFocused=n,n.open())};n.addEventListener(`pointerdown`,e=>{a=!0,o=!1,s=e.clientX,c=e.clientY,l=parseInt(n.style.left)||0,u=parseInt(n.style.top)||0,n.setPointerCapture(e.pointerId),e.preventDefault()}),n.addEventListener(`pointermove`,e=>{if(!a)return;let t=e.clientX-s,r=e.clientY-c;(Math.abs(t)>4||Math.abs(r)>4)&&(o=!0);let i=Math.max(0,Math.min(window.innerWidth-56,l+t)),d=Math.max(0,Math.min(window.innerHeight-56,u+r));n.style.left=`${i}px`,n.style.top=`${d}px`}),n.addEventListener(`pointerup`,()=>{if(a){a=!1;try{localStorage.setItem(`input-panel-fab-pos`,JSON.stringify({x:parseInt(n.style.left),y:parseInt(n.style.top)}))}catch{}o||d()}}),n.addEventListener(`pointercancel`,()=>{a=!1});let f=!1;n.addEventListener(`pointerdown`,()=>{f=!0},{capture:!0}),n.addEventListener(`click`,()=>{if(f){f=!1;return}d()}),n.addEventListener(`contextmenu`,e=>{e.preventDefault(),e.stopPropagation()}),n.addEventListener(`dragstart`,e=>{e.preventDefault()}),window.addEventListener(`resize`,()=>{let e=Math.min(parseInt(n.style.left)||0,window.innerWidth-56),t=Math.min(parseInt(n.style.top)||0,window.innerHeight-56);n.style.left=`${Math.max(0,e)}px`,n.style.top=`${Math.max(0,t)}px`}),t.appendChild(n),e._fabEl=n}static _setFabVisible(t){e._fabEl&&(e._fabEl.style.display=t&&e._fabSubscriberCount>0?`flex`:`none`)}_terminal=null;_panel=null;_cursorEl=null;_cursorPos={x:0,y:0};_isDragging=!1;_isOpen=!1;_edgeScrollTimer=null;_cleanups=[];_persistentCleanups=[];_listenersAttached=!1;_onInput;_onOpenCb;_onCloseCb;_getHistory;_addHistory;_subscribeHistory;_onSettingsChange;_platform;_defaultLayout;_showFab;_fabSubscribed;_panelSessionState;_stateKey;_hasOwnPersistedState;constructor(t){this._onInput=t?.onInput??(()=>{}),this._onOpenCb=t?.onOpen??null,this._onCloseCb=t?.onClose??null,this._getHistory=t?.getHistory??null,this._addHistory=t?.addHistory??null,this._subscribeHistory=t?.subscribeHistory??null,this._onSettingsChange=t?.onSettingsChange??null,this._platform=t?.platform??`common`,this._defaultLayout=t?.defaultLayout??`floating`,this._showFab=t?.showFab??!0,this._fabSubscribed=!1,this._stateKey=t?.stateKey?.trim()?t.stateKey:`default`,this._hasOwnPersistedState=!1,this._panelSessionState={activeTab:`input`,inputDraft:``};let n=uCe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||i2()}get isOpen(){return this._isOpen}set onOpen(e){this._onOpenCb=e}set onClose(e){this._onCloseCb=e}set onInput(e){this._onInput=e}setPlatform(e){this._platform=e,this._applyPlatformToPanel()}setDefaultLayout(e){this._defaultLayout=e}_persistPanelState(){e._lastActiveTab=this._panelSessionState.activeTab;let t=n2(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};r2({...t,lastActiveTab:this._panelSessionState.activeTab,sessions:n})}_getMountTarget(){return e._mountTarget??this._getTerminalHostElement()??document.body}_getTerminalHostElement(){let e=this._terminal?.element;return e instanceof HTMLElement?e.classList.contains(`xterm`)&&e.parentElement instanceof HTMLElement?e.parentElement:e:null}_detectTerminalEngine(){let e=this._terminal?.element;return e instanceof HTMLElement&&e.classList.contains(`xterm`)?`xterm`:`non-xterm`}activate(t){this._terminal=t,e._instances.add(this)}dispose(){this.close();for(let e of this._persistentCleanups)e();this._persistentCleanups=[],this._listenersAttached=!1,this._fabSubscribed&&(e._fabSubscriberCount=Math.max(0,e._fabSubscriberCount-1),this._fabSubscribed=!1,e._setFabVisible(e._active===null)),e._instances.delete(this),e._lastFocused===this&&(e._lastFocused=null),this._terminal=null}attachListeners(){if(this._listenersAttached||!this._terminal)return;let t=this._terminal.textarea;if(!t)return;this._listenersAttached=!0,this._showFab?(e._ensureFab(this._getMountTarget()),this._fabSubscribed||=(e._fabSubscriberCount+=1,!0),e._setFabVisible(!0)):e._fabSubscriberCount===0&&e._setFabVisible(!1),e._lastFocused||=this;let n=()=>{e._lastFocused=this,$0()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),$0()&&t.setAttribute(`inputmode`,`none`)}open(){if(!this._terminal)return;if(this._isOpen){if(this._panel?.isConnected)return;this.close()}if(e._active&&e._active!==this&&e._active.close(),this._isOpen=!0,e._active=this,e._lastFocused=this,this._showFab&&e._setFabVisible(!1),this._suppressKeyboard(),!this._hasOwnPersistedState){let t=i2();this._panelSessionState.activeTab=t,e._lastActiveTab=t}let t=document.createElement(`input-panel`);t.setAttribute(`layout`,this._defaultLayout),this._applyPanelThemeBindings(t),t.activeTab=this._panelSessionState.activeTab;let n=document.createElement(`input-method-tab`);n.setAttribute(`slot`,`input`),n.value=this._panelSessionState.inputDraft,t.appendChild(n);let r=document.createElement(`virtual-keyboard-tab`);r.setAttribute(`slot`,`keys`),r.setAttribute(`floating`,``),r.setAttribute(`platform`,this._platform),t.appendChild(r);let i=document.createElement(`shortcut-tab`);i.setAttribute(`slot`,`shortcuts`),i.setAttribute(`platform`,this._platform),t.appendChild(i);let a=document.createElement(`virtual-trackpad-tab`);a.setAttribute(`slot`,`trackpad`),a.setAttribute(`floating`,``),t.appendChild(a),this._panel=t;let o=e=>{this._renderHistory(n,e)};if(this._getHistory&&this._getHistory().then(e=>o(e)).catch(()=>{}),this._subscribeHistory)try{let e=this._subscribeHistory(e=>{o(e)});this._cleanups.push(e)}catch{}this._on(t,`input-panel:close`,()=>this.close()),this._on(t,`input-panel:send`,e=>{let t=e.detail?.data;if(t&&this._onInput(t),e.composedPath()[0]===n&&this._addHistory&&t){let e=this._normalizeHistoryText(t);e&&Promise.resolve(this._addHistory(e)).then(()=>this._getHistory?.()).then(e=>{e&&o(e)}).catch(()=>{})}}),this._on(n,`input-panel:input-change`,e=>{let t=e.detail?.value;typeof t==`string`&&(this._panelSessionState.inputDraft=t,this._hasOwnPersistedState=!0,this._persistPanelState())}),this._on(t,`input-panel:tab-change`,e=>{let t=e.detail?.tab;e2(t)&&(this._panelSessionState.activeTab=t,this._hasOwnPersistedState=!0,this._persistPanelState()),t===`trackpad`?this._showCursor():this._hideCursor()}),this._on(t,`input-panel:settings-change`,e=>{if(!this._onSettingsChange)return;let t=e.detail;if(typeof t!=`object`||!t)return;let n=t;typeof n.fixedHeight!=`number`||typeof n.floatingWidth!=`number`||typeof n.floatingHeight!=`number`||typeof n.vibrationIntensity!=`number`||typeof n.historyLimit!=`number`||this._onSettingsChange({fixedHeight:n.fixedHeight,floatingWidth:n.floatingWidth,floatingHeight:n.floatingHeight,vibrationIntensity:n.vibrationIntensity,historyLimit:n.historyLimit})}),this._on(t,`trackpad:move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n)}),this._on(t,`trackpad:tap`,()=>this._dispatchClick(1)),this._on(t,`trackpad:double-tap`,()=>this._dispatchDblClick()),this._on(t,`trackpad:long-press`,()=>this._dispatchRightClick()),this._on(t,`trackpad:two-finger-tap`,()=>this._dispatchRightClick()),this._on(t,`trackpad:drag-start`,()=>{this._isDragging=!0,this._dispatchMouse(`mousedown`,{detail:1})}),this._on(t,`trackpad:drag-move`,e=>{let{dx:t,dy:n}=e.detail;this._moveCursor(t,n),this._dispatchMouse(`mousemove`,{buttons:1}),this._updateEdgeScroll()}),this._on(t,`trackpad:drag-end`,()=>{this._isDragging=!1,this._stopEdgeScroll(),this._dispatchMouse(`mouseup`,{detail:1})}),this._on(t,`trackpad:scroll`,e=>{let{deltaY:t}=e.detail;this._dispatchWheel(t)}),this._getMountTarget().appendChild(t),this._createCursor(),this._focusTerminal(),this._onOpenCb?.(),e._onActiveChangeFn?.(this)}_applyPlatformToPanel(){if(!this._panel)return;let e=this._panel.querySelector(`virtual-keyboard-tab`),t=this._panel.querySelector(`shortcut-tab`);e?.setAttribute(`platform`,this._platform),t?.setAttribute(`platform`,this._platform)}_readThemeVar(e,t,n){for(let n of t){let t=e.getPropertyValue(n).trim();if(t)return t}return n}_applyPanelThemeBindings(e){let t=this._getTerminalHostElement()??this._getMountTarget(),n=getComputedStyle(t),r=this._readThemeVar(n,[`--input-panel-background`,`--terminal`,`--background`],`#1a1a1a`),i=this._readThemeVar(n,[`--input-panel-foreground`,`--terminal-foreground`,`--foreground`],`#ffffff`),a=this._readThemeVar(n,[`--input-panel-primary`,`--primary`],`#e04a2f`),o=this._readThemeVar(n,[`--input-panel-primary-foreground`,`--primary-foreground`],`#ffffff`),s=this._readThemeVar(n,[`--input-panel-border`,`--border`],`color-mix(in srgb, ${i} 24%, transparent)`),c=this._readThemeVar(n,[`--input-panel-muted`,`--muted`],`color-mix(in srgb, ${r} 86%, ${i} 14%)`),l=this._readThemeVar(n,[`--input-panel-muted-foreground`,`--muted-foreground`],`color-mix(in srgb, ${i} 62%, transparent)`);e.style.setProperty(`--input-panel-background`,r),e.style.setProperty(`--input-panel-foreground`,i),e.style.setProperty(`--input-panel-primary`,a),e.style.setProperty(`--input-panel-primary-foreground`,o),e.style.setProperty(`--input-panel-border`,s),e.style.setProperty(`--input-panel-muted`,c),e.style.setProperty(`--input-panel-muted-foreground`,l)}close(){if(this._isOpen){this._isOpen=!1,e._active===this&&(e._active=null),this._stopEdgeScroll();for(let e of this._cleanups)e();this._cleanups=[],this._panel?.remove(),this._panel=null,this._cursorEl?.remove(),this._cursorEl=null,$0()||this._restoreKeyboard(),this._showFab&&e._setFabVisible(!0),this._onCloseCb?.(),e._onActiveChangeFn?.(null)}}toggle(){if(this._isOpen){this.close();return}this.open()}syncFocusLifecycle(){if(e._lastFocused=this,this._isOpen&&!this._panel?.isConnected){this.open();return}if(e._active&&e._active!==this){this.open();return}this._isOpen&&this._focusTerminal()}_focusTerminal(){let e=this._terminal?.textarea;e&&($0()&&e.setAttribute(`inputmode`,`none`),e.focus())}_createCursor(){let e=this._getTerminalHostElement();if(!e)return;let t=document.createElement(`div`);t.setAttribute(`data-input-panel-cursor`,`virtual-mouse`),t.setAttribute(`data-terminal-engine`,this._detectTerminalEngine()),t.setAttribute(`aria-hidden`,`true`),t.style.cssText=`position:absolute;z-index:10;pointer-events:none;opacity:0;transition:opacity 0.15s;color:#fff;`;let n=cve(20);n.style.filter=`drop-shadow(0 0 1px rgba(0,0,0,0.9))`,t.replaceChildren(n),e.appendChild(t),this._cursorEl=t;let r=e.getBoundingClientRect();this._cursorPos={x:r.width/2,y:r.height/2},this._positionCursor()}_positionCursor(){this._cursorEl&&(this._cursorEl.style.left=`${this._cursorPos.x-4}px`,this._cursorEl.style.top=`${this._cursorPos.y-2}px`)}_showCursor(){if(this._cursorEl||this._createCursor(),this._cursorEl){let e=this._getTerminalHostElement();if(e){let t=e.getBoundingClientRect();this._cursorPos={x:t.width/2,y:t.height/2},this._positionCursor()}this._cursorEl.style.opacity=`1`}}_hideCursor(){this._cursorEl&&(this._cursorEl.style.opacity=`0.3`)}_moveCursor(e,t){let n=this._getTerminalHostElement();if(!n)return;let r=n.getBoundingClientRect();this._cursorPos.x=Math.max(0,Math.min(r.width,this._cursorPos.x+e*X0)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*X0)),this._positionCursor()}_getClientCoords(){let e=this._getTerminalHostElement();if(!e)return null;let t=e.getBoundingClientRect();return{clientX:t.left+this._cursorPos.x,clientY:t.top+this._cursorPos.y}}_resolveTarget(e,t){let n=this._getTerminalHostElement();if(!n)return document.body;let r=document.elementFromPoint(e,t);return r&&n.contains(r)?r:n.querySelector(`.xterm-screen`)??n}_dispatchMouse(e,t={}){let n=this._getClientCoords();if(!n)return;let r=t.button??0,i=t.detail??1,a=t.buttons??(e===`mousedown`?r===0?1:r===2?2:4:0);this._resolveTarget(n.clientX,n.clientY).dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:i,clientX:n.clientX,clientY:n.clientY,button:r,buttons:a}))}_dispatchClick(e){this._dispatchMouse(`mousedown`,{detail:e}),this._dispatchMouse(`mouseup`,{detail:e}),this._dispatchMouse(`click`,{detail:e})}_dispatchDblClick(){this._dispatchMouse(`mousedown`,{detail:2}),this._dispatchMouse(`mouseup`,{detail:2}),this._dispatchMouse(`click`,{detail:2}),this._dispatchMouse(`dblclick`,{detail:2})}_dispatchRightClick(){this._dispatchMouse(`mousedown`,{button:2}),this._dispatchMouse(`mouseup`,{button:2}),this._dispatchMouse(`contextmenu`,{button:2})}_dispatchWheel(e){let t=this._getClientCoords();t&&this._resolveTarget(t.clientX,t.clientY).dispatchEvent(new WheelEvent(`wheel`,{bubbles:!0,cancelable:!0,view:window,clientX:t.clientX,clientY:t.clientY,deltaY:e,deltaMode:WheelEvent.DOM_DELTA_PIXEL}))}_updateEdgeScroll(){let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=this._cursorPos.y<Z0,r=this._cursorPos.y>t.height-Z0;if(!n&&!r){this._stopEdgeScroll();return}this._stopEdgeScroll(),this._edgeScrollTimer=setInterval(()=>{let e=this._getTerminalHostElement();if(!e||!this._isDragging){this._stopEdgeScroll();return}let t=e.getBoundingClientRect(),n=t.left+this._cursorPos.x,r=this._cursorPos.y<Z0?t.top-Q0:t.bottom+Q0;this._resolveTarget(t.left+this._cursorPos.x,t.top+this._cursorPos.y).dispatchEvent(new MouseEvent(`mousemove`,{bubbles:!0,cancelable:!0,view:window,clientX:n,clientY:r,button:0,buttons:1}))},lCe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!$0())return;let e=this._terminal?.textarea;e&&e.setAttribute(`inputmode`,`none`)}_restoreKeyboard(){let e=this._terminal?.textarea;e&&e.removeAttribute(`inputmode`)}_on(e,t,n){e.addEventListener(t,n),this._cleanups.push(()=>e.removeEventListener(t,n))}_normalizeHistoryText(e){return e.replace(/[\r\n]+$/u,``).trim()||null}_renderHistory(e,t){if(e.querySelectorAll(`[data-input-history-root="true"]`).forEach(e=>e.remove()),t.length===0)return;let n=document.createElement(`div`);n.dataset.inputHistoryRoot=`true`,n.setAttribute(`slot`,`history`),n.style.display=`flex`,n.style.flexDirection=`column`,n.style.gap=`4px`,n.style.padding=`4px 0`;for(let e of t){let t=document.createElement(`button`);t.type=`button`,t.title=e.text,t.style.display=`flex`,t.style.alignItems=`center`,t.style.gap=`8px`,t.style.width=`100%`,t.style.padding=`4px 6px`,t.style.border=`1px solid transparent`,t.style.borderRadius=`4px`,t.style.background=`transparent`,t.style.color=`var(--foreground, #fff)`,t.style.fontFamily=`inherit`,t.style.fontSize=`12px`,t.style.textAlign=`left`;let r=document.createElement(`span`);r.textContent=new Date(e.time).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),r.style.opacity=`0.65`,r.style.fontSize=`10px`,r.style.flexShrink=`0`;let i=document.createElement(`span`);i.textContent=e.text,i.style.overflow=`hidden`,i.style.textOverflow=`ellipsis`,i.style.whiteSpace=`nowrap`,t.appendChild(r),t.appendChild(i),t.addEventListener(`click`,()=>{this._onInput(`${e.text}\n`)}),n.appendChild(t)}e.appendChild(n)}},o2=`xtermInputPanelSettings`,dCe=50,fCe=1e3,pCe=1,mCe=1,s2=`terminal-meta`;function c2(){return wc(`terminal-input-history`,window.location)}function hCe(){return wc(`openspecui-terminal`,window.location)}function l2(){return wc(`input-history`,window.location)}function u2(){return wc(`terminal-input-history-fallback`,window.location)}function d2(e){return Math.max(pCe,Math.min(fCe,Math.round(e)))}function f2(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){if(typeof n!=`object`||!n)continue;let e=n;if(typeof e.text!=`string`||typeof e.time!=`number`||!Number.isFinite(e.time))continue;let r=e.text.trim();r&&t.push({text:r,time:e.time})}return t}function p2(e,t){let n=new Map;for(let t of e){let e=`${t.time}::${t.text}`;n.has(e)||n.set(e,t)}return[...n.values()].sort((e,t)=>t.time-e.time).slice(0,d2(t))}function m2(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]?.text!==t[n]?.text||e[n]?.time!==t[n]?.time)return!1;return!0}function h2(){try{let e=localStorage.getItem(o2);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function gCe(e){let t=h2();try{localStorage.setItem(o2,JSON.stringify({...t,...e}))}catch{}}async function g2(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(hCe(),mCe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(s2)||e.createObjectStore(s2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function _Ce(){let e=await g2();return e?await new Promise(t=>{let n=e.transaction(s2,`readonly`),r=n.objectStore(s2).get(l2());r.onsuccess=()=>{t(f2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function vCe(e){let t=await g2();return t?await new Promise(n=>{let r=t.transaction(s2,`readwrite`);r.objectStore(s2).put(e,l2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function yCe(){try{let e=localStorage.getItem(u2());return e?f2(JSON.parse(e)):[]}catch{return[]}}function bCe(e){try{localStorage.setItem(u2(),JSON.stringify(e))}catch{}}async function xCe(){return await _Ce()||yCe()}async function _2(e){await vCe(e)||bCe(e)}var SCe=class{records=[];listeners=new Set;kvUnsubscribe=null;initPromise=null;subscribe(e){return this.listeners.add(e),this.ensureInitialized(),e(this.records),()=>{this.listeners.delete(e)}}async list(){return await this.ensureInitialized(),[...this.records]}getLimit(){let e=h2().historyLimit;return typeof e==`number`&&Number.isFinite(e)?d2(e):dCe}async setLimit(e){let t=d2(e);gCe({historyLimit:t}),await this.ensureInitialized();let n=p2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=p2([{text:t,time:Date.now()},...this.records],this.getLimit());await this.commit(n,{persistRemote:!0})}destroy(){this.kvUnsubscribe&&=(this.kvUnsubscribe(),null)}async ensureInitialized(){if(this.initPromise){await this.initPromise;return}this.initPromise=this.initialize(),await this.initPromise}async initialize(){if(this.records=p2(await xCe(),this.getLimit()),this.emit(),!Fc())try{let e=f2(await cm.kv.get.query({key:c2()})),t=p2([...this.records,...e],this.getLimit());m2(this.records,t)||(this.records=t,await _2(this.records),this.emit()),m2(e,this.records)||this.persistRemote(this.records);let n=cm.kv.subscribe.subscribe({key:c2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=f2(e),n=p2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){m2(this.records,e)||(this.records=e,await _2(this.records),this.emit(),t.persistRemote&&!Fc()&&this.persistRemote(this.records))}async persistRemote(e){try{await cm.kv.set.mutate({key:c2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},v2=[`xterm`,`ghostty`];function y2(e){return v2.includes(e)}var b2=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,CCe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},x2=1500,S2=1e3,wCe=1e4,C2=`common`,TCe=512*1024,ECe=8,DCe=32,w2=13,OCe=800,T2=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],E2=new Set;function D2(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function kCe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(E2.has(t))return D2(t);try{let e=(await fetch(t,{method:`HEAD`})).headers.get(`content-type`)??``;if(e.includes(`text/css`)){let e=document.createElement(`link`);return e.rel=`stylesheet`,e.href=t,e.dataset.fontSrc=t,document.head.appendChild(e),E2.add(t),``}if(e.startsWith(`font/`)){let e=D2(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),E2.add(t),e}}catch{}return t}function ACe(e){let t=`google:${e}`;if(E2.has(t))return;let n=navigator.language??``,r=/^zh\b/i.test(n)?`https://fonts.googleapis.cn`:`https://fonts.googleapis.com`,i=document.createElement(`link`);i.rel=`stylesheet`,i.href=`${r}/css2?family=${e.replace(/ /g,`+`)}&display=swap`,i.dataset.fontSrc=t,document.head.appendChild(i),E2.add(t)}var jCe=class{instances=new Map;listeners=new Set;idCounter=0;config={...CCe};snapshotCache=null;inputHistoryStore=new SCe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=S2;pendingCreates=[];pendingCloseSessionIds=new Set;serverToLocalSessionId=new Map;hasDiscoveredSessions=!1;inputPanelDefaultLayout=`floating`;createSession(e){let t=`term-${++this.idCounter}`,n=e?.label??`Shell ${this.idCounter}`,r=this.createTerminalInstance(t,{label:n,command:e?.command,args:e?.args,isDedicated:e?.isDedicated??!1,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,restored:!1,serverSessionId:null,platform:C2});return this.instances.set(t,r),this._applyFonts(),this.bindTerminalInput(r),this.wsConnected&&this.ws?this.wsSend({type:`create`,requestId:t,cols:r.terminal.cols||80,rows:r.terminal.rows||24,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl}):(this.pendingCreates.push({requestId:t,command:e?.command,args:e?.args,closeTip:e?.closeTip,closeCallbackUrl:e?.closeCallbackUrl,cols:r.terminal.cols||80,rows:r.terminal.rows||24}),this.ensureWsConnected()),this.notify(),t}createTerminalInstance(e,t){let{terminal:n,fitAddon:r,afterOpenHook:i,engine:a}=this.createRendererTerminal(),o=this.createInputPanelAddon(e,t.platform);return n.loadAddon(o),this.attachTerminalShortcuts(n,a),{id:e,serverSessionId:t.serverSessionId,terminal:n,fitAddon:r,inputPanelAddon:o,isConnected:!1,label:t.label,customTitle:null,processTitle:null,isDedicated:t.isDedicated,isExited:!1,exitCode:null,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,mountedContainer:null,resizeObserver:null,hasOpened:!1,afterOpenHook:i,pendingOutput:[],pendingOutputBytes:0,lastOutputTime:0,outputIdleTimer:null,restored:t.restored,platform:t.platform,rendererEngine:a}}getTerminalOptions(){return{cursorBlink:this.config.cursorBlink,cursorStyle:this.config.cursorStyle,fontSize:this.config.fontSize,fontFamily:b2,theme:{background:`transparent`},allowTransparency:!0,convertEol:!0,macOptionIsMeta:!0,macOptionClickForcesSelection:!0,scrollback:this.config.scrollback}}createRendererTerminal(){let e=this.getTerminalOptions();if(this.config.rendererEngine===`xterm`){let t=new w_e(e),n=new KW;return t.loadAddon(n),t.loadAddon(new QW),{terminal:t,fitAddon:n,afterOpenHook:null,engine:`xterm`}}let t=this.ghosttyModule;if(!t)throw Error(`ghostty-web is not initialized. Open Settings and switch engine again.`);let n=new t.Terminal(e),r=new t.FitAddon;return n.loadAddon(r),{terminal:n,fitAddon:r,afterOpenHook:()=>{let e=n;e.registerLinkProvider&&e.registerLinkProvider(new t.UrlRegexProvider(n))},engine:`ghostty`}}createInputPanelAddon(e,t){return new a2({onInput:t=>this.writeToSession(e,t),getHistory:async()=>this.inputHistoryStore.list(),addHistory:async e=>this.inputHistoryStore.add(e),subscribeHistory:e=>this.inputHistoryStore.subscribe(e),platform:t,defaultLayout:this.inputPanelDefaultLayout,showFab:!1,stateKey:e,onSettingsChange:async e=>{await this.inputHistoryStore.setLimit(e.historyLimit)}})}applyGhosttyBackground(e,t){if(e.rendererEngine!==`ghostty`)return;let n=this.resolveNearestOpaqueBackground(t),r=e.terminal.options.theme??{};e.terminal.options.allowTransparency=!1,e.terminal.options.theme={...r,background:n}}isTransparentColor(e){let t=e.trim().toLowerCase();return t.length===0||t===`transparent`||t===`rgba(0, 0, 0, 0)`||t===`rgba(0,0,0,0)`}resolveNearestOpaqueBackground(e){let t=e;for(;t;){let e=window.getComputedStyle(t).backgroundColor;if(!this.isTransparentColor(e))return e;t=t.parentElement}return`rgb(26, 26, 26)`}attachTerminalShortcuts(e,t){e.attachCustomKeyEventHandler(e=>{let n=e.metaKey||e.ctrlKey;if(e.type!==`keydown`||!n)return t===`xterm`;let r=!1;return(e.key===`=`||e.key===`+`)&&n&&(this.zoomFont(1),r=!0),e.key===`-`&&n&&!r&&(this.zoomFont(-1),r=!0),e.key===`0`&&n&&!r&&(this.resetFontSize(),r=!0),t===`xterm`?!r:r})}bindTerminalInput(e){e.terminal.onData(t=>{if(e.isExited){this.closeSession(e.id);return}let n=this.resolveServerSessionId(e.id);n&&this.wsSend({type:`input`,sessionId:n,data:t})})}isTerminalNotOpenedError(e){if(!(e instanceof Error))return!1;let t=e.message;return t.includes(`Terminal must be opened before use`)||t.includes(`Call terminal.open(parent) first`)}enqueuePendingOutput(e,t){if(t)for(e.pendingOutput.push(t),e.pendingOutputBytes+=t.length;e.pendingOutputBytes>TCe&&e.pendingOutput.length;){let t=e.pendingOutput.shift();if(!t)break;e.pendingOutputBytes-=t.length}}writeTerminalOutput(e,t){if(t){if(!e.hasOpened){this.enqueuePendingOutput(e,t);return}try{e.terminal.write(t)}catch(n){if(this.isTerminalNotOpenedError(n)){this.enqueuePendingOutput(e,t);return}console.error(`[terminal] failed to write output:`,n)}}}flushPendingOutput(e){if(!e.hasOpened||e.pendingOutput.length===0)return;let t=e.pendingOutput.join(``);e.pendingOutput=[],e.pendingOutputBytes=0,this.writeTerminalOutput(e,t)}replaceInstanceRenderer(e){let t=e.mountedContainer,n=e.serverSessionId;e.mountedContainer&&this.unmount(e.id),e.terminal.dispose();let{terminal:r,fitAddon:i,afterOpenHook:a,engine:o}=this.createRendererTerminal(),s=this.createInputPanelAddon(e.id,e.platform);r.loadAddon(s),this.attachTerminalShortcuts(r,o),e.terminal=r,e.fitAddon=i,e.inputPanelAddon=s,e.hasOpened=!1,e.afterOpenHook=a,e.mountedContainer=null,e.resizeObserver=null,e.rendererEngine=o,this.bindTerminalInput(e),t&&this.mount(e.id,t),n&&this.wsSend({type:`attach`,sessionId:n,cols:e.terminal.cols||80,rows:e.terminal.rows||24})}async ensureGhosttyModule(){return this.ghosttyModule?this.ghosttyModule:(this.ghosttyInitPromise||=J(()=>import(`./ghostty-web-vPHHRwzY.js`).then(async e=>(await e.init(),this.ghosttyModule=e,e)),[]).finally(()=>{this.ghosttyInitPromise=null}),this.ghosttyInitPromise)}async setRendererEngine(e){if(e!==this.config.rendererEngine){e===`ghostty`&&await this.ensureGhosttyModule(),this.config.rendererEngine=e;for(let e of this.instances.values())this.replaceInstanceRenderer(e);this._applyFonts(),this.notify()}}closeSession(e,t){let n=this.instances.get(e);if(!n)return;let r=t?.triggerCloseCallback!==!1;if(n.mountedContainer&&this.unmount(e),n.outputIdleTimer&&=(clearTimeout(n.outputIdleTimer),null),this.pendingCreates=this.pendingCreates.filter(t=>t.requestId!==e),n.serverSessionId){let e=n.serverSessionId;this.serverToLocalSessionId.delete(e),this.wsConnected&&this.ws?.readyState===WebSocket.OPEN?this.wsSend({type:`close`,sessionId:e}):this.pendingCloseSessionIds.add(e)}n.terminal.dispose(),r&&this.runCloseCallback(n),this.instances.delete(e),this.notify()}closeAll(){for(let e of this.instances.keys())this.closeSession(e,{triggerCloseCallback:!1})}mount(e,t){let n=this.instances.get(e);if(!n)return;if(n.mountedContainer===t){requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});return}if(n.mountedContainer&&this.unmount(e),!n.hasOpened)this.applyGhosttyBackground(n,t),n.terminal.open(t),n.hasOpened=!0,n.afterOpenHook?.(),n.afterOpenHook=null,this.flushPendingOutput(n),n.inputPanelAddon.attachListeners();else{let e=n.terminal.element;e&&!e.contains(t)&&e.parentNode!==t&&t.appendChild(e),this.flushPendingOutput(n),this.applyGhosttyBackground(n,t)}n.mountedContainer=t,requestAnimationFrame(()=>{try{n.fitAddon.fit()}catch{}});let r=new ResizeObserver(()=>{try{if(n.fitAddon.fit(),n.terminal.cols&&n.terminal.rows){let t=this.resolveServerSessionId(e);if(!t)return;this.wsSend({type:`resize`,sessionId:t,cols:n.terminal.cols,rows:n.terminal.rows})}}catch{}});r.observe(t),n.resizeObserver=r,requestAnimationFrame(()=>{this.focusSession(e)})}unmount(e){let t=this.instances.get(e);!t||!t.mountedContainer||(t.resizeObserver&&=(t.resizeObserver.disconnect(),null),t.mountedContainer=null)}focusSession(e){let t=this.instances.get(e);if(!t||!t.hasOpened)return;let n=!1;try{t.terminal.focus?.(),n=!0}catch{}if(!n){let e=t.terminal.element;if(e instanceof HTMLElement)try{e.focus()}catch{}}t.inputPanelAddon.syncFocusLifecycle()}setCustomTitle(e,t){let n=this.instances.get(e);n&&(n.customTitle=t,this.notify())}getDisplayTitle(e){let t=this.instances.get(e);return t?t.customTitle??t.processTitle??t.label:``}getConfig(){return{...this.config}}applyConfig(e){let{rendererEngine:t,...n}=e;Object.assign(this.config,n);for(let e of this.instances.values()){let t=e.terminal;t.options.fontSize=this.config.fontSize,t.options.cursorBlink=this.config.cursorBlink,t.options.cursorStyle=this.config.cursorStyle,t.options.scrollback=this.config.scrollback}this._applyFonts(),t&&t!==this.config.rendererEngine&&this.setRendererEngine(t).catch(e=>{console.error(`[terminal] failed to switch renderer engine:`,e)}),this.notify()}async _applyFonts(){let e=this.config.fontFamily;if(!e){this._setFontFamily(b2);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(T2.includes(e))ACe(e),n.push(e);else{let t=await kCe(e);t&&n.push(t)}n.push(b2),this._setFontFamily(n.join(`, `))}_setFontFamily(e){for(let t of this.instances.values())if(t.terminal.options.fontFamily=e,t.mountedContainer)try{t.fitAddon.fit()}catch{}}configPersistTimer=null;persistFontSize(){this.configPersistTimer&&clearTimeout(this.configPersistTimer),this.configPersistTimer=setTimeout(()=>{this.configPersistTimer=null,J(async()=>{let{trpcClient:e}=await import(`./trpc-DhmVhQ6w.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},OCe)}zoomFont(e){let t=Math.min(DCe,Math.max(ECe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==w2&&(this.applyConfig({fontSize:w2}),this.persistFontSize())}writeToSession(e,t){let n=this.resolveServerSessionId(e);return n?this.wsSend({type:`input`,sessionId:n,data:t}):!1}openInputPanel(e){let t=[e?this.instances.get(e):void 0,...this.instances.values()],n=t.find(e=>e&&e.mountedContainer)?.id??t.find(e=>e)?.id;if(!n)return!1;this.focusSession(n);let r=this.instances.get(n);return r?(r.inputPanelAddon.open(),!0):!1}async addInputHistory(e){await this.inputHistoryStore.add(e)}resolveServerSessionId(e){let t=this.instances.get(e);return t?t.serverSessionId:null}getInstanceByServerSessionId(e){let t=this.serverToLocalSessionId.get(e)??e;return this.instances.get(t)}getLocalSessionIdByServerSessionId(e){return this.serverToLocalSessionId.get(e)??e}handleCreatedResponse(e){let t=this.instances.get(e.requestId);if(!t){this.wsSend({type:`close`,sessionId:e.sessionId});return}t.serverSessionId=e.sessionId,t.platform=e.platform,t.inputPanelAddon.setPlatform(e.platform),t.isConnected=!0,this.serverToLocalSessionId.set(e.sessionId,e.requestId),this.notify()}handleOutputResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(this.writeTerminalOutput(t,e.data),t.lastOutputTime=Date.now(),this.notify(),t.outputIdleTimer&&clearTimeout(t.outputIdleTimer),t.outputIdleTimer=setTimeout(()=>{t.outputIdleTimer=null,this.notify()},x2))}handleExitResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);if(t){if(t.isExited=!0,t.exitCode=e.exitCode,t.closeTip||t.isDedicated){let n=t.closeTip??`Press any key to close (equivalent to close action).`;this.writeTerminalOutput(t,`\r\n\x1b[90m[Process exited with code ${e.exitCode}. ${n}]\x1b[0m`)}this.notify()}}handleTitleResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);t&&(t.processTitle=e.title,this.notify())}handleBufferResponse(e){let t=this.getInstanceByServerSessionId(e.sessionId);!t||!e.data||this.writeTerminalOutput(t,e.data)}handleErrorResponse(e){if(e.code===`PTY_CREATE_FAILED`&&e.sessionId){let t=this.instances.get(e.sessionId);t&&!t.serverSessionId&&(t.isExited=!0,t.exitCode=-1,this.writeTerminalOutput(t,`\r\n\x1b[31m[Failed to start PTY: ${e.message}]\x1b[0m`),this.notify())}console.warn(`[pty] ${e.code}: ${e.message}`,e)}setInputPanelMountTarget(e){a2.mountTarget=e}setInputPanelDefaultLayout(e){this.inputPanelDefaultLayout=e;for(let t of this.instances.values())t.inputPanelAddon.setDefaultLayout(e)}getTerminalDimensions(e){let t=this.instances.get(e);return t?{cols:t.terminal.cols||80,rows:t.terminal.rows||24}:null}subscribe(e){return this.listeners.add(e),this.ensureWsConnected(),()=>{this.listeners.delete(e)}}getSnapshot(){if(this.snapshotCache)return this.snapshotCache;let e=[];for(let t of this.instances.values())e.push({id:t.id,label:t.label,customTitle:t.customTitle,processTitle:t.processTitle,displayTitle:t.customTitle??t.processTitle??t.label,isDedicated:t.isDedicated,isExited:t.isExited,exitCode:t.exitCode,outputActive:t.lastOutputTime>0&&Date.now()-t.lastOutputTime<x2,command:t.command,args:t.args,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,platform:t.platform});return this.snapshotCache={sessions:e},this.snapshotCache}notify(){this.snapshotCache=null;for(let e of this.listeners)e()}ensureWsConnected(){this.ws&&(this.ws.readyState===WebSocket.CONNECTING||this.ws.readyState===WebSocket.OPEN)||this.connectSharedWebSocket()}connectSharedWebSocket(){this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null);let e=new WebSocket(Ac());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=S2;for(let e of this.pendingCloseSessionIds)this.wsSend({type:`close`,sessionId:e});this.pendingCloseSessionIds.clear(),this.wsSend({type:`list`});for(let e of this.pendingCreates)this.wsSend({type:`create`,requestId:e.requestId,cols:e.cols,rows:e.rows,command:e.command,args:e.args,closeTip:e.closeTip,closeCallbackUrl:e.closeCallbackUrl});this.pendingCreates=[];for(let e of this.instances.values())if(!e.restored)continue;this.notify()},e.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=VW.safeParse(t);n.success&&this.handleServerMessage(n.data)},e.onclose=()=>{this.wsConnected=!1,this.ws=null,this.notify(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,(this.listeners.size>0||this.instances.size>0)&&this.connectSharedWebSocket()},this.reconnectDelay),this.reconnectDelay=Math.min(this.reconnectDelay*1.5,wCe)},e.onerror=()=>{}}handleServerMessage(e){switch(e.type){case`list`:this.handleListResponse(e);break;case`created`:this.handleCreatedResponse(e);break;case`buffer`:this.handleBufferResponse(e);break;case`output`:this.handleOutputResponse(e);break;case`exit`:this.handleExitResponse(e);break;case`title`:this.handleTitleResponse(e);break;case`error`:this.handleErrorResponse(e);break}}handleListResponse(e){let t=new Set(e.sessions.map(e=>e.id));for(let t of e.sessions){let e=this.getLocalSessionIdByServerSessionId(t.id),n=this.instances.get(e);if(n)n.serverSessionId||=t.id;else{let e=t.title||`${t.command} ${t.args.join(` `)}`.trim();n=this.createTerminalInstance(t.id,{label:e.length>40?`${e.slice(0,37)}...`:e,command:t.command,args:t.args,isDedicated:!1,closeTip:t.closeTip,closeCallbackUrl:t.closeCallbackUrl,restored:!0,serverSessionId:t.id,platform:t.platform??C2}),t.isExited&&(n.isExited=!0,n.exitCode=t.exitCode),this.bindTerminalInput(n),this.instances.set(n.id,n),this._applyFonts()}n.closeTip=t.closeTip,n.closeCallbackUrl=t.closeCallbackUrl,n.platform=t.platform??C2,n.inputPanelAddon.setPlatform(n.platform),this.serverToLocalSessionId.set(t.id,n.id),this.wsSend({type:`attach`,sessionId:t.id,cols:n.terminal.cols||80,rows:n.terminal.rows||24})}for(let e of this.instances.values())e.restored&&e.serverSessionId&&!t.has(e.serverSessionId)&&!e.isExited&&(e.isExited=!0,e.exitCode=-1);this.hasDiscoveredSessions=!0,this.notify()}get discoveredSessions(){return this.hasDiscoveredSessions}runCloseCallback(e){if(!e.isExited)return;let t=MCe(e.closeCallbackUrl,e.exitCode);t&&NCe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function MCe(e,t){if(!e)return null;if(typeof e==`string`){let t=e.trim();return t.length>0?t:null}let n=e[t==null?`null`:String(t)];if(typeof n==`string`&&n.trim().length>0)return n.trim();let r=e[`*`];return typeof r==`string`&&r.trim().length>0?r.trim():null}function NCe(e){let t;try{t=new URL(e,window.location.origin)}catch{return}if(t.origin===window.location.origin){let e=`${t.pathname}${t.search}${t.hash}`,n=Ol.getAreaForPath(t.pathname);Ol.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}var O2=new jCe,k2=(0,K.createContext)(null);function PCe({children:e}){let t=Fc(),n=(0,K.useSyncExternalStore)(e=>O2.subscribe(e),()=>O2.getSnapshot(),()=>O2.getSnapshot()),[r,i]=(0,K.useState)(null),a=(0,K.useCallback)(e=>{if(t)return``;let n=O2.createSession(e);return i(n),n},[t]),o=(0,K.useCallback)((e,n,r)=>{if(t)return``;let a=`${e} ${n.join(` `)}`.trim(),o=O2.createSession({label:a.length>40?`${a.slice(0,37)}...`:a,command:e,args:n,isDedicated:!0,closeTip:r?.closeTip,closeCallbackUrl:r?.closeCallbackUrl});return i(o),o},[t]),s=(0,K.useCallback)(e=>{O2.closeSession(e),i(t=>t===e?null:t)},[]),c=(0,K.useCallback)(e=>{i(e),O2.focusSession(e)},[]),l=(0,K.useCallback)((e,t)=>{},[]),u=(0,K.useCallback)((e,t)=>{O2.setCustomTitle(e,t)},[]),d=n.sessions,f=(0,K.useMemo)(()=>r&&d.some(e=>e.id===r)?r:d[d.length-1]?.id??null,[r,d]);(0,K.useEffect)(()=>{f&&O2.focusSession(f)},[f]);let p=(0,K.useRef)(!1);(0,K.useEffect)(()=>{p.current||d.length!==0&&O2.discoveredSessions&&(p.current=!0,i(e=>e??d[0].id))},[d]);let{data:m}=X_();return(0,K.useEffect)(()=>{if(!m?.terminal)return;let{rendererEngine:e,...t}=m.terminal;e&&y2(e)?O2.setRendererEngine(e).catch(e=>{console.error(`[terminal] failed to apply renderer engine from config:`,e)}):e&&console.error(`[terminal] invalid renderer engine in config:`,e),O2.applyConfig(t)},[m?.terminal]),(0,q.jsx)(k2,{value:(0,K.useMemo)(()=>({sessions:d,activeSessionId:f,createSession:a,createDedicatedSession:o,closeSession:s,setActiveSession:c,markExited:l,setCustomTitle:u}),[d,f,a,o,s,c,l,u]),children:e})}function A2(){let e=(0,K.useContext)(k2);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}var FCe=`schema: spec-driven
1370
1370
 
1371
1371
  context: |
1372
1372
 
@@ -1389,7 +1389,7 @@ rules:
1389
1389
  )`}return(0,q.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function q7(e,t){e&&Object.assign(e.style,t)}var J7={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},Bke={position:`fixed`},Vke=K.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=zTe,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=x7(),D=S7(),O=E5(v,P7.open),k=E5(v,P7.mounted),A=E5(v,P7.modal),j=E5(v,P7.value),M=E5(v,P7.openMethod),N=E5(v,P7.positionerElement),P=E5(v,P7.triggerElement),F=E5(v,P7.isItemEqualToValue),I=E5(v,P7.transitionStatus),L=K.useRef(null),R=K.useRef(null),[z,B]=K.useState(h),ee=k&&z&&M!==`touch`;!k&&z!==h&&B(h),R4(()=>{k||(P7.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),P7.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),K.useImperativeHandle(x,()=>ee),Nke((ee||A)&&O&&M!==`touch`,P);let V=s7({anchor:n,floatingRootContext:D,positionMethod:r,mounted:k,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ee,collisionAvoidance:g,keepMounted:!0}),te=ee?`none`:V.side,H=ee?Bke:V.positionerStyles,ne=K.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...H,...e}}},[O,k,H]),re={open:O,side:te,align:V.align,anchorHidden:V.anchorHidden},ie=N8(`div`,e,{ref:[t,$6(e=>{v.set(`positionerElement`,e)})],state:re,stateAttributesMapping:e7,props:[ne,l7(I),_]}),U=K.useRef(0),ae=$6(e=>{if(e.size===0&&U.current===0||C.current.length===0)return;let t=U.current;if(U.current=e.size,e.size===t)return;let n=q6(B6);if(t!==0&&!v.state.multiple&&j!==null&&k7(C.current,j,F)===-1){let e=w.current,t=e!=null&&k7(C.current,e,F)!==-1?e:null;E(t,n),t===null&&(v.set(`selectedIndex`,null),S.current=null)}if(t!==0&&v.state.multiple&&Array.isArray(j)){let e=e=>k7(C.current,e,F)!==-1,t=j.filter(t=>e(t));(t.length!==j.length||t.some(e=>!rke(j,e,F)))&&(E(t,n),t.length===0&&(v.set(`selectedIndex`,null),S.current=null))}if(O&&ee){v.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};q7(N,e),q7(T.current,e)}}),oe=K.useMemo(()=>({...V,side:te,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:B,scrollUpArrowRef:L,scrollDownArrowRef:R}),[V,te,ee,B]);return(0,q.jsx)(Fke,{elementsRef:y,labelsRef:b,onMapChange:ae,children:(0,q.jsxs)(G7.Provider,{value:oe,children:[k&&A&&(0,q.jsx)(zke,{inert:UOe(!O),cutout:P}),ie]})})});function Y7(e){let t=e.currentTarget.getBoundingClientRect();return t.top+1<=e.clientY&&e.clientY<=t.bottom-1&&t.left+1<=e.clientX&&e.clientX<=t.right-1}var X7=`base-ui-disable-scrollbar`,Z7={className:X7,getElement(e){return(0,q.jsx)(`style`,{nonce:e,href:X7,precedence:`base-ui:low`,children:`.${X7}{scrollbar-width:none}.${X7}::-webkit-scrollbar{display:none}`})}},Hke=K.createContext(void 0);function Uke(e){let t=K.useContext(Hke);if(t===void 0&&!e)throw Error(z4(69));return t}var Q7=`ArrowUp`,$7=`ArrowDown`,e9=`ArrowLeft`,t9=`ArrowRight`,n9=`Home`,Wke=new Set([e9,t9]),Gke=new Set([Q7,$7]),Kke=new Set([...Wke,...Gke]);new Set([...Kke,n9,`End`]);var qke=new Set([Q7,$7,e9,t9,n9,`End`]);function r9(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Jke=K.createContext(void 0),Yke={disableStyleElements:!1};function Xke(){return K.useContext(Jke)??Yke}var i9=1,Zke={...e7,...M5},Qke=K.forwardRef(function(e,t){let{render:n,className:r,finalFocus:i,...a}=e,{store:o,popupRef:s,onOpenChangeComplete:c,setOpen:l,valueRef:u,selectedItemTextRef:d,keyboardActiveRef:f,multiple:p,handleScrollArrowVisibility:m,scrollHandlerRef:h,highlightItemOnHover:g}=x7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:b,scrollDownArrowRef:x,scrollUpArrowRef:S}=K7(),C=Uke(!0)!=null,w=S7(),{nonce:T,disableStyleElements:E}=Xke(),D=G4(),O=E5(o,P7.id),k=E5(o,P7.open),A=E5(o,P7.mounted),j=E5(o,P7.popupProps),M=E5(o,P7.transitionStatus),N=E5(o,P7.triggerElement),P=E5(o,P7.positionerElement),F=E5(o,P7.listElement),I=K.useRef(0),L=K.useRef(!1),R=K.useRef(0),z=K.useRef(!1),B=K.useRef({}),ee=r8(),V=$6(e=>{if(!P||!s.current||!z.current)return;if(L.current||!y){m();return}let t=P.style.top===`0px`,n=P.style.bottom===`0px`,r=P.getBoundingClientRect().height,i=D6(P),a=getComputedStyle(P),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=a9(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=o9(e),p=0,h=null,g=!1,_=!1,v=e=>{P.style.height=`${e}px`},b=(t,n)=>{let i=r9(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=i9&&(L.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=i9){b(e,f);return}u-n>i9?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=i9){b(e,0);return}u-n>i9?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=o9(e),n=_?t:r9(h,0,t);Math.abs(e.scrollTop-n)>i9&&(e.scrollTop=n)}(g||p>=u-i9)&&(L.current=!0),m()});K.useImperativeHandle(h,()=>V,[V]),N5({open:k,ref:s,onComplete(){k&&c?.(!0)}});let te={open:k,transitionStatus:M,side:_,align:v};R4(()=>{!P||!s.current||Object.keys(B.current).length||(B.current={top:P.style.top||`0`,left:P.style.left||`0`,right:P.style.right,height:P.style.height,bottom:P.style.bottom,minHeight:P.style.minHeight,maxHeight:P.style.maxHeight,marginTop:P.style.marginTop,marginBottom:P.style.marginBottom})},[s,P]),R4(()=>{k||y||(z.current=!1,L.current=!1,I.current=0,R.current=0,q7(P,B.current))},[k,y,P,s]),R4(()=>{let e=s.current;if(!(!k||!N||!P||!e||o.state.transitionStatus===`ending`)){if(!y){z.current=!0,ee.request(m),e.style.removeProperty(`--transform-origin`);return}queueMicrotask(()=>{let t=eAe(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(P),n=getComputedStyle(e),r=D6(N),i=J4(P),a=$ke(N),o=s9(N.getBoundingClientRect(),a),s=s9(P.getBoundingClientRect(),a),c=o.left,l=o.height,f=F||e,p=f.scrollHeight,h=parseFloat(n.borderBottomWidth),g=parseFloat(t.marginTop)||10,_=parseFloat(t.marginBottom)||10,v=parseFloat(t.minHeight)||100,y=a9(n),x=r.documentElement.clientHeight-g-_,S=r.documentElement.clientWidth,C=x-o.bottom+l,w=d.current,T=u.current,E,D=0,O=0;if(w&&T){let e=s9(T.getBoundingClientRect(),a);E=s9(w.getBoundingClientRect(),a);let t=e.left-c,n=E.left-s.left,r=e.top-o.top+e.height/2,i=E.top-s.top+E.height/2;D=t-n,O=i-r}let k=C+O+_+h,A=Math.min(x,k),j=x-g-_,M=k-A,R=Math.max(5,c+D),ee=S-5,V=Math.max(0,R+s.width-ee);P.style.left=`${R-V}px`,P.style.height=`${A}px`,P.style.maxHeight=`auto`,P.style.marginTop=`${g}px`,P.style.marginBottom=`${_}px`,e.style.height=`100%`;let te=o9(f),H=M>=te-i9;H&&(A=Math.min(x,s.height)-(M-te));let ne=o.top<20||o.bottom>x-20||Math.ceil(A)+i9<Math.min(p,v),re=(i.visualViewport?.scale??1)!==1&&_3;if(ne||re){z.current=!0,q7(P,B.current),Ms.flushSync(()=>b(!1));return}if(H){let e=Math.max(0,x-k);P.style.top=s.height>=j?`0`:`${e}px`,P.style.height=`${A}px`,f.scrollTop=o9(f),I.current=Math.max(v,A)}else P.style.bottom=`0`,I.current=Math.max(v,A),f.scrollTop=M;if(E){let t=s.top,n=s.height,r=E.top+E.height/2,i=r9(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(I.current===x||A>=y)&&(L.current=!0),m(),setTimeout(()=>{z.current=!0})}finally{t()}})}},[o,k,P,N,u,d,s,m,y,b,ee,x,S,F]),K.useEffect(()=>{if(!y||!P||!k)return;let e=J4(P);function t(e){l(!1,q6(qTe,e))}return e.addEventListener(`resize`,t),()=>{e.removeEventListener(`resize`,t)}},[l,y,P,k]);let H={...F?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":p||void 0,id:`${O}-list`},onKeyDown(e){f.current=!0,C&&qke.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||Y7(e)||e.pointerType===`touch`)return;let t=e.currentTarget;D.start(0,()=>{o.set(`activeIndex`,null),t.focus({preventScroll:!0})})},onScroll(e){F||V(e.currentTarget)},...y&&{style:F?{height:`100%`}:J7}},ne=N8(`div`,e,{ref:[t,s],state:te,stateAttributesMapping:Zke,props:[j,H,l7(M),{className:!F&&y?Z7.className:void 0},a]});return(0,q.jsxs)(K.Fragment,{children:[!E&&Z7.getElement(T),(0,q.jsx)(AEe,{context:w,modal:!1,disabled:!A,returnFocus:i,restoreFocus:!0,children:ne})]})});function a9(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function o9(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function $ke(e){return u5.getScale(e)}function s9(e,t){return r6({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var c9=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function eAe(e){let{style:t}=e,n={};for(let[e,r]of c9)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of c9){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var tAe=K.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=x7(),{alignItemWithTriggerActive:s}=K7(),c=E5(a,P7.hasScrollArrows),l=E5(a,P7.openMethod),u=E5(a,P7.multiple),d={id:`${E5(a,P7.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:J7},className:c&&l!==`touch`?Z7.className:void 0};return N8(`div`,e,{ref:[t,$6(e=>{a.set(`listElement`,e)})],props:[d,i]})}),l9=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function nAe(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=Pke(),f=K.useRef(-1),[p,m]=K.useState(a??(i===l9.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=K.useRef(null),g=K.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return R4(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),R4(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),K.useMemo(()=>({ref:g,index:p}),[p,g])}var u9=K.createContext(void 0);function d9(){let e=K.useContext(u9);if(!e)throw Error(z4(57));return e}var rAe=K.memo(K.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=K.useRef(null),u=nAe({label:a,textRef:l,indexGuessBehavior:l9.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=x7(),x=G4(),S=E5(d,P7.isActive,u.index),C=E5(d,P7.isSelected,u.index,i),w=E5(d,P7.isSelectedByFocus,u.index),T=E5(d,P7.isItemEqualToValue),E=u.index,D=E!==-1,O=K.useRef(null),k=Z6(E);R4(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),R4(()=>{if(!D)return;let e=d.state.value,t=e;y&&Array.isArray(e)&&e.length>0&&(t=e[e.length-1]),t!==void 0&&O7(i,t,T)&&d.set(`selectedIndex`,E)},[D,E,y,T,d,i]);let A={disabled:o,selected:C,highlighted:S},j=f({active:S,selected:C});j.onFocus=void 0,j.id=void 0;let M=K.useRef(null),N=K.useRef(`mouse`),P=K.useRef(!1),{getButtonProps:F,buttonRef:I}=L7({disabled:o,focusableWhenDisabled:!0,native:s,composite:!0});function L(e){let t=d.state.value;if(y){let n=Array.isArray(t)?t:[];m(C?ike(n,i,T):[...n,i],q6(W6,e))}else m(i,q6(W6,e)),p(!1,q6(W6,e))}let R={role:`option`,"aria-selected":C,tabIndex:S?0:-1,onFocus(){d.set(`activeIndex`,E)},onMouseEnter(){!v.current&&d.state.selectedIndex===null&&b&&d.set(`activeIndex`,E)},onMouseMove(){b&&d.set(`activeIndex`,E)},onMouseLeave(e){!b||v.current||Y7(e)||x.start(0,()=>{d.state.activeIndex===E&&d.set(`activeIndex`,null)})},onTouchStart(){h.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},onKeyDown(e){M.current=e.key,d.set(`activeIndex`,E),e.key===` `&&g.current&&e.preventDefault()},onClick(e){P.current=!1,!(e.type===`keydown`&&M.current===null)&&(o||e.type===`keydown`&&M.current===` `&&g.current||N.current!==`touch`&&!S||(M.current=null,L(e.nativeEvent)))},onPointerEnter(e){N.current=e.pointerType},onPointerDown(e){N.current=e.pointerType,P.current=!0},onMouseUp(){if(o)return;if(P.current){P.current=!1;return}let e=!h.current.allowSelectedMouseUp&&C,t=!h.current.allowUnselectedMouseUp&&!C;e||t||N.current!==`touch`&&!S||O.current?.click()}},z=N8(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,R,c,F]}),B=K.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,q.jsx)(u9.Provider,{value:B,children:z})})),iAe=K.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=d9();return n||r?(0,q.jsx)(aAe,{...e,ref:t}):null}),aAe=K.memo(K.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=d9(),s=K.useRef(null),{transitionStatus:c,setMounted:l}=A5(o),u=N8(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:M5});return N5({open:o,ref:s,onComplete(){o||l(!1)}}),u})),oAe=K.memo(K.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=d9(),{selectedItemTextRef:o}=x7(),{className:s,render:c,...l}=e;return N8(`div`,e,{ref:[K.useCallback(e=>{if(!e||!a)return;let t=o.current===null||!o.current.isConnected;(i||t&&n.current===0)&&(o.current=e)},[o,n,i,a]),t,r],props:l})}));function f9({value:e,options:t,onValueChange:n,ariaLabel:r,placeholder:i=`Select…`,renderTrigger:a,className:o,popupClassName:s,listClassName:c,itemClassName:l,positionerClassName:u,sideOffset:d=8,modal:f=!1}){let p=t.find(t=>t.value===e);return(0,q.jsxs)(pke,{value:e,modal:f,onValueChange:e=>{e!==null&&n(e)},children:[(0,q.jsx)(Ske,{"aria-label":r,className:e=>j4(`text-foreground inline-flex min-w-0 items-center gap-1.5 text-xs outline-none transition-colors`,`focus-visible:ring-ring/60 focus-visible:ring-2`,e.open?`bg-muted/40`:``,o),children:a?a({selectedOption:p}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(wke,{placeholder:i,className:`truncate`,children:()=>p?.label??i}),(0,q.jsx)(Tke,{className:`text-muted-foreground flex shrink-0`,children:(0,q.jsx)(Gl,{className:`h-3.5 w-3.5`})})]})}),(0,q.jsx)(Dke,{children:(0,q.jsx)(Vke,{sideOffset:d,className:j4(`z-50 select-none outline-none`,u),children:(0,q.jsx)(Qke,{className:j4(`bg-card text-foreground border-border w-max min-w-28 rounded-md border p-1 shadow-lg`,`origin-(--transform-origin) transition-[transform,opacity] duration-150`,`data-[ending-style]:translate-y-0.5 data-[ending-style]:opacity-0`,`data-[starting-style]:translate-y-0.5 data-[starting-style]:opacity-0`,s),children:(0,q.jsx)(tAe,{className:j4(`max-h-64 overflow-y-auto py-0.5`,c),children:t.map(e=>(0,q.jsxs)(rAe,{value:e.value,disabled:e.disabled,label:typeof e.label==`string`?e.label:void 0,className:e=>j4(`grid cursor-default grid-cols-[0.8rem_minmax(0,1fr)] items-center gap-1.5 rounded-sm px-2 py-1.5 text-xs outline-none`,e.highlighted&&`bg-muted text-foreground`,e.selected&&`text-foreground`,e.disabled&&`opacity-50`,l),children:[(0,q.jsx)(iAe,{className:`text-primary flex h-3.5 w-3.5 items-center justify-center`,children:(0,q.jsx)(Wl,{className:`h-3.5 w-3.5`})}),(0,q.jsx)(oAe,{className:`whitespace-nowrap`,children:e.label})]},e.value))})})})})]})}function sAe(e){return e.type===`commit`?{type:`commit`,hash:e.hash}:{type:`uncommitted`}}function cAe(e){return e.type===`commit`?`/git/commit/${e.hash}`:`/git/uncommitted`}function p9(e){return cAe(sAe(e))}function lAe(e){let{handoff:t,location:n}=e,r=new URL(n.href);if(Cc({pathname:n.pathname,search:n.search}).hosted)return r.searchParams.set(`api`,t.serverUrl),r.toString();let i=new URL(t.serverUrl);return i.pathname=r.pathname,i.search=r.search,i.hash=r.hash,i.toString()}function uAe(){return Y_((0,K.useCallback)(e=>cm.dashboard.subscribe.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),Ete,[],`dashboard.subscribe`)}function dAe(){return{running:!1,inFlight:0,lastStartedAt:null,lastFinishedAt:null,lastReason:null,lastError:null}}function m9(){return Y_((0,K.useCallback)(e=>cm.dashboard.subscribeGitTaskStatus.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),async()=>dAe(),[],`dashboard.subscribeGitTaskStatus`)}async function h9(e){Fc()||await cm.dashboard.refreshGitSnapshot.mutate({reason:e})}async function g9(e){Fc()||await cm.dashboard.removeDetachedWorktree.mutate({path:e})}var fAe=[`proposal`,`design`,`specs`,`tasks`],pAe=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function mAe(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function hAe(e){return{specifications:{state:`ok`},requirements:{state:`ok`},activeChanges:{state:`invalid`,reason:`objective-history-unavailable`},inProgressChanges:{state:`invalid`,reason:`objective-history-unavailable`},completedChanges:{state:`ok`},taskCompletionPercent:{state:`invalid`,reason:e===null?`semantic-uncomputable`:`objective-history-unavailable`}}}function gAe(){return{specifications:`monotonic`,requirements:`monotonic`,activeChanges:`bidirectional`,inProgressChanges:`bidirectional`,completedChanges:`monotonic`,taskCompletionPercent:`bidirectional`}}function _Ae(e){return e?e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function vAe(e,t){if(e!==`spec-driven`)return t;let n=new Map;for(let[e,t]of fAe.entries())n.set(t,e);return[...t].sort((e,t)=>{let r=n.get(e),i=n.get(t);return r!==void 0&&i!==void 0?r-i:r===void 0?i===void 0?e.localeCompare(t):1:-1})}function yAe(e,t,n){let r=new Map;for(let t of e){let e=t.schemaName||`unknown`,n=r.get(e);n?n.push(t):r.set(e,[t])}let i=new Map;for(let e of t)i.set(e.schemaName,e.artifactIds);return[...new Set([...t.map(e=>e.schemaName),...r.keys()])].map(e=>{let t=r.get(e)??[],a=[...i.get(e)??[]],o=new Set;for(let e of a)o.add(e);for(let e of t)for(let t of e.artifacts)o.has(t.id)||(o.add(t.id),a.push(t.id));let s=vAe(e,a).map(e=>{let n=0,r=0,i=0;for(let a of t){let t=a.artifacts.find(t=>t.id===e);t&&(t.status===`done`&&(n+=1),t.status===`ready`&&(r+=1),t.status===`blocked`&&(i+=1))}return{id:e,label:_Ae(e),draft:n,ready:r,blocked:i}});return{schemaName:e,readyToArchive:t.filter(e=>e.isComplete&&n.has(e.changeName)).length,steps:s}}).sort((e,t)=>e.schemaName===`spec-driven`?-1:t.schemaName===`spec-driven`?1:e.schemaName.localeCompare(t.schemaName))}function bAe(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)|0;return Math.abs(t)%360}function xAe(e){let t=bAe(e),n=`oklch(0.97 0.016 ${t})`,r=`oklch(0.44 0.1 ${t})`;return{border:`oklch(0.84 0.06 ${t})`,background:n,text:r,arrow:`color-mix(in oklab, ${n} 90%, ${r})`}}function SAe(){let e=Fc(),{data:t,isLoading:n,error:r}=uAe(),{data:i}=m9(),{data:a}=uH(),{data:o}=lH(),[s,c]=(0,K.useState)(()=>U2()),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(()=>Date.now()),[p,m]=(0,K.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[h,g]=(0,K.useState)(null),_=(0,K.useCallback)(()=>{Ol.activatePop(`/opsx-propose`)},[]),v=(0,K.useCallback)(()=>{Ol.activatePop(`/opsx-new`)},[]),y=(0,K.useCallback)(async e=>h9(e),[]),b=(0,K.useRef)(0),[x,S]=(0,K.useState)(null),C=(0,K.useRef)(null),w=(0,K.useRef)(i),T=(0,K.useRef)(h),E=h?.reason??null,D=(0,K.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),O=(0,K.useCallback)(e=>{let t=Date.now();g({reason:e,requestedAt:t}),y(e).then(()=>{w.current?.running||g(n=>n?.reason===e&&n.requestedAt===t?null:n)}).catch(n=>{console.error(`[Dashboard] Failed to refresh git snapshot:`,n),g(n=>n?.reason===e&&n.requestedAt===t?null:n)})},[y]),k=(0,K.useCallback)(()=>{D();let t=G2(s),n=s===`none`?null:K2(s);if(e||t===null||n===null||h!==null||!p){u(null);return}let r=Date.now();u(r),f(r),C.current=window.setTimeout(()=>{C.current=null,u(null),f(Date.now()),O(n)},t)},[D,s,h,p,O,e]),A=(0,K.useCallback)(()=>{D(),u(null),f(Date.now()),O(`manual-button`)},[D,O]),j=(0,K.useCallback)(async e=>{if(!(Fc()||e.isCurrent||!e.detached||f7(e.path))&&window.confirm([`Remove detached worktree?`,``,e.path,``,`This runs git worktree remove --force.`].join(`
1390
1390
  `))){S(e.path);try{await g9(e.path)}catch(e){console.error(`[Dashboard] Failed to remove detached worktree:`,e),window.alert(e instanceof Error?e.message:`Failed to remove detached worktree.`)}finally{S(t=>t===e.path?null:t)}}},[]);(0,K.useEffect)(()=>{T.current=h},[h]),(0,K.useEffect)(()=>{if(e)return;let t=e=>{if(T.current!==null)return;let t=Date.now();t-b.current<700||(b.current=t,D(),u(null),f(Date.now()),O(e))},n=()=>{t(`window-focus`)},r=()=>{let e=document.visibilityState===`visible`;m(e),e&&t(`document-visible`)};return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),t(`dashboard-mount`),()=>{window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[D,O,e]),(0,K.useEffect)(()=>{w.current=i},[i]),(0,K.useEffect)(()=>{!h||!i||i.running===!1&&(i.lastFinishedAt??0)>=h.requestedAt&&g(e=>e?.reason===h.reason&&e.requestedAt===h.requestedAt?null:e)},[h,i]),(0,K.useEffect)(()=>{e||W2(s)},[s,e]),(0,K.useEffect)(()=>{if(!e)return k(),()=>{D()}},[D,k,e]),(0,K.useEffect)(()=>{let t=G2(s);if(e||t===null||l===null)return;let n=()=>{f(Date.now())};n();let r=window.setInterval(n,250);return()=>{window.clearInterval(r)}},[l,s,e]);let M=t?.activeChanges??[],N=(0,K.useMemo)(()=>new Set(M.map(e=>e.id)),[M]),P=(0,K.useMemo)(()=>(a??[]).filter(e=>N.has(e.changeName)),[a,N]),F=(0,K.useMemo)(()=>{let e=o?.schemas??[],t=o?.schemaDetails??{};return e.map(e=>{let n=t[e.name]?.artifacts.map(e=>e.id)??[],r=n.length>0?n:e.artifacts;return{schemaName:e.name,artifactIds:r}})},[o]),I=(0,K.useMemo)(()=>new Set(M.filter(e=>e.progress.total===0||e.progress.completed>=e.progress.total).map(e=>e.id)),[M]),L=(0,K.useMemo)(()=>yAe(P,F,I),[P,I,F]),R=(0,K.useMemo)(()=>{let e=o?.schemaDetails??{},t=new Map;for(let[n,r]of Object.entries(e)){if(!r?.applyTracks)continue;let e=r.artifacts.find(e=>e.outputPath===r.applyTracks);e?.id&&t.set(n,e.id)}return t},[o]);if(n&&!t)return(0,q.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading dashboard...`});if(r)return(0,q.jsxs)(`div`,{className:`text-destructive flex items-center gap-2`,children:[(0,q.jsx)(ql,{className:`h-5 w-5`}),`Error loading dashboard: `,r.message]});let z=t?.summary??{specifications:0,requirements:0,activeChanges:0,inProgressChanges:0,completedChanges:0,archivedTasksCompleted:0,tasksTotal:0,tasksCompleted:0,taskCompletionPercent:null},B=t?.cardAvailability??hAe(z.taskCompletionPercent),ee=t?.trendKinds??gAe(),V=t?.git??{defaultBranch:`main`,worktrees:[]},te=!e||V.worktrees.some(e=>e.entries.length>0),H=M.length>0,ne=V.worktrees.find(e=>e.isCurrent)??null,re=V.worktrees.filter(e=>!e.isCurrent),ie=G2(s),U=h===null?J2(l,ie,d):0,ae=ie!==null&&h===null,oe=h!==null&&mAe(E),se=h!==null;return(0,q.jsxs)(`div`,{className:`min-w-0 space-y-6 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,q.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,q.jsx)(Cu,{className:`h-6 w-6 shrink-0`}),`Dashboard`]}),(0,q.jsxs)(`button`,{type:`button`,onClick:_,className:`bg-primary text-primary-foreground inline-flex items-center gap-2 rounded-md px-4 py-2 text-sm hover:opacity-90`,title:`Recommended workflow start is /opsx:propose.`,children:[(0,q.jsx)(Ku,{className:`h-4 w-4`}),`Start (/opsx:propose)`]})]}),(0,q.jsxs)(`section`,{className:`space-y-2`,children:[(0,q.jsx)(`h2`,{className:`text-sm font-medium`,children:`Historical Trends`}),(0,q.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,q.jsx)(V2,{label:`Specifications / Requirements`,value:`${z.specifications} / ${z.requirements}`,icon:ou,availability:B.specifications,trendKind:ee.specifications,points:t?.trends.specifications??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`}),(0,q.jsx)(V2,{label:`Archived Changes / Completed Tasks`,value:`${z.completedChanges} / ${z.archivedTasksCompleted}`,icon:Rl,availability:B.completedChanges,trendKind:ee.completedChanges,points:t?.trends.completedChanges??[],triColorPoints:[],className:`min-h-44 sm:min-h-48 lg:min-h-52 xl:min-h-56`})]})]}),(0,q.jsxs)(`div`,{className:`grid min-w-0 gap-3 ${te?`xl:grid-cols-2`:`xl:grid-cols-1`}`,children:[(0,q.jsxs)(`section`,{className:`@container min-w-0 space-y-2`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{className:`font-medium`,children:`Workflow Progress`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground text-xs`,children:[`Status coverage: `,P.length,`/`,M.length,` active changes have workflow status snapshots.`]})]}),L.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No workflow status available.`}):(0,q.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-2`,children:L.map(e=>(0,q.jsxs)(`section`,{className:`border-border/70 bg-card min-w-0 rounded-md border p-2`,children:[(0,q.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,q.jsx)(`div`,{className:`min-w-0`,children:(0,q.jsx)(`h3`,{className:`text-xs font-semibold`,children:e.schemaName})}),e.readyToArchive>0?(0,q.jsxs)(`span`,{className:`text-muted-foreground rounded border px-1 py-0.5 text-[10px]`,children:[`archive-ready `,e.readyToArchive]}):null]}),(0,q.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,8rem),1fr))] gap-2`,children:e.steps.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground border-border/70 rounded-md border border-dashed px-2 py-1.5 text-[11px]`,children:`No artifacts in schema.`}):e.steps.map(t=>{let n=xAe(t.id);return(0,q.jsxs)(`article`,{className:`relative min-w-0 overflow-hidden rounded-md border px-1.5 py-1`,style:{borderColor:n.border,backgroundColor:n.background,color:n.text},children:[(0,q.jsx)(Vl,{className:`pointer-events-none absolute right-[10%] top-1/2 h-12 w-12 -translate-y-1/2`,style:{color:n.arrow}}),(0,q.jsx)(`div`,{className:`relative mb-0.5 pr-6 text-xs font-semibold`,children:t.label}),(0,q.jsxs)(`div`,{className:`relative space-y-0 text-[10px]`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-current/75`,children:`Draft`}),(0,q.jsx)(`span`,{className:`font-mono`,children:t.draft})]}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-current/75`,children:`Ready`}),(0,q.jsx)(`span`,{className:`font-mono`,children:t.ready})]}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,q.jsx)(`span`,{className:`text-current/75`,children:`Blocked`}),(0,q.jsx)(`span`,{className:`font-mono`,children:t.blocked})]})]})]},`${e.schemaName}:${t.id}`)})})]},e.schemaName))})]}),te?(0,q.jsxs)(`section`,{className:`min-w-0 space-y-2`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`h2`,{className:`font-medium`,children:`Git Snapshot`}),(0,q.jsxs)(`p`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),e?null:(0,q.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,q.jsx)(f9,{value:s,options:pAe,onValueChange:c,ariaLabel:`Git auto refresh`,className:`text-foreground/75 hover:text-foreground border-r-current/10 bg-muted/20 relative isolate h-7 w-9 shrink-0 justify-center rounded-none border-0 border-r px-0`,positionerClassName:`z-50`,popupClassName:`min-w-[7rem]`,renderTrigger:({selectedOption:e})=>(0,q.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,q.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),ae?(0,q.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${U*100}%`}}):null,(0,q.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,q.jsx)(p7,{preset:e?.value??s})})]})}),(0,q.jsxs)(`button`,{type:`button`,onClick:A,disabled:se,className:`inline-flex h-7 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${oe?`text-primary bg-primary/10`:`text-foreground/75 hover:text-foreground`}`,children:[(0,q.jsx)(Ru,{className:`h-3.5 w-3.5 ${oe?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,q.jsxs)(`div`,{className:`border-border/80 bg-card min-w-0 rounded-lg border p-3`,children:[(0,q.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:[(0,q.jsx)(gu,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,q.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),ne?(0,q.jsxs)(`div`,{className:`space-y-0`,children:[(0,q.jsx)(h7,{worktree:ne,emphasize:!0,removing:x===ne.path,onRemoveDetachedWorktree:j}),(0,q.jsx)(`div`,{className:`-mt-px space-y-1 border-l pl-3 pt-2 ${qOe}`,children:$Ce(ne.entries).map(t=>(0,q.jsx)(m7,{entry:t,onSelect:e?void 0:()=>{Ol.push(`bottom`,p9(t),null)}},t.type===`commit`?t.hash:`${t.type}:${t.updatedAt??`none`}`))})]}):(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-2 text-xs`,children:`No worktree snapshot available.`}),re.length>0&&(0,q.jsxs)(`div`,{className:`border-border/70 mt-3 space-y-1 border-t pt-2`,children:[(0,q.jsx)(`div`,{className:`text-muted-foreground text-xs uppercase tracking-wide`,children:`Other Worktrees`}),re.map(e=>(0,q.jsx)(h7,{worktree:e,emphasize:!1,removing:x===e.path,onRemoveDetachedWorktree:j},e.path))]})]})]}):null]}),(0,q.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-2`,children:[(0,q.jsxs)(`section`,{className:`border-border flex flex-col rounded-t-lg border`,children:[(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-between border-b px-4 py-3`,children:[(0,q.jsx)(`h2`,{className:`font-medium`,children:`Active Changes`}),(0,q.jsxs)(`span`,{className:`text-muted-foreground text-sm`,children:[z.activeChanges,` active`]})]}),(0,q.jsxs)(`div`,{className:`bg-card divide-border flex-1 divide-y`,children:[M.map(e=>{let t=e.progress,n=t.total>0?Math.round(t.completed/t.total*100):0,r=P.find(t=>t.changeName===e.id),i=r?.artifacts.filter(e=>e.status===`done`).length??0,a=r?.artifacts.length??0,o=r?R.get(r.schemaName):void 0,s=o&&r?r.artifacts.find(e=>e.id===o)?.status??sH(r.artifacts.map(e=>e.status)):sH(r?.artifacts.map(e=>e.status)??[]),c=oH({hasStatus:!!r,isComplete:r?.isComplete??!1,tasksComplete:t.total===0||t.completed>=t.total,trackedArtifactStatus:s});return(0,q.jsxs)(Hs,{to:`/changes/$changeId`,params:{changeId:e.id},className:`hover:bg-muted/50 block px-4 py-3`,children:[(0,q.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`div`,{className:`truncate font-medium`,children:e.name}),(0,q.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.id,e.updatedAt>0&&(0,q.jsxs)(q.Fragment,{children:[` · `,vv(e.updatedAt)]})]})]}),(0,q.jsxs)(`div`,{className:`flex flex-col items-end gap-1 text-right text-sm`,children:[(0,q.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[11px] font-medium ${c.toneClass}`,children:c.label}),(0,q.jsxs)(`div`,{className:`font-medium`,children:[t.completed,`/`,t.total]}),(0,q.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`tasks`})]})]}),(0,q.jsx)(`div`,{className:`bg-muted h-1.5 rounded-full`,children:(0,q.jsx)(`div`,{className:`bg-primary h-full rounded-full transition-all`,style:{width:`${n}%`}})}),(0,q.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,q.jsxs)(`span`,{children:[n,`% task completion`]}),r?(0,q.jsxs)(`span`,{className:`truncate`,children:[i,`/`,a,` artifacts · `,r.schemaName]}):(0,q.jsx)(`span`,{children:`Artifacts status unavailable`})]})]},e.id)}),!H&&(0,q.jsxs)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:[(0,q.jsx)(`div`,{children:`No active changes.`}),(0,q.jsx)(`div`,{className:`mt-1 text-xs`,children:`Recommended workflow start: /opsx:propose`}),(0,q.jsxs)(`button`,{type:`button`,onClick:v,className:`text-primary mt-2 inline-flex items-center gap-1 hover:underline`,title:`Open the advanced /opsx:new form`,children:[(0,q.jsx)(Ku,{className:`h-3.5 w-3.5`}),`Open /opsx:new form`]})]})]})]}),(0,q.jsxs)(`section`,{className:`border-border min-w-0 rounded-t-lg border`,children:[(0,q.jsxs)(`div`,{className:`border-border flex flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,q.jsx)(`h2`,{className:`shrink-0 font-medium`,children:`Specifications`}),(0,q.jsxs)(`span`,{className:`text-muted-foreground w-full text-xs sm:w-auto sm:text-sm`,children:[z.specifications,` specs · `,z.requirements,` requirements`]})]}),(0,q.jsxs)(`div`,{className:`bg-card divide-border divide-y`,children:[t?.specifications.map(e=>(0,q.jsx)(Hs,{to:`/specs/$specId`,params:{specId:e.id},className:`hover:bg-muted/50 block px-4 py-3`,children:(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`div`,{className:`truncate font-medium`,children:e.name}),(0,q.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.id,e.updatedAt>0&&(0,q.jsxs)(q.Fragment,{children:[` · `,vv(e.updatedAt)]})]})]}),(0,q.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,q.jsx)(`div`,{className:`font-medium`,children:e.requirements}),(0,q.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`requirements`})]})]})},e.id)),t?.specifications.length===0&&(0,q.jsx)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:`No specifications found.`})]})]})]})]})}var CAe=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function wAe(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function TAe(){let e=Fc(),t=ui(),{data:n}=m9(),r=Ei({queryKey:[`git`,`overview`],queryFn:()=>cm.git.overview.query(),enabled:!e,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),i=Ai({queryKey:[`git`,`entries`],initialPageParam:void 0,queryFn:({pageParam:e})=>cm.git.listEntries.query({cursor:e,limit:50}),getNextPageParam:e=>e.nextCursor??void 0,enabled:!e,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),[a,o]=(0,K.useState)(()=>U2()),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(()=>Date.now()),[d,f]=(0,K.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),y=(0,K.useRef)(null),b=ki({mutationFn:e=>cm.git.switchWorktree.mutate({path:e})}),x=(0,K.useMemo)(()=>i.data?.pages.flatMap(e=>e.items)??[],[i.data]),S=(0,K.useRef)(0),C=(0,K.useRef)(null),w=(0,K.useRef)(p),T=(0,K.useRef)(!1),E=p!==null||n?.running===!0||b.isPending,D=p?.reason??n?.lastReason??null,O=(0,K.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),k=(0,K.useCallback)(e=>{let t=Date.now();m({reason:e,requestedAt:t}),h9(e).catch(n=>{console.error(`[GitRoute] Failed to refresh git data:`,n),m(n=>n?.reason===e&&n.requestedAt===t?null:n)})},[]),A=(0,K.useCallback)(()=>{O();let t=G2(a),n=a===`none`?null:K2(a);if(e||t===null||n===null||E||!d){c(null);return}let r=Date.now();c(r),u(r),C.current=window.setTimeout(()=>{C.current=null,c(null),u(Date.now()),k(n)},t)},[O,a,d,E,k,e]),j=(0,K.useCallback)(()=>{E||(O(),c(null),u(Date.now()),k(`manual-button`))},[O,E,k]),M=(0,K.useCallback)(async t=>{if(!(e||t.isCurrent||!t.detached)&&window.confirm([`Remove detached worktree?`,``,t.path,``,`This runs git worktree remove --force.`].join(`
1391
1391
  `))){g(t.path);try{await g9(t.path),await r.refetch()}catch(e){console.error(`[GitRoute] Failed to remove detached worktree:`,e),window.alert(e instanceof Error?e.message:`Failed to remove detached worktree.`)}finally{g(e=>e===t.path?null:e)}}},[r,e]),N=(0,K.useCallback)(async e=>{v(e.path);try{let t=await b.mutateAsync(e.path);window.location.assign(lAe({handoff:t,location:window.location}))}catch(e){console.error(`[GitRoute] Failed to switch worktree:`,e),window.alert(e instanceof Error?e.message:`Failed to switch worktree.`)}finally{v(t=>t===e.path?null:t)}},[b]);(0,K.useEffect)(()=>{w.current=p},[p]),(0,K.useEffect)(()=>{T.current=E},[E]),(0,K.useEffect)(()=>{if(e)return;let t=e=>{if(w.current!==null||T.current)return;let t=Date.now();t-S.current<700||(S.current=t,O(),c(null),u(Date.now()),k(e))},n=()=>t(`window-focus`),r=()=>{let e=document.visibilityState===`visible`;f(e),e&&t(`document-visible`)};return window.addEventListener(`focus`,n),document.addEventListener(`visibilitychange`,r),()=>{window.removeEventListener(`focus`,n),document.removeEventListener(`visibilitychange`,r)}},[O,k,e]),(0,K.useEffect)(()=>{!n||!p||n.running===!1&&(n.lastFinishedAt??0)>=p.requestedAt&&m(e=>e?.reason===p.reason&&e.requestedAt===p.requestedAt?null:e)},[p,n]),(0,K.useEffect)(()=>{e||n?.lastFinishedAt&&u(Date.now())},[n?.lastFinishedAt,e]),(0,K.useEffect)(()=>{e||W2(a)},[a,e]),(0,K.useEffect)(()=>{if(!e)return A(),()=>{O()}},[O,A,e]),(0,K.useEffect)(()=>{let t=G2(a);if(e||t===null||s===null||E)return;let n=()=>{u(Date.now())};n();let r=window.setInterval(n,250);return()=>{window.clearInterval(r)}},[s,a,E,e]),(0,K.useEffect)(()=>{if(e)return;let r=n?.lastFinishedAt??null;r===null||y.current===r||(y.current=r,t.getQueriesData({queryKey:[`git`]}).some(([,e])=>e!==void 0)&&t.invalidateQueries({queryKey:[`git`],refetchType:`active`}))},[n?.lastFinishedAt,t,e]);let P=r.data,F=P?.currentWorktree??null,I=P?.otherWorktrees??[],L=G2(a),R=E||L===null?0:J2(s,L,l),z=E&&wAe(D);return e?(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 p-4 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Git panel is only available in live mode.`]}):r.isLoading&&!P?(0,q.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading git panel...`}):r.error&&!P?(0,q.jsxs)(`div`,{className:`text-destructive flex items-center gap-2 p-4`,children:[(0,q.jsx)(ql,{className:`h-5 w-5 shrink-0`}),`Error loading git panel: `,r.error.message]}):(0,q.jsxs)(`div`,{className:`min-w-0 space-y-4 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,q.jsx)(iu,{className:`h-6 w-6 shrink-0`}),`Git`]}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Commit history for the current worktree plus live handoff to sibling worktrees.`})]}),(0,q.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,q.jsx)(f9,{value:a,options:CAe,onValueChange:o,ariaLabel:`Git auto refresh`,className:`text-foreground/75 hover:text-foreground border-r-current/10 bg-muted/20 relative isolate h-8 w-10 shrink-0 justify-center rounded-none border-0 border-r px-0`,positionerClassName:`z-50`,popupClassName:`min-w-[7rem]`,renderTrigger:({selectedOption:e})=>(0,q.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,q.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),L!==null&&!E?(0,q.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${R*100}%`}}):null,(0,q.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,q.jsx)(p7,{preset:e?.value??a})})]})}),(0,q.jsxs)(`button`,{type:`button`,onClick:j,disabled:E,className:`inline-flex h-8 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${z?`bg-primary/10 text-primary`:`text-foreground/75 hover:text-foreground`}`,children:[(0,q.jsx)(Ru,{className:`h-3.5 w-3.5 ${z?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,q.jsxs)(`section`,{className:`bg-card space-y-3 rounded-lg border border-zinc-500/20 p-3`,children:[(0,q.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,q.jsx)(gu,{className:`h-4 w-4 shrink-0`}),(0,q.jsxs)(`span`,{className:`truncate`,children:[F?.branchName??`(no worktree)`,` against`,` `,P?.defaultBranch??`main`]})]}),(0,q.jsx)(`div`,{className:`text-muted-foreground truncate text-xs`,children:`Current worktree summary and branch delta.`})]})}),F?(0,q.jsx)(h7,{worktree:F,emphasize:!0,removing:h===F.path,onRemoveDetachedWorktree:M}):(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No Git worktree information is available for this project.`})]}),(0,q.jsxs)(`section`,{className:`min-w-0 space-y-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,q.jsx)(`h2`,{className:`font-medium`,children:`Commits`}),(0,q.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[x.length,` loaded`]})]}),(0,q.jsxs)(`div`,{className:`space-y-1`,children:[x.map(e=>(0,q.jsx)(m7,{entry:e,onSelect:()=>{Ol.push(`bottom`,p9(e),null)}},e.type===`commit`?e.hash:`uncommitted:${e.updatedAt??`0`}`)),i.error?(0,q.jsx)(`div`,{className:`text-destructive border-current/20 rounded-md border px-3 py-3 text-sm`,children:i.error.message}):null,i.hasNextPage?(0,q.jsx)(`button`,{type:`button`,onClick:()=>void i.fetchNextPage(),disabled:i.isFetchingNextPage,className:`hover:bg-muted w-full rounded-md border px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-70`,children:i.isFetchingNextPage?`Loading more…`:`Load older commits`}):x.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No uncommitted files or commits ahead of the default branch.`}):null]})]}),I.length>0?(0,q.jsxs)(`section`,{className:`space-y-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Bl,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`h2`,{className:`font-medium`,children:`Other Worktrees`})]}),(0,q.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:I.map(e=>(0,q.jsxs)(`div`,{className:`space-y-2`,children:[(0,q.jsx)(h7,{worktree:e,emphasize:!1,removing:h===e.path,onRemoveDetachedWorktree:M}),(0,q.jsx)(`div`,{className:`flex justify-end`,children:e.pathAvailable?(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{N(e)},disabled:_===e.path,className:`bg-primary text-primary-foreground inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-xs disabled:cursor-not-allowed disabled:opacity-70`,children:[(0,q.jsx)(Bl,{className:`h-3.5 w-3.5`}),_===e.path?`Switching…`:`Switch worktree`]}):(0,q.jsx)(`span`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-1 text-[11px]`,children:`Path missing`})})]},e.path))})]}):null]})}function EAe(e){return Array.from({length:e+1},(t,n)=>n/e)}function _9(e){return e===`ArrowDown`||e===`ArrowUp`||e===`PageDown`||e===`PageUp`||e===`Home`||e===`End`||e===` `}function DAe(e){return e===`auto`||e===`scroll`||e===`overlay`}function v9(e,t={}){let{allowNonScrollable:n=!1}=t,r=e?.parentElement??null;for(;r;){if(DAe(window.getComputedStyle(r).overflowY)&&(n||r.scrollHeight>r.clientHeight))return r;r=r.parentElement}return null}function OAe(e){let{container:t,element:n,behavior:r=`auto`,margin:i=8}=e,a=n.getBoundingClientRect(),o=t.getBoundingClientRect(),s=a.top-o.top,c=a.bottom-o.top;if(s<i){t.scrollTo({top:Math.max(t.scrollTop+s-i,0),behavior:r});return}c>o.height-i&&t.scrollTo({top:t.scrollTop+c-o.height+i,behavior:r})}function kAe(e){if(e){let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}}return{top:0,bottom:window.innerHeight}}function AAe(e,t=v9(e,{allowNonScrollable:!0})){if(typeof window>`u`||!e)return null;let n=e.getBoundingClientRect(),r=kAe(t);return Math.max(Math.floor(r.bottom-Math.max(n.top,r.top)),0)}function jAe({target:e,enabled:t=!0}){let[n,r]=(0,K.useState)(null);return(0,K.useLayoutEffect)(()=>{if(!t||typeof window>`u`){r(null);return}if(!e){r(null);return}let n=null,i=null,a=window,o=e=>{r(t=>t===e?t:e)},s=e=>{i!==e&&(a.removeEventListener(`scroll`,c),n&&i&&n.unobserve(i),i=e,a=e??window,a.addEventListener(`scroll`,c,{passive:!0}),n&&i&&n.observe(i))},c=()=>{let t=v9(e,{allowNonScrollable:!0});s(t),o(AAe(e,t))};return typeof ResizeObserver<`u`&&(n=new ResizeObserver(()=>{c()}),n.observe(e),e.parentElement&&n.observe(e.parentElement)),c(),window.addEventListener(`resize`,c),()=>{window.removeEventListener(`resize`,c),a.removeEventListener(`scroll`,c),n?.disconnect()}},[t,e]),n}function MAe(e){if(e.length===0)return null;let t=[...e].sort((e,t)=>e.entry.boundingClientRect.top-t.entry.boundingClientRect.top);return(t.some(({entry:e})=>{let t=e.rootBounds?.top??0;return e.boundingClientRect.top<=t+1})?t[0]:t.at(-1))?.id??null}function y9({ids:e,root:t=null,rootMargin:n,threshold:r,onBecomeVisible:i}){let a=(0,K.useRef)(new Map),o=(0,K.useRef)(new Map),s=(0,K.useRef)(null),c=(0,K.useRef)(new Map),[l,u]=(0,K.useState)(()=>new Map),d=(0,K.useRef)(i);d.current=i;let f=(0,K.useMemo)(()=>JSON.stringify(r??[0]),[r]),p=(0,K.useCallback)(e=>{c.current=e,u(new Map(e))},[]);return(0,K.useEffect)(()=>{if(!e)return;let t=new Set(e),n=!1;for(let[e,r]of a.current.entries())t.has(e)||(s.current?.unobserve(r),a.current.delete(e),o.current.delete(r),n=!0);let r=new Map(c.current);for(let e of r.keys())t.has(e)||(r.delete(e),n=!0);n&&p(r)},[e,p]),(0,K.useEffect)(()=>{if(typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(e=>{let t=new Map(c.current),n=[];for(let r of e){let e=r.target,i=o.current.get(e);if(!i)continue;let a=r.isIntersecting?r.intersectionRatio:0,s=c.current.get(i)??0;a>0?t.set(i,a):t.delete(i),s<=0&&a>0&&n.push({id:i,entry:r})}p(t),n.length>0&&d.current?.(n)},{root:t,rootMargin:n,threshold:r?[...r]:void 0});s.current=e;for(let t of a.current.values())e.observe(t);return()=>{e.disconnect(),s.current===e&&(s.current=null)}},[t,n,p,f,r]),{ratioById:l,setObservedNode:(0,K.useCallback)((e,t)=>{let n=a.current.get(e);if(n!==t){if(n){s.current?.unobserve(n),a.current.delete(e),o.current.delete(n);let t=new Map(c.current);t.delete(e)&&p(t)}t&&(a.current.set(e,t),o.current.set(t,e),s.current?.observe(t))}},[p])}}var NAe=/^[A-Za-z]:\/$/;function b9(e){let t=e.replace(/\\/g,`/`);return t===`/`||NAe.test(t)?t:t.replace(/\/+$/g,``)}function x9(e){return b9(e).split(`/`).filter(Boolean)}function PAe(e){let[t,...n]=e.map(e=>x9(e.path).slice(0,-1)).filter(e=>e.length>0);if(!t)return[];let r=t.length;for(let e of n){r=Math.min(r,e.length);let n=0;for(;n<r&&t[n]===e[n];)n+=1;if(r=n,r===0)return[]}return t.slice(0,r)}function S9(e){return[...e].sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`directory`?-1:1)}function C9(e){let t=e.reduce((e,t)=>e+t.files,0);return e.some(e=>e.state===`loading`)?{state:`loading`,files:t}:e.every(e=>e.state===`ready`)?{state:`ready`,files:t,insertions:e.reduce((e,t)=>e+t.insertions,0),deletions:e.reduce((e,t)=>e+t.deletions,0)}:{state:`unavailable`,files:t}}function FAe(e,t){return{kind:`file`,key:e.fileId,name:t,diff:e.diff,file:e}}function IAe(e,t){return{kind:`directory`,key:e,name:t,diff:{state:`unavailable`,files:0},children:[]}}function w9(e,t,n,r,i){let a=n[r];if(!a)return;let o=i?`${i}/${a}`:a;if(r===n.length-1){e.set(o,FAe(t,a));return}let s=e.get(o),c=s?.kind===`directory`?s:IAe(o,a);e.set(o,c);let l=new Map(c.children.map(e=>[e.key,e]));w9(l,t,n,r+1,o),c.children=[...l.values()]}function T9(e){let t=e,n=[e.name];for(;t.children.length===1&&t.children[0]?.kind===`directory`;)t=t.children[0],n.push(t.name);let r=S9(t.children.map(e=>e.kind===`directory`?T9(e):e));return{...t,name:n.join(`/`),diff:C9(r.map(e=>e.diff)),children:r}}function LAe(e,t={}){let n=t.projectDir?b9(t.projectDir):null,r=n?[]:PAe(e),i=r.join(`/`),a=new Map;for(let t of e){let e=x9(t.path).slice(r.length);e.length!==0&&w9(a,t,e,0,``)}let o=S9([...a.values()].map(e=>e.kind===`directory`?T9(e):e));return n?[{kind:`directory`,key:n,name:n,diff:C9(o.map(e=>e.diff)),children:o}]:i.length===0?o:[{kind:`directory`,key:i,name:i,diff:C9(o.map(e=>e.diff)),children:o}]}function RAe(e){let{currentKey:t,visibleKeySet:n,parentByKey:r,firstItemKey:i}=e;if(t&&n.has(t))return t;let a=t?r.get(t)??null:null;for(;a;){if(n.has(a))return a;a=r.get(a)??null}return i}function zAe({items:e,itemsByKey:t,parentByKey:n,treeRef:r,onToggleDirectory:i,onSelectFile:a}){let o=(0,K.useRef)(new Map),[s,c]=(0,K.useState)(null),l=(0,K.useMemo)(()=>new Set(e.map(e=>e.key)),[e]),u=(0,K.useMemo)(()=>new Map(e.map((e,t)=>[e.key,t])),[e]),d=RAe({currentKey:s,visibleKeySet:l,parentByKey:n,firstItemKey:e[0]?.key??null}),f=(0,K.useCallback)(e=>{e&&(c(e),o.current.get(e)?.focus())},[]);(0,K.useEffect)(()=>{d!==s&&(c(d),d&&r.current&&r.current.contains(document.activeElement)&&o.current.get(d)?.focus())},[d,s,r]);let p=(0,K.useCallback)(e=>{c(e)},[]);return{focusedKey:d,handleItemClick:(0,K.useCallback)(e=>{let n=t.get(e);if(n){if(c(e),n.kind===`directory`){i(e);return}a(n.node.file.fileId)}},[t,a,i]),handleItemFocus:p,handleItemKeyDown:(0,K.useCallback)((r,o)=>{let s=t.get(o);if(!s)return;let c=u.get(o);if(c!=null)switch(r.key){case`ArrowDown`:r.preventDefault(),f(e[c+1]?.key??null);return;case`ArrowUp`:r.preventDefault(),f(e[c-1]?.key??null);return;case`Home`:r.preventDefault(),f(e[0]?.key??null);return;case`End`:r.preventDefault(),f(e.at(-1)?.key??null);return;case`ArrowRight`:if(s.kind!==`directory`)return;if(!s.expanded&&s.firstChildKey){r.preventDefault(),i(s.key);return}s.expanded&&s.firstChildKey&&(r.preventDefault(),f(s.firstChildKey));return;case`ArrowLeft`:{if(s.kind===`directory`&&s.expanded&&s.firstChildKey){r.preventDefault(),i(s.key);return}let e=n.get(s.key)??null;e&&(r.preventDefault(),f(e));return}case`Enter`:case` `:if(r.preventDefault(),s.kind===`directory`){i(s.key);return}a(s.node.file.fileId);return;default:return}},[e,t,f,a,i,n,u]),registerItemRef:(0,K.useCallback)(e=>t=>{if(!t){o.current.delete(e);return}o.current.set(e,t)},[])}}function E9(e,t,n,r,i){for(let a of e){if(n.set(a.key,t),a.kind===`directory`){r.add(a.key),E9(a.children,a.key,n,r,i);continue}i.set(a.file.fileId,a.key)}}function D9(e,t,n){let r=0;for(let i of e){if(i.kind===`directory`){let e=D9(i.children,t,n);n.set(i.key,e),r=Math.max(r,e);continue}let e=t.get(i.file.fileId)??0;n.set(i.key,e),r=Math.max(r,e)}return r}function O9(e,t,n,r,i,a,o){let s=e.length;e.forEach((e,c)=>{let l=c===s-1;if(e.kind===`directory`){let u=!t.has(e.key);o.push({key:e.key,kind:`directory`,node:e,level:r,parentKey:i,posInSet:c+1,setSize:s,isLastSibling:l,guideMask:a,expanded:u,firstChildKey:e.children[0]?.key??null,visibilityRatio:n.get(e.key)??0}),u&&e.children.length>0&&O9(e.children,t,n,r+1,e.key,[...a,!l],o);return}o.push({key:e.key,kind:`file`,node:e,level:r,parentKey:i,posInSet:c+1,setSize:s,isLastSibling:l,guideMask:a,visibilityRatio:n.get(e.key)??0})})}function BAe(e,t,n=new Map){let r=new Map,i=new Set,a=new Map,o=[],s=new Map;return E9(e,null,r,i,a),D9(e,n,s),O9(e,t,s,1,null,[],o),{items:o,itemsByKey:new Map(o.map(e=>[e.key,e])),directoryKeys:i,parentByKey:r,keyByFileId:a}}var k9=14,VAe=3.5,HAe=new Map;function UAe(e){switch(e){case`added`:return`text-emerald-700 dark:text-emerald-100`;case`deleted`:return`text-rose-700 dark:text-rose-100`;case`renamed`:case`copied`:return`text-sky-700 dark:text-sky-100`;case`modified`:return`text-amber-700 dark:text-amber-100`;default:return`text-zinc-700 dark:text-zinc-100`}}function WAe(e,t){if(!e.previousPath)return t;let n=e.previousPath.split(`/`).filter(Boolean).at(-1)??e.previousPath;return n===t?t:`${n} -> ${t}`}function GAe(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function KAe({guideMask:e}){let t=e.length*k9;return(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none shrink-0 self-stretch`,style:{width:`${t}px`}})}function qAe(e){let{x:t,parentMidY:n,childMidY:r,horizontalEndX:i}=e,a=Math.min(3,Math.max(1.75,i-t-1,Math.min(4,r-n))),o=Math.max(n,r-a),s=Math.min(i,t+a);return{startY:o,path:[`M${t} ${o}`,`Q${t} ${r} ${s} ${r}`,i>s?`H${i}`:``].filter(Boolean).join(``)}}function JAe(e){let{x:t,midY:n,horizontalEndX:r}=e;return`M${t} ${n}H${r}`}function YAe({metrics:e,width:t,height:n}){if(e.length===0||t<=0||n<=0)return null;let r=new Map(e.map(e=>[e.key,e])),i=new Map;for(let t of e){if(!t.parentKey)continue;let e=i.get(t.parentKey)??[];e.push(t),i.set(t.parentKey,e)}return(0,q.jsx)(`svg`,{"aria-hidden":`true`,className:`text-border/50 pointer-events-none absolute inset-0 block h-full w-full overflow-visible`,style:{height:`${n}px`},viewBox:`0 0 ${t} ${n}`,preserveAspectRatio:`none`,fill:`none`,stroke:`currentColor`,strokeWidth:1,strokeLinecap:`round`,strokeLinejoin:`round`,children:Array.from(i.entries()).map(([e,t])=>{let n=r.get(e);if(!n||t.length===0)return null;let i=t[0],a=t.at(-1);if(!i||!a)return null;let o=(i.level-2)*k9+k9/2+.5,s=(i.level-1)*k9-VAe,c=qAe({x:o,parentMidY:n.midY,childMidY:a.midY,horizontalEndX:s});return(0,q.jsxs)(`g`,{children:[c.startY>n.midY?(0,q.jsx)(`path`,{d:`M${o} ${n.midY}V${c.startY}`,opacity:.34,vectorEffect:`non-scaling-stroke`}):null,t.slice(0,-1).map(e=>(0,q.jsx)(`path`,{d:JAe({x:o,midY:e.midY,horizontalEndX:s}),opacity:.22+e.visibilityRatio*.34,vectorEffect:`non-scaling-stroke`},`branch-${e.key}`)),(0,q.jsx)(`path`,{d:c.path,opacity:.3+a.visibilityRatio*.32,vectorEffect:`non-scaling-stroke`})]},`group-${e}`)})})}function XAe({item:e,focused:t,onItemClick:n,onItemFocus:r,onItemKeyDown:i,registerItemRef:a,registerOverlayItemRef:o}){let s=e.kind===`directory`?e.node.name:WAe(e.node.file,e.node.name),c=e.guideMask.length*k9,l=e.visibilityRatio,u=l<=0?0:Math.min(.88,.22+l*.66);return(0,q.jsxs)(`div`,{id:`git-file-tree-item-${encodeURIComponent(e.key)}`,"data-file-id":e.kind===`file`?e.node.file.fileId:void 0,"data-visibility-ratio":l.toFixed(3),ref:t=>{a(e.key)(t),o(e.key)(t)},role:`treeitem`,tabIndex:t?0:-1,"aria-label":e.kind===`directory`?e.node.name:e.node.file.displayPath,"aria-level":e.level,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":e.kind===`directory`?e.expanded:void 0,onClick:()=>n(e.key),onFocus:()=>r(e.key),onKeyDown:t=>i(t,e.key),className:j4(`relative grid min-w-0 cursor-default grid-cols-[auto_minmax(0,1fr)_auto] items-stretch gap-1.5 rounded-md py-0.5 text-left outline-none transition-colors`,`focus-visible:ring-ring/60 focus-visible:ring-2`,e.kind===`directory`?`text-foreground hover:bg-muted/35`:`text-foreground/90 hover:bg-muted/35`),title:e.kind===`directory`?e.node.name:e.node.file.displayPath,children:[u>0?(0,q.jsx)(`span`,{"aria-hidden":`true`,className:j4(`pointer-events-none absolute inset-y-0 rounded-md`,e.kind===`directory`?`bg-primary/10 ring-primary/10 ring-1`:`bg-primary/16 ring-primary/15 ring-1`),style:{left:`${Math.max(0,c-1)}px`,right:0,opacity:u}}):null,(0,q.jsx)(KAe,{guideMask:e.guideMask}),e.kind===`directory`?(0,q.jsxs)(`div`,{className:j4(`relative z-10 flex min-w-0 items-start gap-1.5 text-[11px] font-medium transition-colors`,l>0?`text-foreground`:`text-muted-foreground`),children:[e.expanded?(0,q.jsx)(fu,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 transition-opacity`,style:{opacity:Math.min(1,.65+l*.35)}}):(0,q.jsx)(uu,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 transition-opacity`,style:{opacity:Math.min(1,.65+l*.35)}}),(0,q.jsx)(`span`,{className:`min-w-0 leading-4 [overflow-wrap:anywhere]`,children:s})]}):(0,q.jsxs)(`div`,{className:`relative z-10 flex min-w-0 items-start gap-1.5`,children:[(0,q.jsx)(iu,{className:j4(`mt-0.5 h-3.5 w-3.5 shrink-0 transition-colors`,l>0?`text-primary`:UAe(e.node.file.changeType)),style:{opacity:Math.min(1,.7+l*.3)}}),(0,q.jsx)(`span`,{className:j4(`min-w-0 text-[11px] leading-4 transition-colors [overflow-wrap:anywhere]`,l>0?`text-foreground font-medium`:``),children:s})]}),(0,q.jsx)(`div`,{className:j4(`relative z-10 flex min-h-4 shrink-0 items-center gap-1 transition-opacity`,l>0?`text-foreground/80`:`text-muted-foreground`),style:{opacity:Math.min(1,.68+l*.32)},children:(0,q.jsx)(g7,{diff:e.node.diff})})]})}function A9({nodes:e,itemsByKey:t,focusedKey:n,onItemClick:r,onItemFocus:i,onItemKeyDown:a,registerItemRef:o,registerOverlayItemRef:s}){return(0,q.jsx)(`div`,{children:e.map(e=>{let c=t.get(e.key);return c?(0,q.jsxs)(`div`,{children:[(0,q.jsx)(XAe,{item:c,focused:n===c.key,onItemClick:r,onItemFocus:i,onItemKeyDown:a,registerItemRef:o,registerOverlayItemRef:s}),e.kind===`directory`&&c.kind===`directory`&&c.expanded&&e.children.length>0?(0,q.jsx)(`div`,{role:`group`,children:(0,q.jsx)(A9,{nodes:e.children,itemsByKey:t,focusedKey:n,onItemClick:r,onItemFocus:i,onItemKeyDown:a,registerItemRef:o,registerOverlayItemRef:s})}):null]},e.key):null})})}function j9({files:e,projectDir:t,visibilityRatioByFileId:n=HAe,onSelectFile:r,revealRequest:i=null,className:a,onUserScrollIntent:o}){let[s,c]=(0,K.useState)(new Set),l=(0,K.useRef)(null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(new Map),p=(0,K.useRef)(null),[m,h]=(0,K.useState)([]),[g,_]=(0,K.useState)(0),[v,y]=(0,K.useState)(0),b=(0,K.useMemo)(()=>LAe(e,{projectDir:t}),[e,t]),x=(0,K.useCallback)(e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),S=(0,K.useMemo)(()=>BAe(b,s,n),[s,b,n]);(0,K.useEffect)(()=>{c(e=>{let t=new Set([...e].filter(e=>S.directoryKeys.has(e)));return GAe(e,t)?e:t})},[S.directoryKeys]);let{focusedKey:C,handleItemClick:w,handleItemFocus:T,handleItemKeyDown:E,registerItemRef:D}=zAe({items:S.items,itemsByKey:S.itemsByKey,parentByKey:S.parentByKey,treeRef:l,onToggleDirectory:x,onSelectFile:r}),O=(0,K.useCallback)(e=>t=>{if(!t){f.current.delete(e);return}f.current.set(e,t)},[]);return(0,K.useEffect)(()=>{if(!i||p.current===i.nonce)return;let e=u.current;if(!e)return;let t=S.keyByFileId.get(i.fileId)??null;for(;t&&!S.itemsByKey.has(t);)t=S.parentByKey.get(t)??null;if(!t)return;let n=f.current.get(t);n&&(OAe({container:e,element:n,behavior:`auto`,margin:12}),p.current=i.nonce)},[i,S.itemsByKey,S.keyByFileId,S.parentByKey]),(0,K.useLayoutEffect)(()=>{let e=d.current;if(!e){h([]),y(0);return}let t=()=>{let t=e.getBoundingClientRect();h(S.items.flatMap(e=>{if(e.guideMask.length===0)return[];let n=f.current.get(e.key);if(!n)return[];let r=n.getBoundingClientRect(),i=r.top-t.top,a=r.bottom-t.top;return[{key:e.key,top:i,bottom:a,midY:i+r.height/2,level:e.level,parentKey:e.parentKey,isLastSibling:e.isLastSibling,visibilityRatio:e.visibilityRatio}]})),_(e.clientWidth),y(e.scrollHeight)};if(t(),typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{t()});return n.observe(e),()=>{n.disconnect()}},[S.items]),e.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No changed files found for this entry.`}):(0,q.jsx)(`div`,{ref:l,className:j4(`flex min-h-0 flex-col overflow-hidden rounded-md border border-zinc-500/15 bg-zinc-500/5`,a),children:(0,q.jsx)(`div`,{ref:u,role:`tree`,"aria-label":`Changed files`,onKeyDownCapture:e=>{_9(e.key)&&o?.()},onPointerDownCapture:()=>{o?.()},onTouchMoveCapture:()=>{o?.()},onWheelCapture:()=>{o?.()},className:`scrollbar-thin scrollbar-track-transparent min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2`,children:(0,q.jsxs)(`div`,{ref:d,className:`relative`,children:[(0,q.jsx)(YAe,{metrics:m,width:g,height:v}),(0,q.jsx)(A9,{nodes:b,itemsByKey:S.itemsByKey,focusedKey:C,onItemClick:w,onItemFocus:T,onItemKeyDown:E,registerItemRef:D,registerOverlayItemRef:O})]})})})}function ZAe(e){switch(e){case`added`:return`border-emerald-500/40 bg-emerald-500/12 text-emerald-700 dark:border-emerald-300/45 dark:bg-emerald-400/20 dark:text-emerald-100`;case`deleted`:return`border-rose-500/40 bg-rose-500/12 text-rose-700 dark:border-rose-300/45 dark:bg-rose-400/20 dark:text-rose-100`;case`renamed`:case`copied`:return`border-sky-500/40 bg-sky-500/12 text-sky-700 dark:border-sky-300/45 dark:bg-sky-400/20 dark:text-sky-100`;case`modified`:return`border-amber-500/40 bg-amber-500/12 text-amber-700 dark:border-amber-300/45 dark:bg-amber-400/20 dark:text-amber-100`;default:return`border-zinc-500/35 bg-zinc-500/10 text-zinc-700 dark:border-zinc-300/40 dark:bg-zinc-300/15 dark:text-zinc-100`}}function QAe(e){if(!e)return`Patch preview is unavailable for this file.`;switch(e.state){case`binary`:return`Binary file. Patch preview is unavailable.`;case`too-large`:return`Patch is too large to preview in the panel.`;case`unavailable`:return`Patch preview is unavailable for this file.`;default:return``}}function $Ae(e){return e.previousPath&&(e.changeType===`renamed`||e.changeType===`copied`)?e.path:e.displayPath}function eje(e,t){let n=`readonly-diff-line`;return e.startsWith(`diff --git`)||e.startsWith(`index `)||e.startsWith(`@@`)?n=`readonly-diff-line readonly-diff-line-meta`:e.startsWith(`+`)&&!e.startsWith(`+++`)?n=`readonly-diff-line readonly-diff-line-add`:e.startsWith(`-`)&&!e.startsWith(`---`)?n=`readonly-diff-line readonly-diff-line-del`:(e.startsWith(`+++`)||e.startsWith(`---`))&&(n=`readonly-diff-line readonly-diff-line-file`),(0,q.jsx)(`div`,{className:n,children:e||` `},`${t}:${e.slice(0,16)}`)}function tje({file:e,patch:t,status:n,error:r,onRegisterCard:i,scrollMarginTop:a}){let o=(0,K.useRef)(null),s=QAe(t);return(0,q.jsxs)(`section`,{"data-file-id":e.fileId,ref:t=>{o.current=t,i?.(e.fileId,t)},style:a?{scrollMarginTop:`${a}px`}:void 0,className:`overflow-hidden rounded-md border border-zinc-500/20`,children:[(0,q.jsxs)(`header`,{className:`bg-card flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,q.jsx)(iu,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{className:`min-w-0 text-sm font-medium leading-5 [overflow-wrap:anywhere]`,children:$Ae(e)})]}),e.previousPath?(0,q.jsxs)(`div`,{className:`text-muted-foreground pl-6 text-[11px] leading-4 [overflow-wrap:anywhere]`,children:[`from `,e.previousPath]}):null]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(`span`,{className:j4(`inline-flex items-center rounded border px-[0.35rem] py-0 text-[10px] font-medium uppercase tracking-wide`,ZAe(e.changeType)),children:e.changeType}),(0,q.jsx)(g7,{diff:t?.diff??e.diff})]})]}),n===`loading`||n===`idle`?(0,q.jsxs)(`div`,{className:`readonly-code-surface text-muted-foreground flex items-center gap-2 px-3 py-3 text-sm`,children:[(0,q.jsx)(Ou,{className:j4(`h-4 w-4 shrink-0`,n===`loading`&&`animate-spin`)}),(0,q.jsx)(`span`,{children:n===`loading`?`Loading patch…`:`Patch loads when visible.`})]}):r?(0,q.jsxs)(`div`,{className:`readonly-code-surface text-destructive flex items-start gap-2 px-3 py-3 text-sm`,children:[(0,q.jsx)(su,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:r.message})]}):t?.patch?(0,q.jsx)(`pre`,{className:`readonly-code-surface scrollbar-thin scrollbar-track-transparent overflow-x-auto py-2 font-mono text-[11px] leading-5`,children:t.patch.split(`
1392
- `).map((e,t)=>eje(e,t))}):(0,q.jsxs)(`div`,{className:`readonly-code-surface text-muted-foreground flex items-start gap-2 px-3 py-3 text-sm`,children:[(0,q.jsx)(su,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:s})]})]})}var nje=2,rje=960,M9=12,N9=16,ije=4e3,aje=12,oje=`180px 0px`,sje=EAe(20);function cje(){let e=(0,K.useRef)(null),[t,n]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=new ResizeObserver(([e])=>{n((e?.contentRect.width??0)>=rje)});return r.observe(t),()=>{r.disconnect()}},[]),{ref:e,wide:t}}function lje(e){return e?e.type===`commit`?`commit:${e.hash}`:`uncommitted`:`none`}function uje(e){return _9(e.key)}function dje(e){for(let t of e){let e=v9(t,{allowNonScrollable:!0});if(e)return e}return null}function fje(e,t,n){let r=v9(e,{allowNonScrollable:!0})??v9(t,{allowNonScrollable:!0});if(!r){e.scrollIntoView({block:`start`,behavior:`auto`});return}let i=e.getBoundingClientRect(),a=r.getBoundingClientRect(),o=r.scrollTop+i.top-a.top-n;r.scrollTo({top:Math.max(o,0),behavior:`auto`})}function pje(e,t,n){let r=v9(e,{allowNonScrollable:!0})??v9(t,{allowNonScrollable:!0}),i=e.getBoundingClientRect();if(!r)return Math.abs(i.top-n)<=N9;let a=r.getBoundingClientRect().top+n;return Math.abs(i.top-a)<=N9}function mje(e){return e.type===`commit`?(0,q.jsx)(_u,{className:`h-4 w-4 shrink-0 text-sky-600 dark:text-sky-300`}):(0,q.jsx)(Ou,{className:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-300`})}function hje({selector:e,entry:t,files:n,projectDir:r,isLoading:i,error:a,showEntrySummary:o=!0,patchLoader:s}){let{ref:c,wide:l}=cje(),u=lje(e),[d,f]=(0,K.useState)(`diff`),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(M9),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(null),x=(0,K.useRef)(new Map),S=(0,K.useRef)(null),C=(0,K.useRef)(0),w=(0,K.useRef)(null),T=(0,K.useRef)(null),E=(0,K.useRef)(null),D=(0,K.useRef)(0),O=(0,K.useRef)(null),[k,A]=(0,K.useState)(null),j=jAe({target:k,enabled:l}),M=(0,K.useCallback)(()=>{O.current=`tree`},[]),N=(0,K.useCallback)(()=>{O.current=`diff`},[]),P=(0,K.useCallback)(e=>{m(t=>t.includes(e)?t:[...t,e])},[]),F=(0,K.useMemo)(()=>n.map(e=>e.fileId),[n]),I=(0,K.useCallback)(async t=>e?s?s({selector:e,fileId:t}):cm.git.getEntryPatch.query({selector:e,fileId:t}):null,[s,e]);(0,K.useEffect)(()=>{f(`diff`),m([]),v(null),b(null),O.current=null,x.current.clear(),S.current=null,C.current=0,w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null)},[u]),(0,K.useEffect)(()=>{n.length!==0&&m(e=>{let t=new Set(e.filter(e=>n.some(t=>t.fileId===e)));for(let e of n.slice(0,nje))t.add(e.fileId);for(let e of n)e.diff.state!==`ready`&&t.add(e.fileId);return[...t]})},[n]);let L=(0,K.useMemo)(()=>n.map(e=>e.fileId).filter(e=>p.includes(e)),[n,p]),R=wi({queries:L.map(t=>({queryKey:[`git`,`patch`,u,t],queryFn:()=>I(t),enabled:e!==null,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}))}),z=(0,K.useMemo)(()=>{let e=new Map;return L.forEach((t,n)=>{let r=R[n];if(!r)return;let i=r.isPending||r.isFetching&&!r.data?`loading`:r.error?`error`:`ready`;e.set(t,{status:i,file:r.data?.file??null,error:r.error instanceof Error?r.error:null})}),e},[R,L]),B=(0,K.useMemo)(()=>R.map(e=>`${e.status}:${e.fetchStatus}:${e.dataUpdatedAt}:${e.errorUpdatedAt}`).join(`|`),[R]),ee=(0,K.useMemo)(()=>n.map(e=>z.get(e.fileId)?.file??e),[n,z]),V=(0,K.useCallback)(e=>{for(let{id:t}of e)P(t)},[P]),{ratioById:te,setObservedNode:H}=y9({ids:F,root:_,threshold:sje,onBecomeVisible:(0,K.useCallback)(e=>{if(O.current!==`diff`)return;let t=MAe(e);t&&(D.current+=1,b({fileId:t,nonce:D.current}))},[])}),ne=(0,K.useMemo)(()=>te.size>0||!y?te:new Map([[y.fileId,1]]),[y,te]),{setObservedNode:re}=y9({ids:F,root:_,rootMargin:oje,threshold:[0],onBecomeVisible:V}),ie=(0,K.useCallback)(()=>{if(l){g(M9);return}let e=E.current?.querySelector(`.tabs-strip`),t=e?Math.ceil(e.getBoundingClientRect().height):0;g(t>0?t+M9:M9)},[l]);(0,K.useEffect)(()=>{if(ie(),l||typeof ResizeObserver>`u`)return;let e=E.current?.querySelector(`.tabs-strip`);if(!e)return;let t=new ResizeObserver(()=>{ie()}),n=()=>{ie()};return t.observe(e),window.addEventListener(`resize`,n),()=>{t.disconnect(),window.removeEventListener(`resize`,n)}},[ie,l]);let U=(0,K.useCallback)(()=>{if(!l&&d!==`diff`)return;let e=S.current;if(!e)return;let t=x.current.get(e);if(t){if(C.current>0&&window.performance.now()>C.current){S.current=null,C.current=0;return}if(pje(t,T.current,h)){S.current=null,C.current=0;return}fje(t,T.current,h)}},[d,h,l]),ae=(0,K.useCallback)(()=>{w.current===null&&(w.current=window.requestAnimationFrame(()=>{w.current=null,U()}))},[U]),oe=(0,K.useCallback)(e=>{S.current=e,C.current=window.performance.now()+ije,!(!l&&d!==`diff`)&&ae()},[d,ae,l]);(0,K.useEffect)(()=>{!l&&d!==`diff`||S.current===null||ae()},[d,n,B,ae,l]),(0,K.useEffect)(()=>()=>{w.current!==null&&window.cancelAnimationFrame(w.current)},[]);let se=(0,K.useCallback)(e=>{P(e),oe(e),l||f(`diff`)},[oe,P,l]),ce=(0,K.useCallback)((e,t)=>{if(H(e,t),re(e,t),!t){x.current.delete(e);return}x.current.set(e,t),v(e=>e??v9(t,{allowNonScrollable:!0}))},[re,H]);if((0,K.useEffect)(()=>{if(!_)return;let e=()=>{O.current!==`tree`&&(O.current=`diff`)};return _.addEventListener(`scroll`,e,{passive:!0}),()=>{_.removeEventListener(`scroll`,e)}},[_]),(0,K.useEffect)(()=>{if(_||x.current.size===0)return;let e=()=>{let e=dje(x.current.values());e&&v(e)};e();let t=window.requestAnimationFrame(e);return()=>{window.cancelAnimationFrame(t)}},[_,B]),a)return(0,q.jsxs)(`div`,{className:`text-destructive border-current/20 flex items-center gap-2 rounded-md border px-3 py-3 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),a.message]});if(i&&!t)return(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 rounded-md border border-dashed px-3 py-4 text-sm`,children:[(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}),`Loading changed files…`]});if(!t)return(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Select an entry to inspect changed files.`});let le=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,q.jsx)(`div`,{ref:A,"data-testid":`git-file-tree-viewport`,className:`min-h-0 shrink-0`,style:j==null?void 0:{height:`${j}px`},children:(0,q.jsx)(j9,{files:ee,projectDir:r,visibilityRatioByFileId:ne,onSelectFile:se,revealRequest:y,className:`h-full min-h-0`,onUserScrollIntent:M})}),ue=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,q.jsx)(`div`,{className:`py-3`,style:{marginBlock:`${aje}px`},children:(0,q.jsx)(j9,{files:ee,projectDir:r,visibilityRatioByFileId:ne,onSelectFile:se,revealRequest:y,onUserScrollIntent:M})}),de={scrollPaddingTop:`${h}px`},fe=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No changed files found for this entry.`}):(0,q.jsx)(`div`,{className:`space-y-3`,children:n.map(e=>{let t=z.get(e.fileId);return(0,q.jsx)(tje,{file:t?.file??e,patch:t?.file??null,status:t?.status??`idle`,error:t?.error??null,onRegisterCard:ce,scrollMarginTop:h},e.fileId)})});return(0,q.jsxs)(`div`,{ref:c,className:`@container min-w-0 space-y-3`,children:[o?(0,q.jsx)(`section`,{className:`bg-card rounded-md border border-zinc-500/20 px-3 py-3`,children:(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[mje(t),(0,q.jsx)(`span`,{className:`truncate`,children:t.title})]}),(0,q.jsxs)(`div`,{className:`text-muted-foreground mt-1 text-xs`,children:[t.type===`commit`?t.hash:`working tree`,` ·`,` `,d7(t.relatedChanges)]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(_7,{files:t.diff.files}),(0,q.jsx)(g7,{diff:t.diff})]})]})}):null,l?(0,q.jsxs)(`div`,{className:`grid min-w-0 gap-3 [grid-template-columns:minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,q.jsx)(`section`,{className:`sticky top-0 flex min-h-0 self-start`,children:(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,q.jsx)(Eu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`File Tree`})]}),le]})}),(0,q.jsxs)(`section`,{className:`min-w-0 space-y-2`,onKeyDownCapture:e=>{uje(e)&&N()},onPointerDownCapture:N,onTouchMoveCapture:N,onWheelCapture:N,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,q.jsx)(lu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`Diff Stream`})]}),(0,q.jsx)(`div`,{ref:T,"data-testid":`git-diff-viewport`,style:de,children:fe})]})]}):(0,q.jsx)(`div`,{ref:E,children:(0,q.jsx)(wE,{variant:`default`,selectedTab:d,onTabChange:e=>f(e===`files`?`files`:`diff`),tabs:[{id:`diff`,label:`Diff Stream`,icon:(0,q.jsx)(lu,{className:`h-4 w-4`}),content:(0,q.jsx)(`div`,{ref:T,"data-testid":`git-diff-viewport`,className:`pt-3`,style:de,children:fe})},{id:`files`,label:`File Tree`,icon:(0,q.jsx)(Eu,{className:`h-4 w-4`}),content:ue}]})})]})}function gje(e){return e.type===`commit`?(0,q.jsx)(_u,{className:`h-5 w-5 shrink-0 text-sky-600 dark:text-sky-300`}):(0,q.jsx)(Ou,{className:`h-5 w-5 shrink-0 text-amber-600 dark:text-amber-300`})}function _je(e,t){return e.type===`commit`?`${e.hash} · ${d7(t)}`:`working tree · ${d7(t)}`}function P9({selector:e}){let t=Fc(),{projectDir:n}=um(),r=Ei({queryKey:e.type===`commit`?[`git`,`shell`,`commit`,e.hash]:[`git`,`shell`,`uncommitted`],queryFn:()=>cm.git.getEntryShell.query({selector:e}),enabled:!t,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),i=r.data?.entry??null,a=r.data?.files??[];return t?(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 p-4 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Git detail is only available in live mode.`]}):r.isLoading&&!i?(0,q.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading commit detail...`}):r.error&&!i?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`text-destructive flex items-center gap-2 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Error loading commit detail: `,r.error.message]}),(0,q.jsx)(`div`,{children:(0,q.jsx)(Hs,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]}):i?(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[(0,q.jsx)(Hs,{to:`/git`,className:`hover:bg-muted rounded-md p-2`,"aria-label":`Back to commits`,children:(0,q.jsx)(zl,{className:`h-5 w-5`})}),(0,q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,q.jsxs)(`h1`,{className:`font-nav flex flex-wrap items-start gap-2 text-2xl font-bold`,children:[gje(e),(0,q.jsx)(`span`,{className:`min-w-0 whitespace-normal [overflow-wrap:anywhere]`,children:i.title})]}),(0,q.jsx)(`p`,{className:`text-muted-foreground whitespace-normal text-sm [overflow-wrap:anywhere]`,children:_je(e,i.relatedChanges)})]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(_7,{files:a.length||i.diff.files}),(0,q.jsx)(g7,{diff:i.diff})]})]}),(0,q.jsx)(hje,{selector:e,entry:i,files:a,projectDir:n,isLoading:r.isLoading||r.isFetching,error:r.error instanceof Error?r.error:null,showEntrySummary:!1})]}):(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Commit detail is unavailable in the current project.`]}),(0,q.jsx)(`div`,{children:(0,q.jsx)(Hs,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]})}function vje(){return(0,q.jsx)(P9,{selector:{type:`uncommitted`}})}function yje(){let{hash:e}=Ts({from:`/git/commit/$hash`});return(0,q.jsx)(P9,{selector:{type:`commit`,hash:e}})}var bje=`terminal:`,xje={continue:`Continue`,ff:`Fast-forward`,apply:`Apply`,archive:`Archive`},Sje=new Set([`bash`,`zsh`,`fish`,`sh`,`dash`,`ksh`,`cmd.exe`,`cmd`,`powershell.exe`,`powershell`,`pwsh.exe`,`pwsh`,`nu`,`nushell`]);function F9(e){return e instanceof Error?e.message:String(e)}function Cje(e){return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,``).replace(/\x1B\][^\u0007]*(\u0007|\x1B\\)/g,``).replace(/\x1B[@-Z\\-_]/g,``)}function wje(e){let t=``;for(let n of e){let e=n.charCodeAt(0);(!(e>=0&&e<=31||e===127)||e===9||e===10||e===13)&&(t+=n)}return t}function I9(e){let t=wje(Cje(e));return{text:t,modified:t!==e}}function Tje(e,t,n){return new Promise((r,i)=>{let a=``,o=``,s=!1,c=()=>{n&&n.removeEventListener(`abort`,d)},l=e=>{s||(s=!0,c(),r(e))},u=e=>{s||(s=!0,c(),i(e))},d=()=>{f.unsubscribe(),u(Error(`Prompt generation canceled.`))},f=cm.cli.runCommandStream.subscribe({command:e,args:t},{onData:e=>{if(e.type===`stdout`&&e.data){a+=e.data;return}if(e.type===`stderr`&&e.data){o+=e.data;return}e.type===`exit`&&(f.unsubscribe(),l({stdout:a,stderr:o,exitCode:e.exitCode??null}))},onError:e=>{f.unsubscribe(),u(e)}});n&&(n.aborted?d():n.addEventListener(`abort`,d,{once:!0}))})}function L9(e){return e.startsWith(bje)?e.slice(9):null}function Eje(e){if(!e)return null;let t=e.trim().toLowerCase();return t?t.split(/[\\/]/).pop()??t:null}function Dje(e){let t=Eje(e);return t?Sje.has(t):!1}function Oje(e,t){let n=e.replace(/\r\n?/g,`
1392
+ `).map((e,t)=>eje(e,t))}):(0,q.jsxs)(`div`,{className:`readonly-code-surface text-muted-foreground flex items-start gap-2 px-3 py-3 text-sm`,children:[(0,q.jsx)(su,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:s})]})]})}var nje=2,rje=960,M9=12,N9=16,ije=4e3,aje=12,oje=`180px 0px`,sje=EAe(20);function cje(){let e=(0,K.useRef)(null),[t,n]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=new ResizeObserver(([e])=>{n((e?.contentRect.width??0)>=rje)});return r.observe(t),()=>{r.disconnect()}},[]),{ref:e,wide:t}}function lje(e){return e?e.type===`commit`?`commit:${e.hash}`:`uncommitted`:`none`}function uje(e){return _9(e.key)}function dje(e){for(let t of e){let e=v9(t,{allowNonScrollable:!0});if(e)return e}return null}function fje(e,t,n){let r=v9(e,{allowNonScrollable:!0})??v9(t,{allowNonScrollable:!0});if(!r){e.scrollIntoView({block:`start`,behavior:`auto`});return}let i=e.getBoundingClientRect(),a=r.getBoundingClientRect(),o=r.scrollTop+i.top-a.top-n;r.scrollTo({top:Math.max(o,0),behavior:`auto`})}function pje(e,t,n){let r=v9(e,{allowNonScrollable:!0})??v9(t,{allowNonScrollable:!0}),i=e.getBoundingClientRect();if(!r)return Math.abs(i.top-n)<=N9;let a=r.getBoundingClientRect().top+n;return Math.abs(i.top-a)<=N9}function mje(e){return e.type===`commit`?(0,q.jsx)(_u,{className:`h-4 w-4 shrink-0 text-sky-600 dark:text-sky-300`}):(0,q.jsx)(Ou,{className:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-300`})}function hje({selector:e,entry:t,files:n,projectDir:r,isLoading:i,error:a,showEntrySummary:o=!0,patchLoader:s}){let{ref:c,wide:l}=cje(),u=lje(e),[d,f]=(0,K.useState)(`diff`),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(M9),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(null),x=(0,K.useRef)(new Map),S=(0,K.useRef)(null),C=(0,K.useRef)(0),w=(0,K.useRef)(null),T=(0,K.useRef)(null),E=(0,K.useRef)(null),D=(0,K.useRef)(0),O=(0,K.useRef)(null),[k,A]=(0,K.useState)(null),j=jAe({target:k,enabled:l}),M=(0,K.useCallback)(()=>{O.current=`tree`},[]),N=(0,K.useCallback)(()=>{O.current=`diff`},[]),P=(0,K.useCallback)(e=>{m(t=>t.includes(e)?t:[...t,e])},[]),F=(0,K.useMemo)(()=>n.map(e=>e.fileId),[n]),I=(0,K.useCallback)(async t=>e?s?s({selector:e,fileId:t}):cm.git.getEntryPatch.query({selector:e,fileId:t}):null,[s,e]);(0,K.useEffect)(()=>{f(`diff`),m([]),v(null),b(null),O.current=null,x.current.clear(),S.current=null,C.current=0,w.current!==null&&(window.cancelAnimationFrame(w.current),w.current=null)},[u]),(0,K.useEffect)(()=>{n.length!==0&&m(e=>{let t=new Set(e.filter(e=>n.some(t=>t.fileId===e)));for(let e of n.slice(0,nje))t.add(e.fileId);for(let e of n)e.diff.state!==`ready`&&t.add(e.fileId);return[...t]})},[n]);let L=(0,K.useMemo)(()=>n.map(e=>e.fileId).filter(e=>p.includes(e)),[n,p]),R=wi({queries:L.map(t=>({queryKey:[`git`,`patch`,u,t],queryFn:()=>I(t),enabled:e!==null,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}))}),z=(0,K.useMemo)(()=>{let e=new Map;return L.forEach((t,n)=>{let r=R[n];if(!r)return;let i=r.isPending||r.isFetching&&!r.data?`loading`:r.error?`error`:`ready`;e.set(t,{status:i,file:r.data?.file??null,error:r.error instanceof Error?r.error:null})}),e},[R,L]),B=(0,K.useMemo)(()=>R.map(e=>`${e.status}:${e.fetchStatus}:${e.dataUpdatedAt}:${e.errorUpdatedAt}`).join(`|`),[R]),ee=(0,K.useMemo)(()=>n.map(e=>z.get(e.fileId)?.file??e),[n,z]),V=(0,K.useCallback)(e=>{for(let{id:t}of e)P(t)},[P]),{ratioById:te,setObservedNode:H}=y9({ids:F,root:_,threshold:sje,onBecomeVisible:(0,K.useCallback)(e=>{if(O.current!==`diff`)return;let t=MAe(e);t&&(D.current+=1,b({fileId:t,nonce:D.current}))},[])}),ne=(0,K.useMemo)(()=>te.size>0||!y?te:new Map([[y.fileId,1]]),[y,te]),{setObservedNode:re}=y9({ids:F,root:_,rootMargin:oje,threshold:[0],onBecomeVisible:V}),ie=(0,K.useCallback)(()=>{if(l){g(M9);return}let e=E.current?.querySelector(`.tabs-strip`),t=e?Math.ceil(e.getBoundingClientRect().height):0;g(t>0?t+M9:M9)},[l]);(0,K.useEffect)(()=>{if(ie(),l||typeof ResizeObserver>`u`)return;let e=E.current?.querySelector(`.tabs-strip`);if(!e)return;let t=new ResizeObserver(()=>{ie()}),n=()=>{ie()};return t.observe(e),window.addEventListener(`resize`,n),()=>{t.disconnect(),window.removeEventListener(`resize`,n)}},[ie,l]);let U=(0,K.useCallback)(()=>{if(!l&&d!==`diff`)return;let e=S.current;if(!e)return;let t=x.current.get(e);if(t){if(C.current>0&&window.performance.now()>C.current){S.current=null,C.current=0;return}if(pje(t,T.current,h)){S.current=null,C.current=0;return}fje(t,T.current,h)}},[d,h,l]),ae=(0,K.useCallback)(()=>{w.current===null&&(w.current=window.requestAnimationFrame(()=>{w.current=null,U()}))},[U]),oe=(0,K.useCallback)(e=>{S.current=e,C.current=window.performance.now()+ije,!(!l&&d!==`diff`)&&ae()},[d,ae,l]);(0,K.useEffect)(()=>{!l&&d!==`diff`||S.current===null||ae()},[d,n,B,ae,l]),(0,K.useEffect)(()=>()=>{w.current!==null&&window.cancelAnimationFrame(w.current)},[]);let se=(0,K.useCallback)(e=>{P(e),oe(e),l||f(`diff`)},[oe,P,l]),ce=(0,K.useCallback)((e,t)=>{if(H(e,t),re(e,t),!t){x.current.delete(e);return}x.current.set(e,t),v(e=>e??v9(t,{allowNonScrollable:!0}))},[re,H]);if((0,K.useEffect)(()=>{if(!_)return;let e=()=>{O.current!==`tree`&&(O.current=`diff`)};return _.addEventListener(`scroll`,e,{passive:!0}),()=>{_.removeEventListener(`scroll`,e)}},[_]),(0,K.useEffect)(()=>{if(_||x.current.size===0)return;let e=()=>{let e=dje(x.current.values());e&&v(e)};e();let t=window.requestAnimationFrame(e);return()=>{window.cancelAnimationFrame(t)}},[_,B]),a)return(0,q.jsxs)(`div`,{className:`text-destructive border-current/20 flex items-center gap-2 rounded-md border px-3 py-3 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),a.message]});if(i&&!t)return(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 rounded-md border border-dashed px-3 py-4 text-sm`,children:[(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}),`Loading changed files…`]});if(!t)return(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Select an entry to inspect changed files.`});let le=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,q.jsx)(`div`,{ref:A,"data-testid":`git-file-tree-viewport`,className:`min-h-0 shrink-0 pb-1`,style:j==null?void 0:{height:`${j}px`},children:(0,q.jsx)(j9,{files:ee,projectDir:r,visibilityRatioByFileId:ne,onSelectFile:se,revealRequest:y,className:`h-full min-h-0`,onUserScrollIntent:M})}),ue=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,q.jsx)(`div`,{className:`py-3`,style:{marginBlock:`${aje}px`},children:(0,q.jsx)(j9,{files:ee,projectDir:r,visibilityRatioByFileId:ne,onSelectFile:se,revealRequest:y,onUserScrollIntent:M})}),de={scrollPaddingTop:`${h}px`},fe=i&&n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):n.length===0?(0,q.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No changed files found for this entry.`}):(0,q.jsx)(`div`,{className:`space-y-3`,children:n.map(e=>{let t=z.get(e.fileId);return(0,q.jsx)(tje,{file:t?.file??e,patch:t?.file??null,status:t?.status??`idle`,error:t?.error??null,onRegisterCard:ce,scrollMarginTop:h},e.fileId)})});return(0,q.jsxs)(`div`,{ref:c,className:`@container min-w-0 space-y-3`,children:[o?(0,q.jsx)(`section`,{className:`bg-card rounded-md border border-zinc-500/20 px-3 py-3`,children:(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[mje(t),(0,q.jsx)(`span`,{className:`truncate`,children:t.title})]}),(0,q.jsxs)(`div`,{className:`text-muted-foreground mt-1 text-xs`,children:[t.type===`commit`?t.hash:`working tree`,` ·`,` `,d7(t.relatedChanges)]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(_7,{files:t.diff.files}),(0,q.jsx)(g7,{diff:t.diff})]})]})}):null,l?(0,q.jsxs)(`div`,{className:`grid min-w-0 gap-3 [grid-template-columns:minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,q.jsx)(`section`,{className:`sticky top-0 flex min-h-0 self-start`,children:(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,q.jsx)(Eu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`File Tree`})]}),le]})}),(0,q.jsxs)(`section`,{className:`min-w-0 space-y-2`,onKeyDownCapture:e=>{uje(e)&&N()},onPointerDownCapture:N,onTouchMoveCapture:N,onWheelCapture:N,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,q.jsx)(lu,{className:`h-4 w-4 shrink-0`}),(0,q.jsx)(`span`,{children:`Diff Stream`})]}),(0,q.jsx)(`div`,{ref:T,"data-testid":`git-diff-viewport`,style:de,children:fe})]})]}):(0,q.jsx)(`div`,{ref:E,children:(0,q.jsx)(wE,{variant:`default`,selectedTab:d,onTabChange:e=>f(e===`files`?`files`:`diff`),tabs:[{id:`diff`,label:`Diff Stream`,icon:(0,q.jsx)(lu,{className:`h-4 w-4`}),content:(0,q.jsx)(`div`,{ref:T,"data-testid":`git-diff-viewport`,className:`pt-3`,style:de,children:fe})},{id:`files`,label:`File Tree`,icon:(0,q.jsx)(Eu,{className:`h-4 w-4`}),content:ue}]})})]})}function gje(e){return e.type===`commit`?(0,q.jsx)(_u,{className:`h-5 w-5 shrink-0 text-sky-600 dark:text-sky-300`}):(0,q.jsx)(Ou,{className:`h-5 w-5 shrink-0 text-amber-600 dark:text-amber-300`})}function _je(e,t){return e.type===`commit`?`${e.hash} · ${d7(t)}`:`working tree · ${d7(t)}`}function P9({selector:e}){let t=Fc(),{projectDir:n}=um(),r=Ei({queryKey:e.type===`commit`?[`git`,`shell`,`commit`,e.hash]:[`git`,`shell`,`uncommitted`],queryFn:()=>cm.git.getEntryShell.query({selector:e}),enabled:!t,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),i=r.data?.entry??null,a=r.data?.files??[];return t?(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 p-4 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Git detail is only available in live mode.`]}):r.isLoading&&!i?(0,q.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading commit detail...`}):r.error&&!i?(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`text-destructive flex items-center gap-2 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Error loading commit detail: `,r.error.message]}),(0,q.jsx)(`div`,{children:(0,q.jsx)(Hs,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]}):i?(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[(0,q.jsx)(Hs,{to:`/git`,className:`hover:bg-muted rounded-md p-2`,"aria-label":`Back to commits`,children:(0,q.jsx)(zl,{className:`h-5 w-5`})}),(0,q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,q.jsxs)(`h1`,{className:`font-nav flex flex-wrap items-start gap-2 text-2xl font-bold`,children:[gje(e),(0,q.jsx)(`span`,{className:`min-w-0 whitespace-normal [overflow-wrap:anywhere]`,children:i.title})]}),(0,q.jsx)(`p`,{className:`text-muted-foreground whitespace-normal text-sm [overflow-wrap:anywhere]`,children:_je(e,i.relatedChanges)})]})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(_7,{files:a.length||i.diff.files}),(0,q.jsx)(g7,{diff:i.diff})]})]}),(0,q.jsx)(hje,{selector:e,entry:i,files:a,projectDir:n,isLoading:r.isLoading||r.isFetching,error:r.error instanceof Error?r.error:null,showEntrySummary:!1})]}):(0,q.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,children:[(0,q.jsx)(ql,{className:`h-4 w-4 shrink-0`}),`Commit detail is unavailable in the current project.`]}),(0,q.jsx)(`div`,{children:(0,q.jsx)(Hs,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]})}function vje(){return(0,q.jsx)(P9,{selector:{type:`uncommitted`}})}function yje(){let{hash:e}=Ts({from:`/git/commit/$hash`});return(0,q.jsx)(P9,{selector:{type:`commit`,hash:e}})}var bje=`terminal:`,xje={continue:`Continue`,ff:`Fast-forward`,apply:`Apply`,archive:`Archive`},Sje=new Set([`bash`,`zsh`,`fish`,`sh`,`dash`,`ksh`,`cmd.exe`,`cmd`,`powershell.exe`,`powershell`,`pwsh.exe`,`pwsh`,`nu`,`nushell`]);function F9(e){return e instanceof Error?e.message:String(e)}function Cje(e){return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,``).replace(/\x1B\][^\u0007]*(\u0007|\x1B\\)/g,``).replace(/\x1B[@-Z\\-_]/g,``)}function wje(e){let t=``;for(let n of e){let e=n.charCodeAt(0);(!(e>=0&&e<=31||e===127)||e===9||e===10||e===13)&&(t+=n)}return t}function I9(e){let t=wje(Cje(e));return{text:t,modified:t!==e}}function Tje(e,t,n){return new Promise((r,i)=>{let a=``,o=``,s=!1,c=()=>{n&&n.removeEventListener(`abort`,d)},l=e=>{s||(s=!0,c(),r(e))},u=e=>{s||(s=!0,c(),i(e))},d=()=>{f.unsubscribe(),u(Error(`Prompt generation canceled.`))},f=cm.cli.runCommandStream.subscribe({command:e,args:t},{onData:e=>{if(e.type===`stdout`&&e.data){a+=e.data;return}if(e.type===`stderr`&&e.data){o+=e.data;return}e.type===`exit`&&(f.unsubscribe(),l({stdout:a,stderr:o,exitCode:e.exitCode??null}))},onError:e=>{f.unsubscribe(),u(e)}});n&&(n.aborted?d():n.addEventListener(`abort`,d,{once:!0}))})}function L9(e){return e.startsWith(bje)?e.slice(9):null}function Eje(e){if(!e)return null;let t=e.trim().toLowerCase();return t?t.split(/[\\/]/).pop()??t:null}function Dje(e){let t=Eje(e);return t?Sje.has(t):!1}function Oje(e,t){let n=e.replace(/\r\n?/g,`
1393
1393
  `);return t?`\x1b[200~${n}\x1b[201~\n`:`${n}\n`}function kje(){let e=_c(),{setConfig:t}=G_(),{requestClose:n}=K_(),{sessions:r,activeSessionId:i}=A2(),a=(0,K.useMemo)(()=>MH(e.search),[e.search]),o=(0,K.useMemo)(()=>a?NH(a):null,[a]),s=(0,K.useMemo)(()=>r.filter(e=>!e.isExited),[r]),c=(0,K.useMemo)(()=>{if(i&&s.some(e=>e.id===i))return`terminal:${i}`;let e=s[0];return e?`terminal:${e.id}`:null},[i,s]),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),k=(0,K.useRef)(null),A=(0,K.useRef)(null);(0,K.useEffect)(()=>{u(e=>{if(!e)return c;let t=L9(e);return t&&s.some(e=>e.id===t)?e:c})},[s,c]),(0,K.useEffect)(()=>{t({layout:{alignY:`start`,width:`wide`,topGap:`comfortable`},dialogClassName:`overflow-hidden`,panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(86dvh,920px)`})},[t]),(0,K.useEffect)(()=>()=>{k.current!=null&&window.clearTimeout(k.current),A.current!=null&&window.clearTimeout(A.current)},[]),(0,K.useEffect)(()=>{let e=!1,t=new AbortController;return(async()=>{if(!a){f(``),g(`Invalid compose parameters.`),m(!1);return}if(v(null),m(!0),g(null),Fc()){f(PH(a)),m(!1);return}if(!o){f(PH(a)),g(`Prompt source is not available for this action.`),m(!1);return}try{let n=await Tje(o.command,o.args,t.signal);if(e)return;let r=I9(n.stdout);f(FH(a,r.text)),n.exitCode===0?r.modified&&g(`ANSI/control characters were stripped from generated prompt for safety.`):g(n.stderr.trim()||`Command exited with code ${n.exitCode??`unknown`}.`)}catch(t){if(e)return;f(PH(a)),g(F9(t))}finally{e||m(!1)}})(),()=>{e=!0,t.abort()}},[a,o]);let j=a?xje[a.action]:`Compose`,M=async()=>{let e=d.trim();if(e.length===0){v(`Prompt is empty.`);return}if(!l){v(`No live terminal session is available.`);return}b(!0),v(null);try{let t=L9(l);if(!t)throw Error(`Invalid terminal target.`);if(!s.some(e=>e.id===t))throw Error(`Selected terminal session is no longer available.`);let r=s.find(e=>e.id===t)??null,i=I9(e);if(i.text.trim().length===0)throw Error(`Prompt contains only unsupported control characters after sanitization.`);let a=Oje(i.text,Dje(r?.processTitle));if(!O2.writeToSession(t,a))throw Error(`Terminal session is not ready. Wait a moment and retry.`);n()}catch(e){v(F9(e))}finally{b(!1)}},N=async()=>{let e=d.trim();if(e.length===0){v(`Prompt is empty.`);return}S(!0),v(null),E(!1);try{await navigator.clipboard.writeText(e),E(!0),k.current!=null&&window.clearTimeout(k.current),k.current=window.setTimeout(()=>{E(!1)},1200)}catch(e){v(F9(e))}finally{S(!1)}},P=async()=>{let e=d.trim();if(e.length===0){v(`Prompt is empty.`);return}w(!0),v(null),O(!1);try{await O2.addInputHistory(e),O(!0),A.current!=null&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>{O(!1)},1200)}catch(e){v(F9(e))}finally{w(!1)}};return(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,q.jsx)(`div`,{className:`border-border flex items-center justify-between gap-3 border-b px-4 py-3`,children:(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`h2`,{className:`font-nav truncate text-base tracking-[0.04em]`,children:[j,` Prompt`]}),(0,q.jsx)(`p`,{className:`text-muted-foreground truncate text-xs`,children:a?`change: ${a.changeId}`:`missing change context`})]})}),(0,q.jsxs)(`div`,{className:`flex max-h-full min-h-0 min-w-0 flex-1 flex-col gap-3 overflow-hidden p-4`,children:[o&&(0,q.jsxs)(`div`,{className:`bg-muted/40 border-border rounded-md border p-2 text-xs`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Prompt source:`}),` `,(0,q.jsxs)(`code`,{className:`break-all`,children:[o.command,` `,o.args.join(` `)]})]}),p&&(0,q.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,children:[(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}),`Generating prompt...`]}),h&&(0,q.jsxs)(`div`,{className:`rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-700`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,q.jsx)(ql,{className:`h-4 w-4`}),`Prompt source warning`]}),(0,q.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap break-words`,children:h})]}),(0,q.jsxs)(`label`,{className:`flex max-h-full min-h-0 min-w-0 flex-1 flex-col gap-1.5 overflow-hidden`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium`,children:`Prompt`}),(0,q.jsx)(NV,{value:d,onChange:f,language:`markdown`,lineNumbers:!1,lineWrapping:!0,className:`scrollbar-thin scrollbar-track-transparent min-h-0 flex-1 overflow-auto border`,editorMinHeight:`0px`,placeholder:`Compose prompt...`})]})]}),(0,q.jsxs)(`div`,{className:`border-border mt-1 flex flex-col gap-2 border-t p-4 sm:flex-row sm:items-end sm:justify-between`,children:[(0,q.jsxs)(`div`,{className:`order-2 flex items-center gap-2 sm:order-1`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:x,onClick:()=>{N()},className:[`inline-flex h-10 items-center justify-center gap-2 rounded-md border px-4 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50`,T?`border-emerald-500/50 bg-emerald-500/10 text-emerald-700`:`border-border hover:bg-muted`].join(` `),children:[x?(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}):T?(0,q.jsx)(Wl,{className:`h-4 w-4`}):(0,q.jsx)(tu,{className:`h-4 w-4`}),T?`Copied`:`Copy`]}),(0,q.jsxs)(`button`,{type:`button`,disabled:C,onClick:()=>{P()},className:[`inline-flex h-10 items-center justify-center gap-2 rounded-md border px-4 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50`,D?`border-emerald-500/50 bg-emerald-500/10 text-emerald-700`:`border-border hover:bg-muted`].join(` `),children:[C?(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}):D?(0,q.jsx)(Wl,{className:`h-4 w-4`}):(0,q.jsx)(Bu,{className:`h-4 w-4`}),D?`Saved`:`Save`]})]}),(0,q.jsxs)(`div`,{className:`order-1 flex min-w-0 items-end gap-2 sm:order-2`,children:[(0,q.jsxs)(`label`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium`,children:`Terminal`}),(0,q.jsxs)(`select`,{value:l??``,onChange:e=>u(e.target.value||null),className:`border-input bg-background focus:ring-ring w-full rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2`,children:[s.length===0&&(0,q.jsx)(`option`,{value:``,children:`No live terminal`}),s.map(e=>(0,q.jsxs)(`option`,{value:`terminal:${e.id}`,children:[`Terminal: `,e.displayTitle]},e.id))]})]}),(0,q.jsxs)(`button`,{type:`button`,disabled:y||!l,onClick:()=>{M()},className:`bg-primary text-primary-foreground inline-flex h-10 items-center justify-center gap-2 self-end rounded-md px-4 text-sm font-medium disabled:cursor-not-allowed disabled:opacity-50`,children:[y?(0,q.jsx)(Ou,{className:`h-4 w-4 animate-spin`}):(0,q.jsx)(Hu,{className:`h-4 w-4`}),`Send`]})]})]}),_&&(0,q.jsx)(`div`,{className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-600`,children:_})]})}var Aje=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function jje(e){let t=[`new`,`change`,e.changeName.trim()],n=e.schema.trim();n.length>0&&t.push(`--schema`,n);let r=e.description.trim();r.length>0&&t.push(`--description`,r);for(let n of e.extraArgs){let e=n.trim();e.length>0&&t.push(e)}return t}function Mje(e){return/\s/.test(e)?JSON.stringify(e):e}function Nje(){let{setConfig:e}=G_(),{requestClose:t}=K_(),{createDedicatedSession:n}=A2(),{data:r}=lH(),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(``),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)([]),[f,p]=(0,K.useState)(``);(0,K.useEffect)(()=>{e({layout:{alignY:`start`,width:`normal`,topGap:`comfortable`},panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(86dvh,900px)`})},[e]);let m=i.trim(),h=Aje.test(m),g=m.length>0&&h,_=(0,K.useMemo)(()=>jje({changeName:i,schema:o,description:c,extraArgs:u}),[i,o,c,u]),v=(0,K.useMemo)(()=>g?[`openspec`,..._].map(Mje).join(` `):`openspec new change <change-name>`,[_,g]),y=r?.schemas.map(e=>e.name)??[],b=()=>{let e=f.trim();e.length!==0&&(d(t=>[...t,e]),p(``))};return(0,q.jsxs)(`form`,{className:`flex h-full min-h-0 min-w-0 flex-col`,onSubmit:e=>{if(e.preventDefault(),!g)return;let r=m;n(`openspec`,_,{closeTip:`Press any key or close action to finish this session.`,closeCallbackUrl:{0:`/changes/${encodeURIComponent(r)}`}});let i=Ol.getAreaForPath(`/terminal`);Ol.push(i,`/terminal`,null),t()},children:[(0,q.jsxs)(`div`,{className:`border-border flex items-center gap-2 border-b px-4 py-3`,children:[(0,q.jsx)(Ku,{className:`text-primary h-4 w-4`}),(0,q.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Create OPSX Change`})]}),(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium`,children:`Change Name`}),(0,q.jsx)(`input`,{autoFocus:!0,value:i,onChange:e=>a(e.target.value),placeholder:`add-search-poparea`,className:`border-input bg-background focus:ring-ring rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2`}),m.length>0&&!h&&(0,q.jsx)(`span`,{className:`text-destructive text-xs`,children:`Use kebab-case: lowercase letters, numbers, and single hyphens.`})]}),(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium`,children:`Schema`}),(0,q.jsx)(`input`,{list:`opsx-new-schema-options`,value:o,onChange:e=>s(e.target.value),placeholder:`(optional)`,className:`border-input bg-background focus:ring-ring rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2`}),(0,q.jsx)(`datalist`,{id:`opsx-new-schema-options`,children:y.map(e=>(0,q.jsx)(`option`,{value:e},e))})]}),(0,q.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,q.jsx)(`span`,{className:`text-sm font-medium`,children:`Description`}),(0,q.jsx)(`textarea`,{value:c,onChange:e=>l(e.target.value),placeholder:`(optional)`,rows:3,className:`border-input bg-background focus:ring-ring rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2`})]}),(0,q.jsxs)(`details`,{className:`group rounded-md border border-dashed`,children:[(0,q.jsx)(`summary`,{className:`cursor-pointer list-none px-3 py-2 text-sm font-medium`,children:`Advanced Arguments`}),(0,q.jsxs)(`div`,{className:`border-border flex flex-col gap-3 border-t px-3 py-3`,children:[(0,q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,q.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),b())},placeholder:`--my-flag`,className:`border-input bg-background focus:ring-ring flex-1 rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2`}),(0,q.jsx)(`button`,{type:`button`,onClick:b,className:`border-border hover:bg-muted rounded-md border px-3 py-2 text-sm`,children:`Add`})]}),u.length>0&&(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:u.map((e,t)=>(0,q.jsxs)(`span`,{className:`bg-muted inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs`,children:[e,(0,q.jsx)(`button`,{type:`button`,onClick:()=>{d(e=>e.filter((e,n)=>n!==t))},className:`text-muted-foreground hover:text-foreground`,"aria-label":`Remove argument ${e}`,children:(0,q.jsx)($u,{className:`h-3 w-3`})})]},`${e}-${t}`))}),(0,q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:`Extra args are appended at the end of the command and can override earlier flags.`})]})]}),(0,q.jsxs)(`div`,{className:`bg-muted/40 border-border rounded-md border p-3`,children:[(0,q.jsx)(`div`,{className:`text-muted-foreground mb-1 text-xs uppercase tracking-wider`,children:`Command`}),(0,q.jsx)(`code`,{className:`break-all text-xs`,children:v})]})]}),(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-end gap-2 border-t px-4 py-3`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:t,className:`border-border hover:bg-muted rounded-md border px-3 py-1.5 text-sm`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`submit`,disabled:!g,className:`bg-primary text-primary-foreground rounded-md px-3 py-1.5 text-sm disabled:cursor-not-allowed disabled:opacity-50`,children:`Create`})]})]})}var Pje=`terminal:`;function R9(e){return e.startsWith(Pje)?e.slice(9):null}function Fje(){let{setConfig:e}=G_(),{requestClose:t}=K_(),{sessions:n,activeSessionId:r}=A2(),i=(0,K.useMemo)(()=>n.filter(e=>!e.isExited),[n]),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(!1),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(!1);(0,K.useEffect)(()=>{e({layout:{alignY:`start`,width:`wide`,topGap:`comfortable`},dialogClassName:`overflow-hidden`,panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(86dvh,900px)`})},[e]);let _=(0,K.useMemo)(()=>r&&i.some(e=>e.id===r)?`terminal:${r}`:i[0]?`terminal:${i[0].id}`:null,[r,i]);(0,K.useEffect)(()=>{c(e=>{if(!e)return _;let t=R9(e);return t&&i.some(e=>e.id===t)?e:_})},[i,_]);let v=(0,K.useMemo)(()=>{let e=a.trim();return e.length===0?`/opsx:propose`:e.startsWith(`/opsx:`)?e:`/opsx:propose ${e}`},[a]),y=async()=>{if(!s){u(`No live terminal session is available.`);return}u(null),f(!0);try{let e=R9(s);if(!e)throw Error(`Invalid terminal target.`);if(!O2.writeToSession(e,`${v}\n`))throw Error(`Terminal session is not ready. Wait a moment and retry.`);t()}catch(e){u(e instanceof Error?e.message:String(e))}finally{f(!1)}},b=async()=>{await navigator.clipboard.writeText(v),m(!0),window.setTimeout(()=>m(!1),900)},x=async()=>{await O2.addInputHistory(v),g(!0),window.setTimeout(()=>g(!1),900)};return(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-b px-4 py-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Ku,{className:`text-primary h-4 w-4`}),(0,q.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Quick /opsx:propose`})]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>Ol.activatePop(`/opsx-new`),className:`border-border hover:bg-muted inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-xs`,title:`Open advanced /opsx:new form`,children:[`Advanced`,(0,q.jsx)(Vl,{className:`h-3.5 w-3.5`})]})]}),(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 p-4`,children:[(0,q.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Enter your idea, then send it as a slash command to the selected terminal.`}),(0,q.jsx)(NV,{value:a,onChange:o,filename:`opsx-propose.md`,placeholder:`e.g. add workspace kanban support for active changes`,editorMinHeight:`180px`}),(0,q.jsxs)(`div`,{className:`bg-muted/30 border-border rounded-md border px-3 py-2 text-xs`,children:[(0,q.jsx)(`span`,{className:`text-muted-foreground mr-1`,children:`Command:`}),(0,q.jsx)(`code`,{children:v})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`label`,{className:`w-24 text-xs font-medium`,children:`Target`}),(0,q.jsxs)(`select`,{value:s??``,onChange:e=>c(e.target.value||null),className:`border-border bg-background min-w-0 flex-1 rounded-md border px-3 py-2 text-sm`,children:[s===null&&(0,q.jsx)(`option`,{value:``,disabled:!0,children:`No live terminal session`}),i.map(e=>(0,q.jsx)(`option`,{value:`terminal:${e.id}`,children:e.displayTitle},e.id))]})]}),l&&(0,q.jsx)(`div`,{className:`text-destructive text-xs`,children:l})]}),(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-t px-4 py-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void b(),className:`border-border inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs ${p?`text-emerald-600`:`hover:bg-muted`}`,children:[(0,q.jsx)(tu,{className:`h-3.5 w-3.5`}),p?`Copied`:`Copy`]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void x(),className:`border-border inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs ${h?`text-emerald-600`:`hover:bg-muted`}`,children:[(0,q.jsx)(Bu,{className:`h-3.5 w-3.5`}),h?`Saved`:`Save`]})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:t,className:`border-border hover:bg-muted rounded-md border px-3 py-1.5 text-xs`,children:`Cancel`}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void y(),disabled:d||s===null,className:`bg-primary text-primary-foreground inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-xs disabled:opacity-50`,children:[(0,q.jsx)(Hu,{className:`h-3.5 w-3.5`}),d?`Sending...`:`Send`]})]})]})]})}function Ije(){let e=_c(),{setConfig:t}=G_(),{requestClose:n}=K_(),{lines:r,status:i,commands:a,hasStarted:o,reset:s,cancel:c}=nv(),[l,u]=(0,K.useState)(!0),d=(0,K.useMemo)(()=>new URLSearchParams(e.search).get(`change`)?.trim()??``,[e.search]);return(0,K.useEffect)(()=>{t({layout:{alignY:`start`,width:`normal`,topGap:`comfortable`},panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(82dvh,760px)`})},[t]),(0,K.useEffect)(()=>{if(!d||o)return;let e=[`validate`,d,`--type`,`change`];l&&e.push(`--strict`),a.replaceAll([{command:`openspec`,args:e}]),a.runAll()},[d,a,o,l]),(0,q.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-b px-4 py-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Wu,{className:`text-primary h-4 w-4`}),(0,q.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Verify Change`})]}),(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked),className:`border-border h-3.5 w-3.5 rounded`,disabled:i===`running`}),`Strict`]})]}),(0,q.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-3 p-4`,children:[d?(0,q.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Running validation for `,(0,q.jsx)(`code`,{className:`bg-muted rounded px-1`,children:d}),`.`]}):(0,q.jsx)(`p`,{className:`text-destructive text-sm`,children:`Missing change id. Open Verify from a change page.`}),(0,q.jsx)(rv,{lines:r,maxHeight:`56vh`})]}),(0,q.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-t px-4 py-3`,children:[(0,q.jsx)(`div`,{className:`text-xs`,children:i===`success`?(0,q.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-emerald-600`,children:[(0,q.jsx)(Jl,{className:`h-3.5 w-3.5`}),`Verification completed`]}):i===`running`?(0,q.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1`,children:[(0,q.jsx)(Ou,{className:`h-3.5 w-3.5 animate-spin`}),`Running...`]}):(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`Ready`})}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:()=>{c(),s(),n()},className:`border-border hover:bg-muted rounded-md border px-3 py-1.5 text-xs`,children:`Close`}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{if(!d)return;s();let e=[`validate`,d,`--type`,`change`];l&&e.push(`--strict`),a.replaceAll([{command:`openspec`,args:e}]),a.runAll()},disabled:!d||i===`running`,className:`bg-primary text-primary-foreground rounded-md px-3 py-1.5 text-xs disabled:opacity-50`,children:`Re-run`})]})]})]})}var z9=kW([`spec`,`change`,`archive`]),B9=wW({id:bW(),kind:z9,title:bW(),href:bW(),path:bW(),content:bW(),updatedAt:xW()}),Lje=wW({query:bW(),limit:xW().int().positive().optional()}),V9=wW({documentId:bW(),kind:z9,title:bW(),href:bW(),path:bW(),score:xW(),snippet:bW(),updatedAt:xW()});EW(`type`,[wW({id:bW(),type:OW(`init`),docs:CW(B9)}),wW({id:bW(),type:OW(`replaceAll`),docs:CW(B9)}),wW({id:bW(),type:OW(`search`),query:Lje}),wW({id:bW(),type:OW(`dispose`)})]);var Rje=EW(`type`,[wW({id:bW(),type:OW(`ok`)}),wW({id:bW(),type:OW(`results`),hits:CW(V9)}),wW({id:bW(),type:OW(`error`),message:bW()})]),zje=String.raw`
1394
1394
  const DEFAULT_LIMIT = 50;
1395
1395
  const MAX_LIMIT = 200;