@vitest/browser 2.0.0-beta.6 → 2.0.0-beta.8
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/context.d.ts +21 -0
- package/dist/client/.vite/manifest.json +2 -2
- package/dist/client/__vitest__/assets/{index-T2_JR9hd.js → index-BZPCs_Bg.js} +12 -12
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/{orchestrator-D24IzA4b.js → orchestrator-CTfJ7g35.js} +9 -3
- package/dist/client/__vitest_browser__/{tester-C3Mchfpf.js → tester-Bo1gw1oi.js} +12 -2
- package/dist/client/orchestrator.html +1 -1
- package/dist/client/tester.html +1 -1
- package/dist/index.js +145 -36
- package/dist/providers.js +5 -5
- package/package.json +9 -7
- package/providers.d.ts +5 -5
|
@@ -10,7 +10,7 @@ var $x=Object.defineProperty;var Px=(t,e,r)=>e in t?$x(t,e,{enumerable:!0,config
|
|
|
10
10
|
* @vue/runtime-core v3.4.27
|
|
11
11
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
12
|
* @license MIT
|
|
13
|
-
**/function Ni(t,e,r,o){try{return o?t(...o):t()}catch(s){Kl(s,e,r)}}function Vn(t,e,r,o){if(Gt(t)){const s=Ni(t,e,r,o);return s&&Wm(s)&&s.catch(c=>{Kl(c,e,r)}),s}if(Ft(t)){const s=[];for(let c=0;c<t.length;c++)s.push(Vn(t[c],e,r,o));return s}}function Kl(t,e,r,o=!0){const s=e?e.vnode:null;if(e){let c=e.parent;const f=e.proxy,h=`https://vuejs.org/error-reference/#runtime-${r}`;for(;c;){const g=c.ec;if(g){for(let v=0;v<g.length;v++)if(g[v](t,f,h)===!1)return}c=c.parent}const d=e.appContext.config.errorHandler;if(d){qi(),Ni(d,null,10,[t,f,h]),Bi();return}}__(t,r,s,o)}function __(t,e,r,o=!0){console.error(t)}let El=!1,Hf=!1;const on=[];let _r=0;const os=[];let bi=null,uo=0;const m0=Promise.resolve();let Hh=null;function Xr(t){const e=Hh||m0;return t?e.then(this?t.bind(this):t):e}function S_(t){let e=_r+1,r=on.length;for(;e<r;){const o=e+r>>>1,s=on[o],c=Ll(s);c<t||c===t&&s.pre?e=o+1:r=o}return e}function qh(t){(!on.length||!on.includes(t,El&&t.allowRecurse?_r+1:_r))&&(t.id==null?on.push(t):on.splice(S_(t.id),0,t),y0())}function y0(){!El&&!Hf&&(Hf=!0,Hh=m0.then(w0))}function k_(t){const e=on.indexOf(t);e>_r&&on.splice(e,1)}function qf(t){Ft(t)?os.push(...t):(!bi||!bi.includes(t,t.allowRecurse?uo+1:uo))&&os.push(t),y0()}function Pg(t,e,r=El?_r+1:0){for(;r<on.length;r++){const o=on[r];if(o&&o.pre){if(t&&o.id!==t.uid)continue;on.splice(r,1),r--,o()}}}function b0(t){if(os.length){const e=[...new Set(os)].sort((r,o)=>Ll(r)-Ll(o));if(os.length=0,bi){bi.push(...e);return}for(bi=e,uo=0;uo<bi.length;uo++)bi[uo]();bi=null,uo=0}}const Ll=t=>t.id==null?1/0:t.id,C_=(t,e)=>{const r=Ll(t)-Ll(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function w0(t){Hf=!1,El=!0,on.sort(C_);try{for(_r=0;_r<on.length;_r++){const e=on[_r];e&&e.active!==!1&&Ni(e,null,14)}}finally{_r=0,on.length=0,b0(),El=!1,Hh=null,(on.length||os.length)&&w0()}}function T_(t,e,...r){if(t.isUnmounted)return;const o=t.vnode.props||ye;let s=r;const c=e.startsWith("update:"),f=c&&e.slice(7);if(f&&f in o){const v=`${f==="modelValue"?"model":f}Modifiers`,{number:y,trim:w}=o[v]||ye;w&&(s=r.map(_=>De(_)?_.trim():_)),y&&(s=r.map(Df))}let h,d=o[h=uf(e)]||o[h=uf(hr(e))];!d&&c&&(d=o[h=uf(Hi(e))]),d&&Vn(d,t,6,s);const g=o[h+"Once"];if(g){if(!t.emitted)t.emitted={};else if(t.emitted[h])return;t.emitted[h]=!0,Vn(g,t,6,s)}}function x0(t,e,r=!1){const o=e.emitsCache,s=o.get(t);if(s!==void 0)return s;const c=t.emits;let f={},h=!1;if(!Gt(t)){const d=g=>{const v=x0(g,e,!0);v&&(h=!0,Re(f,v))};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}return!c&&!h?(be(t)&&o.set(t,null),null):(Ft(c)?c.forEach(d=>f[d]=null):Re(f,c),be(t)&&o.set(t,f),f)}function Kc(t,e){return!t||!Bc(e)?!1:(e=e.slice(2).replace(/Once$/,""),ae(t,e[0].toLowerCase()+e.slice(1))||ae(t,Hi(e))||ae(t,e))}let je=null,Xc=null;function yc(t){const e=je;return je=t,Xc=t&&t.type.__scopeId||null,e}function _0(t){Xc=t}function S0(){Xc=null}const E_=t=>ie;function ie(t,e=je,r){if(!e||t._n)return t;const o=(...s)=>{o._d&&xc(-1);const c=yc(e);let f;try{f=t(...s)}finally{yc(c),o._d&&xc(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function hf(t){const{type:e,vnode:r,proxy:o,withProxy:s,propsOptions:[c],slots:f,attrs:h,emit:d,render:g,renderCache:v,props:y,data:w,setupState:_,ctx:L,inheritAttrs:M}=t,A=yc(t);let T,E;try{if(r.shapeFlag&4){const $=s||o,F=$;T=lr(g.call(F,$,v,y,_,w,L)),E=h}else{const $=e;T=lr($.length>1?$(y,{attrs:h,slots:f,emit:d}):$(y,null)),E=e.props?h:A_(h)}}catch($){vl.length=0,Kl($,t,1),T=It(yn)}let P=T;if(E&&M!==!1){const $=Object.keys(E),{shapeFlag:F}=P;$.length&&F&7&&(c&&$.some(Lh)&&(E=M_(E,c)),P=Ri(P,E,!1,!0))}return r.dirs&&(P=Ri(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(r.dirs):r.dirs),r.transition&&(P.transition=r.transition),T=P,yc(A),T}function L_(t,e=!0){let r;for(let o=0;o<t.length;o++){const s=t[o];if(Ml(s)){if(s.type!==yn||s.children==="v-if"){if(r)return;r=s}}else return}return r}const A_=t=>{let e;for(const r in t)(r==="class"||r==="style"||Bc(r))&&((e||(e={}))[r]=t[r]);return e},M_=(t,e)=>{const r={};for(const o in t)(!Lh(o)||!(o.slice(9)in e))&&(r[o]=t[o]);return r};function N_(t,e,r){const{props:o,children:s,component:c}=t,{props:f,children:h,patchFlag:d}=e,g=c.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&d>=0){if(d&1024)return!0;if(d&16)return o?Og(o,f,g):!!f;if(d&8){const v=e.dynamicProps;for(let y=0;y<v.length;y++){const w=v[y];if(f[w]!==o[w]&&!Kc(g,w))return!0}}}else return(s||h)&&(!h||!h.$stable)?!0:o===f?!1:o?f?Og(o,f,g):!0:!!f;return!1}function Og(t,e,r){const o=Object.keys(e);if(o.length!==Object.keys(t).length)return!0;for(let s=0;s<o.length;s++){const c=o[s];if(e[c]!==t[c]&&!Kc(r,c))return!0}return!1}function Bh({vnode:t,parent:e},r){for(;e;){const o=e.subTree;if(o.suspense&&o.suspense.activeBranch===t&&(o.el=t.el),o===t)(t=e.vnode).el=r,e=e.parent;else break}}const k0="components",$_="directives";function yo(t,e){return C0(k0,t,!0,e)||t}const P_=Symbol.for("v-ndc");function Wi(t){return C0($_,t)}function C0(t,e,r=!0,o=!1){const s=je||tn;if(s){const c=s.type;if(t===k0){const h=PS(c,!1);if(h&&(h===e||h===hr(e)||h===jc(hr(e))))return c}const f=Rg(s[t]||c[t],e)||Rg(s.appContext[t],e);return!f&&o?c:f}}function Rg(t,e){return t&&(t[e]||t[hr(e)]||t[jc(hr(e))])}const O_=t=>t.__isSuspense;let Bf=0;const R_={name:"Suspense",__isSuspense:!0,process(t,e,r,o,s,c,f,h,d,g){if(t==null)z_(e,r,o,s,c,f,h,d,g);else{if(c&&c.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}I_(t,e,r,o,s,f,h,d,g)}},hydrate:F_,create:Wh,normalize:H_},D_=R_;function Al(t,e){const r=t.props&&t.props[e];Gt(r)&&r()}function z_(t,e,r,o,s,c,f,h,d){const{p:g,o:{createElement:v}}=d,y=v("div"),w=t.suspense=Wh(t,s,o,e,y,r,c,f,h,d);g(null,w.pendingBranch=t.ssContent,y,null,o,w,c,f),w.deps>0?(Al(t,"onPending"),Al(t,"onFallback"),g(null,t.ssFallback,e,r,o,null,c,f),ss(w,t.ssFallback)):w.resolve(!1,!0)}function I_(t,e,r,o,s,c,f,h,{p:d,um:g,o:{createElement:v}}){const y=e.suspense=t.suspense;y.vnode=e,e.el=t.el;const w=e.ssContent,_=e.ssFallback,{activeBranch:L,pendingBranch:M,isInFallback:A,isHydrating:T}=y;if(M)y.pendingBranch=w,Sr(w,M)?(d(M,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0?y.resolve():A&&(T||(d(L,_,r,o,s,null,c,f,h),ss(y,_)))):(y.pendingId=Bf++,T?(y.isHydrating=!1,y.activeBranch=M):g(M,s,y),y.deps=0,y.effects.length=0,y.hiddenContainer=v("div"),A?(d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0?y.resolve():(d(L,_,r,o,s,null,c,f,h),ss(y,_))):L&&Sr(w,L)?(d(L,w,r,o,s,y,c,f,h),y.resolve(!0)):(d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0&&y.resolve()));else if(L&&Sr(w,L))d(L,w,r,o,s,y,c,f,h),ss(y,w);else if(Al(e,"onPending"),y.pendingBranch=w,w.shapeFlag&512?y.pendingId=w.component.suspenseId:y.pendingId=Bf++,d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0)y.resolve();else{const{timeout:E,pendingId:P}=y;E>0?setTimeout(()=>{y.pendingId===P&&y.fallback(_)},E):E===0&&y.fallback(_)}}function Wh(t,e,r,o,s,c,f,h,d,g,v=!1){const{p:y,m:w,um:_,n:L,o:{parentNode:M,remove:A}}=g;let T;const E=B_(t);E&&e&&e.pendingBranch&&(T=e.pendingId,e.deps++);const P=t.props?Gm(t.props.timeout):void 0,$=c,F={vnode:t,parent:e,parentComponent:r,namespace:f,container:o,hiddenContainer:s,deps:0,pendingId:Bf++,timeout:typeof P=="number"?P:-1,activeBranch:null,pendingBranch:null,isInFallback:!v,isHydrating:v,isUnmounted:!1,effects:[],resolve(H=!1,st=!1){const{vnode:Y,activeBranch:ht,pendingBranch:Z,pendingId:ut,effects:lt,parentComponent:G,container:I}=F;let k=!1;F.isHydrating?F.isHydrating=!1:H||(k=ht&&Z.transition&&Z.transition.mode==="out-in",k&&(ht.transition.afterLeave=()=>{ut===F.pendingId&&(w(Z,I,c===$?L(ht):c,0),qf(lt))}),ht&&(M(ht.el)!==F.hiddenContainer&&(c=L(ht)),_(ht,G,F,!0)),k||w(Z,I,c,0)),ss(F,Z),F.pendingBranch=null,F.isInFallback=!1;let q=F.parent,U=!1;for(;q;){if(q.pendingBranch){q.effects.push(...lt),U=!0;break}q=q.parent}!U&&!k&&qf(lt),F.effects=[],E&&e&&e.pendingBranch&&T===e.pendingId&&(e.deps--,e.deps===0&&!st&&e.resolve()),Al(Y,"onResolve")},fallback(H){if(!F.pendingBranch)return;const{vnode:st,activeBranch:Y,parentComponent:ht,container:Z,namespace:ut}=F;Al(st,"onFallback");const lt=L(Y),G=()=>{F.isInFallback&&(y(null,H,Z,lt,ht,null,ut,h,d),ss(F,H))},I=H.transition&&H.transition.mode==="out-in";I&&(Y.transition.afterLeave=G),F.isInFallback=!0,_(Y,ht,null,!0),I||G()},move(H,st,Y){F.activeBranch&&w(F.activeBranch,H,st,Y),F.container=H},next(){return F.activeBranch&&L(F.activeBranch)},registerDep(H,st){const Y=!!F.pendingBranch;Y&&F.deps++;const ht=H.vnode.el;H.asyncDep.catch(Z=>{Kl(Z,H,0)}).then(Z=>{if(H.isUnmounted||F.isUnmounted||F.pendingId!==H.suspenseId)return;H.asyncResolved=!0;const{vnode:ut}=H;Jf(H,Z,!1),ht&&(ut.el=ht);const lt=!ht&&H.subTree.el;st(H,ut,M(ht||H.subTree.el),ht?null:L(H.subTree),F,f,d),lt&&A(lt),Bh(H,ut.el),Y&&--F.deps===0&&F.resolve()})},unmount(H,st){F.isUnmounted=!0,F.activeBranch&&_(F.activeBranch,r,H,st),F.pendingBranch&&_(F.pendingBranch,r,H,st)}};return F}function F_(t,e,r,o,s,c,f,h,d){const g=e.suspense=Wh(e,o,r,t.parentNode,document.createElement("div"),null,s,c,f,h,!0),v=d(t,g.pendingBranch=e.ssContent,r,g,c,f);return g.deps===0&&g.resolve(!1,!0),v}function H_(t){const{shapeFlag:e,children:r}=t,o=e&32;t.ssContent=Dg(o?r.default:r),t.ssFallback=o?Dg(r.fallback):It(yn)}function Dg(t){let e;if(Gt(t)){const r=hs&&t._c;r&&(t._d=!1,et()),t=t(),r&&(t._d=!0,e=Un,j0())}return Ft(t)&&(t=L_(t)),t=lr(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(r=>r!==t)),t}function q_(t,e){e&&e.pendingBranch?Ft(t)?e.effects.push(...t):e.effects.push(t):qf(t)}function ss(t,e){t.activeBranch=e;const{vnode:r,parentComponent:o}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;r.el=s,o&&o.subTree===r&&(o.vnode.el=s,Bh(o,s))}function B_(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const W_=Symbol.for("v-scx"),U_=()=>Gr(W_);function Uh(t,e){return Yc(t,null,e)}function j_(t,e){return Yc(t,null,{flush:"sync"})}const qa={};function Ge(t,e,r){return Yc(t,e,r)}function Yc(t,e,{immediate:r,deep:o,flush:s,once:c,onTrack:f,onTrigger:h}=ye){if(e&&c){const H=e;e=(...st)=>{H(...st),F()}}const d=tn,g=H=>o===!0?H:fo(H,o===!1?1:void 0);let v,y=!1,w=!1;if(Ae(t)?(v=()=>t.value,y=mc(t)):fl(t)?(v=()=>g(t),y=!0):Ft(t)?(w=!0,y=t.some(H=>fl(H)||mc(H)),v=()=>t.map(H=>{if(Ae(H))return H.value;if(fl(H))return g(H);if(Gt(H))return Ni(H,d,2)})):Gt(t)?e?v=()=>Ni(t,d,2):v=()=>(_&&_(),Vn(t,d,3,[L])):v=Wn,e&&o){const H=v;v=()=>fo(H())}let _,L=H=>{_=P.onStop=()=>{Ni(H,d,4),_=P.onStop=void 0}},M;if(tu)if(L=Wn,e?r&&Vn(e,d,3,[v(),w?[]:void 0,L]):v(),s==="sync"){const H=U_();M=H.__watcherHandles||(H.__watcherHandles=[])}else return Wn;let A=w?new Array(t.length).fill(qa):qa;const T=()=>{if(!(!P.active||!P.dirty))if(e){const H=P.run();(o||y||(w?H.some((st,Y)=>Ar(st,A[Y])):Ar(H,A)))&&(_&&_(),Vn(e,d,3,[H,A===qa?void 0:w&&A[0]===qa?[]:A,L]),A=H)}else P.run()};T.allowRecurse=!!e;let E;s==="sync"?E=T:s==="post"?E=()=>Tn(T,d&&d.suspense):(T.pre=!0,d&&(T.id=d.uid),E=()=>qh(T));const P=new Nh(v,Wn,E),$=Zm(),F=()=>{P.stop(),$&&Ah($.effects,P)};return e?r?T():A=P.run():s==="post"?Tn(P.run.bind(P),d&&d.suspense):P.run(),M&&M.push(F),F}function V_(t,e,r){const o=this.proxy,s=De(t)?t.includes(".")?T0(o,t):()=>o[t]:t.bind(o,o);let c;Gt(e)?c=e:(c=e.handler,r=e);const f=Yl(this),h=Yc(s,c.bind(o),r);return f(),h}function T0(t,e){const r=e.split(".");return()=>{let o=t;for(let s=0;s<r.length&&o;s++)o=o[r[s]];return o}}function fo(t,e=1/0,r){if(e<=0||!be(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,Ae(t))fo(t.value,e,r);else if(Ft(t))for(let o=0;o<t.length;o++)fo(t[o],e,r);else if(Bm(t)||is(t))t.forEach(o=>{fo(o,e,r)});else if(jm(t))for(const o in t)fo(t[o],e,r);return t}function Se(t,e){if(je===null)return t;const r=eu(je)||je.proxy,o=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[c,f,h,d=ye]=e[s];c&&(Gt(c)&&(c={mounted:c,updated:c}),c.deep&&fo(f),o.push({dir:c,instance:r,value:f,oldValue:void 0,arg:h,modifiers:d}))}return t}function io(t,e,r,o){const s=t.dirs,c=e&&e.dirs;for(let f=0;f<s.length;f++){const h=s[f];c&&(h.oldValue=c[f].value);let d=h.dir[o];d&&(qi(),Vn(d,r,8,[t.el,h,t,e]),Bi())}}const wi=Symbol("_leaveCb"),Ba=Symbol("_enterCb");function G_(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xs(()=>{t.isMounted=!0}),N0(()=>{t.isUnmounting=!0}),t}const qn=[Function,Array],E0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qn,onEnter:qn,onAfterEnter:qn,onEnterCancelled:qn,onBeforeLeave:qn,onLeave:qn,onAfterLeave:qn,onLeaveCancelled:qn,onBeforeAppear:qn,onAppear:qn,onAfterAppear:qn,onAppearCancelled:qn},K_={name:"BaseTransition",props:E0,setup(t,{slots:e}){const r=Xl(),o=G_();return()=>{const s=e.default&&A0(e.default(),!0);if(!s||!s.length)return;let c=s[0];if(s.length>1){for(const w of s)if(w.type!==yn){c=w;break}}const f=fe(t),{mode:h}=f;if(o.isLeaving)return df(c);const d=zg(c);if(!d)return df(c);const g=Wf(d,f,o,r);Uf(d,g);const v=r.subTree,y=v&&zg(v);if(y&&y.type!==yn&&!Sr(d,y)){const w=Wf(y,f,o,r);if(Uf(y,w),h==="out-in"&&d.type!==yn)return o.isLeaving=!0,w.afterLeave=()=>{o.isLeaving=!1,r.update.active!==!1&&(r.effect.dirty=!0,r.update())},df(c);h==="in-out"&&d.type!==yn&&(w.delayLeave=(_,L,M)=>{const A=L0(o,y);A[String(y.key)]=y,_[wi]=()=>{L(),_[wi]=void 0,delete g.delayedLeave},g.delayedLeave=M})}return c}}},X_=K_;function L0(t,e){const{leavingVNodes:r}=t;let o=r.get(e.type);return o||(o=Object.create(null),r.set(e.type,o)),o}function Wf(t,e,r,o){const{appear:s,mode:c,persisted:f=!1,onBeforeEnter:h,onEnter:d,onAfterEnter:g,onEnterCancelled:v,onBeforeLeave:y,onLeave:w,onAfterLeave:_,onLeaveCancelled:L,onBeforeAppear:M,onAppear:A,onAfterAppear:T,onAppearCancelled:E}=e,P=String(t.key),$=L0(r,t),F=(Y,ht)=>{Y&&Vn(Y,o,9,ht)},H=(Y,ht)=>{const Z=ht[1];F(Y,ht),Ft(Y)?Y.every(ut=>ut.length<=1)&&Z():Y.length<=1&&Z()},st={mode:c,persisted:f,beforeEnter(Y){let ht=h;if(!r.isMounted)if(s)ht=M||h;else return;Y[wi]&&Y[wi](!0);const Z=$[P];Z&&Sr(t,Z)&&Z.el[wi]&&Z.el[wi](),F(ht,[Y])},enter(Y){let ht=d,Z=g,ut=v;if(!r.isMounted)if(s)ht=A||d,Z=T||g,ut=E||v;else return;let lt=!1;const G=Y[Ba]=I=>{lt||(lt=!0,I?F(ut,[Y]):F(Z,[Y]),st.delayedLeave&&st.delayedLeave(),Y[Ba]=void 0)};ht?H(ht,[Y,G]):G()},leave(Y,ht){const Z=String(t.key);if(Y[Ba]&&Y[Ba](!0),r.isUnmounting)return ht();F(y,[Y]);let ut=!1;const lt=Y[wi]=G=>{ut||(ut=!0,ht(),G?F(L,[Y]):F(_,[Y]),Y[wi]=void 0,$[Z]===t&&delete $[Z])};$[Z]=t,w?H(w,[Y,lt]):lt()},clone(Y){return Wf(Y,e,r,o)}};return st}function df(t){if(Zc(t))return t=Ri(t),t.children=null,t}function zg(t){if(!Zc(t))return t;const{shapeFlag:e,children:r}=t;if(r){if(e&16)return r[0];if(e&32&&Gt(r.default))return r.default()}}function Uf(t,e){t.shapeFlag&6&&t.component?Uf(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function A0(t,e=!1,r){let o=[],s=0;for(let c=0;c<t.length;c++){let f=t[c];const h=r==null?f.key:String(r)+String(f.key!=null?f.key:c);f.type===re?(f.patchFlag&128&&s++,o=o.concat(A0(f.children,e,h))):(e||f.type!==yn)&&o.push(h!=null?Ri(f,{key:h}):f)}if(s>1)for(let c=0;c<o.length;c++)o[c].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function he(t,e){return Gt(t)?Re({name:t.name},e,{setup:t}):t}const dl=t=>!!t.type.__asyncLoader,Zc=t=>t.type.__isKeepAlive;function Y_(t,e){M0(t,"a",e)}function Z_(t,e){M0(t,"da",e)}function M0(t,e,r=tn){const o=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Jc(e,o,r),r){let s=r.parent;for(;s&&s.parent;)Zc(s.parent.vnode)&&J_(o,e,r,s),s=s.parent}}function J_(t,e,r,o){const s=Jc(e,t,o,!0);jh(()=>{Ah(o[e],s)},r)}function Jc(t,e,r=tn,o=!1){if(r){const s=r[t]||(r[t]=[]),c=e.__weh||(e.__weh=(...f)=>{if(r.isUnmounted)return;qi();const h=Yl(r),d=Vn(e,r,t,f);return h(),Bi(),d});return o?s.unshift(c):s.push(c),c}}const Jr=t=>(e,r=tn)=>(!tu||t==="sp")&&Jc(t,(...o)=>e(...o),r),Q_=Jr("bm"),xs=Jr("m"),tS=Jr("bu"),eS=Jr("u"),N0=Jr("bum"),jh=Jr("um"),nS=Jr("sp"),rS=Jr("rtg"),iS=Jr("rtc");function oS(t,e=tn){Jc("ec",t,e)}function Rn(t,e,r,o){let s;const c=r;if(Ft(t)||De(t)){s=new Array(t.length);for(let f=0,h=t.length;f<h;f++)s[f]=e(t[f],f,void 0,c)}else if(typeof t=="number"){s=new Array(t);for(let f=0;f<t;f++)s[f]=e(f+1,f,void 0,c)}else if(be(t))if(t[Symbol.iterator])s=Array.from(t,(f,h)=>e(f,h,void 0,c));else{const f=Object.keys(t);s=new Array(f.length);for(let h=0,d=f.length;h<d;h++){const g=f[h];s[h]=e(t[g],g,h,c)}}else s=[];return s}function Gn(t,e,r={},o,s){if(je.isCE||je.parent&&dl(je.parent)&&je.parent.isCE)return e!=="default"&&(r.name=e),It("slot",r,o&&o());let c=t[e];c&&c._c&&(c._d=!1),et();const f=c&&$0(c(r)),h=Yt(re,{key:r.key||f&&f.key||`_${e}`},f||(o?o():[]),f&&t._===1?64:-2);return h.scopeId&&(h.slotScopeIds=[h.scopeId+"-s"]),c&&c._c&&(c._d=!0),h}function $0(t){return t.some(e=>Ml(e)?!(e.type===yn||e.type===re&&!$0(e.children)):!0)?t:null}const jf=t=>t?X0(t)?eu(t)||t.proxy:jf(t.parent):null,pl=Re(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>jf(t.parent),$root:t=>jf(t.root),$emit:t=>t.emit,$options:t=>Vh(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,qh(t.update)}),$nextTick:t=>t.n||(t.n=Xr.bind(t.proxy)),$watch:t=>V_.bind(t)}),pf=(t,e)=>t!==ye&&!t.__isScriptSetup&&ae(t,e),sS={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:o,data:s,props:c,accessCache:f,type:h,appContext:d}=t;let g;if(e[0]!=="$"){const _=f[e];if(_!==void 0)switch(_){case 1:return o[e];case 2:return s[e];case 4:return r[e];case 3:return c[e]}else{if(pf(o,e))return f[e]=1,o[e];if(s!==ye&&ae(s,e))return f[e]=2,s[e];if((g=t.propsOptions[0])&&ae(g,e))return f[e]=3,c[e];if(r!==ye&&ae(r,e))return f[e]=4,r[e];Gf&&(f[e]=0)}}const v=pl[e];let y,w;if(v)return e==="$attrs"&&Mn(t.attrs,"get",""),v(t);if((y=h.__cssModules)&&(y=y[e]))return y;if(r!==ye&&ae(r,e))return f[e]=4,r[e];if(w=d.config.globalProperties,ae(w,e))return w[e]},set({_:t},e,r){const{data:o,setupState:s,ctx:c}=t;return pf(s,e)?(s[e]=r,!0):o!==ye&&ae(o,e)?(o[e]=r,!0):ae(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(c[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:o,appContext:s,propsOptions:c}},f){let h;return!!r[f]||t!==ye&&ae(t,f)||pf(e,f)||(h=c[0])&&ae(h,f)||ae(o,f)||ae(pl,f)||ae(s.config.globalProperties,f)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:ae(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function lS(){return aS().attrs}function aS(){const t=Xl();return t.setupContext||(t.setupContext=Z0(t))}function bc(t){return Ft(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}function Vf(t,e){return!t||!e?t||e:Ft(t)&&Ft(e)?t.concat(e):Re({},bc(t),bc(e))}let Gf=!0;function cS(t){const e=Vh(t),r=t.proxy,o=t.ctx;Gf=!1,e.beforeCreate&&Ig(e.beforeCreate,t,"bc");const{data:s,computed:c,methods:f,watch:h,provide:d,inject:g,created:v,beforeMount:y,mounted:w,beforeUpdate:_,updated:L,activated:M,deactivated:A,beforeDestroy:T,beforeUnmount:E,destroyed:P,unmounted:$,render:F,renderTracked:H,renderTriggered:st,errorCaptured:Y,serverPrefetch:ht,expose:Z,inheritAttrs:ut,components:lt,directives:G,filters:I}=e;if(g&&uS(g,o,null),f)for(const U in f){const tt=f[U];Gt(tt)&&(o[U]=tt.bind(r))}if(s){const U=s.call(r,r);be(U)&&(t.data=Cr(U))}if(Gf=!0,c)for(const U in c){const tt=c[U],mt=Gt(tt)?tt.bind(r,r):Gt(tt.get)?tt.get.bind(r,r):Wn,Mt=!Gt(tt)&&Gt(tt.set)?tt.set.bind(r):Wn,qt=_t({get:mt,set:Mt});Object.defineProperty(o,U,{enumerable:!0,configurable:!0,get:()=>qt.value,set:Wt=>qt.value=Wt})}if(h)for(const U in h)P0(h[U],o,r,U);if(d){const U=Gt(d)?d.call(r):d;Reflect.ownKeys(U).forEach(tt=>{rc(tt,U[tt])})}v&&Ig(v,t,"c");function q(U,tt){Ft(tt)?tt.forEach(mt=>U(mt.bind(r))):tt&&U(tt.bind(r))}if(q(Q_,y),q(xs,w),q(tS,_),q(eS,L),q(Y_,M),q(Z_,A),q(oS,Y),q(iS,H),q(rS,st),q(N0,E),q(jh,$),q(nS,ht),Ft(Z))if(Z.length){const U=t.exposed||(t.exposed={});Z.forEach(tt=>{Object.defineProperty(U,tt,{get:()=>r[tt],set:mt=>r[tt]=mt})})}else t.exposed||(t.exposed={});F&&t.render===Wn&&(t.render=F),ut!=null&&(t.inheritAttrs=ut),lt&&(t.components=lt),G&&(t.directives=G)}function uS(t,e,r=Wn){Ft(t)&&(t=Kf(t));for(const o in t){const s=t[o];let c;be(s)?"default"in s?c=Gr(s.from||o,s.default,!0):c=Gr(s.from||o):c=Gr(s),Ae(c)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>c.value,set:f=>c.value=f}):e[o]=c}}function Ig(t,e,r){Vn(Ft(t)?t.map(o=>o.bind(e.proxy)):t.bind(e.proxy),e,r)}function P0(t,e,r,o){const s=o.includes(".")?T0(r,o):()=>r[o];if(De(t)){const c=e[t];Gt(c)&&Ge(s,c)}else if(Gt(t))Ge(s,t.bind(r));else if(be(t))if(Ft(t))t.forEach(c=>P0(c,e,r,o));else{const c=Gt(t.handler)?t.handler.bind(r):e[t.handler];Gt(c)&&Ge(s,c,t)}}function Vh(t){const e=t.type,{mixins:r,extends:o}=e,{mixins:s,optionsCache:c,config:{optionMergeStrategies:f}}=t.appContext,h=c.get(e);let d;return h?d=h:!s.length&&!r&&!o?d=e:(d={},s.length&&s.forEach(g=>wc(d,g,f,!0)),wc(d,e,f)),be(e)&&c.set(e,d),d}function wc(t,e,r,o=!1){const{mixins:s,extends:c}=e;c&&wc(t,c,r,!0),s&&s.forEach(f=>wc(t,f,r,!0));for(const f in e)if(!(o&&f==="expose")){const h=fS[f]||r&&r[f];t[f]=h?h(t[f],e[f]):e[f]}return t}const fS={data:Fg,props:Hg,emits:Hg,methods:ll,computed:ll,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:ll,directives:ll,watch:dS,provide:Fg,inject:hS};function Fg(t,e){return e?t?function(){return Re(Gt(t)?t.call(this,this):t,Gt(e)?e.call(this,this):e)}:e:t}function hS(t,e){return ll(Kf(t),Kf(e))}function Kf(t){if(Ft(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function gn(t,e){return t?[...new Set([].concat(t,e))]:e}function ll(t,e){return t?Re(Object.create(null),t,e):e}function Hg(t,e){return t?Ft(t)&&Ft(e)?[...new Set([...t,...e])]:Re(Object.create(null),bc(t),bc(e??{})):e}function dS(t,e){if(!t)return e;if(!e)return t;const r=Re(Object.create(null),t);for(const o in e)r[o]=gn(t[o],e[o]);return r}function O0(){return{app:null,config:{isNativeTag:Ox,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let pS=0;function gS(t,e){return function(o,s=null){Gt(o)||(o=Re({},o)),s!=null&&!be(s)&&(s=null);const c=O0(),f=new WeakSet;let h=!1;const d=c.app={_uid:pS++,_component:o,_props:s,_container:null,_context:c,_instance:null,version:RS,get config(){return c.config},set config(g){},use(g,...v){return f.has(g)||(g&&Gt(g.install)?(f.add(g),g.install(d,...v)):Gt(g)&&(f.add(g),g(d,...v))),d},mixin(g){return c.mixins.includes(g)||c.mixins.push(g),d},component(g,v){return v?(c.components[g]=v,d):c.components[g]},directive(g,v){return v?(c.directives[g]=v,d):c.directives[g]},mount(g,v,y){if(!h){const w=It(o,s);return w.appContext=c,y===!0?y="svg":y===!1&&(y=void 0),v&&e?e(w,g):t(w,g,y),h=!0,d._container=g,g.__vue_app__=d,eu(w.component)||w.component.proxy}},unmount(){h&&(t(null,d._container),delete d._container.__vue_app__)},provide(g,v){return c.provides[g]=v,d},runWithContext(g){const v=gl;gl=d;try{return g()}finally{gl=v}}};return d}}let gl=null;function rc(t,e){if(tn){let r=tn.provides;const o=tn.parent&&tn.parent.provides;o===r&&(r=tn.provides=Object.create(o)),r[t]=e}}function Gr(t,e,r=!1){const o=tn||je;if(o||gl){const s=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:gl._context.provides;if(s&&t in s)return s[t];if(arguments.length>1)return r&&Gt(e)?e.call(o&&o.proxy):e}}const R0={},D0=()=>Object.create(R0),z0=t=>Object.getPrototypeOf(t)===R0;function vS(t,e,r,o=!1){const s={},c=D0();t.propsDefaults=Object.create(null),I0(t,e,s,c);for(const f in t.propsOptions[0])f in s||(s[f]=void 0);r?t.props=o?s:c0(s):t.type.props?t.props=s:t.props=c,t.attrs=c}function mS(t,e,r,o){const{props:s,attrs:c,vnode:{patchFlag:f}}=t,h=fe(s),[d]=t.propsOptions;let g=!1;if((o||f>0)&&!(f&16)){if(f&8){const v=t.vnode.dynamicProps;for(let y=0;y<v.length;y++){let w=v[y];if(Kc(t.emitsOptions,w))continue;const _=e[w];if(d)if(ae(c,w))_!==c[w]&&(c[w]=_,g=!0);else{const L=hr(w);s[L]=Xf(d,h,L,_,t,!1)}else _!==c[w]&&(c[w]=_,g=!0)}}}else{I0(t,e,s,c)&&(g=!0);let v;for(const y in h)(!e||!ae(e,y)&&((v=Hi(y))===y||!ae(e,v)))&&(d?r&&(r[y]!==void 0||r[v]!==void 0)&&(s[y]=Xf(d,h,y,void 0,t,!0)):delete s[y]);if(c!==h)for(const y in c)(!e||!ae(e,y))&&(delete c[y],g=!0)}g&&Vr(t.attrs,"set","")}function I0(t,e,r,o){const[s,c]=t.propsOptions;let f=!1,h;if(e)for(let d in e){if(ul(d))continue;const g=e[d];let v;s&&ae(s,v=hr(d))?!c||!c.includes(v)?r[v]=g:(h||(h={}))[v]=g:Kc(t.emitsOptions,d)||(!(d in o)||g!==o[d])&&(o[d]=g,f=!0)}if(c){const d=fe(r),g=h||ye;for(let v=0;v<c.length;v++){const y=c[v];r[y]=Xf(s,d,y,g[y],t,!ae(g,y))}}return f}function Xf(t,e,r,o,s,c){const f=t[r];if(f!=null){const h=ae(f,"default");if(h&&o===void 0){const d=f.default;if(f.type!==Function&&!f.skipFactory&&Gt(d)){const{propsDefaults:g}=s;if(r in g)o=g[r];else{const v=Yl(s);o=g[r]=d.call(null,e),v()}}else o=d}f[0]&&(c&&!h?o=!1:f[1]&&(o===""||o===Hi(r))&&(o=!0))}return o}function F0(t,e,r=!1){const o=e.propsCache,s=o.get(t);if(s)return s;const c=t.props,f={},h=[];let d=!1;if(!Gt(t)){const v=y=>{d=!0;const[w,_]=F0(y,e,!0);Re(f,w),_&&h.push(..._)};!r&&e.mixins.length&&e.mixins.forEach(v),t.extends&&v(t.extends),t.mixins&&t.mixins.forEach(v)}if(!c&&!d)return be(t)&&o.set(t,rs),rs;if(Ft(c))for(let v=0;v<c.length;v++){const y=hr(c[v]);qg(y)&&(f[y]=ye)}else if(c)for(const v in c){const y=hr(v);if(qg(y)){const w=c[v],_=f[y]=Ft(w)||Gt(w)?{type:w}:Re({},w);if(_){const L=Ug(Boolean,_.type),M=Ug(String,_.type);_[0]=L>-1,_[1]=M<0||L<M,(L>-1||ae(_,"default"))&&h.push(y)}}}const g=[f,h];return be(t)&&o.set(t,g),g}function qg(t){return t[0]!=="$"&&!ul(t)}function Bg(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function Wg(t,e){return Bg(t)===Bg(e)}function Ug(t,e){return Ft(e)?e.findIndex(r=>Wg(r,t)):Gt(e)&&Wg(e,t)?0:-1}const H0=t=>t[0]==="_"||t==="$stable",Gh=t=>Ft(t)?t.map(lr):[lr(t)],yS=(t,e,r)=>{if(e._n)return e;const o=ie((...s)=>Gh(e(...s)),r);return o._c=!1,o},q0=(t,e,r)=>{const o=t._ctx;for(const s in t){if(H0(s))continue;const c=t[s];if(Gt(c))e[s]=yS(s,c,o);else if(c!=null){const f=Gh(c);e[s]=()=>f}}},B0=(t,e)=>{const r=Gh(e);t.slots.default=()=>r},bS=(t,e)=>{const r=t.slots=D0();if(t.vnode.shapeFlag&32){const o=e._;o?(Re(r,e),Vm(r,"_",o,!0)):q0(e,r)}else e&&B0(t,e)},wS=(t,e,r)=>{const{vnode:o,slots:s}=t;let c=!0,f=ye;if(o.shapeFlag&32){const h=e._;h?r&&h===1?c=!1:(Re(s,e),!r&&h===1&&delete s._):(c=!e.$stable,q0(e,s)),f=e}else e&&(B0(t,e),f={default:1});if(c)for(const h in s)!H0(h)&&f[h]==null&&delete s[h]};function Yf(t,e,r,o,s=!1){if(Ft(t)){t.forEach((w,_)=>Yf(w,e&&(Ft(e)?e[_]:e),r,o,s));return}if(dl(o)&&!s)return;const c=o.shapeFlag&4?eu(o.component)||o.component.proxy:o.el,f=s?null:c,{i:h,r:d}=t,g=e&&e.r,v=h.refs===ye?h.refs={}:h.refs,y=h.setupState;if(g!=null&&g!==d&&(De(g)?(v[g]=null,ae(y,g)&&(y[g]=null)):Ae(g)&&(g.value=null)),Gt(d))Ni(d,h,12,[f,v]);else{const w=De(d),_=Ae(d);if(w||_){const L=()=>{if(t.f){const M=w?ae(y,d)?y[d]:v[d]:d.value;s?Ft(M)&&Ah(M,c):Ft(M)?M.includes(c)||M.push(c):w?(v[d]=[c],ae(y,d)&&(y[d]=v[d])):(d.value=[c],t.k&&(v[t.k]=d.value))}else w?(v[d]=f,ae(y,d)&&(y[d]=f)):_&&(d.value=f,t.k&&(v[t.k]=f))};f?(L.id=-1,Tn(L,r)):L()}}}const Tn=q_;function xS(t){return _S(t)}function _S(t,e){const r=Km();r.__VUE__=!0;const{insert:o,remove:s,patchProp:c,createElement:f,createText:h,createComment:d,setText:g,setElementText:v,parentNode:y,nextSibling:w,setScopeId:_=Wn,insertStaticContent:L}=t,M=(O,z,K,ot=null,rt=null,vt=null,Ct=void 0,at=null,bt=!!z.dynamicChildren)=>{if(O===z)return;O&&!Sr(O,z)&&(ot=V(O),Wt(O,rt,vt,!0),O=null),z.patchFlag===-2&&(bt=!1,z.dynamicChildren=null);const{type:pt,ref:At,shapeFlag:zt}=z;switch(pt){case Qc:A(O,z,K,ot);break;case yn:T(O,z,K,ot);break;case vf:O==null&&E(z,K,ot,Ct);break;case re:lt(O,z,K,ot,rt,vt,Ct,at,bt);break;default:zt&1?F(O,z,K,ot,rt,vt,Ct,at,bt):zt&6?G(O,z,K,ot,rt,vt,Ct,at,bt):(zt&64||zt&128)&&pt.process(O,z,K,ot,rt,vt,Ct,at,bt,Nt)}At!=null&&rt&&Yf(At,O&&O.ref,vt,z||O,!z)},A=(O,z,K,ot)=>{if(O==null)o(z.el=h(z.children),K,ot);else{const rt=z.el=O.el;z.children!==O.children&&g(rt,z.children)}},T=(O,z,K,ot)=>{O==null?o(z.el=d(z.children||""),K,ot):z.el=O.el},E=(O,z,K,ot)=>{[O.el,O.anchor]=L(O.children,z,K,ot,O.el,O.anchor)},P=({el:O,anchor:z},K,ot)=>{let rt;for(;O&&O!==z;)rt=w(O),o(O,K,ot),O=rt;o(z,K,ot)},$=({el:O,anchor:z})=>{let K;for(;O&&O!==z;)K=w(O),s(O),O=K;s(z)},F=(O,z,K,ot,rt,vt,Ct,at,bt)=>{z.type==="svg"?Ct="svg":z.type==="math"&&(Ct="mathml"),O==null?H(z,K,ot,rt,vt,Ct,at,bt):ht(O,z,rt,vt,Ct,at,bt)},H=(O,z,K,ot,rt,vt,Ct,at)=>{let bt,pt;const{props:At,shapeFlag:zt,transition:Ot,dirs:Ht}=O;if(bt=O.el=f(O.type,vt,At&&At.is,At),zt&8?v(bt,O.children):zt&16&&Y(O.children,bt,null,ot,rt,gf(O,vt),Ct,at),Ht&&io(O,null,ot,"created"),st(bt,O,O.scopeId,Ct,ot),At){for(const le in At)le!=="value"&&!ul(le)&&c(bt,le,null,At[le],vt,O.children,ot,rt,Tt);"value"in At&&c(bt,"value",null,At.value,vt),(pt=At.onVnodeBeforeMount)&&xr(pt,ot,O)}Ht&&io(O,null,ot,"beforeMount");const Vt=SS(rt,Ot);Vt&&Ot.beforeEnter(bt),o(bt,z,K),((pt=At&&At.onVnodeMounted)||Vt||Ht)&&Tn(()=>{pt&&xr(pt,ot,O),Vt&&Ot.enter(bt),Ht&&io(O,null,ot,"mounted")},rt)},st=(O,z,K,ot,rt)=>{if(K&&_(O,K),ot)for(let vt=0;vt<ot.length;vt++)_(O,ot[vt]);if(rt){let vt=rt.subTree;if(z===vt){const Ct=rt.vnode;st(O,Ct,Ct.scopeId,Ct.slotScopeIds,rt.parent)}}},Y=(O,z,K,ot,rt,vt,Ct,at,bt=0)=>{for(let pt=bt;pt<O.length;pt++){const At=O[pt]=at?xi(O[pt]):lr(O[pt]);M(null,At,z,K,ot,rt,vt,Ct,at)}},ht=(O,z,K,ot,rt,vt,Ct)=>{const at=z.el=O.el;let{patchFlag:bt,dynamicChildren:pt,dirs:At}=z;bt|=O.patchFlag&16;const zt=O.props||ye,Ot=z.props||ye;let Ht;if(K&&oo(K,!1),(Ht=Ot.onVnodeBeforeUpdate)&&xr(Ht,K,z,O),At&&io(z,O,K,"beforeUpdate"),K&&oo(K,!0),pt?Z(O.dynamicChildren,pt,at,K,ot,gf(z,rt),vt):Ct||tt(O,z,at,null,K,ot,gf(z,rt),vt,!1),bt>0){if(bt&16)ut(at,z,zt,Ot,K,ot,rt);else if(bt&2&&zt.class!==Ot.class&&c(at,"class",null,Ot.class,rt),bt&4&&c(at,"style",zt.style,Ot.style,rt),bt&8){const Vt=z.dynamicProps;for(let le=0;le<Vt.length;le++){const oe=Vt[le],te=zt[oe],ze=Ot[oe];(ze!==te||oe==="value")&&c(at,oe,te,ze,rt,O.children,K,ot,Tt)}}bt&1&&O.children!==z.children&&v(at,z.children)}else!Ct&&pt==null&&ut(at,z,zt,Ot,K,ot,rt);((Ht=Ot.onVnodeUpdated)||At)&&Tn(()=>{Ht&&xr(Ht,K,z,O),At&&io(z,O,K,"updated")},ot)},Z=(O,z,K,ot,rt,vt,Ct)=>{for(let at=0;at<z.length;at++){const bt=O[at],pt=z[at],At=bt.el&&(bt.type===re||!Sr(bt,pt)||bt.shapeFlag&70)?y(bt.el):K;M(bt,pt,At,null,ot,rt,vt,Ct,!0)}},ut=(O,z,K,ot,rt,vt,Ct)=>{if(K!==ot){if(K!==ye)for(const at in K)!ul(at)&&!(at in ot)&&c(O,at,K[at],null,Ct,z.children,rt,vt,Tt);for(const at in ot){if(ul(at))continue;const bt=ot[at],pt=K[at];bt!==pt&&at!=="value"&&c(O,at,pt,bt,Ct,z.children,rt,vt,Tt)}"value"in ot&&c(O,"value",K.value,ot.value,Ct)}},lt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{const pt=z.el=O?O.el:h(""),At=z.anchor=O?O.anchor:h("");let{patchFlag:zt,dynamicChildren:Ot,slotScopeIds:Ht}=z;Ht&&(at=at?at.concat(Ht):Ht),O==null?(o(pt,K,ot),o(At,K,ot),Y(z.children||[],K,At,rt,vt,Ct,at,bt)):zt>0&&zt&64&&Ot&&O.dynamicChildren?(Z(O.dynamicChildren,Ot,K,rt,vt,Ct,at),(z.key!=null||rt&&z===rt.subTree)&&W0(O,z,!0)):tt(O,z,K,At,rt,vt,Ct,at,bt)},G=(O,z,K,ot,rt,vt,Ct,at,bt)=>{z.slotScopeIds=at,O==null?z.shapeFlag&512?rt.ctx.activate(z,K,ot,Ct,bt):I(z,K,ot,rt,vt,Ct,bt):k(O,z,bt)},I=(O,z,K,ot,rt,vt,Ct)=>{const at=O.component=AS(O,ot,rt);if(Zc(O)&&(at.ctx.renderer=Nt),MS(at),at.asyncDep){if(rt&&rt.registerDep(at,q),!O.el){const bt=at.subTree=It(yn);T(null,bt,z,K)}}else q(at,O,z,K,rt,vt,Ct)},k=(O,z,K)=>{const ot=z.component=O.component;if(N_(O,z,K))if(ot.asyncDep&&!ot.asyncResolved){U(ot,z,K);return}else ot.next=z,k_(ot.update),ot.effect.dirty=!0,ot.update();else z.el=O.el,ot.vnode=z},q=(O,z,K,ot,rt,vt,Ct)=>{const at=()=>{if(O.isMounted){let{next:At,bu:zt,u:Ot,parent:Ht,vnode:Vt}=O;{const Ke=U0(O);if(Ke){At&&(At.el=Vt.el,U(O,At,Ct)),Ke.asyncDep.then(()=>{O.isUnmounted||at()});return}}let le=At,oe;oo(O,!1),At?(At.el=Vt.el,U(O,At,Ct)):At=Vt,zt&&nc(zt),(oe=At.props&&At.props.onVnodeBeforeUpdate)&&xr(oe,Ht,At,Vt),oo(O,!0);const te=hf(O),ze=O.subTree;O.subTree=te,M(ze,te,y(ze.el),V(ze),O,rt,vt),At.el=te.el,le===null&&Bh(O,te.el),Ot&&Tn(Ot,rt),(oe=At.props&&At.props.onVnodeUpdated)&&Tn(()=>xr(oe,Ht,At,Vt),rt)}else{let At;const{el:zt,props:Ot}=z,{bm:Ht,m:Vt,parent:le}=O,oe=dl(z);if(oo(O,!1),Ht&&nc(Ht),!oe&&(At=Ot&&Ot.onVnodeBeforeMount)&&xr(At,le,z),oo(O,!0),zt&&Xt){const te=()=>{O.subTree=hf(O),Xt(zt,O.subTree,O,rt,null)};oe?z.type.__asyncLoader().then(()=>!O.isUnmounted&&te()):te()}else{const te=O.subTree=hf(O);M(null,te,K,ot,O,rt,vt),z.el=te.el}if(Vt&&Tn(Vt,rt),!oe&&(At=Ot&&Ot.onVnodeMounted)){const te=z;Tn(()=>xr(At,le,te),rt)}(z.shapeFlag&256||le&&dl(le.vnode)&&le.vnode.shapeFlag&256)&&O.a&&Tn(O.a,rt),O.isMounted=!0,z=K=ot=null}},bt=O.effect=new Nh(at,Wn,()=>qh(pt),O.scope),pt=O.update=()=>{bt.dirty&&bt.run()};pt.id=O.uid,oo(O,!0),pt()},U=(O,z,K)=>{z.component=O;const ot=O.vnode.props;O.vnode=z,O.next=null,mS(O,z.props,ot,K),wS(O,z.children,K),qi(),Pg(O),Bi()},tt=(O,z,K,ot,rt,vt,Ct,at,bt=!1)=>{const pt=O&&O.children,At=O?O.shapeFlag:0,zt=z.children,{patchFlag:Ot,shapeFlag:Ht}=z;if(Ot>0){if(Ot&128){Mt(pt,zt,K,ot,rt,vt,Ct,at,bt);return}else if(Ot&256){mt(pt,zt,K,ot,rt,vt,Ct,at,bt);return}}Ht&8?(At&16&&Tt(pt,rt,vt),zt!==pt&&v(K,zt)):At&16?Ht&16?Mt(pt,zt,K,ot,rt,vt,Ct,at,bt):Tt(pt,rt,vt,!0):(At&8&&v(K,""),Ht&16&&Y(zt,K,ot,rt,vt,Ct,at,bt))},mt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{O=O||rs,z=z||rs;const pt=O.length,At=z.length,zt=Math.min(pt,At);let Ot;for(Ot=0;Ot<zt;Ot++){const Ht=z[Ot]=bt?xi(z[Ot]):lr(z[Ot]);M(O[Ot],Ht,K,null,rt,vt,Ct,at,bt)}pt>At?Tt(O,rt,vt,!0,!1,zt):Y(z,K,ot,rt,vt,Ct,at,bt,zt)},Mt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{let pt=0;const At=z.length;let zt=O.length-1,Ot=At-1;for(;pt<=zt&&pt<=Ot;){const Ht=O[pt],Vt=z[pt]=bt?xi(z[pt]):lr(z[pt]);if(Sr(Ht,Vt))M(Ht,Vt,K,null,rt,vt,Ct,at,bt);else break;pt++}for(;pt<=zt&&pt<=Ot;){const Ht=O[zt],Vt=z[Ot]=bt?xi(z[Ot]):lr(z[Ot]);if(Sr(Ht,Vt))M(Ht,Vt,K,null,rt,vt,Ct,at,bt);else break;zt--,Ot--}if(pt>zt){if(pt<=Ot){const Ht=Ot+1,Vt=Ht<At?z[Ht].el:ot;for(;pt<=Ot;)M(null,z[pt]=bt?xi(z[pt]):lr(z[pt]),K,Vt,rt,vt,Ct,at,bt),pt++}}else if(pt>Ot)for(;pt<=zt;)Wt(O[pt],rt,vt,!0),pt++;else{const Ht=pt,Vt=pt,le=new Map;for(pt=Vt;pt<=Ot;pt++){const Xe=z[pt]=bt?xi(z[pt]):lr(z[pt]);Xe.key!=null&&le.set(Xe.key,pt)}let oe,te=0;const ze=Ot-Vt+1;let Ke=!1,Kn=0;const Nn=new Array(ze);for(pt=0;pt<ze;pt++)Nn[pt]=0;for(pt=Ht;pt<=zt;pt++){const Xe=O[pt];if(te>=ze){Wt(Xe,rt,vt,!0);continue}let Bt;if(Xe.key!=null)Bt=le.get(Xe.key);else for(oe=Vt;oe<=Ot;oe++)if(Nn[oe-Vt]===0&&Sr(Xe,z[oe])){Bt=oe;break}Bt===void 0?Wt(Xe,rt,vt,!0):(Nn[Bt-Vt]=pt+1,Bt>=Kn?Kn=Bt:Ke=!0,M(Xe,z[Bt],K,null,rt,vt,Ct,at,bt),te++)}const Xn=Ke?kS(Nn):rs;for(oe=Xn.length-1,pt=ze-1;pt>=0;pt--){const Xe=Vt+pt,Bt=z[Xe],ji=Xe+1<At?z[Xe+1].el:ot;Nn[pt]===0?M(null,Bt,K,ji,rt,vt,Ct,at,bt):Ke&&(oe<0||pt!==Xn[oe]?qt(Bt,K,ji,2):oe--)}}},qt=(O,z,K,ot,rt=null)=>{const{el:vt,type:Ct,transition:at,children:bt,shapeFlag:pt}=O;if(pt&6){qt(O.component.subTree,z,K,ot);return}if(pt&128){O.suspense.move(z,K,ot);return}if(pt&64){Ct.move(O,z,K,Nt);return}if(Ct===re){o(vt,z,K);for(let zt=0;zt<bt.length;zt++)qt(bt[zt],z,K,ot);o(O.anchor,z,K);return}if(Ct===vf){P(O,z,K);return}if(ot!==2&&pt&1&&at)if(ot===0)at.beforeEnter(vt),o(vt,z,K),Tn(()=>at.enter(vt),rt);else{const{leave:zt,delayLeave:Ot,afterLeave:Ht}=at,Vt=()=>o(vt,z,K),le=()=>{zt(vt,()=>{Vt(),Ht&&Ht()})};Ot?Ot(vt,Vt,le):le()}else o(vt,z,K)},Wt=(O,z,K,ot=!1,rt=!1)=>{const{type:vt,props:Ct,ref:at,children:bt,dynamicChildren:pt,shapeFlag:At,patchFlag:zt,dirs:Ot}=O;if(at!=null&&Yf(at,null,K,O,!0),At&256){z.ctx.deactivate(O);return}const Ht=At&1&&Ot,Vt=!dl(O);let le;if(Vt&&(le=Ct&&Ct.onVnodeBeforeUnmount)&&xr(le,z,O),At&6)Zt(O.component,K,ot);else{if(At&128){O.suspense.unmount(K,ot);return}Ht&&io(O,null,z,"beforeUnmount"),At&64?O.type.remove(O,z,K,rt,Nt,ot):pt&&(vt!==re||zt>0&&zt&64)?Tt(pt,z,K,!1,!0):(vt===re&&zt&384||!rt&&At&16)&&Tt(bt,z,K),ot&&ne(O)}(Vt&&(le=Ct&&Ct.onVnodeUnmounted)||Ht)&&Tn(()=>{le&&xr(le,z,O),Ht&&io(O,null,z,"unmounted")},K)},ne=O=>{const{type:z,el:K,anchor:ot,transition:rt}=O;if(z===re){ee(K,ot);return}if(z===vf){$(O);return}const vt=()=>{s(K),rt&&!rt.persisted&&rt.afterLeave&&rt.afterLeave()};if(O.shapeFlag&1&&rt&&!rt.persisted){const{leave:Ct,delayLeave:at}=rt,bt=()=>Ct(K,vt);at?at(O.el,vt,bt):bt()}else vt()},ee=(O,z)=>{let K;for(;O!==z;)K=w(O),s(O),O=K;s(z)},Zt=(O,z,K)=>{const{bum:ot,scope:rt,update:vt,subTree:Ct,um:at}=O;ot&&nc(ot),rt.stop(),vt&&(vt.active=!1,Wt(Ct,O,z,K)),at&&Tn(at,z),Tn(()=>{O.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&O.asyncDep&&!O.asyncResolved&&O.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},Tt=(O,z,K,ot=!1,rt=!1,vt=0)=>{for(let Ct=vt;Ct<O.length;Ct++)Wt(O[Ct],z,K,ot,rt)},V=O=>O.shapeFlag&6?V(O.component.subTree):O.shapeFlag&128?O.suspense.next():w(O.anchor||O.el);let it=!1;const ft=(O,z,K)=>{O==null?z._vnode&&Wt(z._vnode,null,null,!0):M(z._vnode||null,O,z,null,null,null,K),it||(it=!0,Pg(),b0(),it=!1),z._vnode=O},Nt={p:M,um:Wt,m:qt,r:ne,mt:I,mc:Y,pc:tt,pbc:Z,n:V,o:t};let Et,Xt;return{render:ft,hydrate:Et,createApp:gS(ft,Et)}}function gf({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function oo({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function SS(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function W0(t,e,r=!1){const o=t.children,s=e.children;if(Ft(o)&&Ft(s))for(let c=0;c<o.length;c++){const f=o[c];let h=s[c];h.shapeFlag&1&&!h.dynamicChildren&&((h.patchFlag<=0||h.patchFlag===32)&&(h=s[c]=xi(s[c]),h.el=f.el),r||W0(f,h)),h.type===Qc&&(h.el=f.el)}}function kS(t){const e=t.slice(),r=[0];let o,s,c,f,h;const d=t.length;for(o=0;o<d;o++){const g=t[o];if(g!==0){if(s=r[r.length-1],t[s]<g){e[o]=s,r.push(o);continue}for(c=0,f=r.length-1;c<f;)h=c+f>>1,t[r[h]]<g?c=h+1:f=h;g<t[r[c]]&&(c>0&&(e[o]=r[c-1]),r[c]=o)}}for(c=r.length,f=r[c-1];c-- >0;)r[c]=f,f=e[f];return r}function U0(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:U0(e)}const CS=t=>t.__isTeleport,re=Symbol.for("v-fgt"),Qc=Symbol.for("v-txt"),yn=Symbol.for("v-cmt"),vf=Symbol.for("v-stc"),vl=[];let Un=null;function et(t=!1){vl.push(Un=t?null:[])}function j0(){vl.pop(),Un=vl[vl.length-1]||null}let hs=1;function xc(t){hs+=t}function V0(t){return t.dynamicChildren=hs>0?Un||rs:null,j0(),hs>0&&Un&&Un.push(t),t}function yt(t,e,r,o,s,c){return V0(Q(t,e,r,o,s,c,!0))}function Yt(t,e,r,o,s){return V0(It(t,e,r,o,s,!0))}function Ml(t){return t?t.__v_isVNode===!0:!1}function Sr(t,e){return t.type===e.type&&t.key===e.key}const G0=({key:t})=>t??null,ic=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?De(t)||Ae(t)||Gt(t)?{i:je,r:t,k:e,f:!!r}:t:null);function Q(t,e=null,r=null,o=0,s=null,c=t===re?0:1,f=!1,h=!1){const d={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&G0(e),ref:e&&ic(e),scopeId:Xc,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:je};return h?(Kh(d,r),c&128&&t.normalize(d)):r&&(d.shapeFlag|=De(r)?8:16),hs>0&&!f&&Un&&(d.patchFlag>0||c&6)&&d.patchFlag!==32&&Un.push(d),d}const It=TS;function TS(t,e=null,r=null,o=0,s=null,c=!1){if((!t||t===P_)&&(t=yn),Ml(t)){const h=Ri(t,e,!0);return r&&Kh(h,r),hs>0&&!c&&Un&&(h.shapeFlag&6?Un[Un.indexOf(t)]=h:Un.push(h)),h.patchFlag|=-2,h}if(OS(t)&&(t=t.__vccOpts),e){e=K0(e);let{class:h,style:d}=e;h&&!De(h)&&(e.class=de(h)),be(d)&&(u0(d)&&!Ft(d)&&(d=Re({},d)),e.style=ln(d))}const f=De(t)?1:O_(t)?128:CS(t)?64:be(t)?4:Gt(t)?2:0;return Q(t,e,r,o,s,f,c,!0)}function K0(t){return t?u0(t)||z0(t)?Re({},t):t:null}function Ri(t,e,r=!1,o=!1){const{props:s,ref:c,patchFlag:f,children:h,transition:d}=t,g=e?$i(s||{},e):s,v={__v_isVNode:!0,__v_skip:!0,type:t.type,props:g,key:g&&G0(g),ref:e&&e.ref?r&&c?Ft(c)?c.concat(ic(e)):[c,ic(e)]:ic(e):c,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:h,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==re?f===-1?16:f|16:f,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:d,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ri(t.ssContent),ssFallback:t.ssFallback&&Ri(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return d&&o&&(v.transition=d.clone(v)),v}function me(t=" ",e=0){return It(Qc,null,t,e)}function Kt(t="",e=!1){return e?(et(),Yt(yn,null,t)):It(yn,null,t)}function lr(t){return t==null||typeof t=="boolean"?It(yn):Ft(t)?It(re,null,t.slice()):typeof t=="object"?xi(t):It(Qc,null,String(t))}function xi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ri(t)}function Kh(t,e){let r=0;const{shapeFlag:o}=t;if(e==null)e=null;else if(Ft(e))r=16;else if(typeof e=="object")if(o&65){const s=e.default;s&&(s._c&&(s._d=!1),Kh(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!z0(e)?e._ctx=je:s===3&&je&&(je.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Gt(e)?(e={default:e,_ctx:je},r=32):(e=String(e),o&64?(r=16,e=[me(e)]):r=8);t.children=e,t.shapeFlag|=r}function $i(...t){const e={};for(let r=0;r<t.length;r++){const o=t[r];for(const s in o)if(s==="class")e.class!==o.class&&(e.class=de([e.class,o.class]));else if(s==="style")e.style=ln([e.style,o.style]);else if(Bc(s)){const c=e[s],f=o[s];f&&c!==f&&!(Ft(c)&&c.includes(f))&&(e[s]=c?[].concat(c,f):f)}else s!==""&&(e[s]=o[s])}return e}function xr(t,e,r,o=null){Vn(t,e,7,[r,o])}const ES=O0();let LS=0;function AS(t,e,r){const o=t.type,s=(e?e.appContext:t.appContext)||ES,c={uid:LS++,vnode:t,type:o,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Vx(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:F0(o,s),emitsOptions:x0(o,s),emit:null,emitted:null,propsDefaults:ye,inheritAttrs:o.inheritAttrs,ctx:ye,data:ye,props:ye,attrs:ye,slots:ye,refs:ye,setupState:ye,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return c.ctx={_:c},c.root=e?e.root:c,c.emit=T_.bind(null,c),t.ce&&t.ce(c),c}let tn=null;const Xl=()=>tn||je;let _c,Zf;{const t=Km(),e=(r,o)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(o),c=>{s.length>1?s.forEach(f=>f(c)):s[0](c)}};_c=e("__VUE_INSTANCE_SETTERS__",r=>tn=r),Zf=e("__VUE_SSR_SETTERS__",r=>tu=r)}const Yl=t=>{const e=tn;return _c(t),t.scope.on(),()=>{t.scope.off(),_c(e)}},jg=()=>{tn&&tn.scope.off(),_c(null)};function X0(t){return t.vnode.shapeFlag&4}let tu=!1;function MS(t,e=!1){e&&Zf(e);const{props:r,children:o}=t.vnode,s=X0(t);vS(t,r,s,e),bS(t,o);const c=s?NS(t,e):void 0;return e&&Zf(!1),c}function NS(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,sS);const{setup:o}=r;if(o){const s=t.setupContext=o.length>1?Z0(t):null,c=Yl(t);qi();const f=Ni(o,t,0,[t.props,s]);if(Bi(),c(),Wm(f)){if(f.then(jg,jg),e)return f.then(h=>{Jf(t,h,e)}).catch(h=>{Kl(h,t,0)});t.asyncDep=f}else Jf(t,f,e)}else Y0(t,e)}function Jf(t,e,r){Gt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:be(e)&&(t.setupState=p0(e)),Y0(t,r)}let Vg;function Y0(t,e,r){const o=t.type;if(!t.render){if(!e&&Vg&&!o.render){const s=o.template||Vh(t).template;if(s){const{isCustomElement:c,compilerOptions:f}=t.appContext.config,{delimiters:h,compilerOptions:d}=o,g=Re(Re({isCustomElement:c,delimiters:h},f),d);o.render=Vg(s,g)}}t.render=o.render||Wn}{const s=Yl(t);qi();try{cS(t)}finally{Bi(),s()}}}const $S={get(t,e){return Mn(t,"get",""),t[e]}};function Z0(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,$S),slots:t.slots,emit:t.emit,expose:e}}function eu(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(p0(f0(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in pl)return pl[r](t)},has(e,r){return r in e||r in pl}}))}function PS(t,e=!0){return Gt(t)?t.displayName||t.name:t.name||e&&t.__name}function OS(t){return Gt(t)&&"__vccOpts"in t}const _t=(t,e)=>g_(t,e,tu);function J0(t,e,r=ye){const o=Xl(),s=hr(e),c=Hi(e),f=g0((d,g)=>{let v;return j_(()=>{const y=t[e];Ar(v,y)&&(v=y,g())}),{get(){return d(),r.get?r.get(v):v},set(y){const w=o.vnode.props;!(w&&(e in w||s in w||c in w)&&(`onUpdate:${e}`in w||`onUpdate:${s}`in w||`onUpdate:${c}`in w))&&Ar(y,v)&&(v=y,g()),o.emit(`update:${e}`,r.set?r.set(y):y)}}}),h="modelModifiers";return f[Symbol.iterator]=()=>{let d=0;return{next(){return d<2?{value:d++?t[h]||{}:f,done:!1}:{done:!0}}}},f}function Zl(t,e,r){const o=arguments.length;return o===2?be(e)&&!Ft(e)?Ml(e)?It(t,null,[e]):It(t,e):It(t,null,e):(o>3?r=Array.prototype.slice.call(arguments,2):o===3&&Ml(r)&&(r=[r]),It(t,e,r))}const RS="3.4.27";/**
|
|
13
|
+
**/function Ni(t,e,r,o){try{return o?t(...o):t()}catch(s){Kl(s,e,r)}}function Vn(t,e,r,o){if(Gt(t)){const s=Ni(t,e,r,o);return s&&Wm(s)&&s.catch(c=>{Kl(c,e,r)}),s}if(Ft(t)){const s=[];for(let c=0;c<t.length;c++)s.push(Vn(t[c],e,r,o));return s}}function Kl(t,e,r,o=!0){const s=e?e.vnode:null;if(e){let c=e.parent;const f=e.proxy,h=`https://vuejs.org/error-reference/#runtime-${r}`;for(;c;){const g=c.ec;if(g){for(let v=0;v<g.length;v++)if(g[v](t,f,h)===!1)return}c=c.parent}const d=e.appContext.config.errorHandler;if(d){qi(),Ni(d,null,10,[t,f,h]),Bi();return}}__(t,r,s,o)}function __(t,e,r,o=!0){console.error(t)}let El=!1,Hf=!1;const on=[];let _r=0;const os=[];let bi=null,uo=0;const m0=Promise.resolve();let Hh=null;function Xr(t){const e=Hh||m0;return t?e.then(this?t.bind(this):t):e}function S_(t){let e=_r+1,r=on.length;for(;e<r;){const o=e+r>>>1,s=on[o],c=Ll(s);c<t||c===t&&s.pre?e=o+1:r=o}return e}function qh(t){(!on.length||!on.includes(t,El&&t.allowRecurse?_r+1:_r))&&(t.id==null?on.push(t):on.splice(S_(t.id),0,t),y0())}function y0(){!El&&!Hf&&(Hf=!0,Hh=m0.then(w0))}function k_(t){const e=on.indexOf(t);e>_r&&on.splice(e,1)}function qf(t){Ft(t)?os.push(...t):(!bi||!bi.includes(t,t.allowRecurse?uo+1:uo))&&os.push(t),y0()}function Pg(t,e,r=El?_r+1:0){for(;r<on.length;r++){const o=on[r];if(o&&o.pre){if(t&&o.id!==t.uid)continue;on.splice(r,1),r--,o()}}}function b0(t){if(os.length){const e=[...new Set(os)].sort((r,o)=>Ll(r)-Ll(o));if(os.length=0,bi){bi.push(...e);return}for(bi=e,uo=0;uo<bi.length;uo++)bi[uo]();bi=null,uo=0}}const Ll=t=>t.id==null?1/0:t.id,C_=(t,e)=>{const r=Ll(t)-Ll(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function w0(t){Hf=!1,El=!0,on.sort(C_);try{for(_r=0;_r<on.length;_r++){const e=on[_r];e&&e.active!==!1&&Ni(e,null,14)}}finally{_r=0,on.length=0,b0(),El=!1,Hh=null,(on.length||os.length)&&w0()}}function T_(t,e,...r){if(t.isUnmounted)return;const o=t.vnode.props||ye;let s=r;const c=e.startsWith("update:"),f=c&&e.slice(7);if(f&&f in o){const v=`${f==="modelValue"?"model":f}Modifiers`,{number:y,trim:w}=o[v]||ye;w&&(s=r.map(_=>De(_)?_.trim():_)),y&&(s=r.map(Df))}let h,d=o[h=uf(e)]||o[h=uf(hr(e))];!d&&c&&(d=o[h=uf(Hi(e))]),d&&Vn(d,t,6,s);const g=o[h+"Once"];if(g){if(!t.emitted)t.emitted={};else if(t.emitted[h])return;t.emitted[h]=!0,Vn(g,t,6,s)}}function x0(t,e,r=!1){const o=e.emitsCache,s=o.get(t);if(s!==void 0)return s;const c=t.emits;let f={},h=!1;if(!Gt(t)){const d=g=>{const v=x0(g,e,!0);v&&(h=!0,Re(f,v))};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}return!c&&!h?(be(t)&&o.set(t,null),null):(Ft(c)?c.forEach(d=>f[d]=null):Re(f,c),be(t)&&o.set(t,f),f)}function Kc(t,e){return!t||!Bc(e)?!1:(e=e.slice(2).replace(/Once$/,""),ae(t,e[0].toLowerCase()+e.slice(1))||ae(t,Hi(e))||ae(t,e))}let je=null,Xc=null;function yc(t){const e=je;return je=t,Xc=t&&t.type.__scopeId||null,e}function _0(t){Xc=t}function S0(){Xc=null}const E_=t=>ie;function ie(t,e=je,r){if(!e||t._n)return t;const o=(...s)=>{o._d&&xc(-1);const c=yc(e);let f;try{f=t(...s)}finally{yc(c),o._d&&xc(1)}return f};return o._n=!0,o._c=!0,o._d=!0,o}function hf(t){const{type:e,vnode:r,proxy:o,withProxy:s,propsOptions:[c],slots:f,attrs:h,emit:d,render:g,renderCache:v,props:y,data:w,setupState:_,ctx:L,inheritAttrs:M}=t,A=yc(t);let T,E;try{if(r.shapeFlag&4){const $=s||o,F=$;T=lr(g.call(F,$,v,y,_,w,L)),E=h}else{const $=e;T=lr($.length>1?$(y,{attrs:h,slots:f,emit:d}):$(y,null)),E=e.props?h:A_(h)}}catch($){vl.length=0,Kl($,t,1),T=It(bn)}let P=T;if(E&&M!==!1){const $=Object.keys(E),{shapeFlag:F}=P;$.length&&F&7&&(c&&$.some(Lh)&&(E=M_(E,c)),P=Ri(P,E,!1,!0))}return r.dirs&&(P=Ri(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(r.dirs):r.dirs),r.transition&&(P.transition=r.transition),T=P,yc(A),T}function L_(t,e=!0){let r;for(let o=0;o<t.length;o++){const s=t[o];if(Ml(s)){if(s.type!==bn||s.children==="v-if"){if(r)return;r=s}}else return}return r}const A_=t=>{let e;for(const r in t)(r==="class"||r==="style"||Bc(r))&&((e||(e={}))[r]=t[r]);return e},M_=(t,e)=>{const r={};for(const o in t)(!Lh(o)||!(o.slice(9)in e))&&(r[o]=t[o]);return r};function N_(t,e,r){const{props:o,children:s,component:c}=t,{props:f,children:h,patchFlag:d}=e,g=c.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&d>=0){if(d&1024)return!0;if(d&16)return o?Og(o,f,g):!!f;if(d&8){const v=e.dynamicProps;for(let y=0;y<v.length;y++){const w=v[y];if(f[w]!==o[w]&&!Kc(g,w))return!0}}}else return(s||h)&&(!h||!h.$stable)?!0:o===f?!1:o?f?Og(o,f,g):!0:!!f;return!1}function Og(t,e,r){const o=Object.keys(e);if(o.length!==Object.keys(t).length)return!0;for(let s=0;s<o.length;s++){const c=o[s];if(e[c]!==t[c]&&!Kc(r,c))return!0}return!1}function Bh({vnode:t,parent:e},r){for(;e;){const o=e.subTree;if(o.suspense&&o.suspense.activeBranch===t&&(o.el=t.el),o===t)(t=e.vnode).el=r,e=e.parent;else break}}const k0="components",$_="directives";function yo(t,e){return C0(k0,t,!0,e)||t}const P_=Symbol.for("v-ndc");function Wi(t){return C0($_,t)}function C0(t,e,r=!0,o=!1){const s=je||tn;if(s){const c=s.type;if(t===k0){const h=PS(c,!1);if(h&&(h===e||h===hr(e)||h===jc(hr(e))))return c}const f=Rg(s[t]||c[t],e)||Rg(s.appContext[t],e);return!f&&o?c:f}}function Rg(t,e){return t&&(t[e]||t[hr(e)]||t[jc(hr(e))])}const O_=t=>t.__isSuspense;let Bf=0;const R_={name:"Suspense",__isSuspense:!0,process(t,e,r,o,s,c,f,h,d,g){if(t==null)z_(e,r,o,s,c,f,h,d,g);else{if(c&&c.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}I_(t,e,r,o,s,f,h,d,g)}},hydrate:F_,create:Wh,normalize:H_},D_=R_;function Al(t,e){const r=t.props&&t.props[e];Gt(r)&&r()}function z_(t,e,r,o,s,c,f,h,d){const{p:g,o:{createElement:v}}=d,y=v("div"),w=t.suspense=Wh(t,s,o,e,y,r,c,f,h,d);g(null,w.pendingBranch=t.ssContent,y,null,o,w,c,f),w.deps>0?(Al(t,"onPending"),Al(t,"onFallback"),g(null,t.ssFallback,e,r,o,null,c,f),ss(w,t.ssFallback)):w.resolve(!1,!0)}function I_(t,e,r,o,s,c,f,h,{p:d,um:g,o:{createElement:v}}){const y=e.suspense=t.suspense;y.vnode=e,e.el=t.el;const w=e.ssContent,_=e.ssFallback,{activeBranch:L,pendingBranch:M,isInFallback:A,isHydrating:T}=y;if(M)y.pendingBranch=w,Sr(w,M)?(d(M,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0?y.resolve():A&&(T||(d(L,_,r,o,s,null,c,f,h),ss(y,_)))):(y.pendingId=Bf++,T?(y.isHydrating=!1,y.activeBranch=M):g(M,s,y),y.deps=0,y.effects.length=0,y.hiddenContainer=v("div"),A?(d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0?y.resolve():(d(L,_,r,o,s,null,c,f,h),ss(y,_))):L&&Sr(w,L)?(d(L,w,r,o,s,y,c,f,h),y.resolve(!0)):(d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0&&y.resolve()));else if(L&&Sr(w,L))d(L,w,r,o,s,y,c,f,h),ss(y,w);else if(Al(e,"onPending"),y.pendingBranch=w,w.shapeFlag&512?y.pendingId=w.component.suspenseId:y.pendingId=Bf++,d(null,w,y.hiddenContainer,null,s,y,c,f,h),y.deps<=0)y.resolve();else{const{timeout:E,pendingId:P}=y;E>0?setTimeout(()=>{y.pendingId===P&&y.fallback(_)},E):E===0&&y.fallback(_)}}function Wh(t,e,r,o,s,c,f,h,d,g,v=!1){const{p:y,m:w,um:_,n:L,o:{parentNode:M,remove:A}}=g;let T;const E=B_(t);E&&e&&e.pendingBranch&&(T=e.pendingId,e.deps++);const P=t.props?Gm(t.props.timeout):void 0,$=c,F={vnode:t,parent:e,parentComponent:r,namespace:f,container:o,hiddenContainer:s,deps:0,pendingId:Bf++,timeout:typeof P=="number"?P:-1,activeBranch:null,pendingBranch:null,isInFallback:!v,isHydrating:v,isUnmounted:!1,effects:[],resolve(H=!1,st=!1){const{vnode:Y,activeBranch:ht,pendingBranch:Z,pendingId:ut,effects:lt,parentComponent:G,container:I}=F;let k=!1;F.isHydrating?F.isHydrating=!1:H||(k=ht&&Z.transition&&Z.transition.mode==="out-in",k&&(ht.transition.afterLeave=()=>{ut===F.pendingId&&(w(Z,I,c===$?L(ht):c,0),qf(lt))}),ht&&(M(ht.el)!==F.hiddenContainer&&(c=L(ht)),_(ht,G,F,!0)),k||w(Z,I,c,0)),ss(F,Z),F.pendingBranch=null,F.isInFallback=!1;let q=F.parent,U=!1;for(;q;){if(q.pendingBranch){q.effects.push(...lt),U=!0;break}q=q.parent}!U&&!k&&qf(lt),F.effects=[],E&&e&&e.pendingBranch&&T===e.pendingId&&(e.deps--,e.deps===0&&!st&&e.resolve()),Al(Y,"onResolve")},fallback(H){if(!F.pendingBranch)return;const{vnode:st,activeBranch:Y,parentComponent:ht,container:Z,namespace:ut}=F;Al(st,"onFallback");const lt=L(Y),G=()=>{F.isInFallback&&(y(null,H,Z,lt,ht,null,ut,h,d),ss(F,H))},I=H.transition&&H.transition.mode==="out-in";I&&(Y.transition.afterLeave=G),F.isInFallback=!0,_(Y,ht,null,!0),I||G()},move(H,st,Y){F.activeBranch&&w(F.activeBranch,H,st,Y),F.container=H},next(){return F.activeBranch&&L(F.activeBranch)},registerDep(H,st){const Y=!!F.pendingBranch;Y&&F.deps++;const ht=H.vnode.el;H.asyncDep.catch(Z=>{Kl(Z,H,0)}).then(Z=>{if(H.isUnmounted||F.isUnmounted||F.pendingId!==H.suspenseId)return;H.asyncResolved=!0;const{vnode:ut}=H;Jf(H,Z,!1),ht&&(ut.el=ht);const lt=!ht&&H.subTree.el;st(H,ut,M(ht||H.subTree.el),ht?null:L(H.subTree),F,f,d),lt&&A(lt),Bh(H,ut.el),Y&&--F.deps===0&&F.resolve()})},unmount(H,st){F.isUnmounted=!0,F.activeBranch&&_(F.activeBranch,r,H,st),F.pendingBranch&&_(F.pendingBranch,r,H,st)}};return F}function F_(t,e,r,o,s,c,f,h,d){const g=e.suspense=Wh(e,o,r,t.parentNode,document.createElement("div"),null,s,c,f,h,!0),v=d(t,g.pendingBranch=e.ssContent,r,g,c,f);return g.deps===0&&g.resolve(!1,!0),v}function H_(t){const{shapeFlag:e,children:r}=t,o=e&32;t.ssContent=Dg(o?r.default:r),t.ssFallback=o?Dg(r.fallback):It(bn)}function Dg(t){let e;if(Gt(t)){const r=hs&&t._c;r&&(t._d=!1,et()),t=t(),r&&(t._d=!0,e=Un,j0())}return Ft(t)&&(t=L_(t)),t=lr(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(r=>r!==t)),t}function q_(t,e){e&&e.pendingBranch?Ft(t)?e.effects.push(...t):e.effects.push(t):qf(t)}function ss(t,e){t.activeBranch=e;const{vnode:r,parentComponent:o}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;r.el=s,o&&o.subTree===r&&(o.vnode.el=s,Bh(o,s))}function B_(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const W_=Symbol.for("v-scx"),U_=()=>Gr(W_);function Uh(t,e){return Yc(t,null,e)}function j_(t,e){return Yc(t,null,{flush:"sync"})}const qa={};function Ge(t,e,r){return Yc(t,e,r)}function Yc(t,e,{immediate:r,deep:o,flush:s,once:c,onTrack:f,onTrigger:h}=ye){if(e&&c){const H=e;e=(...st)=>{H(...st),F()}}const d=tn,g=H=>o===!0?H:fo(H,o===!1?1:void 0);let v,y=!1,w=!1;if(Ae(t)?(v=()=>t.value,y=mc(t)):fl(t)?(v=()=>g(t),y=!0):Ft(t)?(w=!0,y=t.some(H=>fl(H)||mc(H)),v=()=>t.map(H=>{if(Ae(H))return H.value;if(fl(H))return g(H);if(Gt(H))return Ni(H,d,2)})):Gt(t)?e?v=()=>Ni(t,d,2):v=()=>(_&&_(),Vn(t,d,3,[L])):v=Wn,e&&o){const H=v;v=()=>fo(H())}let _,L=H=>{_=P.onStop=()=>{Ni(H,d,4),_=P.onStop=void 0}},M;if(tu)if(L=Wn,e?r&&Vn(e,d,3,[v(),w?[]:void 0,L]):v(),s==="sync"){const H=U_();M=H.__watcherHandles||(H.__watcherHandles=[])}else return Wn;let A=w?new Array(t.length).fill(qa):qa;const T=()=>{if(!(!P.active||!P.dirty))if(e){const H=P.run();(o||y||(w?H.some((st,Y)=>Ar(st,A[Y])):Ar(H,A)))&&(_&&_(),Vn(e,d,3,[H,A===qa?void 0:w&&A[0]===qa?[]:A,L]),A=H)}else P.run()};T.allowRecurse=!!e;let E;s==="sync"?E=T:s==="post"?E=()=>Tn(T,d&&d.suspense):(T.pre=!0,d&&(T.id=d.uid),E=()=>qh(T));const P=new Nh(v,Wn,E),$=Zm(),F=()=>{P.stop(),$&&Ah($.effects,P)};return e?r?T():A=P.run():s==="post"?Tn(P.run.bind(P),d&&d.suspense):P.run(),M&&M.push(F),F}function V_(t,e,r){const o=this.proxy,s=De(t)?t.includes(".")?T0(o,t):()=>o[t]:t.bind(o,o);let c;Gt(e)?c=e:(c=e.handler,r=e);const f=Yl(this),h=Yc(s,c.bind(o),r);return f(),h}function T0(t,e){const r=e.split(".");return()=>{let o=t;for(let s=0;s<r.length&&o;s++)o=o[r[s]];return o}}function fo(t,e=1/0,r){if(e<=0||!be(t)||t.__v_skip||(r=r||new Set,r.has(t)))return t;if(r.add(t),e--,Ae(t))fo(t.value,e,r);else if(Ft(t))for(let o=0;o<t.length;o++)fo(t[o],e,r);else if(Bm(t)||is(t))t.forEach(o=>{fo(o,e,r)});else if(jm(t))for(const o in t)fo(t[o],e,r);return t}function Se(t,e){if(je===null)return t;const r=eu(je)||je.proxy,o=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[c,f,h,d=ye]=e[s];c&&(Gt(c)&&(c={mounted:c,updated:c}),c.deep&&fo(f),o.push({dir:c,instance:r,value:f,oldValue:void 0,arg:h,modifiers:d}))}return t}function io(t,e,r,o){const s=t.dirs,c=e&&e.dirs;for(let f=0;f<s.length;f++){const h=s[f];c&&(h.oldValue=c[f].value);let d=h.dir[o];d&&(qi(),Vn(d,r,8,[t.el,h,t,e]),Bi())}}const wi=Symbol("_leaveCb"),Ba=Symbol("_enterCb");function G_(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return xs(()=>{t.isMounted=!0}),N0(()=>{t.isUnmounting=!0}),t}const qn=[Function,Array],E0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:qn,onEnter:qn,onAfterEnter:qn,onEnterCancelled:qn,onBeforeLeave:qn,onLeave:qn,onAfterLeave:qn,onLeaveCancelled:qn,onBeforeAppear:qn,onAppear:qn,onAfterAppear:qn,onAppearCancelled:qn},K_={name:"BaseTransition",props:E0,setup(t,{slots:e}){const r=Xl(),o=G_();return()=>{const s=e.default&&A0(e.default(),!0);if(!s||!s.length)return;let c=s[0];if(s.length>1){for(const w of s)if(w.type!==bn){c=w;break}}const f=fe(t),{mode:h}=f;if(o.isLeaving)return df(c);const d=zg(c);if(!d)return df(c);const g=Wf(d,f,o,r);Uf(d,g);const v=r.subTree,y=v&&zg(v);if(y&&y.type!==bn&&!Sr(d,y)){const w=Wf(y,f,o,r);if(Uf(y,w),h==="out-in"&&d.type!==bn)return o.isLeaving=!0,w.afterLeave=()=>{o.isLeaving=!1,r.update.active!==!1&&(r.effect.dirty=!0,r.update())},df(c);h==="in-out"&&d.type!==bn&&(w.delayLeave=(_,L,M)=>{const A=L0(o,y);A[String(y.key)]=y,_[wi]=()=>{L(),_[wi]=void 0,delete g.delayedLeave},g.delayedLeave=M})}return c}}},X_=K_;function L0(t,e){const{leavingVNodes:r}=t;let o=r.get(e.type);return o||(o=Object.create(null),r.set(e.type,o)),o}function Wf(t,e,r,o){const{appear:s,mode:c,persisted:f=!1,onBeforeEnter:h,onEnter:d,onAfterEnter:g,onEnterCancelled:v,onBeforeLeave:y,onLeave:w,onAfterLeave:_,onLeaveCancelled:L,onBeforeAppear:M,onAppear:A,onAfterAppear:T,onAppearCancelled:E}=e,P=String(t.key),$=L0(r,t),F=(Y,ht)=>{Y&&Vn(Y,o,9,ht)},H=(Y,ht)=>{const Z=ht[1];F(Y,ht),Ft(Y)?Y.every(ut=>ut.length<=1)&&Z():Y.length<=1&&Z()},st={mode:c,persisted:f,beforeEnter(Y){let ht=h;if(!r.isMounted)if(s)ht=M||h;else return;Y[wi]&&Y[wi](!0);const Z=$[P];Z&&Sr(t,Z)&&Z.el[wi]&&Z.el[wi](),F(ht,[Y])},enter(Y){let ht=d,Z=g,ut=v;if(!r.isMounted)if(s)ht=A||d,Z=T||g,ut=E||v;else return;let lt=!1;const G=Y[Ba]=I=>{lt||(lt=!0,I?F(ut,[Y]):F(Z,[Y]),st.delayedLeave&&st.delayedLeave(),Y[Ba]=void 0)};ht?H(ht,[Y,G]):G()},leave(Y,ht){const Z=String(t.key);if(Y[Ba]&&Y[Ba](!0),r.isUnmounting)return ht();F(y,[Y]);let ut=!1;const lt=Y[wi]=G=>{ut||(ut=!0,ht(),G?F(L,[Y]):F(_,[Y]),Y[wi]=void 0,$[Z]===t&&delete $[Z])};$[Z]=t,w?H(w,[Y,lt]):lt()},clone(Y){return Wf(Y,e,r,o)}};return st}function df(t){if(Zc(t))return t=Ri(t),t.children=null,t}function zg(t){if(!Zc(t))return t;const{shapeFlag:e,children:r}=t;if(r){if(e&16)return r[0];if(e&32&&Gt(r.default))return r.default()}}function Uf(t,e){t.shapeFlag&6&&t.component?Uf(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function A0(t,e=!1,r){let o=[],s=0;for(let c=0;c<t.length;c++){let f=t[c];const h=r==null?f.key:String(r)+String(f.key!=null?f.key:c);f.type===re?(f.patchFlag&128&&s++,o=o.concat(A0(f.children,e,h))):(e||f.type!==bn)&&o.push(h!=null?Ri(f,{key:h}):f)}if(s>1)for(let c=0;c<o.length;c++)o[c].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function he(t,e){return Gt(t)?Re({name:t.name},e,{setup:t}):t}const dl=t=>!!t.type.__asyncLoader,Zc=t=>t.type.__isKeepAlive;function Y_(t,e){M0(t,"a",e)}function Z_(t,e){M0(t,"da",e)}function M0(t,e,r=tn){const o=t.__wdc||(t.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Jc(e,o,r),r){let s=r.parent;for(;s&&s.parent;)Zc(s.parent.vnode)&&J_(o,e,r,s),s=s.parent}}function J_(t,e,r,o){const s=Jc(e,t,o,!0);jh(()=>{Ah(o[e],s)},r)}function Jc(t,e,r=tn,o=!1){if(r){const s=r[t]||(r[t]=[]),c=e.__weh||(e.__weh=(...f)=>{if(r.isUnmounted)return;qi();const h=Yl(r),d=Vn(e,r,t,f);return h(),Bi(),d});return o?s.unshift(c):s.push(c),c}}const Jr=t=>(e,r=tn)=>(!tu||t==="sp")&&Jc(t,(...o)=>e(...o),r),Q_=Jr("bm"),xs=Jr("m"),tS=Jr("bu"),eS=Jr("u"),N0=Jr("bum"),jh=Jr("um"),nS=Jr("sp"),rS=Jr("rtg"),iS=Jr("rtc");function oS(t,e=tn){Jc("ec",t,e)}function Rn(t,e,r,o){let s;const c=r;if(Ft(t)||De(t)){s=new Array(t.length);for(let f=0,h=t.length;f<h;f++)s[f]=e(t[f],f,void 0,c)}else if(typeof t=="number"){s=new Array(t);for(let f=0;f<t;f++)s[f]=e(f+1,f,void 0,c)}else if(be(t))if(t[Symbol.iterator])s=Array.from(t,(f,h)=>e(f,h,void 0,c));else{const f=Object.keys(t);s=new Array(f.length);for(let h=0,d=f.length;h<d;h++){const g=f[h];s[h]=e(t[g],g,h,c)}}else s=[];return s}function Gn(t,e,r={},o,s){if(je.isCE||je.parent&&dl(je.parent)&&je.parent.isCE)return e!=="default"&&(r.name=e),It("slot",r,o&&o());let c=t[e];c&&c._c&&(c._d=!1),et();const f=c&&$0(c(r)),h=Yt(re,{key:r.key||f&&f.key||`_${e}`},f||(o?o():[]),f&&t._===1?64:-2);return h.scopeId&&(h.slotScopeIds=[h.scopeId+"-s"]),c&&c._c&&(c._d=!0),h}function $0(t){return t.some(e=>Ml(e)?!(e.type===bn||e.type===re&&!$0(e.children)):!0)?t:null}const jf=t=>t?X0(t)?eu(t)||t.proxy:jf(t.parent):null,pl=Re(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>jf(t.parent),$root:t=>jf(t.root),$emit:t=>t.emit,$options:t=>Vh(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,qh(t.update)}),$nextTick:t=>t.n||(t.n=Xr.bind(t.proxy)),$watch:t=>V_.bind(t)}),pf=(t,e)=>t!==ye&&!t.__isScriptSetup&&ae(t,e),sS={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:r,setupState:o,data:s,props:c,accessCache:f,type:h,appContext:d}=t;let g;if(e[0]!=="$"){const _=f[e];if(_!==void 0)switch(_){case 1:return o[e];case 2:return s[e];case 4:return r[e];case 3:return c[e]}else{if(pf(o,e))return f[e]=1,o[e];if(s!==ye&&ae(s,e))return f[e]=2,s[e];if((g=t.propsOptions[0])&&ae(g,e))return f[e]=3,c[e];if(r!==ye&&ae(r,e))return f[e]=4,r[e];Gf&&(f[e]=0)}}const v=pl[e];let y,w;if(v)return e==="$attrs"&&Mn(t.attrs,"get",""),v(t);if((y=h.__cssModules)&&(y=y[e]))return y;if(r!==ye&&ae(r,e))return f[e]=4,r[e];if(w=d.config.globalProperties,ae(w,e))return w[e]},set({_:t},e,r){const{data:o,setupState:s,ctx:c}=t;return pf(s,e)?(s[e]=r,!0):o!==ye&&ae(o,e)?(o[e]=r,!0):ae(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(c[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:o,appContext:s,propsOptions:c}},f){let h;return!!r[f]||t!==ye&&ae(t,f)||pf(e,f)||(h=c[0])&&ae(h,f)||ae(o,f)||ae(pl,f)||ae(s.config.globalProperties,f)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:ae(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function lS(){return aS().attrs}function aS(){const t=Xl();return t.setupContext||(t.setupContext=Z0(t))}function bc(t){return Ft(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}function Vf(t,e){return!t||!e?t||e:Ft(t)&&Ft(e)?t.concat(e):Re({},bc(t),bc(e))}let Gf=!0;function cS(t){const e=Vh(t),r=t.proxy,o=t.ctx;Gf=!1,e.beforeCreate&&Ig(e.beforeCreate,t,"bc");const{data:s,computed:c,methods:f,watch:h,provide:d,inject:g,created:v,beforeMount:y,mounted:w,beforeUpdate:_,updated:L,activated:M,deactivated:A,beforeDestroy:T,beforeUnmount:E,destroyed:P,unmounted:$,render:F,renderTracked:H,renderTriggered:st,errorCaptured:Y,serverPrefetch:ht,expose:Z,inheritAttrs:ut,components:lt,directives:G,filters:I}=e;if(g&&uS(g,o,null),f)for(const U in f){const tt=f[U];Gt(tt)&&(o[U]=tt.bind(r))}if(s){const U=s.call(r,r);be(U)&&(t.data=Cr(U))}if(Gf=!0,c)for(const U in c){const tt=c[U],mt=Gt(tt)?tt.bind(r,r):Gt(tt.get)?tt.get.bind(r,r):Wn,Mt=!Gt(tt)&&Gt(tt.set)?tt.set.bind(r):Wn,qt=_t({get:mt,set:Mt});Object.defineProperty(o,U,{enumerable:!0,configurable:!0,get:()=>qt.value,set:Wt=>qt.value=Wt})}if(h)for(const U in h)P0(h[U],o,r,U);if(d){const U=Gt(d)?d.call(r):d;Reflect.ownKeys(U).forEach(tt=>{rc(tt,U[tt])})}v&&Ig(v,t,"c");function q(U,tt){Ft(tt)?tt.forEach(mt=>U(mt.bind(r))):tt&&U(tt.bind(r))}if(q(Q_,y),q(xs,w),q(tS,_),q(eS,L),q(Y_,M),q(Z_,A),q(oS,Y),q(iS,H),q(rS,st),q(N0,E),q(jh,$),q(nS,ht),Ft(Z))if(Z.length){const U=t.exposed||(t.exposed={});Z.forEach(tt=>{Object.defineProperty(U,tt,{get:()=>r[tt],set:mt=>r[tt]=mt})})}else t.exposed||(t.exposed={});F&&t.render===Wn&&(t.render=F),ut!=null&&(t.inheritAttrs=ut),lt&&(t.components=lt),G&&(t.directives=G)}function uS(t,e,r=Wn){Ft(t)&&(t=Kf(t));for(const o in t){const s=t[o];let c;be(s)?"default"in s?c=Gr(s.from||o,s.default,!0):c=Gr(s.from||o):c=Gr(s),Ae(c)?Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>c.value,set:f=>c.value=f}):e[o]=c}}function Ig(t,e,r){Vn(Ft(t)?t.map(o=>o.bind(e.proxy)):t.bind(e.proxy),e,r)}function P0(t,e,r,o){const s=o.includes(".")?T0(r,o):()=>r[o];if(De(t)){const c=e[t];Gt(c)&&Ge(s,c)}else if(Gt(t))Ge(s,t.bind(r));else if(be(t))if(Ft(t))t.forEach(c=>P0(c,e,r,o));else{const c=Gt(t.handler)?t.handler.bind(r):e[t.handler];Gt(c)&&Ge(s,c,t)}}function Vh(t){const e=t.type,{mixins:r,extends:o}=e,{mixins:s,optionsCache:c,config:{optionMergeStrategies:f}}=t.appContext,h=c.get(e);let d;return h?d=h:!s.length&&!r&&!o?d=e:(d={},s.length&&s.forEach(g=>wc(d,g,f,!0)),wc(d,e,f)),be(e)&&c.set(e,d),d}function wc(t,e,r,o=!1){const{mixins:s,extends:c}=e;c&&wc(t,c,r,!0),s&&s.forEach(f=>wc(t,f,r,!0));for(const f in e)if(!(o&&f==="expose")){const h=fS[f]||r&&r[f];t[f]=h?h(t[f],e[f]):e[f]}return t}const fS={data:Fg,props:Hg,emits:Hg,methods:ll,computed:ll,beforeCreate:gn,created:gn,beforeMount:gn,mounted:gn,beforeUpdate:gn,updated:gn,beforeDestroy:gn,beforeUnmount:gn,destroyed:gn,unmounted:gn,activated:gn,deactivated:gn,errorCaptured:gn,serverPrefetch:gn,components:ll,directives:ll,watch:dS,provide:Fg,inject:hS};function Fg(t,e){return e?t?function(){return Re(Gt(t)?t.call(this,this):t,Gt(e)?e.call(this,this):e)}:e:t}function hS(t,e){return ll(Kf(t),Kf(e))}function Kf(t){if(Ft(t)){const e={};for(let r=0;r<t.length;r++)e[t[r]]=t[r];return e}return t}function gn(t,e){return t?[...new Set([].concat(t,e))]:e}function ll(t,e){return t?Re(Object.create(null),t,e):e}function Hg(t,e){return t?Ft(t)&&Ft(e)?[...new Set([...t,...e])]:Re(Object.create(null),bc(t),bc(e??{})):e}function dS(t,e){if(!t)return e;if(!e)return t;const r=Re(Object.create(null),t);for(const o in e)r[o]=gn(t[o],e[o]);return r}function O0(){return{app:null,config:{isNativeTag:Ox,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let pS=0;function gS(t,e){return function(o,s=null){Gt(o)||(o=Re({},o)),s!=null&&!be(s)&&(s=null);const c=O0(),f=new WeakSet;let h=!1;const d=c.app={_uid:pS++,_component:o,_props:s,_container:null,_context:c,_instance:null,version:RS,get config(){return c.config},set config(g){},use(g,...v){return f.has(g)||(g&&Gt(g.install)?(f.add(g),g.install(d,...v)):Gt(g)&&(f.add(g),g(d,...v))),d},mixin(g){return c.mixins.includes(g)||c.mixins.push(g),d},component(g,v){return v?(c.components[g]=v,d):c.components[g]},directive(g,v){return v?(c.directives[g]=v,d):c.directives[g]},mount(g,v,y){if(!h){const w=It(o,s);return w.appContext=c,y===!0?y="svg":y===!1&&(y=void 0),v&&e?e(w,g):t(w,g,y),h=!0,d._container=g,g.__vue_app__=d,eu(w.component)||w.component.proxy}},unmount(){h&&(t(null,d._container),delete d._container.__vue_app__)},provide(g,v){return c.provides[g]=v,d},runWithContext(g){const v=gl;gl=d;try{return g()}finally{gl=v}}};return d}}let gl=null;function rc(t,e){if(tn){let r=tn.provides;const o=tn.parent&&tn.parent.provides;o===r&&(r=tn.provides=Object.create(o)),r[t]=e}}function Gr(t,e,r=!1){const o=tn||je;if(o||gl){const s=o?o.parent==null?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:gl._context.provides;if(s&&t in s)return s[t];if(arguments.length>1)return r&&Gt(e)?e.call(o&&o.proxy):e}}const R0={},D0=()=>Object.create(R0),z0=t=>Object.getPrototypeOf(t)===R0;function vS(t,e,r,o=!1){const s={},c=D0();t.propsDefaults=Object.create(null),I0(t,e,s,c);for(const f in t.propsOptions[0])f in s||(s[f]=void 0);r?t.props=o?s:c0(s):t.type.props?t.props=s:t.props=c,t.attrs=c}function mS(t,e,r,o){const{props:s,attrs:c,vnode:{patchFlag:f}}=t,h=fe(s),[d]=t.propsOptions;let g=!1;if((o||f>0)&&!(f&16)){if(f&8){const v=t.vnode.dynamicProps;for(let y=0;y<v.length;y++){let w=v[y];if(Kc(t.emitsOptions,w))continue;const _=e[w];if(d)if(ae(c,w))_!==c[w]&&(c[w]=_,g=!0);else{const L=hr(w);s[L]=Xf(d,h,L,_,t,!1)}else _!==c[w]&&(c[w]=_,g=!0)}}}else{I0(t,e,s,c)&&(g=!0);let v;for(const y in h)(!e||!ae(e,y)&&((v=Hi(y))===y||!ae(e,v)))&&(d?r&&(r[y]!==void 0||r[v]!==void 0)&&(s[y]=Xf(d,h,y,void 0,t,!0)):delete s[y]);if(c!==h)for(const y in c)(!e||!ae(e,y))&&(delete c[y],g=!0)}g&&Vr(t.attrs,"set","")}function I0(t,e,r,o){const[s,c]=t.propsOptions;let f=!1,h;if(e)for(let d in e){if(ul(d))continue;const g=e[d];let v;s&&ae(s,v=hr(d))?!c||!c.includes(v)?r[v]=g:(h||(h={}))[v]=g:Kc(t.emitsOptions,d)||(!(d in o)||g!==o[d])&&(o[d]=g,f=!0)}if(c){const d=fe(r),g=h||ye;for(let v=0;v<c.length;v++){const y=c[v];r[y]=Xf(s,d,y,g[y],t,!ae(g,y))}}return f}function Xf(t,e,r,o,s,c){const f=t[r];if(f!=null){const h=ae(f,"default");if(h&&o===void 0){const d=f.default;if(f.type!==Function&&!f.skipFactory&&Gt(d)){const{propsDefaults:g}=s;if(r in g)o=g[r];else{const v=Yl(s);o=g[r]=d.call(null,e),v()}}else o=d}f[0]&&(c&&!h?o=!1:f[1]&&(o===""||o===Hi(r))&&(o=!0))}return o}function F0(t,e,r=!1){const o=e.propsCache,s=o.get(t);if(s)return s;const c=t.props,f={},h=[];let d=!1;if(!Gt(t)){const v=y=>{d=!0;const[w,_]=F0(y,e,!0);Re(f,w),_&&h.push(..._)};!r&&e.mixins.length&&e.mixins.forEach(v),t.extends&&v(t.extends),t.mixins&&t.mixins.forEach(v)}if(!c&&!d)return be(t)&&o.set(t,rs),rs;if(Ft(c))for(let v=0;v<c.length;v++){const y=hr(c[v]);qg(y)&&(f[y]=ye)}else if(c)for(const v in c){const y=hr(v);if(qg(y)){const w=c[v],_=f[y]=Ft(w)||Gt(w)?{type:w}:Re({},w);if(_){const L=Ug(Boolean,_.type),M=Ug(String,_.type);_[0]=L>-1,_[1]=M<0||L<M,(L>-1||ae(_,"default"))&&h.push(y)}}}const g=[f,h];return be(t)&&o.set(t,g),g}function qg(t){return t[0]!=="$"&&!ul(t)}function Bg(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function Wg(t,e){return Bg(t)===Bg(e)}function Ug(t,e){return Ft(e)?e.findIndex(r=>Wg(r,t)):Gt(e)&&Wg(e,t)?0:-1}const H0=t=>t[0]==="_"||t==="$stable",Gh=t=>Ft(t)?t.map(lr):[lr(t)],yS=(t,e,r)=>{if(e._n)return e;const o=ie((...s)=>Gh(e(...s)),r);return o._c=!1,o},q0=(t,e,r)=>{const o=t._ctx;for(const s in t){if(H0(s))continue;const c=t[s];if(Gt(c))e[s]=yS(s,c,o);else if(c!=null){const f=Gh(c);e[s]=()=>f}}},B0=(t,e)=>{const r=Gh(e);t.slots.default=()=>r},bS=(t,e)=>{const r=t.slots=D0();if(t.vnode.shapeFlag&32){const o=e._;o?(Re(r,e),Vm(r,"_",o,!0)):q0(e,r)}else e&&B0(t,e)},wS=(t,e,r)=>{const{vnode:o,slots:s}=t;let c=!0,f=ye;if(o.shapeFlag&32){const h=e._;h?r&&h===1?c=!1:(Re(s,e),!r&&h===1&&delete s._):(c=!e.$stable,q0(e,s)),f=e}else e&&(B0(t,e),f={default:1});if(c)for(const h in s)!H0(h)&&f[h]==null&&delete s[h]};function Yf(t,e,r,o,s=!1){if(Ft(t)){t.forEach((w,_)=>Yf(w,e&&(Ft(e)?e[_]:e),r,o,s));return}if(dl(o)&&!s)return;const c=o.shapeFlag&4?eu(o.component)||o.component.proxy:o.el,f=s?null:c,{i:h,r:d}=t,g=e&&e.r,v=h.refs===ye?h.refs={}:h.refs,y=h.setupState;if(g!=null&&g!==d&&(De(g)?(v[g]=null,ae(y,g)&&(y[g]=null)):Ae(g)&&(g.value=null)),Gt(d))Ni(d,h,12,[f,v]);else{const w=De(d),_=Ae(d);if(w||_){const L=()=>{if(t.f){const M=w?ae(y,d)?y[d]:v[d]:d.value;s?Ft(M)&&Ah(M,c):Ft(M)?M.includes(c)||M.push(c):w?(v[d]=[c],ae(y,d)&&(y[d]=v[d])):(d.value=[c],t.k&&(v[t.k]=d.value))}else w?(v[d]=f,ae(y,d)&&(y[d]=f)):_&&(d.value=f,t.k&&(v[t.k]=f))};f?(L.id=-1,Tn(L,r)):L()}}}const Tn=q_;function xS(t){return _S(t)}function _S(t,e){const r=Km();r.__VUE__=!0;const{insert:o,remove:s,patchProp:c,createElement:f,createText:h,createComment:d,setText:g,setElementText:v,parentNode:y,nextSibling:w,setScopeId:_=Wn,insertStaticContent:L}=t,M=(O,z,K,ot=null,rt=null,vt=null,Ct=void 0,at=null,bt=!!z.dynamicChildren)=>{if(O===z)return;O&&!Sr(O,z)&&(ot=V(O),Wt(O,rt,vt,!0),O=null),z.patchFlag===-2&&(bt=!1,z.dynamicChildren=null);const{type:pt,ref:At,shapeFlag:zt}=z;switch(pt){case Qc:A(O,z,K,ot);break;case bn:T(O,z,K,ot);break;case vf:O==null&&E(z,K,ot,Ct);break;case re:lt(O,z,K,ot,rt,vt,Ct,at,bt);break;default:zt&1?F(O,z,K,ot,rt,vt,Ct,at,bt):zt&6?G(O,z,K,ot,rt,vt,Ct,at,bt):(zt&64||zt&128)&&pt.process(O,z,K,ot,rt,vt,Ct,at,bt,Nt)}At!=null&&rt&&Yf(At,O&&O.ref,vt,z||O,!z)},A=(O,z,K,ot)=>{if(O==null)o(z.el=h(z.children),K,ot);else{const rt=z.el=O.el;z.children!==O.children&&g(rt,z.children)}},T=(O,z,K,ot)=>{O==null?o(z.el=d(z.children||""),K,ot):z.el=O.el},E=(O,z,K,ot)=>{[O.el,O.anchor]=L(O.children,z,K,ot,O.el,O.anchor)},P=({el:O,anchor:z},K,ot)=>{let rt;for(;O&&O!==z;)rt=w(O),o(O,K,ot),O=rt;o(z,K,ot)},$=({el:O,anchor:z})=>{let K;for(;O&&O!==z;)K=w(O),s(O),O=K;s(z)},F=(O,z,K,ot,rt,vt,Ct,at,bt)=>{z.type==="svg"?Ct="svg":z.type==="math"&&(Ct="mathml"),O==null?H(z,K,ot,rt,vt,Ct,at,bt):ht(O,z,rt,vt,Ct,at,bt)},H=(O,z,K,ot,rt,vt,Ct,at)=>{let bt,pt;const{props:At,shapeFlag:zt,transition:Ot,dirs:Ht}=O;if(bt=O.el=f(O.type,vt,At&&At.is,At),zt&8?v(bt,O.children):zt&16&&Y(O.children,bt,null,ot,rt,gf(O,vt),Ct,at),Ht&&io(O,null,ot,"created"),st(bt,O,O.scopeId,Ct,ot),At){for(const le in At)le!=="value"&&!ul(le)&&c(bt,le,null,At[le],vt,O.children,ot,rt,Tt);"value"in At&&c(bt,"value",null,At.value,vt),(pt=At.onVnodeBeforeMount)&&xr(pt,ot,O)}Ht&&io(O,null,ot,"beforeMount");const Vt=SS(rt,Ot);Vt&&Ot.beforeEnter(bt),o(bt,z,K),((pt=At&&At.onVnodeMounted)||Vt||Ht)&&Tn(()=>{pt&&xr(pt,ot,O),Vt&&Ot.enter(bt),Ht&&io(O,null,ot,"mounted")},rt)},st=(O,z,K,ot,rt)=>{if(K&&_(O,K),ot)for(let vt=0;vt<ot.length;vt++)_(O,ot[vt]);if(rt){let vt=rt.subTree;if(z===vt){const Ct=rt.vnode;st(O,Ct,Ct.scopeId,Ct.slotScopeIds,rt.parent)}}},Y=(O,z,K,ot,rt,vt,Ct,at,bt=0)=>{for(let pt=bt;pt<O.length;pt++){const At=O[pt]=at?xi(O[pt]):lr(O[pt]);M(null,At,z,K,ot,rt,vt,Ct,at)}},ht=(O,z,K,ot,rt,vt,Ct)=>{const at=z.el=O.el;let{patchFlag:bt,dynamicChildren:pt,dirs:At}=z;bt|=O.patchFlag&16;const zt=O.props||ye,Ot=z.props||ye;let Ht;if(K&&oo(K,!1),(Ht=Ot.onVnodeBeforeUpdate)&&xr(Ht,K,z,O),At&&io(z,O,K,"beforeUpdate"),K&&oo(K,!0),pt?Z(O.dynamicChildren,pt,at,K,ot,gf(z,rt),vt):Ct||tt(O,z,at,null,K,ot,gf(z,rt),vt,!1),bt>0){if(bt&16)ut(at,z,zt,Ot,K,ot,rt);else if(bt&2&&zt.class!==Ot.class&&c(at,"class",null,Ot.class,rt),bt&4&&c(at,"style",zt.style,Ot.style,rt),bt&8){const Vt=z.dynamicProps;for(let le=0;le<Vt.length;le++){const oe=Vt[le],te=zt[oe],ze=Ot[oe];(ze!==te||oe==="value")&&c(at,oe,te,ze,rt,O.children,K,ot,Tt)}}bt&1&&O.children!==z.children&&v(at,z.children)}else!Ct&&pt==null&&ut(at,z,zt,Ot,K,ot,rt);((Ht=Ot.onVnodeUpdated)||At)&&Tn(()=>{Ht&&xr(Ht,K,z,O),At&&io(z,O,K,"updated")},ot)},Z=(O,z,K,ot,rt,vt,Ct)=>{for(let at=0;at<z.length;at++){const bt=O[at],pt=z[at],At=bt.el&&(bt.type===re||!Sr(bt,pt)||bt.shapeFlag&70)?y(bt.el):K;M(bt,pt,At,null,ot,rt,vt,Ct,!0)}},ut=(O,z,K,ot,rt,vt,Ct)=>{if(K!==ot){if(K!==ye)for(const at in K)!ul(at)&&!(at in ot)&&c(O,at,K[at],null,Ct,z.children,rt,vt,Tt);for(const at in ot){if(ul(at))continue;const bt=ot[at],pt=K[at];bt!==pt&&at!=="value"&&c(O,at,pt,bt,Ct,z.children,rt,vt,Tt)}"value"in ot&&c(O,"value",K.value,ot.value,Ct)}},lt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{const pt=z.el=O?O.el:h(""),At=z.anchor=O?O.anchor:h("");let{patchFlag:zt,dynamicChildren:Ot,slotScopeIds:Ht}=z;Ht&&(at=at?at.concat(Ht):Ht),O==null?(o(pt,K,ot),o(At,K,ot),Y(z.children||[],K,At,rt,vt,Ct,at,bt)):zt>0&&zt&64&&Ot&&O.dynamicChildren?(Z(O.dynamicChildren,Ot,K,rt,vt,Ct,at),(z.key!=null||rt&&z===rt.subTree)&&W0(O,z,!0)):tt(O,z,K,At,rt,vt,Ct,at,bt)},G=(O,z,K,ot,rt,vt,Ct,at,bt)=>{z.slotScopeIds=at,O==null?z.shapeFlag&512?rt.ctx.activate(z,K,ot,Ct,bt):I(z,K,ot,rt,vt,Ct,bt):k(O,z,bt)},I=(O,z,K,ot,rt,vt,Ct)=>{const at=O.component=AS(O,ot,rt);if(Zc(O)&&(at.ctx.renderer=Nt),MS(at),at.asyncDep){if(rt&&rt.registerDep(at,q),!O.el){const bt=at.subTree=It(bn);T(null,bt,z,K)}}else q(at,O,z,K,rt,vt,Ct)},k=(O,z,K)=>{const ot=z.component=O.component;if(N_(O,z,K))if(ot.asyncDep&&!ot.asyncResolved){U(ot,z,K);return}else ot.next=z,k_(ot.update),ot.effect.dirty=!0,ot.update();else z.el=O.el,ot.vnode=z},q=(O,z,K,ot,rt,vt,Ct)=>{const at=()=>{if(O.isMounted){let{next:At,bu:zt,u:Ot,parent:Ht,vnode:Vt}=O;{const Ke=U0(O);if(Ke){At&&(At.el=Vt.el,U(O,At,Ct)),Ke.asyncDep.then(()=>{O.isUnmounted||at()});return}}let le=At,oe;oo(O,!1),At?(At.el=Vt.el,U(O,At,Ct)):At=Vt,zt&&nc(zt),(oe=At.props&&At.props.onVnodeBeforeUpdate)&&xr(oe,Ht,At,Vt),oo(O,!0);const te=hf(O),ze=O.subTree;O.subTree=te,M(ze,te,y(ze.el),V(ze),O,rt,vt),At.el=te.el,le===null&&Bh(O,te.el),Ot&&Tn(Ot,rt),(oe=At.props&&At.props.onVnodeUpdated)&&Tn(()=>xr(oe,Ht,At,Vt),rt)}else{let At;const{el:zt,props:Ot}=z,{bm:Ht,m:Vt,parent:le}=O,oe=dl(z);if(oo(O,!1),Ht&&nc(Ht),!oe&&(At=Ot&&Ot.onVnodeBeforeMount)&&xr(At,le,z),oo(O,!0),zt&&Xt){const te=()=>{O.subTree=hf(O),Xt(zt,O.subTree,O,rt,null)};oe?z.type.__asyncLoader().then(()=>!O.isUnmounted&&te()):te()}else{const te=O.subTree=hf(O);M(null,te,K,ot,O,rt,vt),z.el=te.el}if(Vt&&Tn(Vt,rt),!oe&&(At=Ot&&Ot.onVnodeMounted)){const te=z;Tn(()=>xr(At,le,te),rt)}(z.shapeFlag&256||le&&dl(le.vnode)&&le.vnode.shapeFlag&256)&&O.a&&Tn(O.a,rt),O.isMounted=!0,z=K=ot=null}},bt=O.effect=new Nh(at,Wn,()=>qh(pt),O.scope),pt=O.update=()=>{bt.dirty&&bt.run()};pt.id=O.uid,oo(O,!0),pt()},U=(O,z,K)=>{z.component=O;const ot=O.vnode.props;O.vnode=z,O.next=null,mS(O,z.props,ot,K),wS(O,z.children,K),qi(),Pg(O),Bi()},tt=(O,z,K,ot,rt,vt,Ct,at,bt=!1)=>{const pt=O&&O.children,At=O?O.shapeFlag:0,zt=z.children,{patchFlag:Ot,shapeFlag:Ht}=z;if(Ot>0){if(Ot&128){Mt(pt,zt,K,ot,rt,vt,Ct,at,bt);return}else if(Ot&256){mt(pt,zt,K,ot,rt,vt,Ct,at,bt);return}}Ht&8?(At&16&&Tt(pt,rt,vt),zt!==pt&&v(K,zt)):At&16?Ht&16?Mt(pt,zt,K,ot,rt,vt,Ct,at,bt):Tt(pt,rt,vt,!0):(At&8&&v(K,""),Ht&16&&Y(zt,K,ot,rt,vt,Ct,at,bt))},mt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{O=O||rs,z=z||rs;const pt=O.length,At=z.length,zt=Math.min(pt,At);let Ot;for(Ot=0;Ot<zt;Ot++){const Ht=z[Ot]=bt?xi(z[Ot]):lr(z[Ot]);M(O[Ot],Ht,K,null,rt,vt,Ct,at,bt)}pt>At?Tt(O,rt,vt,!0,!1,zt):Y(z,K,ot,rt,vt,Ct,at,bt,zt)},Mt=(O,z,K,ot,rt,vt,Ct,at,bt)=>{let pt=0;const At=z.length;let zt=O.length-1,Ot=At-1;for(;pt<=zt&&pt<=Ot;){const Ht=O[pt],Vt=z[pt]=bt?xi(z[pt]):lr(z[pt]);if(Sr(Ht,Vt))M(Ht,Vt,K,null,rt,vt,Ct,at,bt);else break;pt++}for(;pt<=zt&&pt<=Ot;){const Ht=O[zt],Vt=z[Ot]=bt?xi(z[Ot]):lr(z[Ot]);if(Sr(Ht,Vt))M(Ht,Vt,K,null,rt,vt,Ct,at,bt);else break;zt--,Ot--}if(pt>zt){if(pt<=Ot){const Ht=Ot+1,Vt=Ht<At?z[Ht].el:ot;for(;pt<=Ot;)M(null,z[pt]=bt?xi(z[pt]):lr(z[pt]),K,Vt,rt,vt,Ct,at,bt),pt++}}else if(pt>Ot)for(;pt<=zt;)Wt(O[pt],rt,vt,!0),pt++;else{const Ht=pt,Vt=pt,le=new Map;for(pt=Vt;pt<=Ot;pt++){const Xe=z[pt]=bt?xi(z[pt]):lr(z[pt]);Xe.key!=null&&le.set(Xe.key,pt)}let oe,te=0;const ze=Ot-Vt+1;let Ke=!1,Kn=0;const Nn=new Array(ze);for(pt=0;pt<ze;pt++)Nn[pt]=0;for(pt=Ht;pt<=zt;pt++){const Xe=O[pt];if(te>=ze){Wt(Xe,rt,vt,!0);continue}let Bt;if(Xe.key!=null)Bt=le.get(Xe.key);else for(oe=Vt;oe<=Ot;oe++)if(Nn[oe-Vt]===0&&Sr(Xe,z[oe])){Bt=oe;break}Bt===void 0?Wt(Xe,rt,vt,!0):(Nn[Bt-Vt]=pt+1,Bt>=Kn?Kn=Bt:Ke=!0,M(Xe,z[Bt],K,null,rt,vt,Ct,at,bt),te++)}const Xn=Ke?kS(Nn):rs;for(oe=Xn.length-1,pt=ze-1;pt>=0;pt--){const Xe=Vt+pt,Bt=z[Xe],ji=Xe+1<At?z[Xe+1].el:ot;Nn[pt]===0?M(null,Bt,K,ji,rt,vt,Ct,at,bt):Ke&&(oe<0||pt!==Xn[oe]?qt(Bt,K,ji,2):oe--)}}},qt=(O,z,K,ot,rt=null)=>{const{el:vt,type:Ct,transition:at,children:bt,shapeFlag:pt}=O;if(pt&6){qt(O.component.subTree,z,K,ot);return}if(pt&128){O.suspense.move(z,K,ot);return}if(pt&64){Ct.move(O,z,K,Nt);return}if(Ct===re){o(vt,z,K);for(let zt=0;zt<bt.length;zt++)qt(bt[zt],z,K,ot);o(O.anchor,z,K);return}if(Ct===vf){P(O,z,K);return}if(ot!==2&&pt&1&&at)if(ot===0)at.beforeEnter(vt),o(vt,z,K),Tn(()=>at.enter(vt),rt);else{const{leave:zt,delayLeave:Ot,afterLeave:Ht}=at,Vt=()=>o(vt,z,K),le=()=>{zt(vt,()=>{Vt(),Ht&&Ht()})};Ot?Ot(vt,Vt,le):le()}else o(vt,z,K)},Wt=(O,z,K,ot=!1,rt=!1)=>{const{type:vt,props:Ct,ref:at,children:bt,dynamicChildren:pt,shapeFlag:At,patchFlag:zt,dirs:Ot}=O;if(at!=null&&Yf(at,null,K,O,!0),At&256){z.ctx.deactivate(O);return}const Ht=At&1&&Ot,Vt=!dl(O);let le;if(Vt&&(le=Ct&&Ct.onVnodeBeforeUnmount)&&xr(le,z,O),At&6)Zt(O.component,K,ot);else{if(At&128){O.suspense.unmount(K,ot);return}Ht&&io(O,null,z,"beforeUnmount"),At&64?O.type.remove(O,z,K,rt,Nt,ot):pt&&(vt!==re||zt>0&&zt&64)?Tt(pt,z,K,!1,!0):(vt===re&&zt&384||!rt&&At&16)&&Tt(bt,z,K),ot&&ne(O)}(Vt&&(le=Ct&&Ct.onVnodeUnmounted)||Ht)&&Tn(()=>{le&&xr(le,z,O),Ht&&io(O,null,z,"unmounted")},K)},ne=O=>{const{type:z,el:K,anchor:ot,transition:rt}=O;if(z===re){ee(K,ot);return}if(z===vf){$(O);return}const vt=()=>{s(K),rt&&!rt.persisted&&rt.afterLeave&&rt.afterLeave()};if(O.shapeFlag&1&&rt&&!rt.persisted){const{leave:Ct,delayLeave:at}=rt,bt=()=>Ct(K,vt);at?at(O.el,vt,bt):bt()}else vt()},ee=(O,z)=>{let K;for(;O!==z;)K=w(O),s(O),O=K;s(z)},Zt=(O,z,K)=>{const{bum:ot,scope:rt,update:vt,subTree:Ct,um:at}=O;ot&&nc(ot),rt.stop(),vt&&(vt.active=!1,Wt(Ct,O,z,K)),at&&Tn(at,z),Tn(()=>{O.isUnmounted=!0},z),z&&z.pendingBranch&&!z.isUnmounted&&O.asyncDep&&!O.asyncResolved&&O.suspenseId===z.pendingId&&(z.deps--,z.deps===0&&z.resolve())},Tt=(O,z,K,ot=!1,rt=!1,vt=0)=>{for(let Ct=vt;Ct<O.length;Ct++)Wt(O[Ct],z,K,ot,rt)},V=O=>O.shapeFlag&6?V(O.component.subTree):O.shapeFlag&128?O.suspense.next():w(O.anchor||O.el);let it=!1;const ft=(O,z,K)=>{O==null?z._vnode&&Wt(z._vnode,null,null,!0):M(z._vnode||null,O,z,null,null,null,K),it||(it=!0,Pg(),b0(),it=!1),z._vnode=O},Nt={p:M,um:Wt,m:qt,r:ne,mt:I,mc:Y,pc:tt,pbc:Z,n:V,o:t};let Et,Xt;return{render:ft,hydrate:Et,createApp:gS(ft,Et)}}function gf({type:t,props:e},r){return r==="svg"&&t==="foreignObject"||r==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:r}function oo({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function SS(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function W0(t,e,r=!1){const o=t.children,s=e.children;if(Ft(o)&&Ft(s))for(let c=0;c<o.length;c++){const f=o[c];let h=s[c];h.shapeFlag&1&&!h.dynamicChildren&&((h.patchFlag<=0||h.patchFlag===32)&&(h=s[c]=xi(s[c]),h.el=f.el),r||W0(f,h)),h.type===Qc&&(h.el=f.el)}}function kS(t){const e=t.slice(),r=[0];let o,s,c,f,h;const d=t.length;for(o=0;o<d;o++){const g=t[o];if(g!==0){if(s=r[r.length-1],t[s]<g){e[o]=s,r.push(o);continue}for(c=0,f=r.length-1;c<f;)h=c+f>>1,t[r[h]]<g?c=h+1:f=h;g<t[r[c]]&&(c>0&&(e[o]=r[c-1]),r[c]=o)}}for(c=r.length,f=r[c-1];c-- >0;)r[c]=f,f=e[f];return r}function U0(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:U0(e)}const CS=t=>t.__isTeleport,re=Symbol.for("v-fgt"),Qc=Symbol.for("v-txt"),bn=Symbol.for("v-cmt"),vf=Symbol.for("v-stc"),vl=[];let Un=null;function et(t=!1){vl.push(Un=t?null:[])}function j0(){vl.pop(),Un=vl[vl.length-1]||null}let hs=1;function xc(t){hs+=t}function V0(t){return t.dynamicChildren=hs>0?Un||rs:null,j0(),hs>0&&Un&&Un.push(t),t}function yt(t,e,r,o,s,c){return V0(Q(t,e,r,o,s,c,!0))}function Yt(t,e,r,o,s){return V0(It(t,e,r,o,s,!0))}function Ml(t){return t?t.__v_isVNode===!0:!1}function Sr(t,e){return t.type===e.type&&t.key===e.key}const G0=({key:t})=>t??null,ic=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?De(t)||Ae(t)||Gt(t)?{i:je,r:t,k:e,f:!!r}:t:null);function Q(t,e=null,r=null,o=0,s=null,c=t===re?0:1,f=!1,h=!1){const d={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&G0(e),ref:e&&ic(e),scopeId:Xc,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:c,patchFlag:o,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:je};return h?(Kh(d,r),c&128&&t.normalize(d)):r&&(d.shapeFlag|=De(r)?8:16),hs>0&&!f&&Un&&(d.patchFlag>0||c&6)&&d.patchFlag!==32&&Un.push(d),d}const It=TS;function TS(t,e=null,r=null,o=0,s=null,c=!1){if((!t||t===P_)&&(t=bn),Ml(t)){const h=Ri(t,e,!0);return r&&Kh(h,r),hs>0&&!c&&Un&&(h.shapeFlag&6?Un[Un.indexOf(t)]=h:Un.push(h)),h.patchFlag|=-2,h}if(OS(t)&&(t=t.__vccOpts),e){e=K0(e);let{class:h,style:d}=e;h&&!De(h)&&(e.class=de(h)),be(d)&&(u0(d)&&!Ft(d)&&(d=Re({},d)),e.style=ln(d))}const f=De(t)?1:O_(t)?128:CS(t)?64:be(t)?4:Gt(t)?2:0;return Q(t,e,r,o,s,f,c,!0)}function K0(t){return t?u0(t)||z0(t)?Re({},t):t:null}function Ri(t,e,r=!1,o=!1){const{props:s,ref:c,patchFlag:f,children:h,transition:d}=t,g=e?$i(s||{},e):s,v={__v_isVNode:!0,__v_skip:!0,type:t.type,props:g,key:g&&G0(g),ref:e&&e.ref?r&&c?Ft(c)?c.concat(ic(e)):[c,ic(e)]:ic(e):c,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:h,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==re?f===-1?16:f|16:f,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:d,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Ri(t.ssContent),ssFallback:t.ssFallback&&Ri(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return d&&o&&(v.transition=d.clone(v)),v}function me(t=" ",e=0){return It(Qc,null,t,e)}function Kt(t="",e=!1){return e?(et(),Yt(bn,null,t)):It(bn,null,t)}function lr(t){return t==null||typeof t=="boolean"?It(bn):Ft(t)?It(re,null,t.slice()):typeof t=="object"?xi(t):It(Qc,null,String(t))}function xi(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Ri(t)}function Kh(t,e){let r=0;const{shapeFlag:o}=t;if(e==null)e=null;else if(Ft(e))r=16;else if(typeof e=="object")if(o&65){const s=e.default;s&&(s._c&&(s._d=!1),Kh(t,s()),s._c&&(s._d=!0));return}else{r=32;const s=e._;!s&&!z0(e)?e._ctx=je:s===3&&je&&(je.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Gt(e)?(e={default:e,_ctx:je},r=32):(e=String(e),o&64?(r=16,e=[me(e)]):r=8);t.children=e,t.shapeFlag|=r}function $i(...t){const e={};for(let r=0;r<t.length;r++){const o=t[r];for(const s in o)if(s==="class")e.class!==o.class&&(e.class=de([e.class,o.class]));else if(s==="style")e.style=ln([e.style,o.style]);else if(Bc(s)){const c=e[s],f=o[s];f&&c!==f&&!(Ft(c)&&c.includes(f))&&(e[s]=c?[].concat(c,f):f)}else s!==""&&(e[s]=o[s])}return e}function xr(t,e,r,o=null){Vn(t,e,7,[r,o])}const ES=O0();let LS=0;function AS(t,e,r){const o=t.type,s=(e?e.appContext:t.appContext)||ES,c={uid:LS++,vnode:t,type:o,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new Vx(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:F0(o,s),emitsOptions:x0(o,s),emit:null,emitted:null,propsDefaults:ye,inheritAttrs:o.inheritAttrs,ctx:ye,data:ye,props:ye,attrs:ye,slots:ye,refs:ye,setupState:ye,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return c.ctx={_:c},c.root=e?e.root:c,c.emit=T_.bind(null,c),t.ce&&t.ce(c),c}let tn=null;const Xl=()=>tn||je;let _c,Zf;{const t=Km(),e=(r,o)=>{let s;return(s=t[r])||(s=t[r]=[]),s.push(o),c=>{s.length>1?s.forEach(f=>f(c)):s[0](c)}};_c=e("__VUE_INSTANCE_SETTERS__",r=>tn=r),Zf=e("__VUE_SSR_SETTERS__",r=>tu=r)}const Yl=t=>{const e=tn;return _c(t),t.scope.on(),()=>{t.scope.off(),_c(e)}},jg=()=>{tn&&tn.scope.off(),_c(null)};function X0(t){return t.vnode.shapeFlag&4}let tu=!1;function MS(t,e=!1){e&&Zf(e);const{props:r,children:o}=t.vnode,s=X0(t);vS(t,r,s,e),bS(t,o);const c=s?NS(t,e):void 0;return e&&Zf(!1),c}function NS(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,sS);const{setup:o}=r;if(o){const s=t.setupContext=o.length>1?Z0(t):null,c=Yl(t);qi();const f=Ni(o,t,0,[t.props,s]);if(Bi(),c(),Wm(f)){if(f.then(jg,jg),e)return f.then(h=>{Jf(t,h,e)}).catch(h=>{Kl(h,t,0)});t.asyncDep=f}else Jf(t,f,e)}else Y0(t,e)}function Jf(t,e,r){Gt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:be(e)&&(t.setupState=p0(e)),Y0(t,r)}let Vg;function Y0(t,e,r){const o=t.type;if(!t.render){if(!e&&Vg&&!o.render){const s=o.template||Vh(t).template;if(s){const{isCustomElement:c,compilerOptions:f}=t.appContext.config,{delimiters:h,compilerOptions:d}=o,g=Re(Re({isCustomElement:c,delimiters:h},f),d);o.render=Vg(s,g)}}t.render=o.render||Wn}{const s=Yl(t);qi();try{cS(t)}finally{Bi(),s()}}}const $S={get(t,e){return Mn(t,"get",""),t[e]}};function Z0(t){const e=r=>{t.exposed=r||{}};return{attrs:new Proxy(t.attrs,$S),slots:t.slots,emit:t.emit,expose:e}}function eu(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(p0(f0(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in pl)return pl[r](t)},has(e,r){return r in e||r in pl}}))}function PS(t,e=!0){return Gt(t)?t.displayName||t.name:t.name||e&&t.__name}function OS(t){return Gt(t)&&"__vccOpts"in t}const _t=(t,e)=>g_(t,e,tu);function J0(t,e,r=ye){const o=Xl(),s=hr(e),c=Hi(e),f=g0((d,g)=>{let v;return j_(()=>{const y=t[e];Ar(v,y)&&(v=y,g())}),{get(){return d(),r.get?r.get(v):v},set(y){const w=o.vnode.props;!(w&&(e in w||s in w||c in w)&&(`onUpdate:${e}`in w||`onUpdate:${s}`in w||`onUpdate:${c}`in w))&&Ar(y,v)&&(v=y,g()),o.emit(`update:${e}`,r.set?r.set(y):y)}}}),h="modelModifiers";return f[Symbol.iterator]=()=>{let d=0;return{next(){return d<2?{value:d++?t[h]||{}:f,done:!1}:{done:!0}}}},f}function Zl(t,e,r){const o=arguments.length;return o===2?be(e)&&!Ft(e)?Ml(e)?It(t,null,[e]):It(t,e):It(t,null,e):(o>3?r=Array.prototype.slice.call(arguments,2):o===3&&Ml(r)&&(r=[r]),It(t,e,r))}const RS="3.4.27";/**
|
|
14
14
|
* @vue/runtime-dom v3.4.27
|
|
15
15
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
16
|
* @license MIT
|
|
@@ -22,30 +22,30 @@ var $x=Object.defineProperty;var Px=(t,e,r)=>e in t?$x(t,e,{enumerable:!0,config
|
|
|
22
22
|
`,_W="∄",SW="∄",kW="𝔑",CW="𝔫",TW="≧̸",EW="≱",LW="≱",AW="≧̸",MW="⩾̸",NW="⩾̸",$W="⋙̸",PW="≵",OW="≫⃒",RW="≯",DW="≯",zW="≫̸",IW="↮",FW="⇎",HW="⫲",qW="∋",BW="⋼",WW="⋺",UW="∋",jW="Њ",VW="њ",GW="↚",KW="⇍",XW="‥",YW="≦̸",ZW="≰",JW="↚",QW="⇍",tU="↮",eU="⇎",nU="≰",rU="≦̸",iU="⩽̸",oU="⩽̸",sU="≮",lU="⋘̸",aU="≴",cU="≪⃒",uU="≮",fU="⋪",hU="⋬",dU="≪̸",pU="∤",gU="",vU=" ",mU="𝕟",yU="ℕ",bU="⫬",wU="¬",xU="≢",_U="≭",SU="∦",kU="∉",CU="≠",TU="≂̸",EU="∄",LU="≯",AU="≱",MU="≧̸",NU="≫̸",$U="≹",PU="⩾̸",OU="≵",RU="≎̸",DU="≏̸",zU="∉",IU="⋵̸",FU="⋹̸",HU="∉",qU="⋷",BU="⋶",WU="⧏̸",UU="⋪",jU="⋬",VU="≮",GU="≰",KU="≸",XU="≪̸",YU="⩽̸",ZU="≴",JU="⪢̸",QU="⪡̸",t4="∌",e4="∌",n4="⋾",r4="⋽",i4="⊀",o4="⪯̸",s4="⋠",l4="∌",a4="⧐̸",c4="⋫",u4="⋭",f4="⊏̸",h4="⋢",d4="⊐̸",p4="⋣",g4="⊂⃒",v4="⊈",m4="⊁",y4="⪰̸",b4="⋡",w4="≿̸",x4="⊃⃒",_4="⊉",S4="≁",k4="≄",C4="≇",T4="≉",E4="∤",L4="∦",A4="∦",M4="⫽⃥",N4="∂̸",$4="⨔",P4="⊀",O4="⋠",R4="⊀",D4="⪯̸",z4="⪯̸",I4="⤳̸",F4="↛",H4="⇏",q4="↝̸",B4="↛",W4="⇏",U4="⋫",j4="⋭",V4="⊁",G4="⋡",K4="⪰̸",X4="𝒩",Y4="𝓃",Z4="∤",J4="∦",Q4="≁",t6="≄",e6="≄",n6="∤",r6="∦",i6="⋢",o6="⋣",s6="⊄",l6="⫅̸",a6="⊈",c6="⊂⃒",u6="⊈",f6="⫅̸",h6="⊁",d6="⪰̸",p6="⊅",g6="⫆̸",v6="⊉",m6="⊃⃒",y6="⊉",b6="⫆̸",w6="≹",x6="Ñ",_6="ñ",S6="≸",k6="⋪",C6="⋬",T6="⋫",E6="⋭",L6="Ν",A6="ν",M6="#",N6="№",$6=" ",P6="≍⃒",O6="⊬",R6="⊭",D6="⊮",z6="⊯",I6="≥⃒",F6=">⃒",H6="⤄",q6="⧞",B6="⤂",W6="≤⃒",U6="<⃒",j6="⊴⃒",V6="⤃",G6="⊵⃒",K6="∼⃒",X6="⤣",Y6="↖",Z6="⇖",J6="↖",Q6="⤧",tj="Ó",ej="ó",nj="⊛",rj="Ô",ij="ô",oj="⊚",sj="О",lj="о",aj="⊝",cj="Ő",uj="ő",fj="⨸",hj="⊙",dj="⦼",pj="Œ",gj="œ",vj="⦿",mj="𝔒",yj="𝔬",bj="˛",wj="Ò",xj="ò",_j="⧁",Sj="⦵",kj="Ω",Cj="∮",Tj="↺",Ej="⦾",Lj="⦻",Aj="‾",Mj="⧀",Nj="Ō",$j="ō",Pj="Ω",Oj="ω",Rj="Ο",Dj="ο",zj="⦶",Ij="⊖",Fj="𝕆",Hj="𝕠",qj="⦷",Bj="“",Wj="‘",Uj="⦹",jj="⊕",Vj="↻",Gj="⩔",Kj="∨",Xj="⩝",Yj="ℴ",Zj="ℴ",Jj="ª",Qj="º",tV="⊶",eV="⩖",nV="⩗",rV="⩛",iV="Ⓢ",oV="𝒪",sV="ℴ",lV="Ø",aV="ø",cV="⊘",uV="Õ",fV="õ",hV="⨶",dV="⨷",pV="⊗",gV="Ö",vV="ö",mV="⌽",yV="‾",bV="⏞",wV="⎴",xV="⏜",_V="¶",SV="∥",kV="∥",CV="⫳",TV="⫽",EV="∂",LV="∂",AV="П",MV="п",NV="%",$V=".",PV="‰",OV="⊥",RV="‱",DV="𝔓",zV="𝔭",IV="Φ",FV="φ",HV="ϕ",qV="ℳ",BV="☎",WV="Π",UV="π",jV="⋔",VV="ϖ",GV="ℏ",KV="ℎ",XV="ℏ",YV="⨣",ZV="⊞",JV="⨢",QV="+",tG="∔",eG="⨥",nG="⩲",rG="±",iG="±",oG="⨦",sG="⨧",lG="±",aG="ℌ",cG="⨕",uG="𝕡",fG="ℙ",hG="£",dG="⪷",pG="⪻",gG="≺",vG="≼",mG="⪷",yG="≺",bG="≼",wG="≺",xG="⪯",_G="≼",SG="≾",kG="⪯",CG="⪹",TG="⪵",EG="⋨",LG="⪯",AG="⪳",MG="≾",NG="′",$G="″",PG="ℙ",OG="⪹",RG="⪵",DG="⋨",zG="∏",IG="∏",FG="⌮",HG="⌒",qG="⌓",BG="∝",WG="∝",UG="∷",jG="∝",VG="≾",GG="⊰",KG="𝒫",XG="𝓅",YG="Ψ",ZG="ψ",JG=" ",QG="𝔔",t9="𝔮",e9="⨌",n9="𝕢",r9="ℚ",i9="⁗",o9="𝒬",s9="𝓆",l9="ℍ",a9="⨖",c9="?",u9="≟",f9='"',h9='"',d9="⇛",p9="∽̱",g9="Ŕ",v9="ŕ",m9="√",y9="⦳",b9="⟩",w9="⟫",x9="⦒",_9="⦥",S9="⟩",k9="»",C9="⥵",T9="⇥",E9="⤠",L9="⤳",A9="→",M9="↠",N9="⇒",$9="⤞",P9="↪",O9="↬",R9="⥅",D9="⥴",z9="⤖",I9="↣",F9="↝",H9="⤚",q9="⤜",B9="∶",W9="ℚ",U9="⤍",j9="⤏",V9="⤐",G9="❳",K9="}",X9="]",Y9="⦌",Z9="⦎",J9="⦐",Q9="Ř",t7="ř",e7="Ŗ",n7="ŗ",r7="⌉",i7="}",o7="Р",s7="р",l7="⤷",a7="⥩",c7="”",u7="”",f7="↳",h7="ℜ",d7="ℛ",p7="ℜ",g7="ℝ",v7="ℜ",m7="▭",y7="®",b7="®",w7="∋",x7="⇋",_7="⥯",S7="⥽",k7="⌋",C7="𝔯",T7="ℜ",E7="⥤",L7="⇁",A7="⇀",M7="⥬",N7="Ρ",$7="ρ",P7="ϱ",O7="⟩",R7="⇥",D7="→",z7="→",I7="⇒",F7="⇄",H7="↣",q7="⌉",B7="⟧",W7="⥝",U7="⥕",j7="⇂",V7="⌋",G7="⇁",K7="⇀",X7="⇄",Y7="⇌",Z7="⇉",J7="↝",Q7="↦",tK="⊢",eK="⥛",nK="⋌",rK="⧐",iK="⊳",oK="⊵",sK="⥏",lK="⥜",aK="⥔",cK="↾",uK="⥓",fK="⇀",hK="˚",dK="≓",pK="⇄",gK="⇌",vK="",mK="⎱",yK="⎱",bK="⫮",wK="⟭",xK="⇾",_K="⟧",SK="⦆",kK="𝕣",CK="ℝ",TK="⨮",EK="⨵",LK="⥰",AK=")",MK="⦔",NK="⨒",$K="⇉",PK="⇛",OK="›",RK="𝓇",DK="ℛ",zK="↱",IK="↱",FK="]",HK="’",qK="’",BK="⋌",WK="⋊",UK="▹",jK="⊵",VK="▸",GK="⧎",KK="⧴",XK="⥨",YK="℞",ZK="Ś",JK="ś",QK="‚",tX="⪸",eX="Š",nX="š",rX="⪼",iX="≻",oX="≽",sX="⪰",lX="⪴",aX="Ş",cX="ş",uX="Ŝ",fX="ŝ",hX="⪺",dX="⪶",pX="⋩",gX="⨓",vX="≿",mX="С",yX="с",bX="⊡",wX="⋅",xX="⩦",_X="⤥",SX="↘",kX="⇘",CX="↘",TX="§",EX=";",LX="⤩",AX="∖",MX="∖",NX="✶",$X="𝔖",PX="𝔰",OX="⌢",RX="♯",DX="Щ",zX="щ",IX="Ш",FX="ш",HX="↓",qX="←",BX="∣",WX="∥",UX="→",jX="↑",VX="",GX="Σ",KX="σ",XX="ς",YX="ς",ZX="∼",JX="⩪",QX="≃",tY="≃",eY="⪞",nY="⪠",rY="⪝",iY="⪟",oY="≆",sY="⨤",lY="⥲",aY="←",cY="∘",uY="∖",fY="⨳",hY="⧤",dY="∣",pY="⌣",gY="⪪",vY="⪬",mY="⪬︀",yY="Ь",bY="ь",wY="⌿",xY="⧄",_Y="/",SY="𝕊",kY="𝕤",CY="♠",TY="♠",EY="∥",LY="⊓",AY="⊓︀",MY="⊔",NY="⊔︀",$Y="√",PY="⊏",OY="⊑",RY="⊏",DY="⊑",zY="⊐",IY="⊒",FY="⊐",HY="⊒",qY="□",BY="□",WY="⊓",UY="⊏",jY="⊑",VY="⊐",GY="⊒",KY="⊔",XY="▪",YY="□",ZY="▪",JY="→",QY="𝒮",tZ="𝓈",eZ="∖",nZ="⌣",rZ="⋆",iZ="⋆",oZ="☆",sZ="★",lZ="ϵ",aZ="ϕ",cZ="¯",uZ="⊂",fZ="⋐",hZ="⪽",dZ="⫅",pZ="⊆",gZ="⫃",vZ="⫁",mZ="⫋",yZ="⊊",bZ="⪿",wZ="⥹",xZ="⊂",_Z="⋐",SZ="⊆",kZ="⫅",CZ="⊆",TZ="⊊",EZ="⫋",LZ="⫇",AZ="⫕",MZ="⫓",NZ="⪸",$Z="≻",PZ="≽",OZ="≻",RZ="⪰",DZ="≽",zZ="≿",IZ="⪰",FZ="⪺",HZ="⪶",qZ="⋩",BZ="≿",WZ="∋",UZ="∑",jZ="∑",VZ="♪",GZ="¹",KZ="²",XZ="³",YZ="⊃",ZZ="⋑",JZ="⪾",QZ="⫘",tJ="⫆",eJ="⊇",nJ="⫄",rJ="⊃",iJ="⊇",oJ="⟉",sJ="⫗",lJ="⥻",aJ="⫂",cJ="⫌",uJ="⊋",fJ="⫀",hJ="⊃",dJ="⋑",pJ="⊇",gJ="⫆",vJ="⊋",mJ="⫌",yJ="⫈",bJ="⫔",wJ="⫖",xJ="⤦",_J="↙",SJ="⇙",kJ="↙",CJ="⤪",TJ="ß",EJ=" ",LJ="⌖",AJ="Τ",MJ="τ",NJ="⎴",$J="Ť",PJ="ť",OJ="Ţ",RJ="ţ",DJ="Т",zJ="т",IJ="⃛",FJ="⌕",HJ="𝔗",qJ="𝔱",BJ="∴",WJ="∴",UJ="∴",jJ="Θ",VJ="θ",GJ="ϑ",KJ="ϑ",XJ="≈",YJ="∼",ZJ=" ",JJ=" ",QJ=" ",tQ="≈",eQ="∼",nQ="Þ",rQ="þ",iQ="˜",oQ="∼",sQ="≃",lQ="≅",aQ="≈",cQ="⨱",uQ="⊠",fQ="×",hQ="⨰",dQ="∭",pQ="⤨",gQ="⌶",vQ="⫱",mQ="⊤",yQ="𝕋",bQ="𝕥",wQ="⫚",xQ="⤩",_Q="‴",SQ="™",kQ="™",CQ="▵",TQ="▿",EQ="◃",LQ="⊴",AQ="≜",MQ="▹",NQ="⊵",$Q="◬",PQ="≜",OQ="⨺",RQ="⃛",DQ="⨹",zQ="⧍",IQ="⨻",FQ="⏢",HQ="𝒯",qQ="𝓉",BQ="Ц",WQ="ц",UQ="Ћ",jQ="ћ",VQ="Ŧ",GQ="ŧ",KQ="≬",XQ="↞",YQ="↠",ZQ="Ú",JQ="ú",QQ="↑",ttt="↟",ett="⇑",ntt="⥉",rtt="Ў",itt="ў",ott="Ŭ",stt="ŭ",ltt="Û",att="û",ctt="У",utt="у",ftt="⇅",htt="Ű",dtt="ű",ptt="⥮",gtt="⥾",vtt="𝔘",mtt="𝔲",ytt="Ù",btt="ù",wtt="⥣",xtt="↿",_tt="↾",Stt="▀",ktt="⌜",Ctt="⌜",Ttt="⌏",Ett="◸",Ltt="Ū",Att="ū",Mtt="¨",Ntt="_",$tt="⏟",Ptt="⎵",Ott="⏝",Rtt="⋃",Dtt="⊎",ztt="Ų",Itt="ų",Ftt="𝕌",Htt="𝕦",qtt="⤒",Btt="↑",Wtt="↑",Utt="⇑",jtt="⇅",Vtt="↕",Gtt="↕",Ktt="⇕",Xtt="⥮",Ytt="↿",Ztt="↾",Jtt="⊎",Qtt="↖",tet="↗",eet="υ",net="ϒ",ret="ϒ",iet="Υ",oet="υ",set="↥",aet="⊥",cet="⇈",uet="⌝",fet="⌝",het="⌎",det="Ů",pet="ů",get="◹",vet="𝒰",met="𝓊",yet="⋰",bet="Ũ",wet="ũ",xet="▵",_et="▴",ket="⇈",Cet="Ü",Tet="ü",Eet="⦧",Let="⦜",Aet="ϵ",Met="ϰ",Net="∅",$et="ϕ",Pet="ϖ",Oet="∝",Ret="↕",Det="⇕",zet="ϱ",Iet="ς",Fet="⊊︀",Het="⫋︀",qet="⊋︀",Bet="⫌︀",Wet="ϑ",Uet="⊲",jet="⊳",Vet="⫨",Get="⫫",Ket="⫩",Xet="В",Yet="в",Zet="⊢",Jet="⊨",Qet="⊩",tnt="⊫",ent="⫦",nnt="⊻",rnt="∨",int="⋁",ont="≚",snt="⋮",lnt="|",ant="‖",cnt="|",unt="‖",fnt="∣",hnt="|",dnt="❘",pnt="≀",gnt=" ",vnt="𝔙",mnt="𝔳",ynt="⊲",bnt="⊂⃒",wnt="⊃⃒",xnt="𝕍",_nt="𝕧",Snt="∝",knt="⊳",Cnt="𝒱",Tnt="𝓋",Ent="⫋︀",Lnt="⊊︀",Ant="⫌︀",Mnt="⊋︀",Nnt="⊪",$nt="⦚",Pnt="Ŵ",Ont="ŵ",Rnt="⩟",Dnt="∧",znt="⋀",Int="≙",Fnt="℘",Hnt="𝔚",qnt="𝔴",Bnt="𝕎",Wnt="𝕨",Unt="℘",jnt="≀",Vnt="≀",Gnt="𝒲",Knt="𝓌",Xnt="⋂",Ynt="◯",Znt="⋃",Jnt="▽",Qnt="𝔛",trt="𝔵",ert="⟷",nrt="⟺",rrt="Ξ",irt="ξ",ort="⟵",srt="⟸",lrt="⟼",art="⋻",crt="⨀",urt="𝕏",frt="𝕩",hrt="⨁",drt="⨂",prt="⟶",grt="⟹",vrt="𝒳",mrt="𝓍",yrt="⨆",brt="⨄",wrt="△",xrt="⋁",_rt="⋀",Srt="Ý",krt="ý",Crt="Я",Trt="я",Ert="Ŷ",Lrt="ŷ",Art="Ы",Mrt="ы",Nrt="¥",$rt="𝔜",Prt="𝔶",Ort="Ї",Rrt="ї",Drt="𝕐",zrt="𝕪",Irt="𝒴",Frt="𝓎",Hrt="Ю",qrt="ю",Brt="ÿ",Wrt="Ÿ",Urt="Ź",jrt="ź",Vrt="Ž",Grt="ž",Krt="З",Xrt="з",Yrt="Ż",Zrt="ż",Jrt="ℨ",Qrt="",tit="Ζ",eit="ζ",nit="𝔷",rit="ℨ",iit="Ж",oit="ж",sit="⇝",lit="𝕫",ait="ℤ",cit="𝒵",uit="𝓏",fit="",hit="",Zy={Aacute:KT,aacute:XT,Abreve:YT,abreve:ZT,ac:JT,acd:QT,acE:tE,Acirc:eE,acirc:nE,acute:rE,Acy:iE,acy:oE,AElig:sE,aelig:lE,af:aE,Afr:cE,afr:uE,Agrave:fE,agrave:hE,alefsym:dE,aleph:pE,Alpha:gE,alpha:vE,Amacr:mE,amacr:yE,amalg:bE,amp:wE,AMP:xE,andand:_E,And:SE,and:kE,andd:CE,andslope:TE,andv:EE,ang:LE,ange:AE,angle:ME,angmsdaa:NE,angmsdab:$E,angmsdac:PE,angmsdad:OE,angmsdae:RE,angmsdaf:DE,angmsdag:zE,angmsdah:IE,angmsd:FE,angrt:HE,angrtvb:qE,angrtvbd:BE,angsph:WE,angst:UE,angzarr:jE,Aogon:VE,aogon:GE,Aopf:KE,aopf:XE,apacir:YE,ap:ZE,apE:JE,ape:QE,apid:tL,apos:eL,ApplyFunction:nL,approx:rL,approxeq:iL,Aring:oL,aring:sL,Ascr:lL,ascr:aL,Assign:cL,ast:uL,asymp:fL,asympeq:hL,Atilde:dL,atilde:pL,Auml:gL,auml:vL,awconint:mL,awint:yL,backcong:bL,backepsilon:wL,backprime:xL,backsim:_L,backsimeq:SL,Backslash:kL,Barv:CL,barvee:TL,barwed:EL,Barwed:LL,barwedge:AL,bbrk:ML,bbrktbrk:NL,bcong:$L,Bcy:PL,bcy:OL,bdquo:RL,becaus:DL,because:zL,Because:IL,bemptyv:FL,bepsi:HL,bernou:qL,Bernoullis:BL,Beta:WL,beta:UL,beth:jL,between:VL,Bfr:GL,bfr:KL,bigcap:XL,bigcirc:YL,bigcup:ZL,bigodot:JL,bigoplus:QL,bigotimes:tA,bigsqcup:eA,bigstar:nA,bigtriangledown:rA,bigtriangleup:iA,biguplus:oA,bigvee:sA,bigwedge:lA,bkarow:aA,blacklozenge:cA,blacksquare:uA,blacktriangle:fA,blacktriangledown:hA,blacktriangleleft:dA,blacktriangleright:pA,blank:gA,blk12:vA,blk14:mA,blk34:yA,block:bA,bne:wA,bnequiv:xA,bNot:_A,bnot:SA,Bopf:kA,bopf:CA,bot:TA,bottom:EA,bowtie:LA,boxbox:AA,boxdl:MA,boxdL:NA,boxDl:$A,boxDL:PA,boxdr:OA,boxdR:RA,boxDr:DA,boxDR:zA,boxh:IA,boxH:FA,boxhd:HA,boxHd:qA,boxhD:BA,boxHD:WA,boxhu:UA,boxHu:jA,boxhU:VA,boxHU:GA,boxminus:KA,boxplus:XA,boxtimes:YA,boxul:ZA,boxuL:JA,boxUl:QA,boxUL:tM,boxur:eM,boxuR:nM,boxUr:rM,boxUR:iM,boxv:oM,boxV:sM,boxvh:lM,boxvH:aM,boxVh:cM,boxVH:uM,boxvl:fM,boxvL:hM,boxVl:dM,boxVL:pM,boxvr:gM,boxvR:vM,boxVr:mM,boxVR:yM,bprime:bM,breve:wM,Breve:xM,brvbar:_M,bscr:SM,Bscr:kM,bsemi:CM,bsim:TM,bsime:EM,bsolb:LM,bsol:AM,bsolhsub:MM,bull:NM,bullet:$M,bump:PM,bumpE:OM,bumpe:RM,Bumpeq:DM,bumpeq:zM,Cacute:IM,cacute:FM,capand:HM,capbrcup:qM,capcap:BM,cap:WM,Cap:UM,capcup:jM,capdot:VM,CapitalDifferentialD:GM,caps:KM,caret:XM,caron:YM,Cayleys:ZM,ccaps:JM,Ccaron:QM,ccaron:tN,Ccedil:eN,ccedil:nN,Ccirc:rN,ccirc:iN,Cconint:oN,ccups:sN,ccupssm:lN,Cdot:aN,cdot:cN,cedil:uN,Cedilla:fN,cemptyv:hN,cent:dN,centerdot:pN,CenterDot:gN,cfr:vN,Cfr:mN,CHcy:yN,chcy:bN,check:wN,checkmark:xN,Chi:_N,chi:SN,circ:kN,circeq:CN,circlearrowleft:TN,circlearrowright:EN,circledast:LN,circledcirc:AN,circleddash:MN,CircleDot:NN,circledR:$N,circledS:PN,CircleMinus:ON,CirclePlus:RN,CircleTimes:DN,cir:zN,cirE:IN,cire:FN,cirfnint:HN,cirmid:qN,cirscir:BN,ClockwiseContourIntegral:WN,CloseCurlyDoubleQuote:UN,CloseCurlyQuote:jN,clubs:VN,clubsuit:GN,colon:KN,Colon:XN,Colone:YN,colone:ZN,coloneq:JN,comma:QN,commat:t$,comp:e$,compfn:n$,complement:r$,complexes:i$,cong:o$,congdot:s$,Congruent:l$,conint:a$,Conint:c$,ContourIntegral:u$,copf:f$,Copf:h$,coprod:d$,Coproduct:p$,copy:g$,COPY:v$,copysr:m$,CounterClockwiseContourIntegral:y$,crarr:b$,cross:w$,Cross:x$,Cscr:_$,cscr:S$,csub:k$,csube:C$,csup:T$,csupe:E$,ctdot:L$,cudarrl:A$,cudarrr:M$,cuepr:N$,cuesc:$$,cularr:P$,cularrp:O$,cupbrcap:R$,cupcap:D$,CupCap:z$,cup:I$,Cup:F$,cupcup:H$,cupdot:q$,cupor:B$,cups:W$,curarr:U$,curarrm:j$,curlyeqprec:V$,curlyeqsucc:G$,curlyvee:K$,curlywedge:X$,curren:Y$,curvearrowleft:Z$,curvearrowright:J$,cuvee:Q$,cuwed:tP,cwconint:eP,cwint:nP,cylcty:rP,dagger:iP,Dagger:oP,daleth:sP,darr:lP,Darr:aP,dArr:cP,dash:uP,Dashv:fP,dashv:hP,dbkarow:dP,dblac:pP,Dcaron:gP,dcaron:vP,Dcy:mP,dcy:yP,ddagger:bP,ddarr:wP,DD:xP,dd:_P,DDotrahd:SP,ddotseq:kP,deg:CP,Del:TP,Delta:EP,delta:LP,demptyv:AP,dfisht:MP,Dfr:NP,dfr:$P,dHar:PP,dharl:OP,dharr:RP,DiacriticalAcute:DP,DiacriticalDot:zP,DiacriticalDoubleAcute:IP,DiacriticalGrave:FP,DiacriticalTilde:HP,diam:qP,diamond:BP,Diamond:WP,diamondsuit:UP,diams:jP,die:VP,DifferentialD:GP,digamma:KP,disin:XP,div:YP,divide:ZP,divideontimes:JP,divonx:QP,DJcy:tO,djcy:eO,dlcorn:nO,dlcrop:rO,dollar:iO,Dopf:oO,dopf:sO,Dot:lO,dot:aO,DotDot:cO,doteq:uO,doteqdot:fO,DotEqual:hO,dotminus:dO,dotplus:pO,dotsquare:gO,doublebarwedge:vO,DoubleContourIntegral:mO,DoubleDot:yO,DoubleDownArrow:bO,DoubleLeftArrow:wO,DoubleLeftRightArrow:xO,DoubleLeftTee:_O,DoubleLongLeftArrow:SO,DoubleLongLeftRightArrow:kO,DoubleLongRightArrow:CO,DoubleRightArrow:TO,DoubleRightTee:EO,DoubleUpArrow:LO,DoubleUpDownArrow:AO,DoubleVerticalBar:MO,DownArrowBar:NO,downarrow:$O,DownArrow:PO,Downarrow:OO,DownArrowUpArrow:RO,DownBreve:DO,downdownarrows:zO,downharpoonleft:IO,downharpoonright:FO,DownLeftRightVector:HO,DownLeftTeeVector:qO,DownLeftVectorBar:BO,DownLeftVector:WO,DownRightTeeVector:UO,DownRightVectorBar:jO,DownRightVector:VO,DownTeeArrow:GO,DownTee:KO,drbkarow:XO,drcorn:YO,drcrop:ZO,Dscr:JO,dscr:QO,DScy:tR,dscy:eR,dsol:nR,Dstrok:rR,dstrok:iR,dtdot:oR,dtri:sR,dtrif:lR,duarr:aR,duhar:cR,dwangle:uR,DZcy:fR,dzcy:hR,dzigrarr:dR,Eacute:pR,eacute:gR,easter:vR,Ecaron:mR,ecaron:yR,Ecirc:bR,ecirc:wR,ecir:xR,ecolon:_R,Ecy:SR,ecy:kR,eDDot:CR,Edot:TR,edot:ER,eDot:LR,ee:AR,efDot:MR,Efr:NR,efr:$R,eg:PR,Egrave:OR,egrave:RR,egs:DR,egsdot:zR,el:IR,Element:FR,elinters:HR,ell:qR,els:BR,elsdot:WR,Emacr:UR,emacr:jR,empty:VR,emptyset:GR,EmptySmallSquare:KR,emptyv:XR,EmptyVerySmallSquare:YR,emsp13:ZR,emsp14:JR,emsp:QR,ENG:tD,eng:eD,ensp:nD,Eogon:rD,eogon:iD,Eopf:oD,eopf:sD,epar:lD,eparsl:aD,eplus:cD,epsi:uD,Epsilon:fD,epsilon:hD,epsiv:dD,eqcirc:pD,eqcolon:gD,eqsim:vD,eqslantgtr:mD,eqslantless:yD,Equal:bD,equals:wD,EqualTilde:xD,equest:_D,Equilibrium:SD,equiv:kD,equivDD:CD,eqvparsl:TD,erarr:ED,erDot:LD,escr:AD,Escr:MD,esdot:ND,Esim:$D,esim:PD,Eta:OD,eta:RD,ETH:DD,eth:zD,Euml:ID,euml:FD,euro:HD,excl:qD,exist:BD,Exists:WD,expectation:UD,exponentiale:jD,ExponentialE:VD,fallingdotseq:GD,Fcy:KD,fcy:XD,female:YD,ffilig:ZD,fflig:JD,ffllig:QD,Ffr:t2,ffr:e2,filig:n2,FilledSmallSquare:r2,FilledVerySmallSquare:i2,fjlig:o2,flat:s2,fllig:l2,fltns:a2,fnof:c2,Fopf:u2,fopf:f2,forall:h2,ForAll:d2,fork:p2,forkv:g2,Fouriertrf:v2,fpartint:m2,frac12:y2,frac13:b2,frac14:w2,frac15:x2,frac16:_2,frac18:S2,frac23:k2,frac25:C2,frac34:T2,frac35:E2,frac38:L2,frac45:A2,frac56:M2,frac58:N2,frac78:$2,frasl:P2,frown:O2,fscr:R2,Fscr:D2,gacute:z2,Gamma:I2,gamma:F2,Gammad:H2,gammad:q2,gap:B2,Gbreve:W2,gbreve:U2,Gcedil:j2,Gcirc:V2,gcirc:G2,Gcy:K2,gcy:X2,Gdot:Y2,gdot:Z2,ge:J2,gE:Q2,gEl:tz,gel:ez,geq:nz,geqq:rz,geqslant:iz,gescc:oz,ges:sz,gesdot:lz,gesdoto:az,gesdotol:cz,gesl:uz,gesles:fz,Gfr:hz,gfr:dz,gg:pz,Gg:gz,ggg:vz,gimel:mz,GJcy:yz,gjcy:bz,gla:wz,gl:xz,glE:_z,glj:Sz,gnap:kz,gnapprox:Cz,gne:Tz,gnE:Ez,gneq:Lz,gneqq:Az,gnsim:Mz,Gopf:Nz,gopf:$z,grave:Pz,GreaterEqual:Oz,GreaterEqualLess:Rz,GreaterFullEqual:Dz,GreaterGreater:zz,GreaterLess:Iz,GreaterSlantEqual:Fz,GreaterTilde:Hz,Gscr:qz,gscr:Bz,gsim:Wz,gsime:Uz,gsiml:jz,gtcc:Vz,gtcir:Gz,gt:Kz,GT:Xz,Gt:Yz,gtdot:Zz,gtlPar:Jz,gtquest:Qz,gtrapprox:tI,gtrarr:eI,gtrdot:nI,gtreqless:rI,gtreqqless:iI,gtrless:oI,gtrsim:sI,gvertneqq:lI,gvnE:aI,Hacek:cI,hairsp:uI,half:fI,hamilt:hI,HARDcy:dI,hardcy:pI,harrcir:gI,harr:vI,hArr:mI,harrw:yI,Hat:bI,hbar:wI,Hcirc:xI,hcirc:_I,hearts:SI,heartsuit:kI,hellip:CI,hercon:TI,hfr:EI,Hfr:LI,HilbertSpace:AI,hksearow:MI,hkswarow:NI,hoarr:$I,homtht:PI,hookleftarrow:OI,hookrightarrow:RI,hopf:DI,Hopf:zI,horbar:II,HorizontalLine:FI,hscr:HI,Hscr:qI,hslash:BI,Hstrok:WI,hstrok:UI,HumpDownHump:jI,HumpEqual:VI,hybull:GI,hyphen:KI,Iacute:XI,iacute:YI,ic:ZI,Icirc:JI,icirc:QI,Icy:tF,icy:eF,Idot:nF,IEcy:rF,iecy:iF,iexcl:oF,iff:sF,ifr:lF,Ifr:aF,Igrave:cF,igrave:uF,ii:fF,iiiint:hF,iiint:dF,iinfin:pF,iiota:gF,IJlig:vF,ijlig:mF,Imacr:yF,imacr:bF,image:wF,ImaginaryI:xF,imagline:_F,imagpart:SF,imath:kF,Im:CF,imof:TF,imped:EF,Implies:LF,incare:AF,in:"∈",infin:MF,infintie:NF,inodot:$F,intcal:PF,int:OF,Int:RF,integers:DF,Integral:zF,intercal:IF,Intersection:FF,intlarhk:HF,intprod:qF,InvisibleComma:BF,InvisibleTimes:WF,IOcy:UF,iocy:jF,Iogon:VF,iogon:GF,Iopf:KF,iopf:XF,Iota:YF,iota:ZF,iprod:JF,iquest:QF,iscr:tH,Iscr:eH,isin:nH,isindot:rH,isinE:iH,isins:oH,isinsv:sH,isinv:lH,it:aH,Itilde:cH,itilde:uH,Iukcy:fH,iukcy:hH,Iuml:dH,iuml:pH,Jcirc:gH,jcirc:vH,Jcy:mH,jcy:yH,Jfr:bH,jfr:wH,jmath:xH,Jopf:_H,jopf:SH,Jscr:kH,jscr:CH,Jsercy:TH,jsercy:EH,Jukcy:LH,jukcy:AH,Kappa:MH,kappa:NH,kappav:$H,Kcedil:PH,kcedil:OH,Kcy:RH,kcy:DH,Kfr:zH,kfr:IH,kgreen:FH,KHcy:HH,khcy:qH,KJcy:BH,kjcy:WH,Kopf:UH,kopf:jH,Kscr:VH,kscr:GH,lAarr:KH,Lacute:XH,lacute:YH,laemptyv:ZH,lagran:JH,Lambda:QH,lambda:tq,lang:eq,Lang:nq,langd:rq,langle:iq,lap:oq,Laplacetrf:sq,laquo:lq,larrb:aq,larrbfs:cq,larr:uq,Larr:fq,lArr:hq,larrfs:dq,larrhk:pq,larrlp:gq,larrpl:vq,larrsim:mq,larrtl:yq,latail:bq,lAtail:wq,lat:xq,late:_q,lates:Sq,lbarr:kq,lBarr:Cq,lbbrk:Tq,lbrace:Eq,lbrack:Lq,lbrke:Aq,lbrksld:Mq,lbrkslu:Nq,Lcaron:$q,lcaron:Pq,Lcedil:Oq,lcedil:Rq,lceil:Dq,lcub:zq,Lcy:Iq,lcy:Fq,ldca:Hq,ldquo:qq,ldquor:Bq,ldrdhar:Wq,ldrushar:Uq,ldsh:jq,le:Vq,lE:Gq,LeftAngleBracket:Kq,LeftArrowBar:Xq,leftarrow:Yq,LeftArrow:Zq,Leftarrow:Jq,LeftArrowRightArrow:Qq,leftarrowtail:tB,LeftCeiling:eB,LeftDoubleBracket:nB,LeftDownTeeVector:rB,LeftDownVectorBar:iB,LeftDownVector:oB,LeftFloor:sB,leftharpoondown:lB,leftharpoonup:aB,leftleftarrows:cB,leftrightarrow:uB,LeftRightArrow:fB,Leftrightarrow:hB,leftrightarrows:dB,leftrightharpoons:pB,leftrightsquigarrow:gB,LeftRightVector:vB,LeftTeeArrow:mB,LeftTee:yB,LeftTeeVector:bB,leftthreetimes:wB,LeftTriangleBar:xB,LeftTriangle:_B,LeftTriangleEqual:SB,LeftUpDownVector:kB,LeftUpTeeVector:CB,LeftUpVectorBar:TB,LeftUpVector:EB,LeftVectorBar:LB,LeftVector:AB,lEg:MB,leg:NB,leq:$B,leqq:PB,leqslant:OB,lescc:RB,les:DB,lesdot:zB,lesdoto:IB,lesdotor:FB,lesg:HB,lesges:qB,lessapprox:BB,lessdot:WB,lesseqgtr:UB,lesseqqgtr:jB,LessEqualGreater:VB,LessFullEqual:GB,LessGreater:KB,lessgtr:XB,LessLess:YB,lesssim:ZB,LessSlantEqual:JB,LessTilde:QB,lfisht:t3,lfloor:e3,Lfr:n3,lfr:r3,lg:i3,lgE:o3,lHar:s3,lhard:l3,lharu:a3,lharul:c3,lhblk:u3,LJcy:f3,ljcy:h3,llarr:d3,ll:p3,Ll:g3,llcorner:v3,Lleftarrow:m3,llhard:y3,lltri:b3,Lmidot:w3,lmidot:x3,lmoustache:_3,lmoust:S3,lnap:k3,lnapprox:C3,lne:T3,lnE:E3,lneq:L3,lneqq:A3,lnsim:M3,loang:N3,loarr:$3,lobrk:P3,longleftarrow:O3,LongLeftArrow:R3,Longleftarrow:D3,longleftrightarrow:z3,LongLeftRightArrow:I3,Longleftrightarrow:F3,longmapsto:H3,longrightarrow:q3,LongRightArrow:B3,Longrightarrow:W3,looparrowleft:U3,looparrowright:j3,lopar:V3,Lopf:G3,lopf:K3,loplus:X3,lotimes:Y3,lowast:Z3,lowbar:J3,LowerLeftArrow:Q3,LowerRightArrow:t5,loz:e5,lozenge:n5,lozf:r5,lpar:i5,lparlt:o5,lrarr:s5,lrcorner:l5,lrhar:a5,lrhard:c5,lrm:u5,lrtri:f5,lsaquo:h5,lscr:d5,Lscr:p5,lsh:g5,Lsh:v5,lsim:m5,lsime:y5,lsimg:b5,lsqb:w5,lsquo:x5,lsquor:_5,Lstrok:S5,lstrok:k5,ltcc:C5,ltcir:T5,lt:E5,LT:L5,Lt:A5,ltdot:M5,lthree:N5,ltimes:$5,ltlarr:P5,ltquest:O5,ltri:R5,ltrie:D5,ltrif:z5,ltrPar:I5,lurdshar:F5,luruhar:H5,lvertneqq:q5,lvnE:B5,macr:W5,male:U5,malt:j5,maltese:V5,Map:"⤅",map:G5,mapsto:K5,mapstodown:X5,mapstoleft:Y5,mapstoup:Z5,marker:J5,mcomma:Q5,Mcy:t8,mcy:e8,mdash:n8,mDDot:r8,measuredangle:i8,MediumSpace:o8,Mellintrf:s8,Mfr:l8,mfr:a8,mho:c8,micro:u8,midast:f8,midcir:h8,mid:d8,middot:p8,minusb:g8,minus:v8,minusd:m8,minusdu:y8,MinusPlus:b8,mlcp:w8,mldr:x8,mnplus:_8,models:S8,Mopf:k8,mopf:C8,mp:T8,mscr:E8,Mscr:L8,mstpos:A8,Mu:M8,mu:N8,multimap:$8,mumap:P8,nabla:O8,Nacute:R8,nacute:D8,nang:z8,nap:I8,napE:F8,napid:H8,napos:q8,napprox:B8,natural:W8,naturals:U8,natur:j8,nbsp:V8,nbump:G8,nbumpe:K8,ncap:X8,Ncaron:Y8,ncaron:Z8,Ncedil:J8,ncedil:Q8,ncong:tW,ncongdot:eW,ncup:nW,Ncy:rW,ncy:iW,ndash:oW,nearhk:sW,nearr:lW,neArr:aW,nearrow:cW,ne:uW,nedot:fW,NegativeMediumSpace:hW,NegativeThickSpace:dW,NegativeThinSpace:pW,NegativeVeryThinSpace:gW,nequiv:vW,nesear:mW,nesim:yW,NestedGreaterGreater:bW,NestedLessLess:wW,NewLine:xW,nexist:_W,nexists:SW,Nfr:kW,nfr:CW,ngE:TW,nge:EW,ngeq:LW,ngeqq:AW,ngeqslant:MW,nges:NW,nGg:$W,ngsim:PW,nGt:OW,ngt:RW,ngtr:DW,nGtv:zW,nharr:IW,nhArr:FW,nhpar:HW,ni:qW,nis:BW,nisd:WW,niv:UW,NJcy:jW,njcy:VW,nlarr:GW,nlArr:KW,nldr:XW,nlE:YW,nle:ZW,nleftarrow:JW,nLeftarrow:QW,nleftrightarrow:tU,nLeftrightarrow:eU,nleq:nU,nleqq:rU,nleqslant:iU,nles:oU,nless:sU,nLl:lU,nlsim:aU,nLt:cU,nlt:uU,nltri:fU,nltrie:hU,nLtv:dU,nmid:pU,NoBreak:gU,NonBreakingSpace:vU,nopf:mU,Nopf:yU,Not:bU,not:wU,NotCongruent:xU,NotCupCap:_U,NotDoubleVerticalBar:SU,NotElement:kU,NotEqual:CU,NotEqualTilde:TU,NotExists:EU,NotGreater:LU,NotGreaterEqual:AU,NotGreaterFullEqual:MU,NotGreaterGreater:NU,NotGreaterLess:$U,NotGreaterSlantEqual:PU,NotGreaterTilde:OU,NotHumpDownHump:RU,NotHumpEqual:DU,notin:zU,notindot:IU,notinE:FU,notinva:HU,notinvb:qU,notinvc:BU,NotLeftTriangleBar:WU,NotLeftTriangle:UU,NotLeftTriangleEqual:jU,NotLess:VU,NotLessEqual:GU,NotLessGreater:KU,NotLessLess:XU,NotLessSlantEqual:YU,NotLessTilde:ZU,NotNestedGreaterGreater:JU,NotNestedLessLess:QU,notni:t4,notniva:e4,notnivb:n4,notnivc:r4,NotPrecedes:i4,NotPrecedesEqual:o4,NotPrecedesSlantEqual:s4,NotReverseElement:l4,NotRightTriangleBar:a4,NotRightTriangle:c4,NotRightTriangleEqual:u4,NotSquareSubset:f4,NotSquareSubsetEqual:h4,NotSquareSuperset:d4,NotSquareSupersetEqual:p4,NotSubset:g4,NotSubsetEqual:v4,NotSucceeds:m4,NotSucceedsEqual:y4,NotSucceedsSlantEqual:b4,NotSucceedsTilde:w4,NotSuperset:x4,NotSupersetEqual:_4,NotTilde:S4,NotTildeEqual:k4,NotTildeFullEqual:C4,NotTildeTilde:T4,NotVerticalBar:E4,nparallel:L4,npar:A4,nparsl:M4,npart:N4,npolint:$4,npr:P4,nprcue:O4,nprec:R4,npreceq:D4,npre:z4,nrarrc:I4,nrarr:F4,nrArr:H4,nrarrw:q4,nrightarrow:B4,nRightarrow:W4,nrtri:U4,nrtrie:j4,nsc:V4,nsccue:G4,nsce:K4,Nscr:X4,nscr:Y4,nshortmid:Z4,nshortparallel:J4,nsim:Q4,nsime:t6,nsimeq:e6,nsmid:n6,nspar:r6,nsqsube:i6,nsqsupe:o6,nsub:s6,nsubE:l6,nsube:a6,nsubset:c6,nsubseteq:u6,nsubseteqq:f6,nsucc:h6,nsucceq:d6,nsup:p6,nsupE:g6,nsupe:v6,nsupset:m6,nsupseteq:y6,nsupseteqq:b6,ntgl:w6,Ntilde:x6,ntilde:_6,ntlg:S6,ntriangleleft:k6,ntrianglelefteq:C6,ntriangleright:T6,ntrianglerighteq:E6,Nu:L6,nu:A6,num:M6,numero:N6,numsp:$6,nvap:P6,nvdash:O6,nvDash:R6,nVdash:D6,nVDash:z6,nvge:I6,nvgt:F6,nvHarr:H6,nvinfin:q6,nvlArr:B6,nvle:W6,nvlt:U6,nvltrie:j6,nvrArr:V6,nvrtrie:G6,nvsim:K6,nwarhk:X6,nwarr:Y6,nwArr:Z6,nwarrow:J6,nwnear:Q6,Oacute:tj,oacute:ej,oast:nj,Ocirc:rj,ocirc:ij,ocir:oj,Ocy:sj,ocy:lj,odash:aj,Odblac:cj,odblac:uj,odiv:fj,odot:hj,odsold:dj,OElig:pj,oelig:gj,ofcir:vj,Ofr:mj,ofr:yj,ogon:bj,Ograve:wj,ograve:xj,ogt:_j,ohbar:Sj,ohm:kj,oint:Cj,olarr:Tj,olcir:Ej,olcross:Lj,oline:Aj,olt:Mj,Omacr:Nj,omacr:$j,Omega:Pj,omega:Oj,Omicron:Rj,omicron:Dj,omid:zj,ominus:Ij,Oopf:Fj,oopf:Hj,opar:qj,OpenCurlyDoubleQuote:Bj,OpenCurlyQuote:Wj,operp:Uj,oplus:jj,orarr:Vj,Or:Gj,or:Kj,ord:Xj,order:Yj,orderof:Zj,ordf:Jj,ordm:Qj,origof:tV,oror:eV,orslope:nV,orv:rV,oS:iV,Oscr:oV,oscr:sV,Oslash:lV,oslash:aV,osol:cV,Otilde:uV,otilde:fV,otimesas:hV,Otimes:dV,otimes:pV,Ouml:gV,ouml:vV,ovbar:mV,OverBar:yV,OverBrace:bV,OverBracket:wV,OverParenthesis:xV,para:_V,parallel:SV,par:kV,parsim:CV,parsl:TV,part:EV,PartialD:LV,Pcy:AV,pcy:MV,percnt:NV,period:$V,permil:PV,perp:OV,pertenk:RV,Pfr:DV,pfr:zV,Phi:IV,phi:FV,phiv:HV,phmmat:qV,phone:BV,Pi:WV,pi:UV,pitchfork:jV,piv:VV,planck:GV,planckh:KV,plankv:XV,plusacir:YV,plusb:ZV,pluscir:JV,plus:QV,plusdo:tG,plusdu:eG,pluse:nG,PlusMinus:rG,plusmn:iG,plussim:oG,plustwo:sG,pm:lG,Poincareplane:aG,pointint:cG,popf:uG,Popf:fG,pound:hG,prap:dG,Pr:pG,pr:gG,prcue:vG,precapprox:mG,prec:yG,preccurlyeq:bG,Precedes:wG,PrecedesEqual:xG,PrecedesSlantEqual:_G,PrecedesTilde:SG,preceq:kG,precnapprox:CG,precneqq:TG,precnsim:EG,pre:LG,prE:AG,precsim:MG,prime:NG,Prime:$G,primes:PG,prnap:OG,prnE:RG,prnsim:DG,prod:zG,Product:IG,profalar:FG,profline:HG,profsurf:qG,prop:BG,Proportional:WG,Proportion:UG,propto:jG,prsim:VG,prurel:GG,Pscr:KG,pscr:XG,Psi:YG,psi:ZG,puncsp:JG,Qfr:QG,qfr:t9,qint:e9,qopf:n9,Qopf:r9,qprime:i9,Qscr:o9,qscr:s9,quaternions:l9,quatint:a9,quest:c9,questeq:u9,quot:f9,QUOT:h9,rAarr:d9,race:p9,Racute:g9,racute:v9,radic:m9,raemptyv:y9,rang:b9,Rang:w9,rangd:x9,range:_9,rangle:S9,raquo:k9,rarrap:C9,rarrb:T9,rarrbfs:E9,rarrc:L9,rarr:A9,Rarr:M9,rArr:N9,rarrfs:$9,rarrhk:P9,rarrlp:O9,rarrpl:R9,rarrsim:D9,Rarrtl:z9,rarrtl:I9,rarrw:F9,ratail:H9,rAtail:q9,ratio:B9,rationals:W9,rbarr:U9,rBarr:j9,RBarr:V9,rbbrk:G9,rbrace:K9,rbrack:X9,rbrke:Y9,rbrksld:Z9,rbrkslu:J9,Rcaron:Q9,rcaron:t7,Rcedil:e7,rcedil:n7,rceil:r7,rcub:i7,Rcy:o7,rcy:s7,rdca:l7,rdldhar:a7,rdquo:c7,rdquor:u7,rdsh:f7,real:h7,realine:d7,realpart:p7,reals:g7,Re:v7,rect:m7,reg:y7,REG:b7,ReverseElement:w7,ReverseEquilibrium:x7,ReverseUpEquilibrium:_7,rfisht:S7,rfloor:k7,rfr:C7,Rfr:T7,rHar:E7,rhard:L7,rharu:A7,rharul:M7,Rho:N7,rho:$7,rhov:P7,RightAngleBracket:O7,RightArrowBar:R7,rightarrow:D7,RightArrow:z7,Rightarrow:I7,RightArrowLeftArrow:F7,rightarrowtail:H7,RightCeiling:q7,RightDoubleBracket:B7,RightDownTeeVector:W7,RightDownVectorBar:U7,RightDownVector:j7,RightFloor:V7,rightharpoondown:G7,rightharpoonup:K7,rightleftarrows:X7,rightleftharpoons:Y7,rightrightarrows:Z7,rightsquigarrow:J7,RightTeeArrow:Q7,RightTee:tK,RightTeeVector:eK,rightthreetimes:nK,RightTriangleBar:rK,RightTriangle:iK,RightTriangleEqual:oK,RightUpDownVector:sK,RightUpTeeVector:lK,RightUpVectorBar:aK,RightUpVector:cK,RightVectorBar:uK,RightVector:fK,ring:hK,risingdotseq:dK,rlarr:pK,rlhar:gK,rlm:vK,rmoustache:mK,rmoust:yK,rnmid:bK,roang:wK,roarr:xK,robrk:_K,ropar:SK,ropf:kK,Ropf:CK,roplus:TK,rotimes:EK,RoundImplies:LK,rpar:AK,rpargt:MK,rppolint:NK,rrarr:$K,Rrightarrow:PK,rsaquo:OK,rscr:RK,Rscr:DK,rsh:zK,Rsh:IK,rsqb:FK,rsquo:HK,rsquor:qK,rthree:BK,rtimes:WK,rtri:UK,rtrie:jK,rtrif:VK,rtriltri:GK,RuleDelayed:KK,ruluhar:XK,rx:YK,Sacute:ZK,sacute:JK,sbquo:QK,scap:tX,Scaron:eX,scaron:nX,Sc:rX,sc:iX,sccue:oX,sce:sX,scE:lX,Scedil:aX,scedil:cX,Scirc:uX,scirc:fX,scnap:hX,scnE:dX,scnsim:pX,scpolint:gX,scsim:vX,Scy:mX,scy:yX,sdotb:bX,sdot:wX,sdote:xX,searhk:_X,searr:SX,seArr:kX,searrow:CX,sect:TX,semi:EX,seswar:LX,setminus:AX,setmn:MX,sext:NX,Sfr:$X,sfr:PX,sfrown:OX,sharp:RX,SHCHcy:DX,shchcy:zX,SHcy:IX,shcy:FX,ShortDownArrow:HX,ShortLeftArrow:qX,shortmid:BX,shortparallel:WX,ShortRightArrow:UX,ShortUpArrow:jX,shy:VX,Sigma:GX,sigma:KX,sigmaf:XX,sigmav:YX,sim:ZX,simdot:JX,sime:QX,simeq:tY,simg:eY,simgE:nY,siml:rY,simlE:iY,simne:oY,simplus:sY,simrarr:lY,slarr:aY,SmallCircle:cY,smallsetminus:uY,smashp:fY,smeparsl:hY,smid:dY,smile:pY,smt:gY,smte:vY,smtes:mY,SOFTcy:yY,softcy:bY,solbar:wY,solb:xY,sol:_Y,Sopf:SY,sopf:kY,spades:CY,spadesuit:TY,spar:EY,sqcap:LY,sqcaps:AY,sqcup:MY,sqcups:NY,Sqrt:$Y,sqsub:PY,sqsube:OY,sqsubset:RY,sqsubseteq:DY,sqsup:zY,sqsupe:IY,sqsupset:FY,sqsupseteq:HY,square:qY,Square:BY,SquareIntersection:WY,SquareSubset:UY,SquareSubsetEqual:jY,SquareSuperset:VY,SquareSupersetEqual:GY,SquareUnion:KY,squarf:XY,squ:YY,squf:ZY,srarr:JY,Sscr:QY,sscr:tZ,ssetmn:eZ,ssmile:nZ,sstarf:rZ,Star:iZ,star:oZ,starf:sZ,straightepsilon:lZ,straightphi:aZ,strns:cZ,sub:uZ,Sub:fZ,subdot:hZ,subE:dZ,sube:pZ,subedot:gZ,submult:vZ,subnE:mZ,subne:yZ,subplus:bZ,subrarr:wZ,subset:xZ,Subset:_Z,subseteq:SZ,subseteqq:kZ,SubsetEqual:CZ,subsetneq:TZ,subsetneqq:EZ,subsim:LZ,subsub:AZ,subsup:MZ,succapprox:NZ,succ:$Z,succcurlyeq:PZ,Succeeds:OZ,SucceedsEqual:RZ,SucceedsSlantEqual:DZ,SucceedsTilde:zZ,succeq:IZ,succnapprox:FZ,succneqq:HZ,succnsim:qZ,succsim:BZ,SuchThat:WZ,sum:UZ,Sum:jZ,sung:VZ,sup1:GZ,sup2:KZ,sup3:XZ,sup:YZ,Sup:ZZ,supdot:JZ,supdsub:QZ,supE:tJ,supe:eJ,supedot:nJ,Superset:rJ,SupersetEqual:iJ,suphsol:oJ,suphsub:sJ,suplarr:lJ,supmult:aJ,supnE:cJ,supne:uJ,supplus:fJ,supset:hJ,Supset:dJ,supseteq:pJ,supseteqq:gJ,supsetneq:vJ,supsetneqq:mJ,supsim:yJ,supsub:bJ,supsup:wJ,swarhk:xJ,swarr:_J,swArr:SJ,swarrow:kJ,swnwar:CJ,szlig:TJ,Tab:EJ,target:LJ,Tau:AJ,tau:MJ,tbrk:NJ,Tcaron:$J,tcaron:PJ,Tcedil:OJ,tcedil:RJ,Tcy:DJ,tcy:zJ,tdot:IJ,telrec:FJ,Tfr:HJ,tfr:qJ,there4:BJ,therefore:WJ,Therefore:UJ,Theta:jJ,theta:VJ,thetasym:GJ,thetav:KJ,thickapprox:XJ,thicksim:YJ,ThickSpace:ZJ,ThinSpace:JJ,thinsp:QJ,thkap:tQ,thksim:eQ,THORN:nQ,thorn:rQ,tilde:iQ,Tilde:oQ,TildeEqual:sQ,TildeFullEqual:lQ,TildeTilde:aQ,timesbar:cQ,timesb:uQ,times:fQ,timesd:hQ,tint:dQ,toea:pQ,topbot:gQ,topcir:vQ,top:mQ,Topf:yQ,topf:bQ,topfork:wQ,tosa:xQ,tprime:_Q,trade:SQ,TRADE:kQ,triangle:CQ,triangledown:TQ,triangleleft:EQ,trianglelefteq:LQ,triangleq:AQ,triangleright:MQ,trianglerighteq:NQ,tridot:$Q,trie:PQ,triminus:OQ,TripleDot:RQ,triplus:DQ,trisb:zQ,tritime:IQ,trpezium:FQ,Tscr:HQ,tscr:qQ,TScy:BQ,tscy:WQ,TSHcy:UQ,tshcy:jQ,Tstrok:VQ,tstrok:GQ,twixt:KQ,twoheadleftarrow:XQ,twoheadrightarrow:YQ,Uacute:ZQ,uacute:JQ,uarr:QQ,Uarr:ttt,uArr:ett,Uarrocir:ntt,Ubrcy:rtt,ubrcy:itt,Ubreve:ott,ubreve:stt,Ucirc:ltt,ucirc:att,Ucy:ctt,ucy:utt,udarr:ftt,Udblac:htt,udblac:dtt,udhar:ptt,ufisht:gtt,Ufr:vtt,ufr:mtt,Ugrave:ytt,ugrave:btt,uHar:wtt,uharl:xtt,uharr:_tt,uhblk:Stt,ulcorn:ktt,ulcorner:Ctt,ulcrop:Ttt,ultri:Ett,Umacr:Ltt,umacr:Att,uml:Mtt,UnderBar:Ntt,UnderBrace:$tt,UnderBracket:Ptt,UnderParenthesis:Ott,Union:Rtt,UnionPlus:Dtt,Uogon:ztt,uogon:Itt,Uopf:Ftt,uopf:Htt,UpArrowBar:qtt,uparrow:Btt,UpArrow:Wtt,Uparrow:Utt,UpArrowDownArrow:jtt,updownarrow:Vtt,UpDownArrow:Gtt,Updownarrow:Ktt,UpEquilibrium:Xtt,upharpoonleft:Ytt,upharpoonright:Ztt,uplus:Jtt,UpperLeftArrow:Qtt,UpperRightArrow:tet,upsi:eet,Upsi:net,upsih:ret,Upsilon:iet,upsilon:oet,UpTeeArrow:set,UpTee:aet,upuparrows:cet,urcorn:uet,urcorner:fet,urcrop:het,Uring:det,uring:pet,urtri:get,Uscr:vet,uscr:met,utdot:yet,Utilde:bet,utilde:wet,utri:xet,utrif:_et,uuarr:ket,Uuml:Cet,uuml:Tet,uwangle:Eet,vangrt:Let,varepsilon:Aet,varkappa:Met,varnothing:Net,varphi:$et,varpi:Pet,varpropto:Oet,varr:Ret,vArr:Det,varrho:zet,varsigma:Iet,varsubsetneq:Fet,varsubsetneqq:Het,varsupsetneq:qet,varsupsetneqq:Bet,vartheta:Wet,vartriangleleft:Uet,vartriangleright:jet,vBar:Vet,Vbar:Get,vBarv:Ket,Vcy:Xet,vcy:Yet,vdash:Zet,vDash:Jet,Vdash:Qet,VDash:tnt,Vdashl:ent,veebar:nnt,vee:rnt,Vee:int,veeeq:ont,vellip:snt,verbar:lnt,Verbar:ant,vert:cnt,Vert:unt,VerticalBar:fnt,VerticalLine:hnt,VerticalSeparator:dnt,VerticalTilde:pnt,VeryThinSpace:gnt,Vfr:vnt,vfr:mnt,vltri:ynt,vnsub:bnt,vnsup:wnt,Vopf:xnt,vopf:_nt,vprop:Snt,vrtri:knt,Vscr:Cnt,vscr:Tnt,vsubnE:Ent,vsubne:Lnt,vsupnE:Ant,vsupne:Mnt,Vvdash:Nnt,vzigzag:$nt,Wcirc:Pnt,wcirc:Ont,wedbar:Rnt,wedge:Dnt,Wedge:znt,wedgeq:Int,weierp:Fnt,Wfr:Hnt,wfr:qnt,Wopf:Bnt,wopf:Wnt,wp:Unt,wr:jnt,wreath:Vnt,Wscr:Gnt,wscr:Knt,xcap:Xnt,xcirc:Ynt,xcup:Znt,xdtri:Jnt,Xfr:Qnt,xfr:trt,xharr:ert,xhArr:nrt,Xi:rrt,xi:irt,xlarr:ort,xlArr:srt,xmap:lrt,xnis:art,xodot:crt,Xopf:urt,xopf:frt,xoplus:hrt,xotime:drt,xrarr:prt,xrArr:grt,Xscr:vrt,xscr:mrt,xsqcup:yrt,xuplus:brt,xutri:wrt,xvee:xrt,xwedge:_rt,Yacute:Srt,yacute:krt,YAcy:Crt,yacy:Trt,Ycirc:Ert,ycirc:Lrt,Ycy:Art,ycy:Mrt,yen:Nrt,Yfr:$rt,yfr:Prt,YIcy:Ort,yicy:Rrt,Yopf:Drt,yopf:zrt,Yscr:Irt,yscr:Frt,YUcy:Hrt,yucy:qrt,yuml:Brt,Yuml:Wrt,Zacute:Urt,zacute:jrt,Zcaron:Vrt,zcaron:Grt,Zcy:Krt,zcy:Xrt,Zdot:Yrt,zdot:Zrt,zeetrf:Jrt,ZeroWidthSpace:Qrt,Zeta:tit,zeta:eit,zfr:nit,Zfr:rit,ZHcy:iit,zhcy:oit,zigrarr:sit,zopf:lit,Zopf:ait,Zscr:cit,zscr:uit,zwj:fit,zwnj:hit},dit="Á",pit="á",git="Â",vit="â",mit="´",yit="Æ",bit="æ",wit="À",xit="à",_it="&",Sit="&",kit="Å",Cit="å",Tit="Ã",Eit="ã",Lit="Ä",Ait="ä",Mit="¦",Nit="Ç",$it="ç",Pit="¸",Oit="¢",Rit="©",Dit="©",zit="¤",Iit="°",Fit="÷",Hit="É",qit="é",Bit="Ê",Wit="ê",Uit="È",jit="è",Vit="Ð",Git="ð",Kit="Ë",Xit="ë",Yit="½",Zit="¼",Jit="¾",Qit=">",tot=">",eot="Í",not="í",rot="Î",iot="î",oot="¡",sot="Ì",lot="ì",aot="¿",cot="Ï",uot="ï",fot="«",hot="<",dot="<",pot="¯",got="µ",vot="·",mot=" ",yot="¬",bot="Ñ",wot="ñ",xot="Ó",_ot="ó",Sot="Ô",kot="ô",Cot="Ò",Tot="ò",Eot="ª",Lot="º",Aot="Ø",Mot="ø",Not="Õ",$ot="õ",Pot="Ö",Oot="ö",Rot="¶",Dot="±",zot="£",Iot='"',Fot='"',Hot="»",qot="®",Bot="®",Wot="§",Uot="",jot="¹",Vot="²",Got="³",Kot="ß",Xot="Þ",Yot="þ",Zot="×",Jot="Ú",Qot="ú",tst="Û",est="û",nst="Ù",rst="ù",ist="¨",ost="Ü",sst="ü",lst="Ý",ast="ý",cst="¥",ust="ÿ",fst={Aacute:dit,aacute:pit,Acirc:git,acirc:vit,acute:mit,AElig:yit,aelig:bit,Agrave:wit,agrave:xit,amp:_it,AMP:Sit,Aring:kit,aring:Cit,Atilde:Tit,atilde:Eit,Auml:Lit,auml:Ait,brvbar:Mit,Ccedil:Nit,ccedil:$it,cedil:Pit,cent:Oit,copy:Rit,COPY:Dit,curren:zit,deg:Iit,divide:Fit,Eacute:Hit,eacute:qit,Ecirc:Bit,ecirc:Wit,Egrave:Uit,egrave:jit,ETH:Vit,eth:Git,Euml:Kit,euml:Xit,frac12:Yit,frac14:Zit,frac34:Jit,gt:Qit,GT:tot,Iacute:eot,iacute:not,Icirc:rot,icirc:iot,iexcl:oot,Igrave:sot,igrave:lot,iquest:aot,Iuml:cot,iuml:uot,laquo:fot,lt:hot,LT:dot,macr:pot,micro:got,middot:vot,nbsp:mot,not:yot,Ntilde:bot,ntilde:wot,Oacute:xot,oacute:_ot,Ocirc:Sot,ocirc:kot,Ograve:Cot,ograve:Tot,ordf:Eot,ordm:Lot,Oslash:Aot,oslash:Mot,Otilde:Not,otilde:$ot,Ouml:Pot,ouml:Oot,para:Rot,plusmn:Dot,pound:zot,quot:Iot,QUOT:Fot,raquo:Hot,reg:qot,REG:Bot,sect:Wot,shy:Uot,sup1:jot,sup2:Vot,sup3:Got,szlig:Kot,THORN:Xot,thorn:Yot,times:Zot,Uacute:Jot,uacute:Qot,Ucirc:tst,ucirc:est,Ugrave:nst,ugrave:rst,uml:ist,Uuml:ost,uuml:sst,Yacute:lst,yacute:ast,yen:cst,yuml:ust},hst="&",dst="'",pst=">",gst="<",vst='"',Jy={amp:hst,apos:dst,gt:pst,lt:gst,quot:vst};var id={};const mst={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var yst=bo&&bo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(id,"__esModule",{value:!0});var Xv=yst(mst),bst=String.fromCodePoint||function(t){var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function wst(t){return t>=55296&&t<=57343||t>1114111?"�":(t in Xv.default&&(t=Xv.default[t]),bst(t))}id.default=wst;var au=bo&&bo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kr,"__esModule",{value:!0});Kr.decodeHTML=Kr.decodeHTMLStrict=Kr.decodeXML=void 0;var fh=au(Zy),xst=au(fst),_st=au(Jy),Yv=au(id),Sst=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Kr.decodeXML=Qy(_st.default);Kr.decodeHTMLStrict=Qy(fh.default);function Qy(t){var e=tb(t);return function(r){return String(r).replace(Sst,e)}}var Zv=function(t,e){return t<e?1:-1};Kr.decodeHTML=function(){for(var t=Object.keys(xst.default).sort(Zv),e=Object.keys(fh.default).sort(Zv),r=0,o=0;r<e.length;r++)t[o]===e[r]?(e[r]+=";?",o++):e[r]+=";";var s=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),c=tb(fh.default);function f(h){return h.substr(-1)!==";"&&(h+=";"),c(h)}return function(h){return String(h).replace(s,f)}}();function tb(t){return function(r){if(r.charAt(1)==="#"){var o=r.charAt(2);return o==="X"||o==="x"?Yv.default(parseInt(r.substr(3),16)):Yv.default(parseInt(r.substr(2),10))}return t[r.slice(1,-1)]||r}}var Dn={},eb=bo&&bo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.escapeUTF8=Dn.escape=Dn.encodeNonAsciiHTML=Dn.encodeHTML=Dn.encodeXML=void 0;var kst=eb(Jy),nb=ib(kst.default),rb=ob(nb);Dn.encodeXML=ab(nb);var Cst=eb(Zy),od=ib(Cst.default),Tst=ob(od);Dn.encodeHTML=Lst(od,Tst);Dn.encodeNonAsciiHTML=ab(od);function ib(t){return Object.keys(t).sort().reduce(function(e,r){return e[t[r]]="&"+r+";",e},{})}function ob(t){for(var e=[],r=[],o=0,s=Object.keys(t);o<s.length;o++){var c=s[o];c.length===1?e.push("\\"+c):r.push(c)}e.sort();for(var f=0;f<e.length-1;f++){for(var h=f;h<e.length-1&&e[h].charCodeAt(1)+1===e[h+1].charCodeAt(1);)h+=1;var d=1+h-f;d<3||e.splice(f,d,e[f]+"-"+e[h])}return r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}var sb=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,Est=String.prototype.codePointAt!=null?function(t){return t.codePointAt(0)}:function(t){return(t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)-56320+65536};function cu(t){return"&#x"+(t.length>1?Est(t):t.charCodeAt(0)).toString(16).toUpperCase()+";"}function Lst(t,e){return function(r){return r.replace(e,function(o){return t[o]}).replace(sb,cu)}}var lb=new RegExp(rb.source+"|"+sb.source,"g");function Ast(t){return t.replace(lb,cu)}Dn.escape=Ast;function Mst(t){return t.replace(rb,cu)}Dn.escapeUTF8=Mst;function ab(t){return function(e){return e.replace(lb,function(r){return t[r]||cu(r)})}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var e=Kr,r=Dn;function o(d,g){return(!g||g<=0?e.decodeXML:e.decodeHTML)(d)}t.decode=o;function s(d,g){return(!g||g<=0?e.decodeXML:e.decodeHTMLStrict)(d)}t.decodeStrict=s;function c(d,g){return(!g||g<=0?r.encodeXML:r.encodeHTML)(d)}t.encode=c;var f=Dn;Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return f.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return f.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return f.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return f.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return f.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return f.encodeHTML}});var h=Kr;Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(Yy);function Nst(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $st(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Pst(t,e,r){return e&&$st(t.prototype,e),t}function cb(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Ost(t))||e){r&&(t=r);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(g){throw g},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
23
23
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,f=!1,h;return{s:function(){r=r.call(t)},n:function(){var g=r.next();return c=g.done,g},e:function(g){f=!0,h=g},f:function(){try{!c&&r.return!=null&&r.return()}finally{if(f)throw h}}}}function Ost(t,e){if(t){if(typeof t=="string")return Jv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jv(t,e)}}function Jv(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}var Rst=Yy,Qv={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:Dst()};function Dst(){var t={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return ja(0,5).forEach(function(e){ja(0,5).forEach(function(r){ja(0,5).forEach(function(o){return zst(e,r,o,t)})})}),ja(0,23).forEach(function(e){var r=e+232,o=ub(e*10+8);t[r]="#"+o+o+o}),t}function zst(t,e,r,o){var s=16+t*36+e*6+r,c=t>0?t*40+55:0,f=e>0?e*40+55:0,h=r>0?r*40+55:0;o[s]=Ist([c,f,h])}function ub(t){for(var e=t.toString(16);e.length<2;)e="0"+e;return e}function Ist(t){var e=[],r=cb(t),o;try{for(r.s();!(o=r.n()).done;){var s=o.value;e.push(ub(s))}}catch(c){r.e(c)}finally{r.f()}return"#"+e.join("")}function tm(t,e,r,o){var s;return e==="text"?s=Bst(r,o):e==="display"?s=Hst(t,r,o):e==="xterm256Foreground"?s=ac(t,o.colors[r]):e==="xterm256Background"?s=cc(t,o.colors[r]):e==="rgb"&&(s=Fst(t,r)),s}function Fst(t,e){e=e.substring(2).slice(0,-1);var r=+e.substr(0,2),o=e.substring(5).split(";"),s=o.map(function(c){return("0"+Number(c).toString(16)).substr(-2)}).join("");return lc(t,(r===38?"color:#":"background-color:#")+s)}function Hst(t,e,r){e=parseInt(e,10);var o={"-1":function(){return"<br/>"},0:function(){return t.length&&fb(t)},1:function(){return Ei(t,"b")},3:function(){return Ei(t,"i")},4:function(){return Ei(t,"u")},8:function(){return lc(t,"display:none")},9:function(){return Ei(t,"strike")},22:function(){return lc(t,"font-weight:normal;text-decoration:none;font-style:normal")},23:function(){return nm(t,"i")},24:function(){return nm(t,"u")},39:function(){return ac(t,r.fg)},49:function(){return cc(t,r.bg)},53:function(){return lc(t,"text-decoration:overline")}},s;return o[e]?s=o[e]():4<e&&e<7?s=Ei(t,"blink"):29<e&&e<38?s=ac(t,r.colors[e-30]):39<e&&e<48?s=cc(t,r.colors[e-40]):89<e&&e<98?s=ac(t,r.colors[8+(e-90)]):99<e&&e<108&&(s=cc(t,r.colors[8+(e-100)])),s}function fb(t){var e=t.slice(0);return t.length=0,e.reverse().map(function(r){return"</"+r+">"}).join("")}function ja(t,e){for(var r=[],o=t;o<=e;o++)r.push(o);return r}function qst(t){return function(e){return(t===null||e.category!==t)&&t!=="all"}}function em(t){t=parseInt(t,10);var e=null;return t===0?e="all":t===1?e="bold":2<t&&t<5?e="underline":4<t&&t<7?e="blink":t===8?e="hide":t===9?e="strike":29<t&&t<38||t===39||89<t&&t<98?e="foreground-color":(39<t&&t<48||t===49||99<t&&t<108)&&(e="background-color"),e}function Bst(t,e){return e.escapeXML?Rst.encodeXML(t):t}function Ei(t,e,r){return r||(r=""),t.push(e),"<".concat(e).concat(r?' style="'.concat(r,'"'):"",">")}function lc(t,e){return Ei(t,"span",e)}function ac(t,e){return Ei(t,"span","color:"+e)}function cc(t,e){return Ei(t,"span","background-color:"+e)}function nm(t,e){var r;if(t.slice(-1)[0]===e&&(r=t.pop()),r)return"</"+e+">"}function Wst(t,e,r){var o=!1,s=3;function c(){return""}function f(F,H){return r("xterm256Foreground",H),""}function h(F,H){return r("xterm256Background",H),""}function d(F){return e.newline?r("display",-1):r("text",F),""}function g(F,H){o=!0,H.trim().length===0&&(H="0"),H=H.trimRight(";").split(";");var st=cb(H),Y;try{for(st.s();!(Y=st.n()).done;){var ht=Y.value;r("display",ht)}}catch(Z){st.e(Z)}finally{st.f()}return""}function v(F){return r("text",F),""}function y(F){return r("rgb",F),""}var w=[{pattern:/^\x08+/,sub:c},{pattern:/^\x1b\[[012]?K/,sub:c},{pattern:/^\x1b\[\(B/,sub:c},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:y},{pattern:/^\x1b\[38;5;(\d+)m/,sub:f},{pattern:/^\x1b\[48;5;(\d+)m/,sub:h},{pattern:/^\n/,sub:d},{pattern:/^\r+\n/,sub:d},{pattern:/^\r/,sub:d},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:g},{pattern:/^\x1b\[\d?J/,sub:c},{pattern:/^\x1b\[\d{0,3};\d{0,3}f/,sub:c},{pattern:/^\x1b\[?[\d;]{0,3}/,sub:c},{pattern:/^(([^\x1b\x08\r\n])+)/,sub:v}];function _(F,H){H>s&&o||(o=!1,t=t.replace(F.pattern,F.sub))}var L=[],M=t,A=M.length;t:for(;A>0;){for(var T=0,E=0,P=w.length;E<P;T=++E){var $=w[T];if(_($,T),t.length!==A){A=t.length;continue t}}if(t.length===A)break;L.push(0),A=t.length}return L}function Ust(t,e,r){return e!=="text"&&(t=t.filter(qst(em(r))),t.push({token:e,data:r,category:em(r)})),t}var jst=function(){function t(e){Nst(this,t),e=e||{},e.colors&&(e.colors=Object.assign({},Qv.colors,e.colors)),this.options=Object.assign({},Qv,e),this.stack=[],this.stickyStack=[]}return Pst(t,[{key:"toHtml",value:function(r){var o=this;r=typeof r=="string"?[r]:r;var s=this.stack,c=this.options,f=[];return this.stickyStack.forEach(function(h){var d=tm(s,h.token,h.data,c);d&&f.push(d)}),Wst(r.join(""),c,function(h,d){var g=tm(s,h,d,c);g&&f.push(g),c.stream&&(o.stickyStack=Ust(o.stickyStack,h,d))}),s.length&&f.push(fb(s)),f.join("")}}]),t}(),Vst=jst;const Gst=jy(Vst),Kst=/^[A-Za-z]:\//;function Xst(t=""){return t&&t.replace(/\\/g,"/").replace(Kst,e=>e.toUpperCase())}const Yst=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Zst(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const Jst=function(...t){t=t.map(o=>Xst(o));let e="",r=!1;for(let o=t.length-1;o>=-1&&!r;o--){const s=o>=0?t[o]:Zst();!s||s.length===0||(e=`${s}/${e}`,r=rm(s))}return e=Qst(e,!r),r&&!rm(e)?`/${e}`:e.length>0?e:"."};function Qst(t,e){let r="",o=0,s=-1,c=0,f=null;for(let h=0;h<=t.length;++h){if(h<t.length)f=t[h];else{if(f==="/")break;f="/"}if(f==="/"){if(!(s===h-1||c===1))if(c===2){if(r.length<2||o!==2||r[r.length-1]!=="."||r[r.length-2]!=="."){if(r.length>2){const d=r.lastIndexOf("/");d===-1?(r="",o=0):(r=r.slice(0,d),o=r.length-1-r.lastIndexOf("/")),s=h,c=0;continue}else if(r.length>0){r="",o=0,s=h,c=0;continue}}e&&(r+=r.length>0?"/..":"..",o=2)}else r.length>0?r+=`/${t.slice(s+1,h)}`:r=t.slice(s+1,h),o=h-s-1;s=h,c=0}else f==="."&&c!==-1?++c:c=-1}return r}const rm=function(t){return Yst.test(t)},tlt=44,im="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",elt=new Uint8Array(64),hb=new Uint8Array(128);for(let t=0;t<im.length;t++){const e=im.charCodeAt(t);elt[t]=e,hb[e]=t}function nlt(t){const e=new Int32Array(5),r=[];let o=0;do{const s=rlt(t,o),c=[];let f=!0,h=0;e[0]=0;for(let d=o;d<s;d++){let g;d=il(t,d,e,0);const v=e[0];v<h&&(f=!1),h=v,om(t,d,s)?(d=il(t,d,e,1),d=il(t,d,e,2),d=il(t,d,e,3),om(t,d,s)?(d=il(t,d,e,4),g=[v,e[1],e[2],e[3],e[4]]):g=[v,e[1],e[2],e[3]]):g=[v],c.push(g)}f||ilt(c),r.push(c),o=s+1}while(o<=t.length);return r}function rlt(t,e){const r=t.indexOf(";",e);return r===-1?t.length:r}function il(t,e,r,o){let s=0,c=0,f=0;do{const d=t.charCodeAt(e++);f=hb[d],s|=(f&31)<<c,c+=5}while(f&32);const h=s&1;return s>>>=1,h&&(s=-2147483648|-s),r[o]+=s,e}function om(t,e,r){return e>=r?!1:t.charCodeAt(e)!==tlt}function ilt(t){t.sort(olt)}function olt(t,e){return t[0]-e[0]}const slt=/^[\w+.-]+:\/\//,llt=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,alt=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var Pe;(function(t){t[t.Empty=1]="Empty",t[t.Hash=2]="Hash",t[t.Query=3]="Query",t[t.RelativePath=4]="RelativePath",t[t.AbsolutePath=5]="AbsolutePath",t[t.SchemeRelative=6]="SchemeRelative",t[t.Absolute=7]="Absolute"})(Pe||(Pe={}));function clt(t){return slt.test(t)}function ult(t){return t.startsWith("//")}function db(t){return t.startsWith("/")}function flt(t){return t.startsWith("file:")}function sm(t){return/^[.?#]/.test(t)}function Va(t){const e=llt.exec(t);return pb(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}function hlt(t){const e=alt.exec(t),r=e[2];return pb("file:","",e[1]||"","",db(r)?r:"/"+r,e[3]||"",e[4]||"")}function pb(t,e,r,o,s,c,f){return{scheme:t,user:e,host:r,port:o,path:s,query:c,hash:f,type:Pe.Absolute}}function lm(t){if(ult(t)){const r=Va("http:"+t);return r.scheme="",r.type=Pe.SchemeRelative,r}if(db(t)){const r=Va("http://foo.com"+t);return r.scheme="",r.host="",r.type=Pe.AbsolutePath,r}if(flt(t))return hlt(t);if(clt(t))return Va(t);const e=Va("http://foo.com/"+t);return e.scheme="",e.host="",e.type=t?t.startsWith("?")?Pe.Query:t.startsWith("#")?Pe.Hash:Pe.RelativePath:Pe.Empty,e}function dlt(t){if(t.endsWith("/.."))return t;const e=t.lastIndexOf("/");return t.slice(0,e+1)}function plt(t,e){gb(e,e.type),t.path==="/"?t.path=e.path:t.path=dlt(e.path)+t.path}function gb(t,e){const r=e<=Pe.RelativePath,o=t.path.split("/");let s=1,c=0,f=!1;for(let d=1;d<o.length;d++){const g=o[d];if(!g){f=!0;continue}if(f=!1,g!=="."){if(g===".."){c?(f=!0,c--,s--):r&&(o[s++]=g);continue}o[s++]=g,c++}}let h="";for(let d=1;d<s;d++)h+="/"+o[d];(!h||f&&!h.endsWith("/.."))&&(h+="/"),t.path=h}function glt(t,e){if(!t&&!e)return"";const r=lm(t);let o=r.type;if(e&&o!==Pe.Absolute){const c=lm(e),f=c.type;switch(o){case Pe.Empty:r.hash=c.hash;case Pe.Hash:r.query=c.query;case Pe.Query:case Pe.RelativePath:plt(r,c);case Pe.AbsolutePath:r.user=c.user,r.host=c.host,r.port=c.port;case Pe.SchemeRelative:r.scheme=c.scheme}f>o&&(o=f)}gb(r,o);const s=r.query+r.hash;switch(o){case Pe.Hash:case Pe.Query:return s;case Pe.RelativePath:{const c=r.path.slice(1);return c?sm(e||t)&&!sm(c)?"./"+c+s:c+s:s||"."}case Pe.AbsolutePath:return r.path+s;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+s}}function am(t,e){return e&&!e.endsWith("/")&&(e+="/"),glt(t,e)}function vlt(t){if(!t)return"";const e=t.lastIndexOf("/");return t.slice(0,e+1)}const zi=0,mlt=1,ylt=2,blt=3,wlt=4;function xlt(t,e){const r=cm(t,0);if(r===t.length)return t;e||(t=t.slice());for(let o=r;o<t.length;o=cm(t,o+1))t[o]=Slt(t[o],e);return t}function cm(t,e){for(let r=e;r<t.length;r++)if(!_lt(t[r]))return r;return t.length}function _lt(t){for(let e=1;e<t.length;e++)if(t[e][zi]<t[e-1][zi])return!1;return!0}function Slt(t,e){return e||(t=t.slice()),t.sort(klt)}function klt(t,e){return t[zi]-e[zi]}let Mc=!1;function Clt(t,e,r,o){for(;r<=o;){const s=r+(o-r>>1),c=t[s][zi]-e;if(c===0)return Mc=!0,s;c<0?r=s+1:o=s-1}return Mc=!1,r-1}function Tlt(t,e,r){for(let o=r+1;o<t.length&&t[o][zi]===e;r=o++);return r}function Elt(t,e,r){for(let o=r-1;o>=0&&t[o][zi]===e;r=o--);return r}function Llt(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function Alt(t,e,r,o){const{lastKey:s,lastNeedle:c,lastIndex:f}=r;let h=0,d=t.length-1;if(o===s){if(e===c)return Mc=f!==-1&&t[f][zi]===e,f;e>=c?h=f===-1?0:f:d=f}return r.lastKey=o,r.lastNeedle=e,r.lastIndex=Clt(t,e,h,d)}const Mlt="`line` must be greater than 0 (lines start at line 1)",Nlt="`column` must be greater than or equal to 0 (columns start at column 0)",um=-1,$lt=1;class Plt{constructor(e,r){const o=typeof e=="string";if(!o&&e._decodedMemo)return e;const s=o?JSON.parse(e):e,{version:c,file:f,names:h,sourceRoot:d,sources:g,sourcesContent:v}=s;this.version=c,this.file=f,this.names=h||[],this.sourceRoot=d,this.sources=g,this.sourcesContent=v,this.ignoreList=s.ignoreList||s.x_google_ignoreList||void 0;const y=am(d||"",vlt(r));this.resolvedSources=g.map(_=>am(_||"",y));const{mappings:w}=s;typeof w=="string"?(this._encoded=w,this._decoded=void 0):(this._encoded=void 0,this._decoded=xlt(w,o)),this._decodedMemo=Llt(),this._bySources=void 0,this._bySourceMemos=void 0}}function Olt(t){var e;return(e=t)._decoded||(e._decoded=nlt(t._encoded))}function Rlt(t,e){let{line:r,column:o,bias:s}=e;if(r--,r<0)throw new Error(Mlt);if(o<0)throw new Error(Nlt);const c=Olt(t);if(r>=c.length)return Ga(null,null,null,null);const f=c[r],h=Dlt(f,t._decodedMemo,r,o,s||$lt);if(h===-1)return Ga(null,null,null,null);const d=f[h];if(d.length===1)return Ga(null,null,null,null);const{names:g,resolvedSources:v}=t;return Ga(v[d[mlt]],d[ylt]+1,d[blt],d.length===5?g[d[wlt]]:null)}function Ga(t,e,r,o){return{source:t,line:e,column:r,name:o}}function Dlt(t,e,r,o,s){let c=Alt(t,o,e,r);return Mc?c=(s===um?Tlt:Elt)(t,o,c):s===um&&c++,c===-1||c===t.length?-1:c}const vb=/^\s*at .*(?:\S:\d+|\(native\))/m,zlt=/^(?:eval@)?(?:\[native code\])?$/,Ilt=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/vite-node/dist/","/vite-node/src/","/node_modules/chai/","/node_modules/tinypool/","/node_modules/tinyspy/","/deps/chai.js","/deps/vitest___chai.js","/deps/p-limit.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/];function mb(t){if(!t.includes(":"))return[t];const r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/^\(|\)$/g,""));if(!r)return[t];let o=r[1];if((o.startsWith("http:")||o.startsWith("https:"))&&(o=new URL(o).pathname),o.startsWith("/@fs/")){const s=/^\/@fs\/[a-zA-Z]:\//.test(o);o=o.slice(s?5:4)}return[o,r[2]||void 0,r[3]||void 0]}function Flt(t){let e=t.trim();if(zlt.test(e)||(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":")))return null;const r=/((.*".+"[^@]*)?[^@]*)(@)/,o=e.match(r),s=o&&o[1]?o[1]:void 0,[c,f,h]=mb(e.replace(r,""));return!c||!f||!h?null:{file:c,method:s||"",line:Number.parseInt(f),column:Number.parseInt(h)}}function Hlt(t){let e=t.trim();if(!vb.test(e))return null;e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const o=r.match(/ (\(.+\)$)/);r=o?r.replace(o[0],""):r;const[s,c,f]=mb(o?o[1]:r);let h=o&&r||"",d=s&&["eval","<anonymous>"].includes(s)?void 0:s;return!d||!c||!f?null:(h.startsWith("async ")&&(h=h.slice(6)),d.startsWith("file://")&&(d=d.slice(7)),d=Jst(d),h&&(h=h.replace(/__vite_ssr_import_\d+__\./g,"")),{method:h,file:d,line:Number.parseInt(c),column:Number.parseInt(f)})}function qlt(t,e={}){const{ignoreStackEntries:r=Ilt}=e;let o=vb.test(t)?Wlt(t):Blt(t);return r.length&&(o=o.filter(s=>!r.some(c=>s.file.match(c)))),o.map(s=>{var c;const f=(c=e.getSourceMap)==null?void 0:c.call(e,s.file);if(!f||typeof f!="object"||!f.version)return s;const h=new Plt(f),{line:d,column:g}=Rlt(h,s);return d!=null&&g!=null?{...s,line:d,column:g}:s})}function Blt(t){return t.split(`
|
|
24
24
|
`).map(e=>Flt(e)).filter(Vy)}function Wlt(t){return t.split(`
|
|
25
|
-
`).map(e=>Hlt(e)).filter(Vy)}function Ult(t,e){return e&&t.endsWith(e)}async function yb(t,e,r){const o=encodeURI(`${t}:${e}:${r}`);await fetch(`/__open-in-editor?file=${o}`)}function sd(t){return new Gst({fg:t?"#FFF":"#000",bg:t?"#000":"#FFF"})}function jlt(t){return t===null||typeof t!="function"&&typeof t!="object"}function bb(t){let e=t;if(jlt(t)&&(e={message:String(e).split(/\n/g)[0],stack:String(e),name:""}),!t){const r=new Error("unknown error");e={message:r.message,stack:r.stack,name:""}}return e.stacks=qlt(e.stack||e.stackStr||"",{ignoreStackEntries:[]}),e}function ld(t){return Zm()?(Kx(t),!0):!1}function Nr(t){return typeof t=="function"?t():B(t)}const Vlt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Glt=Object.prototype.toString,Klt=t=>Glt.call(t)==="[object Object]",wo=()=>{};function ad(t,e){function r(...o){return new Promise((s,c)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(s).catch(c)})}return r}const wb=t=>t();function xb(t,e={}){let r,o,s=wo;const c=h=>{clearTimeout(h),s(),s=wo};return h=>{const d=Nr(t),g=Nr(e.maxWait);return r&&c(r),d<=0||g!==void 0&&g<=0?(o&&(c(o),o=null),Promise.resolve(h())):new Promise((v,y)=>{s=e.rejectOnCancel?y:v,g&&!o&&(o=setTimeout(()=>{r&&c(r),o=null,v(h())},g)),r=setTimeout(()=>{o&&c(o),o=null,v(h())},d)})}}function Xlt(...t){let e=0,r,o=!0,s=wo,c,f,h,d,g;!Ae(t[0])&&typeof t[0]=="object"?{delay:f,trailing:h=!0,leading:d=!0,rejectOnCancel:g=!1}=t[0]:[f,h=!0,d=!0,g=!1]=t;const v=()=>{r&&(clearTimeout(r),r=void 0,s(),s=wo)};return w=>{const _=Nr(f),L=Date.now()-e,M=()=>c=w();return v(),_<=0?(e=Date.now(),M()):(L>_&&(d||!o)?(e=Date.now(),M()):h&&(c=new Promise((A,T)=>{s=g?T:A,r=setTimeout(()=>{e=Date.now(),o=!0,A(M()),v()},Math.max(0,_-L))})),!d&&!r&&(r=setTimeout(()=>o=!0,_)),o=!1,c)}}function Ylt(t=wb){const e=Qt(!0);function r(){e.value=!1}function o(){e.value=!0}const s=(...c)=>{e.value&&t(...c)};return{isActive:Gc(e),pause:r,resume:o,eventFilter:s}}function Zlt(t){return Xl()}function Jlt(...t){if(t.length!==1)return Fh(...t);const e=t[0];return typeof e=="function"?Gc(g0(()=>({get:e,set:wo}))):Qt(e)}function fm(t,e=200,r={}){return ad(xb(e,r),t)}function Qlt(t,e=200,r=!1,o=!0,s=!1){return ad(Xlt(e,r,o,s),t)}function tat(t,e=200,r=!0,o=!0){if(e<=0)return t;const s=Qt(t.value),c=Qlt(()=>{s.value=t.value},e,r,o);return Ge(t,()=>c()),s}function _b(t,e,r={}){const{eventFilter:o=wb,...s}=r;return Ge(t,ad(o,e),s)}function Sb(t,e,r={}){const{eventFilter:o,...s}=r,{eventFilter:c,pause:f,resume:h,isActive:d}=Ylt(o);return{stop:_b(t,e,{...s,eventFilter:c}),pause:f,resume:h,isActive:d}}function cd(t,e=!0,r){Zlt()?xs(t,r):e?t():Xr(t)}function eat(t=!1,e={}){const{truthyValue:r=!0,falsyValue:o=!1}=e,s=Ae(t),c=Qt(t);function f(h){if(arguments.length)return c.value=h,c.value;{const d=Nr(r);return c.value=c.value===d?Nr(o):d,c.value}}return s?f:[c,f]}function nat(t,e,r={}){const{debounce:o=0,maxWait:s=void 0,...c}=r;return _b(t,e,{...c,eventFilter:xb(o,{maxWait:s})})}function rat(t,e,r){const o=Ge(t,(...s)=>(Xr(()=>o()),e(...s)),r);return o}function iat(t,e,r){let o;Ae(r)?o={evaluating:r}:o={};const{lazy:s=!1,evaluating:c=void 0,shallow:f=!0,onError:h=wo}=o,d=Qt(!s),g=f?ws(e):Qt(e);let v=0;return Uh(async y=>{if(!d.value)return;v++;const w=v;let _=!1;c&&Promise.resolve().then(()=>{c.value=!0});try{const L=await t(M=>{y(()=>{c&&(c.value=!1),_||M()})});w===v&&(g.value=L)}catch(L){h(L)}finally{c&&w===v&&(c.value=!1),_=!0}}),s?_t(()=>(d.value=!0,g.value)):g}function Nc(t){var e;const r=Nr(t);return(e=r==null?void 0:r.$el)!=null?e:r}const pr=Vlt?window:void 0;function vs(...t){let e,r,o,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,o,s]=t,e=pr):[e,r,o,s]=t,!e)return wo;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const c=[],f=()=>{c.forEach(v=>v()),c.length=0},h=(v,y,w,_)=>(v.addEventListener(y,w,_),()=>v.removeEventListener(y,w,_)),d=Ge(()=>[Nc(e),Nr(s)],([v,y])=>{if(f(),!v)return;const w=Klt(y)?{...y}:y;c.push(...r.flatMap(_=>o.map(L=>h(v,_,L,w))))},{immediate:!0,flush:"post"}),g=()=>{d(),f()};return ld(g),g}function oat(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function sat(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:s=pr,eventName:c="keydown",passive:f=!1,dedupe:h=!1}=o,d=oat(e);return vs(s,c,v=>{v.repeat&&Nr(h)||d(v)&&r(v)},f)}function lat(){const t=Qt(!1),e=Xl();return e&&xs(()=>{t.value=!0},e),t}function kb(t){const e=lat();return _t(()=>(e.value,!!t()))}function Cb(t,e={}){const{window:r=pr}=e,o=kb(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let s;const c=Qt(!1),f=g=>{c.value=g.matches},h=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",f):s.removeListener(f))},d=Uh(()=>{o.value&&(h(),s=r.matchMedia(Nr(t)),"addEventListener"in s?s.addEventListener("change",f):s.addListener(f),c.value=s.matches)});return ld(()=>{d(),h(),s=void 0}),c}const Ka=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xa="__vueuse_ssr_handlers__",aat=cat();function cat(){return Xa in Ka||(Ka[Xa]=Ka[Xa]||{}),Ka[Xa]}function Tb(t,e){return aat[t]||e}function uat(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const fat={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},hm="vueuse-storage";function Eb(t,e,r,o={}){var s;const{flush:c="pre",deep:f=!0,listenToStorageChanges:h=!0,writeDefaults:d=!0,mergeDefaults:g=!1,shallow:v,window:y=pr,eventFilter:w,onError:_=Z=>{console.error(Z)},initOnMounted:L}=o,M=(v?ws:Qt)(typeof e=="function"?e():e);if(!r)try{r=Tb("getDefaultStorage",()=>{var Z;return(Z=pr)==null?void 0:Z.localStorage})()}catch(Z){_(Z)}if(!r)return M;const A=Nr(e),T=uat(A),E=(s=o.serializer)!=null?s:fat[T],{pause:P,resume:$}=Sb(M,()=>H(M.value),{flush:c,deep:f,eventFilter:w});y&&h&&cd(()=>{vs(y,"storage",Y),vs(y,hm,ht),L&&Y()}),L||Y();function F(Z,ut){y&&y.dispatchEvent(new CustomEvent(hm,{detail:{key:t,oldValue:Z,newValue:ut,storageArea:r}}))}function H(Z){try{const ut=r.getItem(t);if(Z==null)F(ut,null),r.removeItem(t);else{const lt=E.write(Z);ut!==lt&&(r.setItem(t,lt),F(ut,lt))}}catch(ut){_(ut)}}function st(Z){const ut=Z?Z.newValue:r.getItem(t);if(ut==null)return d&&A!=null&&r.setItem(t,E.write(A)),A;if(!Z&&g){const lt=E.read(ut);return typeof g=="function"?g(lt,A):T==="object"&&!Array.isArray(lt)?{...A,...lt}:lt}else return typeof ut!="string"?ut:E.read(ut)}function Y(Z){if(!(Z&&Z.storageArea!==r)){if(Z&&Z.key==null){M.value=A;return}if(!(Z&&Z.key!==t)){P();try{(Z==null?void 0:Z.newValue)!==E.write(M.value)&&(M.value=st(Z))}catch(ut){_(ut)}finally{Z?Xr($):$()}}}}function ht(Z){Y(Z.detail)}return M}function Lb(t){return Cb("(prefers-color-scheme: dark)",t)}function hat(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:s=pr,storage:c,storageKey:f="vueuse-color-scheme",listenToStorageChanges:h=!0,storageRef:d,emitAuto:g,disableTransition:v=!0}=t,y={auto:"",light:"light",dark:"dark",...t.modes||{}},w=Lb({window:s}),_=_t(()=>w.value?"dark":"light"),L=d||(f==null?Jlt(o):Eb(f,o,c,{window:s,listenToStorageChanges:h})),M=_t(()=>L.value==="auto"?_.value:L.value),A=Tb("updateHTMLAttrs",($,F,H)=>{const st=typeof $=="string"?s==null?void 0:s.document.querySelector($):Nc($);if(!st)return;let Y;if(v&&(Y=s.document.createElement("style"),Y.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),s.document.head.appendChild(Y)),F==="class"){const ht=H.split(/\s/g);Object.values(y).flatMap(Z=>(Z||"").split(/\s/g)).filter(Boolean).forEach(Z=>{ht.includes(Z)?st.classList.add(Z):st.classList.remove(Z)})}else st.setAttribute(F,H);v&&(s.getComputedStyle(Y).opacity,document.head.removeChild(Y))});function T($){var F;A(e,r,(F=y[$])!=null?F:$)}function E($){t.onChanged?t.onChanged($,T):T($)}Ge(M,E,{flush:"post",immediate:!0}),cd(()=>E(M.value));const P=_t({get(){return g?L.value:M.value},set($){L.value=$}});try{return Object.assign(P,{store:L,system:_,state:M})}catch{return P}}function dat(t={}){const{valueDark:e="dark",valueLight:r="",window:o=pr}=t,s=hat({...t,onChanged:(h,d)=>{var g;t.onChanged?(g=t.onChanged)==null||g.call(t,h==="dark",d,h):d(h)},modes:{dark:e,light:r}}),c=_t(()=>s.system?s.system.value:Lb({window:o}).value?"dark":"light");return _t({get(){return s.value==="dark"},set(h){const d=h?"dark":"light";c.value===d?s.value="auto":s.value=d}})}function pat(t,e,r={}){const{window:o=pr,...s}=r;let c;const f=kb(()=>o&&"ResizeObserver"in o),h=()=>{c&&(c.disconnect(),c=void 0)},d=_t(()=>Array.isArray(t)?t.map(y=>Nc(y)):[Nc(t)]),g=Ge(d,y=>{if(h(),f.value&&o){c=new ResizeObserver(e);for(const w of y)w&&c.observe(w,s)}},{immediate:!0,flush:"post"}),v=()=>{h(),g()};return ld(v),{isSupported:f,stop:v}}function ud(t,e,r={}){const{window:o=pr}=r;return Eb(t,e,o==null?void 0:o.localStorage,r)}function gat(t="history",e={}){const{initialValue:r={},removeNullishValues:o=!0,removeFalsyValues:s=!1,write:c=!0,window:f=pr}=e;if(!f)return Cr(r);const h=Cr({});function d(){if(t==="history")return f.location.search||"";if(t==="hash"){const T=f.location.hash||"",E=T.indexOf("?");return E>0?T.slice(E):""}else return(f.location.hash||"").replace(/^#/,"")}function g(T){const E=T.toString();if(t==="history")return`${E?`?${E}`:""}${f.location.hash||""}`;if(t==="hash-params")return`${f.location.search||""}${E?`#${E}`:""}`;const P=f.location.hash||"#",$=P.indexOf("?");return $>0?`${P.slice(0,$)}${E?`?${E}`:""}`:`${P}${E?`?${E}`:""}`}function v(){return new URLSearchParams(d())}function y(T){const E=new Set(Object.keys(h));for(const P of T.keys()){const $=T.getAll(P);h[P]=$.length>1?$:T.get(P)||"",E.delete(P)}Array.from(E).forEach(P=>delete h[P])}const{pause:w,resume:_}=Sb(h,()=>{const T=new URLSearchParams("");Object.keys(h).forEach(E=>{const P=h[E];Array.isArray(P)?P.forEach($=>T.append(E,$)):o&&P==null||s&&!P?T.delete(E):T.set(E,P)}),L(T)},{deep:!0});function L(T,E){w(),E&&y(T),f.history.replaceState(f.history.state,f.document.title,f.location.pathname+g(T)),_()}function M(){c&&L(v(),!0)}vs(f,"popstate",M,!1),t!=="history"&&vs(f,"hashchange",M,!1);const A=v();return A.keys().next().value?y(A):Object.assign(h,r),h}function vat(t={}){const{window:e=pr,initialWidth:r=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:c=!0}=t,f=Qt(r),h=Qt(o),d=()=>{e&&(c?(f.value=e.innerWidth,h.value=e.innerHeight):(f.value=e.document.documentElement.clientWidth,h.value=e.document.documentElement.clientHeight))};if(d(),cd(d),vs("resize",d,{passive:!0}),s){const g=Cb("(orientation: portrait)");Ge(g,()=>d())}return{width:f,height:h}}const Ab=gat("hash",{initialValue:{file:"",view:null}}),Bn=Fh(Ab,"file"),or=Fh(Ab,"view");var zn=Uint8Array,ts=Uint16Array,mat=Int32Array,Mb=new zn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Nb=new zn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yat=new zn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$b=function(t,e){for(var r=new ts(31),o=0;o<31;++o)r[o]=e+=1<<t[o-1];for(var s=new mat(r[30]),o=1;o<30;++o)for(var c=r[o];c<r[o+1];++c)s[c]=c-r[o]<<5|o;return{b:r,r:s}},Pb=$b(Mb,2),Ob=Pb.b,bat=Pb.r;Ob[28]=258,bat[258]=28;var wat=$b(Nb,0),xat=wat.b,hh=new ts(32768);for(var xe=0;xe<32768;++xe){var vi=(xe&43690)>>1|(xe&21845)<<1;vi=(vi&52428)>>2|(vi&13107)<<2,vi=(vi&61680)>>4|(vi&3855)<<4,hh[xe]=((vi&65280)>>8|(vi&255)<<8)>>1}var Sl=function(t,e,r){for(var o=t.length,s=0,c=new ts(e);s<o;++s)t[s]&&++c[t[s]-1];var f=new ts(e);for(s=1;s<e;++s)f[s]=f[s-1]+c[s-1]<<1;var h;if(r){h=new ts(1<<e);var d=15-e;for(s=0;s<o;++s)if(t[s])for(var g=s<<4|t[s],v=e-t[s],y=f[t[s]-1]++<<v,w=y|(1<<v)-1;y<=w;++y)h[hh[y]>>d]=g}else for(h=new ts(o),s=0;s<o;++s)t[s]&&(h[s]=hh[f[t[s]-1]++]>>15-t[s]);return h},Ql=new zn(288);for(var xe=0;xe<144;++xe)Ql[xe]=8;for(var xe=144;xe<256;++xe)Ql[xe]=9;for(var xe=256;xe<280;++xe)Ql[xe]=7;for(var xe=280;xe<288;++xe)Ql[xe]=8;var Rb=new zn(32);for(var xe=0;xe<32;++xe)Rb[xe]=5;var _at=Sl(Ql,9,1),Sat=Sl(Rb,5,1),Lf=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},sr=function(t,e,r){var o=e/8|0;return(t[o]|t[o+1]<<8)>>(e&7)&r},Af=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},kat=function(t){return(t+7)/8|0},Db=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new zn(t.subarray(e,r))},Cat=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],En=function(t,e,r){var o=new Error(e||Cat[t]);if(o.code=t,Error.captureStackTrace&&Error.captureStackTrace(o,En),!r)throw o;return o},fd=function(t,e,r,o){var s=t.length,c=0;if(!s||e.f&&!e.l)return r||new zn(0);var f=!r,h=f||e.i!=2,d=e.i;f&&(r=new zn(s*3));var g=function(Et){var Xt=r.length;if(Et>Xt){var O=new zn(Math.max(Xt*2,Et));O.set(r),r=O}},v=e.f||0,y=e.p||0,w=e.b||0,_=e.l,L=e.d,M=e.m,A=e.n,T=s*8;do{if(!_){v=sr(t,y,1);var E=sr(t,y+1,3);if(y+=3,E)if(E==1)_=_at,L=Sat,M=9,A=5;else if(E==2){var H=sr(t,y,31)+257,st=sr(t,y+10,15)+4,Y=H+sr(t,y+5,31)+1;y+=14;for(var ht=new zn(Y),Z=new zn(19),ut=0;ut<st;++ut)Z[yat[ut]]=sr(t,y+ut*3,7);y+=st*3;for(var lt=Lf(Z),G=(1<<lt)-1,I=Sl(Z,lt,1),ut=0;ut<Y;){var k=I[sr(t,y,G)];y+=k&15;var P=k>>4;if(P<16)ht[ut++]=P;else{var q=0,U=0;for(P==16?(U=3+sr(t,y,3),y+=2,q=ht[ut-1]):P==17?(U=3+sr(t,y,7),y+=3):P==18&&(U=11+sr(t,y,127),y+=7);U--;)ht[ut++]=q}}var tt=ht.subarray(0,H),mt=ht.subarray(H);M=Lf(tt),A=Lf(mt),_=Sl(tt,M,1),L=Sl(mt,A,1)}else En(1);else{var P=kat(y)+4,$=t[P-4]|t[P-3]<<8,F=P+$;if(F>s){d&&En(0);break}h&&g(w+$),r.set(t.subarray(P,F),w),e.b=w+=$,e.p=y=F*8,e.f=v;continue}if(y>T){d&&En(0);break}}h&&g(w+131072);for(var Mt=(1<<M)-1,qt=(1<<A)-1,Wt=y;;Wt=y){var q=_[Af(t,y)&Mt],ne=q>>4;if(y+=q&15,y>T){d&&En(0);break}if(q||En(2),ne<256)r[w++]=ne;else if(ne==256){Wt=y,_=null;break}else{var ee=ne-254;if(ne>264){var ut=ne-257,Zt=Mb[ut];ee=sr(t,y,(1<<Zt)-1)+Ob[ut],y+=Zt}var Tt=L[Af(t,y)&qt],V=Tt>>4;Tt||En(3),y+=Tt&15;var mt=xat[V];if(V>3){var Zt=Nb[V];mt+=Af(t,y)&(1<<Zt)-1,y+=Zt}if(y>T){d&&En(0);break}h&&g(w+131072);var it=w+ee;if(w<mt){var ft=c-mt,Nt=Math.min(mt,it);for(ft+w<0&&En(3);w<Nt;++w)r[w]=o[ft+w]}for(;w<it;++w)r[w]=r[w-mt]}}e.l=_,e.p=Wt,e.b=w,e.f=v,_&&(v=1,e.m=M,e.d=L,e.n=A)}while(!v);return w!=r.length&&f?Db(r,0,w):r.subarray(0,w)},Tat=new zn(0),Eat=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&En(6,"invalid gzip data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var o=(e>>3&1)+(e>>4&1);o>0;o-=!t[r++]);return r+(e&2)},Lat=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Aat=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&En(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&En(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Mat(t,e){return fd(t,{i:2},e,e)}function Nat(t,e){var r=Eat(t);return r+8>t.length&&En(6,"invalid gzip data"),fd(t.subarray(r,-8),{i:2},new zn(Lat(t)),e)}function $at(t,e){return fd(t.subarray(Aat(t,e),-4),{i:2},e,e)}function Pat(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Nat(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Mat(t,e):$at(t,e)}var dh=typeof TextDecoder<"u"&&new TextDecoder,Oat=0;try{dh.decode(Tat,{stream:!0}),Oat=1}catch{}var Rat=function(t){for(var e="",r=0;;){var o=t[r++],s=(o>127)+(o>223)+(o>239);if(r+s>t.length)return{s:e,r:Db(t,r-1)};s?s==3?(o=((o&15)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,e+=String.fromCharCode(55296|o>>10,56320|o&1023)):s&1?e+=String.fromCharCode((o&31)<<6|t[r++]&63):e+=String.fromCharCode((o&15)<<12|(t[r++]&63)<<6|t[r++]&63):e+=String.fromCharCode(o)}};function Dat(t,e){var r;if(dh)return dh.decode(t);var o=Rat(t),s=o.s,r=o.r;return r.length&&En(8),s}const Mf=()=>{},rn=()=>Promise.resolve();function zat(){const t=Cr({state:new Xy,waitForConnection:f,reconnect:s,ws:new EventTarget});t.state.filesMap=Cr(t.state.filesMap),t.state.idMap=Cr(t.state.idMap);let e;const r={getFiles:()=>e.files,getPaths:()=>e.paths,getConfig:()=>e.config,getModuleGraph:async(h,d)=>{var g;return(g=e.moduleGraph[h])==null?void 0:g[d]},getUnhandledErrors:()=>e.unhandledErrors,getTransformResult:async h=>({code:h,source:"",map:null}),onDone:Mf,onCollected:rn,onTaskUpdate:Mf,writeFile:rn,rerun:rn,updateSnapshot:rn,resolveSnapshotPath:rn,snapshotSaved:rn,onAfterSuiteRun:rn,onCancel:rn,getCountOfFailedTests:()=>0,sendLog:rn,resolveSnapshotRawPath:rn,readSnapshotFile:rn,saveSnapshotFile:rn,readTestFile:rn,removeSnapshotFile:rn,onUnhandledError:Mf,saveTestFile:rn,getProvidedContext:()=>({}),getTestFiles:rn};t.rpc=r;let o;function s(){c()}async function c(){var v;const h=await fetch(window.METADATA_PATH),d=((v=h.headers.get("content-type"))==null?void 0:v.toLowerCase())||"";if(d.includes("application/gzip")||d.includes("application/x-gzip")){const y=new Uint8Array(await h.arrayBuffer()),w=Dat(Pat(y));e=ah(w)}else e=ah(await h.text());const g=new Event("open");t.ws.dispatchEvent(g)}c();function f(){return o}return t}const Hl=Qt("idle"),ki=Qt([]),Oe=function(){return Yr?zat():UT(GT,{reactive:Cr,handlers:{onTaskUpdate(){Hl.value="running"},onFinished(e,r){Hl.value="idle",ki.value=(r||[]).map(bb)},onFinishedReportCoverage(){const e=document.querySelector("iframe#vitest-ui-coverage");e instanceof HTMLIFrameElement&&e.contentWindow&&e.contentWindow.location.reload()}}})}();function Iat(t,e){return t.name.localeCompare(e.name)}const ql=ws({}),ho=Qt("CONNECTING"),sn=_t(()=>Oe.state.getFiles().sort(Iat)),Cn=_t(()=>sn.value.find(t=>t.id===Bn.value)),zb=_t(()=>rd(Cn.value).map(t=>(t==null?void 0:t.logs)||[]).flat()||[]);function Bl(t){return sn.value.find(e=>e.id===t)}const Fat=_t(()=>ho.value==="OPEN"),Nf=_t(()=>ho.value==="CONNECTING");_t(()=>ho.value==="CLOSED");function Hat(t=Oe.state.getFiles()){return Ib(t)}function Ib(t){return t.forEach(e=>{delete e.result,rd(e).forEach(r=>delete r.result)}),Oe.rpc.rerun(t.map(e=>e.filepath))}const $c=window.__vitest_browser_runner__;Ge(()=>Oe.ws,t=>{ho.value=Yr?"OPEN":"CONNECTING",t.addEventListener("open",async()=>{ho.value="OPEN",Oe.state.filesMap.clear();const[e,r,o]=await Promise.all([Oe.rpc.getFiles(),Oe.rpc.getConfig(),Oe.rpc.getUnhandledErrors()]);if(r.standalone){const c=(await Oe.rpc.getTestFiles()).map(([{name:f,root:h},d])=>ch(d,h,f));Oe.state.collectFiles(c)}else Oe.state.collectFiles(e);ki.value=(o||[]).map(bb),ql.value=r}),t.addEventListener("close",()=>{setTimeout(()=>{ho.value==="CONNECTING"&&(ho.value="CLOSED")},1e3)})},{immediate:!0});const qat={"text-2xl":""},Bat={"text-lg":"",op50:""},Wat=he({__name:"ConnectionOverlay",setup(t){return(e,r)=>B(Fat)?Kt("",!0):(et(),yt("div",{key:0,fixed:"","inset-0":"",p2:"","z-10":"","select-none":"",text:"center sm",bg:"overlay","backdrop-blur-sm":"","backdrop-saturate-0":"",onClick:r[0]||(r[0]=(...o)=>B(Oe).reconnect&&B(Oe).reconnect(...o))},[Q("div",{"h-full":"",flex:"~ col gap-2","items-center":"","justify-center":"",class:de(B(Nf)?"animate-pulse":"")},[Q("div",{text:"5xl",class:de(B(Nf)?"i-carbon:renew animate-spin animate-reverse":"i-carbon-wifi-off")},null,2),Q("div",qat,jt(B(Nf)?"Connecting...":"Disconnected"),1),Q("div",Bat," Check your terminal or start a new server with `"+jt(B($c)?`vitest --browser=${B($c).config.browser.name}`:"vitest --ui")+"` ",1)],2)]))}}),Uat=["aria-label","opacity","disabled","hover"],_s=he({__name:"IconButton",props:{icon:{},title:{},disabled:{type:Boolean},active:{type:Boolean}},setup(t){return(e,r)=>(et(),yt("button",{"aria-label":e.title,role:"button",opacity:e.disabled?10:70,rounded:"",disabled:e.disabled,hover:e.disabled||e.active?"":"bg-active op100",class:de(["w-1.4em h-1.4em flex",{"bg-gray-500:35 op100":e.active}])},[Gn(e.$slots,"default",{},()=>[Q("div",{class:de(e.icon),ma:""},null,2)])],10,Uat))}}),Wr=Qt("full"),ph=Qt();function dm(t){const e=document.querySelector("#tester-ui");e&&(e.style.pointerEvents=t?"none":"")}const ms=Qt(),as=Qt(!0),Ii=Qt(!1),Pc=Qt(!0),es=_t(()=>{var t;return(t=ql.value)==null?void 0:t.coverage}),gh=_t(()=>{var t;return(t=es.value)==null?void 0:t.enabled}),ns=_t(()=>gh.value&&es.value.reporter.map(([t])=>t).includes("html")),uc=ud("vitest-ui_splitpanes-detailSizes",[33,67],{initOnMounted:!0}),kr=ud("vitest-ui_task-tree-opened",[]),pm=_t(()=>{if(ns.value){const t=es.value.reportsDirectory.lastIndexOf("/"),e=es.value.reporter.find(r=>{if(r[0]==="html")return r});return e&&"subdir"in e[1]?`/${es.value.reportsDirectory.slice(t+1)}/${e[1].subdir}/index.html`:`/${es.value.reportsDirectory.slice(t+1)}/index.html`}});Ge(Hl,t=>{Pc.value=t==="running"},{immediate:!0});function jat(){const t=Bn.value;if(t&&t.length>0){const e=Bl(t);e?(ms.value=e,as.value=!1,Ii.value=!1):rat(()=>Oe.state.getFiles(),()=>{ms.value=Bl(t),as.value=!1,Ii.value=!1})}return as}function fc(t){as.value=t,Ii.value=!1,t&&(ms.value=void 0,Bn.value="")}function Vat(){Ii.value=!0,as.value=!1,ms.value=void 0,Bn.value=""}const Gat={setCurrentFileId(t){Bn.value=t,ms.value=Bl(t),fc(!1)},async setIframeViewport(t,e){Wr.value="custom",ph.value=[t,e],await Fb(t,e)}};window.__vitest_ui_api__=Gat;function Kat(){const t=hd(),r=document.querySelector("#details-splitpanes").clientWidth,o=t.clientWidth,s=Math.min(o/r*100,95),c=100-s;uc.value=[s,c]}function hd(){return document.querySelector("#tester-ui iframe[data-vitest]")}async function Fb(t,e){const r=hd();r.style.width=typeof t=="string"?t:`${t}px`,r.style.height=typeof e=="string"?e:`${e}px`,await new Promise(o=>requestAnimationFrame(o)),Kat()}const Xat={h:"full",flex:"~ col"},Yat=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon-content-delivery-network"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Browser UI")],-1),Zat={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Jat=Q("div",{"flex-auto":"",class:"scrolls"},[Q("div",{id:"tester-ui",class:"flex h-full justify-center items-center font-light op70",style:{overflow:"auto",width:"100%",height:"100%"}}," Select a test to run ")],-1),Qat=he({__name:"BrowserIframe",setup(t){const e={"small-mobile":["320px","568px"],"large-mobile":["414px","896px"],tablet:["834px","1112px"],full:["100%","100%"],custom:null};async function r(o){if(Wr.value===o?Wr.value=ph.value?"custom":"full":Wr.value=o,!hd()){console.warn("Iframe not found");return}const[c,f]=e[Wr.value]||ph.value||e.full;await Fb(c,f)}return(o,s)=>{const c=_s,f=Wi("tooltip");return et(),yt("div",Xat,[Yat,Q("div",Zat,[Se(It(c,{title:"Flexible",icon:"i-carbon:fit-to-screen",active:B(Wr)==="full",onClick:s[0]||(s[0]=h=>r("full"))},null,8,["active"]),[[f,"Flexible",void 0,{bottom:!0}]]),Se(It(c,{title:"Small mobile",icon:"i-carbon:mobile",active:B(Wr)==="small-mobile",onClick:s[1]||(s[1]=h=>r("small-mobile"))},null,8,["active"]),[[f,"Small mobile",void 0,{bottom:!0}]]),Se(It(c,{title:"Large mobile",icon:"i-carbon:mobile-add",active:B(Wr)==="large-mobile",onClick:s[2]||(s[2]=h=>r("large-mobile"))},null,8,["active"]),[[f,"Large mobile",void 0,{bottom:!0}]]),Se(It(c,{title:"Tablet",icon:"i-carbon:tablet",active:B(Wr)==="tablet",onClick:s[3]||(s[3]=h=>r("tablet"))},null,8,["active"]),[[f,"Tablet",void 0,{bottom:!0}]])]),Jat])}}});function kl(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const ta=dat(),tct=eat(ta),ect={class:"scrolls scrolls-rounded task-error"},nct=["onClickPassive"],rct=["innerHTML"],ict=he({__name:"ViewReportError",props:{root:{},filename:{},error:{}},setup(t){const e=t;function r(f){return f.startsWith(e.root)?f.slice(e.root.length):f}const o=_t(()=>sd(ta.value)),s=_t(()=>{var f;return!!((f=e.error)!=null&&f.diff)}),c=_t(()=>e.error.diff?o.value.toHtml(kl(e.error.diff)):void 0);return(f,h)=>{const d=Wi("tooltip");return et(),yt("div",ect,[Q("pre",null,[Q("b",null,jt(f.error.name||f.error.nameStr),1),me(": "+jt(f.error.message),1)]),(et(!0),yt(re,null,Rn(f.error.stacks,(g,v)=>(et(),yt("div",{key:v,class:"op80 flex gap-x-2 items-center","data-testid":"stack"},[Q("pre",null," - "+jt(r(g.file))+":"+jt(g.line)+":"+jt(g.column),1),B(Ult)(g.file,f.filename)?Se((et(),yt("div",{key:0,class:"i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",tabindex:"0","aria-label":"Open in Editor",onClickPassive:y=>B(yb)(g.file,g.line,g.column)},null,40,nct)),[[d,"Open in Editor",void 0,{bottom:!0}]]):Kt("",!0)]))),128)),B(s)?(et(),yt("pre",{key:0,"data-testid":"diff",innerHTML:B(c)},null,8,rct)):Kt("",!0)])}}}),oct=Ui(ict,[["__scopeId","data-v-ffc45ddf"]]),sct={"h-full":"",class:"scrolls"},lct={key:0,class:"scrolls scrolls-rounded task-error","data-testid":"task-error"},act=["innerHTML"],cct={key:1,bg:"green-500/10",text:"green-500 sm",p:"x4 y2","m-2":"",rounded:""},uct=he({__name:"ViewReport",props:{file:{}},setup(t){const e=t;function r(f,h){var d;return((d=f.result)==null?void 0:d.state)!=="fail"?[]:f.type==="test"||f.type==="custom"?[{...f,level:h}]:[{...f,level:h},...f.tasks.flatMap(g=>r(g,h+1))]}function o(f,h){var v,y,w;let d="";(v=h.message)!=null&&v.includes("\x1B")&&(d=`<b>${h.nameStr||h.name}</b>: ${f.toHtml(kl(h.message))}`);const g=(y=h.stackStr)==null?void 0:y.includes("\x1B");return(g||(w=h.stack)!=null&&w.includes("\x1B"))&&(d.length>0?d+=f.toHtml(kl(g?h.stackStr:h.stack)):d=`<b>${h.nameStr||h.name}</b>: ${h.message}${f.toHtml(kl(g?h.stackStr:h.stack))}`),d.length>0?d:null}function s(f,h){const d=sd(f);return h.map(g=>{var w;const v=g.result;if(!v)return g;const y=(w=v.errors)==null?void 0:w.map(_=>o(d,_)).filter(_=>_!=null).join("<br><br>");return y!=null&&y.length&&(v.htmlError=y),g})}const c=_t(()=>{var v,y;const f=e.file,h=((v=f==null?void 0:f.tasks)==null?void 0:v.flatMap(w=>r(w,0)))??[],d=f==null?void 0:f.result;if((y=d==null?void 0:d.errors)==null?void 0:y[0]){const w={id:f.id,name:f.name,level:0,type:"suite",mode:"run",meta:{},tasks:[],result:d};h.unshift(w)}return h.length>0?s(ta.value,h):h});return(f,h)=>(et(),yt("div",sct,[B(c).length?(et(!0),yt(re,{key:0},Rn(B(c),d=>{var g,v,y;return et(),yt("div",{key:d.id},[Q("div",{bg:"red-500/10",text:"red-500 sm",p:"x3 y2","m-2":"",rounded:"",style:ln({"margin-left":`${(g=d.result)!=null&&g.htmlError?.5:2*d.level+.5}rem`})},[me(jt(d.name)+" ",1),(v=d.result)!=null&&v.htmlError?(et(),yt("div",lct,[Q("pre",{innerHTML:d.result.htmlError},null,8,act)])):(y=d.result)!=null&&y.errors?(et(!0),yt(re,{key:1},Rn(d.result.errors,(w,_)=>{var L;return et(),Yt(oct,{key:_,error:w,filename:(L=f.file)==null?void 0:L.name,root:B(ql).root},null,8,["error","filename","root"])}),128)):Kt("",!0)],4)])}),128)):(et(),yt("div",cct," All tests passed in this file "))]))}}),fct=Ui(uct,[["__scopeId","data-v-28194a87"]]),hct={border:"b base","p-4":""},dct=["innerHTML"],pct=he({__name:"ViewConsoleOutputEntry",props:{taskName:{},type:{},time:{},content:{}},setup(t){function e(r){return new Date(r).toLocaleTimeString()}return(r,o)=>(et(),yt("div",hct,[Q("div",{"text-xs":"","mb-1":"",class:de(r.type==="stderr"?"text-red-600 dark:text-red-300":"op30")},jt(e(r.time))+" | "+jt(r.taskName)+" | "+jt(r.type),3),Q("pre",{"data-type":"html",innerHTML:r.content},null,8,dct)]))}}),Oc=_t(()=>sn.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="fail"})),Rc=_t(()=>sn.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="pass"})),dd=_t(()=>sn.value.filter(t=>t.mode==="skip"||t.mode==="todo"));_t(()=>sn.value.filter(t=>!Oc.value.includes(t)&&!Rc.value.includes(t)&&!dd.value.includes(t)));_t(()=>dd.value.filter(t=>t.mode==="skip"));const gm=_t(()=>sn.value.filter(Ti));_t(()=>dd.value.filter(t=>t.mode==="todo"));const gct=_t(()=>Hl.value==="idle"),uu=_t(()=>Wb(sn.value)),Hb=_t(()=>uu.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="fail"})),qb=_t(()=>uu.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="pass"})),Bb=_t(()=>uu.value.filter(t=>t.mode==="skip"||t.mode==="todo")),vct=_t(()=>Bb.value.filter(t=>t.mode==="skip")),mct=_t(()=>Bb.value.filter(t=>t.mode==="todo"));_t(()=>Hb.value.length+qb.value.length);const yct=_t(()=>{const t=sn.value.reduce((e,r)=>{var o;return e+=Math.max(0,r.collectDuration||0),e+=Math.max(0,r.setupDuration||0),e+=Math.max(0,((o=r.result)==null?void 0:o.duration)||0),e+=Math.max(0,r.environmentLoad||0),e+=Math.max(0,r.prepareDuration||0),e},0);return t>1e3?`${(t/1e3).toFixed(2)}s`:`${Math.round(t)}ms`});function bct(t){return t=t||[],Array.isArray(t)?t:[t]}function vm(t){return t.type==="test"||t.type==="custom"}function Wb(t){const e=[],r=bct(t);for(const o of r)if(vm(o))e.push(o);else for(const s of o.tasks)if(vm(s))e.push(s);else{const c=Wb(s);for(const f of c)e.push(f)}return e}const wct={key:0,"h-full":"",class:"scrolls",flex:"","flex-col":"","data-testid":"logs"},xct={key:1,p6:""},_ct=Q("pre",{inline:""},"console.log(foo)",-1),Sct=he({__name:"ViewConsoleOutput",setup(t){const e=_t(()=>{const o=zb.value;if(o){const s=sd(ta.value);return o.map(({taskId:c,type:f,time:h,content:d})=>({taskId:c,type:f,time:h,content:s.toHtml(kl(d))}))}});function r(o){const s=o&&Oe.state.idMap.get(o);return s&&"filepath"in s?s.name:(s?BT(s).slice(1).join(" > "):"-")||"-"}return(o,s)=>{var f;const c=pct;return(f=B(e))!=null&&f.length?(et(),yt("div",wct,[(et(!0),yt(re,null,Rn(B(e),({taskId:h,type:d,time:g,content:v})=>(et(),yt("div",{key:h,"font-mono":""},[It(c,{"task-name":r(h),type:d,time:g,content:v},null,8,["task-name","type","time","content"])]))),128))])):(et(),yt("p",xct,[me(" Log something in your test and it would print here. (e.g. "),_ct,me(") ")]))}}});var Ub={exports:{}};(function(t,e){(function(r,o){t.exports=o()})(bo,function(){var r=navigator.userAgent,o=navigator.platform,s=/gecko\/\d/i.test(r),c=/MSIE \d/.test(r),f=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r),h=/Edge\/(\d+)/.exec(r),d=c||f||h,g=d&&(c?document.documentMode||6:+(h||f)[1]),v=!h&&/WebKit\//.test(r),y=v&&/Qt\/\d+\.\d+/.test(r),w=!h&&/Chrome\/(\d+)/.exec(r),_=w&&+w[1],L=/Opera\//.test(r),M=/Apple Computer/.test(navigator.vendor),A=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),T=/PhantomJS/.test(r),E=M&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),P=/Android/.test(r),$=E||P||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),F=E||/Mac/.test(o),H=/\bCrOS\b/.test(r),st=/win/i.test(o),Y=L&&r.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(L=!1,v=!0);var ht=F&&(y||L&&(Y==null||Y<12.11)),Z=s||d&&g>=9;function ut(n){return new RegExp("(^|\\s)"+n+"(?:$|\\s)\\s*")}var lt=function(n,i){var a=n.className,l=ut(i).exec(a);if(l){var u=a.slice(l.index+l[0].length);n.className=a.slice(0,l.index)+(u?l[1]+u:"")}};function G(n){for(var i=n.childNodes.length;i>0;--i)n.removeChild(n.firstChild);return n}function I(n,i){return G(n).appendChild(i)}function k(n,i,a,l){var u=document.createElement(n);if(a&&(u.className=a),l&&(u.style.cssText=l),typeof i=="string")u.appendChild(document.createTextNode(i));else if(i)for(var p=0;p<i.length;++p)u.appendChild(i[p]);return u}function q(n,i,a,l){var u=k(n,i,a,l);return u.setAttribute("role","presentation"),u}var U;document.createRange?U=function(n,i,a,l){var u=document.createRange();return u.setEnd(l||n,a),u.setStart(n,i),u}:U=function(n,i,a){var l=document.body.createTextRange();try{l.moveToElementText(n.parentNode)}catch{return l}return l.collapse(!0),l.moveEnd("character",a),l.moveStart("character",i),l};function tt(n,i){if(i.nodeType==3&&(i=i.parentNode),n.contains)return n.contains(i);do if(i.nodeType==11&&(i=i.host),i==n)return!0;while(i=i.parentNode)}function mt(n){var i=n.ownerDocument||n,a;try{a=n.activeElement}catch{a=i.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Mt(n,i){var a=n.className;ut(i).test(a)||(n.className+=(a?" ":"")+i)}function qt(n,i){for(var a=n.split(" "),l=0;l<a.length;l++)a[l]&&!ut(a[l]).test(i)&&(i+=" "+a[l]);return i}var Wt=function(n){n.select()};E?Wt=function(n){n.selectionStart=0,n.selectionEnd=n.value.length}:d&&(Wt=function(n){try{n.select()}catch{}});function ne(n){return n.display.wrapper.ownerDocument}function ee(n){return Zt(n.display.wrapper)}function Zt(n){return n.getRootNode?n.getRootNode():n.ownerDocument}function Tt(n){return ne(n).defaultView}function V(n){var i=Array.prototype.slice.call(arguments,1);return function(){return n.apply(null,i)}}function it(n,i,a){i||(i={});for(var l in n)n.hasOwnProperty(l)&&(a!==!1||!i.hasOwnProperty(l))&&(i[l]=n[l]);return i}function ft(n,i,a,l,u){i==null&&(i=n.search(/[^\s\u00a0]/),i==-1&&(i=n.length));for(var p=l||0,m=u||0;;){var b=n.indexOf(" ",p);if(b<0||b>=i)return m+(i-p);m+=b-p,m+=a-m%a,p=b+1}}var Nt=function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)};Nt.prototype.onTimeout=function(n){n.id=0,n.time<=+new Date?n.f():setTimeout(n.handler,n.time-+new Date)},Nt.prototype.set=function(n,i){this.f=i;var a=+new Date+n;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,n),this.time=a)};function Et(n,i){for(var a=0;a<n.length;++a)if(n[a]==i)return a;return-1}var Xt=50,O={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},K={origin:"*mouse"},ot={origin:"+move"};function rt(n,i,a){for(var l=0,u=0;;){var p=n.indexOf(" ",l);p==-1&&(p=n.length);var m=p-l;if(p==n.length||u+m>=i)return l+Math.min(m,i-u);if(u+=p-l,u+=a-u%a,l=p+1,u>=i)return l}}var vt=[""];function Ct(n){for(;vt.length<=n;)vt.push(at(vt)+" ");return vt[n]}function at(n){return n[n.length-1]}function bt(n,i){for(var a=[],l=0;l<n.length;l++)a[l]=i(n[l],l);return a}function pt(n,i,a){for(var l=0,u=a(i);l<n.length&&a(n[l])<=u;)l++;n.splice(l,0,i)}function At(){}function zt(n,i){var a;return Object.create?a=Object.create(n):(At.prototype=n,a=new At),i&&it(i,a),a}var Ot=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ht(n){return/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Ot.test(n))}function Vt(n,i){return i?i.source.indexOf("\\w")>-1&&Ht(n)?!0:i.test(n):Ht(n)}function le(n){for(var i in n)if(n.hasOwnProperty(i)&&n[i])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function te(n){return n.charCodeAt(0)>=768&&oe.test(n)}function ze(n,i,a){for(;(a<0?i>0:i<n.length)&&te(n.charAt(i));)i+=a;return i}function Ke(n,i,a){for(var l=i>a?-1:1;;){if(i==a)return i;var u=(i+a)/2,p=l<0?Math.ceil(u):Math.floor(u);if(p==i)return n(p)?i:a;n(p)?a=p:i=p+l}}function Kn(n,i,a,l){if(!n)return l(i,a,"ltr",0);for(var u=!1,p=0;p<n.length;++p){var m=n[p];(m.from<a&&m.to>i||i==a&&m.to==i)&&(l(Math.max(m.from,i),Math.min(m.to,a),m.level==1?"rtl":"ltr",p),u=!0)}u||l(i,a,"ltr")}var Nn=null;function Xn(n,i,a){var l;Nn=null;for(var u=0;u<n.length;++u){var p=n[u];if(p.from<i&&p.to>i)return u;p.to==i&&(p.from!=p.to&&a=="before"?l=u:Nn=u),p.from==i&&(p.from!=p.to&&a!="before"?l=u:Nn=u)}return l??Nn}var Xe=function(){var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(S){return S<=247?n.charAt(S):1424<=S&&S<=1524?"R":1536<=S&&S<=1785?i.charAt(S-1536):1774<=S&&S<=2220?"r":8192<=S&&S<=8203?"w":S==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,m=/[Lb1n]/,b=/[1n]/;function x(S,N,D){this.level=S,this.from=N,this.to=D}return function(S,N){var D=N=="ltr"?"L":"R";if(S.length==0||N=="ltr"&&!l.test(S))return!1;for(var j=S.length,W=[],J=0;J<j;++J)W.push(a(S.charCodeAt(J)));for(var ct=0,gt=D;ct<j;++ct){var wt=W[ct];wt=="m"?W[ct]=gt:gt=wt}for(var kt=0,xt=D;kt<j;++kt){var Lt=W[kt];Lt=="1"&&xt=="r"?W[kt]="n":p.test(Lt)&&(xt=Lt,Lt=="r"&&(W[kt]="R"))}for(var Dt=1,Pt=W[0];Dt<j-1;++Dt){var Jt=W[Dt];Jt=="+"&&Pt=="1"&&W[Dt+1]=="1"?W[Dt]="1":Jt==","&&Pt==W[Dt+1]&&(Pt=="1"||Pt=="n")&&(W[Dt]=Pt),Pt=Jt}for(var ve=0;ve<j;++ve){var We=W[ve];if(We==",")W[ve]="N";else if(We=="%"){var _e=void 0;for(_e=ve+1;_e<j&&W[_e]=="%";++_e);for(var kn=ve&&W[ve-1]=="!"||_e<j&&W[_e]=="1"?"1":"N",hn=ve;hn<_e;++hn)W[hn]=kn;ve=_e-1}}for(var Me=0,dn=D;Me<j;++Me){var Ve=W[Me];dn=="L"&&Ve=="1"?W[Me]="L":p.test(Ve)&&(dn=Ve)}for(var Ie=0;Ie<j;++Ie)if(u.test(W[Ie])){var Ne=void 0;for(Ne=Ie+1;Ne<j&&u.test(W[Ne]);++Ne);for(var Ee=(Ie?W[Ie-1]:D)=="L",pn=(Ne<j?W[Ne]:D)=="L",Xo=Ee==pn?Ee?"L":"R":D,fi=Ie;fi<Ne;++fi)W[fi]=Xo;Ie=Ne-1}for(var Qe=[],wr,Ue=0;Ue<j;)if(m.test(W[Ue])){var af=Ue;for(++Ue;Ue<j&&m.test(W[Ue]);++Ue);Qe.push(new x(0,af,Ue))}else{var Hr=Ue,eo=Qe.length,no=N=="rtl"?1:0;for(++Ue;Ue<j&&W[Ue]!="L";++Ue);for(var nn=Hr;nn<Ue;)if(b.test(W[nn])){Hr<nn&&(Qe.splice(eo,0,new x(1,Hr,nn)),eo+=no);var Yo=nn;for(++nn;nn<Ue&&b.test(W[nn]);++nn);Qe.splice(eo,0,new x(2,Yo,nn)),eo+=no,Hr=nn}else++nn;Hr<Ue&&Qe.splice(eo,0,new x(1,Hr,Ue))}return N=="ltr"&&(Qe[0].level==1&&(wr=S.match(/^\s+/))&&(Qe[0].from=wr[0].length,Qe.unshift(new x(0,0,wr[0].length))),at(Qe).level==1&&(wr=S.match(/\s+$/))&&(at(Qe).to-=wr[0].length,Qe.push(new x(0,j-wr[0].length,j)))),N=="rtl"?Qe.reverse():Qe}}();function Bt(n,i){var a=n.order;return a==null&&(a=n.order=Xe(n.text,i)),a}var ji=[],Rt=function(n,i,a){if(n.addEventListener)n.addEventListener(i,a,!1);else if(n.attachEvent)n.attachEvent("on"+i,a);else{var l=n._handlers||(n._handlers={});l[i]=(l[i]||ji).concat(a)}};function Pr(n,i){return n._handlers&&n._handlers[i]||ji}function Ye(n,i,a){if(n.removeEventListener)n.removeEventListener(i,a,!1);else if(n.detachEvent)n.detachEvent("on"+i,a);else{var l=n._handlers,u=l&&l[i];if(u){var p=Et(u,a);p>-1&&(l[i]=u.slice(0,p).concat(u.slice(p+1)))}}}function ke(n,i){var a=Pr(n,i);if(a.length)for(var l=Array.prototype.slice.call(arguments,2),u=0;u<a.length;++u)a[u].apply(null,l)}function Ce(n,i,a){return typeof i=="string"&&(i={type:i,preventDefault:function(){this.defaultPrevented=!0}}),ke(n,a||i.type,n,i),an(i)||i.codemirrorIgnore}function Fn(n){var i=n._handlers&&n._handlers.cursorActivity;if(i)for(var a=n.curOp.cursorActivityHandlers||(n.curOp.cursorActivityHandlers=[]),l=0;l<i.length;++l)Et(a,i[l])==-1&&a.push(i[l])}function _n(n,i){return Pr(n,i).length>0}function Yn(n){n.prototype.on=function(i,a){Rt(this,i,a)},n.prototype.off=function(i,a){Ye(this,i,a)}}function Ze(n){n.preventDefault?n.preventDefault():n.returnValue=!1}function ko(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function an(n){return n.defaultPrevented!=null?n.defaultPrevented:n.returnValue==!1}function Qr(n){Ze(n),ko(n)}function ks(n){return n.target||n.srcElement}function Zn(n){var i=n.which;return i==null&&(n.button&1?i=1:n.button&2?i=3:n.button&4&&(i=2)),F&&n.ctrlKey&&i==1&&(i=3),i}var pu=function(){if(d&&g<9)return!1;var n=k("div");return"draggable"in n||"dragDrop"in n}(),Co;function ia(n){if(Co==null){var i=k("span","");I(n,k("span",[i,document.createTextNode("x")])),n.firstChild.offsetHeight!=0&&(Co=i.offsetWidth<=1&&i.offsetHeight>2&&!(d&&g<8))}var a=Co?k("span",""):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Cs;function ti(n){if(Cs!=null)return Cs;var i=I(n,document.createTextNode("AخA")),a=U(i,0,1).getBoundingClientRect(),l=U(i,1,2).getBoundingClientRect();return G(n),!a||a.left==a.right?!1:Cs=l.right-a.right<3}var Hn=`
|
|
25
|
+
`).map(e=>Hlt(e)).filter(Vy)}function Ult(t,e){return e&&t.endsWith(e)}async function yb(t,e,r){const o=encodeURI(`${t}:${e}:${r}`);await fetch(`/__open-in-editor?file=${o}`)}function sd(t){return new Gst({fg:t?"#FFF":"#000",bg:t?"#000":"#FFF"})}function jlt(t){return t===null||typeof t!="function"&&typeof t!="object"}function bb(t){let e=t;if(jlt(t)&&(e={message:String(e).split(/\n/g)[0],stack:String(e),name:""}),!t){const r=new Error("unknown error");e={message:r.message,stack:r.stack,name:""}}return e.stacks=qlt(e.stack||e.stackStr||"",{ignoreStackEntries:[]}),e}function ld(t){return Zm()?(Kx(t),!0):!1}function Nr(t){return typeof t=="function"?t():B(t)}const Vlt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Glt=Object.prototype.toString,Klt=t=>Glt.call(t)==="[object Object]",wo=()=>{};function ad(t,e){function r(...o){return new Promise((s,c)=>{Promise.resolve(t(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(s).catch(c)})}return r}const wb=t=>t();function xb(t,e={}){let r,o,s=wo;const c=h=>{clearTimeout(h),s(),s=wo};return h=>{const d=Nr(t),g=Nr(e.maxWait);return r&&c(r),d<=0||g!==void 0&&g<=0?(o&&(c(o),o=null),Promise.resolve(h())):new Promise((v,y)=>{s=e.rejectOnCancel?y:v,g&&!o&&(o=setTimeout(()=>{r&&c(r),o=null,v(h())},g)),r=setTimeout(()=>{o&&c(o),o=null,v(h())},d)})}}function Xlt(...t){let e=0,r,o=!0,s=wo,c,f,h,d,g;!Ae(t[0])&&typeof t[0]=="object"?{delay:f,trailing:h=!0,leading:d=!0,rejectOnCancel:g=!1}=t[0]:[f,h=!0,d=!0,g=!1]=t;const v=()=>{r&&(clearTimeout(r),r=void 0,s(),s=wo)};return w=>{const _=Nr(f),L=Date.now()-e,M=()=>c=w();return v(),_<=0?(e=Date.now(),M()):(L>_&&(d||!o)?(e=Date.now(),M()):h&&(c=new Promise((A,T)=>{s=g?T:A,r=setTimeout(()=>{e=Date.now(),o=!0,A(M()),v()},Math.max(0,_-L))})),!d&&!r&&(r=setTimeout(()=>o=!0,_)),o=!1,c)}}function Ylt(t=wb){const e=Qt(!0);function r(){e.value=!1}function o(){e.value=!0}const s=(...c)=>{e.value&&t(...c)};return{isActive:Gc(e),pause:r,resume:o,eventFilter:s}}function Zlt(t){return Xl()}function Jlt(...t){if(t.length!==1)return Fh(...t);const e=t[0];return typeof e=="function"?Gc(g0(()=>({get:e,set:wo}))):Qt(e)}function fm(t,e=200,r={}){return ad(xb(e,r),t)}function Qlt(t,e=200,r=!1,o=!0,s=!1){return ad(Xlt(e,r,o,s),t)}function tat(t,e=200,r=!0,o=!0){if(e<=0)return t;const s=Qt(t.value),c=Qlt(()=>{s.value=t.value},e,r,o);return Ge(t,()=>c()),s}function _b(t,e,r={}){const{eventFilter:o=wb,...s}=r;return Ge(t,ad(o,e),s)}function Sb(t,e,r={}){const{eventFilter:o,...s}=r,{eventFilter:c,pause:f,resume:h,isActive:d}=Ylt(o);return{stop:_b(t,e,{...s,eventFilter:c}),pause:f,resume:h,isActive:d}}function cd(t,e=!0,r){Zlt()?xs(t,r):e?t():Xr(t)}function eat(t=!1,e={}){const{truthyValue:r=!0,falsyValue:o=!1}=e,s=Ae(t),c=Qt(t);function f(h){if(arguments.length)return c.value=h,c.value;{const d=Nr(r);return c.value=c.value===d?Nr(o):d,c.value}}return s?f:[c,f]}function nat(t,e,r={}){const{debounce:o=0,maxWait:s=void 0,...c}=r;return _b(t,e,{...c,eventFilter:xb(o,{maxWait:s})})}function rat(t,e,r){const o=Ge(t,(...s)=>(Xr(()=>o()),e(...s)),r);return o}function iat(t,e,r){let o;Ae(r)?o={evaluating:r}:o={};const{lazy:s=!1,evaluating:c=void 0,shallow:f=!0,onError:h=wo}=o,d=Qt(!s),g=f?ws(e):Qt(e);let v=0;return Uh(async y=>{if(!d.value)return;v++;const w=v;let _=!1;c&&Promise.resolve().then(()=>{c.value=!0});try{const L=await t(M=>{y(()=>{c&&(c.value=!1),_||M()})});w===v&&(g.value=L)}catch(L){h(L)}finally{c&&w===v&&(c.value=!1),_=!0}}),s?_t(()=>(d.value=!0,g.value)):g}function Nc(t){var e;const r=Nr(t);return(e=r==null?void 0:r.$el)!=null?e:r}const pr=Vlt?window:void 0;function vs(...t){let e,r,o,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([r,o,s]=t,e=pr):[e,r,o,s]=t,!e)return wo;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const c=[],f=()=>{c.forEach(v=>v()),c.length=0},h=(v,y,w,_)=>(v.addEventListener(y,w,_),()=>v.removeEventListener(y,w,_)),d=Ge(()=>[Nc(e),Nr(s)],([v,y])=>{if(f(),!v)return;const w=Klt(y)?{...y}:y;c.push(...r.flatMap(_=>o.map(L=>h(v,_,L,w))))},{immediate:!0,flush:"post"}),g=()=>{d(),f()};return ld(g),g}function oat(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function sat(...t){let e,r,o={};t.length===3?(e=t[0],r=t[1],o=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,r=t[0],o=t[1]):(e=t[0],r=t[1]):(e=!0,r=t[0]);const{target:s=pr,eventName:c="keydown",passive:f=!1,dedupe:h=!1}=o,d=oat(e);return vs(s,c,v=>{v.repeat&&Nr(h)||d(v)&&r(v)},f)}function lat(){const t=Qt(!1),e=Xl();return e&&xs(()=>{t.value=!0},e),t}function kb(t){const e=lat();return _t(()=>(e.value,!!t()))}function Cb(t,e={}){const{window:r=pr}=e,o=kb(()=>r&&"matchMedia"in r&&typeof r.matchMedia=="function");let s;const c=Qt(!1),f=g=>{c.value=g.matches},h=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",f):s.removeListener(f))},d=Uh(()=>{o.value&&(h(),s=r.matchMedia(Nr(t)),"addEventListener"in s?s.addEventListener("change",f):s.addListener(f),c.value=s.matches)});return ld(()=>{d(),h(),s=void 0}),c}const Ka=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xa="__vueuse_ssr_handlers__",aat=cat();function cat(){return Xa in Ka||(Ka[Xa]=Ka[Xa]||{}),Ka[Xa]}function Tb(t,e){return aat[t]||e}function uat(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const fat={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},hm="vueuse-storage";function Eb(t,e,r,o={}){var s;const{flush:c="pre",deep:f=!0,listenToStorageChanges:h=!0,writeDefaults:d=!0,mergeDefaults:g=!1,shallow:v,window:y=pr,eventFilter:w,onError:_=Z=>{console.error(Z)},initOnMounted:L}=o,M=(v?ws:Qt)(typeof e=="function"?e():e);if(!r)try{r=Tb("getDefaultStorage",()=>{var Z;return(Z=pr)==null?void 0:Z.localStorage})()}catch(Z){_(Z)}if(!r)return M;const A=Nr(e),T=uat(A),E=(s=o.serializer)!=null?s:fat[T],{pause:P,resume:$}=Sb(M,()=>H(M.value),{flush:c,deep:f,eventFilter:w});y&&h&&cd(()=>{vs(y,"storage",Y),vs(y,hm,ht),L&&Y()}),L||Y();function F(Z,ut){y&&y.dispatchEvent(new CustomEvent(hm,{detail:{key:t,oldValue:Z,newValue:ut,storageArea:r}}))}function H(Z){try{const ut=r.getItem(t);if(Z==null)F(ut,null),r.removeItem(t);else{const lt=E.write(Z);ut!==lt&&(r.setItem(t,lt),F(ut,lt))}}catch(ut){_(ut)}}function st(Z){const ut=Z?Z.newValue:r.getItem(t);if(ut==null)return d&&A!=null&&r.setItem(t,E.write(A)),A;if(!Z&&g){const lt=E.read(ut);return typeof g=="function"?g(lt,A):T==="object"&&!Array.isArray(lt)?{...A,...lt}:lt}else return typeof ut!="string"?ut:E.read(ut)}function Y(Z){if(!(Z&&Z.storageArea!==r)){if(Z&&Z.key==null){M.value=A;return}if(!(Z&&Z.key!==t)){P();try{(Z==null?void 0:Z.newValue)!==E.write(M.value)&&(M.value=st(Z))}catch(ut){_(ut)}finally{Z?Xr($):$()}}}}function ht(Z){Y(Z.detail)}return M}function Lb(t){return Cb("(prefers-color-scheme: dark)",t)}function hat(t={}){const{selector:e="html",attribute:r="class",initialValue:o="auto",window:s=pr,storage:c,storageKey:f="vueuse-color-scheme",listenToStorageChanges:h=!0,storageRef:d,emitAuto:g,disableTransition:v=!0}=t,y={auto:"",light:"light",dark:"dark",...t.modes||{}},w=Lb({window:s}),_=_t(()=>w.value?"dark":"light"),L=d||(f==null?Jlt(o):Eb(f,o,c,{window:s,listenToStorageChanges:h})),M=_t(()=>L.value==="auto"?_.value:L.value),A=Tb("updateHTMLAttrs",($,F,H)=>{const st=typeof $=="string"?s==null?void 0:s.document.querySelector($):Nc($);if(!st)return;let Y;if(v&&(Y=s.document.createElement("style"),Y.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),s.document.head.appendChild(Y)),F==="class"){const ht=H.split(/\s/g);Object.values(y).flatMap(Z=>(Z||"").split(/\s/g)).filter(Boolean).forEach(Z=>{ht.includes(Z)?st.classList.add(Z):st.classList.remove(Z)})}else st.setAttribute(F,H);v&&(s.getComputedStyle(Y).opacity,document.head.removeChild(Y))});function T($){var F;A(e,r,(F=y[$])!=null?F:$)}function E($){t.onChanged?t.onChanged($,T):T($)}Ge(M,E,{flush:"post",immediate:!0}),cd(()=>E(M.value));const P=_t({get(){return g?L.value:M.value},set($){L.value=$}});try{return Object.assign(P,{store:L,system:_,state:M})}catch{return P}}function dat(t={}){const{valueDark:e="dark",valueLight:r="",window:o=pr}=t,s=hat({...t,onChanged:(h,d)=>{var g;t.onChanged?(g=t.onChanged)==null||g.call(t,h==="dark",d,h):d(h)},modes:{dark:e,light:r}}),c=_t(()=>s.system?s.system.value:Lb({window:o}).value?"dark":"light");return _t({get(){return s.value==="dark"},set(h){const d=h?"dark":"light";c.value===d?s.value="auto":s.value=d}})}function pat(t,e,r={}){const{window:o=pr,...s}=r;let c;const f=kb(()=>o&&"ResizeObserver"in o),h=()=>{c&&(c.disconnect(),c=void 0)},d=_t(()=>Array.isArray(t)?t.map(y=>Nc(y)):[Nc(t)]),g=Ge(d,y=>{if(h(),f.value&&o){c=new ResizeObserver(e);for(const w of y)w&&c.observe(w,s)}},{immediate:!0,flush:"post"}),v=()=>{h(),g()};return ld(v),{isSupported:f,stop:v}}function ud(t,e,r={}){const{window:o=pr}=r;return Eb(t,e,o==null?void 0:o.localStorage,r)}function gat(t="history",e={}){const{initialValue:r={},removeNullishValues:o=!0,removeFalsyValues:s=!1,write:c=!0,window:f=pr}=e;if(!f)return Cr(r);const h=Cr({});function d(){if(t==="history")return f.location.search||"";if(t==="hash"){const T=f.location.hash||"",E=T.indexOf("?");return E>0?T.slice(E):""}else return(f.location.hash||"").replace(/^#/,"")}function g(T){const E=T.toString();if(t==="history")return`${E?`?${E}`:""}${f.location.hash||""}`;if(t==="hash-params")return`${f.location.search||""}${E?`#${E}`:""}`;const P=f.location.hash||"#",$=P.indexOf("?");return $>0?`${P.slice(0,$)}${E?`?${E}`:""}`:`${P}${E?`?${E}`:""}`}function v(){return new URLSearchParams(d())}function y(T){const E=new Set(Object.keys(h));for(const P of T.keys()){const $=T.getAll(P);h[P]=$.length>1?$:T.get(P)||"",E.delete(P)}Array.from(E).forEach(P=>delete h[P])}const{pause:w,resume:_}=Sb(h,()=>{const T=new URLSearchParams("");Object.keys(h).forEach(E=>{const P=h[E];Array.isArray(P)?P.forEach($=>T.append(E,$)):o&&P==null||s&&!P?T.delete(E):T.set(E,P)}),L(T)},{deep:!0});function L(T,E){w(),E&&y(T),f.history.replaceState(f.history.state,f.document.title,f.location.pathname+g(T)),_()}function M(){c&&L(v(),!0)}vs(f,"popstate",M,!1),t!=="history"&&vs(f,"hashchange",M,!1);const A=v();return A.keys().next().value?y(A):Object.assign(h,r),h}function vat(t={}){const{window:e=pr,initialWidth:r=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:c=!0}=t,f=Qt(r),h=Qt(o),d=()=>{e&&(c?(f.value=e.innerWidth,h.value=e.innerHeight):(f.value=e.document.documentElement.clientWidth,h.value=e.document.documentElement.clientHeight))};if(d(),cd(d),vs("resize",d,{passive:!0}),s){const g=Cb("(orientation: portrait)");Ge(g,()=>d())}return{width:f,height:h}}const Ab=gat("hash",{initialValue:{file:"",view:null}}),Bn=Fh(Ab,"file"),or=Fh(Ab,"view");var zn=Uint8Array,ts=Uint16Array,mat=Int32Array,Mb=new zn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Nb=new zn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yat=new zn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$b=function(t,e){for(var r=new ts(31),o=0;o<31;++o)r[o]=e+=1<<t[o-1];for(var s=new mat(r[30]),o=1;o<30;++o)for(var c=r[o];c<r[o+1];++c)s[c]=c-r[o]<<5|o;return{b:r,r:s}},Pb=$b(Mb,2),Ob=Pb.b,bat=Pb.r;Ob[28]=258,bat[258]=28;var wat=$b(Nb,0),xat=wat.b,hh=new ts(32768);for(var xe=0;xe<32768;++xe){var vi=(xe&43690)>>1|(xe&21845)<<1;vi=(vi&52428)>>2|(vi&13107)<<2,vi=(vi&61680)>>4|(vi&3855)<<4,hh[xe]=((vi&65280)>>8|(vi&255)<<8)>>1}var Sl=function(t,e,r){for(var o=t.length,s=0,c=new ts(e);s<o;++s)t[s]&&++c[t[s]-1];var f=new ts(e);for(s=1;s<e;++s)f[s]=f[s-1]+c[s-1]<<1;var h;if(r){h=new ts(1<<e);var d=15-e;for(s=0;s<o;++s)if(t[s])for(var g=s<<4|t[s],v=e-t[s],y=f[t[s]-1]++<<v,w=y|(1<<v)-1;y<=w;++y)h[hh[y]>>d]=g}else for(h=new ts(o),s=0;s<o;++s)t[s]&&(h[s]=hh[f[t[s]-1]++]>>15-t[s]);return h},Ql=new zn(288);for(var xe=0;xe<144;++xe)Ql[xe]=8;for(var xe=144;xe<256;++xe)Ql[xe]=9;for(var xe=256;xe<280;++xe)Ql[xe]=7;for(var xe=280;xe<288;++xe)Ql[xe]=8;var Rb=new zn(32);for(var xe=0;xe<32;++xe)Rb[xe]=5;var _at=Sl(Ql,9,1),Sat=Sl(Rb,5,1),Lf=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},sr=function(t,e,r){var o=e/8|0;return(t[o]|t[o+1]<<8)>>(e&7)&r},Af=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},kat=function(t){return(t+7)/8|0},Db=function(t,e,r){return(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length),new zn(t.subarray(e,r))},Cat=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],En=function(t,e,r){var o=new Error(e||Cat[t]);if(o.code=t,Error.captureStackTrace&&Error.captureStackTrace(o,En),!r)throw o;return o},fd=function(t,e,r,o){var s=t.length,c=0;if(!s||e.f&&!e.l)return r||new zn(0);var f=!r,h=f||e.i!=2,d=e.i;f&&(r=new zn(s*3));var g=function(Et){var Xt=r.length;if(Et>Xt){var O=new zn(Math.max(Xt*2,Et));O.set(r),r=O}},v=e.f||0,y=e.p||0,w=e.b||0,_=e.l,L=e.d,M=e.m,A=e.n,T=s*8;do{if(!_){v=sr(t,y,1);var E=sr(t,y+1,3);if(y+=3,E)if(E==1)_=_at,L=Sat,M=9,A=5;else if(E==2){var H=sr(t,y,31)+257,st=sr(t,y+10,15)+4,Y=H+sr(t,y+5,31)+1;y+=14;for(var ht=new zn(Y),Z=new zn(19),ut=0;ut<st;++ut)Z[yat[ut]]=sr(t,y+ut*3,7);y+=st*3;for(var lt=Lf(Z),G=(1<<lt)-1,I=Sl(Z,lt,1),ut=0;ut<Y;){var k=I[sr(t,y,G)];y+=k&15;var P=k>>4;if(P<16)ht[ut++]=P;else{var q=0,U=0;for(P==16?(U=3+sr(t,y,3),y+=2,q=ht[ut-1]):P==17?(U=3+sr(t,y,7),y+=3):P==18&&(U=11+sr(t,y,127),y+=7);U--;)ht[ut++]=q}}var tt=ht.subarray(0,H),mt=ht.subarray(H);M=Lf(tt),A=Lf(mt),_=Sl(tt,M,1),L=Sl(mt,A,1)}else En(1);else{var P=kat(y)+4,$=t[P-4]|t[P-3]<<8,F=P+$;if(F>s){d&&En(0);break}h&&g(w+$),r.set(t.subarray(P,F),w),e.b=w+=$,e.p=y=F*8,e.f=v;continue}if(y>T){d&&En(0);break}}h&&g(w+131072);for(var Mt=(1<<M)-1,qt=(1<<A)-1,Wt=y;;Wt=y){var q=_[Af(t,y)&Mt],ne=q>>4;if(y+=q&15,y>T){d&&En(0);break}if(q||En(2),ne<256)r[w++]=ne;else if(ne==256){Wt=y,_=null;break}else{var ee=ne-254;if(ne>264){var ut=ne-257,Zt=Mb[ut];ee=sr(t,y,(1<<Zt)-1)+Ob[ut],y+=Zt}var Tt=L[Af(t,y)&qt],V=Tt>>4;Tt||En(3),y+=Tt&15;var mt=xat[V];if(V>3){var Zt=Nb[V];mt+=Af(t,y)&(1<<Zt)-1,y+=Zt}if(y>T){d&&En(0);break}h&&g(w+131072);var it=w+ee;if(w<mt){var ft=c-mt,Nt=Math.min(mt,it);for(ft+w<0&&En(3);w<Nt;++w)r[w]=o[ft+w]}for(;w<it;++w)r[w]=r[w-mt]}}e.l=_,e.p=Wt,e.b=w,e.f=v,_&&(v=1,e.m=M,e.d=L,e.n=A)}while(!v);return w!=r.length&&f?Db(r,0,w):r.subarray(0,w)},Tat=new zn(0),Eat=function(t){(t[0]!=31||t[1]!=139||t[2]!=8)&&En(6,"invalid gzip data");var e=t[3],r=10;e&4&&(r+=(t[10]|t[11]<<8)+2);for(var o=(e>>3&1)+(e>>4&1);o>0;o-=!t[r++]);return r+(e&2)},Lat=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},Aat=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&En(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&En(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function Mat(t,e){return fd(t,{i:2},e,e)}function Nat(t,e){var r=Eat(t);return r+8>t.length&&En(6,"invalid gzip data"),fd(t.subarray(r,-8),{i:2},new zn(Lat(t)),e)}function $at(t,e){return fd(t.subarray(Aat(t,e),-4),{i:2},e,e)}function Pat(t,e){return t[0]==31&&t[1]==139&&t[2]==8?Nat(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?Mat(t,e):$at(t,e)}var dh=typeof TextDecoder<"u"&&new TextDecoder,Oat=0;try{dh.decode(Tat,{stream:!0}),Oat=1}catch{}var Rat=function(t){for(var e="",r=0;;){var o=t[r++],s=(o>127)+(o>223)+(o>239);if(r+s>t.length)return{s:e,r:Db(t,r-1)};s?s==3?(o=((o&15)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,e+=String.fromCharCode(55296|o>>10,56320|o&1023)):s&1?e+=String.fromCharCode((o&31)<<6|t[r++]&63):e+=String.fromCharCode((o&15)<<12|(t[r++]&63)<<6|t[r++]&63):e+=String.fromCharCode(o)}};function Dat(t,e){var r;if(dh)return dh.decode(t);var o=Rat(t),s=o.s,r=o.r;return r.length&&En(8),s}const Mf=()=>{},rn=()=>Promise.resolve();function zat(){const t=Cr({state:new Xy,waitForConnection:f,reconnect:s,ws:new EventTarget});t.state.filesMap=Cr(t.state.filesMap),t.state.idMap=Cr(t.state.idMap);let e;const r={getFiles:()=>e.files,getPaths:()=>e.paths,getConfig:()=>e.config,getModuleGraph:async(h,d)=>{var g;return(g=e.moduleGraph[h])==null?void 0:g[d]},getUnhandledErrors:()=>e.unhandledErrors,getTransformResult:async h=>({code:h,source:"",map:null}),onDone:Mf,onCollected:rn,onTaskUpdate:Mf,writeFile:rn,rerun:rn,updateSnapshot:rn,resolveSnapshotPath:rn,snapshotSaved:rn,onAfterSuiteRun:rn,onCancel:rn,getCountOfFailedTests:()=>0,sendLog:rn,resolveSnapshotRawPath:rn,readSnapshotFile:rn,saveSnapshotFile:rn,readTestFile:rn,removeSnapshotFile:rn,onUnhandledError:Mf,saveTestFile:rn,getProvidedContext:()=>({}),getTestFiles:rn};t.rpc=r;let o;function s(){c()}async function c(){var v;const h=await fetch(window.METADATA_PATH),d=((v=h.headers.get("content-type"))==null?void 0:v.toLowerCase())||"";if(d.includes("application/gzip")||d.includes("application/x-gzip")){const y=new Uint8Array(await h.arrayBuffer()),w=Dat(Pat(y));e=ah(w)}else e=ah(await h.text());const g=new Event("open");t.ws.dispatchEvent(g)}c();function f(){return o}return t}const $c=Qt("idle"),ki=Qt([]),Oe=function(){return Yr?zat():UT(GT,{reactive:Cr,handlers:{onTaskUpdate(){$c.value="running"},onFinished(e,r){$c.value="idle",ki.value=(r||[]).map(bb)},onFinishedReportCoverage(){const e=document.querySelector("iframe#vitest-ui-coverage");e instanceof HTMLIFrameElement&&e.contentWindow&&e.contentWindow.location.reload()}}})}();function Iat(t,e){return t.name.localeCompare(e.name)}const Hl=ws({}),ho=Qt("CONNECTING"),sn=_t(()=>Oe.state.getFiles().sort(Iat)),vn=_t(()=>sn.value.find(t=>t.id===Bn.value)),zb=_t(()=>rd(vn.value).map(t=>(t==null?void 0:t.logs)||[]).flat()||[]);function ql(t){return sn.value.find(e=>e.id===t)}const Fat=_t(()=>ho.value==="OPEN"),Nf=_t(()=>ho.value==="CONNECTING");_t(()=>ho.value==="CLOSED");function Hat(t=Oe.state.getFiles()){return Ib(t)}function Ib(t){return t.forEach(e=>{delete e.result,rd(e).forEach(r=>delete r.result)}),Oe.rpc.rerun(t.map(e=>e.filepath))}const Bl=window.__vitest_browser_runner__;Ge(()=>Oe.ws,t=>{ho.value=Yr?"OPEN":"CONNECTING",t.addEventListener("open",async()=>{ho.value="OPEN",Oe.state.filesMap.clear();const[e,r,o]=await Promise.all([Oe.rpc.getFiles(),Oe.rpc.getConfig(),Oe.rpc.getUnhandledErrors()]);if(r.standalone){const c=(await Oe.rpc.getTestFiles()).map(([{name:f,root:h},d])=>ch(d,h,f));Oe.state.collectFiles(c)}else Oe.state.collectFiles(e);ki.value=(o||[]).map(bb),Hl.value=r}),t.addEventListener("close",()=>{setTimeout(()=>{ho.value==="CONNECTING"&&(ho.value="CLOSED")},1e3)})},{immediate:!0});const qat={"text-2xl":""},Bat={"text-lg":"",op50:""},Wat=he({__name:"ConnectionOverlay",setup(t){return(e,r)=>B(Fat)?Kt("",!0):(et(),yt("div",{key:0,fixed:"","inset-0":"",p2:"","z-10":"","select-none":"",text:"center sm",bg:"overlay","backdrop-blur-sm":"","backdrop-saturate-0":"",onClick:r[0]||(r[0]=(...o)=>B(Oe).reconnect&&B(Oe).reconnect(...o))},[Q("div",{"h-full":"",flex:"~ col gap-2","items-center":"","justify-center":"",class:de(B(Nf)?"animate-pulse":"")},[Q("div",{text:"5xl",class:de(B(Nf)?"i-carbon:renew animate-spin animate-reverse":"i-carbon-wifi-off")},null,2),Q("div",qat,jt(B(Nf)?"Connecting...":"Disconnected"),1),Q("div",Bat," Check your terminal or start a new server with `"+jt(B(Bl)?`vitest --browser=${B(Bl).config.browser.name}`:"vitest --ui")+"` ",1)],2)]))}}),Uat=["aria-label","opacity","disabled","hover"],_s=he({__name:"IconButton",props:{icon:{},title:{},disabled:{type:Boolean},active:{type:Boolean}},setup(t){return(e,r)=>(et(),yt("button",{"aria-label":e.title,role:"button",opacity:e.disabled?10:70,rounded:"",disabled:e.disabled,hover:e.disabled||e.active?"":"bg-active op100",class:de(["w-1.4em h-1.4em flex",{"bg-gray-500:35 op100":e.active}])},[Gn(e.$slots,"default",{},()=>[Q("div",{class:de(e.icon),ma:""},null,2)])],10,Uat))}}),Wr=Qt("full"),ph=Qt();function dm(t){const e=document.querySelector("#tester-ui");e&&(e.style.pointerEvents=t?"none":"")}const ms=Qt(),as=Qt(!0),Ii=Qt(!1),Pc=Qt(!0),es=_t(()=>{var t;return(t=Hl.value)==null?void 0:t.coverage}),gh=_t(()=>{var t;return(t=es.value)==null?void 0:t.enabled}),ns=_t(()=>gh.value&&es.value.reporter.map(([t])=>t).includes("html")),uc=ud("vitest-ui_splitpanes-detailSizes",[33,67],{initOnMounted:!0}),kr=ud("vitest-ui_task-tree-opened",[]),pm=_t(()=>{if(ns.value){const t=es.value.reportsDirectory.lastIndexOf("/"),e=es.value.reporter.find(r=>{if(r[0]==="html")return r});return e&&"subdir"in e[1]?`/${es.value.reportsDirectory.slice(t+1)}/${e[1].subdir}/index.html`:`/${es.value.reportsDirectory.slice(t+1)}/index.html`}});Ge($c,t=>{Pc.value=t==="running"},{immediate:!0});function jat(){const t=Bn.value;if(t&&t.length>0){const e=ql(t);e?(ms.value=e,as.value=!1,Ii.value=!1):rat(()=>Oe.state.getFiles(),()=>{ms.value=ql(t),as.value=!1,Ii.value=!1})}return as}function fc(t){as.value=t,Ii.value=!1,t&&(ms.value=void 0,Bn.value="")}function Vat(){Ii.value=!0,as.value=!1,ms.value=void 0,Bn.value=""}const Gat={setCurrentFileId(t){Bn.value=t,ms.value=ql(t),fc(!1)},async setIframeViewport(t,e){Wr.value="custom",ph.value=[t,e],await Fb(t,e)}};window.__vitest_ui_api__=Gat;function Kat(){const t=hd(),r=document.querySelector("#details-splitpanes").clientWidth,o=t.clientWidth,s=Math.min(o/r*100,95),c=100-s;uc.value=[s,c]}function hd(){return document.querySelector("#tester-ui iframe[data-vitest]")}async function Fb(t,e){const r=hd();r.style.width=typeof t=="string"?t:`${t}px`,r.style.height=typeof e=="string"?e:`${e}px`,await new Promise(o=>requestAnimationFrame(o)),Kat()}const Xat={h:"full",flex:"~ col"},Yat=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon-content-delivery-network"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Browser UI")],-1),Zat={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Jat=Q("div",{"flex-auto":"",class:"scrolls"},[Q("div",{id:"tester-ui",class:"flex h-full justify-center items-center font-light op70",style:{overflow:"auto",width:"100%",height:"100%"}}," Select a test to run ")],-1),Qat=he({__name:"BrowserIframe",setup(t){const e={"small-mobile":["320px","568px"],"large-mobile":["414px","896px"],tablet:["834px","1112px"],full:["100%","100%"],custom:null};async function r(o){if(Wr.value===o?Wr.value=ph.value?"custom":"full":Wr.value=o,!hd()){console.warn("Iframe not found");return}const[c,f]=e[Wr.value]||ph.value||e.full;await Fb(c,f)}return(o,s)=>{const c=_s,f=Wi("tooltip");return et(),yt("div",Xat,[Yat,Q("div",Zat,[Se(It(c,{title:"Flexible",icon:"i-carbon:fit-to-screen",active:B(Wr)==="full",onClick:s[0]||(s[0]=h=>r("full"))},null,8,["active"]),[[f,"Flexible",void 0,{bottom:!0}]]),Se(It(c,{title:"Small mobile",icon:"i-carbon:mobile",active:B(Wr)==="small-mobile",onClick:s[1]||(s[1]=h=>r("small-mobile"))},null,8,["active"]),[[f,"Small mobile",void 0,{bottom:!0}]]),Se(It(c,{title:"Large mobile",icon:"i-carbon:mobile-add",active:B(Wr)==="large-mobile",onClick:s[2]||(s[2]=h=>r("large-mobile"))},null,8,["active"]),[[f,"Large mobile",void 0,{bottom:!0}]]),Se(It(c,{title:"Tablet",icon:"i-carbon:tablet",active:B(Wr)==="tablet",onClick:s[3]||(s[3]=h=>r("tablet"))},null,8,["active"]),[[f,"Tablet",void 0,{bottom:!0}]])]),Jat])}}});function kl(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const ta=dat(),tct=eat(ta),ect={class:"scrolls scrolls-rounded task-error"},nct=["onClickPassive"],rct=["innerHTML"],ict=he({__name:"ViewReportError",props:{root:{},filename:{},error:{}},setup(t){const e=t;function r(f){return f.startsWith(e.root)?f.slice(e.root.length):f}const o=_t(()=>sd(ta.value)),s=_t(()=>{var f;return!!((f=e.error)!=null&&f.diff)}),c=_t(()=>e.error.diff?o.value.toHtml(kl(e.error.diff)):void 0);return(f,h)=>{const d=Wi("tooltip");return et(),yt("div",ect,[Q("pre",null,[Q("b",null,jt(f.error.name||f.error.nameStr),1),me(": "+jt(f.error.message),1)]),(et(!0),yt(re,null,Rn(f.error.stacks,(g,v)=>(et(),yt("div",{key:v,class:"op80 flex gap-x-2 items-center","data-testid":"stack"},[Q("pre",null," - "+jt(r(g.file))+":"+jt(g.line)+":"+jt(g.column),1),B(Ult)(g.file,f.filename)?Se((et(),yt("div",{key:0,class:"i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",tabindex:"0","aria-label":"Open in Editor",onClickPassive:y=>B(yb)(g.file,g.line,g.column)},null,40,nct)),[[d,"Open in Editor",void 0,{bottom:!0}]]):Kt("",!0)]))),128)),B(s)?(et(),yt("pre",{key:0,"data-testid":"diff",innerHTML:B(c)},null,8,rct)):Kt("",!0)])}}}),oct=Ui(ict,[["__scopeId","data-v-ffc45ddf"]]),sct={"h-full":"",class:"scrolls"},lct={key:0,class:"scrolls scrolls-rounded task-error","data-testid":"task-error"},act=["innerHTML"],cct={key:1,bg:"green-500/10",text:"green-500 sm",p:"x4 y2","m-2":"",rounded:""},uct=he({__name:"ViewReport",props:{file:{}},setup(t){const e=t;function r(f,h){var d;return((d=f.result)==null?void 0:d.state)!=="fail"?[]:f.type==="test"||f.type==="custom"?[{...f,level:h}]:[{...f,level:h},...f.tasks.flatMap(g=>r(g,h+1))]}function o(f,h){var v,y,w;let d="";(v=h.message)!=null&&v.includes("\x1B")&&(d=`<b>${h.nameStr||h.name}</b>: ${f.toHtml(kl(h.message))}`);const g=(y=h.stackStr)==null?void 0:y.includes("\x1B");return(g||(w=h.stack)!=null&&w.includes("\x1B"))&&(d.length>0?d+=f.toHtml(kl(g?h.stackStr:h.stack)):d=`<b>${h.nameStr||h.name}</b>: ${h.message}${f.toHtml(kl(g?h.stackStr:h.stack))}`),d.length>0?d:null}function s(f,h){const d=sd(f);return h.map(g=>{var w;const v=g.result;if(!v)return g;const y=(w=v.errors)==null?void 0:w.map(_=>o(d,_)).filter(_=>_!=null).join("<br><br>");return y!=null&&y.length&&(v.htmlError=y),g})}const c=_t(()=>{var v,y;const f=e.file,h=((v=f==null?void 0:f.tasks)==null?void 0:v.flatMap(w=>r(w,0)))??[],d=f==null?void 0:f.result;if((y=d==null?void 0:d.errors)==null?void 0:y[0]){const w={id:f.id,name:f.name,level:0,type:"suite",mode:"run",meta:{},tasks:[],result:d};h.unshift(w)}return h.length>0?s(ta.value,h):h});return(f,h)=>(et(),yt("div",sct,[B(c).length?(et(!0),yt(re,{key:0},Rn(B(c),d=>{var g,v,y;return et(),yt("div",{key:d.id},[Q("div",{bg:"red-500/10",text:"red-500 sm",p:"x3 y2","m-2":"",rounded:"",style:ln({"margin-left":`${(g=d.result)!=null&&g.htmlError?.5:2*d.level+.5}rem`})},[me(jt(d.name)+" ",1),(v=d.result)!=null&&v.htmlError?(et(),yt("div",lct,[Q("pre",{innerHTML:d.result.htmlError},null,8,act)])):(y=d.result)!=null&&y.errors?(et(!0),yt(re,{key:1},Rn(d.result.errors,(w,_)=>{var L;return et(),Yt(oct,{key:_,error:w,filename:(L=f.file)==null?void 0:L.name,root:B(Hl).root},null,8,["error","filename","root"])}),128)):Kt("",!0)],4)])}),128)):(et(),yt("div",cct," All tests passed in this file "))]))}}),fct=Ui(uct,[["__scopeId","data-v-28194a87"]]),hct={border:"b base","p-4":""},dct=["innerHTML"],pct=he({__name:"ViewConsoleOutputEntry",props:{taskName:{},type:{},time:{},content:{}},setup(t){function e(r){return new Date(r).toLocaleTimeString()}return(r,o)=>(et(),yt("div",hct,[Q("div",{"text-xs":"","mb-1":"",class:de(r.type==="stderr"?"text-red-600 dark:text-red-300":"op30")},jt(e(r.time))+" | "+jt(r.taskName)+" | "+jt(r.type),3),Q("pre",{"data-type":"html",innerHTML:r.content},null,8,dct)]))}}),Oc=_t(()=>sn.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="fail"})),Rc=_t(()=>sn.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="pass"})),dd=_t(()=>sn.value.filter(t=>t.mode==="skip"||t.mode==="todo"));_t(()=>sn.value.filter(t=>!Oc.value.includes(t)&&!Rc.value.includes(t)&&!dd.value.includes(t)));_t(()=>dd.value.filter(t=>t.mode==="skip"));const gm=_t(()=>sn.value.filter(Ti));_t(()=>dd.value.filter(t=>t.mode==="todo"));const gct=_t(()=>$c.value==="idle"),uu=_t(()=>Wb(sn.value)),Hb=_t(()=>uu.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="fail"})),qb=_t(()=>uu.value.filter(t=>{var e;return((e=t.result)==null?void 0:e.state)==="pass"})),Bb=_t(()=>uu.value.filter(t=>t.mode==="skip"||t.mode==="todo")),vct=_t(()=>Bb.value.filter(t=>t.mode==="skip")),mct=_t(()=>Bb.value.filter(t=>t.mode==="todo"));_t(()=>Hb.value.length+qb.value.length);const yct=_t(()=>{const t=sn.value.reduce((e,r)=>{var o;return e+=Math.max(0,r.collectDuration||0),e+=Math.max(0,r.setupDuration||0),e+=Math.max(0,((o=r.result)==null?void 0:o.duration)||0),e+=Math.max(0,r.environmentLoad||0),e+=Math.max(0,r.prepareDuration||0),e},0);return t>1e3?`${(t/1e3).toFixed(2)}s`:`${Math.round(t)}ms`});function bct(t){return t=t||[],Array.isArray(t)?t:[t]}function vm(t){return t.type==="test"||t.type==="custom"}function Wb(t){const e=[],r=bct(t);for(const o of r)if(vm(o))e.push(o);else for(const s of o.tasks)if(vm(s))e.push(s);else{const c=Wb(s);for(const f of c)e.push(f)}return e}const wct={key:0,"h-full":"",class:"scrolls",flex:"","flex-col":"","data-testid":"logs"},xct={key:1,p6:""},_ct=Q("pre",{inline:""},"console.log(foo)",-1),Sct=he({__name:"ViewConsoleOutput",setup(t){const e=_t(()=>{const o=zb.value;if(o){const s=sd(ta.value);return o.map(({taskId:c,type:f,time:h,content:d})=>({taskId:c,type:f,time:h,content:s.toHtml(kl(d))}))}});function r(o){const s=o&&Oe.state.idMap.get(o);return s&&"filepath"in s?s.name:(s?BT(s).slice(1).join(" > "):"-")||"-"}return(o,s)=>{var f;const c=pct;return(f=B(e))!=null&&f.length?(et(),yt("div",wct,[(et(!0),yt(re,null,Rn(B(e),({taskId:h,type:d,time:g,content:v})=>(et(),yt("div",{key:h,"font-mono":""},[It(c,{"task-name":r(h),type:d,time:g,content:v},null,8,["task-name","type","time","content"])]))),128))])):(et(),yt("p",xct,[me(" Log something in your test and it would print here. (e.g. "),_ct,me(") ")]))}}});var Ub={exports:{}};(function(t,e){(function(r,o){t.exports=o()})(bo,function(){var r=navigator.userAgent,o=navigator.platform,s=/gecko\/\d/i.test(r),c=/MSIE \d/.test(r),f=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r),h=/Edge\/(\d+)/.exec(r),d=c||f||h,g=d&&(c?document.documentMode||6:+(h||f)[1]),v=!h&&/WebKit\//.test(r),y=v&&/Qt\/\d+\.\d+/.test(r),w=!h&&/Chrome\/(\d+)/.exec(r),_=w&&+w[1],L=/Opera\//.test(r),M=/Apple Computer/.test(navigator.vendor),A=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),T=/PhantomJS/.test(r),E=M&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),P=/Android/.test(r),$=E||P||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),F=E||/Mac/.test(o),H=/\bCrOS\b/.test(r),st=/win/i.test(o),Y=L&&r.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(L=!1,v=!0);var ht=F&&(y||L&&(Y==null||Y<12.11)),Z=s||d&&g>=9;function ut(n){return new RegExp("(^|\\s)"+n+"(?:$|\\s)\\s*")}var lt=function(n,i){var a=n.className,l=ut(i).exec(a);if(l){var u=a.slice(l.index+l[0].length);n.className=a.slice(0,l.index)+(u?l[1]+u:"")}};function G(n){for(var i=n.childNodes.length;i>0;--i)n.removeChild(n.firstChild);return n}function I(n,i){return G(n).appendChild(i)}function k(n,i,a,l){var u=document.createElement(n);if(a&&(u.className=a),l&&(u.style.cssText=l),typeof i=="string")u.appendChild(document.createTextNode(i));else if(i)for(var p=0;p<i.length;++p)u.appendChild(i[p]);return u}function q(n,i,a,l){var u=k(n,i,a,l);return u.setAttribute("role","presentation"),u}var U;document.createRange?U=function(n,i,a,l){var u=document.createRange();return u.setEnd(l||n,a),u.setStart(n,i),u}:U=function(n,i,a){var l=document.body.createTextRange();try{l.moveToElementText(n.parentNode)}catch{return l}return l.collapse(!0),l.moveEnd("character",a),l.moveStart("character",i),l};function tt(n,i){if(i.nodeType==3&&(i=i.parentNode),n.contains)return n.contains(i);do if(i.nodeType==11&&(i=i.host),i==n)return!0;while(i=i.parentNode)}function mt(n){var i=n.ownerDocument||n,a;try{a=n.activeElement}catch{a=i.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function Mt(n,i){var a=n.className;ut(i).test(a)||(n.className+=(a?" ":"")+i)}function qt(n,i){for(var a=n.split(" "),l=0;l<a.length;l++)a[l]&&!ut(a[l]).test(i)&&(i+=" "+a[l]);return i}var Wt=function(n){n.select()};E?Wt=function(n){n.selectionStart=0,n.selectionEnd=n.value.length}:d&&(Wt=function(n){try{n.select()}catch{}});function ne(n){return n.display.wrapper.ownerDocument}function ee(n){return Zt(n.display.wrapper)}function Zt(n){return n.getRootNode?n.getRootNode():n.ownerDocument}function Tt(n){return ne(n).defaultView}function V(n){var i=Array.prototype.slice.call(arguments,1);return function(){return n.apply(null,i)}}function it(n,i,a){i||(i={});for(var l in n)n.hasOwnProperty(l)&&(a!==!1||!i.hasOwnProperty(l))&&(i[l]=n[l]);return i}function ft(n,i,a,l,u){i==null&&(i=n.search(/[^\s\u00a0]/),i==-1&&(i=n.length));for(var p=l||0,m=u||0;;){var b=n.indexOf(" ",p);if(b<0||b>=i)return m+(i-p);m+=b-p,m+=a-m%a,p=b+1}}var Nt=function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)};Nt.prototype.onTimeout=function(n){n.id=0,n.time<=+new Date?n.f():setTimeout(n.handler,n.time-+new Date)},Nt.prototype.set=function(n,i){this.f=i;var a=+new Date+n;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,n),this.time=a)};function Et(n,i){for(var a=0;a<n.length;++a)if(n[a]==i)return a;return-1}var Xt=50,O={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},K={origin:"*mouse"},ot={origin:"+move"};function rt(n,i,a){for(var l=0,u=0;;){var p=n.indexOf(" ",l);p==-1&&(p=n.length);var m=p-l;if(p==n.length||u+m>=i)return l+Math.min(m,i-u);if(u+=p-l,u+=a-u%a,l=p+1,u>=i)return l}}var vt=[""];function Ct(n){for(;vt.length<=n;)vt.push(at(vt)+" ");return vt[n]}function at(n){return n[n.length-1]}function bt(n,i){for(var a=[],l=0;l<n.length;l++)a[l]=i(n[l],l);return a}function pt(n,i,a){for(var l=0,u=a(i);l<n.length&&a(n[l])<=u;)l++;n.splice(l,0,i)}function At(){}function zt(n,i){var a;return Object.create?a=Object.create(n):(At.prototype=n,a=new At),i&&it(i,a),a}var Ot=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ht(n){return/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||Ot.test(n))}function Vt(n,i){return i?i.source.indexOf("\\w")>-1&&Ht(n)?!0:i.test(n):Ht(n)}function le(n){for(var i in n)if(n.hasOwnProperty(i)&&n[i])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function te(n){return n.charCodeAt(0)>=768&&oe.test(n)}function ze(n,i,a){for(;(a<0?i>0:i<n.length)&&te(n.charAt(i));)i+=a;return i}function Ke(n,i,a){for(var l=i>a?-1:1;;){if(i==a)return i;var u=(i+a)/2,p=l<0?Math.ceil(u):Math.floor(u);if(p==i)return n(p)?i:a;n(p)?a=p:i=p+l}}function Kn(n,i,a,l){if(!n)return l(i,a,"ltr",0);for(var u=!1,p=0;p<n.length;++p){var m=n[p];(m.from<a&&m.to>i||i==a&&m.to==i)&&(l(Math.max(m.from,i),Math.min(m.to,a),m.level==1?"rtl":"ltr",p),u=!0)}u||l(i,a,"ltr")}var Nn=null;function Xn(n,i,a){var l;Nn=null;for(var u=0;u<n.length;++u){var p=n[u];if(p.from<i&&p.to>i)return u;p.to==i&&(p.from!=p.to&&a=="before"?l=u:Nn=u),p.from==i&&(p.from!=p.to&&a!="before"?l=u:Nn=u)}return l??Nn}var Xe=function(){var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(S){return S<=247?n.charAt(S):1424<=S&&S<=1524?"R":1536<=S&&S<=1785?i.charAt(S-1536):1774<=S&&S<=2220?"r":8192<=S&&S<=8203?"w":S==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,m=/[Lb1n]/,b=/[1n]/;function x(S,N,D){this.level=S,this.from=N,this.to=D}return function(S,N){var D=N=="ltr"?"L":"R";if(S.length==0||N=="ltr"&&!l.test(S))return!1;for(var j=S.length,W=[],J=0;J<j;++J)W.push(a(S.charCodeAt(J)));for(var ct=0,gt=D;ct<j;++ct){var wt=W[ct];wt=="m"?W[ct]=gt:gt=wt}for(var kt=0,xt=D;kt<j;++kt){var Lt=W[kt];Lt=="1"&&xt=="r"?W[kt]="n":p.test(Lt)&&(xt=Lt,Lt=="r"&&(W[kt]="R"))}for(var Dt=1,Pt=W[0];Dt<j-1;++Dt){var Jt=W[Dt];Jt=="+"&&Pt=="1"&&W[Dt+1]=="1"?W[Dt]="1":Jt==","&&Pt==W[Dt+1]&&(Pt=="1"||Pt=="n")&&(W[Dt]=Pt),Pt=Jt}for(var ve=0;ve<j;++ve){var We=W[ve];if(We==",")W[ve]="N";else if(We=="%"){var _e=void 0;for(_e=ve+1;_e<j&&W[_e]=="%";++_e);for(var Cn=ve&&W[ve-1]=="!"||_e<j&&W[_e]=="1"?"1":"N",hn=ve;hn<_e;++hn)W[hn]=Cn;ve=_e-1}}for(var Me=0,dn=D;Me<j;++Me){var Ve=W[Me];dn=="L"&&Ve=="1"?W[Me]="L":p.test(Ve)&&(dn=Ve)}for(var Ie=0;Ie<j;++Ie)if(u.test(W[Ie])){var Ne=void 0;for(Ne=Ie+1;Ne<j&&u.test(W[Ne]);++Ne);for(var Ee=(Ie?W[Ie-1]:D)=="L",pn=(Ne<j?W[Ne]:D)=="L",Xo=Ee==pn?Ee?"L":"R":D,fi=Ie;fi<Ne;++fi)W[fi]=Xo;Ie=Ne-1}for(var Qe=[],wr,Ue=0;Ue<j;)if(m.test(W[Ue])){var af=Ue;for(++Ue;Ue<j&&m.test(W[Ue]);++Ue);Qe.push(new x(0,af,Ue))}else{var Hr=Ue,eo=Qe.length,no=N=="rtl"?1:0;for(++Ue;Ue<j&&W[Ue]!="L";++Ue);for(var nn=Hr;nn<Ue;)if(b.test(W[nn])){Hr<nn&&(Qe.splice(eo,0,new x(1,Hr,nn)),eo+=no);var Yo=nn;for(++nn;nn<Ue&&b.test(W[nn]);++nn);Qe.splice(eo,0,new x(2,Yo,nn)),eo+=no,Hr=nn}else++nn;Hr<Ue&&Qe.splice(eo,0,new x(1,Hr,Ue))}return N=="ltr"&&(Qe[0].level==1&&(wr=S.match(/^\s+/))&&(Qe[0].from=wr[0].length,Qe.unshift(new x(0,0,wr[0].length))),at(Qe).level==1&&(wr=S.match(/\s+$/))&&(at(Qe).to-=wr[0].length,Qe.push(new x(0,j-wr[0].length,j)))),N=="rtl"?Qe.reverse():Qe}}();function Bt(n,i){var a=n.order;return a==null&&(a=n.order=Xe(n.text,i)),a}var ji=[],Rt=function(n,i,a){if(n.addEventListener)n.addEventListener(i,a,!1);else if(n.attachEvent)n.attachEvent("on"+i,a);else{var l=n._handlers||(n._handlers={});l[i]=(l[i]||ji).concat(a)}};function Pr(n,i){return n._handlers&&n._handlers[i]||ji}function Ye(n,i,a){if(n.removeEventListener)n.removeEventListener(i,a,!1);else if(n.detachEvent)n.detachEvent("on"+i,a);else{var l=n._handlers,u=l&&l[i];if(u){var p=Et(u,a);p>-1&&(l[i]=u.slice(0,p).concat(u.slice(p+1)))}}}function ke(n,i){var a=Pr(n,i);if(a.length)for(var l=Array.prototype.slice.call(arguments,2),u=0;u<a.length;++u)a[u].apply(null,l)}function Ce(n,i,a){return typeof i=="string"&&(i={type:i,preventDefault:function(){this.defaultPrevented=!0}}),ke(n,a||i.type,n,i),an(i)||i.codemirrorIgnore}function Fn(n){var i=n._handlers&&n._handlers.cursorActivity;if(i)for(var a=n.curOp.cursorActivityHandlers||(n.curOp.cursorActivityHandlers=[]),l=0;l<i.length;++l)Et(a,i[l])==-1&&a.push(i[l])}function Sn(n,i){return Pr(n,i).length>0}function Yn(n){n.prototype.on=function(i,a){Rt(this,i,a)},n.prototype.off=function(i,a){Ye(this,i,a)}}function Ze(n){n.preventDefault?n.preventDefault():n.returnValue=!1}function ko(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function an(n){return n.defaultPrevented!=null?n.defaultPrevented:n.returnValue==!1}function Qr(n){Ze(n),ko(n)}function ks(n){return n.target||n.srcElement}function Zn(n){var i=n.which;return i==null&&(n.button&1?i=1:n.button&2?i=3:n.button&4&&(i=2)),F&&n.ctrlKey&&i==1&&(i=3),i}var pu=function(){if(d&&g<9)return!1;var n=k("div");return"draggable"in n||"dragDrop"in n}(),Co;function ia(n){if(Co==null){var i=k("span","");I(n,k("span",[i,document.createTextNode("x")])),n.firstChild.offsetHeight!=0&&(Co=i.offsetWidth<=1&&i.offsetHeight>2&&!(d&&g<8))}var a=Co?k("span",""):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Cs;function ti(n){if(Cs!=null)return Cs;var i=I(n,document.createTextNode("AخA")),a=U(i,0,1).getBoundingClientRect(),l=U(i,1,2).getBoundingClientRect();return G(n),!a||a.left==a.right?!1:Cs=l.right-a.right<3}var Hn=`
|
|
26
26
|
|
|
27
27
|
b`.split(/\n/).length!=3?function(n){for(var i=0,a=[],l=n.length;i<=l;){var u=n.indexOf(`
|
|
28
28
|
`,i);u==-1&&(u=n.length);var p=n.slice(i,n.charAt(u-1)=="\r"?u-1:u),m=p.indexOf("\r");m!=-1?(a.push(p.slice(0,m)),i+=m+1):(a.push(p),i=u+1)}return a}:function(n){return n.split(/\r\n?|\n/)},ei=window.getSelection?function(n){try{return n.selectionStart!=n.selectionEnd}catch{return!1}}:function(n){var i;try{i=n.ownerDocument.selection.createRange()}catch{}return!i||i.parentElement()!=n?!1:i.compareEndPoints("StartToEnd",i)!=0},oa=function(){var n=k("div");return"oncopy"in n?!0:(n.setAttribute("oncopy","return;"),typeof n.oncopy=="function")}(),Jn=null;function gu(n){if(Jn!=null)return Jn;var i=I(n,k("span","x")),a=i.getBoundingClientRect(),l=U(i,0,1).getBoundingClientRect();return Jn=Math.abs(a.left-l.left)>1}var To={},Qn={};function tr(n,i){arguments.length>2&&(i.dependencies=Array.prototype.slice.call(arguments,2)),To[n]=i}function Vi(n,i){Qn[n]=i}function Eo(n){if(typeof n=="string"&&Qn.hasOwnProperty(n))n=Qn[n];else if(n&&typeof n.name=="string"&&Qn.hasOwnProperty(n.name)){var i=Qn[n.name];typeof i=="string"&&(i={name:i}),n=zt(i,n),n.name=i.name}else{if(typeof n=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(n))return Eo("application/xml");if(typeof n=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(n))return Eo("application/json")}return typeof n=="string"?{name:n}:n||{name:"null"}}function Lo(n,i){i=Eo(i);var a=To[i.name];if(!a)return Lo(n,"text/plain");var l=a(n,i);if(ni.hasOwnProperty(i.name)){var u=ni[i.name];for(var p in u)u.hasOwnProperty(p)&&(l.hasOwnProperty(p)&&(l["_"+p]=l[p]),l[p]=u[p])}if(l.name=i.name,i.helperType&&(l.helperType=i.helperType),i.modeProps)for(var m in i.modeProps)l[m]=i.modeProps[m];return l}var ni={};function Ao(n,i){var a=ni.hasOwnProperty(n)?ni[n]:ni[n]={};it(i,a)}function vr(n,i){if(i===!0)return i;if(n.copyState)return n.copyState(i);var a={};for(var l in i){var u=i[l];u instanceof Array&&(u=u.concat([])),a[l]=u}return a}function Ts(n,i){for(var a;n.innerMode&&(a=n.innerMode(i),!(!a||a.mode==n));)i=a.state,n=a.mode;return a||{mode:n,state:i}}function Mo(n,i,a){return n.startState?n.startState(i,a):!0}var Te=function(n,i,a){this.pos=this.start=0,this.string=n,this.tabSize=i||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};Te.prototype.eol=function(){return this.pos>=this.string.length},Te.prototype.sol=function(){return this.pos==this.lineStart},Te.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Te.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Te.prototype.eat=function(n){var i=this.string.charAt(this.pos),a;if(typeof n=="string"?a=i==n:a=i&&(n.test?n.test(i):n(i)),a)return++this.pos,i},Te.prototype.eatWhile=function(n){for(var i=this.pos;this.eat(n););return this.pos>i},Te.prototype.eatSpace=function(){for(var n=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>n},Te.prototype.skipToEnd=function(){this.pos=this.string.length},Te.prototype.skipTo=function(n){var i=this.string.indexOf(n,this.pos);if(i>-1)return this.pos=i,!0},Te.prototype.backUp=function(n){this.pos-=n},Te.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ft(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ft(this.string,this.lineStart,this.tabSize):0)},Te.prototype.indentation=function(){return ft(this.string,null,this.tabSize)-(this.lineStart?ft(this.string,this.lineStart,this.tabSize):0)},Te.prototype.match=function(n,i,a){if(typeof n=="string"){var l=function(m){return a?m.toLowerCase():m},u=this.string.substr(this.pos,n.length);if(l(u)==l(n))return i!==!1&&(this.pos+=n.length),!0}else{var p=this.string.slice(this.pos).match(n);return p&&p.index>0?null:(p&&i!==!1&&(this.pos+=p[0].length),p)}},Te.prototype.current=function(){return this.string.slice(this.start,this.pos)},Te.prototype.hideFirstChars=function(n,i){this.lineStart+=n;try{return i()}finally{this.lineStart-=n}},Te.prototype.lookAhead=function(n){var i=this.lineOracle;return i&&i.lookAhead(n)},Te.prototype.baseToken=function(){var n=this.lineOracle;return n&&n.baseToken(this.pos)};function $t(n,i){if(i-=n.first,i<0||i>=n.size)throw new Error("There is no line "+(i+n.first)+" in the document.");for(var a=n;!a.lines;)for(var l=0;;++l){var u=a.children[l],p=u.chunkSize();if(i<p){a=u;break}i-=p}return a.lines[i]}function Or(n,i,a){var l=[],u=i.line;return n.iter(i.line,a.line+1,function(p){var m=p.text;u==a.line&&(m=m.slice(0,a.ch)),u==i.line&&(m=m.slice(i.ch)),l.push(m),++u}),l}function Es(n,i,a){var l=[];return n.iter(i,a,function(u){l.push(u.text)}),l}function $n(n,i){var a=i-n.height;if(a)for(var l=n;l;l=l.parent)l.height+=a}function C(n){if(n.parent==null)return null;for(var i=n.parent,a=Et(i.lines,n),l=i.parent;l;i=l,l=l.parent)for(var u=0;l.children[u]!=i;++u)a+=l.children[u].chunkSize();return a+i.first}function R(n,i){var a=n.first;t:do{for(var l=0;l<n.children.length;++l){var u=n.children[l],p=u.height;if(i<p){n=u;continue t}i-=p,a+=u.chunkSize()}return a}while(!n.lines);for(var m=0;m<n.lines.length;++m){var b=n.lines[m],x=b.height;if(i<x)break;i-=x}return a+m}function nt(n,i){return i>=n.first&&i<n.first+n.size}function dt(n,i){return String(n.lineNumberFormatter(i+n.firstLineNumber))}function X(n,i,a){if(a===void 0&&(a=null),!(this instanceof X))return new X(n,i,a);this.line=n,this.ch=i,this.sticky=a}function St(n,i){return n.line-i.line||n.ch-i.ch}function ce(n,i){return n.sticky==i.sticky&&St(n,i)==0}function Fe(n){return X(n.line,n.ch)}function cn(n,i){return St(n,i)<0?i:n}function No(n,i){return St(n,i)<0?n:i}function Td(n,i){return Math.max(n.first,Math.min(i,n.first+n.size-1))}function Ut(n,i){if(i.line<n.first)return X(n.first,0);var a=n.first+n.size-1;return i.line>a?X(a,$t(n,a).text.length):Pw(i,$t(n,i.line).text.length)}function Pw(n,i){var a=n.ch;return a==null||a>i?X(n.line,i):a<0?X(n.line,0):n}function Ed(n,i){for(var a=[],l=0;l<i.length;l++)a[l]=Ut(n,i[l]);return a}var sa=function(n,i){this.state=n,this.lookAhead=i},mr=function(n,i,a,l){this.state=i,this.doc=n,this.line=a,this.maxLookAhead=l||0,this.baseTokens=null,this.baseTokenPos=1};mr.prototype.lookAhead=function(n){var i=this.doc.getLine(this.line+n);return i!=null&&n>this.maxLookAhead&&(this.maxLookAhead=n),i},mr.prototype.baseToken=function(n){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=n;)this.baseTokenPos+=2;var i=this.baseTokens[this.baseTokenPos+1];return{type:i&&i.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-n}},mr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mr.fromSaved=function(n,i,a){return i instanceof sa?new mr(n,vr(n.mode,i.state),a,i.lookAhead):new mr(n,vr(n.mode,i),a)},mr.prototype.save=function(n){var i=n!==!1?vr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new sa(i,this.maxLookAhead):i};function Ld(n,i,a,l){var u=[n.state.modeGen],p={};Od(n,i.text,n.doc.mode,a,function(S,N){return u.push(S,N)},p,l);for(var m=a.state,b=function(S){a.baseTokens=u;var N=n.state.overlays[S],D=1,j=0;a.state=!0,Od(n,i.text,N.mode,a,function(W,J){for(var ct=D;j<W;){var gt=u[D];gt>W&&u.splice(D,1,W,u[D+1],gt),D+=2,j=Math.min(W,gt)}if(J)if(N.opaque)u.splice(ct,D-ct,W,"overlay "+J),D=ct+2;else for(;ct<D;ct+=2){var wt=u[ct+1];u[ct+1]=(wt?wt+" ":"")+"overlay "+J}},p),a.state=m,a.baseTokens=null,a.baseTokenPos=1},x=0;x<n.state.overlays.length;++x)b(x);return{styles:u,classes:p.bgClass||p.textClass?p:null}}function Ad(n,i,a){if(!i.styles||i.styles[0]!=n.state.modeGen){var l=Ls(n,C(i)),u=i.text.length>n.options.maxHighlightLength&&vr(n.doc.mode,l.state),p=Ld(n,i,l);u&&(l.state=u),i.stateAfter=l.save(!u),i.styles=p.styles,p.classes?i.styleClasses=p.classes:i.styleClasses&&(i.styleClasses=null),a===n.doc.highlightFrontier&&(n.doc.modeFrontier=Math.max(n.doc.modeFrontier,++n.doc.highlightFrontier))}return i.styles}function Ls(n,i,a){var l=n.doc,u=n.display;if(!l.mode.startState)return new mr(l,!0,i);var p=Ow(n,i,a),m=p>l.first&&$t(l,p-1).stateAfter,b=m?mr.fromSaved(l,m,p):new mr(l,Mo(l.mode),p);return l.iter(p,i,function(x){vu(n,x.text,b);var S=b.line;x.stateAfter=S==i-1||S%5==0||S>=u.viewFrom&&S<u.viewTo?b.save():null,b.nextLine()}),a&&(l.modeFrontier=b.line),b}function vu(n,i,a,l){var u=n.doc.mode,p=new Te(i,n.options.tabSize,a);for(p.start=p.pos=l||0,i==""&&Md(u,a.state);!p.eol();)mu(u,p,a.state),p.start=p.pos}function Md(n,i){if(n.blankLine)return n.blankLine(i);if(n.innerMode){var a=Ts(n,i);if(a.mode.blankLine)return a.mode.blankLine(a.state)}}function mu(n,i,a,l){for(var u=0;u<10;u++){l&&(l[0]=Ts(n,a).mode);var p=n.token(i,a);if(i.pos>i.start)return p}throw new Error("Mode "+n.name+" failed to advance stream.")}var Nd=function(n,i,a){this.start=n.start,this.end=n.pos,this.string=n.current(),this.type=i||null,this.state=a};function $d(n,i,a,l){var u=n.doc,p=u.mode,m;i=Ut(u,i);var b=$t(u,i.line),x=Ls(n,i.line,a),S=new Te(b.text,n.options.tabSize,x),N;for(l&&(N=[]);(l||S.pos<i.ch)&&!S.eol();)S.start=S.pos,m=mu(p,S,x.state),l&&N.push(new Nd(S,m,vr(u.mode,x.state)));return l?N:new Nd(S,m,x.state)}function Pd(n,i){if(n)for(;;){var a=n.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;n=n.slice(0,a.index)+n.slice(a.index+a[0].length);var l=a[1]?"bgClass":"textClass";i[l]==null?i[l]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(i[l])||(i[l]+=" "+a[2])}return n}function Od(n,i,a,l,u,p,m){var b=a.flattenSpans;b==null&&(b=n.options.flattenSpans);var x=0,S=null,N=new Te(i,n.options.tabSize,l),D,j=n.options.addModeClass&&[null];for(i==""&&Pd(Md(a,l.state),p);!N.eol();){if(N.pos>n.options.maxHighlightLength?(b=!1,m&&vu(n,i,l,N.pos),N.pos=i.length,D=null):D=Pd(mu(a,N,l.state,j),p),j){var W=j[0].name;W&&(D="m-"+(D?W+" "+D:W))}if(!b||S!=D){for(;x<N.start;)x=Math.min(N.start,x+5e3),u(x,S);S=D}N.start=N.pos}for(;x<N.pos;){var J=Math.min(N.pos,x+5e3);u(J,S),x=J}}function Ow(n,i,a){for(var l,u,p=n.doc,m=a?-1:i-(n.doc.mode.innerMode?1e3:100),b=i;b>m;--b){if(b<=p.first)return p.first;var x=$t(p,b-1),S=x.stateAfter;if(S&&(!a||b+(S instanceof sa?S.lookAhead:0)<=p.modeFrontier))return b;var N=ft(x.text,null,n.options.tabSize);(u==null||l>N)&&(u=b-1,l=N)}return u}function Rw(n,i){if(n.modeFrontier=Math.min(n.modeFrontier,i),!(n.highlightFrontier<i-10)){for(var a=n.first,l=i-1;l>a;l--){var u=$t(n,l).stateAfter;if(u&&(!(u instanceof sa)||l+u.lookAhead<i)){a=l+1;break}}n.highlightFrontier=Math.min(n.highlightFrontier,a)}}var Rd=!1,Rr=!1;function Dw(){Rd=!0}function zw(){Rr=!0}function la(n,i,a){this.marker=n,this.from=i,this.to=a}function As(n,i){if(n)for(var a=0;a<n.length;++a){var l=n[a];if(l.marker==i)return l}}function Iw(n,i){for(var a,l=0;l<n.length;++l)n[l]!=i&&(a||(a=[])).push(n[l]);return a}function Fw(n,i,a){var l=a&&window.WeakSet&&(a.markedSpans||(a.markedSpans=new WeakSet));l&&n.markedSpans&&l.has(n.markedSpans)?n.markedSpans.push(i):(n.markedSpans=n.markedSpans?n.markedSpans.concat([i]):[i],l&&l.add(n.markedSpans)),i.marker.attachLine(n)}function Hw(n,i,a){var l;if(n)for(var u=0;u<n.length;++u){var p=n[u],m=p.marker,b=p.from==null||(m.inclusiveLeft?p.from<=i:p.from<i);if(b||p.from==i&&m.type=="bookmark"&&(!a||!p.marker.insertLeft)){var x=p.to==null||(m.inclusiveRight?p.to>=i:p.to>i);(l||(l=[])).push(new la(m,p.from,x?null:p.to))}}return l}function qw(n,i,a){var l;if(n)for(var u=0;u<n.length;++u){var p=n[u],m=p.marker,b=p.to==null||(m.inclusiveRight?p.to>=i:p.to>i);if(b||p.from==i&&m.type=="bookmark"&&(!a||p.marker.insertLeft)){var x=p.from==null||(m.inclusiveLeft?p.from<=i:p.from<i);(l||(l=[])).push(new la(m,x?null:p.from-i,p.to==null?null:p.to-i))}}return l}function yu(n,i){if(i.full)return null;var a=nt(n,i.from.line)&&$t(n,i.from.line).markedSpans,l=nt(n,i.to.line)&&$t(n,i.to.line).markedSpans;if(!a&&!l)return null;var u=i.from.ch,p=i.to.ch,m=St(i.from,i.to)==0,b=Hw(a,u,m),x=qw(l,p,m),S=i.text.length==1,N=at(i.text).length+(S?u:0);if(b)for(var D=0;D<b.length;++D){var j=b[D];if(j.to==null){var W=As(x,j.marker);W?S&&(j.to=W.to==null?null:W.to+N):j.to=u}}if(x)for(var J=0;J<x.length;++J){var ct=x[J];if(ct.to!=null&&(ct.to+=N),ct.from==null){var gt=As(b,ct.marker);gt||(ct.from=N,S&&(b||(b=[])).push(ct))}else ct.from+=N,S&&(b||(b=[])).push(ct)}b&&(b=Dd(b)),x&&x!=b&&(x=Dd(x));var wt=[b];if(!S){var kt=i.text.length-2,xt;if(kt>0&&b)for(var Lt=0;Lt<b.length;++Lt)b[Lt].to==null&&(xt||(xt=[])).push(new la(b[Lt].marker,null,null));for(var Dt=0;Dt<kt;++Dt)wt.push(xt);wt.push(x)}return wt}function Dd(n){for(var i=0;i<n.length;++i){var a=n[i];a.from!=null&&a.from==a.to&&a.marker.clearWhenEmpty!==!1&&n.splice(i--,1)}return n.length?n:null}function Bw(n,i,a){var l=null;if(n.iter(i.line,a.line+1,function(W){if(W.markedSpans)for(var J=0;J<W.markedSpans.length;++J){var ct=W.markedSpans[J].marker;ct.readOnly&&(!l||Et(l,ct)==-1)&&(l||(l=[])).push(ct)}}),!l)return null;for(var u=[{from:i,to:a}],p=0;p<l.length;++p)for(var m=l[p],b=m.find(0),x=0;x<u.length;++x){var S=u[x];if(!(St(S.to,b.from)<0||St(S.from,b.to)>0)){var N=[x,1],D=St(S.from,b.from),j=St(S.to,b.to);(D<0||!m.inclusiveLeft&&!D)&&N.push({from:S.from,to:b.from}),(j>0||!m.inclusiveRight&&!j)&&N.push({from:b.to,to:S.to}),u.splice.apply(u,N),x+=N.length-3}}return u}function zd(n){var i=n.markedSpans;if(i){for(var a=0;a<i.length;++a)i[a].marker.detachLine(n);n.markedSpans=null}}function Id(n,i){if(i){for(var a=0;a<i.length;++a)i[a].marker.attachLine(n);n.markedSpans=i}}function aa(n){return n.inclusiveLeft?-1:0}function ca(n){return n.inclusiveRight?1:0}function bu(n,i){var a=n.lines.length-i.lines.length;if(a!=0)return a;var l=n.find(),u=i.find(),p=St(l.from,u.from)||aa(n)-aa(i);if(p)return-p;var m=St(l.to,u.to)||ca(n)-ca(i);return m||i.id-n.id}function Fd(n,i){var a=Rr&&n.markedSpans,l;if(a)for(var u=void 0,p=0;p<a.length;++p)u=a[p],u.marker.collapsed&&(i?u.from:u.to)==null&&(!l||bu(l,u.marker)<0)&&(l=u.marker);return l}function Hd(n){return Fd(n,!0)}function ua(n){return Fd(n,!1)}function Ww(n,i){var a=Rr&&n.markedSpans,l;if(a)for(var u=0;u<a.length;++u){var p=a[u];p.marker.collapsed&&(p.from==null||p.from<i)&&(p.to==null||p.to>i)&&(!l||bu(l,p.marker)<0)&&(l=p.marker)}return l}function qd(n,i,a,l,u){var p=$t(n,i),m=Rr&&p.markedSpans;if(m)for(var b=0;b<m.length;++b){var x=m[b];if(x.marker.collapsed){var S=x.marker.find(0),N=St(S.from,a)||aa(x.marker)-aa(u),D=St(S.to,l)||ca(x.marker)-ca(u);if(!(N>=0&&D<=0||N<=0&&D>=0)&&(N<=0&&(x.marker.inclusiveRight&&u.inclusiveLeft?St(S.to,a)>=0:St(S.to,a)>0)||N>=0&&(x.marker.inclusiveRight&&u.inclusiveLeft?St(S.from,l)<=0:St(S.from,l)<0)))return!0}}}function er(n){for(var i;i=Hd(n);)n=i.find(-1,!0).line;return n}function Uw(n){for(var i;i=ua(n);)n=i.find(1,!0).line;return n}function jw(n){for(var i,a;i=ua(n);)n=i.find(1,!0).line,(a||(a=[])).push(n);return a}function wu(n,i){var a=$t(n,i),l=er(a);return a==l?i:C(l)}function Bd(n,i){if(i>n.lastLine())return i;var a=$t(n,i),l;if(!ri(n,a))return i;for(;l=ua(a);)a=l.find(1,!0).line;return C(a)+1}function ri(n,i){var a=Rr&&i.markedSpans;if(a){for(var l=void 0,u=0;u<a.length;++u)if(l=a[u],!!l.marker.collapsed){if(l.from==null)return!0;if(!l.marker.widgetNode&&l.from==0&&l.marker.inclusiveLeft&&xu(n,i,l))return!0}}}function xu(n,i,a){if(a.to==null){var l=a.marker.find(1,!0);return xu(n,l.line,As(l.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==i.text.length)return!0;for(var u=void 0,p=0;p<i.markedSpans.length;++p)if(u=i.markedSpans[p],u.marker.collapsed&&!u.marker.widgetNode&&u.from==a.to&&(u.to==null||u.to!=a.from)&&(u.marker.inclusiveLeft||a.marker.inclusiveRight)&&xu(n,i,u))return!0}function Dr(n){n=er(n);for(var i=0,a=n.parent,l=0;l<a.lines.length;++l){var u=a.lines[l];if(u==n)break;i+=u.height}for(var p=a.parent;p;a=p,p=a.parent)for(var m=0;m<p.children.length;++m){var b=p.children[m];if(b==a)break;i+=b.height}return i}function fa(n){if(n.height==0)return 0;for(var i=n.text.length,a,l=n;a=Hd(l);){var u=a.find(0,!0);l=u.from.line,i+=u.from.ch-u.to.ch}for(l=n;a=ua(l);){var p=a.find(0,!0);i-=l.text.length-p.from.ch,l=p.to.line,i+=l.text.length-p.to.ch}return i}function _u(n){var i=n.display,a=n.doc;i.maxLine=$t(a,a.first),i.maxLineLength=fa(i.maxLine),i.maxLineChanged=!0,a.iter(function(l){var u=fa(l);u>i.maxLineLength&&(i.maxLineLength=u,i.maxLine=l)})}var $o=function(n,i,a){this.text=n,Id(this,i),this.height=a?a(this):1};$o.prototype.lineNo=function(){return C(this)},Yn($o);function Vw(n,i,a,l){n.text=i,n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null),n.order!=null&&(n.order=null),zd(n),Id(n,a);var u=l?l(n):1;u!=n.height&&$n(n,u)}function Gw(n){n.parent=null,zd(n)}var Kw={},Xw={};function Wd(n,i){if(!n||/^\s*$/.test(n))return null;var a=i.addModeClass?Xw:Kw;return a[n]||(a[n]=n.replace(/\S+/g,"cm-$&"))}function Ud(n,i){var a=q("span",null,null,v?"padding-right: .1px":null),l={pre:q("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:n,trailingSpace:!1,splitSpaces:n.getOption("lineWrapping")};i.measure={};for(var u=0;u<=(i.rest?i.rest.length:0);u++){var p=u?i.rest[u-1]:i.line,m=void 0;l.pos=0,l.addToken=Zw,ti(n.display.measure)&&(m=Bt(p,n.doc.direction))&&(l.addToken=Qw(l.addToken,m)),l.map=[];var b=i!=n.display.externalMeasured&&C(p);t1(p,l,Ad(n,p,b)),p.styleClasses&&(p.styleClasses.bgClass&&(l.bgClass=qt(p.styleClasses.bgClass,l.bgClass||"")),p.styleClasses.textClass&&(l.textClass=qt(p.styleClasses.textClass,l.textClass||""))),l.map.length==0&&l.map.push(0,0,l.content.appendChild(ia(n.display.measure))),u==0?(i.measure.map=l.map,i.measure.cache={}):((i.measure.maps||(i.measure.maps=[])).push(l.map),(i.measure.caches||(i.measure.caches=[])).push({}))}if(v){var x=l.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(l.content.className="cm-tab-wrap-hack")}return ke(n,"renderLine",n,i.line,l.pre),l.pre.className&&(l.textClass=qt(l.pre.className,l.textClass||"")),l}function Yw(n){var i=k("span","•","cm-invalidchar");return i.title="\\u"+n.charCodeAt(0).toString(16),i.setAttribute("aria-label",i.title),i}function Zw(n,i,a,l,u,p,m){if(i){var b=n.splitSpaces?Jw(i,n.trailingSpace):i,x=n.cm.state.specialChars,S=!1,N;if(!x.test(i))n.col+=i.length,N=document.createTextNode(b),n.map.push(n.pos,n.pos+i.length,N),d&&g<9&&(S=!0),n.pos+=i.length;else{N=document.createDocumentFragment();for(var D=0;;){x.lastIndex=D;var j=x.exec(i),W=j?j.index-D:i.length-D;if(W){var J=document.createTextNode(b.slice(D,D+W));d&&g<9?N.appendChild(k("span",[J])):N.appendChild(J),n.map.push(n.pos,n.pos+W,J),n.col+=W,n.pos+=W}if(!j)break;D+=W+1;var ct=void 0;if(j[0]==" "){var gt=n.cm.options.tabSize,wt=gt-n.col%gt;ct=N.appendChild(k("span",Ct(wt),"cm-tab")),ct.setAttribute("role","presentation"),ct.setAttribute("cm-text"," "),n.col+=wt}else j[0]=="\r"||j[0]==`
|
|
29
|
-
`?(ct=N.appendChild(k("span",j[0]=="\r"?"␍":"","cm-invalidchar")),ct.setAttribute("cm-text",j[0]),n.col+=1):(ct=n.cm.options.specialCharPlaceholder(j[0]),ct.setAttribute("cm-text",j[0]),d&&g<9?N.appendChild(k("span",[ct])):N.appendChild(ct),n.col+=1);n.map.push(n.pos,n.pos+1,ct),n.pos++}}if(n.trailingSpace=b.charCodeAt(i.length-1)==32,a||l||u||S||p||m){var kt=a||"";l&&(kt+=l),u&&(kt+=u);var xt=k("span",[N],kt,p);if(m)for(var Lt in m)m.hasOwnProperty(Lt)&&Lt!="style"&&Lt!="class"&&xt.setAttribute(Lt,m[Lt]);return n.content.appendChild(xt)}n.content.appendChild(N)}}function Jw(n,i){if(n.length>1&&!/ /.test(n))return n;for(var a=i,l="",u=0;u<n.length;u++){var p=n.charAt(u);p==" "&&a&&(u==n.length-1||n.charCodeAt(u+1)==32)&&(p=" "),l+=p,a=p==" "}return l}function Qw(n,i){return function(a,l,u,p,m,b,x){u=u?u+" cm-force-border":"cm-force-border";for(var S=a.pos,N=S+l.length;;){for(var D=void 0,j=0;j<i.length&&(D=i[j],!(D.to>S&&D.from<=S));j++);if(D.to>=N)return n(a,l,u,p,m,b,x);n(a,l.slice(0,D.to-S),u,p,null,b,x),p=null,l=l.slice(D.to-S),S=D.to}}}function jd(n,i,a,l){var u=!l&&a.widgetNode;u&&n.map.push(n.pos,n.pos+i,u),!l&&n.cm.display.input.needsContentAttribute&&(u||(u=n.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",a.id)),u&&(n.cm.display.input.setUneditable(u),n.content.appendChild(u)),n.pos+=i,n.trailingSpace=!1}function t1(n,i,a){var l=n.markedSpans,u=n.text,p=0;if(!l){for(var m=1;m<a.length;m+=2)i.addToken(i,u.slice(p,p=a[m]),Wd(a[m+1],i.cm.options));return}for(var b=u.length,x=0,S=1,N="",D,j,W=0,J,ct,gt,wt,kt;;){if(W==x){J=ct=gt=j="",kt=null,wt=null,W=1/0;for(var xt=[],Lt=void 0,Dt=0;Dt<l.length;++Dt){var Pt=l[Dt],Jt=Pt.marker;if(Jt.type=="bookmark"&&Pt.from==x&&Jt.widgetNode)xt.push(Jt);else if(Pt.from<=x&&(Pt.to==null||Pt.to>x||Jt.collapsed&&Pt.to==x&&Pt.from==x)){if(Pt.to!=null&&Pt.to!=x&&W>Pt.to&&(W=Pt.to,ct=""),Jt.className&&(J+=" "+Jt.className),Jt.css&&(j=(j?j+";":"")+Jt.css),Jt.startStyle&&Pt.from==x&&(gt+=" "+Jt.startStyle),Jt.endStyle&&Pt.to==W&&(Lt||(Lt=[])).push(Jt.endStyle,Pt.to),Jt.title&&((kt||(kt={})).title=Jt.title),Jt.attributes)for(var ve in Jt.attributes)(kt||(kt={}))[ve]=Jt.attributes[ve];Jt.collapsed&&(!wt||bu(wt.marker,Jt)<0)&&(wt=Pt)}else Pt.from>x&&W>Pt.from&&(W=Pt.from)}if(Lt)for(var We=0;We<Lt.length;We+=2)Lt[We+1]==W&&(ct+=" "+Lt[We]);if(!wt||wt.from==x)for(var _e=0;_e<xt.length;++_e)jd(i,0,xt[_e]);if(wt&&(wt.from||0)==x){if(jd(i,(wt.to==null?b+1:wt.to)-x,wt.marker,wt.from==null),wt.to==null)return;wt.to==x&&(wt=!1)}}if(x>=b)break;for(var kn=Math.min(b,W);;){if(N){var hn=x+N.length;if(!wt){var Me=hn>kn?N.slice(0,kn-x):N;i.addToken(i,Me,D?D+J:J,gt,x+Me.length==W?ct:"",j,kt)}if(hn>=kn){N=N.slice(kn-x),x=kn;break}x=hn,gt=""}N=u.slice(p,p=a[S++]),D=Wd(a[S++],i.cm.options)}}}function Vd(n,i,a){this.line=i,this.rest=jw(i),this.size=this.rest?C(at(this.rest))-a+1:1,this.node=this.text=null,this.hidden=ri(n,i)}function ha(n,i,a){for(var l=[],u,p=i;p<a;p=u){var m=new Vd(n.doc,$t(n.doc,p),p);u=p+m.size,l.push(m)}return l}var Po=null;function e1(n){Po?Po.ops.push(n):n.ownsGroup=Po={ops:[n],delayedCallbacks:[]}}function n1(n){var i=n.delayedCallbacks,a=0;do{for(;a<i.length;a++)i[a].call(null);for(var l=0;l<n.ops.length;l++){var u=n.ops[l];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(a<i.length)}function r1(n,i){var a=n.ownsGroup;if(a)try{n1(a)}finally{Po=null,i(a)}}var Ms=null;function He(n,i){var a=Pr(n,i);if(a.length){var l=Array.prototype.slice.call(arguments,2),u;Po?u=Po.delayedCallbacks:Ms?u=Ms:(u=Ms=[],setTimeout(i1,0));for(var p=function(b){u.push(function(){return a[b].apply(null,l)})},m=0;m<a.length;++m)p(m)}}function i1(){var n=Ms;Ms=null;for(var i=0;i<n.length;++i)n[i]()}function Gd(n,i,a,l){for(var u=0;u<i.changes.length;u++){var p=i.changes[u];p=="text"?s1(n,i):p=="gutter"?Xd(n,i,a,l):p=="class"?Su(n,i):p=="widget"&&l1(n,i,l)}i.changes=null}function Ns(n){return n.node==n.text&&(n.node=k("div",null,null,"position: relative"),n.text.parentNode&&n.text.parentNode.replaceChild(n.node,n.text),n.node.appendChild(n.text),d&&g<8&&(n.node.style.zIndex=2)),n.node}function o1(n,i){var a=i.bgClass?i.bgClass+" "+(i.line.bgClass||""):i.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),i.background)a?i.background.className=a:(i.background.parentNode.removeChild(i.background),i.background=null);else if(a){var l=Ns(i);i.background=l.insertBefore(k("div",null,a),l.firstChild),n.display.input.setUneditable(i.background)}}function Kd(n,i){var a=n.display.externalMeasured;return a&&a.line==i.line?(n.display.externalMeasured=null,i.measure=a.measure,a.built):Ud(n,i)}function s1(n,i){var a=i.text.className,l=Kd(n,i);i.text==i.node&&(i.node=l.pre),i.text.parentNode.replaceChild(l.pre,i.text),i.text=l.pre,l.bgClass!=i.bgClass||l.textClass!=i.textClass?(i.bgClass=l.bgClass,i.textClass=l.textClass,Su(n,i)):a&&(i.text.className=a)}function Su(n,i){o1(n,i),i.line.wrapClass?Ns(i).className=i.line.wrapClass:i.node!=i.text&&(i.node.className="");var a=i.textClass?i.textClass+" "+(i.line.textClass||""):i.line.textClass;i.text.className=a||""}function Xd(n,i,a,l){if(i.gutter&&(i.node.removeChild(i.gutter),i.gutter=null),i.gutterBackground&&(i.node.removeChild(i.gutterBackground),i.gutterBackground=null),i.line.gutterClass){var u=Ns(i);i.gutterBackground=k("div",null,"CodeMirror-gutter-background "+i.line.gutterClass,"left: "+(n.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),n.display.input.setUneditable(i.gutterBackground),u.insertBefore(i.gutterBackground,i.text)}var p=i.line.gutterMarkers;if(n.options.lineNumbers||p){var m=Ns(i),b=i.gutter=k("div",null,"CodeMirror-gutter-wrapper","left: "+(n.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(b.setAttribute("aria-hidden","true"),n.display.input.setUneditable(b),m.insertBefore(b,i.text),i.line.gutterClass&&(b.className+=" "+i.line.gutterClass),n.options.lineNumbers&&(!p||!p["CodeMirror-linenumbers"])&&(i.lineNumber=b.appendChild(k("div",dt(n.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+n.display.lineNumInnerWidth+"px"))),p)for(var x=0;x<n.display.gutterSpecs.length;++x){var S=n.display.gutterSpecs[x].className,N=p.hasOwnProperty(S)&&p[S];N&&b.appendChild(k("div",[N],"CodeMirror-gutter-elt","left: "+l.gutterLeft[S]+"px; width: "+l.gutterWidth[S]+"px"))}}}function l1(n,i,a){i.alignable&&(i.alignable=null);for(var l=ut("CodeMirror-linewidget"),u=i.node.firstChild,p=void 0;u;u=p)p=u.nextSibling,l.test(u.className)&&i.node.removeChild(u);Yd(n,i,a)}function a1(n,i,a,l){var u=Kd(n,i);return i.text=i.node=u.pre,u.bgClass&&(i.bgClass=u.bgClass),u.textClass&&(i.textClass=u.textClass),Su(n,i),Xd(n,i,a,l),Yd(n,i,l),i.node}function Yd(n,i,a){if(Zd(n,i.line,i,a,!0),i.rest)for(var l=0;l<i.rest.length;l++)Zd(n,i.rest[l],i,a,!1)}function Zd(n,i,a,l,u){if(i.widgets)for(var p=Ns(a),m=0,b=i.widgets;m<b.length;++m){var x=b[m],S=k("div",[x.node],"CodeMirror-linewidget"+(x.className?" "+x.className:""));x.handleMouseEvents||S.setAttribute("cm-ignore-events","true"),c1(x,S,a,l),n.display.input.setUneditable(S),u&&x.above?p.insertBefore(S,a.gutter||a.text):p.appendChild(S),He(x,"redraw")}}function c1(n,i,a,l){if(n.noHScroll){(a.alignable||(a.alignable=[])).push(i);var u=l.wrapperWidth;i.style.left=l.fixedPos+"px",n.coverGutter||(u-=l.gutterTotalWidth,i.style.paddingLeft=l.gutterTotalWidth+"px"),i.style.width=u+"px"}n.coverGutter&&(i.style.zIndex=5,i.style.position="relative",n.noHScroll||(i.style.marginLeft=-l.gutterTotalWidth+"px"))}function $s(n){if(n.height!=null)return n.height;var i=n.doc.cm;if(!i)return 0;if(!tt(document.body,n.node)){var a="position: relative;";n.coverGutter&&(a+="margin-left: -"+i.display.gutters.offsetWidth+"px;"),n.noHScroll&&(a+="width: "+i.display.wrapper.clientWidth+"px;"),I(i.display.measure,k("div",[n.node],null,a))}return n.height=n.node.parentNode.offsetHeight}function zr(n,i){for(var a=ks(i);a!=n.wrapper;a=a.parentNode)if(!a||a.nodeType==1&&a.getAttribute("cm-ignore-events")=="true"||a.parentNode==n.sizer&&a!=n.mover)return!0}function da(n){return n.lineSpace.offsetTop}function ku(n){return n.mover.offsetHeight-n.lineSpace.offsetHeight}function Jd(n){if(n.cachedPaddingH)return n.cachedPaddingH;var i=I(n.measure,k("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(i):i.currentStyle,l={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return!isNaN(l.left)&&!isNaN(l.right)&&(n.cachedPaddingH=l),l}function yr(n){return Xt-n.display.nativeBarWidth}function Gi(n){return n.display.scroller.clientWidth-yr(n)-n.display.barWidth}function Cu(n){return n.display.scroller.clientHeight-yr(n)-n.display.barHeight}function u1(n,i,a){var l=n.options.lineWrapping,u=l&&Gi(n);if(!i.measure.heights||l&&i.measure.width!=u){var p=i.measure.heights=[];if(l){i.measure.width=u;for(var m=i.text.firstChild.getClientRects(),b=0;b<m.length-1;b++){var x=m[b],S=m[b+1];Math.abs(x.bottom-S.bottom)>2&&p.push((x.bottom+S.top)/2-a.top)}}p.push(a.bottom-a.top)}}function Qd(n,i,a){if(n.line==i)return{map:n.measure.map,cache:n.measure.cache};if(n.rest){for(var l=0;l<n.rest.length;l++)if(n.rest[l]==i)return{map:n.measure.maps[l],cache:n.measure.caches[l]};for(var u=0;u<n.rest.length;u++)if(C(n.rest[u])>a)return{map:n.measure.maps[u],cache:n.measure.caches[u],before:!0}}}function f1(n,i){i=er(i);var a=C(i),l=n.display.externalMeasured=new Vd(n.doc,i,a);l.lineN=a;var u=l.built=Ud(n,l);return l.text=u.pre,I(n.display.lineMeasure,u.pre),l}function tp(n,i,a,l){return br(n,Oo(n,i),a,l)}function Tu(n,i){if(i>=n.display.viewFrom&&i<n.display.viewTo)return n.display.view[Yi(n,i)];var a=n.display.externalMeasured;if(a&&i>=a.lineN&&i<a.lineN+a.size)return a}function Oo(n,i){var a=C(i),l=Tu(n,a);l&&!l.text?l=null:l&&l.changes&&(Gd(n,l,a,Nu(n)),n.curOp.forceUpdate=!0),l||(l=f1(n,i));var u=Qd(l,i,a);return{line:i,view:l,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function br(n,i,a,l,u){i.before&&(a=-1);var p=a+(l||""),m;return i.cache.hasOwnProperty(p)?m=i.cache[p]:(i.rect||(i.rect=i.view.text.getBoundingClientRect()),i.hasHeights||(u1(n,i.view,i.rect),i.hasHeights=!0),m=d1(n,i,a,l),m.bogus||(i.cache[p]=m)),{left:m.left,right:m.right,top:u?m.rtop:m.top,bottom:u?m.rbottom:m.bottom}}var ep={left:0,right:0,top:0,bottom:0};function np(n,i,a){for(var l,u,p,m,b,x,S=0;S<n.length;S+=3)if(b=n[S],x=n[S+1],i<b?(u=0,p=1,m="left"):i<x?(u=i-b,p=u+1):(S==n.length-3||i==x&&n[S+3]>i)&&(p=x-b,u=p-1,i>=x&&(m="right")),u!=null){if(l=n[S+2],b==x&&a==(l.insertLeft?"left":"right")&&(m=a),a=="left"&&u==0)for(;S&&n[S-2]==n[S-3]&&n[S-1].insertLeft;)l=n[(S-=3)+2],m="left";if(a=="right"&&u==x-b)for(;S<n.length-3&&n[S+3]==n[S+4]&&!n[S+5].insertLeft;)l=n[(S+=3)+2],m="right";break}return{node:l,start:u,end:p,collapse:m,coverStart:b,coverEnd:x}}function h1(n,i){var a=ep;if(i=="left")for(var l=0;l<n.length&&(a=n[l]).left==a.right;l++);else for(var u=n.length-1;u>=0&&(a=n[u]).left==a.right;u--);return a}function d1(n,i,a,l){var u=np(i.map,a,l),p=u.node,m=u.start,b=u.end,x=u.collapse,S;if(p.nodeType==3){for(var N=0;N<4;N++){for(;m&&te(i.line.text.charAt(u.coverStart+m));)--m;for(;u.coverStart+b<u.coverEnd&&te(i.line.text.charAt(u.coverStart+b));)++b;if(d&&g<9&&m==0&&b==u.coverEnd-u.coverStart?S=p.parentNode.getBoundingClientRect():S=h1(U(p,m,b).getClientRects(),l),S.left||S.right||m==0)break;b=m,m=m-1,x="right"}d&&g<11&&(S=p1(n.display.measure,S))}else{m>0&&(x=l="right");var D;n.options.lineWrapping&&(D=p.getClientRects()).length>1?S=D[l=="right"?D.length-1:0]:S=p.getBoundingClientRect()}if(d&&g<9&&!m&&(!S||!S.left&&!S.right)){var j=p.parentNode.getClientRects()[0];j?S={left:j.left,right:j.left+Do(n.display),top:j.top,bottom:j.bottom}:S=ep}for(var W=S.top-i.rect.top,J=S.bottom-i.rect.top,ct=(W+J)/2,gt=i.view.measure.heights,wt=0;wt<gt.length-1&&!(ct<gt[wt]);wt++);var kt=wt?gt[wt-1]:0,xt=gt[wt],Lt={left:(x=="right"?S.right:S.left)-i.rect.left,right:(x=="left"?S.left:S.right)-i.rect.left,top:kt,bottom:xt};return!S.left&&!S.right&&(Lt.bogus=!0),n.options.singleCursorHeightPerLine||(Lt.rtop=W,Lt.rbottom=J),Lt}function p1(n,i){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gu(n))return i;var a=screen.logicalXDPI/screen.deviceXDPI,l=screen.logicalYDPI/screen.deviceYDPI;return{left:i.left*a,right:i.right*a,top:i.top*l,bottom:i.bottom*l}}function rp(n){if(n.measure&&(n.measure.cache={},n.measure.heights=null,n.rest))for(var i=0;i<n.rest.length;i++)n.measure.caches[i]={}}function ip(n){n.display.externalMeasure=null,G(n.display.lineMeasure);for(var i=0;i<n.display.view.length;i++)rp(n.display.view[i])}function Ps(n){ip(n),n.display.cachedCharWidth=n.display.cachedTextHeight=n.display.cachedPaddingH=null,n.options.lineWrapping||(n.display.maxLineChanged=!0),n.display.lineNumChars=null}function op(n){return w&&P?-(n.body.getBoundingClientRect().left-parseInt(getComputedStyle(n.body).marginLeft)):n.defaultView.pageXOffset||(n.documentElement||n.body).scrollLeft}function sp(n){return w&&P?-(n.body.getBoundingClientRect().top-parseInt(getComputedStyle(n.body).marginTop)):n.defaultView.pageYOffset||(n.documentElement||n.body).scrollTop}function Eu(n){var i=er(n),a=i.widgets,l=0;if(a)for(var u=0;u<a.length;++u)a[u].above&&(l+=$s(a[u]));return l}function pa(n,i,a,l,u){if(!u){var p=Eu(i);a.top+=p,a.bottom+=p}if(l=="line")return a;l||(l="local");var m=Dr(i);if(l=="local"?m+=da(n.display):m-=n.display.viewOffset,l=="page"||l=="window"){var b=n.display.lineSpace.getBoundingClientRect();m+=b.top+(l=="window"?0:sp(ne(n)));var x=b.left+(l=="window"?0:op(ne(n)));a.left+=x,a.right+=x}return a.top+=m,a.bottom+=m,a}function lp(n,i,a){if(a=="div")return i;var l=i.left,u=i.top;if(a=="page")l-=op(ne(n)),u-=sp(ne(n));else if(a=="local"||!a){var p=n.display.sizer.getBoundingClientRect();l+=p.left,u+=p.top}var m=n.display.lineSpace.getBoundingClientRect();return{left:l-m.left,top:u-m.top}}function ga(n,i,a,l,u){return l||(l=$t(n.doc,i.line)),pa(n,l,tp(n,l,i.ch,u),a)}function nr(n,i,a,l,u,p){l=l||$t(n.doc,i.line),u||(u=Oo(n,l));function m(J,ct){var gt=br(n,u,J,ct?"right":"left",p);return ct?gt.left=gt.right:gt.right=gt.left,pa(n,l,gt,a)}var b=Bt(l,n.doc.direction),x=i.ch,S=i.sticky;if(x>=l.text.length?(x=l.text.length,S="before"):x<=0&&(x=0,S="after"),!b)return m(S=="before"?x-1:x,S=="before");function N(J,ct,gt){var wt=b[ct],kt=wt.level==1;return m(gt?J-1:J,kt!=gt)}var D=Xn(b,x,S),j=Nn,W=N(x,D,S=="before");return j!=null&&(W.other=N(x,j,S!="before")),W}function ap(n,i){var a=0;i=Ut(n.doc,i),n.options.lineWrapping||(a=Do(n.display)*i.ch);var l=$t(n.doc,i.line),u=Dr(l)+da(n.display);return{left:a,right:a,top:u,bottom:u+l.height}}function Lu(n,i,a,l,u){var p=X(n,i,a);return p.xRel=u,l&&(p.outside=l),p}function Au(n,i,a){var l=n.doc;if(a+=n.display.viewOffset,a<0)return Lu(l.first,0,null,-1,-1);var u=R(l,a),p=l.first+l.size-1;if(u>p)return Lu(l.first+l.size-1,$t(l,p).text.length,null,1,1);i<0&&(i=0);for(var m=$t(l,u);;){var b=g1(n,m,u,i,a),x=Ww(m,b.ch+(b.xRel>0||b.outside>0?1:0));if(!x)return b;var S=x.find(1);if(S.line==u)return S;m=$t(l,u=S.line)}}function cp(n,i,a,l){l-=Eu(i);var u=i.text.length,p=Ke(function(m){return br(n,a,m-1).bottom<=l},u,0);return u=Ke(function(m){return br(n,a,m).top>l},p,u),{begin:p,end:u}}function up(n,i,a,l){a||(a=Oo(n,i));var u=pa(n,i,br(n,a,l),"line").top;return cp(n,i,a,u)}function Mu(n,i,a,l){return n.bottom<=a?!1:n.top>a?!0:(l?n.left:n.right)>i}function g1(n,i,a,l,u){u-=Dr(i);var p=Oo(n,i),m=Eu(i),b=0,x=i.text.length,S=!0,N=Bt(i,n.doc.direction);if(N){var D=(n.options.lineWrapping?m1:v1)(n,i,a,p,N,l,u);S=D.level!=1,b=S?D.from:D.to-1,x=S?D.to:D.from-1}var j=null,W=null,J=Ke(function(Dt){var Pt=br(n,p,Dt);return Pt.top+=m,Pt.bottom+=m,Mu(Pt,l,u,!1)?(Pt.top<=u&&Pt.left<=l&&(j=Dt,W=Pt),!0):!1},b,x),ct,gt,wt=!1;if(W){var kt=l-W.left<W.right-l,xt=kt==S;J=j+(xt?0:1),gt=xt?"after":"before",ct=kt?W.left:W.right}else{!S&&(J==x||J==b)&&J++,gt=J==0?"after":J==i.text.length?"before":br(n,p,J-(S?1:0)).bottom+m<=u==S?"after":"before";var Lt=nr(n,X(a,J,gt),"line",i,p);ct=Lt.left,wt=u<Lt.top?-1:u>=Lt.bottom?1:0}return J=ze(i.text,J,1),Lu(a,J,gt,wt,l-ct)}function v1(n,i,a,l,u,p,m){var b=Ke(function(D){var j=u[D],W=j.level!=1;return Mu(nr(n,X(a,W?j.to:j.from,W?"before":"after"),"line",i,l),p,m,!0)},0,u.length-1),x=u[b];if(b>0){var S=x.level!=1,N=nr(n,X(a,S?x.from:x.to,S?"after":"before"),"line",i,l);Mu(N,p,m,!0)&&N.top>m&&(x=u[b-1])}return x}function m1(n,i,a,l,u,p,m){var b=cp(n,i,l,m),x=b.begin,S=b.end;/\s/.test(i.text.charAt(S-1))&&S--;for(var N=null,D=null,j=0;j<u.length;j++){var W=u[j];if(!(W.from>=S||W.to<=x)){var J=W.level!=1,ct=br(n,l,J?Math.min(S,W.to)-1:Math.max(x,W.from)).right,gt=ct<p?p-ct+1e9:ct-p;(!N||D>gt)&&(N=W,D=gt)}}return N||(N=u[u.length-1]),N.from<x&&(N={from:x,to:N.to,level:N.level}),N.to>S&&(N={from:N.from,to:S,level:N.level}),N}var Ki;function Ro(n){if(n.cachedTextHeight!=null)return n.cachedTextHeight;if(Ki==null){Ki=k("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Ki.appendChild(document.createTextNode("x")),Ki.appendChild(k("br"));Ki.appendChild(document.createTextNode("x"))}I(n.measure,Ki);var a=Ki.offsetHeight/50;return a>3&&(n.cachedTextHeight=a),G(n.measure),a||1}function Do(n){if(n.cachedCharWidth!=null)return n.cachedCharWidth;var i=k("span","xxxxxxxxxx"),a=k("pre",[i],"CodeMirror-line-like");I(n.measure,a);var l=i.getBoundingClientRect(),u=(l.right-l.left)/10;return u>2&&(n.cachedCharWidth=u),u||10}function Nu(n){for(var i=n.display,a={},l={},u=i.gutters.clientLeft,p=i.gutters.firstChild,m=0;p;p=p.nextSibling,++m){var b=n.display.gutterSpecs[m].className;a[b]=p.offsetLeft+p.clientLeft+u,l[b]=p.clientWidth}return{fixedPos:$u(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:a,gutterWidth:l,wrapperWidth:i.wrapper.clientWidth}}function $u(n){return n.scroller.getBoundingClientRect().left-n.sizer.getBoundingClientRect().left}function fp(n){var i=Ro(n.display),a=n.options.lineWrapping,l=a&&Math.max(5,n.display.scroller.clientWidth/Do(n.display)-3);return function(u){if(ri(n.doc,u))return 0;var p=0;if(u.widgets)for(var m=0;m<u.widgets.length;m++)u.widgets[m].height&&(p+=u.widgets[m].height);return a?p+(Math.ceil(u.text.length/l)||1)*i:p+i}}function Pu(n){var i=n.doc,a=fp(n);i.iter(function(l){var u=a(l);u!=l.height&&$n(l,u)})}function Xi(n,i,a,l){var u=n.display;if(!a&&ks(i).getAttribute("cm-not-content")=="true")return null;var p,m,b=u.lineSpace.getBoundingClientRect();try{p=i.clientX-b.left,m=i.clientY-b.top}catch{return null}var x=Au(n,p,m),S;if(l&&x.xRel>0&&(S=$t(n.doc,x.line).text).length==x.ch){var N=ft(S,S.length,n.options.tabSize)-S.length;x=X(x.line,Math.max(0,Math.round((p-Jd(n.display).left)/Do(n.display))-N))}return x}function Yi(n,i){if(i>=n.display.viewTo||(i-=n.display.viewFrom,i<0))return null;for(var a=n.display.view,l=0;l<a.length;l++)if(i-=a[l].size,i<0)return l}function un(n,i,a,l){i==null&&(i=n.doc.first),a==null&&(a=n.doc.first+n.doc.size),l||(l=0);var u=n.display;if(l&&a<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>i)&&(u.updateLineNumbers=i),n.curOp.viewChanged=!0,i>=u.viewTo)Rr&&wu(n.doc,i)<u.viewTo&&oi(n);else if(a<=u.viewFrom)Rr&&Bd(n.doc,a+l)>u.viewFrom?oi(n):(u.viewFrom+=l,u.viewTo+=l);else if(i<=u.viewFrom&&a>=u.viewTo)oi(n);else if(i<=u.viewFrom){var p=va(n,a,a+l,1);p?(u.view=u.view.slice(p.index),u.viewFrom=p.lineN,u.viewTo+=l):oi(n)}else if(a>=u.viewTo){var m=va(n,i,i,-1);m?(u.view=u.view.slice(0,m.index),u.viewTo=m.lineN):oi(n)}else{var b=va(n,i,i,-1),x=va(n,a,a+l,1);b&&x?(u.view=u.view.slice(0,b.index).concat(ha(n,b.lineN,x.lineN)).concat(u.view.slice(x.index)),u.viewTo+=l):oi(n)}var S=u.externalMeasured;S&&(a<S.lineN?S.lineN+=l:i<S.lineN+S.size&&(u.externalMeasured=null))}function ii(n,i,a){n.curOp.viewChanged=!0;var l=n.display,u=n.display.externalMeasured;if(u&&i>=u.lineN&&i<u.lineN+u.size&&(l.externalMeasured=null),!(i<l.viewFrom||i>=l.viewTo)){var p=l.view[Yi(n,i)];if(p.node!=null){var m=p.changes||(p.changes=[]);Et(m,a)==-1&&m.push(a)}}}function oi(n){n.display.viewFrom=n.display.viewTo=n.doc.first,n.display.view=[],n.display.viewOffset=0}function va(n,i,a,l){var u=Yi(n,i),p,m=n.display.view;if(!Rr||a==n.doc.first+n.doc.size)return{index:u,lineN:a};for(var b=n.display.viewFrom,x=0;x<u;x++)b+=m[x].size;if(b!=i){if(l>0){if(u==m.length-1)return null;p=b+m[u].size-i,u++}else p=b-i;i+=p,a+=p}for(;wu(n.doc,a)!=a;){if(u==(l<0?0:m.length-1))return null;a+=l*m[u-(l<0?1:0)].size,u+=l}return{index:u,lineN:a}}function y1(n,i,a){var l=n.display,u=l.view;u.length==0||i>=l.viewTo||a<=l.viewFrom?(l.view=ha(n,i,a),l.viewFrom=i):(l.viewFrom>i?l.view=ha(n,i,l.viewFrom).concat(l.view):l.viewFrom<i&&(l.view=l.view.slice(Yi(n,i))),l.viewFrom=i,l.viewTo<a?l.view=l.view.concat(ha(n,l.viewTo,a)):l.viewTo>a&&(l.view=l.view.slice(0,Yi(n,a)))),l.viewTo=a}function hp(n){for(var i=n.display.view,a=0,l=0;l<i.length;l++){var u=i[l];!u.hidden&&(!u.node||u.changes)&&++a}return a}function Os(n){n.display.input.showSelection(n.display.input.prepareSelection())}function dp(n,i){i===void 0&&(i=!0);var a=n.doc,l={},u=l.cursors=document.createDocumentFragment(),p=l.selection=document.createDocumentFragment(),m=n.options.$customCursor;m&&(i=!0);for(var b=0;b<a.sel.ranges.length;b++)if(!(!i&&b==a.sel.primIndex)){var x=a.sel.ranges[b];if(!(x.from().line>=n.display.viewTo||x.to().line<n.display.viewFrom)){var S=x.empty();if(m){var N=m(n,x);N&&Ou(n,N,u)}else(S||n.options.showCursorWhenSelecting)&&Ou(n,x.head,u);S||b1(n,x,p)}}return l}function Ou(n,i,a){var l=nr(n,i,"div",null,null,!n.options.singleCursorHeightPerLine),u=a.appendChild(k("div"," ","CodeMirror-cursor"));if(u.style.left=l.left+"px",u.style.top=l.top+"px",u.style.height=Math.max(0,l.bottom-l.top)*n.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(n.getWrapperElement().className)){var p=ga(n,i,"div",null,null),m=p.right-p.left;u.style.width=(m>0?m:n.defaultCharWidth())+"px"}if(l.other){var b=a.appendChild(k("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));b.style.display="",b.style.left=l.other.left+"px",b.style.top=l.other.top+"px",b.style.height=(l.other.bottom-l.other.top)*.85+"px"}}function ma(n,i){return n.top-i.top||n.left-i.left}function b1(n,i,a){var l=n.display,u=n.doc,p=document.createDocumentFragment(),m=Jd(n.display),b=m.left,x=Math.max(l.sizerWidth,Gi(n)-l.sizer.offsetLeft)-m.right,S=u.direction=="ltr";function N(xt,Lt,Dt,Pt){Lt<0&&(Lt=0),Lt=Math.round(Lt),Pt=Math.round(Pt),p.appendChild(k("div",null,"CodeMirror-selected","position: absolute; left: "+xt+`px;
|
|
29
|
+
`?(ct=N.appendChild(k("span",j[0]=="\r"?"␍":"","cm-invalidchar")),ct.setAttribute("cm-text",j[0]),n.col+=1):(ct=n.cm.options.specialCharPlaceholder(j[0]),ct.setAttribute("cm-text",j[0]),d&&g<9?N.appendChild(k("span",[ct])):N.appendChild(ct),n.col+=1);n.map.push(n.pos,n.pos+1,ct),n.pos++}}if(n.trailingSpace=b.charCodeAt(i.length-1)==32,a||l||u||S||p||m){var kt=a||"";l&&(kt+=l),u&&(kt+=u);var xt=k("span",[N],kt,p);if(m)for(var Lt in m)m.hasOwnProperty(Lt)&&Lt!="style"&&Lt!="class"&&xt.setAttribute(Lt,m[Lt]);return n.content.appendChild(xt)}n.content.appendChild(N)}}function Jw(n,i){if(n.length>1&&!/ /.test(n))return n;for(var a=i,l="",u=0;u<n.length;u++){var p=n.charAt(u);p==" "&&a&&(u==n.length-1||n.charCodeAt(u+1)==32)&&(p=" "),l+=p,a=p==" "}return l}function Qw(n,i){return function(a,l,u,p,m,b,x){u=u?u+" cm-force-border":"cm-force-border";for(var S=a.pos,N=S+l.length;;){for(var D=void 0,j=0;j<i.length&&(D=i[j],!(D.to>S&&D.from<=S));j++);if(D.to>=N)return n(a,l,u,p,m,b,x);n(a,l.slice(0,D.to-S),u,p,null,b,x),p=null,l=l.slice(D.to-S),S=D.to}}}function jd(n,i,a,l){var u=!l&&a.widgetNode;u&&n.map.push(n.pos,n.pos+i,u),!l&&n.cm.display.input.needsContentAttribute&&(u||(u=n.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",a.id)),u&&(n.cm.display.input.setUneditable(u),n.content.appendChild(u)),n.pos+=i,n.trailingSpace=!1}function t1(n,i,a){var l=n.markedSpans,u=n.text,p=0;if(!l){for(var m=1;m<a.length;m+=2)i.addToken(i,u.slice(p,p=a[m]),Wd(a[m+1],i.cm.options));return}for(var b=u.length,x=0,S=1,N="",D,j,W=0,J,ct,gt,wt,kt;;){if(W==x){J=ct=gt=j="",kt=null,wt=null,W=1/0;for(var xt=[],Lt=void 0,Dt=0;Dt<l.length;++Dt){var Pt=l[Dt],Jt=Pt.marker;if(Jt.type=="bookmark"&&Pt.from==x&&Jt.widgetNode)xt.push(Jt);else if(Pt.from<=x&&(Pt.to==null||Pt.to>x||Jt.collapsed&&Pt.to==x&&Pt.from==x)){if(Pt.to!=null&&Pt.to!=x&&W>Pt.to&&(W=Pt.to,ct=""),Jt.className&&(J+=" "+Jt.className),Jt.css&&(j=(j?j+";":"")+Jt.css),Jt.startStyle&&Pt.from==x&&(gt+=" "+Jt.startStyle),Jt.endStyle&&Pt.to==W&&(Lt||(Lt=[])).push(Jt.endStyle,Pt.to),Jt.title&&((kt||(kt={})).title=Jt.title),Jt.attributes)for(var ve in Jt.attributes)(kt||(kt={}))[ve]=Jt.attributes[ve];Jt.collapsed&&(!wt||bu(wt.marker,Jt)<0)&&(wt=Pt)}else Pt.from>x&&W>Pt.from&&(W=Pt.from)}if(Lt)for(var We=0;We<Lt.length;We+=2)Lt[We+1]==W&&(ct+=" "+Lt[We]);if(!wt||wt.from==x)for(var _e=0;_e<xt.length;++_e)jd(i,0,xt[_e]);if(wt&&(wt.from||0)==x){if(jd(i,(wt.to==null?b+1:wt.to)-x,wt.marker,wt.from==null),wt.to==null)return;wt.to==x&&(wt=!1)}}if(x>=b)break;for(var Cn=Math.min(b,W);;){if(N){var hn=x+N.length;if(!wt){var Me=hn>Cn?N.slice(0,Cn-x):N;i.addToken(i,Me,D?D+J:J,gt,x+Me.length==W?ct:"",j,kt)}if(hn>=Cn){N=N.slice(Cn-x),x=Cn;break}x=hn,gt=""}N=u.slice(p,p=a[S++]),D=Wd(a[S++],i.cm.options)}}}function Vd(n,i,a){this.line=i,this.rest=jw(i),this.size=this.rest?C(at(this.rest))-a+1:1,this.node=this.text=null,this.hidden=ri(n,i)}function ha(n,i,a){for(var l=[],u,p=i;p<a;p=u){var m=new Vd(n.doc,$t(n.doc,p),p);u=p+m.size,l.push(m)}return l}var Po=null;function e1(n){Po?Po.ops.push(n):n.ownsGroup=Po={ops:[n],delayedCallbacks:[]}}function n1(n){var i=n.delayedCallbacks,a=0;do{for(;a<i.length;a++)i[a].call(null);for(var l=0;l<n.ops.length;l++){var u=n.ops[l];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(a<i.length)}function r1(n,i){var a=n.ownsGroup;if(a)try{n1(a)}finally{Po=null,i(a)}}var Ms=null;function He(n,i){var a=Pr(n,i);if(a.length){var l=Array.prototype.slice.call(arguments,2),u;Po?u=Po.delayedCallbacks:Ms?u=Ms:(u=Ms=[],setTimeout(i1,0));for(var p=function(b){u.push(function(){return a[b].apply(null,l)})},m=0;m<a.length;++m)p(m)}}function i1(){var n=Ms;Ms=null;for(var i=0;i<n.length;++i)n[i]()}function Gd(n,i,a,l){for(var u=0;u<i.changes.length;u++){var p=i.changes[u];p=="text"?s1(n,i):p=="gutter"?Xd(n,i,a,l):p=="class"?Su(n,i):p=="widget"&&l1(n,i,l)}i.changes=null}function Ns(n){return n.node==n.text&&(n.node=k("div",null,null,"position: relative"),n.text.parentNode&&n.text.parentNode.replaceChild(n.node,n.text),n.node.appendChild(n.text),d&&g<8&&(n.node.style.zIndex=2)),n.node}function o1(n,i){var a=i.bgClass?i.bgClass+" "+(i.line.bgClass||""):i.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),i.background)a?i.background.className=a:(i.background.parentNode.removeChild(i.background),i.background=null);else if(a){var l=Ns(i);i.background=l.insertBefore(k("div",null,a),l.firstChild),n.display.input.setUneditable(i.background)}}function Kd(n,i){var a=n.display.externalMeasured;return a&&a.line==i.line?(n.display.externalMeasured=null,i.measure=a.measure,a.built):Ud(n,i)}function s1(n,i){var a=i.text.className,l=Kd(n,i);i.text==i.node&&(i.node=l.pre),i.text.parentNode.replaceChild(l.pre,i.text),i.text=l.pre,l.bgClass!=i.bgClass||l.textClass!=i.textClass?(i.bgClass=l.bgClass,i.textClass=l.textClass,Su(n,i)):a&&(i.text.className=a)}function Su(n,i){o1(n,i),i.line.wrapClass?Ns(i).className=i.line.wrapClass:i.node!=i.text&&(i.node.className="");var a=i.textClass?i.textClass+" "+(i.line.textClass||""):i.line.textClass;i.text.className=a||""}function Xd(n,i,a,l){if(i.gutter&&(i.node.removeChild(i.gutter),i.gutter=null),i.gutterBackground&&(i.node.removeChild(i.gutterBackground),i.gutterBackground=null),i.line.gutterClass){var u=Ns(i);i.gutterBackground=k("div",null,"CodeMirror-gutter-background "+i.line.gutterClass,"left: "+(n.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),n.display.input.setUneditable(i.gutterBackground),u.insertBefore(i.gutterBackground,i.text)}var p=i.line.gutterMarkers;if(n.options.lineNumbers||p){var m=Ns(i),b=i.gutter=k("div",null,"CodeMirror-gutter-wrapper","left: "+(n.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(b.setAttribute("aria-hidden","true"),n.display.input.setUneditable(b),m.insertBefore(b,i.text),i.line.gutterClass&&(b.className+=" "+i.line.gutterClass),n.options.lineNumbers&&(!p||!p["CodeMirror-linenumbers"])&&(i.lineNumber=b.appendChild(k("div",dt(n.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+n.display.lineNumInnerWidth+"px"))),p)for(var x=0;x<n.display.gutterSpecs.length;++x){var S=n.display.gutterSpecs[x].className,N=p.hasOwnProperty(S)&&p[S];N&&b.appendChild(k("div",[N],"CodeMirror-gutter-elt","left: "+l.gutterLeft[S]+"px; width: "+l.gutterWidth[S]+"px"))}}}function l1(n,i,a){i.alignable&&(i.alignable=null);for(var l=ut("CodeMirror-linewidget"),u=i.node.firstChild,p=void 0;u;u=p)p=u.nextSibling,l.test(u.className)&&i.node.removeChild(u);Yd(n,i,a)}function a1(n,i,a,l){var u=Kd(n,i);return i.text=i.node=u.pre,u.bgClass&&(i.bgClass=u.bgClass),u.textClass&&(i.textClass=u.textClass),Su(n,i),Xd(n,i,a,l),Yd(n,i,l),i.node}function Yd(n,i,a){if(Zd(n,i.line,i,a,!0),i.rest)for(var l=0;l<i.rest.length;l++)Zd(n,i.rest[l],i,a,!1)}function Zd(n,i,a,l,u){if(i.widgets)for(var p=Ns(a),m=0,b=i.widgets;m<b.length;++m){var x=b[m],S=k("div",[x.node],"CodeMirror-linewidget"+(x.className?" "+x.className:""));x.handleMouseEvents||S.setAttribute("cm-ignore-events","true"),c1(x,S,a,l),n.display.input.setUneditable(S),u&&x.above?p.insertBefore(S,a.gutter||a.text):p.appendChild(S),He(x,"redraw")}}function c1(n,i,a,l){if(n.noHScroll){(a.alignable||(a.alignable=[])).push(i);var u=l.wrapperWidth;i.style.left=l.fixedPos+"px",n.coverGutter||(u-=l.gutterTotalWidth,i.style.paddingLeft=l.gutterTotalWidth+"px"),i.style.width=u+"px"}n.coverGutter&&(i.style.zIndex=5,i.style.position="relative",n.noHScroll||(i.style.marginLeft=-l.gutterTotalWidth+"px"))}function $s(n){if(n.height!=null)return n.height;var i=n.doc.cm;if(!i)return 0;if(!tt(document.body,n.node)){var a="position: relative;";n.coverGutter&&(a+="margin-left: -"+i.display.gutters.offsetWidth+"px;"),n.noHScroll&&(a+="width: "+i.display.wrapper.clientWidth+"px;"),I(i.display.measure,k("div",[n.node],null,a))}return n.height=n.node.parentNode.offsetHeight}function zr(n,i){for(var a=ks(i);a!=n.wrapper;a=a.parentNode)if(!a||a.nodeType==1&&a.getAttribute("cm-ignore-events")=="true"||a.parentNode==n.sizer&&a!=n.mover)return!0}function da(n){return n.lineSpace.offsetTop}function ku(n){return n.mover.offsetHeight-n.lineSpace.offsetHeight}function Jd(n){if(n.cachedPaddingH)return n.cachedPaddingH;var i=I(n.measure,k("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(i):i.currentStyle,l={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return!isNaN(l.left)&&!isNaN(l.right)&&(n.cachedPaddingH=l),l}function yr(n){return Xt-n.display.nativeBarWidth}function Gi(n){return n.display.scroller.clientWidth-yr(n)-n.display.barWidth}function Cu(n){return n.display.scroller.clientHeight-yr(n)-n.display.barHeight}function u1(n,i,a){var l=n.options.lineWrapping,u=l&&Gi(n);if(!i.measure.heights||l&&i.measure.width!=u){var p=i.measure.heights=[];if(l){i.measure.width=u;for(var m=i.text.firstChild.getClientRects(),b=0;b<m.length-1;b++){var x=m[b],S=m[b+1];Math.abs(x.bottom-S.bottom)>2&&p.push((x.bottom+S.top)/2-a.top)}}p.push(a.bottom-a.top)}}function Qd(n,i,a){if(n.line==i)return{map:n.measure.map,cache:n.measure.cache};if(n.rest){for(var l=0;l<n.rest.length;l++)if(n.rest[l]==i)return{map:n.measure.maps[l],cache:n.measure.caches[l]};for(var u=0;u<n.rest.length;u++)if(C(n.rest[u])>a)return{map:n.measure.maps[u],cache:n.measure.caches[u],before:!0}}}function f1(n,i){i=er(i);var a=C(i),l=n.display.externalMeasured=new Vd(n.doc,i,a);l.lineN=a;var u=l.built=Ud(n,l);return l.text=u.pre,I(n.display.lineMeasure,u.pre),l}function tp(n,i,a,l){return br(n,Oo(n,i),a,l)}function Tu(n,i){if(i>=n.display.viewFrom&&i<n.display.viewTo)return n.display.view[Yi(n,i)];var a=n.display.externalMeasured;if(a&&i>=a.lineN&&i<a.lineN+a.size)return a}function Oo(n,i){var a=C(i),l=Tu(n,a);l&&!l.text?l=null:l&&l.changes&&(Gd(n,l,a,Nu(n)),n.curOp.forceUpdate=!0),l||(l=f1(n,i));var u=Qd(l,i,a);return{line:i,view:l,rect:null,map:u.map,cache:u.cache,before:u.before,hasHeights:!1}}function br(n,i,a,l,u){i.before&&(a=-1);var p=a+(l||""),m;return i.cache.hasOwnProperty(p)?m=i.cache[p]:(i.rect||(i.rect=i.view.text.getBoundingClientRect()),i.hasHeights||(u1(n,i.view,i.rect),i.hasHeights=!0),m=d1(n,i,a,l),m.bogus||(i.cache[p]=m)),{left:m.left,right:m.right,top:u?m.rtop:m.top,bottom:u?m.rbottom:m.bottom}}var ep={left:0,right:0,top:0,bottom:0};function np(n,i,a){for(var l,u,p,m,b,x,S=0;S<n.length;S+=3)if(b=n[S],x=n[S+1],i<b?(u=0,p=1,m="left"):i<x?(u=i-b,p=u+1):(S==n.length-3||i==x&&n[S+3]>i)&&(p=x-b,u=p-1,i>=x&&(m="right")),u!=null){if(l=n[S+2],b==x&&a==(l.insertLeft?"left":"right")&&(m=a),a=="left"&&u==0)for(;S&&n[S-2]==n[S-3]&&n[S-1].insertLeft;)l=n[(S-=3)+2],m="left";if(a=="right"&&u==x-b)for(;S<n.length-3&&n[S+3]==n[S+4]&&!n[S+5].insertLeft;)l=n[(S+=3)+2],m="right";break}return{node:l,start:u,end:p,collapse:m,coverStart:b,coverEnd:x}}function h1(n,i){var a=ep;if(i=="left")for(var l=0;l<n.length&&(a=n[l]).left==a.right;l++);else for(var u=n.length-1;u>=0&&(a=n[u]).left==a.right;u--);return a}function d1(n,i,a,l){var u=np(i.map,a,l),p=u.node,m=u.start,b=u.end,x=u.collapse,S;if(p.nodeType==3){for(var N=0;N<4;N++){for(;m&&te(i.line.text.charAt(u.coverStart+m));)--m;for(;u.coverStart+b<u.coverEnd&&te(i.line.text.charAt(u.coverStart+b));)++b;if(d&&g<9&&m==0&&b==u.coverEnd-u.coverStart?S=p.parentNode.getBoundingClientRect():S=h1(U(p,m,b).getClientRects(),l),S.left||S.right||m==0)break;b=m,m=m-1,x="right"}d&&g<11&&(S=p1(n.display.measure,S))}else{m>0&&(x=l="right");var D;n.options.lineWrapping&&(D=p.getClientRects()).length>1?S=D[l=="right"?D.length-1:0]:S=p.getBoundingClientRect()}if(d&&g<9&&!m&&(!S||!S.left&&!S.right)){var j=p.parentNode.getClientRects()[0];j?S={left:j.left,right:j.left+Do(n.display),top:j.top,bottom:j.bottom}:S=ep}for(var W=S.top-i.rect.top,J=S.bottom-i.rect.top,ct=(W+J)/2,gt=i.view.measure.heights,wt=0;wt<gt.length-1&&!(ct<gt[wt]);wt++);var kt=wt?gt[wt-1]:0,xt=gt[wt],Lt={left:(x=="right"?S.right:S.left)-i.rect.left,right:(x=="left"?S.left:S.right)-i.rect.left,top:kt,bottom:xt};return!S.left&&!S.right&&(Lt.bogus=!0),n.options.singleCursorHeightPerLine||(Lt.rtop=W,Lt.rbottom=J),Lt}function p1(n,i){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!gu(n))return i;var a=screen.logicalXDPI/screen.deviceXDPI,l=screen.logicalYDPI/screen.deviceYDPI;return{left:i.left*a,right:i.right*a,top:i.top*l,bottom:i.bottom*l}}function rp(n){if(n.measure&&(n.measure.cache={},n.measure.heights=null,n.rest))for(var i=0;i<n.rest.length;i++)n.measure.caches[i]={}}function ip(n){n.display.externalMeasure=null,G(n.display.lineMeasure);for(var i=0;i<n.display.view.length;i++)rp(n.display.view[i])}function Ps(n){ip(n),n.display.cachedCharWidth=n.display.cachedTextHeight=n.display.cachedPaddingH=null,n.options.lineWrapping||(n.display.maxLineChanged=!0),n.display.lineNumChars=null}function op(n){return w&&P?-(n.body.getBoundingClientRect().left-parseInt(getComputedStyle(n.body).marginLeft)):n.defaultView.pageXOffset||(n.documentElement||n.body).scrollLeft}function sp(n){return w&&P?-(n.body.getBoundingClientRect().top-parseInt(getComputedStyle(n.body).marginTop)):n.defaultView.pageYOffset||(n.documentElement||n.body).scrollTop}function Eu(n){var i=er(n),a=i.widgets,l=0;if(a)for(var u=0;u<a.length;++u)a[u].above&&(l+=$s(a[u]));return l}function pa(n,i,a,l,u){if(!u){var p=Eu(i);a.top+=p,a.bottom+=p}if(l=="line")return a;l||(l="local");var m=Dr(i);if(l=="local"?m+=da(n.display):m-=n.display.viewOffset,l=="page"||l=="window"){var b=n.display.lineSpace.getBoundingClientRect();m+=b.top+(l=="window"?0:sp(ne(n)));var x=b.left+(l=="window"?0:op(ne(n)));a.left+=x,a.right+=x}return a.top+=m,a.bottom+=m,a}function lp(n,i,a){if(a=="div")return i;var l=i.left,u=i.top;if(a=="page")l-=op(ne(n)),u-=sp(ne(n));else if(a=="local"||!a){var p=n.display.sizer.getBoundingClientRect();l+=p.left,u+=p.top}var m=n.display.lineSpace.getBoundingClientRect();return{left:l-m.left,top:u-m.top}}function ga(n,i,a,l,u){return l||(l=$t(n.doc,i.line)),pa(n,l,tp(n,l,i.ch,u),a)}function nr(n,i,a,l,u,p){l=l||$t(n.doc,i.line),u||(u=Oo(n,l));function m(J,ct){var gt=br(n,u,J,ct?"right":"left",p);return ct?gt.left=gt.right:gt.right=gt.left,pa(n,l,gt,a)}var b=Bt(l,n.doc.direction),x=i.ch,S=i.sticky;if(x>=l.text.length?(x=l.text.length,S="before"):x<=0&&(x=0,S="after"),!b)return m(S=="before"?x-1:x,S=="before");function N(J,ct,gt){var wt=b[ct],kt=wt.level==1;return m(gt?J-1:J,kt!=gt)}var D=Xn(b,x,S),j=Nn,W=N(x,D,S=="before");return j!=null&&(W.other=N(x,j,S!="before")),W}function ap(n,i){var a=0;i=Ut(n.doc,i),n.options.lineWrapping||(a=Do(n.display)*i.ch);var l=$t(n.doc,i.line),u=Dr(l)+da(n.display);return{left:a,right:a,top:u,bottom:u+l.height}}function Lu(n,i,a,l,u){var p=X(n,i,a);return p.xRel=u,l&&(p.outside=l),p}function Au(n,i,a){var l=n.doc;if(a+=n.display.viewOffset,a<0)return Lu(l.first,0,null,-1,-1);var u=R(l,a),p=l.first+l.size-1;if(u>p)return Lu(l.first+l.size-1,$t(l,p).text.length,null,1,1);i<0&&(i=0);for(var m=$t(l,u);;){var b=g1(n,m,u,i,a),x=Ww(m,b.ch+(b.xRel>0||b.outside>0?1:0));if(!x)return b;var S=x.find(1);if(S.line==u)return S;m=$t(l,u=S.line)}}function cp(n,i,a,l){l-=Eu(i);var u=i.text.length,p=Ke(function(m){return br(n,a,m-1).bottom<=l},u,0);return u=Ke(function(m){return br(n,a,m).top>l},p,u),{begin:p,end:u}}function up(n,i,a,l){a||(a=Oo(n,i));var u=pa(n,i,br(n,a,l),"line").top;return cp(n,i,a,u)}function Mu(n,i,a,l){return n.bottom<=a?!1:n.top>a?!0:(l?n.left:n.right)>i}function g1(n,i,a,l,u){u-=Dr(i);var p=Oo(n,i),m=Eu(i),b=0,x=i.text.length,S=!0,N=Bt(i,n.doc.direction);if(N){var D=(n.options.lineWrapping?m1:v1)(n,i,a,p,N,l,u);S=D.level!=1,b=S?D.from:D.to-1,x=S?D.to:D.from-1}var j=null,W=null,J=Ke(function(Dt){var Pt=br(n,p,Dt);return Pt.top+=m,Pt.bottom+=m,Mu(Pt,l,u,!1)?(Pt.top<=u&&Pt.left<=l&&(j=Dt,W=Pt),!0):!1},b,x),ct,gt,wt=!1;if(W){var kt=l-W.left<W.right-l,xt=kt==S;J=j+(xt?0:1),gt=xt?"after":"before",ct=kt?W.left:W.right}else{!S&&(J==x||J==b)&&J++,gt=J==0?"after":J==i.text.length?"before":br(n,p,J-(S?1:0)).bottom+m<=u==S?"after":"before";var Lt=nr(n,X(a,J,gt),"line",i,p);ct=Lt.left,wt=u<Lt.top?-1:u>=Lt.bottom?1:0}return J=ze(i.text,J,1),Lu(a,J,gt,wt,l-ct)}function v1(n,i,a,l,u,p,m){var b=Ke(function(D){var j=u[D],W=j.level!=1;return Mu(nr(n,X(a,W?j.to:j.from,W?"before":"after"),"line",i,l),p,m,!0)},0,u.length-1),x=u[b];if(b>0){var S=x.level!=1,N=nr(n,X(a,S?x.from:x.to,S?"after":"before"),"line",i,l);Mu(N,p,m,!0)&&N.top>m&&(x=u[b-1])}return x}function m1(n,i,a,l,u,p,m){var b=cp(n,i,l,m),x=b.begin,S=b.end;/\s/.test(i.text.charAt(S-1))&&S--;for(var N=null,D=null,j=0;j<u.length;j++){var W=u[j];if(!(W.from>=S||W.to<=x)){var J=W.level!=1,ct=br(n,l,J?Math.min(S,W.to)-1:Math.max(x,W.from)).right,gt=ct<p?p-ct+1e9:ct-p;(!N||D>gt)&&(N=W,D=gt)}}return N||(N=u[u.length-1]),N.from<x&&(N={from:x,to:N.to,level:N.level}),N.to>S&&(N={from:N.from,to:S,level:N.level}),N}var Ki;function Ro(n){if(n.cachedTextHeight!=null)return n.cachedTextHeight;if(Ki==null){Ki=k("pre",null,"CodeMirror-line-like");for(var i=0;i<49;++i)Ki.appendChild(document.createTextNode("x")),Ki.appendChild(k("br"));Ki.appendChild(document.createTextNode("x"))}I(n.measure,Ki);var a=Ki.offsetHeight/50;return a>3&&(n.cachedTextHeight=a),G(n.measure),a||1}function Do(n){if(n.cachedCharWidth!=null)return n.cachedCharWidth;var i=k("span","xxxxxxxxxx"),a=k("pre",[i],"CodeMirror-line-like");I(n.measure,a);var l=i.getBoundingClientRect(),u=(l.right-l.left)/10;return u>2&&(n.cachedCharWidth=u),u||10}function Nu(n){for(var i=n.display,a={},l={},u=i.gutters.clientLeft,p=i.gutters.firstChild,m=0;p;p=p.nextSibling,++m){var b=n.display.gutterSpecs[m].className;a[b]=p.offsetLeft+p.clientLeft+u,l[b]=p.clientWidth}return{fixedPos:$u(i),gutterTotalWidth:i.gutters.offsetWidth,gutterLeft:a,gutterWidth:l,wrapperWidth:i.wrapper.clientWidth}}function $u(n){return n.scroller.getBoundingClientRect().left-n.sizer.getBoundingClientRect().left}function fp(n){var i=Ro(n.display),a=n.options.lineWrapping,l=a&&Math.max(5,n.display.scroller.clientWidth/Do(n.display)-3);return function(u){if(ri(n.doc,u))return 0;var p=0;if(u.widgets)for(var m=0;m<u.widgets.length;m++)u.widgets[m].height&&(p+=u.widgets[m].height);return a?p+(Math.ceil(u.text.length/l)||1)*i:p+i}}function Pu(n){var i=n.doc,a=fp(n);i.iter(function(l){var u=a(l);u!=l.height&&$n(l,u)})}function Xi(n,i,a,l){var u=n.display;if(!a&&ks(i).getAttribute("cm-not-content")=="true")return null;var p,m,b=u.lineSpace.getBoundingClientRect();try{p=i.clientX-b.left,m=i.clientY-b.top}catch{return null}var x=Au(n,p,m),S;if(l&&x.xRel>0&&(S=$t(n.doc,x.line).text).length==x.ch){var N=ft(S,S.length,n.options.tabSize)-S.length;x=X(x.line,Math.max(0,Math.round((p-Jd(n.display).left)/Do(n.display))-N))}return x}function Yi(n,i){if(i>=n.display.viewTo||(i-=n.display.viewFrom,i<0))return null;for(var a=n.display.view,l=0;l<a.length;l++)if(i-=a[l].size,i<0)return l}function un(n,i,a,l){i==null&&(i=n.doc.first),a==null&&(a=n.doc.first+n.doc.size),l||(l=0);var u=n.display;if(l&&a<u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>i)&&(u.updateLineNumbers=i),n.curOp.viewChanged=!0,i>=u.viewTo)Rr&&wu(n.doc,i)<u.viewTo&&oi(n);else if(a<=u.viewFrom)Rr&&Bd(n.doc,a+l)>u.viewFrom?oi(n):(u.viewFrom+=l,u.viewTo+=l);else if(i<=u.viewFrom&&a>=u.viewTo)oi(n);else if(i<=u.viewFrom){var p=va(n,a,a+l,1);p?(u.view=u.view.slice(p.index),u.viewFrom=p.lineN,u.viewTo+=l):oi(n)}else if(a>=u.viewTo){var m=va(n,i,i,-1);m?(u.view=u.view.slice(0,m.index),u.viewTo=m.lineN):oi(n)}else{var b=va(n,i,i,-1),x=va(n,a,a+l,1);b&&x?(u.view=u.view.slice(0,b.index).concat(ha(n,b.lineN,x.lineN)).concat(u.view.slice(x.index)),u.viewTo+=l):oi(n)}var S=u.externalMeasured;S&&(a<S.lineN?S.lineN+=l:i<S.lineN+S.size&&(u.externalMeasured=null))}function ii(n,i,a){n.curOp.viewChanged=!0;var l=n.display,u=n.display.externalMeasured;if(u&&i>=u.lineN&&i<u.lineN+u.size&&(l.externalMeasured=null),!(i<l.viewFrom||i>=l.viewTo)){var p=l.view[Yi(n,i)];if(p.node!=null){var m=p.changes||(p.changes=[]);Et(m,a)==-1&&m.push(a)}}}function oi(n){n.display.viewFrom=n.display.viewTo=n.doc.first,n.display.view=[],n.display.viewOffset=0}function va(n,i,a,l){var u=Yi(n,i),p,m=n.display.view;if(!Rr||a==n.doc.first+n.doc.size)return{index:u,lineN:a};for(var b=n.display.viewFrom,x=0;x<u;x++)b+=m[x].size;if(b!=i){if(l>0){if(u==m.length-1)return null;p=b+m[u].size-i,u++}else p=b-i;i+=p,a+=p}for(;wu(n.doc,a)!=a;){if(u==(l<0?0:m.length-1))return null;a+=l*m[u-(l<0?1:0)].size,u+=l}return{index:u,lineN:a}}function y1(n,i,a){var l=n.display,u=l.view;u.length==0||i>=l.viewTo||a<=l.viewFrom?(l.view=ha(n,i,a),l.viewFrom=i):(l.viewFrom>i?l.view=ha(n,i,l.viewFrom).concat(l.view):l.viewFrom<i&&(l.view=l.view.slice(Yi(n,i))),l.viewFrom=i,l.viewTo<a?l.view=l.view.concat(ha(n,l.viewTo,a)):l.viewTo>a&&(l.view=l.view.slice(0,Yi(n,a)))),l.viewTo=a}function hp(n){for(var i=n.display.view,a=0,l=0;l<i.length;l++){var u=i[l];!u.hidden&&(!u.node||u.changes)&&++a}return a}function Os(n){n.display.input.showSelection(n.display.input.prepareSelection())}function dp(n,i){i===void 0&&(i=!0);var a=n.doc,l={},u=l.cursors=document.createDocumentFragment(),p=l.selection=document.createDocumentFragment(),m=n.options.$customCursor;m&&(i=!0);for(var b=0;b<a.sel.ranges.length;b++)if(!(!i&&b==a.sel.primIndex)){var x=a.sel.ranges[b];if(!(x.from().line>=n.display.viewTo||x.to().line<n.display.viewFrom)){var S=x.empty();if(m){var N=m(n,x);N&&Ou(n,N,u)}else(S||n.options.showCursorWhenSelecting)&&Ou(n,x.head,u);S||b1(n,x,p)}}return l}function Ou(n,i,a){var l=nr(n,i,"div",null,null,!n.options.singleCursorHeightPerLine),u=a.appendChild(k("div"," ","CodeMirror-cursor"));if(u.style.left=l.left+"px",u.style.top=l.top+"px",u.style.height=Math.max(0,l.bottom-l.top)*n.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(n.getWrapperElement().className)){var p=ga(n,i,"div",null,null),m=p.right-p.left;u.style.width=(m>0?m:n.defaultCharWidth())+"px"}if(l.other){var b=a.appendChild(k("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));b.style.display="",b.style.left=l.other.left+"px",b.style.top=l.other.top+"px",b.style.height=(l.other.bottom-l.other.top)*.85+"px"}}function ma(n,i){return n.top-i.top||n.left-i.left}function b1(n,i,a){var l=n.display,u=n.doc,p=document.createDocumentFragment(),m=Jd(n.display),b=m.left,x=Math.max(l.sizerWidth,Gi(n)-l.sizer.offsetLeft)-m.right,S=u.direction=="ltr";function N(xt,Lt,Dt,Pt){Lt<0&&(Lt=0),Lt=Math.round(Lt),Pt=Math.round(Pt),p.appendChild(k("div",null,"CodeMirror-selected","position: absolute; left: "+xt+`px;
|
|
30
30
|
top: `+Lt+"px; width: "+(Dt??x-xt)+`px;
|
|
31
|
-
height: `+(Pt-Lt)+"px"))}function D(xt,Lt,Dt){var Pt=$t(u,xt),Jt=Pt.text.length,ve,We;function _e(Me,dn){return ga(n,X(xt,Me),"div",Pt,dn)}function
|
|
31
|
+
height: `+(Pt-Lt)+"px"))}function D(xt,Lt,Dt){var Pt=$t(u,xt),Jt=Pt.text.length,ve,We;function _e(Me,dn){return ga(n,X(xt,Me),"div",Pt,dn)}function Cn(Me,dn,Ve){var Ie=up(n,Pt,null,Me),Ne=dn=="ltr"==(Ve=="after")?"left":"right",Ee=Ve=="after"?Ie.begin:Ie.end-(/\s/.test(Pt.text.charAt(Ie.end-1))?2:1);return _e(Ee,Ne)[Ne]}var hn=Bt(Pt,u.direction);return Kn(hn,Lt||0,Dt??Jt,function(Me,dn,Ve,Ie){var Ne=Ve=="ltr",Ee=_e(Me,Ne?"left":"right"),pn=_e(dn-1,Ne?"right":"left"),Xo=Lt==null&&Me==0,fi=Dt==null&&dn==Jt,Qe=Ie==0,wr=!hn||Ie==hn.length-1;if(pn.top-Ee.top<=3){var Ue=(S?Xo:fi)&&Qe,af=(S?fi:Xo)&&wr,Hr=Ue?b:(Ne?Ee:pn).left,eo=af?x:(Ne?pn:Ee).right;N(Hr,Ee.top,eo-Hr,Ee.bottom)}else{var no,nn,Yo,cf;Ne?(no=S&&Xo&&Qe?b:Ee.left,nn=S?x:Cn(Me,Ve,"before"),Yo=S?b:Cn(dn,Ve,"after"),cf=S&&fi&&wr?x:pn.right):(no=S?Cn(Me,Ve,"before"):b,nn=!S&&Xo&&Qe?x:Ee.right,Yo=!S&&fi&&wr?b:pn.left,cf=S?Cn(dn,Ve,"after"):x),N(no,Ee.top,nn-no,Ee.bottom),Ee.bottom<pn.top&&N(b,Ee.bottom,null,pn.top),N(Yo,pn.top,cf-Yo,pn.bottom)}(!ve||ma(Ee,ve)<0)&&(ve=Ee),ma(pn,ve)<0&&(ve=pn),(!We||ma(Ee,We)<0)&&(We=Ee),ma(pn,We)<0&&(We=pn)}),{start:ve,end:We}}var j=i.from(),W=i.to();if(j.line==W.line)D(j.line,j.ch,W.ch);else{var J=$t(u,j.line),ct=$t(u,W.line),gt=er(J)==er(ct),wt=D(j.line,j.ch,gt?J.text.length+1:null).end,kt=D(W.line,gt?0:null,W.ch).start;gt&&(wt.top<kt.top-2?(N(wt.right,wt.top,null,wt.bottom),N(b,kt.top,kt.left,kt.bottom)):N(wt.right,wt.top,kt.left-wt.right,wt.bottom)),wt.bottom<kt.top&&N(b,wt.bottom,null,kt.top)}a.appendChild(p)}function Ru(n){if(n.state.focused){var i=n.display;clearInterval(i.blinker);var a=!0;i.cursorDiv.style.visibility="",n.options.cursorBlinkRate>0?i.blinker=setInterval(function(){n.hasFocus()||zo(n),i.cursorDiv.style.visibility=(a=!a)?"":"hidden"},n.options.cursorBlinkRate):n.options.cursorBlinkRate<0&&(i.cursorDiv.style.visibility="hidden")}}function pp(n){n.hasFocus()||(n.display.input.focus(),n.state.focused||zu(n))}function Du(n){n.state.delayingBlurEvent=!0,setTimeout(function(){n.state.delayingBlurEvent&&(n.state.delayingBlurEvent=!1,n.state.focused&&zo(n))},100)}function zu(n,i){n.state.delayingBlurEvent&&!n.state.draggingText&&(n.state.delayingBlurEvent=!1),n.options.readOnly!="nocursor"&&(n.state.focused||(ke(n,"focus",n,i),n.state.focused=!0,Mt(n.display.wrapper,"CodeMirror-focused"),!n.curOp&&n.display.selForContextMenu!=n.doc.sel&&(n.display.input.reset(),v&&setTimeout(function(){return n.display.input.reset(!0)},20)),n.display.input.receivedFocus()),Ru(n))}function zo(n,i){n.state.delayingBlurEvent||(n.state.focused&&(ke(n,"blur",n,i),n.state.focused=!1,lt(n.display.wrapper,"CodeMirror-focused")),clearInterval(n.display.blinker),setTimeout(function(){n.state.focused||(n.display.shift=!1)},150))}function ya(n){for(var i=n.display,a=i.lineDiv.offsetTop,l=Math.max(0,i.scroller.getBoundingClientRect().top),u=i.lineDiv.getBoundingClientRect().top,p=0,m=0;m<i.view.length;m++){var b=i.view[m],x=n.options.lineWrapping,S=void 0,N=0;if(!b.hidden){if(u+=b.line.height,d&&g<8){var D=b.node.offsetTop+b.node.offsetHeight;S=D-a,a=D}else{var j=b.node.getBoundingClientRect();S=j.bottom-j.top,!x&&b.text.firstChild&&(N=b.text.firstChild.getBoundingClientRect().right-j.left-1)}var W=b.line.height-S;if((W>.005||W<-.005)&&(u<l&&(p-=W),$n(b.line,S),gp(b.line),b.rest))for(var J=0;J<b.rest.length;J++)gp(b.rest[J]);if(N>n.display.sizerWidth){var ct=Math.ceil(N/Do(n.display));ct>n.display.maxLineLength&&(n.display.maxLineLength=ct,n.display.maxLine=b.line,n.display.maxLineChanged=!0)}}}Math.abs(p)>2&&(i.scroller.scrollTop+=p)}function gp(n){if(n.widgets)for(var i=0;i<n.widgets.length;++i){var a=n.widgets[i],l=a.node.parentNode;l&&(a.height=l.offsetHeight)}}function ba(n,i,a){var l=a&&a.top!=null?Math.max(0,a.top):n.scroller.scrollTop;l=Math.floor(l-da(n));var u=a&&a.bottom!=null?a.bottom:l+n.wrapper.clientHeight,p=R(i,l),m=R(i,u);if(a&&a.ensure){var b=a.ensure.from.line,x=a.ensure.to.line;b<p?(p=b,m=R(i,Dr($t(i,b))+n.wrapper.clientHeight)):Math.min(x,i.lastLine())>=m&&(p=R(i,Dr($t(i,x))-n.wrapper.clientHeight),m=x)}return{from:p,to:Math.max(m,p+1)}}function w1(n,i){if(!Ce(n,"scrollCursorIntoView")){var a=n.display,l=a.sizer.getBoundingClientRect(),u=null,p=a.wrapper.ownerDocument;if(i.top+l.top<0?u=!0:i.bottom+l.top>(p.defaultView.innerHeight||p.documentElement.clientHeight)&&(u=!1),u!=null&&!T){var m=k("div","",null,`position: absolute;
|
|
32
32
|
top: `+(i.top-a.viewOffset-da(n.display))+`px;
|
|
33
33
|
height: `+(i.bottom-i.top+yr(n)+a.barHeight)+`px;
|
|
34
|
-
left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");n.display.lineSpace.appendChild(m),m.scrollIntoView(u),n.display.lineSpace.removeChild(m)}}}function x1(n,i,a,l){l==null&&(l=0);var u;!n.options.lineWrapping&&i==a&&(a=i.sticky=="before"?X(i.line,i.ch+1,"before"):i,i=i.ch?X(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i);for(var p=0;p<5;p++){var m=!1,b=nr(n,i),x=!a||a==i?b:nr(n,a);u={left:Math.min(b.left,x.left),top:Math.min(b.top,x.top)-l,right:Math.max(b.left,x.left),bottom:Math.max(b.bottom,x.bottom)+l};var S=Iu(n,u),N=n.doc.scrollTop,D=n.doc.scrollLeft;if(S.scrollTop!=null&&(Ds(n,S.scrollTop),Math.abs(n.doc.scrollTop-N)>1&&(m=!0)),S.scrollLeft!=null&&(Zi(n,S.scrollLeft),Math.abs(n.doc.scrollLeft-D)>1&&(m=!0)),!m)break}return u}function _1(n,i){var a=Iu(n,i);a.scrollTop!=null&&Ds(n,a.scrollTop),a.scrollLeft!=null&&Zi(n,a.scrollLeft)}function Iu(n,i){var a=n.display,l=Ro(n.display);i.top<0&&(i.top=0);var u=n.curOp&&n.curOp.scrollTop!=null?n.curOp.scrollTop:a.scroller.scrollTop,p=Cu(n),m={};i.bottom-i.top>p&&(i.bottom=i.top+p);var b=n.doc.height+ku(a),x=i.top<l,S=i.bottom>b-l;if(i.top<u)m.scrollTop=x?0:i.top;else if(i.bottom>u+p){var N=Math.min(i.top,(S?b:i.bottom)-p);N!=u&&(m.scrollTop=N)}var D=n.options.fixedGutter?0:a.gutters.offsetWidth,j=n.curOp&&n.curOp.scrollLeft!=null?n.curOp.scrollLeft:a.scroller.scrollLeft-D,W=Gi(n)-a.gutters.offsetWidth,J=i.right-i.left>W;return J&&(i.right=i.left+W),i.left<10?m.scrollLeft=0:i.left<j?m.scrollLeft=Math.max(0,i.left+D-(J?0:10)):i.right>W+j-3&&(m.scrollLeft=i.right+(J?0:10)-W),m}function Fu(n,i){i!=null&&(wa(n),n.curOp.scrollTop=(n.curOp.scrollTop==null?n.doc.scrollTop:n.curOp.scrollTop)+i)}function Io(n){wa(n);var i=n.getCursor();n.curOp.scrollToPos={from:i,to:i,margin:n.options.cursorScrollMargin}}function Rs(n,i,a){(i!=null||a!=null)&&wa(n),i!=null&&(n.curOp.scrollLeft=i),a!=null&&(n.curOp.scrollTop=a)}function S1(n,i){wa(n),n.curOp.scrollToPos=i}function wa(n){var i=n.curOp.scrollToPos;if(i){n.curOp.scrollToPos=null;var a=ap(n,i.from),l=ap(n,i.to);vp(n,a,l,i.margin)}}function vp(n,i,a,l){var u=Iu(n,{left:Math.min(i.left,a.left),top:Math.min(i.top,a.top)-l,right:Math.max(i.right,a.right),bottom:Math.max(i.bottom,a.bottom)+l});Rs(n,u.scrollLeft,u.scrollTop)}function Ds(n,i){Math.abs(n.doc.scrollTop-i)<2||(s||qu(n,{top:i}),mp(n,i,!0),s&&qu(n),Fs(n,100))}function mp(n,i,a){i=Math.max(0,Math.min(n.display.scroller.scrollHeight-n.display.scroller.clientHeight,i)),!(n.display.scroller.scrollTop==i&&!a)&&(n.doc.scrollTop=i,n.display.scrollbars.setScrollTop(i),n.display.scroller.scrollTop!=i&&(n.display.scroller.scrollTop=i))}function Zi(n,i,a,l){i=Math.max(0,Math.min(i,n.display.scroller.scrollWidth-n.display.scroller.clientWidth)),!((a?i==n.doc.scrollLeft:Math.abs(n.doc.scrollLeft-i)<2)&&!l)&&(n.doc.scrollLeft=i,_p(n),n.display.scroller.scrollLeft!=i&&(n.display.scroller.scrollLeft=i),n.display.scrollbars.setScrollLeft(i))}function zs(n){var i=n.display,a=i.gutters.offsetWidth,l=Math.round(n.doc.height+ku(n.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:n.options.fixedGutter?a:0,docHeight:l,scrollHeight:l+yr(n)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:a}}var Ji=function(n,i,a){this.cm=a;var l=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=u.tabIndex=-1,n(l),n(u),Rt(l,"scroll",function(){l.clientHeight&&i(l.scrollTop,"vertical")}),Rt(u,"scroll",function(){u.clientWidth&&i(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ji.prototype.update=function(n){var i=n.scrollWidth>n.clientWidth+1,a=n.scrollHeight>n.clientHeight+1,l=n.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=i?l+"px":"0";var u=n.viewHeight-(i?l:0);this.vert.firstChild.style.height=Math.max(0,n.scrollHeight-n.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=a?l+"px":"0",this.horiz.style.left=n.barLeft+"px";var p=n.viewWidth-n.barLeft-(a?l:0);this.horiz.firstChild.style.width=Math.max(0,n.scrollWidth-n.clientWidth+p)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&n.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?l:0,bottom:i?l:0}},Ji.prototype.setScrollLeft=function(n){this.horiz.scrollLeft!=n&&(this.horiz.scrollLeft=n),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ji.prototype.setScrollTop=function(n){this.vert.scrollTop!=n&&(this.vert.scrollTop=n),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ji.prototype.zeroWidthHack=function(){var n=F&&!A?"12px":"18px";this.horiz.style.height=this.vert.style.width=n,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Nt,this.disableVert=new Nt},Ji.prototype.enableZeroWidthBar=function(n,i,a){n.style.visibility="";function l(){var u=n.getBoundingClientRect(),p=a=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);p!=n?n.style.visibility="hidden":i.set(1e3,l)}i.set(1e3,l)},Ji.prototype.clear=function(){var n=this.horiz.parentNode;n.removeChild(this.horiz),n.removeChild(this.vert)};var Is=function(){};Is.prototype.update=function(){return{bottom:0,right:0}},Is.prototype.setScrollLeft=function(){},Is.prototype.setScrollTop=function(){},Is.prototype.clear=function(){};function Fo(n,i){i||(i=zs(n));var a=n.display.barWidth,l=n.display.barHeight;yp(n,i);for(var u=0;u<4&&a!=n.display.barWidth||l!=n.display.barHeight;u++)a!=n.display.barWidth&&n.options.lineWrapping&&ya(n),yp(n,zs(n)),a=n.display.barWidth,l=n.display.barHeight}function yp(n,i){var a=n.display,l=a.scrollbars.update(i);a.sizer.style.paddingRight=(a.barWidth=l.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=l.bottom)+"px",a.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=l.bottom+"px",a.scrollbarFiller.style.width=l.right+"px"):a.scrollbarFiller.style.display="",l.bottom&&n.options.coverGutterNextToScrollbar&&n.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=l.bottom+"px",a.gutterFiller.style.width=i.gutterWidth+"px"):a.gutterFiller.style.display=""}var bp={native:Ji,null:Is};function wp(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&<(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new bp[n.options.scrollbarStyle](function(i){n.display.wrapper.insertBefore(i,n.display.scrollbarFiller),Rt(i,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,a){a=="horizontal"?Zi(n,i):Ds(n,i)},n),n.display.scrollbars.addClass&&Mt(n.display.wrapper,n.display.scrollbars.addClass)}var k1=0;function Qi(n){n.curOp={cm:n,viewChanged:!1,startHeight:n.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++k1,markArrays:null},e1(n.curOp)}function to(n){var i=n.curOp;i&&r1(i,function(a){for(var l=0;l<a.ops.length;l++)a.ops[l].cm.curOp=null;C1(a)})}function C1(n){for(var i=n.ops,a=0;a<i.length;a++)T1(i[a]);for(var l=0;l<i.length;l++)E1(i[l]);for(var u=0;u<i.length;u++)L1(i[u]);for(var p=0;p<i.length;p++)A1(i[p]);for(var m=0;m<i.length;m++)M1(i[m])}function T1(n){var i=n.cm,a=i.display;$1(i),n.updateMaxLine&&_u(i),n.mustUpdate=n.viewChanged||n.forceUpdate||n.scrollTop!=null||n.scrollToPos&&(n.scrollToPos.from.line<a.viewFrom||n.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&i.options.lineWrapping,n.update=n.mustUpdate&&new xa(i,n.mustUpdate&&{top:n.scrollTop,ensure:n.scrollToPos},n.forceUpdate)}function E1(n){n.updatedDisplay=n.mustUpdate&&Hu(n.cm,n.update)}function L1(n){var i=n.cm,a=i.display;n.updatedDisplay&&ya(i),n.barMeasure=zs(i),a.maxLineChanged&&!i.options.lineWrapping&&(n.adjustWidthTo=tp(i,a.maxLine,a.maxLine.text.length).left+3,i.display.sizerWidth=n.adjustWidthTo,n.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+n.adjustWidthTo+yr(i)+i.display.barWidth),n.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+n.adjustWidthTo-Gi(i))),(n.updatedDisplay||n.selectionChanged)&&(n.preparedSelection=a.input.prepareSelection())}function A1(n){var i=n.cm;n.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=n.adjustWidthTo+"px",n.maxScrollLeft<i.doc.scrollLeft&&Zi(i,Math.min(i.display.scroller.scrollLeft,n.maxScrollLeft),!0),i.display.maxLineChanged=!1);var a=n.focus&&n.focus==mt(ee(i));n.preparedSelection&&i.display.input.showSelection(n.preparedSelection,a),(n.updatedDisplay||n.startHeight!=i.doc.height)&&Fo(i,n.barMeasure),n.updatedDisplay&&Wu(i,n.barMeasure),n.selectionChanged&&Ru(i),i.state.focused&&n.updateInput&&i.display.input.reset(n.typing),a&&pp(n.cm)}function M1(n){var i=n.cm,a=i.display,l=i.doc;if(n.updatedDisplay&&xp(i,n.update),a.wheelStartX!=null&&(n.scrollTop!=null||n.scrollLeft!=null||n.scrollToPos)&&(a.wheelStartX=a.wheelStartY=null),n.scrollTop!=null&&mp(i,n.scrollTop,n.forceScroll),n.scrollLeft!=null&&Zi(i,n.scrollLeft,!0,!0),n.scrollToPos){var u=x1(i,Ut(l,n.scrollToPos.from),Ut(l,n.scrollToPos.to),n.scrollToPos.margin);w1(i,u)}var p=n.maybeHiddenMarkers,m=n.maybeUnhiddenMarkers;if(p)for(var b=0;b<p.length;++b)p[b].lines.length||ke(p[b],"hide");if(m)for(var x=0;x<m.length;++x)m[x].lines.length&&ke(m[x],"unhide");a.wrapper.offsetHeight&&(l.scrollTop=i.display.scroller.scrollTop),n.changeObjs&&ke(i,"changes",i,n.changeObjs),n.update&&n.update.finish()}function Sn(n,i){if(n.curOp)return i();Qi(n);try{return i()}finally{to(n)}}function qe(n,i){return function(){if(n.curOp)return i.apply(n,arguments);Qi(n);try{return i.apply(n,arguments)}finally{to(n)}}}function en(n){return function(){if(this.curOp)return n.apply(this,arguments);Qi(this);try{return n.apply(this,arguments)}finally{to(this)}}}function Be(n){return function(){var i=this.cm;if(!i||i.curOp)return n.apply(this,arguments);Qi(i);try{return n.apply(this,arguments)}finally{to(i)}}}function Fs(n,i){n.doc.highlightFrontier<n.display.viewTo&&n.state.highlight.set(i,V(N1,n))}function N1(n){var i=n.doc;if(!(i.highlightFrontier>=n.display.viewTo)){var a=+new Date+n.options.workTime,l=Ls(n,i.highlightFrontier),u=[];i.iter(l.line,Math.min(i.first+i.size,n.display.viewTo+500),function(p){if(l.line>=n.display.viewFrom){var m=p.styles,b=p.text.length>n.options.maxHighlightLength?vr(i.mode,l.state):null,x=Ld(n,p,l,!0);b&&(l.state=b),p.styles=x.styles;var S=p.styleClasses,N=x.classes;N?p.styleClasses=N:S&&(p.styleClasses=null);for(var D=!m||m.length!=p.styles.length||S!=N&&(!S||!N||S.bgClass!=N.bgClass||S.textClass!=N.textClass),j=0;!D&&j<m.length;++j)D=m[j]!=p.styles[j];D&&u.push(l.line),p.stateAfter=l.save(),l.nextLine()}else p.text.length<=n.options.maxHighlightLength&&vu(n,p.text,l),p.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>a)return Fs(n,n.options.workDelay),!0}),i.highlightFrontier=l.line,i.modeFrontier=Math.max(i.modeFrontier,l.line),u.length&&Sn(n,function(){for(var p=0;p<u.length;p++)ii(n,u[p],"text")})}}var xa=function(n,i,a){var l=n.display;this.viewport=i,this.visible=ba(l,n.doc,i),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Gi(n),this.force=a,this.dims=Nu(n),this.events=[]};xa.prototype.signal=function(n,i){_n(n,i)&&this.events.push(arguments)},xa.prototype.finish=function(){for(var n=0;n<this.events.length;n++)ke.apply(null,this.events[n])};function $1(n){var i=n.display;!i.scrollbarsClipped&&i.scroller.offsetWidth&&(i.nativeBarWidth=i.scroller.offsetWidth-i.scroller.clientWidth,i.heightForcer.style.height=yr(n)+"px",i.sizer.style.marginBottom=-i.nativeBarWidth+"px",i.sizer.style.borderRightWidth=yr(n)+"px",i.scrollbarsClipped=!0)}function P1(n){if(n.hasFocus())return null;var i=mt(ee(n));if(!i||!tt(n.display.lineDiv,i))return null;var a={activeElt:i};if(window.getSelection){var l=Tt(n).getSelection();l.anchorNode&&l.extend&&tt(n.display.lineDiv,l.anchorNode)&&(a.anchorNode=l.anchorNode,a.anchorOffset=l.anchorOffset,a.focusNode=l.focusNode,a.focusOffset=l.focusOffset)}return a}function O1(n){if(!(!n||!n.activeElt||n.activeElt==mt(Zt(n.activeElt)))&&(n.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(n.activeElt.nodeName)&&n.anchorNode&&tt(document.body,n.anchorNode)&&tt(document.body,n.focusNode))){var i=n.activeElt.ownerDocument,a=i.defaultView.getSelection(),l=i.createRange();l.setEnd(n.anchorNode,n.anchorOffset),l.collapse(!1),a.removeAllRanges(),a.addRange(l),a.extend(n.focusNode,n.focusOffset)}}function Hu(n,i){var a=n.display,l=n.doc;if(i.editorIsHidden)return oi(n),!1;if(!i.force&&i.visible.from>=a.viewFrom&&i.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&hp(n)==0)return!1;Sp(n)&&(oi(n),i.dims=Nu(n));var u=l.first+l.size,p=Math.max(i.visible.from-n.options.viewportMargin,l.first),m=Math.min(u,i.visible.to+n.options.viewportMargin);a.viewFrom<p&&p-a.viewFrom<20&&(p=Math.max(l.first,a.viewFrom)),a.viewTo>m&&a.viewTo-m<20&&(m=Math.min(u,a.viewTo)),Rr&&(p=wu(n.doc,p),m=Bd(n.doc,m));var b=p!=a.viewFrom||m!=a.viewTo||a.lastWrapHeight!=i.wrapperHeight||a.lastWrapWidth!=i.wrapperWidth;y1(n,p,m),a.viewOffset=Dr($t(n.doc,a.viewFrom)),n.display.mover.style.top=a.viewOffset+"px";var x=hp(n);if(!b&&x==0&&!i.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var S=P1(n);return x>4&&(a.lineDiv.style.display="none"),R1(n,a.updateLineNumbers,i.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,O1(S),G(a.cursorDiv),G(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,b&&(a.lastWrapHeight=i.wrapperHeight,a.lastWrapWidth=i.wrapperWidth,Fs(n,400)),a.updateLineNumbers=null,!0}function xp(n,i){for(var a=i.viewport,l=!0;;l=!1){if(!l||!n.options.lineWrapping||i.oldDisplayWidth==Gi(n)){if(a&&a.top!=null&&(a={top:Math.min(n.doc.height+ku(n.display)-Cu(n),a.top)}),i.visible=ba(n.display,n.doc,a),i.visible.from>=n.display.viewFrom&&i.visible.to<=n.display.viewTo)break}else l&&(i.visible=ba(n.display,n.doc,a));if(!Hu(n,i))break;ya(n);var u=zs(n);Os(n),Fo(n,u),Wu(n,u),i.force=!1}i.signal(n,"update",n),(n.display.viewFrom!=n.display.reportedViewFrom||n.display.viewTo!=n.display.reportedViewTo)&&(i.signal(n,"viewportChange",n,n.display.viewFrom,n.display.viewTo),n.display.reportedViewFrom=n.display.viewFrom,n.display.reportedViewTo=n.display.viewTo)}function qu(n,i){var a=new xa(n,i);if(Hu(n,a)){ya(n),xp(n,a);var l=zs(n);Os(n),Fo(n,l),Wu(n,l),a.finish()}}function R1(n,i,a){var l=n.display,u=n.options.lineNumbers,p=l.lineDiv,m=p.firstChild;function b(J){var ct=J.nextSibling;return v&&F&&n.display.currentWheelTarget==J?J.style.display="none":J.parentNode.removeChild(J),ct}for(var x=l.view,S=l.viewFrom,N=0;N<x.length;N++){var D=x[N];if(!D.hidden)if(!D.node||D.node.parentNode!=p){var j=a1(n,D,S,a);p.insertBefore(j,m)}else{for(;m!=D.node;)m=b(m);var W=u&&i!=null&&i<=S&&D.lineNumber;D.changes&&(Et(D.changes,"gutter")>-1&&(W=!1),Gd(n,D,S,a)),W&&(G(D.lineNumber),D.lineNumber.appendChild(document.createTextNode(dt(n.options,S)))),m=D.node.nextSibling}S+=D.size}for(;m;)m=b(m)}function Bu(n){var i=n.gutters.offsetWidth;n.sizer.style.marginLeft=i+"px",He(n,"gutterChanged",n)}function Wu(n,i){n.display.sizer.style.minHeight=i.docHeight+"px",n.display.heightForcer.style.top=i.docHeight+"px",n.display.gutters.style.height=i.docHeight+n.display.barHeight+yr(n)+"px"}function _p(n){var i=n.display,a=i.view;if(!(!i.alignWidgets&&(!i.gutters.firstChild||!n.options.fixedGutter))){for(var l=$u(i)-i.scroller.scrollLeft+n.doc.scrollLeft,u=i.gutters.offsetWidth,p=l+"px",m=0;m<a.length;m++)if(!a[m].hidden){n.options.fixedGutter&&(a[m].gutter&&(a[m].gutter.style.left=p),a[m].gutterBackground&&(a[m].gutterBackground.style.left=p));var b=a[m].alignable;if(b)for(var x=0;x<b.length;x++)b[x].style.left=p}n.options.fixedGutter&&(i.gutters.style.left=l+u+"px")}}function Sp(n){if(!n.options.lineNumbers)return!1;var i=n.doc,a=dt(n.options,i.first+i.size-1),l=n.display;if(a.length!=l.lineNumChars){var u=l.measure.appendChild(k("div",[k("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),p=u.firstChild.offsetWidth,m=u.offsetWidth-p;return l.lineGutter.style.width="",l.lineNumInnerWidth=Math.max(p,l.lineGutter.offsetWidth-m)+1,l.lineNumWidth=l.lineNumInnerWidth+m,l.lineNumChars=l.lineNumInnerWidth?a.length:-1,l.lineGutter.style.width=l.lineNumWidth+"px",Bu(n.display),!0}return!1}function Uu(n,i){for(var a=[],l=!1,u=0;u<n.length;u++){var p=n[u],m=null;if(typeof p!="string"&&(m=p.style,p=p.className),p=="CodeMirror-linenumbers")if(i)l=!0;else continue;a.push({className:p,style:m})}return i&&!l&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function kp(n){var i=n.gutters,a=n.gutterSpecs;G(i),n.lineGutter=null;for(var l=0;l<a.length;++l){var u=a[l],p=u.className,m=u.style,b=i.appendChild(k("div",null,"CodeMirror-gutter "+p));m&&(b.style.cssText=m),p=="CodeMirror-linenumbers"&&(n.lineGutter=b,b.style.width=(n.lineNumWidth||1)+"px")}i.style.display=a.length?"":"none",Bu(n)}function Hs(n){kp(n.display),un(n),_p(n)}function D1(n,i,a,l){var u=this;this.input=a,u.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=q("div",null,"CodeMirror-code"),u.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=k("div",null,"CodeMirror-cursors"),u.measure=k("div",null,"CodeMirror-measure"),u.lineMeasure=k("div",null,"CodeMirror-measure"),u.lineSpace=q("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var p=q("div",[u.lineSpace],"CodeMirror-lines");u.mover=k("div",[p],null,"position: relative"),u.sizer=k("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=k("div",null,null,"position: absolute; height: "+Xt+"px; width: 1px;"),u.gutters=k("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=k("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=k("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),w&&_>=105&&(u.wrapper.style.clipPath="inset(0px)"),u.wrapper.setAttribute("translate","no"),d&&g<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!v&&!(s&&$)&&(u.scroller.draggable=!0),n&&(n.appendChild?n.appendChild(u.wrapper):n(u.wrapper)),u.viewFrom=u.viewTo=i.first,u.reportedViewFrom=u.reportedViewTo=i.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=Uu(l.gutters,l.lineNumbers),kp(u),a.init(u)}var _a=0,Ir=null;d?Ir=-.53:s?Ir=15:w?Ir=-.7:M&&(Ir=-1/3);function Cp(n){var i=n.wheelDeltaX,a=n.wheelDeltaY;return i==null&&n.detail&&n.axis==n.HORIZONTAL_AXIS&&(i=n.detail),a==null&&n.detail&&n.axis==n.VERTICAL_AXIS?a=n.detail:a==null&&(a=n.wheelDelta),{x:i,y:a}}function z1(n){var i=Cp(n);return i.x*=Ir,i.y*=Ir,i}function Tp(n,i){w&&_==102&&(n.display.chromeScrollHack==null?n.display.sizer.style.pointerEvents="none":clearTimeout(n.display.chromeScrollHack),n.display.chromeScrollHack=setTimeout(function(){n.display.chromeScrollHack=null,n.display.sizer.style.pointerEvents=""},100));var a=Cp(i),l=a.x,u=a.y,p=Ir;i.deltaMode===0&&(l=i.deltaX,u=i.deltaY,p=1);var m=n.display,b=m.scroller,x=b.scrollWidth>b.clientWidth,S=b.scrollHeight>b.clientHeight;if(l&&x||u&&S){if(u&&F&&v){t:for(var N=i.target,D=m.view;N!=b;N=N.parentNode)for(var j=0;j<D.length;j++)if(D[j].node==N){n.display.currentWheelTarget=N;break t}}if(l&&!s&&!L&&p!=null){u&&S&&Ds(n,Math.max(0,b.scrollTop+u*p)),Zi(n,Math.max(0,b.scrollLeft+l*p)),(!u||u&&S)&&Ze(i),m.wheelStartX=null;return}if(u&&p!=null){var W=u*p,J=n.doc.scrollTop,ct=J+m.wrapper.clientHeight;W<0?J=Math.max(0,J+W-50):ct=Math.min(n.doc.height,ct+W+50),qu(n,{top:J,bottom:ct})}_a<20&&i.deltaMode!==0&&(m.wheelStartX==null?(m.wheelStartX=b.scrollLeft,m.wheelStartY=b.scrollTop,m.wheelDX=l,m.wheelDY=u,setTimeout(function(){if(m.wheelStartX!=null){var gt=b.scrollLeft-m.wheelStartX,wt=b.scrollTop-m.wheelStartY,kt=wt&&m.wheelDY&&wt/m.wheelDY||gt&&m.wheelDX&>/m.wheelDX;m.wheelStartX=m.wheelStartY=null,kt&&(Ir=(Ir*_a+kt)/(_a+1),++_a)}},200)):(m.wheelDX+=l,m.wheelDY+=u))}}var Pn=function(n,i){this.ranges=n,this.primIndex=i};Pn.prototype.primary=function(){return this.ranges[this.primIndex]},Pn.prototype.equals=function(n){if(n==this)return!0;if(n.primIndex!=this.primIndex||n.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var a=this.ranges[i],l=n.ranges[i];if(!ce(a.anchor,l.anchor)||!ce(a.head,l.head))return!1}return!0},Pn.prototype.deepCopy=function(){for(var n=[],i=0;i<this.ranges.length;i++)n[i]=new ue(Fe(this.ranges[i].anchor),Fe(this.ranges[i].head));return new Pn(n,this.primIndex)},Pn.prototype.somethingSelected=function(){for(var n=0;n<this.ranges.length;n++)if(!this.ranges[n].empty())return!0;return!1},Pn.prototype.contains=function(n,i){i||(i=n);for(var a=0;a<this.ranges.length;a++){var l=this.ranges[a];if(St(i,l.from())>=0&&St(n,l.to())<=0)return a}return-1};var ue=function(n,i){this.anchor=n,this.head=i};ue.prototype.from=function(){return No(this.anchor,this.head)},ue.prototype.to=function(){return cn(this.anchor,this.head)},ue.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function rr(n,i,a){var l=n&&n.options.selectionsMayTouch,u=i[a];i.sort(function(j,W){return St(j.from(),W.from())}),a=Et(i,u);for(var p=1;p<i.length;p++){var m=i[p],b=i[p-1],x=St(b.to(),m.from());if(l&&!m.empty()?x>0:x>=0){var S=No(b.from(),m.from()),N=cn(b.to(),m.to()),D=b.empty()?m.from()==m.head:b.from()==b.head;p<=a&&--a,i.splice(--p,2,new ue(D?N:S,D?S:N))}}return new Pn(i,a)}function si(n,i){return new Pn([new ue(n,i||n)],0)}function li(n){return n.text?X(n.from.line+n.text.length-1,at(n.text).length+(n.text.length==1?n.from.ch:0)):n.to}function Ep(n,i){if(St(n,i.from)<0)return n;if(St(n,i.to)<=0)return li(i);var a=n.line+i.text.length-(i.to.line-i.from.line)-1,l=n.ch;return n.line==i.to.line&&(l+=li(i).ch-i.to.ch),X(a,l)}function ju(n,i){for(var a=[],l=0;l<n.sel.ranges.length;l++){var u=n.sel.ranges[l];a.push(new ue(Ep(u.anchor,i),Ep(u.head,i)))}return rr(n.cm,a,n.sel.primIndex)}function Lp(n,i,a){return n.line==i.line?X(a.line,n.ch-i.ch+a.ch):X(a.line+(n.line-i.line),n.ch)}function I1(n,i,a){for(var l=[],u=X(n.first,0),p=u,m=0;m<i.length;m++){var b=i[m],x=Lp(b.from,u,p),S=Lp(li(b),u,p);if(u=b.to,p=S,a=="around"){var N=n.sel.ranges[m],D=St(N.head,N.anchor)<0;l[m]=new ue(D?S:x,D?x:S)}else l[m]=new ue(x,x)}return new Pn(l,n.sel.primIndex)}function Vu(n){n.doc.mode=Lo(n.options,n.doc.modeOption),qs(n)}function qs(n){n.doc.iter(function(i){i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null)}),n.doc.modeFrontier=n.doc.highlightFrontier=n.doc.first,Fs(n,100),n.state.modeGen++,n.curOp&&un(n)}function Ap(n,i){return i.from.ch==0&&i.to.ch==0&&at(i.text)==""&&(!n.cm||n.cm.options.wholeLineUpdateBefore)}function Gu(n,i,a,l){function u(kt){return a?a[kt]:null}function p(kt,xt,Lt){Vw(kt,xt,Lt,l),He(kt,"change",kt,i)}function m(kt,xt){for(var Lt=[],Dt=kt;Dt<xt;++Dt)Lt.push(new $o(S[Dt],u(Dt),l));return Lt}var b=i.from,x=i.to,S=i.text,N=$t(n,b.line),D=$t(n,x.line),j=at(S),W=u(S.length-1),J=x.line-b.line;if(i.full)n.insert(0,m(0,S.length)),n.remove(S.length,n.size-S.length);else if(Ap(n,i)){var ct=m(0,S.length-1);p(D,D.text,W),J&&n.remove(b.line,J),ct.length&&n.insert(b.line,ct)}else if(N==D)if(S.length==1)p(N,N.text.slice(0,b.ch)+j+N.text.slice(x.ch),W);else{var gt=m(1,S.length-1);gt.push(new $o(j+N.text.slice(x.ch),W,l)),p(N,N.text.slice(0,b.ch)+S[0],u(0)),n.insert(b.line+1,gt)}else if(S.length==1)p(N,N.text.slice(0,b.ch)+S[0]+D.text.slice(x.ch),u(0)),n.remove(b.line+1,J);else{p(N,N.text.slice(0,b.ch)+S[0],u(0)),p(D,j+D.text.slice(x.ch),W);var wt=m(1,S.length-1);J>1&&n.remove(b.line+1,J-1),n.insert(b.line+1,wt)}He(n,"change",n,i)}function ai(n,i,a){function l(u,p,m){if(u.linked)for(var b=0;b<u.linked.length;++b){var x=u.linked[b];if(x.doc!=p){var S=m&&x.sharedHist;a&&!S||(i(x.doc,S),l(x.doc,u,S))}}}l(n,null,!0)}function Mp(n,i){if(i.cm)throw new Error("This document is already in use.");n.doc=i,i.cm=n,Pu(n),Vu(n),Np(n),n.options.direction=i.direction,n.options.lineWrapping||_u(n),n.options.mode=i.modeOption,un(n)}function Np(n){(n.doc.direction=="rtl"?Mt:lt)(n.display.lineDiv,"CodeMirror-rtl")}function F1(n){Sn(n,function(){Np(n),un(n)})}function Sa(n){this.done=[],this.undone=[],this.undoDepth=n?n.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=n?n.maxGeneration:1}function Ku(n,i){var a={from:Fe(i.from),to:li(i),text:Or(n,i.from,i.to)};return Op(n,a,i.from.line,i.to.line+1),ai(n,function(l){return Op(l,a,i.from.line,i.to.line+1)},!0),a}function $p(n){for(;n.length;){var i=at(n);if(i.ranges)n.pop();else break}}function H1(n,i){if(i)return $p(n.done),at(n.done);if(n.done.length&&!at(n.done).ranges)return at(n.done);if(n.done.length>1&&!n.done[n.done.length-2].ranges)return n.done.pop(),at(n.done)}function Pp(n,i,a,l){var u=n.history;u.undone.length=0;var p=+new Date,m,b;if((u.lastOp==l||u.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&u.lastModTime>p-(n.cm?n.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(m=H1(u,u.lastOp==l)))b=at(m.changes),St(i.from,i.to)==0&&St(i.from,b.to)==0?b.to=li(i):m.changes.push(Ku(n,i));else{var x=at(u.done);for((!x||!x.ranges)&&ka(n.sel,u.done),m={changes:[Ku(n,i)],generation:u.generation},u.done.push(m);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(a),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=p,u.lastOp=u.lastSelOp=l,u.lastOrigin=u.lastSelOrigin=i.origin,b||ke(n,"historyAdded")}function q1(n,i,a,l){var u=i.charAt(0);return u=="*"||u=="+"&&a.ranges.length==l.ranges.length&&a.somethingSelected()==l.somethingSelected()&&new Date-n.history.lastSelTime<=(n.cm?n.cm.options.historyEventDelay:500)}function B1(n,i,a,l){var u=n.history,p=l&&l.origin;a==u.lastSelOp||p&&u.lastSelOrigin==p&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==p||q1(n,p,at(u.done),i))?u.done[u.done.length-1]=i:ka(i,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=p,u.lastSelOp=a,l&&l.clearRedo!==!1&&$p(u.undone)}function ka(n,i){var a=at(i);a&&a.ranges&&a.equals(n)||i.push(n)}function Op(n,i,a,l){var u=i["spans_"+n.id],p=0;n.iter(Math.max(n.first,a),Math.min(n.first+n.size,l),function(m){m.markedSpans&&((u||(u=i["spans_"+n.id]={}))[p]=m.markedSpans),++p})}function W1(n){if(!n)return null;for(var i,a=0;a<n.length;++a)n[a].marker.explicitlyCleared?i||(i=n.slice(0,a)):i&&i.push(n[a]);return i?i.length?i:null:n}function U1(n,i){var a=i["spans_"+n.id];if(!a)return null;for(var l=[],u=0;u<i.text.length;++u)l.push(W1(a[u]));return l}function Rp(n,i){var a=U1(n,i),l=yu(n,i);if(!a)return l;if(!l)return a;for(var u=0;u<a.length;++u){var p=a[u],m=l[u];if(p&&m)t:for(var b=0;b<m.length;++b){for(var x=m[b],S=0;S<p.length;++S)if(p[S].marker==x.marker)continue t;p.push(x)}else m&&(a[u]=m)}return a}function Ho(n,i,a){for(var l=[],u=0;u<n.length;++u){var p=n[u];if(p.ranges){l.push(a?Pn.prototype.deepCopy.call(p):p);continue}var m=p.changes,b=[];l.push({changes:b});for(var x=0;x<m.length;++x){var S=m[x],N=void 0;if(b.push({from:S.from,to:S.to,text:S.text}),i)for(var D in S)(N=D.match(/^spans_(\d+)$/))&&Et(i,Number(N[1]))>-1&&(at(b)[D]=S[D],delete S[D])}}return l}function Xu(n,i,a,l){if(l){var u=n.anchor;if(a){var p=St(i,u)<0;p!=St(a,u)<0?(u=i,i=a):p!=St(i,a)<0&&(i=a)}return new ue(u,i)}else return new ue(a||i,i)}function Ca(n,i,a,l,u){u==null&&(u=n.cm&&(n.cm.display.shift||n.extend)),Je(n,new Pn([Xu(n.sel.primary(),i,a,u)],0),l)}function Dp(n,i,a){for(var l=[],u=n.cm&&(n.cm.display.shift||n.extend),p=0;p<n.sel.ranges.length;p++)l[p]=Xu(n.sel.ranges[p],i[p],null,u);var m=rr(n.cm,l,n.sel.primIndex);Je(n,m,a)}function Yu(n,i,a,l){var u=n.sel.ranges.slice(0);u[i]=a,Je(n,rr(n.cm,u,n.sel.primIndex),l)}function zp(n,i,a,l){Je(n,si(i,a),l)}function j1(n,i,a){var l={ranges:i.ranges,update:function(u){this.ranges=[];for(var p=0;p<u.length;p++)this.ranges[p]=new ue(Ut(n,u[p].anchor),Ut(n,u[p].head))},origin:a&&a.origin};return ke(n,"beforeSelectionChange",n,l),n.cm&&ke(n.cm,"beforeSelectionChange",n.cm,l),l.ranges!=i.ranges?rr(n.cm,l.ranges,l.ranges.length-1):i}function Ip(n,i,a){var l=n.history.done,u=at(l);u&&u.ranges?(l[l.length-1]=i,Ta(n,i,a)):Je(n,i,a)}function Je(n,i,a){Ta(n,i,a),B1(n,n.sel,n.cm?n.cm.curOp.id:NaN,a)}function Ta(n,i,a){(_n(n,"beforeSelectionChange")||n.cm&&_n(n.cm,"beforeSelectionChange"))&&(i=j1(n,i,a));var l=a&&a.bias||(St(i.primary().head,n.sel.primary().head)<0?-1:1);Fp(n,qp(n,i,l,!0)),!(a&&a.scroll===!1)&&n.cm&&n.cm.getOption("readOnly")!="nocursor"&&Io(n.cm)}function Fp(n,i){i.equals(n.sel)||(n.sel=i,n.cm&&(n.cm.curOp.updateInput=1,n.cm.curOp.selectionChanged=!0,Fn(n.cm)),He(n,"cursorActivity",n))}function Hp(n){Fp(n,qp(n,n.sel,null,!1))}function qp(n,i,a,l){for(var u,p=0;p<i.ranges.length;p++){var m=i.ranges[p],b=i.ranges.length==n.sel.ranges.length&&n.sel.ranges[p],x=Ea(n,m.anchor,b&&b.anchor,a,l),S=m.head==m.anchor?x:Ea(n,m.head,b&&b.head,a,l);(u||x!=m.anchor||S!=m.head)&&(u||(u=i.ranges.slice(0,p)),u[p]=new ue(x,S))}return u?rr(n.cm,u,i.primIndex):i}function qo(n,i,a,l,u){var p=$t(n,i.line);if(p.markedSpans)for(var m=0;m<p.markedSpans.length;++m){var b=p.markedSpans[m],x=b.marker,S="selectLeft"in x?!x.selectLeft:x.inclusiveLeft,N="selectRight"in x?!x.selectRight:x.inclusiveRight;if((b.from==null||(S?b.from<=i.ch:b.from<i.ch))&&(b.to==null||(N?b.to>=i.ch:b.to>i.ch))){if(u&&(ke(x,"beforeCursorEnter"),x.explicitlyCleared))if(p.markedSpans){--m;continue}else break;if(!x.atomic)continue;if(a){var D=x.find(l<0?1:-1),j=void 0;if((l<0?N:S)&&(D=Bp(n,D,-l,D&&D.line==i.line?p:null)),D&&D.line==i.line&&(j=St(D,a))&&(l<0?j<0:j>0))return qo(n,D,i,l,u)}var W=x.find(l<0?-1:1);return(l<0?S:N)&&(W=Bp(n,W,l,W.line==i.line?p:null)),W?qo(n,W,i,l,u):null}}return i}function Ea(n,i,a,l,u){var p=l||1,m=qo(n,i,a,p,u)||!u&&qo(n,i,a,p,!0)||qo(n,i,a,-p,u)||!u&&qo(n,i,a,-p,!0);return m||(n.cantEdit=!0,X(n.first,0))}function Bp(n,i,a,l){return a<0&&i.ch==0?i.line>n.first?Ut(n,X(i.line-1)):null:a>0&&i.ch==(l||$t(n,i.line)).text.length?i.line<n.first+n.size-1?X(i.line+1,0):null:new X(i.line,i.ch+a)}function Wp(n){n.setSelection(X(n.firstLine(),0),X(n.lastLine()),z)}function Up(n,i,a){var l={canceled:!1,from:i.from,to:i.to,text:i.text,origin:i.origin,cancel:function(){return l.canceled=!0}};return a&&(l.update=function(u,p,m,b){u&&(l.from=Ut(n,u)),p&&(l.to=Ut(n,p)),m&&(l.text=m),b!==void 0&&(l.origin=b)}),ke(n,"beforeChange",n,l),n.cm&&ke(n.cm,"beforeChange",n.cm,l),l.canceled?(n.cm&&(n.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function Bo(n,i,a){if(n.cm){if(!n.cm.curOp)return qe(n.cm,Bo)(n,i,a);if(n.cm.state.suppressEdits)return}if(!((_n(n,"beforeChange")||n.cm&&_n(n.cm,"beforeChange"))&&(i=Up(n,i,!0),!i))){var l=Rd&&!a&&Bw(n,i.from,i.to);if(l)for(var u=l.length-1;u>=0;--u)jp(n,{from:l[u].from,to:l[u].to,text:u?[""]:i.text,origin:i.origin});else jp(n,i)}}function jp(n,i){if(!(i.text.length==1&&i.text[0]==""&&St(i.from,i.to)==0)){var a=ju(n,i);Pp(n,i,a,n.cm?n.cm.curOp.id:NaN),Bs(n,i,a,yu(n,i));var l=[];ai(n,function(u,p){!p&&Et(l,u.history)==-1&&(Xp(u.history,i),l.push(u.history)),Bs(u,i,null,yu(u,i))})}}function La(n,i,a){var l=n.cm&&n.cm.state.suppressEdits;if(!(l&&!a)){for(var u=n.history,p,m=n.sel,b=i=="undo"?u.done:u.undone,x=i=="undo"?u.undone:u.done,S=0;S<b.length&&(p=b[S],!(a?p.ranges&&!p.equals(n.sel):!p.ranges));S++);if(S!=b.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(p=b.pop(),p.ranges){if(ka(p,x),a&&!p.equals(n.sel)){Je(n,p,{clearRedo:!1});return}m=p}else if(l){b.push(p);return}else break;var N=[];ka(m,x),x.push({changes:N,generation:u.generation}),u.generation=p.generation||++u.maxGeneration;for(var D=_n(n,"beforeChange")||n.cm&&_n(n.cm,"beforeChange"),j=function(ct){var gt=p.changes[ct];if(gt.origin=i,D&&!Up(n,gt,!1))return b.length=0,{};N.push(Ku(n,gt));var wt=ct?ju(n,gt):at(b);Bs(n,gt,wt,Rp(n,gt)),!ct&&n.cm&&n.cm.scrollIntoView({from:gt.from,to:li(gt)});var kt=[];ai(n,function(xt,Lt){!Lt&&Et(kt,xt.history)==-1&&(Xp(xt.history,gt),kt.push(xt.history)),Bs(xt,gt,null,Rp(xt,gt))})},W=p.changes.length-1;W>=0;--W){var J=j(W);if(J)return J.v}}}}function Vp(n,i){if(i!=0&&(n.first+=i,n.sel=new Pn(bt(n.sel.ranges,function(u){return new ue(X(u.anchor.line+i,u.anchor.ch),X(u.head.line+i,u.head.ch))}),n.sel.primIndex),n.cm)){un(n.cm,n.first,n.first-i,i);for(var a=n.cm.display,l=a.viewFrom;l<a.viewTo;l++)ii(n.cm,l,"gutter")}}function Bs(n,i,a,l){if(n.cm&&!n.cm.curOp)return qe(n.cm,Bs)(n,i,a,l);if(i.to.line<n.first){Vp(n,i.text.length-1-(i.to.line-i.from.line));return}if(!(i.from.line>n.lastLine())){if(i.from.line<n.first){var u=i.text.length-1-(n.first-i.from.line);Vp(n,u),i={from:X(n.first,0),to:X(i.to.line+u,i.to.ch),text:[at(i.text)],origin:i.origin}}var p=n.lastLine();i.to.line>p&&(i={from:i.from,to:X(p,$t(n,p).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Or(n,i.from,i.to),a||(a=ju(n,i)),n.cm?V1(n.cm,i,l):Gu(n,i,l),Ta(n,a,z),n.cantEdit&&Ea(n,X(n.firstLine(),0))&&(n.cantEdit=!1)}}function V1(n,i,a){var l=n.doc,u=n.display,p=i.from,m=i.to,b=!1,x=p.line;n.options.lineWrapping||(x=C(er($t(l,p.line))),l.iter(x,m.line+1,function(W){if(W==u.maxLine)return b=!0,!0})),l.sel.contains(i.from,i.to)>-1&&Fn(n),Gu(l,i,a,fp(n)),n.options.lineWrapping||(l.iter(x,p.line+i.text.length,function(W){var J=fa(W);J>u.maxLineLength&&(u.maxLine=W,u.maxLineLength=J,u.maxLineChanged=!0,b=!1)}),b&&(n.curOp.updateMaxLine=!0)),Rw(l,p.line),Fs(n,400);var S=i.text.length-(m.line-p.line)-1;i.full?un(n):p.line==m.line&&i.text.length==1&&!Ap(n.doc,i)?ii(n,p.line,"text"):un(n,p.line,m.line+1,S);var N=_n(n,"changes"),D=_n(n,"change");if(D||N){var j={from:p,to:m,text:i.text,removed:i.removed,origin:i.origin};D&&He(n,"change",n,j),N&&(n.curOp.changeObjs||(n.curOp.changeObjs=[])).push(j)}n.display.selForContextMenu=null}function Wo(n,i,a,l,u){var p;l||(l=a),St(l,a)<0&&(p=[l,a],a=p[0],l=p[1]),typeof i=="string"&&(i=n.splitLines(i)),Bo(n,{from:a,to:l,text:i,origin:u})}function Gp(n,i,a,l){a<n.line?n.line+=l:i<n.line&&(n.line=i,n.ch=0)}function Kp(n,i,a,l){for(var u=0;u<n.length;++u){var p=n[u],m=!0;if(p.ranges){p.copied||(p=n[u]=p.deepCopy(),p.copied=!0);for(var b=0;b<p.ranges.length;b++)Gp(p.ranges[b].anchor,i,a,l),Gp(p.ranges[b].head,i,a,l);continue}for(var x=0;x<p.changes.length;++x){var S=p.changes[x];if(a<S.from.line)S.from=X(S.from.line+l,S.from.ch),S.to=X(S.to.line+l,S.to.ch);else if(i<=S.to.line){m=!1;break}}m||(n.splice(0,u+1),u=0)}}function Xp(n,i){var a=i.from.line,l=i.to.line,u=i.text.length-(l-a)-1;Kp(n.done,a,l,u),Kp(n.undone,a,l,u)}function Ws(n,i,a,l){var u=i,p=i;return typeof i=="number"?p=$t(n,Td(n,i)):u=C(i),u==null?null:(l(p,u)&&n.cm&&ii(n.cm,u,a),p)}function Us(n){this.lines=n,this.parent=null;for(var i=0,a=0;a<n.length;++a)n[a].parent=this,i+=n[a].height;this.height=i}Us.prototype={chunkSize:function(){return this.lines.length},removeInner:function(n,i){for(var a=n,l=n+i;a<l;++a){var u=this.lines[a];this.height-=u.height,Gw(u),He(u,"delete")}this.lines.splice(n,i)},collapse:function(n){n.push.apply(n,this.lines)},insertInner:function(n,i,a){this.height+=a,this.lines=this.lines.slice(0,n).concat(i).concat(this.lines.slice(n));for(var l=0;l<i.length;++l)i[l].parent=this},iterN:function(n,i,a){for(var l=n+i;n<l;++n)if(a(this.lines[n]))return!0}};function js(n){this.children=n;for(var i=0,a=0,l=0;l<n.length;++l){var u=n[l];i+=u.chunkSize(),a+=u.height,u.parent=this}this.size=i,this.height=a,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(n,i){this.size-=i;for(var a=0;a<this.children.length;++a){var l=this.children[a],u=l.chunkSize();if(n<u){var p=Math.min(i,u-n),m=l.height;if(l.removeInner(n,p),this.height-=m-l.height,u==p&&(this.children.splice(a--,1),l.parent=null),(i-=p)==0)break;n=0}else n-=u}if(this.size-i<25&&(this.children.length>1||!(this.children[0]instanceof Us))){var b=[];this.collapse(b),this.children=[new Us(b)],this.children[0].parent=this}},collapse:function(n){for(var i=0;i<this.children.length;++i)this.children[i].collapse(n)},insertInner:function(n,i,a){this.size+=i.length,this.height+=a;for(var l=0;l<this.children.length;++l){var u=this.children[l],p=u.chunkSize();if(n<=p){if(u.insertInner(n,i,a),u.lines&&u.lines.length>50){for(var m=u.lines.length%25+25,b=m;b<u.lines.length;){var x=new Us(u.lines.slice(b,b+=25));u.height-=x.height,this.children.splice(++l,0,x),x.parent=this}u.lines=u.lines.slice(0,m),this.maybeSpill()}break}n-=p}},maybeSpill:function(){if(!(this.children.length<=10)){var n=this;do{var i=n.children.splice(n.children.length-5,5),a=new js(i);if(n.parent){n.size-=a.size,n.height-=a.height;var u=Et(n.parent.children,n);n.parent.children.splice(u+1,0,a)}else{var l=new js(n.children);l.parent=n,n.children=[l,a],n=l}a.parent=n.parent}while(n.children.length>10);n.parent.maybeSpill()}},iterN:function(n,i,a){for(var l=0;l<this.children.length;++l){var u=this.children[l],p=u.chunkSize();if(n<p){var m=Math.min(i,p-n);if(u.iterN(n,m,a))return!0;if((i-=m)==0)break;n=0}else n-=p}}};var Vs=function(n,i,a){if(a)for(var l in a)a.hasOwnProperty(l)&&(this[l]=a[l]);this.doc=n,this.node=i};Vs.prototype.clear=function(){var n=this.doc.cm,i=this.line.widgets,a=this.line,l=C(a);if(!(l==null||!i)){for(var u=0;u<i.length;++u)i[u]==this&&i.splice(u--,1);i.length||(a.widgets=null);var p=$s(this);$n(a,Math.max(0,a.height-p)),n&&(Sn(n,function(){Yp(n,a,-p),ii(n,l,"widget")}),He(n,"lineWidgetCleared",n,this,l))}},Vs.prototype.changed=function(){var n=this,i=this.height,a=this.doc.cm,l=this.line;this.height=null;var u=$s(this)-i;u&&(ri(this.doc,l)||$n(l,l.height+u),a&&Sn(a,function(){a.curOp.forceUpdate=!0,Yp(a,l,u),He(a,"lineWidgetChanged",a,n,C(l))}))},Yn(Vs);function Yp(n,i,a){Dr(i)<(n.curOp&&n.curOp.scrollTop||n.doc.scrollTop)&&Fu(n,a)}function G1(n,i,a,l){var u=new Vs(n,a,l),p=n.cm;return p&&u.noHScroll&&(p.display.alignWidgets=!0),Ws(n,i,"widget",function(m){var b=m.widgets||(m.widgets=[]);if(u.insertAt==null?b.push(u):b.splice(Math.min(b.length,Math.max(0,u.insertAt)),0,u),u.line=m,p&&!ri(n,m)){var x=Dr(m)<n.scrollTop;$n(m,m.height+$s(u)),x&&Fu(p,u.height),p.curOp.forceUpdate=!0}return!0}),p&&He(p,"lineWidgetAdded",p,u,typeof i=="number"?i:C(i)),u}var Zp=0,ci=function(n,i){this.lines=[],this.type=i,this.doc=n,this.id=++Zp};ci.prototype.clear=function(){if(!this.explicitlyCleared){var n=this.doc.cm,i=n&&!n.curOp;if(i&&Qi(n),_n(this,"clear")){var a=this.find();a&&He(this,"clear",a.from,a.to)}for(var l=null,u=null,p=0;p<this.lines.length;++p){var m=this.lines[p],b=As(m.markedSpans,this);n&&!this.collapsed?ii(n,C(m),"text"):n&&(b.to!=null&&(u=C(m)),b.from!=null&&(l=C(m))),m.markedSpans=Iw(m.markedSpans,b),b.from==null&&this.collapsed&&!ri(this.doc,m)&&n&&$n(m,Ro(n.display))}if(n&&this.collapsed&&!n.options.lineWrapping)for(var x=0;x<this.lines.length;++x){var S=er(this.lines[x]),N=fa(S);N>n.display.maxLineLength&&(n.display.maxLine=S,n.display.maxLineLength=N,n.display.maxLineChanged=!0)}l!=null&&n&&this.collapsed&&un(n,l,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,n&&Hp(n.doc)),n&&He(n,"markerCleared",n,this,l,u),i&&to(n),this.parent&&this.parent.clear()}},ci.prototype.find=function(n,i){n==null&&this.type=="bookmark"&&(n=1);for(var a,l,u=0;u<this.lines.length;++u){var p=this.lines[u],m=As(p.markedSpans,this);if(m.from!=null&&(a=X(i?p:C(p),m.from),n==-1))return a;if(m.to!=null&&(l=X(i?p:C(p),m.to),n==1))return l}return a&&{from:a,to:l}},ci.prototype.changed=function(){var n=this,i=this.find(-1,!0),a=this,l=this.doc.cm;!i||!l||Sn(l,function(){var u=i.line,p=C(i.line),m=Tu(l,p);if(m&&(rp(m),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!ri(a.doc,u)&&a.height!=null){var b=a.height;a.height=null;var x=$s(a)-b;x&&$n(u,u.height+x)}He(l,"markerChanged",l,n)})},ci.prototype.attachLine=function(n){if(!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(!i.maybeHiddenMarkers||Et(i.maybeHiddenMarkers,this)==-1)&&(i.maybeUnhiddenMarkers||(i.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(n)},ci.prototype.detachLine=function(n){if(this.lines.splice(Et(this.lines,n),1),!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(i.maybeHiddenMarkers||(i.maybeHiddenMarkers=[])).push(this)}},Yn(ci);function Uo(n,i,a,l,u){if(l&&l.shared)return K1(n,i,a,l,u);if(n.cm&&!n.cm.curOp)return qe(n.cm,Uo)(n,i,a,l,u);var p=new ci(n,u),m=St(i,a);if(l&&it(l,p,!1),m>0||m==0&&p.clearWhenEmpty!==!1)return p;if(p.replacedWith&&(p.collapsed=!0,p.widgetNode=q("span",[p.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||p.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(p.widgetNode.insertLeft=!0)),p.collapsed){if(qd(n,i.line,i,a,p)||i.line!=a.line&&qd(n,a.line,i,a,p))throw new Error("Inserting collapsed marker partially overlapping an existing one");zw()}p.addToHistory&&Pp(n,{from:i,to:a,origin:"markText"},n.sel,NaN);var b=i.line,x=n.cm,S;if(n.iter(b,a.line+1,function(D){x&&p.collapsed&&!x.options.lineWrapping&&er(D)==x.display.maxLine&&(S=!0),p.collapsed&&b!=i.line&&$n(D,0),Fw(D,new la(p,b==i.line?i.ch:null,b==a.line?a.ch:null),n.cm&&n.cm.curOp),++b}),p.collapsed&&n.iter(i.line,a.line+1,function(D){ri(n,D)&&$n(D,0)}),p.clearOnEnter&&Rt(p,"beforeCursorEnter",function(){return p.clear()}),p.readOnly&&(Dw(),(n.history.done.length||n.history.undone.length)&&n.clearHistory()),p.collapsed&&(p.id=++Zp,p.atomic=!0),x){if(S&&(x.curOp.updateMaxLine=!0),p.collapsed)un(x,i.line,a.line+1);else if(p.className||p.startStyle||p.endStyle||p.css||p.attributes||p.title)for(var N=i.line;N<=a.line;N++)ii(x,N,"text");p.atomic&&Hp(x.doc),He(x,"markerAdded",x,p)}return p}var Gs=function(n,i){this.markers=n,this.primary=i;for(var a=0;a<n.length;++a)n[a].parent=this};Gs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var n=0;n<this.markers.length;++n)this.markers[n].clear();He(this,"clear")}},Gs.prototype.find=function(n,i){return this.primary.find(n,i)},Yn(Gs);function K1(n,i,a,l,u){l=it(l),l.shared=!1;var p=[Uo(n,i,a,l,u)],m=p[0],b=l.widgetNode;return ai(n,function(x){b&&(l.widgetNode=b.cloneNode(!0)),p.push(Uo(x,Ut(x,i),Ut(x,a),l,u));for(var S=0;S<x.linked.length;++S)if(x.linked[S].isParent)return;m=at(p)}),new Gs(p,m)}function Jp(n){return n.findMarks(X(n.first,0),n.clipPos(X(n.lastLine())),function(i){return i.parent})}function X1(n,i){for(var a=0;a<i.length;a++){var l=i[a],u=l.find(),p=n.clipPos(u.from),m=n.clipPos(u.to);if(St(p,m)){var b=Uo(n,p,m,l.primary,l.primary.type);l.markers.push(b),b.parent=l}}}function Y1(n){for(var i=function(l){var u=n[l],p=[u.primary.doc];ai(u.primary.doc,function(x){return p.push(x)});for(var m=0;m<u.markers.length;m++){var b=u.markers[m];Et(p,b.doc)==-1&&(b.parent=null,u.markers.splice(m--,1))}},a=0;a<n.length;a++)i(a)}var Z1=0,fn=function(n,i,a,l,u){if(!(this instanceof fn))return new fn(n,i,a,l,u);a==null&&(a=0),js.call(this,[new Us([new $o("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var p=X(a,0);this.sel=si(p),this.history=new Sa(null),this.id=++Z1,this.modeOption=i,this.lineSep=l,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof n=="string"&&(n=this.splitLines(n)),Gu(this,{from:p,to:p,text:n}),Je(this,si(p),z)};fn.prototype=zt(js.prototype,{constructor:fn,iter:function(n,i,a){a?this.iterN(n-this.first,i-n,a):this.iterN(this.first,this.first+this.size,n)},insert:function(n,i){for(var a=0,l=0;l<i.length;++l)a+=i[l].height;this.insertInner(n-this.first,i,a)},remove:function(n,i){this.removeInner(n-this.first,i)},getValue:function(n){var i=Es(this,this.first,this.first+this.size);return n===!1?i:i.join(n||this.lineSeparator())},setValue:Be(function(n){var i=X(this.first,0),a=this.first+this.size-1;Bo(this,{from:i,to:X(a,$t(this,a).text.length),text:this.splitLines(n),origin:"setValue",full:!0},!0),this.cm&&Rs(this.cm,0,0),Je(this,si(i),z)}),replaceRange:function(n,i,a,l){i=Ut(this,i),a=a?Ut(this,a):i,Wo(this,n,i,a,l)},getRange:function(n,i,a){var l=Or(this,Ut(this,n),Ut(this,i));return a===!1?l:a===""?l.join(""):l.join(a||this.lineSeparator())},getLine:function(n){var i=this.getLineHandle(n);return i&&i.text},getLineHandle:function(n){if(nt(this,n))return $t(this,n)},getLineNumber:function(n){return C(n)},getLineHandleVisualStart:function(n){return typeof n=="number"&&(n=$t(this,n)),er(n)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(n){return Ut(this,n)},getCursor:function(n){var i=this.sel.primary(),a;return n==null||n=="head"?a=i.head:n=="anchor"?a=i.anchor:n=="end"||n=="to"||n===!1?a=i.to():a=i.from(),a},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Be(function(n,i,a){zp(this,Ut(this,typeof n=="number"?X(n,i||0):n),null,a)}),setSelection:Be(function(n,i,a){zp(this,Ut(this,n),Ut(this,i||n),a)}),extendSelection:Be(function(n,i,a){Ca(this,Ut(this,n),i&&Ut(this,i),a)}),extendSelections:Be(function(n,i){Dp(this,Ed(this,n),i)}),extendSelectionsBy:Be(function(n,i){var a=bt(this.sel.ranges,n);Dp(this,Ed(this,a),i)}),setSelections:Be(function(n,i,a){if(n.length){for(var l=[],u=0;u<n.length;u++)l[u]=new ue(Ut(this,n[u].anchor),Ut(this,n[u].head||n[u].anchor));i==null&&(i=Math.min(n.length-1,this.sel.primIndex)),Je(this,rr(this.cm,l,i),a)}}),addSelection:Be(function(n,i,a){var l=this.sel.ranges.slice(0);l.push(new ue(Ut(this,n),Ut(this,i||n))),Je(this,rr(this.cm,l,l.length-1),a)}),getSelection:function(n){for(var i=this.sel.ranges,a,l=0;l<i.length;l++){var u=Or(this,i[l].from(),i[l].to());a=a?a.concat(u):u}return n===!1?a:a.join(n||this.lineSeparator())},getSelections:function(n){for(var i=[],a=this.sel.ranges,l=0;l<a.length;l++){var u=Or(this,a[l].from(),a[l].to());n!==!1&&(u=u.join(n||this.lineSeparator())),i[l]=u}return i},replaceSelection:function(n,i,a){for(var l=[],u=0;u<this.sel.ranges.length;u++)l[u]=n;this.replaceSelections(l,i,a||"+input")},replaceSelections:Be(function(n,i,a){for(var l=[],u=this.sel,p=0;p<u.ranges.length;p++){var m=u.ranges[p];l[p]={from:m.from(),to:m.to(),text:this.splitLines(n[p]),origin:a}}for(var b=i&&i!="end"&&I1(this,l,i),x=l.length-1;x>=0;x--)Bo(this,l[x]);b?Ip(this,b):this.cm&&Io(this.cm)}),undo:Be(function(){La(this,"undo")}),redo:Be(function(){La(this,"redo")}),undoSelection:Be(function(){La(this,"undo",!0)}),redoSelection:Be(function(){La(this,"redo",!0)}),setExtending:function(n){this.extend=n},getExtending:function(){return this.extend},historySize:function(){for(var n=this.history,i=0,a=0,l=0;l<n.done.length;l++)n.done[l].ranges||++i;for(var u=0;u<n.undone.length;u++)n.undone[u].ranges||++a;return{undo:i,redo:a}},clearHistory:function(){var n=this;this.history=new Sa(this.history),ai(this,function(i){return i.history=n.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(n){return n&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(n){return this.history.generation==(n||this.cleanGeneration)},getHistory:function(){return{done:Ho(this.history.done),undone:Ho(this.history.undone)}},setHistory:function(n){var i=this.history=new Sa(this.history);i.done=Ho(n.done.slice(0),null,!0),i.undone=Ho(n.undone.slice(0),null,!0)},setGutterMarker:Be(function(n,i,a){return Ws(this,n,"gutter",function(l){var u=l.gutterMarkers||(l.gutterMarkers={});return u[i]=a,!a&&le(u)&&(l.gutterMarkers=null),!0})}),clearGutter:Be(function(n){var i=this;this.iter(function(a){a.gutterMarkers&&a.gutterMarkers[n]&&Ws(i,a,"gutter",function(){return a.gutterMarkers[n]=null,le(a.gutterMarkers)&&(a.gutterMarkers=null),!0})})}),lineInfo:function(n){var i;if(typeof n=="number"){if(!nt(this,n)||(i=n,n=$t(this,n),!n))return null}else if(i=C(n),i==null)return null;return{line:i,handle:n,text:n.text,gutterMarkers:n.gutterMarkers,textClass:n.textClass,bgClass:n.bgClass,wrapClass:n.wrapClass,widgets:n.widgets}},addLineClass:Be(function(n,i,a){return Ws(this,n,i=="gutter"?"gutter":"class",function(l){var u=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass";if(!l[u])l[u]=a;else{if(ut(a).test(l[u]))return!1;l[u]+=" "+a}return!0})}),removeLineClass:Be(function(n,i,a){return Ws(this,n,i=="gutter"?"gutter":"class",function(l){var u=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass",p=l[u];if(p)if(a==null)l[u]=null;else{var m=p.match(ut(a));if(!m)return!1;var b=m.index+m[0].length;l[u]=p.slice(0,m.index)+(!m.index||b==p.length?"":" ")+p.slice(b)||null}else return!1;return!0})}),addLineWidget:Be(function(n,i,a){return G1(this,n,i,a)}),removeLineWidget:function(n){n.clear()},markText:function(n,i,a){return Uo(this,Ut(this,n),Ut(this,i),a,a&&a.type||"range")},setBookmark:function(n,i){var a={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:!1,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};return n=Ut(this,n),Uo(this,n,n,a,"bookmark")},findMarksAt:function(n){n=Ut(this,n);var i=[],a=$t(this,n.line).markedSpans;if(a)for(var l=0;l<a.length;++l){var u=a[l];(u.from==null||u.from<=n.ch)&&(u.to==null||u.to>=n.ch)&&i.push(u.marker.parent||u.marker)}return i},findMarks:function(n,i,a){n=Ut(this,n),i=Ut(this,i);var l=[],u=n.line;return this.iter(n.line,i.line+1,function(p){var m=p.markedSpans;if(m)for(var b=0;b<m.length;b++){var x=m[b];!(x.to!=null&&u==n.line&&n.ch>=x.to||x.from==null&&u!=n.line||x.from!=null&&u==i.line&&x.from>=i.ch)&&(!a||a(x.marker))&&l.push(x.marker.parent||x.marker)}++u}),l},getAllMarks:function(){var n=[];return this.iter(function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;++l)a[l].from!=null&&n.push(a[l].marker)}),n},posFromIndex:function(n){var i,a=this.first,l=this.lineSeparator().length;return this.iter(function(u){var p=u.text.length+l;if(p>n)return i=n,!0;n-=p,++a}),Ut(this,X(a,i))},indexFromPos:function(n){n=Ut(this,n);var i=n.ch;if(n.line<this.first||n.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,n.line,function(l){i+=l.text.length+a}),i},copy:function(n){var i=new fn(Es(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return i.scrollTop=this.scrollTop,i.scrollLeft=this.scrollLeft,i.sel=this.sel,i.extend=!1,n&&(i.history.undoDepth=this.history.undoDepth,i.setHistory(this.getHistory())),i},linkedDoc:function(n){n||(n={});var i=this.first,a=this.first+this.size;n.from!=null&&n.from>i&&(i=n.from),n.to!=null&&n.to<a&&(a=n.to);var l=new fn(Es(this,i,a),n.mode||this.modeOption,i,this.lineSep,this.direction);return n.sharedHist&&(l.history=this.history),(this.linked||(this.linked=[])).push({doc:l,sharedHist:n.sharedHist}),l.linked=[{doc:this,isParent:!0,sharedHist:n.sharedHist}],X1(l,Jp(this)),l},unlinkDoc:function(n){if(n instanceof we&&(n=n.doc),this.linked)for(var i=0;i<this.linked.length;++i){var a=this.linked[i];if(a.doc==n){this.linked.splice(i,1),n.unlinkDoc(this),Y1(Jp(this));break}}if(n.history==this.history){var l=[n.id];ai(n,function(u){return l.push(u.id)},!0),n.history=new Sa(null),n.history.done=Ho(this.history.done,l),n.history.undone=Ho(this.history.undone,l)}},iterLinkedDocs:function(n){ai(this,n)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(n){return this.lineSep?n.split(this.lineSep):Hn(n)},lineSeparator:function(){return this.lineSep||`
|
|
35
|
-
`},setDirection:Be(function(n){n!="rtl"&&(n="ltr"),n!=this.direction&&(this.direction=n,this.iter(function(i){return i.order=null}),this.cm&&F1(this.cm))})}),fn.prototype.eachLine=fn.prototype.iter;var Qp=0;function J1(n){var i=this;if(tg(i),!(Ce(i,n)||zr(i.display,n))){Ze(n),d&&(Qp=+new Date);var a=Xi(i,n,!0),l=n.dataTransfer.files;if(!(!a||i.isReadOnly()))if(l&&l.length&&window.FileReader&&window.File)for(var u=l.length,p=Array(u),m=0,b=function(){++m==u&&qe(i,function(){a=Ut(i.doc,a);var W={from:a,to:a,text:i.doc.splitLines(p.filter(function(J){return J!=null}).join(i.doc.lineSeparator())),origin:"paste"};Bo(i.doc,W),Ip(i.doc,si(Ut(i.doc,a),Ut(i.doc,li(W))))})()},x=function(W,J){if(i.options.allowDropFileTypes&&Et(i.options.allowDropFileTypes,W.type)==-1){b();return}var ct=new FileReader;ct.onerror=function(){return b()},ct.onload=function(){var gt=ct.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(gt)){b();return}p[J]=gt,b()},ct.readAsText(W)},S=0;S<l.length;S++)x(l[S],S);else{if(i.state.draggingText&&i.doc.sel.contains(a)>-1){i.state.draggingText(n),setTimeout(function(){return i.display.input.focus()},20);return}try{var N=n.dataTransfer.getData("Text");if(N){var D;if(i.state.draggingText&&!i.state.draggingText.copy&&(D=i.listSelections()),Ta(i.doc,si(a,a)),D)for(var j=0;j<D.length;++j)Wo(i.doc,"",D[j].anchor,D[j].head,"drag");i.replaceSelection(N,"around","paste"),i.display.input.focus()}}catch{}}}}function Q1(n,i){if(d&&(!n.state.draggingText||+new Date-Qp<100)){Qr(i);return}if(!(Ce(n,i)||zr(n.display,i))&&(i.dataTransfer.setData("Text",n.getSelection()),i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setDragImage&&!M)){var a=k("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",L&&(a.width=a.height=1,n.display.wrapper.appendChild(a),a._top=a.offsetTop),i.dataTransfer.setDragImage(a,0,0),L&&a.parentNode.removeChild(a)}}function tx(n,i){var a=Xi(n,i);if(a){var l=document.createDocumentFragment();Ou(n,a,l),n.display.dragCursor||(n.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),n.display.lineSpace.insertBefore(n.display.dragCursor,n.display.cursorDiv)),I(n.display.dragCursor,l)}}function tg(n){n.display.dragCursor&&(n.display.lineSpace.removeChild(n.display.dragCursor),n.display.dragCursor=null)}function eg(n){if(document.getElementsByClassName){for(var i=document.getElementsByClassName("CodeMirror"),a=[],l=0;l<i.length;l++){var u=i[l].CodeMirror;u&&a.push(u)}a.length&&a[0].operation(function(){for(var p=0;p<a.length;p++)n(a[p])})}}var ng=!1;function ex(){ng||(nx(),ng=!0)}function nx(){var n;Rt(window,"resize",function(){n==null&&(n=setTimeout(function(){n=null,eg(rx)},100))}),Rt(window,"blur",function(){return eg(zo)})}function rx(n){var i=n.display;i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.scrollbarsClipped=!1,n.setSize()}for(var ui={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ks=0;Ks<10;Ks++)ui[Ks+48]=ui[Ks+96]=String(Ks);for(var Aa=65;Aa<=90;Aa++)ui[Aa]=String.fromCharCode(Aa);for(var Xs=1;Xs<=12;Xs++)ui[Xs+111]=ui[Xs+63235]="F"+Xs;var Fr={};Fr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fr.default=F?Fr.macDefault:Fr.pcDefault;function ix(n){var i=n.split(/-(?!$)/);n=i[i.length-1];for(var a,l,u,p,m=0;m<i.length-1;m++){var b=i[m];if(/^(cmd|meta|m)$/i.test(b))p=!0;else if(/^a(lt)?$/i.test(b))a=!0;else if(/^(c|ctrl|control)$/i.test(b))l=!0;else if(/^s(hift)?$/i.test(b))u=!0;else throw new Error("Unrecognized modifier name: "+b)}return a&&(n="Alt-"+n),l&&(n="Ctrl-"+n),p&&(n="Cmd-"+n),u&&(n="Shift-"+n),n}function ox(n){var i={};for(var a in n)if(n.hasOwnProperty(a)){var l=n[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if(l=="..."){delete n[a];continue}for(var u=bt(a.split(" "),ix),p=0;p<u.length;p++){var m=void 0,b=void 0;p==u.length-1?(b=u.join(" "),m=l):(b=u.slice(0,p+1).join(" "),m="...");var x=i[b];if(!x)i[b]=m;else if(x!=m)throw new Error("Inconsistent bindings for "+b)}delete n[a]}for(var S in i)n[S]=i[S];return n}function jo(n,i,a,l){i=Ma(i);var u=i.call?i.call(n,l):i[n];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&a(u))return"handled";if(i.fallthrough){if(Object.prototype.toString.call(i.fallthrough)!="[object Array]")return jo(n,i.fallthrough,a,l);for(var p=0;p<i.fallthrough.length;p++){var m=jo(n,i.fallthrough[p],a,l);if(m)return m}}}function rg(n){var i=typeof n=="string"?n:ui[n.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function ig(n,i,a){var l=n;return i.altKey&&l!="Alt"&&(n="Alt-"+n),(ht?i.metaKey:i.ctrlKey)&&l!="Ctrl"&&(n="Ctrl-"+n),(ht?i.ctrlKey:i.metaKey)&&l!="Mod"&&(n="Cmd-"+n),!a&&i.shiftKey&&l!="Shift"&&(n="Shift-"+n),n}function og(n,i){if(L&&n.keyCode==34&&n.char)return!1;var a=ui[n.keyCode];return a==null||n.altGraphKey?!1:(n.keyCode==3&&n.code&&(a=n.code),ig(a,n,i))}function Ma(n){return typeof n=="string"?Fr[n]:n}function Vo(n,i){for(var a=n.doc.sel.ranges,l=[],u=0;u<a.length;u++){for(var p=i(a[u]);l.length&&St(p.from,at(l).to)<=0;){var m=l.pop();if(St(m.from,p.from)<0){p.from=m.from;break}}l.push(p)}Sn(n,function(){for(var b=l.length-1;b>=0;b--)Wo(n.doc,"",l[b].from,l[b].to,"+delete");Io(n)})}function Zu(n,i,a){var l=ze(n.text,i+a,a);return l<0||l>n.text.length?null:l}function Ju(n,i,a){var l=Zu(n,i.ch,a);return l==null?null:new X(i.line,l,a<0?"after":"before")}function Qu(n,i,a,l,u){if(n){i.doc.direction=="rtl"&&(u=-u);var p=Bt(a,i.doc.direction);if(p){var m=u<0?at(p):p[0],b=u<0==(m.level==1),x=b?"after":"before",S;if(m.level>0||i.doc.direction=="rtl"){var N=Oo(i,a);S=u<0?a.text.length-1:0;var D=br(i,N,S).top;S=Ke(function(j){return br(i,N,j).top==D},u<0==(m.level==1)?m.from:m.to-1,S),x=="before"&&(S=Zu(a,S,1))}else S=u<0?m.to:m.from;return new X(l,S,x)}}return new X(l,u<0?a.text.length:0,u<0?"before":"after")}function sx(n,i,a,l){var u=Bt(i,n.doc.direction);if(!u)return Ju(i,a,l);a.ch>=i.text.length?(a.ch=i.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var p=Xn(u,a.ch,a.sticky),m=u[p];if(n.doc.direction=="ltr"&&m.level%2==0&&(l>0?m.to>a.ch:m.from<a.ch))return Ju(i,a,l);var b=function(wt,kt){return Zu(i,wt instanceof X?wt.ch:wt,kt)},x,S=function(wt){return n.options.lineWrapping?(x=x||Oo(n,i),up(n,i,x,wt)):{begin:0,end:i.text.length}},N=S(a.sticky=="before"?b(a,-1):a.ch);if(n.doc.direction=="rtl"||m.level==1){var D=m.level==1==l<0,j=b(a,D?1:-1);if(j!=null&&(D?j<=m.to&&j<=N.end:j>=m.from&&j>=N.begin)){var W=D?"before":"after";return new X(a.line,j,W)}}var J=function(wt,kt,xt){for(var Lt=function(ve,We){return We?new X(a.line,b(ve,1),"before"):new X(a.line,ve,"after")};wt>=0&&wt<u.length;wt+=kt){var Dt=u[wt],Pt=kt>0==(Dt.level!=1),Jt=Pt?xt.begin:b(xt.end,-1);if(Dt.from<=Jt&&Jt<Dt.to||(Jt=Pt?Dt.from:b(Dt.to,-1),xt.begin<=Jt&&Jt<xt.end))return Lt(Jt,Pt)}},ct=J(p+l,l,N);if(ct)return ct;var gt=l>0?N.end:b(N.begin,-1);return gt!=null&&!(l>0&>==i.text.length)&&(ct=J(l>0?0:u.length-1,l,S(gt)),ct)?ct:null}var Ys={selectAll:Wp,singleSelection:function(n){return n.setSelection(n.getCursor("anchor"),n.getCursor("head"),z)},killLine:function(n){return Vo(n,function(i){if(i.empty()){var a=$t(n.doc,i.head.line).text.length;return i.head.ch==a&&i.head.line<n.lastLine()?{from:i.head,to:X(i.head.line+1,0)}:{from:i.head,to:X(i.head.line,a)}}else return{from:i.from(),to:i.to()}})},deleteLine:function(n){return Vo(n,function(i){return{from:X(i.from().line,0),to:Ut(n.doc,X(i.to().line+1,0))}})},delLineLeft:function(n){return Vo(n,function(i){return{from:X(i.from().line,0),to:i.from()}})},delWrappedLineLeft:function(n){return Vo(n,function(i){var a=n.charCoords(i.head,"div").top+5,l=n.coordsChar({left:0,top:a},"div");return{from:l,to:i.from()}})},delWrappedLineRight:function(n){return Vo(n,function(i){var a=n.charCoords(i.head,"div").top+5,l=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:a},"div");return{from:i.from(),to:l}})},undo:function(n){return n.undo()},redo:function(n){return n.redo()},undoSelection:function(n){return n.undoSelection()},redoSelection:function(n){return n.redoSelection()},goDocStart:function(n){return n.extendSelection(X(n.firstLine(),0))},goDocEnd:function(n){return n.extendSelection(X(n.lastLine()))},goLineStart:function(n){return n.extendSelectionsBy(function(i){return sg(n,i.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(n){return n.extendSelectionsBy(function(i){return lg(n,i.head)},{origin:"+move",bias:1})},goLineEnd:function(n){return n.extendSelectionsBy(function(i){return lx(n,i.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:a},"div")},ot)},goLineLeft:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5;return n.coordsChar({left:0,top:a},"div")},ot)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5,l=n.coordsChar({left:0,top:a},"div");return l.ch<n.getLine(l.line).search(/\S/)?lg(n,i.head):l},ot)},goLineUp:function(n){return n.moveV(-1,"line")},goLineDown:function(n){return n.moveV(1,"line")},goPageUp:function(n){return n.moveV(-1,"page")},goPageDown:function(n){return n.moveV(1,"page")},goCharLeft:function(n){return n.moveH(-1,"char")},goCharRight:function(n){return n.moveH(1,"char")},goColumnLeft:function(n){return n.moveH(-1,"column")},goColumnRight:function(n){return n.moveH(1,"column")},goWordLeft:function(n){return n.moveH(-1,"word")},goGroupRight:function(n){return n.moveH(1,"group")},goGroupLeft:function(n){return n.moveH(-1,"group")},goWordRight:function(n){return n.moveH(1,"word")},delCharBefore:function(n){return n.deleteH(-1,"codepoint")},delCharAfter:function(n){return n.deleteH(1,"char")},delWordBefore:function(n){return n.deleteH(-1,"word")},delWordAfter:function(n){return n.deleteH(1,"word")},delGroupBefore:function(n){return n.deleteH(-1,"group")},delGroupAfter:function(n){return n.deleteH(1,"group")},indentAuto:function(n){return n.indentSelection("smart")},indentMore:function(n){return n.indentSelection("add")},indentLess:function(n){return n.indentSelection("subtract")},insertTab:function(n){return n.replaceSelection(" ")},insertSoftTab:function(n){for(var i=[],a=n.listSelections(),l=n.options.tabSize,u=0;u<a.length;u++){var p=a[u].from(),m=ft(n.getLine(p.line),p.ch,l);i.push(Ct(l-m%l))}n.replaceSelections(i)},defaultTab:function(n){n.somethingSelected()?n.indentSelection("add"):n.execCommand("insertTab")},transposeChars:function(n){return Sn(n,function(){for(var i=n.listSelections(),a=[],l=0;l<i.length;l++)if(i[l].empty()){var u=i[l].head,p=$t(n.doc,u.line).text;if(p){if(u.ch==p.length&&(u=new X(u.line,u.ch-1)),u.ch>0)u=new X(u.line,u.ch+1),n.replaceRange(p.charAt(u.ch-1)+p.charAt(u.ch-2),X(u.line,u.ch-2),u,"+transpose");else if(u.line>n.doc.first){var m=$t(n.doc,u.line-1).text;m&&(u=new X(u.line,1),n.replaceRange(p.charAt(0)+n.doc.lineSeparator()+m.charAt(m.length-1),X(u.line-1,m.length-1),u,"+transpose"))}}a.push(new ue(u,u))}n.setSelections(a)})},newlineAndIndent:function(n){return Sn(n,function(){for(var i=n.listSelections(),a=i.length-1;a>=0;a--)n.replaceRange(n.doc.lineSeparator(),i[a].anchor,i[a].head,"+input");i=n.listSelections();for(var l=0;l<i.length;l++)n.indentLine(i[l].from().line,null,!0);Io(n)})},openLine:function(n){return n.replaceSelection(`
|
|
36
|
-
`,"start")},toggleOverwrite:function(n){return n.toggleOverwrite()}};function sg(n,i){var a=$t(n.doc,i),l=er(a);return l!=a&&(i=C(l)),Qu(!0,n,l,i,1)}function lx(n,i){var a=$t(n.doc,i),l=Uw(a);return l!=a&&(i=C(l)),Qu(!0,n,a,i,-1)}function lg(n,i){var a=sg(n,i.line),l=$t(n.doc,a.line),u=Bt(l,n.doc.direction);if(!u||u[0].level==0){var p=Math.max(a.ch,l.text.search(/\S/)),m=i.line==a.line&&i.ch<=p&&i.ch;return X(a.line,m?0:p,a.sticky)}return a}function Na(n,i,a){if(typeof i=="string"&&(i=Ys[i],!i))return!1;n.display.input.ensurePolled();var l=n.display.shift,u=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),a&&(n.display.shift=!1),u=i(n)!=O}finally{n.display.shift=l,n.state.suppressEdits=!1}return u}function ax(n,i,a){for(var l=0;l<n.state.keyMaps.length;l++){var u=jo(i,n.state.keyMaps[l],a,n);if(u)return u}return n.options.extraKeys&&jo(i,n.options.extraKeys,a,n)||jo(i,n.options.keyMap,a,n)}var cx=new Nt;function Zs(n,i,a,l){var u=n.state.keySeq;if(u){if(rg(i))return"handled";if(/\'$/.test(i)?n.state.keySeq=null:cx.set(50,function(){n.state.keySeq==u&&(n.state.keySeq=null,n.display.input.reset())}),ag(n,u+" "+i,a,l))return!0}return ag(n,i,a,l)}function ag(n,i,a,l){var u=ax(n,i,l);return u=="multi"&&(n.state.keySeq=i),u=="handled"&&He(n,"keyHandled",n,i,a),(u=="handled"||u=="multi")&&(Ze(a),Ru(n)),!!u}function cg(n,i){var a=og(i,!0);return a?i.shiftKey&&!n.state.keySeq?Zs(n,"Shift-"+a,i,function(l){return Na(n,l,!0)})||Zs(n,a,i,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return Na(n,l)}):Zs(n,a,i,function(l){return Na(n,l)}):!1}function ux(n,i,a){return Zs(n,"'"+a+"'",i,function(l){return Na(n,l,!0)})}var tf=null;function ug(n){var i=this;if(!(n.target&&n.target!=i.display.input.getField())&&(i.curOp.focus=mt(ee(i)),!Ce(i,n))){d&&g<11&&n.keyCode==27&&(n.returnValue=!1);var a=n.keyCode;i.display.shift=a==16||n.shiftKey;var l=cg(i,n);L&&(tf=l?a:null,!l&&a==88&&!oa&&(F?n.metaKey:n.ctrlKey)&&i.replaceSelection("",null,"cut")),s&&!F&&!l&&a==46&&n.shiftKey&&!n.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)&&fx(i)}}function fx(n){var i=n.display.lineDiv;Mt(i,"CodeMirror-crosshair");function a(l){(l.keyCode==18||!l.altKey)&&(lt(i,"CodeMirror-crosshair"),Ye(document,"keyup",a),Ye(document,"mouseover",a))}Rt(document,"keyup",a),Rt(document,"mouseover",a)}function fg(n){n.keyCode==16&&(this.doc.sel.shift=!1),Ce(this,n)}function hg(n){var i=this;if(!(n.target&&n.target!=i.display.input.getField())&&!(zr(i.display,n)||Ce(i,n)||n.ctrlKey&&!n.altKey||F&&n.metaKey)){var a=n.keyCode,l=n.charCode;if(L&&a==tf){tf=null,Ze(n);return}if(!(L&&(!n.which||n.which<10)&&cg(i,n))){var u=String.fromCharCode(l??a);u!="\b"&&(ux(i,n,u)||i.display.input.onKeyPress(n))}}}var hx=400,ef=function(n,i,a){this.time=n,this.pos=i,this.button=a};ef.prototype.compare=function(n,i,a){return this.time+hx>n&&St(i,this.pos)==0&&a==this.button};var Js,Qs;function dx(n,i){var a=+new Date;return Qs&&Qs.compare(a,n,i)?(Js=Qs=null,"triple"):Js&&Js.compare(a,n,i)?(Qs=new ef(a,n,i),Js=null,"double"):(Js=new ef(a,n,i),Qs=null,"single")}function dg(n){var i=this,a=i.display;if(!(Ce(i,n)||a.activeTouch&&a.input.supportsTouch())){if(a.input.ensurePolled(),a.shift=n.shiftKey,zr(a,n)){v||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(!nf(i,n)){var l=Xi(i,n),u=Zn(n),p=l?dx(l,u):"single";Tt(i).focus(),u==1&&i.state.selectingText&&i.state.selectingText(n),!(l&&px(i,u,l,p,n))&&(u==1?l?vx(i,l,p,n):ks(n)==a.scroller&&Ze(n):u==2?(l&&Ca(i.doc,l),setTimeout(function(){return a.input.focus()},20)):u==3&&(Z?i.display.input.onContextMenu(n):Du(i)))}}}function px(n,i,a,l,u){var p="Click";return l=="double"?p="Double"+p:l=="triple"&&(p="Triple"+p),p=(i==1?"Left":i==2?"Middle":"Right")+p,Zs(n,ig(p,u),u,function(m){if(typeof m=="string"&&(m=Ys[m]),!m)return!1;var b=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),b=m(n,a)!=O}finally{n.state.suppressEdits=!1}return b})}function gx(n,i,a){var l=n.getOption("configureMouse"),u=l?l(n,i,a):{};if(u.unit==null){var p=H?a.shiftKey&&a.metaKey:a.altKey;u.unit=p?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(u.extend==null||n.doc.extend)&&(u.extend=n.doc.extend||a.shiftKey),u.addNew==null&&(u.addNew=F?a.metaKey:a.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(F?a.altKey:a.ctrlKey)),u}function vx(n,i,a,l){d?setTimeout(V(pp,n),0):n.curOp.focus=mt(ee(n));var u=gx(n,a,l),p=n.doc.sel,m;n.options.dragDrop&&pu&&!n.isReadOnly()&&a=="single"&&(m=p.contains(i))>-1&&(St((m=p.ranges[m]).from(),i)<0||i.xRel>0)&&(St(m.to(),i)>0||i.xRel<0)?mx(n,l,i,u):yx(n,l,i,u)}function mx(n,i,a,l){var u=n.display,p=!1,m=qe(n,function(S){v&&(u.scroller.draggable=!1),n.state.draggingText=!1,n.state.delayingBlurEvent&&(n.hasFocus()?n.state.delayingBlurEvent=!1:Du(n)),Ye(u.wrapper.ownerDocument,"mouseup",m),Ye(u.wrapper.ownerDocument,"mousemove",b),Ye(u.scroller,"dragstart",x),Ye(u.scroller,"drop",m),p||(Ze(S),l.addNew||Ca(n.doc,a,null,null,l.extend),v&&!M||d&&g==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),b=function(S){p=p||Math.abs(i.clientX-S.clientX)+Math.abs(i.clientY-S.clientY)>=10},x=function(){return p=!0};v&&(u.scroller.draggable=!0),n.state.draggingText=m,m.copy=!l.moveOnDrag,Rt(u.wrapper.ownerDocument,"mouseup",m),Rt(u.wrapper.ownerDocument,"mousemove",b),Rt(u.scroller,"dragstart",x),Rt(u.scroller,"drop",m),n.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function pg(n,i,a){if(a=="char")return new ue(i,i);if(a=="word")return n.findWordAt(i);if(a=="line")return new ue(X(i.line,0),Ut(n.doc,X(i.line+1,0)));var l=a(n,i);return new ue(l.from,l.to)}function yx(n,i,a,l){d&&Du(n);var u=n.display,p=n.doc;Ze(i);var m,b,x=p.sel,S=x.ranges;if(l.addNew&&!l.extend?(b=p.sel.contains(a),b>-1?m=S[b]:m=new ue(a,a)):(m=p.sel.primary(),b=p.sel.primIndex),l.unit=="rectangle")l.addNew||(m=new ue(a,a)),a=Xi(n,i,!0,!0),b=-1;else{var N=pg(n,a,l.unit);l.extend?m=Xu(m,N.anchor,N.head,l.extend):m=N}l.addNew?b==-1?(b=S.length,Je(p,rr(n,S.concat([m]),b),{scroll:!1,origin:"*mouse"})):S.length>1&&S[b].empty()&&l.unit=="char"&&!l.extend?(Je(p,rr(n,S.slice(0,b).concat(S.slice(b+1)),0),{scroll:!1,origin:"*mouse"}),x=p.sel):Yu(p,b,m,K):(b=0,Je(p,new Pn([m],0),K),x=p.sel);var D=a;function j(xt){if(St(D,xt)!=0)if(D=xt,l.unit=="rectangle"){for(var Lt=[],Dt=n.options.tabSize,Pt=ft($t(p,a.line).text,a.ch,Dt),Jt=ft($t(p,xt.line).text,xt.ch,Dt),ve=Math.min(Pt,Jt),We=Math.max(Pt,Jt),_e=Math.min(a.line,xt.line),kn=Math.min(n.lastLine(),Math.max(a.line,xt.line));_e<=kn;_e++){var hn=$t(p,_e).text,Me=rt(hn,ve,Dt);ve==We?Lt.push(new ue(X(_e,Me),X(_e,Me))):hn.length>Me&&Lt.push(new ue(X(_e,Me),X(_e,rt(hn,We,Dt))))}Lt.length||Lt.push(new ue(a,a)),Je(p,rr(n,x.ranges.slice(0,b).concat(Lt),b),{origin:"*mouse",scroll:!1}),n.scrollIntoView(xt)}else{var dn=m,Ve=pg(n,xt,l.unit),Ie=dn.anchor,Ne;St(Ve.anchor,Ie)>0?(Ne=Ve.head,Ie=No(dn.from(),Ve.anchor)):(Ne=Ve.anchor,Ie=cn(dn.to(),Ve.head));var Ee=x.ranges.slice(0);Ee[b]=bx(n,new ue(Ut(p,Ie),Ne)),Je(p,rr(n,Ee,b),K)}}var W=u.wrapper.getBoundingClientRect(),J=0;function ct(xt){var Lt=++J,Dt=Xi(n,xt,!0,l.unit=="rectangle");if(Dt)if(St(Dt,D)!=0){n.curOp.focus=mt(ee(n)),j(Dt);var Pt=ba(u,p);(Dt.line>=Pt.to||Dt.line<Pt.from)&&setTimeout(qe(n,function(){J==Lt&&ct(xt)}),150)}else{var Jt=xt.clientY<W.top?-20:xt.clientY>W.bottom?20:0;Jt&&setTimeout(qe(n,function(){J==Lt&&(u.scroller.scrollTop+=Jt,ct(xt))}),50)}}function gt(xt){n.state.selectingText=!1,J=1/0,xt&&(Ze(xt),u.input.focus()),Ye(u.wrapper.ownerDocument,"mousemove",wt),Ye(u.wrapper.ownerDocument,"mouseup",kt),p.history.lastSelOrigin=null}var wt=qe(n,function(xt){xt.buttons===0||!Zn(xt)?gt(xt):ct(xt)}),kt=qe(n,gt);n.state.selectingText=kt,Rt(u.wrapper.ownerDocument,"mousemove",wt),Rt(u.wrapper.ownerDocument,"mouseup",kt)}function bx(n,i){var a=i.anchor,l=i.head,u=$t(n.doc,a.line);if(St(a,l)==0&&a.sticky==l.sticky)return i;var p=Bt(u);if(!p)return i;var m=Xn(p,a.ch,a.sticky),b=p[m];if(b.from!=a.ch&&b.to!=a.ch)return i;var x=m+(b.from==a.ch==(b.level!=1)?0:1);if(x==0||x==p.length)return i;var S;if(l.line!=a.line)S=(l.line-a.line)*(n.doc.direction=="ltr"?1:-1)>0;else{var N=Xn(p,l.ch,l.sticky),D=N-m||(l.ch-a.ch)*(b.level==1?-1:1);N==x-1||N==x?S=D<0:S=D>0}var j=p[x+(S?-1:0)],W=S==(j.level==1),J=W?j.from:j.to,ct=W?"after":"before";return a.ch==J&&a.sticky==ct?i:new ue(new X(a.line,J,ct),l)}function gg(n,i,a,l){var u,p;if(i.touches)u=i.touches[0].clientX,p=i.touches[0].clientY;else try{u=i.clientX,p=i.clientY}catch{return!1}if(u>=Math.floor(n.display.gutters.getBoundingClientRect().right))return!1;l&&Ze(i);var m=n.display,b=m.lineDiv.getBoundingClientRect();if(p>b.bottom||!_n(n,a))return an(i);p-=b.top-m.viewOffset;for(var x=0;x<n.display.gutterSpecs.length;++x){var S=m.gutters.childNodes[x];if(S&&S.getBoundingClientRect().right>=u){var N=R(n.doc,p),D=n.display.gutterSpecs[x];return ke(n,a,n,N,D.className,i),an(i)}}}function nf(n,i){return gg(n,i,"gutterClick",!0)}function vg(n,i){zr(n.display,i)||wx(n,i)||Ce(n,i,"contextmenu")||Z||n.display.input.onContextMenu(i)}function wx(n,i){return _n(n,"gutterContextMenu")?gg(n,i,"gutterContextMenu",!1):!1}function mg(n){n.display.wrapper.className=n.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+n.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ps(n)}var Go={toString:function(){return"CodeMirror.Init"}},yg={},$a={};function xx(n){var i=n.optionHandlers;function a(l,u,p,m){n.defaults[l]=u,p&&(i[l]=m?function(b,x,S){S!=Go&&p(b,x,S)}:p)}n.defineOption=a,n.Init=Go,a("value","",function(l,u){return l.setValue(u)},!0),a("mode",null,function(l,u){l.doc.modeOption=u,Vu(l)},!0),a("indentUnit",2,Vu,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(l){qs(l),Ps(l),un(l)},!0),a("lineSeparator",null,function(l,u){if(l.doc.lineSep=u,!!u){var p=[],m=l.doc.first;l.doc.iter(function(x){for(var S=0;;){var N=x.text.indexOf(u,S);if(N==-1)break;S=N+u.length,p.push(X(m,N))}m++});for(var b=p.length-1;b>=0;b--)Wo(l.doc,u,p[b],X(p[b].line,p[b].ch+u.length))}}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(l,u,p){l.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),p!=Go&&l.refresh()}),a("specialCharPlaceholder",Yw,function(l){return l.refresh()},!0),a("electricChars",!0),a("inputStyle",$?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(l,u){return l.getInputField().spellcheck=u},!0),a("autocorrect",!1,function(l,u){return l.getInputField().autocorrect=u},!0),a("autocapitalize",!1,function(l,u){return l.getInputField().autocapitalize=u},!0),a("rtlMoveVisually",!st),a("wholeLineUpdateBefore",!0),a("theme","default",function(l){mg(l),Hs(l)},!0),a("keyMap","default",function(l,u,p){var m=Ma(u),b=p!=Go&&Ma(p);b&&b.detach&&b.detach(l,m),m.attach&&m.attach(l,b||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Sx,!0),a("gutters",[],function(l,u){l.display.gutterSpecs=Uu(u,l.options.lineNumbers),Hs(l)},!0),a("fixedGutter",!0,function(l,u){l.display.gutters.style.left=u?$u(l.display)+"px":"0",l.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(l){return Fo(l)},!0),a("scrollbarStyle","native",function(l){wp(l),Fo(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),a("lineNumbers",!1,function(l,u){l.display.gutterSpecs=Uu(l.options.gutters,u),Hs(l)},!0),a("firstLineNumber",1,Hs,!0),a("lineNumberFormatter",function(l){return l},Hs,!0),a("showCursorWhenSelecting",!1,Os,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(l,u){u=="nocursor"&&(zo(l),l.display.input.blur()),l.display.input.readOnlyChanged(u)}),a("screenReaderLabel",null,function(l,u){u=u===""?null:u,l.display.input.screenReaderLabelChanged(u)}),a("disableInput",!1,function(l,u){u||l.display.input.reset()},!0),a("dragDrop",!0,_x),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Os,!0),a("singleCursorHeightPerLine",!0,Os,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qs,!0),a("addModeClass",!1,qs,!0),a("pollInterval",100),a("undoDepth",200,function(l,u){return l.doc.history.undoDepth=u}),a("historyEventDelay",1250),a("viewportMargin",10,function(l){return l.refresh()},!0),a("maxHighlightLength",1e4,qs,!0),a("moveInputWithCursor",!0,function(l,u){u||l.display.input.resetPosition()}),a("tabindex",null,function(l,u){return l.display.input.getField().tabIndex=u||""}),a("autofocus",null),a("direction","ltr",function(l,u){return l.doc.setDirection(u)},!0),a("phrases",null)}function _x(n,i,a){var l=a&&a!=Go;if(!i!=!l){var u=n.display.dragFunctions,p=i?Rt:Ye;p(n.display.scroller,"dragstart",u.start),p(n.display.scroller,"dragenter",u.enter),p(n.display.scroller,"dragover",u.over),p(n.display.scroller,"dragleave",u.leave),p(n.display.scroller,"drop",u.drop)}}function Sx(n){n.options.lineWrapping?(Mt(n.display.wrapper,"CodeMirror-wrap"),n.display.sizer.style.minWidth="",n.display.sizerWidth=null):(lt(n.display.wrapper,"CodeMirror-wrap"),_u(n)),Pu(n),un(n),Ps(n),setTimeout(function(){return Fo(n)},100)}function we(n,i){var a=this;if(!(this instanceof we))return new we(n,i);this.options=i=i?it(i):{},it(yg,i,!1);var l=i.value;typeof l=="string"?l=new fn(l,i.mode,null,i.lineSeparator,i.direction):i.mode&&(l.modeOption=i.mode),this.doc=l;var u=new we.inputStyles[i.inputStyle](this),p=this.display=new D1(n,l,u,i);p.wrapper.CodeMirror=this,mg(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wp(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Nt,keySeq:null,specialChars:null},i.autofocus&&!$&&p.input.focus(),d&&g<11&&setTimeout(function(){return a.display.input.reset(!0)},20),kx(this),ex(),Qi(this),this.curOp.forceUpdate=!0,Mp(this,l),i.autofocus&&!$||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&zu(a)},20):zo(this);for(var m in $a)$a.hasOwnProperty(m)&&$a[m](this,i[m],Go);Sp(this),i.finishInit&&i.finishInit(this);for(var b=0;b<rf.length;++b)rf[b](this);to(this),v&&i.lineWrapping&&getComputedStyle(p.lineDiv).textRendering=="optimizelegibility"&&(p.lineDiv.style.textRendering="auto")}we.defaults=yg,we.optionHandlers=$a;function kx(n){var i=n.display;Rt(i.scroller,"mousedown",qe(n,dg)),d&&g<11?Rt(i.scroller,"dblclick",qe(n,function(x){if(!Ce(n,x)){var S=Xi(n,x);if(!(!S||nf(n,x)||zr(n.display,x))){Ze(x);var N=n.findWordAt(S);Ca(n.doc,N.anchor,N.head)}}})):Rt(i.scroller,"dblclick",function(x){return Ce(n,x)||Ze(x)}),Rt(i.scroller,"contextmenu",function(x){return vg(n,x)}),Rt(i.input.getField(),"contextmenu",function(x){i.scroller.contains(x.target)||vg(n,x)});var a,l={end:0};function u(){i.activeTouch&&(a=setTimeout(function(){return i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function p(x){if(x.touches.length!=1)return!1;var S=x.touches[0];return S.radiusX<=1&&S.radiusY<=1}function m(x,S){if(S.left==null)return!0;var N=S.left-x.left,D=S.top-x.top;return N*N+D*D>20*20}Rt(i.scroller,"touchstart",function(x){if(!Ce(n,x)&&!p(x)&&!nf(n,x)){i.input.ensurePolled(),clearTimeout(a);var S=+new Date;i.activeTouch={start:S,moved:!1,prev:S-l.end<=300?l:null},x.touches.length==1&&(i.activeTouch.left=x.touches[0].pageX,i.activeTouch.top=x.touches[0].pageY)}}),Rt(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Rt(i.scroller,"touchend",function(x){var S=i.activeTouch;if(S&&!zr(i,x)&&S.left!=null&&!S.moved&&new Date-S.start<300){var N=n.coordsChar(i.activeTouch,"page"),D;!S.prev||m(S,S.prev)?D=new ue(N,N):!S.prev.prev||m(S,S.prev.prev)?D=n.findWordAt(N):D=new ue(X(N.line,0),Ut(n.doc,X(N.line+1,0))),n.setSelection(D.anchor,D.head),n.focus(),Ze(x)}u()}),Rt(i.scroller,"touchcancel",u),Rt(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Ds(n,i.scroller.scrollTop),Zi(n,i.scroller.scrollLeft,!0),ke(n,"scroll",n))}),Rt(i.scroller,"mousewheel",function(x){return Tp(n,x)}),Rt(i.scroller,"DOMMouseScroll",function(x){return Tp(n,x)}),Rt(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(x){Ce(n,x)||Qr(x)},over:function(x){Ce(n,x)||(tx(n,x),Qr(x))},start:function(x){return Q1(n,x)},drop:qe(n,J1),leave:function(x){Ce(n,x)||tg(n)}};var b=i.input.getField();Rt(b,"keyup",function(x){return fg.call(n,x)}),Rt(b,"keydown",qe(n,ug)),Rt(b,"keypress",qe(n,hg)),Rt(b,"focus",function(x){return zu(n,x)}),Rt(b,"blur",function(x){return zo(n,x)})}var rf=[];we.defineInitHook=function(n){return rf.push(n)};function tl(n,i,a,l){var u=n.doc,p;a==null&&(a="add"),a=="smart"&&(u.mode.indent?p=Ls(n,i).state:a="prev");var m=n.options.tabSize,b=$t(u,i),x=ft(b.text,null,m);b.stateAfter&&(b.stateAfter=null);var S=b.text.match(/^\s*/)[0],N;if(!l&&!/\S/.test(b.text))N=0,a="not";else if(a=="smart"&&(N=u.mode.indent(p,b.text.slice(S.length),b.text),N==O||N>150)){if(!l)return;a="prev"}a=="prev"?i>u.first?N=ft($t(u,i-1).text,null,m):N=0:a=="add"?N=x+n.options.indentUnit:a=="subtract"?N=x-n.options.indentUnit:typeof a=="number"&&(N=x+a),N=Math.max(0,N);var D="",j=0;if(n.options.indentWithTabs)for(var W=Math.floor(N/m);W;--W)j+=m,D+=" ";if(j<N&&(D+=Ct(N-j)),D!=S)return Wo(u,D,X(i,0),X(i,S.length),"+input"),b.stateAfter=null,!0;for(var J=0;J<u.sel.ranges.length;J++){var ct=u.sel.ranges[J];if(ct.head.line==i&&ct.head.ch<S.length){var gt=X(i,S.length);Yu(u,J,new ue(gt,gt));break}}}var ir=null;function Pa(n){ir=n}function of(n,i,a,l,u){var p=n.doc;n.display.shift=!1,l||(l=p.sel);var m=+new Date-200,b=u=="paste"||n.state.pasteIncoming>m,x=Hn(i),S=null;if(b&&l.ranges.length>1)if(ir&&ir.text.join(`
|
|
34
|
+
left: `+i.left+"px; width: "+Math.max(2,i.right-i.left)+"px;");n.display.lineSpace.appendChild(m),m.scrollIntoView(u),n.display.lineSpace.removeChild(m)}}}function x1(n,i,a,l){l==null&&(l=0);var u;!n.options.lineWrapping&&i==a&&(a=i.sticky=="before"?X(i.line,i.ch+1,"before"):i,i=i.ch?X(i.line,i.sticky=="before"?i.ch-1:i.ch,"after"):i);for(var p=0;p<5;p++){var m=!1,b=nr(n,i),x=!a||a==i?b:nr(n,a);u={left:Math.min(b.left,x.left),top:Math.min(b.top,x.top)-l,right:Math.max(b.left,x.left),bottom:Math.max(b.bottom,x.bottom)+l};var S=Iu(n,u),N=n.doc.scrollTop,D=n.doc.scrollLeft;if(S.scrollTop!=null&&(Ds(n,S.scrollTop),Math.abs(n.doc.scrollTop-N)>1&&(m=!0)),S.scrollLeft!=null&&(Zi(n,S.scrollLeft),Math.abs(n.doc.scrollLeft-D)>1&&(m=!0)),!m)break}return u}function _1(n,i){var a=Iu(n,i);a.scrollTop!=null&&Ds(n,a.scrollTop),a.scrollLeft!=null&&Zi(n,a.scrollLeft)}function Iu(n,i){var a=n.display,l=Ro(n.display);i.top<0&&(i.top=0);var u=n.curOp&&n.curOp.scrollTop!=null?n.curOp.scrollTop:a.scroller.scrollTop,p=Cu(n),m={};i.bottom-i.top>p&&(i.bottom=i.top+p);var b=n.doc.height+ku(a),x=i.top<l,S=i.bottom>b-l;if(i.top<u)m.scrollTop=x?0:i.top;else if(i.bottom>u+p){var N=Math.min(i.top,(S?b:i.bottom)-p);N!=u&&(m.scrollTop=N)}var D=n.options.fixedGutter?0:a.gutters.offsetWidth,j=n.curOp&&n.curOp.scrollLeft!=null?n.curOp.scrollLeft:a.scroller.scrollLeft-D,W=Gi(n)-a.gutters.offsetWidth,J=i.right-i.left>W;return J&&(i.right=i.left+W),i.left<10?m.scrollLeft=0:i.left<j?m.scrollLeft=Math.max(0,i.left+D-(J?0:10)):i.right>W+j-3&&(m.scrollLeft=i.right+(J?0:10)-W),m}function Fu(n,i){i!=null&&(wa(n),n.curOp.scrollTop=(n.curOp.scrollTop==null?n.doc.scrollTop:n.curOp.scrollTop)+i)}function Io(n){wa(n);var i=n.getCursor();n.curOp.scrollToPos={from:i,to:i,margin:n.options.cursorScrollMargin}}function Rs(n,i,a){(i!=null||a!=null)&&wa(n),i!=null&&(n.curOp.scrollLeft=i),a!=null&&(n.curOp.scrollTop=a)}function S1(n,i){wa(n),n.curOp.scrollToPos=i}function wa(n){var i=n.curOp.scrollToPos;if(i){n.curOp.scrollToPos=null;var a=ap(n,i.from),l=ap(n,i.to);vp(n,a,l,i.margin)}}function vp(n,i,a,l){var u=Iu(n,{left:Math.min(i.left,a.left),top:Math.min(i.top,a.top)-l,right:Math.max(i.right,a.right),bottom:Math.max(i.bottom,a.bottom)+l});Rs(n,u.scrollLeft,u.scrollTop)}function Ds(n,i){Math.abs(n.doc.scrollTop-i)<2||(s||qu(n,{top:i}),mp(n,i,!0),s&&qu(n),Fs(n,100))}function mp(n,i,a){i=Math.max(0,Math.min(n.display.scroller.scrollHeight-n.display.scroller.clientHeight,i)),!(n.display.scroller.scrollTop==i&&!a)&&(n.doc.scrollTop=i,n.display.scrollbars.setScrollTop(i),n.display.scroller.scrollTop!=i&&(n.display.scroller.scrollTop=i))}function Zi(n,i,a,l){i=Math.max(0,Math.min(i,n.display.scroller.scrollWidth-n.display.scroller.clientWidth)),!((a?i==n.doc.scrollLeft:Math.abs(n.doc.scrollLeft-i)<2)&&!l)&&(n.doc.scrollLeft=i,_p(n),n.display.scroller.scrollLeft!=i&&(n.display.scroller.scrollLeft=i),n.display.scrollbars.setScrollLeft(i))}function zs(n){var i=n.display,a=i.gutters.offsetWidth,l=Math.round(n.doc.height+ku(n.display));return{clientHeight:i.scroller.clientHeight,viewHeight:i.wrapper.clientHeight,scrollWidth:i.scroller.scrollWidth,clientWidth:i.scroller.clientWidth,viewWidth:i.wrapper.clientWidth,barLeft:n.options.fixedGutter?a:0,docHeight:l,scrollHeight:l+yr(n)+i.barHeight,nativeBarWidth:i.nativeBarWidth,gutterWidth:a}}var Ji=function(n,i,a){this.cm=a;var l=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=u.tabIndex=-1,n(l),n(u),Rt(l,"scroll",function(){l.clientHeight&&i(l.scrollTop,"vertical")}),Rt(u,"scroll",function(){u.clientWidth&&i(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&g<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ji.prototype.update=function(n){var i=n.scrollWidth>n.clientWidth+1,a=n.scrollHeight>n.clientHeight+1,l=n.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=i?l+"px":"0";var u=n.viewHeight-(i?l:0);this.vert.firstChild.style.height=Math.max(0,n.scrollHeight-n.clientHeight+u)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(i){this.horiz.style.display="block",this.horiz.style.right=a?l+"px":"0",this.horiz.style.left=n.barLeft+"px";var p=n.viewWidth-n.barLeft-(a?l:0);this.horiz.firstChild.style.width=Math.max(0,n.scrollWidth-n.clientWidth+p)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&n.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?l:0,bottom:i?l:0}},Ji.prototype.setScrollLeft=function(n){this.horiz.scrollLeft!=n&&(this.horiz.scrollLeft=n),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ji.prototype.setScrollTop=function(n){this.vert.scrollTop!=n&&(this.vert.scrollTop=n),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ji.prototype.zeroWidthHack=function(){var n=F&&!A?"12px":"18px";this.horiz.style.height=this.vert.style.width=n,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Nt,this.disableVert=new Nt},Ji.prototype.enableZeroWidthBar=function(n,i,a){n.style.visibility="";function l(){var u=n.getBoundingClientRect(),p=a=="vert"?document.elementFromPoint(u.right-1,(u.top+u.bottom)/2):document.elementFromPoint((u.right+u.left)/2,u.bottom-1);p!=n?n.style.visibility="hidden":i.set(1e3,l)}i.set(1e3,l)},Ji.prototype.clear=function(){var n=this.horiz.parentNode;n.removeChild(this.horiz),n.removeChild(this.vert)};var Is=function(){};Is.prototype.update=function(){return{bottom:0,right:0}},Is.prototype.setScrollLeft=function(){},Is.prototype.setScrollTop=function(){},Is.prototype.clear=function(){};function Fo(n,i){i||(i=zs(n));var a=n.display.barWidth,l=n.display.barHeight;yp(n,i);for(var u=0;u<4&&a!=n.display.barWidth||l!=n.display.barHeight;u++)a!=n.display.barWidth&&n.options.lineWrapping&&ya(n),yp(n,zs(n)),a=n.display.barWidth,l=n.display.barHeight}function yp(n,i){var a=n.display,l=a.scrollbars.update(i);a.sizer.style.paddingRight=(a.barWidth=l.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=l.bottom)+"px",a.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=l.bottom+"px",a.scrollbarFiller.style.width=l.right+"px"):a.scrollbarFiller.style.display="",l.bottom&&n.options.coverGutterNextToScrollbar&&n.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=l.bottom+"px",a.gutterFiller.style.width=i.gutterWidth+"px"):a.gutterFiller.style.display=""}var bp={native:Ji,null:Is};function wp(n){n.display.scrollbars&&(n.display.scrollbars.clear(),n.display.scrollbars.addClass&<(n.display.wrapper,n.display.scrollbars.addClass)),n.display.scrollbars=new bp[n.options.scrollbarStyle](function(i){n.display.wrapper.insertBefore(i,n.display.scrollbarFiller),Rt(i,"mousedown",function(){n.state.focused&&setTimeout(function(){return n.display.input.focus()},0)}),i.setAttribute("cm-not-content","true")},function(i,a){a=="horizontal"?Zi(n,i):Ds(n,i)},n),n.display.scrollbars.addClass&&Mt(n.display.wrapper,n.display.scrollbars.addClass)}var k1=0;function Qi(n){n.curOp={cm:n,viewChanged:!1,startHeight:n.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++k1,markArrays:null},e1(n.curOp)}function to(n){var i=n.curOp;i&&r1(i,function(a){for(var l=0;l<a.ops.length;l++)a.ops[l].cm.curOp=null;C1(a)})}function C1(n){for(var i=n.ops,a=0;a<i.length;a++)T1(i[a]);for(var l=0;l<i.length;l++)E1(i[l]);for(var u=0;u<i.length;u++)L1(i[u]);for(var p=0;p<i.length;p++)A1(i[p]);for(var m=0;m<i.length;m++)M1(i[m])}function T1(n){var i=n.cm,a=i.display;$1(i),n.updateMaxLine&&_u(i),n.mustUpdate=n.viewChanged||n.forceUpdate||n.scrollTop!=null||n.scrollToPos&&(n.scrollToPos.from.line<a.viewFrom||n.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&i.options.lineWrapping,n.update=n.mustUpdate&&new xa(i,n.mustUpdate&&{top:n.scrollTop,ensure:n.scrollToPos},n.forceUpdate)}function E1(n){n.updatedDisplay=n.mustUpdate&&Hu(n.cm,n.update)}function L1(n){var i=n.cm,a=i.display;n.updatedDisplay&&ya(i),n.barMeasure=zs(i),a.maxLineChanged&&!i.options.lineWrapping&&(n.adjustWidthTo=tp(i,a.maxLine,a.maxLine.text.length).left+3,i.display.sizerWidth=n.adjustWidthTo,n.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+n.adjustWidthTo+yr(i)+i.display.barWidth),n.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+n.adjustWidthTo-Gi(i))),(n.updatedDisplay||n.selectionChanged)&&(n.preparedSelection=a.input.prepareSelection())}function A1(n){var i=n.cm;n.adjustWidthTo!=null&&(i.display.sizer.style.minWidth=n.adjustWidthTo+"px",n.maxScrollLeft<i.doc.scrollLeft&&Zi(i,Math.min(i.display.scroller.scrollLeft,n.maxScrollLeft),!0),i.display.maxLineChanged=!1);var a=n.focus&&n.focus==mt(ee(i));n.preparedSelection&&i.display.input.showSelection(n.preparedSelection,a),(n.updatedDisplay||n.startHeight!=i.doc.height)&&Fo(i,n.barMeasure),n.updatedDisplay&&Wu(i,n.barMeasure),n.selectionChanged&&Ru(i),i.state.focused&&n.updateInput&&i.display.input.reset(n.typing),a&&pp(n.cm)}function M1(n){var i=n.cm,a=i.display,l=i.doc;if(n.updatedDisplay&&xp(i,n.update),a.wheelStartX!=null&&(n.scrollTop!=null||n.scrollLeft!=null||n.scrollToPos)&&(a.wheelStartX=a.wheelStartY=null),n.scrollTop!=null&&mp(i,n.scrollTop,n.forceScroll),n.scrollLeft!=null&&Zi(i,n.scrollLeft,!0,!0),n.scrollToPos){var u=x1(i,Ut(l,n.scrollToPos.from),Ut(l,n.scrollToPos.to),n.scrollToPos.margin);w1(i,u)}var p=n.maybeHiddenMarkers,m=n.maybeUnhiddenMarkers;if(p)for(var b=0;b<p.length;++b)p[b].lines.length||ke(p[b],"hide");if(m)for(var x=0;x<m.length;++x)m[x].lines.length&&ke(m[x],"unhide");a.wrapper.offsetHeight&&(l.scrollTop=i.display.scroller.scrollTop),n.changeObjs&&ke(i,"changes",i,n.changeObjs),n.update&&n.update.finish()}function kn(n,i){if(n.curOp)return i();Qi(n);try{return i()}finally{to(n)}}function qe(n,i){return function(){if(n.curOp)return i.apply(n,arguments);Qi(n);try{return i.apply(n,arguments)}finally{to(n)}}}function en(n){return function(){if(this.curOp)return n.apply(this,arguments);Qi(this);try{return n.apply(this,arguments)}finally{to(this)}}}function Be(n){return function(){var i=this.cm;if(!i||i.curOp)return n.apply(this,arguments);Qi(i);try{return n.apply(this,arguments)}finally{to(i)}}}function Fs(n,i){n.doc.highlightFrontier<n.display.viewTo&&n.state.highlight.set(i,V(N1,n))}function N1(n){var i=n.doc;if(!(i.highlightFrontier>=n.display.viewTo)){var a=+new Date+n.options.workTime,l=Ls(n,i.highlightFrontier),u=[];i.iter(l.line,Math.min(i.first+i.size,n.display.viewTo+500),function(p){if(l.line>=n.display.viewFrom){var m=p.styles,b=p.text.length>n.options.maxHighlightLength?vr(i.mode,l.state):null,x=Ld(n,p,l,!0);b&&(l.state=b),p.styles=x.styles;var S=p.styleClasses,N=x.classes;N?p.styleClasses=N:S&&(p.styleClasses=null);for(var D=!m||m.length!=p.styles.length||S!=N&&(!S||!N||S.bgClass!=N.bgClass||S.textClass!=N.textClass),j=0;!D&&j<m.length;++j)D=m[j]!=p.styles[j];D&&u.push(l.line),p.stateAfter=l.save(),l.nextLine()}else p.text.length<=n.options.maxHighlightLength&&vu(n,p.text,l),p.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>a)return Fs(n,n.options.workDelay),!0}),i.highlightFrontier=l.line,i.modeFrontier=Math.max(i.modeFrontier,l.line),u.length&&kn(n,function(){for(var p=0;p<u.length;p++)ii(n,u[p],"text")})}}var xa=function(n,i,a){var l=n.display;this.viewport=i,this.visible=ba(l,n.doc,i),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Gi(n),this.force=a,this.dims=Nu(n),this.events=[]};xa.prototype.signal=function(n,i){Sn(n,i)&&this.events.push(arguments)},xa.prototype.finish=function(){for(var n=0;n<this.events.length;n++)ke.apply(null,this.events[n])};function $1(n){var i=n.display;!i.scrollbarsClipped&&i.scroller.offsetWidth&&(i.nativeBarWidth=i.scroller.offsetWidth-i.scroller.clientWidth,i.heightForcer.style.height=yr(n)+"px",i.sizer.style.marginBottom=-i.nativeBarWidth+"px",i.sizer.style.borderRightWidth=yr(n)+"px",i.scrollbarsClipped=!0)}function P1(n){if(n.hasFocus())return null;var i=mt(ee(n));if(!i||!tt(n.display.lineDiv,i))return null;var a={activeElt:i};if(window.getSelection){var l=Tt(n).getSelection();l.anchorNode&&l.extend&&tt(n.display.lineDiv,l.anchorNode)&&(a.anchorNode=l.anchorNode,a.anchorOffset=l.anchorOffset,a.focusNode=l.focusNode,a.focusOffset=l.focusOffset)}return a}function O1(n){if(!(!n||!n.activeElt||n.activeElt==mt(Zt(n.activeElt)))&&(n.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(n.activeElt.nodeName)&&n.anchorNode&&tt(document.body,n.anchorNode)&&tt(document.body,n.focusNode))){var i=n.activeElt.ownerDocument,a=i.defaultView.getSelection(),l=i.createRange();l.setEnd(n.anchorNode,n.anchorOffset),l.collapse(!1),a.removeAllRanges(),a.addRange(l),a.extend(n.focusNode,n.focusOffset)}}function Hu(n,i){var a=n.display,l=n.doc;if(i.editorIsHidden)return oi(n),!1;if(!i.force&&i.visible.from>=a.viewFrom&&i.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&hp(n)==0)return!1;Sp(n)&&(oi(n),i.dims=Nu(n));var u=l.first+l.size,p=Math.max(i.visible.from-n.options.viewportMargin,l.first),m=Math.min(u,i.visible.to+n.options.viewportMargin);a.viewFrom<p&&p-a.viewFrom<20&&(p=Math.max(l.first,a.viewFrom)),a.viewTo>m&&a.viewTo-m<20&&(m=Math.min(u,a.viewTo)),Rr&&(p=wu(n.doc,p),m=Bd(n.doc,m));var b=p!=a.viewFrom||m!=a.viewTo||a.lastWrapHeight!=i.wrapperHeight||a.lastWrapWidth!=i.wrapperWidth;y1(n,p,m),a.viewOffset=Dr($t(n.doc,a.viewFrom)),n.display.mover.style.top=a.viewOffset+"px";var x=hp(n);if(!b&&x==0&&!i.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var S=P1(n);return x>4&&(a.lineDiv.style.display="none"),R1(n,a.updateLineNumbers,i.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,O1(S),G(a.cursorDiv),G(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,b&&(a.lastWrapHeight=i.wrapperHeight,a.lastWrapWidth=i.wrapperWidth,Fs(n,400)),a.updateLineNumbers=null,!0}function xp(n,i){for(var a=i.viewport,l=!0;;l=!1){if(!l||!n.options.lineWrapping||i.oldDisplayWidth==Gi(n)){if(a&&a.top!=null&&(a={top:Math.min(n.doc.height+ku(n.display)-Cu(n),a.top)}),i.visible=ba(n.display,n.doc,a),i.visible.from>=n.display.viewFrom&&i.visible.to<=n.display.viewTo)break}else l&&(i.visible=ba(n.display,n.doc,a));if(!Hu(n,i))break;ya(n);var u=zs(n);Os(n),Fo(n,u),Wu(n,u),i.force=!1}i.signal(n,"update",n),(n.display.viewFrom!=n.display.reportedViewFrom||n.display.viewTo!=n.display.reportedViewTo)&&(i.signal(n,"viewportChange",n,n.display.viewFrom,n.display.viewTo),n.display.reportedViewFrom=n.display.viewFrom,n.display.reportedViewTo=n.display.viewTo)}function qu(n,i){var a=new xa(n,i);if(Hu(n,a)){ya(n),xp(n,a);var l=zs(n);Os(n),Fo(n,l),Wu(n,l),a.finish()}}function R1(n,i,a){var l=n.display,u=n.options.lineNumbers,p=l.lineDiv,m=p.firstChild;function b(J){var ct=J.nextSibling;return v&&F&&n.display.currentWheelTarget==J?J.style.display="none":J.parentNode.removeChild(J),ct}for(var x=l.view,S=l.viewFrom,N=0;N<x.length;N++){var D=x[N];if(!D.hidden)if(!D.node||D.node.parentNode!=p){var j=a1(n,D,S,a);p.insertBefore(j,m)}else{for(;m!=D.node;)m=b(m);var W=u&&i!=null&&i<=S&&D.lineNumber;D.changes&&(Et(D.changes,"gutter")>-1&&(W=!1),Gd(n,D,S,a)),W&&(G(D.lineNumber),D.lineNumber.appendChild(document.createTextNode(dt(n.options,S)))),m=D.node.nextSibling}S+=D.size}for(;m;)m=b(m)}function Bu(n){var i=n.gutters.offsetWidth;n.sizer.style.marginLeft=i+"px",He(n,"gutterChanged",n)}function Wu(n,i){n.display.sizer.style.minHeight=i.docHeight+"px",n.display.heightForcer.style.top=i.docHeight+"px",n.display.gutters.style.height=i.docHeight+n.display.barHeight+yr(n)+"px"}function _p(n){var i=n.display,a=i.view;if(!(!i.alignWidgets&&(!i.gutters.firstChild||!n.options.fixedGutter))){for(var l=$u(i)-i.scroller.scrollLeft+n.doc.scrollLeft,u=i.gutters.offsetWidth,p=l+"px",m=0;m<a.length;m++)if(!a[m].hidden){n.options.fixedGutter&&(a[m].gutter&&(a[m].gutter.style.left=p),a[m].gutterBackground&&(a[m].gutterBackground.style.left=p));var b=a[m].alignable;if(b)for(var x=0;x<b.length;x++)b[x].style.left=p}n.options.fixedGutter&&(i.gutters.style.left=l+u+"px")}}function Sp(n){if(!n.options.lineNumbers)return!1;var i=n.doc,a=dt(n.options,i.first+i.size-1),l=n.display;if(a.length!=l.lineNumChars){var u=l.measure.appendChild(k("div",[k("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),p=u.firstChild.offsetWidth,m=u.offsetWidth-p;return l.lineGutter.style.width="",l.lineNumInnerWidth=Math.max(p,l.lineGutter.offsetWidth-m)+1,l.lineNumWidth=l.lineNumInnerWidth+m,l.lineNumChars=l.lineNumInnerWidth?a.length:-1,l.lineGutter.style.width=l.lineNumWidth+"px",Bu(n.display),!0}return!1}function Uu(n,i){for(var a=[],l=!1,u=0;u<n.length;u++){var p=n[u],m=null;if(typeof p!="string"&&(m=p.style,p=p.className),p=="CodeMirror-linenumbers")if(i)l=!0;else continue;a.push({className:p,style:m})}return i&&!l&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function kp(n){var i=n.gutters,a=n.gutterSpecs;G(i),n.lineGutter=null;for(var l=0;l<a.length;++l){var u=a[l],p=u.className,m=u.style,b=i.appendChild(k("div",null,"CodeMirror-gutter "+p));m&&(b.style.cssText=m),p=="CodeMirror-linenumbers"&&(n.lineGutter=b,b.style.width=(n.lineNumWidth||1)+"px")}i.style.display=a.length?"":"none",Bu(n)}function Hs(n){kp(n.display),un(n),_p(n)}function D1(n,i,a,l){var u=this;this.input=a,u.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),u.scrollbarFiller.setAttribute("cm-not-content","true"),u.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),u.gutterFiller.setAttribute("cm-not-content","true"),u.lineDiv=q("div",null,"CodeMirror-code"),u.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),u.cursorDiv=k("div",null,"CodeMirror-cursors"),u.measure=k("div",null,"CodeMirror-measure"),u.lineMeasure=k("div",null,"CodeMirror-measure"),u.lineSpace=q("div",[u.measure,u.lineMeasure,u.selectionDiv,u.cursorDiv,u.lineDiv],null,"position: relative; outline: none");var p=q("div",[u.lineSpace],"CodeMirror-lines");u.mover=k("div",[p],null,"position: relative"),u.sizer=k("div",[u.mover],"CodeMirror-sizer"),u.sizerWidth=null,u.heightForcer=k("div",null,null,"position: absolute; height: "+Xt+"px; width: 1px;"),u.gutters=k("div",null,"CodeMirror-gutters"),u.lineGutter=null,u.scroller=k("div",[u.sizer,u.heightForcer,u.gutters],"CodeMirror-scroll"),u.scroller.setAttribute("tabIndex","-1"),u.wrapper=k("div",[u.scrollbarFiller,u.gutterFiller,u.scroller],"CodeMirror"),w&&_>=105&&(u.wrapper.style.clipPath="inset(0px)"),u.wrapper.setAttribute("translate","no"),d&&g<8&&(u.gutters.style.zIndex=-1,u.scroller.style.paddingRight=0),!v&&!(s&&$)&&(u.scroller.draggable=!0),n&&(n.appendChild?n.appendChild(u.wrapper):n(u.wrapper)),u.viewFrom=u.viewTo=i.first,u.reportedViewFrom=u.reportedViewTo=i.first,u.view=[],u.renderedView=null,u.externalMeasured=null,u.viewOffset=0,u.lastWrapHeight=u.lastWrapWidth=0,u.updateLineNumbers=null,u.nativeBarWidth=u.barHeight=u.barWidth=0,u.scrollbarsClipped=!1,u.lineNumWidth=u.lineNumInnerWidth=u.lineNumChars=null,u.alignWidgets=!1,u.cachedCharWidth=u.cachedTextHeight=u.cachedPaddingH=null,u.maxLine=null,u.maxLineLength=0,u.maxLineChanged=!1,u.wheelDX=u.wheelDY=u.wheelStartX=u.wheelStartY=null,u.shift=!1,u.selForContextMenu=null,u.activeTouch=null,u.gutterSpecs=Uu(l.gutters,l.lineNumbers),kp(u),a.init(u)}var _a=0,Ir=null;d?Ir=-.53:s?Ir=15:w?Ir=-.7:M&&(Ir=-1/3);function Cp(n){var i=n.wheelDeltaX,a=n.wheelDeltaY;return i==null&&n.detail&&n.axis==n.HORIZONTAL_AXIS&&(i=n.detail),a==null&&n.detail&&n.axis==n.VERTICAL_AXIS?a=n.detail:a==null&&(a=n.wheelDelta),{x:i,y:a}}function z1(n){var i=Cp(n);return i.x*=Ir,i.y*=Ir,i}function Tp(n,i){w&&_==102&&(n.display.chromeScrollHack==null?n.display.sizer.style.pointerEvents="none":clearTimeout(n.display.chromeScrollHack),n.display.chromeScrollHack=setTimeout(function(){n.display.chromeScrollHack=null,n.display.sizer.style.pointerEvents=""},100));var a=Cp(i),l=a.x,u=a.y,p=Ir;i.deltaMode===0&&(l=i.deltaX,u=i.deltaY,p=1);var m=n.display,b=m.scroller,x=b.scrollWidth>b.clientWidth,S=b.scrollHeight>b.clientHeight;if(l&&x||u&&S){if(u&&F&&v){t:for(var N=i.target,D=m.view;N!=b;N=N.parentNode)for(var j=0;j<D.length;j++)if(D[j].node==N){n.display.currentWheelTarget=N;break t}}if(l&&!s&&!L&&p!=null){u&&S&&Ds(n,Math.max(0,b.scrollTop+u*p)),Zi(n,Math.max(0,b.scrollLeft+l*p)),(!u||u&&S)&&Ze(i),m.wheelStartX=null;return}if(u&&p!=null){var W=u*p,J=n.doc.scrollTop,ct=J+m.wrapper.clientHeight;W<0?J=Math.max(0,J+W-50):ct=Math.min(n.doc.height,ct+W+50),qu(n,{top:J,bottom:ct})}_a<20&&i.deltaMode!==0&&(m.wheelStartX==null?(m.wheelStartX=b.scrollLeft,m.wheelStartY=b.scrollTop,m.wheelDX=l,m.wheelDY=u,setTimeout(function(){if(m.wheelStartX!=null){var gt=b.scrollLeft-m.wheelStartX,wt=b.scrollTop-m.wheelStartY,kt=wt&&m.wheelDY&&wt/m.wheelDY||gt&&m.wheelDX&>/m.wheelDX;m.wheelStartX=m.wheelStartY=null,kt&&(Ir=(Ir*_a+kt)/(_a+1),++_a)}},200)):(m.wheelDX+=l,m.wheelDY+=u))}}var Pn=function(n,i){this.ranges=n,this.primIndex=i};Pn.prototype.primary=function(){return this.ranges[this.primIndex]},Pn.prototype.equals=function(n){if(n==this)return!0;if(n.primIndex!=this.primIndex||n.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var a=this.ranges[i],l=n.ranges[i];if(!ce(a.anchor,l.anchor)||!ce(a.head,l.head))return!1}return!0},Pn.prototype.deepCopy=function(){for(var n=[],i=0;i<this.ranges.length;i++)n[i]=new ue(Fe(this.ranges[i].anchor),Fe(this.ranges[i].head));return new Pn(n,this.primIndex)},Pn.prototype.somethingSelected=function(){for(var n=0;n<this.ranges.length;n++)if(!this.ranges[n].empty())return!0;return!1},Pn.prototype.contains=function(n,i){i||(i=n);for(var a=0;a<this.ranges.length;a++){var l=this.ranges[a];if(St(i,l.from())>=0&&St(n,l.to())<=0)return a}return-1};var ue=function(n,i){this.anchor=n,this.head=i};ue.prototype.from=function(){return No(this.anchor,this.head)},ue.prototype.to=function(){return cn(this.anchor,this.head)},ue.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function rr(n,i,a){var l=n&&n.options.selectionsMayTouch,u=i[a];i.sort(function(j,W){return St(j.from(),W.from())}),a=Et(i,u);for(var p=1;p<i.length;p++){var m=i[p],b=i[p-1],x=St(b.to(),m.from());if(l&&!m.empty()?x>0:x>=0){var S=No(b.from(),m.from()),N=cn(b.to(),m.to()),D=b.empty()?m.from()==m.head:b.from()==b.head;p<=a&&--a,i.splice(--p,2,new ue(D?N:S,D?S:N))}}return new Pn(i,a)}function si(n,i){return new Pn([new ue(n,i||n)],0)}function li(n){return n.text?X(n.from.line+n.text.length-1,at(n.text).length+(n.text.length==1?n.from.ch:0)):n.to}function Ep(n,i){if(St(n,i.from)<0)return n;if(St(n,i.to)<=0)return li(i);var a=n.line+i.text.length-(i.to.line-i.from.line)-1,l=n.ch;return n.line==i.to.line&&(l+=li(i).ch-i.to.ch),X(a,l)}function ju(n,i){for(var a=[],l=0;l<n.sel.ranges.length;l++){var u=n.sel.ranges[l];a.push(new ue(Ep(u.anchor,i),Ep(u.head,i)))}return rr(n.cm,a,n.sel.primIndex)}function Lp(n,i,a){return n.line==i.line?X(a.line,n.ch-i.ch+a.ch):X(a.line+(n.line-i.line),n.ch)}function I1(n,i,a){for(var l=[],u=X(n.first,0),p=u,m=0;m<i.length;m++){var b=i[m],x=Lp(b.from,u,p),S=Lp(li(b),u,p);if(u=b.to,p=S,a=="around"){var N=n.sel.ranges[m],D=St(N.head,N.anchor)<0;l[m]=new ue(D?S:x,D?x:S)}else l[m]=new ue(x,x)}return new Pn(l,n.sel.primIndex)}function Vu(n){n.doc.mode=Lo(n.options,n.doc.modeOption),qs(n)}function qs(n){n.doc.iter(function(i){i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null)}),n.doc.modeFrontier=n.doc.highlightFrontier=n.doc.first,Fs(n,100),n.state.modeGen++,n.curOp&&un(n)}function Ap(n,i){return i.from.ch==0&&i.to.ch==0&&at(i.text)==""&&(!n.cm||n.cm.options.wholeLineUpdateBefore)}function Gu(n,i,a,l){function u(kt){return a?a[kt]:null}function p(kt,xt,Lt){Vw(kt,xt,Lt,l),He(kt,"change",kt,i)}function m(kt,xt){for(var Lt=[],Dt=kt;Dt<xt;++Dt)Lt.push(new $o(S[Dt],u(Dt),l));return Lt}var b=i.from,x=i.to,S=i.text,N=$t(n,b.line),D=$t(n,x.line),j=at(S),W=u(S.length-1),J=x.line-b.line;if(i.full)n.insert(0,m(0,S.length)),n.remove(S.length,n.size-S.length);else if(Ap(n,i)){var ct=m(0,S.length-1);p(D,D.text,W),J&&n.remove(b.line,J),ct.length&&n.insert(b.line,ct)}else if(N==D)if(S.length==1)p(N,N.text.slice(0,b.ch)+j+N.text.slice(x.ch),W);else{var gt=m(1,S.length-1);gt.push(new $o(j+N.text.slice(x.ch),W,l)),p(N,N.text.slice(0,b.ch)+S[0],u(0)),n.insert(b.line+1,gt)}else if(S.length==1)p(N,N.text.slice(0,b.ch)+S[0]+D.text.slice(x.ch),u(0)),n.remove(b.line+1,J);else{p(N,N.text.slice(0,b.ch)+S[0],u(0)),p(D,j+D.text.slice(x.ch),W);var wt=m(1,S.length-1);J>1&&n.remove(b.line+1,J-1),n.insert(b.line+1,wt)}He(n,"change",n,i)}function ai(n,i,a){function l(u,p,m){if(u.linked)for(var b=0;b<u.linked.length;++b){var x=u.linked[b];if(x.doc!=p){var S=m&&x.sharedHist;a&&!S||(i(x.doc,S),l(x.doc,u,S))}}}l(n,null,!0)}function Mp(n,i){if(i.cm)throw new Error("This document is already in use.");n.doc=i,i.cm=n,Pu(n),Vu(n),Np(n),n.options.direction=i.direction,n.options.lineWrapping||_u(n),n.options.mode=i.modeOption,un(n)}function Np(n){(n.doc.direction=="rtl"?Mt:lt)(n.display.lineDiv,"CodeMirror-rtl")}function F1(n){kn(n,function(){Np(n),un(n)})}function Sa(n){this.done=[],this.undone=[],this.undoDepth=n?n.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=n?n.maxGeneration:1}function Ku(n,i){var a={from:Fe(i.from),to:li(i),text:Or(n,i.from,i.to)};return Op(n,a,i.from.line,i.to.line+1),ai(n,function(l){return Op(l,a,i.from.line,i.to.line+1)},!0),a}function $p(n){for(;n.length;){var i=at(n);if(i.ranges)n.pop();else break}}function H1(n,i){if(i)return $p(n.done),at(n.done);if(n.done.length&&!at(n.done).ranges)return at(n.done);if(n.done.length>1&&!n.done[n.done.length-2].ranges)return n.done.pop(),at(n.done)}function Pp(n,i,a,l){var u=n.history;u.undone.length=0;var p=+new Date,m,b;if((u.lastOp==l||u.lastOrigin==i.origin&&i.origin&&(i.origin.charAt(0)=="+"&&u.lastModTime>p-(n.cm?n.cm.options.historyEventDelay:500)||i.origin.charAt(0)=="*"))&&(m=H1(u,u.lastOp==l)))b=at(m.changes),St(i.from,i.to)==0&&St(i.from,b.to)==0?b.to=li(i):m.changes.push(Ku(n,i));else{var x=at(u.done);for((!x||!x.ranges)&&ka(n.sel,u.done),m={changes:[Ku(n,i)],generation:u.generation},u.done.push(m);u.done.length>u.undoDepth;)u.done.shift(),u.done[0].ranges||u.done.shift()}u.done.push(a),u.generation=++u.maxGeneration,u.lastModTime=u.lastSelTime=p,u.lastOp=u.lastSelOp=l,u.lastOrigin=u.lastSelOrigin=i.origin,b||ke(n,"historyAdded")}function q1(n,i,a,l){var u=i.charAt(0);return u=="*"||u=="+"&&a.ranges.length==l.ranges.length&&a.somethingSelected()==l.somethingSelected()&&new Date-n.history.lastSelTime<=(n.cm?n.cm.options.historyEventDelay:500)}function B1(n,i,a,l){var u=n.history,p=l&&l.origin;a==u.lastSelOp||p&&u.lastSelOrigin==p&&(u.lastModTime==u.lastSelTime&&u.lastOrigin==p||q1(n,p,at(u.done),i))?u.done[u.done.length-1]=i:ka(i,u.done),u.lastSelTime=+new Date,u.lastSelOrigin=p,u.lastSelOp=a,l&&l.clearRedo!==!1&&$p(u.undone)}function ka(n,i){var a=at(i);a&&a.ranges&&a.equals(n)||i.push(n)}function Op(n,i,a,l){var u=i["spans_"+n.id],p=0;n.iter(Math.max(n.first,a),Math.min(n.first+n.size,l),function(m){m.markedSpans&&((u||(u=i["spans_"+n.id]={}))[p]=m.markedSpans),++p})}function W1(n){if(!n)return null;for(var i,a=0;a<n.length;++a)n[a].marker.explicitlyCleared?i||(i=n.slice(0,a)):i&&i.push(n[a]);return i?i.length?i:null:n}function U1(n,i){var a=i["spans_"+n.id];if(!a)return null;for(var l=[],u=0;u<i.text.length;++u)l.push(W1(a[u]));return l}function Rp(n,i){var a=U1(n,i),l=yu(n,i);if(!a)return l;if(!l)return a;for(var u=0;u<a.length;++u){var p=a[u],m=l[u];if(p&&m)t:for(var b=0;b<m.length;++b){for(var x=m[b],S=0;S<p.length;++S)if(p[S].marker==x.marker)continue t;p.push(x)}else m&&(a[u]=m)}return a}function Ho(n,i,a){for(var l=[],u=0;u<n.length;++u){var p=n[u];if(p.ranges){l.push(a?Pn.prototype.deepCopy.call(p):p);continue}var m=p.changes,b=[];l.push({changes:b});for(var x=0;x<m.length;++x){var S=m[x],N=void 0;if(b.push({from:S.from,to:S.to,text:S.text}),i)for(var D in S)(N=D.match(/^spans_(\d+)$/))&&Et(i,Number(N[1]))>-1&&(at(b)[D]=S[D],delete S[D])}}return l}function Xu(n,i,a,l){if(l){var u=n.anchor;if(a){var p=St(i,u)<0;p!=St(a,u)<0?(u=i,i=a):p!=St(i,a)<0&&(i=a)}return new ue(u,i)}else return new ue(a||i,i)}function Ca(n,i,a,l,u){u==null&&(u=n.cm&&(n.cm.display.shift||n.extend)),Je(n,new Pn([Xu(n.sel.primary(),i,a,u)],0),l)}function Dp(n,i,a){for(var l=[],u=n.cm&&(n.cm.display.shift||n.extend),p=0;p<n.sel.ranges.length;p++)l[p]=Xu(n.sel.ranges[p],i[p],null,u);var m=rr(n.cm,l,n.sel.primIndex);Je(n,m,a)}function Yu(n,i,a,l){var u=n.sel.ranges.slice(0);u[i]=a,Je(n,rr(n.cm,u,n.sel.primIndex),l)}function zp(n,i,a,l){Je(n,si(i,a),l)}function j1(n,i,a){var l={ranges:i.ranges,update:function(u){this.ranges=[];for(var p=0;p<u.length;p++)this.ranges[p]=new ue(Ut(n,u[p].anchor),Ut(n,u[p].head))},origin:a&&a.origin};return ke(n,"beforeSelectionChange",n,l),n.cm&&ke(n.cm,"beforeSelectionChange",n.cm,l),l.ranges!=i.ranges?rr(n.cm,l.ranges,l.ranges.length-1):i}function Ip(n,i,a){var l=n.history.done,u=at(l);u&&u.ranges?(l[l.length-1]=i,Ta(n,i,a)):Je(n,i,a)}function Je(n,i,a){Ta(n,i,a),B1(n,n.sel,n.cm?n.cm.curOp.id:NaN,a)}function Ta(n,i,a){(Sn(n,"beforeSelectionChange")||n.cm&&Sn(n.cm,"beforeSelectionChange"))&&(i=j1(n,i,a));var l=a&&a.bias||(St(i.primary().head,n.sel.primary().head)<0?-1:1);Fp(n,qp(n,i,l,!0)),!(a&&a.scroll===!1)&&n.cm&&n.cm.getOption("readOnly")!="nocursor"&&Io(n.cm)}function Fp(n,i){i.equals(n.sel)||(n.sel=i,n.cm&&(n.cm.curOp.updateInput=1,n.cm.curOp.selectionChanged=!0,Fn(n.cm)),He(n,"cursorActivity",n))}function Hp(n){Fp(n,qp(n,n.sel,null,!1))}function qp(n,i,a,l){for(var u,p=0;p<i.ranges.length;p++){var m=i.ranges[p],b=i.ranges.length==n.sel.ranges.length&&n.sel.ranges[p],x=Ea(n,m.anchor,b&&b.anchor,a,l),S=m.head==m.anchor?x:Ea(n,m.head,b&&b.head,a,l);(u||x!=m.anchor||S!=m.head)&&(u||(u=i.ranges.slice(0,p)),u[p]=new ue(x,S))}return u?rr(n.cm,u,i.primIndex):i}function qo(n,i,a,l,u){var p=$t(n,i.line);if(p.markedSpans)for(var m=0;m<p.markedSpans.length;++m){var b=p.markedSpans[m],x=b.marker,S="selectLeft"in x?!x.selectLeft:x.inclusiveLeft,N="selectRight"in x?!x.selectRight:x.inclusiveRight;if((b.from==null||(S?b.from<=i.ch:b.from<i.ch))&&(b.to==null||(N?b.to>=i.ch:b.to>i.ch))){if(u&&(ke(x,"beforeCursorEnter"),x.explicitlyCleared))if(p.markedSpans){--m;continue}else break;if(!x.atomic)continue;if(a){var D=x.find(l<0?1:-1),j=void 0;if((l<0?N:S)&&(D=Bp(n,D,-l,D&&D.line==i.line?p:null)),D&&D.line==i.line&&(j=St(D,a))&&(l<0?j<0:j>0))return qo(n,D,i,l,u)}var W=x.find(l<0?-1:1);return(l<0?S:N)&&(W=Bp(n,W,l,W.line==i.line?p:null)),W?qo(n,W,i,l,u):null}}return i}function Ea(n,i,a,l,u){var p=l||1,m=qo(n,i,a,p,u)||!u&&qo(n,i,a,p,!0)||qo(n,i,a,-p,u)||!u&&qo(n,i,a,-p,!0);return m||(n.cantEdit=!0,X(n.first,0))}function Bp(n,i,a,l){return a<0&&i.ch==0?i.line>n.first?Ut(n,X(i.line-1)):null:a>0&&i.ch==(l||$t(n,i.line)).text.length?i.line<n.first+n.size-1?X(i.line+1,0):null:new X(i.line,i.ch+a)}function Wp(n){n.setSelection(X(n.firstLine(),0),X(n.lastLine()),z)}function Up(n,i,a){var l={canceled:!1,from:i.from,to:i.to,text:i.text,origin:i.origin,cancel:function(){return l.canceled=!0}};return a&&(l.update=function(u,p,m,b){u&&(l.from=Ut(n,u)),p&&(l.to=Ut(n,p)),m&&(l.text=m),b!==void 0&&(l.origin=b)}),ke(n,"beforeChange",n,l),n.cm&&ke(n.cm,"beforeChange",n.cm,l),l.canceled?(n.cm&&(n.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function Bo(n,i,a){if(n.cm){if(!n.cm.curOp)return qe(n.cm,Bo)(n,i,a);if(n.cm.state.suppressEdits)return}if(!((Sn(n,"beforeChange")||n.cm&&Sn(n.cm,"beforeChange"))&&(i=Up(n,i,!0),!i))){var l=Rd&&!a&&Bw(n,i.from,i.to);if(l)for(var u=l.length-1;u>=0;--u)jp(n,{from:l[u].from,to:l[u].to,text:u?[""]:i.text,origin:i.origin});else jp(n,i)}}function jp(n,i){if(!(i.text.length==1&&i.text[0]==""&&St(i.from,i.to)==0)){var a=ju(n,i);Pp(n,i,a,n.cm?n.cm.curOp.id:NaN),Bs(n,i,a,yu(n,i));var l=[];ai(n,function(u,p){!p&&Et(l,u.history)==-1&&(Xp(u.history,i),l.push(u.history)),Bs(u,i,null,yu(u,i))})}}function La(n,i,a){var l=n.cm&&n.cm.state.suppressEdits;if(!(l&&!a)){for(var u=n.history,p,m=n.sel,b=i=="undo"?u.done:u.undone,x=i=="undo"?u.undone:u.done,S=0;S<b.length&&(p=b[S],!(a?p.ranges&&!p.equals(n.sel):!p.ranges));S++);if(S!=b.length){for(u.lastOrigin=u.lastSelOrigin=null;;)if(p=b.pop(),p.ranges){if(ka(p,x),a&&!p.equals(n.sel)){Je(n,p,{clearRedo:!1});return}m=p}else if(l){b.push(p);return}else break;var N=[];ka(m,x),x.push({changes:N,generation:u.generation}),u.generation=p.generation||++u.maxGeneration;for(var D=Sn(n,"beforeChange")||n.cm&&Sn(n.cm,"beforeChange"),j=function(ct){var gt=p.changes[ct];if(gt.origin=i,D&&!Up(n,gt,!1))return b.length=0,{};N.push(Ku(n,gt));var wt=ct?ju(n,gt):at(b);Bs(n,gt,wt,Rp(n,gt)),!ct&&n.cm&&n.cm.scrollIntoView({from:gt.from,to:li(gt)});var kt=[];ai(n,function(xt,Lt){!Lt&&Et(kt,xt.history)==-1&&(Xp(xt.history,gt),kt.push(xt.history)),Bs(xt,gt,null,Rp(xt,gt))})},W=p.changes.length-1;W>=0;--W){var J=j(W);if(J)return J.v}}}}function Vp(n,i){if(i!=0&&(n.first+=i,n.sel=new Pn(bt(n.sel.ranges,function(u){return new ue(X(u.anchor.line+i,u.anchor.ch),X(u.head.line+i,u.head.ch))}),n.sel.primIndex),n.cm)){un(n.cm,n.first,n.first-i,i);for(var a=n.cm.display,l=a.viewFrom;l<a.viewTo;l++)ii(n.cm,l,"gutter")}}function Bs(n,i,a,l){if(n.cm&&!n.cm.curOp)return qe(n.cm,Bs)(n,i,a,l);if(i.to.line<n.first){Vp(n,i.text.length-1-(i.to.line-i.from.line));return}if(!(i.from.line>n.lastLine())){if(i.from.line<n.first){var u=i.text.length-1-(n.first-i.from.line);Vp(n,u),i={from:X(n.first,0),to:X(i.to.line+u,i.to.ch),text:[at(i.text)],origin:i.origin}}var p=n.lastLine();i.to.line>p&&(i={from:i.from,to:X(p,$t(n,p).text.length),text:[i.text[0]],origin:i.origin}),i.removed=Or(n,i.from,i.to),a||(a=ju(n,i)),n.cm?V1(n.cm,i,l):Gu(n,i,l),Ta(n,a,z),n.cantEdit&&Ea(n,X(n.firstLine(),0))&&(n.cantEdit=!1)}}function V1(n,i,a){var l=n.doc,u=n.display,p=i.from,m=i.to,b=!1,x=p.line;n.options.lineWrapping||(x=C(er($t(l,p.line))),l.iter(x,m.line+1,function(W){if(W==u.maxLine)return b=!0,!0})),l.sel.contains(i.from,i.to)>-1&&Fn(n),Gu(l,i,a,fp(n)),n.options.lineWrapping||(l.iter(x,p.line+i.text.length,function(W){var J=fa(W);J>u.maxLineLength&&(u.maxLine=W,u.maxLineLength=J,u.maxLineChanged=!0,b=!1)}),b&&(n.curOp.updateMaxLine=!0)),Rw(l,p.line),Fs(n,400);var S=i.text.length-(m.line-p.line)-1;i.full?un(n):p.line==m.line&&i.text.length==1&&!Ap(n.doc,i)?ii(n,p.line,"text"):un(n,p.line,m.line+1,S);var N=Sn(n,"changes"),D=Sn(n,"change");if(D||N){var j={from:p,to:m,text:i.text,removed:i.removed,origin:i.origin};D&&He(n,"change",n,j),N&&(n.curOp.changeObjs||(n.curOp.changeObjs=[])).push(j)}n.display.selForContextMenu=null}function Wo(n,i,a,l,u){var p;l||(l=a),St(l,a)<0&&(p=[l,a],a=p[0],l=p[1]),typeof i=="string"&&(i=n.splitLines(i)),Bo(n,{from:a,to:l,text:i,origin:u})}function Gp(n,i,a,l){a<n.line?n.line+=l:i<n.line&&(n.line=i,n.ch=0)}function Kp(n,i,a,l){for(var u=0;u<n.length;++u){var p=n[u],m=!0;if(p.ranges){p.copied||(p=n[u]=p.deepCopy(),p.copied=!0);for(var b=0;b<p.ranges.length;b++)Gp(p.ranges[b].anchor,i,a,l),Gp(p.ranges[b].head,i,a,l);continue}for(var x=0;x<p.changes.length;++x){var S=p.changes[x];if(a<S.from.line)S.from=X(S.from.line+l,S.from.ch),S.to=X(S.to.line+l,S.to.ch);else if(i<=S.to.line){m=!1;break}}m||(n.splice(0,u+1),u=0)}}function Xp(n,i){var a=i.from.line,l=i.to.line,u=i.text.length-(l-a)-1;Kp(n.done,a,l,u),Kp(n.undone,a,l,u)}function Ws(n,i,a,l){var u=i,p=i;return typeof i=="number"?p=$t(n,Td(n,i)):u=C(i),u==null?null:(l(p,u)&&n.cm&&ii(n.cm,u,a),p)}function Us(n){this.lines=n,this.parent=null;for(var i=0,a=0;a<n.length;++a)n[a].parent=this,i+=n[a].height;this.height=i}Us.prototype={chunkSize:function(){return this.lines.length},removeInner:function(n,i){for(var a=n,l=n+i;a<l;++a){var u=this.lines[a];this.height-=u.height,Gw(u),He(u,"delete")}this.lines.splice(n,i)},collapse:function(n){n.push.apply(n,this.lines)},insertInner:function(n,i,a){this.height+=a,this.lines=this.lines.slice(0,n).concat(i).concat(this.lines.slice(n));for(var l=0;l<i.length;++l)i[l].parent=this},iterN:function(n,i,a){for(var l=n+i;n<l;++n)if(a(this.lines[n]))return!0}};function js(n){this.children=n;for(var i=0,a=0,l=0;l<n.length;++l){var u=n[l];i+=u.chunkSize(),a+=u.height,u.parent=this}this.size=i,this.height=a,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(n,i){this.size-=i;for(var a=0;a<this.children.length;++a){var l=this.children[a],u=l.chunkSize();if(n<u){var p=Math.min(i,u-n),m=l.height;if(l.removeInner(n,p),this.height-=m-l.height,u==p&&(this.children.splice(a--,1),l.parent=null),(i-=p)==0)break;n=0}else n-=u}if(this.size-i<25&&(this.children.length>1||!(this.children[0]instanceof Us))){var b=[];this.collapse(b),this.children=[new Us(b)],this.children[0].parent=this}},collapse:function(n){for(var i=0;i<this.children.length;++i)this.children[i].collapse(n)},insertInner:function(n,i,a){this.size+=i.length,this.height+=a;for(var l=0;l<this.children.length;++l){var u=this.children[l],p=u.chunkSize();if(n<=p){if(u.insertInner(n,i,a),u.lines&&u.lines.length>50){for(var m=u.lines.length%25+25,b=m;b<u.lines.length;){var x=new Us(u.lines.slice(b,b+=25));u.height-=x.height,this.children.splice(++l,0,x),x.parent=this}u.lines=u.lines.slice(0,m),this.maybeSpill()}break}n-=p}},maybeSpill:function(){if(!(this.children.length<=10)){var n=this;do{var i=n.children.splice(n.children.length-5,5),a=new js(i);if(n.parent){n.size-=a.size,n.height-=a.height;var u=Et(n.parent.children,n);n.parent.children.splice(u+1,0,a)}else{var l=new js(n.children);l.parent=n,n.children=[l,a],n=l}a.parent=n.parent}while(n.children.length>10);n.parent.maybeSpill()}},iterN:function(n,i,a){for(var l=0;l<this.children.length;++l){var u=this.children[l],p=u.chunkSize();if(n<p){var m=Math.min(i,p-n);if(u.iterN(n,m,a))return!0;if((i-=m)==0)break;n=0}else n-=p}}};var Vs=function(n,i,a){if(a)for(var l in a)a.hasOwnProperty(l)&&(this[l]=a[l]);this.doc=n,this.node=i};Vs.prototype.clear=function(){var n=this.doc.cm,i=this.line.widgets,a=this.line,l=C(a);if(!(l==null||!i)){for(var u=0;u<i.length;++u)i[u]==this&&i.splice(u--,1);i.length||(a.widgets=null);var p=$s(this);$n(a,Math.max(0,a.height-p)),n&&(kn(n,function(){Yp(n,a,-p),ii(n,l,"widget")}),He(n,"lineWidgetCleared",n,this,l))}},Vs.prototype.changed=function(){var n=this,i=this.height,a=this.doc.cm,l=this.line;this.height=null;var u=$s(this)-i;u&&(ri(this.doc,l)||$n(l,l.height+u),a&&kn(a,function(){a.curOp.forceUpdate=!0,Yp(a,l,u),He(a,"lineWidgetChanged",a,n,C(l))}))},Yn(Vs);function Yp(n,i,a){Dr(i)<(n.curOp&&n.curOp.scrollTop||n.doc.scrollTop)&&Fu(n,a)}function G1(n,i,a,l){var u=new Vs(n,a,l),p=n.cm;return p&&u.noHScroll&&(p.display.alignWidgets=!0),Ws(n,i,"widget",function(m){var b=m.widgets||(m.widgets=[]);if(u.insertAt==null?b.push(u):b.splice(Math.min(b.length,Math.max(0,u.insertAt)),0,u),u.line=m,p&&!ri(n,m)){var x=Dr(m)<n.scrollTop;$n(m,m.height+$s(u)),x&&Fu(p,u.height),p.curOp.forceUpdate=!0}return!0}),p&&He(p,"lineWidgetAdded",p,u,typeof i=="number"?i:C(i)),u}var Zp=0,ci=function(n,i){this.lines=[],this.type=i,this.doc=n,this.id=++Zp};ci.prototype.clear=function(){if(!this.explicitlyCleared){var n=this.doc.cm,i=n&&!n.curOp;if(i&&Qi(n),Sn(this,"clear")){var a=this.find();a&&He(this,"clear",a.from,a.to)}for(var l=null,u=null,p=0;p<this.lines.length;++p){var m=this.lines[p],b=As(m.markedSpans,this);n&&!this.collapsed?ii(n,C(m),"text"):n&&(b.to!=null&&(u=C(m)),b.from!=null&&(l=C(m))),m.markedSpans=Iw(m.markedSpans,b),b.from==null&&this.collapsed&&!ri(this.doc,m)&&n&&$n(m,Ro(n.display))}if(n&&this.collapsed&&!n.options.lineWrapping)for(var x=0;x<this.lines.length;++x){var S=er(this.lines[x]),N=fa(S);N>n.display.maxLineLength&&(n.display.maxLine=S,n.display.maxLineLength=N,n.display.maxLineChanged=!0)}l!=null&&n&&this.collapsed&&un(n,l,u+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,n&&Hp(n.doc)),n&&He(n,"markerCleared",n,this,l,u),i&&to(n),this.parent&&this.parent.clear()}},ci.prototype.find=function(n,i){n==null&&this.type=="bookmark"&&(n=1);for(var a,l,u=0;u<this.lines.length;++u){var p=this.lines[u],m=As(p.markedSpans,this);if(m.from!=null&&(a=X(i?p:C(p),m.from),n==-1))return a;if(m.to!=null&&(l=X(i?p:C(p),m.to),n==1))return l}return a&&{from:a,to:l}},ci.prototype.changed=function(){var n=this,i=this.find(-1,!0),a=this,l=this.doc.cm;!i||!l||kn(l,function(){var u=i.line,p=C(i.line),m=Tu(l,p);if(m&&(rp(m),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!ri(a.doc,u)&&a.height!=null){var b=a.height;a.height=null;var x=$s(a)-b;x&&$n(u,u.height+x)}He(l,"markerChanged",l,n)})},ci.prototype.attachLine=function(n){if(!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(!i.maybeHiddenMarkers||Et(i.maybeHiddenMarkers,this)==-1)&&(i.maybeUnhiddenMarkers||(i.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(n)},ci.prototype.detachLine=function(n){if(this.lines.splice(Et(this.lines,n),1),!this.lines.length&&this.doc.cm){var i=this.doc.cm.curOp;(i.maybeHiddenMarkers||(i.maybeHiddenMarkers=[])).push(this)}},Yn(ci);function Uo(n,i,a,l,u){if(l&&l.shared)return K1(n,i,a,l,u);if(n.cm&&!n.cm.curOp)return qe(n.cm,Uo)(n,i,a,l,u);var p=new ci(n,u),m=St(i,a);if(l&&it(l,p,!1),m>0||m==0&&p.clearWhenEmpty!==!1)return p;if(p.replacedWith&&(p.collapsed=!0,p.widgetNode=q("span",[p.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||p.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(p.widgetNode.insertLeft=!0)),p.collapsed){if(qd(n,i.line,i,a,p)||i.line!=a.line&&qd(n,a.line,i,a,p))throw new Error("Inserting collapsed marker partially overlapping an existing one");zw()}p.addToHistory&&Pp(n,{from:i,to:a,origin:"markText"},n.sel,NaN);var b=i.line,x=n.cm,S;if(n.iter(b,a.line+1,function(D){x&&p.collapsed&&!x.options.lineWrapping&&er(D)==x.display.maxLine&&(S=!0),p.collapsed&&b!=i.line&&$n(D,0),Fw(D,new la(p,b==i.line?i.ch:null,b==a.line?a.ch:null),n.cm&&n.cm.curOp),++b}),p.collapsed&&n.iter(i.line,a.line+1,function(D){ri(n,D)&&$n(D,0)}),p.clearOnEnter&&Rt(p,"beforeCursorEnter",function(){return p.clear()}),p.readOnly&&(Dw(),(n.history.done.length||n.history.undone.length)&&n.clearHistory()),p.collapsed&&(p.id=++Zp,p.atomic=!0),x){if(S&&(x.curOp.updateMaxLine=!0),p.collapsed)un(x,i.line,a.line+1);else if(p.className||p.startStyle||p.endStyle||p.css||p.attributes||p.title)for(var N=i.line;N<=a.line;N++)ii(x,N,"text");p.atomic&&Hp(x.doc),He(x,"markerAdded",x,p)}return p}var Gs=function(n,i){this.markers=n,this.primary=i;for(var a=0;a<n.length;++a)n[a].parent=this};Gs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var n=0;n<this.markers.length;++n)this.markers[n].clear();He(this,"clear")}},Gs.prototype.find=function(n,i){return this.primary.find(n,i)},Yn(Gs);function K1(n,i,a,l,u){l=it(l),l.shared=!1;var p=[Uo(n,i,a,l,u)],m=p[0],b=l.widgetNode;return ai(n,function(x){b&&(l.widgetNode=b.cloneNode(!0)),p.push(Uo(x,Ut(x,i),Ut(x,a),l,u));for(var S=0;S<x.linked.length;++S)if(x.linked[S].isParent)return;m=at(p)}),new Gs(p,m)}function Jp(n){return n.findMarks(X(n.first,0),n.clipPos(X(n.lastLine())),function(i){return i.parent})}function X1(n,i){for(var a=0;a<i.length;a++){var l=i[a],u=l.find(),p=n.clipPos(u.from),m=n.clipPos(u.to);if(St(p,m)){var b=Uo(n,p,m,l.primary,l.primary.type);l.markers.push(b),b.parent=l}}}function Y1(n){for(var i=function(l){var u=n[l],p=[u.primary.doc];ai(u.primary.doc,function(x){return p.push(x)});for(var m=0;m<u.markers.length;m++){var b=u.markers[m];Et(p,b.doc)==-1&&(b.parent=null,u.markers.splice(m--,1))}},a=0;a<n.length;a++)i(a)}var Z1=0,fn=function(n,i,a,l,u){if(!(this instanceof fn))return new fn(n,i,a,l,u);a==null&&(a=0),js.call(this,[new Us([new $o("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var p=X(a,0);this.sel=si(p),this.history=new Sa(null),this.id=++Z1,this.modeOption=i,this.lineSep=l,this.direction=u=="rtl"?"rtl":"ltr",this.extend=!1,typeof n=="string"&&(n=this.splitLines(n)),Gu(this,{from:p,to:p,text:n}),Je(this,si(p),z)};fn.prototype=zt(js.prototype,{constructor:fn,iter:function(n,i,a){a?this.iterN(n-this.first,i-n,a):this.iterN(this.first,this.first+this.size,n)},insert:function(n,i){for(var a=0,l=0;l<i.length;++l)a+=i[l].height;this.insertInner(n-this.first,i,a)},remove:function(n,i){this.removeInner(n-this.first,i)},getValue:function(n){var i=Es(this,this.first,this.first+this.size);return n===!1?i:i.join(n||this.lineSeparator())},setValue:Be(function(n){var i=X(this.first,0),a=this.first+this.size-1;Bo(this,{from:i,to:X(a,$t(this,a).text.length),text:this.splitLines(n),origin:"setValue",full:!0},!0),this.cm&&Rs(this.cm,0,0),Je(this,si(i),z)}),replaceRange:function(n,i,a,l){i=Ut(this,i),a=a?Ut(this,a):i,Wo(this,n,i,a,l)},getRange:function(n,i,a){var l=Or(this,Ut(this,n),Ut(this,i));return a===!1?l:a===""?l.join(""):l.join(a||this.lineSeparator())},getLine:function(n){var i=this.getLineHandle(n);return i&&i.text},getLineHandle:function(n){if(nt(this,n))return $t(this,n)},getLineNumber:function(n){return C(n)},getLineHandleVisualStart:function(n){return typeof n=="number"&&(n=$t(this,n)),er(n)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(n){return Ut(this,n)},getCursor:function(n){var i=this.sel.primary(),a;return n==null||n=="head"?a=i.head:n=="anchor"?a=i.anchor:n=="end"||n=="to"||n===!1?a=i.to():a=i.from(),a},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Be(function(n,i,a){zp(this,Ut(this,typeof n=="number"?X(n,i||0):n),null,a)}),setSelection:Be(function(n,i,a){zp(this,Ut(this,n),Ut(this,i||n),a)}),extendSelection:Be(function(n,i,a){Ca(this,Ut(this,n),i&&Ut(this,i),a)}),extendSelections:Be(function(n,i){Dp(this,Ed(this,n),i)}),extendSelectionsBy:Be(function(n,i){var a=bt(this.sel.ranges,n);Dp(this,Ed(this,a),i)}),setSelections:Be(function(n,i,a){if(n.length){for(var l=[],u=0;u<n.length;u++)l[u]=new ue(Ut(this,n[u].anchor),Ut(this,n[u].head||n[u].anchor));i==null&&(i=Math.min(n.length-1,this.sel.primIndex)),Je(this,rr(this.cm,l,i),a)}}),addSelection:Be(function(n,i,a){var l=this.sel.ranges.slice(0);l.push(new ue(Ut(this,n),Ut(this,i||n))),Je(this,rr(this.cm,l,l.length-1),a)}),getSelection:function(n){for(var i=this.sel.ranges,a,l=0;l<i.length;l++){var u=Or(this,i[l].from(),i[l].to());a=a?a.concat(u):u}return n===!1?a:a.join(n||this.lineSeparator())},getSelections:function(n){for(var i=[],a=this.sel.ranges,l=0;l<a.length;l++){var u=Or(this,a[l].from(),a[l].to());n!==!1&&(u=u.join(n||this.lineSeparator())),i[l]=u}return i},replaceSelection:function(n,i,a){for(var l=[],u=0;u<this.sel.ranges.length;u++)l[u]=n;this.replaceSelections(l,i,a||"+input")},replaceSelections:Be(function(n,i,a){for(var l=[],u=this.sel,p=0;p<u.ranges.length;p++){var m=u.ranges[p];l[p]={from:m.from(),to:m.to(),text:this.splitLines(n[p]),origin:a}}for(var b=i&&i!="end"&&I1(this,l,i),x=l.length-1;x>=0;x--)Bo(this,l[x]);b?Ip(this,b):this.cm&&Io(this.cm)}),undo:Be(function(){La(this,"undo")}),redo:Be(function(){La(this,"redo")}),undoSelection:Be(function(){La(this,"undo",!0)}),redoSelection:Be(function(){La(this,"redo",!0)}),setExtending:function(n){this.extend=n},getExtending:function(){return this.extend},historySize:function(){for(var n=this.history,i=0,a=0,l=0;l<n.done.length;l++)n.done[l].ranges||++i;for(var u=0;u<n.undone.length;u++)n.undone[u].ranges||++a;return{undo:i,redo:a}},clearHistory:function(){var n=this;this.history=new Sa(this.history),ai(this,function(i){return i.history=n.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(n){return n&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(n){return this.history.generation==(n||this.cleanGeneration)},getHistory:function(){return{done:Ho(this.history.done),undone:Ho(this.history.undone)}},setHistory:function(n){var i=this.history=new Sa(this.history);i.done=Ho(n.done.slice(0),null,!0),i.undone=Ho(n.undone.slice(0),null,!0)},setGutterMarker:Be(function(n,i,a){return Ws(this,n,"gutter",function(l){var u=l.gutterMarkers||(l.gutterMarkers={});return u[i]=a,!a&&le(u)&&(l.gutterMarkers=null),!0})}),clearGutter:Be(function(n){var i=this;this.iter(function(a){a.gutterMarkers&&a.gutterMarkers[n]&&Ws(i,a,"gutter",function(){return a.gutterMarkers[n]=null,le(a.gutterMarkers)&&(a.gutterMarkers=null),!0})})}),lineInfo:function(n){var i;if(typeof n=="number"){if(!nt(this,n)||(i=n,n=$t(this,n),!n))return null}else if(i=C(n),i==null)return null;return{line:i,handle:n,text:n.text,gutterMarkers:n.gutterMarkers,textClass:n.textClass,bgClass:n.bgClass,wrapClass:n.wrapClass,widgets:n.widgets}},addLineClass:Be(function(n,i,a){return Ws(this,n,i=="gutter"?"gutter":"class",function(l){var u=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass";if(!l[u])l[u]=a;else{if(ut(a).test(l[u]))return!1;l[u]+=" "+a}return!0})}),removeLineClass:Be(function(n,i,a){return Ws(this,n,i=="gutter"?"gutter":"class",function(l){var u=i=="text"?"textClass":i=="background"?"bgClass":i=="gutter"?"gutterClass":"wrapClass",p=l[u];if(p)if(a==null)l[u]=null;else{var m=p.match(ut(a));if(!m)return!1;var b=m.index+m[0].length;l[u]=p.slice(0,m.index)+(!m.index||b==p.length?"":" ")+p.slice(b)||null}else return!1;return!0})}),addLineWidget:Be(function(n,i,a){return G1(this,n,i,a)}),removeLineWidget:function(n){n.clear()},markText:function(n,i,a){return Uo(this,Ut(this,n),Ut(this,i),a,a&&a.type||"range")},setBookmark:function(n,i){var a={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:!1,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};return n=Ut(this,n),Uo(this,n,n,a,"bookmark")},findMarksAt:function(n){n=Ut(this,n);var i=[],a=$t(this,n.line).markedSpans;if(a)for(var l=0;l<a.length;++l){var u=a[l];(u.from==null||u.from<=n.ch)&&(u.to==null||u.to>=n.ch)&&i.push(u.marker.parent||u.marker)}return i},findMarks:function(n,i,a){n=Ut(this,n),i=Ut(this,i);var l=[],u=n.line;return this.iter(n.line,i.line+1,function(p){var m=p.markedSpans;if(m)for(var b=0;b<m.length;b++){var x=m[b];!(x.to!=null&&u==n.line&&n.ch>=x.to||x.from==null&&u!=n.line||x.from!=null&&u==i.line&&x.from>=i.ch)&&(!a||a(x.marker))&&l.push(x.marker.parent||x.marker)}++u}),l},getAllMarks:function(){var n=[];return this.iter(function(i){var a=i.markedSpans;if(a)for(var l=0;l<a.length;++l)a[l].from!=null&&n.push(a[l].marker)}),n},posFromIndex:function(n){var i,a=this.first,l=this.lineSeparator().length;return this.iter(function(u){var p=u.text.length+l;if(p>n)return i=n,!0;n-=p,++a}),Ut(this,X(a,i))},indexFromPos:function(n){n=Ut(this,n);var i=n.ch;if(n.line<this.first||n.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,n.line,function(l){i+=l.text.length+a}),i},copy:function(n){var i=new fn(Es(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return i.scrollTop=this.scrollTop,i.scrollLeft=this.scrollLeft,i.sel=this.sel,i.extend=!1,n&&(i.history.undoDepth=this.history.undoDepth,i.setHistory(this.getHistory())),i},linkedDoc:function(n){n||(n={});var i=this.first,a=this.first+this.size;n.from!=null&&n.from>i&&(i=n.from),n.to!=null&&n.to<a&&(a=n.to);var l=new fn(Es(this,i,a),n.mode||this.modeOption,i,this.lineSep,this.direction);return n.sharedHist&&(l.history=this.history),(this.linked||(this.linked=[])).push({doc:l,sharedHist:n.sharedHist}),l.linked=[{doc:this,isParent:!0,sharedHist:n.sharedHist}],X1(l,Jp(this)),l},unlinkDoc:function(n){if(n instanceof we&&(n=n.doc),this.linked)for(var i=0;i<this.linked.length;++i){var a=this.linked[i];if(a.doc==n){this.linked.splice(i,1),n.unlinkDoc(this),Y1(Jp(this));break}}if(n.history==this.history){var l=[n.id];ai(n,function(u){return l.push(u.id)},!0),n.history=new Sa(null),n.history.done=Ho(this.history.done,l),n.history.undone=Ho(this.history.undone,l)}},iterLinkedDocs:function(n){ai(this,n)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(n){return this.lineSep?n.split(this.lineSep):Hn(n)},lineSeparator:function(){return this.lineSep||`
|
|
35
|
+
`},setDirection:Be(function(n){n!="rtl"&&(n="ltr"),n!=this.direction&&(this.direction=n,this.iter(function(i){return i.order=null}),this.cm&&F1(this.cm))})}),fn.prototype.eachLine=fn.prototype.iter;var Qp=0;function J1(n){var i=this;if(tg(i),!(Ce(i,n)||zr(i.display,n))){Ze(n),d&&(Qp=+new Date);var a=Xi(i,n,!0),l=n.dataTransfer.files;if(!(!a||i.isReadOnly()))if(l&&l.length&&window.FileReader&&window.File)for(var u=l.length,p=Array(u),m=0,b=function(){++m==u&&qe(i,function(){a=Ut(i.doc,a);var W={from:a,to:a,text:i.doc.splitLines(p.filter(function(J){return J!=null}).join(i.doc.lineSeparator())),origin:"paste"};Bo(i.doc,W),Ip(i.doc,si(Ut(i.doc,a),Ut(i.doc,li(W))))})()},x=function(W,J){if(i.options.allowDropFileTypes&&Et(i.options.allowDropFileTypes,W.type)==-1){b();return}var ct=new FileReader;ct.onerror=function(){return b()},ct.onload=function(){var gt=ct.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(gt)){b();return}p[J]=gt,b()},ct.readAsText(W)},S=0;S<l.length;S++)x(l[S],S);else{if(i.state.draggingText&&i.doc.sel.contains(a)>-1){i.state.draggingText(n),setTimeout(function(){return i.display.input.focus()},20);return}try{var N=n.dataTransfer.getData("Text");if(N){var D;if(i.state.draggingText&&!i.state.draggingText.copy&&(D=i.listSelections()),Ta(i.doc,si(a,a)),D)for(var j=0;j<D.length;++j)Wo(i.doc,"",D[j].anchor,D[j].head,"drag");i.replaceSelection(N,"around","paste"),i.display.input.focus()}}catch{}}}}function Q1(n,i){if(d&&(!n.state.draggingText||+new Date-Qp<100)){Qr(i);return}if(!(Ce(n,i)||zr(n.display,i))&&(i.dataTransfer.setData("Text",n.getSelection()),i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setDragImage&&!M)){var a=k("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",L&&(a.width=a.height=1,n.display.wrapper.appendChild(a),a._top=a.offsetTop),i.dataTransfer.setDragImage(a,0,0),L&&a.parentNode.removeChild(a)}}function tx(n,i){var a=Xi(n,i);if(a){var l=document.createDocumentFragment();Ou(n,a,l),n.display.dragCursor||(n.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),n.display.lineSpace.insertBefore(n.display.dragCursor,n.display.cursorDiv)),I(n.display.dragCursor,l)}}function tg(n){n.display.dragCursor&&(n.display.lineSpace.removeChild(n.display.dragCursor),n.display.dragCursor=null)}function eg(n){if(document.getElementsByClassName){for(var i=document.getElementsByClassName("CodeMirror"),a=[],l=0;l<i.length;l++){var u=i[l].CodeMirror;u&&a.push(u)}a.length&&a[0].operation(function(){for(var p=0;p<a.length;p++)n(a[p])})}}var ng=!1;function ex(){ng||(nx(),ng=!0)}function nx(){var n;Rt(window,"resize",function(){n==null&&(n=setTimeout(function(){n=null,eg(rx)},100))}),Rt(window,"blur",function(){return eg(zo)})}function rx(n){var i=n.display;i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.scrollbarsClipped=!1,n.setSize()}for(var ui={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ks=0;Ks<10;Ks++)ui[Ks+48]=ui[Ks+96]=String(Ks);for(var Aa=65;Aa<=90;Aa++)ui[Aa]=String.fromCharCode(Aa);for(var Xs=1;Xs<=12;Xs++)ui[Xs+111]=ui[Xs+63235]="F"+Xs;var Fr={};Fr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fr.default=F?Fr.macDefault:Fr.pcDefault;function ix(n){var i=n.split(/-(?!$)/);n=i[i.length-1];for(var a,l,u,p,m=0;m<i.length-1;m++){var b=i[m];if(/^(cmd|meta|m)$/i.test(b))p=!0;else if(/^a(lt)?$/i.test(b))a=!0;else if(/^(c|ctrl|control)$/i.test(b))l=!0;else if(/^s(hift)?$/i.test(b))u=!0;else throw new Error("Unrecognized modifier name: "+b)}return a&&(n="Alt-"+n),l&&(n="Ctrl-"+n),p&&(n="Cmd-"+n),u&&(n="Shift-"+n),n}function ox(n){var i={};for(var a in n)if(n.hasOwnProperty(a)){var l=n[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if(l=="..."){delete n[a];continue}for(var u=bt(a.split(" "),ix),p=0;p<u.length;p++){var m=void 0,b=void 0;p==u.length-1?(b=u.join(" "),m=l):(b=u.slice(0,p+1).join(" "),m="...");var x=i[b];if(!x)i[b]=m;else if(x!=m)throw new Error("Inconsistent bindings for "+b)}delete n[a]}for(var S in i)n[S]=i[S];return n}function jo(n,i,a,l){i=Ma(i);var u=i.call?i.call(n,l):i[n];if(u===!1)return"nothing";if(u==="...")return"multi";if(u!=null&&a(u))return"handled";if(i.fallthrough){if(Object.prototype.toString.call(i.fallthrough)!="[object Array]")return jo(n,i.fallthrough,a,l);for(var p=0;p<i.fallthrough.length;p++){var m=jo(n,i.fallthrough[p],a,l);if(m)return m}}}function rg(n){var i=typeof n=="string"?n:ui[n.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function ig(n,i,a){var l=n;return i.altKey&&l!="Alt"&&(n="Alt-"+n),(ht?i.metaKey:i.ctrlKey)&&l!="Ctrl"&&(n="Ctrl-"+n),(ht?i.ctrlKey:i.metaKey)&&l!="Mod"&&(n="Cmd-"+n),!a&&i.shiftKey&&l!="Shift"&&(n="Shift-"+n),n}function og(n,i){if(L&&n.keyCode==34&&n.char)return!1;var a=ui[n.keyCode];return a==null||n.altGraphKey?!1:(n.keyCode==3&&n.code&&(a=n.code),ig(a,n,i))}function Ma(n){return typeof n=="string"?Fr[n]:n}function Vo(n,i){for(var a=n.doc.sel.ranges,l=[],u=0;u<a.length;u++){for(var p=i(a[u]);l.length&&St(p.from,at(l).to)<=0;){var m=l.pop();if(St(m.from,p.from)<0){p.from=m.from;break}}l.push(p)}kn(n,function(){for(var b=l.length-1;b>=0;b--)Wo(n.doc,"",l[b].from,l[b].to,"+delete");Io(n)})}function Zu(n,i,a){var l=ze(n.text,i+a,a);return l<0||l>n.text.length?null:l}function Ju(n,i,a){var l=Zu(n,i.ch,a);return l==null?null:new X(i.line,l,a<0?"after":"before")}function Qu(n,i,a,l,u){if(n){i.doc.direction=="rtl"&&(u=-u);var p=Bt(a,i.doc.direction);if(p){var m=u<0?at(p):p[0],b=u<0==(m.level==1),x=b?"after":"before",S;if(m.level>0||i.doc.direction=="rtl"){var N=Oo(i,a);S=u<0?a.text.length-1:0;var D=br(i,N,S).top;S=Ke(function(j){return br(i,N,j).top==D},u<0==(m.level==1)?m.from:m.to-1,S),x=="before"&&(S=Zu(a,S,1))}else S=u<0?m.to:m.from;return new X(l,S,x)}}return new X(l,u<0?a.text.length:0,u<0?"before":"after")}function sx(n,i,a,l){var u=Bt(i,n.doc.direction);if(!u)return Ju(i,a,l);a.ch>=i.text.length?(a.ch=i.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var p=Xn(u,a.ch,a.sticky),m=u[p];if(n.doc.direction=="ltr"&&m.level%2==0&&(l>0?m.to>a.ch:m.from<a.ch))return Ju(i,a,l);var b=function(wt,kt){return Zu(i,wt instanceof X?wt.ch:wt,kt)},x,S=function(wt){return n.options.lineWrapping?(x=x||Oo(n,i),up(n,i,x,wt)):{begin:0,end:i.text.length}},N=S(a.sticky=="before"?b(a,-1):a.ch);if(n.doc.direction=="rtl"||m.level==1){var D=m.level==1==l<0,j=b(a,D?1:-1);if(j!=null&&(D?j<=m.to&&j<=N.end:j>=m.from&&j>=N.begin)){var W=D?"before":"after";return new X(a.line,j,W)}}var J=function(wt,kt,xt){for(var Lt=function(ve,We){return We?new X(a.line,b(ve,1),"before"):new X(a.line,ve,"after")};wt>=0&&wt<u.length;wt+=kt){var Dt=u[wt],Pt=kt>0==(Dt.level!=1),Jt=Pt?xt.begin:b(xt.end,-1);if(Dt.from<=Jt&&Jt<Dt.to||(Jt=Pt?Dt.from:b(Dt.to,-1),xt.begin<=Jt&&Jt<xt.end))return Lt(Jt,Pt)}},ct=J(p+l,l,N);if(ct)return ct;var gt=l>0?N.end:b(N.begin,-1);return gt!=null&&!(l>0&>==i.text.length)&&(ct=J(l>0?0:u.length-1,l,S(gt)),ct)?ct:null}var Ys={selectAll:Wp,singleSelection:function(n){return n.setSelection(n.getCursor("anchor"),n.getCursor("head"),z)},killLine:function(n){return Vo(n,function(i){if(i.empty()){var a=$t(n.doc,i.head.line).text.length;return i.head.ch==a&&i.head.line<n.lastLine()?{from:i.head,to:X(i.head.line+1,0)}:{from:i.head,to:X(i.head.line,a)}}else return{from:i.from(),to:i.to()}})},deleteLine:function(n){return Vo(n,function(i){return{from:X(i.from().line,0),to:Ut(n.doc,X(i.to().line+1,0))}})},delLineLeft:function(n){return Vo(n,function(i){return{from:X(i.from().line,0),to:i.from()}})},delWrappedLineLeft:function(n){return Vo(n,function(i){var a=n.charCoords(i.head,"div").top+5,l=n.coordsChar({left:0,top:a},"div");return{from:l,to:i.from()}})},delWrappedLineRight:function(n){return Vo(n,function(i){var a=n.charCoords(i.head,"div").top+5,l=n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:a},"div");return{from:i.from(),to:l}})},undo:function(n){return n.undo()},redo:function(n){return n.redo()},undoSelection:function(n){return n.undoSelection()},redoSelection:function(n){return n.redoSelection()},goDocStart:function(n){return n.extendSelection(X(n.firstLine(),0))},goDocEnd:function(n){return n.extendSelection(X(n.lastLine()))},goLineStart:function(n){return n.extendSelectionsBy(function(i){return sg(n,i.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(n){return n.extendSelectionsBy(function(i){return lg(n,i.head)},{origin:"+move",bias:1})},goLineEnd:function(n){return n.extendSelectionsBy(function(i){return lx(n,i.head.line)},{origin:"+move",bias:-1})},goLineRight:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5;return n.coordsChar({left:n.display.lineDiv.offsetWidth+100,top:a},"div")},ot)},goLineLeft:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5;return n.coordsChar({left:0,top:a},"div")},ot)},goLineLeftSmart:function(n){return n.extendSelectionsBy(function(i){var a=n.cursorCoords(i.head,"div").top+5,l=n.coordsChar({left:0,top:a},"div");return l.ch<n.getLine(l.line).search(/\S/)?lg(n,i.head):l},ot)},goLineUp:function(n){return n.moveV(-1,"line")},goLineDown:function(n){return n.moveV(1,"line")},goPageUp:function(n){return n.moveV(-1,"page")},goPageDown:function(n){return n.moveV(1,"page")},goCharLeft:function(n){return n.moveH(-1,"char")},goCharRight:function(n){return n.moveH(1,"char")},goColumnLeft:function(n){return n.moveH(-1,"column")},goColumnRight:function(n){return n.moveH(1,"column")},goWordLeft:function(n){return n.moveH(-1,"word")},goGroupRight:function(n){return n.moveH(1,"group")},goGroupLeft:function(n){return n.moveH(-1,"group")},goWordRight:function(n){return n.moveH(1,"word")},delCharBefore:function(n){return n.deleteH(-1,"codepoint")},delCharAfter:function(n){return n.deleteH(1,"char")},delWordBefore:function(n){return n.deleteH(-1,"word")},delWordAfter:function(n){return n.deleteH(1,"word")},delGroupBefore:function(n){return n.deleteH(-1,"group")},delGroupAfter:function(n){return n.deleteH(1,"group")},indentAuto:function(n){return n.indentSelection("smart")},indentMore:function(n){return n.indentSelection("add")},indentLess:function(n){return n.indentSelection("subtract")},insertTab:function(n){return n.replaceSelection(" ")},insertSoftTab:function(n){for(var i=[],a=n.listSelections(),l=n.options.tabSize,u=0;u<a.length;u++){var p=a[u].from(),m=ft(n.getLine(p.line),p.ch,l);i.push(Ct(l-m%l))}n.replaceSelections(i)},defaultTab:function(n){n.somethingSelected()?n.indentSelection("add"):n.execCommand("insertTab")},transposeChars:function(n){return kn(n,function(){for(var i=n.listSelections(),a=[],l=0;l<i.length;l++)if(i[l].empty()){var u=i[l].head,p=$t(n.doc,u.line).text;if(p){if(u.ch==p.length&&(u=new X(u.line,u.ch-1)),u.ch>0)u=new X(u.line,u.ch+1),n.replaceRange(p.charAt(u.ch-1)+p.charAt(u.ch-2),X(u.line,u.ch-2),u,"+transpose");else if(u.line>n.doc.first){var m=$t(n.doc,u.line-1).text;m&&(u=new X(u.line,1),n.replaceRange(p.charAt(0)+n.doc.lineSeparator()+m.charAt(m.length-1),X(u.line-1,m.length-1),u,"+transpose"))}}a.push(new ue(u,u))}n.setSelections(a)})},newlineAndIndent:function(n){return kn(n,function(){for(var i=n.listSelections(),a=i.length-1;a>=0;a--)n.replaceRange(n.doc.lineSeparator(),i[a].anchor,i[a].head,"+input");i=n.listSelections();for(var l=0;l<i.length;l++)n.indentLine(i[l].from().line,null,!0);Io(n)})},openLine:function(n){return n.replaceSelection(`
|
|
36
|
+
`,"start")},toggleOverwrite:function(n){return n.toggleOverwrite()}};function sg(n,i){var a=$t(n.doc,i),l=er(a);return l!=a&&(i=C(l)),Qu(!0,n,l,i,1)}function lx(n,i){var a=$t(n.doc,i),l=Uw(a);return l!=a&&(i=C(l)),Qu(!0,n,a,i,-1)}function lg(n,i){var a=sg(n,i.line),l=$t(n.doc,a.line),u=Bt(l,n.doc.direction);if(!u||u[0].level==0){var p=Math.max(a.ch,l.text.search(/\S/)),m=i.line==a.line&&i.ch<=p&&i.ch;return X(a.line,m?0:p,a.sticky)}return a}function Na(n,i,a){if(typeof i=="string"&&(i=Ys[i],!i))return!1;n.display.input.ensurePolled();var l=n.display.shift,u=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),a&&(n.display.shift=!1),u=i(n)!=O}finally{n.display.shift=l,n.state.suppressEdits=!1}return u}function ax(n,i,a){for(var l=0;l<n.state.keyMaps.length;l++){var u=jo(i,n.state.keyMaps[l],a,n);if(u)return u}return n.options.extraKeys&&jo(i,n.options.extraKeys,a,n)||jo(i,n.options.keyMap,a,n)}var cx=new Nt;function Zs(n,i,a,l){var u=n.state.keySeq;if(u){if(rg(i))return"handled";if(/\'$/.test(i)?n.state.keySeq=null:cx.set(50,function(){n.state.keySeq==u&&(n.state.keySeq=null,n.display.input.reset())}),ag(n,u+" "+i,a,l))return!0}return ag(n,i,a,l)}function ag(n,i,a,l){var u=ax(n,i,l);return u=="multi"&&(n.state.keySeq=i),u=="handled"&&He(n,"keyHandled",n,i,a),(u=="handled"||u=="multi")&&(Ze(a),Ru(n)),!!u}function cg(n,i){var a=og(i,!0);return a?i.shiftKey&&!n.state.keySeq?Zs(n,"Shift-"+a,i,function(l){return Na(n,l,!0)})||Zs(n,a,i,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return Na(n,l)}):Zs(n,a,i,function(l){return Na(n,l)}):!1}function ux(n,i,a){return Zs(n,"'"+a+"'",i,function(l){return Na(n,l,!0)})}var tf=null;function ug(n){var i=this;if(!(n.target&&n.target!=i.display.input.getField())&&(i.curOp.focus=mt(ee(i)),!Ce(i,n))){d&&g<11&&n.keyCode==27&&(n.returnValue=!1);var a=n.keyCode;i.display.shift=a==16||n.shiftKey;var l=cg(i,n);L&&(tf=l?a:null,!l&&a==88&&!oa&&(F?n.metaKey:n.ctrlKey)&&i.replaceSelection("",null,"cut")),s&&!F&&!l&&a==46&&n.shiftKey&&!n.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)&&fx(i)}}function fx(n){var i=n.display.lineDiv;Mt(i,"CodeMirror-crosshair");function a(l){(l.keyCode==18||!l.altKey)&&(lt(i,"CodeMirror-crosshair"),Ye(document,"keyup",a),Ye(document,"mouseover",a))}Rt(document,"keyup",a),Rt(document,"mouseover",a)}function fg(n){n.keyCode==16&&(this.doc.sel.shift=!1),Ce(this,n)}function hg(n){var i=this;if(!(n.target&&n.target!=i.display.input.getField())&&!(zr(i.display,n)||Ce(i,n)||n.ctrlKey&&!n.altKey||F&&n.metaKey)){var a=n.keyCode,l=n.charCode;if(L&&a==tf){tf=null,Ze(n);return}if(!(L&&(!n.which||n.which<10)&&cg(i,n))){var u=String.fromCharCode(l??a);u!="\b"&&(ux(i,n,u)||i.display.input.onKeyPress(n))}}}var hx=400,ef=function(n,i,a){this.time=n,this.pos=i,this.button=a};ef.prototype.compare=function(n,i,a){return this.time+hx>n&&St(i,this.pos)==0&&a==this.button};var Js,Qs;function dx(n,i){var a=+new Date;return Qs&&Qs.compare(a,n,i)?(Js=Qs=null,"triple"):Js&&Js.compare(a,n,i)?(Qs=new ef(a,n,i),Js=null,"double"):(Js=new ef(a,n,i),Qs=null,"single")}function dg(n){var i=this,a=i.display;if(!(Ce(i,n)||a.activeTouch&&a.input.supportsTouch())){if(a.input.ensurePolled(),a.shift=n.shiftKey,zr(a,n)){v||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(!nf(i,n)){var l=Xi(i,n),u=Zn(n),p=l?dx(l,u):"single";Tt(i).focus(),u==1&&i.state.selectingText&&i.state.selectingText(n),!(l&&px(i,u,l,p,n))&&(u==1?l?vx(i,l,p,n):ks(n)==a.scroller&&Ze(n):u==2?(l&&Ca(i.doc,l),setTimeout(function(){return a.input.focus()},20)):u==3&&(Z?i.display.input.onContextMenu(n):Du(i)))}}}function px(n,i,a,l,u){var p="Click";return l=="double"?p="Double"+p:l=="triple"&&(p="Triple"+p),p=(i==1?"Left":i==2?"Middle":"Right")+p,Zs(n,ig(p,u),u,function(m){if(typeof m=="string"&&(m=Ys[m]),!m)return!1;var b=!1;try{n.isReadOnly()&&(n.state.suppressEdits=!0),b=m(n,a)!=O}finally{n.state.suppressEdits=!1}return b})}function gx(n,i,a){var l=n.getOption("configureMouse"),u=l?l(n,i,a):{};if(u.unit==null){var p=H?a.shiftKey&&a.metaKey:a.altKey;u.unit=p?"rectangle":i=="single"?"char":i=="double"?"word":"line"}return(u.extend==null||n.doc.extend)&&(u.extend=n.doc.extend||a.shiftKey),u.addNew==null&&(u.addNew=F?a.metaKey:a.ctrlKey),u.moveOnDrag==null&&(u.moveOnDrag=!(F?a.altKey:a.ctrlKey)),u}function vx(n,i,a,l){d?setTimeout(V(pp,n),0):n.curOp.focus=mt(ee(n));var u=gx(n,a,l),p=n.doc.sel,m;n.options.dragDrop&&pu&&!n.isReadOnly()&&a=="single"&&(m=p.contains(i))>-1&&(St((m=p.ranges[m]).from(),i)<0||i.xRel>0)&&(St(m.to(),i)>0||i.xRel<0)?mx(n,l,i,u):yx(n,l,i,u)}function mx(n,i,a,l){var u=n.display,p=!1,m=qe(n,function(S){v&&(u.scroller.draggable=!1),n.state.draggingText=!1,n.state.delayingBlurEvent&&(n.hasFocus()?n.state.delayingBlurEvent=!1:Du(n)),Ye(u.wrapper.ownerDocument,"mouseup",m),Ye(u.wrapper.ownerDocument,"mousemove",b),Ye(u.scroller,"dragstart",x),Ye(u.scroller,"drop",m),p||(Ze(S),l.addNew||Ca(n.doc,a,null,null,l.extend),v&&!M||d&&g==9?setTimeout(function(){u.wrapper.ownerDocument.body.focus({preventScroll:!0}),u.input.focus()},20):u.input.focus())}),b=function(S){p=p||Math.abs(i.clientX-S.clientX)+Math.abs(i.clientY-S.clientY)>=10},x=function(){return p=!0};v&&(u.scroller.draggable=!0),n.state.draggingText=m,m.copy=!l.moveOnDrag,Rt(u.wrapper.ownerDocument,"mouseup",m),Rt(u.wrapper.ownerDocument,"mousemove",b),Rt(u.scroller,"dragstart",x),Rt(u.scroller,"drop",m),n.state.delayingBlurEvent=!0,setTimeout(function(){return u.input.focus()},20),u.scroller.dragDrop&&u.scroller.dragDrop()}function pg(n,i,a){if(a=="char")return new ue(i,i);if(a=="word")return n.findWordAt(i);if(a=="line")return new ue(X(i.line,0),Ut(n.doc,X(i.line+1,0)));var l=a(n,i);return new ue(l.from,l.to)}function yx(n,i,a,l){d&&Du(n);var u=n.display,p=n.doc;Ze(i);var m,b,x=p.sel,S=x.ranges;if(l.addNew&&!l.extend?(b=p.sel.contains(a),b>-1?m=S[b]:m=new ue(a,a)):(m=p.sel.primary(),b=p.sel.primIndex),l.unit=="rectangle")l.addNew||(m=new ue(a,a)),a=Xi(n,i,!0,!0),b=-1;else{var N=pg(n,a,l.unit);l.extend?m=Xu(m,N.anchor,N.head,l.extend):m=N}l.addNew?b==-1?(b=S.length,Je(p,rr(n,S.concat([m]),b),{scroll:!1,origin:"*mouse"})):S.length>1&&S[b].empty()&&l.unit=="char"&&!l.extend?(Je(p,rr(n,S.slice(0,b).concat(S.slice(b+1)),0),{scroll:!1,origin:"*mouse"}),x=p.sel):Yu(p,b,m,K):(b=0,Je(p,new Pn([m],0),K),x=p.sel);var D=a;function j(xt){if(St(D,xt)!=0)if(D=xt,l.unit=="rectangle"){for(var Lt=[],Dt=n.options.tabSize,Pt=ft($t(p,a.line).text,a.ch,Dt),Jt=ft($t(p,xt.line).text,xt.ch,Dt),ve=Math.min(Pt,Jt),We=Math.max(Pt,Jt),_e=Math.min(a.line,xt.line),Cn=Math.min(n.lastLine(),Math.max(a.line,xt.line));_e<=Cn;_e++){var hn=$t(p,_e).text,Me=rt(hn,ve,Dt);ve==We?Lt.push(new ue(X(_e,Me),X(_e,Me))):hn.length>Me&&Lt.push(new ue(X(_e,Me),X(_e,rt(hn,We,Dt))))}Lt.length||Lt.push(new ue(a,a)),Je(p,rr(n,x.ranges.slice(0,b).concat(Lt),b),{origin:"*mouse",scroll:!1}),n.scrollIntoView(xt)}else{var dn=m,Ve=pg(n,xt,l.unit),Ie=dn.anchor,Ne;St(Ve.anchor,Ie)>0?(Ne=Ve.head,Ie=No(dn.from(),Ve.anchor)):(Ne=Ve.anchor,Ie=cn(dn.to(),Ve.head));var Ee=x.ranges.slice(0);Ee[b]=bx(n,new ue(Ut(p,Ie),Ne)),Je(p,rr(n,Ee,b),K)}}var W=u.wrapper.getBoundingClientRect(),J=0;function ct(xt){var Lt=++J,Dt=Xi(n,xt,!0,l.unit=="rectangle");if(Dt)if(St(Dt,D)!=0){n.curOp.focus=mt(ee(n)),j(Dt);var Pt=ba(u,p);(Dt.line>=Pt.to||Dt.line<Pt.from)&&setTimeout(qe(n,function(){J==Lt&&ct(xt)}),150)}else{var Jt=xt.clientY<W.top?-20:xt.clientY>W.bottom?20:0;Jt&&setTimeout(qe(n,function(){J==Lt&&(u.scroller.scrollTop+=Jt,ct(xt))}),50)}}function gt(xt){n.state.selectingText=!1,J=1/0,xt&&(Ze(xt),u.input.focus()),Ye(u.wrapper.ownerDocument,"mousemove",wt),Ye(u.wrapper.ownerDocument,"mouseup",kt),p.history.lastSelOrigin=null}var wt=qe(n,function(xt){xt.buttons===0||!Zn(xt)?gt(xt):ct(xt)}),kt=qe(n,gt);n.state.selectingText=kt,Rt(u.wrapper.ownerDocument,"mousemove",wt),Rt(u.wrapper.ownerDocument,"mouseup",kt)}function bx(n,i){var a=i.anchor,l=i.head,u=$t(n.doc,a.line);if(St(a,l)==0&&a.sticky==l.sticky)return i;var p=Bt(u);if(!p)return i;var m=Xn(p,a.ch,a.sticky),b=p[m];if(b.from!=a.ch&&b.to!=a.ch)return i;var x=m+(b.from==a.ch==(b.level!=1)?0:1);if(x==0||x==p.length)return i;var S;if(l.line!=a.line)S=(l.line-a.line)*(n.doc.direction=="ltr"?1:-1)>0;else{var N=Xn(p,l.ch,l.sticky),D=N-m||(l.ch-a.ch)*(b.level==1?-1:1);N==x-1||N==x?S=D<0:S=D>0}var j=p[x+(S?-1:0)],W=S==(j.level==1),J=W?j.from:j.to,ct=W?"after":"before";return a.ch==J&&a.sticky==ct?i:new ue(new X(a.line,J,ct),l)}function gg(n,i,a,l){var u,p;if(i.touches)u=i.touches[0].clientX,p=i.touches[0].clientY;else try{u=i.clientX,p=i.clientY}catch{return!1}if(u>=Math.floor(n.display.gutters.getBoundingClientRect().right))return!1;l&&Ze(i);var m=n.display,b=m.lineDiv.getBoundingClientRect();if(p>b.bottom||!Sn(n,a))return an(i);p-=b.top-m.viewOffset;for(var x=0;x<n.display.gutterSpecs.length;++x){var S=m.gutters.childNodes[x];if(S&&S.getBoundingClientRect().right>=u){var N=R(n.doc,p),D=n.display.gutterSpecs[x];return ke(n,a,n,N,D.className,i),an(i)}}}function nf(n,i){return gg(n,i,"gutterClick",!0)}function vg(n,i){zr(n.display,i)||wx(n,i)||Ce(n,i,"contextmenu")||Z||n.display.input.onContextMenu(i)}function wx(n,i){return Sn(n,"gutterContextMenu")?gg(n,i,"gutterContextMenu",!1):!1}function mg(n){n.display.wrapper.className=n.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+n.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ps(n)}var Go={toString:function(){return"CodeMirror.Init"}},yg={},$a={};function xx(n){var i=n.optionHandlers;function a(l,u,p,m){n.defaults[l]=u,p&&(i[l]=m?function(b,x,S){S!=Go&&p(b,x,S)}:p)}n.defineOption=a,n.Init=Go,a("value","",function(l,u){return l.setValue(u)},!0),a("mode",null,function(l,u){l.doc.modeOption=u,Vu(l)},!0),a("indentUnit",2,Vu,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(l){qs(l),Ps(l),un(l)},!0),a("lineSeparator",null,function(l,u){if(l.doc.lineSep=u,!!u){var p=[],m=l.doc.first;l.doc.iter(function(x){for(var S=0;;){var N=x.text.indexOf(u,S);if(N==-1)break;S=N+u.length,p.push(X(m,N))}m++});for(var b=p.length-1;b>=0;b--)Wo(l.doc,u,p[b],X(p[b].line,p[b].ch+u.length))}}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(l,u,p){l.state.specialChars=new RegExp(u.source+(u.test(" ")?"":"| "),"g"),p!=Go&&l.refresh()}),a("specialCharPlaceholder",Yw,function(l){return l.refresh()},!0),a("electricChars",!0),a("inputStyle",$?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(l,u){return l.getInputField().spellcheck=u},!0),a("autocorrect",!1,function(l,u){return l.getInputField().autocorrect=u},!0),a("autocapitalize",!1,function(l,u){return l.getInputField().autocapitalize=u},!0),a("rtlMoveVisually",!st),a("wholeLineUpdateBefore",!0),a("theme","default",function(l){mg(l),Hs(l)},!0),a("keyMap","default",function(l,u,p){var m=Ma(u),b=p!=Go&&Ma(p);b&&b.detach&&b.detach(l,m),m.attach&&m.attach(l,b||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Sx,!0),a("gutters",[],function(l,u){l.display.gutterSpecs=Uu(u,l.options.lineNumbers),Hs(l)},!0),a("fixedGutter",!0,function(l,u){l.display.gutters.style.left=u?$u(l.display)+"px":"0",l.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(l){return Fo(l)},!0),a("scrollbarStyle","native",function(l){wp(l),Fo(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),a("lineNumbers",!1,function(l,u){l.display.gutterSpecs=Uu(l.options.gutters,u),Hs(l)},!0),a("firstLineNumber",1,Hs,!0),a("lineNumberFormatter",function(l){return l},Hs,!0),a("showCursorWhenSelecting",!1,Os,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(l,u){u=="nocursor"&&(zo(l),l.display.input.blur()),l.display.input.readOnlyChanged(u)}),a("screenReaderLabel",null,function(l,u){u=u===""?null:u,l.display.input.screenReaderLabelChanged(u)}),a("disableInput",!1,function(l,u){u||l.display.input.reset()},!0),a("dragDrop",!0,_x),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Os,!0),a("singleCursorHeightPerLine",!0,Os,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qs,!0),a("addModeClass",!1,qs,!0),a("pollInterval",100),a("undoDepth",200,function(l,u){return l.doc.history.undoDepth=u}),a("historyEventDelay",1250),a("viewportMargin",10,function(l){return l.refresh()},!0),a("maxHighlightLength",1e4,qs,!0),a("moveInputWithCursor",!0,function(l,u){u||l.display.input.resetPosition()}),a("tabindex",null,function(l,u){return l.display.input.getField().tabIndex=u||""}),a("autofocus",null),a("direction","ltr",function(l,u){return l.doc.setDirection(u)},!0),a("phrases",null)}function _x(n,i,a){var l=a&&a!=Go;if(!i!=!l){var u=n.display.dragFunctions,p=i?Rt:Ye;p(n.display.scroller,"dragstart",u.start),p(n.display.scroller,"dragenter",u.enter),p(n.display.scroller,"dragover",u.over),p(n.display.scroller,"dragleave",u.leave),p(n.display.scroller,"drop",u.drop)}}function Sx(n){n.options.lineWrapping?(Mt(n.display.wrapper,"CodeMirror-wrap"),n.display.sizer.style.minWidth="",n.display.sizerWidth=null):(lt(n.display.wrapper,"CodeMirror-wrap"),_u(n)),Pu(n),un(n),Ps(n),setTimeout(function(){return Fo(n)},100)}function we(n,i){var a=this;if(!(this instanceof we))return new we(n,i);this.options=i=i?it(i):{},it(yg,i,!1);var l=i.value;typeof l=="string"?l=new fn(l,i.mode,null,i.lineSeparator,i.direction):i.mode&&(l.modeOption=i.mode),this.doc=l;var u=new we.inputStyles[i.inputStyle](this),p=this.display=new D1(n,l,u,i);p.wrapper.CodeMirror=this,mg(this),i.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wp(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Nt,keySeq:null,specialChars:null},i.autofocus&&!$&&p.input.focus(),d&&g<11&&setTimeout(function(){return a.display.input.reset(!0)},20),kx(this),ex(),Qi(this),this.curOp.forceUpdate=!0,Mp(this,l),i.autofocus&&!$||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&zu(a)},20):zo(this);for(var m in $a)$a.hasOwnProperty(m)&&$a[m](this,i[m],Go);Sp(this),i.finishInit&&i.finishInit(this);for(var b=0;b<rf.length;++b)rf[b](this);to(this),v&&i.lineWrapping&&getComputedStyle(p.lineDiv).textRendering=="optimizelegibility"&&(p.lineDiv.style.textRendering="auto")}we.defaults=yg,we.optionHandlers=$a;function kx(n){var i=n.display;Rt(i.scroller,"mousedown",qe(n,dg)),d&&g<11?Rt(i.scroller,"dblclick",qe(n,function(x){if(!Ce(n,x)){var S=Xi(n,x);if(!(!S||nf(n,x)||zr(n.display,x))){Ze(x);var N=n.findWordAt(S);Ca(n.doc,N.anchor,N.head)}}})):Rt(i.scroller,"dblclick",function(x){return Ce(n,x)||Ze(x)}),Rt(i.scroller,"contextmenu",function(x){return vg(n,x)}),Rt(i.input.getField(),"contextmenu",function(x){i.scroller.contains(x.target)||vg(n,x)});var a,l={end:0};function u(){i.activeTouch&&(a=setTimeout(function(){return i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function p(x){if(x.touches.length!=1)return!1;var S=x.touches[0];return S.radiusX<=1&&S.radiusY<=1}function m(x,S){if(S.left==null)return!0;var N=S.left-x.left,D=S.top-x.top;return N*N+D*D>20*20}Rt(i.scroller,"touchstart",function(x){if(!Ce(n,x)&&!p(x)&&!nf(n,x)){i.input.ensurePolled(),clearTimeout(a);var S=+new Date;i.activeTouch={start:S,moved:!1,prev:S-l.end<=300?l:null},x.touches.length==1&&(i.activeTouch.left=x.touches[0].pageX,i.activeTouch.top=x.touches[0].pageY)}}),Rt(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Rt(i.scroller,"touchend",function(x){var S=i.activeTouch;if(S&&!zr(i,x)&&S.left!=null&&!S.moved&&new Date-S.start<300){var N=n.coordsChar(i.activeTouch,"page"),D;!S.prev||m(S,S.prev)?D=new ue(N,N):!S.prev.prev||m(S,S.prev.prev)?D=n.findWordAt(N):D=new ue(X(N.line,0),Ut(n.doc,X(N.line+1,0))),n.setSelection(D.anchor,D.head),n.focus(),Ze(x)}u()}),Rt(i.scroller,"touchcancel",u),Rt(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Ds(n,i.scroller.scrollTop),Zi(n,i.scroller.scrollLeft,!0),ke(n,"scroll",n))}),Rt(i.scroller,"mousewheel",function(x){return Tp(n,x)}),Rt(i.scroller,"DOMMouseScroll",function(x){return Tp(n,x)}),Rt(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(x){Ce(n,x)||Qr(x)},over:function(x){Ce(n,x)||(tx(n,x),Qr(x))},start:function(x){return Q1(n,x)},drop:qe(n,J1),leave:function(x){Ce(n,x)||tg(n)}};var b=i.input.getField();Rt(b,"keyup",function(x){return fg.call(n,x)}),Rt(b,"keydown",qe(n,ug)),Rt(b,"keypress",qe(n,hg)),Rt(b,"focus",function(x){return zu(n,x)}),Rt(b,"blur",function(x){return zo(n,x)})}var rf=[];we.defineInitHook=function(n){return rf.push(n)};function tl(n,i,a,l){var u=n.doc,p;a==null&&(a="add"),a=="smart"&&(u.mode.indent?p=Ls(n,i).state:a="prev");var m=n.options.tabSize,b=$t(u,i),x=ft(b.text,null,m);b.stateAfter&&(b.stateAfter=null);var S=b.text.match(/^\s*/)[0],N;if(!l&&!/\S/.test(b.text))N=0,a="not";else if(a=="smart"&&(N=u.mode.indent(p,b.text.slice(S.length),b.text),N==O||N>150)){if(!l)return;a="prev"}a=="prev"?i>u.first?N=ft($t(u,i-1).text,null,m):N=0:a=="add"?N=x+n.options.indentUnit:a=="subtract"?N=x-n.options.indentUnit:typeof a=="number"&&(N=x+a),N=Math.max(0,N);var D="",j=0;if(n.options.indentWithTabs)for(var W=Math.floor(N/m);W;--W)j+=m,D+=" ";if(j<N&&(D+=Ct(N-j)),D!=S)return Wo(u,D,X(i,0),X(i,S.length),"+input"),b.stateAfter=null,!0;for(var J=0;J<u.sel.ranges.length;J++){var ct=u.sel.ranges[J];if(ct.head.line==i&&ct.head.ch<S.length){var gt=X(i,S.length);Yu(u,J,new ue(gt,gt));break}}}var ir=null;function Pa(n){ir=n}function of(n,i,a,l,u){var p=n.doc;n.display.shift=!1,l||(l=p.sel);var m=+new Date-200,b=u=="paste"||n.state.pasteIncoming>m,x=Hn(i),S=null;if(b&&l.ranges.length>1)if(ir&&ir.text.join(`
|
|
37
37
|
`)==i){if(l.ranges.length%ir.text.length==0){S=[];for(var N=0;N<ir.text.length;N++)S.push(p.splitLines(ir.text[N]))}}else x.length==l.ranges.length&&n.options.pasteLinesPerSelection&&(S=bt(x,function(wt){return[wt]}));for(var D=n.curOp.updateInput,j=l.ranges.length-1;j>=0;j--){var W=l.ranges[j],J=W.from(),ct=W.to();W.empty()&&(a&&a>0?J=X(J.line,J.ch-a):n.state.overwrite&&!b?ct=X(ct.line,Math.min($t(p,ct.line).text.length,ct.ch+at(x).length)):b&&ir&&ir.lineWise&&ir.text.join(`
|
|
38
38
|
`)==x.join(`
|
|
39
|
-
`)&&(J=ct=X(J.line,0)));var gt={from:J,to:ct,text:S?S[j%S.length]:x,origin:u||(b?"paste":n.state.cutIncoming>m?"cut":"+input")};Bo(n.doc,gt),He(n,"inputRead",n,gt)}i&&!b&&wg(n,i),Io(n),n.curOp.updateInput<2&&(n.curOp.updateInput=D),n.curOp.typing=!0,n.state.pasteIncoming=n.state.cutIncoming=-1}function bg(n,i){var a=n.clipboardData&&n.clipboardData.getData("Text");if(a)return n.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&i.hasFocus()&&Sn(i,function(){return of(i,a,0,null,"paste")}),!0}function wg(n,i){if(!(!n.options.electricChars||!n.options.smartIndent))for(var a=n.doc.sel,l=a.ranges.length-1;l>=0;l--){var u=a.ranges[l];if(!(u.head.ch>100||l&&a.ranges[l-1].head.line==u.head.line)){var p=n.getModeAt(u.head),m=!1;if(p.electricChars){for(var b=0;b<p.electricChars.length;b++)if(i.indexOf(p.electricChars.charAt(b))>-1){m=tl(n,u.head.line,"smart");break}}else p.electricInput&&p.electricInput.test($t(n.doc,u.head.line).text.slice(0,u.head.ch))&&(m=tl(n,u.head.line,"smart"));m&&He(n,"electricInput",n,u.head.line)}}}function xg(n){for(var i=[],a=[],l=0;l<n.doc.sel.ranges.length;l++){var u=n.doc.sel.ranges[l].head.line,p={anchor:X(u,0),head:X(u+1,0)};a.push(p),i.push(n.getRange(p.anchor,p.head))}return{text:i,ranges:a}}function sf(n,i,a,l){n.setAttribute("autocorrect",a?"on":"off"),n.setAttribute("autocapitalize",l?"on":"off"),n.setAttribute("spellcheck",!!i)}function _g(){var n=k("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),i=k("div",[n],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return v?n.style.width="1000px":n.setAttribute("wrap","off"),E&&(n.style.border="1px solid black"),i}function Cx(n){var i=n.optionHandlers,a=n.helpers={};n.prototype={constructor:n,focus:function(){Tt(this).focus(),this.display.input.focus()},setOption:function(l,u){var p=this.options,m=p[l];p[l]==u&&l!="mode"||(p[l]=u,i.hasOwnProperty(l)&&qe(this,i[l])(this,u,m),ke(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,u){this.state.keyMaps[u?"push":"unshift"](Ma(l))},removeKeyMap:function(l){for(var u=this.state.keyMaps,p=0;p<u.length;++p)if(u[p]==l||u[p].name==l)return u.splice(p,1),!0},addOverlay:en(function(l,u){var p=l.token?l:n.getMode(this.options,l);if(p.startState)throw new Error("Overlays may not be stateful.");pt(this.state.overlays,{mode:p,modeSpec:l,opaque:u&&u.opaque,priority:u&&u.priority||0},function(m){return m.priority}),this.state.modeGen++,un(this)}),removeOverlay:en(function(l){for(var u=this.state.overlays,p=0;p<u.length;++p){var m=u[p].modeSpec;if(m==l||typeof l=="string"&&m.name==l){u.splice(p,1),this.state.modeGen++,un(this);return}}}),indentLine:en(function(l,u,p){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),nt(this.doc,l)&&tl(this,l,u,p)}),indentSelection:en(function(l){for(var u=this.doc.sel.ranges,p=-1,m=0;m<u.length;m++){var b=u[m];if(b.empty())b.head.line>p&&(tl(this,b.head.line,l,!0),p=b.head.line,m==this.doc.sel.primIndex&&Io(this));else{var x=b.from(),S=b.to(),N=Math.max(p,x.line);p=Math.min(this.lastLine(),S.line-(S.ch?0:1))+1;for(var D=N;D<p;++D)tl(this,D,l);var j=this.doc.sel.ranges;x.ch==0&&u.length==j.length&&j[m].from().ch>0&&Yu(this.doc,m,new ue(x,j[m].to()),z)}}}),getTokenAt:function(l,u){return $d(this,l,u)},getLineTokens:function(l,u){return $d(this,X(l),u,!0)},getTokenTypeAt:function(l){l=Ut(this.doc,l);var u=Ad(this,$t(this.doc,l.line)),p=0,m=(u.length-1)/2,b=l.ch,x;if(b==0)x=u[2];else for(;;){var S=p+m>>1;if((S?u[S*2-1]:0)>=b)m=S;else if(u[S*2+1]<b)p=S+1;else{x=u[S*2+2];break}}var N=x?x.indexOf("overlay "):-1;return N<0?x:N==0?null:x.slice(0,N-1)},getModeAt:function(l){var u=this.doc.mode;return u.innerMode?n.innerMode(u,this.getTokenAt(l).state).mode:u},getHelper:function(l,u){return this.getHelpers(l,u)[0]},getHelpers:function(l,u){var p=[];if(!a.hasOwnProperty(u))return p;var m=a[u],b=this.getModeAt(l);if(typeof b[u]=="string")m[b[u]]&&p.push(m[b[u]]);else if(b[u])for(var x=0;x<b[u].length;x++){var S=m[b[u][x]];S&&p.push(S)}else b.helperType&&m[b.helperType]?p.push(m[b.helperType]):m[b.name]&&p.push(m[b.name]);for(var N=0;N<m._global.length;N++){var D=m._global[N];D.pred(b,this)&&Et(p,D.val)==-1&&p.push(D.val)}return p},getStateAfter:function(l,u){var p=this.doc;return l=Td(p,l??p.first+p.size-1),Ls(this,l+1,u).state},cursorCoords:function(l,u){var p,m=this.doc.sel.primary();return l==null?p=m.head:typeof l=="object"?p=Ut(this.doc,l):p=l?m.from():m.to(),nr(this,p,u||"page")},charCoords:function(l,u){return ga(this,Ut(this.doc,l),u||"page")},coordsChar:function(l,u){return l=lp(this,l,u||"page"),Au(this,l.left,l.top)},lineAtHeight:function(l,u){return l=lp(this,{top:l,left:0},u||"page").top,R(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,u,p){var m=!1,b;if(typeof l=="number"){var x=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>x&&(l=x,m=!0),b=$t(this.doc,l)}else b=l;return pa(this,b,{top:0,left:0},u||"page",p||m).top+(m?this.doc.height-Dr(b):0)},defaultTextHeight:function(){return Ro(this.display)},defaultCharWidth:function(){return Do(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,u,p,m,b){var x=this.display;l=nr(this,Ut(this.doc,l));var S=l.bottom,N=l.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),x.sizer.appendChild(u),m=="over")S=l.top;else if(m=="above"||m=="near"){var D=Math.max(x.wrapper.clientHeight,this.doc.height),j=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(m=="above"||l.bottom+u.offsetHeight>D)&&l.top>u.offsetHeight?S=l.top-u.offsetHeight:l.bottom+u.offsetHeight<=D&&(S=l.bottom),N+u.offsetWidth>j&&(N=j-u.offsetWidth)}u.style.top=S+"px",u.style.left=u.style.right="",b=="right"?(N=x.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(b=="left"?N=0:b=="middle"&&(N=(x.sizer.clientWidth-u.offsetWidth)/2),u.style.left=N+"px"),p&&_1(this,{left:N,top:S,right:N+u.offsetWidth,bottom:S+u.offsetHeight})},triggerOnKeyDown:en(ug),triggerOnKeyPress:en(hg),triggerOnKeyUp:fg,triggerOnMouseDown:en(dg),execCommand:function(l){if(Ys.hasOwnProperty(l))return Ys[l].call(null,this)},triggerElectric:en(function(l){wg(this,l)}),findPosH:function(l,u,p,m){var b=1;u<0&&(b=-1,u=-u);for(var x=Ut(this.doc,l),S=0;S<u&&(x=lf(this.doc,x,b,p,m),!x.hitSide);++S);return x},moveH:en(function(l,u){var p=this;this.extendSelectionsBy(function(m){return p.display.shift||p.doc.extend||m.empty()?lf(p.doc,m.head,l,u,p.options.rtlMoveVisually):l<0?m.from():m.to()},ot)}),deleteH:en(function(l,u){var p=this.doc.sel,m=this.doc;p.somethingSelected()?m.replaceSelection("",null,"+delete"):Vo(this,function(b){var x=lf(m,b.head,l,u,!1);return l<0?{from:x,to:b.head}:{from:b.head,to:x}})}),findPosV:function(l,u,p,m){var b=1,x=m;u<0&&(b=-1,u=-u);for(var S=Ut(this.doc,l),N=0;N<u;++N){var D=nr(this,S,"div");if(x==null?x=D.left:D.left=x,S=Sg(this,D,b,p),S.hitSide)break}return S},moveV:en(function(l,u){var p=this,m=this.doc,b=[],x=!this.display.shift&&!m.extend&&m.sel.somethingSelected();if(m.extendSelectionsBy(function(N){if(x)return l<0?N.from():N.to();var D=nr(p,N.head,"div");N.goalColumn!=null&&(D.left=N.goalColumn),b.push(D.left);var j=Sg(p,D,l,u);return u=="page"&&N==m.sel.primary()&&Fu(p,ga(p,j,"div").top-D.top),j},ot),b.length)for(var S=0;S<m.sel.ranges.length;S++)m.sel.ranges[S].goalColumn=b[S]}),findWordAt:function(l){var u=this.doc,p=$t(u,l.line).text,m=l.ch,b=l.ch;if(p){var x=this.getHelper(l,"wordChars");(l.sticky=="before"||b==p.length)&&m?--m:++b;for(var S=p.charAt(m),N=Vt(S,x)?function(D){return Vt(D,x)}:/\s/.test(S)?function(D){return/\s/.test(D)}:function(D){return!/\s/.test(D)&&!Vt(D)};m>0&&N(p.charAt(m-1));)--m;for(;b<p.length&&N(p.charAt(b));)++b}return new ue(X(l.line,m),X(l.line,b))},toggleOverwrite:function(l){l!=null&&l==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Mt(this.display.cursorDiv,"CodeMirror-overwrite"):lt(this.display.cursorDiv,"CodeMirror-overwrite"),ke(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==mt(ee(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:en(function(l,u){Rs(this,l,u)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-yr(this)-this.display.barHeight,width:l.scrollWidth-yr(this)-this.display.barWidth,clientHeight:Cu(this),clientWidth:Gi(this)}},scrollIntoView:en(function(l,u){l==null?(l={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof l=="number"?l={from:X(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=u||0,l.from.line!=null?S1(this,l):vp(this,l.from,l.to,l.margin)}),setSize:en(function(l,u){var p=this,m=function(x){return typeof x=="number"||/^\d+$/.test(String(x))?x+"px":x};l!=null&&(this.display.wrapper.style.width=m(l)),u!=null&&(this.display.wrapper.style.height=m(u)),this.options.lineWrapping&&ip(this);var b=this.display.viewFrom;this.doc.iter(b,this.display.viewTo,function(x){if(x.widgets){for(var S=0;S<x.widgets.length;S++)if(x.widgets[S].noHScroll){ii(p,b,"widget");break}}++b}),this.curOp.forceUpdate=!0,ke(this,"refresh",this)}),operation:function(l){return Sn(this,l)},startOperation:function(){return Qi(this)},endOperation:function(){return to(this)},refresh:en(function(){var l=this.display.cachedTextHeight;un(this),this.curOp.forceUpdate=!0,Ps(this),Rs(this,this.doc.scrollLeft,this.doc.scrollTop),Bu(this.display),(l==null||Math.abs(l-Ro(this.display))>.5||this.options.lineWrapping)&&Pu(this),ke(this,"refresh",this)}),swapDoc:en(function(l){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),Mp(this,l),Ps(this),this.display.input.reset(),Rs(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,He(this,"swapDoc",this,u),u}),phrase:function(l){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,l)?u[l]:l},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Yn(n),n.registerHelper=function(l,u,p){a.hasOwnProperty(l)||(a[l]=n[l]={_global:[]}),a[l][u]=p},n.registerGlobalHelper=function(l,u,p,m){n.registerHelper(l,u,m),a[l]._global.push({pred:p,val:m})}}function lf(n,i,a,l,u){var p=i,m=a,b=$t(n,i.line),x=u&&n.direction=="rtl"?-a:a;function S(){var kt=i.line+x;return kt<n.first||kt>=n.first+n.size?!1:(i=new X(kt,i.ch,i.sticky),b=$t(n,kt))}function N(kt){var xt;if(l=="codepoint"){var Lt=b.text.charCodeAt(i.ch+(a>0?0:-1));if(isNaN(Lt))xt=null;else{var Dt=a>0?Lt>=55296&&Lt<56320:Lt>=56320&&Lt<57343;xt=new X(i.line,Math.max(0,Math.min(b.text.length,i.ch+a*(Dt?2:1))),-a)}}else u?xt=sx(n.cm,b,i,a):xt=Ju(b,i,a);if(xt==null)if(!kt&&S())i=Qu(u,n.cm,b,i.line,x);else return!1;else i=xt;return!0}if(l=="char"||l=="codepoint")N();else if(l=="column")N(!0);else if(l=="word"||l=="group")for(var D=null,j=l=="group",W=n.cm&&n.cm.getHelper(i,"wordChars"),J=!0;!(a<0&&!N(!J));J=!1){var ct=b.text.charAt(i.ch)||`
|
|
39
|
+
`)&&(J=ct=X(J.line,0)));var gt={from:J,to:ct,text:S?S[j%S.length]:x,origin:u||(b?"paste":n.state.cutIncoming>m?"cut":"+input")};Bo(n.doc,gt),He(n,"inputRead",n,gt)}i&&!b&&wg(n,i),Io(n),n.curOp.updateInput<2&&(n.curOp.updateInput=D),n.curOp.typing=!0,n.state.pasteIncoming=n.state.cutIncoming=-1}function bg(n,i){var a=n.clipboardData&&n.clipboardData.getData("Text");if(a)return n.preventDefault(),!i.isReadOnly()&&!i.options.disableInput&&i.hasFocus()&&kn(i,function(){return of(i,a,0,null,"paste")}),!0}function wg(n,i){if(!(!n.options.electricChars||!n.options.smartIndent))for(var a=n.doc.sel,l=a.ranges.length-1;l>=0;l--){var u=a.ranges[l];if(!(u.head.ch>100||l&&a.ranges[l-1].head.line==u.head.line)){var p=n.getModeAt(u.head),m=!1;if(p.electricChars){for(var b=0;b<p.electricChars.length;b++)if(i.indexOf(p.electricChars.charAt(b))>-1){m=tl(n,u.head.line,"smart");break}}else p.electricInput&&p.electricInput.test($t(n.doc,u.head.line).text.slice(0,u.head.ch))&&(m=tl(n,u.head.line,"smart"));m&&He(n,"electricInput",n,u.head.line)}}}function xg(n){for(var i=[],a=[],l=0;l<n.doc.sel.ranges.length;l++){var u=n.doc.sel.ranges[l].head.line,p={anchor:X(u,0),head:X(u+1,0)};a.push(p),i.push(n.getRange(p.anchor,p.head))}return{text:i,ranges:a}}function sf(n,i,a,l){n.setAttribute("autocorrect",a?"on":"off"),n.setAttribute("autocapitalize",l?"on":"off"),n.setAttribute("spellcheck",!!i)}function _g(){var n=k("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),i=k("div",[n],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return v?n.style.width="1000px":n.setAttribute("wrap","off"),E&&(n.style.border="1px solid black"),i}function Cx(n){var i=n.optionHandlers,a=n.helpers={};n.prototype={constructor:n,focus:function(){Tt(this).focus(),this.display.input.focus()},setOption:function(l,u){var p=this.options,m=p[l];p[l]==u&&l!="mode"||(p[l]=u,i.hasOwnProperty(l)&&qe(this,i[l])(this,u,m),ke(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,u){this.state.keyMaps[u?"push":"unshift"](Ma(l))},removeKeyMap:function(l){for(var u=this.state.keyMaps,p=0;p<u.length;++p)if(u[p]==l||u[p].name==l)return u.splice(p,1),!0},addOverlay:en(function(l,u){var p=l.token?l:n.getMode(this.options,l);if(p.startState)throw new Error("Overlays may not be stateful.");pt(this.state.overlays,{mode:p,modeSpec:l,opaque:u&&u.opaque,priority:u&&u.priority||0},function(m){return m.priority}),this.state.modeGen++,un(this)}),removeOverlay:en(function(l){for(var u=this.state.overlays,p=0;p<u.length;++p){var m=u[p].modeSpec;if(m==l||typeof l=="string"&&m.name==l){u.splice(p,1),this.state.modeGen++,un(this);return}}}),indentLine:en(function(l,u,p){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),nt(this.doc,l)&&tl(this,l,u,p)}),indentSelection:en(function(l){for(var u=this.doc.sel.ranges,p=-1,m=0;m<u.length;m++){var b=u[m];if(b.empty())b.head.line>p&&(tl(this,b.head.line,l,!0),p=b.head.line,m==this.doc.sel.primIndex&&Io(this));else{var x=b.from(),S=b.to(),N=Math.max(p,x.line);p=Math.min(this.lastLine(),S.line-(S.ch?0:1))+1;for(var D=N;D<p;++D)tl(this,D,l);var j=this.doc.sel.ranges;x.ch==0&&u.length==j.length&&j[m].from().ch>0&&Yu(this.doc,m,new ue(x,j[m].to()),z)}}}),getTokenAt:function(l,u){return $d(this,l,u)},getLineTokens:function(l,u){return $d(this,X(l),u,!0)},getTokenTypeAt:function(l){l=Ut(this.doc,l);var u=Ad(this,$t(this.doc,l.line)),p=0,m=(u.length-1)/2,b=l.ch,x;if(b==0)x=u[2];else for(;;){var S=p+m>>1;if((S?u[S*2-1]:0)>=b)m=S;else if(u[S*2+1]<b)p=S+1;else{x=u[S*2+2];break}}var N=x?x.indexOf("overlay "):-1;return N<0?x:N==0?null:x.slice(0,N-1)},getModeAt:function(l){var u=this.doc.mode;return u.innerMode?n.innerMode(u,this.getTokenAt(l).state).mode:u},getHelper:function(l,u){return this.getHelpers(l,u)[0]},getHelpers:function(l,u){var p=[];if(!a.hasOwnProperty(u))return p;var m=a[u],b=this.getModeAt(l);if(typeof b[u]=="string")m[b[u]]&&p.push(m[b[u]]);else if(b[u])for(var x=0;x<b[u].length;x++){var S=m[b[u][x]];S&&p.push(S)}else b.helperType&&m[b.helperType]?p.push(m[b.helperType]):m[b.name]&&p.push(m[b.name]);for(var N=0;N<m._global.length;N++){var D=m._global[N];D.pred(b,this)&&Et(p,D.val)==-1&&p.push(D.val)}return p},getStateAfter:function(l,u){var p=this.doc;return l=Td(p,l??p.first+p.size-1),Ls(this,l+1,u).state},cursorCoords:function(l,u){var p,m=this.doc.sel.primary();return l==null?p=m.head:typeof l=="object"?p=Ut(this.doc,l):p=l?m.from():m.to(),nr(this,p,u||"page")},charCoords:function(l,u){return ga(this,Ut(this.doc,l),u||"page")},coordsChar:function(l,u){return l=lp(this,l,u||"page"),Au(this,l.left,l.top)},lineAtHeight:function(l,u){return l=lp(this,{top:l,left:0},u||"page").top,R(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,u,p){var m=!1,b;if(typeof l=="number"){var x=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>x&&(l=x,m=!0),b=$t(this.doc,l)}else b=l;return pa(this,b,{top:0,left:0},u||"page",p||m).top+(m?this.doc.height-Dr(b):0)},defaultTextHeight:function(){return Ro(this.display)},defaultCharWidth:function(){return Do(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,u,p,m,b){var x=this.display;l=nr(this,Ut(this.doc,l));var S=l.bottom,N=l.left;if(u.style.position="absolute",u.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(u),x.sizer.appendChild(u),m=="over")S=l.top;else if(m=="above"||m=="near"){var D=Math.max(x.wrapper.clientHeight,this.doc.height),j=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(m=="above"||l.bottom+u.offsetHeight>D)&&l.top>u.offsetHeight?S=l.top-u.offsetHeight:l.bottom+u.offsetHeight<=D&&(S=l.bottom),N+u.offsetWidth>j&&(N=j-u.offsetWidth)}u.style.top=S+"px",u.style.left=u.style.right="",b=="right"?(N=x.sizer.clientWidth-u.offsetWidth,u.style.right="0px"):(b=="left"?N=0:b=="middle"&&(N=(x.sizer.clientWidth-u.offsetWidth)/2),u.style.left=N+"px"),p&&_1(this,{left:N,top:S,right:N+u.offsetWidth,bottom:S+u.offsetHeight})},triggerOnKeyDown:en(ug),triggerOnKeyPress:en(hg),triggerOnKeyUp:fg,triggerOnMouseDown:en(dg),execCommand:function(l){if(Ys.hasOwnProperty(l))return Ys[l].call(null,this)},triggerElectric:en(function(l){wg(this,l)}),findPosH:function(l,u,p,m){var b=1;u<0&&(b=-1,u=-u);for(var x=Ut(this.doc,l),S=0;S<u&&(x=lf(this.doc,x,b,p,m),!x.hitSide);++S);return x},moveH:en(function(l,u){var p=this;this.extendSelectionsBy(function(m){return p.display.shift||p.doc.extend||m.empty()?lf(p.doc,m.head,l,u,p.options.rtlMoveVisually):l<0?m.from():m.to()},ot)}),deleteH:en(function(l,u){var p=this.doc.sel,m=this.doc;p.somethingSelected()?m.replaceSelection("",null,"+delete"):Vo(this,function(b){var x=lf(m,b.head,l,u,!1);return l<0?{from:x,to:b.head}:{from:b.head,to:x}})}),findPosV:function(l,u,p,m){var b=1,x=m;u<0&&(b=-1,u=-u);for(var S=Ut(this.doc,l),N=0;N<u;++N){var D=nr(this,S,"div");if(x==null?x=D.left:D.left=x,S=Sg(this,D,b,p),S.hitSide)break}return S},moveV:en(function(l,u){var p=this,m=this.doc,b=[],x=!this.display.shift&&!m.extend&&m.sel.somethingSelected();if(m.extendSelectionsBy(function(N){if(x)return l<0?N.from():N.to();var D=nr(p,N.head,"div");N.goalColumn!=null&&(D.left=N.goalColumn),b.push(D.left);var j=Sg(p,D,l,u);return u=="page"&&N==m.sel.primary()&&Fu(p,ga(p,j,"div").top-D.top),j},ot),b.length)for(var S=0;S<m.sel.ranges.length;S++)m.sel.ranges[S].goalColumn=b[S]}),findWordAt:function(l){var u=this.doc,p=$t(u,l.line).text,m=l.ch,b=l.ch;if(p){var x=this.getHelper(l,"wordChars");(l.sticky=="before"||b==p.length)&&m?--m:++b;for(var S=p.charAt(m),N=Vt(S,x)?function(D){return Vt(D,x)}:/\s/.test(S)?function(D){return/\s/.test(D)}:function(D){return!/\s/.test(D)&&!Vt(D)};m>0&&N(p.charAt(m-1));)--m;for(;b<p.length&&N(p.charAt(b));)++b}return new ue(X(l.line,m),X(l.line,b))},toggleOverwrite:function(l){l!=null&&l==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Mt(this.display.cursorDiv,"CodeMirror-overwrite"):lt(this.display.cursorDiv,"CodeMirror-overwrite"),ke(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==mt(ee(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:en(function(l,u){Rs(this,l,u)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-yr(this)-this.display.barHeight,width:l.scrollWidth-yr(this)-this.display.barWidth,clientHeight:Cu(this),clientWidth:Gi(this)}},scrollIntoView:en(function(l,u){l==null?(l={from:this.doc.sel.primary().head,to:null},u==null&&(u=this.options.cursorScrollMargin)):typeof l=="number"?l={from:X(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=u||0,l.from.line!=null?S1(this,l):vp(this,l.from,l.to,l.margin)}),setSize:en(function(l,u){var p=this,m=function(x){return typeof x=="number"||/^\d+$/.test(String(x))?x+"px":x};l!=null&&(this.display.wrapper.style.width=m(l)),u!=null&&(this.display.wrapper.style.height=m(u)),this.options.lineWrapping&&ip(this);var b=this.display.viewFrom;this.doc.iter(b,this.display.viewTo,function(x){if(x.widgets){for(var S=0;S<x.widgets.length;S++)if(x.widgets[S].noHScroll){ii(p,b,"widget");break}}++b}),this.curOp.forceUpdate=!0,ke(this,"refresh",this)}),operation:function(l){return kn(this,l)},startOperation:function(){return Qi(this)},endOperation:function(){return to(this)},refresh:en(function(){var l=this.display.cachedTextHeight;un(this),this.curOp.forceUpdate=!0,Ps(this),Rs(this,this.doc.scrollLeft,this.doc.scrollTop),Bu(this.display),(l==null||Math.abs(l-Ro(this.display))>.5||this.options.lineWrapping)&&Pu(this),ke(this,"refresh",this)}),swapDoc:en(function(l){var u=this.doc;return u.cm=null,this.state.selectingText&&this.state.selectingText(),Mp(this,l),Ps(this),this.display.input.reset(),Rs(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,He(this,"swapDoc",this,u),u}),phrase:function(l){var u=this.options.phrases;return u&&Object.prototype.hasOwnProperty.call(u,l)?u[l]:l},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Yn(n),n.registerHelper=function(l,u,p){a.hasOwnProperty(l)||(a[l]=n[l]={_global:[]}),a[l][u]=p},n.registerGlobalHelper=function(l,u,p,m){n.registerHelper(l,u,m),a[l]._global.push({pred:p,val:m})}}function lf(n,i,a,l,u){var p=i,m=a,b=$t(n,i.line),x=u&&n.direction=="rtl"?-a:a;function S(){var kt=i.line+x;return kt<n.first||kt>=n.first+n.size?!1:(i=new X(kt,i.ch,i.sticky),b=$t(n,kt))}function N(kt){var xt;if(l=="codepoint"){var Lt=b.text.charCodeAt(i.ch+(a>0?0:-1));if(isNaN(Lt))xt=null;else{var Dt=a>0?Lt>=55296&&Lt<56320:Lt>=56320&&Lt<57343;xt=new X(i.line,Math.max(0,Math.min(b.text.length,i.ch+a*(Dt?2:1))),-a)}}else u?xt=sx(n.cm,b,i,a):xt=Ju(b,i,a);if(xt==null)if(!kt&&S())i=Qu(u,n.cm,b,i.line,x);else return!1;else i=xt;return!0}if(l=="char"||l=="codepoint")N();else if(l=="column")N(!0);else if(l=="word"||l=="group")for(var D=null,j=l=="group",W=n.cm&&n.cm.getHelper(i,"wordChars"),J=!0;!(a<0&&!N(!J));J=!1){var ct=b.text.charAt(i.ch)||`
|
|
40
40
|
`,gt=Vt(ct,W)?"w":j&&ct==`
|
|
41
41
|
`?"n":!j||/\s/.test(ct)?null:"p";if(j&&!J&&!gt&&(gt="s"),D&&D!=gt){a<0&&(a=1,N(),i.sticky="after");break}if(gt&&(D=gt),a>0&&!N(!J))break}var wt=Ea(n,i,p,m,!0);return ce(p,wt)&&(wt.hitSide=!0),wt}function Sg(n,i,a,l){var u=n.doc,p=i.left,m;if(l=="page"){var b=Math.min(n.display.wrapper.clientHeight,Tt(n).innerHeight||u(n).documentElement.clientHeight),x=Math.max(b-.5*Ro(n.display),3);m=(a>0?i.bottom:i.top)+a*x}else l=="line"&&(m=a>0?i.bottom+3:i.top-3);for(var S;S=Au(n,p,m),!!S.outside;){if(a<0?m<=0:m>=u.height){S.hitSide=!0;break}m+=a*5}return S}var pe=function(n){this.cm=n,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Nt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};pe.prototype.init=function(n){var i=this,a=this,l=a.cm,u=a.div=n.lineDiv;u.contentEditable=!0,sf(u,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize);function p(b){for(var x=b.target;x;x=x.parentNode){if(x==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}Rt(u,"paste",function(b){!p(b)||Ce(l,b)||bg(b,l)||g<=11&&setTimeout(qe(l,function(){return i.updateFromDOM()}),20)}),Rt(u,"compositionstart",function(b){i.composing={data:b.data,done:!1}}),Rt(u,"compositionupdate",function(b){i.composing||(i.composing={data:b.data,done:!1})}),Rt(u,"compositionend",function(b){i.composing&&(b.data!=i.composing.data&&i.readFromDOMSoon(),i.composing.done=!0)}),Rt(u,"touchstart",function(){return a.forceCompositionEnd()}),Rt(u,"input",function(){i.composing||i.readFromDOMSoon()});function m(b){if(!(!p(b)||Ce(l,b))){if(l.somethingSelected())Pa({lineWise:!1,text:l.getSelections()}),b.type=="cut"&&l.replaceSelection("",null,"cut");else if(l.options.lineWiseCopyCut){var x=xg(l);Pa({lineWise:!0,text:x.text}),b.type=="cut"&&l.operation(function(){l.setSelections(x.ranges,0,z),l.replaceSelection("",null,"cut")})}else return;if(b.clipboardData){b.clipboardData.clearData();var S=ir.text.join(`
|
|
42
42
|
`);if(b.clipboardData.setData("Text",S),b.clipboardData.getData("Text")==S){b.preventDefault();return}}var N=_g(),D=N.firstChild;sf(D),l.display.lineSpace.insertBefore(N,l.display.lineSpace.firstChild),D.value=ir.text.join(`
|
|
43
|
-
`);var j=mt(Zt(u));Wt(D),setTimeout(function(){l.display.lineSpace.removeChild(N),j.focus(),j==u&&a.showPrimarySelection()},50)}}Rt(u,"copy",m),Rt(u,"cut",m)},pe.prototype.screenReaderLabelChanged=function(n){n?this.div.setAttribute("aria-label",n):this.div.removeAttribute("aria-label")},pe.prototype.prepareSelection=function(){var n=dp(this.cm,!1);return n.focus=mt(Zt(this.div))==this.div,n},pe.prototype.showSelection=function(n,i){!n||!this.cm.display.view.length||((n.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(n))},pe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},pe.prototype.showPrimarySelection=function(){var n=this.getSelection(),i=this.cm,a=i.doc.sel.primary(),l=a.from(),u=a.to();if(i.display.viewTo==i.display.viewFrom||l.line>=i.display.viewTo||u.line<i.display.viewFrom){n.removeAllRanges();return}var p=Oa(i,n.anchorNode,n.anchorOffset),m=Oa(i,n.focusNode,n.focusOffset);if(!(p&&!p.bad&&m&&!m.bad&&St(No(p,m),l)==0&&St(cn(p,m),u)==0)){var b=i.display.view,x=l.line>=i.display.viewFrom&&kg(i,l)||{node:b[0].measure.map[2],offset:0},S=u.line<i.display.viewTo&&kg(i,u);if(!S){var N=b[b.length-1].measure,D=N.maps?N.maps[N.maps.length-1]:N.map;S={node:D[D.length-1],offset:D[D.length-2]-D[D.length-3]}}if(!x||!S){n.removeAllRanges();return}var j=n.rangeCount&&n.getRangeAt(0),W;try{W=U(x.node,x.offset,S.offset,S.node)}catch{}W&&(!s&&i.state.focused?(n.collapse(x.node,x.offset),W.collapsed||(n.removeAllRanges(),n.addRange(W))):(n.removeAllRanges(),n.addRange(W)),j&&n.anchorNode==null?n.addRange(j):s&&this.startGracePeriod()),this.rememberSelection()}},pe.prototype.startGracePeriod=function(){var n=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){n.gracePeriod=!1,n.selectionChanged()&&n.cm.operation(function(){return n.cm.curOp.selectionChanged=!0})},20)},pe.prototype.showMultipleSelections=function(n){I(this.cm.display.cursorDiv,n.cursors),I(this.cm.display.selectionDiv,n.selection)},pe.prototype.rememberSelection=function(){var n=this.getSelection();this.lastAnchorNode=n.anchorNode,this.lastAnchorOffset=n.anchorOffset,this.lastFocusNode=n.focusNode,this.lastFocusOffset=n.focusOffset},pe.prototype.selectionInEditor=function(){var n=this.getSelection();if(!n.rangeCount)return!1;var i=n.getRangeAt(0).commonAncestorContainer;return tt(this.div,i)},pe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||mt(Zt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},pe.prototype.blur=function(){this.div.blur()},pe.prototype.getField=function(){return this.div},pe.prototype.supportsTouch=function(){return!0},pe.prototype.receivedFocus=function(){var n=this,i=this;this.selectionInEditor()?setTimeout(function(){return n.pollSelection()},20):
|
|
44
|
-
`),Wt(u))}else return;m.type=="cut"&&(l.state.cutIncoming=+new Date)}}Rt(u,"cut",p),Rt(u,"copy",p),Rt(n.scroller,"paste",function(m){if(!(zr(n,m)||Ce(l,m))){if(!u.dispatchEvent){l.state.pasteIncoming=+new Date,a.focus();return}var b=new Event("paste");b.clipboardData=m.clipboardData,u.dispatchEvent(b)}}),Rt(n.lineSpace,"selectstart",function(m){zr(n,m)||Ze(m)}),Rt(u,"compositionstart",function(){var m=l.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:m,range:l.markText(m,l.getCursor("to"),{className:"CodeMirror-composing"})}}),Rt(u,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},Le.prototype.createField=function(n){this.wrapper=_g(),this.textarea=this.wrapper.firstChild;var i=this.cm.options;sf(this.textarea,i.spellcheck,i.autocorrect,i.autocapitalize)},Le.prototype.screenReaderLabelChanged=function(n){n?this.textarea.setAttribute("aria-label",n):this.textarea.removeAttribute("aria-label")},Le.prototype.prepareSelection=function(){var n=this.cm,i=n.display,a=n.doc,l=dp(n);if(n.options.moveInputWithCursor){var u=nr(n,a.sel.primary().head,"div"),p=i.wrapper.getBoundingClientRect(),m=i.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,u.top+m.top-p.top)),l.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,u.left+m.left-p.left))}return l},Le.prototype.showSelection=function(n){var i=this.cm,a=i.display;I(a.cursorDiv,n.cursors),I(a.selectionDiv,n.selection),n.teTop!=null&&(this.wrapper.style.top=n.teTop+"px",this.wrapper.style.left=n.teLeft+"px")},Le.prototype.reset=function(n){if(!(this.contextMenuPending||this.composing&&n)){var i=this.cm;if(this.resetting=!0,i.somethingSelected()){this.prevInput="";var a=i.getSelection();this.textarea.value=a,i.state.focused&&Wt(this.textarea),d&&g>=9&&(this.hasSelection=a)}else n||(this.prevInput=this.textarea.value="",d&&g>=9&&(this.hasSelection=null));this.resetting=!1}},Le.prototype.getField=function(){return this.textarea},Le.prototype.supportsTouch=function(){return!1},Le.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!$||mt(Zt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Le.prototype.blur=function(){this.textarea.blur()},Le.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Le.prototype.receivedFocus=function(){this.slowPoll()},Le.prototype.slowPoll=function(){var n=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){n.poll(),n.cm.state.focused&&n.slowPoll()})},Le.prototype.fastPoll=function(){var n=!1,i=this;i.pollingFast=!0;function a(){var l=i.poll();!l&&!n?(n=!0,i.polling.set(60,a)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,a)},Le.prototype.poll=function(){var n=this,i=this.cm,a=this.textarea,l=this.prevInput;if(this.contextMenuPending||this.resetting||!i.state.focused||ei(a)&&!l&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var u=a.value;if(u==l&&!i.somethingSelected())return!1;if(d&&g>=9&&this.hasSelection===u||F&&/[\uf700-\uf7ff]/.test(u))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var p=u.charCodeAt(0);if(p==8203&&!l&&(l=""),p==8666)return this.reset(),this.cm.execCommand("undo")}for(var m=0,b=Math.min(l.length,u.length);m<b&&l.charCodeAt(m)==u.charCodeAt(m);)++m;return
|
|
43
|
+
`);var j=mt(Zt(u));Wt(D),setTimeout(function(){l.display.lineSpace.removeChild(N),j.focus(),j==u&&a.showPrimarySelection()},50)}}Rt(u,"copy",m),Rt(u,"cut",m)},pe.prototype.screenReaderLabelChanged=function(n){n?this.div.setAttribute("aria-label",n):this.div.removeAttribute("aria-label")},pe.prototype.prepareSelection=function(){var n=dp(this.cm,!1);return n.focus=mt(Zt(this.div))==this.div,n},pe.prototype.showSelection=function(n,i){!n||!this.cm.display.view.length||((n.focus||i)&&this.showPrimarySelection(),this.showMultipleSelections(n))},pe.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},pe.prototype.showPrimarySelection=function(){var n=this.getSelection(),i=this.cm,a=i.doc.sel.primary(),l=a.from(),u=a.to();if(i.display.viewTo==i.display.viewFrom||l.line>=i.display.viewTo||u.line<i.display.viewFrom){n.removeAllRanges();return}var p=Oa(i,n.anchorNode,n.anchorOffset),m=Oa(i,n.focusNode,n.focusOffset);if(!(p&&!p.bad&&m&&!m.bad&&St(No(p,m),l)==0&&St(cn(p,m),u)==0)){var b=i.display.view,x=l.line>=i.display.viewFrom&&kg(i,l)||{node:b[0].measure.map[2],offset:0},S=u.line<i.display.viewTo&&kg(i,u);if(!S){var N=b[b.length-1].measure,D=N.maps?N.maps[N.maps.length-1]:N.map;S={node:D[D.length-1],offset:D[D.length-2]-D[D.length-3]}}if(!x||!S){n.removeAllRanges();return}var j=n.rangeCount&&n.getRangeAt(0),W;try{W=U(x.node,x.offset,S.offset,S.node)}catch{}W&&(!s&&i.state.focused?(n.collapse(x.node,x.offset),W.collapsed||(n.removeAllRanges(),n.addRange(W))):(n.removeAllRanges(),n.addRange(W)),j&&n.anchorNode==null?n.addRange(j):s&&this.startGracePeriod()),this.rememberSelection()}},pe.prototype.startGracePeriod=function(){var n=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){n.gracePeriod=!1,n.selectionChanged()&&n.cm.operation(function(){return n.cm.curOp.selectionChanged=!0})},20)},pe.prototype.showMultipleSelections=function(n){I(this.cm.display.cursorDiv,n.cursors),I(this.cm.display.selectionDiv,n.selection)},pe.prototype.rememberSelection=function(){var n=this.getSelection();this.lastAnchorNode=n.anchorNode,this.lastAnchorOffset=n.anchorOffset,this.lastFocusNode=n.focusNode,this.lastFocusOffset=n.focusOffset},pe.prototype.selectionInEditor=function(){var n=this.getSelection();if(!n.rangeCount)return!1;var i=n.getRangeAt(0).commonAncestorContainer;return tt(this.div,i)},pe.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||mt(Zt(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},pe.prototype.blur=function(){this.div.blur()},pe.prototype.getField=function(){return this.div},pe.prototype.supportsTouch=function(){return!0},pe.prototype.receivedFocus=function(){var n=this,i=this;this.selectionInEditor()?setTimeout(function(){return n.pollSelection()},20):kn(this.cm,function(){return i.cm.curOp.selectionChanged=!0});function a(){i.cm.state.focused&&(i.pollSelection(),i.polling.set(i.cm.options.pollInterval,a))}this.polling.set(this.cm.options.pollInterval,a)},pe.prototype.selectionChanged=function(){var n=this.getSelection();return n.anchorNode!=this.lastAnchorNode||n.anchorOffset!=this.lastAnchorOffset||n.focusNode!=this.lastFocusNode||n.focusOffset!=this.lastFocusOffset},pe.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var n=this.getSelection(),i=this.cm;if(P&&w&&this.cm.display.gutterSpecs.length&&Tx(n.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var a=Oa(i,n.anchorNode,n.anchorOffset),l=Oa(i,n.focusNode,n.focusOffset);a&&l&&kn(i,function(){Je(i.doc,si(a,l),z),(a.bad||l.bad)&&(i.curOp.selectionChanged=!0)})}}},pe.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var n=this.cm,i=n.display,a=n.doc.sel.primary(),l=a.from(),u=a.to();if(l.ch==0&&l.line>n.firstLine()&&(l=X(l.line-1,$t(n.doc,l.line-1).length)),u.ch==$t(n.doc,u.line).text.length&&u.line<n.lastLine()&&(u=X(u.line+1,0)),l.line<i.viewFrom||u.line>i.viewTo-1)return!1;var p,m,b;l.line==i.viewFrom||(p=Yi(n,l.line))==0?(m=C(i.view[0].line),b=i.view[0].node):(m=C(i.view[p].line),b=i.view[p-1].node.nextSibling);var x=Yi(n,u.line),S,N;if(x==i.view.length-1?(S=i.viewTo-1,N=i.lineDiv.lastChild):(S=C(i.view[x+1].line)-1,N=i.view[x+1].node.previousSibling),!b)return!1;for(var D=n.doc.splitLines(Ex(n,b,N,m,S)),j=Or(n.doc,X(m,0),X(S,$t(n.doc,S).text.length));D.length>1&&j.length>1;)if(at(D)==at(j))D.pop(),j.pop(),S--;else if(D[0]==j[0])D.shift(),j.shift(),m++;else break;for(var W=0,J=0,ct=D[0],gt=j[0],wt=Math.min(ct.length,gt.length);W<wt&&ct.charCodeAt(W)==gt.charCodeAt(W);)++W;for(var kt=at(D),xt=at(j),Lt=Math.min(kt.length-(D.length==1?W:0),xt.length-(j.length==1?W:0));J<Lt&&kt.charCodeAt(kt.length-J-1)==xt.charCodeAt(xt.length-J-1);)++J;if(D.length==1&&j.length==1&&m==l.line)for(;W&&W>l.ch&&kt.charCodeAt(kt.length-J-1)==xt.charCodeAt(xt.length-J-1);)W--,J++;D[D.length-1]=kt.slice(0,kt.length-J).replace(/^\u200b+/,""),D[0]=D[0].slice(W).replace(/\u200b+$/,"");var Dt=X(m,W),Pt=X(S,j.length?at(j).length-J:0);if(D.length>1||D[0]||St(Dt,Pt))return Wo(n.doc,D,Dt,Pt,"+input"),!0},pe.prototype.ensurePolled=function(){this.forceCompositionEnd()},pe.prototype.reset=function(){this.forceCompositionEnd()},pe.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},pe.prototype.readFromDOMSoon=function(){var n=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(n.readDOMTimeout=null,n.composing)if(n.composing.done)n.composing=null;else return;n.updateFromDOM()},80))},pe.prototype.updateFromDOM=function(){var n=this;(this.cm.isReadOnly()||!this.pollContent())&&kn(this.cm,function(){return un(n.cm)})},pe.prototype.setUneditable=function(n){n.contentEditable="false"},pe.prototype.onKeyPress=function(n){n.charCode==0||this.composing||(n.preventDefault(),this.cm.isReadOnly()||qe(this.cm,of)(this.cm,String.fromCharCode(n.charCode==null?n.keyCode:n.charCode),0))},pe.prototype.readOnlyChanged=function(n){this.div.contentEditable=String(n!="nocursor")},pe.prototype.onContextMenu=function(){},pe.prototype.resetPosition=function(){},pe.prototype.needsContentAttribute=!0;function kg(n,i){var a=Tu(n,i.line);if(!a||a.hidden)return null;var l=$t(n.doc,i.line),u=Qd(a,l,i.line),p=Bt(l,n.doc.direction),m="left";if(p){var b=Xn(p,i.ch);m=b%2?"right":"left"}var x=np(u.map,i.ch,m);return x.offset=x.collapse=="right"?x.end:x.start,x}function Tx(n){for(var i=n;i;i=i.parentNode)if(/CodeMirror-gutter-wrapper/.test(i.className))return!0;return!1}function Ko(n,i){return i&&(n.bad=!0),n}function Ex(n,i,a,l,u){var p="",m=!1,b=n.doc.lineSeparator(),x=!1;function S(W){return function(J){return J.id==W}}function N(){m&&(p+=b,x&&(p+=b),m=x=!1)}function D(W){W&&(N(),p+=W)}function j(W){if(W.nodeType==1){var J=W.getAttribute("cm-text");if(J){D(J);return}var ct=W.getAttribute("cm-marker"),gt;if(ct){var wt=n.findMarks(X(l,0),X(u+1,0),S(+ct));wt.length&&(gt=wt[0].find(0))&&D(Or(n.doc,gt.from,gt.to).join(b));return}if(W.getAttribute("contenteditable")=="false")return;var kt=/^(pre|div|p|li|table|br)$/i.test(W.nodeName);if(!/^br$/i.test(W.nodeName)&&W.textContent.length==0)return;kt&&N();for(var xt=0;xt<W.childNodes.length;xt++)j(W.childNodes[xt]);/^(pre|p)$/i.test(W.nodeName)&&(x=!0),kt&&(m=!0)}else W.nodeType==3&&D(W.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;j(i),i!=a;)i=i.nextSibling,x=!1;return p}function Oa(n,i,a){var l;if(i==n.display.lineDiv){if(l=n.display.lineDiv.childNodes[a],!l)return Ko(n.clipPos(X(n.display.viewTo-1)),!0);i=null,a=0}else for(l=i;;l=l.parentNode){if(!l||l==n.display.lineDiv)return null;if(l.parentNode&&l.parentNode==n.display.lineDiv)break}for(var u=0;u<n.display.view.length;u++){var p=n.display.view[u];if(p.node==l)return Lx(p,i,a)}}function Lx(n,i,a){var l=n.text.firstChild,u=!1;if(!i||!tt(l,i))return Ko(X(C(n.line),0),!0);if(i==l&&(u=!0,i=l.childNodes[a],a=0,!i)){var p=n.rest?at(n.rest):n.line;return Ko(X(C(p),p.text.length),u)}var m=i.nodeType==3?i:null,b=i;for(!m&&i.childNodes.length==1&&i.firstChild.nodeType==3&&(m=i.firstChild,a&&(a=m.nodeValue.length));b.parentNode!=l;)b=b.parentNode;var x=n.measure,S=x.maps;function N(gt,wt,kt){for(var xt=-1;xt<(S?S.length:0);xt++)for(var Lt=xt<0?x.map:S[xt],Dt=0;Dt<Lt.length;Dt+=3){var Pt=Lt[Dt+2];if(Pt==gt||Pt==wt){var Jt=C(xt<0?n.line:n.rest[xt]),ve=Lt[Dt]+kt;return(kt<0||Pt!=gt)&&(ve=Lt[Dt+(kt?1:0)]),X(Jt,ve)}}}var D=N(m,b,a);if(D)return Ko(D,u);for(var j=b.nextSibling,W=m?m.nodeValue.length-a:0;j;j=j.nextSibling){if(D=N(j,j.firstChild,0),D)return Ko(X(D.line,D.ch-W),u);W+=j.textContent.length}for(var J=b.previousSibling,ct=a;J;J=J.previousSibling){if(D=N(J,J.firstChild,-1),D)return Ko(X(D.line,D.ch+ct),u);ct+=J.textContent.length}}var Le=function(n){this.cm=n,this.prevInput="",this.pollingFast=!1,this.polling=new Nt,this.hasSelection=!1,this.composing=null,this.resetting=!1};Le.prototype.init=function(n){var i=this,a=this,l=this.cm;this.createField(n);var u=this.textarea;n.wrapper.insertBefore(this.wrapper,n.wrapper.firstChild),E&&(u.style.width="0px"),Rt(u,"input",function(){d&&g>=9&&i.hasSelection&&(i.hasSelection=null),a.poll()}),Rt(u,"paste",function(m){Ce(l,m)||bg(m,l)||(l.state.pasteIncoming=+new Date,a.fastPoll())});function p(m){if(!Ce(l,m)){if(l.somethingSelected())Pa({lineWise:!1,text:l.getSelections()});else if(l.options.lineWiseCopyCut){var b=xg(l);Pa({lineWise:!0,text:b.text}),m.type=="cut"?l.setSelections(b.ranges,null,z):(a.prevInput="",u.value=b.text.join(`
|
|
44
|
+
`),Wt(u))}else return;m.type=="cut"&&(l.state.cutIncoming=+new Date)}}Rt(u,"cut",p),Rt(u,"copy",p),Rt(n.scroller,"paste",function(m){if(!(zr(n,m)||Ce(l,m))){if(!u.dispatchEvent){l.state.pasteIncoming=+new Date,a.focus();return}var b=new Event("paste");b.clipboardData=m.clipboardData,u.dispatchEvent(b)}}),Rt(n.lineSpace,"selectstart",function(m){zr(n,m)||Ze(m)}),Rt(u,"compositionstart",function(){var m=l.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:m,range:l.markText(m,l.getCursor("to"),{className:"CodeMirror-composing"})}}),Rt(u,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},Le.prototype.createField=function(n){this.wrapper=_g(),this.textarea=this.wrapper.firstChild;var i=this.cm.options;sf(this.textarea,i.spellcheck,i.autocorrect,i.autocapitalize)},Le.prototype.screenReaderLabelChanged=function(n){n?this.textarea.setAttribute("aria-label",n):this.textarea.removeAttribute("aria-label")},Le.prototype.prepareSelection=function(){var n=this.cm,i=n.display,a=n.doc,l=dp(n);if(n.options.moveInputWithCursor){var u=nr(n,a.sel.primary().head,"div"),p=i.wrapper.getBoundingClientRect(),m=i.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(i.wrapper.clientHeight-10,u.top+m.top-p.top)),l.teLeft=Math.max(0,Math.min(i.wrapper.clientWidth-10,u.left+m.left-p.left))}return l},Le.prototype.showSelection=function(n){var i=this.cm,a=i.display;I(a.cursorDiv,n.cursors),I(a.selectionDiv,n.selection),n.teTop!=null&&(this.wrapper.style.top=n.teTop+"px",this.wrapper.style.left=n.teLeft+"px")},Le.prototype.reset=function(n){if(!(this.contextMenuPending||this.composing&&n)){var i=this.cm;if(this.resetting=!0,i.somethingSelected()){this.prevInput="";var a=i.getSelection();this.textarea.value=a,i.state.focused&&Wt(this.textarea),d&&g>=9&&(this.hasSelection=a)}else n||(this.prevInput=this.textarea.value="",d&&g>=9&&(this.hasSelection=null));this.resetting=!1}},Le.prototype.getField=function(){return this.textarea},Le.prototype.supportsTouch=function(){return!1},Le.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!$||mt(Zt(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},Le.prototype.blur=function(){this.textarea.blur()},Le.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Le.prototype.receivedFocus=function(){this.slowPoll()},Le.prototype.slowPoll=function(){var n=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){n.poll(),n.cm.state.focused&&n.slowPoll()})},Le.prototype.fastPoll=function(){var n=!1,i=this;i.pollingFast=!0;function a(){var l=i.poll();!l&&!n?(n=!0,i.polling.set(60,a)):(i.pollingFast=!1,i.slowPoll())}i.polling.set(20,a)},Le.prototype.poll=function(){var n=this,i=this.cm,a=this.textarea,l=this.prevInput;if(this.contextMenuPending||this.resetting||!i.state.focused||ei(a)&&!l&&!this.composing||i.isReadOnly()||i.options.disableInput||i.state.keySeq)return!1;var u=a.value;if(u==l&&!i.somethingSelected())return!1;if(d&&g>=9&&this.hasSelection===u||F&&/[\uf700-\uf7ff]/.test(u))return i.display.input.reset(),!1;if(i.doc.sel==i.display.selForContextMenu){var p=u.charCodeAt(0);if(p==8203&&!l&&(l=""),p==8666)return this.reset(),this.cm.execCommand("undo")}for(var m=0,b=Math.min(l.length,u.length);m<b&&l.charCodeAt(m)==u.charCodeAt(m);)++m;return kn(i,function(){of(i,u.slice(m),l.length-m,null,n.composing?"*compose":null),u.length>1e3||u.indexOf(`
|
|
45
45
|
`)>-1?a.value=n.prevInput="":n.prevInput=u,n.composing&&(n.composing.range.clear(),n.composing.range=i.markText(n.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Le.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Le.prototype.onKeyPress=function(){d&&g>=9&&(this.hasSelection=null),this.fastPoll()},Le.prototype.onContextMenu=function(n){var i=this,a=i.cm,l=a.display,u=i.textarea;i.contextMenuPending&&i.contextMenuPending();var p=Xi(a,n),m=l.scroller.scrollTop;if(!p||L)return;var b=a.options.resetSelectionOnContextMenu;b&&a.doc.sel.contains(p)==-1&&qe(a,Je)(a.doc,si(p),z);var x=u.style.cssText,S=i.wrapper.style.cssText,N=i.wrapper.offsetParent.getBoundingClientRect();i.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
46
46
|
top: `+(n.clientY-N.top-5)+"px; left: "+(n.clientX-N.left-5)+`px;
|
|
47
47
|
z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
48
|
-
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var D;v&&(D=u.ownerDocument.defaultView.scrollY),l.input.focus(),v&&u.ownerDocument.defaultView.scrollTo(null,D),l.input.reset(),a.somethingSelected()||(u.value=i.prevInput=" "),i.contextMenuPending=W,l.selForContextMenu=a.doc.sel,clearTimeout(l.detectingSelectAll);function j(){if(u.selectionStart!=null){var ct=a.somethingSelected(),gt=""+(ct?u.value:"");u.value="⇚",u.value=gt,i.prevInput=ct?"":"",u.selectionStart=1,u.selectionEnd=gt.length,l.selForContextMenu=a.doc.sel}}function W(){if(i.contextMenuPending==W&&(i.contextMenuPending=!1,i.wrapper.style.cssText=S,u.style.cssText=x,d&&g<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=m),u.selectionStart!=null)){(!d||d&&g<9)&&j();var ct=0,gt=function(){l.selForContextMenu==a.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&i.prevInput==""?qe(a,Wp)(a):ct++<10?l.detectingSelectAll=setTimeout(gt,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(gt,200)}}if(d&&g>=9&&j(),Z){Qr(n);var J=function(){Ye(window,"mouseup",J),setTimeout(W,20)};Rt(window,"mouseup",J)}else setTimeout(W,50)},Le.prototype.readOnlyChanged=function(n){n||this.reset(),this.textarea.disabled=n=="nocursor",this.textarea.readOnly=!!n},Le.prototype.setUneditable=function(){},Le.prototype.needsContentAttribute=!1;function Ax(n,i){if(i=i?it(i):{},i.value=n.value,!i.tabindex&&n.tabIndex&&(i.tabindex=n.tabIndex),!i.placeholder&&n.placeholder&&(i.placeholder=n.placeholder),i.autofocus==null){var a=mt(Zt(n));i.autofocus=a==n||n.getAttribute("autofocus")!=null&&a==document.body}function l(){n.value=b.getValue()}var u;if(n.form&&(Rt(n.form,"submit",l),!i.leaveSubmitMethodAlone)){var p=n.form;u=p.submit;try{var m=p.submit=function(){l(),p.submit=u,p.submit(),p.submit=m}}catch{}}i.finishInit=function(x){x.save=l,x.getTextArea=function(){return n},x.toTextArea=function(){x.toTextArea=isNaN,l(),n.parentNode.removeChild(x.getWrapperElement()),n.style.display="",n.form&&(Ye(n.form,"submit",l),!i.leaveSubmitMethodAlone&&typeof n.form.submit=="function"&&(n.form.submit=u))}},n.style.display="none";var b=we(function(x){return n.parentNode.insertBefore(x,n.nextSibling)},i);return b}function Mx(n){n.off=Ye,n.on=Rt,n.wheelEventPixels=z1,n.Doc=fn,n.splitLines=Hn,n.countColumn=ft,n.findColumn=rt,n.isWordChar=Ht,n.Pass=O,n.signal=ke,n.Line=$o,n.changeEnd=li,n.scrollbarModel=bp,n.Pos=X,n.cmpPos=St,n.modes=To,n.mimeModes=Qn,n.resolveMode=Eo,n.getMode=Lo,n.modeExtensions=ni,n.extendMode=Ao,n.copyState=vr,n.startState=Mo,n.innerMode=Ts,n.commands=Ys,n.keyMap=Fr,n.keyName=og,n.isModifierKey=rg,n.lookupKey=jo,n.normalizeKeyMap=ox,n.StringStream=Te,n.SharedTextMarker=Gs,n.TextMarker=ci,n.LineWidget=Vs,n.e_preventDefault=Ze,n.e_stopPropagation=ko,n.e_stop=Qr,n.addClass=Mt,n.contains=tt,n.rmClass=lt,n.keyNames=ui}xx(we),Cx(we);var Nx="iter insert remove copy getEditor constructor".split(" ");for(var Ra in fn.prototype)fn.prototype.hasOwnProperty(Ra)&&Et(Nx,Ra)<0&&(we.prototype[Ra]=function(n){return function(){return n.apply(this.doc,arguments)}}(fn.prototype[Ra]));return Yn(fn),we.inputStyles={textarea:Le,contenteditable:pe},we.defineMode=function(n){!we.defaults.mode&&n!="null"&&(we.defaults.mode=n),tr.apply(this,arguments)},we.defineMIME=Vi,we.defineMode("null",function(){return{token:function(n){return n.skipToEnd()}}}),we.defineMIME("text/plain","null"),we.defineExtension=function(n,i){we.prototype[n]=i},we.defineDocExtension=function(n,i){fn.prototype[n]=i},we.fromTextArea=Ax,Mx(we),we.version="5.65.16",we})})(Ub);var Ss=Ub.exports;const kct=jy(Ss);var Cct={exports:{}};(function(t,e){(function(r){r(Ss)})(function(r){r.defineMode("javascript",function(o,s){var c=o.indentUnit,f=s.statementIndent,h=s.jsonld,d=s.json||h,g=s.trackScope!==!1,v=s.typescript,y=s.wordCharacters||/[\w$\xa1-\uffff]/,w=function(){function C(Fe){return{type:Fe,style:"keyword"}}var R=C("keyword a"),nt=C("keyword b"),dt=C("keyword c"),X=C("keyword d"),St=C("operator"),ce={type:"atom",style:"atom"};return{if:C("if"),while:R,with:R,else:nt,do:nt,try:nt,finally:nt,return:X,break:X,continue:X,new:C("new"),delete:dt,void:dt,throw:dt,debugger:C("debugger"),var:C("var"),const:C("var"),let:C("var"),function:C("function"),catch:C("catch"),for:C("for"),switch:C("switch"),case:C("case"),default:C("default"),in:St,typeof:St,instanceof:St,true:ce,false:ce,null:ce,undefined:ce,NaN:ce,Infinity:ce,this:C("this"),class:C("class"),super:C("atom"),yield:dt,export:C("export"),import:C("import"),extends:dt,await:dt}}(),_=/[+\-*&%=<>!?|~^@]/,L=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function M(C){for(var R=!1,nt,dt=!1;(nt=C.next())!=null;){if(!R){if(nt=="/"&&!dt)return;nt=="["?dt=!0:dt&&nt=="]"&&(dt=!1)}R=!R&&nt=="\\"}}var A,T;function E(C,R,nt){return A=C,T=nt,R}function P(C,R){var nt=C.next();if(nt=='"'||nt=="'")return R.tokenize=$(nt),R.tokenize(C,R);if(nt=="."&&C.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(nt=="."&&C.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(nt))return E(nt);if(nt=="="&&C.eat(">"))return E("=>","operator");if(nt=="0"&&C.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(nt))return C.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(nt=="/")return C.eat("*")?(R.tokenize=F,F(C,R)):C.eat("/")?(C.skipToEnd(),E("comment","comment")):$n(C,R,1)?(M(C),C.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(C.eat("="),E("operator","operator",C.current()));if(nt=="`")return R.tokenize=H,H(C,R);if(nt=="#"&&C.peek()=="!")return C.skipToEnd(),E("meta","meta");if(nt=="#"&&C.eatWhile(y))return E("variable","property");if(nt=="<"&&C.match("!--")||nt=="-"&&C.match("->")&&!/\S/.test(C.string.slice(0,C.start)))return C.skipToEnd(),E("comment","comment");if(_.test(nt))return(nt!=">"||!R.lexical||R.lexical.type!=">")&&(C.eat("=")?(nt=="!"||nt=="=")&&C.eat("="):/[<>*+\-|&?]/.test(nt)&&(C.eat(nt),nt==">"&&C.eat(nt))),nt=="?"&&C.eat(".")?E("."):E("operator","operator",C.current());if(y.test(nt)){C.eatWhile(y);var dt=C.current();if(R.lastType!="."){if(w.propertyIsEnumerable(dt)){var X=w[dt];return E(X.type,X.style,dt)}if(dt=="async"&&C.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",dt)}return E("variable","variable",dt)}}function $(C){return function(R,nt){var dt=!1,X;if(h&&R.peek()=="@"&&R.match(L))return nt.tokenize=P,E("jsonld-keyword","meta");for(;(X=R.next())!=null&&!(X==C&&!dt);)dt=!dt&&X=="\\";return dt||(nt.tokenize=P),E("string","string")}}function F(C,R){for(var nt=!1,dt;dt=C.next();){if(dt=="/"&&nt){R.tokenize=P;break}nt=dt=="*"}return E("comment","comment")}function H(C,R){for(var nt=!1,dt;(dt=C.next())!=null;){if(!nt&&(dt=="`"||dt=="$"&&C.eat("{"))){R.tokenize=P;break}nt=!nt&&dt=="\\"}return E("quasi","string-2",C.current())}var st="([{}])";function Y(C,R){R.fatArrowAt&&(R.fatArrowAt=null);var nt=C.string.indexOf("=>",C.start);if(!(nt<0)){if(v){var dt=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(C.string.slice(C.start,nt));dt&&(nt=dt.index)}for(var X=0,St=!1,ce=nt-1;ce>=0;--ce){var Fe=C.string.charAt(ce),cn=st.indexOf(Fe);if(cn>=0&&cn<3){if(!X){++ce;break}if(--X==0){Fe=="("&&(St=!0);break}}else if(cn>=3&&cn<6)++X;else if(y.test(Fe))St=!0;else if(/["'\/`]/.test(Fe))for(;;--ce){if(ce==0)return;var No=C.string.charAt(ce-1);if(No==Fe&&C.string.charAt(ce-2)!="\\"){ce--;break}}else if(St&&!X){++ce;break}}St&&!X&&(R.fatArrowAt=ce)}}var ht={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function Z(C,R,nt,dt,X,St){this.indented=C,this.column=R,this.type=nt,this.prev=X,this.info=St,dt!=null&&(this.align=dt)}function ut(C,R){if(!g)return!1;for(var nt=C.localVars;nt;nt=nt.next)if(nt.name==R)return!0;for(var dt=C.context;dt;dt=dt.prev)for(var nt=dt.vars;nt;nt=nt.next)if(nt.name==R)return!0}function lt(C,R,nt,dt,X){var St=C.cc;for(G.state=C,G.stream=X,G.marked=null,G.cc=St,G.style=R,C.lexical.hasOwnProperty("align")||(C.lexical.align=!0);;){var ce=St.length?St.pop():d?Et:ft;if(ce(nt,dt)){for(;St.length&&St[St.length-1].lex;)St.pop()();return G.marked?G.marked:nt=="variable"&&ut(C,dt)?"variable-2":R}}}var G={state:null,column:null,marked:null,cc:null};function I(){for(var C=arguments.length-1;C>=0;C--)G.cc.push(arguments[C])}function k(){return I.apply(null,arguments),!0}function q(C,R){for(var nt=R;nt;nt=nt.next)if(nt.name==C)return!0;return!1}function U(C){var R=G.state;if(G.marked="def",!!g){if(R.context){if(R.lexical.info=="var"&&R.context&&R.context.block){var nt=tt(C,R.context);if(nt!=null){R.context=nt;return}}else if(!q(C,R.localVars)){R.localVars=new qt(C,R.localVars);return}}s.globalVars&&!q(C,R.globalVars)&&(R.globalVars=new qt(C,R.globalVars))}}function tt(C,R){if(R)if(R.block){var nt=tt(C,R.prev);return nt?nt==R.prev?R:new Mt(nt,R.vars,!0):null}else return q(C,R.vars)?R:new Mt(R.prev,new qt(C,R.vars),!1);else return null}function mt(C){return C=="public"||C=="private"||C=="protected"||C=="abstract"||C=="readonly"}function Mt(C,R,nt){this.prev=C,this.vars=R,this.block=nt}function qt(C,R){this.name=C,this.next=R}var Wt=new qt("this",new qt("arguments",null));function ne(){G.state.context=new Mt(G.state.context,G.state.localVars,!1),G.state.localVars=Wt}function ee(){G.state.context=new Mt(G.state.context,G.state.localVars,!0),G.state.localVars=null}ne.lex=ee.lex=!0;function Zt(){G.state.localVars=G.state.context.vars,G.state.context=G.state.context.prev}Zt.lex=!0;function Tt(C,R){var nt=function(){var dt=G.state,X=dt.indented;if(dt.lexical.type=="stat")X=dt.lexical.indented;else for(var St=dt.lexical;St&&St.type==")"&&St.align;St=St.prev)X=St.indented;dt.lexical=new Z(X,G.stream.column(),C,null,dt.lexical,R)};return nt.lex=!0,nt}function V(){var C=G.state;C.lexical.prev&&(C.lexical.type==")"&&(C.indented=C.lexical.indented),C.lexical=C.lexical.prev)}V.lex=!0;function it(C){function R(nt){return nt==C?k():C==";"||nt=="}"||nt==")"||nt=="]"?I():k(R)}return R}function ft(C,R){return C=="var"?k(Tt("vardef",R),ko,it(";"),V):C=="keyword a"?k(Tt("form"),O,ft,V):C=="keyword b"?k(Tt("form"),ft,V):C=="keyword d"?G.stream.match(/^\s*$/,!1)?k():k(Tt("stat"),K,it(";"),V):C=="debugger"?k(it(";")):C=="{"?k(Tt("}"),ee,Ke,V,Zt):C==";"?k():C=="if"?(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==V&&G.state.cc.pop()(),k(Tt("form"),O,ft,V,Co)):C=="function"?k(Hn):C=="for"?k(Tt("form"),ee,ia,ft,Zt,V):C=="class"||v&&R=="interface"?(G.marked="keyword",k(Tt("form",C=="class"?C:R),To,V)):C=="variable"?v&&R=="declare"?(G.marked="keyword",k(ft)):v&&(R=="module"||R=="enum"||R=="type")&&G.stream.match(/^\s*\w/,!1)?(G.marked="keyword",R=="enum"?k($t):R=="type"?k(oa,it("operator"),Bt,it(";")):k(Tt("form"),an,it("{"),Tt("}"),Ke,V,V)):v&&R=="namespace"?(G.marked="keyword",k(Tt("form"),Et,ft,V)):v&&R=="abstract"?(G.marked="keyword",k(ft)):k(Tt("stat"),Ot):C=="switch"?k(Tt("form"),O,it("{"),Tt("}","switch"),ee,Ke,V,V,Zt):C=="case"?k(Et,it(":")):C=="default"?k(it(":")):C=="catch"?k(Tt("form"),ne,Nt,ft,V,Zt):C=="export"?k(Tt("stat"),Eo,V):C=="import"?k(Tt("stat"),ni,V):C=="async"?k(ft):R=="@"?k(Et,ft):I(Tt("stat"),Et,it(";"),V)}function Nt(C){if(C=="(")return k(Jn,it(")"))}function Et(C,R){return z(C,R,!1)}function Xt(C,R){return z(C,R,!0)}function O(C){return C!="("?I():k(Tt(")"),K,it(")"),V)}function z(C,R,nt){if(G.state.fatArrowAt==G.stream.start){var dt=nt?bt:at;if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,it("=>"),dt,Zt);if(C=="variable")return I(ne,an,it("=>"),dt,Zt)}var X=nt?rt:ot;return ht.hasOwnProperty(C)?k(X):C=="function"?k(Hn,X):C=="class"||v&&R=="interface"?(G.marked="keyword",k(Tt("form"),gu,V)):C=="keyword c"||C=="async"?k(nt?Xt:Et):C=="("?k(Tt(")"),K,it(")"),V,X):C=="operator"||C=="spread"?k(nt?Xt:Et):C=="["?k(Tt("]"),Te,V,X):C=="{"?ze(Vt,"}",null,X):C=="quasi"?I(vt,X):C=="new"?k(pt(nt)):k()}function K(C){return C.match(/[;\}\)\],]/)?I():I(Et)}function ot(C,R){return C==","?k(K):rt(C,R,!1)}function rt(C,R,nt){var dt=nt==!1?ot:rt,X=nt==!1?Et:Xt;if(C=="=>")return k(ne,nt?bt:at,Zt);if(C=="operator")return/\+\+|--/.test(R)||v&&R=="!"?k(dt):v&&R=="<"&&G.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(Tt(">"),te(Bt,">"),V,dt):R=="?"?k(Et,it(":"),X):k(X);if(C=="quasi")return I(vt,dt);if(C!=";"){if(C=="(")return ze(Xt,")","call",dt);if(C==".")return k(Ht,dt);if(C=="[")return k(Tt("]"),K,it("]"),V,dt);if(v&&R=="as")return G.marked="keyword",k(Bt,dt);if(C=="regexp")return G.state.lastType=G.marked="operator",G.stream.backUp(G.stream.pos-G.stream.start-1),k(X)}}function vt(C,R){return C!="quasi"?I():R.slice(R.length-2)!="${"?k(vt):k(K,Ct)}function Ct(C){if(C=="}")return G.marked="string-2",G.state.tokenize=H,k(vt)}function at(C){return Y(G.stream,G.state),I(C=="{"?ft:Et)}function bt(C){return Y(G.stream,G.state),I(C=="{"?ft:Xt)}function pt(C){return function(R){return R=="."?k(C?zt:At):R=="variable"&&v?k(_n,C?rt:ot):I(C?Xt:Et)}}function At(C,R){if(R=="target")return G.marked="keyword",k(ot)}function zt(C,R){if(R=="target")return G.marked="keyword",k(rt)}function Ot(C){return C==":"?k(V,ft):I(ot,it(";"),V)}function Ht(C){if(C=="variable")return G.marked="property",k()}function Vt(C,R){if(C=="async")return G.marked="property",k(Vt);if(C=="variable"||G.style=="keyword"){if(G.marked="property",R=="get"||R=="set")return k(le);var nt;return v&&G.state.fatArrowAt==G.stream.start&&(nt=G.stream.match(/^\s*:\s*/,!1))&&(G.state.fatArrowAt=G.stream.pos+nt[0].length),k(oe)}else{if(C=="number"||C=="string")return G.marked=h?"property":G.style+" property",k(oe);if(C=="jsonld-keyword")return k(oe);if(v&&mt(R))return G.marked="keyword",k(Vt);if(C=="[")return k(Et,Kn,it("]"),oe);if(C=="spread")return k(Xt,oe);if(R=="*")return G.marked="keyword",k(Vt);if(C==":")return I(oe)}}function le(C){return C!="variable"?I(oe):(G.marked="property",k(Hn))}function oe(C){if(C==":")return k(Xt);if(C=="(")return I(Hn)}function te(C,R,nt){function dt(X,St){if(nt?nt.indexOf(X)>-1:X==","){var ce=G.state.lexical;return ce.info=="call"&&(ce.pos=(ce.pos||0)+1),k(function(Fe,cn){return Fe==R||cn==R?I():I(C)},dt)}return X==R||St==R?k():nt&&nt.indexOf(";")>-1?I(C):k(it(R))}return function(X,St){return X==R||St==R?k():I(C,dt)}}function ze(C,R,nt){for(var dt=3;dt<arguments.length;dt++)G.cc.push(arguments[dt]);return k(Tt(R,nt),te(C,R),V)}function Ke(C){return C=="}"?k():I(ft,Ke)}function Kn(C,R){if(v){if(C==":")return k(Bt);if(R=="?")return k(Kn)}}function Nn(C,R){if(v&&(C==":"||R=="in"))return k(Bt)}function Xn(C){if(v&&C==":")return G.stream.match(/^\s*\w+\s+is\b/,!1)?k(Et,Xe,Bt):k(Bt)}function Xe(C,R){if(R=="is")return G.marked="keyword",k()}function Bt(C,R){if(R=="keyof"||R=="typeof"||R=="infer"||R=="readonly")return G.marked="keyword",k(R=="typeof"?Xt:Bt);if(C=="variable"||R=="void")return G.marked="type",k(Fn);if(R=="|"||R=="&")return k(Bt);if(C=="string"||C=="number"||C=="atom")return k(Fn);if(C=="[")return k(Tt("]"),te(Bt,"]",","),V,Fn);if(C=="{")return k(Tt("}"),Rt,V,Fn);if(C=="(")return k(te(Ce,")"),ji,Fn);if(C=="<")return k(te(Bt,">"),Bt);if(C=="quasi")return I(Ye,Fn)}function ji(C){if(C=="=>")return k(Bt)}function Rt(C){return C.match(/[\}\)\]]/)?k():C==","||C==";"?k(Rt):I(Pr,Rt)}function Pr(C,R){if(C=="variable"||G.style=="keyword")return G.marked="property",k(Pr);if(R=="?"||C=="number"||C=="string")return k(Pr);if(C==":")return k(Bt);if(C=="[")return k(it("variable"),Nn,it("]"),Pr);if(C=="(")return I(ei,Pr);if(!C.match(/[;\}\)\],]/))return k()}function Ye(C,R){return C!="quasi"?I():R.slice(R.length-2)!="${"?k(Ye):k(Bt,ke)}function ke(C){if(C=="}")return G.marked="string-2",G.state.tokenize=H,k(Ye)}function Ce(C,R){return C=="variable"&&G.stream.match(/^\s*[?:]/,!1)||R=="?"?k(Ce):C==":"?k(Bt):C=="spread"?k(Ce):I(Bt)}function Fn(C,R){if(R=="<")return k(Tt(">"),te(Bt,">"),V,Fn);if(R=="|"||C=="."||R=="&")return k(Bt);if(C=="[")return k(Bt,it("]"),Fn);if(R=="extends"||R=="implements")return G.marked="keyword",k(Bt);if(R=="?")return k(Bt,it(":"),Bt)}function _n(C,R){if(R=="<")return k(Tt(">"),te(Bt,">"),V,Fn)}function Yn(){return I(Bt,Ze)}function Ze(C,R){if(R=="=")return k(Bt)}function ko(C,R){return R=="enum"?(G.marked="keyword",k($t)):I(an,Kn,Zn,pu)}function an(C,R){if(v&&mt(R))return G.marked="keyword",k(an);if(C=="variable")return U(R),k();if(C=="spread")return k(an);if(C=="[")return ze(ks,"]");if(C=="{")return ze(Qr,"}")}function Qr(C,R){return C=="variable"&&!G.stream.match(/^\s*:/,!1)?(U(R),k(Zn)):(C=="variable"&&(G.marked="property"),C=="spread"?k(an):C=="}"?I():C=="["?k(Et,it("]"),it(":"),Qr):k(it(":"),an,Zn))}function ks(){return I(an,Zn)}function Zn(C,R){if(R=="=")return k(Xt)}function pu(C){if(C==",")return k(ko)}function Co(C,R){if(C=="keyword b"&&R=="else")return k(Tt("form","else"),ft,V)}function ia(C,R){if(R=="await")return k(ia);if(C=="(")return k(Tt(")"),Cs,V)}function Cs(C){return C=="var"?k(ko,ti):C=="variable"?k(ti):I(ti)}function ti(C,R){return C==")"?k():C==";"?k(ti):R=="in"||R=="of"?(G.marked="keyword",k(Et,ti)):I(Et,ti)}function Hn(C,R){if(R=="*")return G.marked="keyword",k(Hn);if(C=="variable")return U(R),k(Hn);if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,Xn,ft,Zt);if(v&&R=="<")return k(Tt(">"),te(Yn,">"),V,Hn)}function ei(C,R){if(R=="*")return G.marked="keyword",k(ei);if(C=="variable")return U(R),k(ei);if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,Xn,Zt);if(v&&R=="<")return k(Tt(">"),te(Yn,">"),V,ei)}function oa(C,R){if(C=="keyword"||C=="variable")return G.marked="type",k(oa);if(R=="<")return k(Tt(">"),te(Yn,">"),V)}function Jn(C,R){return R=="@"&&k(Et,Jn),C=="spread"?k(Jn):v&&mt(R)?(G.marked="keyword",k(Jn)):v&&C=="this"?k(Kn,Zn):I(an,Kn,Zn)}function gu(C,R){return C=="variable"?To(C,R):Qn(C,R)}function To(C,R){if(C=="variable")return U(R),k(Qn)}function Qn(C,R){if(R=="<")return k(Tt(">"),te(Yn,">"),V,Qn);if(R=="extends"||R=="implements"||v&&C==",")return R=="implements"&&(G.marked="keyword"),k(v?Bt:Et,Qn);if(C=="{")return k(Tt("}"),tr,V)}function tr(C,R){if(C=="async"||C=="variable"&&(R=="static"||R=="get"||R=="set"||v&&mt(R))&&G.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return G.marked="keyword",k(tr);if(C=="variable"||G.style=="keyword")return G.marked="property",k(Vi,tr);if(C=="number"||C=="string")return k(Vi,tr);if(C=="[")return k(Et,Kn,it("]"),Vi,tr);if(R=="*")return G.marked="keyword",k(tr);if(v&&C=="(")return I(ei,tr);if(C==";"||C==",")return k(tr);if(C=="}")return k();if(R=="@")return k(Et,tr)}function Vi(C,R){if(R=="!"||R=="?")return k(Vi);if(C==":")return k(Bt,Zn);if(R=="=")return k(Xt);var nt=G.state.lexical.prev,dt=nt&&nt.info=="interface";return I(dt?ei:Hn)}function Eo(C,R){return R=="*"?(G.marked="keyword",k(Mo,it(";"))):R=="default"?(G.marked="keyword",k(Et,it(";"))):C=="{"?k(te(Lo,"}"),Mo,it(";")):I(ft)}function Lo(C,R){if(R=="as")return G.marked="keyword",k(it("variable"));if(C=="variable")return I(Xt,Lo)}function ni(C){return C=="string"?k():C=="("?I(Et):C=="."?I(ot):I(Ao,vr,Mo)}function Ao(C,R){return C=="{"?ze(Ao,"}"):(C=="variable"&&U(R),R=="*"&&(G.marked="keyword"),k(Ts))}function vr(C){if(C==",")return k(Ao,vr)}function Ts(C,R){if(R=="as")return G.marked="keyword",k(Ao)}function Mo(C,R){if(R=="from")return G.marked="keyword",k(Et)}function Te(C){return C=="]"?k():I(te(Xt,"]"))}function $t(){return I(Tt("form"),an,it("{"),Tt("}"),te(Or,"}"),V,V)}function Or(){return I(an,Zn)}function Es(C,R){return C.lastType=="operator"||C.lastType==","||_.test(R.charAt(0))||/[,.]/.test(R.charAt(0))}function $n(C,R,nt){return R.tokenize==P&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(R.lastType)||R.lastType=="quasi"&&/\{\s*$/.test(C.string.slice(0,C.pos-(nt||0)))}return{startState:function(C){var R={tokenize:P,lastType:"sof",cc:[],lexical:new Z((C||0)-c,0,"block",!1),localVars:s.localVars,context:s.localVars&&new Mt(null,null,!1),indented:C||0};return s.globalVars&&typeof s.globalVars=="object"&&(R.globalVars=s.globalVars),R},token:function(C,R){if(C.sol()&&(R.lexical.hasOwnProperty("align")||(R.lexical.align=!1),R.indented=C.indentation(),Y(C,R)),R.tokenize!=F&&C.eatSpace())return null;var nt=R.tokenize(C,R);return A=="comment"?nt:(R.lastType=A=="operator"&&(T=="++"||T=="--")?"incdec":A,lt(R,nt,A,T,C))},indent:function(C,R){if(C.tokenize==F||C.tokenize==H)return r.Pass;if(C.tokenize!=P)return 0;var nt=R&&R.charAt(0),dt=C.lexical,X;if(!/^\s*else\b/.test(R))for(var St=C.cc.length-1;St>=0;--St){var ce=C.cc[St];if(ce==V)dt=dt.prev;else if(ce!=Co&&ce!=Zt)break}for(;(dt.type=="stat"||dt.type=="form")&&(nt=="}"||(X=C.cc[C.cc.length-1])&&(X==ot||X==rt)&&!/^[,\.=+\-*:?[\(]/.test(R));)dt=dt.prev;f&&dt.type==")"&&dt.prev.type=="stat"&&(dt=dt.prev);var Fe=dt.type,cn=nt==Fe;return Fe=="vardef"?dt.indented+(C.lastType=="operator"||C.lastType==","?dt.info.length+1:0):Fe=="form"&&nt=="{"?dt.indented:Fe=="form"?dt.indented+c:Fe=="stat"?dt.indented+(Es(C,R)?f||c:0):dt.info=="switch"&&!cn&&s.doubleIndentSwitch!=!1?dt.indented+(/^(?:case|default)\b/.test(R)?c:2*c):dt.align?dt.column+(cn?0:1):dt.indented+(cn?0:c)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:h,jsonMode:d,expressionAllowed:$n,skipExpression:function(C){lt(C,"atom","atom","true",new r.StringStream("",2,null))}}}),r.registerHelper("wordChars","javascript",/[\w$]/),r.defineMIME("text/javascript","javascript"),r.defineMIME("text/ecmascript","javascript"),r.defineMIME("application/javascript","javascript"),r.defineMIME("application/x-javascript","javascript"),r.defineMIME("application/ecmascript","javascript"),r.defineMIME("application/json",{name:"javascript",json:!0}),r.defineMIME("application/x-json",{name:"javascript",json:!0}),r.defineMIME("application/manifest+json",{name:"javascript",json:!0}),r.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),r.defineMIME("text/typescript",{name:"javascript",typescript:!0}),r.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Tct=Cct.exports,Ect={exports:{}};(function(t,e){(function(r){r(Ss)})(function(r){var o={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},s={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};r.defineMode("xml",function(c,f){var h=c.indentUnit,d={},g=f.htmlMode?o:s;for(var v in g)d[v]=g[v];for(var v in f)d[v]=f[v];var y,w;function _(k,q){function U(Mt){return q.tokenize=Mt,Mt(k,q)}var tt=k.next();if(tt=="<")return k.eat("!")?k.eat("[")?k.match("CDATA[")?U(A("atom","]]>")):null:k.match("--")?U(A("comment","-->")):k.match("DOCTYPE",!0,!0)?(k.eatWhile(/[\w\._\-]/),U(T(1))):null:k.eat("?")?(k.eatWhile(/[\w\._\-]/),q.tokenize=A("meta","?>"),"meta"):(y=k.eat("/")?"closeTag":"openTag",q.tokenize=L,"tag bracket");if(tt=="&"){var mt;return k.eat("#")?k.eat("x")?mt=k.eatWhile(/[a-fA-F\d]/)&&k.eat(";"):mt=k.eatWhile(/[\d]/)&&k.eat(";"):mt=k.eatWhile(/[\w\.\-:]/)&&k.eat(";"),mt?"atom":"error"}else return k.eatWhile(/[^&<]/),null}_.isInText=!0;function L(k,q){var U=k.next();if(U==">"||U=="/"&&k.eat(">"))return q.tokenize=_,y=U==">"?"endTag":"selfcloseTag","tag bracket";if(U=="=")return y="equals",null;if(U=="<"){q.tokenize=_,q.state=H,q.tagName=q.tagStart=null;var tt=q.tokenize(k,q);return tt?tt+" tag error":"tag error"}else return/[\'\"]/.test(U)?(q.tokenize=M(U),q.stringStartCol=k.column(),q.tokenize(k,q)):(k.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function M(k){var q=function(U,tt){for(;!U.eol();)if(U.next()==k){tt.tokenize=L;break}return"string"};return q.isInAttribute=!0,q}function A(k,q){return function(U,tt){for(;!U.eol();){if(U.match(q)){tt.tokenize=_;break}U.next()}return k}}function T(k){return function(q,U){for(var tt;(tt=q.next())!=null;){if(tt=="<")return U.tokenize=T(k+1),U.tokenize(q,U);if(tt==">")if(k==1){U.tokenize=_;break}else return U.tokenize=T(k-1),U.tokenize(q,U)}return"meta"}}function E(k){return k&&k.toLowerCase()}function P(k,q,U){this.prev=k.context,this.tagName=q||"",this.indent=k.indented,this.startOfLine=U,(d.doNotIndent.hasOwnProperty(q)||k.context&&k.context.noIndent)&&(this.noIndent=!0)}function $(k){k.context&&(k.context=k.context.prev)}function F(k,q){for(var U;;){if(!k.context||(U=k.context.tagName,!d.contextGrabbers.hasOwnProperty(E(U))||!d.contextGrabbers[E(U)].hasOwnProperty(E(q))))return;$(k)}}function H(k,q,U){return k=="openTag"?(U.tagStart=q.column(),st):k=="closeTag"?Y:H}function st(k,q,U){return k=="word"?(U.tagName=q.current(),w="tag",ut):d.allowMissingTagName&&k=="endTag"?(w="tag bracket",ut(k,q,U)):(w="error",st)}function Y(k,q,U){if(k=="word"){var tt=q.current();return U.context&&U.context.tagName!=tt&&d.implicitlyClosed.hasOwnProperty(E(U.context.tagName))&&$(U),U.context&&U.context.tagName==tt||d.matchClosing===!1?(w="tag",ht):(w="tag error",Z)}else return d.allowMissingTagName&&k=="endTag"?(w="tag bracket",ht(k,q,U)):(w="error",Z)}function ht(k,q,U){return k!="endTag"?(w="error",ht):($(U),H)}function Z(k,q,U){return w="error",ht(k,q,U)}function ut(k,q,U){if(k=="word")return w="attribute",lt;if(k=="endTag"||k=="selfcloseTag"){var tt=U.tagName,mt=U.tagStart;return U.tagName=U.tagStart=null,k=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(E(tt))?F(U,tt):(F(U,tt),U.context=new P(U,tt,mt==U.indented)),H}return w="error",ut}function lt(k,q,U){return k=="equals"?G:(d.allowMissing||(w="error"),ut(k,q,U))}function G(k,q,U){return k=="string"?I:k=="word"&&d.allowUnquoted?(w="string",ut):(w="error",ut(k,q,U))}function I(k,q,U){return k=="string"?I:ut(k,q,U)}return{startState:function(k){var q={tokenize:_,state:H,indented:k||0,tagName:null,tagStart:null,context:null};return k!=null&&(q.baseIndent=k),q},token:function(k,q){if(!q.tagName&&k.sol()&&(q.indented=k.indentation()),k.eatSpace())return null;y=null;var U=q.tokenize(k,q);return(U||y)&&U!="comment"&&(w=null,q.state=q.state(y||U,k,q),w&&(U=w=="error"?U+" error":w)),U},indent:function(k,q,U){var tt=k.context;if(k.tokenize.isInAttribute)return k.tagStart==k.indented?k.stringStartCol+1:k.indented+h;if(tt&&tt.noIndent)return r.Pass;if(k.tokenize!=L&&k.tokenize!=_)return U?U.match(/^(\s*)/)[0].length:0;if(k.tagName)return d.multilineTagIndentPastTag!==!1?k.tagStart+k.tagName.length+2:k.tagStart+h*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/<!\[CDATA\[/.test(q))return 0;var mt=q&&/^<(\/)?([\w_:\.-]*)/.exec(q);if(mt&&mt[1])for(;tt;)if(tt.tagName==mt[2]){tt=tt.prev;break}else if(d.implicitlyClosed.hasOwnProperty(E(tt.tagName)))tt=tt.prev;else break;else if(mt)for(;tt;){var Mt=d.contextGrabbers[E(tt.tagName)];if(Mt&&Mt.hasOwnProperty(E(mt[2])))tt=tt.prev;else break}for(;tt&&tt.prev&&!tt.startOfLine;)tt=tt.prev;return tt?tt.indent+h:k.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(k){k.state==G&&(k.state=ut)},xmlCurrentTag:function(k){return k.tagName?{name:k.tagName,close:k.type=="closeTag"}:null},xmlCurrentContext:function(k){for(var q=[],U=k.context;U;U=U.prev)q.push(U.tagName);return q.reverse()}}}),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();var Lct=Ect.exports;(function(t,e){(function(r){r(Ss,Lct,Tct)})(function(r){function o(c,f,h,d){this.state=c,this.mode=f,this.depth=h,this.prev=d}function s(c){return new o(r.copyState(c.mode,c.state),c.mode,c.depth,c.prev&&s(c.prev))}r.defineMode("jsx",function(c,f){var h=r.getMode(c,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),d=r.getMode(c,f&&f.base||"javascript");function g(_){var L=_.tagName;_.tagName=null;var M=h.indent(_,"","");return _.tagName=L,M}function v(_,L){return L.context.mode==h?y(_,L,L.context):w(_,L,L.context)}function y(_,L,M){if(M.depth==2)return _.match(/^.*?\*\//)?M.depth=1:_.skipToEnd(),"comment";if(_.peek()=="{"){h.skipAttribute(M.state);var A=g(M.state),T=M.state.context;if(T&&_.match(/^[^>]*>\s*$/,!1)){for(;T.prev&&!T.startOfLine;)T=T.prev;T.startOfLine?A-=c.indentUnit:M.prev.state.lexical&&(A=M.prev.state.lexical.indented)}else M.depth==1&&(A+=c.indentUnit);return L.context=new o(r.startState(d,A),d,0,L.context),null}if(M.depth==1){if(_.peek()=="<")return h.skipAttribute(M.state),L.context=new o(r.startState(h,g(M.state)),h,0,L.context),null;if(_.match("//"))return _.skipToEnd(),"comment";if(_.match("/*"))return M.depth=2,v(_,L)}var E=h.token(_,M.state),P=_.current(),$;return/\btag\b/.test(E)?/>$/.test(P)?M.state.context?M.depth=0:L.context=L.context.prev:/^</.test(P)&&(M.depth=1):!E&&($=P.indexOf("{"))>-1&&_.backUp(P.length-$),E}function w(_,L,M){if(_.peek()=="<"&&!_.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&d.expressionAllowed(_,M.state))return L.context=new o(r.startState(h,d.indent(M.state,"","")),h,0,L.context),d.skipExpression(M.state),null;var A=d.token(_,M.state);if(!A&&M.depth!=null){var T=_.current();T=="{"?M.depth++:T=="}"&&--M.depth==0&&(L.context=L.context.prev)}return A}return{startState:function(){return{context:new o(r.startState(d),d)}},copyState:function(_){return{context:s(_.context)}},token:v,indent:function(_,L,M){return _.context.mode.indent(_.context.state,L,M)},innerMode:function(_){return _.context}}},"xml","javascript"),r.defineMIME("text/jsx","jsx"),r.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(t,e){(function(r){r(Ss)})(function(r){r.defineOption("placeholder","",function(g,v,y){var w=y&&y!=r.Init;if(v&&!w)g.on("blur",f),g.on("change",h),g.on("swapDoc",h),r.on(g.getInputField(),"compositionupdate",g.state.placeholderCompose=function(){c(g)}),h(g);else if(!v&&w){g.off("blur",f),g.off("change",h),g.off("swapDoc",h),r.off(g.getInputField(),"compositionupdate",g.state.placeholderCompose),o(g);var _=g.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}v&&!g.hasFocus()&&f(g)});function o(g){g.state.placeholder&&(g.state.placeholder.parentNode.removeChild(g.state.placeholder),g.state.placeholder=null)}function s(g){o(g);var v=g.state.placeholder=document.createElement("pre");v.style.cssText="height: 0; overflow: visible",v.style.direction=g.getOption("direction"),v.className="CodeMirror-placeholder CodeMirror-line-like";var y=g.getOption("placeholder");typeof y=="string"&&(y=document.createTextNode(y)),v.appendChild(y),g.display.lineSpace.insertBefore(v,g.display.lineSpace.firstChild)}function c(g){setTimeout(function(){var v=!1;if(g.lineCount()==1){var y=g.getInputField();v=y.nodeName=="TEXTAREA"?!g.getLine(0).length:!/[^\u200b]/.test(y.querySelector(".CodeMirror-line").textContent)}v?s(g):o(g)},20)}function f(g){d(g)&&s(g)}function h(g){var v=g.getWrapperElement(),y=d(g);v.className=v.className.replace(" CodeMirror-empty","")+(y?" CodeMirror-empty":""),y?s(g):o(g)}function d(g){return g.lineCount()===1&&g.getLine(0)===""}})})();(function(t,e){(function(r){r(Ss)})(function(r){function o(f,h,d){this.orientation=h,this.scroll=d,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=f+"-"+h,this.inner=this.node.appendChild(document.createElement("div"));var g=this;r.on(this.inner,"mousedown",function(y){if(y.which!=1)return;r.e_preventDefault(y);var w=g.orientation=="horizontal"?"pageX":"pageY",_=y[w],L=g.pos;function M(){r.off(document,"mousemove",A),r.off(document,"mouseup",M)}function A(T){if(T.which!=1)return M();g.moveTo(L+(T[w]-_)*(g.total/g.size))}r.on(document,"mousemove",A),r.on(document,"mouseup",M)}),r.on(this.node,"click",function(y){r.e_preventDefault(y);var w=g.inner.getBoundingClientRect(),_;g.orientation=="horizontal"?_=y.clientX<w.left?-1:y.clientX>w.right?1:0:_=y.clientY<w.top?-1:y.clientY>w.bottom?1:0,g.moveTo(g.pos+_*g.screen)});function v(y){var w=r.wheelEventPixels(y)[g.orientation=="horizontal"?"x":"y"],_=g.pos;g.moveTo(g.pos+w),g.pos!=_&&r.e_preventDefault(y)}r.on(this.node,"mousewheel",v),r.on(this.node,"DOMMouseScroll",v)}o.prototype.setPos=function(f,h){return f<0&&(f=0),f>this.total-this.screen&&(f=this.total-this.screen),!h&&f==this.pos?!1:(this.pos=f,this.inner.style[this.orientation=="horizontal"?"left":"top"]=f*(this.size/this.total)+"px",!0)},o.prototype.moveTo=function(f){this.setPos(f)&&this.scroll(f,this.orientation)};var s=10;o.prototype.update=function(f,h,d){var g=this.screen!=h||this.total!=f||this.size!=d;g&&(this.screen=h,this.total=f,this.size=d);var v=this.screen*(this.size/this.total);v<s&&(this.size-=s-v,v=s),this.inner.style[this.orientation=="horizontal"?"width":"height"]=v+"px",this.setPos(this.pos,g)};function c(f,h,d){this.addClass=f,this.horiz=new o(f,"horizontal",d),h(this.horiz.node),this.vert=new o(f,"vertical",d),h(this.vert.node),this.width=null}c.prototype.update=function(f){if(this.width==null){var h=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;h&&(this.width=parseInt(h.height))}var d=this.width||0,g=f.scrollWidth>f.clientWidth+1,v=f.scrollHeight>f.clientHeight+1;return this.vert.node.style.display=v?"block":"none",this.horiz.node.style.display=g?"block":"none",v&&(this.vert.update(f.scrollHeight,f.clientHeight,f.viewHeight-(g?d:0)),this.vert.node.style.bottom=g?d+"px":"0"),g&&(this.horiz.update(f.scrollWidth,f.clientWidth,f.viewWidth-(v?d:0)-f.barLeft),this.horiz.node.style.right=v?d+"px":"0",this.horiz.node.style.left=f.barLeft+"px"),{right:v?d:0,bottom:g?d:0}},c.prototype.setScrollTop=function(f){this.vert.setPos(f)},c.prototype.setScrollLeft=function(f){this.horiz.setPos(f)},c.prototype.clear=function(){var f=this.horiz.node.parentNode;f.removeChild(this.horiz.node),f.removeChild(this.vert.node)},r.scrollbarModel.simple=function(f,h){return new c("CodeMirror-simplescroll",f,h)},r.scrollbarModel.overlay=function(f,h){return new c("CodeMirror-overlayscroll",f,h)}})})();function Act(t,e,r={}){const o=kct.fromTextArea(t.value,{theme:"vars",...r,scrollbarStyle:"simple"});let s=!1;return o.on("change",()=>{if(s){s=!1;return}e.value=o.getValue()}),Ge(e,c=>{if(c!==o.getValue()){s=!0;const f=o.listSelections();o.replaceRange(c,o.posFromIndex(0),o.posFromIndex(Number.POSITIVE_INFINITY)),o.setSelections(f)}},{immediate:!0}),f0(o)}const Mct={relative:"","font-mono":"","text-sm":"",class:"codemirror-scrolls"},jb=he({__name:"CodeMirror",props:Vf({mode:{},readOnly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:Vf(["save"],["update:modelValue"]),setup(t,{expose:e,emit:r}){const o=r,s=J0(t,"modelValue"),c=lS(),f={js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},h=Qt(),d=ws();return e({cm:d}),xs(async()=>{d.value=Act(h,s,{...c,mode:f[t.mode||""]||t.mode,readOnly:t.readOnly?!0:void 0,extraKeys:{"Cmd-S":function(g){o("save",g.getValue())},"Ctrl-S":function(g){o("save",g.getValue())}}}),d.value.setSize("100%","100%"),d.value.clearHistory(),setTimeout(()=>d.value.refresh(),100)}),(g,v)=>(et(),yt("div",Mct,[Q("textarea",{ref_key:"el",ref:h},null,512)]))}}),Nct=he({__name:"ViewEditor",props:{file:{}},emits:["draft"],setup(t,{emit:e}){const r=t,o=e,s=Qt(""),c=ws(void 0),f=Qt(!1);Ge(()=>r.file,async()=>{var P;if(!r.file||!((P=r.file)!=null&&P.filepath)){s.value="",c.value=s.value,f.value=!1;return}s.value=await Oe.rpc.readTestFile(r.file.filepath)||"",c.value=s.value,f.value=!1},{immediate:!0});const h=_t(()=>{var P,$;return(($=(P=r.file)==null?void 0:P.filepath)==null?void 0:$.split(/\./g).pop())||"js"}),d=Qt(),g=_t(()=>{var P;return(P=d.value)==null?void 0:P.cm}),v=_t(()=>{var P;return((P=r.file)==null?void 0:P.tasks.filter($=>{var F;return((F=$.result)==null?void 0:F.state)==="fail"}))||[]}),y=[],w=[],_=[],L=Qt(!1);function M(){_.forEach(([P,$,F])=>{P.removeEventListener("click",$),F()}),_.length=0}pat(d,()=>{var P;(P=g.value)==null||P.refresh()});function A(){f.value=c.value!==g.value.getValue()}Ge(f,P=>{o("draft",P)},{immediate:!0});function T(P){const $=((P==null?void 0:P.stacks)||[]).filter(Z=>{var ut;return Z.file&&Z.file===((ut=r.file)==null?void 0:ut.filepath)}),F=$==null?void 0:$[0];if(!F)return;const H=document.createElement("div");H.className="op80 flex gap-x-2 items-center";const st=document.createElement("pre");st.className="c-red-600 dark:c-red-400",st.textContent=`${" ".repeat(F.column)}^ ${(P==null?void 0:P.nameStr)||P.name}: ${(P==null?void 0:P.message)||""}`,H.appendChild(st);const Y=document.createElement("span");Y.className="i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",Y.tabIndex=0,Y.ariaLabel="Open in Editor",Ry(Y,{content:"Open in Editor",placement:"bottom"},!1);const ht=async()=>{await yb(F.file,F.line,F.column)};H.appendChild(Y),_.push([Y,ht,()=>nd(Y)]),w.push(g.value.addLineClass(F.line-1,"wrap","bg-red-500/10")),y.push(g.value.addLineWidget(F.line-1,H))}Ge([g,v],([P])=>{if(!P){M();return}setTimeout(()=>{M(),y.forEach($=>$.clear()),w.forEach($=>{var F;return(F=g.value)==null?void 0:F.removeLineClass($,"wrap")}),y.length=0,w.length=0,P.on("changes",A),v.value.forEach($=>{var F,H;(H=(F=$.result)==null?void 0:F.errors)==null||H.forEach(T)}),L.value||P.clearHistory()},100)},{flush:"post"});async function E(P){L.value=!0,await Oe.rpc.saveTestFile(r.file.filepath,P),c.value=P,f.value=!1}return(P,$)=>{const F=jb;return et(),Yt(F,$i({ref_key:"editor",ref:d,modelValue:B(s),"onUpdate:modelValue":$[0]||($[0]=H=>Ae(s)?s.value=H:null),"h-full":""},{lineNumbers:!0},{mode:B(h),"data-testid":"code-mirror",onSave:E}),null,16,["modelValue","mode"])}}}),$ct=he({__name:"Modal",props:Vf({direction:{default:"bottom"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=J0(t,"modelValue"),r=_t(()=>{switch(t.direction){case"bottom":return"bottom-0 left-0 right-0 border-t";case"top":return"top-0 left-0 right-0 border-b";case"left":return"bottom-0 left-0 top-0 border-r";case"right":return"bottom-0 top-0 right-0 border-l";default:return""}}),o=_t(()=>{switch(t.direction){case"bottom":return"translateY(100%)";case"top":return"translateY(-100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)";default:return""}}),s=()=>e.value=!1;return(c,f)=>(et(),yt("div",{class:de(["fixed inset-0 z-40",e.value?"":"pointer-events-none"])},[Q("div",{class:de(["bg-base inset-0 absolute transition-opacity duration-500 ease-out",e.value?"opacity-50":"opacity-0"]),onClick:s},null,2),Q("div",{class:de(["bg-base border-base absolute transition-all duration-200 ease-out scrolls",[B(r)]]),style:ln(e.value?{}:{transform:B(o)})},[Gn(c.$slots,"default")],6)],2))}}),Pct={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},Oct={"p-4":"",relative:""},Rct=Q("p",null,"Module Info",-1),Dct={op50:"","font-mono":"","text-sm":""},zct={key:0,"p-5":""},Ict={grid:"~ cols-2 rows-[min-content_auto]","overflow-hidden":"","flex-auto":""},Fct=Q("div",{p:"x3 y-1","bg-overlay":"",border:"base b t r"}," Source ",-1),Hct=Q("div",{p:"x3 y-1","bg-overlay":"",border:"base b t"}," Transformed ",-1),qct={key:0},Bct={p:"x3 y-1","bg-overlay":"",border:"base b t"},Wct=he({__name:"ModuleTransformResultView",props:{id:{}},emits:["close"],setup(t,{emit:e}){const r=t,o=e,s=iat(()=>Oe.rpc.getTransformResult(r.id)),c=_t(()=>{var g;return((g=r.id)==null?void 0:g.split(/\./g).pop())||"js"}),f=_t(()=>{var g,v;return((v=(g=s.value)==null?void 0:g.source)==null?void 0:v.trim())||""}),h=_t(()=>{var g,v;return((v=(g=s.value)==null?void 0:g.code)==null?void 0:v.replace(/\/\/# sourceMappingURL=.*\n/,"").trim())||""}),d=_t(()=>{var g,v,y,w;return{mappings:((v=(g=s.value)==null?void 0:g.map)==null?void 0:v.mappings)??"",version:(w=(y=s.value)==null?void 0:y.map)==null?void 0:w.version}});return sat("Escape",()=>{o("close")}),(g,v)=>{const y=_s,w=jb;return et(),yt("div",Pct,[Q("div",Oct,[Rct,Q("p",Dct,jt(g.id),1),It(y,{icon:"i-carbon-close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:v[0]||(v[0]=_=>o("close"))})]),B(s)?(et(),yt(re,{key:1},[Q("div",Ict,[Fct,Hct,It(w,$i({"h-full":"","model-value":B(f),"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"]),It(w,$i({"h-full":"","model-value":B(h),"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"])]),B(d).mappings!==""?(et(),yt("div",qct,[Q("div",Bct," Source map (v"+jt(B(d).version)+") ",1),It(w,$i({"model-value":B(d).mappings,"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"])])):Kt("",!0)],64)):(et(),yt("div",zct," No transform result found for this module. "))])}}});function Uct(t,e){let r;return(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>t(...o),e)}}var vh="http://www.w3.org/1999/xhtml";const mm={svg:"http://www.w3.org/2000/svg",xhtml:vh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fu(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),mm.hasOwnProperty(e)?{space:mm[e],local:t}:t}function jct(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===vh&&e.documentElement.namespaceURI===vh?e.createElement(t):e.createElementNS(r,t)}}function Vct(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Vb(t){var e=fu(t);return(e.local?Vct:jct)(e)}function Gct(){}function pd(t){return t==null?Gct:function(){return this.querySelector(t)}}function Kct(t){typeof t!="function"&&(t=pd(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=new Array(f),d,g,v=0;v<f;++v)(d=c[v])&&(g=t.call(d,d.__data__,v,c))&&("__data__"in d&&(g.__data__=d.__data__),h[v]=g);return new In(o,this._parents)}function Xct(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Yct(){return[]}function Gb(t){return t==null?Yct:function(){return this.querySelectorAll(t)}}function Zct(t){return function(){return Xct(t.apply(this,arguments))}}function Jct(t){typeof t=="function"?t=Zct(t):t=Gb(t);for(var e=this._groups,r=e.length,o=[],s=[],c=0;c<r;++c)for(var f=e[c],h=f.length,d,g=0;g<h;++g)(d=f[g])&&(o.push(t.call(d,d.__data__,g,f)),s.push(d));return new In(o,s)}function Kb(t){return function(){return this.matches(t)}}function Xb(t){return function(e){return e.matches(t)}}var Qct=Array.prototype.find;function tut(t){return function(){return Qct.call(this.children,t)}}function eut(){return this.firstElementChild}function nut(t){return this.select(t==null?eut:tut(typeof t=="function"?t:Xb(t)))}var rut=Array.prototype.filter;function iut(){return Array.from(this.children)}function out(t){return function(){return rut.call(this.children,t)}}function sut(t){return this.selectAll(t==null?iut:out(typeof t=="function"?t:Xb(t)))}function lut(t){typeof t!="function"&&(t=Kb(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=[],d,g=0;g<f;++g)(d=c[g])&&t.call(d,d.__data__,g,c)&&h.push(d);return new In(o,this._parents)}function Yb(t){return new Array(t.length)}function aut(){return new In(this._enter||this._groups.map(Yb),this._parents)}function Dc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Dc.prototype={constructor:Dc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function cut(t){return function(){return t}}function uut(t,e,r,o,s,c){for(var f=0,h,d=e.length,g=c.length;f<g;++f)(h=e[f])?(h.__data__=c[f],o[f]=h):r[f]=new Dc(t,c[f]);for(;f<d;++f)(h=e[f])&&(s[f]=h)}function fut(t,e,r,o,s,c,f){var h,d,g=new Map,v=e.length,y=c.length,w=new Array(v),_;for(h=0;h<v;++h)(d=e[h])&&(w[h]=_=f.call(d,d.__data__,h,e)+"",g.has(_)?s[h]=d:g.set(_,d));for(h=0;h<y;++h)_=f.call(t,c[h],h,c)+"",(d=g.get(_))?(o[h]=d,d.__data__=c[h],g.delete(_)):r[h]=new Dc(t,c[h]);for(h=0;h<v;++h)(d=e[h])&&g.get(w[h])===d&&(s[h]=d)}function hut(t){return t.__data__}function dut(t,e){if(!arguments.length)return Array.from(this,hut);var r=e?fut:uut,o=this._parents,s=this._groups;typeof t!="function"&&(t=cut(t));for(var c=s.length,f=new Array(c),h=new Array(c),d=new Array(c),g=0;g<c;++g){var v=o[g],y=s[g],w=y.length,_=put(t.call(v,v&&v.__data__,g,o)),L=_.length,M=h[g]=new Array(L),A=f[g]=new Array(L),T=d[g]=new Array(w);r(v,y,M,A,T,_,e);for(var E=0,P=0,$,F;E<L;++E)if($=M[E]){for(E>=P&&(P=E+1);!(F=A[P])&&++P<L;);$._next=F||null}}return f=new In(f,o),f._enter=h,f._exit=d,f}function put(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function gut(){return new In(this._exit||this._groups.map(Yb),this._parents)}function vut(t,e,r){var o=this.enter(),s=this,c=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(s=e(s),s&&(s=s.selection())),r==null?c.remove():r(c),o&&s?o.merge(s).order():s}function mut(t){for(var e=t.selection?t.selection():t,r=this._groups,o=e._groups,s=r.length,c=o.length,f=Math.min(s,c),h=new Array(s),d=0;d<f;++d)for(var g=r[d],v=o[d],y=g.length,w=h[d]=new Array(y),_,L=0;L<y;++L)(_=g[L]||v[L])&&(w[L]=_);for(;d<s;++d)h[d]=r[d];return new In(h,this._parents)}function yut(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var o=t[e],s=o.length-1,c=o[s],f;--s>=0;)(f=o[s])&&(c&&f.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(f,c),c=f);return this}function but(t){t||(t=wut);function e(y,w){return y&&w?t(y.__data__,w.__data__):!y-!w}for(var r=this._groups,o=r.length,s=new Array(o),c=0;c<o;++c){for(var f=r[c],h=f.length,d=s[c]=new Array(h),g,v=0;v<h;++v)(g=f[v])&&(d[v]=g);d.sort(e)}return new In(s,this._parents).order()}function wut(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xut(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function _ut(){return Array.from(this)}function Sut(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],s=0,c=o.length;s<c;++s){var f=o[s];if(f)return f}return null}function kut(){let t=0;for(const e of this)++t;return t}function Cut(){return!this.node()}function Tut(t){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],c=0,f=s.length,h;c<f;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function Eut(t){return function(){this.removeAttribute(t)}}function Lut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Aut(t,e){return function(){this.setAttribute(t,e)}}function Mut(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nut(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function $ut(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Put(t,e){var r=fu(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((e==null?r.local?Lut:Eut:typeof e=="function"?r.local?$ut:Nut:r.local?Mut:Aut)(r,e))}function Zb(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Out(t){return function(){this.style.removeProperty(t)}}function Rut(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Dut(t,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function zut(t,e,r){return arguments.length>1?this.each((e==null?Out:typeof e=="function"?Dut:Rut)(t,e,r??"")):ys(this.node(),t)}function ys(t,e){return t.style.getPropertyValue(e)||Zb(t).getComputedStyle(t,null).getPropertyValue(e)}function Iut(t){return function(){delete this[t]}}function Fut(t,e){return function(){this[t]=e}}function Hut(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function qut(t,e){return arguments.length>1?this.each((e==null?Iut:typeof e=="function"?Hut:Fut)(t,e)):this.node()[t]}function Jb(t){return t.trim().split(/^|\s+/)}function gd(t){return t.classList||new Qb(t)}function Qb(t){this._node=t,this._names=Jb(t.getAttribute("class")||"")}Qb.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function tw(t,e){for(var r=gd(t),o=-1,s=e.length;++o<s;)r.add(e[o])}function ew(t,e){for(var r=gd(t),o=-1,s=e.length;++o<s;)r.remove(e[o])}function But(t){return function(){tw(this,t)}}function Wut(t){return function(){ew(this,t)}}function Uut(t,e){return function(){(e.apply(this,arguments)?tw:ew)(this,t)}}function jut(t,e){var r=Jb(t+"");if(arguments.length<2){for(var o=gd(this.node()),s=-1,c=r.length;++s<c;)if(!o.contains(r[s]))return!1;return!0}return this.each((typeof e=="function"?Uut:e?But:Wut)(r,e))}function Vut(){this.textContent=""}function Gut(t){return function(){this.textContent=t}}function Kut(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Xut(t){return arguments.length?this.each(t==null?Vut:(typeof t=="function"?Kut:Gut)(t)):this.node().textContent}function Yut(){this.innerHTML=""}function Zut(t){return function(){this.innerHTML=t}}function Jut(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Qut(t){return arguments.length?this.each(t==null?Yut:(typeof t=="function"?Jut:Zut)(t)):this.node().innerHTML}function tft(){this.nextSibling&&this.parentNode.appendChild(this)}function eft(){return this.each(tft)}function nft(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rft(){return this.each(nft)}function ift(t){var e=typeof t=="function"?t:Vb(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function oft(){return null}function sft(t,e){var r=typeof t=="function"?t:Vb(t),o=e==null?oft:typeof e=="function"?e:pd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function lft(){var t=this.parentNode;t&&t.removeChild(this)}function aft(){return this.each(lft)}function cft(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function uft(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fft(t){return this.select(t?uft:cft)}function hft(t){return arguments.length?this.property("__data__",t):this.node().__data__}function dft(t){return function(e){t.call(this,e,this.__data__)}}function pft(t){return t.trim().split(/^|\s+/).map(function(e){var r="",o=e.indexOf(".");return o>=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function gft(t){return function(){var e=this.__on;if(e){for(var r=0,o=-1,s=e.length,c;r<s;++r)c=e[r],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):e[++o]=c;++o?e.length=o:delete this.__on}}}function vft(t,e,r){return function(){var o=this.__on,s,c=dft(e);if(o){for(var f=0,h=o.length;f<h;++f)if((s=o[f]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=r),s.value=e;return}}this.addEventListener(t.type,c,r),s={type:t.type,name:t.name,value:e,listener:c,options:r},o?o.push(s):this.__on=[s]}}function mft(t,e,r){var o=pft(t+""),s,c=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var d=0,g=h.length,v;d<g;++d)for(s=0,v=h[d];s<c;++s)if((f=o[s]).type===v.type&&f.name===v.name)return v.value}return}for(h=e?vft:gft,s=0;s<c;++s)this.each(h(o[s],e,r));return this}function nw(t,e,r){var o=Zb(t),s=o.CustomEvent;typeof s=="function"?s=new s(e,r):(s=o.document.createEvent("Event"),r?(s.initEvent(e,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function yft(t,e){return function(){return nw(this,t,e)}}function bft(t,e){return function(){return nw(this,t,e.apply(this,arguments))}}function wft(t,e){return this.each((typeof e=="function"?bft:yft)(t,e))}function*xft(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],s=0,c=o.length,f;s<c;++s)(f=o[s])&&(yield f)}var rw=[null];function In(t,e){this._groups=t,this._parents=e}function ea(){return new In([[document.documentElement]],rw)}function _ft(){return this}In.prototype=ea.prototype={constructor:In,select:Kct,selectAll:Jct,selectChild:nut,selectChildren:sut,filter:lut,data:dut,enter:aut,exit:gut,join:vut,merge:mut,selection:_ft,order:yut,sort:but,call:xut,nodes:_ut,node:Sut,size:kut,empty:Cut,each:Tut,attr:Put,style:zut,property:qut,classed:jut,text:Xut,html:Qut,raise:eft,lower:rft,append:ift,insert:sft,remove:aft,clone:fft,datum:hft,on:mft,dispatch:wft,[Symbol.iterator]:xft};function Ln(t){return typeof t=="string"?new In([[document.querySelector(t)]],[document.documentElement]):new In([[t]],rw)}function Sft(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Ur(t,e){if(t=Sft(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}class vn{constructor(e,r){this.x=e,this.y=r}static of([e,r]){return new vn(e,r)}add(e){return new vn(this.x+e.x,this.y+e.y)}subtract(e){return new vn(this.x-e.x,this.y-e.y)}multiply(e){return new vn(this.x*e,this.y*e)}divide(e){return new vn(this.x/e,this.y/e)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-e.x*this.y}hadamard(e){return new vn(this.x*e.x,this.y*e.y)}length(){return Math.sqrt(this.x**2+this.y**2)}normalize(){const e=this.length();return new vn(this.x/e,this.y/e)}rotateByRadians(e){const r=Math.cos(e),o=Math.sin(e);return new vn(this.x*r-this.y*o,this.x*o+this.y*r)}rotateByDegrees(e){return this.rotateByRadians(e*Math.PI/180)}}var kft={value:()=>{}};function na(){for(var t=0,e=arguments.length,r={},o;t<e;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new hc(r)}function hc(t){this._=t}function Cft(t,e){return t.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");if(s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}hc.prototype=na.prototype={constructor:hc,on:function(t,e){var r=this._,o=Cft(t+"",r),s,c=-1,f=o.length;if(arguments.length<2){for(;++c<f;)if((s=(t=o[c]).type)&&(s=Tft(r[s],t.name)))return s;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++c<f;)if(s=(t=o[c]).type)r[s]=ym(r[s],t.name,e);else if(e==null)for(s in r)r[s]=ym(r[s],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new hc(t)},call:function(t,e){if((s=arguments.length-2)>0)for(var r=new Array(s),o=0,s,c;o<s;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],o=0,s=c.length;o<s;++o)c[o].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],s=0,c=o.length;s<c;++s)o[s].value.apply(e,r)}};function Tft(t,e){for(var r=0,o=t.length,s;r<o;++r)if((s=t[r]).name===e)return s.value}function ym(t,e,r){for(var o=0,s=t.length;o<s;++o)if(t[o].name===e){t[o]=kft,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:e,value:r}),t}const Eft={passive:!1},Wl={capture:!0,passive:!1};function $f(t){t.stopImmediatePropagation()}function cs(t){t.preventDefault(),t.stopImmediatePropagation()}function iw(t){var e=t.document.documentElement,r=Ln(t).on("dragstart.drag",cs,Wl);"onselectstart"in e?r.on("selectstart.drag",cs,Wl):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ow(t,e){var r=t.document.documentElement,o=Ln(t).on("dragstart.drag",null);e&&(o.on("click.drag",cs,Wl),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Ya=t=>()=>t;function mh(t,{sourceEvent:e,subject:r,target:o,identifier:s,active:c,x:f,y:h,dx:d,dy:g,dispatch:v}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:v}})}mh.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Lft(t){return!t.ctrlKey&&!t.button}function Aft(){return this.parentNode}function Mft(t,e){return e??{x:t.x,y:t.y}}function Nft(){return navigator.maxTouchPoints||"ontouchstart"in this}function $ft(){var t=Lft,e=Aft,r=Mft,o=Nft,s={},c=na("start","drag","end"),f=0,h,d,g,v,y=0;function w($){$.on("mousedown.drag",_).filter(o).on("touchstart.drag",A).on("touchmove.drag",T,Eft).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _($,F){if(!(v||!t.call(this,$,F))){var H=P(this,e.call(this,$,F),$,F,"mouse");H&&(Ln($.view).on("mousemove.drag",L,Wl).on("mouseup.drag",M,Wl),iw($.view),$f($),g=!1,h=$.clientX,d=$.clientY,H("start",$))}}function L($){if(cs($),!g){var F=$.clientX-h,H=$.clientY-d;g=F*F+H*H>y}s.mouse("drag",$)}function M($){Ln($.view).on("mousemove.drag mouseup.drag",null),ow($.view,g),cs($),s.mouse("end",$)}function A($,F){if(t.call(this,$,F)){var H=$.changedTouches,st=e.call(this,$,F),Y=H.length,ht,Z;for(ht=0;ht<Y;++ht)(Z=P(this,st,$,F,H[ht].identifier,H[ht]))&&($f($),Z("start",$,H[ht]))}}function T($){var F=$.changedTouches,H=F.length,st,Y;for(st=0;st<H;++st)(Y=s[F[st].identifier])&&(cs($),Y("drag",$,F[st]))}function E($){var F=$.changedTouches,H=F.length,st,Y;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),st=0;st<H;++st)(Y=s[F[st].identifier])&&($f($),Y("end",$,F[st]))}function P($,F,H,st,Y,ht){var Z=c.copy(),ut=Ur(ht||H,F),lt,G,I;if((I=r.call($,new mh("beforestart",{sourceEvent:H,target:w,identifier:Y,active:f,x:ut[0],y:ut[1],dx:0,dy:0,dispatch:Z}),st))!=null)return lt=I.x-ut[0]||0,G=I.y-ut[1]||0,function k(q,U,tt){var mt=ut,Mt;switch(q){case"start":s[Y]=k,Mt=f++;break;case"end":delete s[Y],--f;case"drag":ut=Ur(tt||U,F),Mt=f;break}Z.call(q,$,new mh(q,{sourceEvent:U,subject:I,target:w,identifier:Y,active:Mt,x:ut[0]+lt,y:ut[1]+G,dx:ut[0]-mt[0],dy:ut[1]-mt[1],dispatch:Z}),st)}}return w.filter=function($){return arguments.length?(t=typeof $=="function"?$:Ya(!!$),w):t},w.container=function($){return arguments.length?(e=typeof $=="function"?$:Ya($),w):e},w.subject=function($){return arguments.length?(r=typeof $=="function"?$:Ya($),w):r},w.touchable=function($){return arguments.length?(o=typeof $=="function"?$:Ya(!!$),w):o},w.on=function(){var $=c.on.apply(c,arguments);return $===c?w:$},w.clickDistance=function($){return arguments.length?(y=($=+$)*$,w):Math.sqrt(y)},w}function vd(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function sw(t,e){var r=Object.create(t.prototype);for(var o in e)r[o]=e[o];return r}function ra(){}var Ul=.7,zc=1/Ul,us="\\s*([+-]?\\d+)\\s*",jl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pft=/^#([0-9a-f]{3,8})$/,Oft=new RegExp(`^rgb\\(${us},${us},${us}\\)$`),Rft=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),Dft=new RegExp(`^rgba\\(${us},${us},${us},${jl}\\)$`),zft=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${jl}\\)$`),Ift=new RegExp(`^hsl\\(${jl},${Lr},${Lr}\\)$`),Fft=new RegExp(`^hsla\\(${jl},${Lr},${Lr},${jl}\\)$`),bm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vd(ra,Vl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:wm,formatHex:wm,formatHex8:Hft,formatHsl:qft,formatRgb:xm,toString:xm});function wm(){return this.rgb().formatHex()}function Hft(){return this.rgb().formatHex8()}function qft(){return lw(this).formatHsl()}function xm(){return this.rgb().formatRgb()}function Vl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Pft.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?_m(e):r===3?new An(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Za(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Za(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Oft.exec(t))?new An(e[1],e[2],e[3],1):(e=Rft.exec(t))?new An(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dft.exec(t))?Za(e[1],e[2],e[3],e[4]):(e=zft.exec(t))?Za(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ift.exec(t))?Cm(e[1],e[2]/100,e[3]/100,1):(e=Fft.exec(t))?Cm(e[1],e[2]/100,e[3]/100,e[4]):bm.hasOwnProperty(t)?_m(bm[t]):t==="transparent"?new An(NaN,NaN,NaN,0):null}function _m(t){return new An(t>>16&255,t>>8&255,t&255,1)}function Za(t,e,r,o){return o<=0&&(t=e=r=NaN),new An(t,e,r,o)}function Bft(t){return t instanceof ra||(t=Vl(t)),t?(t=t.rgb(),new An(t.r,t.g,t.b,t.opacity)):new An}function yh(t,e,r,o){return arguments.length===1?Bft(t):new An(t,e,r,o??1)}function An(t,e,r,o){this.r=+t,this.g=+e,this.b=+r,this.opacity=+o}vd(An,yh,sw(ra,{brighter(t){return t=t==null?zc:Math.pow(zc,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ul:Math.pow(Ul,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new An(mo(this.r),mo(this.g),mo(this.b),Ic(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sm,formatHex:Sm,formatHex8:Wft,formatRgb:km,toString:km}));function Sm(){return`#${po(this.r)}${po(this.g)}${po(this.b)}`}function Wft(){return`#${po(this.r)}${po(this.g)}${po(this.b)}${po((isNaN(this.opacity)?1:this.opacity)*255)}`}function km(){const t=Ic(this.opacity);return`${t===1?"rgb(":"rgba("}${mo(this.r)}, ${mo(this.g)}, ${mo(this.b)}${t===1?")":`, ${t})`}`}function Ic(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function mo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function po(t){return t=mo(t),(t<16?"0":"")+t.toString(16)}function Cm(t,e,r,o){return o<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new cr(t,e,r,o)}function lw(t){if(t instanceof cr)return new cr(t.h,t.s,t.l,t.opacity);if(t instanceof ra||(t=Vl(t)),!t)return new cr;if(t instanceof cr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,o=t.b/255,s=Math.min(e,r,o),c=Math.max(e,r,o),f=NaN,h=c-s,d=(c+s)/2;return h?(e===c?f=(r-o)/h+(r<o)*6:r===c?f=(o-e)/h+2:f=(e-r)/h+4,h/=d<.5?c+s:2-c-s,f*=60):h=d>0&&d<1?0:f,new cr(f,h,d,t.opacity)}function Uft(t,e,r,o){return arguments.length===1?lw(t):new cr(t,e,r,o??1)}function cr(t,e,r,o){this.h=+t,this.s=+e,this.l=+r,this.opacity=+o}vd(cr,Uft,sw(ra,{brighter(t){return t=t==null?zc:Math.pow(zc,t),new cr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ul:Math.pow(Ul,t),new cr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*e,s=2*r-o;return new An(Pf(t>=240?t-240:t+120,s,o),Pf(t,s,o),Pf(t<120?t+240:t-120,s,o),this.opacity)},clamp(){return new cr(Tm(this.h),Ja(this.s),Ja(this.l),Ic(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ic(this.opacity);return`${t===1?"hsl(":"hsla("}${Tm(this.h)}, ${Ja(this.s)*100}%, ${Ja(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Tm(t){return t=(t||0)%360,t<0?t+360:t}function Ja(t){return Math.max(0,Math.min(1,t||0))}function Pf(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const aw=t=>()=>t;function jft(t,e){return function(r){return t+r*e}}function Vft(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(o){return Math.pow(t+o*e,r)}}function Gft(t){return(t=+t)==1?cw:function(e,r){return r-e?Vft(e,r,t):aw(isNaN(e)?r:e)}}function cw(t,e){var r=e-t;return r?jft(t,r):aw(isNaN(t)?e:t)}const Em=function t(e){var r=Gft(e);function o(s,c){var f=r((s=yh(s)).r,(c=yh(c)).r),h=r(s.g,c.g),d=r(s.b,c.b),g=cw(s.opacity,c.opacity);return function(v){return s.r=f(v),s.g=h(v),s.b=d(v),s.opacity=g(v),s+""}}return o.gamma=t,o}(1);function Ci(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var bh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Of=new RegExp(bh.source,"g");function Kft(t){return function(){return t}}function Xft(t){return function(e){return t(e)+""}}function Yft(t,e){var r=bh.lastIndex=Of.lastIndex=0,o,s,c,f=-1,h=[],d=[];for(t=t+"",e=e+"";(o=bh.exec(t))&&(s=Of.exec(e));)(c=s.index)>r&&(c=e.slice(r,c),h[f]?h[f]+=c:h[++f]=c),(o=o[0])===(s=s[0])?h[f]?h[f]+=s:h[++f]=s:(h[++f]=null,d.push({i:f,x:Ci(o,s)})),r=Of.lastIndex;return r<e.length&&(c=e.slice(r),h[f]?h[f]+=c:h[++f]=c),h.length<2?d[0]?Xft(d[0].x):Kft(e):(e=d.length,function(g){for(var v=0,y;v<e;++v)h[(y=d[v]).i]=y.x(g);return h.join("")})}var Lm=180/Math.PI,wh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uw(t,e,r,o,s,c){var f,h,d;return(f=Math.sqrt(t*t+e*e))&&(t/=f,e/=f),(d=t*r+e*o)&&(r-=t*d,o-=e*d),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,d/=h),t*o<e*r&&(t=-t,e=-e,d=-d,f=-f),{translateX:s,translateY:c,rotate:Math.atan2(e,t)*Lm,skewX:Math.atan(d)*Lm,scaleX:f,scaleY:h}}var Qa;function Zft(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?wh:uw(e.a,e.b,e.c,e.d,e.e,e.f)}function Jft(t){return t==null||(Qa||(Qa=document.createElementNS("http://www.w3.org/2000/svg","g")),Qa.setAttribute("transform",t),!(t=Qa.transform.baseVal.consolidate()))?wh:(t=t.matrix,uw(t.a,t.b,t.c,t.d,t.e,t.f))}function fw(t,e,r,o){function s(g){return g.length?g.pop()+" ":""}function c(g,v,y,w,_,L){if(g!==y||v!==w){var M=_.push("translate(",null,e,null,r);L.push({i:M-4,x:Ci(g,y)},{i:M-2,x:Ci(v,w)})}else(y||w)&&_.push("translate("+y+e+w+r)}function f(g,v,y,w){g!==v?(g-v>180?v+=360:v-g>180&&(g+=360),w.push({i:y.push(s(y)+"rotate(",null,o)-2,x:Ci(g,v)})):v&&y.push(s(y)+"rotate("+v+o)}function h(g,v,y,w){g!==v?w.push({i:y.push(s(y)+"skewX(",null,o)-2,x:Ci(g,v)}):v&&y.push(s(y)+"skewX("+v+o)}function d(g,v,y,w,_,L){if(g!==y||v!==w){var M=_.push(s(_)+"scale(",null,",",null,")");L.push({i:M-4,x:Ci(g,y)},{i:M-2,x:Ci(v,w)})}else(y!==1||w!==1)&&_.push(s(_)+"scale("+y+","+w+")")}return function(g,v){var y=[],w=[];return g=t(g),v=t(v),c(g.translateX,g.translateY,v.translateX,v.translateY,y,w),f(g.rotate,v.rotate,y,w),h(g.skewX,v.skewX,y,w),d(g.scaleX,g.scaleY,v.scaleX,v.scaleY,y,w),g=v=null,function(_){for(var L=-1,M=w.length,A;++L<M;)y[(A=w[L]).i]=A.x(_);return y.join("")}}}var Qft=fw(Zft,"px, ","px)","deg)"),tht=fw(Jft,", ",")",")"),eht=1e-12;function Am(t){return((t=Math.exp(t))+1/t)/2}function nht(t){return((t=Math.exp(t))-1/t)/2}function rht(t){return((t=Math.exp(2*t))-1)/(t+1)}const iht=function t(e,r,o){function s(c,f){var h=c[0],d=c[1],g=c[2],v=f[0],y=f[1],w=f[2],_=v-h,L=y-d,M=_*_+L*L,A,T;if(M<eht)T=Math.log(w/g)/e,A=function(st){return[h+st*_,d+st*L,g*Math.exp(e*st*T)]};else{var E=Math.sqrt(M),P=(w*w-g*g+o*M)/(2*g*r*E),$=(w*w-g*g-o*M)/(2*w*r*E),F=Math.log(Math.sqrt(P*P+1)-P),H=Math.log(Math.sqrt($*$+1)-$);T=(H-F)/e,A=function(st){var Y=st*T,ht=Am(F),Z=g/(r*E)*(ht*rht(e*Y+F)-nht(F));return[h+Z*_,d+Z*L,g*ht/Am(e*Y+F)]}}return A.duration=T*1e3*e/Math.SQRT2,A}return s.rho=function(c){var f=Math.max(.001,+c),h=f*f,d=h*h;return t(f,h,d)},s}(Math.SQRT2,2,4);var bs=0,al=0,ol=0,hw=1e3,Fc,cl,Hc=0,xo=0,hu=0,Gl=typeof performance=="object"&&performance.now?performance:Date,dw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function md(){return xo||(dw(oht),xo=Gl.now()+hu)}function oht(){xo=0}function qc(){this._call=this._time=this._next=null}qc.prototype=yd.prototype={constructor:qc,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?md():+r)+(e==null?0:+e),!this._next&&cl!==this&&(cl?cl._next=this:Fc=this,cl=this),this._call=t,this._time=r,xh()},stop:function(){this._call&&(this._call=null,this._time=1/0,xh())}};function yd(t,e,r){var o=new qc;return o.restart(t,e,r),o}function sht(){md(),++bs;for(var t=Fc,e;t;)(e=xo-t._time)>=0&&t._call.call(void 0,e),t=t._next;--bs}function Mm(){xo=(Hc=Gl.now())+hu,bs=al=0;try{sht()}finally{bs=0,aht(),xo=0}}function lht(){var t=Gl.now(),e=t-Hc;e>hw&&(hu-=e,Hc=t)}function aht(){for(var t,e=Fc,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Fc=r);cl=t,xh(o)}function xh(t){if(!bs){al&&(al=clearTimeout(al));var e=t-xo;e>24?(t<1/0&&(al=setTimeout(Mm,t-Gl.now()-hu)),ol&&(ol=clearInterval(ol))):(ol||(Hc=Gl.now(),ol=setInterval(lht,hw)),bs=1,dw(Mm))}}function Nm(t,e,r){var o=new qc;return e=e==null?0:+e,o.restart(s=>{o.stop(),t(s+e)},e,r),o}var cht=na("start","end","cancel","interrupt"),uht=[],pw=0,$m=1,_h=2,dc=3,Pm=4,Sh=5,pc=6;function du(t,e,r,o,s,c){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;fht(t,r,{name:e,index:o,group:s,on:cht,tween:uht,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:pw})}function bd(t,e){var r=gr(t,e);if(r.state>pw)throw new Error("too late; already scheduled");return r}function $r(t,e){var r=gr(t,e);if(r.state>dc)throw new Error("too late; already running");return r}function gr(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function fht(t,e,r){var o=t.__transition,s;o[e]=r,r.timer=yd(c,0,r.time);function c(g){r.state=$m,r.timer.restart(f,r.delay,r.time),r.delay<=g&&f(g-r.delay)}function f(g){var v,y,w,_;if(r.state!==$m)return d();for(v in o)if(_=o[v],_.name===r.name){if(_.state===dc)return Nm(f);_.state===Pm?(_.state=pc,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete o[v]):+v<e&&(_.state=pc,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete o[v])}if(Nm(function(){r.state===dc&&(r.state=Pm,r.timer.restart(h,r.delay,r.time),h(g))}),r.state=_h,r.on.call("start",t,t.__data__,r.index,r.group),r.state===_h){for(r.state=dc,s=new Array(w=r.tween.length),v=0,y=-1;v<w;++v)(_=r.tween[v].value.call(t,t.__data__,r.index,r.group))&&(s[++y]=_);s.length=y+1}}function h(g){for(var v=g<r.duration?r.ease.call(null,g/r.duration):(r.timer.restart(d),r.state=Sh,1),y=-1,w=s.length;++y<w;)s[y].call(t,v);r.state===Sh&&(r.on.call("end",t,t.__data__,r.index,r.group),d())}function d(){r.state=pc,r.timer.stop(),delete o[e];for(var g in o)return;delete t.__transition}}function gc(t,e){var r=t.__transition,o,s,c=!0,f;if(r){e=e==null?null:e+"";for(f in r){if((o=r[f]).name!==e){c=!1;continue}s=o.state>_h&&o.state<Sh,o.state=pc,o.timer.stop(),o.on.call(s?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[f]}c&&delete t.__transition}}function hht(t){return this.each(function(){gc(this,t)})}function dht(t,e){var r,o;return function(){var s=$r(this,t),c=s.tween;if(c!==r){o=r=c;for(var f=0,h=o.length;f<h;++f)if(o[f].name===e){o=o.slice(),o.splice(f,1);break}}s.tween=o}}function pht(t,e,r){var o,s;if(typeof r!="function")throw new Error;return function(){var c=$r(this,t),f=c.tween;if(f!==o){s=(o=f).slice();for(var h={name:e,value:r},d=0,g=s.length;d<g;++d)if(s[d].name===e){s[d]=h;break}d===g&&s.push(h)}c.tween=s}}function ght(t,e){var r=this._id;if(t+="",arguments.length<2){for(var o=gr(this.node(),r).tween,s=0,c=o.length,f;s<c;++s)if((f=o[s]).name===t)return f.value;return null}return this.each((e==null?dht:pht)(r,t,e))}function wd(t,e,r){var o=t._id;return t.each(function(){var s=$r(this,o);(s.value||(s.value={}))[e]=r.apply(this,arguments)}),function(s){return gr(s,o).value[e]}}function gw(t,e){var r;return(typeof e=="number"?Ci:e instanceof Vl?Em:(r=Vl(e))?(e=r,Em):Yft)(t,e)}function vht(t){return function(){this.removeAttribute(t)}}function mht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yht(t,e,r){var o,s=r+"",c;return function(){var f=this.getAttribute(t);return f===s?null:f===o?c:c=e(o=f,r)}}function bht(t,e,r){var o,s=r+"",c;return function(){var f=this.getAttributeNS(t.space,t.local);return f===s?null:f===o?c:c=e(o=f,r)}}function wht(t,e,r){var o,s,c;return function(){var f,h=r(this),d;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),d=h+"",f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h)))}}function xht(t,e,r){var o,s,c;return function(){var f,h=r(this),d;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),d=h+"",f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h)))}}function _ht(t,e){var r=fu(t),o=r==="transform"?tht:gw;return this.attrTween(t,typeof e=="function"?(r.local?xht:wht)(r,o,wd(this,"attr."+t,e)):e==null?(r.local?mht:vht)(r):(r.local?bht:yht)(r,o,e))}function Sht(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function kht(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Cht(t,e){var r,o;function s(){var c=e.apply(this,arguments);return c!==o&&(r=(o=c)&&kht(t,c)),r}return s._value=e,s}function Tht(t,e){var r,o;function s(){var c=e.apply(this,arguments);return c!==o&&(r=(o=c)&&Sht(t,c)),r}return s._value=e,s}function Eht(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var o=fu(t);return this.tween(r,(o.local?Cht:Tht)(o,e))}function Lht(t,e){return function(){bd(this,t).delay=+e.apply(this,arguments)}}function Aht(t,e){return e=+e,function(){bd(this,t).delay=e}}function Mht(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Lht:Aht)(e,t)):gr(this.node(),e).delay}function Nht(t,e){return function(){$r(this,t).duration=+e.apply(this,arguments)}}function $ht(t,e){return e=+e,function(){$r(this,t).duration=e}}function Pht(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Nht:$ht)(e,t)):gr(this.node(),e).duration}function Oht(t,e){if(typeof e!="function")throw new Error;return function(){$r(this,t).ease=e}}function Rht(t){var e=this._id;return arguments.length?this.each(Oht(e,t)):gr(this.node(),e).ease}function Dht(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;$r(this,t).ease=r}}function zht(t){if(typeof t!="function")throw new Error;return this.each(Dht(this._id,t))}function Iht(t){typeof t!="function"&&(t=Kb(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=[],d,g=0;g<f;++g)(d=c[g])&&t.call(d,d.__data__,g,c)&&h.push(d);return new Zr(o,this._parents,this._name,this._id)}function Fht(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,o=e.length,s=r.length,c=Math.min(o,s),f=new Array(o),h=0;h<c;++h)for(var d=e[h],g=r[h],v=d.length,y=f[h]=new Array(v),w,_=0;_<v;++_)(w=d[_]||g[_])&&(y[_]=w);for(;h<o;++h)f[h]=e[h];return new Zr(f,this._parents,this._name,this._id)}function Hht(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function qht(t,e,r){var o,s,c=Hht(e)?bd:$r;return function(){var f=c(this,t),h=f.on;h!==o&&(s=(o=h).copy()).on(e,r),f.on=s}}function Bht(t,e){var r=this._id;return arguments.length<2?gr(this.node(),r).on.on(t):this.each(qht(r,t,e))}function Wht(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Uht(){return this.on("end.remove",Wht(this._id))}function jht(t){var e=this._name,r=this._id;typeof t!="function"&&(t=pd(t));for(var o=this._groups,s=o.length,c=new Array(s),f=0;f<s;++f)for(var h=o[f],d=h.length,g=c[f]=new Array(d),v,y,w=0;w<d;++w)(v=h[w])&&(y=t.call(v,v.__data__,w,h))&&("__data__"in v&&(y.__data__=v.__data__),g[w]=y,du(g[w],e,r,w,g,gr(v,r)));return new Zr(c,this._parents,e,r)}function Vht(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Gb(t));for(var o=this._groups,s=o.length,c=[],f=[],h=0;h<s;++h)for(var d=o[h],g=d.length,v,y=0;y<g;++y)if(v=d[y]){for(var w=t.call(v,v.__data__,y,d),_,L=gr(v,r),M=0,A=w.length;M<A;++M)(_=w[M])&&du(_,e,r,M,w,L);c.push(w),f.push(v)}return new Zr(c,f,e,r)}var Ght=ea.prototype.constructor;function Kht(){return new Ght(this._groups,this._parents)}function Xht(t,e){var r,o,s;return function(){var c=ys(this,t),f=(this.style.removeProperty(t),ys(this,t));return c===f?null:c===r&&f===o?s:s=e(r=c,o=f)}}function vw(t){return function(){this.style.removeProperty(t)}}function Yht(t,e,r){var o,s=r+"",c;return function(){var f=ys(this,t);return f===s?null:f===o?c:c=e(o=f,r)}}function Zht(t,e,r){var o,s,c;return function(){var f=ys(this,t),h=r(this),d=h+"";return h==null&&(d=h=(this.style.removeProperty(t),ys(this,t))),f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h))}}function Jht(t,e){var r,o,s,c="style."+e,f="end."+c,h;return function(){var d=$r(this,t),g=d.on,v=d.value[c]==null?h||(h=vw(e)):void 0;(g!==r||s!==v)&&(o=(r=g).copy()).on(f,s=v),d.on=o}}function Qht(t,e,r){var o=(t+="")=="transform"?Qft:gw;return e==null?this.styleTween(t,Xht(t,o)).on("end.style."+t,vw(t)):typeof e=="function"?this.styleTween(t,Zht(t,o,wd(this,"style."+t,e))).each(Jht(this._id,t)):this.styleTween(t,Yht(t,o,e),r).on("end.style."+t,null)}function tdt(t,e,r){return function(o){this.style.setProperty(t,e.call(this,o),r)}}function edt(t,e,r){var o,s;function c(){var f=e.apply(this,arguments);return f!==s&&(o=(s=f)&&tdt(t,f,r)),o}return c._value=e,c}function ndt(t,e,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,edt(t,e,r??""))}function rdt(t){return function(){this.textContent=t}}function idt(t){return function(){var e=t(this);this.textContent=e??""}}function odt(t){return this.tween("text",typeof t=="function"?idt(wd(this,"text",t)):rdt(t==null?"":t+""))}function sdt(t){return function(e){this.textContent=t.call(this,e)}}function ldt(t){var e,r;function o(){var s=t.apply(this,arguments);return s!==r&&(e=(r=s)&&sdt(s)),e}return o._value=t,o}function adt(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,ldt(t))}function cdt(){for(var t=this._name,e=this._id,r=mw(),o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,d,g=0;g<h;++g)if(d=f[g]){var v=gr(d,e);du(d,t,r,g,f,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new Zr(o,this._parents,t,r)}function udt(){var t,e,r=this,o=r._id,s=r.size();return new Promise(function(c,f){var h={value:f},d={value:function(){--s===0&&c()}};r.each(function(){var g=$r(this,o),v=g.on;v!==t&&(e=(t=v).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(d)),g.on=e}),s===0&&c()})}var fdt=0;function Zr(t,e,r,o){this._groups=t,this._parents=e,this._name=r,this._id=o}function mw(){return++fdt}var Br=ea.prototype;Zr.prototype={constructor:Zr,select:jht,selectAll:Vht,selectChild:Br.selectChild,selectChildren:Br.selectChildren,filter:Iht,merge:Fht,selection:Kht,transition:cdt,call:Br.call,nodes:Br.nodes,node:Br.node,size:Br.size,empty:Br.empty,each:Br.each,on:Bht,attr:_ht,attrTween:Eht,style:Qht,styleTween:ndt,text:odt,textTween:adt,remove:Uht,tween:ght,delay:Mht,duration:Pht,ease:Rht,easeVarying:zht,end:udt,[Symbol.iterator]:Br[Symbol.iterator]};function hdt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ddt={time:null,delay:0,duration:250,ease:hdt};function pdt(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function gdt(t){var e,r;t instanceof Zr?(e=t._id,t=t._name):(e=mw(),(r=ddt).time=md(),t=t==null?null:t+"");for(var o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,d,g=0;g<h;++g)(d=f[g])&&du(d,t,e,g,f,r||pdt(d,e));return new Zr(o,this._parents,t,e)}ea.prototype.interrupt=hht;ea.prototype.transition=gdt;const tc=t=>()=>t;function vdt(t,{sourceEvent:e,target:r,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function jr(t,e,r){this.k=t,this.x=e,this.y=r}jr.prototype={constructor:jr,scale:function(t){return t===1?this:new jr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new jr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var xd=new jr(1,0,0);jr.prototype;function Rf(t){t.stopImmediatePropagation()}function sl(t){t.preventDefault(),t.stopImmediatePropagation()}function mdt(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function ydt(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Om(){return this.__zoom||xd}function bdt(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function wdt(){return navigator.maxTouchPoints||"ontouchstart"in this}function xdt(t,e,r){var o=t.invertX(e[0][0])-r[0][0],s=t.invertX(e[1][0])-r[1][0],c=t.invertY(e[0][1])-r[0][1],f=t.invertY(e[1][1])-r[1][1];return t.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),f>c?(c+f)/2:Math.min(0,c)||Math.max(0,f))}function _dt(){var t=mdt,e=ydt,r=xdt,o=bdt,s=wdt,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,d=iht,g=na("start","zoom","end"),v,y,w,_=500,L=150,M=0,A=10;function T(I){I.property("__zoom",Om).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",ht).on("dblclick.zoom",Z).filter(s).on("touchstart.zoom",ut).on("touchmove.zoom",lt).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(I,k,q,U){var tt=I.selection?I.selection():I;tt.property("__zoom",Om),I!==tt?F(I,k,q,U):tt.interrupt().each(function(){H(this,arguments).event(U).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},T.scaleBy=function(I,k,q,U){T.scaleTo(I,function(){var tt=this.__zoom.k,mt=typeof k=="function"?k.apply(this,arguments):k;return tt*mt},q,U)},T.scaleTo=function(I,k,q,U){T.transform(I,function(){var tt=e.apply(this,arguments),mt=this.__zoom,Mt=q==null?$(tt):typeof q=="function"?q.apply(this,arguments):q,qt=mt.invert(Mt),Wt=typeof k=="function"?k.apply(this,arguments):k;return r(P(E(mt,Wt),Mt,qt),tt,f)},q,U)},T.translateBy=function(I,k,q,U){T.transform(I,function(){return r(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof q=="function"?q.apply(this,arguments):q),e.apply(this,arguments),f)},null,U)},T.translateTo=function(I,k,q,U,tt){T.transform(I,function(){var mt=e.apply(this,arguments),Mt=this.__zoom,qt=U==null?$(mt):typeof U=="function"?U.apply(this,arguments):U;return r(xd.translate(qt[0],qt[1]).scale(Mt.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof q=="function"?-q.apply(this,arguments):-q),mt,f)},U,tt)};function E(I,k){return k=Math.max(c[0],Math.min(c[1],k)),k===I.k?I:new jr(k,I.x,I.y)}function P(I,k,q){var U=k[0]-q[0]*I.k,tt=k[1]-q[1]*I.k;return U===I.x&&tt===I.y?I:new jr(I.k,U,tt)}function $(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function F(I,k,q,U){I.on("start.zoom",function(){H(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(U).end()}).tween("zoom",function(){var tt=this,mt=arguments,Mt=H(tt,mt).event(U),qt=e.apply(tt,mt),Wt=q==null?$(qt):typeof q=="function"?q.apply(tt,mt):q,ne=Math.max(qt[1][0]-qt[0][0],qt[1][1]-qt[0][1]),ee=tt.__zoom,Zt=typeof k=="function"?k.apply(tt,mt):k,Tt=d(ee.invert(Wt).concat(ne/ee.k),Zt.invert(Wt).concat(ne/Zt.k));return function(V){if(V===1)V=Zt;else{var it=Tt(V),ft=ne/it[2];V=new jr(ft,Wt[0]-it[0]*ft,Wt[1]-it[1]*ft)}Mt.zoom(null,V)}})}function H(I,k,q){return!q&&I.__zooming||new st(I,k)}function st(I,k){this.that=I,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(I,k),this.taps=0}st.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,k){return this.mouse&&I!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var k=Ln(this.that).datum();g.call(I,this.that,new vdt(I,{sourceEvent:this.sourceEvent,target:T,type:I,transform:this.that.__zoom,dispatch:g}),k)}};function Y(I,...k){if(!t.apply(this,arguments))return;var q=H(this,k).event(I),U=this.__zoom,tt=Math.max(c[0],Math.min(c[1],U.k*Math.pow(2,o.apply(this,arguments)))),mt=Ur(I);if(q.wheel)(q.mouse[0][0]!==mt[0]||q.mouse[0][1]!==mt[1])&&(q.mouse[1]=U.invert(q.mouse[0]=mt)),clearTimeout(q.wheel);else{if(U.k===tt)return;q.mouse=[mt,U.invert(mt)],gc(this),q.start()}sl(I),q.wheel=setTimeout(Mt,L),q.zoom("mouse",r(P(E(U,tt),q.mouse[0],q.mouse[1]),q.extent,f));function Mt(){q.wheel=null,q.end()}}function ht(I,...k){if(w||!t.apply(this,arguments))return;var q=I.currentTarget,U=H(this,k,!0).event(I),tt=Ln(I.view).on("mousemove.zoom",Wt,!0).on("mouseup.zoom",ne,!0),mt=Ur(I,q),Mt=I.clientX,qt=I.clientY;iw(I.view),Rf(I),U.mouse=[mt,this.__zoom.invert(mt)],gc(this),U.start();function Wt(ee){if(sl(ee),!U.moved){var Zt=ee.clientX-Mt,Tt=ee.clientY-qt;U.moved=Zt*Zt+Tt*Tt>M}U.event(ee).zoom("mouse",r(P(U.that.__zoom,U.mouse[0]=Ur(ee,q),U.mouse[1]),U.extent,f))}function ne(ee){tt.on("mousemove.zoom mouseup.zoom",null),ow(ee.view,U.moved),sl(ee),U.event(ee).end()}}function Z(I,...k){if(t.apply(this,arguments)){var q=this.__zoom,U=Ur(I.changedTouches?I.changedTouches[0]:I,this),tt=q.invert(U),mt=q.k*(I.shiftKey?.5:2),Mt=r(P(E(q,mt),U,tt),e.apply(this,k),f);sl(I),h>0?Ln(this).transition().duration(h).call(F,Mt,U,I):Ln(this).call(T.transform,Mt,U,I)}}function ut(I,...k){if(t.apply(this,arguments)){var q=I.touches,U=q.length,tt=H(this,k,I.changedTouches.length===U).event(I),mt,Mt,qt,Wt;for(Rf(I),Mt=0;Mt<U;++Mt)qt=q[Mt],Wt=Ur(qt,this),Wt=[Wt,this.__zoom.invert(Wt),qt.identifier],tt.touch0?!tt.touch1&&tt.touch0[2]!==Wt[2]&&(tt.touch1=Wt,tt.taps=0):(tt.touch0=Wt,mt=!0,tt.taps=1+!!v);v&&(v=clearTimeout(v)),mt&&(tt.taps<2&&(y=Wt[0],v=setTimeout(function(){v=null},_)),gc(this),tt.start())}}function lt(I,...k){if(this.__zooming){var q=H(this,k).event(I),U=I.changedTouches,tt=U.length,mt,Mt,qt,Wt;for(sl(I),mt=0;mt<tt;++mt)Mt=U[mt],qt=Ur(Mt,this),q.touch0&&q.touch0[2]===Mt.identifier?q.touch0[0]=qt:q.touch1&&q.touch1[2]===Mt.identifier&&(q.touch1[0]=qt);if(Mt=q.that.__zoom,q.touch1){var ne=q.touch0[0],ee=q.touch0[1],Zt=q.touch1[0],Tt=q.touch1[1],V=(V=Zt[0]-ne[0])*V+(V=Zt[1]-ne[1])*V,it=(it=Tt[0]-ee[0])*it+(it=Tt[1]-ee[1])*it;Mt=E(Mt,Math.sqrt(V/it)),qt=[(ne[0]+Zt[0])/2,(ne[1]+Zt[1])/2],Wt=[(ee[0]+Tt[0])/2,(ee[1]+Tt[1])/2]}else if(q.touch0)qt=q.touch0[0],Wt=q.touch0[1];else return;q.zoom("touch",r(P(Mt,qt,Wt),q.extent,f))}}function G(I,...k){if(this.__zooming){var q=H(this,k).event(I),U=I.changedTouches,tt=U.length,mt,Mt;for(Rf(I),w&&clearTimeout(w),w=setTimeout(function(){w=null},_),mt=0;mt<tt;++mt)Mt=U[mt],q.touch0&&q.touch0[2]===Mt.identifier?delete q.touch0:q.touch1&&q.touch1[2]===Mt.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(Mt=Ur(Mt,this),Math.hypot(y[0]-Mt[0],y[1]-Mt[1])<A)){var qt=Ln(this).on("dblclick.zoom");qt&&qt.apply(this,arguments)}}}return T.wheelDelta=function(I){return arguments.length?(o=typeof I=="function"?I:tc(+I),T):o},T.filter=function(I){return arguments.length?(t=typeof I=="function"?I:tc(!!I),T):t},T.touchable=function(I){return arguments.length?(s=typeof I=="function"?I:tc(!!I),T):s},T.extent=function(I){return arguments.length?(e=typeof I=="function"?I:tc([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),T):e},T.scaleExtent=function(I){return arguments.length?(c[0]=+I[0],c[1]=+I[1],T):[c[0],c[1]]},T.translateExtent=function(I){return arguments.length?(f[0][0]=+I[0][0],f[1][0]=+I[1][0],f[0][1]=+I[0][1],f[1][1]=+I[1][1],T):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},T.constrain=function(I){return arguments.length?(r=I,T):r},T.duration=function(I){return arguments.length?(h=+I,T):h},T.interpolate=function(I){return arguments.length?(d=I,T):d},T.on=function(){var I=g.on.apply(g,arguments);return I===g?T:I},T.clickDistance=function(I){return arguments.length?(M=(I=+I)*I,T):Math.sqrt(M)},T.tapDistance=function(I){return arguments.length?(A=+I,T):A},T}function Sdt(t){const e=+this._x.call(null,t),r=+this._y.call(null,t);return yw(this.cover(e,r),e,r,t)}function yw(t,e,r,o){if(isNaN(e)||isNaN(r))return t;var s,c=t._root,f={data:o},h=t._x0,d=t._y0,g=t._x1,v=t._y1,y,w,_,L,M,A,T,E;if(!c)return t._root=f,t;for(;c.length;)if((M=e>=(y=(h+g)/2))?h=y:g=y,(A=r>=(w=(d+v)/2))?d=w:v=w,s=c,!(c=c[T=A<<1|M]))return s[T]=f,t;if(_=+t._x.call(null,c.data),L=+t._y.call(null,c.data),e===_&&r===L)return f.next=c,s?s[T]=f:t._root=f,t;do s=s?s[T]=new Array(4):t._root=new Array(4),(M=e>=(y=(h+g)/2))?h=y:g=y,(A=r>=(w=(d+v)/2))?d=w:v=w;while((T=A<<1|M)===(E=(L>=w)<<1|_>=y));return s[E]=c,s[T]=f,t}function kdt(t){var e,r,o=t.length,s,c,f=new Array(o),h=new Array(o),d=1/0,g=1/0,v=-1/0,y=-1/0;for(r=0;r<o;++r)isNaN(s=+this._x.call(null,e=t[r]))||isNaN(c=+this._y.call(null,e))||(f[r]=s,h[r]=c,s<d&&(d=s),s>v&&(v=s),c<g&&(g=c),c>y&&(y=c));if(d>v||g>y)return this;for(this.cover(d,g).cover(v,y),r=0;r<o;++r)yw(this,f[r],h[r],t[r]);return this}function Cdt(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,o=this._y0,s=this._x1,c=this._y1;if(isNaN(r))s=(r=Math.floor(t))+1,c=(o=Math.floor(e))+1;else{for(var f=s-r||1,h=this._root,d,g;r>t||t>=s||o>e||e>=c;)switch(g=(e<o)<<1|t<r,d=new Array(4),d[g]=h,h=d,f*=2,g){case 0:s=r+f,c=o+f;break;case 1:r=s-f,c=o+f;break;case 2:s=r+f,o=c-f;break;case 3:r=s-f,o=c-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=o,this._x1=s,this._y1=c,this}function Tdt(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Edt(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function mn(t,e,r,o,s){this.node=t,this.x0=e,this.y0=r,this.x1=o,this.y1=s}function Ldt(t,e,r){var o,s=this._x0,c=this._y0,f,h,d,g,v=this._x1,y=this._y1,w=[],_=this._root,L,M;for(_&&w.push(new mn(_,s,c,v,y)),r==null?r=1/0:(s=t-r,c=e-r,v=t+r,y=e+r,r*=r);L=w.pop();)if(!(!(_=L.node)||(f=L.x0)>v||(h=L.y0)>y||(d=L.x1)<s||(g=L.y1)<c))if(_.length){var A=(f+d)/2,T=(h+g)/2;w.push(new mn(_[3],A,T,d,g),new mn(_[2],f,T,A,g),new mn(_[1],A,h,d,T),new mn(_[0],f,h,A,T)),(M=(e>=T)<<1|t>=A)&&(L=w[w.length-1],w[w.length-1]=w[w.length-1-M],w[w.length-1-M]=L)}else{var E=t-+this._x.call(null,_.data),P=e-+this._y.call(null,_.data),$=E*E+P*P;if($<r){var F=Math.sqrt(r=$);s=t-F,c=e-F,v=t+F,y=e+F,o=_.data}}return o}function Adt(t){if(isNaN(v=+this._x.call(null,t))||isNaN(y=+this._y.call(null,t)))return this;var e,r=this._root,o,s,c,f=this._x0,h=this._y0,d=this._x1,g=this._y1,v,y,w,_,L,M,A,T;if(!r)return this;if(r.length)for(;;){if((L=v>=(w=(f+d)/2))?f=w:d=w,(M=y>=(_=(h+g)/2))?h=_:g=_,e=r,!(r=r[A=M<<1|L]))return this;if(!r.length)break;(e[A+1&3]||e[A+2&3]||e[A+3&3])&&(o=e,T=A)}for(;r.data!==t;)if(s=r,!(r=r.next))return this;return(c=r.next)&&delete r.next,s?(c?s.next=c:delete s.next,this):e?(c?e[A]=c:delete e[A],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(o?o[T]=r:this._root=r),this):(this._root=c,this)}function Mdt(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this}function Ndt(){return this._root}function $dt(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function Pdt(t){var e=[],r,o=this._root,s,c,f,h,d;for(o&&e.push(new mn(o,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!t(o=r.node,c=r.x0,f=r.y0,h=r.x1,d=r.y1)&&o.length){var g=(c+h)/2,v=(f+d)/2;(s=o[3])&&e.push(new mn(s,g,v,h,d)),(s=o[2])&&e.push(new mn(s,c,v,g,d)),(s=o[1])&&e.push(new mn(s,g,f,h,v)),(s=o[0])&&e.push(new mn(s,c,f,g,v))}return this}function Odt(t){var e=[],r=[],o;for(this._root&&e.push(new mn(this._root,this._x0,this._y0,this._x1,this._y1));o=e.pop();){var s=o.node;if(s.length){var c,f=o.x0,h=o.y0,d=o.x1,g=o.y1,v=(f+d)/2,y=(h+g)/2;(c=s[0])&&e.push(new mn(c,f,h,v,y)),(c=s[1])&&e.push(new mn(c,v,h,d,y)),(c=s[2])&&e.push(new mn(c,f,y,v,g)),(c=s[3])&&e.push(new mn(c,v,y,d,g))}r.push(o)}for(;o=r.pop();)t(o.node,o.x0,o.y0,o.x1,o.y1);return this}function Rdt(t){return t[0]}function Ddt(t){return arguments.length?(this._x=t,this):this._x}function zdt(t){return t[1]}function Idt(t){return arguments.length?(this._y=t,this):this._y}function _d(t,e,r){var o=new Sd(e??Rdt,r??zdt,NaN,NaN,NaN,NaN);return t==null?o:o.addAll(t)}function Sd(t,e,r,o,s,c){this._x=t,this._y=e,this._x0=r,this._y0=o,this._x1=s,this._y1=c,this._root=void 0}function Rm(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var wn=_d.prototype=Sd.prototype;wn.copy=function(){var t=new Sd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,o;if(!e)return t;if(!e.length)return t._root=Rm(e),t;for(r=[{source:e,target:t._root=new Array(4)}];e=r.pop();)for(var s=0;s<4;++s)(o=e.source[s])&&(o.length?r.push({source:o,target:e.target[s]=new Array(4)}):e.target[s]=Rm(o));return t};wn.add=Sdt;wn.addAll=kdt;wn.cover=Cdt;wn.data=Tdt;wn.extent=Edt;wn.find=Ldt;wn.remove=Adt;wn.removeAll=Mdt;wn.root=Ndt;wn.size=$dt;wn.visit=Pdt;wn.visitAfter=Odt;wn.x=Ddt;wn.y=Idt;function bn(t){return function(){return t}}function Li(t){return(t()-.5)*1e-6}function Fdt(t){return t.x+t.vx}function Hdt(t){return t.y+t.vy}function qdt(t){var e,r,o,s=1,c=1;typeof t!="function"&&(t=bn(t==null?1:+t));function f(){for(var g,v=e.length,y,w,_,L,M,A,T=0;T<c;++T)for(y=_d(e,Fdt,Hdt).visitAfter(h),g=0;g<v;++g)w=e[g],M=r[w.index],A=M*M,_=w.x+w.vx,L=w.y+w.vy,y.visit(E);function E(P,$,F,H,st){var Y=P.data,ht=P.r,Z=M+ht;if(Y){if(Y.index>w.index){var ut=_-Y.x-Y.vx,lt=L-Y.y-Y.vy,G=ut*ut+lt*lt;G<Z*Z&&(ut===0&&(ut=Li(o),G+=ut*ut),lt===0&&(lt=Li(o),G+=lt*lt),G=(Z-(G=Math.sqrt(G)))/G*s,w.vx+=(ut*=G)*(Z=(ht*=ht)/(A+ht)),w.vy+=(lt*=G)*Z,Y.vx-=ut*(Z=1-Z),Y.vy-=lt*Z)}return}return $>_+Z||H<_-Z||F>L+Z||st<L-Z}}function h(g){if(g.data)return g.r=r[g.data.index];for(var v=g.r=0;v<4;++v)g[v]&&g[v].r>g.r&&(g.r=g[v].r)}function d(){if(e){var g,v=e.length,y;for(r=new Array(v),g=0;g<v;++g)y=e[g],r[y.index]=+t(y,g,e)}}return f.initialize=function(g,v){e=g,o=v,d()},f.iterations=function(g){return arguments.length?(c=+g,f):c},f.strength=function(g){return arguments.length?(s=+g,f):s},f.radius=function(g){return arguments.length?(t=typeof g=="function"?g:bn(+g),d(),f):t},f}function Bdt(t){return t.index}function Dm(t,e){var r=t.get(e);if(!r)throw new Error("node not found: "+e);return r}function Wdt(t){var e=Bdt,r=y,o,s=bn(30),c,f,h,d,g,v=1;t==null&&(t=[]);function y(A){return 1/Math.min(h[A.source.index],h[A.target.index])}function w(A){for(var T=0,E=t.length;T<v;++T)for(var P=0,$,F,H,st,Y,ht,Z;P<E;++P)$=t[P],F=$.source,H=$.target,st=H.x+H.vx-F.x-F.vx||Li(g),Y=H.y+H.vy-F.y-F.vy||Li(g),ht=Math.sqrt(st*st+Y*Y),ht=(ht-c[P])/ht*A*o[P],st*=ht,Y*=ht,H.vx-=st*(Z=d[P]),H.vy-=Y*Z,F.vx+=st*(Z=1-Z),F.vy+=Y*Z}function _(){if(f){var A,T=f.length,E=t.length,P=new Map(f.map((F,H)=>[e(F,H,f),F])),$;for(A=0,h=new Array(T);A<E;++A)$=t[A],$.index=A,typeof $.source!="object"&&($.source=Dm(P,$.source)),typeof $.target!="object"&&($.target=Dm(P,$.target)),h[$.source.index]=(h[$.source.index]||0)+1,h[$.target.index]=(h[$.target.index]||0)+1;for(A=0,d=new Array(E);A<E;++A)$=t[A],d[A]=h[$.source.index]/(h[$.source.index]+h[$.target.index]);o=new Array(E),L(),c=new Array(E),M()}}function L(){if(f)for(var A=0,T=t.length;A<T;++A)o[A]=+r(t[A],A,t)}function M(){if(f)for(var A=0,T=t.length;A<T;++A)c[A]=+s(t[A],A,t)}return w.initialize=function(A,T){f=A,g=T,_()},w.links=function(A){return arguments.length?(t=A,_(),w):t},w.id=function(A){return arguments.length?(e=A,w):e},w.iterations=function(A){return arguments.length?(v=+A,w):v},w.strength=function(A){return arguments.length?(r=typeof A=="function"?A:bn(+A),L(),w):r},w.distance=function(A){return arguments.length?(s=typeof A=="function"?A:bn(+A),M(),w):s},w}const Udt=1664525,jdt=1013904223,zm=4294967296;function Vdt(){let t=1;return()=>(t=(Udt*t+jdt)%zm)/zm}function Gdt(t){return t.x}function Kdt(t){return t.y}var Xdt=10,Ydt=Math.PI*(3-Math.sqrt(5));function Zdt(t){var e,r=1,o=.001,s=1-Math.pow(o,1/300),c=0,f=.6,h=new Map,d=yd(y),g=na("tick","end"),v=Vdt();t==null&&(t=[]);function y(){w(),g.call("tick",e),r<o&&(d.stop(),g.call("end",e))}function w(M){var A,T=t.length,E;M===void 0&&(M=1);for(var P=0;P<M;++P)for(r+=(c-r)*s,h.forEach(function($){$(r)}),A=0;A<T;++A)E=t[A],E.fx==null?E.x+=E.vx*=f:(E.x=E.fx,E.vx=0),E.fy==null?E.y+=E.vy*=f:(E.y=E.fy,E.vy=0);return e}function _(){for(var M=0,A=t.length,T;M<A;++M){if(T=t[M],T.index=M,T.fx!=null&&(T.x=T.fx),T.fy!=null&&(T.y=T.fy),isNaN(T.x)||isNaN(T.y)){var E=Xdt*Math.sqrt(.5+M),P=M*Ydt;T.x=E*Math.cos(P),T.y=E*Math.sin(P)}(isNaN(T.vx)||isNaN(T.vy))&&(T.vx=T.vy=0)}}function L(M){return M.initialize&&M.initialize(t,v),M}return _(),e={tick:w,restart:function(){return d.restart(y),e},stop:function(){return d.stop(),e},nodes:function(M){return arguments.length?(t=M,_(),h.forEach(L),e):t},alpha:function(M){return arguments.length?(r=+M,e):r},alphaMin:function(M){return arguments.length?(o=+M,e):o},alphaDecay:function(M){return arguments.length?(s=+M,e):+s},alphaTarget:function(M){return arguments.length?(c=+M,e):c},velocityDecay:function(M){return arguments.length?(f=1-M,e):1-f},randomSource:function(M){return arguments.length?(v=M,h.forEach(L),e):v},force:function(M,A){return arguments.length>1?(A==null?h.delete(M):h.set(M,L(A)),e):h.get(M)},find:function(M,A,T){var E=0,P=t.length,$,F,H,st,Y;for(T==null?T=1/0:T*=T,E=0;E<P;++E)st=t[E],$=M-st.x,F=A-st.y,H=$*$+F*F,H<T&&(Y=st,T=H);return Y},on:function(M,A){return arguments.length>1?(g.on(M,A),e):g.on(M)}}}function Jdt(){var t,e,r,o,s=bn(-30),c,f=1,h=1/0,d=.81;function g(_){var L,M=t.length,A=_d(t,Gdt,Kdt).visitAfter(y);for(o=_,L=0;L<M;++L)e=t[L],A.visit(w)}function v(){if(t){var _,L=t.length,M;for(c=new Array(L),_=0;_<L;++_)M=t[_],c[M.index]=+s(M,_,t)}}function y(_){var L=0,M,A,T=0,E,P,$;if(_.length){for(E=P=$=0;$<4;++$)(M=_[$])&&(A=Math.abs(M.value))&&(L+=M.value,T+=A,E+=A*M.x,P+=A*M.y);_.x=E/T,_.y=P/T}else{M=_,M.x=M.data.x,M.y=M.data.y;do L+=c[M.data.index];while(M=M.next)}_.value=L}function w(_,L,M,A){if(!_.value)return!0;var T=_.x-e.x,E=_.y-e.y,P=A-L,$=T*T+E*E;if(P*P/d<$)return $<h&&(T===0&&(T=Li(r),$+=T*T),E===0&&(E=Li(r),$+=E*E),$<f&&($=Math.sqrt(f*$)),e.vx+=T*_.value*o/$,e.vy+=E*_.value*o/$),!0;if(_.length||$>=h)return;(_.data!==e||_.next)&&(T===0&&(T=Li(r),$+=T*T),E===0&&(E=Li(r),$+=E*E),$<f&&($=Math.sqrt(f*$)));do _.data!==e&&(P=c[_.data.index]*o/$,e.vx+=T*P,e.vy+=E*P);while(_=_.next)}return g.initialize=function(_,L){t=_,r=L,v()},g.strength=function(_){return arguments.length?(s=typeof _=="function"?_:bn(+_),v(),g):s},g.distanceMin=function(_){return arguments.length?(f=_*_,g):Math.sqrt(f)},g.distanceMax=function(_){return arguments.length?(h=_*_,g):Math.sqrt(h)},g.theta=function(_){return arguments.length?(d=_*_,g):Math.sqrt(d)},g}function Qdt(t){var e=bn(.1),r,o,s;typeof t!="function"&&(t=bn(t==null?0:+t));function c(h){for(var d=0,g=r.length,v;d<g;++d)v=r[d],v.vx+=(s[d]-v.x)*o[d]*h}function f(){if(r){var h,d=r.length;for(o=new Array(d),s=new Array(d),h=0;h<d;++h)o[h]=isNaN(s[h]=+t(r[h],h,r))?0:+e(r[h],h,r)}}return c.initialize=function(h){r=h,f()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:bn(+h),f(),c):e},c.x=function(h){return arguments.length?(t=typeof h=="function"?h:bn(+h),f(),c):t},c}function tpt(t){var e=bn(.1),r,o,s;typeof t!="function"&&(t=bn(t==null?0:+t));function c(h){for(var d=0,g=r.length,v;d<g;++d)v=r[d],v.vy+=(s[d]-v.y)*o[d]*h}function f(){if(r){var h,d=r.length;for(o=new Array(d),s=new Array(d),h=0;h<d;++h)o[h]=isNaN(s[h]=+t(r[h],h,r))?0:+e(r[h],h,r)}}return c.initialize=function(h){r=h,f()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:bn(+h),f(),c):e},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:bn(+h),f(),c):t},c}var ept=Object.defineProperty,npt=(t,e,r)=>e in t?ept(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$e=(t,e,r)=>(npt(t,typeof e!="symbol"?e+"":e,r),r);function rpt(){return{drag:{end:0,start:.1},filter:{link:1,type:.1,unlinked:{include:.1,exclude:.1}},focus:{acquire:()=>.1,release:()=>.1},initialize:1,labels:{links:{hide:0,show:0},nodes:{hide:0,show:0}},resize:.5}}function Im(t){if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1}function Ai(...t){return t.reduce((e,r)=>{if(Array.isArray(r))throw new TypeError("Arguments provided to deepmerge must be objects, not arrays.");return Object.keys(r).forEach(o=>{["__proto__","constructor","prototype"].includes(o)||(Array.isArray(e[o])&&Array.isArray(r[o])?e[o]=Ai.options.mergeArrays?Array.from(new Set(e[o].concat(r[o]))):r[o]:Im(e[o])&&Im(r[o])?e[o]=Ai(e[o],r[o]):e[o]=r[o])}),e},{})}const bw={mergeArrays:!0};Ai.options=bw;Ai.withOptions=(t,...e)=>{Ai.options={mergeArrays:!0,...t};const r=Ai(...e);return Ai.options=bw,r};function ipt(){return{centering:{enabled:!0,strength:.1},charge:{enabled:!0,strength:-1},collision:{enabled:!0,strength:1,radiusMultiplier:2},link:{enabled:!0,strength:1,length:128}}}function opt(){return{includeUnlinked:!0,linkFilter:()=>!0,nodeTypeFilter:void 0,showLinkLabels:!0,showNodeLabels:!0}}function ww(t){t.preventDefault(),t.stopPropagation()}function xw(t){return typeof t=="number"}function Fi(t,e){return xw(t.nodeRadius)?t.nodeRadius:t.nodeRadius(e)}function spt(t){return`${t.source.id}-${t.target.id}`}function _w(t){return`link-arrow-${t}`.replace(/[()]/g,"~")}function lpt(t){return`url(#${_w(t.color)})`}function apt(t){return{size:t,padding:(e,r)=>Fi(r,e)+2*t,ref:[t/2,t/2],path:[[0,0],[0,t],[t,t/2]],viewBox:[0,0,t,t].join(",")}}const Sw={Arrow:t=>apt(t)},cpt=(t,e,r)=>[e/2,r/2],kw=(t,e,r)=>[Fm(0,e),Fm(0,r)];function Fm(t,e){return Math.random()*(e-t)+t}function upt(t){const e=Object.fromEntries(t.nodes.map(r=>[r.id,[r.x,r.y]]));return(r,o,s)=>{const[c,f]=e[r.id]??[];return!c||!f?kw(r,o,s):[c,f]}}const kh={Centered:cpt,Randomized:kw,Stable:upt};function fpt(){return{autoResize:!1,callbacks:{},hooks:{},initial:opt(),nodeRadius:16,marker:Sw.Arrow(4),modifiers:{},positionInitializer:kh.Centered,simulation:{alphas:rpt(),forces:ipt()},zoom:{initial:1,min:.1,max:2}}}function hpt(t={}){return Ai.withOptions({mergeArrays:!1},fpt(),t)}function dpt({applyZoom:t,container:e,onDoubleClick:r,onPointerMoved:o,onPointerUp:s,offset:[c,f],scale:h,zoom:d}){const g=e.classed("graph",!0).append("svg").attr("height","100%").attr("width","100%").call(d).on("contextmenu",v=>ww(v)).on("dblclick",v=>r==null?void 0:r(v)).on("dblclick.zoom",null).on("pointermove",v=>o==null?void 0:o(v)).on("pointerup",v=>s==null?void 0:s(v)).style("cursor","grab");return t&&g.call(d.transform,xd.translate(c,f).scale(h)),g.append("g")}function ppt({canvas:t,scale:e,xOffset:r,yOffset:o}){t==null||t.attr("transform",`translate(${r},${o})scale(${e})`)}function gpt({config:t,onDragStart:e,onDragEnd:r}){var o,s;const c=$ft().filter(f=>f.type==="mousedown"?f.button===0:f.type==="touchstart"?f.touches.length===1:!1).on("start",(f,h)=>{f.active===0&&e(f,h),Ln(f.sourceEvent.target).classed("grabbed",!0),h.fx=h.x,h.fy=h.y}).on("drag",(f,h)=>{h.fx=f.x,h.fy=f.y}).on("end",(f,h)=>{f.active===0&&r(f,h),Ln(f.sourceEvent.target).classed("grabbed",!1),h.fx=void 0,h.fy=void 0});return(s=(o=t.modifiers).drag)==null||s.call(o,c),c}function vpt({graph:t,filter:e,focusedNode:r,includeUnlinked:o,linkFilter:s}){const c=t.links.filter(d=>e.includes(d.source.type)&&e.includes(d.target.type)&&s(d)),f=d=>c.find(g=>g.source.id===d.id||g.target.id===d.id)!==void 0,h=t.nodes.filter(d=>e.includes(d.type)&&(o||f(d)));return r===void 0||!e.includes(r.type)?{nodes:h,links:c}:mpt({nodes:h,links:c},r)}function mpt(t,e){const r=[...ypt(t,e),...bpt(t,e)],o=r.flatMap(s=>[s.source,s.target]);return{nodes:[...new Set([...o,e])],links:[...new Set(r)]}}function ypt(t,e){return Cw(t,e,(r,o)=>r.target.id===o.id)}function bpt(t,e){return Cw(t,e,(r,o)=>r.source.id===o.id)}function Cw(t,e,r){const o=new Set(t.links),s=new Set([e]),c=[];for(;o.size>0;){const f=[...o].filter(h=>[...s].some(d=>r(h,d)));if(f.length===0)return c;f.forEach(h=>{s.add(h.source),s.add(h.target),c.push(h),o.delete(h)})}return c}function Ch(t){return t.x??0}function Th(t){return t.y??0}function kd({source:t,target:e}){const r=new vn(Ch(t),Th(t)),o=new vn(Ch(e),Th(e)),s=o.subtract(r),c=s.length(),f=s.normalize(),h=f.multiply(-1);return{s:r,t:o,dist:c,norm:f,endNorm:h}}function Tw({center:t,node:e}){const r=new vn(Ch(e),Th(e));let o=t;return r.x===o.x&&r.y===o.y&&(o=o.add(new vn(0,1))),{n:r,c:o}}function Ew({config:t,source:e,target:r}){const{s:o,t:s,norm:c}=kd({config:t,source:e,target:r}),f=o.add(c.multiply(Fi(t,e)-1)),h=s.subtract(c.multiply(t.marker.padding(r,t)));return{start:f,end:h}}function wpt(t){const{start:e,end:r}=Ew(t);return`M${e.x},${e.y}
|
|
48
|
+
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var D;v&&(D=u.ownerDocument.defaultView.scrollY),l.input.focus(),v&&u.ownerDocument.defaultView.scrollTo(null,D),l.input.reset(),a.somethingSelected()||(u.value=i.prevInput=" "),i.contextMenuPending=W,l.selForContextMenu=a.doc.sel,clearTimeout(l.detectingSelectAll);function j(){if(u.selectionStart!=null){var ct=a.somethingSelected(),gt=""+(ct?u.value:"");u.value="⇚",u.value=gt,i.prevInput=ct?"":"",u.selectionStart=1,u.selectionEnd=gt.length,l.selForContextMenu=a.doc.sel}}function W(){if(i.contextMenuPending==W&&(i.contextMenuPending=!1,i.wrapper.style.cssText=S,u.style.cssText=x,d&&g<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=m),u.selectionStart!=null)){(!d||d&&g<9)&&j();var ct=0,gt=function(){l.selForContextMenu==a.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&i.prevInput==""?qe(a,Wp)(a):ct++<10?l.detectingSelectAll=setTimeout(gt,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(gt,200)}}if(d&&g>=9&&j(),Z){Qr(n);var J=function(){Ye(window,"mouseup",J),setTimeout(W,20)};Rt(window,"mouseup",J)}else setTimeout(W,50)},Le.prototype.readOnlyChanged=function(n){n||this.reset(),this.textarea.disabled=n=="nocursor",this.textarea.readOnly=!!n},Le.prototype.setUneditable=function(){},Le.prototype.needsContentAttribute=!1;function Ax(n,i){if(i=i?it(i):{},i.value=n.value,!i.tabindex&&n.tabIndex&&(i.tabindex=n.tabIndex),!i.placeholder&&n.placeholder&&(i.placeholder=n.placeholder),i.autofocus==null){var a=mt(Zt(n));i.autofocus=a==n||n.getAttribute("autofocus")!=null&&a==document.body}function l(){n.value=b.getValue()}var u;if(n.form&&(Rt(n.form,"submit",l),!i.leaveSubmitMethodAlone)){var p=n.form;u=p.submit;try{var m=p.submit=function(){l(),p.submit=u,p.submit(),p.submit=m}}catch{}}i.finishInit=function(x){x.save=l,x.getTextArea=function(){return n},x.toTextArea=function(){x.toTextArea=isNaN,l(),n.parentNode.removeChild(x.getWrapperElement()),n.style.display="",n.form&&(Ye(n.form,"submit",l),!i.leaveSubmitMethodAlone&&typeof n.form.submit=="function"&&(n.form.submit=u))}},n.style.display="none";var b=we(function(x){return n.parentNode.insertBefore(x,n.nextSibling)},i);return b}function Mx(n){n.off=Ye,n.on=Rt,n.wheelEventPixels=z1,n.Doc=fn,n.splitLines=Hn,n.countColumn=ft,n.findColumn=rt,n.isWordChar=Ht,n.Pass=O,n.signal=ke,n.Line=$o,n.changeEnd=li,n.scrollbarModel=bp,n.Pos=X,n.cmpPos=St,n.modes=To,n.mimeModes=Qn,n.resolveMode=Eo,n.getMode=Lo,n.modeExtensions=ni,n.extendMode=Ao,n.copyState=vr,n.startState=Mo,n.innerMode=Ts,n.commands=Ys,n.keyMap=Fr,n.keyName=og,n.isModifierKey=rg,n.lookupKey=jo,n.normalizeKeyMap=ox,n.StringStream=Te,n.SharedTextMarker=Gs,n.TextMarker=ci,n.LineWidget=Vs,n.e_preventDefault=Ze,n.e_stopPropagation=ko,n.e_stop=Qr,n.addClass=Mt,n.contains=tt,n.rmClass=lt,n.keyNames=ui}xx(we),Cx(we);var Nx="iter insert remove copy getEditor constructor".split(" ");for(var Ra in fn.prototype)fn.prototype.hasOwnProperty(Ra)&&Et(Nx,Ra)<0&&(we.prototype[Ra]=function(n){return function(){return n.apply(this.doc,arguments)}}(fn.prototype[Ra]));return Yn(fn),we.inputStyles={textarea:Le,contenteditable:pe},we.defineMode=function(n){!we.defaults.mode&&n!="null"&&(we.defaults.mode=n),tr.apply(this,arguments)},we.defineMIME=Vi,we.defineMode("null",function(){return{token:function(n){return n.skipToEnd()}}}),we.defineMIME("text/plain","null"),we.defineExtension=function(n,i){we.prototype[n]=i},we.defineDocExtension=function(n,i){fn.prototype[n]=i},we.fromTextArea=Ax,Mx(we),we.version="5.65.16",we})})(Ub);var Ss=Ub.exports;const kct=jy(Ss);var Cct={exports:{}};(function(t,e){(function(r){r(Ss)})(function(r){r.defineMode("javascript",function(o,s){var c=o.indentUnit,f=s.statementIndent,h=s.jsonld,d=s.json||h,g=s.trackScope!==!1,v=s.typescript,y=s.wordCharacters||/[\w$\xa1-\uffff]/,w=function(){function C(Fe){return{type:Fe,style:"keyword"}}var R=C("keyword a"),nt=C("keyword b"),dt=C("keyword c"),X=C("keyword d"),St=C("operator"),ce={type:"atom",style:"atom"};return{if:C("if"),while:R,with:R,else:nt,do:nt,try:nt,finally:nt,return:X,break:X,continue:X,new:C("new"),delete:dt,void:dt,throw:dt,debugger:C("debugger"),var:C("var"),const:C("var"),let:C("var"),function:C("function"),catch:C("catch"),for:C("for"),switch:C("switch"),case:C("case"),default:C("default"),in:St,typeof:St,instanceof:St,true:ce,false:ce,null:ce,undefined:ce,NaN:ce,Infinity:ce,this:C("this"),class:C("class"),super:C("atom"),yield:dt,export:C("export"),import:C("import"),extends:dt,await:dt}}(),_=/[+\-*&%=<>!?|~^@]/,L=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function M(C){for(var R=!1,nt,dt=!1;(nt=C.next())!=null;){if(!R){if(nt=="/"&&!dt)return;nt=="["?dt=!0:dt&&nt=="]"&&(dt=!1)}R=!R&&nt=="\\"}}var A,T;function E(C,R,nt){return A=C,T=nt,R}function P(C,R){var nt=C.next();if(nt=='"'||nt=="'")return R.tokenize=$(nt),R.tokenize(C,R);if(nt=="."&&C.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(nt=="."&&C.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(nt))return E(nt);if(nt=="="&&C.eat(">"))return E("=>","operator");if(nt=="0"&&C.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(nt))return C.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(nt=="/")return C.eat("*")?(R.tokenize=F,F(C,R)):C.eat("/")?(C.skipToEnd(),E("comment","comment")):$n(C,R,1)?(M(C),C.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(C.eat("="),E("operator","operator",C.current()));if(nt=="`")return R.tokenize=H,H(C,R);if(nt=="#"&&C.peek()=="!")return C.skipToEnd(),E("meta","meta");if(nt=="#"&&C.eatWhile(y))return E("variable","property");if(nt=="<"&&C.match("!--")||nt=="-"&&C.match("->")&&!/\S/.test(C.string.slice(0,C.start)))return C.skipToEnd(),E("comment","comment");if(_.test(nt))return(nt!=">"||!R.lexical||R.lexical.type!=">")&&(C.eat("=")?(nt=="!"||nt=="=")&&C.eat("="):/[<>*+\-|&?]/.test(nt)&&(C.eat(nt),nt==">"&&C.eat(nt))),nt=="?"&&C.eat(".")?E("."):E("operator","operator",C.current());if(y.test(nt)){C.eatWhile(y);var dt=C.current();if(R.lastType!="."){if(w.propertyIsEnumerable(dt)){var X=w[dt];return E(X.type,X.style,dt)}if(dt=="async"&&C.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",dt)}return E("variable","variable",dt)}}function $(C){return function(R,nt){var dt=!1,X;if(h&&R.peek()=="@"&&R.match(L))return nt.tokenize=P,E("jsonld-keyword","meta");for(;(X=R.next())!=null&&!(X==C&&!dt);)dt=!dt&&X=="\\";return dt||(nt.tokenize=P),E("string","string")}}function F(C,R){for(var nt=!1,dt;dt=C.next();){if(dt=="/"&&nt){R.tokenize=P;break}nt=dt=="*"}return E("comment","comment")}function H(C,R){for(var nt=!1,dt;(dt=C.next())!=null;){if(!nt&&(dt=="`"||dt=="$"&&C.eat("{"))){R.tokenize=P;break}nt=!nt&&dt=="\\"}return E("quasi","string-2",C.current())}var st="([{}])";function Y(C,R){R.fatArrowAt&&(R.fatArrowAt=null);var nt=C.string.indexOf("=>",C.start);if(!(nt<0)){if(v){var dt=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(C.string.slice(C.start,nt));dt&&(nt=dt.index)}for(var X=0,St=!1,ce=nt-1;ce>=0;--ce){var Fe=C.string.charAt(ce),cn=st.indexOf(Fe);if(cn>=0&&cn<3){if(!X){++ce;break}if(--X==0){Fe=="("&&(St=!0);break}}else if(cn>=3&&cn<6)++X;else if(y.test(Fe))St=!0;else if(/["'\/`]/.test(Fe))for(;;--ce){if(ce==0)return;var No=C.string.charAt(ce-1);if(No==Fe&&C.string.charAt(ce-2)!="\\"){ce--;break}}else if(St&&!X){++ce;break}}St&&!X&&(R.fatArrowAt=ce)}}var ht={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function Z(C,R,nt,dt,X,St){this.indented=C,this.column=R,this.type=nt,this.prev=X,this.info=St,dt!=null&&(this.align=dt)}function ut(C,R){if(!g)return!1;for(var nt=C.localVars;nt;nt=nt.next)if(nt.name==R)return!0;for(var dt=C.context;dt;dt=dt.prev)for(var nt=dt.vars;nt;nt=nt.next)if(nt.name==R)return!0}function lt(C,R,nt,dt,X){var St=C.cc;for(G.state=C,G.stream=X,G.marked=null,G.cc=St,G.style=R,C.lexical.hasOwnProperty("align")||(C.lexical.align=!0);;){var ce=St.length?St.pop():d?Et:ft;if(ce(nt,dt)){for(;St.length&&St[St.length-1].lex;)St.pop()();return G.marked?G.marked:nt=="variable"&&ut(C,dt)?"variable-2":R}}}var G={state:null,column:null,marked:null,cc:null};function I(){for(var C=arguments.length-1;C>=0;C--)G.cc.push(arguments[C])}function k(){return I.apply(null,arguments),!0}function q(C,R){for(var nt=R;nt;nt=nt.next)if(nt.name==C)return!0;return!1}function U(C){var R=G.state;if(G.marked="def",!!g){if(R.context){if(R.lexical.info=="var"&&R.context&&R.context.block){var nt=tt(C,R.context);if(nt!=null){R.context=nt;return}}else if(!q(C,R.localVars)){R.localVars=new qt(C,R.localVars);return}}s.globalVars&&!q(C,R.globalVars)&&(R.globalVars=new qt(C,R.globalVars))}}function tt(C,R){if(R)if(R.block){var nt=tt(C,R.prev);return nt?nt==R.prev?R:new Mt(nt,R.vars,!0):null}else return q(C,R.vars)?R:new Mt(R.prev,new qt(C,R.vars),!1);else return null}function mt(C){return C=="public"||C=="private"||C=="protected"||C=="abstract"||C=="readonly"}function Mt(C,R,nt){this.prev=C,this.vars=R,this.block=nt}function qt(C,R){this.name=C,this.next=R}var Wt=new qt("this",new qt("arguments",null));function ne(){G.state.context=new Mt(G.state.context,G.state.localVars,!1),G.state.localVars=Wt}function ee(){G.state.context=new Mt(G.state.context,G.state.localVars,!0),G.state.localVars=null}ne.lex=ee.lex=!0;function Zt(){G.state.localVars=G.state.context.vars,G.state.context=G.state.context.prev}Zt.lex=!0;function Tt(C,R){var nt=function(){var dt=G.state,X=dt.indented;if(dt.lexical.type=="stat")X=dt.lexical.indented;else for(var St=dt.lexical;St&&St.type==")"&&St.align;St=St.prev)X=St.indented;dt.lexical=new Z(X,G.stream.column(),C,null,dt.lexical,R)};return nt.lex=!0,nt}function V(){var C=G.state;C.lexical.prev&&(C.lexical.type==")"&&(C.indented=C.lexical.indented),C.lexical=C.lexical.prev)}V.lex=!0;function it(C){function R(nt){return nt==C?k():C==";"||nt=="}"||nt==")"||nt=="]"?I():k(R)}return R}function ft(C,R){return C=="var"?k(Tt("vardef",R),ko,it(";"),V):C=="keyword a"?k(Tt("form"),O,ft,V):C=="keyword b"?k(Tt("form"),ft,V):C=="keyword d"?G.stream.match(/^\s*$/,!1)?k():k(Tt("stat"),K,it(";"),V):C=="debugger"?k(it(";")):C=="{"?k(Tt("}"),ee,Ke,V,Zt):C==";"?k():C=="if"?(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==V&&G.state.cc.pop()(),k(Tt("form"),O,ft,V,Co)):C=="function"?k(Hn):C=="for"?k(Tt("form"),ee,ia,ft,Zt,V):C=="class"||v&&R=="interface"?(G.marked="keyword",k(Tt("form",C=="class"?C:R),To,V)):C=="variable"?v&&R=="declare"?(G.marked="keyword",k(ft)):v&&(R=="module"||R=="enum"||R=="type")&&G.stream.match(/^\s*\w/,!1)?(G.marked="keyword",R=="enum"?k($t):R=="type"?k(oa,it("operator"),Bt,it(";")):k(Tt("form"),an,it("{"),Tt("}"),Ke,V,V)):v&&R=="namespace"?(G.marked="keyword",k(Tt("form"),Et,ft,V)):v&&R=="abstract"?(G.marked="keyword",k(ft)):k(Tt("stat"),Ot):C=="switch"?k(Tt("form"),O,it("{"),Tt("}","switch"),ee,Ke,V,V,Zt):C=="case"?k(Et,it(":")):C=="default"?k(it(":")):C=="catch"?k(Tt("form"),ne,Nt,ft,V,Zt):C=="export"?k(Tt("stat"),Eo,V):C=="import"?k(Tt("stat"),ni,V):C=="async"?k(ft):R=="@"?k(Et,ft):I(Tt("stat"),Et,it(";"),V)}function Nt(C){if(C=="(")return k(Jn,it(")"))}function Et(C,R){return z(C,R,!1)}function Xt(C,R){return z(C,R,!0)}function O(C){return C!="("?I():k(Tt(")"),K,it(")"),V)}function z(C,R,nt){if(G.state.fatArrowAt==G.stream.start){var dt=nt?bt:at;if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,it("=>"),dt,Zt);if(C=="variable")return I(ne,an,it("=>"),dt,Zt)}var X=nt?rt:ot;return ht.hasOwnProperty(C)?k(X):C=="function"?k(Hn,X):C=="class"||v&&R=="interface"?(G.marked="keyword",k(Tt("form"),gu,V)):C=="keyword c"||C=="async"?k(nt?Xt:Et):C=="("?k(Tt(")"),K,it(")"),V,X):C=="operator"||C=="spread"?k(nt?Xt:Et):C=="["?k(Tt("]"),Te,V,X):C=="{"?ze(Vt,"}",null,X):C=="quasi"?I(vt,X):C=="new"?k(pt(nt)):k()}function K(C){return C.match(/[;\}\)\],]/)?I():I(Et)}function ot(C,R){return C==","?k(K):rt(C,R,!1)}function rt(C,R,nt){var dt=nt==!1?ot:rt,X=nt==!1?Et:Xt;if(C=="=>")return k(ne,nt?bt:at,Zt);if(C=="operator")return/\+\+|--/.test(R)||v&&R=="!"?k(dt):v&&R=="<"&&G.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(Tt(">"),te(Bt,">"),V,dt):R=="?"?k(Et,it(":"),X):k(X);if(C=="quasi")return I(vt,dt);if(C!=";"){if(C=="(")return ze(Xt,")","call",dt);if(C==".")return k(Ht,dt);if(C=="[")return k(Tt("]"),K,it("]"),V,dt);if(v&&R=="as")return G.marked="keyword",k(Bt,dt);if(C=="regexp")return G.state.lastType=G.marked="operator",G.stream.backUp(G.stream.pos-G.stream.start-1),k(X)}}function vt(C,R){return C!="quasi"?I():R.slice(R.length-2)!="${"?k(vt):k(K,Ct)}function Ct(C){if(C=="}")return G.marked="string-2",G.state.tokenize=H,k(vt)}function at(C){return Y(G.stream,G.state),I(C=="{"?ft:Et)}function bt(C){return Y(G.stream,G.state),I(C=="{"?ft:Xt)}function pt(C){return function(R){return R=="."?k(C?zt:At):R=="variable"&&v?k(Sn,C?rt:ot):I(C?Xt:Et)}}function At(C,R){if(R=="target")return G.marked="keyword",k(ot)}function zt(C,R){if(R=="target")return G.marked="keyword",k(rt)}function Ot(C){return C==":"?k(V,ft):I(ot,it(";"),V)}function Ht(C){if(C=="variable")return G.marked="property",k()}function Vt(C,R){if(C=="async")return G.marked="property",k(Vt);if(C=="variable"||G.style=="keyword"){if(G.marked="property",R=="get"||R=="set")return k(le);var nt;return v&&G.state.fatArrowAt==G.stream.start&&(nt=G.stream.match(/^\s*:\s*/,!1))&&(G.state.fatArrowAt=G.stream.pos+nt[0].length),k(oe)}else{if(C=="number"||C=="string")return G.marked=h?"property":G.style+" property",k(oe);if(C=="jsonld-keyword")return k(oe);if(v&&mt(R))return G.marked="keyword",k(Vt);if(C=="[")return k(Et,Kn,it("]"),oe);if(C=="spread")return k(Xt,oe);if(R=="*")return G.marked="keyword",k(Vt);if(C==":")return I(oe)}}function le(C){return C!="variable"?I(oe):(G.marked="property",k(Hn))}function oe(C){if(C==":")return k(Xt);if(C=="(")return I(Hn)}function te(C,R,nt){function dt(X,St){if(nt?nt.indexOf(X)>-1:X==","){var ce=G.state.lexical;return ce.info=="call"&&(ce.pos=(ce.pos||0)+1),k(function(Fe,cn){return Fe==R||cn==R?I():I(C)},dt)}return X==R||St==R?k():nt&&nt.indexOf(";")>-1?I(C):k(it(R))}return function(X,St){return X==R||St==R?k():I(C,dt)}}function ze(C,R,nt){for(var dt=3;dt<arguments.length;dt++)G.cc.push(arguments[dt]);return k(Tt(R,nt),te(C,R),V)}function Ke(C){return C=="}"?k():I(ft,Ke)}function Kn(C,R){if(v){if(C==":")return k(Bt);if(R=="?")return k(Kn)}}function Nn(C,R){if(v&&(C==":"||R=="in"))return k(Bt)}function Xn(C){if(v&&C==":")return G.stream.match(/^\s*\w+\s+is\b/,!1)?k(Et,Xe,Bt):k(Bt)}function Xe(C,R){if(R=="is")return G.marked="keyword",k()}function Bt(C,R){if(R=="keyof"||R=="typeof"||R=="infer"||R=="readonly")return G.marked="keyword",k(R=="typeof"?Xt:Bt);if(C=="variable"||R=="void")return G.marked="type",k(Fn);if(R=="|"||R=="&")return k(Bt);if(C=="string"||C=="number"||C=="atom")return k(Fn);if(C=="[")return k(Tt("]"),te(Bt,"]",","),V,Fn);if(C=="{")return k(Tt("}"),Rt,V,Fn);if(C=="(")return k(te(Ce,")"),ji,Fn);if(C=="<")return k(te(Bt,">"),Bt);if(C=="quasi")return I(Ye,Fn)}function ji(C){if(C=="=>")return k(Bt)}function Rt(C){return C.match(/[\}\)\]]/)?k():C==","||C==";"?k(Rt):I(Pr,Rt)}function Pr(C,R){if(C=="variable"||G.style=="keyword")return G.marked="property",k(Pr);if(R=="?"||C=="number"||C=="string")return k(Pr);if(C==":")return k(Bt);if(C=="[")return k(it("variable"),Nn,it("]"),Pr);if(C=="(")return I(ei,Pr);if(!C.match(/[;\}\)\],]/))return k()}function Ye(C,R){return C!="quasi"?I():R.slice(R.length-2)!="${"?k(Ye):k(Bt,ke)}function ke(C){if(C=="}")return G.marked="string-2",G.state.tokenize=H,k(Ye)}function Ce(C,R){return C=="variable"&&G.stream.match(/^\s*[?:]/,!1)||R=="?"?k(Ce):C==":"?k(Bt):C=="spread"?k(Ce):I(Bt)}function Fn(C,R){if(R=="<")return k(Tt(">"),te(Bt,">"),V,Fn);if(R=="|"||C=="."||R=="&")return k(Bt);if(C=="[")return k(Bt,it("]"),Fn);if(R=="extends"||R=="implements")return G.marked="keyword",k(Bt);if(R=="?")return k(Bt,it(":"),Bt)}function Sn(C,R){if(R=="<")return k(Tt(">"),te(Bt,">"),V,Fn)}function Yn(){return I(Bt,Ze)}function Ze(C,R){if(R=="=")return k(Bt)}function ko(C,R){return R=="enum"?(G.marked="keyword",k($t)):I(an,Kn,Zn,pu)}function an(C,R){if(v&&mt(R))return G.marked="keyword",k(an);if(C=="variable")return U(R),k();if(C=="spread")return k(an);if(C=="[")return ze(ks,"]");if(C=="{")return ze(Qr,"}")}function Qr(C,R){return C=="variable"&&!G.stream.match(/^\s*:/,!1)?(U(R),k(Zn)):(C=="variable"&&(G.marked="property"),C=="spread"?k(an):C=="}"?I():C=="["?k(Et,it("]"),it(":"),Qr):k(it(":"),an,Zn))}function ks(){return I(an,Zn)}function Zn(C,R){if(R=="=")return k(Xt)}function pu(C){if(C==",")return k(ko)}function Co(C,R){if(C=="keyword b"&&R=="else")return k(Tt("form","else"),ft,V)}function ia(C,R){if(R=="await")return k(ia);if(C=="(")return k(Tt(")"),Cs,V)}function Cs(C){return C=="var"?k(ko,ti):C=="variable"?k(ti):I(ti)}function ti(C,R){return C==")"?k():C==";"?k(ti):R=="in"||R=="of"?(G.marked="keyword",k(Et,ti)):I(Et,ti)}function Hn(C,R){if(R=="*")return G.marked="keyword",k(Hn);if(C=="variable")return U(R),k(Hn);if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,Xn,ft,Zt);if(v&&R=="<")return k(Tt(">"),te(Yn,">"),V,Hn)}function ei(C,R){if(R=="*")return G.marked="keyword",k(ei);if(C=="variable")return U(R),k(ei);if(C=="(")return k(ne,Tt(")"),te(Jn,")"),V,Xn,Zt);if(v&&R=="<")return k(Tt(">"),te(Yn,">"),V,ei)}function oa(C,R){if(C=="keyword"||C=="variable")return G.marked="type",k(oa);if(R=="<")return k(Tt(">"),te(Yn,">"),V)}function Jn(C,R){return R=="@"&&k(Et,Jn),C=="spread"?k(Jn):v&&mt(R)?(G.marked="keyword",k(Jn)):v&&C=="this"?k(Kn,Zn):I(an,Kn,Zn)}function gu(C,R){return C=="variable"?To(C,R):Qn(C,R)}function To(C,R){if(C=="variable")return U(R),k(Qn)}function Qn(C,R){if(R=="<")return k(Tt(">"),te(Yn,">"),V,Qn);if(R=="extends"||R=="implements"||v&&C==",")return R=="implements"&&(G.marked="keyword"),k(v?Bt:Et,Qn);if(C=="{")return k(Tt("}"),tr,V)}function tr(C,R){if(C=="async"||C=="variable"&&(R=="static"||R=="get"||R=="set"||v&&mt(R))&&G.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return G.marked="keyword",k(tr);if(C=="variable"||G.style=="keyword")return G.marked="property",k(Vi,tr);if(C=="number"||C=="string")return k(Vi,tr);if(C=="[")return k(Et,Kn,it("]"),Vi,tr);if(R=="*")return G.marked="keyword",k(tr);if(v&&C=="(")return I(ei,tr);if(C==";"||C==",")return k(tr);if(C=="}")return k();if(R=="@")return k(Et,tr)}function Vi(C,R){if(R=="!"||R=="?")return k(Vi);if(C==":")return k(Bt,Zn);if(R=="=")return k(Xt);var nt=G.state.lexical.prev,dt=nt&&nt.info=="interface";return I(dt?ei:Hn)}function Eo(C,R){return R=="*"?(G.marked="keyword",k(Mo,it(";"))):R=="default"?(G.marked="keyword",k(Et,it(";"))):C=="{"?k(te(Lo,"}"),Mo,it(";")):I(ft)}function Lo(C,R){if(R=="as")return G.marked="keyword",k(it("variable"));if(C=="variable")return I(Xt,Lo)}function ni(C){return C=="string"?k():C=="("?I(Et):C=="."?I(ot):I(Ao,vr,Mo)}function Ao(C,R){return C=="{"?ze(Ao,"}"):(C=="variable"&&U(R),R=="*"&&(G.marked="keyword"),k(Ts))}function vr(C){if(C==",")return k(Ao,vr)}function Ts(C,R){if(R=="as")return G.marked="keyword",k(Ao)}function Mo(C,R){if(R=="from")return G.marked="keyword",k(Et)}function Te(C){return C=="]"?k():I(te(Xt,"]"))}function $t(){return I(Tt("form"),an,it("{"),Tt("}"),te(Or,"}"),V,V)}function Or(){return I(an,Zn)}function Es(C,R){return C.lastType=="operator"||C.lastType==","||_.test(R.charAt(0))||/[,.]/.test(R.charAt(0))}function $n(C,R,nt){return R.tokenize==P&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(R.lastType)||R.lastType=="quasi"&&/\{\s*$/.test(C.string.slice(0,C.pos-(nt||0)))}return{startState:function(C){var R={tokenize:P,lastType:"sof",cc:[],lexical:new Z((C||0)-c,0,"block",!1),localVars:s.localVars,context:s.localVars&&new Mt(null,null,!1),indented:C||0};return s.globalVars&&typeof s.globalVars=="object"&&(R.globalVars=s.globalVars),R},token:function(C,R){if(C.sol()&&(R.lexical.hasOwnProperty("align")||(R.lexical.align=!1),R.indented=C.indentation(),Y(C,R)),R.tokenize!=F&&C.eatSpace())return null;var nt=R.tokenize(C,R);return A=="comment"?nt:(R.lastType=A=="operator"&&(T=="++"||T=="--")?"incdec":A,lt(R,nt,A,T,C))},indent:function(C,R){if(C.tokenize==F||C.tokenize==H)return r.Pass;if(C.tokenize!=P)return 0;var nt=R&&R.charAt(0),dt=C.lexical,X;if(!/^\s*else\b/.test(R))for(var St=C.cc.length-1;St>=0;--St){var ce=C.cc[St];if(ce==V)dt=dt.prev;else if(ce!=Co&&ce!=Zt)break}for(;(dt.type=="stat"||dt.type=="form")&&(nt=="}"||(X=C.cc[C.cc.length-1])&&(X==ot||X==rt)&&!/^[,\.=+\-*:?[\(]/.test(R));)dt=dt.prev;f&&dt.type==")"&&dt.prev.type=="stat"&&(dt=dt.prev);var Fe=dt.type,cn=nt==Fe;return Fe=="vardef"?dt.indented+(C.lastType=="operator"||C.lastType==","?dt.info.length+1:0):Fe=="form"&&nt=="{"?dt.indented:Fe=="form"?dt.indented+c:Fe=="stat"?dt.indented+(Es(C,R)?f||c:0):dt.info=="switch"&&!cn&&s.doubleIndentSwitch!=!1?dt.indented+(/^(?:case|default)\b/.test(R)?c:2*c):dt.align?dt.column+(cn?0:1):dt.indented+(cn?0:c)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:h,jsonMode:d,expressionAllowed:$n,skipExpression:function(C){lt(C,"atom","atom","true",new r.StringStream("",2,null))}}}),r.registerHelper("wordChars","javascript",/[\w$]/),r.defineMIME("text/javascript","javascript"),r.defineMIME("text/ecmascript","javascript"),r.defineMIME("application/javascript","javascript"),r.defineMIME("application/x-javascript","javascript"),r.defineMIME("application/ecmascript","javascript"),r.defineMIME("application/json",{name:"javascript",json:!0}),r.defineMIME("application/x-json",{name:"javascript",json:!0}),r.defineMIME("application/manifest+json",{name:"javascript",json:!0}),r.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),r.defineMIME("text/typescript",{name:"javascript",typescript:!0}),r.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var Tct=Cct.exports,Ect={exports:{}};(function(t,e){(function(r){r(Ss)})(function(r){var o={autoSelfClosers:{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},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{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}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},s={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};r.defineMode("xml",function(c,f){var h=c.indentUnit,d={},g=f.htmlMode?o:s;for(var v in g)d[v]=g[v];for(var v in f)d[v]=f[v];var y,w;function _(k,q){function U(Mt){return q.tokenize=Mt,Mt(k,q)}var tt=k.next();if(tt=="<")return k.eat("!")?k.eat("[")?k.match("CDATA[")?U(A("atom","]]>")):null:k.match("--")?U(A("comment","-->")):k.match("DOCTYPE",!0,!0)?(k.eatWhile(/[\w\._\-]/),U(T(1))):null:k.eat("?")?(k.eatWhile(/[\w\._\-]/),q.tokenize=A("meta","?>"),"meta"):(y=k.eat("/")?"closeTag":"openTag",q.tokenize=L,"tag bracket");if(tt=="&"){var mt;return k.eat("#")?k.eat("x")?mt=k.eatWhile(/[a-fA-F\d]/)&&k.eat(";"):mt=k.eatWhile(/[\d]/)&&k.eat(";"):mt=k.eatWhile(/[\w\.\-:]/)&&k.eat(";"),mt?"atom":"error"}else return k.eatWhile(/[^&<]/),null}_.isInText=!0;function L(k,q){var U=k.next();if(U==">"||U=="/"&&k.eat(">"))return q.tokenize=_,y=U==">"?"endTag":"selfcloseTag","tag bracket";if(U=="=")return y="equals",null;if(U=="<"){q.tokenize=_,q.state=H,q.tagName=q.tagStart=null;var tt=q.tokenize(k,q);return tt?tt+" tag error":"tag error"}else return/[\'\"]/.test(U)?(q.tokenize=M(U),q.stringStartCol=k.column(),q.tokenize(k,q)):(k.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function M(k){var q=function(U,tt){for(;!U.eol();)if(U.next()==k){tt.tokenize=L;break}return"string"};return q.isInAttribute=!0,q}function A(k,q){return function(U,tt){for(;!U.eol();){if(U.match(q)){tt.tokenize=_;break}U.next()}return k}}function T(k){return function(q,U){for(var tt;(tt=q.next())!=null;){if(tt=="<")return U.tokenize=T(k+1),U.tokenize(q,U);if(tt==">")if(k==1){U.tokenize=_;break}else return U.tokenize=T(k-1),U.tokenize(q,U)}return"meta"}}function E(k){return k&&k.toLowerCase()}function P(k,q,U){this.prev=k.context,this.tagName=q||"",this.indent=k.indented,this.startOfLine=U,(d.doNotIndent.hasOwnProperty(q)||k.context&&k.context.noIndent)&&(this.noIndent=!0)}function $(k){k.context&&(k.context=k.context.prev)}function F(k,q){for(var U;;){if(!k.context||(U=k.context.tagName,!d.contextGrabbers.hasOwnProperty(E(U))||!d.contextGrabbers[E(U)].hasOwnProperty(E(q))))return;$(k)}}function H(k,q,U){return k=="openTag"?(U.tagStart=q.column(),st):k=="closeTag"?Y:H}function st(k,q,U){return k=="word"?(U.tagName=q.current(),w="tag",ut):d.allowMissingTagName&&k=="endTag"?(w="tag bracket",ut(k,q,U)):(w="error",st)}function Y(k,q,U){if(k=="word"){var tt=q.current();return U.context&&U.context.tagName!=tt&&d.implicitlyClosed.hasOwnProperty(E(U.context.tagName))&&$(U),U.context&&U.context.tagName==tt||d.matchClosing===!1?(w="tag",ht):(w="tag error",Z)}else return d.allowMissingTagName&&k=="endTag"?(w="tag bracket",ht(k,q,U)):(w="error",Z)}function ht(k,q,U){return k!="endTag"?(w="error",ht):($(U),H)}function Z(k,q,U){return w="error",ht(k,q,U)}function ut(k,q,U){if(k=="word")return w="attribute",lt;if(k=="endTag"||k=="selfcloseTag"){var tt=U.tagName,mt=U.tagStart;return U.tagName=U.tagStart=null,k=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(E(tt))?F(U,tt):(F(U,tt),U.context=new P(U,tt,mt==U.indented)),H}return w="error",ut}function lt(k,q,U){return k=="equals"?G:(d.allowMissing||(w="error"),ut(k,q,U))}function G(k,q,U){return k=="string"?I:k=="word"&&d.allowUnquoted?(w="string",ut):(w="error",ut(k,q,U))}function I(k,q,U){return k=="string"?I:ut(k,q,U)}return{startState:function(k){var q={tokenize:_,state:H,indented:k||0,tagName:null,tagStart:null,context:null};return k!=null&&(q.baseIndent=k),q},token:function(k,q){if(!q.tagName&&k.sol()&&(q.indented=k.indentation()),k.eatSpace())return null;y=null;var U=q.tokenize(k,q);return(U||y)&&U!="comment"&&(w=null,q.state=q.state(y||U,k,q),w&&(U=w=="error"?U+" error":w)),U},indent:function(k,q,U){var tt=k.context;if(k.tokenize.isInAttribute)return k.tagStart==k.indented?k.stringStartCol+1:k.indented+h;if(tt&&tt.noIndent)return r.Pass;if(k.tokenize!=L&&k.tokenize!=_)return U?U.match(/^(\s*)/)[0].length:0;if(k.tagName)return d.multilineTagIndentPastTag!==!1?k.tagStart+k.tagName.length+2:k.tagStart+h*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/<!\[CDATA\[/.test(q))return 0;var mt=q&&/^<(\/)?([\w_:\.-]*)/.exec(q);if(mt&&mt[1])for(;tt;)if(tt.tagName==mt[2]){tt=tt.prev;break}else if(d.implicitlyClosed.hasOwnProperty(E(tt.tagName)))tt=tt.prev;else break;else if(mt)for(;tt;){var Mt=d.contextGrabbers[E(tt.tagName)];if(Mt&&Mt.hasOwnProperty(E(mt[2])))tt=tt.prev;else break}for(;tt&&tt.prev&&!tt.startOfLine;)tt=tt.prev;return tt?tt.indent+h:k.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(k){k.state==G&&(k.state=ut)},xmlCurrentTag:function(k){return k.tagName?{name:k.tagName,close:k.type=="closeTag"}:null},xmlCurrentContext:function(k){for(var q=[],U=k.context;U;U=U.prev)q.push(U.tagName);return q.reverse()}}}),r.defineMIME("text/xml","xml"),r.defineMIME("application/xml","xml"),r.mimeModes.hasOwnProperty("text/html")||r.defineMIME("text/html",{name:"xml",htmlMode:!0})})})();var Lct=Ect.exports;(function(t,e){(function(r){r(Ss,Lct,Tct)})(function(r){function o(c,f,h,d){this.state=c,this.mode=f,this.depth=h,this.prev=d}function s(c){return new o(r.copyState(c.mode,c.state),c.mode,c.depth,c.prev&&s(c.prev))}r.defineMode("jsx",function(c,f){var h=r.getMode(c,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),d=r.getMode(c,f&&f.base||"javascript");function g(_){var L=_.tagName;_.tagName=null;var M=h.indent(_,"","");return _.tagName=L,M}function v(_,L){return L.context.mode==h?y(_,L,L.context):w(_,L,L.context)}function y(_,L,M){if(M.depth==2)return _.match(/^.*?\*\//)?M.depth=1:_.skipToEnd(),"comment";if(_.peek()=="{"){h.skipAttribute(M.state);var A=g(M.state),T=M.state.context;if(T&&_.match(/^[^>]*>\s*$/,!1)){for(;T.prev&&!T.startOfLine;)T=T.prev;T.startOfLine?A-=c.indentUnit:M.prev.state.lexical&&(A=M.prev.state.lexical.indented)}else M.depth==1&&(A+=c.indentUnit);return L.context=new o(r.startState(d,A),d,0,L.context),null}if(M.depth==1){if(_.peek()=="<")return h.skipAttribute(M.state),L.context=new o(r.startState(h,g(M.state)),h,0,L.context),null;if(_.match("//"))return _.skipToEnd(),"comment";if(_.match("/*"))return M.depth=2,v(_,L)}var E=h.token(_,M.state),P=_.current(),$;return/\btag\b/.test(E)?/>$/.test(P)?M.state.context?M.depth=0:L.context=L.context.prev:/^</.test(P)&&(M.depth=1):!E&&($=P.indexOf("{"))>-1&&_.backUp(P.length-$),E}function w(_,L,M){if(_.peek()=="<"&&!_.match(/^<([^<>]|<[^>]*>)+,\s*>/,!1)&&d.expressionAllowed(_,M.state))return L.context=new o(r.startState(h,d.indent(M.state,"","")),h,0,L.context),d.skipExpression(M.state),null;var A=d.token(_,M.state);if(!A&&M.depth!=null){var T=_.current();T=="{"?M.depth++:T=="}"&&--M.depth==0&&(L.context=L.context.prev)}return A}return{startState:function(){return{context:new o(r.startState(d),d)}},copyState:function(_){return{context:s(_.context)}},token:v,indent:function(_,L,M){return _.context.mode.indent(_.context.state,L,M)},innerMode:function(_){return _.context}}},"xml","javascript"),r.defineMIME("text/jsx","jsx"),r.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})})();(function(t,e){(function(r){r(Ss)})(function(r){r.defineOption("placeholder","",function(g,v,y){var w=y&&y!=r.Init;if(v&&!w)g.on("blur",f),g.on("change",h),g.on("swapDoc",h),r.on(g.getInputField(),"compositionupdate",g.state.placeholderCompose=function(){c(g)}),h(g);else if(!v&&w){g.off("blur",f),g.off("change",h),g.off("swapDoc",h),r.off(g.getInputField(),"compositionupdate",g.state.placeholderCompose),o(g);var _=g.getWrapperElement();_.className=_.className.replace(" CodeMirror-empty","")}v&&!g.hasFocus()&&f(g)});function o(g){g.state.placeholder&&(g.state.placeholder.parentNode.removeChild(g.state.placeholder),g.state.placeholder=null)}function s(g){o(g);var v=g.state.placeholder=document.createElement("pre");v.style.cssText="height: 0; overflow: visible",v.style.direction=g.getOption("direction"),v.className="CodeMirror-placeholder CodeMirror-line-like";var y=g.getOption("placeholder");typeof y=="string"&&(y=document.createTextNode(y)),v.appendChild(y),g.display.lineSpace.insertBefore(v,g.display.lineSpace.firstChild)}function c(g){setTimeout(function(){var v=!1;if(g.lineCount()==1){var y=g.getInputField();v=y.nodeName=="TEXTAREA"?!g.getLine(0).length:!/[^\u200b]/.test(y.querySelector(".CodeMirror-line").textContent)}v?s(g):o(g)},20)}function f(g){d(g)&&s(g)}function h(g){var v=g.getWrapperElement(),y=d(g);v.className=v.className.replace(" CodeMirror-empty","")+(y?" CodeMirror-empty":""),y?s(g):o(g)}function d(g){return g.lineCount()===1&&g.getLine(0)===""}})})();(function(t,e){(function(r){r(Ss)})(function(r){function o(f,h,d){this.orientation=h,this.scroll=d,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=f+"-"+h,this.inner=this.node.appendChild(document.createElement("div"));var g=this;r.on(this.inner,"mousedown",function(y){if(y.which!=1)return;r.e_preventDefault(y);var w=g.orientation=="horizontal"?"pageX":"pageY",_=y[w],L=g.pos;function M(){r.off(document,"mousemove",A),r.off(document,"mouseup",M)}function A(T){if(T.which!=1)return M();g.moveTo(L+(T[w]-_)*(g.total/g.size))}r.on(document,"mousemove",A),r.on(document,"mouseup",M)}),r.on(this.node,"click",function(y){r.e_preventDefault(y);var w=g.inner.getBoundingClientRect(),_;g.orientation=="horizontal"?_=y.clientX<w.left?-1:y.clientX>w.right?1:0:_=y.clientY<w.top?-1:y.clientY>w.bottom?1:0,g.moveTo(g.pos+_*g.screen)});function v(y){var w=r.wheelEventPixels(y)[g.orientation=="horizontal"?"x":"y"],_=g.pos;g.moveTo(g.pos+w),g.pos!=_&&r.e_preventDefault(y)}r.on(this.node,"mousewheel",v),r.on(this.node,"DOMMouseScroll",v)}o.prototype.setPos=function(f,h){return f<0&&(f=0),f>this.total-this.screen&&(f=this.total-this.screen),!h&&f==this.pos?!1:(this.pos=f,this.inner.style[this.orientation=="horizontal"?"left":"top"]=f*(this.size/this.total)+"px",!0)},o.prototype.moveTo=function(f){this.setPos(f)&&this.scroll(f,this.orientation)};var s=10;o.prototype.update=function(f,h,d){var g=this.screen!=h||this.total!=f||this.size!=d;g&&(this.screen=h,this.total=f,this.size=d);var v=this.screen*(this.size/this.total);v<s&&(this.size-=s-v,v=s),this.inner.style[this.orientation=="horizontal"?"width":"height"]=v+"px",this.setPos(this.pos,g)};function c(f,h,d){this.addClass=f,this.horiz=new o(f,"horizontal",d),h(this.horiz.node),this.vert=new o(f,"vertical",d),h(this.vert.node),this.width=null}c.prototype.update=function(f){if(this.width==null){var h=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;h&&(this.width=parseInt(h.height))}var d=this.width||0,g=f.scrollWidth>f.clientWidth+1,v=f.scrollHeight>f.clientHeight+1;return this.vert.node.style.display=v?"block":"none",this.horiz.node.style.display=g?"block":"none",v&&(this.vert.update(f.scrollHeight,f.clientHeight,f.viewHeight-(g?d:0)),this.vert.node.style.bottom=g?d+"px":"0"),g&&(this.horiz.update(f.scrollWidth,f.clientWidth,f.viewWidth-(v?d:0)-f.barLeft),this.horiz.node.style.right=v?d+"px":"0",this.horiz.node.style.left=f.barLeft+"px"),{right:v?d:0,bottom:g?d:0}},c.prototype.setScrollTop=function(f){this.vert.setPos(f)},c.prototype.setScrollLeft=function(f){this.horiz.setPos(f)},c.prototype.clear=function(){var f=this.horiz.node.parentNode;f.removeChild(this.horiz.node),f.removeChild(this.vert.node)},r.scrollbarModel.simple=function(f,h){return new c("CodeMirror-simplescroll",f,h)},r.scrollbarModel.overlay=function(f,h){return new c("CodeMirror-overlayscroll",f,h)}})})();function Act(t,e,r={}){const o=kct.fromTextArea(t.value,{theme:"vars",...r,scrollbarStyle:"simple"});let s=!1;return o.on("change",()=>{if(s){s=!1;return}e.value=o.getValue()}),Ge(e,c=>{if(c!==o.getValue()){s=!0;const f=o.listSelections();o.replaceRange(c,o.posFromIndex(0),o.posFromIndex(Number.POSITIVE_INFINITY)),o.setSelections(f)}},{immediate:!0}),f0(o)}const Mct={relative:"","font-mono":"","text-sm":"",class:"codemirror-scrolls"},jb=he({__name:"CodeMirror",props:Vf({mode:{},readOnly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:Vf(["save"],["update:modelValue"]),setup(t,{expose:e,emit:r}){const o=r,s=J0(t,"modelValue"),c=lS(),f={js:"javascript",mjs:"javascript",cjs:"javascript",ts:{name:"javascript",typescript:!0},mts:{name:"javascript",typescript:!0},cts:{name:"javascript",typescript:!0},jsx:{name:"javascript",jsx:!0},tsx:{name:"javascript",typescript:!0,jsx:!0}},h=Qt(),d=ws();return e({cm:d}),xs(async()=>{d.value=Act(h,s,{...c,mode:f[t.mode||""]||t.mode,readOnly:t.readOnly?!0:void 0,extraKeys:{"Cmd-S":function(g){o("save",g.getValue())},"Ctrl-S":function(g){o("save",g.getValue())}}}),d.value.setSize("100%","100%"),d.value.clearHistory(),setTimeout(()=>d.value.refresh(),100)}),(g,v)=>(et(),yt("div",Mct,[Q("textarea",{ref_key:"el",ref:h},null,512)]))}}),Nct=he({__name:"ViewEditor",props:{file:{}},emits:["draft"],setup(t,{emit:e}){const r=t,o=e,s=Qt(""),c=ws(void 0),f=Qt(!1);Ge(()=>r.file,async()=>{var P;if(!r.file||!((P=r.file)!=null&&P.filepath)){s.value="",c.value=s.value,f.value=!1;return}s.value=await Oe.rpc.readTestFile(r.file.filepath)||"",c.value=s.value,f.value=!1},{immediate:!0});const h=_t(()=>{var P,$;return(($=(P=r.file)==null?void 0:P.filepath)==null?void 0:$.split(/\./g).pop())||"js"}),d=Qt(),g=_t(()=>{var P;return(P=d.value)==null?void 0:P.cm}),v=_t(()=>{var P;return((P=r.file)==null?void 0:P.tasks.filter($=>{var F;return((F=$.result)==null?void 0:F.state)==="fail"}))||[]}),y=[],w=[],_=[],L=Qt(!1);function M(){_.forEach(([P,$,F])=>{P.removeEventListener("click",$),F()}),_.length=0}pat(d,()=>{var P;(P=g.value)==null||P.refresh()});function A(){f.value=c.value!==g.value.getValue()}Ge(f,P=>{o("draft",P)},{immediate:!0});function T(P){const $=((P==null?void 0:P.stacks)||[]).filter(Z=>{var ut;return Z.file&&Z.file===((ut=r.file)==null?void 0:ut.filepath)}),F=$==null?void 0:$[0];if(!F)return;const H=document.createElement("div");H.className="op80 flex gap-x-2 items-center";const st=document.createElement("pre");st.className="c-red-600 dark:c-red-400",st.textContent=`${" ".repeat(F.column)}^ ${(P==null?void 0:P.nameStr)||P.name}: ${(P==null?void 0:P.message)||""}`,H.appendChild(st);const Y=document.createElement("span");Y.className="i-carbon-launch c-red-600 dark:c-red-400 hover:cursor-pointer min-w-1em min-h-1em",Y.tabIndex=0,Y.ariaLabel="Open in Editor",Ry(Y,{content:"Open in Editor",placement:"bottom"},!1);const ht=async()=>{await yb(F.file,F.line,F.column)};H.appendChild(Y),_.push([Y,ht,()=>nd(Y)]),w.push(g.value.addLineClass(F.line-1,"wrap","bg-red-500/10")),y.push(g.value.addLineWidget(F.line-1,H))}Ge([g,v],([P])=>{if(!P){M();return}setTimeout(()=>{M(),y.forEach($=>$.clear()),w.forEach($=>{var F;return(F=g.value)==null?void 0:F.removeLineClass($,"wrap")}),y.length=0,w.length=0,P.on("changes",A),v.value.forEach($=>{var F,H;(H=(F=$.result)==null?void 0:F.errors)==null||H.forEach(T)}),L.value||P.clearHistory()},100)},{flush:"post"});async function E(P){L.value=!0,await Oe.rpc.saveTestFile(r.file.filepath,P),c.value=P,f.value=!1}return(P,$)=>{const F=jb;return et(),Yt(F,$i({ref_key:"editor",ref:d,modelValue:B(s),"onUpdate:modelValue":$[0]||($[0]=H=>Ae(s)?s.value=H:null),"h-full":""},{lineNumbers:!0},{mode:B(h),"data-testid":"code-mirror",onSave:E}),null,16,["modelValue","mode"])}}}),$ct=he({__name:"Modal",props:Vf({direction:{default:"bottom"}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=J0(t,"modelValue"),r=_t(()=>{switch(t.direction){case"bottom":return"bottom-0 left-0 right-0 border-t";case"top":return"top-0 left-0 right-0 border-b";case"left":return"bottom-0 left-0 top-0 border-r";case"right":return"bottom-0 top-0 right-0 border-l";default:return""}}),o=_t(()=>{switch(t.direction){case"bottom":return"translateY(100%)";case"top":return"translateY(-100%)";case"left":return"translateX(-100%)";case"right":return"translateX(100%)";default:return""}}),s=()=>e.value=!1;return(c,f)=>(et(),yt("div",{class:de(["fixed inset-0 z-40",e.value?"":"pointer-events-none"])},[Q("div",{class:de(["bg-base inset-0 absolute transition-opacity duration-500 ease-out",e.value?"opacity-50":"opacity-0"]),onClick:s},null,2),Q("div",{class:de(["bg-base border-base absolute transition-all duration-200 ease-out scrolls",[B(r)]]),style:ln(e.value?{}:{transform:B(o)})},[Gn(c.$slots,"default")],6)],2))}}),Pct={"w-350":"","max-w-screen":"","h-full":"",flex:"","flex-col":""},Oct={"p-4":"",relative:""},Rct=Q("p",null,"Module Info",-1),Dct={op50:"","font-mono":"","text-sm":""},zct={key:0,"p-5":""},Ict={grid:"~ cols-2 rows-[min-content_auto]","overflow-hidden":"","flex-auto":""},Fct=Q("div",{p:"x3 y-1","bg-overlay":"",border:"base b t r"}," Source ",-1),Hct=Q("div",{p:"x3 y-1","bg-overlay":"",border:"base b t"}," Transformed ",-1),qct={key:0},Bct={p:"x3 y-1","bg-overlay":"",border:"base b t"},Wct=he({__name:"ModuleTransformResultView",props:{id:{},projectName:{}},emits:["close"],setup(t,{emit:e}){const r=t,o=e,s=iat(()=>Oe.rpc.getTransformResult(r.projectName,r.id,!!Bl)),c=_t(()=>{var g;return((g=r.id)==null?void 0:g.split(/\./g).pop())||"js"}),f=_t(()=>{var g,v;return((v=(g=s.value)==null?void 0:g.source)==null?void 0:v.trim())||""}),h=_t(()=>{var g,v;return((v=(g=s.value)==null?void 0:g.code)==null?void 0:v.replace(/\/\/# sourceMappingURL=.*\n/,"").trim())||""}),d=_t(()=>{var g,v,y,w;return{mappings:((v=(g=s.value)==null?void 0:g.map)==null?void 0:v.mappings)??"",version:(w=(y=s.value)==null?void 0:y.map)==null?void 0:w.version}});return sat("Escape",()=>{o("close")}),(g,v)=>{const y=_s,w=jb;return et(),yt("div",Pct,[Q("div",Oct,[Rct,Q("p",Dct,jt(g.id),1),It(y,{icon:"i-carbon-close",absolute:"","top-5px":"","right-5px":"","text-2xl":"",onClick:v[0]||(v[0]=_=>o("close"))})]),B(s)?(et(),yt(re,{key:1},[Q("div",Ict,[Fct,Hct,It(w,$i({"h-full":"","model-value":B(f),"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"]),It(w,$i({"h-full":"","model-value":B(h),"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"])]),B(d).mappings!==""?(et(),yt("div",qct,[Q("div",Bct," Source map (v"+jt(B(d).version)+") ",1),It(w,$i({"model-value":B(d).mappings,"read-only":""},{lineNumbers:!0},{mode:B(c)}),null,16,["model-value","mode"])])):Kt("",!0)],64)):(et(),yt("div",zct," No transform result found for this module. "))])}}});function Uct(t,e){let r;return(...o)=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>t(...o),e)}}var vh="http://www.w3.org/1999/xhtml";const mm={svg:"http://www.w3.org/2000/svg",xhtml:vh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fu(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),mm.hasOwnProperty(e)?{space:mm[e],local:t}:t}function jct(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===vh&&e.documentElement.namespaceURI===vh?e.createElement(t):e.createElementNS(r,t)}}function Vct(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Vb(t){var e=fu(t);return(e.local?Vct:jct)(e)}function Gct(){}function pd(t){return t==null?Gct:function(){return this.querySelector(t)}}function Kct(t){typeof t!="function"&&(t=pd(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=new Array(f),d,g,v=0;v<f;++v)(d=c[v])&&(g=t.call(d,d.__data__,v,c))&&("__data__"in d&&(g.__data__=d.__data__),h[v]=g);return new In(o,this._parents)}function Xct(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Yct(){return[]}function Gb(t){return t==null?Yct:function(){return this.querySelectorAll(t)}}function Zct(t){return function(){return Xct(t.apply(this,arguments))}}function Jct(t){typeof t=="function"?t=Zct(t):t=Gb(t);for(var e=this._groups,r=e.length,o=[],s=[],c=0;c<r;++c)for(var f=e[c],h=f.length,d,g=0;g<h;++g)(d=f[g])&&(o.push(t.call(d,d.__data__,g,f)),s.push(d));return new In(o,s)}function Kb(t){return function(){return this.matches(t)}}function Xb(t){return function(e){return e.matches(t)}}var Qct=Array.prototype.find;function tut(t){return function(){return Qct.call(this.children,t)}}function eut(){return this.firstElementChild}function nut(t){return this.select(t==null?eut:tut(typeof t=="function"?t:Xb(t)))}var rut=Array.prototype.filter;function iut(){return Array.from(this.children)}function out(t){return function(){return rut.call(this.children,t)}}function sut(t){return this.selectAll(t==null?iut:out(typeof t=="function"?t:Xb(t)))}function lut(t){typeof t!="function"&&(t=Kb(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=[],d,g=0;g<f;++g)(d=c[g])&&t.call(d,d.__data__,g,c)&&h.push(d);return new In(o,this._parents)}function Yb(t){return new Array(t.length)}function aut(){return new In(this._enter||this._groups.map(Yb),this._parents)}function Dc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Dc.prototype={constructor:Dc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function cut(t){return function(){return t}}function uut(t,e,r,o,s,c){for(var f=0,h,d=e.length,g=c.length;f<g;++f)(h=e[f])?(h.__data__=c[f],o[f]=h):r[f]=new Dc(t,c[f]);for(;f<d;++f)(h=e[f])&&(s[f]=h)}function fut(t,e,r,o,s,c,f){var h,d,g=new Map,v=e.length,y=c.length,w=new Array(v),_;for(h=0;h<v;++h)(d=e[h])&&(w[h]=_=f.call(d,d.__data__,h,e)+"",g.has(_)?s[h]=d:g.set(_,d));for(h=0;h<y;++h)_=f.call(t,c[h],h,c)+"",(d=g.get(_))?(o[h]=d,d.__data__=c[h],g.delete(_)):r[h]=new Dc(t,c[h]);for(h=0;h<v;++h)(d=e[h])&&g.get(w[h])===d&&(s[h]=d)}function hut(t){return t.__data__}function dut(t,e){if(!arguments.length)return Array.from(this,hut);var r=e?fut:uut,o=this._parents,s=this._groups;typeof t!="function"&&(t=cut(t));for(var c=s.length,f=new Array(c),h=new Array(c),d=new Array(c),g=0;g<c;++g){var v=o[g],y=s[g],w=y.length,_=put(t.call(v,v&&v.__data__,g,o)),L=_.length,M=h[g]=new Array(L),A=f[g]=new Array(L),T=d[g]=new Array(w);r(v,y,M,A,T,_,e);for(var E=0,P=0,$,F;E<L;++E)if($=M[E]){for(E>=P&&(P=E+1);!(F=A[P])&&++P<L;);$._next=F||null}}return f=new In(f,o),f._enter=h,f._exit=d,f}function put(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function gut(){return new In(this._exit||this._groups.map(Yb),this._parents)}function vut(t,e,r){var o=this.enter(),s=this,c=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),e!=null&&(s=e(s),s&&(s=s.selection())),r==null?c.remove():r(c),o&&s?o.merge(s).order():s}function mut(t){for(var e=t.selection?t.selection():t,r=this._groups,o=e._groups,s=r.length,c=o.length,f=Math.min(s,c),h=new Array(s),d=0;d<f;++d)for(var g=r[d],v=o[d],y=g.length,w=h[d]=new Array(y),_,L=0;L<y;++L)(_=g[L]||v[L])&&(w[L]=_);for(;d<s;++d)h[d]=r[d];return new In(h,this._parents)}function yut(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var o=t[e],s=o.length-1,c=o[s],f;--s>=0;)(f=o[s])&&(c&&f.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(f,c),c=f);return this}function but(t){t||(t=wut);function e(y,w){return y&&w?t(y.__data__,w.__data__):!y-!w}for(var r=this._groups,o=r.length,s=new Array(o),c=0;c<o;++c){for(var f=r[c],h=f.length,d=s[c]=new Array(h),g,v=0;v<h;++v)(g=f[v])&&(d[v]=g);d.sort(e)}return new In(s,this._parents).order()}function wut(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function xut(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function _ut(){return Array.from(this)}function Sut(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],s=0,c=o.length;s<c;++s){var f=o[s];if(f)return f}return null}function kut(){let t=0;for(const e of this)++t;return t}function Cut(){return!this.node()}function Tut(t){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var s=e[r],c=0,f=s.length,h;c<f;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function Eut(t){return function(){this.removeAttribute(t)}}function Lut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Aut(t,e){return function(){this.setAttribute(t,e)}}function Mut(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nut(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function $ut(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Put(t,e){var r=fu(t);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((e==null?r.local?Lut:Eut:typeof e=="function"?r.local?$ut:Nut:r.local?Mut:Aut)(r,e))}function Zb(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Out(t){return function(){this.style.removeProperty(t)}}function Rut(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Dut(t,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,r)}}function zut(t,e,r){return arguments.length>1?this.each((e==null?Out:typeof e=="function"?Dut:Rut)(t,e,r??"")):ys(this.node(),t)}function ys(t,e){return t.style.getPropertyValue(e)||Zb(t).getComputedStyle(t,null).getPropertyValue(e)}function Iut(t){return function(){delete this[t]}}function Fut(t,e){return function(){this[t]=e}}function Hut(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function qut(t,e){return arguments.length>1?this.each((e==null?Iut:typeof e=="function"?Hut:Fut)(t,e)):this.node()[t]}function Jb(t){return t.trim().split(/^|\s+/)}function gd(t){return t.classList||new Qb(t)}function Qb(t){this._node=t,this._names=Jb(t.getAttribute("class")||"")}Qb.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function tw(t,e){for(var r=gd(t),o=-1,s=e.length;++o<s;)r.add(e[o])}function ew(t,e){for(var r=gd(t),o=-1,s=e.length;++o<s;)r.remove(e[o])}function But(t){return function(){tw(this,t)}}function Wut(t){return function(){ew(this,t)}}function Uut(t,e){return function(){(e.apply(this,arguments)?tw:ew)(this,t)}}function jut(t,e){var r=Jb(t+"");if(arguments.length<2){for(var o=gd(this.node()),s=-1,c=r.length;++s<c;)if(!o.contains(r[s]))return!1;return!0}return this.each((typeof e=="function"?Uut:e?But:Wut)(r,e))}function Vut(){this.textContent=""}function Gut(t){return function(){this.textContent=t}}function Kut(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Xut(t){return arguments.length?this.each(t==null?Vut:(typeof t=="function"?Kut:Gut)(t)):this.node().textContent}function Yut(){this.innerHTML=""}function Zut(t){return function(){this.innerHTML=t}}function Jut(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Qut(t){return arguments.length?this.each(t==null?Yut:(typeof t=="function"?Jut:Zut)(t)):this.node().innerHTML}function tft(){this.nextSibling&&this.parentNode.appendChild(this)}function eft(){return this.each(tft)}function nft(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function rft(){return this.each(nft)}function ift(t){var e=typeof t=="function"?t:Vb(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function oft(){return null}function sft(t,e){var r=typeof t=="function"?t:Vb(t),o=e==null?oft:typeof e=="function"?e:pd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function lft(){var t=this.parentNode;t&&t.removeChild(this)}function aft(){return this.each(lft)}function cft(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function uft(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function fft(t){return this.select(t?uft:cft)}function hft(t){return arguments.length?this.property("__data__",t):this.node().__data__}function dft(t){return function(e){t.call(this,e,this.__data__)}}function pft(t){return t.trim().split(/^|\s+/).map(function(e){var r="",o=e.indexOf(".");return o>=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function gft(t){return function(){var e=this.__on;if(e){for(var r=0,o=-1,s=e.length,c;r<s;++r)c=e[r],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):e[++o]=c;++o?e.length=o:delete this.__on}}}function vft(t,e,r){return function(){var o=this.__on,s,c=dft(e);if(o){for(var f=0,h=o.length;f<h;++f)if((s=o[f]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=r),s.value=e;return}}this.addEventListener(t.type,c,r),s={type:t.type,name:t.name,value:e,listener:c,options:r},o?o.push(s):this.__on=[s]}}function mft(t,e,r){var o=pft(t+""),s,c=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var d=0,g=h.length,v;d<g;++d)for(s=0,v=h[d];s<c;++s)if((f=o[s]).type===v.type&&f.name===v.name)return v.value}return}for(h=e?vft:gft,s=0;s<c;++s)this.each(h(o[s],e,r));return this}function nw(t,e,r){var o=Zb(t),s=o.CustomEvent;typeof s=="function"?s=new s(e,r):(s=o.document.createEvent("Event"),r?(s.initEvent(e,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function yft(t,e){return function(){return nw(this,t,e)}}function bft(t,e){return function(){return nw(this,t,e.apply(this,arguments))}}function wft(t,e){return this.each((typeof e=="function"?bft:yft)(t,e))}function*xft(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var o=t[e],s=0,c=o.length,f;s<c;++s)(f=o[s])&&(yield f)}var rw=[null];function In(t,e){this._groups=t,this._parents=e}function ea(){return new In([[document.documentElement]],rw)}function _ft(){return this}In.prototype=ea.prototype={constructor:In,select:Kct,selectAll:Jct,selectChild:nut,selectChildren:sut,filter:lut,data:dut,enter:aut,exit:gut,join:vut,merge:mut,selection:_ft,order:yut,sort:but,call:xut,nodes:_ut,node:Sut,size:kut,empty:Cut,each:Tut,attr:Put,style:zut,property:qut,classed:jut,text:Xut,html:Qut,raise:eft,lower:rft,append:ift,insert:sft,remove:aft,clone:fft,datum:hft,on:mft,dispatch:wft,[Symbol.iterator]:xft};function Ln(t){return typeof t=="string"?new In([[document.querySelector(t)]],[document.documentElement]):new In([[t]],rw)}function Sft(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Ur(t,e){if(t=Sft(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}class mn{constructor(e,r){this.x=e,this.y=r}static of([e,r]){return new mn(e,r)}add(e){return new mn(this.x+e.x,this.y+e.y)}subtract(e){return new mn(this.x-e.x,this.y-e.y)}multiply(e){return new mn(this.x*e,this.y*e)}divide(e){return new mn(this.x/e,this.y/e)}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-e.x*this.y}hadamard(e){return new mn(this.x*e.x,this.y*e.y)}length(){return Math.sqrt(this.x**2+this.y**2)}normalize(){const e=this.length();return new mn(this.x/e,this.y/e)}rotateByRadians(e){const r=Math.cos(e),o=Math.sin(e);return new mn(this.x*r-this.y*o,this.x*o+this.y*r)}rotateByDegrees(e){return this.rotateByRadians(e*Math.PI/180)}}var kft={value:()=>{}};function na(){for(var t=0,e=arguments.length,r={},o;t<e;++t){if(!(o=arguments[t]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new hc(r)}function hc(t){this._=t}function Cft(t,e){return t.trim().split(/^|\s+/).map(function(r){var o="",s=r.indexOf(".");if(s>=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}hc.prototype=na.prototype={constructor:hc,on:function(t,e){var r=this._,o=Cft(t+"",r),s,c=-1,f=o.length;if(arguments.length<2){for(;++c<f;)if((s=(t=o[c]).type)&&(s=Tft(r[s],t.name)))return s;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++c<f;)if(s=(t=o[c]).type)r[s]=ym(r[s],t.name,e);else if(e==null)for(s in r)r[s]=ym(r[s],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new hc(t)},call:function(t,e){if((s=arguments.length-2)>0)for(var r=new Array(s),o=0,s,c;o<s;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],o=0,s=c.length;o<s;++o)c[o].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],s=0,c=o.length;s<c;++s)o[s].value.apply(e,r)}};function Tft(t,e){for(var r=0,o=t.length,s;r<o;++r)if((s=t[r]).name===e)return s.value}function ym(t,e,r){for(var o=0,s=t.length;o<s;++o)if(t[o].name===e){t[o]=kft,t=t.slice(0,o).concat(t.slice(o+1));break}return r!=null&&t.push({name:e,value:r}),t}const Eft={passive:!1},Wl={capture:!0,passive:!1};function $f(t){t.stopImmediatePropagation()}function cs(t){t.preventDefault(),t.stopImmediatePropagation()}function iw(t){var e=t.document.documentElement,r=Ln(t).on("dragstart.drag",cs,Wl);"onselectstart"in e?r.on("selectstart.drag",cs,Wl):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ow(t,e){var r=t.document.documentElement,o=Ln(t).on("dragstart.drag",null);e&&(o.on("click.drag",cs,Wl),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Ya=t=>()=>t;function mh(t,{sourceEvent:e,subject:r,target:o,identifier:s,active:c,x:f,y:h,dx:d,dy:g,dispatch:v}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:g,enumerable:!0,configurable:!0},_:{value:v}})}mh.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Lft(t){return!t.ctrlKey&&!t.button}function Aft(){return this.parentNode}function Mft(t,e){return e??{x:t.x,y:t.y}}function Nft(){return navigator.maxTouchPoints||"ontouchstart"in this}function $ft(){var t=Lft,e=Aft,r=Mft,o=Nft,s={},c=na("start","drag","end"),f=0,h,d,g,v,y=0;function w($){$.on("mousedown.drag",_).filter(o).on("touchstart.drag",A).on("touchmove.drag",T,Eft).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _($,F){if(!(v||!t.call(this,$,F))){var H=P(this,e.call(this,$,F),$,F,"mouse");H&&(Ln($.view).on("mousemove.drag",L,Wl).on("mouseup.drag",M,Wl),iw($.view),$f($),g=!1,h=$.clientX,d=$.clientY,H("start",$))}}function L($){if(cs($),!g){var F=$.clientX-h,H=$.clientY-d;g=F*F+H*H>y}s.mouse("drag",$)}function M($){Ln($.view).on("mousemove.drag mouseup.drag",null),ow($.view,g),cs($),s.mouse("end",$)}function A($,F){if(t.call(this,$,F)){var H=$.changedTouches,st=e.call(this,$,F),Y=H.length,ht,Z;for(ht=0;ht<Y;++ht)(Z=P(this,st,$,F,H[ht].identifier,H[ht]))&&($f($),Z("start",$,H[ht]))}}function T($){var F=$.changedTouches,H=F.length,st,Y;for(st=0;st<H;++st)(Y=s[F[st].identifier])&&(cs($),Y("drag",$,F[st]))}function E($){var F=$.changedTouches,H=F.length,st,Y;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),st=0;st<H;++st)(Y=s[F[st].identifier])&&($f($),Y("end",$,F[st]))}function P($,F,H,st,Y,ht){var Z=c.copy(),ut=Ur(ht||H,F),lt,G,I;if((I=r.call($,new mh("beforestart",{sourceEvent:H,target:w,identifier:Y,active:f,x:ut[0],y:ut[1],dx:0,dy:0,dispatch:Z}),st))!=null)return lt=I.x-ut[0]||0,G=I.y-ut[1]||0,function k(q,U,tt){var mt=ut,Mt;switch(q){case"start":s[Y]=k,Mt=f++;break;case"end":delete s[Y],--f;case"drag":ut=Ur(tt||U,F),Mt=f;break}Z.call(q,$,new mh(q,{sourceEvent:U,subject:I,target:w,identifier:Y,active:Mt,x:ut[0]+lt,y:ut[1]+G,dx:ut[0]-mt[0],dy:ut[1]-mt[1],dispatch:Z}),st)}}return w.filter=function($){return arguments.length?(t=typeof $=="function"?$:Ya(!!$),w):t},w.container=function($){return arguments.length?(e=typeof $=="function"?$:Ya($),w):e},w.subject=function($){return arguments.length?(r=typeof $=="function"?$:Ya($),w):r},w.touchable=function($){return arguments.length?(o=typeof $=="function"?$:Ya(!!$),w):o},w.on=function(){var $=c.on.apply(c,arguments);return $===c?w:$},w.clickDistance=function($){return arguments.length?(y=($=+$)*$,w):Math.sqrt(y)},w}function vd(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function sw(t,e){var r=Object.create(t.prototype);for(var o in e)r[o]=e[o];return r}function ra(){}var Ul=.7,zc=1/Ul,us="\\s*([+-]?\\d+)\\s*",jl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pft=/^#([0-9a-f]{3,8})$/,Oft=new RegExp(`^rgb\\(${us},${us},${us}\\)$`),Rft=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),Dft=new RegExp(`^rgba\\(${us},${us},${us},${jl}\\)$`),zft=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${jl}\\)$`),Ift=new RegExp(`^hsl\\(${jl},${Lr},${Lr}\\)$`),Fft=new RegExp(`^hsla\\(${jl},${Lr},${Lr},${jl}\\)$`),bm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vd(ra,Vl,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:wm,formatHex:wm,formatHex8:Hft,formatHsl:qft,formatRgb:xm,toString:xm});function wm(){return this.rgb().formatHex()}function Hft(){return this.rgb().formatHex8()}function qft(){return lw(this).formatHsl()}function xm(){return this.rgb().formatRgb()}function Vl(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Pft.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?_m(e):r===3?new An(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Za(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Za(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Oft.exec(t))?new An(e[1],e[2],e[3],1):(e=Rft.exec(t))?new An(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dft.exec(t))?Za(e[1],e[2],e[3],e[4]):(e=zft.exec(t))?Za(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Ift.exec(t))?Cm(e[1],e[2]/100,e[3]/100,1):(e=Fft.exec(t))?Cm(e[1],e[2]/100,e[3]/100,e[4]):bm.hasOwnProperty(t)?_m(bm[t]):t==="transparent"?new An(NaN,NaN,NaN,0):null}function _m(t){return new An(t>>16&255,t>>8&255,t&255,1)}function Za(t,e,r,o){return o<=0&&(t=e=r=NaN),new An(t,e,r,o)}function Bft(t){return t instanceof ra||(t=Vl(t)),t?(t=t.rgb(),new An(t.r,t.g,t.b,t.opacity)):new An}function yh(t,e,r,o){return arguments.length===1?Bft(t):new An(t,e,r,o??1)}function An(t,e,r,o){this.r=+t,this.g=+e,this.b=+r,this.opacity=+o}vd(An,yh,sw(ra,{brighter(t){return t=t==null?zc:Math.pow(zc,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ul:Math.pow(Ul,t),new An(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new An(mo(this.r),mo(this.g),mo(this.b),Ic(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sm,formatHex:Sm,formatHex8:Wft,formatRgb:km,toString:km}));function Sm(){return`#${po(this.r)}${po(this.g)}${po(this.b)}`}function Wft(){return`#${po(this.r)}${po(this.g)}${po(this.b)}${po((isNaN(this.opacity)?1:this.opacity)*255)}`}function km(){const t=Ic(this.opacity);return`${t===1?"rgb(":"rgba("}${mo(this.r)}, ${mo(this.g)}, ${mo(this.b)}${t===1?")":`, ${t})`}`}function Ic(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function mo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function po(t){return t=mo(t),(t<16?"0":"")+t.toString(16)}function Cm(t,e,r,o){return o<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new cr(t,e,r,o)}function lw(t){if(t instanceof cr)return new cr(t.h,t.s,t.l,t.opacity);if(t instanceof ra||(t=Vl(t)),!t)return new cr;if(t instanceof cr)return t;t=t.rgb();var e=t.r/255,r=t.g/255,o=t.b/255,s=Math.min(e,r,o),c=Math.max(e,r,o),f=NaN,h=c-s,d=(c+s)/2;return h?(e===c?f=(r-o)/h+(r<o)*6:r===c?f=(o-e)/h+2:f=(e-r)/h+4,h/=d<.5?c+s:2-c-s,f*=60):h=d>0&&d<1?0:f,new cr(f,h,d,t.opacity)}function Uft(t,e,r,o){return arguments.length===1?lw(t):new cr(t,e,r,o??1)}function cr(t,e,r,o){this.h=+t,this.s=+e,this.l=+r,this.opacity=+o}vd(cr,Uft,sw(ra,{brighter(t){return t=t==null?zc:Math.pow(zc,t),new cr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ul:Math.pow(Ul,t),new cr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*e,s=2*r-o;return new An(Pf(t>=240?t-240:t+120,s,o),Pf(t,s,o),Pf(t<120?t+240:t-120,s,o),this.opacity)},clamp(){return new cr(Tm(this.h),Ja(this.s),Ja(this.l),Ic(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ic(this.opacity);return`${t===1?"hsl(":"hsla("}${Tm(this.h)}, ${Ja(this.s)*100}%, ${Ja(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Tm(t){return t=(t||0)%360,t<0?t+360:t}function Ja(t){return Math.max(0,Math.min(1,t||0))}function Pf(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const aw=t=>()=>t;function jft(t,e){return function(r){return t+r*e}}function Vft(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(o){return Math.pow(t+o*e,r)}}function Gft(t){return(t=+t)==1?cw:function(e,r){return r-e?Vft(e,r,t):aw(isNaN(e)?r:e)}}function cw(t,e){var r=e-t;return r?jft(t,r):aw(isNaN(t)?e:t)}const Em=function t(e){var r=Gft(e);function o(s,c){var f=r((s=yh(s)).r,(c=yh(c)).r),h=r(s.g,c.g),d=r(s.b,c.b),g=cw(s.opacity,c.opacity);return function(v){return s.r=f(v),s.g=h(v),s.b=d(v),s.opacity=g(v),s+""}}return o.gamma=t,o}(1);function Ci(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var bh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Of=new RegExp(bh.source,"g");function Kft(t){return function(){return t}}function Xft(t){return function(e){return t(e)+""}}function Yft(t,e){var r=bh.lastIndex=Of.lastIndex=0,o,s,c,f=-1,h=[],d=[];for(t=t+"",e=e+"";(o=bh.exec(t))&&(s=Of.exec(e));)(c=s.index)>r&&(c=e.slice(r,c),h[f]?h[f]+=c:h[++f]=c),(o=o[0])===(s=s[0])?h[f]?h[f]+=s:h[++f]=s:(h[++f]=null,d.push({i:f,x:Ci(o,s)})),r=Of.lastIndex;return r<e.length&&(c=e.slice(r),h[f]?h[f]+=c:h[++f]=c),h.length<2?d[0]?Xft(d[0].x):Kft(e):(e=d.length,function(g){for(var v=0,y;v<e;++v)h[(y=d[v]).i]=y.x(g);return h.join("")})}var Lm=180/Math.PI,wh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function uw(t,e,r,o,s,c){var f,h,d;return(f=Math.sqrt(t*t+e*e))&&(t/=f,e/=f),(d=t*r+e*o)&&(r-=t*d,o-=e*d),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,d/=h),t*o<e*r&&(t=-t,e=-e,d=-d,f=-f),{translateX:s,translateY:c,rotate:Math.atan2(e,t)*Lm,skewX:Math.atan(d)*Lm,scaleX:f,scaleY:h}}var Qa;function Zft(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?wh:uw(e.a,e.b,e.c,e.d,e.e,e.f)}function Jft(t){return t==null||(Qa||(Qa=document.createElementNS("http://www.w3.org/2000/svg","g")),Qa.setAttribute("transform",t),!(t=Qa.transform.baseVal.consolidate()))?wh:(t=t.matrix,uw(t.a,t.b,t.c,t.d,t.e,t.f))}function fw(t,e,r,o){function s(g){return g.length?g.pop()+" ":""}function c(g,v,y,w,_,L){if(g!==y||v!==w){var M=_.push("translate(",null,e,null,r);L.push({i:M-4,x:Ci(g,y)},{i:M-2,x:Ci(v,w)})}else(y||w)&&_.push("translate("+y+e+w+r)}function f(g,v,y,w){g!==v?(g-v>180?v+=360:v-g>180&&(g+=360),w.push({i:y.push(s(y)+"rotate(",null,o)-2,x:Ci(g,v)})):v&&y.push(s(y)+"rotate("+v+o)}function h(g,v,y,w){g!==v?w.push({i:y.push(s(y)+"skewX(",null,o)-2,x:Ci(g,v)}):v&&y.push(s(y)+"skewX("+v+o)}function d(g,v,y,w,_,L){if(g!==y||v!==w){var M=_.push(s(_)+"scale(",null,",",null,")");L.push({i:M-4,x:Ci(g,y)},{i:M-2,x:Ci(v,w)})}else(y!==1||w!==1)&&_.push(s(_)+"scale("+y+","+w+")")}return function(g,v){var y=[],w=[];return g=t(g),v=t(v),c(g.translateX,g.translateY,v.translateX,v.translateY,y,w),f(g.rotate,v.rotate,y,w),h(g.skewX,v.skewX,y,w),d(g.scaleX,g.scaleY,v.scaleX,v.scaleY,y,w),g=v=null,function(_){for(var L=-1,M=w.length,A;++L<M;)y[(A=w[L]).i]=A.x(_);return y.join("")}}}var Qft=fw(Zft,"px, ","px)","deg)"),tht=fw(Jft,", ",")",")"),eht=1e-12;function Am(t){return((t=Math.exp(t))+1/t)/2}function nht(t){return((t=Math.exp(t))-1/t)/2}function rht(t){return((t=Math.exp(2*t))-1)/(t+1)}const iht=function t(e,r,o){function s(c,f){var h=c[0],d=c[1],g=c[2],v=f[0],y=f[1],w=f[2],_=v-h,L=y-d,M=_*_+L*L,A,T;if(M<eht)T=Math.log(w/g)/e,A=function(st){return[h+st*_,d+st*L,g*Math.exp(e*st*T)]};else{var E=Math.sqrt(M),P=(w*w-g*g+o*M)/(2*g*r*E),$=(w*w-g*g-o*M)/(2*w*r*E),F=Math.log(Math.sqrt(P*P+1)-P),H=Math.log(Math.sqrt($*$+1)-$);T=(H-F)/e,A=function(st){var Y=st*T,ht=Am(F),Z=g/(r*E)*(ht*rht(e*Y+F)-nht(F));return[h+Z*_,d+Z*L,g*ht/Am(e*Y+F)]}}return A.duration=T*1e3*e/Math.SQRT2,A}return s.rho=function(c){var f=Math.max(.001,+c),h=f*f,d=h*h;return t(f,h,d)},s}(Math.SQRT2,2,4);var bs=0,al=0,ol=0,hw=1e3,Fc,cl,Hc=0,xo=0,hu=0,Gl=typeof performance=="object"&&performance.now?performance:Date,dw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function md(){return xo||(dw(oht),xo=Gl.now()+hu)}function oht(){xo=0}function qc(){this._call=this._time=this._next=null}qc.prototype=yd.prototype={constructor:qc,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?md():+r)+(e==null?0:+e),!this._next&&cl!==this&&(cl?cl._next=this:Fc=this,cl=this),this._call=t,this._time=r,xh()},stop:function(){this._call&&(this._call=null,this._time=1/0,xh())}};function yd(t,e,r){var o=new qc;return o.restart(t,e,r),o}function sht(){md(),++bs;for(var t=Fc,e;t;)(e=xo-t._time)>=0&&t._call.call(void 0,e),t=t._next;--bs}function Mm(){xo=(Hc=Gl.now())+hu,bs=al=0;try{sht()}finally{bs=0,aht(),xo=0}}function lht(){var t=Gl.now(),e=t-Hc;e>hw&&(hu-=e,Hc=t)}function aht(){for(var t,e=Fc,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Fc=r);cl=t,xh(o)}function xh(t){if(!bs){al&&(al=clearTimeout(al));var e=t-xo;e>24?(t<1/0&&(al=setTimeout(Mm,t-Gl.now()-hu)),ol&&(ol=clearInterval(ol))):(ol||(Hc=Gl.now(),ol=setInterval(lht,hw)),bs=1,dw(Mm))}}function Nm(t,e,r){var o=new qc;return e=e==null?0:+e,o.restart(s=>{o.stop(),t(s+e)},e,r),o}var cht=na("start","end","cancel","interrupt"),uht=[],pw=0,$m=1,_h=2,dc=3,Pm=4,Sh=5,pc=6;function du(t,e,r,o,s,c){var f=t.__transition;if(!f)t.__transition={};else if(r in f)return;fht(t,r,{name:e,index:o,group:s,on:cht,tween:uht,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:pw})}function bd(t,e){var r=gr(t,e);if(r.state>pw)throw new Error("too late; already scheduled");return r}function $r(t,e){var r=gr(t,e);if(r.state>dc)throw new Error("too late; already running");return r}function gr(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function fht(t,e,r){var o=t.__transition,s;o[e]=r,r.timer=yd(c,0,r.time);function c(g){r.state=$m,r.timer.restart(f,r.delay,r.time),r.delay<=g&&f(g-r.delay)}function f(g){var v,y,w,_;if(r.state!==$m)return d();for(v in o)if(_=o[v],_.name===r.name){if(_.state===dc)return Nm(f);_.state===Pm?(_.state=pc,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete o[v]):+v<e&&(_.state=pc,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete o[v])}if(Nm(function(){r.state===dc&&(r.state=Pm,r.timer.restart(h,r.delay,r.time),h(g))}),r.state=_h,r.on.call("start",t,t.__data__,r.index,r.group),r.state===_h){for(r.state=dc,s=new Array(w=r.tween.length),v=0,y=-1;v<w;++v)(_=r.tween[v].value.call(t,t.__data__,r.index,r.group))&&(s[++y]=_);s.length=y+1}}function h(g){for(var v=g<r.duration?r.ease.call(null,g/r.duration):(r.timer.restart(d),r.state=Sh,1),y=-1,w=s.length;++y<w;)s[y].call(t,v);r.state===Sh&&(r.on.call("end",t,t.__data__,r.index,r.group),d())}function d(){r.state=pc,r.timer.stop(),delete o[e];for(var g in o)return;delete t.__transition}}function gc(t,e){var r=t.__transition,o,s,c=!0,f;if(r){e=e==null?null:e+"";for(f in r){if((o=r[f]).name!==e){c=!1;continue}s=o.state>_h&&o.state<Sh,o.state=pc,o.timer.stop(),o.on.call(s?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete r[f]}c&&delete t.__transition}}function hht(t){return this.each(function(){gc(this,t)})}function dht(t,e){var r,o;return function(){var s=$r(this,t),c=s.tween;if(c!==r){o=r=c;for(var f=0,h=o.length;f<h;++f)if(o[f].name===e){o=o.slice(),o.splice(f,1);break}}s.tween=o}}function pht(t,e,r){var o,s;if(typeof r!="function")throw new Error;return function(){var c=$r(this,t),f=c.tween;if(f!==o){s=(o=f).slice();for(var h={name:e,value:r},d=0,g=s.length;d<g;++d)if(s[d].name===e){s[d]=h;break}d===g&&s.push(h)}c.tween=s}}function ght(t,e){var r=this._id;if(t+="",arguments.length<2){for(var o=gr(this.node(),r).tween,s=0,c=o.length,f;s<c;++s)if((f=o[s]).name===t)return f.value;return null}return this.each((e==null?dht:pht)(r,t,e))}function wd(t,e,r){var o=t._id;return t.each(function(){var s=$r(this,o);(s.value||(s.value={}))[e]=r.apply(this,arguments)}),function(s){return gr(s,o).value[e]}}function gw(t,e){var r;return(typeof e=="number"?Ci:e instanceof Vl?Em:(r=Vl(e))?(e=r,Em):Yft)(t,e)}function vht(t){return function(){this.removeAttribute(t)}}function mht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yht(t,e,r){var o,s=r+"",c;return function(){var f=this.getAttribute(t);return f===s?null:f===o?c:c=e(o=f,r)}}function bht(t,e,r){var o,s=r+"",c;return function(){var f=this.getAttributeNS(t.space,t.local);return f===s?null:f===o?c:c=e(o=f,r)}}function wht(t,e,r){var o,s,c;return function(){var f,h=r(this),d;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),d=h+"",f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h)))}}function xht(t,e,r){var o,s,c;return function(){var f,h=r(this),d;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),d=h+"",f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h)))}}function _ht(t,e){var r=fu(t),o=r==="transform"?tht:gw;return this.attrTween(t,typeof e=="function"?(r.local?xht:wht)(r,o,wd(this,"attr."+t,e)):e==null?(r.local?mht:vht)(r):(r.local?bht:yht)(r,o,e))}function Sht(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function kht(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function Cht(t,e){var r,o;function s(){var c=e.apply(this,arguments);return c!==o&&(r=(o=c)&&kht(t,c)),r}return s._value=e,s}function Tht(t,e){var r,o;function s(){var c=e.apply(this,arguments);return c!==o&&(r=(o=c)&&Sht(t,c)),r}return s._value=e,s}function Eht(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var o=fu(t);return this.tween(r,(o.local?Cht:Tht)(o,e))}function Lht(t,e){return function(){bd(this,t).delay=+e.apply(this,arguments)}}function Aht(t,e){return e=+e,function(){bd(this,t).delay=e}}function Mht(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Lht:Aht)(e,t)):gr(this.node(),e).delay}function Nht(t,e){return function(){$r(this,t).duration=+e.apply(this,arguments)}}function $ht(t,e){return e=+e,function(){$r(this,t).duration=e}}function Pht(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Nht:$ht)(e,t)):gr(this.node(),e).duration}function Oht(t,e){if(typeof e!="function")throw new Error;return function(){$r(this,t).ease=e}}function Rht(t){var e=this._id;return arguments.length?this.each(Oht(e,t)):gr(this.node(),e).ease}function Dht(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;$r(this,t).ease=r}}function zht(t){if(typeof t!="function")throw new Error;return this.each(Dht(this._id,t))}function Iht(t){typeof t!="function"&&(t=Kb(t));for(var e=this._groups,r=e.length,o=new Array(r),s=0;s<r;++s)for(var c=e[s],f=c.length,h=o[s]=[],d,g=0;g<f;++g)(d=c[g])&&t.call(d,d.__data__,g,c)&&h.push(d);return new Zr(o,this._parents,this._name,this._id)}function Fht(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,o=e.length,s=r.length,c=Math.min(o,s),f=new Array(o),h=0;h<c;++h)for(var d=e[h],g=r[h],v=d.length,y=f[h]=new Array(v),w,_=0;_<v;++_)(w=d[_]||g[_])&&(y[_]=w);for(;h<o;++h)f[h]=e[h];return new Zr(f,this._parents,this._name,this._id)}function Hht(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function qht(t,e,r){var o,s,c=Hht(e)?bd:$r;return function(){var f=c(this,t),h=f.on;h!==o&&(s=(o=h).copy()).on(e,r),f.on=s}}function Bht(t,e){var r=this._id;return arguments.length<2?gr(this.node(),r).on.on(t):this.each(qht(r,t,e))}function Wht(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Uht(){return this.on("end.remove",Wht(this._id))}function jht(t){var e=this._name,r=this._id;typeof t!="function"&&(t=pd(t));for(var o=this._groups,s=o.length,c=new Array(s),f=0;f<s;++f)for(var h=o[f],d=h.length,g=c[f]=new Array(d),v,y,w=0;w<d;++w)(v=h[w])&&(y=t.call(v,v.__data__,w,h))&&("__data__"in v&&(y.__data__=v.__data__),g[w]=y,du(g[w],e,r,w,g,gr(v,r)));return new Zr(c,this._parents,e,r)}function Vht(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Gb(t));for(var o=this._groups,s=o.length,c=[],f=[],h=0;h<s;++h)for(var d=o[h],g=d.length,v,y=0;y<g;++y)if(v=d[y]){for(var w=t.call(v,v.__data__,y,d),_,L=gr(v,r),M=0,A=w.length;M<A;++M)(_=w[M])&&du(_,e,r,M,w,L);c.push(w),f.push(v)}return new Zr(c,f,e,r)}var Ght=ea.prototype.constructor;function Kht(){return new Ght(this._groups,this._parents)}function Xht(t,e){var r,o,s;return function(){var c=ys(this,t),f=(this.style.removeProperty(t),ys(this,t));return c===f?null:c===r&&f===o?s:s=e(r=c,o=f)}}function vw(t){return function(){this.style.removeProperty(t)}}function Yht(t,e,r){var o,s=r+"",c;return function(){var f=ys(this,t);return f===s?null:f===o?c:c=e(o=f,r)}}function Zht(t,e,r){var o,s,c;return function(){var f=ys(this,t),h=r(this),d=h+"";return h==null&&(d=h=(this.style.removeProperty(t),ys(this,t))),f===d?null:f===o&&d===s?c:(s=d,c=e(o=f,h))}}function Jht(t,e){var r,o,s,c="style."+e,f="end."+c,h;return function(){var d=$r(this,t),g=d.on,v=d.value[c]==null?h||(h=vw(e)):void 0;(g!==r||s!==v)&&(o=(r=g).copy()).on(f,s=v),d.on=o}}function Qht(t,e,r){var o=(t+="")=="transform"?Qft:gw;return e==null?this.styleTween(t,Xht(t,o)).on("end.style."+t,vw(t)):typeof e=="function"?this.styleTween(t,Zht(t,o,wd(this,"style."+t,e))).each(Jht(this._id,t)):this.styleTween(t,Yht(t,o,e),r).on("end.style."+t,null)}function tdt(t,e,r){return function(o){this.style.setProperty(t,e.call(this,o),r)}}function edt(t,e,r){var o,s;function c(){var f=e.apply(this,arguments);return f!==s&&(o=(s=f)&&tdt(t,f,r)),o}return c._value=e,c}function ndt(t,e,r){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,edt(t,e,r??""))}function rdt(t){return function(){this.textContent=t}}function idt(t){return function(){var e=t(this);this.textContent=e??""}}function odt(t){return this.tween("text",typeof t=="function"?idt(wd(this,"text",t)):rdt(t==null?"":t+""))}function sdt(t){return function(e){this.textContent=t.call(this,e)}}function ldt(t){var e,r;function o(){var s=t.apply(this,arguments);return s!==r&&(e=(r=s)&&sdt(s)),e}return o._value=t,o}function adt(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,ldt(t))}function cdt(){for(var t=this._name,e=this._id,r=mw(),o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,d,g=0;g<h;++g)if(d=f[g]){var v=gr(d,e);du(d,t,r,g,f,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new Zr(o,this._parents,t,r)}function udt(){var t,e,r=this,o=r._id,s=r.size();return new Promise(function(c,f){var h={value:f},d={value:function(){--s===0&&c()}};r.each(function(){var g=$r(this,o),v=g.on;v!==t&&(e=(t=v).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(d)),g.on=e}),s===0&&c()})}var fdt=0;function Zr(t,e,r,o){this._groups=t,this._parents=e,this._name=r,this._id=o}function mw(){return++fdt}var Br=ea.prototype;Zr.prototype={constructor:Zr,select:jht,selectAll:Vht,selectChild:Br.selectChild,selectChildren:Br.selectChildren,filter:Iht,merge:Fht,selection:Kht,transition:cdt,call:Br.call,nodes:Br.nodes,node:Br.node,size:Br.size,empty:Br.empty,each:Br.each,on:Bht,attr:_ht,attrTween:Eht,style:Qht,styleTween:ndt,text:odt,textTween:adt,remove:Uht,tween:ght,delay:Mht,duration:Pht,ease:Rht,easeVarying:zht,end:udt,[Symbol.iterator]:Br[Symbol.iterator]};function hdt(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ddt={time:null,delay:0,duration:250,ease:hdt};function pdt(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function gdt(t){var e,r;t instanceof Zr?(e=t._id,t=t._name):(e=mw(),(r=ddt).time=md(),t=t==null?null:t+"");for(var o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,d,g=0;g<h;++g)(d=f[g])&&du(d,t,e,g,f,r||pdt(d,e));return new Zr(o,this._parents,t,e)}ea.prototype.interrupt=hht;ea.prototype.transition=gdt;const tc=t=>()=>t;function vdt(t,{sourceEvent:e,target:r,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function jr(t,e,r){this.k=t,this.x=e,this.y=r}jr.prototype={constructor:jr,scale:function(t){return t===1?this:new jr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new jr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var xd=new jr(1,0,0);jr.prototype;function Rf(t){t.stopImmediatePropagation()}function sl(t){t.preventDefault(),t.stopImmediatePropagation()}function mdt(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function ydt(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Om(){return this.__zoom||xd}function bdt(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function wdt(){return navigator.maxTouchPoints||"ontouchstart"in this}function xdt(t,e,r){var o=t.invertX(e[0][0])-r[0][0],s=t.invertX(e[1][0])-r[1][0],c=t.invertY(e[0][1])-r[0][1],f=t.invertY(e[1][1])-r[1][1];return t.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),f>c?(c+f)/2:Math.min(0,c)||Math.max(0,f))}function _dt(){var t=mdt,e=ydt,r=xdt,o=bdt,s=wdt,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,d=iht,g=na("start","zoom","end"),v,y,w,_=500,L=150,M=0,A=10;function T(I){I.property("__zoom",Om).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",ht).on("dblclick.zoom",Z).filter(s).on("touchstart.zoom",ut).on("touchmove.zoom",lt).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}T.transform=function(I,k,q,U){var tt=I.selection?I.selection():I;tt.property("__zoom",Om),I!==tt?F(I,k,q,U):tt.interrupt().each(function(){H(this,arguments).event(U).start().zoom(null,typeof k=="function"?k.apply(this,arguments):k).end()})},T.scaleBy=function(I,k,q,U){T.scaleTo(I,function(){var tt=this.__zoom.k,mt=typeof k=="function"?k.apply(this,arguments):k;return tt*mt},q,U)},T.scaleTo=function(I,k,q,U){T.transform(I,function(){var tt=e.apply(this,arguments),mt=this.__zoom,Mt=q==null?$(tt):typeof q=="function"?q.apply(this,arguments):q,qt=mt.invert(Mt),Wt=typeof k=="function"?k.apply(this,arguments):k;return r(P(E(mt,Wt),Mt,qt),tt,f)},q,U)},T.translateBy=function(I,k,q,U){T.transform(I,function(){return r(this.__zoom.translate(typeof k=="function"?k.apply(this,arguments):k,typeof q=="function"?q.apply(this,arguments):q),e.apply(this,arguments),f)},null,U)},T.translateTo=function(I,k,q,U,tt){T.transform(I,function(){var mt=e.apply(this,arguments),Mt=this.__zoom,qt=U==null?$(mt):typeof U=="function"?U.apply(this,arguments):U;return r(xd.translate(qt[0],qt[1]).scale(Mt.k).translate(typeof k=="function"?-k.apply(this,arguments):-k,typeof q=="function"?-q.apply(this,arguments):-q),mt,f)},U,tt)};function E(I,k){return k=Math.max(c[0],Math.min(c[1],k)),k===I.k?I:new jr(k,I.x,I.y)}function P(I,k,q){var U=k[0]-q[0]*I.k,tt=k[1]-q[1]*I.k;return U===I.x&&tt===I.y?I:new jr(I.k,U,tt)}function $(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function F(I,k,q,U){I.on("start.zoom",function(){H(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(U).end()}).tween("zoom",function(){var tt=this,mt=arguments,Mt=H(tt,mt).event(U),qt=e.apply(tt,mt),Wt=q==null?$(qt):typeof q=="function"?q.apply(tt,mt):q,ne=Math.max(qt[1][0]-qt[0][0],qt[1][1]-qt[0][1]),ee=tt.__zoom,Zt=typeof k=="function"?k.apply(tt,mt):k,Tt=d(ee.invert(Wt).concat(ne/ee.k),Zt.invert(Wt).concat(ne/Zt.k));return function(V){if(V===1)V=Zt;else{var it=Tt(V),ft=ne/it[2];V=new jr(ft,Wt[0]-it[0]*ft,Wt[1]-it[1]*ft)}Mt.zoom(null,V)}})}function H(I,k,q){return!q&&I.__zooming||new st(I,k)}function st(I,k){this.that=I,this.args=k,this.active=0,this.sourceEvent=null,this.extent=e.apply(I,k),this.taps=0}st.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,k){return this.mouse&&I!=="mouse"&&(this.mouse[1]=k.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=k.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=k.invert(this.touch1[0])),this.that.__zoom=k,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var k=Ln(this.that).datum();g.call(I,this.that,new vdt(I,{sourceEvent:this.sourceEvent,target:T,type:I,transform:this.that.__zoom,dispatch:g}),k)}};function Y(I,...k){if(!t.apply(this,arguments))return;var q=H(this,k).event(I),U=this.__zoom,tt=Math.max(c[0],Math.min(c[1],U.k*Math.pow(2,o.apply(this,arguments)))),mt=Ur(I);if(q.wheel)(q.mouse[0][0]!==mt[0]||q.mouse[0][1]!==mt[1])&&(q.mouse[1]=U.invert(q.mouse[0]=mt)),clearTimeout(q.wheel);else{if(U.k===tt)return;q.mouse=[mt,U.invert(mt)],gc(this),q.start()}sl(I),q.wheel=setTimeout(Mt,L),q.zoom("mouse",r(P(E(U,tt),q.mouse[0],q.mouse[1]),q.extent,f));function Mt(){q.wheel=null,q.end()}}function ht(I,...k){if(w||!t.apply(this,arguments))return;var q=I.currentTarget,U=H(this,k,!0).event(I),tt=Ln(I.view).on("mousemove.zoom",Wt,!0).on("mouseup.zoom",ne,!0),mt=Ur(I,q),Mt=I.clientX,qt=I.clientY;iw(I.view),Rf(I),U.mouse=[mt,this.__zoom.invert(mt)],gc(this),U.start();function Wt(ee){if(sl(ee),!U.moved){var Zt=ee.clientX-Mt,Tt=ee.clientY-qt;U.moved=Zt*Zt+Tt*Tt>M}U.event(ee).zoom("mouse",r(P(U.that.__zoom,U.mouse[0]=Ur(ee,q),U.mouse[1]),U.extent,f))}function ne(ee){tt.on("mousemove.zoom mouseup.zoom",null),ow(ee.view,U.moved),sl(ee),U.event(ee).end()}}function Z(I,...k){if(t.apply(this,arguments)){var q=this.__zoom,U=Ur(I.changedTouches?I.changedTouches[0]:I,this),tt=q.invert(U),mt=q.k*(I.shiftKey?.5:2),Mt=r(P(E(q,mt),U,tt),e.apply(this,k),f);sl(I),h>0?Ln(this).transition().duration(h).call(F,Mt,U,I):Ln(this).call(T.transform,Mt,U,I)}}function ut(I,...k){if(t.apply(this,arguments)){var q=I.touches,U=q.length,tt=H(this,k,I.changedTouches.length===U).event(I),mt,Mt,qt,Wt;for(Rf(I),Mt=0;Mt<U;++Mt)qt=q[Mt],Wt=Ur(qt,this),Wt=[Wt,this.__zoom.invert(Wt),qt.identifier],tt.touch0?!tt.touch1&&tt.touch0[2]!==Wt[2]&&(tt.touch1=Wt,tt.taps=0):(tt.touch0=Wt,mt=!0,tt.taps=1+!!v);v&&(v=clearTimeout(v)),mt&&(tt.taps<2&&(y=Wt[0],v=setTimeout(function(){v=null},_)),gc(this),tt.start())}}function lt(I,...k){if(this.__zooming){var q=H(this,k).event(I),U=I.changedTouches,tt=U.length,mt,Mt,qt,Wt;for(sl(I),mt=0;mt<tt;++mt)Mt=U[mt],qt=Ur(Mt,this),q.touch0&&q.touch0[2]===Mt.identifier?q.touch0[0]=qt:q.touch1&&q.touch1[2]===Mt.identifier&&(q.touch1[0]=qt);if(Mt=q.that.__zoom,q.touch1){var ne=q.touch0[0],ee=q.touch0[1],Zt=q.touch1[0],Tt=q.touch1[1],V=(V=Zt[0]-ne[0])*V+(V=Zt[1]-ne[1])*V,it=(it=Tt[0]-ee[0])*it+(it=Tt[1]-ee[1])*it;Mt=E(Mt,Math.sqrt(V/it)),qt=[(ne[0]+Zt[0])/2,(ne[1]+Zt[1])/2],Wt=[(ee[0]+Tt[0])/2,(ee[1]+Tt[1])/2]}else if(q.touch0)qt=q.touch0[0],Wt=q.touch0[1];else return;q.zoom("touch",r(P(Mt,qt,Wt),q.extent,f))}}function G(I,...k){if(this.__zooming){var q=H(this,k).event(I),U=I.changedTouches,tt=U.length,mt,Mt;for(Rf(I),w&&clearTimeout(w),w=setTimeout(function(){w=null},_),mt=0;mt<tt;++mt)Mt=U[mt],q.touch0&&q.touch0[2]===Mt.identifier?delete q.touch0:q.touch1&&q.touch1[2]===Mt.identifier&&delete q.touch1;if(q.touch1&&!q.touch0&&(q.touch0=q.touch1,delete q.touch1),q.touch0)q.touch0[1]=this.__zoom.invert(q.touch0[0]);else if(q.end(),q.taps===2&&(Mt=Ur(Mt,this),Math.hypot(y[0]-Mt[0],y[1]-Mt[1])<A)){var qt=Ln(this).on("dblclick.zoom");qt&&qt.apply(this,arguments)}}}return T.wheelDelta=function(I){return arguments.length?(o=typeof I=="function"?I:tc(+I),T):o},T.filter=function(I){return arguments.length?(t=typeof I=="function"?I:tc(!!I),T):t},T.touchable=function(I){return arguments.length?(s=typeof I=="function"?I:tc(!!I),T):s},T.extent=function(I){return arguments.length?(e=typeof I=="function"?I:tc([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),T):e},T.scaleExtent=function(I){return arguments.length?(c[0]=+I[0],c[1]=+I[1],T):[c[0],c[1]]},T.translateExtent=function(I){return arguments.length?(f[0][0]=+I[0][0],f[1][0]=+I[1][0],f[0][1]=+I[0][1],f[1][1]=+I[1][1],T):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},T.constrain=function(I){return arguments.length?(r=I,T):r},T.duration=function(I){return arguments.length?(h=+I,T):h},T.interpolate=function(I){return arguments.length?(d=I,T):d},T.on=function(){var I=g.on.apply(g,arguments);return I===g?T:I},T.clickDistance=function(I){return arguments.length?(M=(I=+I)*I,T):Math.sqrt(M)},T.tapDistance=function(I){return arguments.length?(A=+I,T):A},T}function Sdt(t){const e=+this._x.call(null,t),r=+this._y.call(null,t);return yw(this.cover(e,r),e,r,t)}function yw(t,e,r,o){if(isNaN(e)||isNaN(r))return t;var s,c=t._root,f={data:o},h=t._x0,d=t._y0,g=t._x1,v=t._y1,y,w,_,L,M,A,T,E;if(!c)return t._root=f,t;for(;c.length;)if((M=e>=(y=(h+g)/2))?h=y:g=y,(A=r>=(w=(d+v)/2))?d=w:v=w,s=c,!(c=c[T=A<<1|M]))return s[T]=f,t;if(_=+t._x.call(null,c.data),L=+t._y.call(null,c.data),e===_&&r===L)return f.next=c,s?s[T]=f:t._root=f,t;do s=s?s[T]=new Array(4):t._root=new Array(4),(M=e>=(y=(h+g)/2))?h=y:g=y,(A=r>=(w=(d+v)/2))?d=w:v=w;while((T=A<<1|M)===(E=(L>=w)<<1|_>=y));return s[E]=c,s[T]=f,t}function kdt(t){var e,r,o=t.length,s,c,f=new Array(o),h=new Array(o),d=1/0,g=1/0,v=-1/0,y=-1/0;for(r=0;r<o;++r)isNaN(s=+this._x.call(null,e=t[r]))||isNaN(c=+this._y.call(null,e))||(f[r]=s,h[r]=c,s<d&&(d=s),s>v&&(v=s),c<g&&(g=c),c>y&&(y=c));if(d>v||g>y)return this;for(this.cover(d,g).cover(v,y),r=0;r<o;++r)yw(this,f[r],h[r],t[r]);return this}function Cdt(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,o=this._y0,s=this._x1,c=this._y1;if(isNaN(r))s=(r=Math.floor(t))+1,c=(o=Math.floor(e))+1;else{for(var f=s-r||1,h=this._root,d,g;r>t||t>=s||o>e||e>=c;)switch(g=(e<o)<<1|t<r,d=new Array(4),d[g]=h,h=d,f*=2,g){case 0:s=r+f,c=o+f;break;case 1:r=s-f,c=o+f;break;case 2:s=r+f,o=c-f;break;case 3:r=s-f,o=c-f;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=o,this._x1=s,this._y1=c,this}function Tdt(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function Edt(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function yn(t,e,r,o,s){this.node=t,this.x0=e,this.y0=r,this.x1=o,this.y1=s}function Ldt(t,e,r){var o,s=this._x0,c=this._y0,f,h,d,g,v=this._x1,y=this._y1,w=[],_=this._root,L,M;for(_&&w.push(new yn(_,s,c,v,y)),r==null?r=1/0:(s=t-r,c=e-r,v=t+r,y=e+r,r*=r);L=w.pop();)if(!(!(_=L.node)||(f=L.x0)>v||(h=L.y0)>y||(d=L.x1)<s||(g=L.y1)<c))if(_.length){var A=(f+d)/2,T=(h+g)/2;w.push(new yn(_[3],A,T,d,g),new yn(_[2],f,T,A,g),new yn(_[1],A,h,d,T),new yn(_[0],f,h,A,T)),(M=(e>=T)<<1|t>=A)&&(L=w[w.length-1],w[w.length-1]=w[w.length-1-M],w[w.length-1-M]=L)}else{var E=t-+this._x.call(null,_.data),P=e-+this._y.call(null,_.data),$=E*E+P*P;if($<r){var F=Math.sqrt(r=$);s=t-F,c=e-F,v=t+F,y=e+F,o=_.data}}return o}function Adt(t){if(isNaN(v=+this._x.call(null,t))||isNaN(y=+this._y.call(null,t)))return this;var e,r=this._root,o,s,c,f=this._x0,h=this._y0,d=this._x1,g=this._y1,v,y,w,_,L,M,A,T;if(!r)return this;if(r.length)for(;;){if((L=v>=(w=(f+d)/2))?f=w:d=w,(M=y>=(_=(h+g)/2))?h=_:g=_,e=r,!(r=r[A=M<<1|L]))return this;if(!r.length)break;(e[A+1&3]||e[A+2&3]||e[A+3&3])&&(o=e,T=A)}for(;r.data!==t;)if(s=r,!(r=r.next))return this;return(c=r.next)&&delete r.next,s?(c?s.next=c:delete s.next,this):e?(c?e[A]=c:delete e[A],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(o?o[T]=r:this._root=r),this):(this._root=c,this)}function Mdt(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this}function Ndt(){return this._root}function $dt(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function Pdt(t){var e=[],r,o=this._root,s,c,f,h,d;for(o&&e.push(new yn(o,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!t(o=r.node,c=r.x0,f=r.y0,h=r.x1,d=r.y1)&&o.length){var g=(c+h)/2,v=(f+d)/2;(s=o[3])&&e.push(new yn(s,g,v,h,d)),(s=o[2])&&e.push(new yn(s,c,v,g,d)),(s=o[1])&&e.push(new yn(s,g,f,h,v)),(s=o[0])&&e.push(new yn(s,c,f,g,v))}return this}function Odt(t){var e=[],r=[],o;for(this._root&&e.push(new yn(this._root,this._x0,this._y0,this._x1,this._y1));o=e.pop();){var s=o.node;if(s.length){var c,f=o.x0,h=o.y0,d=o.x1,g=o.y1,v=(f+d)/2,y=(h+g)/2;(c=s[0])&&e.push(new yn(c,f,h,v,y)),(c=s[1])&&e.push(new yn(c,v,h,d,y)),(c=s[2])&&e.push(new yn(c,f,y,v,g)),(c=s[3])&&e.push(new yn(c,v,y,d,g))}r.push(o)}for(;o=r.pop();)t(o.node,o.x0,o.y0,o.x1,o.y1);return this}function Rdt(t){return t[0]}function Ddt(t){return arguments.length?(this._x=t,this):this._x}function zdt(t){return t[1]}function Idt(t){return arguments.length?(this._y=t,this):this._y}function _d(t,e,r){var o=new Sd(e??Rdt,r??zdt,NaN,NaN,NaN,NaN);return t==null?o:o.addAll(t)}function Sd(t,e,r,o,s,c){this._x=t,this._y=e,this._x0=r,this._y0=o,this._x1=s,this._y1=c,this._root=void 0}function Rm(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var xn=_d.prototype=Sd.prototype;xn.copy=function(){var t=new Sd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,o;if(!e)return t;if(!e.length)return t._root=Rm(e),t;for(r=[{source:e,target:t._root=new Array(4)}];e=r.pop();)for(var s=0;s<4;++s)(o=e.source[s])&&(o.length?r.push({source:o,target:e.target[s]=new Array(4)}):e.target[s]=Rm(o));return t};xn.add=Sdt;xn.addAll=kdt;xn.cover=Cdt;xn.data=Tdt;xn.extent=Edt;xn.find=Ldt;xn.remove=Adt;xn.removeAll=Mdt;xn.root=Ndt;xn.size=$dt;xn.visit=Pdt;xn.visitAfter=Odt;xn.x=Ddt;xn.y=Idt;function wn(t){return function(){return t}}function Li(t){return(t()-.5)*1e-6}function Fdt(t){return t.x+t.vx}function Hdt(t){return t.y+t.vy}function qdt(t){var e,r,o,s=1,c=1;typeof t!="function"&&(t=wn(t==null?1:+t));function f(){for(var g,v=e.length,y,w,_,L,M,A,T=0;T<c;++T)for(y=_d(e,Fdt,Hdt).visitAfter(h),g=0;g<v;++g)w=e[g],M=r[w.index],A=M*M,_=w.x+w.vx,L=w.y+w.vy,y.visit(E);function E(P,$,F,H,st){var Y=P.data,ht=P.r,Z=M+ht;if(Y){if(Y.index>w.index){var ut=_-Y.x-Y.vx,lt=L-Y.y-Y.vy,G=ut*ut+lt*lt;G<Z*Z&&(ut===0&&(ut=Li(o),G+=ut*ut),lt===0&&(lt=Li(o),G+=lt*lt),G=(Z-(G=Math.sqrt(G)))/G*s,w.vx+=(ut*=G)*(Z=(ht*=ht)/(A+ht)),w.vy+=(lt*=G)*Z,Y.vx-=ut*(Z=1-Z),Y.vy-=lt*Z)}return}return $>_+Z||H<_-Z||F>L+Z||st<L-Z}}function h(g){if(g.data)return g.r=r[g.data.index];for(var v=g.r=0;v<4;++v)g[v]&&g[v].r>g.r&&(g.r=g[v].r)}function d(){if(e){var g,v=e.length,y;for(r=new Array(v),g=0;g<v;++g)y=e[g],r[y.index]=+t(y,g,e)}}return f.initialize=function(g,v){e=g,o=v,d()},f.iterations=function(g){return arguments.length?(c=+g,f):c},f.strength=function(g){return arguments.length?(s=+g,f):s},f.radius=function(g){return arguments.length?(t=typeof g=="function"?g:wn(+g),d(),f):t},f}function Bdt(t){return t.index}function Dm(t,e){var r=t.get(e);if(!r)throw new Error("node not found: "+e);return r}function Wdt(t){var e=Bdt,r=y,o,s=wn(30),c,f,h,d,g,v=1;t==null&&(t=[]);function y(A){return 1/Math.min(h[A.source.index],h[A.target.index])}function w(A){for(var T=0,E=t.length;T<v;++T)for(var P=0,$,F,H,st,Y,ht,Z;P<E;++P)$=t[P],F=$.source,H=$.target,st=H.x+H.vx-F.x-F.vx||Li(g),Y=H.y+H.vy-F.y-F.vy||Li(g),ht=Math.sqrt(st*st+Y*Y),ht=(ht-c[P])/ht*A*o[P],st*=ht,Y*=ht,H.vx-=st*(Z=d[P]),H.vy-=Y*Z,F.vx+=st*(Z=1-Z),F.vy+=Y*Z}function _(){if(f){var A,T=f.length,E=t.length,P=new Map(f.map((F,H)=>[e(F,H,f),F])),$;for(A=0,h=new Array(T);A<E;++A)$=t[A],$.index=A,typeof $.source!="object"&&($.source=Dm(P,$.source)),typeof $.target!="object"&&($.target=Dm(P,$.target)),h[$.source.index]=(h[$.source.index]||0)+1,h[$.target.index]=(h[$.target.index]||0)+1;for(A=0,d=new Array(E);A<E;++A)$=t[A],d[A]=h[$.source.index]/(h[$.source.index]+h[$.target.index]);o=new Array(E),L(),c=new Array(E),M()}}function L(){if(f)for(var A=0,T=t.length;A<T;++A)o[A]=+r(t[A],A,t)}function M(){if(f)for(var A=0,T=t.length;A<T;++A)c[A]=+s(t[A],A,t)}return w.initialize=function(A,T){f=A,g=T,_()},w.links=function(A){return arguments.length?(t=A,_(),w):t},w.id=function(A){return arguments.length?(e=A,w):e},w.iterations=function(A){return arguments.length?(v=+A,w):v},w.strength=function(A){return arguments.length?(r=typeof A=="function"?A:wn(+A),L(),w):r},w.distance=function(A){return arguments.length?(s=typeof A=="function"?A:wn(+A),M(),w):s},w}const Udt=1664525,jdt=1013904223,zm=4294967296;function Vdt(){let t=1;return()=>(t=(Udt*t+jdt)%zm)/zm}function Gdt(t){return t.x}function Kdt(t){return t.y}var Xdt=10,Ydt=Math.PI*(3-Math.sqrt(5));function Zdt(t){var e,r=1,o=.001,s=1-Math.pow(o,1/300),c=0,f=.6,h=new Map,d=yd(y),g=na("tick","end"),v=Vdt();t==null&&(t=[]);function y(){w(),g.call("tick",e),r<o&&(d.stop(),g.call("end",e))}function w(M){var A,T=t.length,E;M===void 0&&(M=1);for(var P=0;P<M;++P)for(r+=(c-r)*s,h.forEach(function($){$(r)}),A=0;A<T;++A)E=t[A],E.fx==null?E.x+=E.vx*=f:(E.x=E.fx,E.vx=0),E.fy==null?E.y+=E.vy*=f:(E.y=E.fy,E.vy=0);return e}function _(){for(var M=0,A=t.length,T;M<A;++M){if(T=t[M],T.index=M,T.fx!=null&&(T.x=T.fx),T.fy!=null&&(T.y=T.fy),isNaN(T.x)||isNaN(T.y)){var E=Xdt*Math.sqrt(.5+M),P=M*Ydt;T.x=E*Math.cos(P),T.y=E*Math.sin(P)}(isNaN(T.vx)||isNaN(T.vy))&&(T.vx=T.vy=0)}}function L(M){return M.initialize&&M.initialize(t,v),M}return _(),e={tick:w,restart:function(){return d.restart(y),e},stop:function(){return d.stop(),e},nodes:function(M){return arguments.length?(t=M,_(),h.forEach(L),e):t},alpha:function(M){return arguments.length?(r=+M,e):r},alphaMin:function(M){return arguments.length?(o=+M,e):o},alphaDecay:function(M){return arguments.length?(s=+M,e):+s},alphaTarget:function(M){return arguments.length?(c=+M,e):c},velocityDecay:function(M){return arguments.length?(f=1-M,e):1-f},randomSource:function(M){return arguments.length?(v=M,h.forEach(L),e):v},force:function(M,A){return arguments.length>1?(A==null?h.delete(M):h.set(M,L(A)),e):h.get(M)},find:function(M,A,T){var E=0,P=t.length,$,F,H,st,Y;for(T==null?T=1/0:T*=T,E=0;E<P;++E)st=t[E],$=M-st.x,F=A-st.y,H=$*$+F*F,H<T&&(Y=st,T=H);return Y},on:function(M,A){return arguments.length>1?(g.on(M,A),e):g.on(M)}}}function Jdt(){var t,e,r,o,s=wn(-30),c,f=1,h=1/0,d=.81;function g(_){var L,M=t.length,A=_d(t,Gdt,Kdt).visitAfter(y);for(o=_,L=0;L<M;++L)e=t[L],A.visit(w)}function v(){if(t){var _,L=t.length,M;for(c=new Array(L),_=0;_<L;++_)M=t[_],c[M.index]=+s(M,_,t)}}function y(_){var L=0,M,A,T=0,E,P,$;if(_.length){for(E=P=$=0;$<4;++$)(M=_[$])&&(A=Math.abs(M.value))&&(L+=M.value,T+=A,E+=A*M.x,P+=A*M.y);_.x=E/T,_.y=P/T}else{M=_,M.x=M.data.x,M.y=M.data.y;do L+=c[M.data.index];while(M=M.next)}_.value=L}function w(_,L,M,A){if(!_.value)return!0;var T=_.x-e.x,E=_.y-e.y,P=A-L,$=T*T+E*E;if(P*P/d<$)return $<h&&(T===0&&(T=Li(r),$+=T*T),E===0&&(E=Li(r),$+=E*E),$<f&&($=Math.sqrt(f*$)),e.vx+=T*_.value*o/$,e.vy+=E*_.value*o/$),!0;if(_.length||$>=h)return;(_.data!==e||_.next)&&(T===0&&(T=Li(r),$+=T*T),E===0&&(E=Li(r),$+=E*E),$<f&&($=Math.sqrt(f*$)));do _.data!==e&&(P=c[_.data.index]*o/$,e.vx+=T*P,e.vy+=E*P);while(_=_.next)}return g.initialize=function(_,L){t=_,r=L,v()},g.strength=function(_){return arguments.length?(s=typeof _=="function"?_:wn(+_),v(),g):s},g.distanceMin=function(_){return arguments.length?(f=_*_,g):Math.sqrt(f)},g.distanceMax=function(_){return arguments.length?(h=_*_,g):Math.sqrt(h)},g.theta=function(_){return arguments.length?(d=_*_,g):Math.sqrt(d)},g}function Qdt(t){var e=wn(.1),r,o,s;typeof t!="function"&&(t=wn(t==null?0:+t));function c(h){for(var d=0,g=r.length,v;d<g;++d)v=r[d],v.vx+=(s[d]-v.x)*o[d]*h}function f(){if(r){var h,d=r.length;for(o=new Array(d),s=new Array(d),h=0;h<d;++h)o[h]=isNaN(s[h]=+t(r[h],h,r))?0:+e(r[h],h,r)}}return c.initialize=function(h){r=h,f()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:wn(+h),f(),c):e},c.x=function(h){return arguments.length?(t=typeof h=="function"?h:wn(+h),f(),c):t},c}function tpt(t){var e=wn(.1),r,o,s;typeof t!="function"&&(t=wn(t==null?0:+t));function c(h){for(var d=0,g=r.length,v;d<g;++d)v=r[d],v.vy+=(s[d]-v.y)*o[d]*h}function f(){if(r){var h,d=r.length;for(o=new Array(d),s=new Array(d),h=0;h<d;++h)o[h]=isNaN(s[h]=+t(r[h],h,r))?0:+e(r[h],h,r)}}return c.initialize=function(h){r=h,f()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:wn(+h),f(),c):e},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:wn(+h),f(),c):t},c}var ept=Object.defineProperty,npt=(t,e,r)=>e in t?ept(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$e=(t,e,r)=>(npt(t,typeof e!="symbol"?e+"":e,r),r);function rpt(){return{drag:{end:0,start:.1},filter:{link:1,type:.1,unlinked:{include:.1,exclude:.1}},focus:{acquire:()=>.1,release:()=>.1},initialize:1,labels:{links:{hide:0,show:0},nodes:{hide:0,show:0}},resize:.5}}function Im(t){if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1}function Ai(...t){return t.reduce((e,r)=>{if(Array.isArray(r))throw new TypeError("Arguments provided to deepmerge must be objects, not arrays.");return Object.keys(r).forEach(o=>{["__proto__","constructor","prototype"].includes(o)||(Array.isArray(e[o])&&Array.isArray(r[o])?e[o]=Ai.options.mergeArrays?Array.from(new Set(e[o].concat(r[o]))):r[o]:Im(e[o])&&Im(r[o])?e[o]=Ai(e[o],r[o]):e[o]=r[o])}),e},{})}const bw={mergeArrays:!0};Ai.options=bw;Ai.withOptions=(t,...e)=>{Ai.options={mergeArrays:!0,...t};const r=Ai(...e);return Ai.options=bw,r};function ipt(){return{centering:{enabled:!0,strength:.1},charge:{enabled:!0,strength:-1},collision:{enabled:!0,strength:1,radiusMultiplier:2},link:{enabled:!0,strength:1,length:128}}}function opt(){return{includeUnlinked:!0,linkFilter:()=>!0,nodeTypeFilter:void 0,showLinkLabels:!0,showNodeLabels:!0}}function ww(t){t.preventDefault(),t.stopPropagation()}function xw(t){return typeof t=="number"}function Fi(t,e){return xw(t.nodeRadius)?t.nodeRadius:t.nodeRadius(e)}function spt(t){return`${t.source.id}-${t.target.id}`}function _w(t){return`link-arrow-${t}`.replace(/[()]/g,"~")}function lpt(t){return`url(#${_w(t.color)})`}function apt(t){return{size:t,padding:(e,r)=>Fi(r,e)+2*t,ref:[t/2,t/2],path:[[0,0],[0,t],[t,t/2]],viewBox:[0,0,t,t].join(",")}}const Sw={Arrow:t=>apt(t)},cpt=(t,e,r)=>[e/2,r/2],kw=(t,e,r)=>[Fm(0,e),Fm(0,r)];function Fm(t,e){return Math.random()*(e-t)+t}function upt(t){const e=Object.fromEntries(t.nodes.map(r=>[r.id,[r.x,r.y]]));return(r,o,s)=>{const[c,f]=e[r.id]??[];return!c||!f?kw(r,o,s):[c,f]}}const kh={Centered:cpt,Randomized:kw,Stable:upt};function fpt(){return{autoResize:!1,callbacks:{},hooks:{},initial:opt(),nodeRadius:16,marker:Sw.Arrow(4),modifiers:{},positionInitializer:kh.Centered,simulation:{alphas:rpt(),forces:ipt()},zoom:{initial:1,min:.1,max:2}}}function hpt(t={}){return Ai.withOptions({mergeArrays:!1},fpt(),t)}function dpt({applyZoom:t,container:e,onDoubleClick:r,onPointerMoved:o,onPointerUp:s,offset:[c,f],scale:h,zoom:d}){const g=e.classed("graph",!0).append("svg").attr("height","100%").attr("width","100%").call(d).on("contextmenu",v=>ww(v)).on("dblclick",v=>r==null?void 0:r(v)).on("dblclick.zoom",null).on("pointermove",v=>o==null?void 0:o(v)).on("pointerup",v=>s==null?void 0:s(v)).style("cursor","grab");return t&&g.call(d.transform,xd.translate(c,f).scale(h)),g.append("g")}function ppt({canvas:t,scale:e,xOffset:r,yOffset:o}){t==null||t.attr("transform",`translate(${r},${o})scale(${e})`)}function gpt({config:t,onDragStart:e,onDragEnd:r}){var o,s;const c=$ft().filter(f=>f.type==="mousedown"?f.button===0:f.type==="touchstart"?f.touches.length===1:!1).on("start",(f,h)=>{f.active===0&&e(f,h),Ln(f.sourceEvent.target).classed("grabbed",!0),h.fx=h.x,h.fy=h.y}).on("drag",(f,h)=>{h.fx=f.x,h.fy=f.y}).on("end",(f,h)=>{f.active===0&&r(f,h),Ln(f.sourceEvent.target).classed("grabbed",!1),h.fx=void 0,h.fy=void 0});return(s=(o=t.modifiers).drag)==null||s.call(o,c),c}function vpt({graph:t,filter:e,focusedNode:r,includeUnlinked:o,linkFilter:s}){const c=t.links.filter(d=>e.includes(d.source.type)&&e.includes(d.target.type)&&s(d)),f=d=>c.find(g=>g.source.id===d.id||g.target.id===d.id)!==void 0,h=t.nodes.filter(d=>e.includes(d.type)&&(o||f(d)));return r===void 0||!e.includes(r.type)?{nodes:h,links:c}:mpt({nodes:h,links:c},r)}function mpt(t,e){const r=[...ypt(t,e),...bpt(t,e)],o=r.flatMap(s=>[s.source,s.target]);return{nodes:[...new Set([...o,e])],links:[...new Set(r)]}}function ypt(t,e){return Cw(t,e,(r,o)=>r.target.id===o.id)}function bpt(t,e){return Cw(t,e,(r,o)=>r.source.id===o.id)}function Cw(t,e,r){const o=new Set(t.links),s=new Set([e]),c=[];for(;o.size>0;){const f=[...o].filter(h=>[...s].some(d=>r(h,d)));if(f.length===0)return c;f.forEach(h=>{s.add(h.source),s.add(h.target),c.push(h),o.delete(h)})}return c}function Ch(t){return t.x??0}function Th(t){return t.y??0}function kd({source:t,target:e}){const r=new mn(Ch(t),Th(t)),o=new mn(Ch(e),Th(e)),s=o.subtract(r),c=s.length(),f=s.normalize(),h=f.multiply(-1);return{s:r,t:o,dist:c,norm:f,endNorm:h}}function Tw({center:t,node:e}){const r=new mn(Ch(e),Th(e));let o=t;return r.x===o.x&&r.y===o.y&&(o=o.add(new mn(0,1))),{n:r,c:o}}function Ew({config:t,source:e,target:r}){const{s:o,t:s,norm:c}=kd({config:t,source:e,target:r}),f=o.add(c.multiply(Fi(t,e)-1)),h=s.subtract(c.multiply(t.marker.padding(r,t)));return{start:f,end:h}}function wpt(t){const{start:e,end:r}=Ew(t);return`M${e.x},${e.y}
|
|
49
49
|
L${r.x},${r.y}`}function xpt(t){const{start:e,end:r}=Ew(t),o=r.subtract(e).multiply(.5),s=e.add(o);return`translate(${s.x-8},${s.y-4})`}function _pt({config:t,source:e,target:r}){const{s:o,t:s,dist:c,norm:f,endNorm:h}=kd({config:t,source:e,target:r}),d=10,g=f.rotateByDegrees(-d).multiply(Fi(t,e)-1).add(o),v=h.rotateByDegrees(d).multiply(Fi(t,r)).add(s).add(h.rotateByDegrees(d).multiply(2*t.marker.size)),y=1.2*c;return`M${g.x},${g.y}
|
|
50
50
|
A${y},${y},0,0,1,${v.x},${v.y}`}function Spt({center:t,config:e,node:r}){const{n:o,c:s}=Tw({center:t,config:e,node:r}),c=Fi(e,r),f=o.subtract(s),h=f.multiply(1/f.length()),d=40,g=h.rotateByDegrees(d).multiply(c-1).add(o),v=h.rotateByDegrees(-d).multiply(c).add(o).add(h.rotateByDegrees(-d).multiply(2*e.marker.size));return`M${g.x},${g.y}
|
|
51
|
-
A${c},${c},0,1,0,${v.x},${v.y}`}function kpt({config:t,source:e,target:r}){const{t:o,dist:s,endNorm:c}=kd({config:t,source:e,target:r}),f=c.rotateByDegrees(10).multiply(.5*s).add(o);return`translate(${f.x},${f.y})`}function Cpt({center:t,config:e,node:r}){const{n:o,c:s}=Tw({center:t,config:e,node:r}),c=o.subtract(s),f=c.multiply(1/c.length()).multiply(3*Fi(e,r)+8).add(o);return`translate(${f.x},${f.y})`}const fs={line:{labelTransform:xpt,path:wpt},arc:{labelTransform:kpt,path:_pt},reflexive:{labelTransform:Cpt,path:Spt}};function Tpt(t){return t.append("g").classed("links",!0).selectAll("path")}function Ept({config:t,graph:e,selection:r,showLabels:o}){const s=r==null?void 0:r.data(e.links,c=>spt(c)).join(c=>{var f,h,d,g;const v=c.append("g"),y=v.append("path").classed("link",!0).style("marker-end",_=>lpt(_)).style("stroke",_=>_.color);(h=(f=t.modifiers).link)==null||h.call(f,y);const w=v.append("text").classed("link__label",!0).style("fill",_=>_.label?_.label.color:null).style("font-size",_=>_.label?_.label.fontSize:null).text(_=>_.label?_.label.text:null);return(g=(d=t.modifiers).linkLabel)==null||g.call(d,w),v});return s==null||s.select(".link__label").attr("opacity",c=>c.label&&o?1:0),s}function Lpt(t){Apt(t),Mpt(t)}function Apt({center:t,config:e,graph:r,selection:o}){o==null||o.selectAll("path").attr("d",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"":s.source.id===s.target.id?fs.reflexive.path({config:e,node:s.source,center:t}):Lw(r,s.source,s.target)?fs.arc.path({config:e,source:s.source,target:s.target}):fs.line.path({config:e,source:s.source,target:s.target}))}function Mpt({config:t,center:e,graph:r,selection:o}){o==null||o.select(".link__label").attr("transform",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"translate(0, 0)":s.source.id===s.target.id?fs.reflexive.labelTransform({config:t,node:s.source,center:e}):Lw(r,s.source,s.target)?fs.arc.labelTransform({config:t,source:s.source,target:s.target}):fs.line.labelTransform({config:t,source:s.source,target:s.target}))}function Lw(t,e,r){return e.id!==r.id&&t.links.some(o=>o.target.id===e.id&&o.source.id===r.id)&&t.links.some(o=>o.target.id===r.id&&o.source.id===e.id)}function Npt(t){return t.append("defs").selectAll("marker")}function $pt({config:t,graph:e,selection:r}){return r==null?void 0:r.data(Ppt(e),o=>o).join(o=>{const s=o.append("marker").attr("id",c=>_w(c)).attr("markerHeight",4*t.marker.size).attr("markerWidth",4*t.marker.size).attr("markerUnits","userSpaceOnUse").attr("orient","auto").attr("refX",t.marker.ref[0]).attr("refY",t.marker.ref[1]).attr("viewBox",t.marker.viewBox).style("fill",c=>c);return s.append("path").attr("d",Opt(t.marker.path)),s})}function Ppt(t){return[...new Set(t.links.map(e=>e.color))]}function Opt(t){const[e,...r]=t;if(!e)return"M0,0";const[o,s]=e;return r.reduce((c,[f,h])=>`${c}L${f},${h}`,`M${o},${s}`)}function Rpt(t){return t.append("g").classed("nodes",!0).selectAll("circle")}function Dpt({config:t,drag:e,graph:r,onNodeContext:o,onNodeSelected:s,selection:c,showLabels:f}){const h=c==null?void 0:c.data(r.nodes,d=>d.id).join(d=>{var g,v,y,w;const _=d.append("g");e!==void 0&&_.call(e);const L=_.append("circle").classed("node",!0).attr("r",A=>Fi(t,A)).on("contextmenu",(A,T)=>{ww(A),o(T)}).on("pointerdown",(A,T)=>Ipt(A,T,s??o)).style("fill",A=>A.color);(v=(g=t.modifiers).node)==null||v.call(g,L);const M=_.append("text").classed("node__label",!0).attr("dy","0.33em").style("fill",A=>A.label?A.label.color:null).style("font-size",A=>A.label?A.label.fontSize:null).style("stroke","none").text(A=>A.label?A.label.text:null);return(w=(y=t.modifiers).nodeLabel)==null||w.call(y,M),_});return h==null||h.select(".node").classed("focused",d=>d.isFocused),h==null||h.select(".node__label").attr("opacity",f?1:0),h}const zpt=500;function Ipt(t,e,r){if(t.button!==void 0&&t.button!==0)return;const o=e.lastInteractionTimestamp,s=Date.now();if(o===void 0||s-o>zpt){e.lastInteractionTimestamp=s;return}e.lastInteractionTimestamp=void 0,r(e)}function Fpt(t){t==null||t.attr("transform",e=>`translate(${e.x??0},${e.y??0})`)}function Hpt({center:t,config:e,graph:r,onTick:o}){var s,c;const f=Zdt(r.nodes),h=e.simulation.forces.centering;if(h&&h.enabled){const y=h.strength;f.force("x",Qdt(()=>t().x).strength(y)).force("y",tpt(()=>t().y).strength(y))}const d=e.simulation.forces.charge;d&&d.enabled&&f.force("charge",Jdt().strength(d.strength));const g=e.simulation.forces.collision;g&&g.enabled&&f.force("collision",qdt().radius(y=>g.radiusMultiplier*Fi(e,y)));const v=e.simulation.forces.link;return v&&v.enabled&&f.force("link",Wdt(r.links).id(y=>y.id).distance(e.simulation.forces.link.length).strength(v.strength)),f.on("tick",()=>o()),(c=(s=e.modifiers).simulation)==null||c.call(s,f),f}function qpt({canvasContainer:t,config:e,min:r,max:o,onZoom:s}){var c,f;const h=_dt().scaleExtent([r,o]).filter(d=>{var g;return d.button===0||((g=d.touches)==null?void 0:g.length)>=2}).on("start",()=>t().classed("grabbed",!0)).on("zoom",d=>s(d)).on("end",()=>t().classed("grabbed",!1));return(f=(c=e.modifiers).zoom)==null||f.call(c,h),h}class Bpt{constructor(e,r,o){if($e(this,"nodeTypes"),$e(this,"_nodeTypeFilter"),$e(this,"_includeUnlinked",!0),$e(this,"_linkFilter",()=>!0),$e(this,"_showLinkLabels",!0),$e(this,"_showNodeLabels",!0),$e(this,"filteredGraph"),$e(this,"width",0),$e(this,"height",0),$e(this,"simulation"),$e(this,"canvas"),$e(this,"linkSelection"),$e(this,"nodeSelection"),$e(this,"markerSelection"),$e(this,"zoom"),$e(this,"drag"),$e(this,"xOffset",0),$e(this,"yOffset",0),$e(this,"scale"),$e(this,"focusedNode"),$e(this,"resizeObserver"),this.container=e,this.graph=r,this.config=o,this.scale=o.zoom.initial,this.resetView(),this.graph.nodes.forEach(s=>{const[c,f]=o.positionInitializer(s,this.effectiveWidth,this.effectiveHeight);s.x=s.x??c,s.y=s.y??f}),this.nodeTypes=[...new Set(r.nodes.map(s=>s.type))],this._nodeTypeFilter=[...this.nodeTypes],o.initial){const{includeUnlinked:s,nodeTypeFilter:c,linkFilter:f,showLinkLabels:h,showNodeLabels:d}=o.initial;this._includeUnlinked=s??this._includeUnlinked,this._showLinkLabels=h??this._showLinkLabels,this._showNodeLabels=d??this._showNodeLabels,this._nodeTypeFilter=c??this._nodeTypeFilter,this._linkFilter=f??this._linkFilter}this.filterGraph(void 0),this.initGraph(),this.restart(o.simulation.alphas.initialize),o.autoResize&&(this.resizeObserver=new ResizeObserver(Uct(()=>this.resize())),this.resizeObserver.observe(this.container))}get nodeTypeFilter(){return this._nodeTypeFilter}get includeUnlinked(){return this._includeUnlinked}set includeUnlinked(e){this._includeUnlinked=e,this.filterGraph(this.focusedNode);const{include:r,exclude:o}=this.config.simulation.alphas.filter.unlinked,s=e?r:o;this.restart(s)}set linkFilter(e){this._linkFilter=e,this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.link)}get linkFilter(){return this._linkFilter}get showNodeLabels(){return this._showNodeLabels}set showNodeLabels(e){this._showNodeLabels=e;const{hide:r,show:o}=this.config.simulation.alphas.labels.nodes,s=e?o:r;this.restart(s)}get showLinkLabels(){return this._showLinkLabels}set showLinkLabels(e){this._showLinkLabels=e;const{hide:r,show:o}=this.config.simulation.alphas.labels.links,s=e?o:r;this.restart(s)}get effectiveWidth(){return this.width/this.scale}get effectiveHeight(){return this.height/this.scale}get effectiveCenter(){return vn.of([this.width,this.height]).divide(2).subtract(vn.of([this.xOffset,this.yOffset])).divide(this.scale)}resize(){const e=this.width,r=this.height,o=this.container.getBoundingClientRect().width,s=this.container.getBoundingClientRect().height,c=e.toFixed()!==o.toFixed(),f=r.toFixed()!==s.toFixed();if(!c&&!f)return;this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height;const h=this.config.simulation.alphas.resize;this.restart(xw(h)?h:h({oldWidth:e,oldHeight:r,newWidth:o,newHeight:s}))}restart(e){var r;this.markerSelection=$pt({config:this.config,graph:this.filteredGraph,selection:this.markerSelection}),this.linkSelection=Ept({config:this.config,graph:this.filteredGraph,selection:this.linkSelection,showLabels:this._showLinkLabels}),this.nodeSelection=Dpt({config:this.config,drag:this.drag,graph:this.filteredGraph,onNodeContext:o=>this.toggleNodeFocus(o),onNodeSelected:this.config.callbacks.nodeClicked,selection:this.nodeSelection,showLabels:this._showNodeLabels}),(r=this.simulation)==null||r.stop(),this.simulation=Hpt({center:()=>this.effectiveCenter,config:this.config,graph:this.filteredGraph,onTick:()=>this.onTick()}).alpha(e).restart()}filterNodesByType(e,r){e?this._nodeTypeFilter.push(r):this._nodeTypeFilter=this._nodeTypeFilter.filter(o=>o!==r),this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.type)}shutdown(){var e,r;this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),(e=this.resizeObserver)==null||e.unobserve(this.container),(r=this.simulation)==null||r.stop()}initGraph(){this.zoom=qpt({config:this.config,canvasContainer:()=>Ln(this.container).select("svg"),min:this.config.zoom.min,max:this.config.zoom.max,onZoom:e=>this.onZoom(e)}),this.canvas=dpt({applyZoom:this.scale!==1,container:Ln(this.container),offset:[this.xOffset,this.yOffset],scale:this.scale,zoom:this.zoom}),this.applyZoom(),this.linkSelection=Tpt(this.canvas),this.nodeSelection=Rpt(this.canvas),this.markerSelection=Npt(this.canvas),this.drag=gpt({config:this.config,onDragStart:()=>{var e;return(e=this.simulation)==null?void 0:e.alphaTarget(this.config.simulation.alphas.drag.start).restart()},onDragEnd:()=>{var e;return(e=this.simulation)==null?void 0:e.alphaTarget(this.config.simulation.alphas.drag.end).restart()}})}onTick(){Fpt(this.nodeSelection),Lpt({config:this.config,center:this.effectiveCenter,graph:this.filteredGraph,selection:this.linkSelection})}resetView(){var e;(e=this.simulation)==null||e.stop(),Ln(this.container).selectChildren().remove(),this.zoom=void 0,this.canvas=void 0,this.linkSelection=void 0,this.nodeSelection=void 0,this.markerSelection=void 0,this.simulation=void 0,this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height}onZoom(e){var r,o,s;this.xOffset=e.transform.x,this.yOffset=e.transform.y,this.scale=e.transform.k,this.applyZoom(),(o=(r=this.config.hooks).afterZoom)==null||o.call(r,this.scale,this.xOffset,this.yOffset),(s=this.simulation)==null||s.restart()}applyZoom(){ppt({canvas:this.canvas,scale:this.scale,xOffset:this.xOffset,yOffset:this.yOffset})}toggleNodeFocus(e){e.isFocused?(this.filterGraph(void 0),this.restart(this.config.simulation.alphas.focus.release(e))):this.focusNode(e)}focusNode(e){this.filterGraph(e),this.restart(this.config.simulation.alphas.focus.acquire(e))}filterGraph(e){this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),e!==void 0&&this._nodeTypeFilter.includes(e.type)&&(e.isFocused=!0,this.focusedNode=e),this.filteredGraph=vpt({graph:this.graph,filter:this._nodeTypeFilter,focusedNode:this.focusedNode,includeUnlinked:this._includeUnlinked,linkFilter:this._linkFilter})}}function Hm({nodes:t,links:e}){return{nodes:t??[],links:e??[]}}function Wpt(t){return{...t}}function Aw(t){return{...t,isFocused:!1,lastInteractionTimestamp:void 0}}const Upt={"h-full":"","min-h-75":"","flex-1":"",overflow:"hidden"},jpt={flex:"","items-center":"","gap-4":"","px-3":"","py-2":""},Vpt=["id","checked","onChange"],Gpt=["for"],Kpt=Q("div",{"flex-auto":""},null,-1),Xpt=he({__name:"ViewModuleGraph",props:{graph:{}},setup(t){const e=t,{graph:r}=b_(e),o=Qt(),s=Qt(!1),c=Qt(),f=Qt();Uh(()=>{s.value===!1&&setTimeout(()=>c.value=void 0,300)},{flush:"post"}),xs(()=>{g()}),jh(()=>{var y;(y=f.value)==null||y.shutdown()}),Ge(r,g);function h(y,w){var _;(_=f.value)==null||_.filterNodesByType(w,y)}function d(y){c.value=y,s.value=!0}function g(){var y;(y=f.value)==null||y.shutdown(),!(!r.value||!o.value)&&(f.value=new Bpt(o.value,r.value,hpt({nodeRadius:10,autoResize:!0,simulation:{alphas:{initialize:1,resize:({newHeight:w,newWidth:_})=>w===0&&_===0?0:.25},forces:{collision:{radiusMultiplier:10},link:{length:240}}},marker:Sw.Arrow(2),modifiers:{node:v},positionInitializer:r.value.nodes.length>1?kh.Randomized:kh.Centered,zoom:{min:.5,max:2}})))}function v(y){if(Yr)return;const w=A=>A.button===0;let _=0,L=0,M=0;y.on("pointerdown",(A,T)=>{T.type!=="external"&&(!T.x||!T.y||!w(A)||(_=T.x,L=T.y,M=Date.now()))}).on("pointerup",(A,T)=>{if(T.type==="external"||!T.x||!T.y||!w(A)||Date.now()-M>500)return;const E=T.x-_,P=T.y-L;E**2+P**2<100&&d(T.id)})}return(y,w)=>{var T;const _=_s,L=Wct,M=$ct,A=Wi("tooltip");return et(),yt("div",Upt,[Q("div",null,[Q("div",jpt,[(et(!0),yt(re,null,Rn((T=B(f))==null?void 0:T.nodeTypes.sort(),E=>{var P;return et(),yt("div",{key:E,flex:"~ gap-1","items-center":"","select-none":""},[Q("input",{id:`type-${E}`,type:"checkbox",checked:(P=B(f))==null?void 0:P.nodeTypeFilter.includes(E),onChange:$=>h(E,$.target.checked)},null,40,Vpt),Q("label",{"font-light":"","text-sm":"","ws-nowrap":"","overflow-hidden":"",capitalize:"",truncate:"",for:`type-${E}`,"border-b-2":"",style:ln({"border-color":`var(--color-node-${E})`})},jt(E)+" Modules",13,Gpt)])}),128)),Kpt,Q("div",null,[Se(It(_,{icon:"i-carbon-reset",onClick:g},null,512),[[A,"Reset",void 0,{bottom:!0}]])])])]),Q("div",{ref_key:"el",ref:o},null,512),It(M,{modelValue:B(s),"onUpdate:modelValue":w[1]||(w[1]=E=>Ae(s)?s.value=E:null),direction:"right"},{default:ie(()=>[B(c)?(et(),Yt(D_,{key:0},{default:ie(()=>[It(L,{id:B(c),onClose:w[0]||(w[0]=E=>s.value=!1)},null,8,["id"])]),_:1})):Kt("",!0)]),_:1},8,["modelValue"])])}}}),Ypt={key:0,"text-green-500":"","flex-shrink-0":"","i-carbon:checkmark":""},Zpt={key:1,"text-red-500":"","flex-shrink-0":"","i-carbon:compare":""},Jpt={key:2,"text-red-500":"","flex-shrink-0":"","i-carbon:close":""},Qpt={key:3,"text-gray-500":"","flex-shrink-0":"","i-carbon:document-blank":""},tgt={key:4,"text-gray-500":"","flex-shrink-0":"","i-carbon:redo":"","rotate-90":""},egt={key:5,"text-yellow-500":"","flex-shrink-0":"","i-carbon:circle-dash":"","animate-spin":""},Mw=he({__name:"StatusIcon",props:{task:{}},setup(t){return(e,r)=>{var s,c,f;const o=Wi("tooltip");return((s=e.task.result)==null?void 0:s.state)==="pass"?(et(),yt("div",Ypt)):B(Ti)(e.task)?Se((et(),yt("div",Zpt,null,512)),[[o,"Contains failed snapshot",void 0,{right:!0}]]):((c=e.task.result)==null?void 0:c.state)==="fail"?(et(),yt("div",Jpt)):e.task.mode==="todo"?Se((et(),yt("div",Qpt,null,512)),[[o,"Todo",void 0,{right:!0}]]):e.task.mode==="skip"||((f=e.task.result)==null?void 0:f.state)==="skip"?Se((et(),yt("div",tgt,null,512)),[[o,"Skipped",void 0,{right:!0}]]):(et(),yt("div",egt))}}});function ngt(t){const e=new Map,r=new Map,o=[];for(;;){let s=0;if(t.forEach((c,f)=>{var v;const{splits:h,finished:d}=c;if(d){s++;const{raw:y,candidate:w}=c;e.set(y,w);return}if(h.length===0){c.finished=!0;return}const g=h[0];r.has(g)?(c.candidate+=c.candidate===""?g:`/${g}`,(v=r.get(g))==null||v.push(f),h.shift()):(r.set(g,[f]),o.push(f))}),o.forEach(c=>{const f=t[c],h=f.splits.shift();f.candidate+=f.candidate===""?h:`/${h}`}),r.forEach(c=>{if(c.length===1){const f=c[0];t[f].finished=!0}}),r.clear(),o.length=0,s===t.length)break}return e}function rgt(t){let e=t;e.includes("/node_modules/")&&(e=t.split(/\/node_modules\//g).pop());const r=e.split(/\//g);return{raw:e,splits:r,candidate:"",finished:!1,id:t}}function igt(t){const e=t.map(o=>rgt(o)),r=ngt(e);return e.map(({raw:o,id:s})=>Aw({color:"var(--color-node-external)",label:{color:"var(--color-node-external)",fontSize:"0.875rem",text:r.get(o)??""},isFocused:!1,id:s,type:"external"}))}function ogt(t,e){return Aw({color:e?"var(--color-node-root)":"var(--color-node-inline)",label:{color:e?"var(--color-node-root)":"var(--color-node-inline)",fontSize:"0.875rem",text:t.split(/\//g).pop()},isFocused:!1,id:t,type:"inline"})}function sgt(t,e){if(!t)return Hm({});const r=igt(t.externalized),o=t.inlined.map(h=>ogt(h,h===e))??[],s=[...r,...o],c=Object.fromEntries(s.map(h=>[h.id,h])),f=Object.entries(t.graph).flatMap(([h,d])=>d.map(g=>{const v=c[h],y=c[g];if(!(v===void 0||y===void 0))return Wpt({source:v,target:y,color:"var(--color-link)",label:!1})}).filter(g=>g!==void 0));return Hm({nodes:s,links:f})}function lgt(t){return Object.hasOwnProperty.call(t,"tasks")}function Nw(t,e){return typeof t!="string"||typeof e!="string"?!1:t.toLowerCase().includes(e.toLowerCase())}function $w(t){if(!t)return"";const e=t.split("").reduce((o,s,c)=>o+s.charCodeAt(0)+c,0),r=["blue","yellow","cyan","green","magenta"];return r[e%r.length]}const agt={key:0,flex:"","flex-col":"","h-full":"","max-h-full":"","overflow-hidden":"","data-testid":"file-detail"},cgt={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},ugt={"flex-1":"","font-light":"","op-50":"","ws-nowrap":"",truncate:"","text-sm":""},fgt={class:"flex text-lg"},hgt={flex:"~","items-center":"","bg-header":"",border:"b-2 base","text-sm":"","h-41px":""},dgt={flex:"","flex-col":"","flex-1":"",overflow:"hidden"},pgt=["flex-1"],ggt=he({__name:"FileDetails",setup(t){const e=Qt({externalized:[],graph:{},inlined:[]}),r=Qt({nodes:[],links:[]}),o=Qt(!1),s=Qt(!1);nat(Cn,async(v,y)=>{if(v&&v.filepath!==(y==null?void 0:y.filepath)){const w=v.file.projectName||"";e.value=await Oe.rpc.getModuleGraph(w,v.filepath,!!$c),r.value=sgt(e.value,v.filepath)}},{debounce:100,immediate:!0});function c(){var y;const v=(y=Cn.value)==null?void 0:y.filepath;v&&fetch(`/__open-in-editor?file=${encodeURIComponent(v)}`)}function f(v){v==="graph"&&(s.value=!0),or.value=v}const h=_t(()=>{var v;return((v=zb.value)==null?void 0:v.reduce((y,{size:w})=>y+w,0))??0});function d(v){o.value=v}function g(v){return v?v.startsWith(ql.root)?v.slice(ql.root.length):v:""}return(v,y)=>{var P,$,F,H,st;const w=Mw,_=_s,L=Xpt,M=Nct,A=Sct,T=fct,E=Wi("tooltip");return B(Cn)?(et(),yt("div",agt,[Q("div",null,[Q("div",cgt,[It(w,{task:B(Cn)},null,8,["task"]),(P=B(Cn))!=null&&P.file.projectName?(et(),yt("div",{key:0,"font-light":"","op-50":"","text-sm":"",style:ln({color:B($w)(($=B(Cn))==null?void 0:$.file.projectName)})}," ["+jt(((F=B(Cn))==null?void 0:F.file.projectName)||"")+"] ",5)):Kt("",!0),Q("div",ugt,jt(g((H=B(Cn))==null?void 0:H.filepath)),1),Q("div",fgt,[B(Yr)?Kt("",!0):Se((et(),Yt(_,{key:0,title:"Open in editor",icon:"i-carbon-launch",disabled:!((st=B(Cn))!=null&&st.filepath),onClick:c},null,8,["disabled"])),[[E,"Open in editor",void 0,{bottom:!0}]])])]),Q("div",hgt,[Q("button",{"tab-button":"",class:de({"tab-button-active":B(or)==null}),"data-testid":"btn-report",onClick:y[0]||(y[0]=Y=>f(null))}," Report ",2),Q("button",{"tab-button":"","data-testid":"btn-graph",class:de({"tab-button-active":B(or)==="graph"}),onClick:y[1]||(y[1]=Y=>f("graph"))}," Module Graph ",2),B(Yr)?Kt("",!0):(et(),yt("button",{key:0,"tab-button":"","data-testid":"btn-code",class:de({"tab-button-active":B(or)==="editor"}),onClick:y[2]||(y[2]=Y=>f("editor"))},jt(B(o)?"* ":"")+"Code ",3)),Q("button",{"tab-button":"","data-testid":"btn-console",class:de({"tab-button-active":B(or)==="console",op20:B(or)!=="console"&&B(h)===0}),onClick:y[3]||(y[3]=Y=>f("console"))}," Console ("+jt(B(h))+") ",3)])]),Q("div",dgt,[B(s)?(et(),yt("div",{key:0,"flex-1":B(or)==="graph"&&""},[Se(It(L,{graph:B(r),"data-testid":"graph"},null,8,["graph"]),[[Qo,B(or)==="graph"]])],8,pgt)):Kt("",!0),B(or)==="editor"?(et(),Yt(M,{key:B(Cn).filepath,file:B(Cn),"data-testid":"editor",onDraft:d},null,8,["file"])):B(or)==="console"?(et(),Yt(A,{key:2,file:B(Cn),"data-testid":"console"},null,8,["file"])):B(or)?Kt("",!0):(et(),Yt(T,{key:3,file:B(Cn),"data-testid":"report"},null,8,["file"]))])])):Kt("",!0)}}}),vgt={h:"full",flex:"~ col"},mgt=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon:folder-details-reference"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Coverage")],-1),ygt={"flex-auto":"","py-1":"","bg-white":""},bgt=["src"],wgt=he({__name:"Coverage",props:{src:{}},setup(t){return(e,r)=>(et(),yt("div",vgt,[mgt,Q("div",ygt,[Q("iframe",{id:"vitest-ui-coverage",src:e.src},null,8,bgt)])]))}}),xgt={bg:"red500/10","p-1":"","mb-1":"","mt-2":"",rounded:""},_gt={"font-bold":""},Sgt={key:0,class:"scrolls",text:"xs","font-mono":"","mx-1":"","my-2":"","pb-2":"","overflow-auto":""},kgt=["font-bold"],Cgt={text:"red500/70"},Tgt=Q("br",null,null,-1),Egt={key:1,text:"sm","mb-2":""},Lgt={"font-bold":""},Agt={key:2,text:"sm","mb-2":""},Mgt={"font-bold":""},Ngt=Q("br",null,null,-1),$gt=Q("ul",null,[Q("li",null," The error was thrown, while Vitest was running this test. "),Q("li",null," If the error occurred after the test had been completed, this was the last documented test before it was thrown. ")],-1),Pgt={key:3,text:"sm","font-thin":""},Ogt=Q("br",null,null,-1),Rgt=Q("ul",null,[Q("li",null," Cancel timeouts using clearTimeout and clearInterval. "),Q("li",null," Wait for promises to resolve using the await keyword. ")],-1),Dgt=he({__name:"ErrorEntry",props:{error:{}},setup(t){return(e,r)=>{var o;return et(),yt(re,null,[Q("h4",xgt,[Q("span",_gt,[me(jt(e.error.name||e.error.nameStr||"Unknown Error"),1),e.error.message?(et(),yt(re,{key:0},[me(":")],64)):Kt("",!0)]),me(" "+jt(e.error.message),1)]),(o=e.error.stacks)!=null&&o.length?(et(),yt("p",Sgt,[(et(!0),yt(re,null,Rn(e.error.stacks,(s,c)=>(et(),yt("span",{"whitespace-pre":"","font-bold":c===0?"":null},[me("❯ "+jt(s.method)+" "+jt(s.file)+":",1),Q("span",Cgt,jt(s.line)+":"+jt(s.column),1),Tgt],8,kgt))),256))])):Kt("",!0),e.error.VITEST_TEST_PATH?(et(),yt("p",Egt,[me(" This error originated in "),Q("span",Lgt,jt(e.error.VITEST_TEST_PATH),1),me(" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. ")])):Kt("",!0),e.error.VITEST_TEST_NAME?(et(),yt("p",Agt,[me(" The latest test that might've caused the error is "),Q("span",Mgt,jt(e.error.VITEST_TEST_NAME),1),me(". It might mean one of the following:"),Ngt,$gt])):Kt("",!0),e.error.VITEST_AFTER_ENV_TEARDOWN?(et(),yt("p",Pgt,[me(" This error was caught after test environment was torn down. Make sure to cancel any running tasks before test finishes:"),Ogt,Rgt])):Kt("",!0)],64)}}}),xn=t=>(_0("data-v-09d153f7"),t=t(),S0(),t),zgt={"data-testid":"test-files-entry",grid:"~ cols-[min-content_1fr_min-content]","items-center":"",gap:"x-2 y-3",p:"x4",relative:"","font-light":"","w-80":"",op80:""},Igt=xn(()=>Q("div",{"i-carbon-document":""},null,-1)),Fgt=xn(()=>Q("div",null,"Files",-1)),Hgt={class:"number","data-testid":"num-files"},qgt=xn(()=>Q("div",{"i-carbon-checkmark":""},null,-1)),Bgt=xn(()=>Q("div",null,"Pass",-1)),Wgt={class:"number"},Ugt=xn(()=>Q("div",{"i-carbon-close":""},null,-1)),jgt=xn(()=>Q("div",null," Fail ",-1)),Vgt={class:"number","text-red5":""},Ggt=xn(()=>Q("div",{"i-carbon-compare":""},null,-1)),Kgt=xn(()=>Q("div",null," Snapshot Fail ",-1)),Xgt={class:"number","text-red5":""},Ygt=xn(()=>Q("div",{"i-carbon-checkmark-outline-error":""},null,-1)),Zgt=xn(()=>Q("div",null," Errors ",-1)),Jgt={class:"number","text-red5":""},Qgt=xn(()=>Q("div",{"i-carbon-timer":""},null,-1)),tvt=xn(()=>Q("div",null,"Time",-1)),evt={class:"number","data-testid":"run-time"},nvt={key:0,bg:"red500/10",text:"red500",p:"x3 y2","max-w-xl":"","m-2":"",rounded:""},rvt=xn(()=>Q("h3",{"text-center":"","mb-2":""}," Unhandled Errors ",-1)),ivt={text:"sm","font-thin":"","mb-2":"","data-testid":"unhandled-errors"},ovt=xn(()=>Q("br",null,null,-1)),svt={"data-testid":"unhandled-errors-details",class:"scrolls unhandled-errors",text:"sm","font-thin":"","pe-2.5":"","open:max-h-52":"","overflow-auto":""},lvt=xn(()=>Q("summary",{"font-bold":"","cursor-pointer":""},"Errors",-1)),avt=he({__name:"TestFilesEntry",setup(t){return(e,r)=>{const o=Dgt;return et(),yt(re,null,[Q("div",zgt,[Igt,Fgt,Q("div",Hgt,jt(B(sn).length),1),B(Rc).length?(et(),yt(re,{key:0},[qgt,Bgt,Q("div",Wgt,jt(B(Rc).length),1)],64)):Kt("",!0),B(Oc).length?(et(),yt(re,{key:1},[Ugt,jgt,Q("div",Vgt,jt(B(Oc).length),1)],64)):Kt("",!0),B(gm).length?(et(),yt(re,{key:2},[Ggt,Kgt,Q("div",Xgt,jt(B(gm).length),1)],64)):Kt("",!0),B(ki).length?(et(),yt(re,{key:3},[Ygt,Zgt,Q("div",Jgt,jt(B(ki).length),1)],64)):Kt("",!0),Qgt,tvt,Q("div",evt,jt(B(yct)),1)]),B(ki).length?(et(),yt("div",nvt,[rvt,Q("p",ivt,[me(" Vitest caught "+jt(B(ki).length)+" error"+jt(B(ki).length>1?"s":"")+" during the test run.",1),ovt,me(" This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected. ")]),Q("details",svt,[lvt,(et(!0),yt(re,null,Rn(B(ki),s=>(et(),Yt(o,{error:s},null,8,["error"]))),256))])])):Kt("",!0)],64)}}}),cvt=Ui(avt,[["__scopeId","data-v-09d153f7"]]),uvt={"p-2":"","text-center":"",flex:""},fvt={"text-4xl":"","min-w-2em":""},hvt={"text-md":""},dvt=he({__name:"DashboardEntry",props:{tail:{type:Boolean,default:!1}},setup(t){return(e,r)=>(et(),yt("div",uvt,[Q("div",null,[Q("div",fvt,[Gn(e.$slots,"body")]),Q("div",hvt,[Gn(e.$slots,"header")])])]))}}),pvt={flex:"~ wrap","justify-evenly":"","gap-2":"",p:"x-4",relative:""},gvt=he({__name:"TestsEntry",setup(t){const e=_t(()=>uu.value.length),r=_t(()=>qb.value.length),o=_t(()=>Hb.value.length),s=_t(()=>vct.value.length),c=_t(()=>mct.value.length);return(f,h)=>{const d=dvt;return et(),yt("div",pvt,[It(d,{"text-green5":"","data-testid":"pass-entry"},{header:ie(()=>[me(" Pass ")]),body:ie(()=>[me(jt(B(r)),1)]),_:1}),It(d,{class:de({"text-red5":B(o),op50:!B(o)}),"data-testid":"fail-entry"},{header:ie(()=>[me(" Fail ")]),body:ie(()=>[me(jt(B(o)),1)]),_:1},8,["class"]),B(s)?(et(),Yt(d,{key:0,op50:"","data-testid":"skipped-entry"},{header:ie(()=>[me(" Skip ")]),body:ie(()=>[me(jt(B(s)),1)]),_:1})):Kt("",!0),B(c)?(et(),Yt(d,{key:1,op50:"","data-testid":"todo-entry"},{header:ie(()=>[me(" Todo ")]),body:ie(()=>[me(jt(B(c)),1)]),_:1})):Kt("",!0),It(d,{tail:!0,"data-testid":"total-entry"},{header:ie(()=>[me(" Total ")]),body:ie(()=>[me(jt(B(e)),1)]),_:1})])}}}),vvt={},mvt={"gap-0":"",flex:"~ col gap-4","h-full":"","justify-center":"","items-center":""},yvt={"aria-labelledby":"tests",m:"y-4 x-2"};function bvt(t,e){const r=gvt,o=cvt;return et(),yt("div",mvt,[Q("section",yvt,[It(r)]),It(o)])}const wvt=Ui(vvt,[["render",bvt]]),xvt={},_vt={h:"full",flex:"~ col"},Svt=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon-dashboard"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Dashboard")],-1),kvt={class:"scrolls","flex-auto":"","py-1":""};function Cvt(t,e){const r=wvt;return et(),yt("div",_vt,[Svt,Q("div",kvt,[It(r)])])}const Tvt=Ui(xvt,[["render",Cvt]]),Evt=["open"],Lvt=Q("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),Avt=Q("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),Mvt=he({__name:"DetailsPanel",props:{color:{}},setup(t){const e=Qt(!0);return(r,o)=>(et(),yt("div",{open:B(e),class:"details-panel","data-testid":"details-panel",onToggle:o[0]||(o[0]=s=>e.value=s.target.open)},[Q("div",{p:"y1","text-sm":"","bg-base":"","items-center":"","z-5":"","gap-2":"",class:de(r.color),"w-full":"",flex:"","select-none":"",sticky:"",top:"-1"},[Lvt,Gn(r.$slots,"summary",{open:B(e)}),Avt],2),Gn(r.$slots,"default")],40,Evt))}}),Nvt={type:"button",dark:"op75",bg:"gray-200 dark:#111",hover:"op100","rounded-1":"","p-0.5":""},$vt={__name:"IconAction",props:{icon:String},setup(t){return(e,r)=>(et(),yt("button",Nvt,[Q("span",{block:"",class:de([t.icon,"dark:op85 hover:op100"]),op65:""},null,2)]))}},Pvt=["aria-label","data-current"],Ovt={key:0,"pr-1":""},Rvt={key:0,"i-carbon-chevron-down":"",op20:""},Dvt={key:1,"i-carbon-chevron-right":"",op20:""},zvt={key:1,"i-logos:typescript-icon":"","flex-shrink-0":"","mr-2":""},Ivt=["text"],Fvt={"text-sm":"",truncate:"","font-light":""},Hvt={key:0,text:"xs",op20:"",style:{"white-space":"nowrap"}},qvt={key:2,"gap-1":"","justify-end":"","flex-grow-1":"","pl-1":"",class:"test-actions"},Bvt=he({__name:"TaskItem",props:{task:{},opened:{type:Boolean},failedSnapshot:{type:Boolean}},emits:["run","preview","fixSnapshot"],setup(t,{emit:e}){const r=t,o=e,s=_t(()=>{const{result:c}=r.task;return c&&Math.round(c.duration||0)});return(c,f)=>{var v,y;const h=Mw,d=$vt,g=Wi("tooltip");return c.task?(et(),yt("div",{key:0,flex:"~ row","items-center":"",p:"x-2 y-1","border-rounded":"","cursor-pointer":"",hover:"bg-active",class:"item-wrapper","aria-label":c.task.name,"data-current":B(Bn)===c.task.id},[c.task.type==="suite"?(et(),yt("div",Ovt,[c.opened?(et(),yt("div",Rvt)):(et(),yt("div",Dvt))])):Kt("",!0),It(h,{task:c.task,"mr-2":""},null,8,["task"]),c.task.type==="suite"&&c.task.meta.typecheck?(et(),yt("div",zvt)):Kt("",!0),Q("div",{flex:"","items-end":"","gap-2":"",text:((y=(v=c.task)==null?void 0:v.result)==null?void 0:y.state)==="fail"?"red-500":"","overflow-hidden":""},[Q("span",Fvt,["filepath"in c.task&&c.task.projectName?(et(),yt("span",{key:0,style:ln({color:B($w)(c.task.file.projectName)})}," ["+jt(c.task.file.projectName)+"] ",5)):Kt("",!0),me(" "+jt(c.task.name),1)]),typeof B(s)=="number"?(et(),yt("span",Hvt,jt(B(s)>0?B(s):"< 1")+"ms ",1)):Kt("",!0)],8,Ivt),c.task.type==="suite"&&"filepath"in c.task?(et(),yt("div",qvt,[!B(Yr)&&c.failedSnapshot?Se((et(),Yt(d,{key:0,"data-testid":"btn-fix-snapshot",title:"Fix failed snapshot(s)",icon:"i-carbon-result-old",onClick:f[0]||(f[0]=xf(w=>o("fixSnapshot"),["prevent","stop"]))},null,512)),[[g,"Fix failed snapshot(s)",void 0,{bottom:!0}]]):Kt("",!0),Se(It(d,{"data-testid":"btn-open-details",title:"Open test details",icon:"i-carbon-intrusion-prevention",onClick:f[1]||(f[1]=xf(w=>o("preview"),["prevent","stop"]))},null,512),[[g,"Open test details",void 0,{bottom:!0}]]),B(Yr)?Kt("",!0):Se((et(),Yt(d,{key:1,"data-testid":"btn-run-test",title:"Run current test",icon:"i-carbon:play-filled-alt","text-green5":"",onClick:f[2]||(f[2]=xf(w=>o("run"),["prevent","stop"]))},null,512)),[[g,"Run current test",void 0,{bottom:!0}]])])):Kt("",!0)],8,Pvt)):Kt("",!0)}}}),Wvt=Ui(Bvt,[["__scopeId","data-v-df655a98"]]),Uvt={key:1},jvt=he({inheritAttrs:!1,__name:"TaskTree",props:{task:{},failedSnapshot:{type:Boolean},indent:{default:0},opened:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},search:{},onItemClick:{type:Function}},setup(t){const e=_t(()=>t.opened||kr.value.includes(t.task.id));function r(){if(e.value){const c="tasks"in t.task?t.task.tasks.map(f=>f.id):[];kr.value=kr.value.filter(f=>f!==t.task.id&&!c.includes(f))}else kr.value=[...kr.value,t.task.id]}async function o(){var c;(c=t.onItemClick)==null||c.call(t,t.task),ns.value&&(Pc.value=!0,await Xr()),await Ib([t.task.file])}function s(){return Oe.rpc.updateSnapshot(t.task)}return(c,f)=>{const h=Wvt,d=yo("TaskTree",!0);return et(),yt(re,null,[c.opened||!c.nested||!c.search||B(Nw)(c.task.name,c.search)?(et(),Yt(h,$i({key:0},c.$attrs,{task:c.task,style:{paddingLeft:c.indent?`${c.indent*.75+(c.task.type==="suite"?.5:1.75)}rem`:"1rem"},opened:B(e)&&c.task.type==="suite"&&c.task.tasks.length,"failed-snapshot":c.failedSnapshot,onClick:f[0]||(f[0]=g=>r()),onRun:f[1]||(f[1]=g=>o()),onFixSnapshot:f[2]||(f[2]=g=>s()),onPreview:f[3]||(f[3]=g=>{var v;return(v=c.onItemClick)==null?void 0:v.call(c,c.task)})}),null,16,["task","style","opened","failed-snapshot"])):Kt("",!0),c.nested&&c.task.type==="suite"&&c.task.tasks.length?Se((et(),yt("div",Uvt,[(et(!0),yt(re,null,Rn(c.task.tasks,g=>(et(),Yt(d,{key:g.id,"failed-snapshot":!1,task:g,nested:c.nested,indent:c.indent+1,search:c.search,"on-item-click":c.onItemClick},null,8,["task","nested","indent","search","on-item-click"]))),128))],512)),[[Qo,B(e)]]):Kt("",!0)],64)}}}),Vvt={h:"full",flex:"~ col"},Gvt={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Kvt={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Xvt=Q("div",{class:"i-carbon:search","flex-shrink-0":""},null,-1),Yvt=["op"],Zvt={class:"scrolls","flex-auto":"","py-1":""},Jvt={"text-red5":""},Qvt={"text-yellow5":""},tmt={"text-green5":""},emt={class:"text-purple5:50"},nmt={key:2,flex:"~ col","items-center":"",p:"x4 y4","font-light":""},rmt=Q("div",{op30:""}," No matched test ",-1),imt=he({inheritAttrs:!1,__name:"TasksList",props:{tasks:{},indent:{default:0},nested:{type:Boolean,default:!1},groupByType:{type:Boolean,default:!1},onItemClick:{type:Function}},emits:["run"],setup(t,{emit:e}){const r=e,o=Qt(""),s=Qt(),c=_t(()=>o.value.trim()!==""),f=_t(()=>o.value.trim()?t.tasks.filter(A=>M([A],o.value)):t.tasks),h=_t(()=>c.value?f.value.map(A=>Bl(A.id)).filter(Boolean):[]),d=_t(()=>f.value.filter(A=>{var T;return((T=A.result)==null?void 0:T.state)==="fail"})),g=_t(()=>f.value.filter(A=>{var T;return((T=A.result)==null?void 0:T.state)==="pass"})),v=_t(()=>f.value.filter(A=>A.mode==="skip"||A.mode==="todo")),y=_t(()=>f.value.filter(A=>!A.result||A.result.state==="run")),w=_t(()=>o.value===""),_=tat(y,250);function L(A){var T;o.value="",A&&((T=s.value)==null||T.focus())}function M(A,T){let E=!1;for(let P=0;P<A.length;P++){const $=A[P];if(Nw($.name,T)){E=!0;break}if(lgt($)&&$.tasks&&(E=M($.tasks,T),E))break}return E}return(A,T)=>{const E=_s,P=jvt,$=Mvt,F=Wi("tooltip");return et(),yt("div",Vvt,[Q("div",null,[Q("div",Gvt,[Gn(A.$slots,"header",{filteredTests:B(c)?B(h):void 0})]),Q("div",Kvt,[Xvt,Se(Q("input",{ref_key:"searchBox",ref:s,"onUpdate:modelValue":T[0]||(T[0]=H=>Ae(o)?o.value=H:null),placeholder:"Search...",outline:"none",bg:"transparent",font:"light",text:"sm","flex-1":"","pl-1":"",op:B(o).length?"100":"50",onKeydown:[T[1]||(T[1]=Qf(H=>L(!1),["esc"])),T[2]||(T[2]=Qf(H=>r("run",B(c)?B(h):void 0),["enter"]))]},null,40,Yvt),[[lk,B(o)]]),Se(It(E,{disabled:B(w),title:"Clear search",icon:"i-carbon:filter-remove",onClickPassive:T[3]||(T[3]=H=>L(!0))},null,8,["disabled"]),[[F,"Clear search",void 0,{bottom:!0}]])])]),Q("div",Zvt,[A.groupByType?(et(),yt(re,{key:0},[B(d).length?(et(),Yt($,{key:0},{summary:ie(()=>[Q("div",Jvt," FAIL ("+jt(B(d).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(d),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,search:B(o),opened:B(c),"failed-snapshot":B(Ti)(H),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","search","opened","failed-snapshot","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(y).length||B(Hl)==="running"?(et(),Yt($,{key:1},{summary:ie(()=>[Q("div",Qvt," RUNNING ("+jt(B(_).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(_),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,search:B(o),opened:B(c),"failed-snapshot":B(Ti)(H),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","search","opened","failed-snapshot","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(g).length?(et(),Yt($,{key:2},{summary:ie(()=>[Q("div",tmt," PASS ("+jt(B(g).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(g),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,opened:B(c),"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","opened","failed-snapshot","search","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(v).length?(et(),Yt($,{key:3},{summary:ie(()=>[Q("div",emt," SKIP ("+jt(B(v).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(v),H=>(et(),Yt(P,{key:H.id,task:H,opened:B(c),nested:A.nested,"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","opened","nested","failed-snapshot","search","class","on-item-click"]))),128))]),_:1})):Kt("",!0)],64)):(et(!0),yt(re,{key:1},Rn(B(f),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,opened:B(c),"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","opened","failed-snapshot","search","class","on-item-click"]))),128)),B(c)&&B(f).length===0?(et(),yt("div",nmt,[rmt,Q("button",{"font-light":"",op:"50 hover:100","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",onClickPassive:T[4]||(T[4]=H=>L(!0))}," Clear ",32)])):Kt("",!0)])])}}}),omt=""+new URL("../favicon.svg",import.meta.url).href,smt=Q("img",{"w-6":"","h-6":"",src:omt,alt:"Vitest logo"},null,-1),lmt=Q("span",{"font-light":"","text-sm":"","flex-1":""},"Vitest",-1),amt={class:"flex text-lg"},cmt=Q("div",{class:"i-carbon:folder-off ma"},null,-1),umt=Q("div",{class:"op100 gap-1 p-y-1",grid:"~ items-center cols-[1.5em_1fr]"},[Q("div",{class:"i-carbon:information-square w-1.5em h-1.5em"}),Q("div",null,"Coverage enabled but missing html reporter."),Q("div",{style:{"grid-column":"2"}}," Add html reporter to your configuration to see coverage here. ")],-1),fmt=he({__name:"Navigation",setup(t){const e=_t(()=>sn.value&&Ti(sn.value));function r(){return Oe.rpc.updateSnapshot()}const o=_t(()=>ta.value?"light":"dark");function s(d){Bn.value=d.file.id,ms.value=Bl(d.file.id),fc(!1)}async function c(d){ns.value&&(Pc.value=!0,await Xr(),Ii.value&&(fc(!0),await Xr())),await Hat(d)}function f(){kr.value=[]}function h(){sn.value.forEach(d=>{kr.value.includes(d.id)||kr.value.push(d.id)})}return(d,g)=>{const v=_s,y=imt,w=Wi("tooltip");return et(),Yt(y,{border:"r base",tasks:B(sn),"on-item-click":s,"group-by-type":!0,onRun:c,nested:!0},{header:ie(({filteredTests:_})=>[smt,lmt,Q("div",amt,[Se(It(v,{title:"Collapse tests",icon:"i-carbon:collapse-all",onClick:g[0]||(g[0]=L=>f())},null,512),[[Qo,B(kr).length>0],[w,"Collapse tests",void 0,{bottom:!0}]]),Se(It(v,{title:"Expand tests",icon:"i-carbon:expand-all",onClick:g[1]||(g[1]=L=>h())},null,512),[[Qo,B(kr).length===0],[w,"Expand tests",void 0,{bottom:!0}]]),Se(It(v,{title:"Show dashboard",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:dashboard",onClick:g[2]||(g[2]=L=>B(fc)(!0))},null,512),[[Qo,B(gh)&&!B(ns)||!B(as)],[w,"Dashboard",void 0,{bottom:!0}]]),B(gh)&&!B(ns)?(et(),Yt(B(bT),{key:0,title:"Coverage enabled but missing html reporter",class:"w-1.4em h-1.4em op100 rounded flex color-red5 dark:color-#f43f5e cursor-help"},{popper:ie(()=>[umt]),default:ie(()=>[cmt]),_:1})):Kt("",!0),B(ns)?Se((et(),Yt(v,{key:1,disabled:B(Pc),title:"Show coverage",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:folder-details-reference",onClick:g[3]||(g[3]=L=>B(Vat)())},null,8,["disabled"])),[[Qo,!B(Ii)],[w,"Coverage",void 0,{bottom:!0}]]):Kt("",!0),B(e)&&!B(Yr)?Se((et(),Yt(v,{key:2,icon:"i-carbon:result-old",onClick:g[4]||(g[4]=L=>r())},null,512)),[[w,"Update all failed snapshot(s)",void 0,{bottom:!0}]]):Kt("",!0),B(Yr)?Kt("",!0):Se((et(),Yt(v,{key:3,disabled:(_==null?void 0:_.length)===0,icon:"i-carbon:play",onClick:L=>c(_)},null,8,["disabled","onClick"])),[[w,_?_.length===0?"No test to run (clear filter)":"Rerun filtered":"Rerun all",void 0,{bottom:!0}]]),Se(It(v,{icon:"dark:i-carbon-moon i-carbon:sun",onClick:g[5]||(g[5]=L=>B(tct)())},null,512),[[w,`Toggle to ${B(o)} mode`,void 0,{bottom:!0}]])])]),_:1},8,["tasks"])}}}),hmt={"h-3px":"",relative:"","overflow-hidden":"",class:"px-0","w-screen":""},dmt=he({__name:"ProgressBar",setup(t){const{width:e}=vat(),r=_t(()=>sn.value.length===0?"!bg-gray-4 !dark:bg-gray-7 in-progress":gct.value?null:"in-progress"),o=_t(()=>sn.value.length),s=_t(()=>Rc.value.length),c=_t(()=>Oc.value.length),f=_t(()=>{const v=B(o);return v>0?e.value*s.value/v:0}),h=_t(()=>{const v=B(o);return v>0?e.value*c.value/v:0}),d=_t(()=>B(o)-c.value-s.value),g=_t(()=>{const v=B(o);return v>0?e.value*d.value/v:0});return(v,y)=>(et(),yt("div",{absolute:"","t-0":"","l-0":"","r-0":"","z-index-1031":"","pointer-events-none":"","p-0":"","h-3px":"",grid:"~ auto-cols-max","justify-items-center":"","w-screen":"",class:de(B(r))},[Q("div",hmt,[Q("div",{absolute:"","l-0":"","t-0":"","bg-red5":"","h-3px":"",class:de(B(r)),style:ln(`width: ${B(h)}px;`)}," ",6),Q("div",{absolute:"","l-0":"","t-0":"","bg-green5":"","h-3px":"",class:de(B(r)),style:ln(`left: ${B(h)}px; width: ${B(f)}px;`)}," ",6),Q("div",{absolute:"","l-0":"","t-0":"","bg-yellow5":"","h-3px":"",class:de(B(r)),style:ln(`left: ${B(f)+B(h)}px; width: ${B(g)}px;`)}," ",6)])],2))}}),pmt=Ui(dmt,[["__scopeId","data-v-f967c1fe"]]),qm={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let r=0;this.panes=this.panes.map((o,s)=>(o.size=s===e?o.max:o.min,s!==e&&(r+=o.min),o)),this.panes[e].size-=r,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(o=>({min:o.min,max:o.max,size:o.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:r,clientY:o}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:r-e.left,y:o-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let r={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:r.prevPanesSize),s=100-(this.pushOtherPanes?0:r.nextPanesSize),c=Math.max(Math.min(this.getCurrentDragPercentage(t),s),o);let f=[e,e+1],h=this.panes[f[0]]||null,d=this.panes[f[1]]||null;const g=h.max<100&&c>=h.max+r.prevPanesSize,v=d.max<100&&c<=100-(d.max+this.sumNextPanesSize(e+1));if(g||v){g?(h.size=h.max,d.size=Math.max(100-h.max-r.prevPanesSize-r.nextPanesSize,0)):(h.size=Math.max(100-d.max-r.prevPanesSize-this.sumNextPanesSize(e+1),0),d.size=d.max);return}if(this.pushOtherPanes){const y=this.doPushOtherPanes(r,c);if(!y)return;({sums:r,panesToResize:f}=y),h=this.panes[f[0]]||null,d=this.panes[f[1]]||null}h!==null&&(h.size=Math.min(Math.max(c-r.prevPanesSize-r.prevReachedMinPanes,h.min),h.max)),d!==null&&(d.size=Math.min(Math.max(100-c-r.nextPanesSize-r.nextReachedMinPanes,d.min),d.max))},doPushOtherPanes(t,e){const r=this.touch.activeSplitter,o=[r,r+1];return e<t.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(r).index,t.prevReachedMinPanes=0,o[0]<r&&this.panes.forEach((s,c)=>{c>o[0]&&c<=r&&(s.size=s.min,t.prevReachedMinPanes+=s.min)}),t.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((s,c)=>{c>0&&c<=r&&(s.size=s.min,t.prevReachedMinPanes+=s.min)}),this.panes[o[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(r).index,t.nextReachedMinPanes=0,o[1]>r+1&&this.panes.forEach((s,c)=>{c>r&&c<o[1]&&(s.size=s.min,t.nextReachedMinPanes+=s.min)}),t.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((s,c)=>{c<this.panesCount-1&&c>=r+1&&(s.size=s.min,t.nextReachedMinPanes+=s.min)}),this.panes[o[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:o}},sumPrevPanesSize(t){return this.panes.reduce((e,r,o)=>e+(o<t?r.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,r,o)=>e+(o>t+1?r.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),r=t.classList.contains("splitpanes__splitter");!e&&!r&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(t,e,r=!1){const o=t-1,s=document.createElement("div");s.classList.add("splitpanes__splitter"),r||(s.onmousedown=c=>this.onMouseDown(c,o),typeof window<"u"&&"ontouchstart"in window&&(s.ontouchstart=c=>this.onMouseDown(c,o)),s.onclick=c=>this.onSplitterClick(c,o+1)),this.dblClickSplitter&&(s.ondblclick=c=>this.onSplitterDblClick(c,o+1)),e.parentNode.insertBefore(s,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(r=>{r.className.includes("splitpanes__splitter")&&this.removeSplitter(r)});let e=0;t.forEach(r=>{r.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,r,!0):e&&this.addSplitter(e,r),e++)})},requestUpdate({target:t,...e}){const r=this.indexedPanes[t._.uid];Object.entries(e).forEach(([o,s])=>r[o]=s)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(s=>(s.className.includes("splitpanes__pane")&&e++,s===t.$el));const r=parseFloat(t.minSize),o=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(r)?0:r,max:isNaN(o)?100:o,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((s,c)=>s.index=c),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(s=>({min:s.min,max:s.max,size:s.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(o=>o.id===t._.uid),r=this.panes.splice(e,1)[0];this.panes.forEach((o,s)=>o.index=s),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...r,index:e}}),this.$emit("pane-remove",{removed:r,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const r=[],o=[];this.panes.forEach(s=>{s.size=Math.max(Math.min(t,s.max),s.min),e-=s.size,s.size>=s.max&&r.push(s.id),s.size<=s.min&&o.push(s.id)}),e>.1&&this.readjustSizes(e,r,o)},initialPanesSizing(){let t=100;const e=[],r=[];let o=0;this.panes.forEach(c=>{t-=c.size,c.size!==null&&o++,c.size>=c.max&&e.push(c.id),c.size<=c.min&&r.push(c.id)});let s=100;t>.1&&(this.panes.forEach(c=>{c.size===null&&(c.size=Math.max(Math.min(t/(this.panesCount-o),c.max),c.min)),s-=c.size}),s>.1&&this.readjustSizes(t,e,r))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let r=100/this.panesCount,o=0;const s=[],c=[];t&&t.givenSize!==null&&(r=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(f=>{o-=f.size,f.size>=f.max&&s.push(f.id),f.size<=f.min&&c.push(f.id)}),!(Math.abs(o)<.1)&&(this.panes.forEach(f=>{t&&t.givenSize!==null&&t.id===f.id||(f.size=Math.max(Math.min(r,f.max),f.min)),o-=f.size,f.size>=f.max&&s.push(f.id),f.size<=f.min&&c.push(f.id)}),o>.1&&this.readjustSizes(o,s,c))},readjustSizes(t,e,r){let o;t>0?o=t/(this.panesCount-e.length):o=t/(this.panesCount-r.length),this.panes.forEach((s,c)=>{if(t>0&&!e.includes(s.id)){const f=Math.max(Math.min(s.size+o,s.max),s.min),h=f-s.size;t-=h,s.size=f}else if(!r.includes(s.id)){const f=Math.max(Math.min(s.size+o,s.max),s.min),h=f-s.size;t-=h,s.size=f}s.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[s.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,r)=>{e.ondblclick=t?o=>this.onSplitterDblClick(o,r):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Zl("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},gmt=(t,e)=>{const r=t.__vccOpts||t;for(const[o,s]of e)r[o]=s;return r},vmt={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function mmt(t,e,r,o,s,c){return et(),yt("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=f=>c.onPaneClick(f,t._.uid)),style:ln(t.style)},[Gn(t.$slots,"default")],4)}const ec=gmt(vmt,[["render",mmt]]),ymt={"h-screen":"","w-screen":"",overflow:"hidden"},bmt=he({__name:"index",setup(t){const e=jat(),r=ud("vitest-ui_splitpanes-mainSizes",[33,67],{initOnMounted:!0}),o=fm(f=>{f.forEach((h,d)=>{r.value[d]=h.size})},0),s=fm(f=>{f.forEach((h,d)=>{uc.value[d]=h.size}),dm(!1)},0);function c(){const f=window.innerWidth,h=Math.min(f/3,300);r.value[0]=100*h/f,r.value[1]=100-r.value[0]}return(f,h)=>{const d=pmt,g=fmt,v=Tvt,y=wgt,w=ggt,_=Qat,L=Wat;return et(),yt(re,null,[It(d),Q("div",ymt,[It(B(qm),{class:"pt-4px",onResized:B(o),onReady:c},{default:ie(()=>[It(B(ec),{size:B(r)[0]},{default:ie(()=>[It(g)]),_:1},8,["size"]),It(B(ec),{size:B(r)[1]},{default:ie(()=>[B($c)?(et(),Yt(B(qm),{key:"detail",id:"details-splitpanes",onResize:h[1]||(h[1]=M=>B(dm)(!0)),onResized:B(s)},{default:ie(()=>[It(B(ec),{size:B(uc)[0],"min-size":"10"},{default:ie(()=>[h[0]||(xc(-1),h[0]=It(_),xc(1),h[0])]),_:1},8,["size"]),It(B(ec),{size:B(uc)[1],"min-size":"5"},{default:ie(()=>[B(e)?(et(),Yt(v,{key:"summary"})):B(Ii)?(et(),Yt(y,{key:"coverage",src:B(pm)},null,8,["src"])):(et(),Yt(w,{key:2}))]),_:1},8,["size"])]),_:1},8,["onResized"])):(et(),Yt(Xh,{key:0},{default:ie(()=>[B(e)?(et(),Yt(v,{key:"summary"})):B(Ii)?(et(),Yt(y,{key:"coverage",src:B(pm)},null,8,["src"])):(et(),Yt(w,{key:2}))]),_:1}))]),_:1},8,["size"])]),_:1},8,["onResized"])]),It(L)],64)}}}),wmt=[{name:"index",path:"/",component:bmt,props:!0}],xmt={tooltip:yT};Hy.options.instantMove=!0;Hy.options.distance=10;function _mt(){return wC({history:Xk(),routes:wmt})}const Smt=[_mt],Cd=ey(mk);Smt.forEach(t=>{Cd.use(t())});Object.entries(xmt).forEach(([t,e])=>{Cd.directive(t,e)});Cd.mount("#app");
|
|
51
|
+
A${c},${c},0,1,0,${v.x},${v.y}`}function kpt({config:t,source:e,target:r}){const{t:o,dist:s,endNorm:c}=kd({config:t,source:e,target:r}),f=c.rotateByDegrees(10).multiply(.5*s).add(o);return`translate(${f.x},${f.y})`}function Cpt({center:t,config:e,node:r}){const{n:o,c:s}=Tw({center:t,config:e,node:r}),c=o.subtract(s),f=c.multiply(1/c.length()).multiply(3*Fi(e,r)+8).add(o);return`translate(${f.x},${f.y})`}const fs={line:{labelTransform:xpt,path:wpt},arc:{labelTransform:kpt,path:_pt},reflexive:{labelTransform:Cpt,path:Spt}};function Tpt(t){return t.append("g").classed("links",!0).selectAll("path")}function Ept({config:t,graph:e,selection:r,showLabels:o}){const s=r==null?void 0:r.data(e.links,c=>spt(c)).join(c=>{var f,h,d,g;const v=c.append("g"),y=v.append("path").classed("link",!0).style("marker-end",_=>lpt(_)).style("stroke",_=>_.color);(h=(f=t.modifiers).link)==null||h.call(f,y);const w=v.append("text").classed("link__label",!0).style("fill",_=>_.label?_.label.color:null).style("font-size",_=>_.label?_.label.fontSize:null).text(_=>_.label?_.label.text:null);return(g=(d=t.modifiers).linkLabel)==null||g.call(d,w),v});return s==null||s.select(".link__label").attr("opacity",c=>c.label&&o?1:0),s}function Lpt(t){Apt(t),Mpt(t)}function Apt({center:t,config:e,graph:r,selection:o}){o==null||o.selectAll("path").attr("d",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"":s.source.id===s.target.id?fs.reflexive.path({config:e,node:s.source,center:t}):Lw(r,s.source,s.target)?fs.arc.path({config:e,source:s.source,target:s.target}):fs.line.path({config:e,source:s.source,target:s.target}))}function Mpt({config:t,center:e,graph:r,selection:o}){o==null||o.select(".link__label").attr("transform",s=>s.source.x===void 0||s.source.y===void 0||s.target.x===void 0||s.target.y===void 0?"translate(0, 0)":s.source.id===s.target.id?fs.reflexive.labelTransform({config:t,node:s.source,center:e}):Lw(r,s.source,s.target)?fs.arc.labelTransform({config:t,source:s.source,target:s.target}):fs.line.labelTransform({config:t,source:s.source,target:s.target}))}function Lw(t,e,r){return e.id!==r.id&&t.links.some(o=>o.target.id===e.id&&o.source.id===r.id)&&t.links.some(o=>o.target.id===r.id&&o.source.id===e.id)}function Npt(t){return t.append("defs").selectAll("marker")}function $pt({config:t,graph:e,selection:r}){return r==null?void 0:r.data(Ppt(e),o=>o).join(o=>{const s=o.append("marker").attr("id",c=>_w(c)).attr("markerHeight",4*t.marker.size).attr("markerWidth",4*t.marker.size).attr("markerUnits","userSpaceOnUse").attr("orient","auto").attr("refX",t.marker.ref[0]).attr("refY",t.marker.ref[1]).attr("viewBox",t.marker.viewBox).style("fill",c=>c);return s.append("path").attr("d",Opt(t.marker.path)),s})}function Ppt(t){return[...new Set(t.links.map(e=>e.color))]}function Opt(t){const[e,...r]=t;if(!e)return"M0,0";const[o,s]=e;return r.reduce((c,[f,h])=>`${c}L${f},${h}`,`M${o},${s}`)}function Rpt(t){return t.append("g").classed("nodes",!0).selectAll("circle")}function Dpt({config:t,drag:e,graph:r,onNodeContext:o,onNodeSelected:s,selection:c,showLabels:f}){const h=c==null?void 0:c.data(r.nodes,d=>d.id).join(d=>{var g,v,y,w;const _=d.append("g");e!==void 0&&_.call(e);const L=_.append("circle").classed("node",!0).attr("r",A=>Fi(t,A)).on("contextmenu",(A,T)=>{ww(A),o(T)}).on("pointerdown",(A,T)=>Ipt(A,T,s??o)).style("fill",A=>A.color);(v=(g=t.modifiers).node)==null||v.call(g,L);const M=_.append("text").classed("node__label",!0).attr("dy","0.33em").style("fill",A=>A.label?A.label.color:null).style("font-size",A=>A.label?A.label.fontSize:null).style("stroke","none").text(A=>A.label?A.label.text:null);return(w=(y=t.modifiers).nodeLabel)==null||w.call(y,M),_});return h==null||h.select(".node").classed("focused",d=>d.isFocused),h==null||h.select(".node__label").attr("opacity",f?1:0),h}const zpt=500;function Ipt(t,e,r){if(t.button!==void 0&&t.button!==0)return;const o=e.lastInteractionTimestamp,s=Date.now();if(o===void 0||s-o>zpt){e.lastInteractionTimestamp=s;return}e.lastInteractionTimestamp=void 0,r(e)}function Fpt(t){t==null||t.attr("transform",e=>`translate(${e.x??0},${e.y??0})`)}function Hpt({center:t,config:e,graph:r,onTick:o}){var s,c;const f=Zdt(r.nodes),h=e.simulation.forces.centering;if(h&&h.enabled){const y=h.strength;f.force("x",Qdt(()=>t().x).strength(y)).force("y",tpt(()=>t().y).strength(y))}const d=e.simulation.forces.charge;d&&d.enabled&&f.force("charge",Jdt().strength(d.strength));const g=e.simulation.forces.collision;g&&g.enabled&&f.force("collision",qdt().radius(y=>g.radiusMultiplier*Fi(e,y)));const v=e.simulation.forces.link;return v&&v.enabled&&f.force("link",Wdt(r.links).id(y=>y.id).distance(e.simulation.forces.link.length).strength(v.strength)),f.on("tick",()=>o()),(c=(s=e.modifiers).simulation)==null||c.call(s,f),f}function qpt({canvasContainer:t,config:e,min:r,max:o,onZoom:s}){var c,f;const h=_dt().scaleExtent([r,o]).filter(d=>{var g;return d.button===0||((g=d.touches)==null?void 0:g.length)>=2}).on("start",()=>t().classed("grabbed",!0)).on("zoom",d=>s(d)).on("end",()=>t().classed("grabbed",!1));return(f=(c=e.modifiers).zoom)==null||f.call(c,h),h}class Bpt{constructor(e,r,o){if($e(this,"nodeTypes"),$e(this,"_nodeTypeFilter"),$e(this,"_includeUnlinked",!0),$e(this,"_linkFilter",()=>!0),$e(this,"_showLinkLabels",!0),$e(this,"_showNodeLabels",!0),$e(this,"filteredGraph"),$e(this,"width",0),$e(this,"height",0),$e(this,"simulation"),$e(this,"canvas"),$e(this,"linkSelection"),$e(this,"nodeSelection"),$e(this,"markerSelection"),$e(this,"zoom"),$e(this,"drag"),$e(this,"xOffset",0),$e(this,"yOffset",0),$e(this,"scale"),$e(this,"focusedNode"),$e(this,"resizeObserver"),this.container=e,this.graph=r,this.config=o,this.scale=o.zoom.initial,this.resetView(),this.graph.nodes.forEach(s=>{const[c,f]=o.positionInitializer(s,this.effectiveWidth,this.effectiveHeight);s.x=s.x??c,s.y=s.y??f}),this.nodeTypes=[...new Set(r.nodes.map(s=>s.type))],this._nodeTypeFilter=[...this.nodeTypes],o.initial){const{includeUnlinked:s,nodeTypeFilter:c,linkFilter:f,showLinkLabels:h,showNodeLabels:d}=o.initial;this._includeUnlinked=s??this._includeUnlinked,this._showLinkLabels=h??this._showLinkLabels,this._showNodeLabels=d??this._showNodeLabels,this._nodeTypeFilter=c??this._nodeTypeFilter,this._linkFilter=f??this._linkFilter}this.filterGraph(void 0),this.initGraph(),this.restart(o.simulation.alphas.initialize),o.autoResize&&(this.resizeObserver=new ResizeObserver(Uct(()=>this.resize())),this.resizeObserver.observe(this.container))}get nodeTypeFilter(){return this._nodeTypeFilter}get includeUnlinked(){return this._includeUnlinked}set includeUnlinked(e){this._includeUnlinked=e,this.filterGraph(this.focusedNode);const{include:r,exclude:o}=this.config.simulation.alphas.filter.unlinked,s=e?r:o;this.restart(s)}set linkFilter(e){this._linkFilter=e,this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.link)}get linkFilter(){return this._linkFilter}get showNodeLabels(){return this._showNodeLabels}set showNodeLabels(e){this._showNodeLabels=e;const{hide:r,show:o}=this.config.simulation.alphas.labels.nodes,s=e?o:r;this.restart(s)}get showLinkLabels(){return this._showLinkLabels}set showLinkLabels(e){this._showLinkLabels=e;const{hide:r,show:o}=this.config.simulation.alphas.labels.links,s=e?o:r;this.restart(s)}get effectiveWidth(){return this.width/this.scale}get effectiveHeight(){return this.height/this.scale}get effectiveCenter(){return mn.of([this.width,this.height]).divide(2).subtract(mn.of([this.xOffset,this.yOffset])).divide(this.scale)}resize(){const e=this.width,r=this.height,o=this.container.getBoundingClientRect().width,s=this.container.getBoundingClientRect().height,c=e.toFixed()!==o.toFixed(),f=r.toFixed()!==s.toFixed();if(!c&&!f)return;this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height;const h=this.config.simulation.alphas.resize;this.restart(xw(h)?h:h({oldWidth:e,oldHeight:r,newWidth:o,newHeight:s}))}restart(e){var r;this.markerSelection=$pt({config:this.config,graph:this.filteredGraph,selection:this.markerSelection}),this.linkSelection=Ept({config:this.config,graph:this.filteredGraph,selection:this.linkSelection,showLabels:this._showLinkLabels}),this.nodeSelection=Dpt({config:this.config,drag:this.drag,graph:this.filteredGraph,onNodeContext:o=>this.toggleNodeFocus(o),onNodeSelected:this.config.callbacks.nodeClicked,selection:this.nodeSelection,showLabels:this._showNodeLabels}),(r=this.simulation)==null||r.stop(),this.simulation=Hpt({center:()=>this.effectiveCenter,config:this.config,graph:this.filteredGraph,onTick:()=>this.onTick()}).alpha(e).restart()}filterNodesByType(e,r){e?this._nodeTypeFilter.push(r):this._nodeTypeFilter=this._nodeTypeFilter.filter(o=>o!==r),this.filterGraph(this.focusedNode),this.restart(this.config.simulation.alphas.filter.type)}shutdown(){var e,r;this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),(e=this.resizeObserver)==null||e.unobserve(this.container),(r=this.simulation)==null||r.stop()}initGraph(){this.zoom=qpt({config:this.config,canvasContainer:()=>Ln(this.container).select("svg"),min:this.config.zoom.min,max:this.config.zoom.max,onZoom:e=>this.onZoom(e)}),this.canvas=dpt({applyZoom:this.scale!==1,container:Ln(this.container),offset:[this.xOffset,this.yOffset],scale:this.scale,zoom:this.zoom}),this.applyZoom(),this.linkSelection=Tpt(this.canvas),this.nodeSelection=Rpt(this.canvas),this.markerSelection=Npt(this.canvas),this.drag=gpt({config:this.config,onDragStart:()=>{var e;return(e=this.simulation)==null?void 0:e.alphaTarget(this.config.simulation.alphas.drag.start).restart()},onDragEnd:()=>{var e;return(e=this.simulation)==null?void 0:e.alphaTarget(this.config.simulation.alphas.drag.end).restart()}})}onTick(){Fpt(this.nodeSelection),Lpt({config:this.config,center:this.effectiveCenter,graph:this.filteredGraph,selection:this.linkSelection})}resetView(){var e;(e=this.simulation)==null||e.stop(),Ln(this.container).selectChildren().remove(),this.zoom=void 0,this.canvas=void 0,this.linkSelection=void 0,this.nodeSelection=void 0,this.markerSelection=void 0,this.simulation=void 0,this.width=this.container.getBoundingClientRect().width,this.height=this.container.getBoundingClientRect().height}onZoom(e){var r,o,s;this.xOffset=e.transform.x,this.yOffset=e.transform.y,this.scale=e.transform.k,this.applyZoom(),(o=(r=this.config.hooks).afterZoom)==null||o.call(r,this.scale,this.xOffset,this.yOffset),(s=this.simulation)==null||s.restart()}applyZoom(){ppt({canvas:this.canvas,scale:this.scale,xOffset:this.xOffset,yOffset:this.yOffset})}toggleNodeFocus(e){e.isFocused?(this.filterGraph(void 0),this.restart(this.config.simulation.alphas.focus.release(e))):this.focusNode(e)}focusNode(e){this.filterGraph(e),this.restart(this.config.simulation.alphas.focus.acquire(e))}filterGraph(e){this.focusedNode!==void 0&&(this.focusedNode.isFocused=!1,this.focusedNode=void 0),e!==void 0&&this._nodeTypeFilter.includes(e.type)&&(e.isFocused=!0,this.focusedNode=e),this.filteredGraph=vpt({graph:this.graph,filter:this._nodeTypeFilter,focusedNode:this.focusedNode,includeUnlinked:this._includeUnlinked,linkFilter:this._linkFilter})}}function Hm({nodes:t,links:e}){return{nodes:t??[],links:e??[]}}function Wpt(t){return{...t}}function Aw(t){return{...t,isFocused:!1,lastInteractionTimestamp:void 0}}const Upt={"h-full":"","min-h-75":"","flex-1":"",overflow:"hidden"},jpt={flex:"","items-center":"","gap-4":"","px-3":"","py-2":""},Vpt=["id","checked","onChange"],Gpt=["for"],Kpt=Q("div",{"flex-auto":""},null,-1),Xpt=he({__name:"ViewModuleGraph",props:{graph:{},projectName:{}},setup(t){const e=t,{graph:r}=b_(e),o=Qt(),s=Qt(!1),c=Qt(),f=Qt();Uh(()=>{s.value===!1&&setTimeout(()=>c.value=void 0,300)},{flush:"post"}),xs(()=>{g()}),jh(()=>{var y;(y=f.value)==null||y.shutdown()}),Ge(r,g);function h(y,w){var _;(_=f.value)==null||_.filterNodesByType(w,y)}function d(y){c.value=y,s.value=!0}function g(){var y;(y=f.value)==null||y.shutdown(),!(!r.value||!o.value)&&(f.value=new Bpt(o.value,r.value,hpt({nodeRadius:10,autoResize:!0,simulation:{alphas:{initialize:1,resize:({newHeight:w,newWidth:_})=>w===0&&_===0?0:.25},forces:{collision:{radiusMultiplier:10},link:{length:240}}},marker:Sw.Arrow(2),modifiers:{node:v},positionInitializer:r.value.nodes.length>1?kh.Randomized:kh.Centered,zoom:{min:.5,max:2}})))}function v(y){if(Yr)return;const w=A=>A.button===0;let _=0,L=0,M=0;y.on("pointerdown",(A,T)=>{T.type!=="external"&&(!T.x||!T.y||!w(A)||(_=T.x,L=T.y,M=Date.now()))}).on("pointerup",(A,T)=>{if(T.type==="external"||!T.x||!T.y||!w(A)||Date.now()-M>500)return;const E=T.x-_,P=T.y-L;E**2+P**2<100&&d(T.id)})}return(y,w)=>{var T;const _=_s,L=Wct,M=$ct,A=Wi("tooltip");return et(),yt("div",Upt,[Q("div",null,[Q("div",jpt,[(et(!0),yt(re,null,Rn((T=B(f))==null?void 0:T.nodeTypes.sort(),E=>{var P;return et(),yt("div",{key:E,flex:"~ gap-1","items-center":"","select-none":""},[Q("input",{id:`type-${E}`,type:"checkbox",checked:(P=B(f))==null?void 0:P.nodeTypeFilter.includes(E),onChange:$=>h(E,$.target.checked)},null,40,Vpt),Q("label",{"font-light":"","text-sm":"","ws-nowrap":"","overflow-hidden":"",capitalize:"",truncate:"",for:`type-${E}`,"border-b-2":"",style:ln({"border-color":`var(--color-node-${E})`})},jt(E)+" Modules",13,Gpt)])}),128)),Kpt,Q("div",null,[Se(It(_,{icon:"i-carbon-reset",onClick:g},null,512),[[A,"Reset",void 0,{bottom:!0}]])])])]),Q("div",{ref_key:"el",ref:o},null,512),It(M,{modelValue:B(s),"onUpdate:modelValue":w[1]||(w[1]=E=>Ae(s)?s.value=E:null),direction:"right"},{default:ie(()=>[B(c)?(et(),Yt(D_,{key:0},{default:ie(()=>[It(L,{id:B(c),"project-name":y.projectName,onClose:w[0]||(w[0]=E=>s.value=!1)},null,8,["id","project-name"])]),_:1})):Kt("",!0)]),_:1},8,["modelValue"])])}}}),Ypt={key:0,"text-green-500":"","flex-shrink-0":"","i-carbon:checkmark":""},Zpt={key:1,"text-red-500":"","flex-shrink-0":"","i-carbon:compare":""},Jpt={key:2,"text-red-500":"","flex-shrink-0":"","i-carbon:close":""},Qpt={key:3,"text-gray-500":"","flex-shrink-0":"","i-carbon:document-blank":""},tgt={key:4,"text-gray-500":"","flex-shrink-0":"","i-carbon:redo":"","rotate-90":""},egt={key:5,"text-yellow-500":"","flex-shrink-0":"","i-carbon:circle-dash":"","animate-spin":""},Mw=he({__name:"StatusIcon",props:{task:{}},setup(t){return(e,r)=>{var s,c,f;const o=Wi("tooltip");return((s=e.task.result)==null?void 0:s.state)==="pass"?(et(),yt("div",Ypt)):B(Ti)(e.task)?Se((et(),yt("div",Zpt,null,512)),[[o,"Contains failed snapshot",void 0,{right:!0}]]):((c=e.task.result)==null?void 0:c.state)==="fail"?(et(),yt("div",Jpt)):e.task.mode==="todo"?Se((et(),yt("div",Qpt,null,512)),[[o,"Todo",void 0,{right:!0}]]):e.task.mode==="skip"||((f=e.task.result)==null?void 0:f.state)==="skip"?Se((et(),yt("div",tgt,null,512)),[[o,"Skipped",void 0,{right:!0}]]):(et(),yt("div",egt))}}});function ngt(t){const e=new Map,r=new Map,o=[];for(;;){let s=0;if(t.forEach((c,f)=>{var v;const{splits:h,finished:d}=c;if(d){s++;const{raw:y,candidate:w}=c;e.set(y,w);return}if(h.length===0){c.finished=!0;return}const g=h[0];r.has(g)?(c.candidate+=c.candidate===""?g:`/${g}`,(v=r.get(g))==null||v.push(f),h.shift()):(r.set(g,[f]),o.push(f))}),o.forEach(c=>{const f=t[c],h=f.splits.shift();f.candidate+=f.candidate===""?h:`/${h}`}),r.forEach(c=>{if(c.length===1){const f=c[0];t[f].finished=!0}}),r.clear(),o.length=0,s===t.length)break}return e}function rgt(t){let e=t;e.includes("/node_modules/")&&(e=t.split(/\/node_modules\//g).pop());const r=e.split(/\//g);return{raw:e,splits:r,candidate:"",finished:!1,id:t}}function igt(t){const e=t.map(o=>rgt(o)),r=ngt(e);return e.map(({raw:o,id:s})=>Aw({color:"var(--color-node-external)",label:{color:"var(--color-node-external)",fontSize:"0.875rem",text:r.get(o)??""},isFocused:!1,id:s,type:"external"}))}function ogt(t,e){return Aw({color:e?"var(--color-node-root)":"var(--color-node-inline)",label:{color:e?"var(--color-node-root)":"var(--color-node-inline)",fontSize:"0.875rem",text:t.split(/\//g).pop()},isFocused:!1,id:t,type:"inline"})}function sgt(t,e){if(!t)return Hm({});const r=igt(t.externalized),o=t.inlined.map(h=>ogt(h,h===e))??[],s=[...r,...o],c=Object.fromEntries(s.map(h=>[h.id,h])),f=Object.entries(t.graph).flatMap(([h,d])=>d.map(g=>{const v=c[h],y=c[g];if(!(v===void 0||y===void 0))return Wpt({source:v,target:y,color:"var(--color-link)",label:!1})}).filter(g=>g!==void 0));return Hm({nodes:s,links:f})}function lgt(t){return Object.hasOwnProperty.call(t,"tasks")}function Nw(t,e){return typeof t!="string"||typeof e!="string"?!1:t.toLowerCase().includes(e.toLowerCase())}function $w(t){if(!t)return"";const e=t.split("").reduce((o,s,c)=>o+s.charCodeAt(0)+c,0),r=["blue","yellow","cyan","green","magenta"];return r[e%r.length]}const agt={key:0,flex:"","flex-col":"","h-full":"","max-h-full":"","overflow-hidden":"","data-testid":"file-detail"},cgt={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},ugt={"flex-1":"","font-light":"","op-50":"","ws-nowrap":"",truncate:"","text-sm":""},fgt={class:"flex text-lg"},hgt={flex:"~","items-center":"","bg-header":"",border:"b-2 base","text-sm":"","h-41px":""},dgt={flex:"","flex-col":"","flex-1":"",overflow:"hidden"},pgt=["flex-1"],ggt=he({__name:"FileDetails",setup(t){const e=Qt({externalized:[],graph:{},inlined:[]}),r=Qt({nodes:[],links:[]}),o=Qt(!1),s=Qt(!1);nat(vn,async(v,y)=>{if(v&&v.filepath!==(y==null?void 0:y.filepath)){const w=v.file.projectName||"";e.value=await Oe.rpc.getModuleGraph(w,v.filepath,!!Bl),r.value=sgt(e.value,v.filepath)}},{debounce:100,immediate:!0});function c(){var y;const v=(y=vn.value)==null?void 0:y.filepath;v&&fetch(`/__open-in-editor?file=${encodeURIComponent(v)}`)}function f(v){v==="graph"&&(s.value=!0),or.value=v}const h=_t(()=>{var v;return((v=zb.value)==null?void 0:v.reduce((y,{size:w})=>y+w,0))??0});function d(v){o.value=v}function g(v){return v?v.startsWith(Hl.root)?v.slice(Hl.root.length):v:""}return(v,y)=>{var P,$,F,H,st;const w=Mw,_=_s,L=Xpt,M=Nct,A=Sct,T=fct,E=Wi("tooltip");return B(vn)?(et(),yt("div",agt,[Q("div",null,[Q("div",cgt,[It(w,{task:B(vn)},null,8,["task"]),(P=B(vn))!=null&&P.file.projectName?(et(),yt("div",{key:0,"font-light":"","op-50":"","text-sm":"",style:ln({color:B($w)(($=B(vn))==null?void 0:$.file.projectName)})}," ["+jt(((F=B(vn))==null?void 0:F.file.projectName)||"")+"] ",5)):Kt("",!0),Q("div",ugt,jt(g((H=B(vn))==null?void 0:H.filepath)),1),Q("div",fgt,[B(Yr)?Kt("",!0):Se((et(),Yt(_,{key:0,title:"Open in editor",icon:"i-carbon-launch",disabled:!((st=B(vn))!=null&&st.filepath),onClick:c},null,8,["disabled"])),[[E,"Open in editor",void 0,{bottom:!0}]])])]),Q("div",hgt,[Q("button",{"tab-button":"",class:de({"tab-button-active":B(or)==null}),"data-testid":"btn-report",onClick:y[0]||(y[0]=Y=>f(null))}," Report ",2),Q("button",{"tab-button":"","data-testid":"btn-graph",class:de({"tab-button-active":B(or)==="graph"}),onClick:y[1]||(y[1]=Y=>f("graph"))}," Module Graph ",2),B(Yr)?Kt("",!0):(et(),yt("button",{key:0,"tab-button":"","data-testid":"btn-code",class:de({"tab-button-active":B(or)==="editor"}),onClick:y[2]||(y[2]=Y=>f("editor"))},jt(B(o)?"* ":"")+"Code ",3)),Q("button",{"tab-button":"","data-testid":"btn-console",class:de({"tab-button-active":B(or)==="console",op20:B(or)!=="console"&&B(h)===0}),onClick:y[3]||(y[3]=Y=>f("console"))}," Console ("+jt(B(h))+") ",3)])]),Q("div",dgt,[B(s)?(et(),yt("div",{key:0,"flex-1":B(or)==="graph"&&""},[Se(It(L,{graph:B(r),"data-testid":"graph","project-name":B(vn).file.projectName||""},null,8,["graph","project-name"]),[[Qo,B(or)==="graph"]])],8,pgt)):Kt("",!0),B(or)==="editor"?(et(),Yt(M,{key:B(vn).filepath,file:B(vn),"data-testid":"editor",onDraft:d},null,8,["file"])):B(or)==="console"?(et(),Yt(A,{key:2,file:B(vn),"data-testid":"console"},null,8,["file"])):B(or)?Kt("",!0):(et(),Yt(T,{key:3,file:B(vn),"data-testid":"report"},null,8,["file"]))])])):Kt("",!0)}}}),vgt={h:"full",flex:"~ col"},mgt=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon:folder-details-reference"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Coverage")],-1),ygt={"flex-auto":"","py-1":"","bg-white":""},bgt=["src"],wgt=he({__name:"Coverage",props:{src:{}},setup(t){return(e,r)=>(et(),yt("div",vgt,[mgt,Q("div",ygt,[Q("iframe",{id:"vitest-ui-coverage",src:e.src},null,8,bgt)])]))}}),xgt={bg:"red500/10","p-1":"","mb-1":"","mt-2":"",rounded:""},_gt={"font-bold":""},Sgt={key:0,class:"scrolls",text:"xs","font-mono":"","mx-1":"","my-2":"","pb-2":"","overflow-auto":""},kgt=["font-bold"],Cgt={text:"red500/70"},Tgt=Q("br",null,null,-1),Egt={key:1,text:"sm","mb-2":""},Lgt={"font-bold":""},Agt={key:2,text:"sm","mb-2":""},Mgt={"font-bold":""},Ngt=Q("br",null,null,-1),$gt=Q("ul",null,[Q("li",null," The error was thrown, while Vitest was running this test. "),Q("li",null," If the error occurred after the test had been completed, this was the last documented test before it was thrown. ")],-1),Pgt={key:3,text:"sm","font-thin":""},Ogt=Q("br",null,null,-1),Rgt=Q("ul",null,[Q("li",null," Cancel timeouts using clearTimeout and clearInterval. "),Q("li",null," Wait for promises to resolve using the await keyword. ")],-1),Dgt=he({__name:"ErrorEntry",props:{error:{}},setup(t){return(e,r)=>{var o;return et(),yt(re,null,[Q("h4",xgt,[Q("span",_gt,[me(jt(e.error.name||e.error.nameStr||"Unknown Error"),1),e.error.message?(et(),yt(re,{key:0},[me(":")],64)):Kt("",!0)]),me(" "+jt(e.error.message),1)]),(o=e.error.stacks)!=null&&o.length?(et(),yt("p",Sgt,[(et(!0),yt(re,null,Rn(e.error.stacks,(s,c)=>(et(),yt("span",{"whitespace-pre":"","font-bold":c===0?"":null},[me("❯ "+jt(s.method)+" "+jt(s.file)+":",1),Q("span",Cgt,jt(s.line)+":"+jt(s.column),1),Tgt],8,kgt))),256))])):Kt("",!0),e.error.VITEST_TEST_PATH?(et(),yt("p",Egt,[me(" This error originated in "),Q("span",Lgt,jt(e.error.VITEST_TEST_PATH),1),me(" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. ")])):Kt("",!0),e.error.VITEST_TEST_NAME?(et(),yt("p",Agt,[me(" The latest test that might've caused the error is "),Q("span",Mgt,jt(e.error.VITEST_TEST_NAME),1),me(". It might mean one of the following:"),Ngt,$gt])):Kt("",!0),e.error.VITEST_AFTER_ENV_TEARDOWN?(et(),yt("p",Pgt,[me(" This error was caught after test environment was torn down. Make sure to cancel any running tasks before test finishes:"),Ogt,Rgt])):Kt("",!0)],64)}}}),_n=t=>(_0("data-v-09d153f7"),t=t(),S0(),t),zgt={"data-testid":"test-files-entry",grid:"~ cols-[min-content_1fr_min-content]","items-center":"",gap:"x-2 y-3",p:"x4",relative:"","font-light":"","w-80":"",op80:""},Igt=_n(()=>Q("div",{"i-carbon-document":""},null,-1)),Fgt=_n(()=>Q("div",null,"Files",-1)),Hgt={class:"number","data-testid":"num-files"},qgt=_n(()=>Q("div",{"i-carbon-checkmark":""},null,-1)),Bgt=_n(()=>Q("div",null,"Pass",-1)),Wgt={class:"number"},Ugt=_n(()=>Q("div",{"i-carbon-close":""},null,-1)),jgt=_n(()=>Q("div",null," Fail ",-1)),Vgt={class:"number","text-red5":""},Ggt=_n(()=>Q("div",{"i-carbon-compare":""},null,-1)),Kgt=_n(()=>Q("div",null," Snapshot Fail ",-1)),Xgt={class:"number","text-red5":""},Ygt=_n(()=>Q("div",{"i-carbon-checkmark-outline-error":""},null,-1)),Zgt=_n(()=>Q("div",null," Errors ",-1)),Jgt={class:"number","text-red5":""},Qgt=_n(()=>Q("div",{"i-carbon-timer":""},null,-1)),tvt=_n(()=>Q("div",null,"Time",-1)),evt={class:"number","data-testid":"run-time"},nvt={key:0,bg:"red500/10",text:"red500",p:"x3 y2","max-w-xl":"","m-2":"",rounded:""},rvt=_n(()=>Q("h3",{"text-center":"","mb-2":""}," Unhandled Errors ",-1)),ivt={text:"sm","font-thin":"","mb-2":"","data-testid":"unhandled-errors"},ovt=_n(()=>Q("br",null,null,-1)),svt={"data-testid":"unhandled-errors-details",class:"scrolls unhandled-errors",text:"sm","font-thin":"","pe-2.5":"","open:max-h-52":"","overflow-auto":""},lvt=_n(()=>Q("summary",{"font-bold":"","cursor-pointer":""},"Errors",-1)),avt=he({__name:"TestFilesEntry",setup(t){return(e,r)=>{const o=Dgt;return et(),yt(re,null,[Q("div",zgt,[Igt,Fgt,Q("div",Hgt,jt(B(sn).length),1),B(Rc).length?(et(),yt(re,{key:0},[qgt,Bgt,Q("div",Wgt,jt(B(Rc).length),1)],64)):Kt("",!0),B(Oc).length?(et(),yt(re,{key:1},[Ugt,jgt,Q("div",Vgt,jt(B(Oc).length),1)],64)):Kt("",!0),B(gm).length?(et(),yt(re,{key:2},[Ggt,Kgt,Q("div",Xgt,jt(B(gm).length),1)],64)):Kt("",!0),B(ki).length?(et(),yt(re,{key:3},[Ygt,Zgt,Q("div",Jgt,jt(B(ki).length),1)],64)):Kt("",!0),Qgt,tvt,Q("div",evt,jt(B(yct)),1)]),B(ki).length?(et(),yt("div",nvt,[rvt,Q("p",ivt,[me(" Vitest caught "+jt(B(ki).length)+" error"+jt(B(ki).length>1?"s":"")+" during the test run.",1),ovt,me(" This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected. ")]),Q("details",svt,[lvt,(et(!0),yt(re,null,Rn(B(ki),s=>(et(),Yt(o,{error:s},null,8,["error"]))),256))])])):Kt("",!0)],64)}}}),cvt=Ui(avt,[["__scopeId","data-v-09d153f7"]]),uvt={"p-2":"","text-center":"",flex:""},fvt={"text-4xl":"","min-w-2em":""},hvt={"text-md":""},dvt=he({__name:"DashboardEntry",props:{tail:{type:Boolean,default:!1}},setup(t){return(e,r)=>(et(),yt("div",uvt,[Q("div",null,[Q("div",fvt,[Gn(e.$slots,"body")]),Q("div",hvt,[Gn(e.$slots,"header")])])]))}}),pvt={flex:"~ wrap","justify-evenly":"","gap-2":"",p:"x-4",relative:""},gvt=he({__name:"TestsEntry",setup(t){const e=_t(()=>uu.value.length),r=_t(()=>qb.value.length),o=_t(()=>Hb.value.length),s=_t(()=>vct.value.length),c=_t(()=>mct.value.length);return(f,h)=>{const d=dvt;return et(),yt("div",pvt,[It(d,{"text-green5":"","data-testid":"pass-entry"},{header:ie(()=>[me(" Pass ")]),body:ie(()=>[me(jt(B(r)),1)]),_:1}),It(d,{class:de({"text-red5":B(o),op50:!B(o)}),"data-testid":"fail-entry"},{header:ie(()=>[me(" Fail ")]),body:ie(()=>[me(jt(B(o)),1)]),_:1},8,["class"]),B(s)?(et(),Yt(d,{key:0,op50:"","data-testid":"skipped-entry"},{header:ie(()=>[me(" Skip ")]),body:ie(()=>[me(jt(B(s)),1)]),_:1})):Kt("",!0),B(c)?(et(),Yt(d,{key:1,op50:"","data-testid":"todo-entry"},{header:ie(()=>[me(" Todo ")]),body:ie(()=>[me(jt(B(c)),1)]),_:1})):Kt("",!0),It(d,{tail:!0,"data-testid":"total-entry"},{header:ie(()=>[me(" Total ")]),body:ie(()=>[me(jt(B(e)),1)]),_:1})])}}}),vvt={},mvt={"gap-0":"",flex:"~ col gap-4","h-full":"","justify-center":"","items-center":""},yvt={"aria-labelledby":"tests",m:"y-4 x-2"};function bvt(t,e){const r=gvt,o=cvt;return et(),yt("div",mvt,[Q("section",yvt,[It(r)]),It(o)])}const wvt=Ui(vvt,[["render",bvt]]),xvt={},_vt={h:"full",flex:"~ col"},Svt=Q("div",{p:"3","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},[Q("div",{class:"i-carbon-dashboard"}),Q("span",{"pl-1":"","font-bold":"","text-sm":"","flex-auto":"","ws-nowrap":"","overflow-hidden":"",truncate:""},"Dashboard")],-1),kvt={class:"scrolls","flex-auto":"","py-1":""};function Cvt(t,e){const r=wvt;return et(),yt("div",_vt,[Svt,Q("div",kvt,[It(r)])])}const Tvt=Ui(xvt,[["render",Cvt]]),Evt=["open"],Lvt=Q("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),Avt=Q("div",{"flex-1":"","h-1px":"",border:"base b",op80:""},null,-1),Mvt=he({__name:"DetailsPanel",props:{color:{}},setup(t){const e=Qt(!0);return(r,o)=>(et(),yt("div",{open:B(e),class:"details-panel","data-testid":"details-panel",onToggle:o[0]||(o[0]=s=>e.value=s.target.open)},[Q("div",{p:"y1","text-sm":"","bg-base":"","items-center":"","z-5":"","gap-2":"",class:de(r.color),"w-full":"",flex:"","select-none":"",sticky:"",top:"-1"},[Lvt,Gn(r.$slots,"summary",{open:B(e)}),Avt],2),Gn(r.$slots,"default")],40,Evt))}}),Nvt={type:"button",dark:"op75",bg:"gray-200 dark:#111",hover:"op100","rounded-1":"","p-0.5":""},$vt={__name:"IconAction",props:{icon:String},setup(t){return(e,r)=>(et(),yt("button",Nvt,[Q("span",{block:"",class:de([t.icon,"dark:op85 hover:op100"]),op65:""},null,2)]))}},Pvt=["aria-label","data-current"],Ovt={key:0,"pr-1":""},Rvt={key:0,"i-carbon-chevron-down":"",op20:""},Dvt={key:1,"i-carbon-chevron-right":"",op20:""},zvt={key:1,"i-logos:typescript-icon":"","flex-shrink-0":"","mr-2":""},Ivt=["text"],Fvt={"text-sm":"",truncate:"","font-light":""},Hvt={key:0,text:"xs",op20:"",style:{"white-space":"nowrap"}},qvt={key:2,"gap-1":"","justify-end":"","flex-grow-1":"","pl-1":"",class:"test-actions"},Bvt=he({__name:"TaskItem",props:{task:{},opened:{type:Boolean},failedSnapshot:{type:Boolean}},emits:["run","preview","fixSnapshot"],setup(t,{emit:e}){const r=t,o=e,s=_t(()=>{const{result:c}=r.task;return c&&Math.round(c.duration||0)});return(c,f)=>{var v,y;const h=Mw,d=$vt,g=Wi("tooltip");return c.task?(et(),yt("div",{key:0,flex:"~ row","items-center":"",p:"x-2 y-1","border-rounded":"","cursor-pointer":"",hover:"bg-active",class:"item-wrapper","aria-label":c.task.name,"data-current":B(Bn)===c.task.id},[c.task.type==="suite"?(et(),yt("div",Ovt,[c.opened?(et(),yt("div",Rvt)):(et(),yt("div",Dvt))])):Kt("",!0),It(h,{task:c.task,"mr-2":""},null,8,["task"]),c.task.type==="suite"&&c.task.meta.typecheck?(et(),yt("div",zvt)):Kt("",!0),Q("div",{flex:"","items-end":"","gap-2":"",text:((y=(v=c.task)==null?void 0:v.result)==null?void 0:y.state)==="fail"?"red-500":"","overflow-hidden":""},[Q("span",Fvt,["filepath"in c.task&&c.task.projectName?(et(),yt("span",{key:0,style:ln({color:B($w)(c.task.file.projectName)})}," ["+jt(c.task.file.projectName)+"] ",5)):Kt("",!0),me(" "+jt(c.task.name),1)]),typeof B(s)=="number"?(et(),yt("span",Hvt,jt(B(s)>0?B(s):"< 1")+"ms ",1)):Kt("",!0)],8,Ivt),c.task.type==="suite"&&"filepath"in c.task?(et(),yt("div",qvt,[!B(Yr)&&c.failedSnapshot?Se((et(),Yt(d,{key:0,"data-testid":"btn-fix-snapshot",title:"Fix failed snapshot(s)",icon:"i-carbon-result-old",onClick:f[0]||(f[0]=xf(w=>o("fixSnapshot"),["prevent","stop"]))},null,512)),[[g,"Fix failed snapshot(s)",void 0,{bottom:!0}]]):Kt("",!0),Se(It(d,{"data-testid":"btn-open-details",title:"Open test details",icon:"i-carbon-intrusion-prevention",onClick:f[1]||(f[1]=xf(w=>o("preview"),["prevent","stop"]))},null,512),[[g,"Open test details",void 0,{bottom:!0}]]),B(Yr)?Kt("",!0):Se((et(),Yt(d,{key:1,"data-testid":"btn-run-test",title:"Run current test",icon:"i-carbon:play-filled-alt","text-green5":"",onClick:f[2]||(f[2]=xf(w=>o("run"),["prevent","stop"]))},null,512)),[[g,"Run current test",void 0,{bottom:!0}]])])):Kt("",!0)],8,Pvt)):Kt("",!0)}}}),Wvt=Ui(Bvt,[["__scopeId","data-v-df655a98"]]),Uvt={key:1},jvt=he({inheritAttrs:!1,__name:"TaskTree",props:{task:{},failedSnapshot:{type:Boolean},indent:{default:0},opened:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},search:{},onItemClick:{type:Function}},setup(t){const e=_t(()=>t.opened||kr.value.includes(t.task.id));function r(){if(e.value){const c="tasks"in t.task?t.task.tasks.map(f=>f.id):[];kr.value=kr.value.filter(f=>f!==t.task.id&&!c.includes(f))}else kr.value=[...kr.value,t.task.id]}async function o(){var c;(c=t.onItemClick)==null||c.call(t,t.task),ns.value&&(Pc.value=!0,await Xr()),await Ib([t.task.file])}function s(){return Oe.rpc.updateSnapshot(t.task)}return(c,f)=>{const h=Wvt,d=yo("TaskTree",!0);return et(),yt(re,null,[c.opened||!c.nested||!c.search||B(Nw)(c.task.name,c.search)?(et(),Yt(h,$i({key:0},c.$attrs,{task:c.task,style:{paddingLeft:c.indent?`${c.indent*.75+(c.task.type==="suite"?.5:1.75)}rem`:"1rem"},opened:B(e)&&c.task.type==="suite"&&c.task.tasks.length,"failed-snapshot":c.failedSnapshot,onClick:f[0]||(f[0]=g=>r()),onRun:f[1]||(f[1]=g=>o()),onFixSnapshot:f[2]||(f[2]=g=>s()),onPreview:f[3]||(f[3]=g=>{var v;return(v=c.onItemClick)==null?void 0:v.call(c,c.task)})}),null,16,["task","style","opened","failed-snapshot"])):Kt("",!0),c.nested&&c.task.type==="suite"&&c.task.tasks.length?Se((et(),yt("div",Uvt,[(et(!0),yt(re,null,Rn(c.task.tasks,g=>(et(),Yt(d,{key:g.id,"failed-snapshot":!1,task:g,nested:c.nested,indent:c.indent+1,search:c.search,"on-item-click":c.onItemClick},null,8,["task","nested","indent","search","on-item-click"]))),128))],512)),[[Qo,B(e)]]):Kt("",!0)],64)}}}),Vvt={h:"full",flex:"~ col"},Gvt={p:"2","h-10":"",flex:"~ gap-2","items-center":"","bg-header":"",border:"b base"},Kvt={p:"l3 y2 r2",flex:"~ gap-2","items-center":"","bg-header":"",border:"b-2 base"},Xvt=Q("div",{class:"i-carbon:search","flex-shrink-0":""},null,-1),Yvt=["op"],Zvt={class:"scrolls","flex-auto":"","py-1":""},Jvt={"text-red5":""},Qvt={"text-yellow5":""},tmt={"text-green5":""},emt={class:"text-purple5:50"},nmt={key:2,flex:"~ col","items-center":"",p:"x4 y4","font-light":""},rmt=Q("div",{op30:""}," No matched test ",-1),imt=he({inheritAttrs:!1,__name:"TasksList",props:{tasks:{},indent:{default:0},nested:{type:Boolean,default:!1},groupByType:{type:Boolean,default:!1},onItemClick:{type:Function}},emits:["run"],setup(t,{emit:e}){const r=e,o=Qt(""),s=Qt(),c=_t(()=>o.value.trim()!==""),f=_t(()=>o.value.trim()?t.tasks.filter(A=>M([A],o.value)):t.tasks),h=_t(()=>c.value?f.value.map(A=>ql(A.id)).filter(Boolean):[]),d=_t(()=>f.value.filter(A=>{var T;return((T=A.result)==null?void 0:T.state)==="fail"})),g=_t(()=>f.value.filter(A=>{var T;return((T=A.result)==null?void 0:T.state)==="pass"})),v=_t(()=>f.value.filter(A=>A.mode==="skip"||A.mode==="todo")),y=_t(()=>f.value.filter(A=>!d.value.includes(A)&&!g.value.includes(A)&&!v.value.includes(A))),w=_t(()=>o.value===""),_=tat(y,250);function L(A){var T;o.value="",A&&((T=s.value)==null||T.focus())}function M(A,T){let E=!1;for(let P=0;P<A.length;P++){const $=A[P];if(Nw($.name,T)){E=!0;break}if(lgt($)&&$.tasks&&(E=M($.tasks,T),E))break}return E}return(A,T)=>{const E=_s,P=jvt,$=Mvt,F=Wi("tooltip");return et(),yt("div",Vvt,[Q("div",null,[Q("div",Gvt,[Gn(A.$slots,"header",{filteredTests:B(c)?B(h):void 0})]),Q("div",Kvt,[Xvt,Se(Q("input",{ref_key:"searchBox",ref:s,"onUpdate:modelValue":T[0]||(T[0]=H=>Ae(o)?o.value=H:null),placeholder:"Search...",outline:"none",bg:"transparent",font:"light",text:"sm","flex-1":"","pl-1":"",op:B(o).length?"100":"50",onKeydown:[T[1]||(T[1]=Qf(H=>L(!1),["esc"])),T[2]||(T[2]=Qf(H=>r("run",B(c)?B(h):void 0),["enter"]))]},null,40,Yvt),[[lk,B(o)]]),Se(It(E,{disabled:B(w),title:"Clear search",icon:"i-carbon:filter-remove",onClickPassive:T[3]||(T[3]=H=>L(!0))},null,8,["disabled"]),[[F,"Clear search",void 0,{bottom:!0}]])])]),Q("div",Zvt,[A.groupByType?(et(),yt(re,{key:0},[B(d).length?(et(),Yt($,{key:0},{summary:ie(()=>[Q("div",Jvt," FAIL ("+jt(B(d).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(d),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,search:B(o),opened:B(c),"failed-snapshot":B(Ti)(H),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","search","opened","failed-snapshot","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(_).length?(et(),Yt($,{key:1},{summary:ie(()=>[Q("div",Qvt," RUNNING ("+jt(B(_).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(_),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,search:B(o),opened:B(c),"failed-snapshot":B(Ti)(H),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","search","opened","failed-snapshot","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(g).length?(et(),Yt($,{key:2},{summary:ie(()=>[Q("div",tmt," PASS ("+jt(B(g).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(g),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,opened:B(c),"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","opened","failed-snapshot","search","class","on-item-click"]))),128))]),_:1})):Kt("",!0),B(v).length?(et(),Yt($,{key:3},{summary:ie(()=>[Q("div",emt," SKIP ("+jt(B(v).length)+") ",1)]),default:ie(()=>[(et(!0),yt(re,null,Rn(B(v),H=>(et(),Yt(P,{key:H.id,task:H,opened:B(c),nested:A.nested,"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","opened","nested","failed-snapshot","search","class","on-item-click"]))),128))]),_:1})):Kt("",!0)],64)):(et(!0),yt(re,{key:1},Rn(B(f),H=>(et(),Yt(P,{key:H.id,task:H,nested:A.nested,opened:B(c),"failed-snapshot":B(Ti)(H),search:B(o),class:de(B(Bn)===H.id?"bg-active":""),"on-item-click":A.onItemClick},null,8,["task","nested","opened","failed-snapshot","search","class","on-item-click"]))),128)),B(c)&&B(f).length===0?(et(),yt("div",nmt,[rmt,Q("button",{"font-light":"",op:"50 hover:100","text-sm":"",border:"~ gray-400/50 rounded",p:"x2 y0.5",m:"t2",onClickPassive:T[4]||(T[4]=H=>L(!0))}," Clear ",32)])):Kt("",!0)])])}}}),omt=""+new URL("../favicon.svg",import.meta.url).href,smt=Q("img",{"w-6":"","h-6":"",src:omt,alt:"Vitest logo"},null,-1),lmt=Q("span",{"font-light":"","text-sm":"","flex-1":""},"Vitest",-1),amt={class:"flex text-lg"},cmt=Q("div",{class:"i-carbon:folder-off ma"},null,-1),umt=Q("div",{class:"op100 gap-1 p-y-1",grid:"~ items-center cols-[1.5em_1fr]"},[Q("div",{class:"i-carbon:information-square w-1.5em h-1.5em"}),Q("div",null,"Coverage enabled but missing html reporter."),Q("div",{style:{"grid-column":"2"}}," Add html reporter to your configuration to see coverage here. ")],-1),fmt=he({__name:"Navigation",setup(t){const e=_t(()=>sn.value&&Ti(sn.value));function r(){return Oe.rpc.updateSnapshot()}const o=_t(()=>ta.value?"light":"dark");function s(d){Bn.value=d.file.id,ms.value=ql(d.file.id),fc(!1)}async function c(d){ns.value&&(Pc.value=!0,await Xr(),Ii.value&&(fc(!0),await Xr())),await Hat(d)}function f(){kr.value=[]}function h(){sn.value.forEach(d=>{kr.value.includes(d.id)||kr.value.push(d.id)})}return(d,g)=>{const v=_s,y=imt,w=Wi("tooltip");return et(),Yt(y,{border:"r base",tasks:B(sn),"on-item-click":s,"group-by-type":!0,onRun:c,nested:!0},{header:ie(({filteredTests:_})=>[smt,lmt,Q("div",amt,[Se(It(v,{title:"Collapse tests",icon:"i-carbon:collapse-all",onClick:g[0]||(g[0]=L=>f())},null,512),[[Qo,B(kr).length>0],[w,"Collapse tests",void 0,{bottom:!0}]]),Se(It(v,{title:"Expand tests",icon:"i-carbon:expand-all",onClick:g[1]||(g[1]=L=>h())},null,512),[[Qo,B(kr).length===0],[w,"Expand tests",void 0,{bottom:!0}]]),Se(It(v,{title:"Show dashboard",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:dashboard",onClick:g[2]||(g[2]=L=>B(fc)(!0))},null,512),[[Qo,B(gh)&&!B(ns)||!B(as)],[w,"Dashboard",void 0,{bottom:!0}]]),B(gh)&&!B(ns)?(et(),Yt(B(bT),{key:0,title:"Coverage enabled but missing html reporter",class:"w-1.4em h-1.4em op100 rounded flex color-red5 dark:color-#f43f5e cursor-help"},{popper:ie(()=>[umt]),default:ie(()=>[cmt]),_:1})):Kt("",!0),B(ns)?Se((et(),Yt(v,{key:1,disabled:B(Pc),title:"Show coverage",class:"!animate-100ms","animate-count-1":"",icon:"i-carbon:folder-details-reference",onClick:g[3]||(g[3]=L=>B(Vat)())},null,8,["disabled"])),[[Qo,!B(Ii)],[w,"Coverage",void 0,{bottom:!0}]]):Kt("",!0),B(e)&&!B(Yr)?Se((et(),Yt(v,{key:2,icon:"i-carbon:result-old",onClick:g[4]||(g[4]=L=>r())},null,512)),[[w,"Update all failed snapshot(s)",void 0,{bottom:!0}]]):Kt("",!0),B(Yr)?Kt("",!0):Se((et(),Yt(v,{key:3,disabled:(_==null?void 0:_.length)===0,icon:"i-carbon:play",onClick:L=>c(_)},null,8,["disabled","onClick"])),[[w,_?_.length===0?"No test to run (clear filter)":"Rerun filtered":"Rerun all",void 0,{bottom:!0}]]),Se(It(v,{icon:"dark:i-carbon-moon i-carbon:sun",onClick:g[5]||(g[5]=L=>B(tct)())},null,512),[[w,`Toggle to ${B(o)} mode`,void 0,{bottom:!0}]])])]),_:1},8,["tasks"])}}}),hmt={"h-3px":"",relative:"","overflow-hidden":"",class:"px-0","w-screen":""},dmt=he({__name:"ProgressBar",setup(t){const{width:e}=vat(),r=_t(()=>sn.value.length===0?"!bg-gray-4 !dark:bg-gray-7 in-progress":gct.value?null:"in-progress"),o=_t(()=>sn.value.length),s=_t(()=>Rc.value.length),c=_t(()=>Oc.value.length),f=_t(()=>{const v=B(o);return v>0?e.value*s.value/v:0}),h=_t(()=>{const v=B(o);return v>0?e.value*c.value/v:0}),d=_t(()=>B(o)-c.value-s.value),g=_t(()=>{const v=B(o);return v>0?e.value*d.value/v:0});return(v,y)=>(et(),yt("div",{absolute:"","t-0":"","l-0":"","r-0":"","z-index-1031":"","pointer-events-none":"","p-0":"","h-3px":"",grid:"~ auto-cols-max","justify-items-center":"","w-screen":"",class:de(B(r))},[Q("div",hmt,[Q("div",{absolute:"","l-0":"","t-0":"","bg-red5":"","h-3px":"",class:de(B(r)),style:ln(`width: ${B(h)}px;`)}," ",6),Q("div",{absolute:"","l-0":"","t-0":"","bg-green5":"","h-3px":"",class:de(B(r)),style:ln(`left: ${B(h)}px; width: ${B(f)}px;`)}," ",6),Q("div",{absolute:"","l-0":"","t-0":"","bg-yellow5":"","h-3px":"",class:de(B(r)),style:ln(`left: ${B(f)+B(h)}px; width: ${B(g)}px;`)}," ",6)])],2))}}),pmt=Ui(dmt,[["__scopeId","data-v-f967c1fe"]]),qm={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((t,e)=>(t[e.id]=e)&&t,{})}},methods:{updatePaneComponents(){this.panes.forEach(t=>{t.update&&t.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[t.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(t,e){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=e},onMouseMove(t){this.touch.mouseDown&&(t.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(t)),this.$emit("resize",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(t,e){"ontouchstart"in window&&(t.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===e?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(t,e),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=e,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[e])},onSplitterDblClick(t,e){let r=0;this.panes=this.panes.map((o,s)=>(o.size=s===e?o.max:o.min,s!==e&&(r+=o.min),o)),this.panes[e].size-=r,this.$emit("pane-maximize",this.panes[e]),this.$emit("resized",this.panes.map(o=>({min:o.min,max:o.max,size:o.size})))},onPaneClick(t,e){this.$emit("pane-click",this.indexedPanes[e])},getCurrentMouseDrag(t){const e=this.container.getBoundingClientRect(),{clientX:r,clientY:o}="ontouchstart"in window&&t.touches?t.touches[0]:t;return{x:r-e.left,y:o-e.top}},getCurrentDragPercentage(t){t=t[this.horizontal?"y":"x"];const e=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(t=e-t),t*100/e},calculatePanesSize(t){const e=this.touch.activeSplitter;let r={prevPanesSize:this.sumPrevPanesSize(e),nextPanesSize:this.sumNextPanesSize(e),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:r.prevPanesSize),s=100-(this.pushOtherPanes?0:r.nextPanesSize),c=Math.max(Math.min(this.getCurrentDragPercentage(t),s),o);let f=[e,e+1],h=this.panes[f[0]]||null,d=this.panes[f[1]]||null;const g=h.max<100&&c>=h.max+r.prevPanesSize,v=d.max<100&&c<=100-(d.max+this.sumNextPanesSize(e+1));if(g||v){g?(h.size=h.max,d.size=Math.max(100-h.max-r.prevPanesSize-r.nextPanesSize,0)):(h.size=Math.max(100-d.max-r.prevPanesSize-this.sumNextPanesSize(e+1),0),d.size=d.max);return}if(this.pushOtherPanes){const y=this.doPushOtherPanes(r,c);if(!y)return;({sums:r,panesToResize:f}=y),h=this.panes[f[0]]||null,d=this.panes[f[1]]||null}h!==null&&(h.size=Math.min(Math.max(c-r.prevPanesSize-r.prevReachedMinPanes,h.min),h.max)),d!==null&&(d.size=Math.min(Math.max(100-c-r.nextPanesSize-r.nextReachedMinPanes,d.min),d.max))},doPushOtherPanes(t,e){const r=this.touch.activeSplitter,o=[r,r+1];return e<t.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(r).index,t.prevReachedMinPanes=0,o[0]<r&&this.panes.forEach((s,c)=>{c>o[0]&&c<=r&&(s.size=s.min,t.prevReachedMinPanes+=s.min)}),t.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(t.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((s,c)=>{c>0&&c<=r&&(s.size=s.min,t.prevReachedMinPanes+=s.min)}),this.panes[o[1]].size=100-t.prevReachedMinPanes-this.panes[0].min-t.prevPanesSize-t.nextPanesSize,null):e>100-t.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(r).index,t.nextReachedMinPanes=0,o[1]>r+1&&this.panes.forEach((s,c)=>{c>r&&c<o[1]&&(s.size=s.min,t.nextReachedMinPanes+=s.min)}),t.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(t.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((s,c)=>{c<this.panesCount-1&&c>=r+1&&(s.size=s.min,t.nextReachedMinPanes+=s.min)}),this.panes[o[0]].size=100-t.prevPanesSize-t.nextReachedMinPanes-this.panes[this.panesCount-1].min-t.nextPanesSize,null):{sums:t,panesToResize:o}},sumPrevPanesSize(t){return this.panes.reduce((e,r,o)=>e+(o<t?r.size:0),0)},sumNextPanesSize(t){return this.panes.reduce((e,r,o)=>e+(o>t+1?r.size:0),0)},findPrevExpandedPane(t){return[...this.panes].reverse().find(e=>e.index<t&&e.size>e.min)||{}},findNextExpandedPane(t){return this.panes.find(e=>e.index>t+1&&e.size>e.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(t=>{const e=t.classList.contains("splitpanes__pane"),r=t.classList.contains("splitpanes__splitter");!e&&!r&&(t.parentNode.removeChild(t),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(t,e,r=!1){const o=t-1,s=document.createElement("div");s.classList.add("splitpanes__splitter"),r||(s.onmousedown=c=>this.onMouseDown(c,o),typeof window<"u"&&"ontouchstart"in window&&(s.ontouchstart=c=>this.onMouseDown(c,o)),s.onclick=c=>this.onSplitterClick(c,o+1)),this.dblClickSplitter&&(s.ondblclick=c=>this.onSplitterDblClick(c,o+1)),e.parentNode.insertBefore(s,e)},removeSplitter(t){t.onmousedown=void 0,t.onclick=void 0,t.ondblclick=void 0,t.parentNode.removeChild(t)},redoSplitters(){const t=Array.from(this.container.children);t.forEach(r=>{r.className.includes("splitpanes__splitter")&&this.removeSplitter(r)});let e=0;t.forEach(r=>{r.className.includes("splitpanes__pane")&&(!e&&this.firstSplitter?this.addSplitter(e,r,!0):e&&this.addSplitter(e,r),e++)})},requestUpdate({target:t,...e}){const r=this.indexedPanes[t._.uid];Object.entries(e).forEach(([o,s])=>r[o]=s)},onPaneAdd(t){let e=-1;Array.from(t.$el.parentNode.children).some(s=>(s.className.includes("splitpanes__pane")&&e++,s===t.$el));const r=parseFloat(t.minSize),o=parseFloat(t.maxSize);this.panes.splice(e,0,{id:t._.uid,index:e,min:isNaN(r)?0:r,max:isNaN(o)?100:o,size:t.size===null?null:parseFloat(t.size),givenSize:t.size,update:t.update}),this.panes.forEach((s,c)=>s.index=c),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[e]}),this.$emit("pane-add",{index:e,panes:this.panes.map(s=>({min:s.min,max:s.max,size:s.size}))})})},onPaneRemove(t){const e=this.panes.findIndex(o=>o.id===t._.uid),r=this.panes.splice(e,1)[0];this.panes.forEach((o,s)=>o.index=s),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...r,index:e}}),this.$emit("pane-remove",{removed:r,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(t={}){!t.addedPane&&!t.removedPane?this.initialPanesSizing():this.panes.some(e=>e.givenSize!==null||e.min||e.max<100)?this.equalizeAfterAddOrRemove(t):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size})))},equalize(){const t=100/this.panesCount;let e=0;const r=[],o=[];this.panes.forEach(s=>{s.size=Math.max(Math.min(t,s.max),s.min),e-=s.size,s.size>=s.max&&r.push(s.id),s.size<=s.min&&o.push(s.id)}),e>.1&&this.readjustSizes(e,r,o)},initialPanesSizing(){let t=100;const e=[],r=[];let o=0;this.panes.forEach(c=>{t-=c.size,c.size!==null&&o++,c.size>=c.max&&e.push(c.id),c.size<=c.min&&r.push(c.id)});let s=100;t>.1&&(this.panes.forEach(c=>{c.size===null&&(c.size=Math.max(Math.min(t/(this.panesCount-o),c.max),c.min)),s-=c.size}),s>.1&&this.readjustSizes(t,e,r))},equalizeAfterAddOrRemove({addedPane:t,removedPane:e}={}){let r=100/this.panesCount,o=0;const s=[],c=[];t&&t.givenSize!==null&&(r=(100-t.givenSize)/(this.panesCount-1)),this.panes.forEach(f=>{o-=f.size,f.size>=f.max&&s.push(f.id),f.size<=f.min&&c.push(f.id)}),!(Math.abs(o)<.1)&&(this.panes.forEach(f=>{t&&t.givenSize!==null&&t.id===f.id||(f.size=Math.max(Math.min(r,f.max),f.min)),o-=f.size,f.size>=f.max&&s.push(f.id),f.size<=f.min&&c.push(f.id)}),o>.1&&this.readjustSizes(o,s,c))},readjustSizes(t,e,r){let o;t>0?o=t/(this.panesCount-e.length):o=t/(this.panesCount-r.length),this.panes.forEach((s,c)=>{if(t>0&&!e.includes(s.id)){const f=Math.max(Math.min(s.size+o,s.max),s.min),h=f-s.size;t-=h,s.size=f}else if(!r.includes(s.id)){const f=Math.max(Math.min(s.size+o,s.max),s.min),h=f-s.size;t-=h,s.size=f}s.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[s.id].size}%`})}),Math.abs(t)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(t){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((e,r)=>{e.ondblclick=t?o=>this.onSplitterDblClick(o,r):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return Zl("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},gmt=(t,e)=>{const r=t.__vccOpts||t;for(const[o,s]of e)r[o]=s;return r},vmt={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(t){this.style=t}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(t){this.requestUpdate({target:this,size:t})},minSizeNumber(t){this.requestUpdate({target:this,min:t})},maxSizeNumber(t){this.requestUpdate({target:this,max:t})}}};function mmt(t,e,r,o,s,c){return et(),yt("div",{class:"splitpanes__pane",onClick:e[0]||(e[0]=f=>c.onPaneClick(f,t._.uid)),style:ln(t.style)},[Gn(t.$slots,"default")],4)}const ec=gmt(vmt,[["render",mmt]]),ymt={"h-screen":"","w-screen":"",overflow:"hidden"},bmt=he({__name:"index",setup(t){const e=jat(),r=ud("vitest-ui_splitpanes-mainSizes",[33,67],{initOnMounted:!0}),o=fm(f=>{f.forEach((h,d)=>{r.value[d]=h.size})},0),s=fm(f=>{f.forEach((h,d)=>{uc.value[d]=h.size}),dm(!1)},0);function c(){const f=window.innerWidth,h=Math.min(f/3,300);r.value[0]=100*h/f,r.value[1]=100-r.value[0]}return(f,h)=>{const d=pmt,g=fmt,v=Tvt,y=wgt,w=ggt,_=Qat,L=Wat;return et(),yt(re,null,[It(d),Q("div",ymt,[It(B(qm),{class:"pt-4px",onResized:B(o),onReady:c},{default:ie(()=>[It(B(ec),{size:B(r)[0]},{default:ie(()=>[It(g)]),_:1},8,["size"]),It(B(ec),{size:B(r)[1]},{default:ie(()=>[B(Bl)?(et(),Yt(B(qm),{key:"detail",id:"details-splitpanes",onResize:h[1]||(h[1]=M=>B(dm)(!0)),onResized:B(s)},{default:ie(()=>[It(B(ec),{size:B(uc)[0],"min-size":"10"},{default:ie(()=>[h[0]||(xc(-1),h[0]=It(_),xc(1),h[0])]),_:1},8,["size"]),It(B(ec),{size:B(uc)[1],"min-size":"5"},{default:ie(()=>[B(e)?(et(),Yt(v,{key:"summary"})):B(Ii)?(et(),Yt(y,{key:"coverage",src:B(pm)},null,8,["src"])):(et(),Yt(w,{key:2}))]),_:1},8,["size"])]),_:1},8,["onResized"])):(et(),Yt(Xh,{key:0},{default:ie(()=>[B(e)?(et(),Yt(v,{key:"summary"})):B(Ii)?(et(),Yt(y,{key:"coverage",src:B(pm)},null,8,["src"])):(et(),Yt(w,{key:2}))]),_:1}))]),_:1},8,["size"])]),_:1},8,["onResized"])]),It(L)],64)}}}),wmt=[{name:"index",path:"/",component:bmt,props:!0}],xmt={tooltip:yT};Hy.options.instantMove=!0;Hy.options.distance=10;function _mt(){return wC({history:Xk(),routes:wmt})}const Smt=[_mt],Cd=ey(mk);Smt.forEach(t=>{Cd.use(t())});Object.entries(xmt).forEach(([t,e])=>{Cd.directive(t,e)});Cd.mount("#app");
|