openspecui 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +1 -1
- package/package.json +1 -1
- package/web/assets/CanvasRenderer-XYe2KglB.js +1 -0
- package/web/assets/WebGLRenderer-DCMbi58z.js +1 -0
- package/web/assets/WebGPURenderer-D8qkuqdr.js +1 -0
- package/web/assets/browserAll-haNDWq66.js +1 -0
- package/web/assets/{dist-CuZm98ZU.js → dist-704BMcqW.js} +1 -1
- package/web/assets/{dist-BM6eVY-P.js → dist-AzZzg9Or.js} +1 -1
- package/web/assets/{dist-2Dy-PW5G.js → dist-BLkBtxRp.js} +1 -1
- package/web/assets/dist-BXHMHEwl.js +1 -0
- package/web/assets/{dist-CGxJcxqX.js → dist-BYskKa8I.js} +1 -1
- package/web/assets/{dist-BhMp0NDL.js → dist-CHbFRWhr.js} +1 -1
- package/web/assets/dist-D0pwQ8q9.js +1 -0
- package/web/assets/{dist-DJXdKb4L.js → dist-D3tpHX6Y.js} +1 -1
- package/web/assets/{dist-261eE4JG.js → dist-DICpu_MT.js} +1 -1
- package/web/assets/dist-D_Ftxw8J.js +1 -0
- package/web/assets/{dist-kbbQRecV.js → dist-DjPJlCHP.js} +1 -1
- package/web/assets/{dist-svHuDKTd.js → dist-NxlD47Et.js} +1 -1
- package/web/assets/{ghostty-web-dXmGLyPw.js → ghostty-web-C70d-U4t.js} +1 -1
- package/web/assets/{index-Cu8j9Fkl.js → index-Djyctzdp.js} +7 -7
- package/web/assets/{init-Bf4kSK8V.js → init-BWnHltxK.js} +1 -1
- package/web/assets/trpc-C7hf8_bp.js +1 -0
- package/web/assets/webworkerAll-BXCHpnO9.js +1 -0
- package/web/index.html +1 -1
- package/web/assets/CanvasRenderer-BCjVc_h8.js +0 -1
- package/web/assets/WebGLRenderer-BoQQv3Jy.js +0 -1
- package/web/assets/WebGPURenderer-CfIw2iDG.js +0 -1
- package/web/assets/browserAll-BtF9Ifi8.js +0 -1
- package/web/assets/dist-BKhz7Oap.js +0 -1
- package/web/assets/dist-CAVLjTc0.js +0 -1
- package/web/assets/dist-CK0JJp5l.js +0 -1
- package/web/assets/trpc-B-Zq3zMO.js +0 -1
- package/web/assets/webworkerAll-7AhN-SIi.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-
|
|
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-BXHMHEwl.js","assets/dist-CLKxKEQH.js","assets/dist-AzZzg9Or.js","assets/dist--FTL3P_Y.js","assets/dist-BiexWhMB.js","assets/dist-704BMcqW.js","assets/dist-D_Ftxw8J.js","assets/dist-BLkBtxRp.js","assets/dist-CHbFRWhr.js","assets/dist-BYskKa8I.js","assets/dist-DjPJlCHP.js","assets/dist-ExQdmG6u.js","assets/dist-BNF0fuPB.js","assets/dist-NxlD47Et.js","assets/dist-CRs-U2qz.js","assets/dist-CbIYKZT0.js","assets/dist-D0pwQ8q9.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-D3tpHX6Y.js","assets/dist-DICpu_MT.js","assets/browserAll-haNDWq66.js","assets/Geometry-CNDxiJq_.js","assets/init-BWnHltxK.js","assets/webworkerAll-BXCHpnO9.js","assets/WebGPURenderer-D8qkuqdr.js","assets/WebGLRenderer-DCMbi58z.js","assets/CanvasRenderer-XYe2KglB.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 U,c as W,ct as ne,d as re,dt as ie,et as ae,f as oe,ft as se,g as ce,gt as le,h as ue,i as de,it as fe,j as pe,jt as me,k as he,kt as ge,l as G,lt as _e,m as ve,mt as ye,n as be,nt as xe,o as Se,p as Ce,pt as we,q as Te,r as Ee,rt as De,s as Oe,st as ke,t as Ae,u as je,ut as Me,v as Ne,vt as Pe,w as Fe,wt as Ie,x as Le,xt as Re,z as ze}from"./dist-QUHuPJsA.js";import{a as Be,i as Ve,n as He,o as Ue,r as We}from"./dist--FTL3P_Y.js";import{i as Ge,n as Ke,o as qe,r as Je,t as Ye}from"./dist-BGaHY1kO.js";import{$ as Xe,A as Ze,B as Qe,C as $e,E as et,F as tt,G as nt,H as rt,I as it,J as at,K as ot,L as st,N as ct,O as lt,P as ut,Q as dt,R as ft,T as pt,U as mt,W as ht,X as gt,Y as _t,Z as vt,_ as yt,a as bt,b as xt,c as St,d as Ct,et as wt,f as Tt,g as Et,h as Dt,i as Ot,it as kt,j as At,k as jt,l as Mt,m as Nt,n as Pt,nt as Ft,o as It,q as Lt,r as Rt,rt as K,s as zt,t as Bt,tt as Vt,u as Ht,v as Ut,w as Wt,x as Gt,y as Kt,z as qt}from"./Geometry-CNDxiJq_.js";import{t as Jt}from"./ImageSource-DsthkIsU.js";import{C as Yt,D as Xt,E as Zt,O as Qt,S as $t,T as en,_ as tn,a as nn,b as rn,c as an,d as on,f as sn,g as cn,h as ln,i as un,k as dn,l as fn,m as pn,n as mn,o as hn,p as gn,r as _n,s as vn,t as yn,u as bn,v as xn,w as Sn,x as Cn,y as wn}from"./RenderTargetSystem-CLQIFvVz.js";import{t as Tn}from"./getTextureBatchBindGroup-CqvclRGr.js";import{a as En,c as Dn,d as On,f as kn,i as An,l as jn,n as Mn,o as Nn,p as Pn,r as Fn,s as In,t as Ln,u as Rn}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 zn=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}}}})),eee=n(((e,t)=>{t.exports=zn()})),Bn=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`})),Vn=n(((e,t)=>{t.exports=Bn()})),Hn=n((e=>{var t=Vn();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`})),Un=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=Hn()})),Wn=n((e=>{var t=eee(),n=Vn(),r=Un();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 U(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)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(ee),B(ee,e)}function W(){z(ee),z(V),z(te)}function ne(e){e.memoizedState!==null&&B(H,e);var t=ee.current,n=Gd(t,e.type);t!==n&&(B(V,e),B(ee,n))}function re(e){V.current===e&&(z(ee),z(V)),H.current===e&&(z(H),tp._currentValue=F)}var ie,ae;function oe(e){if(ie===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ie=t&&t[1]||``,ae=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+ie+e+ae}var se=!1;function ce(e,t){if(!e||se)return``;se=!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{se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?oe(n):``}function le(e,t){switch(e.tag){case 26:case 27:case 5:return oe(e.type);case 16:return oe(`Lazy`);case 13:return e.child!==t&&t!==null?oe(`Suspense Fallback`):oe(`Suspense`);case 19:return oe(`SuspenseList`);case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return oe(`Activity`);default:return``}}function ue(e){try{var t=``,n=null;do t+=le(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 de=Object.prototype.hasOwnProperty,fe=t.unstable_scheduleCallback,pe=t.unstable_cancelCallback,me=t.unstable_shouldYield,he=t.unstable_requestPaint,ge=t.unstable_now,G=t.unstable_getCurrentPriorityLevel,_e=t.unstable_ImmediatePriority,ve=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,be=t.unstable_LowPriority,xe=t.unstable_IdlePriority,Se=t.log,Ce=t.unstable_setDisableYieldValue,we=null,Te=null;function Ee(e){if(typeof Se==`function`&&Ce(e),Te&&typeof Te.setStrictMode==`function`)try{Te.setStrictMode(we,e)}catch{}}var De=Math.clz32?Math.clz32:Ae,Oe=Math.log,ke=Math.LN2;function Ae(e){return e>>>=0,e===0?32:31-(Oe(e)/ke|0)|0}var je=256,Me=262144,Ne=4194304;function Pe(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 Fe(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=Pe(n))):i=Pe(o):i=Pe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Pe(n))):i=Pe(o)):i=Pe(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 Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(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 Re(){var e=Ne;return Ne<<=1,!(Ne&62914560)&&(Ne=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ve(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-De(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&&He(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function He(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-De(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ue(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-De(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function We(e,t){var n=t&-t;return n=n&42?1:Ge(n),(n&(e.suspendedLanes|t))===0?n:0}function Ge(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 Ke(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function qe(){var e=P.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function Je(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var Ye=Math.random().toString(36).slice(2),Xe=`__reactFiber$`+Ye,Ze=`__reactProps$`+Ye,Qe=`__reactContainer$`+Ye,$e=`__reactEvents$`+Ye,et=`__reactListeners$`+Ye,tt=`__reactHandles$`+Ye,nt=`__reactResources$`+Ye,rt=`__reactMarker$`+Ye;function it(e){delete e[Xe],delete e[Ze],delete e[$e],delete e[et],delete e[tt]}function at(e){var t=e[Xe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qe]||n[Xe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[Xe])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function ot(e){if(e=e[Xe]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function st(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function ct(e){var t=e[nt];return t||=e[nt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function lt(e){e[rt]=!0}var ut=new Set,dt={};function ft(e,t){pt(e,t),pt(e+`Capture`,t)}function pt(e,t){for(dt[e]=t,e=0;e<t.length;e++)ut.add(t[e])}var mt=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]*$`),ht={},gt={};function _t(e){return de.call(gt,e)?!0:de.call(ht,e)?!1:mt.test(e)?gt[e]=!0:(ht[e]=!0,!1)}function vt(e,t,n){if(_t(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 yt(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 bt(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 xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function St(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ct(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 wt(e){if(!e._valueTracker){var t=St(e)?`checked`:`value`;e._valueTracker=Ct(e,t,``+e[t])}}function Tt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=St(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Et(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 Dt=/[\n"\\]/g;function Ot(e){return e.replace(Dt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function kt(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=``+xt(t)):e.value!==``+xt(t)&&(e.value=``+xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):jt(e,o,xt(n)):jt(e,o,xt(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=``+xt(s):e.removeAttribute(`name`)}function At(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)){wt(e);return}n=n==null?``:``+xt(n),t=t==null?n:``+xt(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),wt(e)}function jt(e,t,n){t===`number`&&Et(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Mt(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=``+xt(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 Nt(e,t,n){if(t!=null&&(t=``+xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+xt(n)}function Pt(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=xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),wt(e)}function Ft(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var It=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 Lt(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||It.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Rt(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&&Lt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Lt(e,o,t[o])}function K(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 zt=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`]]),Bt=/^[\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 Vt(e){return Bt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Ht(){}var Ut=null;function Wt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gt=null,Kt=null;function qt(e){var t=ot(e);if(t&&(e=t.stateNode)){var n=e[Ze]||null;a:switch(e=t.stateNode,t.type){case`input`:if(kt(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="`+Ot(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ze]||null;if(!a)throw Error(i(90));kt(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&&Tt(r)}break a;case`textarea`:Nt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Mt(e,!!n.multiple,t,!1)}}}var Jt=!1;function Yt(e,t,n){if(Jt)return e(t,n);Jt=!0;try{return e(t)}finally{if(Jt=!1,(Gt!==null||Kt!==null)&&(bu(),Gt&&(t=Gt,e=Kt,Kt=Gt=null,qt(t),e)))for(t=0;t<e.length;t++)qt(e[t])}}function Xt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ze]||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 Zt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Qt=!1;if(Zt)try{var $t={};Object.defineProperty($t,`passive`,{get:function(){Qt=!0}}),window.addEventListener(`test`,$t,$t),window.removeEventListener(`test`,$t,$t)}catch{Qt=!1}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t=tn,n=t.length,r,i=`value`in en?en.value:en.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 nn=i.slice(e,1<r?1-r:void 0)}function an(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 on(){return!0}function sn(){return!1}function cn(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)?on:sn,this.isPropagationStopped=sn,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=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=cn(ln),dn=f({},ln,{view:0,detail:0}),fn=cn(dn),pn,mn,hn,gn=f({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Dn,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!==hn&&(hn&&e.type===`mousemove`?(pn=e.screenX-hn.screenX,mn=e.screenY-hn.screenY):mn=pn=0,hn=e),pn)},movementY:function(e){return`movementY`in e?e.movementY:mn}}),_n=cn(gn),vn=cn(f({},gn,{dataTransfer:0})),yn=cn(f({},dn,{relatedTarget:0})),bn=cn(f({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=cn(f({},ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Sn=cn(f({},ln,{data:0})),Cn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},wn={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`},Tn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function En(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Tn[e])?!!t[e]:!1}function Dn(){return En}var On=cn(f({},dn,{key:function(e){if(e.key){var t=Cn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=an(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?wn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Dn,charCode:function(e){return e.type===`keypress`?an(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?an(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),kn=cn(f({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),An=cn(f({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Dn})),jn=cn(f({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),Mn=cn(f({},gn,{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})),Nn=cn(f({},ln,{newState:0,oldState:0})),Pn=[9,13,27,32],Fn=Zt&&`CompositionEvent`in window,In=null;Zt&&`documentMode`in document&&(In=document.documentMode);var Ln=Zt&&`TextEvent`in window&&!In,Rn=Zt&&(!Fn||In&&8<In&&11>=In),zn=` `,Bn=!1;function Hn(e,t){switch(e){case`keyup`:return Pn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Bn=!0,zn):null;case`textInput`:return e=t.data,e===zn&&Bn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Fn&&Hn(e,t)?(e=rn(),nn=tn=en=null,Gn=!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 Rn&&t.locale!==`ko`?null:t.data;default:return null}}var Jn={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 Yn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Jn[e.type]:t===`textarea`}function Xn(e,t,n,r){Gt?Kt?Kt.push(r):Kt=[r]:Gt=r,t=Od(t,`onChange`),0<t.length&&(n=new un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Zn=null,Qn=null;function $n(e){bd(e,0)}function er(e){if(Tt(st(e)))return e}function tr(e,t){if(e===`change`)return t}var nr=!1;if(Zt){var rr;if(Zt){var ir=`oninput`in document;if(!ir){var ar=document.createElement(`div`);ar.setAttribute(`oninput`,`return;`),ir=typeof ar.oninput==`function`}rr=ir}else rr=!1;nr=rr&&(!document.documentMode||9<document.documentMode)}function or(){Zn&&(Zn.detachEvent(`onpropertychange`,sr),Qn=Zn=null)}function sr(e){if(e.propertyName===`value`&&er(Qn)){var t=[];Xn(t,Qn,e,Wt(e)),Yt($n,t)}}function cr(e,t,n){e===`focusin`?(or(),Zn=t,Qn=n,Zn.attachEvent(`onpropertychange`,sr)):e===`focusout`&&or()}function lr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return er(Qn)}function ur(e,t){if(e===`click`)return er(t)}function dr(e,t){if(e===`input`||e===`change`)return er(t)}function fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var pr=typeof Object.is==`function`?Object.is:fr;function mr(e,t){if(pr(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(!de.call(t,i)||!pr(e[i],t[i]))return!1}return!0}function hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function gr(e,t){var n=hr(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=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Et(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=Et(e.document)}return t}function yr(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 br=Zt&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==Et(r)||(r=xr,`selectionStart`in r&&yr(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}),Cr&&mr(Cr,r)||(Cr=r,r=Od(Sr,`onSelect`),0<r.length&&(t=new un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=xr)))}function Er(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Dr={animationend:Er(`Animation`,`AnimationEnd`),animationiteration:Er(`Animation`,`AnimationIteration`),animationstart:Er(`Animation`,`AnimationStart`),transitionrun:Er(`Transition`,`TransitionRun`),transitionstart:Er(`Transition`,`TransitionStart`),transitioncancel:Er(`Transition`,`TransitionCancel`),transitionend:Er(`Transition`,`TransitionEnd`)},Or={},kr={};Zt&&(kr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Dr.animationend.animation,delete Dr.animationiteration.animation,delete Dr.animationstart.animation),`TransitionEvent`in window||delete Dr.transitionend.transition);function Ar(e){if(Or[e])return Or[e];if(!Dr[e])return e;var t=Dr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kr)return Or[e]=t[n];return e}var jr=Ar(`animationend`),Mr=Ar(`animationiteration`),Nr=Ar(`animationstart`),Pr=Ar(`transitionrun`),Fr=Ar(`transitionstart`),Ir=Ar(`transitioncancel`),Lr=Ar(`transitionend`),Rr=new Map,zr=`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(` `);zr.push(`scrollEnd`);function Br(e,t){Rr.set(e,t),ft(t,[e])}var Vr=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)},Hr=[],Ur=0,Wr=0;function Gr(){for(var e=Ur,t=Wr=Ur=0;t<e;){var n=Hr[t];Hr[t++]=null;var r=Hr[t];Hr[t++]=null;var i=Hr[t];Hr[t++]=null;var a=Hr[t];if(Hr[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&&Yr(n,i,a)}}function Kr(e,t,n,r){Hr[Ur++]=e,Hr[Ur++]=t,Hr[Ur++]=n,Hr[Ur++]=r,Wr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function qr(e,t,n,r){return Kr(e,t,n,r),Xr(e)}function Jr(e,t){return Kr(e,null,null,t),Xr(e)}function Yr(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-De(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Xr(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Zr={};function Qr(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 $r(e,t,n,r){return new Qr(e,t,n,r)}function ei(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ti(e,t){var n=e.alternate;return n===null?(n=$r(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 ni(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 ri(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ei(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=$r(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return ii(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=$r(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=$r(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=$r(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=$r(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ii(e,t,n,r){return e=$r(7,e,r,t),e.lanes=n,e}function ai(e,t,n){return e=$r(6,e,null,t),e.lanes=n,e}function oi(e){var t=$r(18,null,null,0);return t.stateNode=e,t}function q(e,t,n){return t=$r(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var J=new WeakMap;function si(e,t){if(typeof e==`object`&&e){var n=J.get(e);return n===void 0?(t={value:e,source:t,stack:ue(t)},J.set(e,t),t):n}return{value:e,source:t,stack:ue(t)}}var ci=[],li=0,ui=null,di=0,fi=[],pi=0,mi=null,hi=1,gi=``;function _i(e,t){ci[li++]=di,ci[li++]=ui,ui=e,di=t}function vi(e,t,n){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,mi=e;var r=hi;e=gi;var i=32-De(r)-1;r&=~(1<<i),n+=1;var a=32-De(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,hi=1<<32-De(t)+i|n<<i|r,gi=a+e}else hi=1<<a|n<<i|r,gi=e}function yi(e){e.return!==null&&(_i(e,1),vi(e,1,0))}function bi(e){for(;e===ui;)ui=ci[--li],ci[li]=null,di=ci[--li],ci[li]=null;for(;e===mi;)mi=fi[--pi],fi[pi]=null,gi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null}function xi(e,t){fi[pi++]=hi,fi[pi++]=gi,fi[pi++]=mi,hi=t.id,gi=t.overflow,mi=e}var Si=null,Ci=null,wi=!1,Ti=null,Ei=!1,Di=Error(i(519));function Oi(e){throw Pi(si(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Di}function ki(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Xe]=e,t[Ze]=r,n){case`dialog`:xd(`cancel`,t),xd(`close`,t);break;case`iframe`:case`object`:case`embed`:xd(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)xd(vd[n],t);break;case`source`:xd(`error`,t);break;case`img`:case`image`:case`link`:xd(`error`,t),xd(`load`,t);break;case`details`:xd(`toggle`,t);break;case`input`:xd(`invalid`,t),At(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:xd(`invalid`,t);break;case`textarea`:xd(`invalid`,t),Pt(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||Pd(t.textContent,n)?(r.popover!=null&&(xd(`beforetoggle`,t),xd(`toggle`,t)),r.onScroll!=null&&xd(`scroll`,t),r.onScrollEnd!=null&&xd(`scrollend`,t),r.onClick!=null&&(t.onclick=Ht),t=!0):t=!1,t||Oi(e,!0)}function Ai(e){for(Si=e.return;Si;)switch(Si.tag){case 5:case 31:case 13:Ei=!1;return;case 27:case 3:Ei=!0;return;default:Si=Si.return}}function ji(e){if(e!==Si)return!1;if(!wi)return Ai(e),wi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Kd(e.type,e.memoizedProps)),n=!n),n&&Ci&&Oi(e),Ai(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ci=pf(e)}else t===27?(t=Ci,ef(e.type)?(e=ff,ff=null,Ci=e):Ci=t):Ci=Si?df(e.stateNode.nextSibling):null;return!0}function Mi(){Ci=Si=null,wi=!1}function Ni(){var e=Ti;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Ti=null),e}function Pi(e){Ti===null?Ti=[e]:Ti.push(e)}var Fi=R(null),Ii=null,Li=null;function Ri(e,t,n){B(Fi,t._currentValue),t._currentValue=n}function zi(e){e._currentValue=Fi.current,z(Fi)}function Bi(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 Vi(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),Bi(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),Bi(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 Hi(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;pr(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=[tp]:e.push(tp))}a=a.return}e!==null&&Vi(t,e,n,r),t.flags|=262144}function Ui(e){for(e=e.firstContext;e!==null;){if(!pr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Wi(e){Ii=e,Li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gi(e){return qi(Ii,e)}function Ki(e,t){return Ii===null&&Wi(e),qi(e,t)}function qi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Li===null){if(e===null)throw Error(i(308));Li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Li=Li.next=t;return n}var Ji=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()})}},Yi=t.unstable_scheduleCallback,Xi=t.unstable_NormalPriority,Zi={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qi(){return{controller:new Ji,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&Yi(Xi,function(){e.controller.abort()})}var ea=null,ta=0,na=0,ra=null;function ia(e,t){if(ea===null){var n=ea=[];ta=0,na=fd(),ra={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ta++,t.then(aa,aa),t}function aa(){if(--ta===0&&ea!==null){ra!==null&&(ra.status=`fulfilled`);var e=ea;ea=null,na=0,ra=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oa(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 sa=N.S;N.S=function(e,t){eu=ge(),typeof t==`object`&&t&&typeof t.then==`function`&&ia(e,t),sa!==null&&sa(e,t)};var ca=R(null);function la(){var e=ca.current;return e===null?Fl.pooledCache:e}function ua(e,t){t===null?B(ca,ca.current):B(ca,t.pool)}function da(){var e=la();return e===null?null:{parent:Zi._currentValue,pool:e}}var fa=Error(i(460)),pa=Error(i(474)),ma=Error(i(542)),ha={then:function(){}};function ga(e){return e=e.status,e===`fulfilled`||e===`rejected`}function _a(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ht,Ht),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,xa(e),e;default:if(typeof t.status==`string`)t.then(Ht,Ht);else{if(e=Fl,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,xa(e),e}throw ya=t,fa}}function va(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ya=e,fa):e}}var ya=null;function ba(){if(ya===null)throw Error(i(459));var e=ya;return ya=null,e}function xa(e){if(e===fa||e===ma)throw Error(i(483))}var Sa=null,Ca=0;function wa(e){var t=Ca;return Ca+=1,Sa===null&&(Sa=[]),_a(Sa,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ea(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 Da(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=ti(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=ai(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&&va(i)===t.type)?(t=a(t,n.props),Ta(t,n),t.return=e,t):(t=ri(n.type,n.key,n.props,null,e.mode,r),Ta(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=q(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=ii(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=ai(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=ri(t.type,t.key,t.props,null,e.mode,n),Ta(n,t),n.return=e,n;case h:return t=q(t,e.mode,n),t.return=e,t;case T:return t=va(t),f(e,t,n)}if(M(t)||k(t))return t=ii(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,wa(t),n);if(t.$$typeof===b)return f(e,Ki(e,t),n);Ea(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=va(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,wa(n),r);if(n.$$typeof===b)return p(e,t,Ki(e,n),r);Ea(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=va(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,wa(r),i);if(r.$$typeof===b)return _(e,t,n,Ki(t,r),i);Ea(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),wi&&_i(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 wi&&_i(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)}),wi&&_i(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),wi&&_i(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 wi&&_i(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)}),wi&&_i(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&&va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ta(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Ta(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=q(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=va(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,wa(o),c);if(o.$$typeof===b)return x(e,r,Ki(e,o),c);Ea(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=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ca=0;var i=x(e,t,n,r);return Sa=null,i}catch(t){if(t===fa||t===ma)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Oa=Da(!0),ka=Da(!1),Aa=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ma(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 Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function Fa(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,Ue(e,n)}}function Ia(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 La=!1;function Ra(){if(La){var e=ra;if(e!==null)throw e}}function za(e,t,n,r){La=!1;var i=e.updateQueue;Aa=!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?(Ll&p)===p:(r&p)===p){p!==0&&p===na&&(La=!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:Aa=!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),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ba(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Va(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ba(n[e],t)}var Ha=R(null),Ua=R(0);function Wa(e,t){e=Ul,B(Ua,e),B(Ha,t),Ul=e|t.baseLanes}function Ga(){B(Ua,Ul),B(Ha,Ha.current)}function Ka(){Ul=Ua.current,z(Ha),z(Ua)}var qa=R(null),Ja=null;function Ya(e){var t=e.alternate;B(eo,eo.current&1),B(qa,e),Ja===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(Ja=e)}function Xa(e){B(eo,eo.current),B(qa,e),Ja===null&&(Ja=e)}function Za(e){e.tag===22?(B(eo,eo.current),B(qa,e),Ja===null&&(Ja=e)):Qa(e)}function Qa(){B(eo,eo.current),B(qa,qa.current)}function $a(e){z(qa),Ja===e&&(Ja=null),z(eo)}var eo=R(0);function to(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(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 no=0,ro=null,io=null,ao=null,oo=!1,so=!1,co=!1,lo=0,uo=0,fo=null,po=0;function mo(){throw Error(i(321))}function ho(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pr(e[n],t[n]))return!1;return!0}function go(e,t,n,r,i,a){return no=a,ro=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ns:Ps,co=!1,a=n(r,i),co=!1,so&&(a=vo(t,n,r,i)),_o(e),a}function _o(e){N.H=Ms;var t=io!==null&&io.next!==null;if(no=0,ao=io=ro=null,oo=!1,uo=0,fo=null,t)throw Error(i(300));e===null||Zs||(e=e.dependencies,e!==null&&Ui(e)&&(Zs=!0))}function vo(e,t,n,r){ro=e;var a=0;do{if(so&&(fo=null),uo=0,so=!1,25<=a)throw Error(i(301));if(a+=1,ao=io=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=Fs,o=t(n,r)}while(so);return o}function yo(){var e=N.H,t=e.useState()[0];return t=typeof t.then==`function`?Eo(t):t,e=e.useState()[0],(io===null?null:io.memoizedState)!==e&&(ro.flags|=1024),t}function bo(){var e=lo!==0;return lo=0,e}function xo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function So(e){if(oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}oo=!1}no=0,ao=io=ro=null,so=!1,uo=lo=0,fo=null}function Co(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ao===null?ro.memoizedState=ao=e:ao=ao.next=e,ao}function wo(){if(io===null){var e=ro.alternate;e=e===null?null:e.memoizedState}else e=io.next;var t=ao===null?ro.memoizedState:ao.next;if(t!==null)ao=t,io=e;else{if(e===null)throw ro.alternate===null?Error(i(467)):Error(i(310));io=e,e={memoizedState:io.memoizedState,baseState:io.baseState,baseQueue:io.baseQueue,queue:io.queue,next:null},ao===null?ro.memoizedState=ao=e:ao=ao.next=e}return ao}function To(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Eo(e){var t=uo;return uo+=1,fo===null&&(fo=[]),e=_a(fo,e,t),t=ro,(ao===null?t.memoizedState:ao.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ns:Ps),e}function Do(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Eo(e);if(e.$$typeof===b)return Gi(e)}throw Error(i(438,String(e)))}function Oo(e){var t=null,n=ro.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ro.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=To(),ro.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 ko(e,t){return typeof t==`function`?t(e):t}function Ao(e){return jo(wo(),io,e)}function jo(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?(no&f)===f:(Ll&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===na&&(d=!0);else if((no&p)===p){u=u.next,p===na&&(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,ro.lanes|=p,Gl|=p;f=u.action,co&&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,ro.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!pr(o,e.memoizedState)&&(Zs=!0,d&&(n=ra,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 Mo(e){var t=wo(),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);pr(o,t.memoizedState)||(Zs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function No(e,t,n){var r=ro,a=wo(),o=wi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!pr((io||a).memoizedState,n);if(s&&(a.memoizedState=n,Zs=!0),a=a.queue,is(Io.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ao!==null&&ao.memoizedState.tag&1){if(r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||no&127||Po(r,t,n)}return n}function Po(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ro.updateQueue,t===null?(t=To(),ro.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Fo(e,t,n,r){t.value=n,t.getSnapshot=r,Lo(t)&&Ro(e)}function Io(e,t,n){return n(function(){Lo(t)&&Ro(e)})}function Lo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pr(e,n)}catch{return!0}}function Ro(e){var t=Jr(e,2);t!==null&&hu(t,e,2)}function zo(e){var t=Co();if(typeof e==`function`){var n=e;if(e=n(),co){Ee(!0);try{n()}finally{Ee(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:e},t}function Bo(e,t,n,r){return e.baseState=n,jo(e,io,typeof r==`function`?r:ko)}function Vo(e,t,n,r,a){if(ks(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,Ho(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ho(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),Uo(e,t,s)}catch(n){Go(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),N.T=a}}else try{a=n(i,r),Uo(e,t,a)}catch(n){Go(e,t,n)}}function Uo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Wo(e,t,n)},function(n){return Go(e,t,n)}):Wo(e,t,n)}function Wo(e,t,n){t.status=`fulfilled`,t.value=n,Ko(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ho(e,n)))}function Go(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ko(t),t=t.next;while(t!==r)}e.action=null}function Ko(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qo(e,t){return t}function Jo(e,t){if(wi){var n=Fl.formState;if(n!==null){a:{var r=ro;if(wi){if(Ci){b:{for(var i=Ci,a=Ei;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ci=df(i.nextSibling),r=i.data===`F!`;break a}}Oi(r)}r=!1}r&&(t=n[0])}}return n=Co(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qo,lastRenderedState:t},n.queue=r,n=Es.bind(null,ro,r),r.dispatch=n,r=zo(!1),a=Os.bind(null,ro,!1,r.queue),r=Co(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Vo.bind(null,ro,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Yo(e){return Xo(wo(),io,e)}function Xo(e,t,n){if(t=jo(e,t,qo)[0],e=Ao(ko)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Eo(t)}catch(e){throw e===fa?ma:e}else r=t;t=wo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ro.flags|=2048,$o(9,{destroy:void 0},Zo.bind(null,i,n),null)),[r,a,e]}function Zo(e,t){e.action=t}function Qo(e){var t=wo(),n=io;if(n!==null)return Xo(t,n,e);wo(),t=t.memoizedState,n=wo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function $o(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ro.updateQueue,t===null&&(t=To(),ro.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 es(){return wo().memoizedState}function ts(e,t,n,r){var i=Co();ro.flags|=e,i.memoizedState=$o(1|t,{destroy:void 0},n,r===void 0?null:r)}function ns(e,t,n,r){var i=wo();r=r===void 0?null:r;var a=i.memoizedState.inst;io!==null&&r!==null&&ho(r,io.memoizedState.deps)?i.memoizedState=$o(t,a,n,r):(ro.flags|=e,i.memoizedState=$o(1|t,a,n,r))}function rs(e,t){ts(8390656,8,e,t)}function is(e,t){ns(2048,8,e,t)}function as(e){ro.flags|=4;var t=ro.updateQueue;if(t===null)t=To(),ro.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function os(e){var t=wo().memoizedState;return as({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ss(e,t){return ns(4,2,e,t)}function cs(e,t){return ns(4,4,e,t)}function ls(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 us(e,t,n){n=n==null?null:n.concat([e]),ns(4,4,ls.bind(null,t,e),n)}function ds(){}function fs(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ho(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ps(e,t){var n=wo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ho(t,r[1]))return r[0];if(r=e(),co){Ee(!0);try{e()}finally{Ee(!1)}}return n.memoizedState=[r,t],r}function ms(e,t,n){return n===void 0||no&1073741824&&!(Ll&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),ro.lanes|=e,Gl|=e,n)}function hs(e,t,n,r){return pr(n,t)?n:Ha.current===null?!(no&42)||no&1073741824&&!(Ll&261930)?(Zs=!0,e.memoizedState=n):(e=mu(),ro.lanes|=e,Gl|=e,t):(e=ms(e,n,r),pr(e,t)||(Zs=!0),e)}function gs(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,Os(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,oa(c,r),pu(e)):Ds(e,t,r,pu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,F,n===null?_s:function(){return bs(e),n(r)})}function ys(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:ko,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},pu())}function xs(){return Gi(tp)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Na(n);var r=Pa(t,e,n);r!==null&&(hu(r,t,n),Fa(r,t,n)),t={cache:Qi()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=qr(e,t,n,r),n!==null&&(hu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,pu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(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,pr(s,o))return Kr(e,t,i,0),Fl===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return hu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=qr(e,n,r,2),t!==null&&hu(t,e,2)}function ks(e){var t=e.alternate;return e===ro||t!==null&&t===ro}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ue(e,n)}}var Ms={readContext:Gi,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:Gi,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:Gi,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){Ee(!0);try{e()}finally{Ee(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){Ee(!0);try{n(t)}finally{Ee(!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=Ts.bind(null,ro,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,ro,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,ro,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ro,a=Co();if(wi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Ll&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Fl.identifierPrefix;if(wi){var n=gi,r=hi;n=(r&~(1<<32-De(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=po++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:xs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e){var t=Co();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Os.bind(null,ro,!0,n),n.dispatch=t,[e,t]},useMemoCache:Oo,useCacheRefresh:function(){return Co().memoizedState=ws.bind(null,ro)},useEffectEvent:function(e){var t=Co(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ps={readContext:Gi,use:Do,useCallback:fs,useContext:Gi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Ao,useRef:es,useState:function(){return Ao(ko)},useDebugValue:ds,useDeferredValue:function(e,t){return hs(wo(),io.memoizedState,e,t)},useTransition:function(){var e=Ao(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){return Bo(wo(),io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Ps.useEffectEvent=os;var Fs={readContext:Gi,use:Do,useCallback:fs,useContext:Gi,useEffect:is,useImperativeHandle:us,useInsertionEffect:ss,useLayoutEffect:cs,useMemo:ps,useReducer:Mo,useRef:es,useState:function(){return Mo(ko)},useDebugValue:ds,useDeferredValue:function(e,t){var n=wo();return io===null?ms(n,e,t):hs(n,io.memoizedState,e,t)},useTransition:function(){var e=Mo(ko)[0],t=wo().memoizedState;return[typeof e==`boolean`?e:Eo(e),t]},useSyncExternalStore:No,useId:Ss,useHostTransitionStatus:xs,useFormState:Qo,useActionState:Qo,useOptimistic:function(e,t){var n=wo();return io===null?(n.baseState=e,[e,n.queue.dispatch]):Bo(n,io,e,t)},useMemoCache:Oo,useCacheRefresh:Cs};Fs.useEffectEvent=os;function Is(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 Ls={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Na(r);i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(hu(t,e,r),Fa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Na(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Pa(e,i,r),t!==null&&(hu(t,e,r),Fa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Na(n);r.tag=2,t!=null&&(r.callback=t),t=Pa(e,r,n),t!==null&&(hu(t,e,n),Fa(t,e,n))}};function Rs(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?!mr(n,r)||!mr(i,a):!0}function zs(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&&Ls.enqueueReplaceState(t,t.state,null)}function Bs(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 Vs(e){Vr(e)}function Hs(e){console.error(e)}function Us(e){Vr(e)}function Ws(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Gs(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 Ks(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){Ws(e,t)},n}function qs(e){return e=Na(e),e.tag=3,e}function Js(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(){Gs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Gs(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ys(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Hi(t,n,a,!0),n=qa.current,n!==null){switch(n.tag){case 31:case 13:return Ja===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ha?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,a)),!1;case 22:return n.flags|=65536,r===ha?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)),Ku(e,r,a)),!1}throw Error(i(435,n.tag))}return Ku(e,r,a),Du(),!1}if(wi)return t=qa.current,t===null?(r!==Di&&(t=Error(i(423),{cause:r}),Pi(si(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=si(r,n),a=Ks(e.stateNode,r,a),Ia(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Di&&(e=Error(i(422),{cause:r}),Pi(si(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=si(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=si(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ks(n.stateNode,r,e),Ia(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`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=qs(a),Js(a,e,n,r),Ia(n,a),!1}n=n.return}while(n!==null);return!1}var Xs=Error(i(461)),Zs=!1;function Qs(e,t,n,r){t.child=e===null?ka(t,null,n,r):Oa(t,e.child,n,r)}function $s(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 Wi(t),r=go(e,t,n,o,a,i),s=bo(),e!==null&&!Zs?(xo(e,t,i),Cc(e,t,i)):(wi&&s&&yi(t),t.flags|=1,Qs(e,t,r,i),t.child)}function ec(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ei(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,tc(e,t,a,r,i)):(e=ri(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!wc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?mr:n,n(o,r)&&e.ref===t.ref)return Cc(e,t,i)}return t.flags|=1,e=ti(a,r),e.ref=t.ref,e.return=t,t.child=e}function tc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(mr(a,r)&&e.ref===t.ref)if(Zs=!1,t.pendingProps=r=a,wc(e,i))e.flags&131072&&(Zs=!0);else return t.lanes=e.lanes,Cc(e,t,i)}return lc(e,t,n,r,i)}function nc(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 ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ua(t,a===null?null:a.cachePool),a===null?Ga():Wa(t,a),Za(t);else return r=t.lanes=536870912,ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ua(t,null),Ga(),Qa(t)):(ua(t,a.cachePool),Wa(t,a),Qa(t),t.memoizedState=null);return Qs(e,t,i,n),t.child}function rc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ic(e,t,n,r,i){var a=la();return a=a===null?null:{parent:Zi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ua(t,null),Ga(),Za(t),e!==null&&Hi(e,t,r,!0),t.childLanes=i,null}function ac(e,t){return t=vc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function oc(e,t,n){return Oa(t,e.child,null,n),e=ac(t,t.pendingProps),e.flags|=2,$a(t),t.memoizedState=null,e}function sc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(wi){if(r.mode===`hidden`)return e=ac(t,r),t.lanes=536870912,rc(null,e);if(Xa(t),(e=Ci)?(e=sf(e,Ei),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=oi(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return ac(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Xa(t),a)if(t.flags&256)t.flags&=-257,t=oc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Zs||Hi(e,t,n,!1),a=(n&e.childLanes)!==0,Zs||a){if(r=Fl,r!==null&&(s=We(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Jr(e,s),hu(r,e,s),Xs;Du(),t=oc(e,t,n)}else e=o.treeContext,Ci=df(s.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=ac(t,r),t.flags|=4096;return t}return e=ti(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cc(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 lc(e,t,n,r,i){return Wi(t),n=go(e,t,n,r,void 0,i),r=bo(),e!==null&&!Zs?(xo(e,t,i),Cc(e,t,i)):(wi&&r&&yi(t),t.flags|=1,Qs(e,t,n,i),t.child)}function uc(e,t,n,r,i,a){return Wi(t),t.updateQueue=null,n=vo(t,r,n,i),_o(e),r=bo(),e!==null&&!Zs?(xo(e,t,a),Cc(e,t,a)):(wi&&r&&yi(t),t.flags|=1,Qs(e,t,n,a),t.child)}function dc(e,t,n,r,i){if(Wi(t),t.stateNode===null){var a=Zr,o=n.contextType;typeof o==`object`&&o&&(a=Gi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ls,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ja(t),o=n.contextType,a.context=typeof o==`object`&&o?Gi(o):Zr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Is(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&&Ls.enqueueReplaceState(a,a.state,null),za(t,r,a,i),Ra(),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=Bs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Zr,typeof u==`object`&&u&&(o=Gi(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)&&zs(t,a,r,o),Aa=!1;var f=t.memoizedState;a.state=f,za(t,r,a,i),Ra(),l=t.memoizedState,s||f!==l||Aa?(typeof d==`function`&&(Is(t,n,d,r),l=t.memoizedState),(c=Aa||Rs(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,Ma(e,t),o=t.memoizedProps,u=Bs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Zr,typeof l==`object`&&l&&(c=Gi(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)&&zs(t,a,r,c),Aa=!1,f=t.memoizedState,a.state=f,za(t,r,a,i),Ra();var p=t.memoizedState;o!==d||f!==p||Aa||e!==null&&e.dependencies!==null&&Ui(e.dependencies)?(typeof s==`function`&&(Is(t,n,s,r),p=t.memoizedState),(u=Aa||Rs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Ui(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,cc(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=Oa(t,e.child,null,i),t.child=Oa(t,null,n,i)):Qs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Cc(e,t,i),e}function fc(e,t,n,r){return Mi(),t.flags|=256,Qs(e,t,n,r),t.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mc(e){return{baseLanes:e,cachePool:da()}}function hc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function gc(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:(eo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(wi){if(a?Ya(t):Qa(t),(e=Ci)?(e=sf(e,Ei),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mi===null?null:{id:hi,overflow:gi},retryLane:536870912,hydrationErrors:null},n=oi(e),n.return=t,t.child=n,Si=t,Ci=null)):e=null,e===null)throw Oi(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Qa(t),a=t.mode,c=vc({mode:`hidden`,children:c},a),r=ii(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(null,r)):(Ya(t),_c(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ya(t),t.flags&=-257,t=yc(e,t,n)):t.memoizedState===null?(Qa(t),c=r.fallback,a=t.mode,r=vc({mode:`visible`,children:r.children},a),c=ii(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Oa(t,e.child,null,n),r=t.child,r.memoizedState=mc(n),r.childLanes=hc(e,s,n),t.memoizedState=pc,t=rc(null,r)):(Qa(t),t.child=e.child,t.flags|=128,t=null);else if(Ya(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Pi({value:r,source:null,stack:null}),t=yc(e,t,n)}else if(Zs||Hi(e,t,n,!1),s=(n&e.childLanes)!==0,Zs||s){if(s=Fl,s!==null&&(r=We(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Jr(e,r),hu(s,e,r),Xs;cf(c)||Du(),t=yc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ci=df(c.nextSibling),Si=t,wi=!0,Ti=null,Ei=!1,e!==null&&xi(t,e),t=_c(t,r.children),t.flags|=4096);return t}return a?(Qa(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ti(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ii(c,a,n,null),c.flags|=2):c=ti(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,rc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=mc(n):(a=c.cachePool,a===null?a=da():(l=Zi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=hc(e,s,n),t.memoizedState=pc,rc(e.child,r)):(Ya(t),n=e.child,e=n.sibling,n=ti(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 _c(e,t){return t=vc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vc(e,t){return e=$r(22,e,null,t),e.lanes=0,e}function yc(e,t,n){return Oa(t,e.child,null,n),e=_c(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bi(e.return,t,n)}function xc(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 Sc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=eo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(eo,o),Qs(e,t,r,n),r=wi?di:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&bc(e,n,t);else if(e.tag===19)bc(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&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),xc(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&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}xc(t,!0,n,null,a,r);break;case`together`:xc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Cc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(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=ti(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ti(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function wc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Ui(e))):!0}function Tc(e,t,n){switch(t.tag){case 3:U(t,t.stateNode.containerInfo),Ri(t,Zi,e.memoizedState.cache),Mi();break;case 27:case 5:ne(t);break;case 4:U(t,t.stateNode.containerInfo);break;case 10:Ri(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ya(t),e=Cc(e,t,n),e===null?null:e.sibling):gc(e,t,n):(Ya(t),t.flags|=128,null);Ya(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Hi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Sc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(eo,eo.current),r)break;return null;case 22:return t.lanes=0,nc(e,t,n,t.pendingProps);case 24:Ri(t,Zi,e.memoizedState.cache)}return Cc(e,t,n)}function Ec(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Zs=!0;else{if(!wc(e,n)&&!(t.flags&128))return Zs=!1,Tc(e,t,n);Zs=!!(e.flags&131072)}else Zs=!1,wi&&t.flags&1048576&&vi(t,di,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e==`function`)ei(e)?(r=Bs(e,r),t.tag=1,t=dc(null,t,e,r,n)):(t.tag=0,t=lc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=$s(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=ec(null,t,e,r,n);break a}}throw t=j(e)||e,Error(i(306,t,``))}}return t;case 0:return lc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Bs(r,t.pendingProps),dc(e,t,r,a,n);case 3:a:{if(U(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ma(e,t),za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ri(t,Zi,r),r!==o.cache&&Vi(t,[Zi],n,!0),Ra(),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=fc(e,t,r,n);break a}else if(r!==a){a=si(Error(i(424)),t),Pi(a),t=fc(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(Ci=df(e.firstChild),Si=t,wi=!0,Ti=null,Ei=!0,n=ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Mi(),r===a){t=Cc(e,t,n);break a}Qs(e,t,r,n)}t=t.child}return t;case 26:return cc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:wi||(n=t.type,e=t.pendingProps,r=Ud(te.current).createElement(n),r[Xe]=t,r[Ze]=e,Ld(r,n,e),lt(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&wi&&(r=t.stateNode=hf(t.type,t.pendingProps,te.current),Si=t,Ei=!0,a=Ci,ef(t.type)?(ff=a,Ci=df(r.firstChild)):Ci=a),Qs(e,t,t.pendingProps.children,n),cc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&wi&&((a=r=Ci)&&(r=af(r,t.type,t.pendingProps,Ei),r===null?a=!1:(t.stateNode=r,Si=t,Ci=df(r.firstChild),Ei=!1,a=!0)),a||Oi(t)),ne(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(a,o)?r=null:s!==null&&Kd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=go(e,t,yo,null,null,n),tp._currentValue=a),cc(e,t),Qs(e,t,r,n),t.child;case 6:return e===null&&wi&&((e=n=Ci)&&(n=of(n,t.pendingProps,Ei),n===null?e=!1:(t.stateNode=n,Si=t,Ci=null,e=!0)),e||Oi(t)),null;case 13:return gc(e,t,n);case 4:return U(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oa(t,null,r,n):Qs(e,t,r,n),t.child;case 11:return $s(e,t,t.type,t.pendingProps,n);case 7:return Qs(e,t,t.pendingProps,n),t.child;case 8:return Qs(e,t,t.pendingProps.children,n),t.child;case 12:return Qs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ri(t,t.type,r.value),Qs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Wi(t),a=Gi(a),r=r(a),t.flags|=1,Qs(e,t,r,n),t.child;case 14:return ec(e,t,t.type,t.pendingProps,n);case 15:return tc(e,t,t.type,t.pendingProps,n);case 19:return Sc(e,t,n);case 31:return sc(e,t,n);case 22:return nc(e,t,n,t.pendingProps);case 24:return Wi(t),r=Gi(Zi),e===null?(a=la(),a===null&&(a=Fl,o=Qi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ja(t),Ri(t,Zi,a)):((e.lanes&n)!==0&&(Ma(e,t),za(t,null,null,n),Ra()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ri(t,Zi,r),r!==a.cache&&Vi(t,[Zi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ri(t,Zi,r))),Qs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Dc(e){e.flags|=4}function Oc(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(wu())e.flags|=8192;else throw ya=ha,pa}else e.flags&=-16777217}function kc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(wu())e.flags|=8192;else throw ya=ha,pa}function Ac(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Re(),e.lanes|=t,Yl|=t)}function jc(e,t){if(!wi)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 Mc(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 Nc(e,t,n){var r=t.pendingProps;switch(bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mc(t),null;case 1:return Mc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zi(Zi),W(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ji(t)?Dc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ni())),Mc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Dc(t),o===null?(Mc(t),Oc(t,a,null,r,n)):(Mc(t),kc(t,o))):o?o===e.memoizedState?(Mc(t),t.flags&=-16777217):(Dc(t),Mc(t),kc(t,o)):(e=e.memoizedProps,e!==r&&Dc(t),Mc(t),Oc(t,a,e,r,n)),null;case 27:if(re(t),n=te.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}e=ee.current,ji(t)?ki(t,e):(e=hf(a,r,n),t.stateNode=e,Dc(t))}return Mc(t),null;case 5:if(re(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Mc(t),null}if(o=ee.current,ji(t))ki(t,o);else{var s=Ud(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[Xe]=t,o[Ze]=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(Ld(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&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Si,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Xe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Oi(t,!0)}else e=Ud(e).createTextNode(r),e[Xe]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ji(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[Xe]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ji(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[Xe]=t}else Mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Ni(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(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),Ac(t,t.updateQueue),Mc(t),null);case 4:return W(),e===null&&wd(t.stateNode.containerInfo),Mc(t),null;case 10:return zi(t.type),Mc(t),null;case 19:if(z(eo),r=t.memoizedState,r===null)return Mc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)jc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return B(eo,eo.current&1|2),wi&&_i(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ge()>tu&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!wi)return Mc(t),null}else 2*ge()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,jc(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?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ge(),e.sibling=null,n=eo.current,B(eo,a?n&1|2:n&1),wi&&_i(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(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(ca),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zi(Zi),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zi(Zi),W(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return re(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(eo),null;case 4:return W(),null;case 10:return zi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&z(ca),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zi(Zi),null;case 25:return null;default:return null}}function Fc(e,t){switch(bi(t),t.tag){case 3:zi(Zi),W();break;case 26:case 27:case 5:re(t);break;case 4:W();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:z(eo);break;case 10:zi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&z(ca);break;case 24:zi(Zi)}}function Ic(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){Gu(t,t.return,e)}}function Lc(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){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Va(t,n)}catch(t){Gu(e,e.return,t)}}}function zc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function Bc(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){Gu(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Gu(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){Gu(e,t,n)}else n.current=null}function Hc(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){Gu(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[Ze]=t}catch(t){Gu(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Y(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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&&ef(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 Gc(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=Ht));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(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&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[Xe]=e,t[Ze]=n}catch(t){Gu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Vd=up,e=vr(e),yr(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(Hd={focusedElem:e,selectionRange:n},up=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,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=Bs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(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,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Ic(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=Bs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}r&64&&Rc(n),r&512&&Bc(n,n.return);break;case 3:if(hl(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{Va(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Hc(n),r&512&&Bc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&it(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Te&&typeof Te.onCommitFiberUnmount==`function`)try{Te.onCommitFiberUnmount(we,n)}catch{}switch(n.tag){case 26:Yc||Vc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Vc(n,t);var r=nl,i=rl;ef(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),gf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Vc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Lc(2,n,t),Yc||Lc(4,n,t),il(e,t,n);break;case 1:Yc||(Vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&zc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Gu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Gu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function ul(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(ef(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Lc(3,e,e.return),Ic(3,e),Lc(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),r&64&&Jc&&(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=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(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[rt]||o[Xe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Ld(o,r,n),o[Xe]=e,lt(o),r=o;break a;case`link`:var s=Wf(`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),Ld(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Wf(`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),Ld(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[Xe]=e,lt(o),r=o}e.stateNode=r}else Gf(a,e.type,e.stateNode);else e.stateNode=zf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Uc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(a,e.type,e.stateNode):zf(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),n!==null&&r&4&&Uc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Vc(n,n.return)),e.flags&32){a=e.stateNode;try{Ft(a,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Uc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Uf=null,a=dl,dl=yf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Gu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=yf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=ge()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||gl(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){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?nf(m,!0):nf(l.stateNode,!1)}catch(e){Gu(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,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Wc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,Y(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ft(o,``),n.flags&=-33),Kc(e,Y(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Y(e),s);break;default:throw Error(i(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),gl(t);break;case 1:Vc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&zc(t,t.return,n),gl(t);break;case 27:gf(t.stateNode);case 26:case 5:Vc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(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:_l(i,a,n),Ic(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(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++)Ba(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Rc(a),Bc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Hc(a),Bc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),Bc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(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&&$i(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Ic(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(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&&$i(e)));break;case 12:if(i&2048){bl(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){Gu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(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:Sl(a,o,s,c,i),Ic(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(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:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Jf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=yf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Lc(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}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];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Lc(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:$i(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Gi(Zi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Gi(Zi).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Il=null,Ll=0,Rl=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return Pl&2&&Ll!==0?Ll&-Ll:N.T===null?qe():fd()}function mu(){if(Jl===0)if(!(Ll&536870912)||wi){var e=Me;Me<<=1,!(Me&3932160)&&(Me=262144),Jl=e}else Jl=536870912;return e=qa.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Fl&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Ll,Jl,!1)),Be(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Kl|=n),Wl===4&&yu(e,Ll,Jl,!1)),id(e))}function gu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ie(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(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=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(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:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-ge(),10<a)){if(yu(r,t,Jl,!Bl),Fe(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Yd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);id(e)}function _u(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:Ht},El(t,a,d);var m=(a&62914560)===a?$l-ge():(a&4194048)===a?eu-ge():0;if(m=Xf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(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(!pr(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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-De(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&He(e,n,t)}function bu(){return Pl&6?!0:(ad(0,!1),!1)}function xu(){if(Il!==null){if(Rl===0)var e=Il.return;else e=Il,Li=Ii=null,So(e),Sa=null,Ca=0,e=Il;for(;e!==null;)Fc(e.alternate,e),e=e.return;Il=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Fl=e,Il=n=ti(e.current,null),Ll=t,Rl=0,zl=null,Bl=!1,Vl=Ie(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-De(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Gr(),n}function Cu(e,t){ro=null,N.H=Ms,t===fa||t===ma?(t=ba(),Rl=3):t===pa?(t=ba(),Rl=4):Rl=t===Xs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,Il===null&&(Wl=1,Ws(e,si(t,e.current)))}function wu(){var e=qa.current;return e===null?!0:(Ll&4194048)===Ll?Ja===null:(Ll&62914560)===Ll||Ll&536870912?e===Ja:!1}function Tu(){var e=N.H;return N.H=Ms,e===null?Ms:e}function Eu(){var e=N.A;return N.A=Ml,e}function Du(){Wl=4,Bl||(Ll&4194048)!==Ll&&qa.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Fl===null||yu(Fl,Ll,Jl,!1)}function Ou(e,t,n){var r=Pl;Pl|=2;var i=Tu(),a=Eu();(Fl!==e||Ll!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(Rl!==0&&Il!==null){var s=Il,c=zl;switch(Rl){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:qa.current===null&&(t=!0);var l=Rl;if(Rl=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=Rl,Rl=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Li=Ii=null,Pl=r,N.H=i,N.A=a,Il===null&&(Fl=null,Ll=0,Gr()),o}function ku(){for(;Il!==null;)Mu(Il)}function Au(e,t){var n=Pl;Pl|=2;var r=Tu(),a=Eu();Fl!==e||Ll!==t?(nu=null,tu=ge()+500,Su(e,t)):Vl=Ie(e,t);a:do try{if(Rl!==0&&Il!==null){t=Il;var o=zl;b:switch(Rl){case 1:Rl=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(ga(o)){Rl=0,zl=null,Nu(t);break}t=function(){Rl!==2&&Rl!==9||Fl!==e||(Rl=7),id(e)},o.then(t,t);break a;case 3:Rl=7;break a;case 4:Rl=5;break a;case 7:ga(o)?(Rl=0,zl=null,Nu(t)):(Rl=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(Il.tag){case 26:s=Il.memoizedState;case 5:case 27:var c=Il;if(s?qf(s):c.stateNode.complete){Rl=0,zl=null;var l=c.sibling;if(l!==null)Il=l;else{var u=c.return;u===null?Il=null:(Il=u,Fu(u))}break b}}Rl=0,zl=null,Pu(e,t,o,5);break;case 6:Rl=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Li=Ii=null,N.H=r,N.A=a,Pl=n,Il===null?(Fl=null,Ll=0,Gr(),Wl):0}function ju(){for(;Il!==null&&!me();)Mu(Il)}function Mu(e){var t=Ec(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):Il=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=uc(n,t,t.pendingProps,t.type,void 0,Ll);break;case 11:t=uc(n,t,t.pendingProps,t.type.render,t.ref,Ll);break;case 5:So(t);default:Fc(n,t),t=Il=ni(t,Ul),t=Ec(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):Il=t}function Pu(e,t,n,r){Li=Ii=null,So(t),Sa=null,Ca=0;var i=t.return;try{if(Ys(e,i,t,n,Ll)){Wl=1,Ws(e,si(n,e.current)),Il=null;return}}catch(t){if(i!==null)throw Il=i,t;Wl=1,Ws(e,si(n,e.current)),Il=null;return}t.flags&32768?(wi||r===1?e=!0:Vl||Ll&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=qa.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Nc(t.alternate,t,Ul);if(n!==null){Il=n;return}if(t=t.sibling,t!==null){Il=t;return}Il=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Pc(e.alternate,e);if(n!==null){n.flags&=32767,Il=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Il=e;return}Il=e=n}while(e!==null);Wl=6,Il=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Wr,Ve(e,n,o,s,c,l),e===Fl&&(Il=Fl=null,Ll=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(ye,function(){return Uu(),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=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,P.p=a,N.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,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=Pl;Pl|=4;try{fl(t,e);var a=Hd,o=vr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&_r(s.ownerDocument.documentElement,s)){if(c!==null&&yr(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 _=gr(s,h),v=gr(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}}up=!!Vd,Hd=Vd=null}finally{Pl=i,P.p=r,N.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,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=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,P.p=r,N.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,he();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),Ke(n),t=t.stateNode,Te&&typeof Te.onCommitFiberRoot==`function`)try{Te.onCommitFiberRoot(we,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}}su&3&&Hu(),id(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,ad(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=Ke(su),r=N.T,a=P.p;try{P.p=32>n?32:n,N.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,ad(0,!1),Te&&typeof Te.onPostCommitFiberRoot==`function`)try{Te.onPostCommitFiberRoot(we,o)}catch{}return!0}finally{P.p=a,N.T=r,Vu(e,t)}}function Wu(e,t,n){t=si(n,t),t=Ks(e.stateNode,t,2),e=Pa(e,t,2),e!==null&&(Be(e,2),id(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=si(n,e),n=qs(2),r=Pa(t,n,2),r!==null&&(Js(n,r,t,e),Be(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;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)||(Hl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Ll&n)===n&&(Wl===4||Wl===3&&(Ll&62914560)===Ll&&300>ge()-$l?!(Pl&2)&&Su(e,0):ql|=n,Yl===Ll&&(Yl=0)),id(e)}function Ju(e,t){t===0&&(t=Re()),e=Jr(e,t),e!==null&&(Be(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(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),Ju(e,n)}function Zu(e,t){return fe(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;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-De(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Ll,a=Fe(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ie(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Jd()&&(e=rd);for(var t=ge(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}iu!==0&&iu!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-De(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Le(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Ll,n=Fe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ie(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&pe(r),Ke(n)){case 2:case 8:n=ve;break;case 32:n=ye;break;case 268435456:n=xe;break;default:n=ye}return r=ld.bind(null,e),n=fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&pe(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Ll;return r=Fe(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),cd(e,ge()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Hu())return null;gu(e,t,!0)}function dd(){Qd(function(){Pl&6?fe(_e,od):sd()})}function fd(){if(rd===0){var e=na;e===0&&(e=je,je<<=1,!(je&261888)&&(je=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Vt(``+e)}function md(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 hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[Ze]||null).action),o=r.submitter;o&&(t=(t=o[Ze]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new un(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<zr.length;gd++){var _d=zr[gd];Br(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Br(jr,`onAnimationEnd`),Br(Mr,`onAnimationIteration`),Br(Nr,`onAnimationStart`),Br(`dblclick`,`onDoubleClick`),Br(`focusin`,`onFocus`),Br(`focusout`,`onBlur`),Br(Pr,`onTransitionRun`),Br(Fr,`onTransitionStart`),Br(Ir,`onTransitionCancel`),Br(Lr,`onTransitionEnd`),pt(`onMouseEnter`,[`mouseout`,`mouseover`]),pt(`onMouseLeave`,[`mouseout`,`mouseover`]),pt(`onPointerEnter`,[`pointerout`,`pointerover`]),pt(`onPointerLeave`,[`pointerout`,`pointerover`]),ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`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(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(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){Vr(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){Vr(e)}i.currentTarget=null,a=c}}}}function xd(e,t){var n=t[$e];n===void 0&&(n=t[$e]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,ut.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!Qt||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 Ed(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=at(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}Yt(function(){var r=a,i=Wt(n),s=[];a:{var c=Rr.get(e);if(c!==void 0){var l=un,u=e;switch(e){case`keypress`:if(an(n)===0)break a;case`keydown`:case`keyup`:l=On;break;case`focusin`:u=`focus`,l=yn;break;case`focusout`:u=`blur`,l=yn;break;case`beforeblur`:case`afterblur`:l=yn;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=_n;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=An;break;case jr:case Mr:case Nr:l=bn;break;case Lr:l=jn;break;case`scroll`:case`scrollend`:l=fn;break;case`wheel`:l=Mn;break;case`copy`:case`cut`:case`paste`:l=xn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=kn;break;case`toggle`:case`beforetoggle`:l=Nn}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=Xt(m,p),g!=null&&d.push(Dd(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!==Ut&&(u=n.relatedTarget||n.fromElement)&&(at(u)||u[Qe]))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?at(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=_n,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=kn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:st(l),h=u==null?c:st(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,at(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=kd,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&&Ad(s,c,l,d,!1),u!==null&&f!==null&&Ad(s,f,u,d,!0)}}a:{if(c=r?st(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=tr;else if(Yn(c))if(nr)v=dr;else{v=lr;var y=cr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&K(r.elementType)&&(v=tr):v=ur;if(v&&=v(e,r)){Xn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&jt(c,`number`,c.value)}switch(y=r?st(r):window,e){case`focusin`:(Yn(y)||y.contentEditable===`true`)&&(xr=y,Sr=r,Cr=null);break;case`focusout`:Cr=Sr=xr=null;break;case`mousedown`:wr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:wr=!1,Tr(s,n,i);break;case`selectionchange`:if(br)break;case`keydown`:case`keyup`:Tr(s,n,i)}var b;if(Fn)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 Gn?Hn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Rn&&n.locale!==`ko`&&(Gn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Gn&&(b=rn()):(en=i,tn=`value`in en?en.value:en.textContent,Gn=!0)),y=Od(r,x),0<y.length&&(x=new Sn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Wn(n),b!==null&&(x.data=b)))),(b=Ln?Kn(e,n):qn(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Sn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),hd(s,e,r,n,i)}bd(s,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(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=Xt(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=Xt(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(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=Xt(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=Xt(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
|
|
10
|
-
`).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ft(e,``+r);break;case`className`:yt(e,`class`,r);break;case`tabIndex`:yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:yt(e,n,r);break;case`style`:Rt(e,r,o);break;case`data`:if(t!==`object`){yt(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=Vt(``+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`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`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=Vt(``+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`:xd(`beforetoggle`,e),xd(`toggle`,e),vt(e,`popover`,r);break;case`xlinkActuate`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:vt(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=zt.get(n)||n,vt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:Rt(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`?Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ft(e,``+r);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!dt.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[Ze]||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,``):vt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:xd(`error`,e),xd(`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:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:xd(`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:Fd(e,t,r,d,n,null)}}At(e,o,c,l,u,s,a,!1);return;case`select`:for(a in xd(`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:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Mt(e,!!r,n,!0):Mt(e,!!r,t,!1);return;case`textarea`:for(s in xd(`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:Fd(e,t,s,c,n,null)}Pt(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:Fd(e,t,l,r,n,null)}return;case`dialog`:xd(`beforetoggle`,e),xd(`toggle`,e),xd(`cancel`,e),xd(`close`,e);break;case`iframe`:case`object`:xd(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)xd(vd[r],e);break;case`image`:xd(`error`,e),xd(`load`,e);break;case`details`:xd(`toggle`,e);break;case`embed`:case`source`:case`link`:xd(`error`,e),xd(`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:Fd(e,t,u,r,n,null)}return;default:if(K(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(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)||Fd(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&&Fd(e,t,p,m,r,f)}}kt(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)||Fd(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&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Mt(e,!!n,n?[]:``,!1):Mt(e,!!n,t,!0)):Mt(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:Fd(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&&Fd(e,t,s,a,r,o)}Nt(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:Fd(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:Fd(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)&&Fd(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:Fd(e,t,u,p,r,m)}return;default:if(K(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(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||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(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||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){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&&zd(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&&zd(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(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),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[rt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function nf(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 rf(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`:rf(n),it(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(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[rt])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=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(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 df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(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 hf(e,t,n){switch(t=Ud(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 gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);it(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=P.d;P.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=bu();return e||t}function Sf(e){var t=ot(e);t!==null&&t.tag===5&&t.type===`form`?bs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Ot(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ot(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ot(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ot(n.imageSizes)+`"]`)):i+=`[href="`+Ot(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ot(r)+`"][href="`+Ot(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),lt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=ct(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);lt(c),Ld(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,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=te.current)?yf(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=Nf(n.href),n=ct(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=Nf(n.href);var o=ct(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(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.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},_f.set(e,n),o||If(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=Lf(n),n=ct(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 Nf(e){return`href="`+Ot(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(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}),Ld(t,`link`,n),lt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Ot(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ot(n.href)+`"]`);if(r)return t.instance=r,lt(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`),lt(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,lt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,lt(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),lt(a),Ld(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,Bf(r,n.precedence,e));return t.instance}function Bf(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 Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,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[rt]||a[Xe]||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 Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(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=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,lt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(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=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.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=Zf.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 tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function np(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=ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ze(0),this.hiddenUpdates=ze(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 rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=$r(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function ip(e){return e?(e=Zr,e):Zr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(hu(n,e,t),Fa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Jr(e,67108864);t!==null&&hu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=pu();t=Ge(t);var n=Jr(e,t);n!==null&&hu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function fp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Pe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-De(o);s.entanglements[1]|=c,o&=~c}id(a),!(Pl&6)&&(tu=ge()+500,ad(0,!1))}}break;case 31:case 13:s=Jr(a,2),s!==null&&hu(s,a,2),bu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=Wt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=at(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 hp=e,null}function _p(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(G()){case _e:return 2;case ve:return 8;case ye:case be:return 32;case xe:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(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=ot(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=at(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,Je(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Je(e.priority,function(){lp(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 Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ut=r,n.target.dispatchEvent(r),Ut=null}else return t=ot(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=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(gp(r||n)===null)continue;break}var a=ot(n);a!==null&&(e.splice(t,3),t-=3,vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.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[Ze]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ze]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){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 Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,pu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),bu(),t[Qe]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=qe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.0`)throw Error(i(527,Bp,`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 Vp={bundleType:0,version:`19.2.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{we=Hp.inject(Vp),Te=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;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=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[Qe]=t.current,wd(e),new Rp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Vs,c=Hs,l=Us,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=rp(e,1,!0,t,n??null,r,o,u,s,c,l,Lp),t.context=ip(null),n=t.current,r=pu(),r=Ge(r),o=Na(r),o.callback=null,Pa(n,o,r),n=r,t.current.lanes=n,Be(t,n),id(t),e[Qe]=t.current,wd(e),new zp(t)}})),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=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(){}},qn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jn=new class{#e=qn;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 Yn(e){setTimeout(e,0)}var Xn=typeof window>`u`||`Deno`in globalThis;function Zn(){}function Qn(e,t){return typeof e==`function`?e(t):e}function $n(e){return typeof e==`number`&&e>=0&&e!==1/0}function er(e,t){return Math.max(e+(t||0)-Date.now(),0)}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e,t){return typeof e==`function`?e(t):e}function rr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ar(o,t.options))return!1}else if(!sr(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 ir(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(or(t.options.mutationKey)!==or(a))return!1}else if(!sr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ar(e,t){return(t?.queryKeyHashFn||or)(e)}function or(e){return JSON.stringify(e,(e,t)=>fr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function sr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>sr(e[n],t[n])):!1}var cr=Object.prototype.hasOwnProperty;function lr(e,t){if(e===t)return e;let n=dr(e)&&dr(t);if(!n&&!(fr(e)&&fr(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:cr.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=lr(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function ur(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 dr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fr(e){if(!pr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!pr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function pr(e){return Object.prototype.toString.call(e)===`[object Object]`}function mr(e){return new Promise(t=>{Jn.setTimeout(t,e)})}function hr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:lr(e,t)}function gr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function _r(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vr=Symbol();function yr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===vr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function br(e,t){return typeof e==`function`?e(...t):!!e}var xr=new class extends Kn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Xn&&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 Sr(){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 Cr=Yn;function wr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Cr,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 Tr=wr(),Er=new class extends Kn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Xn&&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 Dr(e){return Math.min(1e3*2**e,3e4)}function Or(e){return(e??`online`)===`online`?Er.isOnline():!0}var kr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ar(e){let t=!1,n=0,r,i=Sr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new kr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>xr.isFocused()&&(e.networkMode===`always`||Er.isOnline())&&e.canRun(),u=()=>Or(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??(Xn?0:3),o=e.retryDelay??Dr,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),mr(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 jr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$n(this.gcTime)&&(this.#e=Jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Jn.clearTimeout(this.#e),void 0)}},Mr=class extends jr{#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=Fr(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=Fr(this.options);e.data!==void 0&&(this.setState(Pr(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=hr(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(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>nr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>tr(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:!er(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=yr(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=Ar({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof kr&&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 kr){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,...Nr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Pr(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),Tr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Or(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Pr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Fr(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 Ir=class extends Kn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Sr(),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),Rr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zr(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 nr(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&&!ur(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Br(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||nr(this.options.enabled,this.#t)!==nr(t.enabled,this.#t)||tr(this.options.staleTime,this.#t)!==tr(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||nr(this.options.enabled,this.#t)!==nr(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 Hr(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(Zn)),t}#g(){this.#b();let e=tr(this.options.staleTime,this.#t);if(Xn||this.#r.isStale||!$n(e))return;let t=er(this.#r.dataUpdatedAt,e)+1;this.#d=Jn.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,!(Xn||nr(this.options.enabled,this.#t)===!1||!$n(this.#p)||this.#p===0)&&(this.#f=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||xr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Jn.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Jn.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&&Rr(e,t),o=i&&Br(e,n,t,r);(a||o)&&(l={...l,...Nr(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=hr(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=hr(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:Vr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:nr(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=Sr())},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),!ur(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){Tr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Lr(e,t){return nr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Rr(e,t){return Lr(e,t)||e.state.data!==void 0&&zr(e,t,t.refetchOnMount)}function zr(e,t,n){if(nr(t.enabled,e)!==!1&&tr(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Vr(e,t)}return!1}function Br(e,t,n,r){return(e!==t||nr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Vr(e,n)}function Vr(e,t){return nr(t.enabled,e)!==!1&&e.isStaleByTime(tr(t.staleTime,e))}function Hr(e,t){return!ur(e.getCurrentResult(),t)}function Ur(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=yr(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?_r:gr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Gr:Wr,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:Wr(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 Wr(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 Gr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Kr(e,t){return t?Wr(e,t)!=null:!1}function qr(e,t){return!t||!e.getPreviousPageParam?!1:Gr(e,t)!=null}var Jr=class extends Ir{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:Ur()})}getOptimisticResult(e){return e.behavior=Ur(),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:Kr(t,n.data),hasPreviousPage:qr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Yr=class extends jr{#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||Xr(),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=Ar({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),Tr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Xr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Zr=class extends Kn{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 Yr({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=Qr(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=Qr(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=Qr(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=Qr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Tr.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=>ir(t,e))}findAll(e={}){return this.getAll().filter(t=>ir(e,t))}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Tr.batch(()=>Promise.all(e.map(e=>e.continue().catch(Zn))))}};function Qr(e){return e.options.scope?.id}var $r=class extends Kn{#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),ur(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&or(t.mutationKey)!==or(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??Xr();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){Tr.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 ei(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ti(e,t,n){let r=e.slice(0);return r[t]=n,r}var ni=class extends Kn{#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,Tr.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||!ur(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ei(e,n).forEach(e=>{e.destroy()}),ei(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=lr(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 Ir(this.#e,r)})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ti(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)&&Tr.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ri=class extends Kn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ar(r,t),a=this.get(i);return a||(a=new Mr({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(){Tr.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=>rr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>rr(e,t)):t}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ii=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ri,this.#t=e.mutationCache||new Zr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=xr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Er.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(tr(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=Qn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Tr.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;Tr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Tr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Tr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return Tr.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=Tr.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(Zn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Zn)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(tr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e.behavior=Ur(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e.behavior=Ur(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Er.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(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{sr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{sr(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||=ar(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===vr&&(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()}},ai=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})),oi=n(((e,t)=>{t.exports=ai()})),q=t(Vn(),1),J=oi(),si=q.createContext(void 0),ci=e=>{let t=q.useContext(si);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},li=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,J.jsx)(si.Provider,{value:e,children:t})),ui=q.createContext(!1),di=()=>q.useContext(ui);ui.Provider;function fi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pi=q.createContext(fi()),mi=()=>q.useContext(pi),hi=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},gi=e=>{q.useEffect(()=>{e.clearReset()},[e])},_i=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||br(n,[e.error,r])),vi=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))}},yi=(e,t)=>e.isLoading&&e.isFetching&&!t,bi=(e,t)=>e?.suspense&&t.isPending,xi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Si({queries:e,...t},n){let r=ci(n),i=di(),a=mi(),o=q.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{vi(e),hi(e,a)}),gi(a);let[s]=q.useState(()=>new ni(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;q.useSyncExternalStore(q.useCallback(e=>d?s.subscribe(Tr.batchCalls(e)):Zn,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),q.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>bi(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new Ir(r,n);if(bi(n,e))return xi(n,t,a);yi(e,i)&&xi(n,t,a)}return[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&_i({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 Ci(e,t,n){let r=di(),i=mi(),a=ci(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=r?`isRestoring`:`optimistic`,vi(o),hi(o,i),gi(i);let s=!a.getQueryCache().get(o.queryHash),[c]=q.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(e=>{let t=u?c.subscribe(Tr.batchCalls(e)):Zn;return c.updateResult(),t},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),q.useEffect(()=>{c.setOptions(o)},[o,c]),bi(o,l))throw xi(o,c,i);if(_i({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&&!Xn&&yi(l,r)&&(s?xi(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch(Zn).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?l:c.trackResult(l)}function wi(e,t){return Ci(e,Ir,t)}function Ti(e){return e}function Ei(e){return e}function Di(e,t){let n=ci(t),[r]=q.useState(()=>new $r(n,e));q.useEffect(()=>{r.setOptions(e)},[r,e]);let i=q.useSyncExternalStore(q.useCallback(e=>r.subscribe(Tr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=q.useCallback((e,t)=>{r.mutate(e,t).catch(Zn)},[r]);if(i.error&&br(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Oi(e,t){return Ci(e,Jr,t)}var ki=new WeakMap,Ai=new WeakMap,ji={current:[]},Mi=!1,Ni=0,Pi=new Set,Fi=new Map;function Ii(e){for(let t of e){if(ji.current.includes(t))continue;ji.current.push(t),t.recompute();let e=Ai.get(t);if(e)for(let t of e){let e=ki.get(t);e?.length&&Ii(e)}}}function Li(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Ri(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function zi(e){if(Ni>0&&!Fi.has(e)&&Fi.set(e,e.prevState),Pi.add(e),!(Ni>0)&&!Mi)try{for(Mi=!0;Pi.size>0;){let e=Array.from(Pi);Pi.clear();for(let t of e)t.prevState=Fi.get(t)??t.prevState,Li(t);for(let t of e){let e=ki.get(t);e&&(ji.current.push(t),Ii(e))}for(let t of e){let e=ki.get(t);if(e)for(let t of e)Ri(t)}}}finally{Mi=!1,ji.current=[],Fi.clear()}}function Bi(e){Ni++;try{e()}finally{if(Ni--,Ni===0){let e=Pi.values().next().value;e&&zi(e)}}}function Vi(e){return typeof e==`function`}var Hi=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):Vi(e)?this.state=e(this.prevState):this.state=e,(n=(t=this.options)?.onUpdate)==null||n.call(t),zi(this)}},Ui=`__TSR_index`,Wi=`popstate`,Gi=`beforeunload`;function Ki(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=Yi(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[Ui];i=qi(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[Ui];i=qi(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[Ui]!==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 qi(e,t){t||={};let n=Xi();return{...t,key:n,__TSR_key:n,[Ui]:e}}function Ji(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??(()=>Yi(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Xi();t.history.replaceState({[Ui]: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=Yi(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[Ui]-l.state[Ui],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=Ki({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(Gi,S,{capture:!0}),t.removeEventListener(Wi,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Gi,S,{capture:!0}),t.addEventListener(Wi,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 Yi(e,t){let n=e.indexOf(`#`),r=e.indexOf(`?`),i=Xi();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||{[Ui]:0,key:i,__TSR_key:i}}}function Xi(){return(Math.random()+1).toString(36).substring(7)}function Zi(e){return e[e.length-1]}function Qi(e){return typeof e==`function`}function $i(e,t){return Qi(e)?e(t):e}var ea=Object.prototype.hasOwnProperty;function ta(e,t){if(e===t)return e;let n=t,r=aa(e)&&aa(n);if(!r&&!(ra(e)&&ra(n)))return n;let i=r?e:na(e);if(!i)return n;let a=r?n:na(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:ea.call(e,i))&&l++;continue}if(s===null||u===null||typeof s!=`object`||typeof u!=`object`){c[i]=u;continue}let d=ta(s,u);c[i]=d,d===s&&l++}return o===s&&l===o?e:c}function na(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 ra(e){if(!ia(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ia(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ia(e){return Object.prototype.toString.call(e)===`[object Object]`}function aa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oa(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(!oa(e[r],t[r],n))return!1;return!0}if(ra(e)&&ra(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!oa(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||!oa(e[o],t[o],n)))return!1;return i===a}return!1}function sa(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 ca(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function la(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function ua(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+=la(e.slice(r,a.index))+a[0],r=n.lastIndex;return i+la(r?e.slice(r):e)}var da=!0,fa=`Invariant failed`;function pa(e,t){if(!e){if(da)throw Error(fa);var n=typeof t==`function`?t():t,r=n?`${fa}: ${n}`:fa;throw Error(r)}}function ma(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 ha=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ga=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,_a=/^([^{]*)\{\$\}([^}]*)$/;function va(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(_a);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(ga);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(ha);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 ya(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=va(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=Sa(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=Sa(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=Ca(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=Ca(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=Ca(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)ya(e,t,r,s,i,a,o)}function ba(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 xa(e){if(e.static)for(let t of e.static.values())xa(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())xa(t);if(e.dynamic?.length){e.dynamic.sort(ba);for(let t of e.dynamic)xa(t)}if(e.optional?.length){e.optional.sort(ba);for(let t of e.optional)xa(t)}if(e.wildcard?.length){e.wildcard.sort(ba);for(let t of e.wildcard)xa(t)}}function Sa(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 Ca(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 wa(e,t){let n=Sa(`/`),r=new Uint16Array(6);for(let t of e)ya(!1,r,t,1,n,0);xa(n),t.masksTree=n,t.flatCache=ma(1e3)}function Ta(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Aa(e,t.masksTree);return t.flatCache.set(e,r),r}function Ea(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Sa(`/`),ya(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Aa(r,o,n)}function Da(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=Aa(e,t.segmentTree,n);return a&&(a.branch=Ma(a.route)),t.matchCache.set(r,a),a}function Oa(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ka(e,t=!1,n){let r=Sa(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return ya(t,i,e,1,r,0,e=>{if(n?.(e,s),pa(!(e.id in a),`Duplicate routes found with id: ${String(e.id)}`),a[e.id]=e,s!==0&&e.path){let t=Oa(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),xa(r),{processedTree:{segmentTree:r,singleCache:ma(1e3),matchCache:ma(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Aa(e,t,n=!1){let r=e.split(`/`),i=Pa(e,r,t,n);if(!i)return null;let a=ja(e,r,i),o=`**`in i;return o&&(a[`**`]=i[`**`]),{route:o?i.node.notFound??i.node.route:i.node.route,params:a}}function ja(e,t,n){let r=Na(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 Ma(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Na(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Pa(e,t,n,r){let i=!Zi(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&&Fa(l,e)&&(l=e);let g=i===o;if(g){if(n.route&&(!a||n.isIndex)&&(Fa(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&&Fa(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 Fa(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 Ia(e){return La(e.filter(e=>e!==void 0).join(`/`))}function La(e){return e.replace(/\/{2,}/g,`/`)}function Ra(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function za(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Ba(e){return za(Ra(e))}function Va(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ha(e,t,n){return Va(e,n)===Va(t,n)}function Ua({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&&Zi(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&&(Zi(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=va(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=La(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Wa(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?encodeURI(r):Ka(r,n):r}function Ga({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=va(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=Wa(`_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=Wa(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=Wa(r,t,n)??``;c+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(c+=`/`),{usedParams:i,interpolatedPath:c||`/`,isMissingParams:r}}function Ka(e,t){let n=encodeURIComponent(e);if(t)for(let[e,r]of t)n=n.replaceAll(e,r);return n}function qa(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Ja(e){return!!e?.isNotFound}function Ya(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var Xa=`tsr-scroll-restoration-v1_3`,Za=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function Qa(){let e=Ya();if(!e)return null;let t=e.getItem(Xa),n=t?JSON.parse(t):{};return{state:n,set:t=>(n=$i(t,n)||n,e.setItem(Xa,JSON.stringify(n)))}}var $a=Qa(),eo=e=>e.state.__TSR_key||e.href;function to(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 no=!1;function ro({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];no=!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)}}no=!1}function io(e,t){if(!$a&&!e.isServer||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!$a))return;e.isScrollRestorationSetup=!0,no=!1;let n=e.options.getScrollRestorationKey||eo;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,Za(t=>{if(no||!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}"]`:to(t.target)}let i=n(e.state.location);$a.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})||(ro({storageKey:Xa,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&$a.set(e=>(e[r]||={},e)))})}function ao(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 oo(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 so(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function co(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=so(r):Array.isArray(t)?t.push(so(r)):n[e]=[t,so(r)]}return n}var lo=fo(JSON.parse),uo=po(JSON.stringify,JSON.parse);function fo(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=co(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function po(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=oo(e,r);return t?`?${t}`:``}}var mo=`__root__`;function ho(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 go(e){return e instanceof Response&&!!e.options}var _o=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},vo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(e=>e.id===t)),yo=(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),pa(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);pa(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,yo(e,t))},bo=(e,t,n)=>{if(!(!go(n)&&!Ja(n))){if(go(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=go(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,e=>({...e,status:r,isFetching:!1,error:n})),Ja(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw go(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(yo(e,n),n)}},xo=(e,t)=>{let n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},So=(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,bo(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,bo(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}))},Co=(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===mo;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:Po(l,i.searchError),params:Po(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:Po(e.search,e.searchError),params:Po(e.params,e.paramsError),ssr:e.ssr}))},f=r.options.ssr(d);if(ca(f))return f.then(e=>{i.ssr=s(e??c)});i.ssr=s(f??c)},wo=(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&&!vo(e,t)&&(n.options.loader||n.options.beforeLoad||Fo(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{_o(e)},i);r._nonReactive.pendingTimeout=t}},To=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;wo(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&bo(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Eo=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=sa(()=>{a?.resolve()});let{paramsError:o,searchError:s}=i;o&&So(e,n,o,`PARSE_PARAMS`),s&&So(e,n,s,`VALIDATE_SEARCH`),wo(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){Bi(()=>{f(),p()});return}i._nonReactive.beforeLoadPromise=sa();let{search:m,params:h,cause:g}=i,_=vo(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){Bi(()=>{f(),p()});return}(go(r)||Ja(r))&&(f(),So(e,n,r,`BEFORE_LOAD`)),Bi(()=>{f(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r,context:{...e.context,...r}})),p()})},b;try{if(b=r.options.beforeLoad(v),ca(b))return f(),b.catch(t=>{So(e,n,t,`BEFORE_LOAD`)}).then(y)}catch(t){f(),So(e,n,t,`BEFORE_LOAD`)}y(b)},Do=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>{if(e.router.isServer){let r=Co(e,n,t,i);if(ca(r))return r.then(s)}return s()},o=()=>Eo(e,n,t,i),s=()=>{if(xo(e,n))return;let t=To(e,n,i);return ca(t)?t.then(o):o()};return a()},Oo=(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}))},ko=(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=vo(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}},Ao=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&No(r);let a=r.options.loader?.(ko(e,t,n,r)),o=r.options.loader&&ca(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;bo(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let s=Oo(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,Ja(n)&&await r.options.notFoundComponent?.preload?.(),bo(e,e.router.getMatch(t),n);try{r.options.onError?.(n)}catch(n){a=n,bo(e,e.router.getMatch(t),n)}let s=Oo(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=Oo(e,t,r);if(n){let r=await n;e.updateMatch(t,e=>({...e,...r}))}i._nonReactive.loaderPromise=void 0}bo(e,i,n)}},jo=async(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=!1,a=!1,o=e.router.looseRoutesById[r];if(xo(e,n)){if(e.router.isServer){let t=Oo(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&&bo(e,t,i)}else{let s=Date.now()-r.updatedAt,c=vo(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(ko(e,n,t,o)):u,f=!!c&&!e.router.state.matches.some(e=>e.id===n),p=e.router.getMatch(n);p._nonReactive.loaderPromise=sa(),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 Ao(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){go(t)&&await e.router.navigate(t.options)}})();else if(m!==`success`||i&&e.sync)await Ao(e,n,t,o);else{let t=Oo(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 Mo(e){let t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(e=>e._forcePending)&&_o(t);try{for(let e=0;e<t.matches.length;e++){let n=Do(t,e);ca(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push(jo(t,n));await Promise.all(t.matchPromises);let n=_o(t);ca(n)&&await n}catch(e){if(Ja(e)&&!t.preload){let n=_o(t);throw ca(n)&&await n,e}if(go(e))throw e}return t.matches}async function No(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 Io){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 Po(e,t){return t?{status:`error`,error:t}:{status:`success`,value:e}}function Fo(e){for(let t of Io)if(e.options[t]?.preload)return!0;return!1}var Io=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Lo(e){return{input:({url:t})=>{for(let n of e)t=zo(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Bo(e[n],t);return t}}}function Ro(e){let t=Ba(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=Ia([`/`,t,e.pathname]),e)}}function zo(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 Bo(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 Vo(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 Ho=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=Ji())),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 Hi(Go(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),io(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[];Ba(o)!==``&&e.push(Ro({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Lo(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}=ka(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});this.options.routeMasks&&wa(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=zo(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:ua(c),searchStr:o,search:ta(t?.search,a),hash:l.split(`#`).reverse()[0]??``,state:ta(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=ma(1e3),this.resolvePathWithBase=(e,t)=>Ua({base:e,to:La(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=>qo({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=Zi(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,$i(t.params,s)),u=Ga({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:ua(Ga({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,Ko(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=Jo({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=ta(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?$i(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?$i(t.state,n.state):{};_=ta(n.state,_);let v=`${f}${m}${g}`,y=new URL(v,this.origin),b=Bo(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=Ta(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=oa(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=za(this.latestLocation.href)===za(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=sa(()=>{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=Yi(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(Ba(t(this.latestLocation.href))!==Ba(t(e.href))){let t=e.url;throw this.origin&&t.startsWith(this.origin)&&(t=t.replace(this.origin,``)||`/`),ho({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`,...Vo({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...Vo({resolvedLocation:n,location:t})}),await Mo({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=[];Bi(()=>{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){go(e)?(t=e,this.isServer||this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):Ja(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(Vo({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=No,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)]);Bi(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await Mo({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(go(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Ja(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=Ea(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!oa(a.params,e.params,{partial:!0})?!1:t?.includeSearch??!0?oa(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??uo,parseSearch:e.parseSearch??lo}),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[`**`]:za(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 mo}})(),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=Ko(n.options.validateSearch,{...r})??void 0;return[{...r,...e},{...i,...e},void 0]}catch(e){let n=e;if(e instanceof Uo||(n=new Uo(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}=Ga({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=Ja(e)||go(e)?e:new Wo(e.message,{cause:e}),t?.throwOnError)throw b}}Object.assign(i,y);let x=v?`stay`:`enter`,S;if(_)S={..._,cause:x,params:v?ta(v.params,i):i,_strictParams:y,search:ta(v?v.search:_.search,o),_strictSearch:u};else{let e=n.options.loader||n.options.beforeLoad||n.lazyFn||Fo(n)?`pending`:`success`;S={id:g,index:r,routeId:n.id,params:v?ta(v.params,i):i,_strictParams:y,pathname:m,updatedAt:Date.now(),search:v?ta(v.search,o):o,_strictSearch:u,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:b,__routeContext:void 0,_nonReactive:{loadPromise:sa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:x,loaderDeps:v?ta(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}},Uo=class extends Error{},Wo=class extends Error{};function Go(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ko(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Uo(`Async validation not supported`);if(n.issues)throw new Uo(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 qo({pathname:e,routesById:t,processedTree:n}){let r={},i=za(e),a,o=Da(i,n,!0);return o&&(a=o.route,Object.assign(r,o.params)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Jo({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,...Ko(t.options.validateSearch,r)??void 0}}catch{return r}}),e.concat(n)},[])??[];i.push(({search:e})=>t.search?t.search===!0?e:$i(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 Yo=`Error preloading route! ☝️`,Xo=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=mo:this.parentRoute||pa(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?mo:t?.path;r&&r!==`/`&&(r=Ra(r));let i=t?.id||r,a=n?mo:Ia([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ia([`/`,a]));let o=a===`__root__`?`/`:Ia([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}},Zo=class{constructor({id:e}){this.notFound=e=>qa({routeId:this.id,...e}),this.id=e}},Qo=class extends Xo{constructor(e){super(e)}};function $o(e){let t=e.errorComponent??ts;return(0,J.jsx)(es,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?q.createElement(t,{error:n,reset:r}):e.children})}var es=class extends q.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 ts({error:e}){let[t,n]=q.useState(!1);return(0,J.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,J.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,J.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,J.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,J.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,J.jsx)(`div`,{children:(0,J.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,J.jsx)(`code`,{children:e.message}):null})}):null]})}function ns({children:e,fallback:t=null}){return rs()?(0,J.jsx)(q.Fragment,{children:e}):(0,J.jsx)(q.Fragment,{children:t})}function rs(){return q.useSyncExternalStore(is,()=>!0,()=>!1)}function is(){return()=>{}}var as=!0;function os(e,t){if(!as){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var ss=n((e=>{var t=Vn();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})),cs=n(((e,t)=>{t.exports=ss()})),ls=n((e=>{var t=Vn(),n=cs();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}})),us=n(((e,t)=>{t.exports=ls()}))();function ds(e,t=e=>e,n={}){let r=n.equal??fs;return(0,us.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,r)}function fs(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=ps(e);if(n.length!==ps(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 ps(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var ms=q.createContext(null);function hs(){return typeof document>`u`?ms:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ms,ms)}function gs(e){let t=q.useContext(hs());return os(!((e?.warn??!0)&&!t),`useRouter must be used inside a <RouterProvider> component!`),t}function _s(e){let t=gs({warn:e?.router===void 0}),n=e?.router||t,r=(0,q.useRef)(void 0);return ds(n.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=ta(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var vs=q.createContext(void 0),ys=q.createContext(void 0);function bs(e){let t=q.useContext(e.from?ys:vs);return _s({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(pa(!((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 xs(e){return bs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ss(e){let{select:t,...n}=e;return bs({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Cs(e){return bs({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 ws(e){return bs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Ts=typeof window<`u`?q.useLayoutEffect:q.useEffect;function Es(e){let t=q.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ds(e,t,n={},r={}){q.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 Os(e){let t=q.useRef(null);return q.useImperativeHandle(e,()=>t.current,[]),t}function ks(e){let t=gs();return q.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var As=t(Un(),1);function js(e,t){let n=gs(),[r,i]=q.useState(!1),a=q.useRef(!1),o=Os(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=_s({select:e=>e.location.search,structuralSharing:!0}),B=e.from,ee=q.useMemo(()=>({...e,from:B}),[n,z,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),V=q.useMemo(()=>n.buildLocation({...ee}),[n,ee]),te=q.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=q.useMemo(()=>{if(te?.external)return te.href;try{return new URL(u),u}catch{}},[u,te]),U=e.reloadDocument||H?!1:d??n.options.defaultPreload,W=f??n.options.defaultPreloadDelay??0,ne=_s({select:e=>{if(H)return!1;if(l?.exact){if(!Ha(e.location.pathname,V.pathname,n.basepath))return!1}else{let t=Va(e.location.pathname,n.basepath),r=Va(V.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(l?.includeSearch??!0)&&!oa(e.location.search,V.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?e.location.hash===V.hash:!0}}),re=q.useCallback(()=>{n.preloadRoute({...ee}).catch(e=>{console.warn(e),console.warn(Yo)})},[n,ee]);Ds(o,q.useCallback(e=>{e?.isIntersecting&&re()},[re]),Rs,{disabled:!!b||U!==`viewport`}),q.useEffect(()=>{a.current||!b&&U===`render`&&(re(),a.current=!0)},[b,re,U]);let ie=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Vs(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,As.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 ae=e=>{b||U&&re()},oe=ae,se=e=>{if(!(b||!U))if(!W)re();else{let t=e.target;if(Ls.has(t))return;let n=setTimeout(()=>{Ls.delete(t),re()},W);Ls.set(t,n)}},ce=e=>{if(b||!U||!W)return;let t=e.target,n=Ls.get(t);n&&(clearTimeout(n),Ls.delete(t))},le=ne?$i(s,{})??Ns:Ms,ue=ne?Ms:$i(c,{})??Ms,de=[S,le.className,ue.className].filter(Boolean).join(` `),fe=(x||le.style||ue.style)&&{...x,...le.style,...ue.style};return{...R,...le,...ue,href:te?.href,ref:o,onClick:zs([C,ie]),onFocus:zs([w,ae]),onMouseEnter:zs([T,se]),onMouseLeave:zs([E,ce]),onTouchStart:zs([D,oe]),disabled:!!b,target:y,...fe&&{style:fe},...de&&{className:de},...b&&Ps,...ne&&Fs,...r&&Is}}var Ms={},Ns={className:`active`},Ps={role:`link`,"aria-disabled":!0},Fs={"data-status":`active`,"aria-current":`page`},Is={"data-transitioning":`transitioning`},Ls=new WeakMap,Rs={rootMargin:`100px`},zs=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}},Bs=q.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,ref:a,...o}=js(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;return n===void 0&&delete o.disabled,q.createElement(n||`a`,{...o,ref:a},s)});function Vs(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Hs(e){return new Us({id:e})}var Us=class extends Zo{constructor({id:e}){super({id:e}),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id,strict:!1}),this.useLoaderData=e=>xs({...e,from:this.id,strict:!1}),this.useNavigate=()=>ks({from:gs().routesById[this.id].fullPath}),this.notFound=e=>qa({routeId:this.id,...e}),this.Link=q.forwardRef((e,t)=>{let n=gs().routesById[this.id].fullPath;return(0,J.jsx)(Bs,{ref:t,from:n,...e})})}},Ws=class extends Xo{constructor(e){super(e),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id}),this.useLoaderData=e=>xs({...e,from:this.id}),this.useNavigate=()=>ks({from:this.fullPath}),this.Link=q.forwardRef((e,t)=>(0,J.jsx)(Bs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Gs(e){return new Ws(e)}var Ks=class extends Qo{constructor(e){super(e),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id}),this.useLoaderData=e=>xs({...e,from:this.id}),this.useNavigate=()=>ks({from:this.fullPath}),this.Link=q.forwardRef((e,t)=>(0,J.jsx)(Bs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function qs(e){return new Ks(e)}function Js(e){return typeof e==`object`?new Ys(e,{silent:!0}).createRoute(e):new Ys(e,{silent:!0}).createRoute}var Ys=class{constructor(e,t){this.path=e,this.createRoute=e=>{os(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=Gs(e);return t.isRoot=!1,t},this.silent=t?.silent}},Xs=class{constructor(e){this.useMatch=e=>bs({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>Ss({...e,from:this.options.id}),this.useLoaderData=e=>xs({...e,from:this.options.id}),this.useNavigate=()=>ks({from:gs().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function Zs(e){return typeof e==`object`?new Xs(e):t=>new Xs({id:e,...t})}function Qs(){let e=gs(),t=q.useRef({router:e,mounted:!1}),[n,r]=q.useState(!1),{hasPendingMatches:i,isLoading:a}=_s({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=Es(a),s=a||n||i,c=Es(s),l=a||i,u=Es(l);return e.startTransition=e=>{r(!0),q.startTransition(()=>{e(),r(!1)})},q.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 za(e.latestLocation.href)!==za(n.href)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ts(()=>{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]),Ts(()=>{o&&!a&&e.emit({type:`onLoad`,...Vo(e.state)})},[o,e,a]),Ts(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Vo(e.state)})},[l,u,e]),Ts(()=>{if(c&&!s){let t=Vo(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&ao(e)}},[s,c,e]),null}function $s(e){let t=_s({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,J.jsx)($o,{getResetKey:()=>t,onCatch:(t,n)=>{if(Ja(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Ja(t))return e.fallback?.(t);throw t},children:e.children})}function ec(){return(0,J.jsx)(`p`,{children:`Not Found`})}function tc(e){return(0,J.jsx)(J.Fragment,{children:e.children})}function nc(e,t,n){return t.options.notFoundComponent?(0,J.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,J.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,J.jsx)(ec,{})}function rc({children:e}){let t=gs();return t.isServer?(0,J.jsx)(`script`,{nonce:t.options.ssr?.nonce,className:`$tsr`,dangerouslySetInnerHTML:{__html:e+`;typeof $_TSR !== "undefined" && $_TSR.c()`}}):null}function ic(){let e=gs();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return null;let t=(e.options.getScrollRestorationKey||eo)(e.latestLocation),n=t===eo(e.latestLocation)?void 0:t,r={storageKey:Xa,shouldScrollRestoration:!0};return n&&(r.key=n),(0,J.jsx)(rc,{children:`(${ro.toString()})(${JSON.stringify(r)})`})}var ac=q.memo(function({matchId:e}){let t=gs(),n=_s({select:t=>{let n=t.matches.find(t=>t.id===e);return pa(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,J.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))?q.Suspense:tc,d=o?$o:tc,f=c?$s:tc,p=_s({select:e=>e.loadedAt}),m=_s({select:t=>{let n=t.matches.findIndex(t=>t.id===e);return t.matches[n-1]?.routeId}});return(0,J.jsxs)(r.isRoot?r.options.shellComponent??tc:tc,{children:[(0,J.jsx)(vs.Provider,{value:e,children:(0,J.jsx)(u,{fallback:a,children:(0,J.jsx)(d,{getResetKey:()=>p,errorComponent:o||ts,onCatch:(t,n)=>{if(Ja(t))throw t;os(!1,`Error in route match: ${e}`),s?.(t,n)},children:(0,J.jsx)(f,{fallback:e=>{if(!c||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return q.createElement(c,e)},children:l||n._displayPending?(0,J.jsx)(ns,{fallback:a,children:(0,J.jsx)(sc,{matchId:e})}):(0,J.jsx)(sc,{matchId:e})})})})}),m===`__root__`&&t.options.scrollRestoration?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(oc,{}),(0,J.jsx)(ic,{})]}):null]})});function oc(){let e=gs(),t=q.useRef(void 0);return(0,J.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...Vo(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var sc=q.memo(function({matchId:e}){let t=gs(),{match:n,key:r,routeId:i}=_s({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=q.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,J.jsx)(e,{},r):(0,J.jsx)(cc,{})},[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=sa();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 pa(Ja(n.error),`Expected a notFound error`),nc(t,a,n.error);if(n.status===`redirected`)throw pa(go(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`){if(t.isServer)return(0,J.jsx)((a.options.errorComponent??t.options.defaultErrorComponent)||ts,{error:n.error,reset:void 0,info:{componentStack:``}});throw n.error}return o}),cc=q.memo(function(){let e=gs(),t=q.useContext(vs),n=_s({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=_s({select:e=>{let n=e.matches.find(e=>e.id===t);return pa(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),a=_s({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),o=e.options.defaultPendingComponent?(0,J.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return nc(e,r,void 0);if(!a)return null;let s=(0,J.jsx)(ac,{matchId:a});return n===`__root__`?(0,J.jsx)(q.Suspense,{fallback:o,children:s}):s});function lc(){let e=gs(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,J.jsx)(t,{}):null,r=(0,J.jsxs)(e.isServer||typeof document<`u`&&e.ssr?tc:q.Suspense,{fallback:n,children:[!e.isServer&&(0,J.jsx)(Qs,{}),(0,J.jsx)(uc,{})]});return e.options.InnerWrap?(0,J.jsx)(e.options.InnerWrap,{children:r}):r}function uc(){let e=gs(),t=_s({select:e=>e.matches[0]?.id}),n=_s({select:e=>e.loadedAt}),r=t?(0,J.jsx)(ac,{matchId:t}):null;return(0,J.jsx)(vs.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,J.jsx)($o,{getResetKey:()=>n,errorComponent:ts,onCatch:e=>{os(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),os(!1,e.message||e.toString())},children:r})})}var dc=e=>new fc(e),fc=class extends Ho{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=Js,globalThis.createLazyFileRoute=Zs):typeof window<`u`&&(window.createFileRoute=Js,window.createLazyFileRoute=Zs);function pc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,J.jsx)(hs().Provider,{value:e,children:t});return e.options.Wrap?(0,J.jsx)(e.options.Wrap,{children:r}):r}function mc({router:e,...t}){return(0,J.jsx)(pc,{router:e,...t,children:(0,J.jsx)(lc,{})})}function hc(e){return _s({select:t=>e?.select?e.select(t.location):t.location})}var gc=Gn(),_c=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(_c=!0,console.log(`[static-mode] Detected static export mode (via flag)`));async function vc(){return _c===null&&(_c=typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0),_c}function yc(){return _c===!0}function bc(e){_c=e}var xc=null;function Sc(){return xc===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:xc}function Cc(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}function wc(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 Tc(){return document.documentElement.classList.contains(`dark`)}function Ec(){return!1}function Dc(){return(0,q.useSyncExternalStore)(wc,Tc,Ec)}var Oc=/^\/versions\/[^/]+(?:\/|$)/;function kc(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 Ac(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function jc(e){return Oc.test(e)}function Mc(e){let t=jc(e.pathname);return{hosted:t,apiBaseUrl:kc(Ac(e.search,`api`)??``),sessionId:t?Ac(e.search,`session`):null}}function Nc(e,t){let n=Mc(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Pc(){return typeof window<`u`&&window.location!==void 0}function Fc(){return Pc()?Mc(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Ic(){return Pc()?Fc().apiBaseUrl??``:``}function Lc(e){if(!Pc())return``;let t=Ic();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 Rc(){return Lc(`/trpc`)}function zc(){return Lc(`/ws/pty`)}function Bc(){let e=Ic();return e?`${e}/trpc`:`/trpc`}function Vc(){let e=Ic();return e?`${e}/api/health`:`/api/health`}var Hc=`modulepreload`,Uc=function(e){return`/`+e},Wc={},Y=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=Uc(t,n),t in Wc)return;Wc[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`:Hc,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)})},Gc=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Kc=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],qc=yc()?[]:[`/git`,`/terminal`],Jc=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Yc(){return Nc(`nav-layout`,window.location)}function Xc(e){return Nc(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Zc=300;function Qc(e){return Gc.includes(e)}function $c(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&Qc(e)):[]}function el(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:$c(t.mainTabs),bottomTabs:$c(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function tl(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 nl(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:tl(t,i)}}function rl(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function il(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function al(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function ol(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=rl(Sc());return t.pathname=il(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function sl(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 cl(e){for(let t of Gc)if(e===t||e.startsWith(t+`/`))return t;return null}function ll(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=cl(n.pathname);return i&&r.includes(i)?i:null}function ul(e){return Jc.some(t=>e===t||e.startsWith(t+`/`))}function dl(e,t){if(ul(t))return`pop`;let n=cl(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function fl(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 Gc)t.has(e)||(qc.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function pl(e,t){if(t.length===0)return nl(`/`);let n=cl(e.pathname);return n&&!t.includes(n)?nl(`/`):e}function ml(e,t){if(t.length===0)return nl(`/`);if(e.pathname===`/`)return nl(`/`,e.state);let n=cl(e.pathname);return!n||!t.includes(n)?nl(`/`):e}function hl(e){return e.pathname===`/`?nl(`/`,e.state):ul(e.pathname)?e:nl(`/`)}function gl(e){let t=fl({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:pl(e.mainLocation,t.mainTabs),bottomLocation:ml(e.bottomLocation,t.bottomTabs),popLocation:hl(e.popLocation)}}function _l(e,t){let n=new URL(e.href),r=rl(Sc());n.pathname=il(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=nl(`${n.pathname}${n.search}${n.hash}`,o?.main),c=nl(i??`/`,o?.bottom),l=nl(a??`/`,o?.pop);if(!i&&!a){let e=dl(t,s.pathname);e===`bottom`?(c=s,s=nl(`/`,o?.main)):e===`pop`&&(l=s,s=nl(`/`,o?.main))}return{main:pl(s,t.mainTabs),bottom:ml(c,t.bottomTabs),pop:hl(l)}}function vl(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=rl(Sc());return n.pathname=al(n.pathname,r),sl(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 yl(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function bl(){return{mainTabs:[...Kc],bottomTabs:[...qc],updatedAt:0,mainLocation:nl(`/dashboard`),bottomLocation:nl(`/`),popLocation:nl(`/`)}}function xl(){try{let e=localStorage.getItem(Yc());return e?el(JSON.parse(e)):null}catch{return null}}function Sl(e){try{let t=localStorage.getItem(e);return t?el(JSON.parse(t)):null}catch{return null}}function Cl(e,t=Yc()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function wl(e){let t=cl(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?nl(t,e.state):e}var Tl=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(ll(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=nl(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||ll(e,`main`)!=null?e:{...e,mainLocation:nl(e.mainTabs[0])}];function El(e,t,n){let r=t;for(let t of Tl)r=t({prevState:e,nextState:r,event:n});return r}function Dl(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:dl(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 cl((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=nl(`/`):c=nl(`/`)),{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 yl(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?cl(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:cl(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return dl(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:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return dl(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:nl(`/`)},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=fl(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 Ol(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 kl(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])Ol(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Al=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=bl();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:Nc(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=yc()?null:xl();if(e!=null){let t=fl(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=_l(window.location,this.state),n=gl({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=gl(El(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:nl(ol(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:nl(ol(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:nl(ol(t),n)});return vl(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return dl(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:nl(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:nl(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=cl(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||yc())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await Y(async()=>{let{trpcClient:e}=await import(`./trpc-B-Zq3zMO.js`);return{trpcClient:e}},[]),n=el(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=el(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=_l(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Dl(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=El(this.state,t.nextState,e);return n=gl(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=_l(window.location,this.state);this.state=gl({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Dl(this.state,e);if(!t.changed)return;let n=this.state,r=El(n,t.nextState,e);r=gl(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),Cl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(Ol(n,this.state,`main`)||Ol(n,this.state,`bottom`)||Ol(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=kl(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=vl(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=vl(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},Cl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,Y(async()=>{let{trpcClient:e}=await import(`./trpc-B-Zq3zMO.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(()=>{})},Zc)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Vc());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Xc(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=Sl(e);if(t){let e=fl(t);this.state=gl({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=gl({...this.state,mainLocation:wl(this.state.mainLocation),bottomLocation:wl(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!yc()&&Al.init();function jl(){return(0,q.useSyncExternalStore)(e=>Al.subscribe(e),()=>Al.getSnapshot(),()=>Al.getSnapshot())}function Ml(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Nl(e){return[...e].sort(Ml)}function Pl(e,t=10){return Nl(e).slice(0,Math.max(0,Math.trunc(t)))}var Fl=`project`,Il=/^[A-Za-z]:\//;function Ll(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function Rl(e){return e.startsWith(`/`)||Il.test(e)}function zl(e){return e.replace(/^\.?\//,``)}function Bl(e){return Ll(e).split(`/`).filter(Boolean)}function Vl(e){let t=Ll(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Hl(e){return`${Fl}:${zl(e)}`}function Ul(e,t){let n=Ll(e),r=Ll(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Wl(e,t){let n=Bl(e),r=Bl(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function Gl(e){let t=Bl(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function Kl(e,t){let n=Ll(e),r=Vl(n);return(t?.source===`package`||r)&&r?r:Rl(n)?t?.projectDir&&Ul(t.projectDir,n)?Hl(Wl(t.projectDir,n)):Hl(Gl(n)||Bl(n).slice(-4).join(`/`)):Hl(n)}var ql=Symbol.for(`yaml.alias`),Jl=Symbol.for(`yaml.document`),Yl=Symbol.for(`yaml.map`),Xl=Symbol.for(`yaml.pair`),Zl=Symbol.for(`yaml.scalar`),Ql=Symbol.for(`yaml.seq`),$l=Symbol.for(`yaml.node.type`),eu=e=>!!e&&typeof e==`object`&&e[$l]===ql,tu=e=>!!e&&typeof e==`object`&&e[$l]===Jl,nu=e=>!!e&&typeof e==`object`&&e[$l]===Yl,ru=e=>!!e&&typeof e==`object`&&e[$l]===Xl,iu=e=>!!e&&typeof e==`object`&&e[$l]===Zl,au=e=>!!e&&typeof e==`object`&&e[$l]===Ql;function ou(e){if(e&&typeof e==`object`)switch(e[$l]){case Yl:case Ql:return!0}return!1}function su(e){if(e&&typeof e==`object`)switch(e[$l]){case ql:case Yl:case Zl:case Ql:return!0}return!1}var cu=e=>(iu(e)||ou(e))&&!!e.anchor,lu=Symbol(`break visit`),uu=Symbol(`skip children`),du=Symbol(`remove node`);function fu(e,t){let n=gu(t);tu(e)?pu(null,e.contents,n,Object.freeze([e]))===du&&(e.contents=null):pu(null,e,n,Object.freeze([]))}fu.BREAK=lu,fu.SKIP=uu,fu.REMOVE=du;function pu(e,t,n,r){let i=_u(e,t,n,r);if(su(i)||ru(i))return vu(e,r,i),pu(e,i,n,r);if(typeof i!=`symbol`){if(ou(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=pu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===lu)return lu;else i===du&&(t.items.splice(e,1),--e)}}else if(ru(t)){r=Object.freeze(r.concat(t));let e=pu(`key`,t.key,n,r);if(e===lu)return lu;e===du&&(t.key=null);let i=pu(`value`,t.value,n,r);if(i===lu)return lu;i===du&&(t.value=null)}}return i}async function mu(e,t){let n=gu(t);tu(e)?await hu(null,e.contents,n,Object.freeze([e]))===du&&(e.contents=null):await hu(null,e,n,Object.freeze([]))}mu.BREAK=lu,mu.SKIP=uu,mu.REMOVE=du;async function hu(e,t,n,r){let i=await _u(e,t,n,r);if(su(i)||ru(i))return vu(e,r,i),hu(e,i,n,r);if(typeof i!=`symbol`){if(ou(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await hu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===lu)return lu;else i===du&&(t.items.splice(e,1),--e)}}else if(ru(t)){r=Object.freeze(r.concat(t));let e=await hu(`key`,t.key,n,r);if(e===lu)return lu;e===du&&(t.key=null);let i=await hu(`value`,t.value,n,r);if(i===lu)return lu;i===du&&(t.value=null)}}return i}function gu(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 _u(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(nu(t))return n.Map?.(e,t,r);if(au(t))return n.Seq?.(e,t,r);if(ru(t))return n.Pair?.(e,t,r);if(iu(t))return n.Scalar?.(e,t,r);if(eu(t))return n.Alias?.(e,t,r)}function vu(e,t,n){let r=t[t.length-1];if(ou(r))r.items[e]=n;else if(ru(r))e===`key`?r.key=n:r.value=n;else if(tu(r))r.contents=n;else{let e=eu(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var yu={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},bu=e=>e.replace(/[!,[\]{}]/g,e=>yu[e]),xu=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+bu(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&&su(e.contents)){let t={};fu(e.contents,(e,n)=>{su(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(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ft(e,``+r);break;case`className`:yt(e,`class`,r);break;case`tabIndex`:yt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:yt(e,n,r);break;case`style`:Rt(e,r,o);break;case`data`:if(t!==`object`){yt(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=Vt(``+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`&&Fd(e,t,`name`,a.name,a,null),Fd(e,t,`formEncType`,a.formEncType,a,null),Fd(e,t,`formMethod`,a.formMethod,a,null),Fd(e,t,`formTarget`,a.formTarget,a,null)):(Fd(e,t,`encType`,a.encType,a,null),Fd(e,t,`method`,a.method,a,null),Fd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`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=Vt(``+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`:xd(`beforetoggle`,e),xd(`toggle`,e),vt(e,`popover`,r);break;case`xlinkActuate`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:vt(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=zt.get(n)||n,vt(e,n,r))}}function Id(e,t,n,r,a,o){switch(n){case`style`:Rt(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`?Ft(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ft(e,``+r);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!dt.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[Ze]||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,``):vt(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:xd(`error`,e),xd(`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:Fd(e,t,o,s,n,null)}}a&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:xd(`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:Fd(e,t,r,d,n,null)}}At(e,o,c,l,u,s,a,!1);return;case`select`:for(a in xd(`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:Fd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Mt(e,!!r,n,!0):Mt(e,!!r,t,!1);return;case`textarea`:for(s in xd(`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:Fd(e,t,s,c,n,null)}Pt(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:Fd(e,t,l,r,n,null)}return;case`dialog`:xd(`beforetoggle`,e),xd(`toggle`,e),xd(`cancel`,e),xd(`close`,e);break;case`iframe`:case`object`:xd(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)xd(vd[r],e);break;case`image`:xd(`error`,e),xd(`load`,e);break;case`details`:xd(`toggle`,e);break;case`embed`:case`source`:case`link`:xd(`error`,e),xd(`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:Fd(e,t,u,r,n,null)}return;default:if(K(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(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)||Fd(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&&Fd(e,t,p,m,r,f)}}kt(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)||Fd(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&&Fd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Mt(e,!!n,n?[]:``,!1):Mt(e,!!n,t,!0)):Mt(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:Fd(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&&Fd(e,t,s,a,r,o)}Nt(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:Fd(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:Fd(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)&&Fd(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:Fd(e,t,u,p,r,m)}return;default:if(K(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(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||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(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||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){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&&zd(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&&zd(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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e===qd?!1:(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(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),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[rt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function nf(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 rf(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`:rf(n),it(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(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[rt])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=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(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 df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(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 hf(e,t,n){switch(t=Ud(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 gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);it(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=P.d;P.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=bu();return e||t}function Sf(e){var t=ot(e);t!==null&&t.tag===5&&t.type===`form`?bs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Ot(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ot(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ot(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ot(n.imageSizes)+`"]`)):i+=`[href="`+Ot(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),lt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ot(r)+`"][href="`+Ot(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=f({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),lt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=ct(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);lt(c),Ld(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,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=ct(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),lt(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var a=(a=te.current)?yf(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=Nf(n.href),n=ct(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=Nf(n.href);var o=ct(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(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.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},_f.set(e,n),o||If(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=Lf(n),n=ct(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 Nf(e){return`href="`+Ot(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function If(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}),Ld(t,`link`,n),lt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Ot(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ot(n.href)+`"]`);if(r)return t.instance=r,lt(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`),lt(r),Ld(r,`style`,a),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Nf(n.href);var o=e.querySelector(Pf(a));if(o)return t.state.loading|=4,t.instance=o,lt(o),o;r=Ff(n),(a=_f.get(a))&&Vf(r,a),o=(e.ownerDocument||e).createElement(`link`),lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(a=e.querySelector(Rf(o)))?(t.instance=a,lt(a),a):(r=n,(a=_f.get(o))&&(r=f({},n),Hf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),lt(a),Ld(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,Bf(r,n.precedence,e));return t.instance}function Bf(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 Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,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[rt]||a[Xe]||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 Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(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=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,lt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(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=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.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=Zf.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 tp={$$typeof:b,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function np(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=ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ze(0),this.hiddenUpdates=ze(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 rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=$r(3,null,null,t),e.current=a,a.stateNode=e,t=Qi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ja(a),e}function ip(e){return e?(e=Zr,e):Zr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Na(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Pa(e,r,t),n!==null&&(hu(n,e,t),Fa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Jr(e,67108864);t!==null&&hu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=pu();t=Ge(t);var n=Jr(e,t);n!==null&&hu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=2,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function fp(e,t,n,r){var i=N.T;N.T=null;var a=P.p;try{P.p=8,pp(e,t,n,r)}finally{P.p=a,N.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=ot(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Pe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-De(o);s.entanglements[1]|=c,o&=~c}id(a),!(Pl&6)&&(tu=ge()+500,ad(0,!1))}}break;case 31:case 13:s=Jr(a,2),s!==null&&hu(s,a,2),bu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=Wt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=at(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 hp=e,null}function _p(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(G()){case _e:return 2;case ve:return 8;case ye:case be:return 32;case xe:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(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=ot(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=at(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,Je(e.priority,function(){lp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Je(e.priority,function(){lp(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 Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ut=r,n.target.dispatchEvent(r),Ut=null}else return t=ot(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,n){e.blockedOn===n&&(e.blockedOn=null,vp||(vp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Pp===e&&(Pp=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(gp(r||n)===null)continue;break}var a=ot(n);a!==null&&(e.splice(t,3),t-=3,vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.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[Ze]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ze]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){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 Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;ap(n,pu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),bu(),t[Qe]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=qe();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=n.version;if(Bp!==`19.2.0`)throw Error(i(527,Bp,`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 Vp={bundleType:0,version:`19.2.0`,rendererPackageName:`react-dom`,currentDispatcherRef:N,reconcilerVersion:`19.2.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{we=Hp.inject(Vp),Te=Hp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Vs,s=Hs,c=Us;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=rp(e,1,!1,null,null,n,r,null,o,s,c,Lp),e[Qe]=t.current,wd(e),new Rp(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=Vs,c=Hs,l=Us,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=rp(e,1,!0,t,n??null,r,o,u,s,c,l,Lp),t.context=ip(null),n=t.current,r=pu(),r=Ge(r),o=Na(r),o.callback=null,Pa(n,o,r),n=r,t.current.lanes=n,Be(t,n),id(t),e[Qe]=t.current,wd(e),new zp(t)}})),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=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(){}},qn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Jn=new class{#e=qn;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 Yn(e){setTimeout(e,0)}var Xn=typeof window>`u`||`Deno`in globalThis;function Zn(){}function Qn(e,t){return typeof e==`function`?e(t):e}function $n(e){return typeof e==`number`&&e>=0&&e!==1/0}function er(e,t){return Math.max(e+(t||0)-Date.now(),0)}function tr(e,t){return typeof e==`function`?e(t):e}function nr(e,t){return typeof e==`function`?e(t):e}function rr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ar(o,t.options))return!1}else if(!sr(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 ir(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(or(t.options.mutationKey)!==or(a))return!1}else if(!sr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ar(e,t){return(t?.queryKeyHashFn||or)(e)}function or(e){return JSON.stringify(e,(e,t)=>fr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function sr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>sr(e[n],t[n])):!1}var cr=Object.prototype.hasOwnProperty;function lr(e,t){if(e===t)return e;let n=dr(e)&&dr(t);if(!n&&!(fr(e)&&fr(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:cr.call(e,a))&&s++;continue}if(l===null||u===null||typeof l!=`object`||typeof u!=`object`){o[a]=u;continue}let d=lr(l,u);o[a]=d,d===l&&s++}return r===a&&s===r?e:o}function ur(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 dr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fr(e){if(!pr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!pr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function pr(e){return Object.prototype.toString.call(e)===`[object Object]`}function mr(e){return new Promise(t=>{Jn.setTimeout(t,e)})}function hr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:lr(e,t)}function gr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function _r(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vr=Symbol();function yr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===vr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function br(e,t){return typeof e==`function`?e(...t):!!e}var xr=new class extends Kn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Xn&&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 Sr(){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 Cr=Yn;function wr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Cr,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 Tr=wr(),Er=new class extends Kn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Xn&&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 Dr(e){return Math.min(1e3*2**e,3e4)}function Or(e){return(e??`online`)===`online`?Er.isOnline():!0}var kr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ar(e){let t=!1,n=0,r,i=Sr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new kr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>xr.isFocused()&&(e.networkMode===`always`||Er.isOnline())&&e.canRun(),u=()=>Or(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??(Xn?0:3),o=e.retryDelay??Dr,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),mr(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 jr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$n(this.gcTime)&&(this.#e=Jn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(Jn.clearTimeout(this.#e),void 0)}},Mr=class extends jr{#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=Fr(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=Fr(this.options);e.data!==void 0&&(this.setState(Pr(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=hr(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(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>nr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>tr(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:!er(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=yr(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=Ar({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof kr&&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 kr){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,...Nr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Pr(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),Tr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Or(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Pr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Fr(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 Ir=class extends Kn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Sr(),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),Rr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zr(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 nr(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&&!ur(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Br(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||nr(this.options.enabled,this.#t)!==nr(t.enabled,this.#t)||tr(this.options.staleTime,this.#t)!==tr(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||nr(this.options.enabled,this.#t)!==nr(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 Hr(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(Zn)),t}#g(){this.#b();let e=tr(this.options.staleTime,this.#t);if(Xn||this.#r.isStale||!$n(e))return;let t=er(this.#r.dataUpdatedAt,e)+1;this.#d=Jn.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,!(Xn||nr(this.options.enabled,this.#t)===!1||!$n(this.#p)||this.#p===0)&&(this.#f=Jn.setInterval(()=>{(this.options.refetchIntervalInBackground||xr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(Jn.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(Jn.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&&Rr(e,t),o=i&&Br(e,n,t,r);(a||o)&&(l={...l,...Nr(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=hr(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=hr(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:Vr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:nr(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=Sr())},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),!ur(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){Tr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Lr(e,t){return nr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function Rr(e,t){return Lr(e,t)||e.state.data!==void 0&&zr(e,t,t.refetchOnMount)}function zr(e,t,n){if(nr(t.enabled,e)!==!1&&tr(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Vr(e,t)}return!1}function Br(e,t,n,r){return(e!==t||nr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Vr(e,n)}function Vr(e,t){return nr(t.enabled,e)!==!1&&e.isStaleByTime(tr(t.staleTime,e))}function Hr(e,t){return!ur(e.getCurrentResult(),t)}function Ur(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=yr(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?_r:gr;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Gr:Wr,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:Wr(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 Wr(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 Gr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Kr(e,t){return t?Wr(e,t)!=null:!1}function qr(e,t){return!t||!e.getPreviousPageParam?!1:Gr(e,t)!=null}var Jr=class extends Ir{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:Ur()})}getOptimisticResult(e){return e.behavior=Ur(),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:Kr(t,n.data),hasPreviousPage:qr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Yr=class extends jr{#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||Xr(),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=Ar({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),Tr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Xr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Zr=class extends Kn{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 Yr({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=Qr(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=Qr(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=Qr(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=Qr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Tr.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=>ir(t,e))}findAll(e={}){return this.getAll().filter(t=>ir(e,t))}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Tr.batch(()=>Promise.all(e.map(e=>e.continue().catch(Zn))))}};function Qr(e){return e.options.scope?.id}var $r=class extends Kn{#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),ur(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&or(t.mutationKey)!==or(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??Xr();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){Tr.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 ei(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ti(e,t,n){let r=e.slice(0);return r[t]=n,r}var ni=class extends Kn{#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,Tr.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||!ur(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ei(e,n).forEach(e=>{e.destroy()}),ei(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=lr(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 Ir(this.#e,r)})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ti(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)&&Tr.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ri=class extends Kn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ar(r,t),a=this.get(i);return a||(a=new Mr({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(){Tr.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=>rr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>rr(e,t)):t}notify(e){Tr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ii=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ri,this.#t=e.mutationCache||new Zr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=xr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Er.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(tr(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=Qn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Tr.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;Tr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Tr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Tr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return Tr.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=Tr.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(Zn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Zn)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(tr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e.behavior=Ur(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e.behavior=Ur(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Er.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(or(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{sr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(or(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{sr(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||=ar(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===vr&&(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()}},ai=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})),oi=n(((e,t)=>{t.exports=ai()})),q=t(Vn(),1),J=oi(),si=q.createContext(void 0),ci=e=>{let t=q.useContext(si);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},li=({client:e,children:t})=>(q.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,J.jsx)(si.Provider,{value:e,children:t})),ui=q.createContext(!1),di=()=>q.useContext(ui);ui.Provider;function fi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pi=q.createContext(fi()),mi=()=>q.useContext(pi),hi=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},gi=e=>{q.useEffect(()=>{e.clearReset()},[e])},_i=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||br(n,[e.error,r])),vi=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))}},yi=(e,t)=>e.isLoading&&e.isFetching&&!t,bi=(e,t)=>e?.suspense&&t.isPending,xi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Si({queries:e,...t},n){let r=ci(n),i=di(),a=mi(),o=q.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{vi(e),hi(e,a)}),gi(a);let[s]=q.useState(()=>new ni(r,o,t)),[c,l,u]=s.getOptimisticResult(o,t.combine),d=!i&&t.subscribed!==!1;q.useSyncExternalStore(q.useCallback(e=>d?s.subscribe(Tr.batchCalls(e)):Zn,[s,d]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),q.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let f=c.some((e,t)=>bi(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new Ir(r,n);if(bi(n,e))return xi(n,t,a);yi(e,i)&&xi(n,t,a)}return[]}):[];if(f.length>0)throw Promise.all(f);let p=c.find((e,t)=>{let n=o[t];return n&&_i({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 Ci(e,t,n){let r=di(),i=mi(),a=ci(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=r?`isRestoring`:`optimistic`,vi(o),hi(o,i),gi(i);let s=!a.getQueryCache().get(o.queryHash),[c]=q.useState(()=>new t(a,o)),l=c.getOptimisticResult(o),u=!r&&e.subscribed!==!1;if(q.useSyncExternalStore(q.useCallback(e=>{let t=u?c.subscribe(Tr.batchCalls(e)):Zn;return c.updateResult(),t},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),q.useEffect(()=>{c.setOptions(o)},[o,c]),bi(o,l))throw xi(o,c,i);if(_i({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&&!Xn&&yi(l,r)&&(s?xi(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch(Zn).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?l:c.trackResult(l)}function wi(e,t){return Ci(e,Ir,t)}function Ti(e){return e}function Ei(e){return e}function Di(e,t){let n=ci(t),[r]=q.useState(()=>new $r(n,e));q.useEffect(()=>{r.setOptions(e)},[r,e]);let i=q.useSyncExternalStore(q.useCallback(e=>r.subscribe(Tr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=q.useCallback((e,t)=>{r.mutate(e,t).catch(Zn)},[r]);if(i.error&&br(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Oi(e,t){return Ci(e,Jr,t)}var ki=new WeakMap,Ai=new WeakMap,ji={current:[]},Mi=!1,Ni=0,Pi=new Set,Fi=new Map;function Ii(e){for(let t of e){if(ji.current.includes(t))continue;ji.current.push(t),t.recompute();let e=Ai.get(t);if(e)for(let t of e){let e=ki.get(t);e?.length&&Ii(e)}}}function Li(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function Ri(e){let t={prevVal:e.prevState,currentVal:e.state};for(let n of e.listeners)n(t)}function zi(e){if(Ni>0&&!Fi.has(e)&&Fi.set(e,e.prevState),Pi.add(e),!(Ni>0)&&!Mi)try{for(Mi=!0;Pi.size>0;){let e=Array.from(Pi);Pi.clear();for(let t of e)t.prevState=Fi.get(t)??t.prevState,Li(t);for(let t of e){let e=ki.get(t);e&&(ji.current.push(t),Ii(e))}for(let t of e){let e=ki.get(t);if(e)for(let t of e)Ri(t)}}}finally{Mi=!1,ji.current=[],Fi.clear()}}function Bi(e){Ni++;try{e()}finally{if(Ni--,Ni===0){let e=Pi.values().next().value;e&&zi(e)}}}function Vi(e){return typeof e==`function`}var Hi=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):Vi(e)?this.state=e(this.prevState):this.state=e,(n=(t=this.options)?.onUpdate)==null||n.call(t),zi(this)}},Ui=`__TSR_index`,Wi=`popstate`,Gi=`beforeunload`;function Ki(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=Yi(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[Ui];i=qi(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[Ui];i=qi(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[Ui]!==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 qi(e,t){t||={};let n=Xi();return{...t,key:n,__TSR_key:n,[Ui]:e}}function Ji(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??(()=>Yi(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Xi();t.history.replaceState({[Ui]: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=Yi(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[Ui]-l.state[Ui],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=Ki({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(Gi,S,{capture:!0}),t.removeEventListener(Wi,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Gi,S,{capture:!0}),t.addEventListener(Wi,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 Yi(e,t){let n=e.indexOf(`#`),r=e.indexOf(`?`),i=Xi();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||{[Ui]:0,key:i,__TSR_key:i}}}function Xi(){return(Math.random()+1).toString(36).substring(7)}function Zi(e){return e[e.length-1]}function Qi(e){return typeof e==`function`}function $i(e,t){return Qi(e)?e(t):e}var ea=Object.prototype.hasOwnProperty;function ta(e,t){if(e===t)return e;let n=t,r=aa(e)&&aa(n);if(!r&&!(ra(e)&&ra(n)))return n;let i=r?e:na(e);if(!i)return n;let a=r?n:na(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:ea.call(e,i))&&l++;continue}if(s===null||u===null||typeof s!=`object`||typeof u!=`object`){c[i]=u;continue}let d=ta(s,u);c[i]=d,d===s&&l++}return o===s&&l===o?e:c}function na(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 ra(e){if(!ia(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ia(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ia(e){return Object.prototype.toString.call(e)===`[object Object]`}function aa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oa(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(!oa(e[r],t[r],n))return!1;return!0}if(ra(e)&&ra(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!oa(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||!oa(e[o],t[o],n)))return!1;return i===a}return!1}function sa(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 ca(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function la(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function ua(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+=la(e.slice(r,a.index))+a[0],r=n.lastIndex;return i+la(r?e.slice(r):e)}var da=!0,fa=`Invariant failed`;function pa(e,t){if(!e){if(da)throw Error(fa);var n=typeof t==`function`?t():t,r=n?`${fa}: ${n}`:fa;throw Error(r)}}function ma(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 ha=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,ga=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,_a=/^([^{]*)\{\$\}([^}]*)$/;function va(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(_a);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(ga);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(ha);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 ya(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=va(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=Sa(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=Sa(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=Ca(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=Ca(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=Ca(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)ya(e,t,r,s,i,a,o)}function ba(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 xa(e){if(e.static)for(let t of e.static.values())xa(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())xa(t);if(e.dynamic?.length){e.dynamic.sort(ba);for(let t of e.dynamic)xa(t)}if(e.optional?.length){e.optional.sort(ba);for(let t of e.optional)xa(t)}if(e.wildcard?.length){e.wildcard.sort(ba);for(let t of e.wildcard)xa(t)}}function Sa(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 Ca(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 wa(e,t){let n=Sa(`/`),r=new Uint16Array(6);for(let t of e)ya(!1,r,t,1,n,0);xa(n),t.masksTree=n,t.flatCache=ma(1e3)}function Ta(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=Aa(e,t.masksTree);return t.flatCache.set(e,r),r}function Ea(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Sa(`/`),ya(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Aa(r,o,n)}function Da(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=Aa(e,t.segmentTree,n);return a&&(a.branch=Ma(a.route)),t.matchCache.set(r,a),a}function Oa(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ka(e,t=!1,n){let r=Sa(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return ya(t,i,e,1,r,0,e=>{if(n?.(e,s),pa(!(e.id in a),`Duplicate routes found with id: ${String(e.id)}`),a[e.id]=e,s!==0&&e.path){let t=Oa(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),xa(r),{processedTree:{segmentTree:r,singleCache:ma(1e3),matchCache:ma(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Aa(e,t,n=!1){let r=e.split(`/`),i=Pa(e,r,t,n);if(!i)return null;let a=ja(e,r,i),o=`**`in i;return o&&(a[`**`]=i[`**`]),{route:o?i.node.notFound??i.node.route:i.node.route,params:a}}function ja(e,t,n){let r=Na(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 Ma(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Na(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Pa(e,t,n,r){let i=!Zi(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&&Fa(l,e)&&(l=e);let g=i===o;if(g){if(n.route&&(!a||n.isIndex)&&(Fa(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&&Fa(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 Fa(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 Ia(e){return La(e.filter(e=>e!==void 0).join(`/`))}function La(e){return e.replace(/\/{2,}/g,`/`)}function Ra(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function za(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Ba(e){return za(Ra(e))}function Va(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ha(e,t,n){return Va(e,n)===Va(t,n)}function Ua({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&&Zi(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&&(Zi(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=va(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=La(l);let u=l||`/`;return o&&r&&r.set(o,u),u}function Wa(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?encodeURI(r):Ka(r,n):r}function Ga({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=va(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=Wa(`_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=Wa(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=Wa(r,t,n)??``;c+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(c+=`/`),{usedParams:i,interpolatedPath:c||`/`,isMissingParams:r}}function Ka(e,t){let n=encodeURIComponent(e);if(t)for(let[e,r]of t)n=n.replaceAll(e,r);return n}function qa(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Ja(e){return!!e?.isNotFound}function Ya(){try{if(typeof window<`u`&&typeof window.sessionStorage==`object`)return window.sessionStorage}catch{}}var Xa=`tsr-scroll-restoration-v1_3`,Za=(e,t)=>{let n;return(...r)=>{n||=setTimeout(()=>{e(...r),n=null},t)}};function Qa(){let e=Ya();if(!e)return null;let t=e.getItem(Xa),n=t?JSON.parse(t):{};return{state:n,set:t=>(n=$i(t,n)||n,e.setItem(Xa,JSON.stringify(n)))}}var $a=Qa(),eo=e=>e.state.__TSR_key||e.href;function to(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 no=!1;function ro({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];no=!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)}}no=!1}function io(e,t){if(!$a&&!e.isServer||((t??e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!$a))return;e.isScrollRestorationSetup=!0,no=!1;let n=e.options.getScrollRestorationKey||eo;window.history.scrollRestoration=`manual`,typeof document<`u`&&document.addEventListener(`scroll`,Za(t=>{if(no||!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}"]`:to(t.target)}let i=n(e.state.location);$a.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})||(ro({storageKey:Xa,key:r,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&$a.set(e=>(e[r]||={},e)))})}function ao(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 oo(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 so(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function co(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=so(r):Array.isArray(t)?t.push(so(r)):n[e]=[t,so(r)]}return n}var lo=fo(JSON.parse),uo=po(JSON.stringify,JSON.parse);function fo(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=co(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function po(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=oo(e,r);return t?`?${t}`:``}}var mo=`__root__`;function ho(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 go(e){return e instanceof Response&&!!e.options}var _o=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},vo=(e,t)=>!!(e.preload&&!e.router.state.matches.some(e=>e.id===t)),yo=(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),pa(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);pa(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,yo(e,t))},bo=(e,t,n)=>{if(!(!go(n)&&!Ja(n))){if(go(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=go(n)?`redirected`:`notFound`;t._nonReactive.error=n,e.updateMatch(t.id,e=>({...e,status:r,isFetching:!1,error:n})),Ja(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw go(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(yo(e,n),n)}},xo=(e,t)=>{let n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},So=(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,bo(e,e.router.getMatch(i),n);try{o.options.onError?.(n)}catch(t){n=t,bo(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}))},Co=(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===mo;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:Po(l,i.searchError),params:Po(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:Po(e.search,e.searchError),params:Po(e.params,e.paramsError),ssr:e.ssr}))},f=r.options.ssr(d);if(ca(f))return f.then(e=>{i.ssr=s(e??c)});i.ssr=s(f??c)},wo=(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&&!vo(e,t)&&(n.options.loader||n.options.beforeLoad||Fo(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{_o(e)},i);r._nonReactive.pendingTimeout=t}},To=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;wo(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&bo(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Eo=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=sa(()=>{a?.resolve()});let{paramsError:o,searchError:s}=i;o&&So(e,n,o,`PARSE_PARAMS`),s&&So(e,n,s,`VALIDATE_SEARCH`),wo(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){Bi(()=>{f(),p()});return}i._nonReactive.beforeLoadPromise=sa();let{search:m,params:h,cause:g}=i,_=vo(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){Bi(()=>{f(),p()});return}(go(r)||Ja(r))&&(f(),So(e,n,r,`BEFORE_LOAD`)),Bi(()=>{f(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r,context:{...e.context,...r}})),p()})},b;try{if(b=r.options.beforeLoad(v),ca(b))return f(),b.catch(t=>{So(e,n,t,`BEFORE_LOAD`)}).then(y)}catch(t){f(),So(e,n,t,`BEFORE_LOAD`)}y(b)},Do=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>{if(e.router.isServer){let r=Co(e,n,t,i);if(ca(r))return r.then(s)}return s()},o=()=>Eo(e,n,t,i),s=()=>{if(xo(e,n))return;let t=To(e,n,i);return ca(t)?t.then(o):o()};return a()},Oo=(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}))},ko=(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=vo(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}},Ao=async(e,t,n,r)=>{try{let i=e.router.getMatch(t);try{(!e.router.isServer||i.ssr===!0)&&No(r);let a=r.options.loader?.(ko(e,t,n,r)),o=r.options.loader&&ca(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;bo(e,e.router.getMatch(t),n),n!==void 0&&e.updateMatch(t,e=>({...e,loaderData:n}))}r._lazyPromise&&await r._lazyPromise;let s=Oo(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,Ja(n)&&await r.options.notFoundComponent?.preload?.(),bo(e,e.router.getMatch(t),n);try{r.options.onError?.(n)}catch(n){a=n,bo(e,e.router.getMatch(t),n)}let s=Oo(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=Oo(e,t,r);if(n){let r=await n;e.updateMatch(t,e=>({...e,...r}))}i._nonReactive.loaderPromise=void 0}bo(e,i,n)}},jo=async(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=!1,a=!1,o=e.router.looseRoutesById[r];if(xo(e,n)){if(e.router.isServer){let t=Oo(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&&bo(e,t,i)}else{let s=Date.now()-r.updatedAt,c=vo(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(ko(e,n,t,o)):u,f=!!c&&!e.router.state.matches.some(e=>e.id===n),p=e.router.getMatch(n);p._nonReactive.loaderPromise=sa(),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 Ao(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){go(t)&&await e.router.navigate(t.options)}})();else if(m!==`success`||i&&e.sync)await Ao(e,n,t,o);else{let t=Oo(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 Mo(e){let t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(e=>e._forcePending)&&_o(t);try{for(let e=0;e<t.matches.length;e++){let n=Do(t,e);ca(n)&&await n}let e=t.firstBadMatchIndex??t.matches.length;for(let n=0;n<e;n++)t.matchPromises.push(jo(t,n));await Promise.all(t.matchPromises);let n=_o(t);ca(n)&&await n}catch(e){if(Ja(e)&&!t.preload){let n=_o(t);throw ca(n)&&await n,e}if(go(e))throw e}return t.matches}async function No(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 Io){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 Po(e,t){return t?{status:`error`,error:t}:{status:`success`,value:e}}function Fo(e){for(let t of Io)if(e.options[t]?.preload)return!0;return!1}var Io=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Lo(e){return{input:({url:t})=>{for(let n of e)t=zo(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=Bo(e[n],t);return t}}}function Ro(e){let t=Ba(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=Ia([`/`,t,e.pathname]),e)}}function zo(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 Bo(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 Vo(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 Ho=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=Ji())),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 Hi(Go(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(e=>![`redirected`].includes(e.status))}}}),io(this));let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[];Ba(o)!==``&&e.push(Ro({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:Lo(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}=ka(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});this.options.routeMasks&&wa(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=zo(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:ua(c),searchStr:o,search:ta(t?.search,a),hash:l.split(`#`).reverse()[0]??``,state:ta(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=ma(1e3),this.resolvePathWithBase=(e,t)=>Ua({base:e,to:La(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=>qo({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=Zi(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,$i(t.params,s)),u=Ga({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:ua(Ga({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,Ko(t.options.validateSearch,{...e,...p}))}catch{}}),p=e}p=Jo({search:p,dest:t,destRoutes:d,_includeValidateSearch:e._includeValidateSearch}),p=ta(o,p);let m=this.options.stringifySearch(p),h=t.hash===!0?n.hash:t.hash?$i(t.hash,n.hash):void 0,g=h?`#${h}`:``,_=t.state===!0?n.state:t.state?$i(t.state,n.state):{};_=ta(n.state,_);let v=`${f}${m}${g}`,y=new URL(v,this.origin),b=Bo(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=Ta(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=oa(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},i=za(this.latestLocation.href)===za(n.href),a=this.commitLocationPromise;if(this.commitLocationPromise=sa(()=>{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=Yi(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(Ba(t(this.latestLocation.href))!==Ba(t(e.href))){let t=e.url;throw this.origin&&t.startsWith(this.origin)&&(t=t.replace(this.origin,``)||`/`),ho({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`,...Vo({resolvedLocation:n,location:t})}),this.emit({type:`onBeforeLoad`,...Vo({resolvedLocation:n,location:t})}),await Mo({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=[];Bi(()=>{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){go(e)?(t=e,this.isServer||this.navigate({...t.options,replace:!0,ignoreBlocker:!0})):Ja(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(Vo({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=No,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)]);Bi(()=>{n.forEach(e=>{i.has(e.id)||this.__store.setState(t=>({...t,cachedMatches:[...t.cachedMatches,e]}))})});try{return n=await Mo({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(go(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});Ja(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=Ea(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!oa(a.params,e.params,{partial:!0})?!1:t?.includeSearch??!0?oa(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??uo,parseSearch:e.parseSearch??lo}),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[`**`]:za(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 mo}})(),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=Ko(n.options.validateSearch,{...r})??void 0;return[{...r,...e},{...i,...e},void 0]}catch(e){let n=e;if(e instanceof Uo||(n=new Uo(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}=Ga({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=Ja(e)||go(e)?e:new Wo(e.message,{cause:e}),t?.throwOnError)throw b}}Object.assign(i,y);let x=v?`stay`:`enter`,S;if(_)S={..._,cause:x,params:v?ta(v.params,i):i,_strictParams:y,search:ta(v?v.search:_.search,o),_strictSearch:u};else{let e=n.options.loader||n.options.beforeLoad||n.lazyFn||Fo(n)?`pending`:`success`;S={id:g,index:r,routeId:n.id,params:v?ta(v.params,i):i,_strictParams:y,pathname:m,updatedAt:Date.now(),search:v?ta(v.search,o):o,_strictSearch:u,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:b,__routeContext:void 0,_nonReactive:{loadPromise:sa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:x,loaderDeps:v?ta(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}},Uo=class extends Error{},Wo=class extends Error{};function Go(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ko(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Uo(`Async validation not supported`);if(n.issues)throw new Uo(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 qo({pathname:e,routesById:t,processedTree:n}){let r={},i=za(e),a,o=Da(i,n,!0);return o&&(a=o.route,Object.assign(r,o.params)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Jo({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,...Ko(t.options.validateSearch,r)??void 0}}catch{return r}}),e.concat(n)},[])??[];i.push(({search:e})=>t.search?t.search===!0?e:$i(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 Yo=`Error preloading route! ☝️`,Xo=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=mo:this.parentRoute||pa(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let r=n?mo:t?.path;r&&r!==`/`&&(r=Ra(r));let i=t?.id||r,a=n?mo:Ia([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ia([`/`,a]));let o=a===`__root__`?`/`:Ia([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}},Zo=class{constructor({id:e}){this.notFound=e=>qa({routeId:this.id,...e}),this.id=e}},Qo=class extends Xo{constructor(e){super(e)}};function $o(e){let t=e.errorComponent??ts;return(0,J.jsx)(es,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?q.createElement(t,{error:n,reset:r}):e.children})}var es=class extends q.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 ts({error:e}){let[t,n]=q.useState(!1);return(0,J.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,J.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,J.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,J.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,J.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,J.jsx)(`div`,{children:(0,J.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,J.jsx)(`code`,{children:e.message}):null})}):null]})}function ns({children:e,fallback:t=null}){return rs()?(0,J.jsx)(q.Fragment,{children:e}):(0,J.jsx)(q.Fragment,{children:t})}function rs(){return q.useSyncExternalStore(is,()=>!0,()=>!1)}function is(){return()=>{}}var as=!0;function os(e,t){if(!as){if(e)return;var n=`Warning: `+t;typeof console<`u`&&console.warn(n);try{throw Error(n)}catch{}}}var ss=n((e=>{var t=Vn();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})),cs=n(((e,t)=>{t.exports=ss()})),ls=n((e=>{var t=Vn(),n=cs();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}})),us=n(((e,t)=>{t.exports=ls()}))();function ds(e,t=e=>e,n={}){let r=n.equal??fs;return(0,us.useSyncExternalStoreWithSelector)(e.subscribe,()=>e.state,()=>e.state,t,r)}function fs(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=ps(e);if(n.length!==ps(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 ps(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var ms=q.createContext(null);function hs(){return typeof document>`u`?ms:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ms,ms)}function gs(e){let t=q.useContext(hs());return os(!((e?.warn??!0)&&!t),`useRouter must be used inside a <RouterProvider> component!`),t}function _s(e){let t=gs({warn:e?.router===void 0}),n=e?.router||t,r=(0,q.useRef)(void 0);return ds(n.__store,t=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){let n=ta(r.current,e.select(t));return r.current=n,n}return e.select(t)}return t})}var vs=q.createContext(void 0),ys=q.createContext(void 0);function bs(e){let t=q.useContext(e.from?ys:vs);return _s({select:n=>{let r=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(pa(!((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 xs(e){return bs({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ss(e){let{select:t,...n}=e;return bs({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Cs(e){return bs({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 ws(e){return bs({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var Ts=typeof window<`u`?q.useLayoutEffect:q.useEffect;function Es(e){let t=q.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Ds(e,t,n={},r={}){q.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 Os(e){let t=q.useRef(null);return q.useImperativeHandle(e,()=>t.current,[]),t}function ks(e){let t=gs();return q.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var As=t(Un(),1);function js(e,t){let n=gs(),[r,i]=q.useState(!1),a=q.useRef(!1),o=Os(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=_s({select:e=>e.location.search,structuralSharing:!0}),B=e.from,ee=q.useMemo(()=>({...e,from:B}),[n,z,B,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),V=q.useMemo(()=>n.buildLocation({...ee}),[n,ee]),te=q.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=q.useMemo(()=>{if(te?.external)return te.href;try{return new URL(u),u}catch{}},[u,te]),U=e.reloadDocument||H?!1:d??n.options.defaultPreload,W=f??n.options.defaultPreloadDelay??0,ne=_s({select:e=>{if(H)return!1;if(l?.exact){if(!Ha(e.location.pathname,V.pathname,n.basepath))return!1}else{let t=Va(e.location.pathname,n.basepath),r=Va(V.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(l?.includeSearch??!0)&&!oa(e.location.search,V.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?e.location.hash===V.hash:!0}}),re=q.useCallback(()=>{n.preloadRoute({...ee}).catch(e=>{console.warn(e),console.warn(Yo)})},[n,ee]);Ds(o,q.useCallback(e=>{e?.isIntersecting&&re()},[re]),Rs,{disabled:!!b||U!==`viewport`}),q.useEffect(()=>{a.current||!b&&U===`render`&&(re(),a.current=!0)},[b,re,U]);let ie=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Vs(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,As.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 ae=e=>{b||U&&re()},oe=ae,se=e=>{if(!(b||!U))if(!W)re();else{let t=e.target;if(Ls.has(t))return;let n=setTimeout(()=>{Ls.delete(t),re()},W);Ls.set(t,n)}},ce=e=>{if(b||!U||!W)return;let t=e.target,n=Ls.get(t);n&&(clearTimeout(n),Ls.delete(t))},le=ne?$i(s,{})??Ns:Ms,ue=ne?Ms:$i(c,{})??Ms,de=[S,le.className,ue.className].filter(Boolean).join(` `),fe=(x||le.style||ue.style)&&{...x,...le.style,...ue.style};return{...R,...le,...ue,href:te?.href,ref:o,onClick:zs([C,ie]),onFocus:zs([w,ae]),onMouseEnter:zs([T,se]),onMouseLeave:zs([E,ce]),onTouchStart:zs([D,oe]),disabled:!!b,target:y,...fe&&{style:fe},...de&&{className:de},...b&&Ps,...ne&&Fs,...r&&Is}}var Ms={},Ns={className:`active`},Ps={role:`link`,"aria-disabled":!0},Fs={"data-status":`active`,"aria-current":`page`},Is={"data-transitioning":`transitioning`},Ls=new WeakMap,Rs={rootMargin:`100px`},zs=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}},Bs=q.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,ref:a,...o}=js(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;return n===void 0&&delete o.disabled,q.createElement(n||`a`,{...o,ref:a},s)});function Vs(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Hs(e){return new Us({id:e})}var Us=class extends Zo{constructor({id:e}){super({id:e}),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id,strict:!1}),this.useLoaderData=e=>xs({...e,from:this.id,strict:!1}),this.useNavigate=()=>ks({from:gs().routesById[this.id].fullPath}),this.notFound=e=>qa({routeId:this.id,...e}),this.Link=q.forwardRef((e,t)=>{let n=gs().routesById[this.id].fullPath;return(0,J.jsx)(Bs,{ref:t,from:n,...e})})}},Ws=class extends Xo{constructor(e){super(e),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id}),this.useLoaderData=e=>xs({...e,from:this.id}),this.useNavigate=()=>ks({from:this.fullPath}),this.Link=q.forwardRef((e,t)=>(0,J.jsx)(Bs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function Gs(e){return new Ws(e)}var Ks=class extends Qo{constructor(e){super(e),this.useMatch=e=>bs({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ss({...e,from:this.id}),this.useLoaderData=e=>xs({...e,from:this.id}),this.useNavigate=()=>ks({from:this.fullPath}),this.Link=q.forwardRef((e,t)=>(0,J.jsx)(Bs,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function qs(e){return new Ks(e)}function Js(e){return typeof e==`object`?new Ys(e,{silent:!0}).createRoute(e):new Ys(e,{silent:!0}).createRoute}var Ys=class{constructor(e,t){this.path=e,this.createRoute=e=>{os(this.silent,`FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.`);let t=Gs(e);return t.isRoot=!1,t},this.silent=t?.silent}},Xs=class{constructor(e){this.useMatch=e=>bs({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>bs({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>ws({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>Cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>Ss({...e,from:this.options.id}),this.useLoaderData=e=>xs({...e,from:this.options.id}),this.useNavigate=()=>ks({from:gs().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function Zs(e){return typeof e==`object`?new Xs(e):t=>new Xs({id:e,...t})}function Qs(){let e=gs(),t=q.useRef({router:e,mounted:!1}),[n,r]=q.useState(!1),{hasPendingMatches:i,isLoading:a}=_s({select:e=>({isLoading:e.isLoading,hasPendingMatches:e.matches.some(e=>e.status===`pending`)}),structuralSharing:!0}),o=Es(a),s=a||n||i,c=Es(s),l=a||i,u=Es(l);return e.startTransition=e=>{r(!0),q.startTransition(()=>{e(),r(!1)})},q.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 za(e.latestLocation.href)!==za(n.href)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ts(()=>{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]),Ts(()=>{o&&!a&&e.emit({type:`onLoad`,...Vo(e.state)})},[o,e,a]),Ts(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Vo(e.state)})},[l,u,e]),Ts(()=>{if(c&&!s){let t=Vo(e.state);e.emit({type:`onResolved`,...t}),e.__store.setState(e=>({...e,status:`idle`,resolvedLocation:e.location})),t.hrefChanged&&ao(e)}},[s,c,e]),null}function $s(e){let t=_s({select:e=>`not-found-${e.location.pathname}-${e.status}`});return(0,J.jsx)($o,{getResetKey:()=>t,onCatch:(t,n)=>{if(Ja(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Ja(t))return e.fallback?.(t);throw t},children:e.children})}function ec(){return(0,J.jsx)(`p`,{children:`Not Found`})}function tc(e){return(0,J.jsx)(J.Fragment,{children:e.children})}function nc(e,t,n){return t.options.notFoundComponent?(0,J.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,J.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,J.jsx)(ec,{})}function rc({children:e}){let t=gs();return t.isServer?(0,J.jsx)(`script`,{nonce:t.options.ssr?.nonce,className:`$tsr`,dangerouslySetInnerHTML:{__html:e+`;typeof $_TSR !== "undefined" && $_TSR.c()`}}):null}function ic(){let e=gs();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return null;let t=(e.options.getScrollRestorationKey||eo)(e.latestLocation),n=t===eo(e.latestLocation)?void 0:t,r={storageKey:Xa,shouldScrollRestoration:!0};return n&&(r.key=n),(0,J.jsx)(rc,{children:`(${ro.toString()})(${JSON.stringify(r)})`})}var ac=q.memo(function({matchId:e}){let t=gs(),n=_s({select:t=>{let n=t.matches.find(t=>t.id===e);return pa(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,J.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))?q.Suspense:tc,d=o?$o:tc,f=c?$s:tc,p=_s({select:e=>e.loadedAt}),m=_s({select:t=>{let n=t.matches.findIndex(t=>t.id===e);return t.matches[n-1]?.routeId}});return(0,J.jsxs)(r.isRoot?r.options.shellComponent??tc:tc,{children:[(0,J.jsx)(vs.Provider,{value:e,children:(0,J.jsx)(u,{fallback:a,children:(0,J.jsx)(d,{getResetKey:()=>p,errorComponent:o||ts,onCatch:(t,n)=>{if(Ja(t))throw t;os(!1,`Error in route match: ${e}`),s?.(t,n)},children:(0,J.jsx)(f,{fallback:e=>{if(!c||e.routeId&&e.routeId!==n.routeId||!e.routeId&&!r.isRoot)throw e;return q.createElement(c,e)},children:l||n._displayPending?(0,J.jsx)(ns,{fallback:a,children:(0,J.jsx)(sc,{matchId:e})}):(0,J.jsx)(sc,{matchId:e})})})})}),m===`__root__`&&t.options.scrollRestoration?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(oc,{}),(0,J.jsx)(ic,{})]}):null]})});function oc(){let e=gs(),t=q.useRef(void 0);return(0,J.jsx)(`script`,{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:`onRendered`,...Vo(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}var sc=q.memo(function({matchId:e}){let t=gs(),{match:n,key:r,routeId:i}=_s({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=q.useMemo(()=>{let e=a.options.component??t.options.defaultComponent;return e?(0,J.jsx)(e,{},r):(0,J.jsx)(cc,{})},[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=sa();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 pa(Ja(n.error),`Expected a notFound error`),nc(t,a,n.error);if(n.status===`redirected`)throw pa(go(n.error),`Expected a redirect error`),t.getMatch(n.id)?._nonReactive.loadPromise;if(n.status===`error`){if(t.isServer)return(0,J.jsx)((a.options.errorComponent??t.options.defaultErrorComponent)||ts,{error:n.error,reset:void 0,info:{componentStack:``}});throw n.error}return o}),cc=q.memo(function(){let e=gs(),t=q.useContext(vs),n=_s({select:e=>e.matches.find(e=>e.id===t)?.routeId}),r=e.routesById[n],i=_s({select:e=>{let n=e.matches.find(e=>e.id===t);return pa(n,`Could not find parent match for matchId "${t}"`),n.globalNotFound}}),a=_s({select:e=>{let n=e.matches;return n[n.findIndex(e=>e.id===t)+1]?.id}}),o=e.options.defaultPendingComponent?(0,J.jsx)(e.options.defaultPendingComponent,{}):null;if(i)return nc(e,r,void 0);if(!a)return null;let s=(0,J.jsx)(ac,{matchId:a});return n===`__root__`?(0,J.jsx)(q.Suspense,{fallback:o,children:s}):s});function lc(){let e=gs(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,J.jsx)(t,{}):null,r=(0,J.jsxs)(e.isServer||typeof document<`u`&&e.ssr?tc:q.Suspense,{fallback:n,children:[!e.isServer&&(0,J.jsx)(Qs,{}),(0,J.jsx)(uc,{})]});return e.options.InnerWrap?(0,J.jsx)(e.options.InnerWrap,{children:r}):r}function uc(){let e=gs(),t=_s({select:e=>e.matches[0]?.id}),n=_s({select:e=>e.loadedAt}),r=t?(0,J.jsx)(ac,{matchId:t}):null;return(0,J.jsx)(vs.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,J.jsx)($o,{getResetKey:()=>n,errorComponent:ts,onCatch:e=>{os(!1,`The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!`),os(!1,e.message||e.toString())},children:r})})}var dc=e=>new fc(e),fc=class extends Ho{constructor(e){super(e)}};typeof globalThis<`u`?(globalThis.createFileRoute=Js,globalThis.createLazyFileRoute=Zs):typeof window<`u`&&(window.createFileRoute=Js,window.createLazyFileRoute=Zs);function pc({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,J.jsx)(hs().Provider,{value:e,children:t});return e.options.Wrap?(0,J.jsx)(e.options.Wrap,{children:r}):r}function mc({router:e,...t}){return(0,J.jsx)(pc,{router:e,...t,children:(0,J.jsx)(lc,{})})}function hc(e){return _s({select:t=>e?.select?e.select(t.location):t.location})}var gc=Gn(),_c=null;typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0&&(_c=!0,console.log(`[static-mode] Detected static export mode (via flag)`));async function vc(){return _c===null&&(_c=typeof window<`u`&&window.__OPENSPEC_STATIC_MODE__===!0),_c}function yc(){return _c===!0}function bc(e){_c=e}var xc=null;function Sc(){return xc===null?typeof window<`u`&&window.__OPENSPEC_BASE_PATH__||`./`:xc}function Cc(){return typeof window<`u`&&window.__INITIAL_DATA__?window.__INITIAL_DATA__:null}function wc(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 Tc(){return document.documentElement.classList.contains(`dark`)}function Ec(){return!1}function Dc(){return(0,q.useSyncExternalStore)(wc,Tc,Ec)}var Oc=/^\/versions\/[^/]+(?:\/|$)/;function kc(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 Ac(e,t){return new URLSearchParams(e).get(t)?.trim()||null}function jc(e){return Oc.test(e)}function Mc(e){let t=jc(e.pathname);return{hosted:t,apiBaseUrl:kc(Ac(e.search,`api`)??``),sessionId:t?Ac(e.search,`session`):null}}function Nc(e,t){let n=Mc(t);return n.hosted&&n.sessionId?`hosted-session:${n.sessionId}:${e}`:e}function Pc(){return typeof window<`u`&&window.location!==void 0}function Fc(){return Pc()?Mc(window.location):{hosted:!1,apiBaseUrl:null,sessionId:null}}function Ic(){return Pc()?Fc().apiBaseUrl??``:``}function Lc(e){if(!Pc())return``;let t=Ic();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 Rc(){return Lc(`/trpc`)}function zc(){return Lc(`/ws/pty`)}function Bc(){let e=Ic();return e?`${e}/trpc`:`/trpc`}function Vc(){let e=Ic();return e?`${e}/api/health`:`/api/health`}var Hc=`modulepreload`,Uc=function(e){return`/`+e},Wc={},Y=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=Uc(t,n),t in Wc)return;Wc[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`:Hc,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)})},Gc=[`/dashboard`,`/config`,`/git`,`/specs`,`/changes`,`/archive`,`/settings`,`/terminal`],Kc=[`/dashboard`,`/config`,`/specs`,`/changes`,`/archive`,`/settings`],qc=yc()?[]:[`/git`,`/terminal`],Jc=[`/search`,`/opsx-new`,`/opsx-propose`,`/opsx-verify`,`/opsx-compose`];function Yc(){return Nc(`nav-layout`,window.location)}function Xc(e){return Nc(`nav-layout:${encodeURIComponent(e)}`,window.location)}var Zc=300;function Qc(e){return Gc.includes(e)}function $c(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&Qc(e)):[]}function el(e){if(typeof e!=`object`||!e)return null;let t=e;return!Array.isArray(t.mainTabs)||!Array.isArray(t.bottomTabs)?null:{mainTabs:$c(t.mainTabs),bottomTabs:$c(t.bottomTabs),updatedAt:typeof t.updatedAt==`number`?t.updatedAt:0}}function tl(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 nl(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:tl(t,i)}}function rl(e){let t=e.trim();if(!t||t===`./`||t===`.`)return`/`;let n=t.startsWith(`/`)?t:`/${t}`;return(n.endsWith(`/`)?n:`${n}/`).replace(/\/+/g,`/`)}function il(e,t){return t===`/`?e||`/`:e===t.slice(0,-1)?`/`:e.startsWith(t)?e.slice(t.length-1)||`/`:e||`/`}function al(e,t){if(t===`/`)return e||`/`;let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`?t.slice(0,-1)||`/`:`${t.slice(0,-1)}${n}`}function ol(e){if(typeof window>`u`)return e;let t=new URL(e,window.location.origin),n=rl(Sc());return t.pathname=il(t.pathname,n),`${t.pathname}${t.search}${t.hash}`}function sl(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 cl(e){for(let t of Gc)if(e===t||e.startsWith(t+`/`))return t;return null}function ll(e,t){if(t===`pop`)return null;let n=t===`main`?e.mainLocation:e.bottomLocation,r=t===`main`?e.mainTabs:e.bottomTabs,i=cl(n.pathname);return i&&r.includes(i)?i:null}function ul(e){return Jc.some(t=>e===t||e.startsWith(t+`/`))}function dl(e,t){if(ul(t))return`pop`;let n=cl(t);return n&&e.bottomTabs.includes(n)?`bottom`:`main`}function fl(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 Gc)t.has(e)||(qc.includes(e)?r.push(e):n.push(e));return{mainTabs:n,bottomTabs:r}}function pl(e,t){if(t.length===0)return nl(`/`);let n=cl(e.pathname);return n&&!t.includes(n)?nl(`/`):e}function ml(e,t){if(t.length===0)return nl(`/`);if(e.pathname===`/`)return nl(`/`,e.state);let n=cl(e.pathname);return!n||!t.includes(n)?nl(`/`):e}function hl(e){return e.pathname===`/`?nl(`/`,e.state):ul(e.pathname)?e:nl(`/`)}function gl(e){let t=fl({mainTabs:e.mainTabs,bottomTabs:e.bottomTabs});return{...e,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,mainLocation:pl(e.mainLocation,t.mainTabs),bottomLocation:ml(e.bottomLocation,t.bottomTabs),popLocation:hl(e.popLocation)}}function _l(e,t){let n=new URL(e.href),r=rl(Sc());n.pathname=il(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=nl(`${n.pathname}${n.search}${n.hash}`,o?.main),c=nl(i??`/`,o?.bottom),l=nl(a??`/`,o?.pop);if(!i&&!a){let e=dl(t,s.pathname);e===`bottom`?(c=s,s=nl(`/`,o?.main)):e===`pop`&&(l=s,s=nl(`/`,o?.main))}return{main:pl(s,t.mainTabs),bottom:ml(c,t.bottomTabs),pop:hl(l)}}function vl(e){let t=new URL(window.location.href),n=new URL(e.mainLocation.href,window.location.origin),r=rl(Sc());return n.pathname=al(n.pathname,r),sl(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 yl(e,t){return e.length===t.length?e.every((e,n)=>e===t[n]):!1}function bl(){return{mainTabs:[...Kc],bottomTabs:[...qc],updatedAt:0,mainLocation:nl(`/dashboard`),bottomLocation:nl(`/`),popLocation:nl(`/`)}}function xl(){try{let e=localStorage.getItem(Yc());return e?el(JSON.parse(e)):null}catch{return null}}function Sl(e){try{let t=localStorage.getItem(e);return t?el(JSON.parse(t)):null}catch{return null}}function Cl(e,t=Yc()){try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function wl(e){let t=cl(e.pathname);return!t||e.pathname===t?e:t===`/changes`||t===`/specs`||t===`/archive`?nl(t,e.state):e}var Tl=[({prevState:e,nextState:t,event:n})=>{if(n.type!==`MOVE_TAB`)return t;let r=e.bottomTabs.includes(n.tabId)?`bottom`:`main`;if(ll(e,r)!==n.tabId)return t;let i=r===`main`?e.mainLocation:e.bottomLocation,a=nl(i.href,i.state);return n.targetArea===`main`?{...t,mainLocation:a}:{...t,bottomLocation:a}},({nextState:e})=>e.mainTabs.length===0||ll(e,`main`)!=null?e:{...e,mainLocation:nl(e.mainTabs[0])}];function El(e,t,n){let r=t;for(let t of Tl)r=t({prevState:e,nextState:r,event:n});return r}function Dl(e,t){switch(t.type){case`NAVIGATE`:{let n=t.sourceArea===`pop`?`pop`:dl(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 cl((n===`main`?e.mainLocation:e.bottomLocation).pathname)===t.tabId&&(n===`main`?s=nl(`/`):c=nl(`/`)),{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 yl(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?cl(e.bottomLocation.pathname)===t.tabId?{nextState:{...e,bottomLocation:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}:cl(e.mainLocation.pathname)===t.tabId?{nextState:{...e,mainLocation:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`}:{nextState:e,changed:!1,notify:[],persist:`none`}}case`ACTIVATE_BOTTOM`:return dl(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:nl(`/`)},changed:!0,urlAction:`REPLACE`,notify:[],persist:`none`};case`ACTIVATE_POP`:return dl(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:nl(`/`)},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=fl(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 Ol(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 kl(e,t,n){let r=[...e];for(let e of[`main`,`bottom`,`pop`])Ol(t,n,e)&&(r.some(t=>t.area===e)||r.push({area:e,type:`REPLACE`}));return r}var Al=new class{mainHistory=null;bottomHistory=null;popHistory=null;state=bl();listeners=new Set;snapshotCache=null;persistTimer=null;kvUnsubscribe=null;initialized=!1;storageKey=typeof window>`u`?`nav-layout`:Nc(`nav-layout`,window.location);constructor(){if(typeof window>`u`)return;let e=yc()?null:xl();if(e!=null){let t=fl(e);this.state={...this.state,mainTabs:t.mainTabs,bottomTabs:t.bottomTabs,updatedAt:e.updatedAt}}let t=_l(window.location,this.state),n=gl({...this.state,mainLocation:t.main,bottomLocation:t.bottom,popLocation:t.pop});n=gl(El(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:nl(ol(t),n)})}replace(e,t,n){this.dispatch({type:`NAVIGATE`,sourceArea:e,action:`REPLACE`,location:nl(ol(t),n)})}createHref(e,t,n){if(typeof window>`u`)return t;let{nextState:r}=this.computeTransition({type:`NAVIGATE`,sourceArea:e,action:`PUSH`,location:nl(ol(t),n)});return vl(r)}get mainTabs(){return this.state.mainTabs}get bottomTabs(){return this.state.bottomTabs}getAreaForPath(e){return dl(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:nl(e)})}deactivateBottom(){this.dispatch({type:`DEACTIVATE_BOTTOM`})}activatePop(e){this.dispatch({type:`ACTIVATE_POP`,location:nl(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=cl(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||yc())){this.initialized=!0;try{let e=await this.resolveProjectScopedStorageKey();e&&e!==this.storageKey&&(this.storageKey=e,this.rebindProjectScopedLayout(e));let{trpcClient:t}=await Y(async()=>{let{trpcClient:e}=await import(`./trpc-C7hf8_bp.js`);return{trpcClient:e}},[]),n=el(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=el(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=_l(window.location,this.state);this.dispatch({type:`POPSTATE`,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})};computeTransition(e){let t=Dl(this.state,e);if(!t.changed)return{transition:t,nextState:this.state};let n=El(this.state,t.nextState,e);return n=gl(n),{transition:t,nextState:n}}dispatch(e){if(typeof window<`u`&&e.type!==`POPSTATE`&&this.mainHistory==null){let e=_l(window.location,this.state);this.state=gl({...this.state,mainLocation:e.main,bottomLocation:e.bottom,popLocation:e.pop})}let t=Dl(this.state,e);if(!t.changed)return;let n=this.state,r=El(n,t.nextState,e);r=gl(r),this.state=r,t.persist===`local_and_remote`?this.persistLayout():t.persist===`local_only`&&(this.cancelPersistTimer(),Cl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:this.state.updatedAt},this.storageKey));let i=t.urlAction??(Ol(n,this.state,`main`)||Ol(n,this.state,`bottom`)||Ol(n,this.state,`pop`)?`REPLACE`:void 0);i&&this.syncToUrl(i);let a=kl(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=vl(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=vl(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},Cl({mainTabs:this.state.mainTabs,bottomTabs:this.state.bottomTabs,updatedAt:e},this.storageKey),this.cancelPersistTimer(),this.persistTimer=setTimeout(()=>{this.persistTimer=null,Y(async()=>{let{trpcClient:e}=await import(`./trpc-C7hf8_bp.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(()=>{})},Zc)}async resolveProjectScopedStorageKey(){try{let e=await fetch(Vc());if(!e.ok)return null;let t=await e.json();return typeof t.projectDir!=`string`||t.projectDir.length===0?null:Xc(t.projectDir)}catch{return null}}rebindProjectScopedLayout(e){let t=Sl(e);if(t){let e=fl(t);this.state=gl({...this.state,mainTabs:e.mainTabs,bottomTabs:e.bottomTabs,updatedAt:t.updatedAt}),this.normalizeUrl();return}this.state=gl({...this.state,mainLocation:wl(this.state.mainLocation),bottomLocation:wl(this.state.bottomLocation),updatedAt:0}),this.normalizeUrl(),this.notifyListeners()}};typeof window<`u`&&!yc()&&Al.init();function jl(){return(0,q.useSyncExternalStore)(e=>Al.subscribe(e),()=>Al.getSnapshot(),()=>Al.getSnapshot())}function Ml(e,t){return t.updatedAt-e.updatedAt||e.id.localeCompare(t.id)}function Nl(e){return[...e].sort(Ml)}function Pl(e,t=10){return Nl(e).slice(0,Math.max(0,Math.trunc(t)))}var Fl=`project`,Il=/^[A-Za-z]:\//;function Ll(e){return e.replace(/\\/g,`/`).replace(/\/+$/g,``)}function Rl(e){return e.startsWith(`/`)||Il.test(e)}function zl(e){return e.replace(/^\.?\//,``)}function Bl(e){return Ll(e).split(`/`).filter(Boolean)}function Vl(e){let t=Ll(e),n=/(?:^|\/)node_modules\/(?:\.pnpm\/[^/]+\/node_modules\/)?(@[^/]+\/[^/]+|[^/]+)(\/.*)?/.exec(t),r=n?.[1];return r?`npm:${r}${n[2]??``}`:null}function Hl(e){return`${Fl}:${zl(e)}`}function Ul(e,t){let n=Ll(e),r=Ll(t),i=n.toLowerCase(),a=r.toLowerCase();return a===i||a.startsWith(`${i}/`)}function Wl(e,t){let n=Bl(e),r=Bl(t),i=0;for(;i<n.length&&i<r.length&&n[i]?.toLowerCase()===r[i]?.toLowerCase();)i+=1;return r.slice(i).join(`/`)}function Gl(e){let t=Bl(e),n=t.lastIndexOf(`openspec`);return n<0?null:t.slice(n).join(`/`)}function Kl(e,t){let n=Ll(e),r=Vl(n);return(t?.source===`package`||r)&&r?r:Rl(n)?t?.projectDir&&Ul(t.projectDir,n)?Hl(Wl(t.projectDir,n)):Hl(Gl(n)||Bl(n).slice(-4).join(`/`)):Hl(n)}var ql=Symbol.for(`yaml.alias`),Jl=Symbol.for(`yaml.document`),Yl=Symbol.for(`yaml.map`),Xl=Symbol.for(`yaml.pair`),Zl=Symbol.for(`yaml.scalar`),Ql=Symbol.for(`yaml.seq`),$l=Symbol.for(`yaml.node.type`),eu=e=>!!e&&typeof e==`object`&&e[$l]===ql,tu=e=>!!e&&typeof e==`object`&&e[$l]===Jl,nu=e=>!!e&&typeof e==`object`&&e[$l]===Yl,ru=e=>!!e&&typeof e==`object`&&e[$l]===Xl,iu=e=>!!e&&typeof e==`object`&&e[$l]===Zl,au=e=>!!e&&typeof e==`object`&&e[$l]===Ql;function ou(e){if(e&&typeof e==`object`)switch(e[$l]){case Yl:case Ql:return!0}return!1}function su(e){if(e&&typeof e==`object`)switch(e[$l]){case ql:case Yl:case Zl:case Ql:return!0}return!1}var cu=e=>(iu(e)||ou(e))&&!!e.anchor,lu=Symbol(`break visit`),uu=Symbol(`skip children`),du=Symbol(`remove node`);function fu(e,t){let n=gu(t);tu(e)?pu(null,e.contents,n,Object.freeze([e]))===du&&(e.contents=null):pu(null,e,n,Object.freeze([]))}fu.BREAK=lu,fu.SKIP=uu,fu.REMOVE=du;function pu(e,t,n,r){let i=_u(e,t,n,r);if(su(i)||ru(i))return vu(e,r,i),pu(e,i,n,r);if(typeof i!=`symbol`){if(ou(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=pu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===lu)return lu;else i===du&&(t.items.splice(e,1),--e)}}else if(ru(t)){r=Object.freeze(r.concat(t));let e=pu(`key`,t.key,n,r);if(e===lu)return lu;e===du&&(t.key=null);let i=pu(`value`,t.value,n,r);if(i===lu)return lu;i===du&&(t.value=null)}}return i}async function mu(e,t){let n=gu(t);tu(e)?await hu(null,e.contents,n,Object.freeze([e]))===du&&(e.contents=null):await hu(null,e,n,Object.freeze([]))}mu.BREAK=lu,mu.SKIP=uu,mu.REMOVE=du;async function hu(e,t,n,r){let i=await _u(e,t,n,r);if(su(i)||ru(i))return vu(e,r,i),hu(e,i,n,r);if(typeof i!=`symbol`){if(ou(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=await hu(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===lu)return lu;else i===du&&(t.items.splice(e,1),--e)}}else if(ru(t)){r=Object.freeze(r.concat(t));let e=await hu(`key`,t.key,n,r);if(e===lu)return lu;e===du&&(t.key=null);let i=await hu(`value`,t.value,n,r);if(i===lu)return lu;i===du&&(t.value=null)}}return i}function gu(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 _u(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(nu(t))return n.Map?.(e,t,r);if(au(t))return n.Seq?.(e,t,r);if(ru(t))return n.Pair?.(e,t,r);if(iu(t))return n.Scalar?.(e,t,r);if(eu(t))return n.Alias?.(e,t,r)}function vu(e,t,n){let r=t[t.length-1];if(ou(r))r.items[e]=n;else if(ru(r))e===`key`?r.key=n:r.value=n;else if(tu(r))r.contents=n;else{let e=eu(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var yu={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},bu=e=>e.replace(/[!,[\]{}]/g,e=>yu[e]),xu=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+bu(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&&su(e.contents)){let t={};fu(e.contents,(e,n)=>{su(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
|
`)}};xu.defaultYaml={explicit:!1,version:`1.2`},xu.defaultTags={"!!":`tag:yaml.org,2002:`};function Su(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 Cu(e){let t=new Set;return fu(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function wu(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function Tu(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=Cu(e);let a=wu(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(iu(t.node)||ou(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 Eu(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=Eu(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=Eu(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=Eu(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=Eu(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}return e.call(t,n,r)}function Du(e,t,n){if(Array.isArray(e))return e.map((e,t)=>Du(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!cu(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 Ou=class{constructor(e){Object.defineProperty(this,$l,{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(!tu(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=Du(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?Eu(i,{"":o},``,o):o}},ku=class extends Ou{constructor(e){super(ql),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=[],fu(e,{Node:(e,t)=>{(eu(t)||cu(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||=(Du(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=Au(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(Su(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 Au(e,t,n){if(eu(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(ou(t)){let r=0;for(let i of t.items){let t=Au(e,i,n);t>r&&(r=t)}return r}else if(ru(t)){let r=Au(e,t.key,n),i=Au(e,t.value,n);return Math.max(r,i)}return 1}var ju=e=>!e||typeof e!=`function`&&typeof e!=`object`,Mu=class extends Ou{constructor(e){super(Zl),this.value=e}toJSON(e,t){return t?.keep?this.value:Du(this.value,e,t)}toString(){return String(this.value)}};Mu.BLOCK_FOLDED=`BLOCK_FOLDED`,Mu.BLOCK_LITERAL=`BLOCK_LITERAL`,Mu.PLAIN=`PLAIN`,Mu.QUOTE_DOUBLE=`QUOTE_DOUBLE`,Mu.QUOTE_SINGLE=`QUOTE_SINGLE`;var Nu=`tag:yaml.org,2002:`;function Pu(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 Fu(e,t,n){if(tu(e)&&(e=e.contents),su(e))return e;if(ru(e)){let t=n.schema[Yl].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 ku(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=Nu+t.slice(2));let l=Pu(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new Mu(e);return c&&(c.node=t),t}l=e instanceof Map?o[Yl]:Symbol.iterator in Object(e)?o[Ql]:o[Yl]}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 Mu(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Iu(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 Fu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var Lu=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Ru=class extends Ou{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=>su(t)||ru(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Lu(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(ou(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Iu(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(ou(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&&iu(i)?i.value:i:ou(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ru(t))return!1;let n=t.value;return n==null||e&&iu(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 ou(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(ou(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Iu(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},zu=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function Bu(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Vu=(e,t,n)=>e.endsWith(`
|
|
12
12
|
`)?Bu(n,t):n.includes(`
|
|
13
13
|
`)?`
|
|
@@ -360,7 +360,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
360
360
|
`+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=vk(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=Nfe;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==`
|
|
361
361
|
`?``:t;else{let e=t.indexOf(`
|
|
362
362
|
`);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=CO.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],tk,tk,(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(_k(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?YO(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=_k(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`?ak(this.parser.getNodeType(e),t,n,r):new ik(e,t)}get buffer(){return new nk(this.parser.nodeSet)}};function YO(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=YO(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 XO=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 Pfe(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}configure(t){let n=QO(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(ZO(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&&[[me.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(ZO(n.props)&&(r=r.extend(...n.props)),ZO(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(ZO(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?$O(s,e.before):e.after?$O(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(ZO(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?$O(l,e.before):e.after?$O(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 gk(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 ZO(e){return e!=null&&e.length>0}function QO(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=QO(e[0]);if(e.length==1)return t;let n=QO(e.slice(1));if(!n||!t)return t||n;let r=(e,t)=>(e||tk).concat(t||tk),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 $O(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var ek=[w.none];for(let e=1,t;t=Z[e];e++)ek[e]=w.define({id:e,name:t,props:e>=Z.Escape?[]:[[me.group,e in DO?[`Block`,`BlockContext`]:[`Block`,`LeafBlock`]]],top:t==`Document`});var tk=[],nk=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})}},rk=class{constructor(e,t,n,r=tk){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 nk(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}},ik=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 tk}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 ak(e,t,n,r){return new rk(e,t,n,r)}var ok={resolve:`Emphasis`,mark:`EmphasisMark`},sk={resolve:`Emphasis`,mark:`EmphasisMark`},ck={},lk={},uk=class{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}},Ffe=`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`,dk=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{dk=RegExp(`[\\p{S}|\\p{P}]`,`u`)}catch{}var fk={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(Ffe.charCodeAt(t)==r)return e.append(ak(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(ak(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(ak(Z.InlineCode,n,r+1,[ak(Z.CodeMark,n,n+i),ak(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(ak(Z.Autolink,n,n+1+i[0].length,[ak(Z.LinkMark,n,n+1),ak(Z.URL,n+1,n+i[0].length),ak(Z.LinkMark,n+i[0].length,n+1+i[0].length)]));let a=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(a)return e.append(ak(Z.Comment,n,n+1+a[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return e.append(ak(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(ak(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=dk.test(i),s=dk.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 uk(t==95?ok:sk,n,r,(f?1:0)|(p?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(ak(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(ak(Z.HardBreak,n,t+1))}return-1},Link(e,t,n){return t==91?e.append(new uk(ck,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new uk(lk,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 uk&&(r.type==ck||r.type==lk)){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]=Ife(e,i,r.type==ck?Z.Link:Z.Image,r.from,n+1);if(r.type==ck)for(let n=0;n<t;n++){let t=e.parts[n];t instanceof uk&&t.type==ck&&(t.side=0)}return a.to}}return-1}};function Ife(e,t,n,r,i){let{text:a}=e,o=e.char(i),s=i;if(t.unshift(ak(Z.LinkMark,r,r+(n==Z.Image?2:1))),t.push(ak(Z.LinkMark,i-1,i)),o==40){let n=e.skipSpace(i+1),r=pk(a,n-e.offset,e.offset),o;r&&(n=e.skipSpace(r.to),n!=r.to&&(o=mk(a,n-e.offset,e.offset),o&&(n=e.skipSpace(o.to)))),e.char(n)==41&&(t.push(ak(Z.LinkMark,i,i+1)),s=n+1,r&&t.push(r),o&&t.push(o),t.push(ak(Z.LinkMark,n,s)))}else if(o==91){let n=hk(a,i-e.offset,e.offset,!1);n&&(t.push(n),s=n.to)}return ak(n,r,s,t)}function pk(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 ak(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(OO(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?ak(Z.URL,t+n,i+n):i==e.length?null:!1}}function mk(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 ak(Z.LinkTitle,t+n,r+1+n);else o==92&&(a=!0)}return null}function hk(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:ak(Z.LinkLabel,t+n,a+1+n);else{if(r&&!OO(o)&&(r=!1),o==91)return!1;o==92&&(i=!0)}}return null}var gk=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 uk(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 uk&&(t.type==ck||t.type==lk))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 uk&&n.type.resolve&&n.side&2))continue;let r=n.type==ok||n.type==sk,i=n.to-n.from,a,o=t-1;for(;o>=e;o--){let e=this.parts[o];if(e instanceof uk&&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 rk&&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 uk(a.type,a.from,l,a.side):null,(this.parts[t]=r&&n.to!=u?new uk(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 rk&&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 uk&&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 uk?t:null}skipSpace(e){return kO(this.text,e-this.offset)+this.offset}elt(e,t,n,r){return typeof e==`string`?ak(this.parser.getNodeType(e),t,n,r):new ik(e,t)}};gk.linkStart=ck,gk.imageStart=lk;function _k(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 rk&&(n[r]=new rk(t.type,t.from,t.to,_k(t.children,[e])))}else n.splice(r++,0,e)}return n}var Lfe=[Z.CodeBlock,Z.ListItem,Z.OrderedList,Z.BulletList],Rfe=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)!=`
|
|
363
|
-
`;)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(me.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=vk(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`)&&(Lfe.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 vk(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 zfe=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}),Bfe=new XO(new C(ek).extend(zfe),Object.keys(KO).map(e=>KO[e]),Object.keys(KO).map(e=>JO[e]),Object.keys(KO),Mfe,DO,Object.keys(fk).map(e=>fk[e]),Object.keys(fk),[]);function Vfe(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 Hfe(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:Vfe(e.node,e.from,e.to)};return null})}}var Ufe={resolve:`Strikethrough`,mark:`StrikethroughMark`},Wfe={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=dk.test(r),c=dk.test(i);return e.addDelimiter(Ufe,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yk(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 bk(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 xk=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sk=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)&&xk.test(r=t.text.slice(t.pos))){let i=[];yk(e,n.content,0,i,n.start)==yk(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=[];yk(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}},Gfe={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 bk(t.content,0)?new Sk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sk)||!bk(t.text,t.basePos))return!1;let r=e.peekLine();return xk.test(r)&&yk(e,t.text,t.basePos)==yk(e,r,t.basePos)},before:`SetextHeading`}]},Kfe=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}},qfe={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 Kfe:null},after:`SetextHeading`}]},Ck=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,wk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Jfe=/[\w-]+\.[\w-]+($|\/)/,Tk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Ek=/\/[a-zA-Z\d@.]+/gy;function Dk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Yfe(e,t){wk.lastIndex=t;let n=wk.exec(e);if(!n||Jfe.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==`)`&&Dk(e,t,r,`)`)>Dk(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 Ok(e,t){Tk.lastIndex=t;let n=Tk.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 Xfe=[Gfe,qfe,Wfe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ck.lastIndex=r;let i=Ck.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Yfe(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Ok(e.text,r):(a=Ok(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Ek.lastIndex=a,i=Ek.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 kk(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)),OO(s))break}return-1}}var Zfe={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:kk(94,`Superscript`,`SuperscriptMark`)}]},Qfe={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:kk(126,`Subscript`,`SubscriptMark`)}]},$fe={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))}}]},epe=55,tpe=1,npe=56,rpe=2,ipe=57,ape=3,Ak=4,ope=5,jk=6,Mk=7,Nk=8,Pk=9,Fk=10,spe=11,cpe=12,lpe=13,Ik=58,upe=14,dpe=15,Lk=59,Rk=21,fpe=23,zk=24,ppe=25,Bk=27,Vk=28,mpe=29,hpe=32,gpe=35,_pe=37,vpe=38,ype=0,bpe=1,xpe={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},Spe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Hk={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 Cpe(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Uk=null,Wk=null,Gk=0;function Kk(e,t){let n=e.pos+t;if(Gk==n&&Wk==e)return Uk;let r=e.peek(t),i=``;for(;Cpe(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Wk=e,Gk=n,Uk=i?i.toLowerCase():r==wpe||r==Tpe?void 0:null}var qk=60,Jk=62,Yk=47,wpe=63,Tpe=33,Epe=45;function Xk(e,t){this.name=e,this.parent=t}var Dpe=[jk,Fk,Mk,Nk,Pk],Ope=new Ae({start:null,shift(e,t,n,r){return Dpe.indexOf(t)>-1?new Xk(Kk(r,1)||``,e):e},reduce(e,t){return t==Rk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==jk||i==_pe?new Xk(Kk(r,1)||``,e):e},strict:!1}),kpe=new be((e,t)=>{if(e.next!=qk){e.next<0&&t.context&&e.acceptToken(Ik);return}e.advance();let n=e.next==Yk;n&&e.advance();let r=Kk(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?dpe:upe);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(spe);if(i&&Spe[i])return e.acceptToken(Ik,-2);if(t.dialectEnabled(ype))return e.acceptToken(cpe);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(lpe)}else{if(r==`script`)return e.acceptToken(Mk);if(r==`style`)return e.acceptToken(Nk);if(r==`textarea`)return e.acceptToken(Pk);if(xpe.hasOwnProperty(r))return e.acceptToken(Fk);i&&Hk[i]&&Hk[i][r]?e.acceptToken(Ik,-1):e.acceptToken(jk)}},{contextual:!0}),Ape=new be(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Lk);break}if(e.next==Epe)t++;else if(e.next==Jk&&t>=2){n>=3&&e.acceptToken(Lk,-2);break}else t=0;e.advance()}});function jpe(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Mpe=new be((e,t)=>{if(e.next==Yk&&e.peek(1)==Jk){let n=t.dialectEnabled(bpe)||jpe(t.context);e.acceptToken(n?ope:Ak,2)}else e.next==Jk&&e.acceptToken(Ak,1)});function Zk(e,t,n){let r=2+e.length;return new be(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==Yk||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==Jk){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 Npe=Zk(`script`,epe,tpe),Ppe=Zk(`style`,npe,rpe),Fpe=Zk(`textarea`,ipe,ape),Ipe=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}),Lpe=Ee.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:Ope,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:[Ipe],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:[Npe,Ppe,Fpe,Mpe,kpe,Ape,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Qk(e,t){let n=Object.create(null);for(let r of e.getChildren(zk)){let e=r.getChild(ppe),i=r.getChild(Bk)||r.getChild(Vk);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Bk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function $k(e,t){let n=e.getChild(fpe);return n?t.read(n.from,n.to):` `}function eA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=Qk(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function tA(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==mpe)return eA(e,t,n);if(s==hpe)return eA(e,t,r);if(s==gpe)return eA(e,t,i);if(s==Rk&&a.length){let n=e.node,r=n.firstChild,i=r&&$k(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=Qk(r,t)))){let t=n.lastChild,i=t.type.id==vpe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==zk){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!=$k(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Bk){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==Vk)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var Rpe=122,nA=1,zpe=123,Bpe=124,rA=2,Vpe=125,Hpe=3,Upe=4,iA=[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],Wpe=58,Gpe=40,aA=95,Kpe=91,oA=45,qpe=46,Jpe=35,Ype=37,Xpe=38,Zpe=92,Qpe=10,$pe=42;function sA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function cA(e){return e>=48&&e<=57}function lA(e){return cA(e)||e>=97&&e<=102||e>=65&&e<=70}var uA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(sA(c)||c==oA||c==aA||a&&cA(c))!a&&(c!=oA||s>0)&&(a=!0),o===s&&c==oA&&o++,r.advance();else if(c==Zpe&&r.peek(1)!=Qpe){if(r.advance(),lA(r.next)){do r.advance();while(lA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(rA)?t:c==Gpe?n:e);break}}},eme=new be(uA(zpe,rA,Bpe)),tme=new be(uA(Vpe,Hpe,Upe)),nme=new be(e=>{if(iA.includes(e.peek(-1))){let{next:t}=e;(sA(t)||t==aA||t==Jpe||t==qpe||t==$pe||t==Kpe||t==Wpe&&sA(e.peek(1))||t==oA||t==Xpe)&&e.acceptToken(Rpe)}}),rme=new be(e=>{if(!iA.includes(e.peek(-1))){let{next:t}=e;if(t==Ype&&(e.advance(),e.acceptToken(nA)),sA(t)){do e.advance();while(sA(e.next)||cA(e.next));e.acceptToken(nA)}}}),ime=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}),ame={__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},ome={__proto__:null,or:98,and:98,not:106,only:106,layer:170},sme={__proto__:null,selector:112,layer:166},cme={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},lme={__proto__:null,to:207},ume=Ee.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:[ime],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:[nme,rme,eme,tme,1,2,3,4,new de(`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=>ame[e]||-1},{term:125,get:e=>ome[e]||-1},{term:4,get:e=>sme[e]||-1},{term:25,get:e=>cme[e]||-1},{term:123,get:e=>lme[e]||-1}],tokenPrec:1963}),dA=null;function fA(){if(!dA&&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)));dA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return dA||[]}var pA=`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})),mA=`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}))),dme=`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})),fme=[`@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})),hA=/^(\w[\w-]*|-\w[\w-]*|)$/,pme=/^-(-[\w-]*)?$/;function mme(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 gA=new O,hme=[`Declaration`];function gme(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function _A(e,t,n){if(t.to-t.from>4096){let r=gA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of _A(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return gA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(hme)&&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 vA=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:fA(),validFor:hA};if(i.name==`ValueName`)return{from:i.from,options:mA,validFor:hA};if(i.name==`PseudoClassName`)return{from:i.from,options:pA,validFor:hA};if(e(i)||(t.explicit||a)&&mme(i,n.doc))return{from:e(i)||a?i.from:r,options:_A(n.doc,gme(i),e),validFor:pme};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:fA(),validFor:hA};return{from:i.from,options:dme,validFor:hA}}if(i.name==`AtKeyword`)return{from:i.from,options:fme,validFor:hA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:pA,validFor:hA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:mA,validFor:hA}:o.name==`Block`||o.name==`Styles`?{from:r,options:fA(),validFor:hA}:null},yA=vA(e=>e.name==`VariableName`),bA=Oe.define({name:`css`,parser:ume.configure({props:[l.add({Declaration:ue()}),s.add({"Block KeyframeList":Le})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function xA(){return new je(bA,bA.data.of({autocomplete:yA}))}var SA=[`_blank`,`_self`,`_top`,`_parent`],CA=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],wA=[`get`,`post`,`put`,`delete`],TA=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],EA=[`true`,`false`],DA={},OA={a:{attrs:{href:null,ping:null,type:null,media:null,target:SA,hreflang:null}},abbr:DA,address:DA,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:DA,aside:DA,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:DA,base:{attrs:{href:null,target:SA}},bdi:DA,bdo:DA,blockquote:{attrs:{cite:null}},body:DA,br:DA,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:TA,formmethod:wA,formnovalidate:[`novalidate`],formtarget:SA,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:DA,center:DA,cite:DA,code:DA,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:DA,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:DA,div:DA,dl:DA,dt:DA,em:DA,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:DA,figure:DA,footer:DA,form:{attrs:{action:null,name:null,"accept-charset":CA,autocomplete:[`on`,`off`],enctype:TA,method:wA,novalidate:[`novalidate`],target:SA}},h1:DA,h2:DA,h3:DA,h4:DA,h5:DA,h6:DA,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:DA,hgroup:DA,hr:DA,html:{attrs:{manifest:null}},i:DA,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:TA,formmethod:wA,formnovalidate:[`novalidate`],formtarget:SA,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:DA,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:DA,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:DA,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:CA,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:DA,noscript:DA,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:DA,param:{attrs:{name:null,value:null}},pre:DA,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:DA,rt:DA,ruby:DA,samp:DA,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:CA}},section:DA,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:DA,source:{attrs:{src:null,type:null,media:null}},span:DA,strong:DA,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:DA,summary:DA,sup:DA,table:DA,tbody:DA,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:DA,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:DA,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:DA,time:{attrs:{datetime:null}},title:DA,tr:DA,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:DA,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:DA},kA={accesskey:null,class:null,contenteditable:EA,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:EA,autocorrect:EA,autocapitalize:EA,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":EA,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":EA,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":EA,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":EA,"aria-hidden":EA,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":EA,"aria-multiselectable":EA,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":EA,"aria-relevant":null,"aria-required":EA,"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},AA=`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 AA)kA[e]=null;var jA=class{constructor(e,t){this.tags={...OA,...e},this.globalAttrs={...kA,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};jA.default=new jA;function MA(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 NA(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function PA(e,t,n){return n.tags[MA(e,NA(t))]?.children||n.allTags}function FA(e,t){let n=[];for(let r=NA(t);r&&!r.type.isTop;r=NA(r.parent)){let i=MA(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 IA=/^[:\-\.\w\u00b7-\uffff]*$/;function LA(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=NA(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:PA(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(FA(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function RA(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:FA(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:IA}}function zA(e,t,n,r){let i=[],a=0;for(let r of PA(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of FA(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function BA(e,t,n,r,i){let a=NA(n),o=a?t.tags[MA(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:IA}}function VA(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=NA(n),i=r?t.tags[MA(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 HA(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)?RA(n,i,i.from,r):LA(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?LA(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?RA(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?BA(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?VA(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?zA(n,e,i,r):null}function UA(e){return HA(jA.default,e)}function WA(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new jA(t,n):jA.default;return e=>HA(r,e)}var GA=We.parser.configure({top:`SingleExpression`}),KA=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:Ue.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:Ve.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:Be.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:GA},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:We.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:bA.parser}],qA=[{name:`style`,parser:bA.parser.configure({top:`Styles`})}].concat(AA.map(e=>({name:e,parser:We.parser}))),JA=Oe.define({name:`html`,parser:Lpe.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}}}),ve.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),YA=JA.configure({wrap:tA(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=tA((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(qA))),new je(n?JA.configure({wrap:n,dialect:t}):t?YA.configure({dialect:t}):YA,[YA.data.of({autocomplete:WA(e)}),e.autoCloseTags===!1?[]:QA,He().support,xA().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=MA(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=MA(o.doc,e,n))&&!ZA.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:se.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 me,tj=Bfe.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||nj(e)!=null||rj(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),ej.add(nj),l.add({Document:()=>null}),pe.add({Document:$A})]});function nj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function rj(e){return e.name==`OrderedList`||e.name==`BulletList`}function ij(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 aj=Fe.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=ij(r,e);if(t>n)return{from:n,to:t}}return null});function oj(e){return new W($A,e,[],`markdown`)}var sj=oj(tj),cj=oj(tj.configure([Xfe,Qfe,Zfe,$fe,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function lj(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):G.matchLanguageName(e,n,!0),t instanceof G)return t.support?t.support.language.parser:re.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var uj=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(+fj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function dj(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 uj(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 uj(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 uj(i.parent,s,s+t,a[1],e,n,i))}}return r}function fj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function pj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=fj(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 mj(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 hj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!cj.isActiveAt(t,n.from,-1)&&!cj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=dj(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`&&pj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&pj(e.item,i,r),{range:se.cursor(t+n.length),changes:r}}else{let e=yj(c,t,s);return{range:se.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`&&pj(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=mj(m,t),vj(l.node,t.doc)&&(m=yj(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:se.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},gj=hj();function _j(e){return e.name==`QuoteMark`||e.name==`ListMark`}function vj(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 yj(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 mj(r,t)}function bj(e,t){let n=e.resolveInner(t,-1),r=t;_j(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(_j(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var xj=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&cj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=dj(bj(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:se.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=mj(i,e)),{range:se.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:se.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},Sj=[{key:`Enter`,run:gj},{key:`Backspace`,run:xj}],Cj=XA({matchClosingTags:!1});function wj(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=sj,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=Cj}=e;if(!(a instanceof XO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,aj],d;s&&u.push(kj),n instanceof je?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?lj(t,d):void 0;l.push(Hfe({codeParser:f,htmlParser:c.language.parser})),i&&u.push(le.high(r.of(Sj)));let p=oj(a.configure(l));return o&&u.push(p.data.of({autocomplete:Tj})),new je(p,u)}function Tj(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:Dj(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Ej=null;function Dj(){if(Ej)return Ej;let e=UA(new Ye(we.create({extensions:Cj}),0,!0));return Ej=e?e.options:[]}var Oj=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,kj=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),!cj.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||Oj.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)}}),Aj=63,jj=64,Mj=1,Nj=2,Pj=3,Fj=4,Ij=5,Lj=6,Rj=7,zj=65,Bj=66,Vj=8,Hj=9,Uj=10,Wj=11,Gj=12,Kj=13,qj=19,Jj=20,Yj=29,Xj=33,Zj=34,Qj=47,$j=0,eM=1,tM=2,nM=3,rM=4,iM=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}};iM.top=new iM(null,-1,$j);function aM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(sM(t)||t==-1)return n}}function oM(e){return e==32||e==9}function sM(e){return e==10||e==13}function cM(e){return oM(e)||sM(e)}function lM(e){return e<0||cM(e)}var uM=new Ae({start:iM.top,reduce(e,t){return e.type==nM&&(t==Jj||t==Zj)?e.parent:e},shift(e,t,n,r){if(t==Pj)return new iM(e,aM(r,r.pos),eM);if(t==zj||t==Ij)return new iM(e,aM(r,r.pos),tM);if(t==Aj)return e.parent;if(t==qj||t==Xj)return new iM(e,0,nM);if(t==Kj&&e.type==rM)return e.parent;if(t==Qj){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new iM(e,e.depth+ +t[0],rM)}return e},hash(e){return e.hash}});function dM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&lM(e.peek(n+3))}var fM=new be((e,t)=>{if(e.next==-1&&t.canShift(jj))return e.acceptToken(jj);let n=e.peek(-1);if((sM(n)||n<0)&&t.context.type!=nM){if(dM(e,45))if(t.canShift(Aj))e.acceptToken(Aj);else return e.acceptToken(Mj,3);if(dM(e,46))if(t.canShift(Aj))e.acceptToken(Aj);else return e.acceptToken(Nj,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==eM&&(e.next!=45||!lM(e.peek(1))))&&e.next!=-1&&!sM(e.next)&&e.next!=35&&e.acceptToken(Aj,-n)}},{contextual:!0}),pM=new be((e,t)=>{if(t.context.type==nM){e.next==63&&(e.advance(),lM(e.next)&&e.acceptToken(Rj));return}if(e.next==45)e.advance(),lM(e.next)&&e.acceptToken(t.context.type==eM&&t.context.depth==aM(e,e.pos-1)?Fj:Pj);else if(e.next==63)e.advance(),lM(e.next)&&e.acceptToken(t.context.type==tM&&t.context.depth==aM(e,e.pos-1)?Lj:Ij);else{let n=e.pos;for(;;)if(oM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)_M(e);else if(e.next==38)vM(e);else if(e.next==42){vM(e);break}else if(e.next==39||e.next==34){if(yM(e,!0))break;return}else if(e.next==91||e.next==123){if(!_me(e))return;break}else{SM(e,!0,!1,0);break}for(;oM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Yj))return;lM(e.peek(1))&&e.acceptTokenTo(t.context.type==tM&&t.context.depth==aM(e,n)?Bj:zj,n)}}},{contextual:!0});function mM(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 hM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function gM(e,t){return e.next==37?(e.advance(),hM(e.next)&&e.advance(),hM(e.next)&&e.advance(),!0):mM(e.next)||t&&e.next==44?(e.advance(),!0):!1}function _M(e){if(e.advance(),e.next==60){for(e.advance();;)if(!gM(e,!0)){e.next==62&&e.advance();break}}else for(;gM(e,!1););}function vM(e){for(e.advance();!lM(e.next)&&bM(e.tag)!=`f`;)e.advance()}function yM(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(sM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function _me(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(!yM(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||sM(e.next))return!1;else e.advance()}var vme=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function bM(e){return e<33?`u`:e>125?`s`:vme[e-33]}function xM(e,t){let n=bM(e);return n!=`u`&&!(t&&n==`f`)}function SM(e,t,n,r){if(bM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&xM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;cM(a);){if(sM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?xM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:xM(a,n)))||!n&&s<=r||s==0&&!n&&(dM(e,45,o)||dM(e,46,o)))break;if(t&&bM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var yme=new be((e,t)=>{if(e.next==33)_M(e),e.acceptToken(Gj);else if(e.next==38||e.next==42){let t=e.next==38?Uj:Wj;vM(e),e.acceptToken(t)}else e.next==39||e.next==34?(yM(e,!1),e.acceptToken(Hj)):SM(e,!1,t.context.type==nM,t.context.depth)&&e.acceptToken(Vj)}),bme=new be((e,t)=>{let n=t.context.type==rM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(dM(e,45,i)||dM(e,46,i))||!sM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=sM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(Kj,r)}),xme=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}),Sme=Ee.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:uM,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[xme],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:[fM,pM,yme,bme,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),Cme=Ee.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}),CM=Oe.define({name:`yaml`,parser:Sme.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:Ne({closing:`}`}),FlowSequence:Ne({closing:`]`})}),s.add({"FlowMapping FlowSequence":Le,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function wM(){return new je(CM)}Oe.define({name:`yaml-frontmatter`,parser:Cme.configure({props:[b({DashLine:A.meta})]})});function Q(e){return new je(oe.define(e))}function TM(e){return Y(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var wme=[G.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Y(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),G.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Y(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),G.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return TM(`Cassandra`)}}),G.of({name:`CSS`,extensions:[`css`],load(){return Y(()=>import(`./dist-BKhz7Oap.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),G.of({name:`Go`,extensions:[`go`],load(){return Y(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),G.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Y(()=>import(`./dist-BM6eVY-P.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),G.of({name:`Java`,extensions:[`java`],load(){return Y(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),G.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Y(()=>import(`./dist-CuZm98ZU.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),G.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Y(()=>import(`./dist-CK0JJp5l.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),G.of({name:`JSX`,extensions:[`jsx`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`LESS`,extensions:[`less`],load(){return Y(()=>import(`./dist-2Dy-PW5G.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),G.of({name:`Liquid`,extensions:[`liquid`],load(){return Y(()=>import(`./dist-BhMp0NDL.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),G.of({name:`MariaDB SQL`,load(){return TM(`MariaSQL`)}}),G.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Y(()=>import(`./dist-CGxJcxqX.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),G.of({name:`MS SQL`,load(){return TM(`MSSQL`)}}),G.of({name:`MySQL`,load(){return TM(`MySQL`)}}),G.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Y(()=>import(`./dist-kbbQRecV.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),G.of({name:`PLSQL`,extensions:[`pls`],load(){return TM(`PLSQL`)}}),G.of({name:`PostgreSQL`,load(){return TM(`PostgreSQL`)}}),G.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Y(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),G.of({name:`Rust`,extensions:[`rs`],load(){return Y(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),G.of({name:`Sass`,extensions:[`sass`],load(){return Y(()=>import(`./dist-svHuDKTd.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),G.of({name:`SCSS`,extensions:[`scss`],load(){return Y(()=>import(`./dist-svHuDKTd.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),G.of({name:`SQL`,extensions:[`sql`],load(){return TM(`StandardSQL`)}}),G.of({name:`SQLite`,load(){return TM(`SQLite`)}}),G.of({name:`TSX`,extensions:[`tsx`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Y(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),G.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Y(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),G.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Y(()=>import(`./dist-CAVLjTc0.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),G.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Y(()=>import(`./apl-CJPt5sW7.js`).then(e=>Q(e.apl)),[])}}),G.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Y(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>Q(e.asciiArmor)),[])}}),G.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Y(()=>import(`./asn1-8xgVfRoq.js`).then(e=>Q(e.asn1({}))),[])}}),G.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Y(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>Q(e.asterisk)),[])}}),G.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Y(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>Q(e.brainfuck)),[])}}),G.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Y(()=>import(`./cobol-D3WLbLVy.js`).then(e=>Q(e.cobol)),[])}}),G.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.csharp)),[])}}),G.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Y(()=>import(`./css-_6KgQwpu.js`).then(e=>Q(e.gss)),[])}}),G.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Y(()=>import(`./cmake-wWuF5ifR.js`).then(e=>Q(e.cmake)),[])}}),G.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Y(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>Q(e.coffeeScript)),[])}}),G.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Y(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>Q(e.commonLisp)),[])}}),G.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Y(()=>import(`./cypher-B3uWx7jm.js`).then(e=>Q(e.cypher)),[])}}),G.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Y(()=>import(`./python-2pwcWoy7.js`).then(e=>Q(e.cython)),[])}}),G.of({name:`Crystal`,extensions:[`cr`],load(){return Y(()=>import(`./crystal-C7mEw92C.js`).then(e=>Q(e.crystal)),[])}}),G.of({name:`D`,extensions:[`d`],load(){return Y(()=>import(`./d-D3kOh3JF.js`).then(e=>Q(e.d)),[])}}),G.of({name:`Dart`,extensions:[`dart`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.dart)),[])}}),G.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Y(()=>import(`./diff-CoamybWh.js`).then(e=>Q(e.diff)),[])}}),G.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Y(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([119,120]))}}),G.of({name:`DTD`,extensions:[`dtd`],load(){return Y(()=>import(`./dtd-BjGQwMWL.js`).then(e=>Q(e.dtd)),[])}}),G.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Y(()=>import(`./dylan-B9W3X2GI.js`).then(e=>Q(e.dylan)),[])}}),G.of({name:`EBNF`,load(){return Y(()=>import(`./ebnf-d5D0otVn.js`).then(e=>Q(e.ebnf)),[])}}),G.of({name:`ECL`,extensions:[`ecl`],load(){return Y(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>Q(e.ecl)),[])}}),G.of({name:`edn`,extensions:[`edn`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`Eiffel`,extensions:[`e`],load(){return Y(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>Q(e.eiffel)),[])}}),G.of({name:`Elm`,extensions:[`elm`],load(){return Y(()=>import(`./elm-unPS17vB.js`).then(e=>Q(e.elm)),[])}}),G.of({name:`Erlang`,extensions:[`erl`],load(){return Y(()=>import(`./erlang-R8nOsUTx.js`).then(e=>Q(e.erlang)),[])}}),G.of({name:`Esper`,load(){return Y(()=>import(`./sql-CwA10oIk.js`).then(e=>Q(e.esper)),[])}}),G.of({name:`Factor`,extensions:[`factor`],load(){return Y(()=>import(`./factor-DMvifS-k.js`).then(e=>Q(e.factor)),__vite__mapDeps([121,120]))}}),G.of({name:`FCL`,load(){return Y(()=>import(`./fcl-CVAfW9wK.js`).then(e=>Q(e.fcl)),[])}}),G.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Y(()=>import(`./forth-DHbsK8X8.js`).then(e=>Q(e.forth)),[])}}),G.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Y(()=>import(`./fortran-4jMwxW9-.js`).then(e=>Q(e.fortran)),[])}}),G.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.fSharp)),[])}}),G.of({name:`Gas`,extensions:[`s`],load(){return Y(()=>import(`./gas-zC_XGrQT.js`).then(e=>Q(e.gas)),[])}}),G.of({name:`Gherkin`,extensions:[`feature`],load(){return Y(()=>import(`./gherkin-CPBQou3u.js`).then(e=>Q(e.gherkin)),[])}}),G.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Y(()=>import(`./groovy-Cqopym0q.js`).then(e=>Q(e.groovy)),[])}}),G.of({name:`Haskell`,extensions:[`hs`],load(){return Y(()=>import(`./haskell-imzbNPgF.js`).then(e=>Q(e.haskell)),[])}}),G.of({name:`Haxe`,extensions:[`hx`],load(){return Y(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.haxe)),[])}}),G.of({name:`HXML`,extensions:[`hxml`],load(){return Y(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.hxml)),[])}}),G.of({name:`HTTP`,load(){return Y(()=>import(`./http-j4R5uEso.js`).then(e=>Q(e.http)),[])}}),G.of({name:`IDL`,extensions:[`pro`],load(){return Y(()=>import(`./idl-l9d1__Hj.js`).then(e=>Q(e.idl)),[])}}),G.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Y(()=>import(`./javascript-BcqCeS4O.js`).then(e=>Q(e.jsonld)),[])}}),G.of({name:`Julia`,extensions:[`jl`],load(){return Y(()=>import(`./julia-BU0qBb1w.js`).then(e=>Q(e.julia)),[])}}),G.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.kotlin)),[])}}),G.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Y(()=>import(`./livescript-uk34VDGK.js`).then(e=>Q(e.liveScript)),[])}}),G.of({name:`Lua`,extensions:[`lua`],load(){return Y(()=>import(`./lua-ClQGOv84.js`).then(e=>Q(e.lua)),[])}}),G.of({name:`mIRC`,extensions:[`mrc`],load(){return Y(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>Q(e.mirc)),[])}}),G.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Y(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>Q(e.mathematica)),[])}}),G.of({name:`Modelica`,extensions:[`mo`],load(){return Y(()=>import(`./modelica-DP8T2DKM.js`).then(e=>Q(e.modelica)),[])}}),G.of({name:`MUMPS`,extensions:[`mps`],load(){return Y(()=>import(`./mumps-BKUS05-y.js`).then(e=>Q(e.mumps)),[])}}),G.of({name:`Mbox`,extensions:[`mbox`],load(){return Y(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>Q(e.mbox)),[])}}),G.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Y(()=>import(`./nginx-CzYOtr2G.js`).then(e=>Q(e.nginx)),[])}}),G.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Y(()=>import(`./nsis-BbRIeGvl.js`).then(e=>Q(e.nsis)),__vite__mapDeps([122,120]))}}),G.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Y(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>Q(e.ntriples)),[])}}),G.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveC)),[])}}),G.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveCpp)),[])}}),G.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.oCaml)),[])}}),G.of({name:`Octave`,extensions:[`m`],load(){return Y(()=>import(`./octave-CnOndUN3.js`).then(e=>Q(e.octave)),[])}}),G.of({name:`Oz`,extensions:[`oz`],load(){return Y(()=>import(`./oz-DjW322Rn.js`).then(e=>Q(e.oz)),[])}}),G.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Y(()=>import(`./pascal-BdeW5uRX.js`).then(e=>Q(e.pascal)),[])}}),G.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Y(()=>import(`./perl-_CDvIe1D.js`).then(e=>Q(e.perl)),[])}}),G.of({name:`Pig`,extensions:[`pig`],load(){return Y(()=>import(`./pig-inWo_B4W.js`).then(e=>Q(e.pig)),[])}}),G.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Y(()=>import(`./powershell-CO5KWJsy.js`).then(e=>Q(e.powerShell)),[])}}),G.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Y(()=>import(`./properties-CjVp4a6M.js`).then(e=>Q(e.properties)),[])}}),G.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Y(()=>import(`./protobuf-DybFT2KT.js`).then(e=>Q(e.protobuf)),[])}}),G.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Y(()=>import(`./pug-D1ZtszdL.js`).then(e=>Q(e.pug)),__vite__mapDeps([123,124]))}}),G.of({name:`Puppet`,extensions:[`pp`],load(){return Y(()=>import(`./puppet-Dw_NDgko.js`).then(e=>Q(e.puppet)),[])}}),G.of({name:`Q`,extensions:[`q`],load(){return Y(()=>import(`./q-C47l8kdS.js`).then(e=>Q(e.q)),[])}}),G.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Y(()=>import(`./r-BmcXGVZ5.js`).then(e=>Q(e.r)),[])}}),G.of({name:`RPM Changes`,load(){return Y(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmChanges)),[])}}),G.of({name:`RPM Spec`,extensions:[`spec`],load(){return Y(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmSpec)),[])}}),G.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Y(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>Q(e.ruby)),[])}}),G.of({name:`SAS`,extensions:[`sas`],load(){return Y(()=>import(`./sas-Bxkg4GVX.js`).then(e=>Q(e.sas)),[])}}),G.of({name:`Scala`,extensions:[`scala`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.scala)),[])}}),G.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Y(()=>import(`./scheme-CO3zogua.js`).then(e=>Q(e.scheme)),[])}}),G.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Y(()=>import(`./shell-gYrTvBTP.js`).then(e=>Q(e.shell)),[])}}),G.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Y(()=>import(`./sieve-COX4Kn1X.js`).then(e=>Q(e.sieve)),[])}}),G.of({name:`Smalltalk`,extensions:[`st`],load(){return Y(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>Q(e.smalltalk)),[])}}),G.of({name:`Solr`,load(){return Y(()=>import(`./solr-BvhcdkNH.js`).then(e=>Q(e.solr)),[])}}),G.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.sml)),[])}}),G.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Y(()=>import(`./sparql-gX7W9xeh.js`).then(e=>Q(e.sparql)),[])}}),G.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Y(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>Q(e.spreadsheet)),[])}}),G.of({name:`Squirrel`,extensions:[`nut`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.squirrel)),[])}}),G.of({name:`Stylus`,extensions:[`styl`],load(){return Y(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>Q(e.stylus)),[])}}),G.of({name:`Swift`,extensions:[`swift`],load(){return Y(()=>import(`./swift-CurfpLXH.js`).then(e=>Q(e.swift)),[])}}),G.of({name:`sTeX`,load(){return Y(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),G.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Y(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),G.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Y(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),G.of({name:`Tcl`,extensions:[`tcl`],load(){return Y(()=>import(`./tcl-BPvzXR-t.js`).then(e=>Q(e.tcl)),[])}}),G.of({name:`Textile`,extensions:[`textile`],load(){return Y(()=>import(`./textile-BUq3vgBH.js`).then(e=>Q(e.textile)),[])}}),G.of({name:`TiddlyWiki`,load(){return Y(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>Q(e.tiddlyWiki)),[])}}),G.of({name:`Tiki wiki`,load(){return Y(()=>import(`./tiki-C1XMixgx.js`).then(e=>Q(e.tiki)),[])}}),G.of({name:`TOML`,extensions:[`toml`],load(){return Y(()=>import(`./toml-BQjoWSzq.js`).then(e=>Q(e.toml)),[])}}),G.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Y(()=>import(`./troff-DbgTp3Cj.js`).then(e=>Q(e.troff)),[])}}),G.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Y(()=>import(`./ttcn-1OxchGWH.js`).then(e=>Q(e.ttcn)),[])}}),G.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Y(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>Q(e.ttcnCfg)),[])}}),G.of({name:`Turtle`,extensions:[`ttl`],load(){return Y(()=>import(`./turtle-D1WjVU4-.js`).then(e=>Q(e.turtle)),[])}}),G.of({name:`Web IDL`,extensions:[`webidl`],load(){return Y(()=>import(`./webidl-advQMGTP.js`).then(e=>Q(e.webIDL)),[])}}),G.of({name:`VB.NET`,extensions:[`vb`],load(){return Y(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>Q(e.vb)),[])}}),G.of({name:`VBScript`,extensions:[`vbs`],load(){return Y(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>Q(e.vbScript)),[])}}),G.of({name:`Velocity`,extensions:[`vtl`],load(){return Y(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>Q(e.velocity)),[])}}),G.of({name:`Verilog`,extensions:[`v`],load(){return Y(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),G.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Y(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>Q(e.vhdl)),[])}}),G.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Y(()=>import(`./xquery-CNzoFgd7.js`).then(e=>Q(e.xQuery)),[])}}),G.of({name:`Yacas`,extensions:[`ys`],load(){return Y(()=>import(`./yacas-BsmlDKac.js`).then(e=>Q(e.yacas)),[])}}),G.of({name:`Z80`,extensions:[`z80`],load(){return Y(()=>import(`./z80-Bnez4vZ_.js`).then(e=>Q(e.z80)),[])}}),G.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.mscgen)),[])}}),G.of({name:`Xù`,extensions:[`xu`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.xu)),[])}}),G.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.msgenny)),[])}}),G.of({name:`Vue`,extensions:[`vue`],load(){return Y(()=>import(`./dist-DJXdKb4L.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),G.of({name:`Angular Template`,load(){return Y(()=>import(`./dist-261eE4JG.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],EM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Tme={borderLeftWidth:`2px`},DM={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},OM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},kM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Eme={borderRadius:`2px`},AM={borderRadius:`2px`},jM={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},MM={width:`12px`,height:`12px`,borderRadius:`6px`},NM={borderRadius:`4px`,padding:`2px 6px`},PM={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},FM=`#0d1117`,IM=`#c9d1d9`,LM=`#264F78`,RM=`#8b949e`,zM=`#ffffff`,BM=`#7ee787`,VM=`#d2a8ff`,HM=`#79c0ff`,UM=`#ff7b72`,WM=`#a5d6ff`,Dme=`#2c333a`,Ome=`#3c444d`,GM=`#ffab70`,KM=`#161b22`,qM=`#30363d`,kme=`#21262d`,JM=`#f97583`,Ame=`#2d333b1a`,YM=`#21262d`,XM=zM,ZM=LM,jme=`#3a587a75`,QM=`#4d90fe`,$M=`#d29922`,Mme=`#3a587a55`,eN=`#58a6ff`,Nme=`#bc8cff`,tN=`#2ea04350`,nN=`#f8514940`,rN=`#7ee787`,iN=`#ff7b72`,aN=[I.theme({"&":{color:IM,backgroundColor:FM,fontSize:EM.fontSize,fontFamily:EM.fontFamily},".cm-content":{caretColor:XM,lineHeight:EM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:XM,borderLeftWidth:Tme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${XM}99`,color:FM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ZM},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${HM}`,color:IM,borderRadius:NM.borderRadius,"& span":{color:IM}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:QM,color:zM,padding:NM.padding,"& span":{color:zM}},".cm-search.cm-panel.cm-textfield":{color:IM,borderRadius:NM.borderRadius,padding:NM.padding},".cm-panels":{backgroundColor:YM,color:IM,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${qM}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${qM}`},".cm-panel button":{backgroundColor:YM,color:IM,border:kM.border,borderRadius:kM.borderRadius,padding:kM.padding},".cm-panel button:hover":{backgroundColor:Dme},".cm-activeLine":{backgroundColor:Ame,borderRadius:Eme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:KM,color:RM,border:OM.border,borderRight:`1px solid #30363d`,paddingRight:OM.paddingRight},".cm-activeLineGutter":{backgroundColor:kme,color:IM,fontWeight:OM.fontWeight},".cm-lineNumbers":{fontSize:OM.fontSize,lineHeight:OM.lineHeight},".cm-foldGutter":{fontSize:OM.fontSize,lineHeight:OM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:RM,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:IM},".cm-insertedLine":{textDecoration:DM.insertedTextDecoration,backgroundColor:tN,color:rN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:DM.insertedTextDecoration,backgroundColor:`${tN} !important`,color:rN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious,border:`1px solid ${rN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:DM.deletedTextDecoration,backgroundColor:nN,color:iN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:DM.deletedTextDecoration,backgroundColor:`${nN} !important`,color:iN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious,border:`1px solid ${iN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:YM,border:`1px solid ${qM}`,borderRadius:PM.borderRadius,padding:PM.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:YM,border:`none`},"& > ul > li":{padding:PM.padding,lineHeight:PM.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ZM,color:zM,borderRadius:PM.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:RM,paddingRight:PM.paddingRight},"& > ul > li > span.cm-completionDetail":{color:RM,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:YM,borderBottomColor:YM},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${JM}`},"&-warning":{borderLeft:`3px solid ${$M}`},"&-info":{borderLeft:`3px solid ${eN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${JM}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${$M}`},".cm-matchingBracket":{backgroundColor:jme,outline:`1px solid ${QM}`,borderRadius:AM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${JM}`,borderRadius:AM.borderRadius},".cm-selectionMatch":{backgroundColor:Mme,outline:`1px solid ${LM}50`,borderRadius:AM.borderRadius},".cm-foldPlaceholder":{backgroundColor:YM,color:RM,border:`1px dotted ${qM}70`,borderRadius:jM.borderRadius,padding:jM.padding,margin:jM.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${FM}, 0 0 0 3px ${eN}40`},"& .cm-scroller::-webkit-scrollbar":{width:MM.width,height:MM.height},"& .cm-scroller::-webkit-scrollbar-track":{background:KM},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:qM,borderRadius:MM.borderRadius,border:`3px solid ${KM}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Ome},".cm-ghostText":{opacity:`0.5`,color:RM}},{dark:!0}),D(V.define([{tag:A.keyword,color:UM,fontWeight:`bold`},{tag:A.controlKeyword,color:UM,fontWeight:`bold`},{tag:A.moduleKeyword,color:UM,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:HM},{tag:[A.variableName],color:HM},{tag:[A.propertyName],color:VM,fontStyle:`normal`},{tag:[A.typeName],color:UM},{tag:[A.className],color:VM,fontStyle:`italic`},{tag:[A.namespace],color:HM,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:IM},{tag:[A.bracket],color:RM},{tag:[A.brace],color:RM},{tag:[A.punctuation],color:RM},{tag:[A.function(A.variableName),A.labelName],color:BM},{tag:[A.definition(A.variableName)],color:HM},{tag:A.number,color:GM},{tag:A.changed,color:GM},{tag:A.annotation,color:JM,fontStyle:`italic`},{tag:A.modifier,color:GM,fontStyle:`italic`},{tag:A.self,color:GM},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:GM},{tag:[A.atom,A.bool,A.special(A.variableName)],color:GM},{tag:[A.processingInstruction,A.inserted],color:BM},{tag:[A.special(A.string),A.regexp],color:WM},{tag:A.string,color:WM},{tag:A.definition(A.typeName),color:UM,fontWeight:`bold`},{tag:A.meta,color:RM},{tag:A.comment,fontStyle:`italic`,color:RM},{tag:A.docComment,fontStyle:`italic`,color:RM},{tag:[A.tagName],color:BM},{tag:[A.attributeName],color:VM},{tag:[A.heading],fontWeight:`bold`,color:HM},{tag:[A.strong],fontWeight:`bold`,color:HM},{tag:[A.emphasis],fontStyle:`italic`,color:WM},{tag:[A.link],color:Nme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:eN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:IM,textDecoration:`underline wavy`,borderBottom:`1px wavy ${JM}`},{tag:[A.strikethrough],color:JM,textDecoration:`line-through`},{tag:A.constant(A.name),color:GM},{tag:A.deleted,color:JM},{tag:A.squareBracket,color:RM},{tag:A.angleBracket,color:RM},{tag:A.monospace,color:IM},{tag:[A.contentSeparator],color:HM},{tag:A.quote,color:RM}]))],oN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Pme={borderLeftWidth:`2px`},sN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},cN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},lN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Fme={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`,Ime=`#116329`,bN=`#6a737d`,xN=`#6f42c1`,SN=`#005cc5`,CN=`#d73a49`,wN=`#032f62`,TN=`#22863a`,EN=`#e36209`,Lme=`#f1f8ff`,DN=`#e1e4e8`,Rme=`#f8f9fa`,ON=`#cb2431`,zme=`#BBDFFF20`,kN=Rme,AN=gN,Bme=_N,Vme=`#e8f0fe`,Hme=`#0366d6`,jN=`#b08800`,MN=`#79b8ff40`,NN=`#0969da`,Ume=`#8250df`,PN=`#e6ffec80`,FN=`#ffebe980`,IN=`#0f6d31`,LN=`#cf222e`,RN=[I.theme({"&":{color:gN,backgroundColor:hN,fontSize:oN.fontSize,fontFamily:oN.fontFamily},".cm-content":{caretColor:AN,lineHeight:oN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:AN,borderLeftWidth:Pme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${AN}99`,color:hN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Bme,color:gN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${SN}`,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 ${DN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${DN}`},".cm-panel button":{backgroundColor:hN,color:gN,border:lN.border,borderRadius:lN.borderRadius,padding:lN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:zme,borderRadius:Fme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yN,color:vN,border:cN.border,borderRight:`1px solid ${DN}`,paddingRight:cN.paddingRight},".cm-activeLineGutter":{backgroundColor:Lme,color:gN,fontWeight:cN.fontWeight},".cm-lineNumbers":{fontSize:cN.fontSize,lineHeight:cN.lineHeight},".cm-foldGutter":{fontSize:cN.fontSize,lineHeight:cN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:vN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:gN},".cm-insertedLine":{textDecoration:sN.insertedTextDecoration,backgroundColor:PN,color:IN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:sN.insertedTextDecoration,backgroundColor:`${PN} !important`,color:IN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious,border:`1px solid ${IN}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:sN.deletedTextDecoration,backgroundColor:FN,color:LN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:sN.deletedTextDecoration,backgroundColor:`${FN} !important`,color:LN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious,border:`1px solid ${LN}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:kN,border:`1px solid ${DN}`,borderRadius:mN.borderRadius,padding:mN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:kN,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:kN,borderBottomColor:kN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${ON}`},"&-warning":{borderLeft:`3px solid ${jN}`},"&-info":{borderLeft:`3px solid ${NN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${ON}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${jN}`},".cm-matchingBracket":{backgroundColor:Vme,outline:`1px solid ${Hme}80`,borderRadius:uN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${ON}`,borderRadius:uN.borderRadius},".cm-selectionMatch":{backgroundColor:MN,outline:`1px solid ${_N}50`,borderRadius:uN.borderRadius},".cm-foldPlaceholder":{backgroundColor:MN,color:vN,border:`1px dotted ${DN}70`,borderRadius:dN.borderRadius,padding:dN.padding,margin:dN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${hN}, 0 0 0 3px ${NN}40`},"& .cm-scroller::-webkit-scrollbar":{width:fN.width,height:fN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:DN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:gN,borderRadius:fN.borderRadius,border:`3px solid ${DN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:bN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(V.define([{tag:A.keyword,color:CN,fontWeight:`bold`},{tag:A.controlKeyword,color:CN,fontWeight:`bold`},{tag:A.moduleKeyword,color:CN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:SN},{tag:[A.variableName],color:SN},{tag:[A.propertyName],color:xN,fontStyle:`normal`},{tag:[A.typeName],color:CN},{tag:[A.className],color:xN,fontStyle:`italic`},{tag:[A.namespace],color:SN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:gN},{tag:[A.bracket],color:bN},{tag:[A.brace],color:bN},{tag:[A.punctuation],color:bN},{tag:[A.function(A.variableName),A.labelName],color:TN},{tag:[A.definition(A.variableName)],color:SN},{tag:A.number,color:EN},{tag:A.changed,color:EN},{tag:A.annotation,color:ON,fontStyle:`italic`},{tag:A.modifier,color:EN,fontStyle:`italic`},{tag:A.self,color:EN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:EN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:EN},{tag:[A.processingInstruction,A.inserted],color:TN},{tag:[A.special(A.string),A.regexp],color:wN},{tag:A.string,color:wN},{tag:A.definition(A.typeName),color:CN,fontWeight:`bold`},{tag:A.meta,color:bN},{tag:A.comment,fontStyle:`italic`,color:bN},{tag:A.docComment,fontStyle:`italic`,color:bN},{tag:[A.tagName],color:Ime},{tag:[A.attributeName],color:xN},{tag:[A.heading],fontWeight:`bold`,color:SN},{tag:[A.strong],fontWeight:`bold`,color:SN},{tag:[A.emphasis],fontStyle:`italic`,color:wN},{tag:[A.link],color:Ume,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:NN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${ON}`},{tag:[A.strikethrough],color:ON,textDecoration:`line-through`},{tag:A.constant(A.name),color:EN},{tag:A.deleted,color:ON},{tag:A.squareBracket,color:bN},{tag:A.angleBracket,color:bN},{tag:A.monospace,color:gN},{tag:[A.contentSeparator],color:SN},{tag:A.quote,color:bN}]))],zN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Wme={borderLeftWidth:`2px`},BN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},VN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},HN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Gme={borderRadius:`2px`},UN={borderRadius:`2px`},WN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},GN={width:`12px`,height:`12px`,borderRadius:`6px`},KN={borderRadius:`4px`,padding:`2px 6px`},qN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},JN=`#282828`,YN=`#3c3836`,XN=`#504945`,ZN=`#665c54`,Kme=`#7c6f64`,QN=`#928374`,$N=`#fbf1c7`,eP=`#ebdbb2`,tP=`#fb4934`,nP=`#b8bb26`,rP=`#fabd2f`,iP=`#83a598`,aP=`#d3869b`,oP=`#8ec07c`,sP=`#fe8019`,cP=tP,qme=YN,Jme=`#3c383660`,Yme=JN,lP=YN,uP=XN,Xme=`#665c5480`,dP=sP,Zme=`#504945cc`,Qme=rP,fP=rP,pP=iP,$me=aP,mP=`#32361a80`,hP=`#3c1f1e80`,gP=`#b8bb26`,_P=`#fb4934`,ehe=[I.theme({"&":{color:eP,backgroundColor:Yme,fontSize:zN.fontSize,fontFamily:zN.fontFamily},".cm-content":{caretColor:dP,lineHeight:zN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dP,borderLeftWidth:Wme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dP}99`,color:JN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:uP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${rP}`,color:$N,borderRadius:KN.borderRadius,"& span":{color:$N}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:sP,color:JN,padding:KN.padding,"& span":{color:JN}},".cm-search.cm-panel.cm-textfield":{color:eP,borderRadius:KN.borderRadius,padding:KN.padding},".cm-panels":{backgroundColor:lP,color:eP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ZN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ZN}`},".cm-panel button":{backgroundColor:lP,color:eP,border:HN.border,borderRadius:HN.borderRadius,padding:HN.padding},".cm-panel button:hover":{backgroundColor:XN},".cm-activeLine":{backgroundColor:Jme,borderRadius:Gme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YN,color:QN,border:VN.border,borderRight:`1px solid ${XN}`,paddingRight:VN.paddingRight},".cm-activeLineGutter":{backgroundColor:qme,color:eP,fontWeight:VN.fontWeight},".cm-lineNumbers":{fontSize:VN.fontSize,lineHeight:VN.lineHeight},".cm-foldGutter":{fontSize:VN.fontSize,lineHeight:VN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:QN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:eP},".cm-insertedLine":{textDecoration:BN.insertedTextDecoration,backgroundColor:mP,color:gP,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:BN.insertedTextDecoration,backgroundColor:`${mP} !important`,color:gP,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious,border:`1px solid ${gP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:BN.deletedTextDecoration,backgroundColor:hP,color:_P,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:BN.deletedTextDecoration,backgroundColor:`${hP} !important`,color:_P,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious,border:`1px solid ${_P}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:lP,border:`1px solid ${ZN}`,borderRadius:qN.borderRadius,padding:qN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:lP,border:`none`},"& > ul > li":{padding:qN.padding,lineHeight:qN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:uP,color:$N,borderRadius:qN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:QN,paddingRight:qN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:QN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:lP,borderBottomColor:lP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${cP}`},"&-warning":{borderLeft:`3px solid ${fP}`},"&-info":{borderLeft:`3px solid ${pP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${cP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${fP}`},".cm-matchingBracket":{backgroundColor:Zme,outline:`1px solid ${Qme}`,borderRadius:UN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${cP}`,borderRadius:UN.borderRadius},".cm-selectionMatch":{backgroundColor:Xme,outline:`1px solid ${ZN}`,borderRadius:UN.borderRadius},".cm-foldPlaceholder":{backgroundColor:lP,color:QN,border:`1px dotted ${ZN}`,borderRadius:WN.borderRadius,padding:WN.padding,margin:WN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${JN}, 0 0 0 3px ${sP}40`},"& .cm-scroller::-webkit-scrollbar":{width:GN.width,height:GN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ZN,borderRadius:GN.borderRadius,border:`3px solid ${YN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Kme},".cm-ghostText":{opacity:`0.5`,color:QN}},{dark:!0}),D(V.define([{tag:A.keyword,color:tP,fontWeight:`bold`},{tag:A.controlKeyword,color:tP,fontWeight:`bold`},{tag:A.moduleKeyword,color:tP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:iP},{tag:[A.variableName],color:iP},{tag:[A.propertyName],color:oP,fontStyle:`normal`},{tag:[A.typeName],color:oP},{tag:[A.className],color:rP,fontStyle:`italic`},{tag:[A.namespace],color:iP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:eP},{tag:[A.bracket],color:QN},{tag:[A.brace],color:QN},{tag:[A.punctuation],color:QN},{tag:[A.function(A.variableName),A.labelName],color:rP},{tag:[A.definition(A.variableName)],color:iP},{tag:A.number,color:aP},{tag:A.changed,color:aP},{tag:A.annotation,color:cP,fontStyle:`italic`},{tag:A.modifier,color:aP,fontStyle:`italic`},{tag:A.self,color:aP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:sP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:sP},{tag:[A.processingInstruction,A.inserted],color:nP},{tag:[A.special(A.string),A.regexp],color:nP},{tag:A.string,color:nP},{tag:A.definition(A.typeName),color:oP,fontWeight:`bold`},{tag:A.meta,color:QN},{tag:A.comment,fontStyle:`italic`,color:QN},{tag:A.docComment,fontStyle:`italic`,color:QN},{tag:[A.tagName],color:tP},{tag:[A.attributeName],color:rP},{tag:[A.heading],fontWeight:`bold`,color:rP},{tag:[A.strong],fontWeight:`bold`,color:rP},{tag:[A.emphasis],fontStyle:`italic`,color:nP},{tag:[A.link],color:$me,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:pP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:eP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${cP}`},{tag:[A.strikethrough],color:cP,textDecoration:`line-through`},{tag:A.constant(A.name),color:sP},{tag:A.deleted,color:cP},{tag:A.squareBracket,color:QN},{tag:A.angleBracket,color:QN},{tag:A.monospace,color:eP},{tag:[A.contentSeparator],color:iP},{tag:A.quote,color:QN}]))],vP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},the={borderLeftWidth:`2px`},yP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},bP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},xP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},nhe={borderRadius:`2px`},SP={borderRadius:`2px`},CP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},wP={width:`12px`,height:`12px`,borderRadius:`6px`},TP={borderRadius:`4px`,padding:`2px 6px`},EP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},DP=`#3c3836`,rhe=`#504945`,ihe=`#665c54`,OP=`#7c6f64`,kP=`#928374`,AP=`#fbf1c7`,jP=`#ebdbb2`,MP=`#d5c4a1`,NP=`#bdae93`,ahe=`#a89984`,PP=`#9d0006`,FP=`#79740e`,IP=`#b57614`,LP=`#076678`,RP=`#8f3f71`,zP=`#427b58`,BP=`#af3a03`,VP=PP,ohe=jP,she=`#ffc42e25`,che=AP,HP=jP,lhe=ohe,uhe=`#ffc42e40`,UP=BP,dhe=`#d5c4a180`,fhe=BP,WP=IP,GP=LP,phe=RP,KP=`#d8e5bc80`,qP=`#f7cfcf80`,JP=`#79740e`,YP=`#9d0006`,mhe=[I.theme({"&":{color:DP,backgroundColor:che,fontSize:vP.fontSize,fontFamily:vP.fontFamily},".cm-content":{caretColor:UP,lineHeight:vP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:UP,borderLeftWidth:the.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${UP}99`,color:AP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lhe,color:DP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${BP}`,color:DP,borderRadius:TP.borderRadius,"& span":{color:DP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BP,color:AP,padding:TP.padding,"& span":{color:AP}},".cm-search.cm-panel.cm-textfield":{color:DP,borderRadius:TP.borderRadius,padding:TP.padding},".cm-panels":{backgroundColor:jP,color:rhe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${NP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${NP}`},".cm-panel button":{backgroundColor:AP,color:DP,border:xP.border,borderRadius:xP.borderRadius,padding:xP.padding},".cm-panel button:hover":{backgroundColor:MP},".cm-activeLine":{backgroundColor:she,borderRadius:nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:jP,color:OP,border:bP.border,borderRight:`1px solid ${NP}`,paddingRight:bP.paddingRight},".cm-activeLineGutter":{backgroundColor:MP,color:DP,fontWeight:bP.fontWeight},".cm-lineNumbers":{fontSize:bP.fontSize,lineHeight:bP.lineHeight},".cm-foldGutter":{fontSize:bP.fontSize,lineHeight:bP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:DP},".cm-insertedLine":{textDecoration:yP.insertedTextDecoration,backgroundColor:KP,color:JP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:yP.insertedTextDecoration,backgroundColor:`${KP} !important`,color:JP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious,border:`1px solid ${JP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:yP.deletedTextDecoration,backgroundColor:qP,color:YP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:yP.deletedTextDecoration,backgroundColor:`${qP} !important`,color:YP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious,border:`1px solid ${YP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:HP,border:`1px solid ${NP}`,borderRadius:EP.borderRadius,padding:EP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:HP,border:`none`},"& > ul > li":{padding:EP.padding,lineHeight:EP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:BP+`30`,color:DP,borderRadius:EP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:BP+`15`},"& > ul > li > span.cm-completionIcon":{color:OP,paddingRight:EP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:HP,borderBottomColor:HP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${VP}`},"&-warning":{borderLeft:`3px solid ${WP}`},"&-info":{borderLeft:`3px solid ${GP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${VP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${WP}`},".cm-matchingBracket":{backgroundColor:dhe,outline:`1px solid ${fhe}`,borderRadius:SP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${VP}`,borderRadius:SP.borderRadius},".cm-selectionMatch":{backgroundColor:uhe,outline:`1px solid ${NP}`,borderRadius:SP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:ihe,border:`1px dotted ${NP}`,borderRadius:CP.borderRadius,padding:CP.padding,margin:CP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${AP}, 0 0 0 3px ${BP}40`},"& .cm-scroller::-webkit-scrollbar":{width:wP.width,height:wP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:AP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:NP,borderRadius:wP.borderRadius,border:`3px solid ${AP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:ahe},".cm-ghostText":{opacity:`0.5`,color:kP}},{dark:!1}),D(V.define([{tag:A.keyword,color:PP,fontWeight:`bold`},{tag:A.controlKeyword,color:PP,fontWeight:`bold`},{tag:A.moduleKeyword,color:PP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:LP},{tag:[A.variableName],color:LP},{tag:[A.propertyName],color:zP,fontStyle:`normal`},{tag:[A.typeName],color:zP},{tag:[A.className],color:IP,fontStyle:`italic`},{tag:[A.namespace],color:LP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:DP},{tag:[A.bracket],color:kP},{tag:[A.brace],color:kP},{tag:[A.punctuation],color:kP},{tag:[A.function(A.variableName),A.labelName],color:IP},{tag:[A.definition(A.variableName)],color:LP},{tag:A.number,color:RP},{tag:A.changed,color:RP},{tag:A.annotation,color:VP,fontStyle:`italic`},{tag:A.modifier,color:RP,fontStyle:`italic`},{tag:A.self,color:RP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:BP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:BP},{tag:[A.processingInstruction,A.inserted],color:FP},{tag:[A.special(A.string),A.regexp],color:FP},{tag:A.string,color:FP},{tag:A.definition(A.typeName),color:zP,fontWeight:`bold`},{tag:A.meta,color:kP},{tag:A.comment,fontStyle:`italic`,color:kP},{tag:A.docComment,fontStyle:`italic`,color:kP},{tag:[A.tagName],color:PP},{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:FP},{tag:[A.link],color:phe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:GP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:DP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${VP}`},{tag:[A.strikethrough],color:VP,textDecoration:`line-through`},{tag:A.constant(A.name),color:BP},{tag:A.deleted,color:VP},{tag:A.squareBracket,color:kP},{tag:A.angleBracket,color:kP},{tag:A.monospace,color:DP},{tag:[A.contentSeparator],color:LP},{tag:A.quote,color:kP}]))],XP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hhe={borderLeftWidth:`2px`},ZP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},QP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},$P={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ghe={borderRadius:`2px`},eF={borderRadius:`2px`},tF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},nF={width:`12px`,height:`12px`,borderRadius:`6px`},rF={borderRadius:`4px`,padding:`2px 6px`},iF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},aF=`#212121`,oF=`#505d64`,sF=`#606f7a`,cF=`#707d8b`,_he=`#a0a4ae`,lF=`#bdbdbd`,uF=`#e0e0e0`,vhe=`#202325`,dF=`#ff5f52`,fF=`#ff6e40`,yhe=`#fa5788`,pF=`#facf4e`,mF=`#ffad42`,hF=`#56c8d8`,gF=`#7186f0`,_F=`#cf6edf`,bhe=`#6abf69`,xhe=`#99d066`,She=`#4ebaaa`,vF=dF,yF=vhe,Che=`#2d333b30`,bF=aF,xF=oF,SF=`#ffffff1f`,whe=`#4A707A80`,CF=_he,The=`#39496650`,Ehe=hF,wF=mF,TF=hF,Dhe=_F,EF=`#1e3d2780`,DF=`#4e282880`,OF=`#6abf69`,kF=`#ff5f52`,Ohe=[I.theme({"&":{color:lF,backgroundColor:bF,fontSize:XP.fontSize,fontFamily:XP.fontFamily},".cm-content":{caretColor:CF,lineHeight:XP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CF,borderLeftWidth:hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CF}99`,color:bF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:SF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${hF}`,color:uF,borderRadius:rF.borderRadius,"& span":{color:uF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:hF,color:bF,padding:rF.padding,"& span":{color:bF}},".cm-search.cm-panel.cm-textfield":{color:lF,borderRadius:rF.borderRadius,padding:rF.padding},".cm-panels":{backgroundColor:aF,color:lF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${cF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${cF}`},".cm-panel button":{backgroundColor:xF,color:lF,border:$P.border,borderRadius:$P.borderRadius,padding:$P.padding},".cm-panel button:hover":{backgroundColor:sF},".cm-activeLine":{backgroundColor:Che,borderRadius:ghe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yF,color:cF,border:QP.border,borderRight:`1px solid ${oF}`,paddingRight:QP.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:lF,fontWeight:QP.fontWeight},".cm-lineNumbers":{fontSize:QP.fontSize,lineHeight:QP.lineHeight},".cm-foldGutter":{fontSize:QP.fontSize,lineHeight:QP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:cF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:lF},".cm-insertedLine":{textDecoration:ZP.insertedTextDecoration,backgroundColor:EF,color:OF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:ZP.insertedTextDecoration,backgroundColor:`${EF} !important`,color:OF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious,border:`1px solid ${OF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:ZP.deletedTextDecoration,backgroundColor:DF,color:kF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:ZP.deletedTextDecoration,backgroundColor:`${DF} !important`,color:kF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious,border:`1px solid ${kF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:xF,border:`1px solid ${cF}`,borderRadius:iF.borderRadius,padding:iF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:xF,border:`none`},"& > ul > li":{padding:iF.padding,lineHeight:iF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:SF,color:uF,borderRadius:iF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:cF,paddingRight:iF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:cF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:xF,borderBottomColor:xF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${vF}`},"&-warning":{borderLeft:`3px solid ${wF}`},"&-info":{borderLeft:`3px solid ${TF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${vF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${wF}`},".cm-matchingBracket":{backgroundColor:The,outline:`1px solid ${Ehe}`,borderRadius:eF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${vF}`,borderRadius:eF.borderRadius},".cm-selectionMatch":{backgroundColor:whe,outline:`1px solid ${sF}50`,borderRadius:eF.borderRadius},".cm-foldPlaceholder":{backgroundColor:xF,color:cF,border:`1px dotted ${cF}70`,borderRadius:tF.borderRadius,padding:tF.padding,margin:tF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${bF}, 0 0 0 3px ${hF}40`},"& .cm-scroller::-webkit-scrollbar":{width:nF.width,height:nF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:sF,borderRadius:nF.borderRadius,border:`3px solid ${yF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:cF},".cm-ghostText":{opacity:`0.5`,color:cF}},{dark:!0}),D(V.define([{tag:A.keyword,color:dF,fontWeight:`bold`},{tag:A.controlKeyword,color:dF,fontWeight:`bold`},{tag:A.moduleKeyword,color:dF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:gF},{tag:[A.variableName],color:xhe},{tag:[A.propertyName],color:_F,fontStyle:`normal`},{tag:[A.typeName],color:dF},{tag:[A.className],color:pF,fontStyle:`italic`},{tag:[A.namespace],color:gF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lF},{tag:[A.bracket],color:cF},{tag:[A.brace],color:cF},{tag:[A.punctuation],color:cF},{tag:[A.function(A.variableName)],color:hF},{tag:[A.labelName],color:hF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:hF},{tag:[A.definition(A.variableName)],color:gF},{tag:A.number,color:pF},{tag:A.changed,color:pF},{tag:A.annotation,color:vF,fontStyle:`italic`},{tag:A.modifier,color:fF,fontStyle:`italic`},{tag:A.self,color:fF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:fF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:fF},{tag:[A.processingInstruction,A.inserted],color:bhe},{tag:[A.special(A.string),A.regexp],color:yhe},{tag:A.string,color:mF},{tag:A.definition(A.typeName),color:dF,fontWeight:`bold`},{tag:A.meta,color:cF},{tag:A.comment,fontStyle:`italic`,color:cF},{tag:A.docComment,fontStyle:`italic`,color:cF},{tag:[A.tagName],color:_F},{tag:[A.attributeName],color:pF},{tag:[A.heading],fontWeight:`bold`,color:She},{tag:A.heading1,color:pF},{tag:A.heading2,color:mF},{tag:A.heading3,color:hF},{tag:A.heading4,color:gF},{tag:A.heading5,color:_F},{tag:A.heading6,color:dF},{tag:[A.strong],fontWeight:`bold`,color:gF},{tag:[A.emphasis],fontStyle:`italic`,color:mF},{tag:[A.link],color:Dhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:TF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:lF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${vF}`},{tag:[A.strikethrough],color:vF,textDecoration:`line-through`},{tag:A.constant(A.name),color:fF},{tag:A.deleted,color:vF},{tag:A.squareBracket,color:cF},{tag:A.angleBracket,color:cF},{tag:A.monospace,color:lF},{tag:[A.contentSeparator],color:gF},{tag:A.quote,color:cF}]))],AF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},khe={borderLeftWidth:`2px`},jF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},MF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},NF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ahe={borderRadius:`2px`},PF={borderRadius:`2px`},FF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},IF={width:`12px`,height:`12px`,borderRadius:`6px`},LF={borderRadius:`4px`,padding:`2px 6px`},RF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},jhe=`#ffffff`,zF=`#f5f5f5`,BF=`#212121`,VF=`#757575`,HF=`#9e9e9e`,UF=`#424242`,Mhe=`#eeeeee`,WF=`#fafafa`,GF=`#f44336`,KF=`#ff3e00`,qF=`#FF00E9FF`,Nhe=`#ffc107`,JF=`#ff9800`,YF=`#00acc1`,XF=`#3949ab`,ZF=`#8e24aa`,QF=`#43a047`,$F=`#00897b`,eI=`#1e88e5`,tI=GF,Phe=`#00000008`,nI=jhe,rI=zF,Fhe=`#DDEEFF`,Ihe=`#90a4ae26`,iI=HF,Lhe=`#DDEEFF80`,Rhe=YF,aI=JF,oI=YF,zhe=ZF,sI=`#ECEFF180`,cI=`#e6ffed80`,lI=`#ffebe980`,uI=`#28a745`,dI=`#d73a49`,Bhe=[I.theme({"&":{color:BF,backgroundColor:nI,fontSize:AF.fontSize,fontFamily:AF.fontFamily},".cm-content":{caretColor:iI,lineHeight:AF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:iI,borderLeftWidth:khe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${BF}99`,color:nI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Fhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${Nhe}`,color:BF,borderRadius:LF.borderRadius,"& span":{color:BF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:YF,color:nI,padding:LF.padding,"& span":{color:nI}},".cm-search.cm-panel.cm-textfield":{color:BF,borderRadius:LF.borderRadius,padding:LF.padding},".cm-panels":{backgroundColor:Mhe,color:BF,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${HF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${HF}`},".cm-panel button":{backgroundColor:rI,color:BF,border:NF.border,borderRadius:NF.borderRadius,padding:NF.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:Phe,borderRadius:Ahe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:WF,color:VF,border:MF.border,borderRight:`1px solid ${HF}`,paddingRight:MF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:BF,fontWeight:MF.fontWeight},".cm-lineNumbers":{fontSize:MF.fontSize,lineHeight:MF.lineHeight},".cm-foldGutter":{fontSize:MF.fontSize,lineHeight:MF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:VF,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:BF},".cm-insertedLine":{textDecoration:jF.insertedTextDecoration,backgroundColor:cI,color:uI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:jF.insertedTextDecoration,backgroundColor:`${cI} !important`,color:uI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious,border:`1px solid ${uI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:jF.deletedTextDecoration,backgroundColor:lI,color:dI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:jF.deletedTextDecoration,backgroundColor:`${lI} !important`,color:dI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious,border:`1px solid ${dI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:rI,border:`1px solid ${HF}`,borderRadius:RF.borderRadius,padding:RF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:rI,border:`none`},"& > ul > li":{padding:RF.padding,lineHeight:RF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:sI,color:BF,borderRadius:RF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:sI},"& > ul > li > span.cm-completionIcon":{color:VF,paddingRight:RF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:VF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:rI,borderBottomColor:rI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${tI}`},"&-warning":{borderLeft:`3px solid ${aI}`},"&-info":{borderLeft:`3px solid ${oI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${tI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${aI}`},".cm-matchingBracket":{backgroundColor:Lhe,outline:`1px solid ${Rhe}`,borderRadius:PF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${tI}20`,outline:`1px solid ${tI}`,borderRadius:PF.borderRadius},".cm-selectionMatch":{backgroundColor:Ihe,outline:`1px solid ${VF}30`,borderRadius:PF.borderRadius},".cm-foldPlaceholder":{backgroundColor:zF,color:VF,border:`1px dotted ${VF}70`,borderRadius:FF.borderRadius,padding:FF.padding,margin:FF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${nI}, 0 0 0 3px ${YF}40`},"& .cm-scroller::-webkit-scrollbar":{width:IF.width,height:IF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:WF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:VF,borderRadius:IF.borderRadius,border:`3px solid ${WF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:BF},".cm-ghostText":{opacity:`0.5`,color:VF}},{dark:!1}),D(V.define([{tag:A.keyword,color:YF,fontWeight:`bold`},{tag:A.controlKeyword,color:YF,fontWeight:`bold`},{tag:A.moduleKeyword,color:YF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:UF},{tag:[A.variableName],color:UF},{tag:[A.propertyName],color:$F,fontStyle:`normal`},{tag:[A.typeName],color:JF},{tag:[A.className],color:JF,fontStyle:`italic`},{tag:[A.namespace],color:XF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:XF},{tag:[A.bracket],color:ZF},{tag:[A.brace],color:ZF},{tag:[A.punctuation],color:VF},{tag:[A.function(A.variableName)],color:KF},{tag:[A.labelName],color:eI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:KF},{tag:[A.definition(A.variableName)],color:qF},{tag:A.number,color:JF},{tag:A.changed,color:JF},{tag:A.annotation,color:tI,fontStyle:`italic`},{tag:A.modifier,color:JF,fontStyle:`italic`},{tag:A.self,color:JF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JF},{tag:[A.atom,A.bool],color:ZF},{tag:[A.processingInstruction,A.inserted],color:QF},{tag:A.string,color:QF},{tag:[A.special(A.string),A.regexp],color:qF},{tag:A.definition(A.typeName),color:qF,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:qF},{tag:A.meta,color:VF},{tag:A.comment,fontStyle:`italic`,color:VF},{tag:A.docComment,fontStyle:`italic`,color:VF},{tag:[A.tagName],color:KF},{tag:[A.attributeName],color:UF},{tag:[A.heading],fontWeight:`bold`,color:$F},{tag:A.heading1,color:eI},{tag:A.heading2,color:JF},{tag:A.heading3,color:YF},{tag:A.heading4,color:XF},{tag:A.heading5,color:ZF},{tag:A.heading6,color:QF},{tag:[A.strong],fontWeight:`bold`,color:XF},{tag:[A.emphasis],fontStyle:`italic`,color:JF},{tag:[A.link],color:zhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:oI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:BF,textDecoration:`underline wavy`,borderBottom:`1px dotted ${GF}`},{tag:[A.strikethrough],color:tI,textDecoration:`line-through`},{tag:A.constant(A.name),color:KF},{tag:A.deleted,color:tI},{tag:A.squareBracket,color:GF},{tag:A.angleBracket,color:BF},{tag:A.monospace,color:BF},{tag:[A.contentSeparator],color:YF},{tag:A.quote,color:QF}]))],fI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Vhe={borderLeftWidth:`2px`},pI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},mI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},hI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Hhe={borderRadius:`2px`},gI={borderRadius:`2px`},_I={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},vI={width:`12px`,height:`12px`,borderRadius:`6px`},yI={borderRadius:`4px`,padding:`2px 6px`},bI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},xI=`#272822`,SI=`#f8f8f2`,CI=`#88846f`,Uhe=`#f8f8f0`,wI=`#F92672`,TI=`#FD971F`,EI=`#66D9EF`,DI=`#E6DB74`,OI=`#AE81FF`,kI=`#A6E22E`,AI=`#F44747`,jI=`#414339`,Whe=`#3e3d3257`,MI=`#34352f`,NI=`#49483E`,Ghe=`#75715e70`,PI=Uhe,Khe=`#75715E55`,qhe=EI,FI=TI,II=EI,Jhe=OI,LI=`#3d4d3880`,RI=`#4d393980`,zI=`#A6E22E`,BI=`#F92672`,Yhe=[I.theme({"&":{color:SI,backgroundColor:xI,fontSize:fI.fontSize,fontFamily:fI.fontFamily},".cm-content":{caretColor:PI,lineHeight:fI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:PI,borderLeftWidth:Vhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${PI}99`,color:xI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:NI},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${DI}`,color:SI,borderRadius:yI.borderRadius,"& span":{color:SI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:wI,color:xI,padding:yI.padding,"& span":{color:xI}},".cm-search.cm-panel.cm-textfield":{color:SI,borderRadius:yI.borderRadius,padding:yI.padding},".cm-panels":{backgroundColor:jI,color:SI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${CI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${CI}80`},".cm-panel button":{backgroundColor:MI,color:SI,border:hI.border,borderRadius:hI.borderRadius,padding:hI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:Whe,borderRadius:Hhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:jI,color:CI,border:mI.border,borderRight:`1px solid #3e3d32`,paddingRight:mI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:SI,fontWeight:mI.fontWeight},".cm-lineNumbers":{fontSize:mI.fontSize,lineHeight:mI.lineHeight},".cm-foldGutter":{fontSize:mI.fontSize,lineHeight:mI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:CI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:SI},".cm-insertedLine":{textDecoration:pI.insertedTextDecoration,backgroundColor:LI,color:zI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:pI.insertedTextDecoration,backgroundColor:`${LI} !important`,color:zI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious,border:`1px solid ${zI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:pI.deletedTextDecoration,backgroundColor:RI,color:BI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:pI.deletedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious,border:`1px solid ${BI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:MI,border:`1px solid #49483E`,borderRadius:bI.borderRadius,padding:bI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:MI,border:`none`},"& > ul > li":{padding:bI.padding,lineHeight:bI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:NI,color:SI,borderRadius:bI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:CI,paddingRight:bI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:CI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:MI,borderBottomColor:MI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${AI}`},"&-warning":{borderLeft:`3px solid ${FI}`},"&-info":{borderLeft:`3px solid ${II}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${AI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${FI}`},".cm-matchingBracket":{backgroundColor:Khe,outline:`1px solid ${qhe}`,borderRadius:gI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${AI}`,borderRadius:gI.borderRadius},".cm-selectionMatch":{backgroundColor:Ghe,outline:`1px solid ${CI}50`,borderRadius:gI.borderRadius},".cm-foldPlaceholder":{backgroundColor:MI,color:CI,border:`1px dotted ${CI}70`,borderRadius:_I.borderRadius,padding:_I.padding,margin:_I.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${xI}, 0 0 0 3px ${EI}40`},"& .cm-scroller::-webkit-scrollbar":{width:vI.width,height:vI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:jI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:vI.borderRadius,border:`3px solid ${jI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:CI}},{dark:!0}),D(V.define([{tag:A.keyword,color:wI,fontWeight:`bold`},{tag:A.controlKeyword,color:wI,fontWeight:`bold`},{tag:A.moduleKeyword,color:wI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:TI},{tag:[A.variableName],color:TI},{tag:[A.propertyName],color:kI,fontStyle:`normal`},{tag:[A.typeName],color:EI,fontStyle:`italic`},{tag:[A.className],color:kI,fontStyle:`italic`},{tag:[A.namespace],color:TI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:wI},{tag:[A.bracket],color:SI},{tag:[A.brace],color:SI},{tag:[A.punctuation],color:SI},{tag:[A.function(A.variableName),A.labelName],color:EI},{tag:[A.definition(A.function(A.variableName))],color:EI},{tag:[A.definition(A.variableName)],color:TI},{tag:A.number,color:OI},{tag:A.changed,color:OI},{tag:A.annotation,color:AI,fontStyle:`italic`},{tag:A.modifier,color:OI,fontStyle:`italic`},{tag:A.self,color:OI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:OI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:OI},{tag:[A.processingInstruction,A.inserted],color:kI},{tag:[A.special(A.string),A.regexp],color:DI},{tag:A.string,color:DI},{tag:A.definition(A.typeName),color:EI,fontWeight:`bold`},{tag:A.meta,color:CI},{tag:A.comment,fontStyle:`italic`,color:CI},{tag:A.docComment,fontStyle:`italic`,color:CI},{tag:[A.tagName],color:wI},{tag:[A.attributeName],color:kI},{tag:[A.heading],fontWeight:`bold`,color:kI},{tag:[A.strong],fontWeight:`bold`,color:TI},{tag:[A.emphasis],fontStyle:`italic`,color:TI},{tag:[A.link],color:Jhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:II,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:SI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${AI}`},{tag:[A.strikethrough],color:AI,textDecoration:`line-through`},{tag:A.constant(A.name),color:OI},{tag:A.deleted,color:AI},{tag:A.squareBracket,color:SI},{tag:A.angleBracket,color:SI},{tag:A.monospace,color:SI},{tag:[A.contentSeparator],color:TI},{tag:A.quote,color:CI}]))],VI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Xhe={borderLeftWidth:`2px`},HI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},UI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},WI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Zhe={borderRadius:`2px`},GI={borderRadius:`2px`},KI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},qI={width:`12px`,height:`12px`,borderRadius:`6px`},JI={borderRadius:`4px`,padding:`2px 6px`},YI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Qhe=`#2e3440`,XI=`#3b4252`,ZI=`#434c5e`,QI=`#4c566a`,$I=`#d8dee9`,eL=`#eceff4`,tL=`#8fbcbb`,nL=`#88c0d0`,rL=`#81a1c1`,iL=`#5e81ac`,aL=`#bf616a`,oL=`#d08770`,sL=`#ebcb8b`,cL=`#a3be8c`,lL=`#b48ead`,$he=`#d30102`,uL=`#252a33`,ege=`#3b425277`,dL=Qhe,fL=XI,tge=ZI,nge=`#4c566a80`,pL=$I,rge=`#4c566a55`,ige=nL,mL=sL,hL=rL,age=lL,gL=`#3b4a3880`,_L=`#4a393a80`,vL=`#a3be8c`,yL=`#bf616a`,oge=[I.theme({"&":{color:$I,backgroundColor:dL,fontSize:VI.fontSize,fontFamily:VI.fontFamily},".cm-content":{caretColor:pL,lineHeight:VI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:pL,borderLeftWidth:Xhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${pL}99`,color:dL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:tge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${tL}`,color:$I,borderRadius:JI.borderRadius,"& span":{color:$I}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:rL,color:eL,padding:JI.padding,"& span":{color:eL}},".cm-search.cm-panel.cm-textfield":{color:$I,borderRadius:JI.borderRadius,padding:JI.padding},".cm-panels":{backgroundColor:uL,color:$I,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${QI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${QI}`},".cm-panel button":{backgroundColor:fL,color:$I,border:WI.border,borderRadius:WI.borderRadius,padding:WI.padding},".cm-panel button:hover":{backgroundColor:ZI},".cm-activeLine":{backgroundColor:ege,borderRadius:Zhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:uL,color:QI,border:UI.border,borderRight:`1px solid ${ZI}`,paddingRight:UI.paddingRight},".cm-activeLineGutter":{backgroundColor:XI,color:$I,fontWeight:UI.fontWeight},".cm-lineNumbers":{fontSize:UI.fontSize,lineHeight:UI.lineHeight},".cm-foldGutter":{fontSize:UI.fontSize,lineHeight:UI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:QI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:$I},".cm-insertedLine":{textDecoration:HI.insertedTextDecoration,backgroundColor:gL,color:vL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:HI.insertedTextDecoration,backgroundColor:`${gL} !important`,color:vL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious,border:`1px solid ${vL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:HI.deletedTextDecoration,backgroundColor:_L,color:yL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:HI.deletedTextDecoration,backgroundColor:`${_L} !important`,color:yL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious,border:`1px solid ${yL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:fL,border:`1px solid ${QI}`,borderRadius:YI.borderRadius,padding:YI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:fL,border:`none`},"& > ul > li":{padding:YI.padding,lineHeight:YI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ZI,color:eL,borderRadius:YI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:QI,paddingRight:YI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:QI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:fL,borderBottomColor:fL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${aL}`},"&-warning":{borderLeft:`3px solid ${mL}`},"&-info":{borderLeft:`3px solid ${hL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${aL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${mL}`},".cm-matchingBracket":{backgroundColor:rge,outline:`1px solid ${ige}`,borderRadius:GI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${aL}40`,outline:`1px solid ${$he}`,borderRadius:GI.borderRadius},".cm-selectionMatch":{backgroundColor:nge,outline:`1px solid ${ZI}50`,borderRadius:GI.borderRadius},".cm-foldPlaceholder":{backgroundColor:fL,color:QI,border:`1px dotted ${QI}70`,borderRadius:KI.borderRadius,padding:KI.padding,margin:KI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${dL}, 0 0 0 3px ${nL}40`},"& .cm-scroller::-webkit-scrollbar":{width:qI.width,height:qI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:uL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ZI,borderRadius:qI.borderRadius,border:`3px solid ${uL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:QI},".cm-ghostText":{opacity:`0.5`,color:QI}},{dark:!0}),D(V.define([{tag:A.keyword,color:iL,fontWeight:`bold`},{tag:A.controlKeyword,color:iL,fontWeight:`bold`},{tag:A.moduleKeyword,color:iL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:nL},{tag:[A.variableName],color:$I},{tag:[A.propertyName],color:nL,fontStyle:`normal`},{tag:[A.typeName],color:sL},{tag:[A.className],color:sL,fontStyle:`italic`},{tag:[A.namespace],color:rL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lL},{tag:[A.bracket],color:$I},{tag:[A.brace],color:tL},{tag:[A.punctuation],color:$I},{tag:[A.function(A.variableName),A.labelName],color:tL},{tag:[A.definition(A.function(A.variableName))],color:tL},{tag:[A.definition(A.variableName)],color:oL},{tag:A.number,color:oL},{tag:A.changed,color:lL},{tag:A.annotation,color:aL,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:oL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:lL},{tag:[A.processingInstruction,A.inserted],color:tL},{tag:[A.special(A.string),A.regexp],color:lL},{tag:A.string,color:cL},{tag:A.definition(A.typeName),color:sL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:cL},{tag:A.meta,color:QI},{tag:A.comment,fontStyle:`italic`,color:QI},{tag:A.docComment,fontStyle:`italic`,color:QI},{tag:[A.tagName],color:aL},{tag:[A.attributeName],color:sL},{tag:[A.heading],fontWeight:`bold`,color:rL},{tag:[A.strong],fontWeight:`bold`,color:nL},{tag:[A.emphasis],fontStyle:`italic`,color:sL},{tag:[A.link],color:age,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:hL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:$I,textDecoration:`underline wavy`,borderBottom:`1px wavy ${aL}`},{tag:[A.strikethrough],color:aL,textDecoration:`line-through`},{tag:A.constant(A.name),color:oL},{tag:A.deleted,color:aL},{tag:A.squareBracket,color:aL},{tag:A.angleBracket,color:oL},{tag:A.monospace,color:$I,fontStyle:`italic`},{tag:[A.contentSeparator],color:rL},{tag:A.quote,color:lL}]))],bL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},sge={borderLeftWidth:`2px`},xL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},SL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},CL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},cge={borderRadius:`2px`},wL={borderRadius:`2px`},TL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},EL={width:`12px`,height:`12px`,borderRadius:`6px`},DL={borderRadius:`4px`,padding:`2px 6px`},OL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},lge=`#e1e2e7`,kL=`#3760bf`,AL=`#99a7df`,jL=`#848cb5`,uge=`#8c91a8`,ML=`#3760bf`,NL=`#e9e9ec`,PL=`#d5d6db`,FL=`#f52a65`,IL=`#b15c00`,LL=`#8c6c3e`,RL=`#587539`,zL=`#007197`,BL=`#2e7de9`,VL=`#7847bd`,dge=`#9854f1`,HL=FL,UL=PL,fge=`#5F5FAF5A`,WL=lge,GL=NL,KL=`#99a7df40`,pge=`#99a7df60`,qL=kL,mge=`#0e639c20`,hge=zL,JL=IL,YL=zL,gge=VL,XL=`#58753920`,ZL=`#f52a6520`,QL=`#587539`,$L=`#f52a65`,_ge=[I.theme({"&":{color:ML,backgroundColor:WL,fontSize:bL.fontSize,fontFamily:bL.fontFamily},".cm-content":{caretColor:qL,lineHeight:bL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:qL,borderLeftWidth:sge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${qL}99`,color:WL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${zL}`,color:ML,borderRadius:DL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:zL,color:WL,padding:DL.padding,"& span":{color:WL}},".cm-search.cm-panel.cm-textfield":{color:ML,borderRadius:DL.borderRadius,padding:DL.padding},".cm-panels":{backgroundColor:NL,color:ML,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${jL}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${jL}30`},".cm-panel button":{backgroundColor:GL,color:ML,border:CL.border,borderRadius:CL.borderRadius,padding:CL.padding},".cm-panel button:hover":{backgroundColor:PL,border:`1px solid ${AL}`},".cm-activeLine":{backgroundColor:fge,borderRadius:cge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:UL,color:jL,border:SL.border,borderRight:`1px solid ${PL}`,paddingRight:SL.paddingRight},".cm-activeLineGutter":{color:kL,fontWeight:SL.fontWeight},".cm-lineNumbers":{fontSize:SL.fontSize,lineHeight:SL.lineHeight},".cm-foldGutter":{fontSize:SL.fontSize,lineHeight:SL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:jL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:kL},".cm-insertedLine":{textDecoration:xL.insertedTextDecoration,backgroundColor:XL,color:QL,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:xL.insertedTextDecoration,backgroundColor:`${XL} !important`,color:QL,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious,border:`1px solid ${QL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:xL.deletedTextDecoration,backgroundColor:ZL,color:$L,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:xL.deletedTextDecoration,backgroundColor:`${ZL} !important`,color:$L,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious,border:`1px solid ${$L}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:GL,border:`1px solid ${uge}40`,borderRadius:OL.borderRadius,padding:OL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:GL,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:OL.padding,lineHeight:OL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KL,color:kL,borderRadius:OL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:jL,paddingRight:OL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:jL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GL,borderBottomColor:GL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HL}`},"&-warning":{borderLeft:`3px solid ${JL}`},"&-info":{borderLeft:`3px solid ${YL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${JL}`},".cm-matchingBracket":{backgroundColor:mge,outline:`1px solid ${hge}`,borderRadius:wL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${FL}20`,outline:`1px solid ${HL}`,borderRadius:wL.borderRadius},".cm-selectionMatch":{backgroundColor:pge,outline:`1px solid ${AL}50`,borderRadius:wL.borderRadius},".cm-foldPlaceholder":{backgroundColor:GL,color:jL,border:`1px dotted ${jL}70`,borderRadius:TL.borderRadius,padding:TL.padding,margin:TL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${WL}, 0 0 0 3px ${zL}40`},"& .cm-scroller::-webkit-scrollbar":{width:EL.width,height:EL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:UL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:jL,borderRadius:EL.borderRadius,border:`3px solid ${UL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:AL},".cm-ghostText":{opacity:`0.5`,color:jL}},{dark:!1}),D(V.define([{tag:A.keyword,color:zL,fontWeight:`bold`},{tag:A.controlKeyword,color:zL,fontWeight:`bold`},{tag:A.moduleKeyword,color:zL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:BL},{tag:[A.variableName],color:kL},{tag:[A.propertyName],color:BL,fontStyle:`normal`},{tag:[A.typeName],color:zL},{tag:[A.className],color:LL,fontStyle:`italic`},{tag:[A.namespace],color:VL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:VL},{tag:[A.bracket],color:jL},{tag:[A.brace],color:jL},{tag:[A.punctuation],color:jL},{tag:[A.function(A.variableName)],color:zL},{tag:[A.labelName],color:VL,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:zL},{tag:[A.definition(A.variableName)],color:BL},{tag:A.number,color:IL},{tag:A.changed,color:IL},{tag:A.annotation,color:HL,fontStyle:`italic`},{tag:A.modifier,color:IL,fontStyle:`italic`},{tag:A.self,color:IL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:IL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:IL},{tag:[A.processingInstruction,A.inserted],color:RL},{tag:[A.special(A.string),A.regexp],color:dge},{tag:A.string,color:RL},{tag:A.definition(A.typeName),color:zL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:BL},{tag:A.meta,color:jL},{tag:A.comment,fontStyle:`italic`,color:jL},{tag:A.docComment,fontStyle:`italic`,color:jL},{tag:[A.tagName],color:VL},{tag:[A.attributeName],color:LL},{tag:[A.heading],fontWeight:`bold`,color:IL},{tag:A.heading1,color:IL,fontWeight:`bold`},{tag:A.heading2,color:IL},{tag:A.heading3,color:IL},{tag:A.heading4,color:zL},{tag:A.heading5,color:zL},{tag:A.heading6,color:zL},{tag:[A.strong],fontWeight:`bold`,color:kL},{tag:[A.emphasis],fontStyle:`italic`,color:RL},{tag:[A.link],color:gge,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:YL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:kL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HL}`},{tag:[A.strikethrough],color:HL,textDecoration:`line-through`},{tag:A.constant(A.name),color:IL},{tag:A.deleted,color:HL},{tag:A.squareBracket,color:jL},{tag:A.angleBracket,color:jL},{tag:A.monospace,color:kL},{tag:[A.contentSeparator],color:BL},{tag:A.quote,color:jL}]))],eR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},vge={borderLeftWidth:`2px`},tR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},nR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},rR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},yge={borderRadius:`2px`},iR={borderRadius:`2px`},aR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},oR={width:`12px`,height:`12px`,borderRadius:`6px`},sR={borderRadius:`4px`,padding:`2px 6px`},cR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},bge=`#24283b`,lR=`#414868`,uR=`#565f89`,dR=`#c0caf5`,fR=`#282e44`,pR=`#1f2335`,xge=`#f7768e`,mR=`#ff9e64`,hR=`#e0af68`,gR=`#9ece6a`,_R=`#2ac3de`,vR=`#7aa2f7`,yR=`#bb9af7`,bR=`#f7768e`,xR=pR,Sge=`#292e427a`,SR=bge,CR=fR,wR=`#6f7bb630`,Cge=`#6f7bb650`,TR=dR,wge=`#3d59a150`,Tge=vR,ER=mR,DR=_R,Ege=yR,OR=`#3b4a3880`,kR=`#4a393a80`,AR=`#9ece6a`,jR=`#f7768e`,Dge=[I.theme({"&":{color:dR,backgroundColor:SR,fontSize:eR.fontSize,fontFamily:eR.fontFamily},".cm-content":{caretColor:TR,lineHeight:eR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:TR,borderLeftWidth:vge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${TR}99`,color:SR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:wR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${vR}`,color:dR,borderRadius:sR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:vR,color:SR,padding:sR.padding,"& span":{color:SR}},".cm-search.cm-panel.cm-textfield":{color:dR,borderRadius:sR.borderRadius,padding:sR.padding},".cm-panels":{backgroundColor:fR,color:dR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uR}`},".cm-panel button":{backgroundColor:CR,color:dR,border:rR.border,borderRadius:rR.borderRadius,padding:rR.padding},".cm-panel button:hover":{backgroundColor:pR},".cm-activeLine":{backgroundColor:Sge,borderRadius:yge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:xR,color:uR,border:nR.border,borderRight:`1px solid ${pR}`,paddingRight:nR.paddingRight},".cm-activeLineGutter":{backgroundColor:pR,color:dR,fontWeight:nR.fontWeight},".cm-lineNumbers":{fontSize:nR.fontSize,lineHeight:nR.lineHeight},".cm-foldGutter":{fontSize:nR.fontSize,lineHeight:nR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:uR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:dR},".cm-insertedLine":{textDecoration:tR.insertedTextDecoration,backgroundColor:OR,color:AR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:tR.insertedTextDecoration,backgroundColor:`${OR} !important`,color:AR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious,border:`1px solid ${AR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:tR.deletedTextDecoration,backgroundColor:kR,color:jR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:tR.deletedTextDecoration,backgroundColor:`${kR} !important`,color:jR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious,border:`1px solid ${jR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:CR,border:`1px solid ${uR}`,borderRadius:cR.borderRadius,padding:cR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:CR,border:`none`},"& > ul > li":{padding:cR.padding,lineHeight:cR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:wR,color:dR,borderRadius:cR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:uR,paddingRight:cR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:uR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:CR,borderBottomColor:CR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${bR}`},"&-warning":{borderLeft:`3px solid ${ER}`},"&-info":{borderLeft:`3px solid ${DR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${bR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${ER}`},".cm-matchingBracket":{backgroundColor:wge,outline:`1px solid ${Tge}`,borderRadius:iR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${xge}20`,outline:`1px solid ${bR}`,borderRadius:iR.borderRadius},".cm-selectionMatch":{backgroundColor:Cge,outline:`1px solid ${lR}50`,borderRadius:iR.borderRadius},".cm-foldPlaceholder":{backgroundColor:CR,color:uR,border:`1px dotted ${uR}70`,borderRadius:aR.borderRadius,padding:aR.padding,margin:aR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${SR}, 0 0 0 3px ${vR}40`},"& .cm-scroller::-webkit-scrollbar":{width:oR.width,height:oR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:xR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lR,borderRadius:oR.borderRadius,border:`3px solid ${xR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:uR},".cm-ghostText":{opacity:`0.5`,color:uR}},{dark:!0}),D(V.define([{tag:A.keyword,color:yR,fontWeight:`bold`},{tag:A.controlKeyword,color:yR,fontWeight:`bold`},{tag:A.moduleKeyword,color:yR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:dR},{tag:[A.variableName],color:dR},{tag:[A.propertyName],color:vR,fontStyle:`normal`},{tag:[A.typeName],color:_R},{tag:[A.className],color:hR,fontStyle:`italic`},{tag:[A.namespace],color:vR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:yR},{tag:[A.bracket],color:uR},{tag:[A.brace],color:uR},{tag:[A.punctuation],color:uR},{tag:[A.function(A.variableName)],color:vR},{tag:[A.labelName],color:vR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:vR},{tag:[A.definition(A.variableName)],color:dR},{tag:A.number,color:mR},{tag:A.changed,color:mR},{tag:A.annotation,color:bR,fontStyle:`italic`},{tag:A.modifier,color:mR,fontStyle:`italic`},{tag:A.self,color:mR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:yR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:mR},{tag:[A.processingInstruction,A.inserted],color:gR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:gR},{tag:A.definition(A.typeName),color:_R,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:dR},{tag:A.meta,color:uR},{tag:A.comment,fontStyle:`italic`,color:uR},{tag:A.docComment,fontStyle:`italic`,color:uR},{tag:[A.tagName],color:yR},{tag:[A.attributeName],color:hR},{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:dR},{tag:[A.emphasis],fontStyle:`italic`,color:_R},{tag:[A.link],color:Ege,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:DR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:dR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${bR}`},{tag:[A.strikethrough],color:bR,textDecoration:`line-through`},{tag:A.constant(A.name),color:mR},{tag:A.deleted,color:bR},{tag:A.squareBracket,color:uR},{tag:A.angleBracket,color:uR},{tag:A.monospace,color:dR},{tag:[A.contentSeparator],color:vR},{tag:A.quote,color:uR}]))],MR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Oge={borderLeftWidth:`2px`},NR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},PR={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},FR={borderRadius:`4px`,padding:`2px 10px`},kge={borderRadius:`2px`},IR={borderRadius:`2px`},LR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},RR={width:`12px`,height:`12px`,borderRadius:`6px`},zR={borderRadius:`4px`,padding:`2px 6px`},BR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Age=`#1e1e1e`,VR=`#252526`,HR=`#2d2d30`,UR=`#838383`,jge=`#c6c6c6`,WR=`#d4d4d4`,GR=`#e9e9e9`,Mge=`#1c1c1c`,KR=`#569cd6`,Nge=`#c586c0`,qR=`#9cdcfe`,JR=`#4ec9b0`,YR=`#dcdcaa`,Pge=`#b5cea8`,XR=`#ce9178`,ZR=`#f44747`,QR=`#d7ba7d`,$R=`#6a9955`,ez=ZR,tz=`#FFFFFF08`,nz=Age,rz=VR,Fge=`#264F7899`,Ige=`#72a1ff59`,iz=jge,Lge=`#ffffff15`,Rge=KR,az=QR,oz=`#3794ff`,zge=`#c586c0`,sz=`#1e3f1e80`,cz=`#4b1c1c80`,lz=`#6cc26f`,uz=`#f14c4c`,Bge=[I.theme({"&":{color:WR,backgroundColor:nz,fontSize:MR.fontSize,fontFamily:MR.fontFamily},".cm-content":{caretColor:iz,lineHeight:MR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:iz,borderLeftWidth:Oge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${iz}99`,color:nz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Fge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${KR}90`,color:GR,borderRadius:zR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:GR,padding:zR.padding,"& span":{color:GR}},".cm-search.cm-panel.cm-textfield":{color:WR,borderRadius:zR.borderRadius,padding:zR.padding},".cm-panels":{backgroundColor:VR,color:WR,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${HR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${HR}`},".cm-panel button":{backgroundColor:HR,color:WR,border:`1px solid ${HR}`,borderRadius:FR.borderRadius,padding:FR.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${UR}80`},".cm-activeLine":{backgroundColor:tz,borderRadius:kge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Mge,color:UR,border:`none`,borderRight:`1px solid ${HR}`,paddingRight:PR.paddingRight},".cm-activeLineGutter":{backgroundColor:tz,color:GR,fontWeight:PR.fontWeight},".cm-lineNumbers":{fontSize:PR.fontSize,lineHeight:PR.lineHeight},".cm-foldGutter":{fontSize:PR.fontSize,lineHeight:PR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:UR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:GR},".cm-insertedLine":{textDecoration:NR.insertedTextDecoration,backgroundColor:sz,color:lz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:NR.insertedTextDecoration,backgroundColor:`${sz} !important`,color:lz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious,border:`1px solid ${lz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:NR.deletedTextDecoration,backgroundColor:cz,color:uz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:NR.deletedTextDecoration,backgroundColor:`${cz} !important`,color:uz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious,border:`1px solid ${uz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:rz,border:`1px solid ${HR}`,borderRadius:BR.borderRadius,padding:BR.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:rz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:BR.padding,lineHeight:BR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:GR,borderRadius:BR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:UR,paddingRight:BR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:UR,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 ${ez}`},"&-warning":{borderLeft:`3px solid ${az}`},"&-info":{borderLeft:`3px solid ${oz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${ez}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${az}`},".cm-matchingBracket":{backgroundColor:Lge,outline:`1px solid ${Rge}80`,borderRadius:IR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${ZR}40`,outline:`1px solid ${ez}`,borderRadius:IR.borderRadius},".cm-selectionMatch":{backgroundColor:Ige,outline:`1px solid ${HR}70`,borderRadius:IR.borderRadius},".cm-foldPlaceholder":{backgroundColor:rz,color:UR,border:`1px dotted ${UR}70`,borderRadius:LR.borderRadius,padding:LR.padding,margin:LR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${HR}`},"& .cm-scroller::-webkit-scrollbar":{width:RR.width,height:RR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:nz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:RR.borderRadius,border:`3px solid ${nz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:UR}},{dark:!0}),D(V.define([{tag:A.keyword,color:KR,fontWeight:`bold`},{tag:A.controlKeyword,color:Nge,fontWeight:`bold`},{tag:A.moduleKeyword,color:KR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WR},{tag:[A.variableName],color:qR},{tag:[A.propertyName],color:qR,fontStyle:`normal`},{tag:[A.typeName],color:JR},{tag:[A.className],color:JR,fontStyle:`normal`},{tag:[A.namespace],color:WR,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:WR},{tag:[A.bracket],color:WR},{tag:[A.brace],color:WR},{tag:[A.punctuation],color:WR},{tag:[A.function(A.variableName)],color:YR},{tag:[A.labelName],color:YR,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:YR},{tag:[A.definition(A.variableName)],color:qR},{tag:A.number,color:Pge},{tag:A.changed,color:QR},{tag:A.annotation,color:QR,fontStyle:`italic`},{tag:A.modifier,color:KR,fontStyle:`normal`},{tag:A.self,color:KR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:qR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:KR},{tag:[A.processingInstruction,A.inserted],color:XR},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:XR},{tag:A.definition(A.typeName),color:JR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:WR},{tag:A.meta,color:UR},{tag:A.comment,fontStyle:`italic`,color:$R},{tag:A.docComment,fontStyle:`italic`,color:$R},{tag:[A.tagName],color:KR},{tag:[A.attributeName],color:qR},{tag:[A.heading],fontWeight:`bold`,color:KR},{tag:A.heading1,color:KR,fontWeight:`bold`},{tag:A.heading2,color:KR},{tag:A.heading3,color:KR},{tag:A.heading4,color:KR},{tag:A.heading5,color:KR},{tag:A.heading6,color:KR},{tag:[A.strong],fontWeight:`bold`,color:KR},{tag:[A.emphasis],fontStyle:`italic`,color:JR},{tag:[A.link],color:zge,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:oz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:WR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${ez}`},{tag:[A.strikethrough],color:ez,textDecoration:`line-through`},{tag:A.constant(A.name),color:qR},{tag:A.deleted,color:ez},{tag:A.squareBracket,color:WR},{tag:A.angleBracket,color:WR},{tag:A.monospace,color:WR},{tag:[A.contentSeparator],color:WR},{tag:A.quote,color:$R}]))],dz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Vge={borderLeftWidth:`2px`},fz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},pz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},mz={borderRadius:`4px`,padding:`2px 10px`},Hge={borderRadius:`2px`},hz={borderRadius:`2px`},gz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},_z={width:`12px`,height:`12px`,borderRadius:`6px`},vz={borderRadius:`4px`,padding:`2px 6px`},yz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Uge=`#ffffff`,bz=`#f3f3f3`,xz=`#d6d6d6`,Sz=`#6b6b6b`,Wge=`#000000`,Cz=`#383a42`,wz=`#1f1f1f`,Gge=`#f5f5f5`,Tz=`#0064ff`,Ez=`#af00db`,Dz=`#0070c1`,Oz=`#267f99`,kz=`#795e26`,Kge=`#098658`,Az=`#a31515`,jz=`#e51400`,Mz=`#795e26`,Nz=`#008000`,Pz=jz,Fz=`#99999926`,Iz=Uge,Lz=bz,qge=`#add6ff`,Jge=`#a8ac9480`,Rz=Wge,Yge=`#007acc20`,Xge=`#007acc`,zz=`#bf8803`,Bz=`#006ab1`,Zge=`#9e46d0`,Vz=`#ddfbe0`,Hz=`#ffebec`,Uz=`#22863a`,Wz=`#e51400`,Qge=[I.theme({"&":{color:Cz,backgroundColor:Iz,fontSize:dz.fontSize,fontFamily:dz.fontFamily},".cm-content":{caretColor:Rz,lineHeight:dz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Rz,borderLeftWidth:Vge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Rz}99`,color:Iz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Dz}90`,color:wz,borderRadius:vz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:wz,padding:vz.padding,"& span":{color:wz}},".cm-search.cm-panel.cm-textfield":{color:Cz,borderRadius:vz.borderRadius,padding:vz.padding},".cm-panels":{backgroundColor:bz,color:Cz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${xz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${xz}`},".cm-panel button":{backgroundColor:Iz,color:Cz,border:`1px solid ${xz}`,borderRadius:mz.borderRadius,padding:mz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Sz}80`},".cm-activeLine":{backgroundColor:Fz,borderRadius:Hge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Gge,color:`#237893`,border:`none`,borderRight:`1px solid ${xz}`,paddingRight:pz.paddingRight},".cm-activeLineGutter":{backgroundColor:Fz,color:`#0b216f`,fontWeight:pz.fontWeight},".cm-lineNumbers":{fontSize:pz.fontSize,lineHeight:pz.lineHeight},".cm-foldGutter":{fontSize:pz.fontSize,lineHeight:pz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:fz.insertedTextDecoration,backgroundColor:Vz,color:Uz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:fz.insertedTextDecoration,backgroundColor:`${Vz} !important`,color:Uz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious,border:`1px solid ${Uz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:fz.deletedTextDecoration,backgroundColor:Hz,color:Wz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:fz.deletedTextDecoration,backgroundColor:`${Hz} !important`,color:Wz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious,border:`1px solid ${Wz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Lz,border:`1px solid ${xz}`,borderRadius:yz.borderRadius,padding:yz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Lz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:yz.padding,lineHeight:yz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:wz,borderRadius:yz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Sz,paddingRight:yz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Sz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Lz,borderBottomColor:Lz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Pz}`},"&-warning":{borderLeft:`3px solid ${zz}`},"&-info":{borderLeft:`3px solid ${Bz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Pz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${zz}`},".cm-matchingBracket":{backgroundColor:Yge,outline:`1px solid ${Xge}80`,borderRadius:hz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${jz}20`,outline:`1px solid ${Pz}`,borderRadius:hz.borderRadius},".cm-selectionMatch":{backgroundColor:Jge,outline:`1px solid ${xz}70`,borderRadius:hz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Lz,color:Sz,border:`1px dotted ${Sz}70`,borderRadius:gz.borderRadius,padding:gz.padding,margin:gz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${xz}`},"& .cm-scroller::-webkit-scrollbar":{width:_z.width,height:_z.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Iz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:_z.borderRadius,border:`3px solid ${Iz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Sz}},{dark:!1}),D(V.define([{tag:A.keyword,color:Tz,fontWeight:`bold`},{tag:A.controlKeyword,color:Ez,fontWeight:`bold`},{tag:A.moduleKeyword,color:Tz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:Cz},{tag:[A.variableName],color:Dz},{tag:[A.propertyName],color:Dz,fontStyle:`normal`},{tag:[A.typeName],color:Oz},{tag:[A.className],color:Oz,fontStyle:`normal`},{tag:[A.namespace],color:Cz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:Cz},{tag:[A.bracket],color:Cz},{tag:[A.brace],color:Cz},{tag:[A.punctuation],color:Cz},{tag:[A.function(A.variableName)],color:kz},{tag:[A.labelName],color:kz,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:kz},{tag:[A.definition(A.variableName)],color:Dz},{tag:A.number,color:Kge},{tag:A.changed,color:Mz},{tag:A.annotation,color:Mz,fontStyle:`italic`},{tag:A.modifier,color:Tz,fontStyle:`normal`},{tag:A.self,color:Tz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Dz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Tz},{tag:[A.processingInstruction,A.inserted],color:Az},{tag:[A.special(A.string),A.regexp],color:Ez},{tag:A.string,color:Az},{tag:A.definition(A.typeName),color:Oz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:Cz},{tag:A.meta,color:Sz},{tag:A.comment,fontStyle:`italic`,color:Nz},{tag:A.docComment,fontStyle:`italic`,color:Nz},{tag:[A.tagName],color:Tz},{tag:[A.attributeName],color:Dz},{tag:[A.heading],fontWeight:`bold`,color:Tz},{tag:A.heading1,color:Tz,fontWeight:`bold`},{tag:A.heading2,color:Tz},{tag:A.heading3,color:Tz},{tag:A.heading4,color:Tz},{tag:A.heading5,color:Tz},{tag:A.heading6,color:Tz},{tag:[A.strong],fontWeight:`bold`,color:Tz},{tag:[A.emphasis],fontStyle:`italic`,color:Dz},{tag:[A.link],color:Zge,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Bz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:Cz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Pz}`},{tag:[A.strikethrough],color:Pz,textDecoration:`line-through`},{tag:A.constant(A.name),color:Dz},{tag:A.deleted,color:Pz},{tag:A.squareBracket,color:Cz},{tag:A.angleBracket,color:Cz},{tag:A.monospace,color:Cz},{tag:[A.contentSeparator],color:Cz},{tag:A.quote,color:Nz}]))];function Gz(){return Gz=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},Gz.apply(null,arguments)}function $ge(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 Kz=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,qz=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(Kz(e)):Kz,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 Ie(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=ge(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`&&(qz.prototype[Symbol.iterator]=function(){return this});var Jz={from:-1,to:-1,match:/.*/.exec(``)},Yz=`gm`+(/x/.unicode==null?``:`u`),Xz=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Jz,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new $z(e,t,n,r,i);this.re=new RegExp(t,Yz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=eB(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=eB(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}}},Zz=new WeakMap,Qz=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=Zz.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Zz.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)),Zz.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},$z=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Jz,this.matchPos=eB(e,r),this.re=new RegExp(t,Yz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Qz.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=eB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Qz.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Xz.prototype[Symbol.iterator]=$z.prototype[Symbol.iterator]=function(){return this});function e_e(e){try{return new RegExp(e,Yz),!0}catch{return!1}}function eB(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 tB(e){let t=ke(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=ke(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:nB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},ke(`label`,e.state.phrase(`Go to line`),`: `,t),` `,ke(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),ke(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:nB.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=se.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[nB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var nB=U.define(),rB=Re.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(nB)&&(e=n.value);return e},provide:e=>te.from(e,e=>e?tB:null)}),iB=e=>{let t=Te(e,tB);if(!t){let n=[nB.of(!0)];e.state.field(rB,!1)??n.push(U.appendConfig.of([rB,aB])),e.dispatch({effects:n}),t=Te(e,tB)}return t&&t.dom.querySelector(`input`).select(),!0},aB=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`}}}),oB={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sB=ye.define({combine(e){return f(e,oB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function cB(e){let t=[mB,pB];return e&&t.push(sB.of(e)),t}var lB=ze.mark({class:`cm-selectionMatch`}),uB=ze.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function dB(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=ie.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=ie.Word)}function fB(e,t,n,r){return e(t.sliceDoc(n,n+1))==ie.Word&&e(t.sliceDoc(r-1,r))==ie.Word}var pB=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(sB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return ze.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return ze.none;let e=n.wordAt(i.head);if(!e)return ze.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 ze.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(dB(o,n,i.from,i.to)&&fB(o,n,i.from,i.to)))return ze.none}else if(a=n.sliceDoc(i.from,i.to),!a)return ze.none}let s=[];for(let r of e.visibleRanges){let e=new qz(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||dB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(uB.range(r,a)):(r>=i.to||a<=i.from)&&s.push(lB.range(r,a)),s.length>t.maxMatches))return ze.none}}return ze.set(s)}},{decorations:e=>e.decorations}),mB=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),hB=({state:e,dispatch:t})=>{let{selection:n}=e,r=se.create(n.ranges.map(t=>e.wordAt(t.head)||se.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function gB(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 qz(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new qz(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 _B=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return hB({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=gB(e,r);return i?(t(e.update({selection:e.selection.addRange(se.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},vB=ye.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new XB(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),yB=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||e_e(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`?`
|
|
363
|
+
`;)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(me.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=vk(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`)&&(Lfe.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 vk(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 zfe=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}),Bfe=new XO(new C(ek).extend(zfe),Object.keys(KO).map(e=>KO[e]),Object.keys(KO).map(e=>JO[e]),Object.keys(KO),Mfe,DO,Object.keys(fk).map(e=>fk[e]),Object.keys(fk),[]);function Vfe(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 Hfe(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:Vfe(e.node,e.from,e.to)};return null})}}var Ufe={resolve:`Strikethrough`,mark:`StrikethroughMark`},Wfe={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=dk.test(r),c=dk.test(i);return e.addDelimiter(Ufe,n,n+2,!o&&(!c||a||s),!a&&(!s||o||c))},after:`Emphasis`}]};function yk(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 bk(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 xk=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/,Sk=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)&&xk.test(r=t.text.slice(t.pos))){let i=[];yk(e,n.content,0,i,n.start)==yk(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=[];yk(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}},Gfe={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 bk(t.content,0)?new Sk:null},endLeaf(e,t,n){if(n.parsers.some(e=>e instanceof Sk)||!bk(t.text,t.basePos))return!1;let r=e.peekLine();return xk.test(r)&&yk(e,t.text,t.basePos)==yk(e,r,t.basePos)},before:`SetextHeading`}]},Kfe=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}},qfe={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 Kfe:null},after:`SetextHeading`}]},Ck=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,wk=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,Jfe=/[\w-]+\.[\w-]+($|\/)/,Tk=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,Ek=/\/[a-zA-Z\d@.]+/gy;function Dk(e,t,n,r){let i=0;for(let a=t;a<n;a++)e[a]==r&&i++;return i}function Yfe(e,t){wk.lastIndex=t;let n=wk.exec(e);if(!n||Jfe.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==`)`&&Dk(e,t,r,`)`)>Dk(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 Ok(e,t){Tk.lastIndex=t;let n=Tk.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 Xfe=[Gfe,qfe,Wfe,{parseInline:[{name:`Autolink`,parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;Ck.lastIndex=r;let i=Ck.exec(e.text),a=-1;return!i||(i[1]||i[2]?(a=Yfe(e.text,r+i[0].length),a>-1&&e.hasOpenLink&&(a=r+/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,a))[0].length)):i[3]?a=Ok(e.text,r):(a=Ok(e.text,r+i[0].length),a>-1&&i[0]==`xmpp:`&&(Ek.lastIndex=a,i=Ek.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 kk(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)),OO(s))break}return-1}}var Zfe={defineNodes:[{name:`Superscript`,style:A.special(A.content)},{name:`SuperscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Superscript`,parse:kk(94,`Superscript`,`SuperscriptMark`)}]},Qfe={defineNodes:[{name:`Subscript`,style:A.special(A.content)},{name:`SubscriptMark`,style:A.processingInstruction}],parseInline:[{name:`Subscript`,parse:kk(126,`Subscript`,`SubscriptMark`)}]},$fe={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))}}]},epe=55,tpe=1,npe=56,rpe=2,ipe=57,ape=3,Ak=4,ope=5,jk=6,Mk=7,Nk=8,Pk=9,Fk=10,spe=11,cpe=12,lpe=13,Ik=58,upe=14,dpe=15,Lk=59,Rk=21,fpe=23,zk=24,ppe=25,Bk=27,Vk=28,mpe=29,hpe=32,gpe=35,_pe=37,vpe=38,ype=0,bpe=1,xpe={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},Spe={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Hk={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 Cpe(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var Uk=null,Wk=null,Gk=0;function Kk(e,t){let n=e.pos+t;if(Gk==n&&Wk==e)return Uk;let r=e.peek(t),i=``;for(;Cpe(r);)i+=String.fromCharCode(r),r=e.peek(++t);return Wk=e,Gk=n,Uk=i?i.toLowerCase():r==wpe||r==Tpe?void 0:null}var qk=60,Jk=62,Yk=47,wpe=63,Tpe=33,Epe=45;function Xk(e,t){this.name=e,this.parent=t}var Dpe=[jk,Fk,Mk,Nk,Pk],Ope=new Ae({start:null,shift(e,t,n,r){return Dpe.indexOf(t)>-1?new Xk(Kk(r,1)||``,e):e},reduce(e,t){return t==Rk&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==jk||i==_pe?new Xk(Kk(r,1)||``,e):e},strict:!1}),kpe=new be((e,t)=>{if(e.next!=qk){e.next<0&&t.context&&e.acceptToken(Ik);return}e.advance();let n=e.next==Yk;n&&e.advance();let r=Kk(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?dpe:upe);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(spe);if(i&&Spe[i])return e.acceptToken(Ik,-2);if(t.dialectEnabled(ype))return e.acceptToken(cpe);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(lpe)}else{if(r==`script`)return e.acceptToken(Mk);if(r==`style`)return e.acceptToken(Nk);if(r==`textarea`)return e.acceptToken(Pk);if(xpe.hasOwnProperty(r))return e.acceptToken(Fk);i&&Hk[i]&&Hk[i][r]?e.acceptToken(Ik,-1):e.acceptToken(jk)}},{contextual:!0}),Ape=new be(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(Lk);break}if(e.next==Epe)t++;else if(e.next==Jk&&t>=2){n>=3&&e.acceptToken(Lk,-2);break}else t=0;e.advance()}});function jpe(e){for(;e;e=e.parent)if(e.name==`svg`||e.name==`math`)return!0;return!1}var Mpe=new be((e,t)=>{if(e.next==Yk&&e.peek(1)==Jk){let n=t.dialectEnabled(bpe)||jpe(t.context);e.acceptToken(n?ope:Ak,2)}else e.next==Jk&&e.acceptToken(Ak,1)});function Zk(e,t,n){let r=2+e.length;return new be(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==Yk||a>=2&&a<r&&i.next==e.charCodeAt(a-2))a++,o++;else if(a==r&&i.next==Jk){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 Npe=Zk(`script`,epe,tpe),Ppe=Zk(`style`,npe,rpe),Fpe=Zk(`textarea`,ipe,ape),Ipe=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}),Lpe=Ee.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:Ope,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:[Ipe],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:[Npe,Ppe,Fpe,Mpe,kpe,Ape,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function Qk(e,t){let n=Object.create(null);for(let r of e.getChildren(zk)){let e=r.getChild(ppe),i=r.getChild(Bk)||r.getChild(Vk);e&&(n[t.read(e.from,e.to)]=i?i.type.id==Bk?t.read(i.from+1,i.to-1):t.read(i.from,i.to):``)}return n}function $k(e,t){let n=e.getChild(fpe);return n?t.read(n.from,n.to):` `}function eA(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||=Qk(e.node.parent.firstChild,t)))return{parser:i.parser};return null}function tA(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==mpe)return eA(e,t,n);if(s==hpe)return eA(e,t,r);if(s==gpe)return eA(e,t,i);if(s==Rk&&a.length){let n=e.node,r=n.firstChild,i=r&&$k(r,t),o;if(i){for(let e of a)if(e.tag==i&&(!e.attrs||e.attrs(o||=Qk(r,t)))){let t=n.lastChild,i=t.type.id==vpe?t.from:n.to;if(i>r.to)return{parser:e.parser,overlay:[{from:r.to,to:i}]}}}}if(o&&s==zk){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!=$k(n.parent,t))continue;let e=n.lastChild;if(e.type.id==Bk){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==Vk)return{parser:r.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}var Rpe=122,nA=1,zpe=123,Bpe=124,rA=2,Vpe=125,Hpe=3,Upe=4,iA=[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],Wpe=58,Gpe=40,aA=95,Kpe=91,oA=45,qpe=46,Jpe=35,Ype=37,Xpe=38,Zpe=92,Qpe=10,$pe=42;function sA(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function cA(e){return e>=48&&e<=57}function lA(e){return cA(e)||e>=97&&e<=102||e>=65&&e<=70}var uA=(e,t,n)=>(r,i)=>{for(let a=!1,o=0,s=0;;s++){let{next:c}=r;if(sA(c)||c==oA||c==aA||a&&cA(c))!a&&(c!=oA||s>0)&&(a=!0),o===s&&c==oA&&o++,r.advance();else if(c==Zpe&&r.peek(1)!=Qpe){if(r.advance(),lA(r.next)){do r.advance();while(lA(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();a=!0}else{a&&r.acceptToken(o==2&&i.canShift(rA)?t:c==Gpe?n:e);break}}},eme=new be(uA(zpe,rA,Bpe)),tme=new be(uA(Vpe,Hpe,Upe)),nme=new be(e=>{if(iA.includes(e.peek(-1))){let{next:t}=e;(sA(t)||t==aA||t==Jpe||t==qpe||t==$pe||t==Kpe||t==Wpe&&sA(e.peek(1))||t==oA||t==Xpe)&&e.acceptToken(Rpe)}}),rme=new be(e=>{if(!iA.includes(e.peek(-1))){let{next:t}=e;if(t==Ype&&(e.advance(),e.acceptToken(nA)),sA(t)){do e.advance();while(sA(e.next)||cA(e.next));e.acceptToken(nA)}}}),ime=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}),ame={__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},ome={__proto__:null,or:98,and:98,not:106,only:106,layer:170},sme={__proto__:null,selector:112,layer:166},cme={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},lme={__proto__:null,to:207},ume=Ee.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:[ime],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:[nme,rme,eme,tme,1,2,3,4,new de(`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=>ame[e]||-1},{term:125,get:e=>ome[e]||-1},{term:4,get:e=>sme[e]||-1},{term:25,get:e=>cme[e]||-1},{term:123,get:e=>lme[e]||-1}],tokenPrec:1963}),dA=null;function fA(){if(!dA&&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)));dA=t.sort().map(e=>({type:`property`,label:e,apply:e+`: `}))}return dA||[]}var pA=`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})),mA=`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}))),dme=`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})),fme=[`@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})),hA=/^(\w[\w-]*|-\w[\w-]*|)$/,pme=/^-(-[\w-]*)?$/;function mme(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 gA=new O,hme=[`Declaration`];function gme(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function _A(e,t,n){if(t.to-t.from>4096){let r=gA.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(a.IncludeAnonymous);if(s.firstChild())do for(let t of _A(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t));while(s.nextSibling());return gA.set(t,i),i}else{let r=[],i=new Set;return t.cursor().iterate(t=>{if(n(t)&&t.matchContext(hme)&&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 vA=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:fA(),validFor:hA};if(i.name==`ValueName`)return{from:i.from,options:mA,validFor:hA};if(i.name==`PseudoClassName`)return{from:i.from,options:pA,validFor:hA};if(e(i)||(t.explicit||a)&&mme(i,n.doc))return{from:e(i)||a?i.from:r,options:_A(n.doc,gme(i),e),validFor:pme};if(i.name==`TagName`){for(let{parent:e}=i;e;e=e.parent)if(e.name==`Block`)return{from:i.from,options:fA(),validFor:hA};return{from:i.from,options:dme,validFor:hA}}if(i.name==`AtKeyword`)return{from:i.from,options:fme,validFor:hA};if(!t.explicit)return null;let o=i.resolve(r),s=o.childBefore(r);return s&&s.name==`:`&&o.name==`PseudoClassSelector`?{from:r,options:pA,validFor:hA}:s&&s.name==`:`&&o.name==`Declaration`||o.name==`ArgList`?{from:r,options:mA,validFor:hA}:o.name==`Block`||o.name==`Styles`?{from:r,options:fA(),validFor:hA}:null},yA=vA(e=>e.name==`VariableName`),bA=Oe.define({name:`css`,parser:ume.configure({props:[l.add({Declaration:ue()}),s.add({"Block KeyframeList":Le})]}),languageData:{commentTokens:{block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*\}$/,wordChars:`-`}});function xA(){return new je(bA,bA.data.of({autocomplete:yA}))}var SA=[`_blank`,`_self`,`_top`,`_parent`],CA=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],wA=[`get`,`post`,`put`,`delete`],TA=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],EA=[`true`,`false`],DA={},OA={a:{attrs:{href:null,ping:null,type:null,media:null,target:SA,hreflang:null}},abbr:DA,address:DA,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:DA,aside:DA,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:DA,base:{attrs:{href:null,target:SA}},bdi:DA,bdo:DA,blockquote:{attrs:{cite:null}},body:DA,br:DA,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:TA,formmethod:wA,formnovalidate:[`novalidate`],formtarget:SA,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:DA,center:DA,cite:DA,code:DA,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:DA,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:DA,div:DA,dl:DA,dt:DA,em:DA,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:DA,figure:DA,footer:DA,form:{attrs:{action:null,name:null,"accept-charset":CA,autocomplete:[`on`,`off`],enctype:TA,method:wA,novalidate:[`novalidate`],target:SA}},h1:DA,h2:DA,h3:DA,h4:DA,h5:DA,h6:DA,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:DA,hgroup:DA,hr:DA,html:{attrs:{manifest:null}},i:DA,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:TA,formmethod:wA,formnovalidate:[`novalidate`],formtarget:SA,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:DA,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:DA,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:DA,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:CA,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:DA,noscript:DA,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:DA,param:{attrs:{name:null,value:null}},pre:DA,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:DA,rt:DA,ruby:DA,samp:DA,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:CA}},section:DA,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:DA,source:{attrs:{src:null,type:null,media:null}},span:DA,strong:DA,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:DA,summary:DA,sup:DA,table:DA,tbody:DA,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:DA,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:DA,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:DA,time:{attrs:{datetime:null}},title:DA,tr:DA,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:DA,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:DA},kA={accesskey:null,class:null,contenteditable:EA,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:EA,autocorrect:EA,autocapitalize:EA,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":EA,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":EA,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":EA,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":EA,"aria-hidden":EA,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":EA,"aria-multiselectable":EA,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":EA,"aria-relevant":null,"aria-required":EA,"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},AA=`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 AA)kA[e]=null;var jA=class{constructor(e,t){this.tags={...OA,...e},this.globalAttrs={...kA,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};jA.default=new jA;function MA(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 NA(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`)if(t)t=!1;else return e;return null}function PA(e,t,n){return n.tags[MA(e,NA(t))]?.children||n.allTags}function FA(e,t){let n=[];for(let r=NA(t);r&&!r.type.isTop;r=NA(r.parent)){let i=MA(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 IA=/^[:\-\.\w\u00b7-\uffff]*$/;function LA(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=NA(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:PA(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(FA(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function RA(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:FA(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:IA}}function zA(e,t,n,r){let i=[],a=0;for(let r of PA(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of FA(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function BA(e,t,n,r,i){let a=NA(n),o=a?t.tags[MA(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:IA}}function VA(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=NA(n),i=r?t.tags[MA(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 HA(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)?RA(n,i,i.from,r):LA(n,e,i,i.from,r):i.name==`StartTag`||i.name==`IncompleteTag`?LA(n,e,i,r,r):i.name==`StartCloseTag`||i.name==`IncompleteCloseTag`?RA(n,i,r,r):i.name==`OpenTag`||i.name==`SelfClosingTag`||i.name==`AttributeName`?BA(n,e,i,i.name==`AttributeName`?i.from:r,r):i.name==`Is`||i.name==`AttributeValue`||i.name==`UnquotedAttributeValue`?VA(n,e,i,i.name==`Is`?r:i.from,r):t.explicit&&(a.name==`Element`||a.name==`Text`||a.name==`Document`)?zA(n,e,i,r):null}function UA(e){return HA(jA.default,e)}function WA(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new jA(t,n):jA.default;return e=>HA(r,e)}var GA=We.parser.configure({top:`SingleExpression`}),KA=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:Ue.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:Ve.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:Be.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:GA},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:We.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:bA.parser}],qA=[{name:`style`,parser:bA.parser.configure({top:`Styles`})}].concat(AA.map(e=>({name:e,parser:We.parser}))),JA=Oe.define({name:`html`,parser:Lpe.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}}}),ve.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),YA=JA.configure({wrap:tA(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=tA((e.nestedLanguages||[]).concat(KA),(e.nestedAttributes||[]).concat(qA))),new je(n?JA.configure({wrap:n,dialect:t}):t?YA.configure({dialect:t}):YA,[YA.data.of({autocomplete:WA(e)}),e.autoCloseTags===!1?[]:QA,He().support,xA().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=MA(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=MA(o.doc,e,n))&&!ZA.has(a)){let e=n+(o.doc.sliceString(n,n+1)===`>`?1:0),t=`${a}>`;return{range:se.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 me,tj=Bfe.configure({props:[s.add(e=>!e.is(`Block`)||e.is(`Document`)||nj(e)!=null||rj(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),ej.add(nj),l.add({Document:()=>null}),pe.add({Document:$A})]});function nj(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function rj(e){return e.name==`OrderedList`||e.name==`BulletList`}function ij(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 aj=Fe.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=ij(r,e);if(t>n)return{from:n,to:t}}return null});function oj(e){return new W($A,e,[],`markdown`)}var sj=oj(tj),cj=oj(tj.configure([Xfe,Qfe,Zfe,$fe,{props:[s.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function lj(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):G.matchLanguageName(e,n,!0),t instanceof G)return t.support?t.support.language.parser:re.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var uj=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(+fj(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function dj(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 uj(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 uj(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 uj(i.parent,s,s+t,a[1],e,n,i))}}return r}function fj(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function pj(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=fj(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 mj(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 hj=(e={})=>({state:t,dispatch:n})=>{let r=p(t),{doc:i}=t,a=null,o=t.changeByRange(n=>{if(!n.empty||!cj.isActiveAt(t,n.from,-1)&&!cj.isActiveAt(t,n.from,1))return a={range:n};let o=n.from,s=i.lineAt(o),c=dj(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`&&pj(l.item,i,r,-2),e&&e.node.name==`OrderedList`&&pj(e.item,i,r),{range:se.cursor(t+n.length),changes:r}}else{let e=yj(c,t,s);return{range:se.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`&&pj(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=mj(m,t),vj(l.node,t.doc)&&(m=yj(c,t,s)+t.lineBreak+m),f.push({from:h,to:o,insert:t.lineBreak+m}),{range:se.cursor(h+m.length+1),changes:f}});return a?!1:(n(t.update(o,{scrollIntoView:!0,userEvent:`input`})),!0)},gj=hj();function _j(e){return e.name==`QuoteMark`||e.name==`ListMark`}function vj(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 yj(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 mj(r,t)}function bj(e,t){let n=e.resolveInner(t,-1),r=t;_j(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(_j(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var xj=({state:e,dispatch:t})=>{let n=p(e),r=null,i=e.changeByRange(t=>{let i=t.from,{doc:a}=e;if(t.empty&&cj.isActiveAt(e,t.from)){let t=a.lineAt(i),r=dj(bj(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:se.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=mj(i,e)),{range:se.cursor(r+i.length),changes:{from:r,to:t.from+n.to,insert:i}}}if(r<i)return{range:se.cursor(r),changes:{from:r,to:i}}}}}return r={range:t}});return r?!1:(t(e.update(i,{scrollIntoView:!0,userEvent:`delete`})),!0)},Sj=[{key:`Enter`,run:gj},{key:`Backspace`,run:xj}],Cj=XA({matchClosingTags:!1});function wj(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:a}=sj,completeHTMLTags:o=!0,pasteURLAsLink:s=!0,htmlTagLanguage:c=Cj}=e;if(!(a instanceof XO))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],u=[c.support,aj],d;s&&u.push(kj),n instanceof je?(u.push(n.support),d=n.language):n&&(d=n);let f=t||d?lj(t,d):void 0;l.push(Hfe({codeParser:f,htmlParser:c.language.parser})),i&&u.push(le.high(r.of(Sj)));let p=oj(a.configure(l));return o&&u.push(p.data.of({autocomplete:Tj})),new je(p,u)}function Tj(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:Dj(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var Ej=null;function Dj(){if(Ej)return Ej;let e=UA(new Ye(we.create({extensions:Cj}),0,!0));return Ej=e?e.options:[]}var Oj=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,kj=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),!cj.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||Oj.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)}}),Aj=63,jj=64,Mj=1,Nj=2,Pj=3,Fj=4,Ij=5,Lj=6,Rj=7,zj=65,Bj=66,Vj=8,Hj=9,Uj=10,Wj=11,Gj=12,Kj=13,qj=19,Jj=20,Yj=29,Xj=33,Zj=34,Qj=47,$j=0,eM=1,tM=2,nM=3,rM=4,iM=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}};iM.top=new iM(null,-1,$j);function aM(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(sM(t)||t==-1)return n}}function oM(e){return e==32||e==9}function sM(e){return e==10||e==13}function cM(e){return oM(e)||sM(e)}function lM(e){return e<0||cM(e)}var uM=new Ae({start:iM.top,reduce(e,t){return e.type==nM&&(t==Jj||t==Zj)?e.parent:e},shift(e,t,n,r){if(t==Pj)return new iM(e,aM(r,r.pos),eM);if(t==zj||t==Ij)return new iM(e,aM(r,r.pos),tM);if(t==Aj)return e.parent;if(t==qj||t==Xj)return new iM(e,0,nM);if(t==Kj&&e.type==rM)return e.parent;if(t==Qj){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new iM(e,e.depth+ +t[0],rM)}return e},hash(e){return e.hash}});function dM(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&lM(e.peek(n+3))}var fM=new be((e,t)=>{if(e.next==-1&&t.canShift(jj))return e.acceptToken(jj);let n=e.peek(-1);if((sM(n)||n<0)&&t.context.type!=nM){if(dM(e,45))if(t.canShift(Aj))e.acceptToken(Aj);else return e.acceptToken(Mj,3);if(dM(e,46))if(t.canShift(Aj))e.acceptToken(Aj);else return e.acceptToken(Nj,3);let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==eM&&(e.next!=45||!lM(e.peek(1))))&&e.next!=-1&&!sM(e.next)&&e.next!=35&&e.acceptToken(Aj,-n)}},{contextual:!0}),pM=new be((e,t)=>{if(t.context.type==nM){e.next==63&&(e.advance(),lM(e.next)&&e.acceptToken(Rj));return}if(e.next==45)e.advance(),lM(e.next)&&e.acceptToken(t.context.type==eM&&t.context.depth==aM(e,e.pos-1)?Fj:Pj);else if(e.next==63)e.advance(),lM(e.next)&&e.acceptToken(t.context.type==tM&&t.context.depth==aM(e,e.pos-1)?Lj:Ij);else{let n=e.pos;for(;;)if(oM(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)_M(e);else if(e.next==38)vM(e);else if(e.next==42){vM(e);break}else if(e.next==39||e.next==34){if(yM(e,!0))break;return}else if(e.next==91||e.next==123){if(!_me(e))return;break}else{SM(e,!0,!1,0);break}for(;oM(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Yj))return;lM(e.peek(1))&&e.acceptTokenTo(t.context.type==tM&&t.context.depth==aM(e,n)?Bj:zj,n)}}},{contextual:!0});function mM(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 hM(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function gM(e,t){return e.next==37?(e.advance(),hM(e.next)&&e.advance(),hM(e.next)&&e.advance(),!0):mM(e.next)||t&&e.next==44?(e.advance(),!0):!1}function _M(e){if(e.advance(),e.next==60){for(e.advance();;)if(!gM(e,!0)){e.next==62&&e.advance();break}}else for(;gM(e,!1););}function vM(e){for(e.advance();!lM(e.next)&&bM(e.tag)!=`f`;)e.advance()}function yM(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(sM(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function _me(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(!yM(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||sM(e.next))return!1;else e.advance()}var vme=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function bM(e){return e<33?`u`:e>125?`s`:vme[e-33]}function xM(e,t){let n=bM(e);return n!=`u`&&!(t&&n==`f`)}function SM(e,t,n,r){if(bM(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&xM(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;cM(a);){if(sM(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?xM(e.peek(o+1),n):a==35?e.peek(o-1)!=32:xM(a,n)))||!n&&s<=r||s==0&&!n&&(dM(e,45,o)||dM(e,46,o)))break;if(t&&bM(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var yme=new be((e,t)=>{if(e.next==33)_M(e),e.acceptToken(Gj);else if(e.next==38||e.next==42){let t=e.next==38?Uj:Wj;vM(e),e.acceptToken(t)}else e.next==39||e.next==34?(yM(e,!1),e.acceptToken(Hj)):SM(e,!1,t.context.type==nM,t.context.depth)&&e.acceptToken(Vj)}),bme=new be((e,t)=>{let n=t.context.type==rM?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(dM(e,45,i)||dM(e,46,i))||!sM(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=sM(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(Kj,r)}),xme=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}),Sme=Ee.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:uM,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[xme],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:[fM,pM,yme,bme,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),Cme=Ee.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}),CM=Oe.define({name:`yaml`,parser:Sme.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:Ne({closing:`}`}),FlowSequence:Ne({closing:`]`})}),s.add({"FlowMapping FlowSequence":Le,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function wM(){return new je(CM)}Oe.define({name:`yaml-frontmatter`,parser:Cme.configure({props:[b({DashLine:A.meta})]})});function Q(e){return new je(oe.define(e))}function TM(e){return Y(()=>import(`./dist-DVFW0GyF.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([98,99,100]))}var wme=[G.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Y(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),G.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Y(()=>import(`./dist-DltQmFDE.js`).then(e=>e.cpp()),__vite__mapDeps([101,100]))}}),G.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return TM(`Cassandra`)}}),G.of({name:`CSS`,extensions:[`css`],load(){return Y(()=>import(`./dist-BXHMHEwl.js`).then(e=>e.css()),__vite__mapDeps([102,100]))}}),G.of({name:`Go`,extensions:[`go`],load(){return Y(()=>import(`./dist-CLKxKEQH.js`).then(e=>e.go()),__vite__mapDeps([103,99,100]))}}),G.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Y(()=>import(`./dist-AzZzg9Or.js`).then(e=>e.html()),__vite__mapDeps([104,105,1,99,100]))}}),G.of({name:`Java`,extensions:[`java`],load(){return Y(()=>import(`./dist-BiexWhMB.js`).then(e=>e.java()),__vite__mapDeps([106,100]))}}),G.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Y(()=>import(`./dist-704BMcqW.js`).then(e=>e.jinja()),__vite__mapDeps([107,105,1,99,100]))}}),G.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Y(()=>import(`./dist-D_Ftxw8J.js`).then(e=>e.json()),__vite__mapDeps([108,100]))}}),G.of({name:`JSX`,extensions:[`jsx`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`LESS`,extensions:[`less`],load(){return Y(()=>import(`./dist-BLkBtxRp.js`).then(e=>e.less()),__vite__mapDeps([109,100]))}}),G.of({name:`Liquid`,extensions:[`liquid`],load(){return Y(()=>import(`./dist-CHbFRWhr.js`).then(e=>e.liquid()),__vite__mapDeps([110,105,1,99,100]))}}),G.of({name:`MariaDB SQL`,load(){return TM(`MariaSQL`)}}),G.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Y(()=>import(`./dist-BYskKa8I.js`).then(e=>e.markdown()),__vite__mapDeps([111,105,1,99,100]))}}),G.of({name:`MS SQL`,load(){return TM(`MSSQL`)}}),G.of({name:`MySQL`,load(){return TM(`MySQL`)}}),G.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Y(()=>import(`./dist-DjPJlCHP.js`).then(e=>e.php()),__vite__mapDeps([112,105,1,99,100]))}}),G.of({name:`PLSQL`,extensions:[`pls`],load(){return TM(`PLSQL`)}}),G.of({name:`PostgreSQL`,load(){return TM(`PostgreSQL`)}}),G.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Y(()=>import(`./dist-ExQdmG6u.js`).then(e=>e.python()),__vite__mapDeps([113,99,100]))}}),G.of({name:`Rust`,extensions:[`rs`],load(){return Y(()=>import(`./dist-BNF0fuPB.js`).then(e=>e.rust()),__vite__mapDeps([114,100]))}}),G.of({name:`Sass`,extensions:[`sass`],load(){return Y(()=>import(`./dist-NxlD47Et.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([115,100]))}}),G.of({name:`SCSS`,extensions:[`scss`],load(){return Y(()=>import(`./dist-NxlD47Et.js`).then(e=>e.sass()),__vite__mapDeps([115,100]))}}),G.of({name:`SQL`,extensions:[`sql`],load(){return TM(`StandardSQL`)}}),G.of({name:`SQLite`,load(){return TM(`SQLite`)}}),G.of({name:`TSX`,extensions:[`tsx`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0,typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Y(()=>import(`./dist--FTL3P_Y.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([105,1,99,100]))}}),G.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Y(()=>import(`./dist-CRs-U2qz.js`).then(e=>e.wast()),__vite__mapDeps([116,100]))}}),G.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Y(()=>import(`./dist-CbIYKZT0.js`).then(e=>e.xml()),__vite__mapDeps([117,100]))}}),G.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Y(()=>import(`./dist-D0pwQ8q9.js`).then(e=>e.yaml()),__vite__mapDeps([118,100]))}}),G.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Y(()=>import(`./apl-CJPt5sW7.js`).then(e=>Q(e.apl)),[])}}),G.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Y(()=>import(`./asciiarmor-D0oCypDs.js`).then(e=>Q(e.asciiArmor)),[])}}),G.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Y(()=>import(`./asn1-8xgVfRoq.js`).then(e=>Q(e.asn1({}))),[])}}),G.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Y(()=>import(`./asterisk-B5kv5AQp.js`).then(e=>Q(e.asterisk)),[])}}),G.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Y(()=>import(`./brainfuck-Dh7M1Ucz.js`).then(e=>Q(e.brainfuck)),[])}}),G.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Y(()=>import(`./cobol-D3WLbLVy.js`).then(e=>Q(e.cobol)),[])}}),G.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.csharp)),[])}}),G.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Y(()=>import(`./css-_6KgQwpu.js`).then(e=>Q(e.gss)),[])}}),G.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Y(()=>import(`./cmake-wWuF5ifR.js`).then(e=>Q(e.cmake)),[])}}),G.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Y(()=>import(`./coffeescript-DRtt-5a2.js`).then(e=>Q(e.coffeeScript)),[])}}),G.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Y(()=>import(`./commonlisp-DJV75lsU.js`).then(e=>Q(e.commonLisp)),[])}}),G.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Y(()=>import(`./cypher-B3uWx7jm.js`).then(e=>Q(e.cypher)),[])}}),G.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Y(()=>import(`./python-2pwcWoy7.js`).then(e=>Q(e.cython)),[])}}),G.of({name:`Crystal`,extensions:[`cr`],load(){return Y(()=>import(`./crystal-C7mEw92C.js`).then(e=>Q(e.crystal)),[])}}),G.of({name:`D`,extensions:[`d`],load(){return Y(()=>import(`./d-D3kOh3JF.js`).then(e=>Q(e.d)),[])}}),G.of({name:`Dart`,extensions:[`dart`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.dart)),[])}}),G.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Y(()=>import(`./diff-CoamybWh.js`).then(e=>Q(e.diff)),[])}}),G.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Y(()=>import(`./dockerfile-Ci0-ApQC.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([119,120]))}}),G.of({name:`DTD`,extensions:[`dtd`],load(){return Y(()=>import(`./dtd-BjGQwMWL.js`).then(e=>Q(e.dtd)),[])}}),G.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Y(()=>import(`./dylan-B9W3X2GI.js`).then(e=>Q(e.dylan)),[])}}),G.of({name:`EBNF`,load(){return Y(()=>import(`./ebnf-d5D0otVn.js`).then(e=>Q(e.ebnf)),[])}}),G.of({name:`ECL`,extensions:[`ecl`],load(){return Y(()=>import(`./ecl-C5Q_IBPt.js`).then(e=>Q(e.ecl)),[])}}),G.of({name:`edn`,extensions:[`edn`],load(){return Y(()=>import(`./clojure-CdWlIeQh.js`).then(e=>Q(e.clojure)),[])}}),G.of({name:`Eiffel`,extensions:[`e`],load(){return Y(()=>import(`./eiffel-BQA_6I3b.js`).then(e=>Q(e.eiffel)),[])}}),G.of({name:`Elm`,extensions:[`elm`],load(){return Y(()=>import(`./elm-unPS17vB.js`).then(e=>Q(e.elm)),[])}}),G.of({name:`Erlang`,extensions:[`erl`],load(){return Y(()=>import(`./erlang-R8nOsUTx.js`).then(e=>Q(e.erlang)),[])}}),G.of({name:`Esper`,load(){return Y(()=>import(`./sql-CwA10oIk.js`).then(e=>Q(e.esper)),[])}}),G.of({name:`Factor`,extensions:[`factor`],load(){return Y(()=>import(`./factor-DMvifS-k.js`).then(e=>Q(e.factor)),__vite__mapDeps([121,120]))}}),G.of({name:`FCL`,load(){return Y(()=>import(`./fcl-CVAfW9wK.js`).then(e=>Q(e.fcl)),[])}}),G.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Y(()=>import(`./forth-DHbsK8X8.js`).then(e=>Q(e.forth)),[])}}),G.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Y(()=>import(`./fortran-4jMwxW9-.js`).then(e=>Q(e.fortran)),[])}}),G.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.fSharp)),[])}}),G.of({name:`Gas`,extensions:[`s`],load(){return Y(()=>import(`./gas-zC_XGrQT.js`).then(e=>Q(e.gas)),[])}}),G.of({name:`Gherkin`,extensions:[`feature`],load(){return Y(()=>import(`./gherkin-CPBQou3u.js`).then(e=>Q(e.gherkin)),[])}}),G.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Y(()=>import(`./groovy-Cqopym0q.js`).then(e=>Q(e.groovy)),[])}}),G.of({name:`Haskell`,extensions:[`hs`],load(){return Y(()=>import(`./haskell-imzbNPgF.js`).then(e=>Q(e.haskell)),[])}}),G.of({name:`Haxe`,extensions:[`hx`],load(){return Y(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.haxe)),[])}}),G.of({name:`HXML`,extensions:[`hxml`],load(){return Y(()=>import(`./haxe-Doh225Ku.js`).then(e=>Q(e.hxml)),[])}}),G.of({name:`HTTP`,load(){return Y(()=>import(`./http-j4R5uEso.js`).then(e=>Q(e.http)),[])}}),G.of({name:`IDL`,extensions:[`pro`],load(){return Y(()=>import(`./idl-l9d1__Hj.js`).then(e=>Q(e.idl)),[])}}),G.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Y(()=>import(`./javascript-BcqCeS4O.js`).then(e=>Q(e.jsonld)),[])}}),G.of({name:`Julia`,extensions:[`jl`],load(){return Y(()=>import(`./julia-BU0qBb1w.js`).then(e=>Q(e.julia)),[])}}),G.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.kotlin)),[])}}),G.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Y(()=>import(`./livescript-uk34VDGK.js`).then(e=>Q(e.liveScript)),[])}}),G.of({name:`Lua`,extensions:[`lua`],load(){return Y(()=>import(`./lua-ClQGOv84.js`).then(e=>Q(e.lua)),[])}}),G.of({name:`mIRC`,extensions:[`mrc`],load(){return Y(()=>import(`./mirc-DRRKKkcJ.js`).then(e=>Q(e.mirc)),[])}}),G.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Y(()=>import(`./mathematica-BDmKpvRN.js`).then(e=>Q(e.mathematica)),[])}}),G.of({name:`Modelica`,extensions:[`mo`],load(){return Y(()=>import(`./modelica-DP8T2DKM.js`).then(e=>Q(e.modelica)),[])}}),G.of({name:`MUMPS`,extensions:[`mps`],load(){return Y(()=>import(`./mumps-BKUS05-y.js`).then(e=>Q(e.mumps)),[])}}),G.of({name:`Mbox`,extensions:[`mbox`],load(){return Y(()=>import(`./mbox-T5kA6jAQ.js`).then(e=>Q(e.mbox)),[])}}),G.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Y(()=>import(`./nginx-CzYOtr2G.js`).then(e=>Q(e.nginx)),[])}}),G.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Y(()=>import(`./nsis-BbRIeGvl.js`).then(e=>Q(e.nsis)),__vite__mapDeps([122,120]))}}),G.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Y(()=>import(`./ntriples-ZgZuaYbW.js`).then(e=>Q(e.ntriples)),[])}}),G.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveC)),[])}}),G.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.objectiveCpp)),[])}}),G.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.oCaml)),[])}}),G.of({name:`Octave`,extensions:[`m`],load(){return Y(()=>import(`./octave-CnOndUN3.js`).then(e=>Q(e.octave)),[])}}),G.of({name:`Oz`,extensions:[`oz`],load(){return Y(()=>import(`./oz-DjW322Rn.js`).then(e=>Q(e.oz)),[])}}),G.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Y(()=>import(`./pascal-BdeW5uRX.js`).then(e=>Q(e.pascal)),[])}}),G.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Y(()=>import(`./perl-_CDvIe1D.js`).then(e=>Q(e.perl)),[])}}),G.of({name:`Pig`,extensions:[`pig`],load(){return Y(()=>import(`./pig-inWo_B4W.js`).then(e=>Q(e.pig)),[])}}),G.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Y(()=>import(`./powershell-CO5KWJsy.js`).then(e=>Q(e.powerShell)),[])}}),G.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Y(()=>import(`./properties-CjVp4a6M.js`).then(e=>Q(e.properties)),[])}}),G.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Y(()=>import(`./protobuf-DybFT2KT.js`).then(e=>Q(e.protobuf)),[])}}),G.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Y(()=>import(`./pug-D1ZtszdL.js`).then(e=>Q(e.pug)),__vite__mapDeps([123,124]))}}),G.of({name:`Puppet`,extensions:[`pp`],load(){return Y(()=>import(`./puppet-Dw_NDgko.js`).then(e=>Q(e.puppet)),[])}}),G.of({name:`Q`,extensions:[`q`],load(){return Y(()=>import(`./q-C47l8kdS.js`).then(e=>Q(e.q)),[])}}),G.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Y(()=>import(`./r-BmcXGVZ5.js`).then(e=>Q(e.r)),[])}}),G.of({name:`RPM Changes`,load(){return Y(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmChanges)),[])}}),G.of({name:`RPM Spec`,extensions:[`spec`],load(){return Y(()=>import(`./rpm-Cm0x5xT_.js`).then(e=>Q(e.rpmSpec)),[])}}),G.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Y(()=>import(`./ruby-Dl-I4pxG.js`).then(e=>Q(e.ruby)),[])}}),G.of({name:`SAS`,extensions:[`sas`],load(){return Y(()=>import(`./sas-Bxkg4GVX.js`).then(e=>Q(e.sas)),[])}}),G.of({name:`Scala`,extensions:[`scala`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.scala)),[])}}),G.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Y(()=>import(`./scheme-CO3zogua.js`).then(e=>Q(e.scheme)),[])}}),G.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Y(()=>import(`./shell-gYrTvBTP.js`).then(e=>Q(e.shell)),[])}}),G.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Y(()=>import(`./sieve-COX4Kn1X.js`).then(e=>Q(e.sieve)),[])}}),G.of({name:`Smalltalk`,extensions:[`st`],load(){return Y(()=>import(`./smalltalk-Dma1z5eE.js`).then(e=>Q(e.smalltalk)),[])}}),G.of({name:`Solr`,load(){return Y(()=>import(`./solr-BvhcdkNH.js`).then(e=>Q(e.solr)),[])}}),G.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Y(()=>import(`./mllike-iZXopbca.js`).then(e=>Q(e.sml)),[])}}),G.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Y(()=>import(`./sparql-gX7W9xeh.js`).then(e=>Q(e.sparql)),[])}}),G.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Y(()=>import(`./spreadsheet-BnlQRxWz.js`).then(e=>Q(e.spreadsheet)),[])}}),G.of({name:`Squirrel`,extensions:[`nut`],load(){return Y(()=>import(`./clike-zYz_LEkw.js`).then(e=>Q(e.squirrel)),[])}}),G.of({name:`Stylus`,extensions:[`styl`],load(){return Y(()=>import(`./stylus-9ZGSp3KB.js`).then(e=>Q(e.stylus)),[])}}),G.of({name:`Swift`,extensions:[`swift`],load(){return Y(()=>import(`./swift-CurfpLXH.js`).then(e=>Q(e.swift)),[])}}),G.of({name:`sTeX`,load(){return Y(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),G.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Y(()=>import(`./stex-DhLUylSV.js`).then(e=>Q(e.stex)),[])}}),G.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Y(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),G.of({name:`Tcl`,extensions:[`tcl`],load(){return Y(()=>import(`./tcl-BPvzXR-t.js`).then(e=>Q(e.tcl)),[])}}),G.of({name:`Textile`,extensions:[`textile`],load(){return Y(()=>import(`./textile-BUq3vgBH.js`).then(e=>Q(e.textile)),[])}}),G.of({name:`TiddlyWiki`,load(){return Y(()=>import(`./tiddlywiki-DRR6E4hS.js`).then(e=>Q(e.tiddlyWiki)),[])}}),G.of({name:`Tiki wiki`,load(){return Y(()=>import(`./tiki-C1XMixgx.js`).then(e=>Q(e.tiki)),[])}}),G.of({name:`TOML`,extensions:[`toml`],load(){return Y(()=>import(`./toml-BQjoWSzq.js`).then(e=>Q(e.toml)),[])}}),G.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Y(()=>import(`./troff-DbgTp3Cj.js`).then(e=>Q(e.troff)),[])}}),G.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Y(()=>import(`./ttcn-1OxchGWH.js`).then(e=>Q(e.ttcn)),[])}}),G.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Y(()=>import(`./ttcn-cfg-CC8OhyHu.js`).then(e=>Q(e.ttcnCfg)),[])}}),G.of({name:`Turtle`,extensions:[`ttl`],load(){return Y(()=>import(`./turtle-D1WjVU4-.js`).then(e=>Q(e.turtle)),[])}}),G.of({name:`Web IDL`,extensions:[`webidl`],load(){return Y(()=>import(`./webidl-advQMGTP.js`).then(e=>Q(e.webIDL)),[])}}),G.of({name:`VB.NET`,extensions:[`vb`],load(){return Y(()=>import(`./vb-Bf-XXYNJ.js`).then(e=>Q(e.vb)),[])}}),G.of({name:`VBScript`,extensions:[`vbs`],load(){return Y(()=>import(`./vbscript-HeSyWuOi.js`).then(e=>Q(e.vbScript)),[])}}),G.of({name:`Velocity`,extensions:[`vtl`],load(){return Y(()=>import(`./velocity-CUkiDsJQ.js`).then(e=>Q(e.velocity)),[])}}),G.of({name:`Verilog`,extensions:[`v`],load(){return Y(()=>import(`./verilog-BFxB5RAN.js`).then(e=>Q(e.verilog)),[])}}),G.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Y(()=>import(`./vhdl-BJUXQE-6.js`).then(e=>Q(e.vhdl)),[])}}),G.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Y(()=>import(`./xquery-CNzoFgd7.js`).then(e=>Q(e.xQuery)),[])}}),G.of({name:`Yacas`,extensions:[`ys`],load(){return Y(()=>import(`./yacas-BsmlDKac.js`).then(e=>Q(e.yacas)),[])}}),G.of({name:`Z80`,extensions:[`z80`],load(){return Y(()=>import(`./z80-Bnez4vZ_.js`).then(e=>Q(e.z80)),[])}}),G.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.mscgen)),[])}}),G.of({name:`Xù`,extensions:[`xu`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.xu)),[])}}),G.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Y(()=>import(`./mscgen-DXIRw2qg.js`).then(e=>Q(e.msgenny)),[])}}),G.of({name:`Vue`,extensions:[`vue`],load(){return Y(()=>import(`./dist-D3tpHX6Y.js`).then(e=>e.vue()),__vite__mapDeps([125,105,1,99,100]))}}),G.of({name:`Angular Template`,load(){return Y(()=>import(`./dist-DICpu_MT.js`).then(e=>e.angular()),__vite__mapDeps([126,105,1,99,100]))}})],EM={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Tme={borderLeftWidth:`2px`},DM={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},OM={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},kM={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Eme={borderRadius:`2px`},AM={borderRadius:`2px`},jM={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},MM={width:`12px`,height:`12px`,borderRadius:`6px`},NM={borderRadius:`4px`,padding:`2px 6px`},PM={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},FM=`#0d1117`,IM=`#c9d1d9`,LM=`#264F78`,RM=`#8b949e`,zM=`#ffffff`,BM=`#7ee787`,VM=`#d2a8ff`,HM=`#79c0ff`,UM=`#ff7b72`,WM=`#a5d6ff`,Dme=`#2c333a`,Ome=`#3c444d`,GM=`#ffab70`,KM=`#161b22`,qM=`#30363d`,kme=`#21262d`,JM=`#f97583`,Ame=`#2d333b1a`,YM=`#21262d`,XM=zM,ZM=LM,jme=`#3a587a75`,QM=`#4d90fe`,$M=`#d29922`,Mme=`#3a587a55`,eN=`#58a6ff`,Nme=`#bc8cff`,tN=`#2ea04350`,nN=`#f8514940`,rN=`#7ee787`,iN=`#ff7b72`,aN=[I.theme({"&":{color:IM,backgroundColor:FM,fontSize:EM.fontSize,fontFamily:EM.fontFamily},".cm-content":{caretColor:XM,lineHeight:EM.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:XM,borderLeftWidth:Tme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${XM}99`,color:FM},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ZM},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#3a587a`,outline:`1px solid ${HM}`,color:IM,borderRadius:NM.borderRadius,"& span":{color:IM}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:QM,color:zM,padding:NM.padding,"& span":{color:zM}},".cm-search.cm-panel.cm-textfield":{color:IM,borderRadius:NM.borderRadius,padding:NM.padding},".cm-panels":{backgroundColor:YM,color:IM,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${qM}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${qM}`},".cm-panel button":{backgroundColor:YM,color:IM,border:kM.border,borderRadius:kM.borderRadius,padding:kM.padding},".cm-panel button:hover":{backgroundColor:Dme},".cm-activeLine":{backgroundColor:Ame,borderRadius:Eme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:KM,color:RM,border:OM.border,borderRight:`1px solid #30363d`,paddingRight:OM.paddingRight},".cm-activeLineGutter":{backgroundColor:kme,color:IM,fontWeight:OM.fontWeight},".cm-lineNumbers":{fontSize:OM.fontSize,lineHeight:OM.lineHeight},".cm-foldGutter":{fontSize:OM.fontSize,lineHeight:OM.lineHeight},".cm-foldGutter .cm-gutterElement":{color:RM,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:IM},".cm-insertedLine":{textDecoration:DM.insertedTextDecoration,backgroundColor:tN,color:rN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:DM.insertedTextDecoration,backgroundColor:`${tN} !important`,color:rN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious,border:`1px solid ${rN}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:DM.deletedTextDecoration,backgroundColor:nN,color:iN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:DM.deletedTextDecoration,backgroundColor:`${nN} !important`,color:iN,padding:DM.insertedLinePadding,borderRadius:DM.borderRadious,border:`1px solid ${iN}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:YM,border:`1px solid ${qM}`,borderRadius:PM.borderRadius,padding:PM.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:YM,border:`none`},"& > ul > li":{padding:PM.padding,lineHeight:PM.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ZM,color:zM,borderRadius:PM.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:RM,paddingRight:PM.paddingRight},"& > ul > li > span.cm-completionDetail":{color:RM,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:YM,borderBottomColor:YM},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${JM}`},"&-warning":{borderLeft:`3px solid ${$M}`},"&-info":{borderLeft:`3px solid ${eN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${JM}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${$M}`},".cm-matchingBracket":{backgroundColor:jme,outline:`1px solid ${QM}`,borderRadius:AM.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9758340`,outline:`1px solid ${JM}`,borderRadius:AM.borderRadius},".cm-selectionMatch":{backgroundColor:Mme,outline:`1px solid ${LM}50`,borderRadius:AM.borderRadius},".cm-foldPlaceholder":{backgroundColor:YM,color:RM,border:`1px dotted ${qM}70`,borderRadius:jM.borderRadius,padding:jM.padding,margin:jM.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${FM}, 0 0 0 3px ${eN}40`},"& .cm-scroller::-webkit-scrollbar":{width:MM.width,height:MM.height},"& .cm-scroller::-webkit-scrollbar-track":{background:KM},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:qM,borderRadius:MM.borderRadius,border:`3px solid ${KM}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Ome},".cm-ghostText":{opacity:`0.5`,color:RM}},{dark:!0}),D(V.define([{tag:A.keyword,color:UM,fontWeight:`bold`},{tag:A.controlKeyword,color:UM,fontWeight:`bold`},{tag:A.moduleKeyword,color:UM,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:HM},{tag:[A.variableName],color:HM},{tag:[A.propertyName],color:VM,fontStyle:`normal`},{tag:[A.typeName],color:UM},{tag:[A.className],color:VM,fontStyle:`italic`},{tag:[A.namespace],color:HM,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:IM},{tag:[A.bracket],color:RM},{tag:[A.brace],color:RM},{tag:[A.punctuation],color:RM},{tag:[A.function(A.variableName),A.labelName],color:BM},{tag:[A.definition(A.variableName)],color:HM},{tag:A.number,color:GM},{tag:A.changed,color:GM},{tag:A.annotation,color:JM,fontStyle:`italic`},{tag:A.modifier,color:GM,fontStyle:`italic`},{tag:A.self,color:GM},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:GM},{tag:[A.atom,A.bool,A.special(A.variableName)],color:GM},{tag:[A.processingInstruction,A.inserted],color:BM},{tag:[A.special(A.string),A.regexp],color:WM},{tag:A.string,color:WM},{tag:A.definition(A.typeName),color:UM,fontWeight:`bold`},{tag:A.meta,color:RM},{tag:A.comment,fontStyle:`italic`,color:RM},{tag:A.docComment,fontStyle:`italic`,color:RM},{tag:[A.tagName],color:BM},{tag:[A.attributeName],color:VM},{tag:[A.heading],fontWeight:`bold`,color:HM},{tag:[A.strong],fontWeight:`bold`,color:HM},{tag:[A.emphasis],fontStyle:`italic`,color:WM},{tag:[A.link],color:Nme,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:eN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:IM,textDecoration:`underline wavy`,borderBottom:`1px wavy ${JM}`},{tag:[A.strikethrough],color:JM,textDecoration:`line-through`},{tag:A.constant(A.name),color:GM},{tag:A.deleted,color:JM},{tag:A.squareBracket,color:RM},{tag:A.angleBracket,color:RM},{tag:A.monospace,color:IM},{tag:[A.contentSeparator],color:HM},{tag:A.quote,color:RM}]))],oN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Pme={borderLeftWidth:`2px`},sN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},cN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},lN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Fme={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`,Ime=`#116329`,bN=`#6a737d`,xN=`#6f42c1`,SN=`#005cc5`,CN=`#d73a49`,wN=`#032f62`,TN=`#22863a`,EN=`#e36209`,Lme=`#f1f8ff`,DN=`#e1e4e8`,Rme=`#f8f9fa`,ON=`#cb2431`,zme=`#BBDFFF20`,kN=Rme,AN=gN,Bme=_N,Vme=`#e8f0fe`,Hme=`#0366d6`,jN=`#b08800`,MN=`#79b8ff40`,NN=`#0969da`,Ume=`#8250df`,PN=`#e6ffec80`,FN=`#ffebe980`,IN=`#0f6d31`,LN=`#cf222e`,RN=[I.theme({"&":{color:gN,backgroundColor:hN,fontSize:oN.fontSize,fontFamily:oN.fontFamily},".cm-content":{caretColor:AN,lineHeight:oN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:AN,borderLeftWidth:Pme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${AN}99`,color:hN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Bme,color:gN},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#daebff`,outline:`1px solid ${SN}`,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 ${DN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${DN}`},".cm-panel button":{backgroundColor:hN,color:gN,border:lN.border,borderRadius:lN.borderRadius,padding:lN.padding},".cm-panel button:hover":{backgroundColor:`#f5f5f5`},".cm-activeLine":{backgroundColor:zme,borderRadius:Fme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yN,color:vN,border:cN.border,borderRight:`1px solid ${DN}`,paddingRight:cN.paddingRight},".cm-activeLineGutter":{backgroundColor:Lme,color:gN,fontWeight:cN.fontWeight},".cm-lineNumbers":{fontSize:cN.fontSize,lineHeight:cN.lineHeight},".cm-foldGutter":{fontSize:cN.fontSize,lineHeight:cN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:vN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:gN},".cm-insertedLine":{textDecoration:sN.insertedTextDecoration,backgroundColor:PN,color:IN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:sN.insertedTextDecoration,backgroundColor:`${PN} !important`,color:IN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious,border:`1px solid ${IN}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:sN.deletedTextDecoration,backgroundColor:FN,color:LN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:sN.deletedTextDecoration,backgroundColor:`${FN} !important`,color:LN,padding:sN.insertedLinePadding,borderRadius:sN.borderRadious,border:`1px solid ${LN}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:kN,border:`1px solid ${DN}`,borderRadius:mN.borderRadius,padding:mN.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:kN,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:kN,borderBottomColor:kN},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${ON}`},"&-warning":{borderLeft:`3px solid ${jN}`},"&-info":{borderLeft:`3px solid ${NN}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${ON}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${jN}`},".cm-matchingBracket":{backgroundColor:Vme,outline:`1px solid ${Hme}80`,borderRadius:uN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ffeef080`,outline:`1px solid ${ON}`,borderRadius:uN.borderRadius},".cm-selectionMatch":{backgroundColor:MN,outline:`1px solid ${_N}50`,borderRadius:uN.borderRadius},".cm-foldPlaceholder":{backgroundColor:MN,color:vN,border:`1px dotted ${DN}70`,borderRadius:dN.borderRadius,padding:dN.padding,margin:dN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${hN}, 0 0 0 3px ${NN}40`},"& .cm-scroller::-webkit-scrollbar":{width:fN.width,height:fN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:DN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:gN,borderRadius:fN.borderRadius,border:`3px solid ${DN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:bN},".cm-ghostText":{opacity:`0.5`,color:`#959da5`}},{dark:!1}),D(V.define([{tag:A.keyword,color:CN,fontWeight:`bold`},{tag:A.controlKeyword,color:CN,fontWeight:`bold`},{tag:A.moduleKeyword,color:CN,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:SN},{tag:[A.variableName],color:SN},{tag:[A.propertyName],color:xN,fontStyle:`normal`},{tag:[A.typeName],color:CN},{tag:[A.className],color:xN,fontStyle:`italic`},{tag:[A.namespace],color:SN,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:gN},{tag:[A.bracket],color:bN},{tag:[A.brace],color:bN},{tag:[A.punctuation],color:bN},{tag:[A.function(A.variableName),A.labelName],color:TN},{tag:[A.definition(A.variableName)],color:SN},{tag:A.number,color:EN},{tag:A.changed,color:EN},{tag:A.annotation,color:ON,fontStyle:`italic`},{tag:A.modifier,color:EN,fontStyle:`italic`},{tag:A.self,color:EN},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:EN},{tag:[A.atom,A.bool,A.special(A.variableName)],color:EN},{tag:[A.processingInstruction,A.inserted],color:TN},{tag:[A.special(A.string),A.regexp],color:wN},{tag:A.string,color:wN},{tag:A.definition(A.typeName),color:CN,fontWeight:`bold`},{tag:A.meta,color:bN},{tag:A.comment,fontStyle:`italic`,color:bN},{tag:A.docComment,fontStyle:`italic`,color:bN},{tag:[A.tagName],color:Ime},{tag:[A.attributeName],color:xN},{tag:[A.heading],fontWeight:`bold`,color:SN},{tag:[A.strong],fontWeight:`bold`,color:SN},{tag:[A.emphasis],fontStyle:`italic`,color:wN},{tag:[A.link],color:Ume,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:NN,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:gN,textDecoration:`underline wavy`,borderBottom:`1px wavy ${ON}`},{tag:[A.strikethrough],color:ON,textDecoration:`line-through`},{tag:A.constant(A.name),color:EN},{tag:A.deleted,color:ON},{tag:A.squareBracket,color:bN},{tag:A.angleBracket,color:bN},{tag:A.monospace,color:gN},{tag:[A.contentSeparator],color:SN},{tag:A.quote,color:bN}]))],zN={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Wme={borderLeftWidth:`2px`},BN={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},VN={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},HN={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Gme={borderRadius:`2px`},UN={borderRadius:`2px`},WN={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},GN={width:`12px`,height:`12px`,borderRadius:`6px`},KN={borderRadius:`4px`,padding:`2px 6px`},qN={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},JN=`#282828`,YN=`#3c3836`,XN=`#504945`,ZN=`#665c54`,Kme=`#7c6f64`,QN=`#928374`,$N=`#fbf1c7`,eP=`#ebdbb2`,tP=`#fb4934`,nP=`#b8bb26`,rP=`#fabd2f`,iP=`#83a598`,aP=`#d3869b`,oP=`#8ec07c`,sP=`#fe8019`,cP=tP,qme=YN,Jme=`#3c383660`,Yme=JN,lP=YN,uP=XN,Xme=`#665c5480`,dP=sP,Zme=`#504945cc`,Qme=rP,fP=rP,pP=iP,$me=aP,mP=`#32361a80`,hP=`#3c1f1e80`,gP=`#b8bb26`,_P=`#fb4934`,ehe=[I.theme({"&":{color:eP,backgroundColor:Yme,fontSize:zN.fontSize,fontFamily:zN.fontFamily},".cm-content":{caretColor:dP,lineHeight:zN.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:dP,borderLeftWidth:Wme.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${dP}99`,color:JN},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:uP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#b57614cc`,outline:`1px solid ${rP}`,color:$N,borderRadius:KN.borderRadius,"& span":{color:$N}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:sP,color:JN,padding:KN.padding,"& span":{color:JN}},".cm-search.cm-panel.cm-textfield":{color:eP,borderRadius:KN.borderRadius,padding:KN.padding},".cm-panels":{backgroundColor:lP,color:eP,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${ZN}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${ZN}`},".cm-panel button":{backgroundColor:lP,color:eP,border:HN.border,borderRadius:HN.borderRadius,padding:HN.padding},".cm-panel button:hover":{backgroundColor:XN},".cm-activeLine":{backgroundColor:Jme,borderRadius:Gme.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:YN,color:QN,border:VN.border,borderRight:`1px solid ${XN}`,paddingRight:VN.paddingRight},".cm-activeLineGutter":{backgroundColor:qme,color:eP,fontWeight:VN.fontWeight},".cm-lineNumbers":{fontSize:VN.fontSize,lineHeight:VN.lineHeight},".cm-foldGutter":{fontSize:VN.fontSize,lineHeight:VN.lineHeight},".cm-foldGutter .cm-gutterElement":{color:QN,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:eP},".cm-insertedLine":{textDecoration:BN.insertedTextDecoration,backgroundColor:mP,color:gP,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:BN.insertedTextDecoration,backgroundColor:`${mP} !important`,color:gP,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious,border:`1px solid ${gP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:BN.deletedTextDecoration,backgroundColor:hP,color:_P,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:BN.deletedTextDecoration,backgroundColor:`${hP} !important`,color:_P,padding:BN.insertedLinePadding,borderRadius:BN.borderRadious,border:`1px solid ${_P}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:lP,border:`1px solid ${ZN}`,borderRadius:qN.borderRadius,padding:qN.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:lP,border:`none`},"& > ul > li":{padding:qN.padding,lineHeight:qN.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:uP,color:$N,borderRadius:qN.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:QN,paddingRight:qN.paddingRight},"& > ul > li > span.cm-completionDetail":{color:QN,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:lP,borderBottomColor:lP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${cP}`},"&-warning":{borderLeft:`3px solid ${fP}`},"&-info":{borderLeft:`3px solid ${pP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${cP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${fP}`},".cm-matchingBracket":{backgroundColor:Zme,outline:`1px solid ${Qme}`,borderRadius:UN.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#cc241d55`,outline:`1px solid ${cP}`,borderRadius:UN.borderRadius},".cm-selectionMatch":{backgroundColor:Xme,outline:`1px solid ${ZN}`,borderRadius:UN.borderRadius},".cm-foldPlaceholder":{backgroundColor:lP,color:QN,border:`1px dotted ${ZN}`,borderRadius:WN.borderRadius,padding:WN.padding,margin:WN.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${JN}, 0 0 0 3px ${sP}40`},"& .cm-scroller::-webkit-scrollbar":{width:GN.width,height:GN.height},"& .cm-scroller::-webkit-scrollbar-track":{background:YN},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ZN,borderRadius:GN.borderRadius,border:`3px solid ${YN}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:Kme},".cm-ghostText":{opacity:`0.5`,color:QN}},{dark:!0}),D(V.define([{tag:A.keyword,color:tP,fontWeight:`bold`},{tag:A.controlKeyword,color:tP,fontWeight:`bold`},{tag:A.moduleKeyword,color:tP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:iP},{tag:[A.variableName],color:iP},{tag:[A.propertyName],color:oP,fontStyle:`normal`},{tag:[A.typeName],color:oP},{tag:[A.className],color:rP,fontStyle:`italic`},{tag:[A.namespace],color:iP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:eP},{tag:[A.bracket],color:QN},{tag:[A.brace],color:QN},{tag:[A.punctuation],color:QN},{tag:[A.function(A.variableName),A.labelName],color:rP},{tag:[A.definition(A.variableName)],color:iP},{tag:A.number,color:aP},{tag:A.changed,color:aP},{tag:A.annotation,color:cP,fontStyle:`italic`},{tag:A.modifier,color:aP,fontStyle:`italic`},{tag:A.self,color:aP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:sP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:sP},{tag:[A.processingInstruction,A.inserted],color:nP},{tag:[A.special(A.string),A.regexp],color:nP},{tag:A.string,color:nP},{tag:A.definition(A.typeName),color:oP,fontWeight:`bold`},{tag:A.meta,color:QN},{tag:A.comment,fontStyle:`italic`,color:QN},{tag:A.docComment,fontStyle:`italic`,color:QN},{tag:[A.tagName],color:tP},{tag:[A.attributeName],color:rP},{tag:[A.heading],fontWeight:`bold`,color:rP},{tag:[A.strong],fontWeight:`bold`,color:rP},{tag:[A.emphasis],fontStyle:`italic`,color:nP},{tag:[A.link],color:$me,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:pP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:eP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${cP}`},{tag:[A.strikethrough],color:cP,textDecoration:`line-through`},{tag:A.constant(A.name),color:sP},{tag:A.deleted,color:cP},{tag:A.squareBracket,color:QN},{tag:A.angleBracket,color:QN},{tag:A.monospace,color:eP},{tag:[A.contentSeparator],color:iP},{tag:A.quote,color:QN}]))],vP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},the={borderLeftWidth:`2px`},yP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},bP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},xP={border:`none`,borderRadius:`4px`,padding:`2px 10px`},nhe={borderRadius:`2px`},SP={borderRadius:`2px`},CP={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},wP={width:`12px`,height:`12px`,borderRadius:`6px`},TP={borderRadius:`4px`,padding:`2px 6px`},EP={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},DP=`#3c3836`,rhe=`#504945`,ihe=`#665c54`,OP=`#7c6f64`,kP=`#928374`,AP=`#fbf1c7`,jP=`#ebdbb2`,MP=`#d5c4a1`,NP=`#bdae93`,ahe=`#a89984`,PP=`#9d0006`,FP=`#79740e`,IP=`#b57614`,LP=`#076678`,RP=`#8f3f71`,zP=`#427b58`,BP=`#af3a03`,VP=PP,ohe=jP,she=`#ffc42e25`,che=AP,HP=jP,lhe=ohe,uhe=`#ffc42e40`,UP=BP,dhe=`#d5c4a180`,fhe=BP,WP=IP,GP=LP,phe=RP,KP=`#d8e5bc80`,qP=`#f7cfcf80`,JP=`#79740e`,YP=`#9d0006`,mhe=[I.theme({"&":{color:DP,backgroundColor:che,fontSize:vP.fontSize,fontFamily:vP.fontFamily},".cm-content":{caretColor:UP,lineHeight:vP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:UP,borderLeftWidth:the.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${UP}99`,color:AP},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:lhe,color:DP},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#ffc42e80`,outline:`1px solid ${BP}`,color:DP,borderRadius:TP.borderRadius,"& span":{color:DP}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:BP,color:AP,padding:TP.padding,"& span":{color:AP}},".cm-search.cm-panel.cm-textfield":{color:DP,borderRadius:TP.borderRadius,padding:TP.padding},".cm-panels":{backgroundColor:jP,color:rhe,borderRadius:`0 0 4px 4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${NP}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${NP}`},".cm-panel button":{backgroundColor:AP,color:DP,border:xP.border,borderRadius:xP.borderRadius,padding:xP.padding},".cm-panel button:hover":{backgroundColor:MP},".cm-activeLine":{backgroundColor:she,borderRadius:nhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:jP,color:OP,border:bP.border,borderRight:`1px solid ${NP}`,paddingRight:bP.paddingRight},".cm-activeLineGutter":{backgroundColor:MP,color:DP,fontWeight:bP.fontWeight},".cm-lineNumbers":{fontSize:bP.fontSize,lineHeight:bP.lineHeight},".cm-foldGutter":{fontSize:bP.fontSize,lineHeight:bP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:OP,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:DP},".cm-insertedLine":{textDecoration:yP.insertedTextDecoration,backgroundColor:KP,color:JP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:yP.insertedTextDecoration,backgroundColor:`${KP} !important`,color:JP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious,border:`1px solid ${JP}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:yP.deletedTextDecoration,backgroundColor:qP,color:YP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:yP.deletedTextDecoration,backgroundColor:`${qP} !important`,color:YP,padding:yP.insertedLinePadding,borderRadius:yP.borderRadious,border:`1px solid ${YP}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:HP,border:`1px solid ${NP}`,borderRadius:EP.borderRadius,padding:EP.padding,boxShadow:`0 1px 5px rgba(0, 0, 0, 0.1)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:HP,border:`none`},"& > ul > li":{padding:EP.padding,lineHeight:EP.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:BP+`30`,color:DP,borderRadius:EP.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:BP+`15`},"& > ul > li > span.cm-completionIcon":{color:OP,paddingRight:EP.paddingRight},"& > ul > li > span.cm-completionDetail":{color:OP,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:HP,borderBottomColor:HP},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${VP}`},"&-warning":{borderLeft:`3px solid ${WP}`},"&-info":{borderLeft:`3px solid ${GP}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${VP}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${WP}`},".cm-matchingBracket":{backgroundColor:dhe,outline:`1px solid ${fhe}`,borderRadius:SP.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#fb492740`,outline:`1px solid ${VP}`,borderRadius:SP.borderRadius},".cm-selectionMatch":{backgroundColor:uhe,outline:`1px solid ${NP}`,borderRadius:SP.borderRadius},".cm-foldPlaceholder":{backgroundColor:`transparent`,color:ihe,border:`1px dotted ${NP}`,borderRadius:CP.borderRadius,padding:CP.padding,margin:CP.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${AP}, 0 0 0 3px ${BP}40`},"& .cm-scroller::-webkit-scrollbar":{width:wP.width,height:wP.height},"& .cm-scroller::-webkit-scrollbar-track":{background:AP},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:NP,borderRadius:wP.borderRadius,border:`3px solid ${AP}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:ahe},".cm-ghostText":{opacity:`0.5`,color:kP}},{dark:!1}),D(V.define([{tag:A.keyword,color:PP,fontWeight:`bold`},{tag:A.controlKeyword,color:PP,fontWeight:`bold`},{tag:A.moduleKeyword,color:PP,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:LP},{tag:[A.variableName],color:LP},{tag:[A.propertyName],color:zP,fontStyle:`normal`},{tag:[A.typeName],color:zP},{tag:[A.className],color:IP,fontStyle:`italic`},{tag:[A.namespace],color:LP,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:DP},{tag:[A.bracket],color:kP},{tag:[A.brace],color:kP},{tag:[A.punctuation],color:kP},{tag:[A.function(A.variableName),A.labelName],color:IP},{tag:[A.definition(A.variableName)],color:LP},{tag:A.number,color:RP},{tag:A.changed,color:RP},{tag:A.annotation,color:VP,fontStyle:`italic`},{tag:A.modifier,color:RP,fontStyle:`italic`},{tag:A.self,color:RP},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:BP},{tag:[A.atom,A.bool,A.special(A.variableName)],color:BP},{tag:[A.processingInstruction,A.inserted],color:FP},{tag:[A.special(A.string),A.regexp],color:FP},{tag:A.string,color:FP},{tag:A.definition(A.typeName),color:zP,fontWeight:`bold`},{tag:A.meta,color:kP},{tag:A.comment,fontStyle:`italic`,color:kP},{tag:A.docComment,fontStyle:`italic`,color:kP},{tag:[A.tagName],color:PP},{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:FP},{tag:[A.link],color:phe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:GP,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:DP,textDecoration:`underline wavy`,borderBottom:`1px wavy ${VP}`},{tag:[A.strikethrough],color:VP,textDecoration:`line-through`},{tag:A.constant(A.name),color:BP},{tag:A.deleted,color:VP},{tag:A.squareBracket,color:kP},{tag:A.angleBracket,color:kP},{tag:A.monospace,color:DP},{tag:[A.contentSeparator],color:LP},{tag:A.quote,color:kP}]))],XP={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},hhe={borderLeftWidth:`2px`},ZP={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},QP={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},$P={border:`none`,borderRadius:`4px`,padding:`2px 10px`},ghe={borderRadius:`2px`},eF={borderRadius:`2px`},tF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},nF={width:`12px`,height:`12px`,borderRadius:`6px`},rF={borderRadius:`4px`,padding:`2px 6px`},iF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},aF=`#212121`,oF=`#505d64`,sF=`#606f7a`,cF=`#707d8b`,_he=`#a0a4ae`,lF=`#bdbdbd`,uF=`#e0e0e0`,vhe=`#202325`,dF=`#ff5f52`,fF=`#ff6e40`,yhe=`#fa5788`,pF=`#facf4e`,mF=`#ffad42`,hF=`#56c8d8`,gF=`#7186f0`,_F=`#cf6edf`,bhe=`#6abf69`,xhe=`#99d066`,She=`#4ebaaa`,vF=dF,yF=vhe,Che=`#2d333b30`,bF=aF,xF=oF,SF=`#ffffff1f`,whe=`#4A707A80`,CF=_he,The=`#39496650`,Ehe=hF,wF=mF,TF=hF,Dhe=_F,EF=`#1e3d2780`,DF=`#4e282880`,OF=`#6abf69`,kF=`#ff5f52`,Ohe=[I.theme({"&":{color:lF,backgroundColor:bF,fontSize:XP.fontSize,fontFamily:XP.fontFamily},".cm-content":{caretColor:CF,lineHeight:XP.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:CF,borderLeftWidth:hhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${CF}99`,color:bF},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:SF},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#394966cc`,outline:`1px solid ${hF}`,color:uF,borderRadius:rF.borderRadius,"& span":{color:uF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:hF,color:bF,padding:rF.padding,"& span":{color:bF}},".cm-search.cm-panel.cm-textfield":{color:lF,borderRadius:rF.borderRadius,padding:rF.padding},".cm-panels":{backgroundColor:aF,color:lF,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${cF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${cF}`},".cm-panel button":{backgroundColor:xF,color:lF,border:$P.border,borderRadius:$P.borderRadius,padding:$P.padding},".cm-panel button:hover":{backgroundColor:sF},".cm-activeLine":{backgroundColor:Che,borderRadius:ghe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:yF,color:cF,border:QP.border,borderRight:`1px solid ${oF}`,paddingRight:QP.paddingRight},".cm-activeLineGutter":{backgroundColor:`#252a2c`,color:lF,fontWeight:QP.fontWeight},".cm-lineNumbers":{fontSize:QP.fontSize,lineHeight:QP.lineHeight},".cm-foldGutter":{fontSize:QP.fontSize,lineHeight:QP.lineHeight},".cm-foldGutter .cm-gutterElement":{color:cF,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:lF},".cm-insertedLine":{textDecoration:ZP.insertedTextDecoration,backgroundColor:EF,color:OF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:ZP.insertedTextDecoration,backgroundColor:`${EF} !important`,color:OF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious,border:`1px solid ${OF}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:ZP.deletedTextDecoration,backgroundColor:DF,color:kF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:ZP.deletedTextDecoration,backgroundColor:`${DF} !important`,color:kF,padding:ZP.insertedLinePadding,borderRadius:ZP.borderRadious,border:`1px solid ${kF}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:xF,border:`1px solid ${cF}`,borderRadius:iF.borderRadius,padding:iF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:xF,border:`none`},"& > ul > li":{padding:iF.padding,lineHeight:iF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:SF,color:uF,borderRadius:iF.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:cF,paddingRight:iF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:cF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:xF,borderBottomColor:xF},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${vF}`},"&-warning":{borderLeft:`3px solid ${wF}`},"&-info":{borderLeft:`3px solid ${TF}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${vF}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${wF}`},".cm-matchingBracket":{backgroundColor:The,outline:`1px solid ${Ehe}`,borderRadius:eF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#ff5f5240`,outline:`1px solid ${vF}`,borderRadius:eF.borderRadius},".cm-selectionMatch":{backgroundColor:whe,outline:`1px solid ${sF}50`,borderRadius:eF.borderRadius},".cm-foldPlaceholder":{backgroundColor:xF,color:cF,border:`1px dotted ${cF}70`,borderRadius:tF.borderRadius,padding:tF.padding,margin:tF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${bF}, 0 0 0 3px ${hF}40`},"& .cm-scroller::-webkit-scrollbar":{width:nF.width,height:nF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:yF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:sF,borderRadius:nF.borderRadius,border:`3px solid ${yF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:cF},".cm-ghostText":{opacity:`0.5`,color:cF}},{dark:!0}),D(V.define([{tag:A.keyword,color:dF,fontWeight:`bold`},{tag:A.controlKeyword,color:dF,fontWeight:`bold`},{tag:A.moduleKeyword,color:dF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:gF},{tag:[A.variableName],color:xhe},{tag:[A.propertyName],color:_F,fontStyle:`normal`},{tag:[A.typeName],color:dF},{tag:[A.className],color:pF,fontStyle:`italic`},{tag:[A.namespace],color:gF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lF},{tag:[A.bracket],color:cF},{tag:[A.brace],color:cF},{tag:[A.punctuation],color:cF},{tag:[A.function(A.variableName)],color:hF},{tag:[A.labelName],color:hF,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:hF},{tag:[A.definition(A.variableName)],color:gF},{tag:A.number,color:pF},{tag:A.changed,color:pF},{tag:A.annotation,color:vF,fontStyle:`italic`},{tag:A.modifier,color:fF,fontStyle:`italic`},{tag:A.self,color:fF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:fF},{tag:[A.atom,A.bool,A.special(A.variableName)],color:fF},{tag:[A.processingInstruction,A.inserted],color:bhe},{tag:[A.special(A.string),A.regexp],color:yhe},{tag:A.string,color:mF},{tag:A.definition(A.typeName),color:dF,fontWeight:`bold`},{tag:A.meta,color:cF},{tag:A.comment,fontStyle:`italic`,color:cF},{tag:A.docComment,fontStyle:`italic`,color:cF},{tag:[A.tagName],color:_F},{tag:[A.attributeName],color:pF},{tag:[A.heading],fontWeight:`bold`,color:She},{tag:A.heading1,color:pF},{tag:A.heading2,color:mF},{tag:A.heading3,color:hF},{tag:A.heading4,color:gF},{tag:A.heading5,color:_F},{tag:A.heading6,color:dF},{tag:[A.strong],fontWeight:`bold`,color:gF},{tag:[A.emphasis],fontStyle:`italic`,color:mF},{tag:[A.link],color:Dhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:TF,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:lF,textDecoration:`underline wavy`,borderBottom:`1px wavy ${vF}`},{tag:[A.strikethrough],color:vF,textDecoration:`line-through`},{tag:A.constant(A.name),color:fF},{tag:A.deleted,color:vF},{tag:A.squareBracket,color:cF},{tag:A.angleBracket,color:cF},{tag:A.monospace,color:lF},{tag:[A.contentSeparator],color:gF},{tag:A.quote,color:cF}]))],AF={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},khe={borderLeftWidth:`2px`},jF={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},MF={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},NF={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Ahe={borderRadius:`2px`},PF={borderRadius:`2px`},FF={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},IF={width:`12px`,height:`12px`,borderRadius:`6px`},LF={borderRadius:`4px`,padding:`2px 6px`},RF={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},jhe=`#ffffff`,zF=`#f5f5f5`,BF=`#212121`,VF=`#757575`,HF=`#9e9e9e`,UF=`#424242`,Mhe=`#eeeeee`,WF=`#fafafa`,GF=`#f44336`,KF=`#ff3e00`,qF=`#FF00E9FF`,Nhe=`#ffc107`,JF=`#ff9800`,YF=`#00acc1`,XF=`#3949ab`,ZF=`#8e24aa`,QF=`#43a047`,$F=`#00897b`,eI=`#1e88e5`,tI=GF,Phe=`#00000008`,nI=jhe,rI=zF,Fhe=`#DDEEFF`,Ihe=`#90a4ae26`,iI=HF,Lhe=`#DDEEFF80`,Rhe=YF,aI=JF,oI=YF,zhe=ZF,sI=`#ECEFF180`,cI=`#e6ffed80`,lI=`#ffebe980`,uI=`#28a745`,dI=`#d73a49`,Bhe=[I.theme({"&":{color:BF,backgroundColor:nI,fontSize:AF.fontSize,fontFamily:AF.fontFamily},".cm-content":{caretColor:iI,lineHeight:AF.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:iI,borderLeftWidth:khe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${BF}99`,color:nI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Fhe},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#FFA72680`,outline:`1px solid ${Nhe}`,color:BF,borderRadius:LF.borderRadius,"& span":{color:BF}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:YF,color:nI,padding:LF.padding,"& span":{color:nI}},".cm-search.cm-panel.cm-textfield":{color:BF,borderRadius:LF.borderRadius,padding:LF.padding},".cm-panels":{backgroundColor:Mhe,color:BF,borderRadius:`4px`,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${HF}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${HF}`},".cm-panel button":{backgroundColor:rI,color:BF,border:NF.border,borderRadius:NF.borderRadius,padding:NF.padding},".cm-panel button:hover":{backgroundColor:`#CFD8DC`},".cm-activeLine":{backgroundColor:Phe,borderRadius:Ahe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:WF,color:VF,border:MF.border,borderRight:`1px solid ${HF}`,paddingRight:MF.paddingRight},".cm-activeLineGutter":{backgroundColor:`#E0E0E0`,color:BF,fontWeight:MF.fontWeight},".cm-lineNumbers":{fontSize:MF.fontSize,lineHeight:MF.lineHeight},".cm-foldGutter":{fontSize:MF.fontSize,lineHeight:MF.lineHeight},".cm-foldGutter .cm-gutterElement":{color:VF,cursor:`pointer`,transition:`color 0.15s ease`},".cm-foldGutter .cm-gutterElement:hover":{color:BF},".cm-insertedLine":{textDecoration:jF.insertedTextDecoration,backgroundColor:cI,color:uI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:jF.insertedTextDecoration,backgroundColor:`${cI} !important`,color:uI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious,border:`1px solid ${uI}30`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:jF.deletedTextDecoration,backgroundColor:lI,color:dI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:jF.deletedTextDecoration,backgroundColor:`${lI} !important`,color:dI,padding:jF.insertedLinePadding,borderRadius:jF.borderRadious,border:`1px solid ${dI}30`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:rI,border:`1px solid ${HF}`,borderRadius:RF.borderRadius,padding:RF.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:rI,border:`none`},"& > ul > li":{padding:RF.padding,lineHeight:RF.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:sI,color:BF,borderRadius:RF.borderRadiusSelected},"& > ul > li:hover":{backgroundColor:sI},"& > ul > li > span.cm-completionIcon":{color:VF,paddingRight:RF.paddingRight},"& > ul > li > span.cm-completionDetail":{color:VF,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:rI,borderBottomColor:rI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${tI}`},"&-warning":{borderLeft:`3px solid ${aI}`},"&-info":{borderLeft:`3px solid ${oI}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${tI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${aI}`},".cm-matchingBracket":{backgroundColor:Lhe,outline:`1px solid ${Rhe}`,borderRadius:PF.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${tI}20`,outline:`1px solid ${tI}`,borderRadius:PF.borderRadius},".cm-selectionMatch":{backgroundColor:Ihe,outline:`1px solid ${VF}30`,borderRadius:PF.borderRadius},".cm-foldPlaceholder":{backgroundColor:zF,color:VF,border:`1px dotted ${VF}70`,borderRadius:FF.borderRadius,padding:FF.padding,margin:FF.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${nI}, 0 0 0 3px ${YF}40`},"& .cm-scroller::-webkit-scrollbar":{width:IF.width,height:IF.height},"& .cm-scroller::-webkit-scrollbar-track":{background:WF},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:VF,borderRadius:IF.borderRadius,border:`3px solid ${WF}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:BF},".cm-ghostText":{opacity:`0.5`,color:VF}},{dark:!1}),D(V.define([{tag:A.keyword,color:YF,fontWeight:`bold`},{tag:A.controlKeyword,color:YF,fontWeight:`bold`},{tag:A.moduleKeyword,color:YF,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:UF},{tag:[A.variableName],color:UF},{tag:[A.propertyName],color:$F,fontStyle:`normal`},{tag:[A.typeName],color:JF},{tag:[A.className],color:JF,fontStyle:`italic`},{tag:[A.namespace],color:XF,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:XF},{tag:[A.bracket],color:ZF},{tag:[A.brace],color:ZF},{tag:[A.punctuation],color:VF},{tag:[A.function(A.variableName)],color:KF},{tag:[A.labelName],color:eI,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:KF},{tag:[A.definition(A.variableName)],color:qF},{tag:A.number,color:JF},{tag:A.changed,color:JF},{tag:A.annotation,color:tI,fontStyle:`italic`},{tag:A.modifier,color:JF,fontStyle:`italic`},{tag:A.self,color:JF},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:JF},{tag:[A.atom,A.bool],color:ZF},{tag:[A.processingInstruction,A.inserted],color:QF},{tag:A.string,color:QF},{tag:[A.special(A.string),A.regexp],color:qF},{tag:A.definition(A.typeName),color:qF,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:qF},{tag:A.meta,color:VF},{tag:A.comment,fontStyle:`italic`,color:VF},{tag:A.docComment,fontStyle:`italic`,color:VF},{tag:[A.tagName],color:KF},{tag:[A.attributeName],color:UF},{tag:[A.heading],fontWeight:`bold`,color:$F},{tag:A.heading1,color:eI},{tag:A.heading2,color:JF},{tag:A.heading3,color:YF},{tag:A.heading4,color:XF},{tag:A.heading5,color:ZF},{tag:A.heading6,color:QF},{tag:[A.strong],fontWeight:`bold`,color:XF},{tag:[A.emphasis],fontStyle:`italic`,color:JF},{tag:[A.link],color:zhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:oI,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:BF,textDecoration:`underline wavy`,borderBottom:`1px dotted ${GF}`},{tag:[A.strikethrough],color:tI,textDecoration:`line-through`},{tag:A.constant(A.name),color:KF},{tag:A.deleted,color:tI},{tag:A.squareBracket,color:GF},{tag:A.angleBracket,color:BF},{tag:A.monospace,color:BF},{tag:[A.contentSeparator],color:YF},{tag:A.quote,color:QF}]))],fI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Vhe={borderLeftWidth:`2px`},pI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},mI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},hI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Hhe={borderRadius:`2px`},gI={borderRadius:`2px`},_I={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},vI={width:`12px`,height:`12px`,borderRadius:`6px`},yI={borderRadius:`4px`,padding:`2px 6px`},bI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},xI=`#272822`,SI=`#f8f8f2`,CI=`#88846f`,Uhe=`#f8f8f0`,wI=`#F92672`,TI=`#FD971F`,EI=`#66D9EF`,DI=`#E6DB74`,OI=`#AE81FF`,kI=`#A6E22E`,AI=`#F44747`,jI=`#414339`,Whe=`#3e3d3257`,MI=`#34352f`,NI=`#49483E`,Ghe=`#75715e70`,PI=Uhe,Khe=`#75715E55`,qhe=EI,FI=TI,II=EI,Jhe=OI,LI=`#3d4d3880`,RI=`#4d393980`,zI=`#A6E22E`,BI=`#F92672`,Yhe=[I.theme({"&":{color:SI,backgroundColor:xI,fontSize:fI.fontSize,fontFamily:fI.fontFamily},".cm-content":{caretColor:PI,lineHeight:fI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:PI,borderLeftWidth:Vhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${PI}99`,color:xI},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:NI},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#49483E99`,outline:`1px solid ${DI}`,color:SI,borderRadius:yI.borderRadius,"& span":{color:SI}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:wI,color:xI,padding:yI.padding,"& span":{color:xI}},".cm-search.cm-panel.cm-textfield":{color:SI,borderRadius:yI.borderRadius,padding:yI.padding},".cm-panels":{backgroundColor:jI,color:SI,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${CI}80`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${CI}80`},".cm-panel button":{backgroundColor:MI,color:SI,border:hI.border,borderRadius:hI.borderRadius,padding:hI.padding},".cm-panel button:hover":{backgroundColor:`#49483E`},".cm-activeLine":{backgroundColor:Whe,borderRadius:Hhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:jI,color:CI,border:mI.border,borderRight:`1px solid #3e3d32`,paddingRight:mI.paddingRight},".cm-activeLineGutter":{backgroundColor:`#35352c`,color:SI,fontWeight:mI.fontWeight},".cm-lineNumbers":{fontSize:mI.fontSize,lineHeight:mI.lineHeight},".cm-foldGutter":{fontSize:mI.fontSize,lineHeight:mI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:CI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:SI},".cm-insertedLine":{textDecoration:pI.insertedTextDecoration,backgroundColor:LI,color:zI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:pI.insertedTextDecoration,backgroundColor:`${LI} !important`,color:zI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious,border:`1px solid ${zI}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:pI.deletedTextDecoration,backgroundColor:RI,color:BI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:pI.deletedTextDecoration,backgroundColor:`${RI} !important`,color:BI,padding:pI.insertedLinePadding,borderRadius:pI.borderRadious,border:`1px solid ${BI}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:MI,border:`1px solid #49483E`,borderRadius:bI.borderRadius,padding:bI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.4)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:MI,border:`none`},"& > ul > li":{padding:bI.padding,lineHeight:bI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:NI,color:SI,borderRadius:bI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:CI,paddingRight:bI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:CI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:MI,borderBottomColor:MI},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${AI}`},"&-warning":{borderLeft:`3px solid ${FI}`},"&-info":{borderLeft:`3px solid ${II}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${AI}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${FI}`},".cm-matchingBracket":{backgroundColor:Khe,outline:`1px solid ${qhe}`,borderRadius:gI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`#f9267240`,outline:`1px solid ${AI}`,borderRadius:gI.borderRadius},".cm-selectionMatch":{backgroundColor:Ghe,outline:`1px solid ${CI}50`,borderRadius:gI.borderRadius},".cm-foldPlaceholder":{backgroundColor:MI,color:CI,border:`1px dotted ${CI}70`,borderRadius:_I.borderRadius,padding:_I.padding,margin:_I.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${xI}, 0 0 0 3px ${EI}40`},"& .cm-scroller::-webkit-scrollbar":{width:vI.width,height:vI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:jI},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#49483E`,borderRadius:vI.borderRadius,border:`3px solid ${jI}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#5a594d`},".cm-ghostText":{opacity:`0.5`,color:CI}},{dark:!0}),D(V.define([{tag:A.keyword,color:wI,fontWeight:`bold`},{tag:A.controlKeyword,color:wI,fontWeight:`bold`},{tag:A.moduleKeyword,color:wI,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:TI},{tag:[A.variableName],color:TI},{tag:[A.propertyName],color:kI,fontStyle:`normal`},{tag:[A.typeName],color:EI,fontStyle:`italic`},{tag:[A.className],color:kI,fontStyle:`italic`},{tag:[A.namespace],color:TI,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:wI},{tag:[A.bracket],color:SI},{tag:[A.brace],color:SI},{tag:[A.punctuation],color:SI},{tag:[A.function(A.variableName),A.labelName],color:EI},{tag:[A.definition(A.function(A.variableName))],color:EI},{tag:[A.definition(A.variableName)],color:TI},{tag:A.number,color:OI},{tag:A.changed,color:OI},{tag:A.annotation,color:AI,fontStyle:`italic`},{tag:A.modifier,color:OI,fontStyle:`italic`},{tag:A.self,color:OI},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:OI},{tag:[A.atom,A.bool,A.special(A.variableName)],color:OI},{tag:[A.processingInstruction,A.inserted],color:kI},{tag:[A.special(A.string),A.regexp],color:DI},{tag:A.string,color:DI},{tag:A.definition(A.typeName),color:EI,fontWeight:`bold`},{tag:A.meta,color:CI},{tag:A.comment,fontStyle:`italic`,color:CI},{tag:A.docComment,fontStyle:`italic`,color:CI},{tag:[A.tagName],color:wI},{tag:[A.attributeName],color:kI},{tag:[A.heading],fontWeight:`bold`,color:kI},{tag:[A.strong],fontWeight:`bold`,color:TI},{tag:[A.emphasis],fontStyle:`italic`,color:TI},{tag:[A.link],color:Jhe,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:II,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:SI,textDecoration:`underline wavy`,borderBottom:`1px wavy ${AI}`},{tag:[A.strikethrough],color:AI,textDecoration:`line-through`},{tag:A.constant(A.name),color:OI},{tag:A.deleted,color:AI},{tag:A.squareBracket,color:SI},{tag:A.angleBracket,color:SI},{tag:A.monospace,color:SI},{tag:[A.contentSeparator],color:TI},{tag:A.quote,color:CI}]))],VI={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Xhe={borderLeftWidth:`2px`},HI={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},UI={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},WI={border:`none`,borderRadius:`4px`,padding:`2px 10px`},Zhe={borderRadius:`2px`},GI={borderRadius:`2px`},KI={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},qI={width:`12px`,height:`12px`,borderRadius:`6px`},JI={borderRadius:`4px`,padding:`2px 6px`},YI={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Qhe=`#2e3440`,XI=`#3b4252`,ZI=`#434c5e`,QI=`#4c566a`,$I=`#d8dee9`,eL=`#eceff4`,tL=`#8fbcbb`,nL=`#88c0d0`,rL=`#81a1c1`,iL=`#5e81ac`,aL=`#bf616a`,oL=`#d08770`,sL=`#ebcb8b`,cL=`#a3be8c`,lL=`#b48ead`,$he=`#d30102`,uL=`#252a33`,ege=`#3b425277`,dL=Qhe,fL=XI,tge=ZI,nge=`#4c566a80`,pL=$I,rge=`#4c566a55`,ige=nL,mL=sL,hL=rL,age=lL,gL=`#3b4a3880`,_L=`#4a393a80`,vL=`#a3be8c`,yL=`#bf616a`,oge=[I.theme({"&":{color:$I,backgroundColor:dL,fontSize:VI.fontSize,fontFamily:VI.fontFamily},".cm-content":{caretColor:pL,lineHeight:VI.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:pL,borderLeftWidth:Xhe.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${pL}99`,color:dL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:tge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#5e81ac80`,outline:`1px solid ${tL}`,color:$I,borderRadius:JI.borderRadius,"& span":{color:$I}},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:rL,color:eL,padding:JI.padding,"& span":{color:eL}},".cm-search.cm-panel.cm-textfield":{color:$I,borderRadius:JI.borderRadius,padding:JI.padding},".cm-panels":{backgroundColor:uL,color:$I,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${QI}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${QI}`},".cm-panel button":{backgroundColor:fL,color:$I,border:WI.border,borderRadius:WI.borderRadius,padding:WI.padding},".cm-panel button:hover":{backgroundColor:ZI},".cm-activeLine":{backgroundColor:ege,borderRadius:Zhe.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:uL,color:QI,border:UI.border,borderRight:`1px solid ${ZI}`,paddingRight:UI.paddingRight},".cm-activeLineGutter":{backgroundColor:XI,color:$I,fontWeight:UI.fontWeight},".cm-lineNumbers":{fontSize:UI.fontSize,lineHeight:UI.lineHeight},".cm-foldGutter":{fontSize:UI.fontSize,lineHeight:UI.lineHeight},".cm-foldGutter .cm-gutterElement":{color:QI,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:$I},".cm-insertedLine":{textDecoration:HI.insertedTextDecoration,backgroundColor:gL,color:vL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:HI.insertedTextDecoration,backgroundColor:`${gL} !important`,color:vL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious,border:`1px solid ${vL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:HI.deletedTextDecoration,backgroundColor:_L,color:yL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:HI.deletedTextDecoration,backgroundColor:`${_L} !important`,color:yL,padding:HI.insertedLinePadding,borderRadius:HI.borderRadious,border:`1px solid ${yL}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:fL,border:`1px solid ${QI}`,borderRadius:YI.borderRadius,padding:YI.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:fL,border:`none`},"& > ul > li":{padding:YI.padding,lineHeight:YI.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:ZI,color:eL,borderRadius:YI.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:QI,paddingRight:YI.paddingRight},"& > ul > li > span.cm-completionDetail":{color:QI,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:fL,borderBottomColor:fL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${aL}`},"&-warning":{borderLeft:`3px solid ${mL}`},"&-info":{borderLeft:`3px solid ${hL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${aL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${mL}`},".cm-matchingBracket":{backgroundColor:rge,outline:`1px solid ${ige}`,borderRadius:GI.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${aL}40`,outline:`1px solid ${$he}`,borderRadius:GI.borderRadius},".cm-selectionMatch":{backgroundColor:nge,outline:`1px solid ${ZI}50`,borderRadius:GI.borderRadius},".cm-foldPlaceholder":{backgroundColor:fL,color:QI,border:`1px dotted ${QI}70`,borderRadius:KI.borderRadius,padding:KI.padding,margin:KI.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${dL}, 0 0 0 3px ${nL}40`},"& .cm-scroller::-webkit-scrollbar":{width:qI.width,height:qI.height},"& .cm-scroller::-webkit-scrollbar-track":{background:uL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:ZI,borderRadius:qI.borderRadius,border:`3px solid ${uL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:QI},".cm-ghostText":{opacity:`0.5`,color:QI}},{dark:!0}),D(V.define([{tag:A.keyword,color:iL,fontWeight:`bold`},{tag:A.controlKeyword,color:iL,fontWeight:`bold`},{tag:A.moduleKeyword,color:iL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:nL},{tag:[A.variableName],color:$I},{tag:[A.propertyName],color:nL,fontStyle:`normal`},{tag:[A.typeName],color:sL},{tag:[A.className],color:sL,fontStyle:`italic`},{tag:[A.namespace],color:rL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:lL},{tag:[A.bracket],color:$I},{tag:[A.brace],color:tL},{tag:[A.punctuation],color:$I},{tag:[A.function(A.variableName),A.labelName],color:tL},{tag:[A.definition(A.function(A.variableName))],color:tL},{tag:[A.definition(A.variableName)],color:oL},{tag:A.number,color:oL},{tag:A.changed,color:lL},{tag:A.annotation,color:aL,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:oL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:lL},{tag:[A.processingInstruction,A.inserted],color:tL},{tag:[A.special(A.string),A.regexp],color:lL},{tag:A.string,color:cL},{tag:A.definition(A.typeName),color:sL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:cL},{tag:A.meta,color:QI},{tag:A.comment,fontStyle:`italic`,color:QI},{tag:A.docComment,fontStyle:`italic`,color:QI},{tag:[A.tagName],color:aL},{tag:[A.attributeName],color:sL},{tag:[A.heading],fontWeight:`bold`,color:rL},{tag:[A.strong],fontWeight:`bold`,color:nL},{tag:[A.emphasis],fontStyle:`italic`,color:sL},{tag:[A.link],color:age,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:hL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:$I,textDecoration:`underline wavy`,borderBottom:`1px wavy ${aL}`},{tag:[A.strikethrough],color:aL,textDecoration:`line-through`},{tag:A.constant(A.name),color:oL},{tag:A.deleted,color:aL},{tag:A.squareBracket,color:aL},{tag:A.angleBracket,color:oL},{tag:A.monospace,color:$I,fontStyle:`italic`},{tag:[A.contentSeparator],color:rL},{tag:A.quote,color:lL}]))],bL={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},sge={borderLeftWidth:`2px`},xL={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},SL={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},CL={border:`none`,borderRadius:`4px`,padding:`2px 10px`},cge={borderRadius:`2px`},wL={borderRadius:`2px`},TL={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},EL={width:`12px`,height:`12px`,borderRadius:`6px`},DL={borderRadius:`4px`,padding:`2px 6px`},OL={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},lge=`#e1e2e7`,kL=`#3760bf`,AL=`#99a7df`,jL=`#848cb5`,uge=`#8c91a8`,ML=`#3760bf`,NL=`#e9e9ec`,PL=`#d5d6db`,FL=`#f52a65`,IL=`#b15c00`,LL=`#8c6c3e`,RL=`#587539`,zL=`#007197`,BL=`#2e7de9`,VL=`#7847bd`,dge=`#9854f1`,HL=FL,UL=PL,fge=`#5F5FAF5A`,WL=lge,GL=NL,KL=`#99a7df40`,pge=`#99a7df60`,qL=kL,mge=`#0e639c20`,hge=zL,JL=IL,YL=zL,gge=VL,XL=`#58753920`,ZL=`#f52a6520`,QL=`#587539`,$L=`#f52a65`,_ge=[I.theme({"&":{color:ML,backgroundColor:WL,fontSize:bL.fontSize,fontFamily:bL.fontFamily},".cm-content":{caretColor:qL,lineHeight:bL.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:qL,borderLeftWidth:sge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${qL}99`,color:WL},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KL},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#0e639c40`,outline:`1px solid ${zL}`,color:ML,borderRadius:DL.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:zL,color:WL,padding:DL.padding,"& span":{color:WL}},".cm-search.cm-panel.cm-textfield":{color:ML,borderRadius:DL.borderRadius,padding:DL.padding},".cm-panels":{backgroundColor:NL,color:ML,borderRadius:`4px`,boxShadow:`0 1px 3px rgba(0, 0, 0, 0.1)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${jL}30`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${jL}30`},".cm-panel button":{backgroundColor:GL,color:ML,border:CL.border,borderRadius:CL.borderRadius,padding:CL.padding},".cm-panel button:hover":{backgroundColor:PL,border:`1px solid ${AL}`},".cm-activeLine":{backgroundColor:fge,borderRadius:cge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:UL,color:jL,border:SL.border,borderRight:`1px solid ${PL}`,paddingRight:SL.paddingRight},".cm-activeLineGutter":{color:kL,fontWeight:SL.fontWeight},".cm-lineNumbers":{fontSize:SL.fontSize,lineHeight:SL.lineHeight},".cm-foldGutter":{fontSize:SL.fontSize,lineHeight:SL.lineHeight},".cm-foldGutter .cm-gutterElement":{color:jL,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:kL},".cm-insertedLine":{textDecoration:xL.insertedTextDecoration,backgroundColor:XL,color:QL,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:xL.insertedTextDecoration,backgroundColor:`${XL} !important`,color:QL,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious,border:`1px solid ${QL}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:xL.deletedTextDecoration,backgroundColor:ZL,color:$L,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:xL.deletedTextDecoration,backgroundColor:`${ZL} !important`,color:$L,padding:xL.insertedLinePadding,borderRadius:xL.borderRadious,border:`1px solid ${$L}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:GL,border:`1px solid ${uge}40`,borderRadius:OL.borderRadius,padding:OL.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:GL,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:OL.padding,lineHeight:OL.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:KL,color:kL,borderRadius:OL.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:jL,paddingRight:OL.paddingRight},"& > ul > li > span.cm-completionDetail":{color:jL,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GL,borderBottomColor:GL},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${HL}`},"&-warning":{borderLeft:`3px solid ${JL}`},"&-info":{borderLeft:`3px solid ${YL}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${HL}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${JL}`},".cm-matchingBracket":{backgroundColor:mge,outline:`1px solid ${hge}`,borderRadius:wL.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${FL}20`,outline:`1px solid ${HL}`,borderRadius:wL.borderRadius},".cm-selectionMatch":{backgroundColor:pge,outline:`1px solid ${AL}50`,borderRadius:wL.borderRadius},".cm-foldPlaceholder":{backgroundColor:GL,color:jL,border:`1px dotted ${jL}70`,borderRadius:TL.borderRadius,padding:TL.padding,margin:TL.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${WL}, 0 0 0 3px ${zL}40`},"& .cm-scroller::-webkit-scrollbar":{width:EL.width,height:EL.height},"& .cm-scroller::-webkit-scrollbar-track":{background:UL},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:jL,borderRadius:EL.borderRadius,border:`3px solid ${UL}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:AL},".cm-ghostText":{opacity:`0.5`,color:jL}},{dark:!1}),D(V.define([{tag:A.keyword,color:zL,fontWeight:`bold`},{tag:A.controlKeyword,color:zL,fontWeight:`bold`},{tag:A.moduleKeyword,color:zL,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:BL},{tag:[A.variableName],color:kL},{tag:[A.propertyName],color:BL,fontStyle:`normal`},{tag:[A.typeName],color:zL},{tag:[A.className],color:LL,fontStyle:`italic`},{tag:[A.namespace],color:VL,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:VL},{tag:[A.bracket],color:jL},{tag:[A.brace],color:jL},{tag:[A.punctuation],color:jL},{tag:[A.function(A.variableName)],color:zL},{tag:[A.labelName],color:VL,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:zL},{tag:[A.definition(A.variableName)],color:BL},{tag:A.number,color:IL},{tag:A.changed,color:IL},{tag:A.annotation,color:HL,fontStyle:`italic`},{tag:A.modifier,color:IL,fontStyle:`italic`},{tag:A.self,color:IL},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:IL},{tag:[A.atom,A.bool,A.special(A.variableName)],color:IL},{tag:[A.processingInstruction,A.inserted],color:RL},{tag:[A.special(A.string),A.regexp],color:dge},{tag:A.string,color:RL},{tag:A.definition(A.typeName),color:zL,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:BL},{tag:A.meta,color:jL},{tag:A.comment,fontStyle:`italic`,color:jL},{tag:A.docComment,fontStyle:`italic`,color:jL},{tag:[A.tagName],color:VL},{tag:[A.attributeName],color:LL},{tag:[A.heading],fontWeight:`bold`,color:IL},{tag:A.heading1,color:IL,fontWeight:`bold`},{tag:A.heading2,color:IL},{tag:A.heading3,color:IL},{tag:A.heading4,color:zL},{tag:A.heading5,color:zL},{tag:A.heading6,color:zL},{tag:[A.strong],fontWeight:`bold`,color:kL},{tag:[A.emphasis],fontStyle:`italic`,color:RL},{tag:[A.link],color:gge,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:YL,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:kL,textDecoration:`underline wavy`,borderBottom:`1px wavy ${HL}`},{tag:[A.strikethrough],color:HL,textDecoration:`line-through`},{tag:A.constant(A.name),color:IL},{tag:A.deleted,color:HL},{tag:A.squareBracket,color:jL},{tag:A.angleBracket,color:jL},{tag:A.monospace,color:kL},{tag:[A.contentSeparator],color:BL},{tag:A.quote,color:jL}]))],eR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},vge={borderLeftWidth:`2px`},tR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},nR={border:`none`,paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},rR={border:`none`,borderRadius:`4px`,padding:`2px 10px`},yge={borderRadius:`2px`},iR={borderRadius:`2px`},aR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},oR={width:`12px`,height:`12px`,borderRadius:`6px`},sR={borderRadius:`4px`,padding:`2px 6px`},cR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},bge=`#24283b`,lR=`#414868`,uR=`#565f89`,dR=`#c0caf5`,fR=`#282e44`,pR=`#1f2335`,xge=`#f7768e`,mR=`#ff9e64`,hR=`#e0af68`,gR=`#9ece6a`,_R=`#2ac3de`,vR=`#7aa2f7`,yR=`#bb9af7`,bR=`#f7768e`,xR=pR,Sge=`#292e427a`,SR=bge,CR=fR,wR=`#6f7bb630`,Cge=`#6f7bb650`,TR=dR,wge=`#3d59a150`,Tge=vR,ER=mR,DR=_R,Ege=yR,OR=`#3b4a3880`,kR=`#4a393a80`,AR=`#9ece6a`,jR=`#f7768e`,Dge=[I.theme({"&":{color:dR,backgroundColor:SR,fontSize:eR.fontSize,fontFamily:eR.fontFamily},".cm-content":{caretColor:TR,lineHeight:eR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:TR,borderLeftWidth:vge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${TR}99`,color:SR},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:wR},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#7aa2f740`,outline:`1px solid ${vR}`,color:dR,borderRadius:sR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:vR,color:SR,padding:sR.padding,"& span":{color:SR}},".cm-search.cm-panel.cm-textfield":{color:dR,borderRadius:sR.borderRadius,padding:sR.padding},".cm-panels":{backgroundColor:fR,color:dR,borderRadius:`4px`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${uR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${uR}`},".cm-panel button":{backgroundColor:CR,color:dR,border:rR.border,borderRadius:rR.borderRadius,padding:rR.padding},".cm-panel button:hover":{backgroundColor:pR},".cm-activeLine":{backgroundColor:Sge,borderRadius:yge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:xR,color:uR,border:nR.border,borderRight:`1px solid ${pR}`,paddingRight:nR.paddingRight},".cm-activeLineGutter":{backgroundColor:pR,color:dR,fontWeight:nR.fontWeight},".cm-lineNumbers":{fontSize:nR.fontSize,lineHeight:nR.lineHeight},".cm-foldGutter":{fontSize:nR.fontSize,lineHeight:nR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:uR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:dR},".cm-insertedLine":{textDecoration:tR.insertedTextDecoration,backgroundColor:OR,color:AR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:tR.insertedTextDecoration,backgroundColor:`${OR} !important`,color:AR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious,border:`1px solid ${AR}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:tR.deletedTextDecoration,backgroundColor:kR,color:jR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:tR.deletedTextDecoration,backgroundColor:`${kR} !important`,color:jR,padding:tR.insertedLinePadding,borderRadius:tR.borderRadious,border:`1px solid ${jR}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:CR,border:`1px solid ${uR}`,borderRadius:cR.borderRadius,padding:cR.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:CR,border:`none`},"& > ul > li":{padding:cR.padding,lineHeight:cR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:wR,color:dR,borderRadius:cR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:uR,paddingRight:cR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:uR,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:CR,borderBottomColor:CR},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${bR}`},"&-warning":{borderLeft:`3px solid ${ER}`},"&-info":{borderLeft:`3px solid ${DR}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${bR}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${ER}`},".cm-matchingBracket":{backgroundColor:wge,outline:`1px solid ${Tge}`,borderRadius:iR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${xge}20`,outline:`1px solid ${bR}`,borderRadius:iR.borderRadius},".cm-selectionMatch":{backgroundColor:Cge,outline:`1px solid ${lR}50`,borderRadius:iR.borderRadius},".cm-foldPlaceholder":{backgroundColor:CR,color:uR,border:`1px dotted ${uR}70`,borderRadius:aR.borderRadius,padding:aR.padding,margin:aR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 2px ${SR}, 0 0 0 3px ${vR}40`},"& .cm-scroller::-webkit-scrollbar":{width:oR.width,height:oR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:xR},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:lR,borderRadius:oR.borderRadius,border:`3px solid ${xR}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:uR},".cm-ghostText":{opacity:`0.5`,color:uR}},{dark:!0}),D(V.define([{tag:A.keyword,color:yR,fontWeight:`bold`},{tag:A.controlKeyword,color:yR,fontWeight:`bold`},{tag:A.moduleKeyword,color:yR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:dR},{tag:[A.variableName],color:dR},{tag:[A.propertyName],color:vR,fontStyle:`normal`},{tag:[A.typeName],color:_R},{tag:[A.className],color:hR,fontStyle:`italic`},{tag:[A.namespace],color:vR,fontStyle:`italic`},{tag:[A.operator,A.operatorKeyword],color:yR},{tag:[A.bracket],color:uR},{tag:[A.brace],color:uR},{tag:[A.punctuation],color:uR},{tag:[A.function(A.variableName)],color:vR},{tag:[A.labelName],color:vR,fontStyle:`italic`},{tag:[A.definition(A.function(A.variableName))],color:vR},{tag:[A.definition(A.variableName)],color:dR},{tag:A.number,color:mR},{tag:A.changed,color:mR},{tag:A.annotation,color:bR,fontStyle:`italic`},{tag:A.modifier,color:mR,fontStyle:`italic`},{tag:A.self,color:mR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:yR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:mR},{tag:[A.processingInstruction,A.inserted],color:gR},{tag:[A.special(A.string),A.regexp],color:`#b4f9f8`},{tag:A.string,color:gR},{tag:A.definition(A.typeName),color:_R,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:dR},{tag:A.meta,color:uR},{tag:A.comment,fontStyle:`italic`,color:uR},{tag:A.docComment,fontStyle:`italic`,color:uR},{tag:[A.tagName],color:yR},{tag:[A.attributeName],color:hR},{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:dR},{tag:[A.emphasis],fontStyle:`italic`,color:_R},{tag:[A.link],color:Ege,fontWeight:`500`,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:DR,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:dR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${bR}`},{tag:[A.strikethrough],color:bR,textDecoration:`line-through`},{tag:A.constant(A.name),color:mR},{tag:A.deleted,color:bR},{tag:A.squareBracket,color:uR},{tag:A.angleBracket,color:uR},{tag:A.monospace,color:dR},{tag:[A.contentSeparator],color:vR},{tag:A.quote,color:uR}]))],MR={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Oge={borderLeftWidth:`2px`},NR={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},PR={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},FR={borderRadius:`4px`,padding:`2px 10px`},kge={borderRadius:`2px`},IR={borderRadius:`2px`},LR={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},RR={width:`12px`,height:`12px`,borderRadius:`6px`},zR={borderRadius:`4px`,padding:`2px 6px`},BR={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Age=`#1e1e1e`,VR=`#252526`,HR=`#2d2d30`,UR=`#838383`,jge=`#c6c6c6`,WR=`#d4d4d4`,GR=`#e9e9e9`,Mge=`#1c1c1c`,KR=`#569cd6`,Nge=`#c586c0`,qR=`#9cdcfe`,JR=`#4ec9b0`,YR=`#dcdcaa`,Pge=`#b5cea8`,XR=`#ce9178`,ZR=`#f44747`,QR=`#d7ba7d`,$R=`#6a9955`,ez=ZR,tz=`#FFFFFF08`,nz=Age,rz=VR,Fge=`#264F7899`,Ige=`#72a1ff59`,iz=jge,Lge=`#ffffff15`,Rge=KR,az=QR,oz=`#3794ff`,zge=`#c586c0`,sz=`#1e3f1e80`,cz=`#4b1c1c80`,lz=`#6cc26f`,uz=`#f14c4c`,Bge=[I.theme({"&":{color:WR,backgroundColor:nz,fontSize:MR.fontSize,fontFamily:MR.fontFamily},".cm-content":{caretColor:iz,lineHeight:MR.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:iz,borderLeftWidth:Oge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${iz}99`,color:nz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Fge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#72a1ff40`,outline:`1px solid ${KR}90`,color:GR,borderRadius:zR.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#3794ff90`,color:GR,padding:zR.padding,"& span":{color:GR}},".cm-search.cm-panel.cm-textfield":{color:WR,borderRadius:zR.borderRadius,padding:zR.padding},".cm-panels":{backgroundColor:VR,color:WR,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.45)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${HR}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${HR}`},".cm-panel button":{backgroundColor:HR,color:WR,border:`1px solid ${HR}`,borderRadius:FR.borderRadius,padding:FR.padding},".cm-panel button:hover":{backgroundColor:`#3a3a3a`,border:`1px solid ${UR}80`},".cm-activeLine":{backgroundColor:tz,borderRadius:kge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Mge,color:UR,border:`none`,borderRight:`1px solid ${HR}`,paddingRight:PR.paddingRight},".cm-activeLineGutter":{backgroundColor:tz,color:GR,fontWeight:PR.fontWeight},".cm-lineNumbers":{fontSize:PR.fontSize,lineHeight:PR.lineHeight},".cm-foldGutter":{fontSize:PR.fontSize,lineHeight:PR.lineHeight},".cm-foldGutter .cm-gutterElement":{color:UR,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:GR},".cm-insertedLine":{textDecoration:NR.insertedTextDecoration,backgroundColor:sz,color:lz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:NR.insertedTextDecoration,backgroundColor:`${sz} !important`,color:lz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious,border:`1px solid ${lz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:NR.deletedTextDecoration,backgroundColor:cz,color:uz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:NR.deletedTextDecoration,backgroundColor:`${cz} !important`,color:uz,padding:NR.insertedLinePadding,borderRadius:NR.borderRadious,border:`1px solid ${uz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:rz,border:`1px solid ${HR}`,borderRadius:BR.borderRadius,padding:BR.padding,boxShadow:`0 3px 8px rgba(0, 0, 0, 0.3)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:rz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:BR.padding,lineHeight:BR.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#04395e`,color:GR,borderRadius:BR.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:UR,paddingRight:BR.paddingRight},"& > ul > li > span.cm-completionDetail":{color:UR,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 ${ez}`},"&-warning":{borderLeft:`3px solid ${az}`},"&-info":{borderLeft:`3px solid ${oz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${ez}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${az}`},".cm-matchingBracket":{backgroundColor:Lge,outline:`1px solid ${Rge}80`,borderRadius:IR.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${ZR}40`,outline:`1px solid ${ez}`,borderRadius:IR.borderRadius},".cm-selectionMatch":{backgroundColor:Ige,outline:`1px solid ${HR}70`,borderRadius:IR.borderRadius},".cm-foldPlaceholder":{backgroundColor:rz,color:UR,border:`1px dotted ${UR}70`,borderRadius:LR.borderRadius,padding:LR.padding,margin:LR.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${HR}`},"& .cm-scroller::-webkit-scrollbar":{width:RR.width,height:RR.height},"& .cm-scroller::-webkit-scrollbar-track":{background:nz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#424242`,borderRadius:RR.borderRadius,border:`3px solid ${nz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#525252`},".cm-ghostText":{opacity:`0.5`,color:UR}},{dark:!0}),D(V.define([{tag:A.keyword,color:KR,fontWeight:`bold`},{tag:A.controlKeyword,color:Nge,fontWeight:`bold`},{tag:A.moduleKeyword,color:KR,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:WR},{tag:[A.variableName],color:qR},{tag:[A.propertyName],color:qR,fontStyle:`normal`},{tag:[A.typeName],color:JR},{tag:[A.className],color:JR,fontStyle:`normal`},{tag:[A.namespace],color:WR,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:WR},{tag:[A.bracket],color:WR},{tag:[A.brace],color:WR},{tag:[A.punctuation],color:WR},{tag:[A.function(A.variableName)],color:YR},{tag:[A.labelName],color:YR,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:YR},{tag:[A.definition(A.variableName)],color:qR},{tag:A.number,color:Pge},{tag:A.changed,color:QR},{tag:A.annotation,color:QR,fontStyle:`italic`},{tag:A.modifier,color:KR,fontStyle:`normal`},{tag:A.self,color:KR},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:qR},{tag:[A.atom,A.bool,A.special(A.variableName)],color:KR},{tag:[A.processingInstruction,A.inserted],color:XR},{tag:[A.special(A.string),A.regexp],color:`#d16969`},{tag:A.string,color:XR},{tag:A.definition(A.typeName),color:JR,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:WR},{tag:A.meta,color:UR},{tag:A.comment,fontStyle:`italic`,color:$R},{tag:A.docComment,fontStyle:`italic`,color:$R},{tag:[A.tagName],color:KR},{tag:[A.attributeName],color:qR},{tag:[A.heading],fontWeight:`bold`,color:KR},{tag:A.heading1,color:KR,fontWeight:`bold`},{tag:A.heading2,color:KR},{tag:A.heading3,color:KR},{tag:A.heading4,color:KR},{tag:A.heading5,color:KR},{tag:A.heading6,color:KR},{tag:[A.strong],fontWeight:`bold`,color:KR},{tag:[A.emphasis],fontStyle:`italic`,color:JR},{tag:[A.link],color:zge,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:oz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:WR,textDecoration:`underline wavy`,borderBottom:`1px wavy ${ez}`},{tag:[A.strikethrough],color:ez,textDecoration:`line-through`},{tag:A.constant(A.name),color:qR},{tag:A.deleted,color:ez},{tag:A.squareBracket,color:WR},{tag:A.angleBracket,color:WR},{tag:A.monospace,color:WR},{tag:[A.contentSeparator],color:WR},{tag:A.quote,color:$R}]))],dz={fontSize:`14px`,fontFamily:`JetBrains Mono, Consolas, monospace`,lineHeight:`1.6`},Vge={borderLeftWidth:`2px`},fz={insertedTextDecoration:`none`,deletedTextDecoration:`line-through`,insertedLinePadding:`1px 3px`,borderRadious:`3px`},pz={paddingRight:`8px`,fontSize:`0.9em`,fontWeight:`500`,lineHeight:`1.78`},mz={borderRadius:`4px`,padding:`2px 10px`},Hge={borderRadius:`2px`},hz={borderRadius:`2px`},gz={borderRadius:`4px`,padding:`0 5px`,margin:`0 2px`},_z={width:`12px`,height:`12px`,borderRadius:`6px`},vz={borderRadius:`4px`,padding:`2px 6px`},yz={borderRadius:`4px`,borderRadiusSelected:`3px`,lineHeight:`1.3`,padding:`4px 8px`,paddingRight:`8px`},Uge=`#ffffff`,bz=`#f3f3f3`,xz=`#d6d6d6`,Sz=`#6b6b6b`,Wge=`#000000`,Cz=`#383a42`,wz=`#1f1f1f`,Gge=`#f5f5f5`,Tz=`#0064ff`,Ez=`#af00db`,Dz=`#0070c1`,Oz=`#267f99`,kz=`#795e26`,Kge=`#098658`,Az=`#a31515`,jz=`#e51400`,Mz=`#795e26`,Nz=`#008000`,Pz=jz,Fz=`#99999926`,Iz=Uge,Lz=bz,qge=`#add6ff`,Jge=`#a8ac9480`,Rz=Wge,Yge=`#007acc20`,Xge=`#007acc`,zz=`#bf8803`,Bz=`#006ab1`,Zge=`#9e46d0`,Vz=`#ddfbe0`,Hz=`#ffebec`,Uz=`#22863a`,Wz=`#e51400`,Qge=[I.theme({"&":{color:Cz,backgroundColor:Iz,fontSize:dz.fontSize,fontFamily:dz.fontFamily},".cm-content":{caretColor:Rz,lineHeight:dz.lineHeight},".cm-cursor, .cm-dropCursor":{borderLeftColor:Rz,borderLeftWidth:Vge.borderLeftWidth},".cm-fat-cursor":{backgroundColor:`${Rz}99`,color:Iz},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:qge},".cm-selectionLayer":{zIndex:100},".cm-searchMatch":{backgroundColor:`#bbdefb`,outline:`1px solid ${Dz}90`,color:wz,borderRadius:vz.borderRadius},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#90caf9`,color:wz,padding:vz.padding,"& span":{color:wz}},".cm-search.cm-panel.cm-textfield":{color:Cz,borderRadius:vz.borderRadius,padding:vz.padding},".cm-panels":{backgroundColor:bz,color:Cz,borderRadius:`3px`,boxShadow:`0 2px 6px rgba(0, 0, 0, 0.15)`},".cm-panels.cm-panels-top":{borderBottom:`1px solid ${xz}`},".cm-panels.cm-panels-bottom":{borderTop:`1px solid ${xz}`},".cm-panel button":{backgroundColor:Iz,color:Cz,border:`1px solid ${xz}`,borderRadius:mz.borderRadius,padding:mz.padding},".cm-panel button:hover":{backgroundColor:`#e8e8e8`,border:`1px solid ${Sz}80`},".cm-activeLine":{backgroundColor:Fz,borderRadius:Hge.borderRadius,zIndex:1},".cm-gutters":{backgroundColor:Gge,color:`#237893`,border:`none`,borderRight:`1px solid ${xz}`,paddingRight:pz.paddingRight},".cm-activeLineGutter":{backgroundColor:Fz,color:`#0b216f`,fontWeight:pz.fontWeight},".cm-lineNumbers":{fontSize:pz.fontSize,lineHeight:pz.lineHeight},".cm-foldGutter":{fontSize:pz.fontSize,lineHeight:pz.lineHeight},".cm-foldGutter .cm-gutterElement":{color:`#237893`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`#0b216f`},".cm-insertedLine":{textDecoration:fz.insertedTextDecoration,backgroundColor:Vz,color:Uz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious},"ins.cm-insertedLine, ins.cm-insertedLine:not(:has(.cm-changedText))":{textDecoration:fz.insertedTextDecoration,backgroundColor:`${Vz} !important`,color:Uz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious,border:`1px solid ${Uz}40`},"ins.cm-insertedLine .cm-changedText":{background:`transparent !important`},".cm-deletedLine":{textDecoration:fz.deletedTextDecoration,backgroundColor:Hz,color:Wz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious},"del.cm-deletedLine, del, del:not(:has(.cm-deletedText))":{textDecoration:fz.deletedTextDecoration,backgroundColor:`${Hz} !important`,color:Wz,padding:fz.insertedLinePadding,borderRadius:fz.borderRadious,border:`1px solid ${Wz}40`},"del .cm-deletedText, del .cm-changedText":{background:`transparent !important`},".cm-tooltip":{backgroundColor:Lz,border:`1px solid ${xz}`,borderRadius:yz.borderRadius,padding:yz.padding,boxShadow:`0 2px 8px rgba(0, 0, 0, 0.15)`},".cm-tooltip-autocomplete":{"& > ul":{backgroundColor:Lz,border:`none`,maxHeight:`300px`},"& > ul > li":{padding:yz.padding,lineHeight:yz.lineHeight},"& > ul > li[aria-selected]":{backgroundColor:`#dcebfc`,color:wz,borderRadius:yz.borderRadiusSelected},"& > ul > li > span.cm-completionIcon":{color:Sz,paddingRight:yz.paddingRight},"& > ul > li > span.cm-completionDetail":{color:Sz,fontStyle:`italic`}},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Lz,borderBottomColor:Lz},".cm-diagnostic":{"&-error":{borderLeft:`3px solid ${Pz}`},"&-warning":{borderLeft:`3px solid ${zz}`},"&-info":{borderLeft:`3px solid ${Bz}`}},".cm-lintPoint-error":{borderBottom:`2px wavy ${Pz}`},".cm-lintPoint-warning":{borderBottom:`2px wavy ${zz}`},".cm-matchingBracket":{backgroundColor:Yge,outline:`1px solid ${Xge}80`,borderRadius:hz.borderRadius},".cm-nonmatchingBracket":{backgroundColor:`${jz}20`,outline:`1px solid ${Pz}`,borderRadius:hz.borderRadius},".cm-selectionMatch":{backgroundColor:Jge,outline:`1px solid ${xz}70`,borderRadius:hz.borderRadius},".cm-foldPlaceholder":{backgroundColor:Lz,color:Sz,border:`1px dotted ${Sz}70`,borderRadius:gz.borderRadius,padding:gz.padding,margin:gz.margin},"&.cm-focused":{outline:`none`,boxShadow:`0 0 0 1px ${xz}`},"& .cm-scroller::-webkit-scrollbar":{width:_z.width,height:_z.height},"& .cm-scroller::-webkit-scrollbar-track":{background:Iz},"& .cm-scroller::-webkit-scrollbar-thumb":{backgroundColor:`#dadada`,borderRadius:_z.borderRadius,border:`3px solid ${Iz}`},"& .cm-scroller::-webkit-scrollbar-thumb:hover":{backgroundColor:`#cccccc`},".cm-ghostText":{opacity:`0.5`,color:Sz}},{dark:!1}),D(V.define([{tag:A.keyword,color:Tz,fontWeight:`bold`},{tag:A.controlKeyword,color:Ez,fontWeight:`bold`},{tag:A.moduleKeyword,color:Tz,fontWeight:`bold`},{tag:[A.name,A.deleted,A.character,A.macroName],color:Cz},{tag:[A.variableName],color:Dz},{tag:[A.propertyName],color:Dz,fontStyle:`normal`},{tag:[A.typeName],color:Oz},{tag:[A.className],color:Oz,fontStyle:`normal`},{tag:[A.namespace],color:Cz,fontStyle:`normal`},{tag:[A.operator,A.operatorKeyword],color:Cz},{tag:[A.bracket],color:Cz},{tag:[A.brace],color:Cz},{tag:[A.punctuation],color:Cz},{tag:[A.function(A.variableName)],color:kz},{tag:[A.labelName],color:kz,fontStyle:`normal`},{tag:[A.definition(A.function(A.variableName))],color:kz},{tag:[A.definition(A.variableName)],color:Dz},{tag:A.number,color:Kge},{tag:A.changed,color:Mz},{tag:A.annotation,color:Mz,fontStyle:`italic`},{tag:A.modifier,color:Tz,fontStyle:`normal`},{tag:A.self,color:Tz},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:Dz},{tag:[A.atom,A.bool,A.special(A.variableName)],color:Tz},{tag:[A.processingInstruction,A.inserted],color:Az},{tag:[A.special(A.string),A.regexp],color:Ez},{tag:A.string,color:Az},{tag:A.definition(A.typeName),color:Oz,fontWeight:`bold`},{tag:[A.definition(A.name),A.separator],color:Cz},{tag:A.meta,color:Sz},{tag:A.comment,fontStyle:`italic`,color:Nz},{tag:A.docComment,fontStyle:`italic`,color:Nz},{tag:[A.tagName],color:Tz},{tag:[A.attributeName],color:Dz},{tag:[A.heading],fontWeight:`bold`,color:Tz},{tag:A.heading1,color:Tz,fontWeight:`bold`},{tag:A.heading2,color:Tz},{tag:A.heading3,color:Tz},{tag:A.heading4,color:Tz},{tag:A.heading5,color:Tz},{tag:A.heading6,color:Tz},{tag:[A.strong],fontWeight:`bold`,color:Tz},{tag:[A.emphasis],fontStyle:`italic`,color:Dz},{tag:[A.link],color:Zge,textDecoration:`underline`,textUnderlinePosition:`under`},{tag:[A.url],color:Bz,textDecoration:`underline`,textUnderlineOffset:`2px`},{tag:[A.invalid],color:Cz,textDecoration:`underline wavy`,borderBottom:`1px wavy ${Pz}`},{tag:[A.strikethrough],color:Pz,textDecoration:`line-through`},{tag:A.constant(A.name),color:Dz},{tag:A.deleted,color:Pz},{tag:A.squareBracket,color:Cz},{tag:A.angleBracket,color:Cz},{tag:A.monospace,color:Cz},{tag:[A.contentSeparator],color:Cz},{tag:A.quote,color:Nz}]))];function Gz(){return Gz=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},Gz.apply(null,arguments)}function $ge(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 Kz=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,qz=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(Kz(e)):Kz,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 Ie(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=ge(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`&&(qz.prototype[Symbol.iterator]=function(){return this});var Jz={from:-1,to:-1,match:/.*/.exec(``)},Yz=`gm`+(/x/.unicode==null?``:`u`),Xz=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Jz,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new $z(e,t,n,r,i);this.re=new RegExp(t,Yz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=eB(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=eB(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}}},Zz=new WeakMap,Qz=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=Zz.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Zz.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)),Zz.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},$z=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Jz,this.matchPos=eB(e,r),this.re=new RegExp(t,Yz+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Qz.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=eB(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Qz.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Xz.prototype[Symbol.iterator]=$z.prototype[Symbol.iterator]=function(){return this});function e_e(e){try{return new RegExp(e,Yz),!0}catch{return!1}}function eB(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 tB(e){let t=ke(`input`,{class:`cm-textfield`,name:`line`,value:String(e.state.doc.lineAt(e.state.selection.main.head).number)}),n=ke(`form`,{class:`cm-gotoLine`,onkeydown:t=>{t.keyCode==27?(t.preventDefault(),e.dispatch({effects:nB.of(!1)}),e.focus()):t.keyCode==13&&(t.preventDefault(),r())},onsubmit:e=>{e.preventDefault(),r()}},ke(`label`,e.state.phrase(`Go to line`),`: `,t),` `,ke(`button`,{class:`cm-button`,type:`submit`},e.state.phrase(`go`)),ke(`button`,{name:`close`,onclick:()=>{e.dispatch({effects:nB.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=se.cursor(d.from+Math.max(0,Math.min(l,d.length)));e.dispatch({effects:[nB.of(!1),I.scrollIntoView(f.from,{y:`center`})],selection:f}),e.focus()}return{dom:n}}var nB=U.define(),rB=Re.define({create(){return!0},update(e,t){for(let n of t.effects)n.is(nB)&&(e=n.value);return e},provide:e=>te.from(e,e=>e?tB:null)}),iB=e=>{let t=Te(e,tB);if(!t){let n=[nB.of(!0)];e.state.field(rB,!1)??n.push(U.appendConfig.of([rB,aB])),e.dispatch({effects:n}),t=Te(e,tB)}return t&&t.dom.querySelector(`input`).select(),!0},aB=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`}}}),oB={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sB=ye.define({combine(e){return f(e,oB,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function cB(e){let t=[mB,pB];return e&&t.push(sB.of(e)),t}var lB=ze.mark({class:`cm-selectionMatch`}),uB=ze.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function dB(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=ie.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=ie.Word)}function fB(e,t,n,r){return e(t.sliceDoc(n,n+1))==ie.Word&&e(t.sliceDoc(r-1,r))==ie.Word}var pB=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(sB),{state:n}=e,r=n.selection;if(r.ranges.length>1)return ze.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return ze.none;let e=n.wordAt(i.head);if(!e)return ze.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 ze.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(dB(o,n,i.from,i.to)&&fB(o,n,i.from,i.to)))return ze.none}else if(a=n.sliceDoc(i.from,i.to),!a)return ze.none}let s=[];for(let r of e.visibleRanges){let e=new qz(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||dB(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(uB.range(r,a)):(r>=i.to||a<=i.from)&&s.push(lB.range(r,a)),s.length>t.maxMatches))return ze.none}}return ze.set(s)}},{decorations:e=>e.decorations}),mB=I.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),hB=({state:e,dispatch:t})=>{let{selection:n}=e,r=se.create(n.ranges.map(t=>e.wordAt(t.head)||se.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function gB(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 qz(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new qz(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 _B=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return hB({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=gB(e,r);return i?(t(e.update({selection:e.selection.addRange(se.range(i.from,i.to),!1),effects:I.scrollIntoView(i.to)})),!0):!1},vB=ye.define({combine(e){return f(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new XB(e),scrollToMatch:e=>I.scrollIntoView(e)})}}),yB=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||e_e(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`?`
|
|
364
364
|
`: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 OB(this):new CB(this)}getCursor(e,t=0,n){let r=e.doc?e:we.create({doc:e});return n??=r.doc.length,this.regexp?wB(this,r,t,n):xB(this,r,t,n)}},bB=class{constructor(e){this.spec=e}};function xB(e,t,n,r){return new qz(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?SB(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function SB(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(TB(i,n-a))!=ie.Word||t(EB(i,n-a))!=ie.Word)&&(t(EB(i,r-a))!=ie.Word||t(TB(i,r-a))!=ie.Word))}var CB=class extends bB{constructor(e){super(e)}nextMatch(e,t,n){let r=xB(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=xB(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=xB(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=xB(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=xB(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 wB(e,t,n,r){return new Xz(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?DB(t.charCategorizer(t.selection.main.head)):void 0},n,r)}function TB(e,t){return e.slice(E(e,t,!1),t)}function EB(e,t){return e.slice(t,E(e,t))}function DB(e){return(t,n,r)=>!r[0].length||(e(TB(r.input,r.index))!=ie.Word||e(EB(r.input,r.index))!=ie.Word)&&(e(EB(r.input,r.index+r[0].length))!=ie.Word||e(TB(r.input,r.index+r[0].length))!=ie.Word)}var OB=class extends bB{nextMatch(e,t,n){let r=wB(this.spec,e,n,e.doc.length).next();return r.done&&(r=wB(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=wB(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=wB(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=wB(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)}},kB=U.define(),AB=U.define(),jB=Re.define({create(e){return new MB(WB(e).create(),null)},update(e,t){for(let n of t.effects)n.is(kB)?e=new MB(n.value.create(),e.panel):n.is(AB)&&(e=new MB(e.query,n.value?UB:null));return e},provide:e=>te.from(e,e=>e.panel)}),MB=class{constructor(e,t){this.query=e,this.panel=t}},NB=ze.mark({class:`cm-searchMatch`}),PB=ze.mark({class:`cm-searchMatch cm-searchMatch-selected`}),FB=g.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(jB))}update(e){let t=e.state.field(jB);(t!=e.startState.field(jB)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return ze.none;let{view:n}=this,r=new Pe;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?PB:NB)})}return r.finish()}},{decorations:e=>e.decorations});function IB(e){return t=>{let n=t.state.field(jB,!1);return n&&n.query.spec.valid?e(t,n):qB(t)}}var LB=IB((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=se.single(r.from,r.to),a=e.state.facet(vB);return e.dispatch({selection:i,effects:[eV(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),KB(e),!0}),RB=IB((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=se.single(i.from,i.to),o=e.state.facet(vB);return e.dispatch({selection:a,effects:[eV(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),KB(e),!0}),zB=IB((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:se.create(n.map(e=>se.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),BB=({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 qz(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(se.range(t.value.from,t.value.to))}return t(e.update({selection:se.create(a,o),userEvent:`select.search.matches`})),!0},VB=IB((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=se.single(o.from,o.to).map(d),u.push(eV(e,o)),u.push(n.facet(vB).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),HB=IB((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 UB(e){return e.state.facet(vB).createPanel(e)}function WB(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(vB);return new yB({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 GB(e){let t=Te(e,UB);return t&&t.dom.querySelector(`[main-field]`)}function KB(e){let t=GB(e);t&&t==e.root.activeElement&&t.select()}var qB=e=>{let t=e.state.field(jB,!1);if(t&&t.panel){let n=GB(e);if(n&&n!=e.root.activeElement){let r=WB(e.state,t.query.spec);r.valid&&e.dispatch({effects:kB.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[AB.of(!0),t?kB.of(WB(e.state,t.query.spec)):U.appendConfig.of(nV)]});return!0},JB=e=>{let t=e.state.field(jB,!1);if(!t||!t.panel)return!1;let n=Te(e,UB);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:AB.of(!1)}),!0},YB=[{key:`Mod-f`,run:qB,scope:`editor search-panel`},{key:`F3`,run:LB,shift:RB,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:LB,shift:RB,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:JB,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:BB},{key:`Mod-Alt-g`,run:iB},{key:`Mod-d`,run:_B,preventDefault:!0}],XB=class{constructor(e){this.view=e;let t=this.query=e.state.field(jB).query.spec;this.commit=this.commit.bind(this),this.searchField=ke(`input`,{value:t.search,placeholder:ZB(e,`Find`),"aria-label":ZB(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=ke(`input`,{value:t.replace,placeholder:ZB(e,`Replace`),"aria-label":ZB(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=ke(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=ke(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=ke(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return ke(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=ke(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>LB(e),[ZB(e,`next`)]),n(`prev`,()=>RB(e),[ZB(e,`previous`)]),n(`select`,()=>zB(e),[ZB(e,`all`)]),ke(`label`,null,[this.caseField,ZB(e,`match case`)]),ke(`label`,null,[this.reField,ZB(e,`regexp`)]),ke(`label`,null,[this.wordField,ZB(e,`by word`)]),...e.state.readOnly?[]:[ke(`br`),this.replaceField,n(`replace`,()=>VB(e),[ZB(e,`replace`)]),n(`replaceAll`,()=>HB(e),[ZB(e,`replace all`)])],ke(`button`,{name:`close`,onclick:()=>JB(e),"aria-label":ZB(e,`close`),type:`button`},[`×`])])}commit(){let e=new yB({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:kB.of(e)}))}keydown(e){fe(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?RB:LB)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),VB(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(kB)&&!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(vB).top}};function ZB(e,t){return e.state.phrase(t)}var QB=30,$B=/[\s\.,:;?!]/;function eV(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-QB),o=Math.min(i,n+QB),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<QB;e++)if(!$B.test(s[e+1])&&$B.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-QB;e--)if(!$B.test(s[e-1])&&$B.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 tV=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`}}),nV=[jB,le.low(FB),tV],rV=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},iV=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(vV).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new Pe,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=kV(s);if(i)o.add(n,n,ze.widget({widget:new SV(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,ze.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,aV(f))}};function aV(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 rV(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new rV(r.from,n,r.diagnostic)}),r}function oV(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(vV).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(cV))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function sV(e,t){return e.field(dV,!1)?t:t.concat(U.appendConfig.of(AV))}var cV=U.define(),lV=U.define(),uV=U.define(),dV=Re.define({create(){return new iV(ze.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=aV(n,e.selected.diagnostic,i)||aV(n,null,i)}!n.size&&i&&t.state.facet(vV).autoPanel&&(i=null),e=new iV(n,i,r)}for(let n of t.effects)if(n.is(cV)){let r=t.state.facet(vV).autoPanel?n.value.length?wV.open:null:e.panel;e=iV.init(n.value,r,t.state)}else n.is(lV)?e=new iV(e.diagnostics,n.value?wV.open:null,e.selected):n.is(uV)&&(e=new iV(e.diagnostics,e.panel,n.value));return e},provide:e=>[te.from(e,e=>e.panel),I.decorations.from(e,e=>e.diagnostics)]}),fV=ze.mark({class:`cm-lintRange cm-lintRange-active`});function pV(e,t,n){let{diagnostics:r}=e.state.field(dV),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(vV).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:mV(e,i)}}}:null}function mV(e,t){return ke(`ul`,{class:`cm-tooltip-lint`},t.map(t=>xV(e,t,!1)))}var hV=e=>{let t=e.state.field(dV,!1);(!t||!t.panel)&&e.dispatch({effects:sV(e.state,[lV.of(!0)])});let n=Te(e,wV.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},gV=e=>{let t=e.state.field(dV,!1);return!t||!t.panel?!1:(e.dispatch({effects:lV.of(!1)}),!0)},_V=[{key:`Mod-Shift-m`,run:hV,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(dV,!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)}}],vV=ye.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:yV,tooltipFilter:yV,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 yV(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function bV(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 xV(e,t,n){let r=n?bV(t.actions):[];return ke(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},ke(`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=aV(e.state.field(dV).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),ke(`u`,s.slice(c,c+1)),s.slice(c+1)];return ke(`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&&ke(`div`,{class:`cm-diagnosticSource`},t.source))}var SV=class extends F{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return ke(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},CV=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=xV(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},wV=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(t.keyCode==27)gV(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=bV(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=aV(this.view.state.field(dV).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=ke(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=ke(`div`,{class:`cm-panel-lint`},this.list,ke(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>gV(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(dV).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(dV),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 CV(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 CV(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=aV(this.view.state.field(dV).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:uV.of(t)})}static open(t){return new e(t)}};function TV(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 EV(e){return TV(`<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 DV=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:EV(`#d11`)},".cm-lintRange-warning":{backgroundImage:EV(`orange`)},".cm-lintRange-info":{backgroundImage:EV(`#999`)},".cm-lintRange-hint":{backgroundImage:EV(`#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 OV(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function kV(e){let t=`hint`,n=1;for(let r of e){let e=OV(r.severity);e>n&&(n=e,t=r.severity)}return t}var AV=[dV,I.decorations.compute([dV],e=>{let{selected:t,panel:n}=e.field(dV);return!t||!n||t.from==t.to?ze.none:ze.set([fV.range(t.from,t.to)])}),k(pV,{hideOn:oV}),DV],jV=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(Ge)),e.defaultKeymap!==!1&&(n=n.concat(_O)),e.searchKeymap!==!1&&(n=n.concat(YB)),e.historyKeymap!==!1&&(n=n.concat(ife)),e.foldKeymap!==!1&&(n=n.concat(j)),e.completionKeymap!==!1&&(n=n.concat(qe)),e.lintKeymap!==!1&&(n=n.concat(_V));var a=[];return e.lineNumbers!==!1&&a.push(ae()),e.highlightActiveLineGutter!==!1&&a.push(R()),e.highlightSpecialChars!==!1&&a.push(B()),e.history!==!1&&a.push(Yde()),e.foldGutter!==!1&&a.push(H()),e.drawSelection!==!1&&a.push(h()),e.dropCursor!==!1&&a.push(y()),e.allowMultipleSelections!==!1&&a.push(we.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(T()),e.syntaxHighlighting!==!1&&a.push(D(ce,{fallback:!0})),e.bracketMatching!==!1&&a.push(Ce()),e.closeBrackets!==!1&&a.push(Je()),e.autocompletion!==!1&&a.push(Ke()),e.rectangularSelection!==!1&&a.push(De()),t!==!1&&a.push(L()),e.highlightActiveLine!==!1&&a.push(z()),e.highlightSelectionMatches!==!1&&a.push(cB()),e.tabSize&&typeof e.tabSize==`number`&&a.push(i.of(` `.repeat(e.tabSize))),a.concat([r.of(n.flat())]).filter(Boolean)},MV=`#e5c07b`,NV=`#e06c75`,PV=`#56b6c2`,FV=`#ffffff`,IV=`#abb2bf`,LV=`#7d8799`,RV=`#61afef`,zV=`#98c379`,BV=`#d19a66`,VV=`#c678dd`,HV=`#21252b`,UV=`#2c313a`,WV=`#282c34`,GV=`#353a42`,KV=`#3E4451`,qV=`#528bff`,JV=[I.theme({"&":{color:IV,backgroundColor:WV},".cm-content":{caretColor:qV},".cm-cursor, .cm-dropCursor":{borderLeftColor:qV},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KV},".cm-panels":{backgroundColor:HV,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:WV,color:LV,border:`none`},".cm-activeLineGutter":{backgroundColor:UV},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:GV},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GV,borderBottomColor:GV},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:UV,color:IV}}},{dark:!0}),D(V.define([{tag:A.keyword,color:VV},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:NV},{tag:[A.function(A.variableName),A.labelName],color:RV},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:BV},{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:MV},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:PV},{tag:[A.meta,A.comment],color:LV},{tag:A.strong,fontWeight:`bold`},{tag:A.emphasis,fontStyle:`italic`},{tag:A.strikethrough,textDecoration:`line-through`},{tag:A.link,color:LV,textDecoration:`underline`},{tag:A.heading,fontWeight:`bold`,color:NV},{tag:[A.atom,A.bool,A.special(A.variableName)],color:BV},{tag:[A.processingInstruction,A.string,A.inserted],color:zV},{tag:A.invalid,color:FV}]))],YV=I.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),XV=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([vO])),s&&(typeof s==`boolean`?c.unshift(jV()):c.unshift(jV(s))),o&&c.unshift(xe(o)),a){case`light`:c.push(YV);break;case`dark`:c.push(JV);break;case`none`:break;default:c.push(a);break}return n===!1&&c.push(I.editable.of(!1)),i&&c.push(we.readOnly.of(!0)),[...c]},ZV=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)}),QV=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}},$V=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)}},eH=null,tH=()=>typeof window>`u`?new $V:(eH||=new $V,eH),nH=ne.define(),rH=200,iH=[];function aH(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=iH,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,q.useState)(),[T,E]=(0,q.useState)(),[D,O]=(0,q.useState)(),k=(0,q.useState)(()=>({current:null}))[0],A=(0,q.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(nH))&&(k.current?k.current.reset():(k.current=new QV(()=>{if(A.current){var e=A.current;A.current=null,e()}k.current=null},rH),tH().add(k.current)),r(e.state.doc.toString(),e)),i&&i(ZV(e))}),j,...XV({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,q.useLayoutEffect)(()=>{if(C&&!D){var e={doc:t,selection:n,extensions:M},r=S?we.fromJSON(S.json,e,S.fields):we.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,q.useEffect)(()=>{e.container&&w(e.container)},[e.container]),(0,q.useEffect)(()=>()=>{T&&(T.destroy(),E(void 0)),k.current&&=(k.current.cancel(),null)},[T]),(0,q.useEffect)(()=>{c&&T&&T.focus()},[c,T]),(0,q.useEffect)(()=>{T&&T.dispatch({effects:U.reconfigure.of(M)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,q.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:[nH.of(!0)]})};n?A.current=r:r()}}},[t,T]),{state:D,setState:O,view:T,setView:E,container:C,setContainer:w}}var oH=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],sH=(0,q.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=$ge(e,oH),E=(0,q.useRef)(null),{state:D,view:O,container:k,setContainer:A}=aH({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,q.useImperativeHandle)(t,()=>({editor:E.current,state:D,view:O}),[E,k,D,O]);var j=(0,q.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,J.jsx)(`div`,Gz({ref:j,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},T))});sH.displayName=`CodeMirror`;function cH(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 lH(e,t){switch(e){case`markdown`:return[wj({base:cj,codeLanguages:wme}),jE()];case`typescript`:return[He({typescript:!0,jsx:t?.endsWith(`.tsx`)})];case`javascript`:return[He({jsx:t?.endsWith(`.jsx`)})];case`json`:return[SO()];case`yaml`:return[wM()];default:return[]}}function uH(e,t){switch(e){case`github`:return t?aN:RN;case`material`:return t?Ohe:Bhe;case`vscode`:return t?Bge:Qge;case`tokyo`:return t?Dge:_ge;case`gruvbox`:return t?ehe:mhe;case`monokai`:return Yhe;case`nord`:return oge;default:return t?aN:RN}}function dH({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??cH(a),m=Dc(),{data:h}=pg(),g=h?.codeEditor?.theme??`github`,_=(0,q.useMemo)(()=>{let e=[we.readOnly.of(n),...lH(p,a)];return e.push(uH(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:PD}])),s&&e.push(I.lineWrapping),e},[p,a,n,s,g,m]);return(0,J.jsx)(sH,{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 fH(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 pH(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 mH(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 hH(e){return e?.type===`target`?e.placement??`bottom-start`:`bottom-start`}function gH({open:e,items:t,anchor:n,wrapperElement:r,boundaryElement:i,position:a,onClose:o}){let s=(0,q.useRef)(null),c=(0,q.useMemo)(()=>a?{type:`point`,x:a.x,y:a.y}:null,[a]),l=n??c,u=r??i??null,d=(0,q.useMemo)(()=>fH(l),[l]),[f,p]=(0,q.useState)(null),m=(0,q.useId)().replace(/[^a-zA-Z0-9_-]/g,``),h=`--context-menu-anchor-${m}`,g=`context-menu-${m}`,_=hH(l),v=(0,q.useMemo)(()=>t.filter(e=>e.label.length>0),[t]),y=e&&!!d&&v.length>0;(0,q.useLayoutEffect)(()=>{if(!e||!d){p(null);return}let t=s.current;if(!t){p(d);return}let n=u?.getBoundingClientRect()??null;p(pH(d,t.getBoundingClientRect(),n))},[d,u,e]),(0,q.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,q.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,q.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?mH(d,u):null;if((0,q.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,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(`style`,{children:C`
|
|
365
365
|
.context-menu-anchor[data-context-menu-id='${g}'] {
|
|
366
366
|
width: 1px;
|
|
@@ -958,7 +958,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
|
|
|
958
958
|
@pointerdown=${e=>this._onResizeStart(e,`br`)}
|
|
959
959
|
></div>
|
|
960
960
|
${e}
|
|
961
|
-
</dialog>`:e}};customElements.define(`input-panel`,Uye);var Wye={extension:{type:K.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await Y(()=>import(`./browserAll-BtF9Ifi8.js`),__vite__mapDeps([127,128,1,129]))}},Gye={extension:{type:K.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await Y(()=>import(`./webworkerAll-7AhN-SIi.js`),__vite__mapDeps([130,128,1,129]))}},Kye=new ft;function GX(e,t,n){let r=Kye;e.measurable=!0,jt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function KX(e,t,n){let r=Ze.get();e.measurable=!0;let i=At.get().identity();pt(e,r,qX(e,n,i)),e.measurable=!1,t.addBoundsMask(r),At.return(i),Ze.return(r)}function qX(e,t,n){return e?(e!==t&&(qX(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(it(`Mask bounds, renderable is not inside the root container`),n)}var JX=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 Kt),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||GX(this.mask,e,t)}addLocalBounds(e,t){KX(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}};JX.extension=K.MaskEffect;var YX=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`}};YX.extension=K.MaskEffect;var XX=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){GX(this.mask,e,t)}addLocalBounds(e,t){KX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Gt}};XX.extension=K.MaskEffect;var ZX;async function qye(){return ZX??=(async()=>{let e=Ut.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`})(),ZX}var QX=class e extends mt{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=Dt.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 qye(),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&&(Dt.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||(Dt.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Dt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};QX.extension=K.TextureSource,QX.defaultOptions={...mt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},QX.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var Jye=QX,$X=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),eZ=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||it(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=$X(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&&it(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){it(`[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}},tZ=[];kt.handleByList(K.TextureSource,tZ);function nZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<tZ.length;e++){let t=tZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Yye(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&eZ.has(r))return eZ.get(r);let a=new Qe({source:nZ(i)});return a.on(`destroy`,()=>{eZ.has(r)&&eZ.remove(r)}),t||eZ.set(r,a),a}function Xye(e,t=!1){return typeof e==`string`?eZ.get(e):e instanceof mt?new Qe({source:e}):Yye(e,t)}Qe.from=Xye,mt.from=nZ,kt.add(JX,YX,XX,Jye,Jt,yt,rt);var rZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(rZ||{});function iZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function aZ(e){return e.split(`?`)[0].split(`#`)[0]}function Zye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Qye(e,t,n){return e.replace(new RegExp(Zye(t),`g`),n)}function $ye(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 oZ={toPosix(e){return Qye(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){iZ(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(iZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=aZ(this.toPosix(t??Ut.get().getBaseUrl())),i=aZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?oZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(iZ(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=$ye(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return iZ(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(iZ(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(iZ(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){iZ(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){iZ(e),t&&iZ(t),e=aZ(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){iZ(e),e=aZ(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){iZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=aZ(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 sZ(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?sZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function ebe(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)}),sZ(e,r,0,t,n)}else n.push(e);return n}var cZ=e=>!Array.isArray(e),lZ=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 $X(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&&it(`[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)&&it(`[Resolver] already has key: ${e} overwriting`)};$X(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=$X(t).map(e=>typeof e==`string`?ebe(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=cZ(e);e=$X(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=cZ(e);e=$X(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=oZ.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??tbe(e.src),s!==void 0&&(e.progressSize=s),e}};lZ.RETINA_PREFIX=/@([0-9\.]+)x/;function tbe(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var uZ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},dZ=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof mt&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof Qe?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 vt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new vt(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 vt(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 vt(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 Qe({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=[]}};dZ.BATCH_SIZE=1e3;var fZ=dZ,nbe=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function pZ(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=oZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=pZ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var rbe={extension:K.Asset,cache:{test:e=>e instanceof fZ,getCacheableAssets:(e,t)=>pZ(e,t,!1)},resolver:{extension:{type:K.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&nbe.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(lZ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:K.LoadParser,priority:rZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return oZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=oZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof Qe)c=r;else{let r=uZ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new fZ({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=uZ(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)}}};kt.add(rbe);var ibe=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||Dt.shared.add(this.updateTranslation,this,Et.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Dt.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},mZ=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 wt,this.page=new wt,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}},hZ=/iPhone/i,gZ=/iPod/i,_Z=/iPad/i,vZ=/\biOS-universal(?:.+)Mac\b/i,yZ=/\bAndroid(?:.+)Mobile\b/i,bZ=/Android/i,xZ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,SZ=/Silk/i,CZ=/Windows Phone/i,wZ=/\bWindows(?:.+)ARM\b/i,TZ=/BlackBerry/i,EZ=/BB10/i,DZ=/Opera Mini/i,OZ=/\b(CriOS|Chrome)(?:.+)Mobile/i,kZ=/Mobile(?:.+)Firefox\b/i,AZ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function abe(e){return function(t){return t.test(e)}}function jZ(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=abe(n),a={apple:{phone:i(hZ)&&!i(CZ),ipod:i(gZ),tablet:!i(hZ)&&(i(_Z)||AZ(t))&&!i(CZ),universal:i(vZ),device:(i(hZ)||i(gZ)||i(_Z)||i(vZ)||AZ(t))&&!i(CZ)},amazon:{phone:i(xZ),tablet:!i(xZ)&&i(SZ),device:i(xZ)||i(SZ)},android:{phone:!i(CZ)&&i(xZ)||!i(CZ)&&i(yZ),tablet:!i(CZ)&&!i(xZ)&&!i(yZ)&&(i(SZ)||i(bZ)),device:!i(CZ)&&(i(xZ)||i(SZ)||i(yZ)||i(bZ))||i(/\bokhttp\b/i)},windows:{phone:i(CZ),tablet:i(wZ),device:i(CZ)||i(wZ)},other:{blackberry:i(TZ),blackberry10:i(EZ),opera:i(DZ),firefox:i(kZ),chrome:i(OZ),device:i(TZ)||i(EZ)||i(DZ)||i(kZ)||i(OZ)},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 obe=(jZ.default??jZ)(globalThis.navigator),sbe=9,MZ=100,cbe=0,lbe=0,NZ=2,PZ=1,ube=-1e3,dbe=-1e3,fbe=2,FZ=class e{constructor(e,t=obe){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=`${PZ}px`,e.style.height=`${PZ}px`,e.style.position=`absolute`,e.style.top=`${ube}px`,e.style.left=`${dbe}px`,e.style.zIndex=fbe.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=`${cbe}px`,this._div.style.left=`${lbe}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=NZ.toString(),this._canvasObserver=new ibe({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,ct(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=`
|
|
961
|
+
</dialog>`:e}};customElements.define(`input-panel`,Uye);var Wye={extension:{type:K.Environment,name:`browser`,priority:-1},test:()=>!0,load:async()=>{await Y(()=>import(`./browserAll-haNDWq66.js`),__vite__mapDeps([127,128,1,129]))}},Gye={extension:{type:K.Environment,name:`webworker`,priority:0},test:()=>typeof self<`u`&&self.WorkerGlobalScope!==void 0,load:async()=>{await Y(()=>import(`./webworkerAll-BXCHpnO9.js`),__vite__mapDeps([130,128,1,129]))}},Kye=new ft;function GX(e,t,n){let r=Kye;e.measurable=!0,jt(e,n,r),t.addBoundsMask(r),e.measurable=!1}function KX(e,t,n){let r=Ze.get();e.measurable=!0;let i=At.get().identity();pt(e,r,qX(e,n,i)),e.measurable=!1,t.addBoundsMask(r),At.return(i),Ze.return(r)}function qX(e,t,n){return e?(e!==t&&(qX(e.parent,t,n),e.updateLocalTransform(),n.append(e.localTransform)),n):(it(`Mask bounds, renderable is not inside the root container`),n)}var JX=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 Kt),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||GX(this.mask,e,t)}addLocalBounds(e,t){KX(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}};JX.extension=K.MaskEffect;var YX=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`}};YX.extension=K.MaskEffect;var XX=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){GX(this.mask,e,t)}addLocalBounds(e,t){KX(this.mask,e,t)}containsPoint(e,t){let n=this.mask;return t(n,e)}destroy(){this.reset()}static test(e){return e instanceof Gt}};XX.extension=K.MaskEffect;var ZX;async function qye(){return ZX??=(async()=>{let e=Ut.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`})(),ZX}var QX=class e extends mt{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=Dt.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 qye(),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&&(Dt.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||(Dt.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Dt.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};QX.extension=K.TextureSource,QX.defaultOptions={...mt.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1},QX.MIME_TYPES={ogv:`video/ogg`,mov:`video/quicktime`,m4v:`video/mp4`};var Jye=QX,$X=(e,t,n=!1)=>(Array.isArray(e)||(e=[e]),t?e.map(e=>typeof e==`string`||n?t(e):e):e),eZ=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||it(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let n=$X(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&&it(`[Cache] already has key:`,e),this._cache.set(e,i.get(e))})}remove(e){if(!this._cacheMap.has(e)){it(`[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}},tZ=[];kt.handleByList(K.TextureSource,tZ);function nZ(e={}){let t=e&&e.resource,n=t?e.resource:e,r=t?e:{resource:e};for(let e=0;e<tZ.length;e++){let t=tZ[e];if(t.test(n))return new t(r)}throw Error(`Could not find a source type for resource: ${r.resource}`)}function Yye(e={},t=!1){let n=e&&e.resource,r=n?e.resource:e,i=n?e:{resource:e};if(!t&&eZ.has(r))return eZ.get(r);let a=new Qe({source:nZ(i)});return a.on(`destroy`,()=>{eZ.has(r)&&eZ.remove(r)}),t||eZ.set(r,a),a}function Xye(e,t=!1){return typeof e==`string`?eZ.get(e):e instanceof mt?new Qe({source:e}):Yye(e,t)}Qe.from=Xye,mt.from=nZ,kt.add(JX,YX,XX,Jye,Jt,yt,rt);var rZ=(e=>(e[e.Low=0]=`Low`,e[e.Normal=1]=`Normal`,e[e.High=2]=`High`,e))(rZ||{});function iZ(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received ${JSON.stringify(e)}`)}function aZ(e){return e.split(`?`)[0].split(`#`)[0]}function Zye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Qye(e,t,n){return e.replace(new RegExp(Zye(t),`g`),n)}function $ye(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 oZ={toPosix(e){return Qye(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){iZ(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(iZ(e),this.isDataUrl(e)||this.isBlobUrl(e))return e;let r=aZ(this.toPosix(t??Ut.get().getBaseUrl())),i=aZ(this.toPosix(n??this.rootname(r)));return e=this.toPosix(e),e.startsWith(`/`)?oZ.join(i,e.slice(1)):this.isAbsolute(e)?e:this.join(r,e)},normalize(e){if(iZ(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=$ye(e,!1),e.length>0&&r&&(e+=`/`),n?`/${e}`:t+e},isAbsolute(e){return iZ(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(iZ(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(iZ(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){iZ(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){iZ(e),t&&iZ(t),e=aZ(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){iZ(e),e=aZ(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){iZ(e);let t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;e=aZ(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 sZ(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?sZ(e.replace(r[n],s),t,n+1,r,i):i.push(e.replace(r[n],s))}}function ebe(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)}),sZ(e,r,0,t,n)}else n.push(e);return n}var cZ=e=>!Array.isArray(e),lZ=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 $X(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&&it(`[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)&&it(`[Resolver] already has key: ${e} overwriting`)};$X(t).forEach(e=>{let{src:t}=e,{data:r,format:i,loadParser:a,parser:o}=e,s=$X(t).map(e=>typeof e==`string`?ebe(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=cZ(e);e=$X(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=cZ(e);e=$X(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=oZ.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??tbe(e.src),s!==void 0&&(e.progressSize=s),e}};lZ.RETINA_PREFIX=/@([0-9\.]+)x/;function tbe(e){return e.split(`.`).pop().split(`?`).shift().split(`#`).shift()}var uZ=(e,t)=>{let n=t.split(`?`)[1];return n&&(e+=`?${n}`),e},dZ=class e{constructor(e,t){this.linkedSheets=[];let n=e;e?.source instanceof mt&&(n={texture:e,data:t});let{texture:r,data:i,cachePrefix:a=``}=n;this.cachePrefix=a,this._texture=r instanceof Qe?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 vt(0,0,Math.floor(a.w)/this.resolution,Math.floor(a.h)/this.resolution);r=t.rotated?new vt(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 vt(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 vt(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 Qe({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=[]}};dZ.BATCH_SIZE=1e3;var fZ=dZ,nbe=[`jpg`,`png`,`jpeg`,`avif`,`webp`,`basis`,`etc2`,`bc7`,`bc6h`,`bc5`,`bc4`,`bc3`,`bc2`,`bc1`,`eac`,`astc`];function pZ(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=oZ.dirname(e[0]);t.linkedSheets.forEach((e,i)=>{let a=pZ([`${n}/${t.data.meta.related_multi_packs[i]}`],e,!0);Object.assign(r,a)})}return r}var rbe={extension:K.Asset,cache:{test:e=>e instanceof fZ,getCacheableAssets:(e,t)=>pZ(e,t,!1)},resolver:{extension:{type:K.ResolveParser,name:`resolveSpritesheet`},test:e=>{let t=e.split(`?`)[0].split(`.`),n=t.pop(),r=t.pop();return n===`json`&&nbe.includes(r)},parse:e=>{let t=e.split(`.`);return{resolution:parseFloat(lZ.RETINA_PREFIX.exec(e)?.[1]??`1`),format:t[t.length-2],src:e}}},loader:{name:`spritesheetLoader`,id:`spritesheet`,extension:{type:K.LoadParser,priority:rZ.Normal,name:`spritesheetLoader`},async testParse(e,t){return oZ.extname(t.src).toLowerCase()===`.json`&&!!e.frames},async parse(e,t,n){let{texture:r,imageFilename:i,textureOptions:a,cachePrefix:o}=t?.data??{},s=oZ.dirname(t.src);s&&s.lastIndexOf(`/`)!==s.length-1&&(s+=`/`);let c;if(r instanceof Qe)c=r;else{let r=uZ(s+(i??e.meta.image),t.src);c=(await n.load([{src:r,data:a}]))[r]}let l=new fZ({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=uZ(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)}}};kt.add(rbe);var ibe=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||Dt.shared.add(this.updateTranslation,this,Et.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Dt.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform=``,this._lastScaleX=null,this._lastScaleY=null}},mZ=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 wt,this.page=new wt,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}},hZ=/iPhone/i,gZ=/iPod/i,_Z=/iPad/i,vZ=/\biOS-universal(?:.+)Mac\b/i,yZ=/\bAndroid(?:.+)Mobile\b/i,bZ=/Android/i,xZ=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,SZ=/Silk/i,CZ=/Windows Phone/i,wZ=/\bWindows(?:.+)ARM\b/i,TZ=/BlackBerry/i,EZ=/BB10/i,DZ=/Opera Mini/i,OZ=/\b(CriOS|Chrome)(?:.+)Mobile/i,kZ=/Mobile(?:.+)Firefox\b/i,AZ=function(e){return e!==void 0&&e.platform===`MacIntel`&&typeof e.maxTouchPoints==`number`&&e.maxTouchPoints>1&&typeof MSStream>`u`};function abe(e){return function(t){return t.test(e)}}function jZ(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=abe(n),a={apple:{phone:i(hZ)&&!i(CZ),ipod:i(gZ),tablet:!i(hZ)&&(i(_Z)||AZ(t))&&!i(CZ),universal:i(vZ),device:(i(hZ)||i(gZ)||i(_Z)||i(vZ)||AZ(t))&&!i(CZ)},amazon:{phone:i(xZ),tablet:!i(xZ)&&i(SZ),device:i(xZ)||i(SZ)},android:{phone:!i(CZ)&&i(xZ)||!i(CZ)&&i(yZ),tablet:!i(CZ)&&!i(xZ)&&!i(yZ)&&(i(SZ)||i(bZ)),device:!i(CZ)&&(i(xZ)||i(SZ)||i(yZ)||i(bZ))||i(/\bokhttp\b/i)},windows:{phone:i(CZ),tablet:i(wZ),device:i(CZ)||i(wZ)},other:{blackberry:i(TZ),blackberry10:i(EZ),opera:i(DZ),firefox:i(kZ),chrome:i(OZ),device:i(TZ)||i(EZ)||i(DZ)||i(kZ)||i(OZ)},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 obe=(jZ.default??jZ)(globalThis.navigator),sbe=9,MZ=100,cbe=0,lbe=0,NZ=2,PZ=1,ube=-1e3,dbe=-1e3,fbe=2,FZ=class e{constructor(e,t=obe){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=`${PZ}px`,e.style.height=`${PZ}px`,e.style.position=`absolute`,e.style.top=`${ube}px`,e.style.left=`${dbe}px`,e.style.zIndex=fbe.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=`${cbe}px`,this._div.style.left=`${lbe}px`,this._div.style.pointerEvents=`none`,this._div.style.zIndex=NZ.toString(),this._canvasObserver=new ibe({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,ct(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=`
|
|
962
962
|
color: transparent;
|
|
963
963
|
pointer-events: none;
|
|
964
964
|
padding: 0;
|
|
@@ -971,7 +971,7 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
|
|
|
971
971
|
-webkit-user-select: none;
|
|
972
972
|
-moz-user-select: none;
|
|
973
973
|
-ms-user-select: none;
|
|
974
|
-
`,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${MZ}px`,t.style.height=`${MZ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=NZ.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 mZ(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!==sbe||!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]}};FZ.extension={type:[K.WebGLSystem,K.WebGPUSystem],name:`accessibility`},FZ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var pbe=FZ,mbe={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},IZ;function hbe(e){return IZ===void 0&&(IZ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Xt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Ut.get().getWebGLRenderingContext())return!1;let e=Ut.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}})()),IZ}var LZ;async function gbe(e={}){return LZ===void 0&&(LZ=await(async()=>{let t=Ut.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),LZ}var RZ=[`webgl`,`webgpu`,`canvas`];async function _be(e){let t=[];e.preference?(t.push(e.preference),RZ.forEach(n=>{n!==e.preference&&t.push(n)})):t=RZ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await gbe()){let{WebGPURenderer:t}=await Y(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-CfIw2iDG.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&hbe(e.failIfMajorPerformanceCaveat??Xt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await Y(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-BoQQv3Jy.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await Y(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-BCjVc_h8.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 zZ=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}};zZ.extension=K.Application;var BZ=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,Et.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Dt.shared:new Dt,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};BZ.extension=K.Application,kt.add(zZ),kt.add(BZ);var VZ=class e{constructor(...e){this.stage=new Gt,e[0]!==void 0&&Lt(at,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new Gt,this.renderer=await _be(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 Lt(at,`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}};VZ._plugins=[];var HZ=VZ;kt.handleByList(K.Application,HZ._plugins),kt.add(Zt);var vbe=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 ybe(e,t){let n=(0,vbe.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:it(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var bbe=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 vt,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}]`}},xbe=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 vt,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 Sbe(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 Cbe,wbe,UZ=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(Cbe),n=e.getBounds(wbe);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(Sbe(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 vt;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 Lt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return Lt(`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]}},WZ=(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},Tbe=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 vt,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&&WZ(e,t,d,f,c,u,l)||e>h-c&&t<f&&WZ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&WZ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&WZ(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 Ebe(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 Dbe(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function GZ(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 Obe=new Xe,KZ=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?lt(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||Obe}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}},qZ={extension:{type:K.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}},kbe={...qZ,extension:{...qZ.extension,name:`ellipse`}},Abe={...qZ,extension:{...qZ.extension,name:`roundedRectangle`}},JZ=1e-4,YZ=1e-4;function jbe(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 XZ(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 ZZ(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 QZ(e,t,n,r,i,a){let o=JZ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=jbe(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new wt(e[0],e[1]),u=new wt(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+=ZZ(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+=XZ(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+=ZZ(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+=ZZ(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+=ZZ(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+=ZZ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=ZZ(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+=ZZ(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+=XZ(S,C,E,D,M,N,!1,p)));let P=YZ*YZ;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 Mbe(e,t,n,r){let i=JZ;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 $Z(e,t,n,r,i,a,o){let s=dn(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 Nbe=[],Pbe={extension:{type:K.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){$Z(e,Nbe,t,n,r,i,a)}},Fbe={extension:{type:K.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}},Ibe={extension:{type:K.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}},eQ=[{offset:0,color:`white`},{offset:1,color:`black`}],tQ=class e{constructor(...t){this.uid=gt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Lbe(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...nt(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:st.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:eQ,c=this._textureSize,{canvas:l,context:u}=iQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);rQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new Qe({source:new Jt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Xe;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:eQ,t=this._textureSize,{canvas:n,context:r}=iQ(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);rQ(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 Qe({source:new Jt({resource:n,addressMode:this._wrapMode})});let g=new Xe;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}`}};tQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},tQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var nQ=tQ;function rQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function iQ(e,t){let n=Ut.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Lbe(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(Lt(`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]??nQ.defaultLinearOptions.textureSize}),t}var Rbe=new Xe,zbe=new vt;function aQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(zbe);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 nQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(Rbe.copyFrom(r).invert()),i}var oQ={};kt.handleByMap(K.ShapeBuilder,oQ),kt.add(Fbe,Pbe,Ibe,qZ,kbe,Abe);var Bbe=new vt,Vbe=new Xe;function Hbe(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`)Ube(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&&sQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),sQ(t,a,e,r,n)}}}function Ube(e,t,n){let r=[],i=oQ.rectangle,a=Bbe;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&&GZ(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=ut.get(KZ);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 sQ(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=oQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&GZ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Mbe(u,n,a,s),m=`line-list`):QZ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();Wbe(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),$Z(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!==Qe.WHITE){let n=aQ(Vbe,t,e,c);Ebe(a,2,p,o,h,2,a.length/2-p,n)}else Dbe(o,h,2,a.length/2-p);let _=ut.get(KZ);_.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 Wbe(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];oQ[r.type].build(r,i)&&t.push(i)}return t}var Gbe=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{ut.return(e)}),this.graphicsData&&ut.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}},Kbe=class{constructor(){this.instructions=new Wt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new gn({maxTextures:t}),this.instructions.reset()}get geometry(){return Lt(_t,`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}},cQ=class e{constructor(e){this._renderer=e,this._managedContexts=new sn({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(),Hbe(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=ut.get(Kbe,{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=Tn(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new Gbe;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};cQ.extension={type:[K.WebGLSystem,K.WebGPUSystem],name:`graphicsContext`},cQ.defaultOptions={bezierSmoothness:.5};var lQ=cQ,qbe=8,uQ=1.1920929e-7,Jbe=1,dQ=.01,fQ=0,pQ=0;function mQ(e,t,n,r,i,a,o,s,c,l){let u=(Jbe-Math.min(.99,Math.max(0,l??lQ.defaultOptions.bezierSmoothness)))/1;return u*=u,Ybe(t,n,r,i,a,o,s,c,e,u),e}function Ybe(e,t,n,r,i,a,o,s,c,l){hQ(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function hQ(e,t,n,r,i,a,o,s,c,l,u){if(u>qbe)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>uQ&&m>uQ){if((p+m)*(p+m)<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(S,C);return}if(pQ!==0){if(h>pQ){c.push(n,r);return}if(g>pQ){c.push(i,a);return}}}}else if(p>uQ){if(p*p<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(n,r),c.push(i,a);return}if(pQ!==0&&h>pQ){c.push(n,r);return}}}else if(m>uQ){if(m*m<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(n,r),c.push(i,a);return}if(pQ!==0&&h>pQ){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}}hQ(e,t,f,p,v,y,S,C,c,l,u+1),hQ(S,C,b,x,g,_,o,s,c,l,u+1)}var Xbe=8,Zbe=1.1920929e-7,Qbe=1,$be=.01,gQ=0;function exe(e,t,n,r,i,a,o,s){let c=(Qbe-Math.min(.99,Math.max(0,s??lQ.defaultOptions.bezierSmoothness)))/1;return c*=c,txe(t,n,r,i,a,o,e,c),e}function txe(e,t,n,r,i,a,o,s){_Q(o,e,t,n,r,i,a,s,0),o.push(i,a)}function _Q(e,t,n,r,i,a,o,s,c){if(c>Xbe)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>Zbe){if(v*v<=s*(g*g+_*_)){if(gQ<$be){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<gQ){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}_Q(e,t,n,u,d,m,h,s,c+1),_Q(e,m,h,f,p,a,o,s,c+1)}function vQ(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 nxe(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);vQ(e,y+t,b+n,a,T,E,c*l>u*s)}var yQ=Math.PI*2,bQ={centerX:0,centerY:0,ang1:0,ang2:0},xQ=({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 rxe(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 SQ=(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)},ixe=(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=SQ(1,0,S,C),D=SQ(S,C,w,T);s===0&&D>0&&(D-=yQ),s===1&&D<0&&(D+=yQ),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function axe(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*yQ/360),d=Math.cos(s*yQ/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)),ixe(t,n,r,i,a,o,c,l,u,d,f,p,bQ);let{ang1:h,ang2:g}=bQ,{centerX:_,centerY:v}=bQ,y=Math.abs(g)/(yQ/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=rxe(h,g),{x:n,y:r}=xQ(t[0],a,o,d,u,_,v,C),{x:i,y:s}=xQ(t[1],a,o,d,u,_,v,C),{x:c,y:l}=xQ(t[2],a,o,d,u,_,v,C);mQ(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function oxe(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 sxe(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 cxe=new vt,lxe=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ft,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 vQ(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return nxe(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return axe(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 mQ(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 exe(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 vt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new bbe(e,t,n),r),this}poly(e,t,n){let r=new UZ(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?sxe(this,e,t,r):oxe(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 xbe(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Tbe(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 UZ,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 UZ,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(cxe);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},CQ=class e{constructor(e,t=!1){this.instructions=[],this.uid=gt(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?ybe(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new lxe(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(wt.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(wt.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]=wQ(_[3],e);break;case`rect`:_[4]=wQ(_[4],e);break;case`ellipse`:_[8]=wQ(_[8],e);break;case`roundRect`:_[5]=wQ(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=wQ(_[2],e);break;default:it(`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 wQ(e,t){return e?e.prepend(t):t.clone()}function TQ(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function uxe(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]=dxe(n);break;case`radialgradient`:t.defs[n.id]=fxe(n);break;default:break}}}}function dxe(e){let t=new nQ(TQ(e,`x1`,0),TQ(e,`y1`,0),TQ(e,`x2`,1),TQ(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=TQ(r,`offset`,0),a=st.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function fxe(e){return it(`[SVG Parser] Radial gradients are not yet supported`),new nQ(0,0,1,0)}function EQ(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var DQ={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 OQ(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in DQ){let r=e.getAttribute(n);r&&kQ(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(`:`);DQ[r]&&kQ(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function kQ(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=EQ(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=st.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=EQ(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=st.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 pxe(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 mxe(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function hxe(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 AQ(e,t){let n=new CQ(e,!1);for(let e of n.instructions)t.instructions.push(e)}function gxe(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 CQ};uxe(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=OQ(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&jQ(t,n,i,a)}return t}function jQ(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=OQ(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=mxe(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:hxe(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!pxe(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new CQ(void 0,!0);AQ(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 CQ(void 0,!0);AQ(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new CQ(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=TQ(e,`cx`,0),h=TQ(e,`cy`,0),g=TQ(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=TQ(e,`x`,0),l=TQ(e,`y`,0),C=TQ(e,`width`,0),w=TQ(e,`height`,0),_=TQ(e,`rx`,0),v=TQ(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=TQ(e,`cx`,0),h=TQ(e,`cy`,0),_=TQ(e,`rx`,0),v=TQ(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=TQ(e,`x1`,0),d=TQ(e,`y1`,0),f=TQ(e,`x2`,0),p=TQ(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:it(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)jQ(i[e],t,n,r)}var MQ={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`}},NQ=class{constructor(e,t){this.uid=gt(`fillPattern`),this._tick=0,this.transform=new Xe,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=MQ[t].addressModeU,e.source.style.addressModeV=MQ[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 _xe(e){return st.isColorLike(e)}function PQ(e){return e instanceof NQ}function FQ(e){return e instanceof nQ}function vxe(e){return e instanceof Qe}function yxe(e,t,n){let r=st.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=Qe.WHITE,{...n,...e}}function bxe(e,t,n){return e.texture=t,{...n,...e}}function IQ(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function LQ(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 xxe(e,t){let n={...t,...e},r=st.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function RQ(e,t){if(e==null)return null;let n={},r=e;return _xe(e)?yxe(n,e,t):vxe(e)?bxe(n,e,t):PQ(e)?IQ(n,e,t):FQ(e)?LQ(n,e,t):r.fill&&PQ(r.fill)?IQ(r,r.fill,t):r.fill&&FQ(r.fill)?LQ(r,r.fill,t):xxe(r,t)}function zQ(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=RQ(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var Sxe=new wt,BQ=new Xe,VQ=class e extends Vt{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=gt(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new CQ,this._transform=new Xe,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ft,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=RQ(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=zQ(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=RQ(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=RQ(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?st.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new CQ,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`&&(Lt(at,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=RQ(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(wt.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=zQ(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++,gxe(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 Xe?(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 Xe?(this._transform.append(e),this):(BQ.set(e,t,n,r,i,a),this._transform.append(BQ),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,Sxe):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}}};VQ.defaultFillStyle={color:16777215,alpha:1,texture:Qe.WHITE,matrix:null,fill:null,textureSpace:`local`},VQ.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:Qe.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var HQ=VQ,UQ=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||(Dt.system.add(this._tickerUpdate,this,Et.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(Dt.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}},WQ=class extends mZ{constructor(){super(...arguments),this.client=new wt,this.movement=new wt,this.offset=new wt,this.global=new wt,this.screen=new wt}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.`)}},GQ=class extends WQ{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!`)}},KQ=class extends WQ{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};KQ.DOM_DELTA_PIXEL=0,KQ.DOM_DELTA_LINE=1,KQ.DOM_DELTA_PAGE=2;var Cxe=2048,wxe=new wt,qQ=new wt,Txe=class{constructor(e){this.dispatch=new Vt,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 it(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){UQ.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,wxe.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<Cxe&&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`)&&(UQ.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`)&&(UQ.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,qQ),!e.hitArea.contains(qQ.x,qQ.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,qQ),e.containsPoint(qQ)):!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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 KQ)){it(`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(GQ);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(KQ);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(GQ);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 GQ&&t instanceof GQ&&(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 WQ&&t instanceof WQ&&(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)}},Exe=1,Dxe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},JQ=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 Txe(null),UQ.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new GQ(null),this._rootWheelEvent=new KQ(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(){UQ.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,UQ.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,UQ.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;UQ.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;UQ.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=Exe),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=Dxe[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}};JQ.extension={name:`events`,type:[K.WebGLSystem,K.CanvasSystem,K.WebGPUSystem],priority:-1},JQ.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var YQ=JQ,Oxe={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??YQ.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 mZ))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}},kxe=`in vec2 aPosition;
|
|
974
|
+
`,e.accessibleText&&(t.innerText=e.accessibleText)),t.style.width=`${MZ}px`,t.style.height=`${MZ}px`,t.style.backgroundColor=this.debug?`rgba(255,255,255,0.5)`:`transparent`,t.style.position=`absolute`,t.style.zIndex=NZ.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 mZ(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!==sbe||!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]}};FZ.extension={type:[K.WebGLSystem,K.WebGPUSystem],name:`accessibility`},FZ.defaultOptions={enabledByDefault:!1,debug:!1,activateOnTab:!0,deactivateOnMouseMove:!0};var pbe=FZ,mbe={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,accessibleType:`button`,accessibleText:null,accessiblePointerEvents:`auto`,accessibleChildren:!0,_accessibleActive:!1,_accessibleDiv:null,_renderId:-1},IZ;function hbe(e){return IZ===void 0&&(IZ=(()=>{let t={stencil:!0,failIfMajorPerformanceCaveat:e??Xt.defaultOptions.failIfMajorPerformanceCaveat};try{if(!Ut.get().getWebGLRenderingContext())return!1;let e=Ut.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}})()),IZ}var LZ;async function gbe(e={}){return LZ===void 0&&(LZ=await(async()=>{let t=Ut.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(e)).requestDevice(),!0}catch{return!1}})()),LZ}var RZ=[`webgl`,`webgpu`,`canvas`];async function _be(e){let t=[];e.preference?(t.push(e.preference),RZ.forEach(n=>{n!==e.preference&&t.push(n)})):t=RZ.slice();let n,r={};for(let i=0;i<t.length;i++){let a=t[i];if(a===`webgpu`&&await gbe()){let{WebGPURenderer:t}=await Y(async()=>{let{WebGPURenderer:e}=await import(`./WebGPURenderer-D8qkuqdr.js`);return{WebGPURenderer:e}},__vite__mapDeps([131,128,1]));n=t,r={...e,...e.webgpu};break}else if(a===`webgl`&&hbe(e.failIfMajorPerformanceCaveat??Xt.defaultOptions.failIfMajorPerformanceCaveat)){let{WebGLRenderer:t}=await Y(async()=>{let{WebGLRenderer:e}=await import(`./WebGLRenderer-DCMbi58z.js`);return{WebGLRenderer:e}},__vite__mapDeps([132,128,1]));n=t,r={...e,...e.webgl};break}else if(a===`canvas`){let{CanvasRenderer:t}=await Y(async()=>{let{CanvasRenderer:e}=await import(`./CanvasRenderer-XYe2KglB.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 zZ=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}};zZ.extension=K.Application;var BZ=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,Et.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?Dt.shared:new Dt,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};BZ.extension=K.Application,kt.add(zZ),kt.add(BZ);var VZ=class e{constructor(...e){this.stage=new Gt,e[0]!==void 0&&Lt(at,`Application constructor options are deprecated, please use Application.init() instead.`)}async init(t){t={...t},this.stage||=new Gt,this.renderer=await _be(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 Lt(at,`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}};VZ._plugins=[];var HZ=VZ;kt.handleByList(K.Application,HZ._plugins),kt.add(Zt);var vbe=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 ybe(e,t){let n=(0,vbe.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:it(`Unknown SVG path command: ${c}`)}c!==`Z`&&c!==`z`&&i===null&&(i={startX:a,startY:o},r.push(i))}return t}var bbe=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 vt,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}]`}},xbe=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 vt,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 Sbe(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 Cbe,wbe,UZ=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(Cbe),n=e.getBounds(wbe);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(Sbe(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 vt;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 Lt(`8.11.0`,`Polygon.lastX is deprecated, please use Polygon.lastX instead.`),this.points[this.points.length-2]}get y(){return Lt(`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]}},WZ=(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},Tbe=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 vt,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&&WZ(e,t,d,f,c,u,l)||e>h-c&&t<f&&WZ(e,t,h-c,f,c,u,l)||e>h-c&&t>g-c&&WZ(e,t,h-c,g-c,c,u,l)||e<d&&t>g-c&&WZ(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 Ebe(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 Dbe(e,t,n,r){let i=0;for(t*=n;i<r;)e[t]=0,e[t+1]=0,t+=n,i++}function GZ(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 Obe=new Xe,KZ=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?lt(t,n.groupColor)+(this.alpha*n.groupAlpha*255<<24):t+(this.alpha*255<<24)}get transform(){return this.renderable?.groupTransform||Obe}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}},qZ={extension:{type:K.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}},kbe={...qZ,extension:{...qZ.extension,name:`ellipse`}},Abe={...qZ,extension:{...qZ.extension,name:`roundedRectangle`}},JZ=1e-4,YZ=1e-4;function jbe(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 XZ(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 ZZ(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 QZ(e,t,n,r,i,a){let o=JZ;if(e.length===0)return;let s=t,c=s.alignment;if(t.alignment!==.5){let t=jbe(e);n&&(t*=-1),c=(c-.5)*t+.5}let l=new wt(e[0],e[1]),u=new wt(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+=ZZ(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+=XZ(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+=ZZ(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+=ZZ(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+=ZZ(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+=ZZ(S,C,S+E*N,C+D*N,S+O*N,C+k*N,p,!0)+2:h+=ZZ(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+=ZZ(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+=XZ(S,C,E,D,M,N,!1,p)));let P=YZ*YZ;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 Mbe(e,t,n,r){let i=JZ;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 $Z(e,t,n,r,i,a,o){let s=dn(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 Nbe=[],Pbe={extension:{type:K.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){$Z(e,Nbe,t,n,r,i,a)}},Fbe={extension:{type:K.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}},Ibe={extension:{type:K.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}},eQ=[{offset:0,color:`white`},{offset:1,color:`black`}],tQ=class e{constructor(...t){this.uid=gt(`fillGradient`),this._tick=0,this.type=`linear`,this.colorStops=[];let n=Lbe(t);n={...n.type===`radial`?e.defaultRadialOptions:e.defaultLinearOptions,...nt(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:st.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:eQ,c=this._textureSize,{canvas:l,context:u}=iQ(c,1),d=o?u.createLinearGradient(this._textureSize,0,0,0):u.createLinearGradient(0,0,this._textureSize,0);rQ(d,s),u.fillStyle=d,u.fillRect(0,0,c,1),this.texture=new Qe({source:new Jt({resource:l,addressMode:this._wrapMode})});let f=Math.sqrt(i*i+a*a),p=Math.atan2(a,i),m=new Xe;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:eQ,t=this._textureSize,{canvas:n,context:r}=iQ(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);rQ(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 Qe({source:new Jt({resource:n,addressMode:this._wrapMode})});let g=new Xe;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}`}};tQ.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:`local`,type:`linear`,textureSize:256,wrapMode:`clamp-to-edge`},tQ.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:`local`,type:`radial`,textureSize:256,wrapMode:`clamp-to-edge`};var nQ=tQ;function rQ(e,t){for(let n=0;n<t.length;n++){let r=t[n];e.addColorStop(r.offset,r.color)}}function iQ(e,t){let n=Ut.get().createCanvas(e,t);return{canvas:n,context:n.getContext(`2d`)}}function Lbe(e){let t=e[0]??{};return(typeof t==`number`||e[1])&&(Lt(`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]??nQ.defaultLinearOptions.textureSize}),t}var Rbe=new Xe,zbe=new vt;function aQ(e,t,n,r){let i=t.matrix?e.copyFrom(t.matrix).invert():e.identity();if(t.textureSpace===`local`){let e=n.getBounds(zbe);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 nQ)&&a.addressMode===`clamp-to-edge`&&(a.addressMode=`repeat`,a.update()),r&&i.append(Rbe.copyFrom(r).invert()),i}var oQ={};kt.handleByMap(K.ShapeBuilder,oQ),kt.add(Fbe,Pbe,Ibe,qZ,kbe,Abe);var Bbe=new vt,Vbe=new Xe;function Hbe(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`)Ube(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&&sQ(o.shapePath,a,!0,r,n),o&&(t.shapePrimitives[t.shapePrimitives.length-1].holes=o.shapePath.shapePrimitives),sQ(t,a,e,r,n)}}}function Ube(e,t,n){let r=[],i=oQ.rectangle,a=Bbe;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&&GZ(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=ut.get(KZ);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 sQ(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=oQ[e.type];if(!d.build(e,u))return;let f=s.length,p=a.length/2,m=`triangle-list`;if(c&&GZ(u,c),n){let n=e.closePath??!0,r=t;r.pixelLine?(Mbe(u,n,a,s),m=`line-list`):QZ(u,r,!1,n,a,s)}else if(l){let e=[],t=u.slice();Wbe(l).forEach(n=>{e.push(t.length/2),t.push(...n)}),$Z(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!==Qe.WHITE){let n=aQ(Vbe,t,e,c);Ebe(a,2,p,o,h,2,a.length/2-p,n)}else Dbe(o,h,2,a.length/2-p);let _=ut.get(KZ);_.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 Wbe(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n].shape,i=[];oQ[r.type].build(r,i)&&t.push(i)}return t}var Gbe=class{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(e=>{ut.return(e)}),this.graphicsData&&ut.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}},Kbe=class{constructor(){this.instructions=new Wt}init(e){let t=e.maxTextures;this.batcher?this.batcher._updateMaxTextures(t):this.batcher=new gn({maxTextures:t}),this.instructions.reset()}get geometry(){return Lt(_t,`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}},cQ=class e{constructor(e){this._renderer=e,this._managedContexts=new sn({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(),Hbe(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=ut.get(Kbe,{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=Tn(t.textures.textures,t.textures.count,this._renderer.limits.maxBatchableTextures)}return t}_initContext(e){let t=new Gbe;return t.context=e,e._gpuData[this._renderer.uid]=t,this._managedContexts.add(e),t}destroy(){this._managedContexts.destroy(),this._renderer=null}};cQ.extension={type:[K.WebGLSystem,K.WebGPUSystem],name:`graphicsContext`},cQ.defaultOptions={bezierSmoothness:.5};var lQ=cQ,qbe=8,uQ=1.1920929e-7,Jbe=1,dQ=.01,fQ=0,pQ=0;function mQ(e,t,n,r,i,a,o,s,c,l){let u=(Jbe-Math.min(.99,Math.max(0,l??lQ.defaultOptions.bezierSmoothness)))/1;return u*=u,Ybe(t,n,r,i,a,o,s,c,e,u),e}function Ybe(e,t,n,r,i,a,o,s,c,l){hQ(e,t,n,r,i,a,o,s,c,l,0),c.push(o,s)}function hQ(e,t,n,r,i,a,o,s,c,l,u){if(u>qbe)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>uQ&&m>uQ){if((p+m)*(p+m)<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(S,C);return}if(pQ!==0){if(h>pQ){c.push(n,r);return}if(g>pQ){c.push(i,a);return}}}}else if(p>uQ){if(p*p<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(n,r),c.push(i,a);return}if(pQ!==0&&h>pQ){c.push(n,r);return}}}else if(m>uQ){if(m*m<=l*(u*u+f*f)){if(fQ<dQ){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<fQ){c.push(n,r),c.push(i,a);return}if(pQ!==0&&h>pQ){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}}hQ(e,t,f,p,v,y,S,C,c,l,u+1),hQ(S,C,b,x,g,_,o,s,c,l,u+1)}var Xbe=8,Zbe=1.1920929e-7,Qbe=1,$be=.01,gQ=0;function exe(e,t,n,r,i,a,o,s){let c=(Qbe-Math.min(.99,Math.max(0,s??lQ.defaultOptions.bezierSmoothness)))/1;return c*=c,txe(t,n,r,i,a,o,e,c),e}function txe(e,t,n,r,i,a,o,s){_Q(o,e,t,n,r,i,a,s,0),o.push(i,a)}function _Q(e,t,n,r,i,a,o,s,c){if(c>Xbe)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>Zbe){if(v*v<=s*(g*g+_*_)){if(gQ<$be){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<gQ){e.push(m,h);return}}}else if(g=m-(t+a)/2,_=h-(n+o)/2,g*g+_*_<=s){e.push(m,h);return}_Q(e,t,n,u,d,m,h,s,c+1),_Q(e,m,h,f,p,a,o,s,c+1)}function vQ(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 nxe(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);vQ(e,y+t,b+n,a,T,E,c*l>u*s)}var yQ=Math.PI*2,bQ={centerX:0,centerY:0,ang1:0,ang2:0},xQ=({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 rxe(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 SQ=(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)},ixe=(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=SQ(1,0,S,C),D=SQ(S,C,w,T);s===0&&D>0&&(D-=yQ),s===1&&D<0&&(D+=yQ),f.centerX=b,f.centerY=x,f.ang1=E,f.ang2=D};function axe(e,t,n,r,i,a,o,s=0,c=0,l=0){if(a===0||o===0)return;let u=Math.sin(s*yQ/360),d=Math.cos(s*yQ/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)),ixe(t,n,r,i,a,o,c,l,u,d,f,p,bQ);let{ang1:h,ang2:g}=bQ,{centerX:_,centerY:v}=bQ,y=Math.abs(g)/(yQ/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=rxe(h,g),{x:n,y:r}=xQ(t[0],a,o,d,u,_,v,C),{x:i,y:s}=xQ(t[1],a,o,d,u,_,v,C),{x:c,y:l}=xQ(t[2],a,o,d,u,_,v,C);mQ(e,x,S,n,r,i,s,c,l),x=c,S=l,h+=g}}function oxe(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 sxe(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 cxe=new vt,lxe=class{constructor(e){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new ft,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 vQ(o,e,t,n,r,i,a),this}arcTo(e,t,n,r,i){this._ensurePoly();let a=this._currentPoly.points;return nxe(a,e,t,n,r,i),this}arcToSvg(e,t,n,r,i,a,o){let s=this._currentPoly.points;return axe(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 mQ(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 exe(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 vt(e,t,n,r),i),this}circle(e,t,n,r){return this.drawShape(new bbe(e,t,n),r),this}poly(e,t,n){let r=new UZ(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?sxe(this,e,t,r):oxe(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 xbe(e,t,n,r),i),this}roundRect(e,t,n,r,i,a){return this.drawShape(new Tbe(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 UZ,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 UZ,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(cxe);r.transform?e.addRect(i,r.transform):e.addRect(i)}return e}},CQ=class e{constructor(e,t=!1){this.instructions=[],this.uid=gt(`graphicsPath`),this._dirty=!0,this.checkForHoles=t,typeof e==`string`?ybe(e,this):this.instructions=e?.slice()??[]}get shapePath(){return this._shapePath||=new lxe(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(wt.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(wt.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]=wQ(_[3],e);break;case`rect`:_[4]=wQ(_[4],e);break;case`ellipse`:_[8]=wQ(_[8],e);break;case`roundRect`:_[5]=wQ(_[5],e);break;case`addPath`:_[0].transform(e);break;case`poly`:_[2]=wQ(_[2],e);break;default:it(`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 wQ(e,t){return e?e.prepend(t):t.clone()}function TQ(e,t,n){let r=e.getAttribute(t);return r?Number(r):n}function uxe(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]=dxe(n);break;case`radialgradient`:t.defs[n.id]=fxe(n);break;default:break}}}}function dxe(e){let t=new nQ(TQ(e,`x1`,0),TQ(e,`y1`,0),TQ(e,`x2`,1),TQ(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=TQ(r,`offset`,0),a=st.shared.setValue(r.getAttribute(`stop-color`)).toNumber();t.addColorStop(i,a)}return t}function fxe(e){return it(`[SVG Parser] Radial gradients are not yet supported`),new nQ(0,0,1,0)}function EQ(e){let t=e.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:``}var DQ={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 OQ(e,t){let n=e.getAttribute(`style`),r={},i={},a={strokeStyle:r,fillStyle:i,useFill:!1,useStroke:!1};for(let n in DQ){let r=e.getAttribute(n);r&&kQ(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(`:`);DQ[r]&&kQ(t,a,r,i.trim())}}return{strokeStyle:a.useStroke?r:null,fillStyle:a.useFill?i:null,useFill:a.useFill,useStroke:a.useStroke}}function kQ(e,t,n,r){switch(n){case`stroke`:if(r!==`none`){if(r.startsWith(`url(`)){let n=EQ(r);t.strokeStyle.fill=e.defs[n]}else t.strokeStyle.color=st.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=EQ(r);t.fillStyle.fill=e.defs[n]}else t.fillStyle.color=st.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 pxe(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 mxe(e){return e.split(/(?=[Mm])/).filter(e=>e.trim().length>0)}function hxe(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 AQ(e,t){let n=new CQ(e,!1);for(let e of n.instructions)t.instructions.push(e)}function gxe(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 CQ};uxe(e,n);let r=e.children,{fillStyle:i,strokeStyle:a}=OQ(e,n);for(let e=0;e<r.length;e++){let t=r[e];t.nodeName.toLowerCase()!==`defs`&&jQ(t,n,i,a)}return t}function jQ(e,t,n,r){let i=e.children,{fillStyle:a,strokeStyle:o}=OQ(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=mxe(x),o=i===`evenodd`,s=a.length>1;if(o&&s){let e=a.map(e=>({path:e,area:hxe(e)}));if(e.sort((e,t)=>t.area-e.area),a.length>3||!pxe(e))for(let i=0;i<e.length;i++){let a=e[i],o=i===0;t.context.beginPath();let s=new CQ(void 0,!0);AQ(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 CQ(void 0,!0);AQ(a.path,s),t.context.path(s),o?t.context.cut():(n&&t.context.fill(n),r&&t.context.stroke(r))}}else S=new CQ(x,i?i===`evenodd`:!0),t.context.path(S),n&&t.context.fill(n),r&&t.context.stroke(r);break}case`circle`:m=TQ(e,`cx`,0),h=TQ(e,`cy`,0),g=TQ(e,`r`,0),t.context.ellipse(m,h,g,g),n&&t.context.fill(n),r&&t.context.stroke(r);break;case`rect`:c=TQ(e,`x`,0),l=TQ(e,`y`,0),C=TQ(e,`width`,0),w=TQ(e,`height`,0),_=TQ(e,`rx`,0),v=TQ(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=TQ(e,`cx`,0),h=TQ(e,`cy`,0),_=TQ(e,`rx`,0),v=TQ(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=TQ(e,`x1`,0),d=TQ(e,`y1`,0),f=TQ(e,`x2`,0),p=TQ(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:it(`[SVG parser] <${e.nodeName}> elements unsupported`);break}s&&(n=null);for(let e=0;e<i.length;e++)jQ(i[e],t,n,r)}var MQ={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`}},NQ=class{constructor(e,t){this.uid=gt(`fillPattern`),this._tick=0,this.transform=new Xe,this.texture=e,this.transform.scale(1/e.frame.width,1/e.frame.height),t&&(e.source.style.addressModeU=MQ[t].addressModeU,e.source.style.addressModeV=MQ[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 _xe(e){return st.isColorLike(e)}function PQ(e){return e instanceof NQ}function FQ(e){return e instanceof nQ}function vxe(e){return e instanceof Qe}function yxe(e,t,n){let r=st.shared.setValue(t??0);return e.color=r.toNumber(),e.alpha=r.alpha===1?n.alpha:r.alpha,e.texture=Qe.WHITE,{...n,...e}}function bxe(e,t,n){return e.texture=t,{...n,...e}}function IQ(e,t,n){return e.fill=t,e.color=16777215,e.texture=t.texture,e.matrix=t.transform,{...n,...e}}function LQ(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 xxe(e,t){let n={...t,...e},r=st.shared.setValue(n.color);return n.alpha*=r.alpha,n.color=r.toNumber(),n}function RQ(e,t){if(e==null)return null;let n={},r=e;return _xe(e)?yxe(n,e,t):vxe(e)?bxe(n,e,t):PQ(e)?IQ(n,e,t):FQ(e)?LQ(n,e,t):r.fill&&PQ(r.fill)?IQ(r,r.fill,t):r.fill&&FQ(r.fill)?LQ(r,r.fill,t):xxe(r,t)}function zQ(e,t){let{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...c}=t,l=RQ(e,c);return l?{width:n,alignment:r,miterLimit:i,cap:a,join:o,pixelLine:s,...l}:null}var Sxe=new wt,BQ=new Xe,VQ=class e extends Vt{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=gt(`graphicsContext`),this.dirty=!0,this.batchMode=`auto`,this.instructions=[],this.destroyed=!1,this._activePath=new CQ,this._transform=new Xe,this._fillStyle={...e.defaultFillStyle},this._strokeStyle={...e.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new ft,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=RQ(t,e.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=zQ(t,e.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=RQ(t,e.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=RQ(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?st.shared.setValue(t).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new CQ,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`&&(Lt(at,`GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead`),t={color:t,alpha:n}),this._fillStyle=RQ(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(wt.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=zQ(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++,gxe(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 Xe?(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 Xe?(this._transform.append(e),this):(BQ.set(e,t,n,r,i,a),this._transform.append(BQ),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,Sxe):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}}};VQ.defaultFillStyle={color:16777215,alpha:1,texture:Qe.WHITE,matrix:null,fill:null,textureSpace:`local`},VQ.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:`butt`,join:`miter`,texture:Qe.WHITE,matrix:null,fill:null,textureSpace:`local`,pixelLine:!1};var HQ=VQ,UQ=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||(Dt.system.add(this._tickerUpdate,this,Et.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&=(Dt.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}},WQ=class extends mZ{constructor(){super(...arguments),this.client=new wt,this.movement=new wt,this.offset=new wt,this.global=new wt,this.screen=new wt}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.`)}},GQ=class extends WQ{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!`)}},KQ=class extends WQ{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};KQ.DOM_DELTA_PIXEL=0,KQ.DOM_DELTA_LINE=1,KQ.DOM_DELTA_PAGE=2;var Cxe=2048,wxe=new wt,qQ=new wt,Txe=class{constructor(e){this.dispatch=new Vt,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 it(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){UQ.pauseUpdate=!0;let n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?`hitTestMoveRecursive`:`hitTestRecursive`,r=this[n](this.rootTarget,this.rootTarget.eventMode,wxe.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<Cxe&&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`)&&(UQ.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`)&&(UQ.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,qQ),!e.hitArea.contains(qQ.x,qQ.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,qQ),e.containsPoint(qQ)):!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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 GQ)){it(`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 KQ)){it(`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(GQ);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(KQ);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(GQ);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 GQ&&t instanceof GQ&&(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 WQ&&t instanceof WQ&&(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)}},Exe=1,Dxe={touchstart:`pointerdown`,touchend:`pointerup`,touchendoutside:`pointerupoutside`,touchmove:`pointermove`,touchcancel:`pointercancel`},JQ=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 Txe(null),UQ.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new GQ(null),this._rootWheelEvent=new KQ(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(){UQ.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,UQ.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,UQ.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;UQ.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;UQ.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=Exe),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=Dxe[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}};JQ.extension={name:`events`,type:[K.WebGLSystem,K.CanvasSystem,K.WebGPUSystem],priority:-1},JQ.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};var YQ=JQ,Oxe={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??YQ.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 mZ))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}},kxe=`in vec2 aPosition;
|
|
975
975
|
out vec2 vTextureCoord;
|
|
976
976
|
|
|
977
977
|
uniform vec4 uInputSize;
|
|
@@ -1406,7 +1406,7 @@ fn mainFragment(
|
|
|
1406
1406
|
<div class="pixi-host">
|
|
1407
1407
|
<div class="edge-glow"></div>
|
|
1408
1408
|
</div>
|
|
1409
|
-
`}};customElements.define(`virtual-trackpad-tab`,Nwe);var Pwe=/^\/versions\/[^/]+(?:\/|$)/;function Fwe(e){return Pwe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function U0(e,t=window.location){let n=Fwe(t);return n?`hosted-session:${n}:${e}`:e}var W0=1.5,G0=30,Iwe=50,K0=15;function q0(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function J0(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function Y0(e){return typeof e==`object`&&!!e}function X0(){try{let e=localStorage.getItem(U0(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return Y0(t)?t:{}}catch{return{}}}function Lwe(e){try{localStorage.setItem(U0(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function Rwe(e){let t=X0().sessions;if(!t)return null;let n=t[e];if(!Y0(n))return null;let r={activeTab:`input`,inputDraft:``};return J0(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function Z0(){let e=X0();return J0(e.lastActiveTab)?e.lastActiveTab:`input`}var Q0=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(LX(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=Rwe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||Z0()}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=X0(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};Lwe({...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,q0()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),q0()&&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=Z0();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;J0(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,q0()||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&&(q0()&&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=Fye(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*W0)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*W0)),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<G0,r=this._cursorPos.y>t.height-G0;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<G0?t.top-K0:t.bottom+K0;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}))},Iwe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!q0())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)}},$0=`xtermInputPanelSettings`,zwe=50,Bwe=1e3,Vwe=1,Hwe=1,e2=`terminal-meta`;function t2(){return Nc(`terminal-input-history`,window.location)}function Uwe(){return Nc(`openspecui-terminal`,window.location)}function n2(){return Nc(`input-history`,window.location)}function r2(){return Nc(`terminal-input-history-fallback`,window.location)}function i2(e){return Math.max(Vwe,Math.min(Bwe,Math.round(e)))}function a2(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 o2(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,i2(t))}function s2(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 c2(){try{let e=localStorage.getItem($0);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function Wwe(e){let t=c2();try{localStorage.setItem($0,JSON.stringify({...t,...e}))}catch{}}async function l2(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(Uwe(),Hwe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(e2)||e.createObjectStore(e2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function Gwe(){let e=await l2();return e?await new Promise(t=>{let n=e.transaction(e2,`readonly`),r=n.objectStore(e2).get(n2());r.onsuccess=()=>{t(a2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function Kwe(e){let t=await l2();return t?await new Promise(n=>{let r=t.transaction(e2,`readwrite`);r.objectStore(e2).put(e,n2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function qwe(){try{let e=localStorage.getItem(r2());return e?a2(JSON.parse(e)):[]}catch{return[]}}function Jwe(e){try{localStorage.setItem(r2(),JSON.stringify(e))}catch{}}async function Ywe(){return await Gwe()||qwe()}async function u2(e){await Kwe(e)||Jwe(e)}var Xwe=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=c2().historyLimit;return typeof e==`number`&&Number.isFinite(e)?i2(e):zwe}async setLimit(e){let t=i2(e);Wwe({historyLimit:t}),await this.ensureInitialized();let n=o2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=o2([{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=o2(await Ywe(),this.getLimit()),this.emit(),!yc())try{let e=a2(await og.kv.get.query({key:t2()})),t=o2([...this.records,...e],this.getLimit());s2(this.records,t)||(this.records=t,await u2(this.records),this.emit()),s2(e,this.records)||this.persistRemote(this.records);let n=og.kv.subscribe.subscribe({key:t2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=a2(e),n=o2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){s2(this.records,e)||(this.records=e,await u2(this.records),this.emit(),t.persistRemote&&!yc()&&this.persistRemote(this.records))}async persistRemote(e){try{await og.kv.set.mutate({key:t2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},d2=[`xterm`,`ghostty`];function f2(e){return d2.includes(e)}var p2=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,Zwe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},m2=1500,h2=1e3,Qwe=1e4,g2=`common`,$we=512*1024,eTe=8,tTe=32,_2=13,nTe=800,v2=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],y2=new Set;function b2(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function rTe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(y2.has(t))return b2(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),y2.add(t),``}if(e.startsWith(`font/`)){let e=b2(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),y2.add(t),e}}catch{}return t}function iTe(e){let t=`google:${e}`;if(y2.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),y2.add(t)}var aTe=class{instances=new Map;listeners=new Set;idCounter=0;config={...Zwe};snapshotCache=null;inputHistoryStore=new Xwe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=h2;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:g2});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:p2,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 Zve(e),n=new mG;return t.loadAddon(n),t.loadAddon(new bG),{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 Q0({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>$we&&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||=Y(()=>import(`./ghostty-web-dXmGLyPw.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(p2);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(v2.includes(e))iTe(e),n.push(e);else{let t=await rTe(e);t&&n.push(t)}n.push(p2),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,Y(async()=>{let{trpcClient:e}=await import(`./trpc-B-Zq3zMO.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},nTe)}zoomFont(e){let t=Math.min(tTe,Math.max(eTe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==_2&&(this.applyConfig({fontSize:_2}),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()},m2))}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){Q0.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<m2,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(zc());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=h2;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=lG.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,Qwe)},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??g2}),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??g2,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=oTe(e.closeCallbackUrl,e.exitCode);t&&sTe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function oTe(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 sTe(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=Al.getAreaForPath(t.pathname);Al.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}var x2=new aTe,S2=(0,q.createContext)(null);function cTe({children:e}){let t=yc(),n=(0,q.useSyncExternalStore)(e=>x2.subscribe(e),()=>x2.getSnapshot(),()=>x2.getSnapshot()),[r,i]=(0,q.useState)(null),a=(0,q.useCallback)(e=>{if(t)return``;let n=x2.createSession(e);return i(n),n},[t]),o=(0,q.useCallback)((e,n,r)=>{if(t)return``;let a=`${e} ${n.join(` `)}`.trim(),o=x2.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,q.useCallback)(e=>{x2.closeSession(e),i(t=>t===e?null:t)},[]),c=(0,q.useCallback)(e=>{i(e),x2.focusSession(e)},[]),l=(0,q.useCallback)((e,t)=>{},[]),u=(0,q.useCallback)((e,t)=>{x2.setCustomTitle(e,t)},[]),d=n.sessions,f=(0,q.useMemo)(()=>r&&d.some(e=>e.id===r)?r:d[d.length-1]?.id??null,[r,d]);(0,q.useEffect)(()=>{f&&x2.focusSession(f)},[f]);let p=(0,q.useRef)(!1);(0,q.useEffect)(()=>{p.current||d.length!==0&&x2.discoveredSessions&&(p.current=!0,i(e=>e??d[0].id))},[d]);let{data:m}=pg();return(0,q.useEffect)(()=>{if(!m?.terminal)return;let{rendererEngine:e,...t}=m.terminal;e&&f2(e)?x2.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),x2.applyConfig(t)},[m?.terminal]),(0,J.jsx)(S2,{value:(0,q.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 C2(){let e=(0,q.useContext)(S2);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}var lTe=`schema: spec-driven
|
|
1409
|
+
`}};customElements.define(`virtual-trackpad-tab`,Nwe);var Pwe=/^\/versions\/[^/]+(?:\/|$)/;function Fwe(e){return Pwe.test(e.pathname)&&new URLSearchParams(e.search).get(`session`)?.trim()||null}function U0(e,t=window.location){let n=Fwe(t);return n?`hosted-session:${n}:${e}`:e}var W0=1.5,G0=30,Iwe=50,K0=15;function q0(){return`ontouchstart`in window||navigator.maxTouchPoints>0}function J0(e){return e===`input`||e===`keys`||e===`shortcuts`||e===`trackpad`||e===`settings`}function Y0(e){return typeof e==`object`&&!!e}function X0(){try{let e=localStorage.getItem(U0(`xtermInputPanelState`));if(!e)return{};let t=JSON.parse(e);return Y0(t)?t:{}}catch{return{}}}function Lwe(e){try{localStorage.setItem(U0(`xtermInputPanelState`),JSON.stringify(e))}catch{}}function Rwe(e){let t=X0().sessions;if(!t)return null;let n=t[e];if(!Y0(n))return null;let r={activeTab:`input`,inputDraft:``};return J0(n.activeTab)&&(r.activeTab=n.activeTab),typeof n.inputDraft==`string`&&(r.inputDraft=n.inputDraft),r}function Z0(){let e=X0();return J0(e.lastActiveTab)?e.lastActiveTab:`input`}var Q0=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(LX(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=Rwe(this._stateKey);n?(this._panelSessionState=n,this._hasOwnPersistedState=!0):this._panelSessionState.activeTab=e._lastActiveTab||Z0()}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=X0(),n={...t.sessions,[this._stateKey]:{activeTab:this._panelSessionState.activeTab,inputDraft:this._panelSessionState.inputDraft}};Lwe({...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,q0()&&!this._isOpen&&this.open()};t.addEventListener(`focus`,n),this._persistentCleanups.push(()=>t.removeEventListener(`focus`,n)),q0()&&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=Z0();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;J0(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,q0()||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&&(q0()&&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=Fye(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*W0)),this._cursorPos.y=Math.max(0,Math.min(r.height,this._cursorPos.y+t*W0)),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<G0,r=this._cursorPos.y>t.height-G0;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<G0?t.top-K0:t.bottom+K0;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}))},Iwe)}_stopEdgeScroll(){this._edgeScrollTimer&&=(clearInterval(this._edgeScrollTimer),null)}_suppressKeyboard(){if(!q0())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)}},$0=`xtermInputPanelSettings`,zwe=50,Bwe=1e3,Vwe=1,Hwe=1,e2=`terminal-meta`;function t2(){return Nc(`terminal-input-history`,window.location)}function Uwe(){return Nc(`openspecui-terminal`,window.location)}function n2(){return Nc(`input-history`,window.location)}function r2(){return Nc(`terminal-input-history-fallback`,window.location)}function i2(e){return Math.max(Vwe,Math.min(Bwe,Math.round(e)))}function a2(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 o2(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,i2(t))}function s2(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 c2(){try{let e=localStorage.getItem($0);if(!e)return{};let t=JSON.parse(e);return typeof t!=`object`||!t?{}:t}catch{return{}}}function Wwe(e){let t=c2();try{localStorage.setItem($0,JSON.stringify({...t,...e}))}catch{}}async function l2(){return typeof window>`u`||!(`indexedDB`in window)?null:await new Promise(e=>{let t=window.indexedDB.open(Uwe(),Hwe);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(e2)||e.createObjectStore(e2)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)})}async function Gwe(){let e=await l2();return e?await new Promise(t=>{let n=e.transaction(e2,`readonly`),r=n.objectStore(e2).get(n2());r.onsuccess=()=>{t(a2(r.result))},r.onerror=()=>t([]),n.oncomplete=()=>e.close(),n.onerror=()=>e.close(),n.onabort=()=>e.close()}):null}async function Kwe(e){let t=await l2();return t?await new Promise(n=>{let r=t.transaction(e2,`readwrite`);r.objectStore(e2).put(e,n2()),r.oncomplete=()=>{t.close(),n(!0)},r.onerror=()=>{t.close(),n(!1)},r.onabort=()=>{t.close(),n(!1)}}):!1}function qwe(){try{let e=localStorage.getItem(r2());return e?a2(JSON.parse(e)):[]}catch{return[]}}function Jwe(e){try{localStorage.setItem(r2(),JSON.stringify(e))}catch{}}async function Ywe(){return await Gwe()||qwe()}async function u2(e){await Kwe(e)||Jwe(e)}var Xwe=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=c2().historyLimit;return typeof e==`number`&&Number.isFinite(e)?i2(e):zwe}async setLimit(e){let t=i2(e);Wwe({historyLimit:t}),await this.ensureInitialized();let n=o2(this.records,t);await this.commit(n,{persistRemote:!0})}async add(e){let t=e.trim();if(!t)return;await this.ensureInitialized();let n=o2([{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=o2(await Ywe(),this.getLimit()),this.emit(),!yc())try{let e=a2(await og.kv.get.query({key:t2()})),t=o2([...this.records,...e],this.getLimit());s2(this.records,t)||(this.records=t,await u2(this.records),this.emit()),s2(e,this.records)||this.persistRemote(this.records);let n=og.kv.subscribe.subscribe({key:t2()},{onData:e=>{this.onRemoteData(e)}});this.kvUnsubscribe=()=>n.unsubscribe()}catch{}}async onRemoteData(e){let t=a2(e),n=o2([...this.records,...t],this.getLimit());await this.commit(n,{persistRemote:!1})}async commit(e,t){s2(this.records,e)||(this.records=e,await u2(this.records),this.emit(),t.persistRemote&&!yc()&&this.persistRemote(this.records))}async persistRemote(e){try{await og.kv.set.mutate({key:t2(),value:e})}catch{}}emit(){for(let e of this.listeners)e(this.records)}},d2=[`xterm`,`ghostty`];function f2(e){return d2.includes(e)}var p2=`ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace`,Zwe={fontSize:13,fontFamily:``,cursorBlink:!0,cursorStyle:`block`,scrollback:1e3,rendererEngine:`xterm`},m2=1500,h2=1e3,Qwe=1e4,g2=`common`,$we=512*1024,eTe=8,tTe=32,_2=13,nTe=800,v2=[`JetBrains Mono`,`Fira Code`,`Source Code Pro`,`IBM Plex Mono`,`Inconsolata`,`Roboto Mono`,`Ubuntu Mono`,`Space Mono`],y2=new Set;function b2(e){try{return(new URL(e).pathname.split(`/`).pop()??``).replace(/\.[^.]+$/,``).replace(/[-_]/g,` `)||`CustomFont`}catch{return`CustomFont`}}async function rTe(e){let t=e.trim();if(!t)return``;if(!/^https?:\/\//i.test(t))return t;if(y2.has(t))return b2(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),y2.add(t),``}if(e.startsWith(`font/`)){let e=b2(t),n=document.createElement(`style`);return n.dataset.fontSrc=t,n.textContent=`@font-face { font-family: '${e}'; src: url('${t}'); }`,document.head.appendChild(n),y2.add(t),e}}catch{}return t}function iTe(e){let t=`google:${e}`;if(y2.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),y2.add(t)}var aTe=class{instances=new Map;listeners=new Set;idCounter=0;config={...Zwe};snapshotCache=null;inputHistoryStore=new Xwe;ghosttyModule=null;ghosttyInitPromise=null;ws=null;wsConnected=!1;reconnectTimer=null;reconnectDelay=h2;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:g2});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:p2,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 Zve(e),n=new mG;return t.loadAddon(n),t.loadAddon(new bG),{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 Q0({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>$we&&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||=Y(()=>import(`./ghostty-web-C70d-U4t.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(p2);return}let t=e.split(/[,]+/).map(e=>e.trim()).filter(Boolean),n=[];for(let e of t)if(v2.includes(e))iTe(e),n.push(e);else{let t=await rTe(e);t&&n.push(t)}n.push(p2),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,Y(async()=>{let{trpcClient:e}=await import(`./trpc-C7hf8_bp.js`);return{trpcClient:e}},[]).then(({trpcClient:e})=>{e.config.update.mutate({terminal:{fontSize:this.config.fontSize}})}).catch(()=>{})},nTe)}zoomFont(e){let t=Math.min(tTe,Math.max(eTe,this.config.fontSize+e));t!==this.config.fontSize&&(this.applyConfig({fontSize:t}),this.persistFontSize())}resetFontSize(){this.config.fontSize!==_2&&(this.applyConfig({fontSize:_2}),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()},m2))}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){Q0.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<m2,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(zc());this.ws=e,e.onopen=()=>{this.wsConnected=!0,this.reconnectDelay=h2;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=lG.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,Qwe)},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??g2}),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??g2,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=oTe(e.closeCallbackUrl,e.exitCode);t&&sTe(t)}wsSend(e){return this.ws?.readyState===WebSocket.OPEN?(this.ws.send(JSON.stringify(e)),!0):!1}};function oTe(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 sTe(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=Al.getAreaForPath(t.pathname);Al.push(n,e,null);return}window.open(t.toString(),`_blank`,`noopener,noreferrer`)}var x2=new aTe,S2=(0,q.createContext)(null);function cTe({children:e}){let t=yc(),n=(0,q.useSyncExternalStore)(e=>x2.subscribe(e),()=>x2.getSnapshot(),()=>x2.getSnapshot()),[r,i]=(0,q.useState)(null),a=(0,q.useCallback)(e=>{if(t)return``;let n=x2.createSession(e);return i(n),n},[t]),o=(0,q.useCallback)((e,n,r)=>{if(t)return``;let a=`${e} ${n.join(` `)}`.trim(),o=x2.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,q.useCallback)(e=>{x2.closeSession(e),i(t=>t===e?null:t)},[]),c=(0,q.useCallback)(e=>{i(e),x2.focusSession(e)},[]),l=(0,q.useCallback)((e,t)=>{},[]),u=(0,q.useCallback)((e,t)=>{x2.setCustomTitle(e,t)},[]),d=n.sessions,f=(0,q.useMemo)(()=>r&&d.some(e=>e.id===r)?r:d[d.length-1]?.id??null,[r,d]);(0,q.useEffect)(()=>{f&&x2.focusSession(f)},[f]);let p=(0,q.useRef)(!1);(0,q.useEffect)(()=>{p.current||d.length!==0&&x2.discoveredSessions&&(p.current=!0,i(e=>e??d[0].id))},[d]);let{data:m}=pg();return(0,q.useEffect)(()=>{if(!m?.terminal)return;let{rendererEngine:e,...t}=m.terminal;e&&f2(e)?x2.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),x2.applyConfig(t)},[m?.terminal]),(0,J.jsx)(S2,{value:(0,q.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 C2(){let e=(0,q.useContext)(S2);if(!e)throw Error(`useTerminalContext must be used within a TerminalProvider`);return e}var lTe=`schema: spec-driven
|
|
1410
1410
|
|
|
1411
1411
|
context: |
|
|
1412
1412
|
|
|
@@ -1427,7 +1427,7 @@ rules:
|
|
|
1427
1427
|
${e.right}px ${e.top}px,
|
|
1428
1428
|
${e.left}px ${e.top}px
|
|
1429
1429
|
)`}return(0,J.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function U7(e,t){e&&Object.assign(e.style,t)}var W7={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},mje={position:`fixed`},hje=q.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=pDe,..._}=e,{store:v,listRef:y,labelsRef:b,alignItemWithTriggerActiveRef:x,selectedItemTextRef:S,valuesRef:C,initialValueRef:w,popupRef:T,setValue:E}=_7(),D=v7(),O=y5(v,A7.open),k=y5(v,A7.mounted),A=y5(v,A7.modal),j=y5(v,A7.value),M=y5(v,A7.openMethod),N=y5(v,A7.positionerElement),P=y5(v,A7.triggerElement),F=y5(v,A7.isItemEqualToValue),I=y5(v,A7.transitionStatus),L=q.useRef(null),R=q.useRef(null),[z,B]=q.useState(h),ee=k&&z&&M!==`touch`;!k&&z!==h&&B(h),j4(()=>{k||(A7.scrollUpArrowVisible(v.state)&&v.set(`scrollUpArrowVisible`,!1),A7.scrollDownArrowVisible(v.state)&&v.set(`scrollDownArrowVisible`,!1))},[v,k]),q.useImperativeHandle(x,()=>ee),sje((ee||A)&&O&&M!==`touch`,P);let V=e7({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?mje:V.positionerStyles,U=q.useMemo(()=>{let e={};return O||(e.pointerEvents=`none`),{role:`presentation`,hidden:!k,style:{...H,...e}}},[O,k,H]),W={open:O,side:te,align:V.align,anchorHidden:V.anchorHidden},ne=E8(`div`,e,{ref:[t,K6(e=>{v.set(`positionerElement`,e)})],state:W,stateAttributesMapping:q5,props:[U,n7(I),_]}),re=q.useRef(0),ie=K6(e=>{if(e.size===0&&re.current===0||C.current.length===0)return;let t=re.current;if(re.current=e.size,e.size===t)return;let n=B6(N6);if(t!==0&&!v.state.multiple&&j!==null&&T7(C.current,j,F)===-1){let e=w.current,t=e!=null&&T7(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=>T7(C.current,e,F)!==-1,t=j.filter(t=>e(t));(t.length!==j.length||t.some(e=>!jAe(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:``};U7(N,e),U7(T.current,e)}}),ae=q.useMemo(()=>({...V,side:te,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:B,scrollUpArrowRef:L,scrollDownArrowRef:R}),[V,te,ee,B]);return(0,J.jsx)(lje,{elementsRef:y,labelsRef:b,onMapChange:ie,children:(0,J.jsxs)(V7.Provider,{value:ae,children:[k&&A&&(0,J.jsx)(pje,{inert:_Ae(!O),cutout:P}),ne]})})});function G7(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 K7=`base-ui-disable-scrollbar`,q7={className:K7,getElement(e){return(0,J.jsx)(`style`,{nonce:e,href:K7,precedence:`base-ui:low`,children:`.${K7}{scrollbar-width:none}.${K7}::-webkit-scrollbar{display:none}`})}},gje=q.createContext(void 0);function _je(e){let t=q.useContext(gje);if(t===void 0&&!e)throw Error(M4(69));return t}var J7=`ArrowUp`,Y7=`ArrowDown`,X7=`ArrowLeft`,Z7=`ArrowRight`,Q7=`Home`,vje=new Set([X7,Z7]),yje=new Set([J7,Y7]),bje=new Set([...vje,...yje]);new Set([...bje,Q7,`End`]);var xje=new Set([J7,Y7,X7,Z7,Q7,`End`]);function $7(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}var Sje=q.createContext(void 0),Cje={disableStyleElements:!1};function wje(){return q.useContext(Sje)??Cje}var e9=1,Tje={...q5,...T5},Eje=q.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}=_7(),{side:_,align:v,alignItemWithTriggerActive:y,setControlledAlignItemWithTrigger:b,scrollDownArrowRef:x,scrollUpArrowRef:S}=H7(),C=_je(!0)!=null,w=v7(),{nonce:T,disableStyleElements:E}=wje(),D=R4(),O=y5(o,A7.id),k=y5(o,A7.open),A=y5(o,A7.mounted),j=y5(o,A7.popupProps),M=y5(o,A7.transitionStatus),N=y5(o,A7.triggerElement),P=y5(o,A7.positionerElement),F=y5(o,A7.listElement),I=q.useRef(0),L=q.useRef(!1),R=q.useRef(0),z=q.useRef(!1),B=q.useRef({}),ee=X6(),V=K6(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=b6(P),a=getComputedStyle(P),o=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),l=t9(getComputedStyle(s.current)),u=Math.min(i.documentElement.clientHeight-o-c,l),d=e.scrollTop,f=n9(e),p=0,h=null,g=!1,_=!1,v=e=>{P.style.height=`${e}px`},b=(t,n)=>{let i=$7(t,0,u-r);i>0&&v(r+i),e.scrollTop=n,u-(r+i)<=e9&&(L.current=!0),m()};if(t){let e=f-d,t=r+e,n=Math.min(t,u);if(p=n,e<=e9){b(e,f);return}u-n>e9?_=!0:g=!0}else if(n){let e=d,t=r+e,n=Math.min(t,u),i=t-u;if(p=n,e<=e9){b(e,0);return}u-n>e9?h=0:(g=!0,d<f&&(h=d-(e-i)))}if(p=Math.ceil(p),p!==0&&v(p),_||h!=null){let t=n9(e),n=_?t:$7(h,0,t);Math.abs(e.scrollTop-n)>e9&&(e.scrollTop=n)}(g||p>=u-e9)&&(L.current=!0),m()});q.useImperativeHandle(h,()=>V,[V]),E5({open:k,ref:s,onComplete(){k&&c?.(!0)}});let te={open:k,transitionStatus:M,side:_,align:v};j4(()=>{!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]),j4(()=>{k||y||(z.current=!1,L.current=!1,I.current=0,R.current=0,U7(P,B.current))},[k,y,P,s]),j4(()=>{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=a9(e);e.style.removeProperty(`--transform-origin`);try{let t=getComputedStyle(P),n=getComputedStyle(e),r=b6(N),i=V4(P),a=Dje(N),o=r9(N.getBoundingClientRect(),a),s=r9(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=t9(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=r9(T.getBoundingClientRect(),a);E=r9(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=n9(f),H=M>=te-e9;H&&(A=Math.min(x,s.height)-(M-te));let U=o.top<20||o.bottom>x-20||Math.ceil(A)+e9<Math.min(p,v),W=(i.visualViewport?.scale??1)!==1&&u3;if(U||W){z.current=!0,U7(P,B.current),As.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=n9(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=$7(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]),q.useEffect(()=>{if(!y||!P||!k)return;let e=V4(P);function t(e){l(!1,B6(xDe,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&&xje.has(e.key)&&e.stopPropagation()},onMouseMove(){f.current=!1},onPointerLeave(e){if(!g||G7(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%`}:W7}},U=E8(`div`,e,{ref:[t,s],state:te,stateAttributesMapping:Tje,props:[j,H,n7(M),{className:!F&&y?q7.className:void 0},a]});return(0,J.jsxs)(q.Fragment,{children:[!E&&q7.getElement(T),(0,J.jsx)(iOe,{context:w,modal:!1,disabled:!A,returnFocus:i,restoreFocus:!0,children:U})]})});function t9(e){let t=e.maxHeight||``;return t.endsWith(`px`)&&parseFloat(t)||1/0}function n9(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function Dje(e){return r5.getScale(e)}function r9(e,t){return X3({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}var i9=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function a9(e){let{style:t}=e,n={};for(let[e,r]of i9)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of i9){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var Oje=q.forwardRef(function(e,t){let{className:n,render:r,...i}=e,{store:a,scrollHandlerRef:o}=_7(),{alignItemWithTriggerActive:s}=H7(),c=y5(a,A7.hasScrollArrows),l=y5(a,A7.openMethod),u=y5(a,A7.multiple),d={id:`${y5(a,A7.id)}-list`,role:`listbox`,"aria-multiselectable":u||void 0,onScroll(e){o.current?.(e.currentTarget)},...s&&{style:W7},className:c&&l!==`touch`?q7.className:void 0};return E8(`div`,e,{ref:[t,K6(e=>{a.set(`listElement`,e)})],props:[d,i]})}),o9=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function kje(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}=cje(),f=q.useRef(-1),[p,m]=q.useState(a??(i===o9.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=q.useRef(null),g=q.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 j4(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),j4(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),q.useMemo(()=>({ref:g,index:p}),[p,g])}var s9=q.createContext(void 0);function c9(){let e=q.useContext(s9);if(!e)throw Error(M4(57));return e}var Aje=q.memo(q.forwardRef(function(e,t){let{render:n,className:r,value:i=null,label:a,disabled:o=!1,nativeButton:s=!1,...c}=e,l=q.useRef(null),u=kje({label:a,textRef:l,indexGuessBehavior:o9.GuessFromOrder}),{store:d,getItemProps:f,setOpen:p,setValue:m,selectionRef:h,typingRef:g,valuesRef:_,keyboardActiveRef:v,multiple:y,highlightItemOnHover:b}=_7(),x=R4(),S=y5(d,A7.isActive,u.index),C=y5(d,A7.isSelected,u.index,i),w=y5(d,A7.isSelectedByFocus,u.index),T=y5(d,A7.isItemEqualToValue),E=u.index,D=E!==-1,O=q.useRef(null),k=W6(E);j4(()=>{if(!D)return;let e=_.current;return e[E]=i,()=>{delete e[E]}},[D,E,i,_]),j4(()=>{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&&w7(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=q.useRef(null),N=q.useRef(`mouse`),P=q.useRef(!1),{getButtonProps:F,buttonRef:I}=N7({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?MAe(n,i,T):[...n,i],B6(L6,e))}else m(i,B6(L6,e)),p(!1,B6(L6,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||G7(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=E8(`div`,e,{ref:[I,t,u.ref,O],state:A,props:[j,R,c,F]}),B=q.useMemo(()=>({selected:C,indexRef:k,textRef:l,selectedByFocus:w,hasRegistered:D}),[C,k,l,w,D]);return(0,J.jsx)(s9.Provider,{value:B,children:z})})),jje=q.forwardRef(function(e,t){let n=e.keepMounted??!1,{selected:r}=c9();return n||r?(0,J.jsx)(Mje,{...e,ref:t}):null}),Mje=q.memo(q.forwardRef((e,t)=>{let{render:n,className:r,keepMounted:i,...a}=e,{selected:o}=c9(),s=q.useRef(null),{transitionStatus:c,setMounted:l}=C5(o),u=E8(`span`,e,{ref:[t,s],state:{selected:o,transitionStatus:c},props:[{"aria-hidden":!0,children:`✔️`},a],stateAttributesMapping:T5});return E5({open:o,ref:s,onComplete(){o||l(!1)}}),u})),Nje=q.memo(q.forwardRef(function(e,t){let{indexRef:n,textRef:r,selectedByFocus:i,hasRegistered:a}=c9(),{selectedItemTextRef:o}=_7(),{className:s,render:c,...l}=e;return E8(`div`,e,{ref:[q.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 l9({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,J.jsxs)(VAe,{value:e,modal:f,onValueChange:e=>{e!==null&&n(e)},children:[(0,J.jsx)(XAe,{"aria-label":r,className:e=>w4(`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,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(QAe,{placeholder:i,className:`truncate`,children:()=>p?.label??i}),(0,J.jsx)($Ae,{className:`text-muted-foreground flex shrink-0`,children:(0,J.jsx)(s_,{className:`h-3.5 w-3.5`})})]})}),(0,J.jsx)(tje,{children:(0,J.jsx)(hje,{sideOffset:d,className:w4(`z-50 select-none outline-none`,u),children:(0,J.jsx)(Eje,{className:w4(`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,J.jsx)(Oje,{className:w4(`max-h-64 overflow-y-auto py-0.5`,c),children:t.map(e=>(0,J.jsxs)(Aje,{value:e.value,disabled:e.disabled,label:typeof e.label==`string`?e.label:void 0,className:e=>w4(`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,J.jsx)(jje,{className:`text-primary flex h-3.5 w-3.5 items-center justify-center`,children:(0,J.jsx)(o_,{className:`h-3.5 w-3.5`})}),(0,J.jsx)(Nje,{className:`whitespace-nowrap`,children:e.label})]},e.value))})})})})]})}function Pje(e){return e.type===`commit`?{type:`commit`,hash:e.hash}:{type:`uncommitted`}}function Fje(e){return e.type===`commit`?`/git/commit/${e.hash}`:`/git/uncommitted`}function u9(e){return Fje(Pje(e))}function Ije(e){let{handoff:t,location:n}=e,r=new URL(n.href);if(Mc({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 Lje(){return fg((0,q.useCallback)(e=>og.dashboard.subscribe.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),yee,[],`dashboard.subscribe`)}function Rje(){return{running:!1,inFlight:0,lastStartedAt:null,lastFinishedAt:null,lastReason:null,lastError:null}}function d9(){return fg((0,q.useCallback)(e=>og.dashboard.subscribeGitTaskStatus.subscribe(void 0,{onData:e.onData,onError:e.onError}),[]),async()=>Rje(),[],`dashboard.subscribeGitTaskStatus`)}async function f9(e){yc()||await og.dashboard.refreshGitSnapshot.mutate({reason:e})}async function p9(e){yc()||await og.dashboard.removeDetachedWorktree.mutate({path:e})}var zje=[`proposal`,`design`,`specs`,`tasks`],Bje=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function Vje(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function Hje(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 Uje(){return{specifications:`monotonic`,requirements:`monotonic`,activeChanges:`bidirectional`,inProgressChanges:`bidirectional`,completedChanges:`monotonic`,taskCompletionPercent:`bidirectional`}}function Wje(e){return e?e.split(/[-_]/g).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):`Unknown`}function Gje(e,t){if(e!==`spec-driven`)return t;let n=new Map;for(let[e,t]of zje.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 Kje(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=Gje(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:Wje(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 qje(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)|0;return Math.abs(t)%360}function Jje(e){let t=qje(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 Yje(){let e=yc(),{data:t,isLoading:n,error:r}=Lje(),{data:i}=d9(),{data:a}=gg(),{data:o}=hg(),[s,c]=(0,q.useState)(()=>I2()),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(()=>Date.now()),[p,m]=(0,q.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[h,g]=(0,q.useState)(null),_=(0,q.useCallback)(()=>{Qg.activatePop(`/opsx-propose`)},[]),v=(0,q.useCallback)(()=>{Qg.activatePop(`/opsx-new`)},[]),y=(0,q.useCallback)(async e=>f9(e),[]),b=(0,q.useRef)(0),[x,S]=(0,q.useState)(null),C=(0,q.useRef)(null),w=(0,q.useRef)(i),T=(0,q.useRef)(h),E=h?.reason??null,D=(0,q.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),O=(0,q.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,q.useCallback)(()=>{D();let t=R2(s),n=s===`none`?null:z2(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,q.useCallback)(()=>{D(),u(null),f(Date.now()),O(`manual-button`)},[D,O]),j=(0,q.useCallback)(async e=>{if(!(yc()||e.isCurrent||!e.detached||a7(e.path))&&window.confirm([`Remove detached worktree?`,``,e.path,``,`This runs git worktree remove --force.`].join(`
|
|
1430
|
-
`))){S(e.path);try{await p9(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,q.useEffect)(()=>{T.current=h},[h]),(0,q.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,q.useEffect)(()=>{w.current=i},[i]),(0,q.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,q.useEffect)(()=>{e||L2(s)},[s,e]),(0,q.useEffect)(()=>{if(!e)return k(),()=>{D()}},[D,k,e]),(0,q.useEffect)(()=>{let t=R2(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,q.useMemo)(()=>new Set(M.map(e=>e.id)),[M]),P=(0,q.useMemo)(()=>(a??[]).filter(e=>N.has(e.changeName)),[a,N]),F=(0,q.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,q.useMemo)(()=>new Set(M.filter(e=>e.progress.total===0||e.progress.completed>=e.progress.total).map(e=>e.id)),[M]),L=(0,q.useMemo)(()=>Kje(P,F,I),[P,I,F]),R=(0,q.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,J.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading dashboard...`});if(r)return(0,J.jsxs)(`div`,{className:`text-destructive flex items-center gap-2`,children:[(0,J.jsx)(l_,{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??Hje(z.taskCompletionPercent),ee=t?.trendKinds??Uje(),V=t?.git??{defaultBranch:`main`,worktrees:[]},te=!e||V.worktrees.some(e=>e.entries.length>0),H=M.length>0,U=V.worktrees.find(e=>e.isCurrent)??null,W=V.worktrees.filter(e=>!e.isCurrent),ne=R2(s),re=h===null?V2(l,ne,d):0,ie=ne!==null&&h===null,ae=h!==null&&Vje(E),oe=h!==null;return(0,J.jsxs)(`div`,{className:`min-w-0 space-y-6 p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,J.jsx)(R_,{className:`h-6 w-6 shrink-0`}),`Dashboard`]}),(0,J.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,J.jsx)(Z_,{className:`h-4 w-4`}),`Start (/opsx:propose)`]})]}),(0,J.jsxs)(`section`,{className:`space-y-2`,children:[(0,J.jsx)(`h2`,{className:`text-sm font-medium`,children:`Historical Trends`}),(0,J.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,J.jsx)(P2,{label:`Specifications / Requirements`,value:`${z.specifications} / ${z.requirements}`,icon:S_,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,J.jsx)(P2,{label:`Archived Changes / Completed Tasks`,value:`${z.completedChanges} / ${z.archivedTasksCompleted}`,icon:t_,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,J.jsxs)(`div`,{className:`grid min-w-0 gap-3 ${te?`xl:grid-cols-2`:`xl:grid-cols-1`}`,children:[(0,J.jsxs)(`section`,{className:`@container min-w-0 space-y-2`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Workflow Progress`}),(0,J.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,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No workflow status available.`}):(0,J.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-2`,children:L.map(e=>(0,J.jsxs)(`section`,{className:`border-border/70 bg-card min-w-0 rounded-md border p-2`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,J.jsx)(`div`,{className:`min-w-0`,children:(0,J.jsx)(`h3`,{className:`text-xs font-semibold`,children:e.schemaName})}),e.readyToArchive>0?(0,J.jsxs)(`span`,{className:`text-muted-foreground rounded border px-1 py-0.5 text-[10px]`,children:[`archive-ready `,e.readyToArchive]}):null]}),(0,J.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,J.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=Jje(t.id);return(0,J.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,J.jsx)(i_,{className:`pointer-events-none absolute right-[10%] top-1/2 h-12 w-12 -translate-y-1/2`,style:{color:n.arrow}}),(0,J.jsx)(`div`,{className:`relative mb-0.5 pr-6 text-xs font-semibold`,children:t.label}),(0,J.jsxs)(`div`,{className:`relative space-y-0 text-[10px]`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Draft`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.draft})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Ready`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.ready})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Blocked`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.blocked})]})]})]},`${e.schemaName}:${t.id}`)})})]},e.schemaName))})]}),te?(0,J.jsxs)(`section`,{className:`min-w-0 space-y-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Git Snapshot`}),(0,J.jsxs)(`p`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),e?null:(0,J.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,J.jsx)(l9,{value:s,options:Bje,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,J.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),ie?(0,J.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${re*100}%`}}):null,(0,J.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,J.jsx)(o7,{preset:e?.value??s})})]})}),(0,J.jsxs)(`button`,{type:`button`,onClick:A,disabled:oe,className:`inline-flex h-7 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${ae?`text-primary bg-primary/10`:`text-foreground/75 hover:text-foreground`}`,children:[(0,J.jsx)(W_,{className:`h-3.5 w-3.5 ${ae?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,J.jsxs)(`div`,{className:`border-border/80 bg-card min-w-0 rounded-lg border p-3`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:[(0,J.jsx)(M_,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),U?(0,J.jsxs)(`div`,{className:`space-y-0`,children:[(0,J.jsx)(d7,{worktree:U,emphasize:!0,removing:x===U.path,onRemoveDetachedWorktree:j}),(0,J.jsx)(`div`,{className:`-mt-px space-y-1 border-l pl-3 pt-2 ${xAe}`,children:DTe(U.entries).map(t=>(0,J.jsx)(u7,{entry:t,onSelect:e?void 0:(e,t)=>{Qg.push(`bottom`,u9(e),Ug(void 0,l7(e)),{source:t,sharedElements:c7(e)})}},t.type===`commit`?t.hash:`${t.type}:${t.updatedAt??`none`}`))})]}):(0,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-2 text-xs`,children:`No worktree snapshot available.`}),W.length>0&&(0,J.jsxs)(`div`,{className:`border-border/70 mt-3 space-y-1 border-t pt-2`,children:[(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs uppercase tracking-wide`,children:`Other Worktrees`}),W.map(e=>(0,J.jsx)(d7,{worktree:e,emphasize:!1,removing:x===e.path,onRemoveDetachedWorktree:j},e.path))]})]})]}):null]}),(0,J.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-2`,children:[(0,J.jsxs)(`section`,{className:`border-border flex min-w-0 flex-col rounded-t-lg border`,children:[(0,J.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Active Changes`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[z.activeChanges,` active`]})]}),(0,J.jsxs)(`div`,{className:`bg-card divide-border flex min-w-0 flex-1 flex-col 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??RH(r.artifacts.map(e=>e.status)):RH(r?.artifacts.map(e=>e.status)??[]),c=LH({hasStatus:!!r,isComplete:r?.isComplete??!1,tasksComplete:t.total===0||t.completed>=t.total,trackedArtifactStatus:s});return(0,J.jsxs)(Yg,{to:`/changes/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`changes`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:{family:`changes`,entityId:e.id}},...Vg({family:`changes`,entityId:e.id},`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex min-w-0 flex-wrap items-start justify-between gap-3 sm:flex-nowrap sm:items-center`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{...Vg({family:`changes`,entityId:e.id},`title`),className:`truncate font-medium`,children:e.name}),(0,J.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.updatedAt>0&&(0,J.jsxs)(J.Fragment,{children:[Mv(e.updatedAt),` · `]}),e.id]})]}),(0,J.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,J.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[11px] font-medium ${c.toneClass}`,children:c.label}),(0,J.jsxs)(`div`,{className:`font-medium`,children:[t.completed,`/`,t.total]}),(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`tasks`})]})]}),(0,J.jsx)(`div`,{className:`bg-muted h-1.5 rounded-full`,children:(0,J.jsx)(`div`,{className:`bg-primary h-full rounded-full transition-all`,style:{width:`${n}%`}})}),(0,J.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex min-w-0 flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,J.jsxs)(`span`,{className:`shrink-0`,children:[n,`% task completion`]}),r?(0,J.jsxs)(`span`,{className:`min-w-0 truncate text-right`,children:[i,`/`,a,` artifacts · `,r.schemaName]}):(0,J.jsx)(`span`,{children:`Artifacts status unavailable`})]})]},e.id)}),!H&&(0,J.jsxs)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:[(0,J.jsx)(`div`,{children:`No active changes.`}),(0,J.jsx)(`div`,{className:`mt-1 text-xs`,children:`Recommended workflow start: /opsx:propose`}),(0,J.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,J.jsx)(Z_,{className:`h-3.5 w-3.5`}),`Open /opsx:new form`]})]})]})]}),(0,J.jsxs)(`section`,{className:`border-border min-w-0 rounded-t-lg border`,children:[(0,J.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,J.jsx)(`h2`,{className:`shrink-0 font-medium`,children:`Specifications`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[z.specifications,` specs · `,z.requirements,` requirements`]})]}),(0,J.jsxs)(`div`,{className:`bg-card divide-border min-w-0 divide-y`,children:[t?.specifications.map(e=>{let t={family:`specs`,entityId:e.id};return(0,J.jsx)(Yg,{to:`/specs/$specId`,params:{specId:e.id},state:t=>({...t,__vtHandoff:{family:`specs`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...Vg(t,`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-between gap-3 sm:flex-nowrap`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{...Vg(t,`title`),className:`truncate font-medium`,children:e.name}),(0,J.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.id,e.updatedAt>0&&(0,J.jsxs)(J.Fragment,{children:[` · `,Mv(e.updatedAt)]})]})]}),(0,J.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,J.jsx)(`div`,{className:`font-medium`,children:e.requirements}),(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`requirements`})]})]})},e.id)}),t?.specifications.length===0&&(0,J.jsx)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:`No specifications found.`})]})]})]})]})}var Xje=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function Zje(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function Qje(){let e=yc(),t=ci(),{data:n}=d9(),r=wi({queryKey:[`git`,`overview`],queryFn:()=>og.git.overview.query(),enabled:!e,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),i=Oi({queryKey:[`git`,`entries`],initialPageParam:void 0,queryFn:({pageParam:e})=>og.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,q.useState)(()=>I2()),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(()=>Date.now()),[d,f]=(0,q.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(null),y=(0,q.useRef)(null),b=Di({mutationFn:e=>og.git.switchWorktree.mutate({path:e})}),x=(0,q.useMemo)(()=>i.data?.pages.flatMap(e=>e.items)??[],[i.data]),S=(0,q.useRef)(0),C=(0,q.useRef)(null),w=(0,q.useRef)(p),T=(0,q.useRef)(!1),E=p!==null||n?.running===!0||b.isPending,D=p?.reason??n?.lastReason??null,O=(0,q.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),k=(0,q.useCallback)(e=>{let t=Date.now();m({reason:e,requestedAt:t}),f9(e).catch(n=>{console.error(`[GitRoute] Failed to refresh git data:`,n),m(n=>n?.reason===e&&n.requestedAt===t?null:n)})},[]),A=(0,q.useCallback)(()=>{O();let t=R2(a),n=a===`none`?null:z2(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,q.useCallback)(()=>{E||(O(),c(null),u(Date.now()),k(`manual-button`))},[O,E,k]),M=(0,q.useCallback)(async t=>{if(!(e||t.isCurrent||!t.detached)&&window.confirm([`Remove detached worktree?`,``,t.path,``,`This runs git worktree remove --force.`].join(`
|
|
1430
|
+
`))){S(e.path);try{await p9(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,q.useEffect)(()=>{T.current=h},[h]),(0,q.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,q.useEffect)(()=>{w.current=i},[i]),(0,q.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,q.useEffect)(()=>{e||L2(s)},[s,e]),(0,q.useEffect)(()=>{if(!e)return k(),()=>{D()}},[D,k,e]),(0,q.useEffect)(()=>{let t=R2(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,q.useMemo)(()=>new Set(M.map(e=>e.id)),[M]),P=(0,q.useMemo)(()=>(a??[]).filter(e=>N.has(e.changeName)),[a,N]),F=(0,q.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,q.useMemo)(()=>new Set(M.filter(e=>e.progress.total===0||e.progress.completed>=e.progress.total).map(e=>e.id)),[M]),L=(0,q.useMemo)(()=>Kje(P,F,I),[P,I,F]),R=(0,q.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,J.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading dashboard...`});if(r)return(0,J.jsxs)(`div`,{className:`text-destructive flex items-center gap-2`,children:[(0,J.jsx)(l_,{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??Hje(z.taskCompletionPercent),ee=t?.trendKinds??Uje(),V=t?.git??{defaultBranch:`main`,worktrees:[]},te=!e||V.worktrees.some(e=>e.entries.length>0),H=M.length>0,U=V.worktrees.find(e=>e.isCurrent)??null,W=V.worktrees.filter(e=>!e.isCurrent),ne=R2(s),re=h===null?V2(l,ne,d):0,ie=ne!==null&&h===null,ae=h!==null&&Vje(E),oe=h!==null;return(0,J.jsxs)(`div`,{className:`min-w-0 space-y-6 p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,J.jsx)(R_,{className:`h-6 w-6 shrink-0`}),`Dashboard`]}),(0,J.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,J.jsx)(Z_,{className:`h-4 w-4`}),`Start (/opsx:propose)`]})]}),(0,J.jsxs)(`section`,{className:`space-y-2`,children:[(0,J.jsx)(`h2`,{className:`text-sm font-medium`,children:`Historical Trends`}),(0,J.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[(0,J.jsx)(P2,{label:`Specifications / Requirements`,value:`${z.specifications} / ${z.requirements}`,icon:S_,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,J.jsx)(P2,{label:`Archived Changes / Completed Tasks`,value:`${z.completedChanges} / ${z.archivedTasksCompleted}`,icon:t_,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,J.jsxs)(`div`,{className:`grid min-w-0 gap-3 ${te?`xl:grid-cols-2`:`xl:grid-cols-1`}`,children:[(0,J.jsxs)(`section`,{className:`@container min-w-0 space-y-2`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Workflow Progress`}),(0,J.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,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`No workflow status available.`}):(0,J.jsx)(`div`,{className:`grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,18rem),1fr))] gap-2`,children:L.map(e=>(0,J.jsxs)(`section`,{className:`border-border/70 bg-card min-w-0 rounded-md border p-2`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-2`,children:[(0,J.jsx)(`div`,{className:`min-w-0`,children:(0,J.jsx)(`h3`,{className:`text-xs font-semibold`,children:e.schemaName})}),e.readyToArchive>0?(0,J.jsxs)(`span`,{className:`text-muted-foreground rounded border px-1 py-0.5 text-[10px]`,children:[`archive-ready `,e.readyToArchive]}):null]}),(0,J.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,J.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=Jje(t.id);return(0,J.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,J.jsx)(i_,{className:`pointer-events-none absolute right-[10%] top-1/2 h-12 w-12 -translate-y-1/2`,style:{color:n.arrow}}),(0,J.jsx)(`div`,{className:`relative mb-0.5 pr-6 text-xs font-semibold`,children:t.label}),(0,J.jsxs)(`div`,{className:`relative space-y-0 text-[10px]`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Draft`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.draft})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Ready`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.ready})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-current/75`,children:`Blocked`}),(0,J.jsx)(`span`,{className:`font-mono`,children:t.blocked})]})]})]},`${e.schemaName}:${t.id}`)})})]},e.schemaName))})]}),te?(0,J.jsxs)(`section`,{className:`min-w-0 space-y-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Git Snapshot`}),(0,J.jsxs)(`p`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),e?null:(0,J.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,J.jsx)(l9,{value:s,options:Bje,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,J.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),ie?(0,J.jsx)(`span`,{className:`bg-primary/30 dark:bg-primary/35 pointer-events-none absolute inset-y-0 left-0 transition-[width]`,style:{width:`${re*100}%`}}):null,(0,J.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,J.jsx)(o7,{preset:e?.value??s})})]})}),(0,J.jsxs)(`button`,{type:`button`,onClick:A,disabled:oe,className:`inline-flex h-7 items-center gap-1 px-2 py-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-70 ${ae?`text-primary bg-primary/10`:`text-foreground/75 hover:text-foreground`}`,children:[(0,J.jsx)(W_,{className:`h-3.5 w-3.5 ${ae?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,J.jsxs)(`div`,{className:`border-border/80 bg-card min-w-0 rounded-lg border p-3`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex items-center gap-1.5`,children:[(0,J.jsx)(M_,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground truncate text-xs`,children:[`Default branch: `,V.defaultBranch]})]}),U?(0,J.jsxs)(`div`,{className:`space-y-0`,children:[(0,J.jsx)(d7,{worktree:U,emphasize:!0,removing:x===U.path,onRemoveDetachedWorktree:j}),(0,J.jsx)(`div`,{className:`-mt-px space-y-1 border-l pl-3 pt-2 ${xAe}`,children:DTe(U.entries).map(t=>(0,J.jsx)(u7,{entry:t,onSelect:e?void 0:(e,t)=>{Qg.push(`bottom`,u9(e),Ug(void 0,l7(e)),{source:t,sharedElements:c7(e)})}},t.type===`commit`?t.hash:`${t.type}:${t.updatedAt??`none`}`))})]}):(0,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-2 text-xs`,children:`No worktree snapshot available.`}),W.length>0&&(0,J.jsxs)(`div`,{className:`border-border/70 mt-3 space-y-1 border-t pt-2`,children:[(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs uppercase tracking-wide`,children:`Other Worktrees`}),W.map(e=>(0,J.jsx)(d7,{worktree:e,emphasize:!1,removing:x===e.path,onRemoveDetachedWorktree:j},e.path))]})]})]}):null]}),(0,J.jsxs)(`div`,{className:`grid gap-3 xl:grid-cols-2`,children:[(0,J.jsxs)(`section`,{className:`border-border flex min-w-0 flex-col rounded-t-lg border`,children:[(0,J.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Active Changes`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[z.activeChanges,` active`]})]}),(0,J.jsxs)(`div`,{className:`bg-card divide-border flex min-w-0 flex-1 flex-col 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??RH(r.artifacts.map(e=>e.status)):RH(r?.artifacts.map(e=>e.status)??[]),c=LH({hasStatus:!!r,isComplete:r?.isComplete??!1,tasksComplete:t.total===0||t.completed>=t.total,trackedArtifactStatus:s});return(0,J.jsxs)(Yg,{to:`/changes/$changeId`,params:{changeId:e.id},state:t=>({...t,__vtHandoff:{family:`changes`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:{family:`changes`,entityId:e.id}},...Vg({family:`changes`,entityId:e.id},`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:[(0,J.jsxs)(`div`,{className:`mb-2 flex min-w-0 flex-wrap items-start justify-between gap-3 sm:flex-nowrap sm:items-center`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{...Vg({family:`changes`,entityId:e.id},`title`),className:`truncate font-medium`,children:e.name}),(0,J.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.updatedAt>0&&(0,J.jsxs)(J.Fragment,{children:[Mv(e.updatedAt),` · `]}),e.id]})]}),(0,J.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,J.jsx)(`span`,{className:`rounded border px-1.5 py-0.5 text-[11px] font-medium ${c.toneClass}`,children:c.label}),(0,J.jsxs)(`div`,{className:`font-medium`,children:[t.completed,`/`,t.total]}),(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`tasks`})]})]}),(0,J.jsx)(`div`,{className:`bg-muted h-1.5 rounded-full`,children:(0,J.jsx)(`div`,{className:`bg-primary h-full rounded-full transition-all`,style:{width:`${n}%`}})}),(0,J.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex min-w-0 flex-wrap items-center justify-between gap-2 text-xs`,children:[(0,J.jsxs)(`span`,{className:`shrink-0`,children:[n,`% task completion`]}),r?(0,J.jsxs)(`span`,{className:`min-w-0 truncate text-right`,children:[i,`/`,a,` artifacts · `,r.schemaName]}):(0,J.jsx)(`span`,{children:`Artifacts status unavailable`})]})]},e.id)}),!H&&(0,J.jsxs)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:[(0,J.jsx)(`div`,{children:`No active changes.`}),(0,J.jsx)(`div`,{className:`mt-1 text-xs`,children:`Recommended workflow start: /opsx:propose`}),(0,J.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,J.jsx)(Z_,{className:`h-3.5 w-3.5`}),`Open /opsx:new form`]})]})]})]}),(0,J.jsxs)(`section`,{className:`border-border min-w-0 rounded-t-lg border`,children:[(0,J.jsxs)(`div`,{className:`border-border flex min-w-0 flex-wrap items-center justify-between gap-1.5 border-b px-4 py-3`,children:[(0,J.jsx)(`h2`,{className:`shrink-0 font-medium`,children:`Specifications`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground text-xs sm:text-sm`,children:[z.specifications,` specs · `,z.requirements,` requirements`]})]}),(0,J.jsxs)(`div`,{className:`bg-card divide-border min-w-0 divide-y`,children:[t?.specifications.map(e=>{let t={family:`specs`,entityId:e.id};return(0,J.jsx)(Yg,{to:`/specs/$specId`,params:{specId:e.id},state:t=>({...t,__vtHandoff:{family:`specs`,entityId:e.id,title:e.name,subtitle:e.id}}),vt:{sharedElements:t},...Vg(t,`container`),className:`hover:bg-muted/50 block min-w-0 px-4 py-3`,children:(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center justify-between gap-3 sm:flex-nowrap`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsx)(`div`,{...Vg(t,`title`),className:`truncate font-medium`,children:e.name}),(0,J.jsxs)(`div`,{className:`text-muted-foreground truncate text-xs`,children:[e.updatedAt>0&&(0,J.jsxs)(J.Fragment,{children:[Mv(e.updatedAt),` · `]}),e.id]})]}),(0,J.jsxs)(`div`,{className:`shrink-0 text-right text-sm`,children:[(0,J.jsx)(`div`,{className:`font-medium`,children:e.requirements}),(0,J.jsx)(`div`,{className:`text-muted-foreground text-xs`,children:`requirements`})]})]})},e.id)}),t?.specifications.length===0&&(0,J.jsx)(`div`,{className:`text-muted-foreground px-4 py-6 text-center text-sm`,children:`No specifications found.`})]})]})]})]})}var Xje=[{value:`30s`,label:`30s`},{value:`5min`,label:`5min`},{value:`30min`,label:`30min`},{value:`none`,label:`none`}];function Zje(e){return e===`manual-button`||e?.startsWith(`auto-refresh:`)===!0}function Qje(){let e=yc(),t=ci(),{data:n}=d9(),r=wi({queryKey:[`git`,`overview`],queryFn:()=>og.git.overview.query(),enabled:!e,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),i=Oi({queryKey:[`git`,`entries`],initialPageParam:void 0,queryFn:({pageParam:e})=>og.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,q.useState)(()=>I2()),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(()=>Date.now()),[d,f]=(0,q.useState)(()=>typeof document>`u`?!0:document.visibilityState===`visible`),[p,m]=(0,q.useState)(null),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(null),y=(0,q.useRef)(null),b=Di({mutationFn:e=>og.git.switchWorktree.mutate({path:e})}),x=(0,q.useMemo)(()=>i.data?.pages.flatMap(e=>e.items)??[],[i.data]),S=(0,q.useRef)(0),C=(0,q.useRef)(null),w=(0,q.useRef)(p),T=(0,q.useRef)(!1),E=p!==null||n?.running===!0||b.isPending,D=p?.reason??n?.lastReason??null,O=(0,q.useCallback)(()=>{C.current!==null&&(window.clearTimeout(C.current),C.current=null)},[]),k=(0,q.useCallback)(e=>{let t=Date.now();m({reason:e,requestedAt:t}),f9(e).catch(n=>{console.error(`[GitRoute] Failed to refresh git data:`,n),m(n=>n?.reason===e&&n.requestedAt===t?null:n)})},[]),A=(0,q.useCallback)(()=>{O();let t=R2(a),n=a===`none`?null:z2(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,q.useCallback)(()=>{E||(O(),c(null),u(Date.now()),k(`manual-button`))},[O,E,k]),M=(0,q.useCallback)(async t=>{if(!(e||t.isCurrent||!t.detached)&&window.confirm([`Remove detached worktree?`,``,t.path,``,`This runs git worktree remove --force.`].join(`
|
|
1431
1431
|
`))){g(t.path);try{await p9(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,q.useCallback)(async e=>{v(e.path);try{let t=await b.mutateAsync(e.path);window.location.assign(Ije({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,q.useEffect)(()=>{w.current=p},[p]),(0,q.useEffect)(()=>{T.current=E},[E]),(0,q.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,q.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,q.useEffect)(()=>{e||n?.lastFinishedAt&&u(Date.now())},[n?.lastFinishedAt,e]),(0,q.useEffect)(()=>{e||L2(a)},[a,e]),(0,q.useEffect)(()=>{if(!e)return A(),()=>{O()}},[O,A,e]),(0,q.useEffect)(()=>{let t=R2(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,q.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=R2(a),R=E||L===null?0:V2(s,L,l),z=E&&Zje(D);return e?(0,J.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 p-4 text-sm`,children:[(0,J.jsx)(l_,{className:`h-4 w-4 shrink-0`}),`Git panel is only available in live mode.`]}):r.isLoading&&!P?(0,J.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading git panel...`}):r.error&&!P?(0,J.jsxs)(`div`,{className:`text-destructive flex items-center gap-2 p-4`,children:[(0,J.jsx)(l_,{className:`h-5 w-5 shrink-0`}),`Error loading git panel: `,r.error.message]}):(0,J.jsxs)(`div`,{className:`min-w-0 space-y-4 p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsxs)(`h1`,{className:`font-nav flex items-center gap-2 text-2xl font-bold`,children:[(0,J.jsx)(b_,{className:`h-6 w-6 shrink-0`}),`Git`]}),(0,J.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Commit history for the current worktree plus live handoff to sibling worktrees.`})]}),(0,J.jsxs)(`div`,{className:`border-border bg-card inline-flex overflow-hidden rounded-md border`,children:[(0,J.jsx)(l9,{value:a,options:Xje,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,J.jsxs)(`span`,{className:`relative inline-flex h-full w-full items-center justify-center overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`bg-muted/20 pointer-events-none absolute inset-0`}),L!==null&&!E?(0,J.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,J.jsx)(`span`,{className:`relative z-10 inline-flex items-center justify-center`,children:(0,J.jsx)(o7,{preset:e?.value??a})})]})}),(0,J.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,J.jsx)(W_,{className:`h-3.5 w-3.5 ${z?`animate-spin`:``}`}),`Refresh`]})]})]}),(0,J.jsxs)(`section`,{className:`bg-card space-y-3 rounded-lg border border-zinc-500/20 p-3`,children:[(0,J.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,J.jsx)(M_,{className:`h-4 w-4 shrink-0`}),(0,J.jsxs)(`span`,{className:`truncate`,children:[F?.branchName??`(no worktree)`,` against`,` `,P?.defaultBranch??`main`]})]}),(0,J.jsx)(`div`,{className:`text-muted-foreground truncate text-xs`,children:`Current worktree summary and branch delta.`})]})}),F?(0,J.jsx)(d7,{worktree:F,emphasize:!0,removing:h===F.path,onRemoveDetachedWorktree:M}):(0,J.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,J.jsxs)(`section`,{className:`min-w-0 space-y-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsx)(`h2`,{className:`font-medium`,children:`Commits`}),(0,J.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[x.length,` loaded`]})]}),(0,J.jsxs)(`div`,{className:`space-y-1`,children:[x.map(e=>(0,J.jsx)(u7,{entry:e,onSelect:(e,t)=>{Qg.push(`bottom`,u9(e),Ug(void 0,l7(e)),{source:t,sharedElements:c7(e)})}},e.type===`commit`?e.hash:`uncommitted:${e.updatedAt??`0`}`)),i.error?(0,J.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,J.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,J.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,J.jsxs)(`section`,{className:`space-y-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(r_,{className:`h-4 w-4 shrink-0`}),(0,J.jsx)(`h2`,{className:`font-medium`,children:`Other Worktrees`})]}),(0,J.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:I.map(e=>(0,J.jsxs)(`div`,{className:`space-y-2`,children:[(0,J.jsx)(d7,{worktree:e,emphasize:!1,removing:h===e.path,onRemoveDetachedWorktree:M}),(0,J.jsx)(`div`,{className:`flex justify-end`,children:e.pathAvailable?(0,J.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,J.jsx)(r_,{className:`h-3.5 w-3.5`}),_===e.path?`Switching…`:`Switch worktree`]}):(0,J.jsx)(`span`,{className:`text-muted-foreground rounded-md border border-dashed px-2.5 py-1 text-[11px]`,children:`Path missing`})})]},e.path))})]}):null]})}var m9=class extends q.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?.(e,t)}render(){if(!this.state.error)return this.props.children;let{fallback:e}=this.props;return typeof e==`function`?e(this.state.error):e}};function $je(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e.entries())if(t.get(n)!==r)return!1;return!0}function eMe(e){return Array.from({length:e+1},(t,n)=>n/e)}function h9(e){return e===`ArrowDown`||e===`ArrowUp`||e===`PageDown`||e===`PageUp`||e===`Home`||e===`End`||e===` `}function tMe(e){return e===`auto`||e===`scroll`||e===`overlay`}function g9(e,t={}){let{allowNonScrollable:n=!1}=t,r=e?.parentElement??null;for(;r;){if(tMe(window.getComputedStyle(r).overflowY)&&(n||r.scrollHeight>r.clientHeight))return r;r=r.parentElement}return null}function nMe(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 rMe(e){if(e){let t=e.getBoundingClientRect();return{top:t.top,bottom:t.bottom}}return{top:0,bottom:window.innerHeight}}function iMe(e,t=g9(e,{allowNonScrollable:!0})){if(typeof window>`u`||!e)return null;let n=e.getBoundingClientRect(),r=rMe(t);return Math.max(Math.floor(r.bottom-Math.max(n.top,r.top)),0)}function aMe({target:e,enabled:t=!0}){let[n,r]=(0,q.useState)(null);return(0,q.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=g9(e,{allowNonScrollable:!0});s(t),o(iMe(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 oMe(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 _9({ids:e,root:t=null,rootMargin:n,threshold:r,onBecomeVisible:i}){let a=(0,q.useRef)(new Map),o=(0,q.useRef)(new Map),s=(0,q.useRef)(null),c=(0,q.useRef)(new Map),[l,u]=(0,q.useState)(()=>new Map),d=(0,q.useRef)(i);d.current=i;let f=(0,q.useMemo)(()=>JSON.stringify(r??[0]),[r]),p=(0,q.useCallback)(e=>{$je(c.current,e)||(c.current=e,u(new Map(e)))},[]);return(0,q.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,q.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,q.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 sMe=/^[A-Za-z]:\/$/;function v9(e){let t=e.replace(/\\/g,`/`);return t===`/`||sMe.test(t)?t:t.replace(/\/+$/g,``)}function y9(e){return v9(e).split(`/`).filter(Boolean)}function cMe(e){let[t,...n]=e.map(e=>y9(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 b9(e){return[...e].sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`directory`?-1:1)}function x9(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 lMe(e,t){return{kind:`file`,key:e.fileId,name:t,diff:e.diff,file:e}}function uMe(e,t){return{kind:`directory`,key:e,name:t,diff:{state:`unavailable`,files:0},children:[]}}function S9(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,lMe(t,a));return}let s=e.get(o),c=s?.kind===`directory`?s:uMe(o,a);e.set(o,c);let l=new Map(c.children.map(e=>[e.key,e]));S9(l,t,n,r+1,o),c.children=[...l.values()]}function C9(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=b9(t.children.map(e=>e.kind===`directory`?C9(e):e));return{...t,name:n.join(`/`),diff:x9(r.map(e=>e.diff)),children:r}}function dMe(e,t={}){let n=t.projectDir?v9(t.projectDir):null,r=n?[]:cMe(e),i=r.join(`/`),a=new Map;for(let t of e){let e=y9(t.path).slice(r.length);e.length!==0&&S9(a,t,e,0,``)}let o=b9([...a.values()].map(e=>e.kind===`directory`?C9(e):e));return n?[{kind:`directory`,key:n,name:n,diff:x9(o.map(e=>e.diff)),children:o}]:i.length===0?o:[{kind:`directory`,key:i,name:i,diff:x9(o.map(e=>e.diff)),children:o}]}function fMe(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 pMe({items:e,itemsByKey:t,parentByKey:n,treeRef:r,onToggleDirectory:i,onSelectFile:a}){let o=(0,q.useRef)(new Map),[s,c]=(0,q.useState)(null),l=(0,q.useMemo)(()=>new Set(e.map(e=>e.key)),[e]),u=(0,q.useMemo)(()=>new Map(e.map((e,t)=>[e.key,t])),[e]),d=fMe({currentKey:s,visibleKeySet:l,parentByKey:n,firstItemKey:e[0]?.key??null}),f=(0,q.useCallback)(e=>{e&&(c(e),o.current.get(e)?.focus())},[]),p=(0,q.useCallback)(e=>{c(e)},[]);return{focusedKey:d,handleItemClick:(0,q.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,q.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,q.useCallback)(e=>t=>{if(!t){o.current.delete(e);return}o.current.set(e,t)},[])}}function w9(e,t,n,r,i){for(let a of e){if(n.set(a.key,t),a.kind===`directory`){r.add(a.key),w9(a.children,a.key,n,r,i);continue}i.set(a.file.fileId,a.key)}}function T9(e,t,n){let r=0;for(let i of e){if(i.kind===`directory`){let e=T9(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 E9(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&&E9(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 mMe(e,t,n=new Map){let r=new Map,i=new Set,a=new Map,o=[],s=new Map;return w9(e,null,r,i,a),T9(e,n,s),E9(e,t,s,1,null,[],o),{items:o,itemsByKey:new Map(o.map(e=>[e.key,e])),directoryKeys:i,parentByKey:r,keyByFileId:a}}var D9=14,hMe=new Map;function gMe(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 _Me(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 vMe({guideMask:e}){let t=e.length*D9;return(0,J.jsx)(`span`,{"aria-hidden":`true`,className:`pointer-events-none shrink-0 self-stretch`,style:{width:`${t}px`}})}function yMe({item:e,focused:t,onItemClick:n,onItemFocus:r,onItemKeyDown:i,registerItemRef:a,registerOverlayItemRef:o}){let s=e.kind===`directory`?e.node.name:_Me(e.node.file,e.node.name),c=e.guideMask.length*D9,l=e.visibilityRatio,u=l<=0?0:Math.min(.88,.22+l*.66);return(0,J.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:w4(`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,J.jsx)(`span`,{"aria-hidden":`true`,className:w4(`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,J.jsx)(vMe,{guideMask:e.guideMask}),e.kind===`directory`?(0,J.jsxs)(`div`,{className:w4(`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,J.jsx)(O_,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 transition-opacity`,style:{opacity:Math.min(1,.65+l*.35)}}):(0,J.jsx)(E_,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 transition-opacity`,style:{opacity:Math.min(1,.65+l*.35)}}),(0,J.jsx)(`span`,{className:`min-w-0 leading-4 [overflow-wrap:anywhere]`,children:s})]}):(0,J.jsxs)(`div`,{className:`relative z-10 flex min-w-0 items-start gap-1.5`,children:[(0,J.jsx)(b_,{className:w4(`mt-0.5 h-3.5 w-3.5 shrink-0 transition-colors`,l>0?`text-primary`:gMe(e.node.file.changeType)),style:{opacity:Math.min(1,.7+l*.3)}}),(0,J.jsx)(`span`,{className:w4(`min-w-0 text-[11px] leading-4 transition-colors [overflow-wrap:anywhere]`,l>0?`text-foreground font-medium`:``),children:s})]}),(0,J.jsx)(`div`,{className:w4(`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,J.jsx)(f7,{diff:e.node.diff})})]})}function O9({nodes:e,itemsByKey:t,focusedKey:n,onItemClick:r,onItemFocus:i,onItemKeyDown:a,registerItemRef:o,registerOverlayItemRef:s}){return(0,J.jsx)(`div`,{children:e.map(e=>{let c=t.get(e.key);return c?(0,J.jsxs)(`div`,{children:[(0,J.jsx)(yMe,{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,J.jsx)(`div`,{role:`group`,children:(0,J.jsx)(O9,{nodes:e.children,itemsByKey:t,focusedKey:n,onItemClick:r,onItemFocus:i,onItemKeyDown:a,registerItemRef:o,registerOverlayItemRef:s})}):null]},e.key):null})})}function k9({files:e,projectDir:t,visibilityRatioByFileId:n=hMe,onSelectFile:r,revealRequest:i=null,className:a,onUserScrollIntent:o}){let[s,c]=(0,q.useState)(new Set),l=(0,q.useRef)(null),u=(0,q.useRef)(null),d=(0,q.useRef)(new Map),f=(0,q.useRef)(null),p=(0,q.useMemo)(()=>dMe(e,{projectDir:t}),[e,t]),m=(0,q.useCallback)(e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),h=(0,q.useMemo)(()=>mMe(p,s,n),[s,p,n]),{focusedKey:g,handleItemClick:_,handleItemFocus:v,handleItemKeyDown:y,registerItemRef:b}=pMe({items:h.items,itemsByKey:h.itemsByKey,parentByKey:h.parentByKey,treeRef:l,onToggleDirectory:m,onSelectFile:r}),x=(0,q.useCallback)(e=>t=>{if(!t){d.current.delete(e);return}d.current.set(e,t)},[]);return(0,q.useEffect)(()=>{if(!i||f.current===i.nonce)return;let e=u.current;if(!e)return;let t=h.keyByFileId.get(i.fileId)??null;for(;t&&!h.itemsByKey.has(t);)t=h.parentByKey.get(t)??null;if(!t)return;let n=d.current.get(t);n&&(nMe({container:e,element:n,behavior:`auto`,margin:12}),f.current=i.nonce)},[i,h.itemsByKey,h.keyByFileId,h.parentByKey]),e.length===0?(0,J.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,J.jsx)(`div`,{ref:l,className:w4(`flex min-h-0 flex-col overflow-hidden rounded-md border border-zinc-500/15 bg-zinc-500/5`,a),children:(0,J.jsx)(`div`,{ref:u,role:`tree`,"aria-label":`Changed files`,onKeyDownCapture:e=>{h9(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,J.jsx)(`div`,{className:`relative`,children:(0,J.jsx)(O9,{nodes:p,itemsByKey:h.itemsByKey,focusedKey:g,onItemClick:_,onItemFocus:v,onItemKeyDown:y,registerItemRef:b,registerOverlayItemRef:x})})})})}function bMe(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 xMe(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 SMe(e){return e.previousPath&&(e.changeType===`renamed`||e.changeType===`copied`)?e.path:e.displayPath}function CMe(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,J.jsx)(`div`,{className:n,children:e||` `},`${t}:${e.slice(0,16)}`)}function A9({file:e,patch:t,status:n,error:r,onRegisterCard:i,scrollMarginTop:a}){let o=xMe(t),s=(0,q.useCallback)(t=>{i?.(e.fileId,t)},[e.fileId,i]);return(0,J.jsxs)(`section`,{"data-file-id":e.fileId,ref:s,style:a?{scrollMarginTop:`${a}px`}:void 0,className:`overflow-hidden rounded-md border border-zinc-500/20`,children:[(0,J.jsxs)(`header`,{className:`bg-card flex flex-wrap items-center justify-between gap-2 border-b px-3 py-2`,children:[(0,J.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,J.jsx)(b_,{className:`text-muted-foreground h-4 w-4 shrink-0`}),(0,J.jsx)(`span`,{className:`min-w-0 text-sm font-medium leading-5 [overflow-wrap:anywhere]`,children:SMe(e)})]}),e.previousPath?(0,J.jsxs)(`div`,{className:`text-muted-foreground pl-6 text-[11px] leading-4 [overflow-wrap:anywhere]`,children:[`from `,e.previousPath]}):null]}),(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,J.jsx)(`span`,{className:w4(`inline-flex items-center rounded border px-[0.35rem] py-0 text-[10px] font-medium uppercase tracking-wide`,bMe(e.changeType)),children:e.changeType}),(0,J.jsx)(f7,{diff:t?.diff??e.diff})]})]}),n===`loading`||n===`idle`?(0,J.jsxs)(`div`,{className:`readonly-code-surface text-muted-foreground flex items-center gap-2 px-3 py-3 text-sm`,children:[(0,J.jsx)(H_,{className:w4(`h-4 w-4 shrink-0`,n===`loading`&&`animate-spin`)}),(0,J.jsx)(`span`,{children:n===`loading`?`Loading patch…`:`Patch loads when visible.`})]}):r?(0,J.jsxs)(`div`,{className:`readonly-code-surface text-destructive flex items-start gap-2 px-3 py-3 text-sm`,children:[(0,J.jsx)(C_,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,J.jsx)(`span`,{children:r.message})]}):t?.patch?(0,J.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(`
|
|
1432
1432
|
`).map((e,t)=>CMe(e,t))}):(0,J.jsxs)(`div`,{className:`readonly-code-surface text-muted-foreground flex items-start gap-2 px-3 py-3 text-sm`,children:[(0,J.jsx)(C_,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,J.jsx)(`span`,{children:o})]})]})}A9.displayName=`GitPatchCard`;var wMe=(0,q.memo)(A9),TMe=960,j9=12,M9=16,EMe=4e3,DMe=12,OMe=`180px 0px`,kMe=eMe(20);function AMe(){let e=(0,q.useRef)(null),[t,n]=(0,q.useState)(!1);return(0,q.useEffect)(()=>{let t=e.current;if(!t||typeof ResizeObserver>`u`)return;let r=new ResizeObserver(([e])=>{n((e?.contentRect.width??0)>=TMe)});return r.observe(t),()=>{r.disconnect()}},[]),{ref:e,wide:t}}function jMe(e){return e?e.type===`commit`?`commit:${e.hash}`:`uncommitted`:`none`}function MMe(e,t){return e.state!==t.state||e.files!==t.files?!1:e.state!==`ready`||t.state!==`ready`?!0:e.insertions===t.insertions&&e.deletions===t.deletions}function NMe(e){return h9(e.key)}function PMe(e){for(let t of e){let e=g9(t,{allowNonScrollable:!0});if(e)return e}return null}function FMe(e,t,n){let r=g9(e,{allowNonScrollable:!0})??g9(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 IMe(e,t,n){let r=g9(e,{allowNonScrollable:!0})??g9(t,{allowNonScrollable:!0}),i=e.getBoundingClientRect();if(!r)return Math.abs(i.top-n)<=M9;let a=r.getBoundingClientRect().top+n;return Math.abs(i.top-a)<=M9}function LMe(e){return e.type===`commit`?(0,J.jsx)(N_,{className:`h-4 w-4 shrink-0 text-sky-600 dark:text-sky-300`}):(0,J.jsx)(H_,{className:`h-4 w-4 shrink-0 text-amber-600 dark:text-amber-300`})}function N9({files:e,onSelectFile:t}){return(0,J.jsxs)(`div`,{className:`rounded-md border border-dashed border-zinc-500/25 p-3`,children:[(0,J.jsx)(`div`,{className:`text-muted-foreground mb-2 text-xs`,children:`File tree is temporarily unavailable. Use the file list below.`}),(0,J.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>(0,J.jsx)(`button`,{type:`button`,onClick:()=>t(e.fileId),className:`hover:bg-muted/40 block w-full rounded-md px-2 py-1.5 text-left text-sm`,children:e.displayPath},e.fileId))})]})}function RMe({selector:e,entry:t,files:n,eagerFiles:r=[],projectDir:i,isLoading:a,error:o,showEntrySummary:s=!0,patchLoader:c}){let{ref:l,wide:u}=AMe(),d=jMe(e),{tabsRef:f,selectedTab:p,setSelectedTab:m,onTabChange:h}=xE({queryKey:`gitPane`,tabs:(0,q.useMemo)(()=>[{id:`diff`},{id:`files`}],[]),initialTab:`diff`}),[g,_]=(0,q.useState)([]),[v,y]=(0,q.useState)(j9),[b,x]=(0,q.useState)(null),[S,C]=(0,q.useState)(null),w=(0,q.useRef)(new Map),T=(0,q.useRef)(null),E=(0,q.useRef)(0),D=(0,q.useRef)(null),O=(0,q.useRef)(null),k=(0,q.useRef)(null),A=(0,q.useRef)(0),j=(0,q.useRef)(null),[M,N]=(0,q.useState)(null),P=aMe({target:M,enabled:u}),F=(0,q.useMemo)(()=>new Set(r.map(e=>e.fileId)),[r]),I=(0,q.useCallback)(()=>{j.current=`tree`},[]),L=(0,q.useCallback)(()=>{j.current=`diff`},[]),R=(0,q.useCallback)(e=>{F.has(e)||_(t=>t.includes(e)?t:[...t,e])},[F]),z=(0,q.useMemo)(()=>n.map(e=>e.fileId),[n]),B=(0,q.useCallback)(async t=>e?c?c({selector:e,fileId:t}):og.git.getEntryPatch.query({selector:e,fileId:t}):null,[c,e]);(0,q.useEffect)(()=>{m(`diff`),_([]),x(null),C(null),j.current=null,w.current.clear(),T.current=null,E.current=0,D.current!==null&&(window.cancelAnimationFrame(D.current),D.current=null)},[d,m]),(0,q.useEffect)(()=>{_(e=>{let t=e.filter(e=>!F.has(e)&&n.some(t=>t.fileId===e));return t.length===e.length&&t.every((t,n)=>t===e[n])?e:t})},[F,n]);let ee=(0,q.useMemo)(()=>n.map(e=>e.fileId).filter(e=>!F.has(e)&&g.includes(e)),[F,n,g]),V=Si({queries:ee.map(t=>({queryKey:[`git`,`patch`,d,t],queryFn:()=>B(t),enabled:e!==null,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}))}),te=(0,q.useMemo)(()=>{let e=new Map;for(let t of r)e.set(t.fileId,{status:`ready`,file:t,error:null});return ee.forEach((t,n)=>{let r=V[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,V,ee]),H=(0,q.useMemo)(()=>[r.map(e=>`${e.fileId}:${e.state}:${e.patch?.length??0}`).join(`|`),V.map(e=>`${e.status}:${e.fetchStatus}:${e.dataUpdatedAt}:${e.errorUpdatedAt}`).join(`|`)].join(`|`),[r,V]),U=(0,q.useMemo)(()=>n.map(e=>{let t=te.get(e.fileId)?.file;return!t||MMe(e.diff,t.diff)?e:{...e,diff:t.diff}}),[n,te]),W=(0,q.useCallback)(e=>{for(let{id:t}of e)R(t)},[R]),{ratioById:ne,setObservedNode:re}=_9({ids:z,root:b,threshold:kMe,onBecomeVisible:(0,q.useCallback)(e=>{if(j.current!==`diff`)return;let t=oMe(e);t&&(A.current+=1,C({fileId:t,nonce:A.current}))},[])}),ie=(0,q.useMemo)(()=>ne.size>0||!S?ne:new Map([[S.fileId,1]]),[S,ne]),{setObservedNode:ae}=_9({ids:z,root:b,rootMargin:OMe,threshold:[0],onBecomeVisible:W}),oe=(0,q.useCallback)(()=>{let e=u?j9:(()=>{let e=k.current?.querySelector(`.tabs-strip`),t=e?Math.ceil(e.getBoundingClientRect().height):0;return t>0?t+j9:j9})();y(t=>t===e?t:e)},[u]);(0,q.useEffect)(()=>{if(oe(),u||typeof ResizeObserver>`u`)return;let e=k.current?.querySelector(`.tabs-strip`);if(!e)return;let t=new ResizeObserver(()=>{oe()}),n=()=>{oe()};return t.observe(e),window.addEventListener(`resize`,n),()=>{t.disconnect(),window.removeEventListener(`resize`,n)}},[oe,u]);let se=(0,q.useCallback)(()=>{if(!u&&p!==`diff`)return;let e=T.current;if(!e)return;let t=w.current.get(e);if(t){if(E.current>0&&window.performance.now()>E.current){T.current=null,E.current=0;return}if(IMe(t,O.current,v)){T.current=null,E.current=0;return}FMe(t,O.current,v)}},[p,v,u]),ce=(0,q.useCallback)(()=>{D.current===null&&(D.current=window.requestAnimationFrame(()=>{D.current=null,se()}))},[se]),le=(0,q.useCallback)(e=>{T.current=e,E.current=window.performance.now()+EMe,!(!u&&p!==`diff`)&&ce()},[p,ce,u]);(0,q.useEffect)(()=>{!u&&p!==`diff`||T.current===null||ce()},[p,n,H,ce,u]),(0,q.useEffect)(()=>()=>{D.current!==null&&window.cancelAnimationFrame(D.current)},[]);let ue=(0,q.useCallback)(e=>{R(e),le(e),u||m(`diff`)},[le,R,m,u]),de=(0,q.useCallback)((e,t)=>{if(re(e,t),ae(e,t),!t){w.current.delete(e);return}w.current.set(e,t),x(e=>e??g9(t,{allowNonScrollable:!0}))},[ae,re]);if((0,q.useEffect)(()=>{if(!b)return;let e=()=>{j.current!==`tree`&&(j.current=`diff`)};return b.addEventListener(`scroll`,e,{passive:!0}),()=>{b.removeEventListener(`scroll`,e)}},[b]),(0,q.useEffect)(()=>{if(b||w.current.size===0)return;let e=()=>{let e=PMe(w.current.values());e&&x(e)};e();let t=window.requestAnimationFrame(e);return()=>{window.cancelAnimationFrame(t)}},[b,H]),o)return(0,J.jsxs)(`div`,{className:`text-destructive border-current/20 flex items-center gap-2 rounded-md border px-3 py-3 text-sm`,children:[(0,J.jsx)(l_,{className:`h-4 w-4 shrink-0`}),o.message]});if(a&&!t)return(0,J.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 rounded-md border border-dashed px-3 py-4 text-sm`,children:[(0,J.jsx)(H_,{className:`h-4 w-4 animate-spin`}),`Loading changed files…`]});if(!t)return(0,J.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 fe=a&&n.length===0?(0,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,J.jsx)(`div`,{ref:N,"data-testid":`git-file-tree-viewport`,className:`min-h-0 shrink-0 pb-1`,style:P==null?void 0:{height:`${P}px`},children:(0,J.jsx)(m9,{fallback:(0,J.jsx)(N9,{files:U,onSelectFile:ue}),children:(0,J.jsx)(k9,{files:U,projectDir:i,visibilityRatioByFileId:ie,onSelectFile:ue,revealRequest:S,className:`h-full min-h-0`,onUserScrollIntent:I})})}),pe=a&&n.length===0?(0,J.jsx)(`div`,{className:`text-muted-foreground rounded-md border border-dashed px-3 py-4 text-sm`,children:`Loading changed files…`}):(0,J.jsx)(`div`,{className:`py-3`,style:{marginBlock:`${DMe}px`},children:(0,J.jsx)(m9,{fallback:(0,J.jsx)(N9,{files:U,onSelectFile:ue}),children:(0,J.jsx)(k9,{files:U,projectDir:i,visibilityRatioByFileId:ie,onSelectFile:ue,revealRequest:S,onUserScrollIntent:I})})}),me={scrollPaddingTop:`${v}px`},he=a&&n.length===0?(0,J.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,J.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,J.jsx)(`div`,{className:`space-y-3`,children:n.map(e=>{let t=te.get(e.fileId);return(0,J.jsx)(wMe,{file:t?.file??e,patch:t?.file??null,status:t?.status??`idle`,error:t?.error??null,onRegisterCard:de,scrollMarginTop:v},e.fileId)})});return(0,J.jsxs)(`div`,{ref:l,className:`@container min-w-0 space-y-3`,children:[s?(0,J.jsx)(`section`,{className:`bg-card rounded-md border border-zinc-500/20 px-3 py-3`,children:(0,J.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[LMe(t),(0,J.jsx)(`span`,{className:`truncate`,children:t.title})]}),(0,J.jsxs)(`div`,{className:`text-muted-foreground mt-1 text-xs`,children:[t.type===`commit`?t.hash:`working tree`,` ·`,` `,i7(t.relatedChanges)]})]}),(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,J.jsx)(p7,{files:t.diff.files}),(0,J.jsx)(f7,{diff:t.diff})]})]})}):null,u?(0,J.jsxs)(`div`,{className:`grid min-w-0 gap-3 [grid-template-columns:minmax(18rem,20rem)_minmax(0,1fr)]`,children:[(0,J.jsx)(`section`,{className:`sticky top-0 flex min-h-0 self-start`,children:(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,J.jsx)(B_,{className:`h-4 w-4 shrink-0`}),(0,J.jsx)(`span`,{children:`File Tree`})]}),fe]})}),(0,J.jsxs)(`section`,{className:`min-w-0 space-y-2`,onKeyDownCapture:e=>{NMe(e)&&L()},onPointerDownCapture:L,onTouchMoveCapture:L,onWheelCapture:L,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,J.jsx)(T_,{className:`h-4 w-4 shrink-0`}),(0,J.jsx)(`span`,{children:`Diff Stream`})]}),(0,J.jsx)(`div`,{ref:O,"data-testid":`git-diff-viewport`,style:me,children:he})]})]}):(0,J.jsx)(`div`,{ref:k,children:(0,J.jsx)(_E,{ref:f,variant:`default`,selectedTab:p,onTabChange:h,tabs:[{id:`diff`,label:`Diff Stream`,icon:(0,J.jsx)(T_,{className:`h-4 w-4`}),content:(0,J.jsx)(`div`,{ref:O,"data-testid":`git-diff-viewport`,className:`pt-3`,style:me,children:he})},{id:`files`,label:`File Tree`,icon:(0,J.jsx)(B_,{className:`h-4 w-4`}),content:pe}]})})]})}function zMe(e,t){return e.type===`commit`?`${e.hash} · ${i7(t)}`:`working tree · ${i7(t)}`}function P9({selector:e}){let t=yc(),n=hc(),{projectDir:r}=lv(),i=(0,q.useRef)(null),a=(0,q.useMemo)(()=>c7(e),[e]),o=Wg(n.state),s=wi({queryKey:e.type===`commit`?[`git`,`meta`,`commit`,e.hash]:[`git`,`meta`,`uncommitted`],queryFn:()=>og.git.getEntryMeta.query({selector:e}),enabled:!t,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),c=wi({queryKey:e.type===`commit`?[`git`,`files`,`commit`,e.hash]:[`git`,`files`,`uncommitted`],queryFn:()=>og.git.getEntryFiles.query({selector:e}),enabled:!t,placeholderData:e=>e,staleTime:300*1e3,gcTime:900*1e3,refetchOnWindowFocus:!1}),l=s.data??null,u=c.data?.files??[],d=c.data?.eagerFiles??[],f=e.type===`commit`?N_:H_;return t?(0,J.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 p-4 text-sm`,children:[(0,J.jsx)(l_,{className:`h-4 w-4 shrink-0`}),`Git detail is only available in live mode.`]}):s.isLoading&&!l?o?(0,J.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,J.jsx)(Yg,{to:`/git`,vt:{source:i,sharedElements:a},className:`hover:bg-muted rounded-md p-2`,"aria-label":`Back to commits`,children:(0,J.jsx)(n_,{className:`h-5 w-5`})}),(0,J.jsxs)(`div`,{ref:i,...Vg(a,`container`),className:`min-w-0 space-y-1`,children:[(0,J.jsxs)(`h1`,{className:`font-nav flex flex-wrap items-start gap-2 text-2xl font-bold`,children:[(0,J.jsx)(f,{...Vg(a,`icon`),className:`h-5 w-5 shrink-0 ${e.type===`commit`?`text-sky-600 dark:text-sky-300`:`text-amber-600 dark:text-amber-300`}`}),(0,J.jsx)(`span`,{...Vg(a,`title`),className:`min-w-0 whitespace-normal [overflow-wrap:anywhere]`,children:o.title??(e.type===`commit`?e.hash:`working tree`)})]}),(0,J.jsx)(`p`,{className:`text-muted-foreground whitespace-normal text-sm [overflow-wrap:anywhere]`,children:o.subtitle??`Loading git entry…`})]})]}),(0,J.jsx)(`div`,{className:`vt-detail-content route-loading animate-pulse rounded-lg border p-4`,children:`Loading commit detail...`})]}):(0,J.jsx)(`div`,{className:`route-loading animate-pulse`,children:`Loading commit detail...`}):s.error&&!l?(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,J.jsxs)(`div`,{className:`text-destructive flex items-center gap-2 text-sm`,children:[(0,J.jsx)(l_,{className:`h-4 w-4 shrink-0`}),`Error loading commit detail: `,s.error.message]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(Yg,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]}):l?(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 p-4`,children:[(0,J.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,J.jsxs)(`div`,{className:`flex min-w-0 items-start gap-4`,children:[(0,J.jsx)(Yg,{to:`/git`,vt:{source:i,sharedElements:a},className:`hover:bg-muted rounded-md p-2`,"aria-label":`Back to commits`,children:(0,J.jsx)(n_,{className:`h-5 w-5`})}),(0,J.jsxs)(`div`,{ref:i,...Vg(a,`container`),className:`min-w-0 space-y-1`,children:[(0,J.jsxs)(`h1`,{className:`font-nav flex flex-wrap items-start gap-2 text-2xl font-bold`,children:[(0,J.jsx)(f,{...Vg(a,`icon`),className:`h-5 w-5 shrink-0 ${e.type===`commit`?`text-sky-600 dark:text-sky-300`:`text-amber-600 dark:text-amber-300`}`}),(0,J.jsx)(`span`,{...Vg(a,`title`),className:`min-w-0 whitespace-normal [overflow-wrap:anywhere]`,children:l.title})]}),(0,J.jsx)(`p`,{className:`text-muted-foreground whitespace-normal text-sm [overflow-wrap:anywhere]`,children:zMe(e,l.relatedChanges)})]})]}),(0,J.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,J.jsx)(p7,{files:c.data?u.length:l.diff.files}),(0,J.jsx)(f7,{diff:l.diff})]})]}),(0,J.jsx)(`div`,{className:`vt-detail-content`,children:(0,J.jsx)(RMe,{selector:e,entry:l,files:u,eagerFiles:d,projectDir:r,isLoading:c.isLoading||c.isFetching,error:(c.error instanceof Error?c.error:null)??(s.error instanceof Error?s.error:null),showEntrySummary:!1})})]}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,J.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,children:[(0,J.jsx)(l_,{className:`h-4 w-4 shrink-0`}),`Commit detail is unavailable in the current project.`]}),(0,J.jsx)(`div`,{children:(0,J.jsx)(Yg,{to:`/git`,className:`text-primary hover:underline`,children:`Back to Commits`})})]})}function BMe(){return(0,J.jsx)(P9,{selector:{type:`uncommitted`}})}function VMe(){let{hash:e}=Cs({from:`/git/commit/$hash`});return(0,J.jsx)(P9,{selector:{type:`commit`,hash:e}})}var HMe=`terminal:`,UMe={continue:`Continue`,ff:`Fast-forward`,apply:`Apply`,archive:`Archive`},WMe=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 GMe(e){return e.replace(/\x1B\[[0-?]*[ -/]*[@-~]/g,``).replace(/\x1B\][^\u0007]*(\u0007|\x1B\\)/g,``).replace(/\x1B[@-Z\\-_]/g,``)}function KMe(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=KMe(GMe(e));return{text:t,modified:t!==e}}function qMe(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=og.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(HMe)?e.slice(9):null}function JMe(e){if(!e)return null;let t=e.trim().toLowerCase();return t?t.split(/[\\/]/).pop()??t:null}function YMe(e){let t=JMe(e);return t?WMe.has(t):!1}function XMe(e,t){let n=e.replace(/\r\n?/g,`
|
|
1433
1433
|
`);return t?`\x1b[200~${n}\x1b[201~\n`:`${n}\n`}function ZMe(){let e=hc(),{setConfig:t}=_v(),{requestClose:n}=vv(),{sessions:r,activeSessionId:i}=C2(),a=(0,q.useMemo)(()=>eU(e.search),[e.search]),o=(0,q.useMemo)(()=>a?tU(a):null,[a]),s=(0,q.useMemo)(()=>r.filter(e=>!e.isExited),[r]),c=(0,q.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,q.useState)(null),[d,f]=(0,q.useState)(``),[p,m]=(0,q.useState)(!1),[h,g]=(0,q.useState)(null),[_,v]=(0,q.useState)(null),[y,b]=(0,q.useState)(!1),[x,S]=(0,q.useState)(!1),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(!1),k=(0,q.useRef)(null),A=(0,q.useRef)(null);(0,q.useEffect)(()=>{u(e=>{if(!e)return c;let t=L9(e);return t&&s.some(e=>e.id===t)?e:c})},[s,c]),(0,q.useEffect)(()=>{t({layout:{alignY:`start`,width:`wide`,topGap:`comfortable`},dialogClassName:`overflow-hidden`,panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(86dvh,920px)`})},[t]),(0,q.useEffect)(()=>()=>{k.current!=null&&window.clearTimeout(k.current),A.current!=null&&window.clearTimeout(A.current)},[]),(0,q.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),yc()){f(nU(a)),m(!1);return}if(!o){f(nU(a)),g(`Prompt source is not available for this action.`),m(!1);return}try{let n=await qMe(o.command,o.args,t.signal);if(e)return;let r=I9(n.stdout);f(rU(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(nU(a)),g(F9(t))}finally{e||m(!1)}})(),()=>{e=!0,t.abort()}},[a,o]);let j=a?UMe[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=XMe(i.text,YMe(r?.processTitle));if(!x2.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 x2.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,J.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,J.jsx)(`div`,{className:`border-border flex items-center justify-between gap-3 border-b px-4 py-3`,children:(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsxs)(`h2`,{className:`font-nav truncate text-base tracking-[0.04em]`,children:[j,` Prompt`]}),(0,J.jsx)(`p`,{className:`text-muted-foreground truncate text-xs`,children:a?`change: ${a.changeId}`:`missing change context`})]})}),(0,J.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,J.jsxs)(`div`,{className:`bg-muted/40 border-border rounded-md border p-2 text-xs`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Prompt source:`}),` `,(0,J.jsxs)(`code`,{className:`break-all`,children:[o.command,` `,o.args.join(` `)]})]}),p&&(0,J.jsxs)(`div`,{className:`text-muted-foreground flex items-center gap-2 text-sm`,children:[(0,J.jsx)(H_,{className:`h-4 w-4 animate-spin`}),`Generating prompt...`]}),h&&(0,J.jsxs)(`div`,{className:`rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm text-amber-700`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,J.jsx)(l_,{className:`h-4 w-4`}),`Prompt source warning`]}),(0,J.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap break-words`,children:h})]}),(0,J.jsxs)(`label`,{className:`flex max-h-full min-h-0 min-w-0 flex-1 flex-col gap-1.5 overflow-hidden`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Prompt`}),(0,J.jsx)(dH,{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,J.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,J.jsxs)(`div`,{className:`order-2 flex items-center gap-2 sm:order-1`,children:[(0,J.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,J.jsx)(H_,{className:`h-4 w-4 animate-spin`}):T?(0,J.jsx)(o_,{className:`h-4 w-4`}):(0,J.jsx)(__,{className:`h-4 w-4`}),T?`Copied`:`Copy`]}),(0,J.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,J.jsx)(H_,{className:`h-4 w-4 animate-spin`}):D?(0,J.jsx)(o_,{className:`h-4 w-4`}):(0,J.jsx)(G_,{className:`h-4 w-4`}),D?`Saved`:`Save`]})]}),(0,J.jsxs)(`div`,{className:`order-1 flex min-w-0 items-end gap-2 sm:order-2`,children:[(0,J.jsxs)(`label`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Terminal`}),(0,J.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,J.jsx)(`option`,{value:``,children:`No live terminal`}),s.map(e=>(0,J.jsxs)(`option`,{value:`terminal:${e.id}`,children:[`Terminal: `,e.displayTitle]},e.id))]})]}),(0,J.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,J.jsx)(H_,{className:`h-4 w-4 animate-spin`}):(0,J.jsx)(q_,{className:`h-4 w-4`}),`Send`]})]})]}),_&&(0,J.jsx)(`div`,{className:`rounded-md border border-red-500/40 bg-red-500/10 p-3 text-sm text-red-600`,children:_})]})}var QMe=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function $Me(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 eNe(e){return/\s/.test(e)?JSON.stringify(e):e}function tNe(){let{setConfig:e}=_v(),{requestClose:t}=vv(),{createDedicatedSession:n}=C2(),{data:r}=hg(),[i,a]=(0,q.useState)(``),[o,s]=(0,q.useState)(``),[c,l]=(0,q.useState)(``),[u,d]=(0,q.useState)([]),[f,p]=(0,q.useState)(``);(0,q.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=QMe.test(m),g=m.length>0&&h,_=(0,q.useMemo)(()=>$Me({changeName:i,schema:o,description:c,extraArgs:u}),[i,o,c,u]),v=(0,q.useMemo)(()=>g?[`openspec`,..._].map(eNe).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,J.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=Al.getAreaForPath(`/terminal`);Qg.push(i,`/terminal`,null),t()},children:[(0,J.jsxs)(`div`,{className:`border-border flex items-center gap-2 border-b px-4 py-3`,children:[(0,J.jsx)(Z_,{className:`text-primary h-4 w-4`}),(0,J.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Create OPSX Change`})]}),(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto p-4`,children:[(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Change Name`}),(0,J.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,J.jsx)(`span`,{className:`text-destructive text-xs`,children:`Use kebab-case: lowercase letters, numbers, and single hyphens.`})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Schema`}),(0,J.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,J.jsx)(`datalist`,{id:`opsx-new-schema-options`,children:y.map(e=>(0,J.jsx)(`option`,{value:e},e))})]}),(0,J.jsxs)(`label`,{className:`flex flex-col gap-1.5`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Description`}),(0,J.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,J.jsxs)(`details`,{className:`group rounded-md border border-dashed`,children:[(0,J.jsx)(`summary`,{className:`cursor-pointer list-none px-3 py-2 text-sm font-medium`,children:`Advanced Arguments`}),(0,J.jsxs)(`div`,{className:`border-border flex flex-col gap-3 border-t px-3 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex gap-2`,children:[(0,J.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,J.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,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:u.map((e,t)=>(0,J.jsxs)(`span`,{className:`bg-muted inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs`,children:[e,(0,J.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,J.jsx)(rv,{className:`h-3 w-3`})})]},`${e}-${t}`))}),(0,J.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,J.jsxs)(`div`,{className:`bg-muted/40 border-border rounded-md border p-3`,children:[(0,J.jsx)(`div`,{className:`text-muted-foreground mb-1 text-xs uppercase tracking-wider`,children:`Command`}),(0,J.jsx)(`code`,{className:`break-all text-xs`,children:v})]})]}),(0,J.jsxs)(`div`,{className:`border-border flex items-center justify-end gap-2 border-t px-4 py-3`,children:[(0,J.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,J.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 nNe=`terminal:`;function R9(e){return e.startsWith(nNe)?e.slice(9):null}function rNe(){let{setConfig:e}=_v(),{requestClose:t}=vv(),{sessions:n,activeSessionId:r}=C2(),i=(0,q.useMemo)(()=>n.filter(e=>!e.isExited),[n]),[a,o]=(0,q.useState)(``),[s,c]=(0,q.useState)(null),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(!1),[p,m]=(0,q.useState)(!1),[h,g]=(0,q.useState)(!1);(0,q.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,q.useMemo)(()=>r&&i.some(e=>e.id===r)?`terminal:${r}`:i[0]?`terminal:${i[0].id}`:null,[r,i]);(0,q.useEffect)(()=>{c(e=>{if(!e)return _;let t=R9(e);return t&&i.some(e=>e.id===t)?e:_})},[i,_]);let v=(0,q.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(!x2.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 x2.addInputHistory(v),g(!0),window.setTimeout(()=>g(!1),900)};return(0,J.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,J.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-b px-4 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(Z_,{className:`text-primary h-4 w-4`}),(0,J.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Quick /opsx:propose`})]}),(0,J.jsxs)(`button`,{type:`button`,onClick:()=>Al.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,J.jsx)(i_,{className:`h-3.5 w-3.5`})]})]}),(0,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4 p-4`,children:[(0,J.jsx)(`p`,{className:`text-muted-foreground text-sm`,children:`Enter your idea, then send it as a slash command to the selected terminal.`}),(0,J.jsx)(dH,{value:a,onChange:o,filename:`opsx-propose.md`,placeholder:`e.g. add workspace kanban support for active changes`,editorMinHeight:`180px`}),(0,J.jsxs)(`div`,{className:`bg-muted/30 border-border rounded-md border px-3 py-2 text-xs`,children:[(0,J.jsx)(`span`,{className:`text-muted-foreground mr-1`,children:`Command:`}),(0,J.jsx)(`code`,{children:v})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`label`,{className:`w-24 text-xs font-medium`,children:`Target`}),(0,J.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,J.jsx)(`option`,{value:``,disabled:!0,children:`No live terminal session`}),i.map(e=>(0,J.jsx)(`option`,{value:`terminal:${e.id}`,children:e.displayTitle},e.id))]})]}),l&&(0,J.jsx)(`div`,{className:`text-destructive text-xs`,children:l})]}),(0,J.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-t px-4 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.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,J.jsx)(__,{className:`h-3.5 w-3.5`}),p?`Copied`:`Copy`]}),(0,J.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,J.jsx)(G_,{className:`h-3.5 w-3.5`}),h?`Saved`:`Save`]})]}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.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,J.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,J.jsx)(q_,{className:`h-3.5 w-3.5`}),d?`Sending...`:`Send`]})]})]})]})}function iNe(){let e=hc(),{setConfig:t}=_v(),{requestClose:n}=vv(),{lines:r,status:i,commands:a,hasStarted:o,reset:s,cancel:c}=wv(),[l,u]=(0,q.useState)(!0),d=(0,q.useMemo)(()=>new URLSearchParams(e.search).get(`change`)?.trim()??``,[e.search]);return(0,q.useEffect)(()=>{t({layout:{alignY:`start`,width:`normal`,topGap:`comfortable`},panelClassName:`w-full`,bodyClassName:`p-0`,maxHeight:`min(82dvh,760px)`})},[t]),(0,q.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,J.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,J.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-b px-4 py-3`,children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(Y_,{className:`text-primary h-4 w-4`}),(0,J.jsx)(`h2`,{className:`font-nav text-base tracking-[0.04em]`,children:`Verify Change`})]}),(0,J.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,J.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,J.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col gap-3 p-4`,children:[d?(0,J.jsxs)(`p`,{className:`text-muted-foreground text-sm`,children:[`Running validation for `,(0,J.jsx)(`code`,{className:`bg-muted rounded px-1`,children:d}),`.`]}):(0,J.jsx)(`p`,{className:`text-destructive text-sm`,children:`Missing change id. Open Verify from a change page.`}),(0,J.jsx)(Tv,{lines:r,maxHeight:`56vh`})]}),(0,J.jsxs)(`div`,{className:`border-border flex items-center justify-between gap-2 border-t px-4 py-3`,children:[(0,J.jsx)(`div`,{className:`text-xs`,children:i===`success`?(0,J.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-emerald-600`,children:[(0,J.jsx)(u_,{className:`h-3.5 w-3.5`}),`Verification completed`]}):i===`running`?(0,J.jsxs)(`span`,{className:`text-muted-foreground inline-flex items-center gap-1`,children:[(0,J.jsx)(H_,{className:`h-3.5 w-3.5 animate-spin`}),`Running...`]}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`Ready`})}),(0,J.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,J.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,J.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=ZW([`spec`,`change`,`archive`]),B9=KW({id:HW(),kind:z9,title:HW(),href:HW(),path:HW(),content:HW(),updatedAt:UW()}),aNe=KW({query:HW(),limit:UW().int().positive().optional()}),V9=KW({documentId:HW(),kind:z9,title:HW(),href:HW(),path:HW(),score:UW(),snippet:HW(),updatedAt:UW()});JW(`type`,[KW({id:HW(),type:XW(`init`),docs:GW(B9)}),KW({id:HW(),type:XW(`replaceAll`),docs:GW(B9)}),KW({id:HW(),type:XW(`search`),query:aNe}),KW({id:HW(),type:XW(`dispose`)})]);var oNe=JW(`type`,[KW({id:HW(),type:XW(`ok`)}),KW({id:HW(),type:XW(`results`),hits:GW(V9)}),KW({id:HW(),type:XW(`error`),message:HW()})]),sNe=String.raw`
|