@vitejs/devtools-rolldown 0.0.0-alpha.30 → 0.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +45 -48
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/6TUvuKw-.js +1 -0
- package/dist/public/_nuxt/B9ATRPQ7.js +1 -0
- package/dist/public/_nuxt/B9O9mwcz.js +1 -0
- package/dist/public/_nuxt/BYYOuuQ8.js +1 -0
- package/dist/public/_nuxt/Bb89bWCj.js +1 -0
- package/dist/public/_nuxt/BlOp-aa0.js +1 -0
- package/dist/public/_nuxt/By3-Oigm.js +1 -0
- package/dist/public/_nuxt/C3g8Qo0F.js +1 -0
- package/dist/public/_nuxt/C4ZBTBfN.js +1 -0
- package/dist/public/_nuxt/C56jC-Rb.js +1 -0
- package/dist/public/_nuxt/{DWqpanCf.js → CBrsTh9c.js} +1 -1
- package/dist/public/_nuxt/CMcxTY2l.js +1 -0
- package/dist/public/_nuxt/CavFgEiy.js +1 -0
- package/dist/public/_nuxt/Ckamtj1Q.js +1 -0
- package/dist/public/_nuxt/Cs9u2aM3.js +1 -0
- package/dist/public/_nuxt/D1SGgpeJ.js +1 -0
- package/dist/public/_nuxt/D4Jp6GBh.js +1 -0
- package/dist/public/_nuxt/D68gMgDN.js +33 -0
- package/dist/public/_nuxt/D8SB5Fj6.js +1 -0
- package/dist/public/_nuxt/DG5LouYQ.js +1 -0
- package/dist/public/_nuxt/DGPFtmYw.js +1 -0
- package/dist/public/_nuxt/DKKnluDw.js +1 -0
- package/dist/public/_nuxt/DTB_fvd1.js +1 -0
- package/dist/public/_nuxt/Daqw8s3u.js +1 -0
- package/dist/public/_nuxt/{DataVirtualList.lGV_3v2U.css → DataVirtualList.BMBI8CMU.css} +1 -1
- package/dist/public/_nuxt/DdkVNznP.js +1 -0
- package/dist/public/_nuxt/DicSvcoI.js +2 -0
- package/dist/public/_nuxt/DmCbLhAV.js +1 -0
- package/dist/public/_nuxt/Dy45_BSj.js +1 -0
- package/dist/public/_nuxt/EoT68z9_.js +1 -0
- package/dist/public/_nuxt/OLyU6pOh.js +1 -0
- package/dist/public/_nuxt/Vyw3NrOX.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/64b3b8a7-2713-4a0b-a273-f1b096d1de48.json +1 -0
- package/dist/public/_nuxt/{entry.CcTZXgrj.css → entry.DQK1Fncc.css} +1 -1
- package/dist/public/_nuxt/error-404.2Q-XfgR7.css +1 -0
- package/dist/public/_nuxt/error-500.3QnkDFAn.css +1 -0
- package/dist/public/_nuxt/hK0Xv1bA.js +1 -0
- package/dist/public/_nuxt/vcHT-ufV.js +1 -0
- package/dist/public/_nuxt/zkWX764r.js +4 -0
- package/dist/public/index.html +1 -1
- package/package.json +10 -10
- package/dist/public/_nuxt/3sT_Mqwt.js +0 -1
- package/dist/public/_nuxt/BEpRBuI9.js +0 -1
- package/dist/public/_nuxt/BG553MBL.js +0 -1
- package/dist/public/_nuxt/BItNXqww.js +0 -1
- package/dist/public/_nuxt/BMh47W-N.js +0 -1
- package/dist/public/_nuxt/BMmSp6LE.js +0 -1
- package/dist/public/_nuxt/BdaRSTg9.js +0 -1
- package/dist/public/_nuxt/Bxdwnne9.js +0 -1
- package/dist/public/_nuxt/C0MXIEj-.js +0 -1
- package/dist/public/_nuxt/C2A6ZQPm.js +0 -1
- package/dist/public/_nuxt/C2Zt-inO.js +0 -1
- package/dist/public/_nuxt/CANF8ydB.js +0 -1
- package/dist/public/_nuxt/CBwDxyfP.js +0 -1
- package/dist/public/_nuxt/CKFsAdVO.js +0 -1
- package/dist/public/_nuxt/CPkXrqff.js +0 -1
- package/dist/public/_nuxt/CW-j5nS4.js +0 -1
- package/dist/public/_nuxt/CYKzVNOW.js +0 -1
- package/dist/public/_nuxt/CpJiZ7L0.js +0 -1
- package/dist/public/_nuxt/Cpi4HmhC.js +0 -1
- package/dist/public/_nuxt/CwTV8WCc.js +0 -1
- package/dist/public/_nuxt/DIOfQNpH.js +0 -4
- package/dist/public/_nuxt/DJuT7S78.js +0 -33
- package/dist/public/_nuxt/DKwP4h99.js +0 -1
- package/dist/public/_nuxt/DYSe0ST1.js +0 -1
- package/dist/public/_nuxt/DYuLlkFe.js +0 -2
- package/dist/public/_nuxt/DhDTn9QE.js +0 -1
- package/dist/public/_nuxt/Dt2e24SL.js +0 -1
- package/dist/public/_nuxt/KIwTgGRl.js +0 -1
- package/dist/public/_nuxt/PqwTuo4u.js +0 -1
- package/dist/public/_nuxt/aluAR0E9.js +0 -1
- package/dist/public/_nuxt/builds/meta/6ccec81e-7ce8-490e-996f-59c86bc421f3.json +0 -1
- package/dist/public/_nuxt/error-404.CsiTjEPF.css +0 -1
- package/dist/public/_nuxt/error-500.956VVnGk.css +0 -1
- package/dist/public/_nuxt/wHgnrW62.js +0 -1
- package/dist/public/_nuxt/wMowadUl.js +0 -1
- /package/dist/public/_nuxt/{DVE8edJM.js → BmEqTRfc.js} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import{$ as e,A as t,Bt as n,Ct as r,Dt as i,Et as a,G as o,Gt as s,H as c,Ht as l,It as u,J as d,Jt as f,K as p,Kt as m,Pt as h,Q as g,Rt as _,St as v,U as y,Ut as b,V as x,X as S,Y as C,Z as w,_t as T,at as E,bt as D,c as O,ct as k,et as A,ft as j,ht as M,it as N,jt as ee,k as P,lt as te,mt as F,n as ne,nt as I,o as L,ot as R,q as z,qt as B,r as re,rt as V,st as ie,t as ae,ut as H,vt as oe,wt as se,xt as ce}from"#entry";import{t as le}from"./6TUvuKw-.js";import{n as ue}from"./D04G8HHr.js";import{a as U,c as de,s as fe}from"./Bjj8tBzd.js";import{n as pe}from"./BlOp-aa0.js";import{r as me,t as he}from"./By3-Oigm.js";import{t as ge}from"./CBrsTh9c.js";import{n as _e,t as ve}from"./D4Jp6GBh.js";import{n as ye,r as be,t as W}from"./D1SGgpeJ.js";import{n as xe,t as Se}from"./CavFgEiy.js";import{t as Ce}from"./B9ATRPQ7.js";import{a as we,d as Te,m as G,n as Ee,o as K,r as De,s as Oe,t as ke,u as Ae}from"./vcHT-ufV.js";import{n as je,r as Me,t as Ne}from"./Dy45_BSj.js";import{t as Pe}from"./C4ZBTBfN.js";import{i as Fe,r as Ie,t as Le}from"./hK0Xv1bA.js";import{n as Re,t as ze}from"./DicSvcoI.js";import{t as Be}from"./EoT68z9_.js";import{c as Ve,i as He,n as Ue,o as We,r as Ge,s as Ke,t as qe}from"./DKKnluDw.js";import{t as Je}from"./B9O9mwcz.js";var Ye={border:`r y base rounded-r-xl`,flex:`~ col gap-1`,p1:``,"of-y-auto":``,"max-h-96vh":``,relative:``,"bg-glass":``,class:`fixed left-0 top-1/2 -translate-y-1/2`},Xe=e({__name:`SideNav`,setup(e){let t=o(()=>[...ve.value,{title:`Toggle dark mode`,icon:`i-ph-sun-duotone dark:i-ph-moon-duotone`,action:L}]);return(e,n)=>{let r=T(`tooltip`);return H(),C(`div`,null,[p(`div`,Ye,[(H(!0),C(y,null,F(t.value,e=>i((H(),z(oe(e.to?l(le):`button`),E({key:e.title,ref_for:!0},e.to?{to:e.to}:{},{title:e.title,"rounded-full":``,p2:``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,"exact-active-class":`text-primary op100!`,onClick:t=>e.action?.()}),{default:a(()=>[p(`div`,{class:b(e.icon),"text-lg":``},null,2)]),_:2},1040,[`title`,`onClick`])),[[r,{placement:`right`,content:e.title}]])),128))])])}}}),Ze=Object.assign(Xe,{__name:`PanelSideNav`}),Qe=new WeakMap,$e={mounted(e,t){let n=!t.modifiers.bubble,r;if(typeof t.value==`function`)r=Ee(e,t.value,{capture:n});else{let[i,a]=t.value;r=Ee(e,i,Object.assign({capture:n},a))}Qe.set(e,r)},unmounted(e){let t=Qe.get(e);t&&typeof t==`function`?t():t?.stop(),Qe.delete(e)}};function et(){let e=!1,t=_(!1);return(n,i)=>{if(t.value=i.value,e)return;e=!0;let a=Te(n,i.value);r(t,e=>a.value=e)}}et();var tt={__name:`splitpanes`,props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:[`ready`,`resize`,`resized`,`pane-click`,`pane-maximize`,`pane-add`,`pane-remove`,`splitter-click`,`splitter-dblclick`],setup(e,{emit:t}){let n=t,i=e,a=ce(),s=u([]),c=o(()=>s.value.reduce((e,t)=>(e[~~t.id]=t)&&e,{})),l=o(()=>s.value.length),d=u(null),f=u(!1),p=u({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),m=u({splitter:null,timeoutId:null}),h=o(()=>({[`splitpanes splitpanes--${i.horizontal?`horizontal`:`vertical`}`]:!0,"splitpanes--dragging":p.value.dragging})),g=()=>{document.addEventListener(`mousemove`,y,{passive:!1}),document.addEventListener(`mouseup`,b),`ontouchstart`in window&&(document.addEventListener(`touchmove`,y,{passive:!1}),document.addEventListener(`touchend`,b))},_=()=>{document.removeEventListener(`mousemove`,y,{passive:!1}),document.removeEventListener(`mouseup`,b),`ontouchstart`in window&&(document.removeEventListener(`touchmove`,y,{passive:!1}),document.removeEventListener(`touchend`,b))},v=(e,t)=>{let n=e.target.closest(`.splitpanes__splitter`);if(n){let{left:t,top:r}=n.getBoundingClientRect(),{clientX:a,clientY:o}=`ontouchstart`in window&&e.touches?e.touches[0]:e;p.value.cursorOffset=i.horizontal?o-r:a-t}g(),p.value.mouseDown=!0,p.value.activeSplitter=t},y=e=>{p.value.mouseDown&&(e.preventDefault(),p.value.dragging=!0,requestAnimationFrame(()=>{E(w(e)),ue(`resize`,{event:e},!0)}))},b=e=>{p.value.dragging&&(window.getSelection().removeAllRanges(),ue(`resized`,{event:e},!0)),p.value.mouseDown=!1,p.value.activeSplitter=null,setTimeout(()=>{p.value.dragging=!1,_()},100)},x=(e,t)=>{`ontouchstart`in window&&(e.preventDefault(),m.value.splitter===t?(clearTimeout(m.value.timeoutId),m.value.timeoutId=null,S(e,t),m.value.splitter=null):(m.value.splitter=t,m.value.timeoutId=setTimeout(()=>m.value.splitter=null,500))),p.value.dragging||ue(`splitter-click`,{event:e,index:t},!0)},S=(e,t)=>{if(ue(`splitter-dblclick`,{event:e,index:t},!0),i.maximizePanes){let n=0;s.value=s.value.map((e,r)=>(e.size=r===t?e.max:e.min,r!==t&&(n+=e.min),e)),s.value[t].size-=n,ue(`pane-maximize`,{event:e,index:t,pane:s.value[t]}),ue(`resized`,{event:e,index:t},!0)}},C=(e,t)=>{ue(`pane-click`,{event:e,index:c.value[t].index,pane:c.value[t]})},w=e=>{let t=d.value.getBoundingClientRect(),{clientX:n,clientY:r}=`ontouchstart`in window&&e.touches?e.touches[0]:e;return{x:n-(i.horizontal?0:p.value.cursorOffset)-t.left,y:r-(i.horizontal?p.value.cursorOffset:0)-t.top}},T=e=>{e=e[i.horizontal?`y`:`x`];let t=d.value[i.horizontal?`clientHeight`:`clientWidth`];return i.rtl&&!i.horizontal&&(e=t-e),e*100/t},E=e=>{let t=p.value.activeSplitter,n={prevPanesSize:O(t),nextPanesSize:A(t),prevReachedMinPanes:0,nextReachedMinPanes:0},r=0+(i.pushOtherPanes?0:n.prevPanesSize),a=100-(i.pushOtherPanes?0:n.nextPanesSize),o=Math.max(Math.min(T(e),a),r),c=[t,t+1],l=s.value[c[0]]||null,u=s.value[c[1]]||null,d=l.max<100&&o>=l.max+n.prevPanesSize,f=u.max<100&&o<=100-(u.max+A(t+1));if(d||f){d?(l.size=l.max,u.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-u.max-n.prevPanesSize-A(t+1),0),u.size=u.max);return}if(i.pushOtherPanes){let e=D(n,o);if(!e)return;({sums:n,panesToResize:c}=e),l=s.value[c[0]]||null,u=s.value[c[1]]||null}l!==null&&(l.size=Math.min(Math.max(o-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),u!==null&&(u.size=Math.min(Math.max(100-o-n.nextPanesSize-n.nextReachedMinPanes,u.min),u.max))},D=(e,t)=>{let n=p.value.activeSplitter,r=[n,n+1];return t<e.prevPanesSize+s.value[r[0]].min&&(r[0]=M(n).index,e.prevReachedMinPanes=0,r[0]<n&&s.value.forEach((t,i)=>{i>r[0]&&i<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),e.prevPanesSize=O(r[0]),r[0]===void 0)?(e.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((t,r)=>{r>0&&r<=n&&(t.size=t.min,e.prevReachedMinPanes+=t.min)}),s.value[r[1]].size=100-e.prevReachedMinPanes-s.value[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-s.value[r[1]].min&&(r[1]=N(n).index,e.nextReachedMinPanes=0,r[1]>n+1&&s.value.forEach((t,i)=>{i>n&&i<r[1]&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),e.nextPanesSize=A(r[1]-1),r[1]===void 0)?(e.nextReachedMinPanes=0,s.value.forEach((t,r)=>{r<l.value-1&&r>=n+1&&(t.size=t.min,e.nextReachedMinPanes+=t.min)}),s.value[r[0]].size=100-e.prevPanesSize-A(r[0]-1),null):{sums:e,panesToResize:r}},O=e=>s.value.reduce((t,n,r)=>t+(r<e?n.size:0),0),A=e=>s.value.reduce((t,n,r)=>t+(r>e+1?n.size:0),0),M=e=>[...s.value].reverse().find(t=>t.index<e&&t.size>t.min)||{},N=e=>s.value.find(t=>t.index>e+1&&t.size>t.min)||{},ee=()=>{let e=Array.from(d.value?.children||[]);for(let t of e){let e=t.classList.contains(`splitpanes__pane`),n=t.classList.contains(`splitpanes__splitter`);!e&&!n&&(t.remove(),console.warn(`Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed.`))}},P=(e,t,n=!1)=>{let r=e-1,i=document.createElement(`div`);i.classList.add(`splitpanes__splitter`),n||(i.onmousedown=e=>v(e,r),typeof window<`u`&&`ontouchstart`in window&&(i.ontouchstart=e=>v(e,r)),i.onclick=e=>x(e,r+1)),i.ondblclick=e=>S(e,r+1),t.parentNode.insertBefore(i,t)},te=e=>{e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.remove()},F=()=>{let e=Array.from(d.value?.children||[]);for(let t of e)t.className.includes(`splitpanes__splitter`)&&te(t);let t=0;for(let n of e)n.className.includes(`splitpanes__pane`)&&(!t&&i.firstSplitter?P(t,n,!0):t&&P(t,n),t++)},ne=({uid:e,...t})=>{let n=c.value[e];for(let[e,r]of Object.entries(t))n[e]=r},L=e=>{let t=-1;Array.from(d.value?.children||[]).some(n=>(n.className.includes(`splitpanes__pane`)&&t++,n.isSameNode(e.el))),s.value.splice(t,0,{...e,index:t}),s.value.forEach((e,t)=>e.index=t),f.value&&R(()=>{F(),re({addedPane:s.value[t]}),ue(`pane-add`,{pane:s.value[t]})})},B=e=>{let t=s.value.findIndex(t=>t.id===e);s.value[t].el=null;let n=s.value.splice(t,1)[0];s.value.forEach((e,t)=>e.index=t),R(()=>{F(),ue(`pane-remove`,{pane:n}),re({removedPane:{...n}})})},re=(e={})=>{!e.addedPane&&!e.removedPane?ae():s.value.some(e=>e.givenSize!==null||e.min||e.max<100)?se(e):V(),f.value&&ue(`resized`)},V=()=>{let e=100/l.value,t=0,n=[],r=[];for(let i of s.value)i.size=Math.max(Math.min(e,i.max),i.min),t-=i.size,i.size>=i.max&&n.push(i.id),i.size<=i.min&&r.push(i.id);t>.1&&le(t,n,r)},ae=()=>{let e=100,t=[],n=[],r=0;for(let i of s.value)e-=i.size,i.givenSize!==null&&r++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id);let i=100;if(e>.1){for(let t of s.value)t.givenSize===null&&(t.size=Math.max(Math.min(e/(l.value-r),t.max),t.min)),i-=t.size;i>.1&&le(i,t,n)}},se=({addedPane:e,removedPane:t}={})=>{let n=100/l.value,r=0,i=[],a=[];(e?.givenSize??null)!==null&&(n=(100-e.givenSize)/(l.value-1));for(let e of s.value)r-=e.size,e.size>=e.max&&i.push(e.id),e.size<=e.min&&a.push(e.id);if(!(Math.abs(r)<.1)){for(let t of s.value)e?.givenSize!==null&&e?.id===t.id||(t.size=Math.max(Math.min(n,t.max),t.min)),r-=t.size,t.size>=t.max&&i.push(t.id),t.size<=t.min&&a.push(t.id);r>.1&&le(r,i,a)}},le=(e,t,n)=>{let r;r=e>0?e/(l.value-t.length):e/(l.value-n.length),s.value.forEach((i,a)=>{if(e>0&&!t.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}else if(!n.includes(i.id)){let t=Math.max(Math.min(i.size+r,i.max),i.min),n=t-i.size;e-=n,i.size=t}}),Math.abs(e)>.1&&R(()=>{f.value&&console.warn(`Splitpanes: Could not resize panes correctly due to their constraints.`)})},ue=(e,t=void 0,r=!1)=>{let a=t?.index??p.value.activeSplitter??null;n(e,{...t,...a!==null&&{index:a},...r&&a!==null&&{prevPane:s.value[a-(i.firstSplitter?1:0)],nextPane:s.value[a+(i.firstSplitter?0:1)]},panes:s.value.map(e=>({min:e.min,max:e.max,size:e.size}))})};r(()=>i.firstSplitter,()=>F()),k(()=>{ee(),F(),re(),ue(`ready`),f.value=!0}),ie(()=>f.value=!1);let U=()=>I(`div`,{ref:d,class:h.value},a.default?.call(a));return j(`panes`,s),j(`indexedPanes`,c),j(`horizontal`,o(()=>i.horizontal)),j(`requestUpdate`,ne),j(`onPaneAdd`,L),j(`onPaneRemove`,B),j(`onPaneClick`,C),(e,t)=>(H(),z(oe(U)))}},nt={__name:`pane`,props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){let t=e,n=V(`requestUpdate`),i=V(`onPaneAdd`),a=V(`horizontal`),c=V(`onPaneRemove`),d=V(`onPaneClick`),f=A()?.uid,p=V(`indexedPanes`),m=o(()=>p.value[f]),h=u(null),g=o(()=>{let e=isNaN(t.size)||t.size===void 0?0:parseFloat(t.size);return Math.max(Math.min(e,v.value),_.value)}),_=o(()=>{let e=parseFloat(t.minSize);return isNaN(e)?0:e}),v=o(()=>{let e=parseFloat(t.maxSize);return isNaN(e)?100:e}),y=o(()=>`${a.value?`height`:`width`}: ${m.value?.size}%`);return r(()=>g.value,e=>n({uid:f,size:e})),r(()=>_.value,e=>n({uid:f,min:e})),r(()=>v.value,e=>n({uid:f,max:e})),k(()=>{i({id:f,el:h.value,min:_.value,max:v.value,givenSize:t.size===void 0?null:g.value,size:g.value})}),ie(()=>c(f)),(e,t)=>(H(),C(`div`,{ref_key:`paneEl`,ref:h,class:`splitpanes__pane`,onClick:t[0]||=t=>l(d)(t,e._.uid),style:s(y.value)},[M(e.$slots,`default`)],4))}},rt=B(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n||=self,n.CodeMirror=r())})(e,(function(){var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),a=/Edge\/(\d+)/.exec(e),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),c=!a&&/WebKit\//.test(e),l=c&&/Qt\/\d+\.\d+/.test(e),u=!a&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),_=/Android/.test(e),v=g||_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),S=f&&e.match(/Version\/(\d*\.\d*)/);S&&=Number(S[1]),S&&S>=15&&(f=!1,c=!0);var C=y&&(l||f&&(S==null||S<12.11)),w=n||o&&s>=9;function T(e){return RegExp(`(^|\\s)`+e+`(?:$|\\s)\\s*`)}var E=function(e,t){var n=e.className,r=T(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:``)}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return D(e).appendChild(t)}function k(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t==`string`)i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function A(e,t,n,r){var i=k(e,t,n,r);return i.setAttribute(`role`,`presentation`),i}var j=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd(`character`,n),r.moveStart(`character`,t),r};function M(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function N(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function ee(e,t){var n=e.className;T(t).test(n)||(e.className+=(n?` `:``)+t)}function P(e,t){for(var n=e.split(` `),r=0;r<n.length;r++)n[r]&&!T(n[r]).test(t)&&(t+=` `+n[r]);return t}var te=function(e){e.select()};g?te=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:o&&(te=function(e){try{e.select()}catch{}});function F(e){return e.display.wrapper.ownerDocument}function ne(e){return I(e.display.wrapper)}function I(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function L(e){return F(e).defaultView}function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var r in t||={},e)Object.prototype.hasOwnProperty.call(e,r)&&(n!==!1||!Object.prototype.hasOwnProperty.call(t,r))&&(t[r]=e[r]);return t}function B(e,t,n,r,i){t??(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=i||0;;){var s=e.indexOf(` `,a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=n-o%n,a=s+1}}var re=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};re.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},re.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function V(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var ie=50,ae={toString:function(){return`CodeMirror.Pass`}},H={scroll:!1},oe={origin:`*mouse`},se={origin:`+move`};function ce(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(` `,r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var le=[``];function ue(e){for(;le.length<=e;)le.push(U(le)+` `);return le[e]}function U(e){return e[e.length-1]}function de(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function fe(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function pe(){}function me(e,t){var n;return Object.create?n=Object.create(e):(pe.prototype=e,n=new pe),t&&z(t,n),n}var he=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ge(e){return/\w/.test(e)||e>``&&(e.toUpperCase()!=e.toLowerCase()||he.test(e))}function _e(e,t){return t?t.source.indexOf(`\\w`)>-1&&ge(e)?!0:t.test(e):ge(e)}function ve(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ye=/[\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 be(e){return e.charCodeAt(0)>=768&&ye.test(e)}function W(e,t,n){for(;(n<0?t>0:t<e.length)&&be(e.charAt(t));)t+=n;return t}function xe(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function Se(e,t,n,r){if(!e)return r(t,n,`ltr`,0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?`rtl`:`ltr`,a),i=!0)}i||r(t,n,`ltr`)}var Ce=null;function we(e,t,n){var r;Ce=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n==`before`?r=i:Ce=i),a.from==t&&(a.from!=a.to&&n!=`before`?r=i:Ce=i)}return r??Ce}var Te=(function(){var e=`bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN`,t=`nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111`;function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?`R`:1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?`r`:8192<=n&&n<=8203?`w`:n==8204?`b`:`L`}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function c(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var l=t==`ltr`?`L`:`R`;if(e.length==0||t==`ltr`&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var p=0,m=l;p<u;++p){var h=d[p];h==`m`?d[p]=m:m=h}for(var g=0,_=l;g<u;++g){var v=d[g];v==`1`&&_==`r`?d[g]=`n`:a.test(v)&&(_=v,v==`r`&&(d[g]=`R`))}for(var y=1,b=d[0];y<u-1;++y){var x=d[y];x==`+`&&b==`1`&&d[y+1]==`1`?d[y]=`1`:x==`,`&&b==d[y+1]&&(b==`1`||b==`n`)&&(d[y]=b),b=x}for(var S=0;S<u;++S){var C=d[S];if(C==`,`)d[S]=`N`;else if(C==`%`){var w=void 0;for(w=S+1;w<u&&d[w]==`%`;++w);for(var T=S&&d[S-1]==`!`||w<u&&d[w]==`1`?`1`:`N`,E=S;E<w;++E)d[E]=T;S=w-1}}for(var D=0,O=l;D<u;++D){var k=d[D];O==`L`&&k==`1`?d[D]=`L`:a.test(k)&&(O=k)}for(var A=0;A<u;++A)if(i.test(d[A])){var j=void 0;for(j=A+1;j<u&&i.test(d[j]);++j);for(var M=(A?d[A-1]:l)==`L`,N=M==((j<u?d[j]:l)==`L`)?M?`L`:`R`:l,ee=A;ee<j;++ee)d[ee]=N;A=j-1}for(var P=[],te,F=0;F<u;)if(o.test(d[F])){var ne=F;for(++F;F<u&&o.test(d[F]);++F);P.push(new c(0,ne,F))}else{var I=F,L=P.length,R=t==`rtl`?1:0;for(++F;F<u&&d[F]!=`L`;++F);for(var z=I;z<F;)if(s.test(d[z])){I<z&&(P.splice(L,0,new c(1,I,z)),L+=R);var B=z;for(++z;z<F&&s.test(d[z]);++z);P.splice(L,0,new c(2,B,z)),L+=R,I=z}else ++z;I<F&&P.splice(L,0,new c(1,I,F))}return t==`ltr`&&(P[0].level==1&&(te=e.match(/^\s+/))&&(P[0].from=te[0].length,P.unshift(new c(0,0,te[0].length))),U(P).level==1&&(te=e.match(/\s+$/))&&(U(P).to-=te[0].length,P.push(new c(0,u-te[0].length,u)))),t==`rtl`?P.reverse():P}})();function G(e,t){var n=e.order;return n??=e.order=Te(e.text,t),n}var Ee=[],K=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent(`on`+t,n);else{var r=e._handlers||={};r[t]=(r[t]||Ee).concat(n)}};function De(e,t){return e._handlers&&e._handlers[t]||Ee}function Oe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent(`on`+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=V(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ke(e,t){var n=De(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Ae(e,t,n){return typeof t==`string`&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ke(e,n||t.type,e,t),Ie(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)V(n,t[r])==-1&&n.push(t[r])}function Me(e,t){return De(e,t).length>0}function Ne(e){e.prototype.on=function(e,t){K(this,e,t)},e.prototype.off=function(e,t){Oe(this,e,t)}}function Pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ie(e){return e.defaultPrevented==null?e.returnValue==0:e.defaultPrevented}function Le(e){Pe(e),Fe(e)}function Re(e){return e.target||e.srcElement}function ze(e){var t=e.which;return t??(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),y&&e.ctrlKey&&t==1&&(t=3),t}var Be=function(){if(o&&s<9)return!1;var e=k(`div`);return`draggable`in e||`dragDrop`in e}(),Ve;function He(e){if(Ve==null){var t=k(`span`,``);O(e,k(`span`,[t,document.createTextNode(`x`)])),e.firstChild.offsetHeight!=0&&(Ve=t.offsetWidth<=1&&t.offsetHeight>2&&!(o&&s<8))}var n=Ve?k(`span`,``):k(`span`,`\xA0`,null,`display: inline-block; width: 1px; margin-right: -1px`);return n.setAttribute(`cm-text`,``),n}var Ue;function We(e){if(Ue!=null)return Ue;var t=O(e,document.createTextNode(`AخA`)),n=j(t,0,1).getBoundingClientRect(),r=j(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:Ue=r.right-n.right<3}var Ge=`
|
|
2
|
+
|
|
3
|
+
b`.split(/\n/).length==3?function(e){return e.split(/\r\n?|\n/)}:function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
|
4
|
+
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)==`\r`?i-1:i),o=a.indexOf(`\r`);o==-1?(n.push(a),t=i+1):(n.push(a.slice(0,o)),t+=o+1)}return n},Ke=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints(`StartToEnd`,t)!=0},qe=(function(){var e=k(`div`);return`oncopy`in e?!0:(e.setAttribute(`oncopy`,`return;`),typeof e.oncopy==`function`)})(),Je=null;function Ye(e){if(Je!=null)return Je;var t=O(e,k(`span`,`x`)),n=t.getBoundingClientRect(),r=j(t,0,1).getBoundingClientRect();return Je=Math.abs(n.left-r.left)>1}var Xe={},Ze={};function Qe(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Xe[e]=t}function $e(e,t){Ze[e]=t}function et(e){if(typeof e==`string`&&Ze.hasOwnProperty(e))e=Ze[e];else if(e&&typeof e.name==`string`&&Ze.hasOwnProperty(e.name)){var t=Ze[e.name];typeof t==`string`&&(t={name:t}),e=me(t,e),e.name=t.name}else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return et(`application/xml`);else if(typeof e==`string`&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return et(`application/json`);return typeof e==`string`?{name:e}:e||{name:`null`}}function tt(e,t){t=et(t);var n=Xe[t.name];if(!n)return tt(e,`text/plain`);var r=n(e,t);if(nt.hasOwnProperty(t.name)){var i=nt[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r[`_`+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var nt={};function rt(e,t){z(t,nt.hasOwnProperty(e)?nt[e]:nt[e]={})}function it(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function at(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function ot(e,t,n){return e.startState?e.startState(t,n):!0}var st=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};st.prototype.eol=function(){return this.pos>=this.string.length},st.prototype.sol=function(){return this.pos==this.lineStart},st.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},st.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},st.prototype.eat=function(e){var t=this.string.charAt(this.pos);if(typeof e==`string`?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},st.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},st.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},st.prototype.skipToEnd=function(){this.pos=this.string.length},st.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},st.prototype.backUp=function(e){this.pos-=e},st.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},st.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},st.prototype.match=function(e,t,n){if(typeof e==`string`){var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}},st.prototype.current=function(){return this.string.slice(this.start,this.pos)},st.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},st.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},st.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function q(e,t){if(t-=e.first,t<0||t>=e.size)throw Error(`There is no line `+(t+e.first)+` in the document.`);for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function ct(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var a=e.text;i==n.line&&(a=a.slice(0,n.ch)),i==t.line&&(a=a.slice(t.ch)),r.push(a),++i}),r}function lt(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ut(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function J(e){if(e.parent==null)return null;for(var t=e.parent,n=V(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function dt(e,t){var n=e.first;outer:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue outer}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var s=e.lines[o].height;if(t<s)break;t-=s}return n+o}function ft(e,t){return t>=e.first&&t<e.first+e.size}function pt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Y(e,t,n){if(n===void 0&&(n=null),!(this instanceof Y))return new Y(e,t,n);this.line=e,this.ch=t,this.sticky=n}function X(e,t){return e.line-t.line||e.ch-t.ch}function mt(e,t){return e.sticky==t.sticky&&X(e,t)==0}function ht(e){return Y(e.line,e.ch)}function gt(e,t){return X(e,t)<0?t:e}function _t(e,t){return X(e,t)<0?e:t}function vt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Z(e,t){if(t.line<e.first)return Y(e.first,0);var n=e.first+e.size-1;return t.line>n?Y(n,q(e,n).text.length):yt(t,q(e,t.line).text.length)}function yt(e,t){var n=e.ch;return n==null||n>t?Y(e.line,t):n<0?Y(e.line,0):e}function bt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Z(e,t[r]);return n}var xt=function(e,t){this.state=e,this.lookAhead=t},St=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};St.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},St.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,``),size:this.baseTokens[this.baseTokenPos]-e}},St.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},St.fromSaved=function(e,t,n){return t instanceof xt?new St(e,it(e.mode,t.state),n,t.lookAhead):new St(e,it(e.mode,t),n)},St.prototype.save=function(e){var t=e===!1?this.state:it(this.doc.mode,this.state);return this.maxLookAhead>0?new xt(t,this.maxLookAhead):t};function Ct(e,t,n,r){var i=[e.state.modeGen],a={};Mt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],c=1,l=0;n.state=!0,Mt(e,t.text,s.mode,n,function(e,t){for(var n=c;l<e;){var r=i[c];r>e&&i.splice(c,1,e,i[c+1],r),c+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,c-n,e,`overlay `+t),c=n+2;else for(;n<c;n+=2){var a=i[n+1];i[n+1]=(a?a+` `:``)+`overlay `+t}},a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},c=0;c<e.state.overlays.length;++c)s(c);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function wt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Tt(e,J(t)),i=t.text.length>e.options.maxHighlightLength&&it(e.doc.mode,r.state),a=Ct(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&=null,n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Tt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new St(r,!0,t);var a=Nt(e,t,n),o=a>r.first&&q(r,a-1).stateAfter,s=o?St.fromSaved(r,o,a):new St(r,ot(r.mode),a);return r.iter(a,t,function(n){Et(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()}),n&&(r.modeFrontier=s.line),s}function Et(e,t,n,r){var i=e.doc.mode,a=new st(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==``&&Dt(i,n.state);!a.eol();)Ot(i,a,n.state),a.start=a.pos}function Dt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=at(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function Ot(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=at(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw Error(`Mode `+e.name+` failed to advance stream.`)}var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function At(e,t,n,r){var i=e.doc,a=i.mode,o;t=Z(i,t);var s=q(i,t.line),c=Tt(e,t.line,n),l=new st(s.text,e.options.tabSize,c),u;for(r&&(u=[]);(r||l.pos<t.ch)&&!l.eol();)l.start=l.pos,o=Ot(a,l,c.state),r&&u.push(new kt(l,o,it(i.mode,c.state)));return r?u:new kt(l,o,c.state)}function jt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?`bgClass`:`textClass`;t[r]==null?t[r]=n[2]:RegExp(`(?:^|\\s)`+n[2]+`(?:$|\\s)`).test(t[r])||(t[r]+=` `+n[2])}return e}function Mt(e,t,n,r,i,a,o){var s=n.flattenSpans;s??=e.options.flattenSpans;var c=0,l=null,u=new st(t,e.options.tabSize,r),d,f=e.options.addModeClass&&[null];for(t==``&&jt(Dt(n,r.state),a);!u.eol();){if(u.pos>e.options.maxHighlightLength?(s=!1,o&&Et(e,t,r,u.pos),u.pos=t.length,d=null):d=jt(Ot(n,u,r.state,f),a),f){var p=f[0].name;p&&(d=`m-`+(d?p+` `+d:p))}if(!s||l!=d){for(;c<u.start;)c=Math.min(u.start,c+5e3),i(c,l);l=d}u.start=u.pos}for(;c<u.pos;){var m=Math.min(u.pos,c+5e3);i(m,l),c=m}}function Nt(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var c=q(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof xt?l.lookAhead:0)<=a.modeFrontier))return s;var u=B(c.text,null,e.options.tabSize);(i==null||r>u)&&(i=s-1,r=u)}return i}function Pt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=q(e,r).stateAfter;if(i&&(!(i instanceof xt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var Ft=!1,It=!1;function Lt(){Ft=!0}function Rt(){It=!0}function zt(e,t,n){this.marker=e,this.from=t,this.to=n}function Bt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Vt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||=[]).push(e[r]);return n}function Ht(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||=new WeakSet);r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ut(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t)||a.from==t&&o.type==`bookmark`&&(!n||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||=[]).push(new zt(o,a.from,s?null:a.to))}}return r}function Wt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker;if(a.to==null||(o.inclusiveRight?a.to>=t:a.to>t)||a.from==t&&o.type==`bookmark`&&(!n||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||=[]).push(new zt(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function Gt(e,t){if(t.full)return null;var n=ft(e,t.from.line)&&q(e,t.from.line).markedSpans,r=ft(e,t.to.line)&&q(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=X(t.from,t.to)==0,s=Ut(n,i,o),c=Wt(r,a,o),l=t.text.length==1,u=U(t.text).length+(l?i:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(f.to==null){var p=Bt(c,f.marker);p?l&&(f.to=p.to==null?null:p.to+u):f.to=i}}if(c)for(var m=0;m<c.length;++m){var h=c[m];h.to!=null&&(h.to+=u),h.from==null?Bt(s,h.marker)||(h.from=u,l&&(s||=[]).push(h)):(h.from+=u,l&&(s||=[]).push(h))}s&&=Kt(s),c&&c!=s&&(c=Kt(c));var g=[s];if(!l){var _=t.text.length-2,v;if(_>0&&s)for(var y=0;y<s.length;++y)s[y].to??(v||=[]).push(new zt(s[y].marker,null,null));for(var b=0;b<_;++b)g.push(v);g.push(c)}return g}function Kt(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function qt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;n.readOnly&&(!r||V(r,n)==-1)&&(r||=[]).push(n)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],s=o.find(0),c=0;c<i.length;++c){var l=i[c];if(!(X(l.to,s.from)<0||X(l.from,s.to)>0)){var u=[c,1],d=X(l.from,s.from),f=X(l.to,s.to);(d<0||!o.inclusiveLeft&&!d)&&u.push({from:l.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function Jt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Yt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Xt(e){return e.inclusiveLeft?-1:0}function Zt(e){return e.inclusiveRight?1:0}function Qt(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=X(r.from,i.from)||Xt(e)-Xt(t);return a?-a:X(r.to,i.to)||Zt(e)-Zt(t)||t.id-e.id}function $t(e,t){var n=It&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Qt(r,i.marker)<0)&&(r=i.marker);return r}function en(e){return $t(e,!0)}function tn(e){return $t(e,!1)}function nn(e,t){var n=It&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||Qt(r,a.marker)<0)&&(r=a.marker)}return r}function rn(e,t,n,r,i){var a=q(e,t),o=It&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var c=o[s];if(c.marker.collapsed){var l=c.marker.find(0),u=X(l.from,n)||Xt(c.marker)-Xt(i),d=X(l.to,r)||Zt(c.marker)-Zt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?X(l.to,n)>=0:X(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?X(l.from,r)<=0:X(l.from,r)<0)))return!0}}}function an(e){for(var t;t=en(e);)e=t.find(-1,!0).line;return e}function on(e){for(var t;t=tn(e);)e=t.find(1,!0).line;return e}function sn(e){for(var t,n;t=tn(e);)e=t.find(1,!0).line,(n||=[]).push(e);return n}function cn(e,t){var n=q(e,t),r=an(n);return n==r?t:J(r)}function ln(e,t){if(t>e.lastLine())return t;var n=q(e,t),r;if(!un(e,n))return t;for(;r=tn(n);)n=r.find(1,!0).line;return J(n)+1}function un(e,t){var n=It&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed&&(r.from==null||!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&dn(e,t,r)))return!0}}function dn(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return dn(e,r.line,Bt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&dn(e,t,i))return!0}function fn(e){e=an(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var o=0;o<a.children.length;++o){var s=a.children[o];if(s==n)break;t+=s.height}return t}function pn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=en(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=tn(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function mn(e){var t=e.display,n=e.doc;t.maxLine=q(n,n.first),t.maxLineLength=pn(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=pn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var hn=function(e,t,n){this.text=e,Yt(this,t),this.height=n?n(this):1};hn.prototype.lineNo=function(){return J(this)},Ne(hn);function gn(e,t,n,r){e.text=t,e.stateAfter&&=null,e.styles&&=null,e.order!=null&&(e.order=null),Jt(e),Yt(e,n);var i=r?r(e):1;i!=e.height&&ut(e,i)}function _n(e){e.parent=null,Jt(e)}var vn={},yn={};function bn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?yn:vn;return n[e]||(n[e]=e.replace(/\S+/g,`cm-$&`))}function xn(e,t){var n=A(`span`,null,null,c?`padding-right: .1px`:null),r={pre:A(`pre`,[n],`CodeMirror-line`),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption(`lineWrapping`)};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Cn,We(e.display.measure)&&(o=G(a,e.doc.direction))&&(r.addToken=Tn(r.addToken,o)),r.map=[],Dn(a,r,wt(e,a,t!=e.display.externalMeasured&&J(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=P(a.styleClasses.bgClass,r.bgClass||``)),a.styleClasses.textClass&&(r.textClass=P(a.styleClasses.textClass,r.textClass||``))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(He(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(`.cm-tab`))&&(r.content.className=`cm-tab-wrap-hack`)}return ke(e,`renderLine`,e,t.line,r.pre),r.pre.className&&(r.textClass=P(r.pre.className,r.textClass||``)),r}function Sn(e){var t=k(`span`,`•`,`cm-invalidchar`);return t.title=`\\u`+e.charCodeAt(0).toString(16),t.setAttribute(`aria-label`,t.title),t}function Cn(e,t,n,r,i,a,c){if(t){var l=e.splitSpaces?wn(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,f;if(!u.test(t))e.col+=t.length,f=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,f),o&&s<9&&(d=!0),e.pos+=t.length;else{f=document.createDocumentFragment();for(var p=0;;){u.lastIndex=p;var m=u.exec(t),h=m?m.index-p:t.length-p;if(h){var g=document.createTextNode(l.slice(p,p+h));o&&s<9?f.appendChild(k(`span`,[g])):f.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;p+=h+1;var _=void 0;if(m[0]==` `){var v=e.cm.options.tabSize,y=v-e.col%v;_=f.appendChild(k(`span`,ue(y),`cm-tab`)),_.setAttribute(`role`,`presentation`),_.setAttribute(`cm-text`,` `),e.col+=y}else m[0]==`\r`||m[0]==`
|
|
5
|
+
`?(_=f.appendChild(k(`span`,m[0]==`\r`?`␍`:``,`cm-invalidchar`)),_.setAttribute(`cm-text`,m[0]),e.col+=1):(_=e.cm.options.specialCharPlaceholder(m[0]),_.setAttribute(`cm-text`,m[0]),o&&s<9?f.appendChild(k(`span`,[_])):f.appendChild(_),e.col+=1);e.map.push(e.pos,e.pos+1,_),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,n||r||i||d||a||c){var b=n||``;r&&(b+=r),i&&(b+=i);var x=k(`span`,[f],b,a);if(c)for(var S in c)c.hasOwnProperty(S)&&S!=`style`&&S!=`class`&&x.setAttribute(S,c[S]);return e.content.appendChild(x)}e.content.appendChild(f)}}function wn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r=``,i=0;i<e.length;i++){var a=e.charAt(i);a==` `&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a=`\xA0`),r+=a,n=a==` `}return r}function Tn(e,t){return function(n,r,i,a,o,s,c){i=i?i+` cm-force-border`:`cm-force-border`;for(var l=n.pos,u=l+r.length;;){for(var d=void 0,f=0;f<t.length&&(d=t[f],!(d.to>l&&d.from<=l));f++);if(d.to>=u)return e(n,r,i,a,o,s,c);e(n,r.slice(0,d.to-l),i,a,null,s,c),a=null,r=r.slice(d.to-l),l=d.to}}}function En(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||=e.content.appendChild(document.createElement(`span`)),i.setAttribute(`cm-marker`,n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Dn(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var o=1;o<n.length;o+=2)t.addToken(t,i.slice(a,a=n[o]),bn(n[o+1],t.cm.options));return}for(var s=i.length,c=0,l=1,u=``,d,f,p=0,m,h,g,_,v;;){if(p==c){m=h=g=f=``,v=null,_=null,p=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var S=r[x],C=S.marker;if(C.type==`bookmark`&&S.from==c&&C.widgetNode)y.push(C);else if(S.from<=c&&(S.to==null||S.to>c||C.collapsed&&S.to==c&&S.from==c)){if(S.to!=null&&S.to!=c&&p>S.to&&(p=S.to,h=``),C.className&&(m+=` `+C.className),C.css&&(f=(f?f+`;`:``)+C.css),C.startStyle&&S.from==c&&(g+=` `+C.startStyle),C.endStyle&&S.to==p&&(b||=[]).push(C.endStyle,S.to),C.title&&((v||={}).title=C.title),C.attributes)for(var w in C.attributes)(v||={})[w]=C.attributes[w];C.collapsed&&(!_||Qt(_.marker,C)<0)&&(_=S)}else S.from>c&&p>S.from&&(p=S.from)}if(b)for(var T=0;T<b.length;T+=2)b[T+1]==p&&(h+=` `+b[T]);if(!_||_.from==c)for(var E=0;E<y.length;++E)En(t,0,y[E]);if(_&&(_.from||0)==c){if(En(t,(_.to==null?s+1:_.to)-c,_.marker,_.from==null),_.to==null)return;_.to==c&&(_=!1)}}if(c>=s)break;for(var D=Math.min(s,p);;){if(u){var O=c+u.length;if(!_){var k=O>D?u.slice(0,D-c):u;t.addToken(t,k,d?d+m:m,g,c+k.length==p?h:``,f,v)}if(O>=D){u=u.slice(D-c),c=D;break}c=O,g=``}u=i.slice(a,a=n[l++]),d=bn(n[l++],t.cm.options)}}}function On(e,t,n){this.line=t,this.rest=sn(t),this.size=this.rest?J(U(this.rest))-n+1:1,this.node=this.text=null,this.hidden=un(e,t)}function kn(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new On(e.doc,q(e.doc,a),a);i=a+o.size,r.push(o)}return r}var An=null;function jn(e){An?An.ops.push(e):e.ownsGroup=An={ops:[e],delayedCallbacks:[]}}function Mn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Nn(e,t){var n=e.ownsGroup;if(n)try{Mn(n)}finally{An=null,t(n)}}var Pn=null;function Fn(e,t){var n=De(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;An?i=An.delayedCallbacks:Pn?i=Pn:(i=Pn=[],setTimeout(In,0));for(var a=function(e){i.push(function(){return n[e].apply(null,r)})},o=0;o<n.length;++o)a(o)}}function In(){var e=Pn;Pn=null;for(var t=0;t<e.length;++t)e[t]()}function Ln(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a==`text`?Vn(e,t):a==`gutter`?Un(e,t,n,r):a==`class`?Hn(e,t):a==`widget`&&Wn(e,t,r)}t.changes=null}function Rn(e){return e.node==e.text&&(e.node=k(`div`,null,null,`position: relative`),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),o&&s<8&&(e.node.style.zIndex=2)),e.node}function zn(e,t){var n=t.bgClass?t.bgClass+` `+(t.line.bgClass||``):t.line.bgClass;if(n&&(n+=` CodeMirror-linebackground`),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Rn(t);t.background=r.insertBefore(k(`div`,null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):xn(e,t)}function Vn(e,t){var n=t.text.className,r=Bn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Hn(e,t)):n&&(t.text.className=n)}function Hn(e,t){zn(e,t),t.line.wrapClass?Rn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className=``);var n=t.textClass?t.textClass+` `+(t.line.textClass||``):t.line.textClass;t.text.className=n||``}function Un(e,t,n,r){if(t.gutter&&=(t.node.removeChild(t.gutter),null),t.gutterBackground&&=(t.node.removeChild(t.gutterBackground),null),t.line.gutterClass){var i=Rn(t);t.gutterBackground=k(`div`,null,`CodeMirror-gutter-background `+t.line.gutterClass,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px; width: `+r.gutterTotalWidth+`px`),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=Rn(t),s=t.gutter=k(`div`,null,`CodeMirror-gutter-wrapper`,`left: `+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+`px`);if(s.setAttribute(`aria-hidden`,`true`),e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=` `+t.line.gutterClass),e.options.lineNumbers&&(!a||!a[`CodeMirror-linenumbers`])&&(t.lineNumber=s.appendChild(k(`div`,pt(e.options,n),`CodeMirror-linenumber CodeMirror-gutter-elt`,`left: `+r.gutterLeft[`CodeMirror-linenumbers`]+`px; width: `+e.display.lineNumInnerWidth+`px`))),a)for(var c=0;c<e.display.gutterSpecs.length;++c){var l=e.display.gutterSpecs[c].className,u=a.hasOwnProperty(l)&&a[l];u&&s.appendChild(k(`div`,[u],`CodeMirror-gutter-elt`,`left: `+r.gutterLeft[l]+`px; width: `+r.gutterWidth[l]+`px`))}}}function Wn(e,t,n){t.alignable&&=null;for(var r=T(`CodeMirror-linewidget`),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Kn(e,t,n)}function Gn(e,t,n,r){var i=Bn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Hn(e,t),Un(e,t,n,r),Kn(e,t,r),t.node}function Kn(e,t,n){if(qn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)qn(e,t.rest[r],t,n,!1)}function qn(e,t,n,r,i){if(t.widgets)for(var a=Rn(n),o=0,s=t.widgets;o<s.length;++o){var c=s[o],l=k(`div`,[c.node],`CodeMirror-linewidget`+(c.className?` `+c.className:``));c.handleMouseEvents||l.setAttribute(`cm-ignore-events`,`true`),Jn(c,l,n,r),e.display.input.setUneditable(l),i&&c.above?a.insertBefore(l,n.gutter||n.text):a.appendChild(l),Fn(c,`redraw`)}}function Jn(e,t,n,r){if(e.noHScroll){(n.alignable||=[]).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+`px`,e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+`px`),t.style.width=i+`px`}e.coverGutter&&(t.style.zIndex=5,t.style.position=`relative`,e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+`px`))}function Yn(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!M(document.body,e.node)){var n=`position: relative;`;e.coverGutter&&(n+=`margin-left: -`+t.display.gutters.offsetWidth+`px;`),e.noHScroll&&(n+=`width: `+t.display.wrapper.clientWidth+`px;`),O(t.display.measure,k(`div`,[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Xn(e,t){for(var n=Re(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute(`cm-ignore-events`)==`true`||n.parentNode==e.sizer&&n!=e.mover)return!0}function Zn(e){return e.lineSpace.offsetTop}function Qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function $n(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=O(e.measure,k(`pre`,`x`,`CodeMirror-line-like`)),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function er(e){return ie-e.display.nativeBarWidth}function tr(e){return e.display.scroller.clientWidth-er(e)-e.display.barWidth}function nr(e){return e.display.scroller.clientHeight-er(e)-e.display.barHeight}function rr(e,t,n){var r=e.options.lineWrapping,i=r&&tr(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),s=0;s<o.length-1;s++){var c=o[s],l=o[s+1];Math.abs(c.bottom-l.bottom)>2&&a.push((c.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function ir(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(J(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function ar(e,t){t=an(t);var n=J(t),r=e.display.externalMeasured=new On(e.doc,t,n);r.lineN=n;var i=r.built=xn(e,r);return r.text=i.pre,O(e.display.lineMeasure,i.pre),r}function or(e,t,n,r){return lr(e,cr(e,t),n,r)}function sr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Hr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function cr(e,t){var n=J(t),r=sr(e,n);r&&!r.text?r=null:r&&r.changes&&(Ln(e,r,n,Lr(e)),e.curOp.forceUpdate=!0),r||=ar(e,t);var i=ir(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function lr(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||``),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||=t.view.text.getBoundingClientRect(),t.hasHeights||=(rr(e,t.view,t.rect),!0),o=pr(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ur={left:0,right:0,top:0,bottom:0};function dr(e,t,n){for(var r,i,a,o,s,c,l=0;l<e.length;l+=3)if(s=e[l],c=e[l+1],t<s?(i=0,a=1,o=`left`):t<c?(i=t-s,a=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(a=c-s,i=a-1,t>=c&&(o=`right`)),i!=null){if(r=e[l+2],s==c&&n==(r.insertLeft?`left`:`right`)&&(o=n),n==`left`&&i==0)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[(l-=3)+2],o=`left`;if(n==`right`&&i==c-s)for(;l<e.length-3&&e[l+3]==e[l+4]&&!e[l+5].insertLeft;)r=e[(l+=3)+2],o=`right`;break}return{node:r,start:i,end:a,collapse:o,coverStart:s,coverEnd:c}}function fr(e,t){var n=ur;if(t==`left`)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function pr(e,t,n,r){var i=dr(t.map,n,r),a=i.node,c=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var f=0;f<4;f++){for(;c&&be(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+l<i.coverEnd&&be(t.line.text.charAt(i.coverStart+l));)++l;if(d=o&&s<9&&c==0&&l==i.coverEnd-i.coverStart?a.parentNode.getBoundingClientRect():fr(j(a,c,l).getClientRects(),r),d.left||d.right||c==0)break;l=c,--c,u=`right`}o&&s<11&&(d=mr(e.display.measure,d))}else{c>0&&(u=r=`right`);var p;d=e.options.lineWrapping&&(p=a.getClientRects()).length>1?p[r==`right`?p.length-1:0]:a.getBoundingClientRect()}if(o&&s<9&&!c&&(!d||!d.left&&!d.right)){var m=a.parentNode.getClientRects()[0];d=m?{left:m.left,right:m.left+Ir(e.display),top:m.top,bottom:m.bottom}:ur}for(var h=d.top-t.rect.top,g=d.bottom-t.rect.top,_=(h+g)/2,v=t.view.measure.heights,y=0;y<v.length-1&&!(_<v[y]);y++);var b=y?v[y-1]:0,x=v[y],S={left:(u==`right`?d.right:d.left)-t.rect.left,right:(u==`left`?d.left:d.right)-t.rect.left,top:b,bottom:x};return!d.left&&!d.right&&(S.bogus=!0),e.options.singleCursorHeightPerLine||(S.rtop=h,S.rbottom=g),S}function mr(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ye(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function hr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function gr(e){e.display.externalMeasure=null,D(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)hr(e.display.view[t])}function _r(e){gr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function vr(e){return u&&_?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function yr(e){return u&&_?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function br(e){var t=an(e).widgets,n=0;if(t)for(var r=0;r<t.length;++r)t[r].above&&(n+=Yn(t[r]));return n}function xr(e,t,n,r,i){if(!i){var a=br(t);n.top+=a,n.bottom+=a}if(r==`line`)return n;r||=`local`;var o=fn(t);if(r==`local`?o+=Zn(e.display):o-=e.display.viewOffset,r==`page`||r==`window`){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(r==`window`?0:yr(F(e)));var c=s.left+(r==`window`?0:vr(F(e)));n.left+=c,n.right+=c}return n.top+=o,n.bottom+=o,n}function Sr(e,t,n){if(n==`div`)return t;var r=t.left,i=t.top;if(n==`page`)r-=vr(F(e)),i-=yr(F(e));else if(n==`local`||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function Cr(e,t,n,r,i){return r||=q(e.doc,t.line),xr(e,r,or(e,r,t.ch,i),n)}function wr(e,t,n,r,i,a){r||=q(e.doc,t.line),i||=cr(e,r);function o(t,o){var s=lr(e,i,t,o?`right`:`left`,a);return o?s.left=s.right:s.right=s.left,xr(e,r,s,n)}var s=G(r,e.doc.direction),c=t.ch,l=t.sticky;if(c>=r.text.length?(c=r.text.length,l=`before`):c<=0&&(c=0,l=`after`),!s)return o(l==`before`?c-1:c,l==`before`);function u(e,t,n){var r=s[t].level==1;return o(n?e-1:e,r!=n)}var d=we(s,c,l),f=Ce,p=u(c,d,l==`before`);return f!=null&&(p.other=u(c,f,l!=`before`)),p}function Tr(e,t){var n=0;t=Z(e.doc,t),e.options.lineWrapping||(n=Ir(e.display)*t.ch);var r=q(e.doc,t.line),i=fn(r)+Zn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Er(e,t,n,r,i){var a=Y(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Dr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Er(r.first,0,null,-1,-1);var i=dt(r,n),a=r.first+r.size-1;if(i>a)return Er(r.first+r.size-1,q(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=q(r,i);;){var s=jr(e,o,i,t,n),c=nn(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;o=q(r,i=l.line)}}function Or(e,t,n,r){r-=br(t);var i=t.text.length,a=xe(function(t){return lr(e,n,t-1).bottom<=r},i,0);return i=xe(function(t){return lr(e,n,t).top>r},a,i),{begin:a,end:i}}function kr(e,t,n,r){n||=cr(e,t);var i=xr(e,t,lr(e,n,r),`line`).top;return Or(e,t,n,i)}function Ar(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function jr(e,t,n,r,i){i-=fn(t);var a=cr(e,t),o=br(t),s=0,c=t.text.length,l=!0,u=G(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Nr:Mr)(e,t,n,a,u,r,i);l=d.level!=1,s=l?d.from:d.to-1,c=l?d.to:d.from-1}var f=null,p=null,m=xe(function(t){var n=lr(e,a,t);return n.top+=o,n.bottom+=o,Ar(n,r,i,!1)?(n.top<=i&&n.left<=r&&(f=t,p=n),!0):!1},s,c),h,g,_=!1;if(p){var v=r-p.left<p.right-r,y=v==l;m=f+(y?0:1),g=y?`after`:`before`,h=v?p.left:p.right}else{!l&&(m==c||m==s)&&m++,g=m==0?`after`:m==t.text.length?`before`:lr(e,a,m-(l?1:0)).bottom+o<=i==l?`after`:`before`;var b=wr(e,Y(n,m,g),`line`,t,a);h=b.left,_=i<b.top?-1:i>=b.bottom?1:0}return m=W(t.text,m,1),Er(n,m,g,_,r-h)}function Mr(e,t,n,r,i,a,o){var s=xe(function(s){var c=i[s],l=c.level!=1;return Ar(wr(e,Y(n,l?c.to:c.from,l?`before`:`after`),`line`,t,r),a,o,!0)},0,i.length-1),c=i[s];if(s>0){var l=c.level!=1,u=wr(e,Y(n,l?c.from:c.to,l?`after`:`before`),`line`,t,r);Ar(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function Nr(e,t,n,r,i,a,o){var s=Or(e,t,r,o),c=s.begin,l=s.end;/\s/.test(t.text.charAt(l-1))&&l--;for(var u=null,d=null,f=0;f<i.length;f++){var p=i[f];if(!(p.from>=l||p.to<=c)){var m=lr(e,r,p.level==1?Math.max(c,p.from):Math.min(l,p.to)-1).right,h=m<a?a-m+1e9:m-a;(!u||d>h)&&(u=p,d=h)}}return u||=i[i.length-1],u.from<c&&(u={from:c,to:u.to,level:u.level}),u.to>l&&(u={from:u.from,to:l,level:u.level}),u}var Pr;function Fr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Pr==null){Pr=k(`pre`,null,`CodeMirror-line-like`);for(var t=0;t<49;++t)Pr.appendChild(document.createTextNode(`x`)),Pr.appendChild(k(`br`));Pr.appendChild(document.createTextNode(`x`))}O(e.measure,Pr);var n=Pr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),D(e.measure),n||1}function Ir(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=k(`span`,`xxxxxxxxxx`),n=k(`pre`,[t],`CodeMirror-line-like`);O(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Lr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:Rr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Rr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zr(e){var t=Fr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Ir(e.display)-3);return function(i){if(un(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function Br(e){var t=e.doc,n=zr(e);t.iter(function(e){var t=n(e);t!=e.height&&ut(e,t)})}function Vr(e,t,n,r){var i=e.display;if(!n&&Re(t).getAttribute(`cm-not-content`)==`true`)return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch{return null}var c=Dr(e,a,o),l;if(r&&c.xRel>0&&(l=q(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=Y(c.line,Math.max(0,Math.round((a-$n(e.display).left)/Ir(e.display))-u))}return c}function Hr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Ur(e,t,n,r){t??=e.doc.first,n??=e.doc.first+e.doc.size,r||=0;var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)It&&cn(e.doc,t)<i.viewTo&&Gr(e);else if(n<=i.viewFrom)It&&ln(e.doc,n+r)>i.viewFrom?Gr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Gr(e);else if(t<=i.viewFrom){var a=Kr(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Gr(e)}else if(n>=i.viewTo){var o=Kr(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Gr(e)}else{var s=Kr(e,t,t,-1),c=Kr(e,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(kn(e,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):Gr(e)}var l=i.externalMeasured;l&&(n<l.lineN?l.lineN+=r:t<l.lineN+l.size&&(i.externalMeasured=null))}function Wr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Hr(e,t)];if(a.node!=null){var o=a.changes||=[];V(o,n)==-1&&o.push(n)}}}function Gr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Kr(e,t,n,r){var i=Hr(e,t),a,o=e.display.view;if(!It||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,c=0;c<i;c++)s+=o[c].size;if(s!=t){if(r>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,n+=a}for(;cn(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function qr(e,t,n){var r=e.display;r.view.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Hr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(kn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Hr(e,n)))),r.viewTo=n}function Jr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function Yr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Xr(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(!(!t&&s==n.sel.primIndex)){var c=n.sel.ranges[s];if(!(c.from().line>=e.display.viewTo||c.to().line<e.display.viewFrom)){var l=c.empty();if(o){var u=o(e,c);u&&Zr(e,u,i)}else (l||e.options.showCursorWhenSelecting)&&Zr(e,c.head,i);l||$r(e,c,a)}}return r}function Zr(e,t,n){var r=wr(e,t,`div`,null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor`));if(i.style.left=r.left+`px`,i.style.top=r.top+`px`,i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+`px`,/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Cr(e,t,`div`,null,null),o=a.right-a.left;i.style.width=(o>0?o:e.defaultCharWidth())+`px`}if(r.other){var s=n.appendChild(k(`div`,`\xA0`,`CodeMirror-cursor CodeMirror-secondarycursor`));s.style.display=``,s.style.left=r.other.left+`px`,s.style.top=r.other.top+`px`,s.style.height=(r.other.bottom-r.other.top)*.85+`px`}}function Qr(e,t){return e.top-t.top||e.left-t.left}function $r(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=$n(e.display),s=o.left,c=Math.max(r.sizerWidth,tr(e)-r.sizer.offsetLeft)-o.right,l=i.direction==`ltr`;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(k(`div`,null,`CodeMirror-selected`,`position: absolute; left: `+e+`px;
|
|
6
|
+
top: `+t+`px; width: `+(n??c-e)+`px;
|
|
7
|
+
height: `+(r-t)+`px`))}function d(t,n,r){var a=q(i,t),o=a.text.length,d,f;function p(n,r){return Cr(e,Y(t,n),`div`,a,r)}function m(t,n,r){var i=kr(e,a,null,t),o=n==`ltr`==(r==`after`)?`left`:`right`;return p(r==`after`?i.begin:i.end-(/\s/.test(a.text.charAt(i.end-1))?2:1),o)[o]}var h=G(a,i.direction);return Se(h,n||0,r??o,function(e,t,i,a){var g=i==`ltr`,_=p(e,g?`left`:`right`),v=p(t-1,g?`right`:`left`),y=n==null&&e==0,b=r==null&&t==o,x=a==0,S=!h||a==h.length-1;if(v.top-_.top<=3){var C=(l?y:b)&&x,w=(l?b:y)&&S,T=C?s:(g?_:v).left,E=w?c:(g?v:_).right;u(T,_.top,E-T,_.bottom)}else{var D,O,k,A;g?(D=l&&y&&x?s:_.left,O=l?c:m(e,i,`before`),k=l?s:m(t,i,`after`),A=l&&b&&S?c:v.right):(D=l?m(e,i,`before`):s,O=!l&&y&&x?c:_.right,k=!l&&b&&S?s:v.left,A=l?m(t,i,`after`):c),u(D,_.top,O-D,_.bottom),_.bottom<v.top&&u(s,_.bottom,null,v.top),u(k,v.top,A-k,v.bottom)}(!d||Qr(_,d)<0)&&(d=_),Qr(v,d)<0&&(d=v),(!f||Qr(_,f)<0)&&(f=_),Qr(v,f)<0&&(f=v)}),{start:d,end:f}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var m=q(i,f.line),h=q(i,p.line),g=an(m)==an(h),_=d(f.line,f.ch,g?m.text.length+1:null).end,v=d(p.line,g?0:null,p.ch).start;g&&(_.top<v.top-2?(u(_.right,_.top,null,_.bottom),u(s,v.top,v.left,v.bottom)):u(_.right,_.top,v.left-_.right,_.bottom)),_.bottom<v.top&&u(s,_.bottom,null,v.top)}n.appendChild(a)}function ei(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility=``,e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||ii(e),t.cursorDiv.style.visibility=(n=!n)?``:`hidden`},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility=`hidden`)}}function ti(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ri(e))}function ni(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ii(e))},100)}function ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!=`nocursor`&&(e.state.focused||(ke(e,`focus`,e,t),e.state.focused=!0,ee(e.display.wrapper,`CodeMirror-focused`),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),c&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ei(e))}function ii(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ke(e,`blur`,e,t),e.state.focused=!1,E(e.display.wrapper,`CodeMirror-focused`)),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function ai(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,c=0;c<t.view.length;c++){var l=t.view[c],u=e.options.lineWrapping,d=void 0,f=0;if(!l.hidden){if(i+=l.line.height,o&&s<8){var p=l.node.offsetTop+l.node.offsetHeight;d=p-n,n=p}else{var m=l.node.getBoundingClientRect();d=m.bottom-m.top,!u&&l.text.firstChild&&(f=l.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=l.line.height-d;if((h>.005||h<-.005)&&(i<r&&(a-=h),ut(l.line,d),oi(l.line),l.rest))for(var g=0;g<l.rest.length;g++)oi(l.rest[g]);if(f>e.display.sizerWidth){var _=Math.ceil(f/Ir(e.display));_>e.display.maxLineLength&&(e.display.maxLineLength=_,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function oi(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function si(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Zn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=dt(t,r),o=dt(t,i);if(n&&n.ensure){var s=n.ensure.from.line,c=n.ensure.to.line;s<a?(a=s,o=dt(t,fn(q(t,s))+e.wrapper.clientHeight)):Math.min(c,t.lastLine())>=o&&(a=dt(t,fn(q(t,c))-e.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function ci(e,t){if(!Ae(e,`scrollCursorIntoView`)){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!h){var o=k(`div`,``,null,`position: absolute;
|
|
8
|
+
top: `+(t.top-n.viewOffset-Zn(e.display))+`px;
|
|
9
|
+
height: `+(t.bottom-t.top+er(e)+n.barHeight)+`px;
|
|
10
|
+
left: `+t.left+`px; width: `+Math.max(2,t.right-t.left)+`px;`);e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function li(e,t,n,r){r??=0;var i;!e.options.lineWrapping&&t==n&&(n=t.sticky==`before`?Y(t.line,t.ch+1,`before`):t,t=t.ch?Y(t.line,t.sticky==`before`?t.ch-1:t.ch,`after`):t);for(var a=0;a<5;a++){var o=!1,s=wr(e,t),c=!n||n==t?s:wr(e,n);i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r};var l=di(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(l.scrollTop!=null&&(vi(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),l.scrollLeft!=null&&(bi(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(o=!0)),!o)break}return i}function ui(e,t){var n=di(e,t);n.scrollTop!=null&&vi(e,n.scrollTop),n.scrollLeft!=null&&bi(e,n.scrollLeft)}function di(e,t){var n=e.display,r=Fr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=nr(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+Qn(n),c=t.top<r,l=t.bottom>s-r;if(t.top<i)o.scrollTop=c?0:t.top;else if(t.bottom>i+a){var u=Math.min(t.top,(l?s:t.bottom)-a);u!=i&&(o.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=tr(e)-n.gutters.offsetWidth,m=t.right-t.left>p;return m&&(t.right=t.left+p),t.left<10?o.scrollLeft=0:t.left<f?o.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>p+f-3&&(o.scrollLeft=t.right+(m?0:10)-p),o}function fi(e,t){t!=null&&(gi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function pi(e){gi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mi(e,t,n){(t!=null||n!=null)&&gi(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function hi(e,t){gi(e),e.curOp.scrollToPos=t}function gi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,_i(e,Tr(e,t.from),Tr(e,t.to),t.margin))}function _i(e,t,n,r){var i=di(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mi(e,i.scrollLeft,i.scrollTop)}function vi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Yi(e,{top:t}),yi(e,t,!0),n&&Yi(e),Vi(e,100))}function yi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function bi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,$i(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+er(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Si=function(e,t,n){this.cm=n;var r=this.vert=k(`div`,[k(`div`,null,null,`min-width: 1px`)],`CodeMirror-vscrollbar`),i=this.horiz=k(`div`,[k(`div`,null,null,`height: 100%; min-height: 1px`)],`CodeMirror-hscrollbar`);r.tabIndex=i.tabIndex=-1,e(r),e(i),K(r,`scroll`,function(){r.clientHeight&&t(r.scrollTop,`vertical`)}),K(i,`scroll`,function(){i.clientWidth&&t(i.scrollLeft,`horizontal`)}),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth=`18px`)};Si.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display=`block`,this.vert.style.bottom=t?r+`px`:`0`;var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+`px`}else this.vert.scrollTop=0,this.vert.style.display=``,this.vert.firstChild.style.height=`0`;if(t){this.horiz.style.display=`block`,this.horiz.style.right=n?r+`px`:`0`,this.horiz.style.left=e.barLeft+`px`;var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+`px`}else this.horiz.style.display=``,this.horiz.firstChild.style.width=`0`;return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Si.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,`horiz`)},Si.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,`vert`)},Si.prototype.zeroWidthHack=function(){var e=y&&!m?`12px`:`18px`;this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility=`hidden`,this.disableHoriz=new re,this.disableVert=new re},Si.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility=``;function r(){var i=e.getBoundingClientRect();(n==`vert`?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))==e?t.set(1e3,r):e.style.visibility=`hidden`}t.set(1e3,r)},Si.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ci=function(){};Ci.prototype.update=function(){return{bottom:0,right:0}},Ci.prototype.setScrollLeft=function(){},Ci.prototype.setScrollTop=function(){},Ci.prototype.clear=function(){};function wi(e,t){t||=xi(e);var n=e.display.barWidth,r=e.display.barHeight;Ti(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&ai(e),Ti(e,xi(e)),n=e.display.barWidth,r=e.display.barHeight}function Ti(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+`px`,n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+`px`,n.heightForcer.style.borderBottom=r.bottom+`px solid transparent`,r.right&&r.bottom?(n.scrollbarFiller.style.display=`block`,n.scrollbarFiller.style.height=r.bottom+`px`,n.scrollbarFiller.style.width=r.right+`px`):n.scrollbarFiller.style.display=``,r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display=`block`,n.gutterFiller.style.height=r.bottom+`px`,n.gutterFiller.style.width=t.gutterWidth+`px`):n.gutterFiller.style.display=``}var Ei={native:Si,null:Ci};function Di(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Ei[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),K(t,`mousedown`,function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute(`cm-not-content`,`true`)},function(t,n){n==`horizontal`?bi(e,t):vi(e,t)},e),e.display.scrollbars.addClass&&ee(e.display.wrapper,e.display.scrollbars.addClass)}var Oi=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++Oi,markArrays:null},jn(e.curOp)}function Ai(e){var t=e.curOp;t&&Nn(t,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;ji(e)})}function ji(e){for(var t=e.ops,n=0;n<t.length;n++)Mi(t[n]);for(var r=0;r<t.length;r++)Ni(t[r]);for(var i=0;i<t.length;i++)Pi(t[i]);for(var a=0;a<t.length;a++)Fi(t[a]);for(var o=0;o<t.length;o++)Ii(t[o])}function Mi(e){var t=e.cm,n=t.display;Wi(t),e.updateMaxLine&&mn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ui(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ni(e){e.updatedDisplay=e.mustUpdate&&qi(e.cm,e.update)}function Pi(e){var t=e.cm,n=t.display;e.updatedDisplay&&ai(t),e.barMeasure=xi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=or(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+er(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Fi(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+`px`,e.maxScrollLeft<t.doc.scrollLeft&&bi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(ne(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&wi(t,e.barMeasure),e.updatedDisplay&&Qi(t,e.barMeasure),e.selectionChanged&&ei(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&ti(e.cm)}function Ii(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Ji(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&yi(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&bi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ci(t,li(t,Z(r,e.scrollToPos.from),Z(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(i)for(var o=0;o<i.length;++o)i[o].lines.length||ke(i[o],`hide`);if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ke(a[s],`unhide`);n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ke(t,`changes`,t,e.changeObjs),e.update&&e.update.finish()}function Li(e,t){if(e.curOp)return t();ki(e);try{return t()}finally{Ai(e)}}function Ri(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ki(e);try{return t.apply(e,arguments)}finally{Ai(e)}}}function zi(e){return function(){if(this.curOp)return e.apply(this,arguments);ki(this);try{return e.apply(this,arguments)}finally{Ai(this)}}}function Bi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ki(t);try{return e.apply(this,arguments)}finally{Ai(t)}}}function Vi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(Hi,e))}function Hi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Tt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,s=a.text.length>e.options.maxHighlightLength?it(t.mode,r.state):null,c=Ct(e,a,r,!0);s&&(r.state=s),a.styles=c.styles;var l=a.styleClasses,u=c.classes;u?a.styleClasses=u:l&&(a.styleClasses=null);for(var d=!o||o.length!=a.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!d&&f<o.length;++f)d=o[f]!=a.styles[f];d&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Et(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Vi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Li(e,function(){for(var t=0;t<i.length;t++)Wr(e,i[t],`text`)})}}var Ui=function(e,t,n){var r=e.display;this.viewport=t,this.visible=si(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=tr(e),this.force=n,this.dims=Lr(e),this.events=[]};Ui.prototype.signal=function(e,t){Me(e,t)&&this.events.push(arguments)},Ui.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ke.apply(null,this.events[e])};function Wi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=er(e)+`px`,t.sizer.style.marginBottom=-t.nativeBarWidth+`px`,t.sizer.style.borderRightWidth=er(e)+`px`,t.scrollbarsClipped=!0)}function Gi(e){if(e.hasFocus())return null;var t=N(ne(e));if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=L(e).getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Ki(e){if(!(!e||!e.activeElt||e.activeElt==N(I(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function qi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Gr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Jr(e)==0)return!1;ea(e)&&(Gr(e),t.dims=Lr(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),It&&(a=cn(e.doc,a),o=ln(e.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;qr(e,a,o),n.viewOffset=fn(q(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+`px`;var c=Jr(e);if(!s&&c==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var l=Gi(e);return c>4&&(n.lineDiv.style.display=`none`),Xi(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=``),n.renderedView=n.view,Ki(l),D(n.cursorDiv),D(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Vi(e,400)),n.updateLineNumbers=null,!0}function Ji(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==tr(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+Qn(e.display)-nr(e),n.top)}),t.visible=si(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=si(e.display,e.doc,n));if(!qi(e,t))break;ai(e);var i=xi(e);Yr(e),wi(e,i),Qi(e,i),t.force=!1}t.signal(e,`update`,e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,`viewportChange`,e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Yi(e,t){var n=new Ui(e,t);if(qi(e,n)){ai(e),Ji(e,n);var r=xi(e);Yr(e),wi(e,r),Qi(e,r),n.finish()}}function Xi(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(t){var n=t.nextSibling;return c&&y&&e.display.currentWheelTarget==t?t.style.display=`none`:t.parentNode.removeChild(t),n}for(var l=r.view,u=r.viewFrom,d=0;d<l.length;d++){var f=l[d];if(!f.hidden)if(!f.node||f.node.parentNode!=a){var p=Gn(e,f,u,n);a.insertBefore(p,o)}else{for(;o!=f.node;)o=s(o);var m=i&&t!=null&&t<=u&&f.lineNumber;f.changes&&(V(f.changes,`gutter`)>-1&&(m=!1),Ln(e,f,u,n)),m&&(D(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(pt(e.options,u)))),o=f.node.nextSibling}u+=f.size}for(;o;)o=s(o)}function Zi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+`px`,Fn(e,`gutterChanged`,e)}function Qi(e,t){e.display.sizer.style.minHeight=t.docHeight+`px`,e.display.heightForcer.style.top=t.docHeight+`px`,e.display.gutters.style.height=t.docHeight+e.display.barHeight+er(e)+`px`}function $i(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Rr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+`px`,o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var s=n[o].alignable;if(s)for(var c=0;c<s.length;c++)s[c].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+`px`)}}function ea(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=pt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(k(`div`,[k(`div`,n)],`CodeMirror-linenumber CodeMirror-gutter-elt`)),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width=``,r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+`px`,Zi(e.display),!0}return!1}function ta(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!=`string`&&(o=a.style,a=a.className),a==`CodeMirror-linenumbers`)if(t)r=!0;else continue;n.push({className:a,style:o})}return t&&!r&&n.push({className:`CodeMirror-linenumbers`,style:null}),n}function na(e){var t=e.gutters,n=e.gutterSpecs;D(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,s=t.appendChild(k(`div`,null,`CodeMirror-gutter `+a));o&&(s.style.cssText=o),a==`CodeMirror-linenumbers`&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+`px`)}t.style.display=n.length?``:`none`,Zi(e)}function ra(e){na(e.display),Ur(e),$i(e)}function ia(e,t,r,i){var a=this;this.input=r,a.scrollbarFiller=k(`div`,null,`CodeMirror-scrollbar-filler`),a.scrollbarFiller.setAttribute(`cm-not-content`,`true`),a.gutterFiller=k(`div`,null,`CodeMirror-gutter-filler`),a.gutterFiller.setAttribute(`cm-not-content`,`true`),a.lineDiv=A(`div`,null,`CodeMirror-code`),a.selectionDiv=k(`div`,null,null,`position: relative; z-index: 1`),a.cursorDiv=k(`div`,null,`CodeMirror-cursors`),a.measure=k(`div`,null,`CodeMirror-measure`),a.lineMeasure=k(`div`,null,`CodeMirror-measure`),a.lineSpace=A(`div`,[a.measure,a.lineMeasure,a.selectionDiv,a.cursorDiv,a.lineDiv],null,`position: relative; outline: none`),a.mover=k(`div`,[A(`div`,[a.lineSpace],`CodeMirror-lines`)],null,`position: relative`),a.sizer=k(`div`,[a.mover],`CodeMirror-sizer`),a.sizerWidth=null,a.heightForcer=k(`div`,null,null,`position: absolute; height: `+ie+`px; width: 1px;`),a.gutters=k(`div`,null,`CodeMirror-gutters`),a.lineGutter=null,a.scroller=k(`div`,[a.sizer,a.heightForcer,a.gutters],`CodeMirror-scroll`),a.scroller.setAttribute(`tabIndex`,`-1`),a.wrapper=k(`div`,[a.scrollbarFiller,a.gutterFiller,a.scroller],`CodeMirror`),u&&d===105&&(a.wrapper.style.clipPath=`inset(0px)`),a.wrapper.setAttribute(`translate`,`no`),o&&s<8&&(a.gutters.style.zIndex=-1,a.scroller.style.paddingRight=0),!c&&!(n&&v)&&(a.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(a.wrapper):e(a.wrapper)),a.viewFrom=a.viewTo=t.first,a.reportedViewFrom=a.reportedViewTo=t.first,a.view=[],a.renderedView=null,a.externalMeasured=null,a.viewOffset=0,a.lastWrapHeight=a.lastWrapWidth=0,a.updateLineNumbers=null,a.nativeBarWidth=a.barHeight=a.barWidth=0,a.scrollbarsClipped=!1,a.lineNumWidth=a.lineNumInnerWidth=a.lineNumChars=null,a.alignWidgets=!1,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=null,a.maxLine=null,a.maxLineLength=0,a.maxLineChanged=!1,a.wheelDX=a.wheelDY=a.wheelStartX=a.wheelStartY=null,a.shift=!1,a.selForContextMenu=null,a.activeTouch=null,a.gutterSpecs=ta(i.gutters,i.lineNumbers),na(a),r.init(a)}var aa=0,oa=null;o?oa=-.53:n?oa=15:u?oa=-.7:p&&(oa=-1/3);function sa(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n??=e.wheelDelta,{x:t,y:n}}function ca(e){var t=sa(e);return t.x*=oa,t.y*=oa,t}function la(e,t){u&&d==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents=`none`:clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=``},100));var r=sa(t),i=r.x,a=r.y,o=oa;t.deltaMode===0&&(i=t.deltaX,a=t.deltaY,o=1);var s=e.display,l=s.scroller,p=l.scrollWidth>l.clientWidth,m=l.scrollHeight>l.clientHeight;if(i&&p||a&&m){if(a&&y&&c){outer:for(var h=t.target,g=s.view;h!=l;h=h.parentNode)for(var _=0;_<g.length;_++)if(g[_].node==h){e.display.currentWheelTarget=h;break outer}}if(i&&!n&&!f&&o!=null){a&&m&&vi(e,Math.max(0,l.scrollTop+a*o)),bi(e,Math.max(0,l.scrollLeft+i*o)),(!a||a&&m)&&Pe(t),s.wheelStartX=null;return}if(a&&o!=null){var v=a*o,b=e.doc.scrollTop,x=b+s.wrapper.clientHeight;v<0?b=Math.max(0,b+v-50):x=Math.min(e.doc.height,x+v+50),Yi(e,{top:b,bottom:x})}aa<20&&t.deltaMode!==0&&(s.wheelStartX==null?(s.wheelStartX=l.scrollLeft,s.wheelStartY=l.scrollTop,s.wheelDX=i,s.wheelDY=a,setTimeout(function(){if(s.wheelStartX!=null){var e=l.scrollLeft-s.wheelStartX,t=l.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(oa=(oa*aa+n)/(aa+1),++aa)}},200)):(s.wheelDX+=i,s.wheelDY+=a))}}var ua=function(e,t){this.ranges=e,this.primIndex=t};ua.prototype.primary=function(){return this.ranges[this.primIndex]},ua.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!mt(n.anchor,r.anchor)||!mt(n.head,r.head))return!1}return!0},ua.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Q(ht(this.ranges[t].anchor),ht(this.ranges[t].head));return new ua(e,this.primIndex)},ua.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ua.prototype.contains=function(e,t){t||=e;for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(X(t,r.from())>=0&&X(e,r.to())<=0)return n}return-1};var Q=function(e,t){this.anchor=e,this.head=t};Q.prototype.from=function(){return _t(this.anchor,this.head)},Q.prototype.to=function(){return gt(this.anchor,this.head)},Q.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function da(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return X(e.from(),t.from())}),n=V(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],c=X(s.to(),o.from());if(r&&!o.empty()?c>0:c>=0){var l=_t(s.from(),o.from()),u=gt(s.to(),o.to()),d=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,t.splice(--a,2,new Q(d?u:l,d?l:u))}}return new ua(t,n)}function fa(e,t){return new ua([new Q(e,t||e)],0)}function pa(e){return e.text?Y(e.from.line+e.text.length-1,U(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function ma(e,t){if(X(e,t.from)<0)return e;if(X(e,t.to)<=0)return pa(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=pa(t).ch-t.to.ch),Y(n,r)}function ha(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Q(ma(i.anchor,t),ma(i.head,t)))}return da(e.cm,n,e.sel.primIndex)}function ga(e,t,n){return e.line==t.line?Y(n.line,e.ch-t.ch+n.ch):Y(n.line+(e.line-t.line),e.ch)}function _a(e,t,n){for(var r=[],i=Y(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],c=ga(s.from,i,a),l=ga(pa(s),i,a);if(i=s.to,a=l,n==`around`){var u=e.sel.ranges[o],d=X(u.head,u.anchor)<0;r[o]=new Q(d?l:c,d?c:l)}else r[o]=new Q(c,c)}return new ua(r,e.sel.primIndex)}function va(e){e.doc.mode=tt(e.options,e.doc.modeOption),ya(e)}function ya(e){e.doc.iter(function(e){e.stateAfter&&=null,e.styles&&=null}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Vi(e,100),e.state.modeGen++,e.curOp&&Ur(e)}function ba(e,t){return t.from.ch==0&&t.to.ch==0&&U(t.text)==``&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function xa(e,t,n,r){function i(e){return n?n[e]:null}function a(e,n,i){gn(e,n,i,r),Fn(e,`change`,e,t)}function o(e,t){for(var n=[],a=e;a<t;++a)n.push(new hn(l[a],i(a),r));return n}var s=t.from,c=t.to,l=t.text,u=q(e,s.line),d=q(e,c.line),f=U(l),p=i(l.length-1),m=c.line-s.line;if(t.full)e.insert(0,o(0,l.length)),e.remove(l.length,e.size-l.length);else if(ba(e,t)){var h=o(0,l.length-1);a(d,d.text,p),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(l.length==1)a(u,u.text.slice(0,s.ch)+f+u.text.slice(c.ch),p);else{var g=o(1,l.length-1);g.push(new hn(f+u.text.slice(c.ch),p,r)),a(u,u.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,g)}else if(l.length==1)a(u,u.text.slice(0,s.ch)+l[0]+d.text.slice(c.ch),i(0)),e.remove(s.line+1,m);else{a(u,u.text.slice(0,s.ch)+l[0],i(0)),a(d,f+d.text.slice(c.ch),p);var _=o(1,l.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,_)}Fn(e,`change`,e,t)}function Sa(e,t,n){function r(e,i,a){if(e.linked)for(var o=0;o<e.linked.length;++o){var s=e.linked[o];if(s.doc!=i){var c=a&&s.sharedHist;n&&!c||(t(s.doc,c),r(s.doc,e,c))}}}r(e,null,!0)}function Ca(e,t){if(t.cm)throw Error(`This document is already in use.`);e.doc=t,t.cm=e,Br(e),va(e),wa(e),e.options.direction=t.direction,e.options.lineWrapping||mn(e),e.options.mode=t.modeOption,Ur(e)}function wa(e){(e.doc.direction==`rtl`?ee:E)(e.display.lineDiv,`CodeMirror-rtl`)}function Ta(e){Li(e,function(){wa(e),Ur(e)})}function Ea(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Da(e,t){var n={from:ht(t.from),to:pa(t),text:ct(e,t.from,t.to)};return Pa(e,n,t.from.line,t.to.line+1),Sa(e,function(e){return Pa(e,n,t.from.line,t.to.line+1)},!0),n}function Oa(e){for(;e.length&&U(e).ranges;)e.pop()}function ka(e,t){if(t)return Oa(e.done),U(e.done);if(e.done.length&&!U(e.done).ranges)return U(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),U(e.done)}function Aa(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,o,s;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)==`+`&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)==`*`))&&(o=ka(i,i.lastOp==r)))s=U(o.changes),X(t.from,t.to)==0&&X(t.from,s.to)==0?s.to=pa(t):o.changes.push(Da(e,t));else{var c=U(i.done);for((!c||!c.ranges)&&Na(e.sel,i.done),o={changes:[Da(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ke(e,`historyAdded`)}function ja(e,t,n,r){var i=t.charAt(0);return i==`*`||i==`+`&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ma(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ja(e,a,U(i.done),t))?i.done[i.done.length-1]=t:Na(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&Oa(i.undone)}function Na(e,t){var n=U(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Pa(e,t,n,r){var i=t[`spans_`+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||=t[`spans_`+e.id]={})[a]=n.markedSpans),++a})}function Fa(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||=e.slice(0,n):t&&t.push(e[n]);return t?t.length?t:null:e}function Ia(e,t){var n=t[`spans_`+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Fa(n[i]));return r}function La(e,t){var n=Ia(e,t),r=Gt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)spans:for(var s=0;s<o.length;++s){for(var c=o[s],l=0;l<a.length;++l)if(a[l].marker==c.marker)continue spans;a.push(c)}else o&&(n[i]=o)}return n}function Ra(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?ua.prototype.deepCopy.call(a):a);continue}var o=a.changes,s=[];r.push({changes:s});for(var c=0;c<o.length;++c){var l=o[c],u=void 0;if(s.push({from:l.from,to:l.to,text:l.text}),t)for(var d in l)(u=d.match(/^spans_(\d+)$/))&&V(t,Number(u[1]))>-1&&(U(s)[d]=l[d],delete l[d])}}return r}function za(e,t,n,r){if(r){var i=e.anchor;if(n){var a=X(t,i)<0;a==X(n,i)<0?a!=X(t,n)<0&&(t=n):(i=t,t=n)}return new Q(i,t)}else return new Q(n||t,t)}function Ba(e,t,n,r,i){i??=e.cm&&(e.cm.display.shift||e.extend),Ka(e,new ua([za(e.sel.primary(),t,n,i)],0),r)}function Va(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=za(e.sel.ranges[a],t[a],null,i);Ka(e,da(e.cm,r,e.sel.primIndex),n)}function Ha(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ka(e,da(e.cm,i,e.sel.primIndex),r)}function Ua(e,t,n,r){Ka(e,fa(t,n),r)}function Wa(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Q(Z(e,t[n].anchor),Z(e,t[n].head))},origin:n&&n.origin};return ke(e,`beforeSelectionChange`,e,r),e.cm&&ke(e.cm,`beforeSelectionChange`,e.cm,r),r.ranges==t.ranges?t:da(e.cm,r.ranges,r.ranges.length-1)}function Ga(e,t,n){var r=e.history.done,i=U(r);i&&i.ranges?(r[r.length-1]=t,qa(e,t,n)):Ka(e,t,n)}function Ka(e,t,n){qa(e,t,n),Ma(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function qa(e,t,n){(Me(e,`beforeSelectionChange`)||e.cm&&Me(e.cm,`beforeSelectionChange`))&&(t=Wa(e,t,n));var r=n&&n.bias||(X(t.primary().head,e.sel.primary().head)<0?-1:1);Ja(e,Xa(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption(`readOnly`)!=`nocursor`&&pi(e.cm)}function Ja(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,je(e.cm)),Fn(e,`cursorActivity`,e))}function Ya(e){Ja(e,Xa(e,e.sel,null,!1))}function Xa(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],c=Qa(e,o.anchor,s&&s.anchor,n,r),l=o.head==o.anchor?c:Qa(e,o.head,s&&s.head,n,r);(i||c!=o.anchor||l!=o.head)&&(i||=t.ranges.slice(0,a),i[a]=new Q(c,l))}return i?da(e.cm,i,t.primIndex):t}function Za(e,t,n,r,i){var a=q(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],c=s.marker,l=`selectLeft`in c?!c.selectLeft:c.inclusiveLeft,u=`selectRight`in c?!c.selectRight:c.inclusiveRight;if((s.from==null||(l?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ke(c,`beforeCursorEnter`),c.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!c.atomic)continue;if(n){var d=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(d=$a(e,d,-r,d&&d.line==t.line?a:null)),d&&d.line==t.line&&(f=X(d,n))&&(r<0?f<0:f>0))return Za(e,d,t,r,i)}var p=c.find(r<0?-1:1);return(r<0?l:u)&&(p=$a(e,p,r,p.line==t.line?a:null)),p?Za(e,p,t,r,i):null}}return t}function Qa(e,t,n,r,i){var a=r||1;return Za(e,t,n,a,i)||!i&&Za(e,t,n,a,!0)||Za(e,t,n,-a,i)||!i&&Za(e,t,n,-a,!0)||(e.cantEdit=!0,Y(e.first,0))}function $a(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Z(e,Y(t.line-1)):null:n>0&&t.ch==(r||q(e,t.line)).text.length?t.line<e.first+e.size-1?Y(t.line+1,0):null:new Y(t.line,t.ch+n)}function eo(e){e.setSelection(Y(e.firstLine(),0),Y(e.lastLine()),H)}function to(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,a){t&&(r.from=Z(e,t)),n&&(r.to=Z(e,n)),i&&(r.text=i),a!==void 0&&(r.origin=a)}),ke(e,`beforeChange`,e,r),e.cm&&ke(e.cm,`beforeChange`,e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function no(e,t,n){if(e.cm){if(!e.cm.curOp)return Ri(e.cm,no)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((Me(e,`beforeChange`)||e.cm&&Me(e.cm,`beforeChange`))&&(t=to(e,t,!0),!t))){var r=Ft&&!n&&qt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)ro(e,{from:r[i].from,to:r[i].to,text:i?[``]:t.text,origin:t.origin});else ro(e,t)}}function ro(e,t){if(!(t.text.length==1&&t.text[0]==``&&X(t.from,t.to)==0)){var n=ha(e,t);Aa(e,t,n,e.cm?e.cm.curOp.id:NaN),oo(e,t,n,Gt(e,t));var r=[];Sa(e,function(e,n){!n&&V(r,e.history)==-1&&(fo(e.history,t),r.push(e.history)),oo(e,t,null,Gt(e,t))})}}function io(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,o=e.sel,s=t==`undo`?i.done:i.undone,c=t==`undo`?i.undone:i.done,l=0;l<s.length&&(a=s[l],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));l++);if(l!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Na(a,c),n&&!a.equals(e.sel)){Ka(e,a,{clearRedo:!1});return}o=a}else if(r){s.push(a);return}else break;var u=[];Na(o,c),c.push({changes:u,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var d=Me(e,`beforeChange`)||e.cm&&Me(e.cm,`beforeChange`),f=function(n){var r=a.changes[n];if(r.origin=t,d&&!to(e,r,!1))return s.length=0,{};u.push(Da(e,r)),oo(e,r,n?ha(e,r):U(s),La(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:pa(r)});var i=[];Sa(e,function(e,t){!t&&V(i,e.history)==-1&&(fo(e.history,r),i.push(e.history)),oo(e,r,null,La(e,r))})},p=a.changes.length-1;p>=0;--p){var m=f(p);if(m)return m.v}}}}function ao(e,t){if(t!=0&&(e.first+=t,e.sel=new ua(de(e.sel.ranges,function(e){return new Q(Y(e.anchor.line+t,e.anchor.ch),Y(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Ur(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Wr(e.cm,r,`gutter`)}}function oo(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ri(e.cm,oo)(e,t,n,r);if(t.to.line<e.first){ao(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ao(e,i),t={from:Y(e.first,0),to:Y(t.to.line+i,t.to.ch),text:[U(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Y(a,q(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ct(e,t.from,t.to),n||=ha(e,t),e.cm?so(e.cm,t,r):xa(e,t,r),qa(e,n,H),e.cantEdit&&Qa(e,Y(e.firstLine(),0))&&(e.cantEdit=!1)}}function so(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=J(an(q(r,a.line))),r.iter(c,o.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&je(e),xa(r,t,n,zr(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=pn(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),Pt(r,a.line),Vi(e,400);var l=t.text.length-(o.line-a.line)-1;t.full?Ur(e):a.line==o.line&&t.text.length==1&&!ba(e.doc,t)?Wr(e,a.line,`text`):Ur(e,a.line,o.line+1,l);var u=Me(e,`changes`),d=Me(e,`change`);if(d||u){var f={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};d&&Fn(e,`change`,e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function co(e,t,n,r,i){var a;r||=n,X(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t==`string`&&(t=e.splitLines(t)),no(e,{from:n,to:r,text:t,origin:i})}function lo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function uo(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var s=0;s<a.ranges.length;s++)lo(a.ranges[s].anchor,t,n,r),lo(a.ranges[s].head,t,n,r);continue}for(var c=0;c<a.changes.length;++c){var l=a.changes[c];if(n<l.from.line)l.from=Y(l.from.line+r,l.from.ch),l.to=Y(l.to.line+r,l.to.ch);else if(t<=l.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function fo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;uo(e.done,n,r,i),uo(e.undone,n,r,i)}function po(e,t,n,r){var i=t,a=t;return typeof t==`number`?a=q(e,vt(e,t)):i=J(t),i==null?null:(r(a,i)&&e.cm&&Wr(e.cm,i,n),a)}function mo(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}mo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,_n(i),Fn(i,`delete`)}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function ho(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}ho.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof mo))){var s=[];this.collapse(s),this.children=[new mo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,s=o;s<i.lines.length;){var c=new mo(i.lines.slice(s,s+=25));i.height-=c.height,this.children.splice(++r,0,c),c.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ho(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=V(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ho(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var go=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};go.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=J(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=Yn(this);ut(n,Math.max(0,n.height-a)),e&&(Li(e,function(){_o(e,n,-a),Wr(e,r,`widget`)}),Fn(e,`lineWidgetCleared`,e,this,r))}},go.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Yn(this)-t;i&&(un(this.doc,r)||ut(r,r.height+i),n&&Li(n,function(){n.curOp.forceUpdate=!0,_o(n,r,i),Fn(n,`lineWidgetChanged`,n,e,J(r))}))},Ne(go);function _o(e,t,n){fn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&fi(e,n)}function vo(e,t,n,r){var i=new go(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),po(e,t,`widget`,function(t){var n=t.widgets||=[];if(i.insertAt==null?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,a&&!un(e,t)){var r=fn(t)<e.scrollTop;ut(t,t.height+Yn(i)),r&&fi(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Fn(a,`lineWidgetAdded`,a,i,typeof t==`number`?t:J(t)),i}var yo=0,bo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++yo};bo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),Me(this,`clear`)){var n=this.find();n&&Fn(this,`clear`,n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Bt(o.markedSpans,this);e&&!this.collapsed?Wr(e,J(o),`text`):e&&(s.to!=null&&(i=J(o)),s.from!=null&&(r=J(o))),o.markedSpans=Vt(o.markedSpans,s),s.from==null&&this.collapsed&&!un(this.doc,o)&&e&&ut(o,Fr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var c=0;c<this.lines.length;++c){var l=an(this.lines[c]),u=pn(l);u>e.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Ur(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ya(e.doc)),e&&Fn(e,`markerCleared`,e,this,r,i),t&&Ai(e),this.parent&&this.parent.clear()}},bo.prototype.find=function(e,t){e==null&&this.type==`bookmark`&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var a=this.lines[i],o=Bt(a.markedSpans,this);if(o.from!=null&&(n=Y(t?a:J(a),o.from),e==-1))return n;if(o.to!=null&&(r=Y(t?a:J(a),o.to),e==1))return r}return n&&{from:n,to:r}},bo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Li(r,function(){var i=t.line,a=sr(r,J(t.line));if(a&&(hr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!un(n.doc,i)&&n.height!=null){var o=n.height;n.height=null;var s=Yn(n)-o;s&&ut(i,i.height+s)}Fn(r,`markerChanged`,r,e)})},bo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||V(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||=[]).push(this)}this.lines.push(e)},bo.prototype.detachLine=function(e){if(this.lines.splice(V(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||=[]).push(this)}},Ne(bo);function xo(e,t,n,r,i){if(r&&r.shared)return Co(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ri(e.cm,xo)(e,t,n,r,i);var a=new bo(e,i),o=X(t,n);if(r&&z(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=A(`span`,[a.replacedWith],`CodeMirror-widget`),r.handleMouseEvents||a.widgetNode.setAttribute(`cm-ignore-events`,`true`),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(rn(e,t.line,t,n,a)||t.line!=n.line&&rn(e,n.line,t,n,a))throw Error(`Inserting collapsed marker partially overlapping an existing one`);Rt()}a.addToHistory&&Aa(e,{from:t,to:n,origin:`markText`},e.sel,NaN);var s=t.line,c=e.cm,l;if(e.iter(s,n.line+1,function(r){c&&a.collapsed&&!c.options.lineWrapping&&an(r)==c.display.maxLine&&(l=!0),a.collapsed&&s!=t.line&&ut(r,0),Ht(r,new zt(a,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s}),a.collapsed&&e.iter(t.line,n.line+1,function(t){un(e,t)&&ut(t,0)}),a.clearOnEnter&&K(a,`beforeCursorEnter`,function(){return a.clear()}),a.readOnly&&(Lt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++yo,a.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),a.collapsed)Ur(c,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=t.line;u<=n.line;u++)Wr(c,u,`text`);a.atomic&&Ya(c.doc),Fn(c,`markerAdded`,c,a)}return a}var So=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};So.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Fn(this,`clear`)}},So.prototype.find=function(e,t){return this.primary.find(e,t)},Ne(So);function Co(e,t,n,r,i){r=z(r),r.shared=!1;var a=[xo(e,t,n,r,i)],o=a[0],s=r.widgetNode;return Sa(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),a.push(xo(e,Z(e,t),Z(e,n),r,i));for(var c=0;c<e.linked.length;++c)if(e.linked[c].isParent)return;o=U(a)}),new So(a,o)}function wo(e){return e.findMarks(Y(e.first,0),e.clipPos(Y(e.lastLine())),function(e){return e.parent})}function To(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(X(a,o)){var s=xo(e,a,o,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function Eo(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Sa(n.primary.doc,function(e){return r.push(e)});for(var i=0;i<n.markers.length;i++){var a=n.markers[i];V(r,a.doc)==-1&&(a.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}var Do=0,Oo=function(e,t,n,r,i){if(!(this instanceof Oo))return new Oo(e,t,n,r,i);n??=0,ho.call(this,[new mo([new hn(``,null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=Y(n,0);this.sel=fa(a),this.history=new Ea(null),this.id=++Do,this.modeOption=t,this.lineSep=r,this.direction=i==`rtl`?`rtl`:`ltr`,this.extend=!1,typeof e==`string`&&(e=this.splitLines(e)),xa(this,{from:a,to:a,text:e}),Ka(this,fa(a),H)};Oo.prototype=me(ho.prototype,{constructor:Oo,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=lt(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Bi(function(e){var t=Y(this.first,0),n=this.first+this.size-1;no(this,{from:t,to:Y(n,q(this,n).text.length),text:this.splitLines(e),origin:`setValue`,full:!0},!0),this.cm&&mi(this.cm,0,0),Ka(this,fa(t),H)}),replaceRange:function(e,t,n,r){t=Z(this,t),n=n?Z(this,n):t,co(this,e,t,n,r)},getRange:function(e,t,n){var r=ct(this,Z(this,e),Z(this,t));return n===!1?r:n===``?r.join(``):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ft(this,e))return q(this,e)},getLineNumber:function(e){return J(e)},getLineHandleVisualStart:function(e){return typeof e==`number`&&(e=q(this,e)),an(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Z(this,e)},getCursor:function(e){var t=this.sel.primary();return e==null||e==`head`?t.head:e==`anchor`?t.anchor:e==`end`||e==`to`||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Bi(function(e,t,n){Ua(this,Z(this,typeof e==`number`?Y(e,t||0):e),null,n)}),setSelection:Bi(function(e,t,n){Ua(this,Z(this,e),Z(this,t||e),n)}),extendSelection:Bi(function(e,t,n){Ba(this,Z(this,e),t&&Z(this,t),n)}),extendSelections:Bi(function(e,t){Va(this,bt(this,e),t)}),extendSelectionsBy:Bi(function(e,t){var n=de(this.sel.ranges,e);Va(this,bt(this,n),t)}),setSelections:Bi(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Q(Z(this,e[i].anchor),Z(this,e[i].head||e[i].anchor));t??=Math.min(e.length-1,this.sel.primIndex),Ka(this,da(this.cm,r,t),n)}}),addSelection:Bi(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Q(Z(this,e),Z(this,t||e))),Ka(this,da(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=ct(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=ct(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||`+input`)},replaceSelections:Bi(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var s=t&&t!=`end`&&_a(this,r,t),c=r.length-1;c>=0;c--)no(this,r[c]);s?Ga(this,s):this.cm&&pi(this.cm)}),undo:Bi(function(){io(this,`undo`)}),redo:Bi(function(){io(this,`redo`)}),undoSelection:Bi(function(){io(this,`undo`,!0)}),redoSelection:Bi(function(){io(this,`redo`,!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ea(this.history),Sa(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ra(this.history.done),undone:Ra(this.history.undone)}},setHistory:function(e){var t=this.history=new Ea(this.history);t.done=Ra(e.done.slice(0),null,!0),t.undone=Ra(e.undone.slice(0),null,!0)},setGutterMarker:Bi(function(e,t,n){return po(this,e,`gutter`,function(e){var r=e.gutterMarkers||={};return r[t]=n,!n&&ve(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Bi(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&po(t,n,`gutter`,function(){return n.gutterMarkers[e]=null,ve(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e==`number`){if(!ft(this,e)||(t=e,e=q(this,e),!e))return null}else if(t=J(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Bi(function(e,t,n){return po(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`;if(!e[r])e[r]=n;else if(T(n).test(e[r]))return!1;else e[r]+=` `+n;return!0})}),removeLineClass:Bi(function(e,t,n){return po(this,e,t==`gutter`?`gutter`:`class`,function(e){var r=t==`text`?`textClass`:t==`background`?`bgClass`:t==`gutter`?`gutterClass`:`wrapClass`,i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var a=i.match(T(n));if(!a)return!1;var o=a.index+a[0].length;e[r]=i.slice(0,a.index)+(!a.index||o==i.length?``:` `)+i.slice(o)||null}return!0})}),addLineWidget:Bi(function(e,t,n){return vo(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return xo(this,Z(this,e),Z(this,t),n,n&&n.type||`range`)},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Z(this,e),xo(this,e,e,n,`bookmark`)},findMarksAt:function(e){e=Z(this,e);var t=[],n=q(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Z(this,e),t=Z(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var s=0;s<o.length;s++){var c=o[s];!(c.to!=null&&i==e.line&&e.ch>=c.to||c.from==null&&i!=e.line||c.from!=null&&i==t.line&&c.from>=t.ch)&&(!n||n(c.marker))&&r.push(c.marker.parent||c.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),Z(this,Y(n,t))},indexFromPos:function(e){e=Z(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+n}),t},copy:function(e){var t=new Oo(lt(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||={};var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Oo(lt(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||=[]).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],To(r,wo(this)),r},unlinkDoc:function(e){if(e instanceof Hs&&(e=e.doc),this.linked){for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Eo(wo(this));break}}if(e.history==this.history){var n=[e.id];Sa(e,function(e){return n.push(e.id)},!0),e.history=new Ea(null),e.history.done=Ra(this.history.done,n),e.history.undone=Ra(this.history.undone,n)}},iterLinkedDocs:function(e){Sa(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Ge(e)},lineSeparator:function(){return this.lineSep||`
|
|
11
|
+
`},setDirection:Bi(function(e){e!=`rtl`&&(e=`ltr`),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Ta(this.cm))})}),Oo.prototype.eachLine=Oo.prototype.iter;var ko=0;function Ao(e){var t=this;if(No(t),!(Ae(t,e)||Xn(t.display,e))){Pe(e),o&&(ko=+new Date);var n=Vr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),s=0,c=function(){++s==i&&Ri(t,function(){n=Z(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(a.filter(function(e){return e!=null}).join(t.doc.lineSeparator())),origin:`paste`};no(t.doc,e),Ga(t.doc,fa(Z(t.doc,n),Z(t.doc,pa(e))))})()},l=function(e,n){if(t.options.allowDropFileTypes&&V(t.options.allowDropFileTypes,e.type)==-1){c();return}var r=new FileReader;r.onerror=function(){return c()},r.onload=function(){var e=r.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)){c();return}a[n]=e,c()},r.readAsText(e)},u=0;u<r.length;u++)l(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var d=e.dataTransfer.getData(`Text`);if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),qa(t.doc,fa(n,n)),f)for(var p=0;p<f.length;++p)co(t.doc,``,f[p].anchor,f[p].head,`drag`);t.replaceSelection(d,`around`,`paste`),t.display.input.focus()}}catch{}}}}function jo(e,t){if(o&&(!e.state.draggingText||+new Date-ko<100)){Le(t);return}if(!(Ae(e,t)||Xn(e.display,t))&&(t.dataTransfer.setData(`Text`,e.getSelection()),t.dataTransfer.effectAllowed=`copyMove`,t.dataTransfer.setDragImage&&!p)){var n=k(`img`,null,null,`position: fixed; left: 0; top: 0;`);n.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`,f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}function Mo(e,t){var n=Vr(e,t);if(n){var r=document.createDocumentFragment();Zr(e,n,r),e.display.dragCursor||(e.display.dragCursor=k(`div`,null,`CodeMirror-cursors CodeMirror-dragcursors`),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,r)}}function No(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName(`CodeMirror`),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var t=0;t<n.length;t++)e(n[t])})}}var Fo=!1;function Io(){Fo||=(Lo(),!0)}function Lo(){K(window,`resize`,function(){setTimeout(function(){Po(Ro)},100)}),K(window,`blur`,function(){return Po(ii)})}function Ro(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var zo={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`},Bo=0;Bo<10;Bo++)zo[Bo+48]=zo[Bo+96]=String(Bo);for(var Vo=65;Vo<=90;Vo++)zo[Vo]=String.fromCharCode(Vo);for(var Ho=1;Ho<=12;Ho++)zo[Ho+111]=zo[Ho+63235]=`F`+Ho;var Uo={};Uo.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`},Uo.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`},Uo.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`},Uo.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`]},Uo.default=y?Uo.macDefault:Uo.pcDefault;function Wo(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw Error(`Unrecognized modifier name: `+s)}return n&&(e=`Alt-`+e),r&&(e=`Ctrl-`+e),a&&(e=`Cmd-`+e),i&&(e=`Shift-`+e),e}function Go(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r==`...`){delete e[n];continue}for(var i=de(n.split(` `),Wo),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(` `),o=r):(s=i.slice(0,a+1).join(` `),o=`...`);var c=t[s];if(!c)t[s]=o;else if(c!=o)throw Error(`Inconsistent bindings for `+s)}delete e[n]}for(var l in t)e[l]=t[l];return e}function Ko(e,t,n,r){t=Xo(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return`nothing`;if(i===`...`)return`multi`;if(i!=null&&n(i))return`handled`;if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!=`[object Array]`)return Ko(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Ko(e,t.fallthrough[a],n,r);if(o)return o}}}function qo(e){var t=typeof e==`string`?e:zo[e.keyCode];return t==`Ctrl`||t==`Alt`||t==`Shift`||t==`Mod`}function Jo(e,t,n){var r=e;return t.altKey&&r!=`Alt`&&(e=`Alt-`+e),(C?t.metaKey:t.ctrlKey)&&r!=`Ctrl`&&(e=`Ctrl-`+e),(C?t.ctrlKey:t.metaKey)&&r!=`Mod`&&(e=`Cmd-`+e),!n&&t.shiftKey&&r!=`Shift`&&(e=`Shift-`+e),e}function Yo(e,t){if(f&&e.keyCode==34&&e.char)return!1;var n=zo[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Jo(n,e,t))}function Xo(e){return typeof e==`string`?Uo[e]:e}function Zo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&X(a.from,U(r).to)<=0;){var o=r.pop();if(X(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Li(e,function(){for(var t=r.length-1;t>=0;t--)co(e.doc,``,r[t].from,r[t].to,`+delete`);pi(e)})}function Qo(e,t,n){var r=W(e.text,t+n,n);return r<0||r>e.text.length?null:r}function $o(e,t,n){var r=Qo(e,t.ch,n);return r==null?null:new Y(t.line,r,n<0?`after`:`before`)}function es(e,t,n,r,i){if(e){t.doc.direction==`rtl`&&(i=-i);var a=G(n,t.doc.direction);if(a){var o=i<0?U(a):a[0],s=i<0==(o.level==1)?`after`:`before`,c;if(o.level>0||t.doc.direction==`rtl`){var l=cr(t,n);c=i<0?n.text.length-1:0;var u=lr(t,l,c).top;c=xe(function(e){return lr(t,l,e).top==u},i<0==(o.level==1)?o.from:o.to-1,c),s==`before`&&(c=Qo(n,c,1))}else c=i<0?o.to:o.from;return new Y(r,c,s)}}return new Y(r,i<0?n.text.length:0,i<0?`before`:`after`)}function ts(e,t,n,r){var i=G(t,e.doc.direction);if(!i)return $o(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky=`before`):n.ch<=0&&(n.ch=0,n.sticky=`after`);var a=we(i,n.ch,n.sticky),o=i[a];if(e.doc.direction==`ltr`&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return $o(t,n,r);var s=function(e,n){return Qo(t,e instanceof Y?e.ch:e,n)},c,l=function(n){return e.options.lineWrapping?(c||=cr(e,t),kr(e,t,c,n)):{begin:0,end:t.text.length}},u=l(n.sticky==`before`?s(n,-1):n.ch);if(e.doc.direction==`rtl`||o.level==1){var d=o.level==1==r<0,f=s(n,d?1:-1);if(f!=null&&(d?f<=o.to&&f<=u.end:f>=o.from&&f>=u.begin)){var p=d?`before`:`after`;return new Y(n.line,f,p)}}var m=function(e,t,r){for(var a=function(e,t){return t?new Y(n.line,s(e,1),`before`):new Y(n.line,e,`after`)};e>=0&&e<i.length;e+=t){var o=i[e],c=t>0==(o.level!=1),l=c?r.begin:s(r.end,-1);if(o.from<=l&&l<o.to||(l=c?o.from:s(o.to,-1),r.begin<=l&&l<r.end))return a(l,c)}},h=m(a+r,r,u);if(h)return h;var g=r>0?u.end:s(u.begin,-1);return g!=null&&!(r>0&&g==t.text.length)&&(h=m(r>0?0:i.length-1,r,l(g)),h)?h:null}var ns={selectAll:eo,singleSelection:function(e){return e.setSelection(e.getCursor(`anchor`),e.getCursor(`head`),H)},killLine:function(e){return Zo(e,function(t){if(t.empty()){var n=q(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:Y(t.head.line+1,0)}:{from:t.head,to:Y(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zo(e,function(t){return{from:Y(t.from().line,0),to:Z(e.doc,Y(t.to().line+1,0))}})},delLineLeft:function(e){return Zo(e,function(e){return{from:Y(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Zo(e,function(t){var n=e.charCoords(t.head,`div`).top+5;return{from:e.coordsChar({left:0,top:n},`div`),to:t.from()}})},delWrappedLineRight:function(e){return Zo(e,function(t){var n=e.charCoords(t.head,`div`).top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`);return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(Y(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Y(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return rs(e,t.head.line)},{origin:`+move`,bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head)},{origin:`+move`,bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:`+move`,bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},`div`)},se)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5;return e.coordsChar({left:0,top:n},`div`)},se)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,`div`).top+5,r=e.coordsChar({left:0,top:n},`div`);return r.ch<e.getLine(r.line).search(/\S/)?as(e,t.head):r},se)},goLineUp:function(e){return e.moveV(-1,`line`)},goLineDown:function(e){return e.moveV(1,`line`)},goPageUp:function(e){return e.moveV(-1,`page`)},goPageDown:function(e){return e.moveV(1,`page`)},goCharLeft:function(e){return e.moveH(-1,`char`)},goCharRight:function(e){return e.moveH(1,`char`)},goColumnLeft:function(e){return e.moveH(-1,`column`)},goColumnRight:function(e){return e.moveH(1,`column`)},goWordLeft:function(e){return e.moveH(-1,`word`)},goGroupRight:function(e){return e.moveH(1,`group`)},goGroupLeft:function(e){return e.moveH(-1,`group`)},goWordRight:function(e){return e.moveH(1,`word`)},delCharBefore:function(e){return e.deleteH(-1,`codepoint`)},delCharAfter:function(e){return e.deleteH(1,`char`)},delWordBefore:function(e){return e.deleteH(-1,`word`)},delWordAfter:function(e){return e.deleteH(1,`word`)},delGroupBefore:function(e){return e.deleteH(-1,`group`)},delGroupAfter:function(e){return e.deleteH(1,`group`)},indentAuto:function(e){return e.indentSelection(`smart`)},indentMore:function(e){return e.indentSelection(`add`)},indentLess:function(e){return e.indentSelection(`subtract`)},insertTab:function(e){return e.replaceSelection(` `)},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=B(e.getLine(a.line),a.ch,r);t.push(ue(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection(`add`):e.execCommand(`insertTab`)},transposeChars:function(e){return Li(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=q(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new Y(i.line,i.ch-1)),i.ch>0)i=new Y(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Y(i.line,i.ch-2),i,`+transpose`);else if(i.line>e.doc.first){var o=q(e.doc,i.line-1).text;o&&(i=new Y(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Y(i.line-1,o.length-1),i,`+transpose`))}}n.push(new Q(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Li(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,`+input`);t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);pi(e)})},openLine:function(e){return e.replaceSelection(`
|
|
12
|
+
`,`start`)},toggleOverwrite:function(e){return e.toggleOverwrite()}};function rs(e,t){var n=q(e.doc,t),r=an(n);return r!=n&&(t=J(r)),es(!0,e,r,t,1)}function is(e,t){var n=q(e.doc,t),r=on(n);return r!=n&&(t=J(r)),es(!0,e,n,t,-1)}function as(e,t){var n=rs(e,t.line),r=q(e.doc,n.line),i=G(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return Y(n.line,o?0:a,n.sticky)}return n}function os(e,t,n){if(typeof t==`string`&&(t=ns[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=ae}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ss(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ko(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ko(t,e.options.extraKeys,n,e)||Ko(t,e.options.keyMap,n,e)}var cs=new re;function ls(e,t,n,r){var i=e.state.keySeq;if(i){if(qo(t))return`handled`;if(/\'$/.test(t)?e.state.keySeq=null:cs.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),us(e,i+` `+t,n,r))return!0}return us(e,t,n,r)}function us(e,t,n,r){var i=ss(e,t,r);return i==`multi`&&(e.state.keySeq=t),i==`handled`&&Fn(e,`keyHandled`,e,t,n),(i==`handled`||i==`multi`)&&(Pe(n),ei(e)),!!i}function ds(e,t){var n=Yo(t,!0);return n?t.shiftKey&&!e.state.keySeq?ls(e,`Shift-`+n,t,function(t){return os(e,t,!0)})||ls(e,n,t,function(t){if(typeof t==`string`?/^go[A-Z]/.test(t):t.motion)return os(e,t)}):ls(e,n,t,function(t){return os(e,t)}):!1}function fs(e,t,n){return ls(e,`'`+n+`'`,t,function(t){return os(e,t,!0)})}var ps=null;function ms(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=N(ne(t)),!Ae(t,e))){o&&s<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var i=ds(t,e);f&&(ps=i?r:null,!i&&r==88&&!qe&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection(``,null,`cut`)),n&&!y&&!i&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand(`cut`),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&hs(t)}}function hs(e){var t=e.display.lineDiv;ee(t,`CodeMirror-crosshair`);function n(e){(e.keyCode==18||!e.altKey)&&(E(t,`CodeMirror-crosshair`),Oe(document,`keyup`,n),Oe(document,`mouseover`,n))}K(document,`keyup`,n),K(document,`mouseover`,n)}function gs(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ae(this,e)}function _s(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(Xn(t.display,e)||Ae(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ps){ps=null,Pe(e);return}if(!(f&&(!e.which||e.which<10)&&ds(t,e))){var i=String.fromCharCode(r??n);i!=`\b`&&(fs(t,e,i)||t.display.input.onKeyPress(e))}}}var vs=400,ys=function(e,t,n){this.time=e,this.pos=t,this.button=n};ys.prototype.compare=function(e,t,n){return this.time+vs>e&&X(t,this.pos)==0&&n==this.button};var bs,xs;function Ss(e,t){var n=+new Date;return xs&&xs.compare(n,e,t)?(bs=xs=null,`triple`):bs&&bs.compare(n,e,t)?(xs=new ys(n,e,t),bs=null,`double`):(bs=new ys(n,e,t),xs=null,`single`)}function Cs(e){var t=this,n=t.display;if(!(Ae(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,Xn(n,e)){c||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!Ms(t,e)){var r=Vr(t,e),i=ze(e),a=r?Ss(r,i):`single`;L(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ws(t,i,r,a,e))&&(i==1?r?Es(t,r,a,e):Re(e)==n.scroller&&Pe(e):i==2?(r&&Ba(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(w?t.display.input.onContextMenu(e):ni(t)))}}}function ws(e,t,n,r,i){var a=`Click`;return r==`double`?a=`Double`+a:r==`triple`&&(a=`Triple`+a),a=(t==1?`Left`:t==2?`Middle`:`Right`)+a,ls(e,Jo(a,i),i,function(t){if(typeof t==`string`&&(t=ns[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=ae}finally{e.state.suppressEdits=!1}return r})}function Ts(e,t,n){var r=e.getOption(`configureMouse`),i=r?r(e,t,n):{};return i.unit??=(b?n.shiftKey&&n.metaKey:n.altKey)?`rectangle`:t==`single`?`char`:t==`double`?`word`:`line`,(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew??=y?n.metaKey:n.ctrlKey,i.moveOnDrag??=!(y?n.altKey:n.ctrlKey),i}function Es(e,t,n,r){o?setTimeout(R(ti,e),0):e.curOp.focus=N(ne(e));var i=Ts(e,n,r),a=e.doc.sel,s;e.options.dragDrop&&Be&&!e.isReadOnly()&&n==`single`&&(s=a.contains(t))>-1&&(X((s=a.ranges[s]).from(),t)<0||t.xRel>0)&&(X(s.to(),t)>0||t.xRel<0)?Ds(e,r,t,i):ks(e,r,t,i)}function Ds(e,t,n,r){var i=e.display,a=!1,l=Ri(e,function(t){c&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:ni(e)),Oe(i.wrapper.ownerDocument,`mouseup`,l),Oe(i.wrapper.ownerDocument,`mousemove`,u),Oe(i.scroller,`dragstart`,d),Oe(i.scroller,`drop`,l),a||(Pe(t),r.addNew||Ba(e.doc,n,null,null,r.extend),c&&!p||o&&s==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(e){a||=Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return a=!0};c&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=!r.moveOnDrag,K(i.wrapper.ownerDocument,`mouseup`,l),K(i.wrapper.ownerDocument,`mousemove`,u),K(i.scroller,`dragstart`,d),K(i.scroller,`drop`,l),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Os(e,t,n){if(n==`char`)return new Q(t,t);if(n==`word`)return e.findWordAt(t);if(n==`line`)return new Q(Y(t.line,0),Z(e.doc,Y(t.line+1,0)));var r=n(e,t);return new Q(r.from,r.to)}function ks(e,t,n,r){o&&ni(e);var i=e.display,a=e.doc;Pe(t);var s,c,l=a.sel,u=l.ranges;if(r.addNew&&!r.extend?(c=a.sel.contains(n),s=c>-1?u[c]:new Q(n,n)):(s=a.sel.primary(),c=a.sel.primIndex),r.unit==`rectangle`)r.addNew||(s=new Q(n,n)),n=Vr(e,t,!0,!0),c=-1;else{var d=Os(e,n,r.unit);s=r.extend?za(s,d.anchor,d.head,r.extend):d}r.addNew?c==-1?(c=u.length,Ka(a,da(e,u.concat([s]),c),{scroll:!1,origin:`*mouse`})):u.length>1&&u[c].empty()&&r.unit==`char`&&!r.extend?(Ka(a,da(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:`*mouse`}),l=a.sel):Ha(a,c,s,oe):(c=0,Ka(a,new ua([s],0),oe),l=a.sel);var f=n;function p(t){if(X(f,t)!=0)if(f=t,r.unit==`rectangle`){for(var i=[],o=e.options.tabSize,u=B(q(a,n.line).text,n.ch,o),d=B(q(a,t.line).text,t.ch,o),p=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var _=q(a,h).text,v=ce(_,p,o);p==m?i.push(new Q(Y(h,v),Y(h,v))):_.length>v&&i.push(new Q(Y(h,v),Y(h,ce(_,m,o))))}i.length||i.push(new Q(n,n)),Ka(a,da(e,l.ranges.slice(0,c).concat(i),c),{origin:`*mouse`,scroll:!1}),e.scrollIntoView(t)}else{var y=s,b=Os(e,t,r.unit),x=y.anchor,S;X(b.anchor,x)>0?(S=b.head,x=_t(y.from(),b.anchor)):(S=b.anchor,x=gt(y.to(),b.head));var C=l.ranges.slice(0);C[c]=As(e,new Q(Z(a,x),S)),Ka(a,da(e,C,c),oe)}}var m=i.wrapper.getBoundingClientRect(),h=0;function g(t){var n=++h,o=Vr(e,t,!0,r.unit==`rectangle`);if(o)if(X(o,f)!=0){e.curOp.focus=N(ne(e)),p(o);var s=si(i,a);(o.line>=s.to||o.line<s.from)&&setTimeout(Ri(e,function(){h==n&&g(t)}),150)}else{var c=t.clientY<m.top?-20:t.clientY>m.bottom?20:0;c&&setTimeout(Ri(e,function(){h==n&&(i.scroller.scrollTop+=c,g(t))}),50)}}function _(t){e.state.selectingText=!1,h=1/0,t&&(Pe(t),i.input.focus()),Oe(i.wrapper.ownerDocument,`mousemove`,v),Oe(i.wrapper.ownerDocument,`mouseup`,y),a.history.lastSelOrigin=null}var v=Ri(e,function(e){e.buttons===0||!ze(e)?_(e):g(e)}),y=Ri(e,_);e.state.selectingText=y,K(i.wrapper.ownerDocument,`mousemove`,v),K(i.wrapper.ownerDocument,`mouseup`,y)}function As(e,t){var n=t.anchor,r=t.head,i=q(e.doc,n.line);if(X(n,r)==0&&n.sticky==r.sticky)return t;var a=G(i);if(!a)return t;var o=we(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return t;var c=o+(s.from==n.ch==(s.level!=1)?0:1);if(c==0||c==a.length)return t;var l;if(r.line!=n.line)l=(r.line-n.line)*(e.doc.direction==`ltr`?1:-1)>0;else{var u=we(a,r.ch,r.sticky),d=u-o||(r.ch-n.ch)*(s.level==1?-1:1);l=u==c-1||u==c?d<0:d>0}var f=a[c+(l?-1:0)],p=l==(f.level==1),m=p?f.from:f.to,h=p?`after`:`before`;return n.ch==m&&n.sticky==h?t:new Q(new Y(n.line,m,h),r)}function js(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch{return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Pe(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!Me(e,n))return Ie(t);a-=s.top-o.viewOffset;for(var c=0;c<e.display.gutterSpecs.length;++c){var l=o.gutters.childNodes[c];if(l&&l.getBoundingClientRect().right>=i){var u=dt(e.doc,a),d=e.display.gutterSpecs[c];return ke(e,n,e,u,d.className,t),Ie(t)}}}function Ms(e,t){return js(e,t,`gutterClick`,!0)}function Ns(e,t){Xn(e.display,t)||Ps(e,t)||Ae(e,t,`contextmenu`)||w||e.display.input.onContextMenu(t)}function Ps(e,t){return Me(e,`gutterContextMenu`)?js(e,t,`gutterContextMenu`,!1):!1}function Fs(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,``)+e.options.theme.replace(/(^|\s)\s*/g,` cm-s-`),_r(e)}var Is={toString:function(){return`CodeMirror.Init`}},Ls={},Rs={};function zs(e){var t=e.optionHandlers;function n(n,r,i,a){e.defaults[n]=r,i&&(t[n]=a?function(e,t,n){n!=Is&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Is,n(`value`,``,function(e,t){return e.setValue(t)},!0),n(`mode`,null,function(e,t){e.doc.modeOption=t,va(e)},!0),n(`indentUnit`,2,va,!0),n(`indentWithTabs`,!1),n(`smartIndent`,!0),n(`tabSize`,4,function(e){ya(e),_r(e),Ur(e)},!0),n(`lineSeparator`,null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var a=e.text.indexOf(t,i);if(a==-1)break;i=a+t.length,n.push(Y(r,a))}r++});for(var i=n.length-1;i>=0;i--)co(e.doc,t,n[i],Y(n[i].line,n[i].ch+t.length))}}),n(`specialChars`,/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(e,t,n){e.state.specialChars=RegExp(t.source+(t.test(` `)?``:`| `),`g`),n!=Is&&e.refresh()}),n(`specialCharPlaceholder`,Sn,function(e){return e.refresh()},!0),n(`electricChars`,!0),n(`inputStyle`,v?`contenteditable`:`textarea`,function(){throw Error(`inputStyle can not (yet) be changed in a running editor`)},!0),n(`spellcheck`,!1,function(e,t){return e.getInputField().spellcheck=t},!0),n(`autocorrect`,!1,function(e,t){return e.getInputField().autocorrect=t},!0),n(`autocapitalize`,!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n(`rtlMoveVisually`,!x),n(`wholeLineUpdateBefore`,!0),n(`theme`,`default`,function(e){Fs(e),ra(e)},!0),n(`keyMap`,`default`,function(e,t,n){var r=Xo(t),i=n!=Is&&Xo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n(`extraKeys`,null),n(`configureMouse`,null),n(`lineWrapping`,!1,Vs,!0),n(`gutters`,[],function(e,t){e.display.gutterSpecs=ta(t,e.options.lineNumbers),ra(e)},!0),n(`fixedGutter`,!0,function(e,t){e.display.gutters.style.left=t?Rr(e.display)+`px`:`0`,e.refresh()},!0),n(`coverGutterNextToScrollbar`,!1,function(e){return wi(e)},!0),n(`scrollbarStyle`,`native`,function(e){Di(e),wi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n(`lineNumbers`,!1,function(e,t){e.display.gutterSpecs=ta(e.options.gutters,t),ra(e)},!0),n(`firstLineNumber`,1,ra,!0),n(`lineNumberFormatter`,function(e){return e},ra,!0),n(`showCursorWhenSelecting`,!1,Yr,!0),n(`resetSelectionOnContextMenu`,!0),n(`lineWiseCopyCut`,!0),n(`pasteLinesPerSelection`,!0),n(`selectionsMayTouch`,!1),n(`readOnly`,!1,function(e,t){t==`nocursor`&&(ii(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n(`screenReaderLabel`,null,function(e,t){t=t===``?null:t,e.display.input.screenReaderLabelChanged(t)}),n(`disableInput`,!1,function(e,t){t||e.display.input.reset()},!0),n(`dragDrop`,!0,Bs),n(`allowDropFileTypes`,null),n(`cursorBlinkRate`,530),n(`cursorScrollMargin`,0),n(`cursorHeight`,1,Yr,!0),n(`singleCursorHeightPerLine`,!0,Yr,!0),n(`workTime`,100),n(`workDelay`,100),n(`flattenSpans`,!0,ya,!0),n(`addModeClass`,!1,ya,!0),n(`pollInterval`,100),n(`undoDepth`,200,function(e,t){return e.doc.history.undoDepth=t}),n(`historyEventDelay`,1250),n(`viewportMargin`,10,function(e){return e.refresh()},!0),n(`maxHighlightLength`,1e4,ya,!0),n(`moveInputWithCursor`,!0,function(e,t){t||e.display.input.resetPosition()}),n(`tabindex`,null,function(e,t){return e.display.input.getField().tabIndex=t||``}),n(`autofocus`,null),n(`direction`,`ltr`,function(e,t){return e.doc.setDirection(t)},!0),n(`phrases`,null)}function Bs(e,t,n){if(!t!=!(n&&n!=Is)){var r=e.display.dragFunctions,i=t?K:Oe;i(e.display.scroller,`dragstart`,r.start),i(e.display.scroller,`dragenter`,r.enter),i(e.display.scroller,`dragover`,r.over),i(e.display.scroller,`dragleave`,r.leave),i(e.display.scroller,`drop`,r.drop)}}function Vs(e){e.options.lineWrapping?(ee(e.display.wrapper,`CodeMirror-wrap`),e.display.sizer.style.minWidth=``,e.display.sizerWidth=null):(E(e.display.wrapper,`CodeMirror-wrap`),mn(e)),Br(e),Ur(e),_r(e),setTimeout(function(){return wi(e)},100)}function Hs(e,t){var n=this;if(!(this instanceof Hs))return new Hs(e,t);this.options=t=t?z(t):{},z(Ls,t,!1);var r=t.value;typeof r==`string`?r=new Oo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Hs.inputStyles[t.inputStyle](this),a=this.display=new ia(e,r,i,t);for(var l in a.wrapper.CodeMirror=this,Fs(this),t.lineWrapping&&(this.display.wrapper.className+=` CodeMirror-wrap`),Di(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 re,keySeq:null,specialChars:null},t.autofocus&&!v&&a.input.focus(),o&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Us(this),Io(),ki(this),this.curOp.forceUpdate=!0,Ca(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&ri(n)},20):ii(this),Rs)Rs.hasOwnProperty(l)&&Rs[l](this,t[l],Is);ea(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ws.length;++u)Ws[u](this);Ai(this),c&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering==`optimizelegibility`&&(a.lineDiv.style.textRendering=`auto`)}Hs.defaults=Ls,Hs.optionHandlers=Rs;function Us(e){var t=e.display;K(t.scroller,`mousedown`,Ri(e,Cs)),o&&s<11?K(t.scroller,`dblclick`,Ri(e,function(t){if(!Ae(e,t)){var n=Vr(e,t);if(!(!n||Ms(e,t)||Xn(e.display,t))){Pe(t);var r=e.findWordAt(n);Ba(e.doc,r.anchor,r.head)}}})):K(t.scroller,`dblclick`,function(t){return Ae(e,t)||Pe(t)}),K(t.scroller,`contextmenu`,function(t){return Ns(e,t)}),K(t.input.getField(),`contextmenu`,function(n){t.scroller.contains(n.target)||Ns(e,n)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(e){if(e.touches.length!=1)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function c(e,t){if(t.left==null)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}K(t.scroller,`touchstart`,function(i){if(!Ae(e,i)&&!a(i)&&!Ms(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},i.touches.length==1&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),K(t.scroller,`touchmove`,function(){t.activeTouch&&(t.activeTouch.moved=!0)}),K(t.scroller,`touchend`,function(n){var r=t.activeTouch;if(r&&!Xn(t,n)&&r.left!=null&&!r.moved&&new Date-r.start<300){var a=e.coordsChar(t.activeTouch,`page`),o=!r.prev||c(r,r.prev)?new Q(a,a):!r.prev.prev||c(r,r.prev.prev)?e.findWordAt(a):new Q(Y(a.line,0),Z(e.doc,Y(a.line+1,0)));e.setSelection(o.anchor,o.head),e.focus(),Pe(n)}i()}),K(t.scroller,`touchcancel`,i),K(t.scroller,`scroll`,function(){t.scroller.clientHeight&&(vi(e,t.scroller.scrollTop),bi(e,t.scroller.scrollLeft,!0),ke(e,`scroll`,e))}),K(t.scroller,`mousewheel`,function(t){return la(e,t)}),K(t.scroller,`DOMMouseScroll`,function(t){return la(e,t)}),K(t.wrapper,`scroll`,function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){Ae(e,t)||Le(t)},over:function(t){Ae(e,t)||(Mo(e,t),Le(t))},start:function(t){return jo(e,t)},drop:Ri(e,Ao),leave:function(t){Ae(e,t)||No(e)}};var l=t.input.getField();K(l,`keyup`,function(t){return gs.call(e,t)}),K(l,`keydown`,Ri(e,ms)),K(l,`keypress`,Ri(e,_s)),K(l,`focus`,function(t){return ri(e,t)}),K(l,`blur`,function(t){return ii(e,t)})}var Ws=[];Hs.defineInitHook=function(e){return Ws.push(e)};function Gs(e,t,n,r){var i=e.doc,a;n??=`add`,n==`smart`&&(i.mode.indent?a=Tt(e,t).state:n=`prev`);var o=e.options.tabSize,s=q(i,t),c=B(s.text,null,o);s.stateAfter&&=null;var l=s.text.match(/^\s*/)[0],u;if(!r&&!/\S/.test(s.text))u=0,n=`not`;else if(n==`smart`&&(u=i.mode.indent(a,s.text.slice(l.length),s.text),u==ae||u>150)){if(!r)return;n=`prev`}n==`prev`?u=t>i.first?B(q(i,t-1).text,null,o):0:n==`add`?u=c+e.options.indentUnit:n==`subtract`?u=c-e.options.indentUnit:typeof n==`number`&&(u=c+n),u=Math.max(0,u);var d=``,f=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/o);p;--p)f+=o,d+=` `;if(f<u&&(d+=ue(u-f)),d!=l)return co(i,d,Y(t,0),Y(t,l.length),`+input`),s.stateAfter=null,!0;for(var m=0;m<i.sel.ranges.length;m++){var h=i.sel.ranges[m];if(h.head.line==t&&h.head.ch<l.length){var g=Y(t,l.length);Ha(i,m,new Q(g,g));break}}}var Ks=null;function qs(e){Ks=e}function Js(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||=a.sel;var o=new Date-200,s=i==`paste`||e.state.pasteIncoming>o,c=Ge(t),l=null;if(s&&r.ranges.length>1)if(Ks&&Ks.text.join(`
|
|
13
|
+
`)==t){if(r.ranges.length%Ks.text.length==0){l=[];for(var u=0;u<Ks.text.length;u++)l.push(a.splitLines(Ks.text[u]))}}else c.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(l=de(c,function(e){return[e]}));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var p=r.ranges[f],m=p.from(),h=p.to();p.empty()&&(n&&n>0?m=Y(m.line,m.ch-n):e.state.overwrite&&!s?h=Y(h.line,Math.min(q(a,h.line).text.length,h.ch+U(c).length)):s&&Ks&&Ks.lineWise&&Ks.text.join(`
|
|
14
|
+
`)==c.join(`
|
|
15
|
+
`)&&(m=h=Y(m.line,0)));var g={from:m,to:h,text:l?l[f%l.length]:c,origin:i||(s?`paste`:e.state.cutIncoming>o?`cut`:`+input`)};no(e.doc,g),Fn(e,`inputRead`,e,g)}t&&!s&&Xs(e,t),pi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ys(e,t){var n=e.clipboardData&&e.clipboardData.getData(`Text`);if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Li(t,function(){return Js(t,n,0,null,`paste`)}),!0}function Xs(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=Gs(e,i.head.line,`smart`);break}}else a.electricInput&&a.electricInput.test(q(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Gs(e,i.head.line,`smart`));o&&Fn(e,`electricInput`,e,i.head.line)}}}function Zs(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:Y(i,0),head:Y(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function Qs(e,t,n,r){e.setAttribute(`autocorrect`,n?`on`:`off`),e.setAttribute(`autocapitalize`,r?`on`:`off`),e.setAttribute(`spellcheck`,!!t)}function $s(){var e=k(`textarea`,null,null,`position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none`),t=k(`div`,[e],null,`overflow: hidden; position: relative; width: 3px; height: 0px;`);return c?e.style.width=`1000px`:e.setAttribute(`wrap`,`off`),g&&(e.style.border=`1px solid black`),t}function ec(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){L(this).focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&e!=`mode`||(r[e]=n,t.hasOwnProperty(e)&&Ri(this,t[e])(this,n,i),ke(this,`optionChange`,this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?`push`:`unshift`](Xo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:zi(function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw Error(`Overlays may not be stateful.`);fe(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},function(e){return e.priority}),this.state.modeGen++,Ur(this)}),removeOverlay:zi(function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||typeof e==`string`&&r.name==e){t.splice(n,1),this.state.modeGen++,Ur(this);return}}}),indentLine:zi(function(e,t,n){typeof t!=`string`&&typeof t!=`number`&&(t=t==null?this.options.smartIndent?`smart`:`prev`:t?`add`:`subtract`),ft(this.doc,e)&&Gs(this,e,t,n)}),indentSelection:zi(function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Gs(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&pi(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var c=s;c<n;++c)Gs(this,c,e);var l=this.doc.sel.ranges;a.ch==0&&t.length==l.length&&l[r].from().ch>0&&Ha(this.doc,r,new Q(a,l[r].to()),H)}}}),getTokenAt:function(e,t){return At(this,e,t)},getLineTokens:function(e,t){return At(this,Y(e),t,!0)},getTokenTypeAt:function(e){e=Z(this.doc,e);var t=wt(this,q(this.doc,e.line)),n=0,r=(t.length-1)/2,i=e.ch,a;if(i==0)a=t[2];else for(;;){var o=n+r>>1;if((o?t[o*2-1]:0)>=i)r=o;else if(t[o*2+1]<i)n=o+1;else{a=t[o*2+2];break}}var s=a?a.indexOf(`overlay `):-1;return s<0?a:s==0?null:a.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],a=this.getModeAt(e);if(typeof a[t]==`string`)i[a[t]]&&r.push(i[a[t]]);else if(a[t])for(var o=0;o<a[t].length;o++){var s=i[a[t][o]];s&&r.push(s)}else a.helperType&&i[a.helperType]?r.push(i[a.helperType]):i[a.name]&&r.push(i[a.name]);for(var c=0;c<i._global.length;c++){var l=i._global[c];l.pred(a,this)&&V(r,l.val)==-1&&r.push(l.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=vt(n,e??n.first+n.size-1),Tt(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=e==null?r.head:typeof e==`object`?Z(this.doc,e):e?r.from():r.to(),wr(this,n,t||`page`)},charCoords:function(e,t){return Cr(this,Z(this.doc,e),t||`page`)},coordsChar:function(e,t){return e=Sr(this,e,t||`page`),Dr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Sr(this,{top:e,left:0},t||`page`).top,dt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r=!1,i;if(typeof e==`number`){var a=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>a&&(e=a,r=!0),i=q(this.doc,e)}else i=e;return xr(this,i,{top:0,left:0},t||`page`,n||r).top+(r?this.doc.height-fn(i):0)},defaultTextHeight:function(){return Fr(this.display)},defaultCharWidth:function(){return Ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var a=this.display;e=wr(this,Z(this.doc,e));var o=e.bottom,s=e.left;if(t.style.position=`absolute`,t.setAttribute(`cm-ignore-events`,`true`),this.display.input.setUneditable(t),a.sizer.appendChild(t),r==`over`)o=e.top;else if(r==`above`||r==`near`){var c=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);(r==`above`||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(o=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=o+`px`,t.style.left=t.style.right=``,i==`right`?(s=a.sizer.clientWidth-t.offsetWidth,t.style.right=`0px`):(i==`left`?s=0:i==`middle`&&(s=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+`px`),n&&ui(this,{left:s,top:o,right:s+t.offsetWidth,bottom:o+t.offsetHeight})},triggerOnKeyDown:zi(ms),triggerOnKeyPress:zi(_s),triggerOnKeyUp:gs,triggerOnMouseDown:zi(Cs),execCommand:function(e){if(ns.hasOwnProperty(e))return ns[e].call(null,this)},triggerElectric:zi(function(e){Xs(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var a=Z(this.doc,e),o=0;o<t&&(a=tc(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:zi(function(e,t){var n=this;this.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?tc(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()},se)}),deleteH:zi(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection(``,null,`+delete`):Zo(this,function(n){var i=tc(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,a=r;t<0&&(i=-1,t=-t);for(var o=Z(this.doc,e),s=0;s<t;++s){var c=wr(this,o,`div`);if(a==null?a=c.left:c.left=a,o=nc(this,c,i,n),o.hitSide)break}return o},moveV:zi(function(e,t){var n=this,r=this.doc,i=[],a=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(o){if(a)return e<0?o.from():o.to();var s=wr(n,o.head,`div`);o.goalColumn!=null&&(s.left=o.goalColumn),i.push(s.left);var c=nc(n,s,e,t);return t==`page`&&o==r.sel.primary()&&fi(n,Cr(n,c,`div`).top-s.top),c},se),i.length)for(var o=0;o<r.sel.ranges.length;o++)r.sel.ranges[o].goalColumn=i[o]}),findWordAt:function(e){var t=this.doc,n=q(t,e.line).text,r=e.ch,i=e.ch;if(n){var a=this.getHelper(e,`wordChars`);(e.sticky==`before`||i==n.length)&&r?--r:++i;for(var o=n.charAt(r),s=_e(o,a)?function(e){return _e(e,a)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!_e(e)};r>0&&s(n.charAt(r-1));)--r;for(;i<n.length&&s(n.charAt(i));)++i}return new Q(Y(e.line,r),Y(e.line,i))},toggleOverwrite:function(e){e!=null&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ee(this.display.cursorDiv,`CodeMirror-overwrite`):E(this.display.cursorDiv,`CodeMirror-overwrite`),ke(this,`overwriteToggle`,this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N(ne(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:zi(function(e,t){mi(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-er(this)-this.display.barHeight,width:e.scrollWidth-er(this)-this.display.barWidth,clientHeight:nr(this),clientWidth:tr(this)}},scrollIntoView:zi(function(e,t){e==null?(e={from:this.doc.sel.primary().head,to:null},t??=this.options.cursorScrollMargin):typeof e==`number`?e={from:Y(e,0),to:null}:e.from??(e={from:e,to:null}),e.to||=e.from,e.margin=t||0,e.from.line==null?_i(this,e.from,e.to,e.margin):hi(this,e)}),setSize:zi(function(e,t){var n=this,r=function(e){return typeof e==`number`||/^\d+$/.test(String(e))?e+`px`:e};e!=null&&(this.display.wrapper.style.width=r(e)),t!=null&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&gr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets){for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Wr(n,i,`widget`);break}}++i}),this.curOp.forceUpdate=!0,ke(this,`refresh`,this)}),operation:function(e){return Li(this,e)},startOperation:function(){return ki(this)},endOperation:function(){return Ai(this)},refresh:zi(function(){var e=this.display.cachedTextHeight;Ur(this),this.curOp.forceUpdate=!0,_r(this),mi(this,this.doc.scrollLeft,this.doc.scrollTop),Zi(this.display),(e==null||Math.abs(e-Fr(this.display))>.5||this.options.lineWrapping)&&Br(this),ke(this,`refresh`,this)}),swapDoc:zi(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ca(this,e),_r(this),this.display.input.reset(),mi(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Fn(this,`swapDoc`,this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},Ne(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,a){e.registerHelper(t,r,a),n[t]._global.push({pred:i,val:a})}}function tc(e,t,n,r,i){var a=t,o=n,s=q(e,t.line),c=i&&e.direction==`rtl`?-n:n;function l(){var n=t.line+c;return n<e.first||n>=e.first+e.size?!1:(t=new Y(n,t.ch,t.sticky),s=q(e,n))}function u(a){var o;if(r==`codepoint`){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))o=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;o=new Y(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else o=i?ts(e.cm,s,t,n):$o(s,t,n);if(o==null)if(!a&&l())t=es(i,e.cm,s,t.line,c);else return!1;else t=o;return!0}if(r==`char`||r==`codepoint`)u();else if(r==`column`)u(!0);else if(r==`word`||r==`group`)for(var d=null,f=r==`group`,p=e.cm&&e.cm.getHelper(t,`wordChars`),m=!0;!(n<0&&!u(!m));m=!1){var h=s.text.charAt(t.ch)||`
|
|
16
|
+
`,g=_e(h,p)?`w`:f&&h==`
|
|
17
|
+
`?`n`:!f||/\s/.test(h)?null:`p`;if(f&&!m&&!g&&(g=`s`),d&&d!=g){n<0&&(n=1,u(),t.sticky=`after`);break}if(g&&(d=g),n>0&&!u(!m))break}var _=Qa(e,t,a,o,!0);return mt(a,_)&&(_.hitSide=!0),_}function nc(e,t,n,r){var i=e.doc,a=t.left,o;if(r==`page`){var s=Math.min(e.display.wrapper.clientHeight,L(e).innerHeight||i(e).documentElement.clientHeight),c=Math.max(s-.5*Fr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else r==`line`&&(o=n>0?t.bottom+3:t.top-3);for(var l;l=Dr(e,a,o),l.outside;){if(n<0?o<=0:o>=i.height){l.hitSide=!0;break}o+=n*5}return l}var $=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new re,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,Qs(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}K(i,`paste`,function(e){!a(e)||Ae(r,e)||Ys(e,r)||s<=11&&setTimeout(Ri(r,function(){return t.updateFromDOM()}),20)}),K(i,`compositionstart`,function(e){t.composing={data:e.data,done:!1}}),K(i,`compositionupdate`,function(e){t.composing||={data:e.data,done:!1}}),K(i,`compositionend`,function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),K(i,`touchstart`,function(){return n.forceCompositionEnd()}),K(i,`input`,function(){t.composing||t.readFromDOMSoon()});function o(e){if(!(!a(e)||Ae(r,e))){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()}),e.type==`cut`&&r.replaceSelection(``,null,`cut`);else if(r.options.lineWiseCopyCut){var t=Zs(r);qs({lineWise:!0,text:t.text}),e.type==`cut`&&r.operation(function(){r.setSelections(t.ranges,0,H),r.replaceSelection(``,null,`cut`)})}else return;if(e.clipboardData){e.clipboardData.clearData();var o=Ks.text.join(`
|
|
18
|
+
`);if(e.clipboardData.setData(`Text`,o),e.clipboardData.getData(`Text`)==o){e.preventDefault();return}}var s=$s(),c=s.firstChild;Qs(c),r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),c.value=Ks.text.join(`
|
|
19
|
+
`);var l=N(I(i));te(c),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==i&&n.showPrimarySelection()},50)}}K(i,`copy`,o),K(i,`cut`,o)},$.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute(`aria-label`,e):this.div.removeAttribute(`aria-label`)},$.prototype.prepareSelection=function(){var e=Xr(this.cm,!1);return e.focus=N(I(this.div))==this.div,e},$.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),a=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||a.line<t.display.viewFrom){e.removeAllRanges();return}var o=sc(t,e.anchorNode,e.anchorOffset),s=sc(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&s&&!s.bad&&X(_t(o,s),i)==0&&X(gt(o,s),a)==0)){var c=t.display.view,l=i.line>=t.display.viewFrom&&rc(t,i)||{node:c[0].measure.map[2],offset:0},u=a.line<t.display.viewTo&&rc(t,a);if(!u){var d=c[c.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(!l||!u){e.removeAllRanges();return}var p=e.rangeCount&&e.getRangeAt(0),m;try{m=j(l.node,l.offset,u.offset,u.node)}catch{}m&&(!n&&t.state.focused?(e.collapse(l.node,l.offset),m.collapsed||(e.removeAllRanges(),e.addRange(m))):(e.removeAllRanges(),e.addRange(m)),p&&e.anchorNode==null?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}},$.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},$.prototype.showMultipleSelections=function(e){O(this.cm.display.cursorDiv,e.cursors),O(this.cm.display.selectionDiv,e.selection)},$.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},$.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return M(this.div,t)},$.prototype.focus=function(){this.cm.options.readOnly!=`nocursor`&&((!this.selectionInEditor()||N(I(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},$.prototype.blur=function(){this.div.blur()},$.prototype.getField=function(){return this.div},$.prototype.supportsTouch=function(){return!0},$.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Li(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},$.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},$.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(_&&u&&this.cm.display.gutterSpecs.length&&ic(e.anchorNode)){this.cm.triggerOnKeyDown({type:`keydown`,keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=sc(t,e.anchorNode,e.anchorOffset),r=sc(t,e.focusNode,e.focusOffset);n&&r&&Li(t,function(){Ka(t.doc,fa(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},$.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=Y(r.line-1,q(e.doc,r.line-1).length)),i.ch==q(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Y(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;r.line==t.viewFrom||(a=Hr(e,r.line))==0?(o=J(t.view[0].line),s=t.view[0].node):(o=J(t.view[a].line),s=t.view[a-1].node.nextSibling);var c=Hr(e,i.line),l,u;if(c==t.view.length-1?(l=t.viewTo-1,u=t.lineDiv.lastChild):(l=J(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var d=e.doc.splitLines(oc(e,s,u,o,l)),f=ct(e.doc,Y(o,0),Y(l,q(e.doc,l).text.length));d.length>1&&f.length>1;)if(U(d)==U(f))d.pop(),f.pop(),l--;else if(d[0]==f[0])d.shift(),f.shift(),o++;else break;for(var p=0,m=0,h=d[0],g=f[0],_=Math.min(h.length,g.length);p<_&&h.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=U(d),y=U(f),b=Math.min(v.length-(d.length==1?p:0),y.length-(f.length==1?p:0));m<b&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(d.length==1&&f.length==1&&o==r.line)for(;p&&p>r.ch&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)p--,m++;d[d.length-1]=v.slice(0,v.length-m).replace(/^\u200b+/,``),d[0]=d[0].slice(p).replace(/\u200b+$/,``);var x=Y(o,p),S=Y(l,f.length?U(f).length-m:0);if(d.length>1||d[0]||X(x,S))return co(e.doc,d,x,S,`+input`),!0},$.prototype.ensurePolled=function(){this.forceCompositionEnd()},$.prototype.reset=function(){this.forceCompositionEnd()},$.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout??=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},$.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Li(this.cm,function(){return Ur(e.cm)})},$.prototype.setUneditable=function(e){e.contentEditable=`false`},$.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ri(this.cm,Js)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!=`nocursor`)},$.prototype.onContextMenu=function(){},$.prototype.resetPosition=function(){},$.prototype.needsContentAttribute=!0;function rc(e,t){var n=sr(e,t.line);if(!n||n.hidden)return null;var r=q(e.doc,t.line),i=ir(n,r,t.line),a=G(r,e.doc.direction),o=`left`;a&&(o=we(a,t.ch)%2?`right`:`left`);var s=dr(i.map,t.ch,o);return s.offset=s.collapse==`right`?s.end:s.start,s}function ic(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ac(e,t){return t&&(e.bad=!0),e}function oc(e,t,n,r,i){var a=``,o=!1,s=e.doc.lineSeparator(),c=!1;function l(e){return function(t){return t.id==e}}function u(){o&&=(a+=s,c&&(a+=s),c=!1)}function d(e){e&&(u(),a+=e)}function f(t){if(t.nodeType==1){var n=t.getAttribute(`cm-text`);if(n){d(n);return}var a=t.getAttribute(`cm-marker`),p;if(a){var m=e.findMarks(Y(r,0),Y(i+1,0),l(+a));m.length&&(p=m[0].find(0))&&d(ct(e.doc,p.from,p.to).join(s));return}if(t.getAttribute(`contenteditable`)==`false`)return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&t.textContent.length==0)return;h&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(c=!0),h&&(o=!0)}else t.nodeType==3&&d(t.nodeValue.replace(/\u200b/g,``).replace(/\u00a0/g,` `))}for(;f(t),t!=n;)t=t.nextSibling,c=!1;return a}function sc(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return ac(e.clipPos(Y(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return cc(a,t,n)}}function cc(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!M(r,t))return ac(Y(J(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?U(e.rest):e.line;return ac(Y(J(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,n&&=o.nodeValue.length);s.parentNode!=r;)s=s.parentNode;var c=e.measure,l=c.maps;function u(t,n,r){for(var i=-1;i<(l?l.length:0);i++)for(var a=i<0?c.map:l[i],o=0;o<a.length;o+=3){var s=a[o+2];if(s==t||s==n){var u=J(i<0?e.line:e.rest[i]),d=a[o]+r;return(r<0||s!=t)&&(d=a[o+(r?1:0)]),Y(u,d)}}}var d=u(o,s,n);if(d)return ac(d,i);for(var f=s.nextSibling,p=o?o.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0),d)return ac(Y(d.line,d.ch-p),i);p+=f.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1),d)return ac(Y(d.line,d.ch+h),i);h+=m.textContent.length}}var lc=function(e){this.cm=e,this.prevInput=``,this.pollingFast=!1,this.polling=new re,this.hasSelection=!1,this.composing=null,this.resetting=!1};lc.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width=`0px`),K(i,`input`,function(){o&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),K(i,`paste`,function(e){Ae(r,e)||Ys(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(e){if(!Ae(r,e)){if(r.somethingSelected())qs({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var t=Zs(r);qs({lineWise:!0,text:t.text}),e.type==`cut`?r.setSelections(t.ranges,null,H):(n.prevInput=``,i.value=t.text.join(`
|
|
20
|
+
`),te(i))}else return;e.type==`cut`&&(r.state.cutIncoming=+new Date)}}K(i,`cut`,a),K(i,`copy`,a),K(e.scroller,`paste`,function(t){if(!(Xn(e,t)||Ae(r,t))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event(`paste`);a.clipboardData=t.clipboardData,i.dispatchEvent(a)}}),K(e.lineSpace,`selectstart`,function(t){Xn(e,t)||Pe(t)}),K(i,`compositionstart`,function(){var e=r.getCursor(`from`);n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor(`to`),{className:`CodeMirror-composing`})}}),K(i,`compositionend`,function(){n.composing&&=(n.poll(),n.composing.range.clear(),null)})},lc.prototype.createField=function(e){this.wrapper=$s(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Qs(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},lc.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute(`aria-label`,e):this.textarea.removeAttribute(`aria-label`)},lc.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Xr(e);if(e.options.moveInputWithCursor){var i=wr(e,n.sel.primary().head,`div`),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},lc.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+`px`,this.wrapper.style.left=e.teLeft+`px`)},lc.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput=``;var n=t.getSelection();this.textarea.value=n,t.state.focused&&te(this.textarea),o&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value=``,o&&s>=9&&(this.hasSelection=null));this.resetting=!1}},lc.prototype.getField=function(){return this.textarea},lc.prototype.supportsTouch=function(){return!1},lc.prototype.focus=function(){if(this.cm.options.readOnly!=`nocursor`&&(!v||N(I(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},lc.prototype.blur=function(){this.textarea.blur()},lc.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lc.prototype.receivedFocus=function(){this.slowPoll()},lc.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},lc.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){!t.poll()&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},lc.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ke(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r=``),a==8666)return this.reset(),this.cm.execCommand(`undo`)}for(var c=0,l=Math.min(r.length,i.length);c<l&&r.charCodeAt(c)==i.charCodeAt(c);)++c;return Li(t,function(){Js(t,i.slice(c),r.length-c,null,e.composing?`*compose`:null),i.length>1e3||i.indexOf(`
|
|
21
|
+
`)>-1?n.value=e.prevInput=``:e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor(`to`),{className:`CodeMirror-composing`}))}),!0},lc.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lc.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},lc.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=Vr(n,e),l=r.scroller.scrollTop;if(!a||f)return;n.options.resetSelectionOnContextMenu&&n.doc.sel.contains(a)==-1&&Ri(n,Ka)(n.doc,fa(a),H);var u=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText=`position: static`,i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
22
|
+
top: `+(e.clientY-p.top-5)+`px; left: `+(e.clientX-p.left-5)+`px;
|
|
23
|
+
z-index: 1000; background: `+(o?`rgba(255, 255, 255, .05)`:`transparent`)+`;
|
|
24
|
+
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var m;c&&(m=i.ownerDocument.defaultView.scrollY),r.input.focus(),c&&i.ownerDocument.defaultView.scrollTo(null,m),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=` `),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function h(){if(i.selectionStart!=null){var e=n.somethingSelected(),a=``+(e?i.value:``);i.value=`⇚`,i.value=a,t.prevInput=e?``:``,i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!o||o&&s<9)&&h();var e=0,a=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==``?Ri(n,eo)(n):e++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}if(o&&s>=9&&h(),w){Le(e);var _=function(){Oe(window,`mouseup`,_),setTimeout(g,20)};K(window,`mouseup`,_)}else setTimeout(g,50)},lc.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e==`nocursor`,this.textarea.readOnly=!!e},lc.prototype.setUneditable=function(){},lc.prototype.needsContentAttribute=!1;function uc(e,t){if(t=t?z(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=N(I(e));t.autofocus=n==e||e.getAttribute(`autofocus`)!=null&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(K(e.form,`submit`,r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch{}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display=``,e.form&&(Oe(e.form,`submit`,r),!t.leaveSubmitMethodAlone&&typeof e.form.submit==`function`&&(e.form.submit=i))}},e.style.display=`none`;var s=Hs(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s}function dc(e){e.off=Oe,e.on=K,e.wheelEventPixels=ca,e.Doc=Oo,e.splitLines=Ge,e.countColumn=B,e.findColumn=ce,e.isWordChar=ge,e.Pass=ae,e.signal=ke,e.Line=hn,e.changeEnd=pa,e.scrollbarModel=Ei,e.Pos=Y,e.cmpPos=X,e.modes=Xe,e.mimeModes=Ze,e.resolveMode=et,e.getMode=tt,e.modeExtensions=nt,e.extendMode=rt,e.copyState=it,e.startState=ot,e.innerMode=at,e.commands=ns,e.keyMap=Uo,e.keyName=Yo,e.isModifierKey=qo,e.lookupKey=Ko,e.normalizeKeyMap=Go,e.StringStream=st,e.SharedTextMarker=So,e.TextMarker=bo,e.LineWidget=go,e.e_preventDefault=Pe,e.e_stopPropagation=Fe,e.e_stop=Le,e.addClass=ee,e.contains=M,e.rmClass=E,e.keyNames=zo}zs(Hs),ec(Hs);var fc=`iter insert remove copy getEditor constructor`.split(` `);for(var pc in Oo.prototype)Oo.prototype.hasOwnProperty(pc)&&V(fc,pc)<0&&(Hs.prototype[pc]=(function(e){return function(){return e.apply(this.doc,arguments)}})(Oo.prototype[pc]));return Ne(Oo),Hs.inputStyles={textarea:lc,contenteditable:$},Hs.defineMode=function(e){!Hs.defaults.mode&&e!=`null`&&(Hs.defaults.mode=e),Qe.apply(this,arguments)},Hs.defineMIME=$e,Hs.defineMode(`null`,function(){return{token:function(e){return e.skipToEnd()}}}),Hs.defineMIME(`text/plain`,`null`),Hs.defineExtension=function(e,t){Hs.prototype[e]=t},Hs.defineDocExtension=function(e,t){Oo.prototype[e]=t},Hs.fromTextArea=uc,dc(Hs),Hs.version=`5.65.21`,Hs}))})),it=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){function t(t,n,r){var i=t.getWrapperElement(),a=i.appendChild(document.createElement(`div`));return r?a.className=`CodeMirror-dialog CodeMirror-dialog-bottom`:a.className=`CodeMirror-dialog CodeMirror-dialog-top`,typeof n==`string`?a.innerHTML=n:a.appendChild(n),e.addClass(i,`dialog-opened`),a}function n(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension(`openDialog`,function(r,i,a){a||={},n(this,null);var o=t(this,r,a.bottom),s=!1,c=this;function l(t){if(typeof t==`string`)u.value=t;else{if(s)return;s=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),c.focus(),a.onClose&&a.onClose(o)}}var u=o.getElementsByTagName(`input`)[0],d;return u?(u.focus(),a.value&&(u.value=a.value,a.selectValueOnOpen!==!1&&u.select()),a.onInput&&e.on(u,`input`,function(e){a.onInput(e,u.value,l)}),a.onKeyUp&&e.on(u,`keyup`,function(e){a.onKeyUp(e,u.value,l)}),e.on(u,`keydown`,function(t){a&&a.onKeyDown&&a.onKeyDown(t,u.value,l)||((t.keyCode==27||a.closeOnEnter!==!1&&t.keyCode==13)&&(u.blur(),e.e_stop(t),l()),t.keyCode==13&&i(u.value,t))}),a.closeOnBlur!==!1&&e.on(o,`focusout`,function(e){e.relatedTarget!==null&&l()})):(d=o.getElementsByTagName(`button`)[0])&&(e.on(d,`click`,function(){l(),c.focus()}),a.closeOnBlur!==!1&&e.on(d,`blur`,l),d.focus()),l}),e.defineExtension(`openConfirm`,function(r,i,a){n(this,null);var o=t(this,r,a&&a.bottom),s=o.getElementsByTagName(`button`),c=!1,l=this,u=1;function d(){c||(c=!0,e.rmClass(o.parentNode,`dialog-opened`),o.parentNode.removeChild(o),l.focus())}s[0].focus();for(var f=0;f<s.length;++f){var p=s[f];(function(t){e.on(p,`click`,function(n){e.e_preventDefault(n),d(),t&&t(l)})})(i[f]),e.on(p,`blur`,function(){--u,setTimeout(function(){u<=0&&d()},200)}),e.on(p,`focus`,function(){++u})}}),e.defineExtension(`openNotification`,function(r,i){n(this,l);var a=t(this,r,i&&i.bottom),o=!1,s,c=i&&i.duration!==void 0?i.duration:5e3;function l(){o||(o=!0,clearTimeout(s),e.rmClass(a.parentNode,`dialog-opened`),a.parentNode.removeChild(a))}return e.on(a,`click`,function(t){e.e_preventDefault(t),l()}),c&&(s=setTimeout(l,c)),l})})}));it();var at=f(rt(),1),ot=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineOption(`placeholder`,``,function(n,o,s){var c=s&&s!=e.Init;if(o&&!c)n.on(`blur`,i),n.on(`change`,a),n.on(`swapDoc`,a),e.on(n.getInputField(),`compositionupdate`,n.state.placeholderCompose=function(){r(n)}),a(n);else if(!o&&c){n.off(`blur`,i),n.off(`change`,a),n.off(`swapDoc`,a),e.off(n.getInputField(),`compositionupdate`,n.state.placeholderCompose),t(n);var l=n.getWrapperElement();l.className=l.className.replace(` CodeMirror-empty`,``)}o&&!n.hasFocus()&&i(n)});function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement(`pre`);n.style.cssText=`height: 0; overflow: visible`,n.style.direction=e.getOption(`direction`),n.className=`CodeMirror-placeholder CodeMirror-line-like`;var r=e.getOption(`placeholder`);typeof r==`string`&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout(function(){var r=!1;if(e.lineCount()==1){var i=e.getInputField();r=i.nodeName==`TEXTAREA`?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(`.CodeMirror-line`).textContent)}r?n(e):t(e)},20)}function i(e){o(e)&&n(e)}function a(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(` CodeMirror-empty`,``)+(i?` CodeMirror-empty`:``),i?n(e):t(e)}function o(e){return e.lineCount()===1&&e.getLine(0)===``}})})),st=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),it()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function n(e){return e.phrase(`Jump to line:`)+` <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">`+e.phrase(`(Use line:column or scroll% syntax)`)+`</span>`}function r(e,t){var n=Number(t);return/^[-+]/.test(t)?e.getCursor().line+n:n-1}e.commands.jumpToLine=function(e){var i=e.getCursor();t(e,n(e),e.phrase(`Jump to line:`),i.line+1+`:`+i.ch,function(t){if(t){var n;if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(r(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var a=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(a=i.line+a+1),e.setCursor(a-1,i.ch)}else (n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(r(e,n[1]),i.ch)}})},e.keyMap.default[`Alt-G`]=`jumpToLine`})})),q=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){var t=e.Pos;function n(e){return e.flags??(e.ignoreCase?`i`:``)+(e.global?`g`:``)+(e.multiline?`m`:``)}function r(e,t){for(var r=n(e),i=r,a=0;a<t.length;a++)i.indexOf(t.charAt(a))==-1&&(i+=t.charAt(a));return r==i?e:new RegExp(e.source,i)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,s=e.lastLine();a<=s;a++,o=0){n.lastIndex=o;var c=e.getLine(a),l=n.exec(c);if(l)return{from:t(a,l.index),to:t(a,l.index+l[0].length),match:l}}}function o(e,n,o){if(!i(n))return a(e,n,o);n=r(n,`gm`);for(var s,c=1,l=o.line,u=e.lastLine();l<=u;){for(var d=0;d<c&&!(l>u);d++){var f=e.getLine(l++);s=s==null?f:s+`
|
|
25
|
+
`+f}c*=2,n.lastIndex=o.ch;var p=n.exec(s);if(p){var m=s.slice(0,p.index).split(`
|
|
26
|
+
`),h=p[0].split(`
|
|
27
|
+
`),g=o.line+m.length-1,_=m[m.length-1].length;return{from:t(g,_),to:t(g+h.length-1,h.length==1?_+h[0].length:h[h.length-1].length),match:p}}}}function s(e,t,n){for(var r,i=0;i<=e.length;){t.lastIndex=i;var a=t.exec(e);if(!a)break;var o=a.index+a[0].length;if(o>e.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function c(e,n,i){n=r(n,`g`);for(var a=i.line,o=i.ch,c=e.firstLine();a>=c;a--,o=-1){var l=e.getLine(a),u=s(l,n,o<0?0:l.length-o);if(u)return{from:t(a,u.index),to:t(a,u.index+u[0].length),match:u}}}function l(e,n,a){if(!i(n))return c(e,n,a);n=r(n,`gm`);for(var o,l=1,u=e.getLine(a.line).length-a.ch,d=a.line,f=e.firstLine();d>=f;){for(var p=0;p<l&&d>=f;p++){var m=e.getLine(d--);o=o==null?m:m+`
|
|
28
|
+
`+o}l*=2;var h=s(o,n,u);if(h){var g=o.slice(0,h.index).split(`
|
|
29
|
+
`),_=h[0].split(`
|
|
30
|
+
`),v=d+g.length,y=g[g.length-1].length;return{from:t(v,y),to:t(v+_.length-1,_.length==1?y+_[0].length:_[_.length-1].length),match:h}}}}var u,d;String.prototype.normalize?(u=function(e){return e.normalize(`NFD`).toLowerCase()},d=function(e){return e.normalize(`NFD`)}):(u=function(e){return e.toLowerCase()},d=function(e){return e});function f(e,t,n,r){if(e.length==t.length)return n;for(var i=0,a=n+Math.max(0,e.length-t.length);;){if(i==a)return i;var o=i+a>>1,s=r(e.slice(0,o)).length;if(s==n)return o;s>n?a=o:i=o+1}}function p(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.lastLine()+1-o.length;s<=l;s++,c=0){var p=e.getLine(s).slice(c),m=a(p);if(o.length==1){var h=m.indexOf(o[0]);if(h==-1)continue search;var r=f(p,m,h,a)+c;return{from:t(s,f(p,m,h,a)+c),to:t(s,f(p,m,h+o[0].length,a)+c)}}else{var g=m.length-o[0].length;if(m.slice(g)!=o[0])continue search;for(var _=1;_<o.length-1;_++)if(a(e.getLine(s+_))!=o[_])continue search;var v=e.getLine(s+o.length-1),y=a(v),b=o[o.length-1];if(y.slice(0,b.length)!=b)continue search;return{from:t(s,f(p,m,g,a)+c),to:t(s+o.length-1,f(v,y,b.length,a))}}}}function m(e,n,r,i){if(!n.length)return null;var a=i?u:d,o=a(n).split(/\r|\n\r?/);search:for(var s=r.line,c=r.ch,l=e.firstLine()-1+o.length;s>=l;s--,c=-1){var p=e.getLine(s);c>-1&&(p=p.slice(0,c));var m=a(p);if(o.length==1){var h=m.lastIndexOf(o[0]);if(h==-1)continue search;return{from:t(s,f(p,m,h,a)),to:t(s,f(p,m,h+o[0].length,a))}}else{var g=o[o.length-1];if(m.slice(0,g.length)!=g)continue search;for(var _=1,r=s-o.length+1;_<o.length-1;_++)if(a(e.getLine(r+_))!=o[_])continue search;var v=e.getLine(s+1-o.length),y=a(v);if(y.slice(y.length-o[0].length)!=o[0])continue search;return{from:t(s+1-o.length,f(v,y,v.length-o[0].length,a)),to:t(s,f(p,m,g.length,a))}}}}function h(e,n,i,s){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,i=i?e.clipPos(i):t(0,0),this.pos={from:i,to:i};var u;typeof s==`object`?u=s.caseFold:(u=s,s=null),typeof n==`string`?(u??=!1,this.matches=function(t,r){return(t?m:p)(e,n,r,u)}):(n=r(n,`gm`),!s||s.multiline!==!1?this.matches=function(t,r){return(t?l:o)(e,n,r)}:this.matches=function(t,r){return(t?c:a)(e,n,r)})}h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){var r=this.doc.clipPos(n?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(r=t(r.line,r.ch),n?(r.ch--,r.ch<0&&(r.line--,r.ch=(this.doc.getLine(r.line)||``).length)):(r.ch++,r.ch>(this.doc.getLine(r.line)||``).length&&(r.ch=0,r.line++)),e.cmpPos(r,this.doc.clipPos(r))!=0))return this.atOccurrence=!1;var i=this.matches(n,r);if(this.afterEmptyMatch=i&&e.cmpPos(i.from,i.to)==0,i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var a=t(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:a,to:a},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,r){if(this.atOccurrence){var i=e.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=t(this.pos.from.line+i.length-1,i[i.length-1].length+(i.length==1?this.pos.from.ch:0))}}},e.defineExtension(`getSearchCursor`,function(e,t,n){return new h(this.doc,e,t,n)}),e.defineDocExtension(`getSearchCursor`,function(e,t,n){return new h(this,e,t,n)}),e.defineExtension(`selectMatches`,function(t,n){for(var r=[],i=this.getSearchCursor(t,this.getCursor(`from`),n);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor(`to`))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})}));B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),q(),it()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`./searchcursor`,`../dialog/dialog`],n):n(CodeMirror)})(function(e){e.defineOption(`search`,{bottom:!1});function t(e,t){return typeof e==`string`?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),t?`gi`:`g`):e.global||(e=new RegExp(e.source,e.ignoreCase?`gi`:`g`)),{token:function(t){e.lastIndex=t.pos;var n=e.exec(t.string);if(n&&n.index==t.pos)return t.pos+=n[0].length||1,`searching`;n?t.pos=n.index:t.skipToEnd()}}}function n(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function r(e){return e.state.search||(e.state.search=new n)}function i(e){return typeof e==`string`&&e==e.toLowerCase()}function a(e,t,n){return e.getSearchCursor(t,n,{caseFold:i(t),multiline:!0})}function o(e,t,n,r,i){e.openDialog(t,r,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){m(e)},onKeyDown:i,bottom:e.options.search.bottom})}function s(e,t,n,r,i){e.openDialog?e.openDialog(t,i,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,r))}function c(e,t,n,r){e.openConfirm?e.openConfirm(t,r):confirm(n)&&r[0]()}function l(e){return e.replace(/\\([nrt\\])/g,function(e,t){return t==`n`?`
|
|
31
|
+
`:t==`r`?`\r`:t==`t`?` `:t==`\\`?`\\`:e})}function u(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf(`i`)==-1?``:`i`)}catch{}else e=l(e);return(typeof e==`string`?e==``:e.test(``))&&(e=/x^/),e}function d(e,n,r){n.queryText=r,n.query=u(r),e.removeOverlay(n.overlay,i(n.query)),n.overlay=t(n.query,i(n.query)),e.addOverlay(n.overlay),e.showMatchesOnScrollbar&&(n.annotate&&=(n.annotate.clear(),null),n.annotate=e.showMatchesOnScrollbar(n.query,i(n.query)))}function f(t,n,i,a){var c=r(t);if(c.query)return p(t,n);var l=t.getSelection()||c.lastQuery;if(l instanceof RegExp&&l.source==`x^`&&(l=null),i&&t.openDialog){var u=null,f=function(n,r){e.e_stop(r),n&&(n!=c.queryText&&(d(t,c,n),c.posFrom=c.posTo=t.getCursor()),u&&(u.style.opacity=1),p(t,r.shiftKey,function(e,n){var r;n.line<3&&document.querySelector&&(r=t.display.wrapper.querySelector(`.CodeMirror-dialog`))&&r.getBoundingClientRect().bottom-4>t.cursorCoords(n,`window`).top&&((u=r).style.opacity=.4)}))};o(t,g(t),l,f,function(n,i){var a=e.keyName(n),o=t.getOption(`extraKeys`),s=o&&o[a]||e.keyMap[t.getOption(`keyMap`)][a];s==`findNext`||s==`findPrev`||s==`findPersistentNext`||s==`findPersistentPrev`?(e.e_stop(n),d(t,r(t),i),t.execCommand(s)):(s==`find`||s==`findPersistent`)&&(e.e_stop(n),f(i,n))}),a&&l&&(d(t,c,l),p(t,n))}else s(t,g(t),`Search for:`,l,function(e){e&&!c.query&&t.operation(function(){d(t,c,e),c.posFrom=c.posTo=t.getCursor(),p(t,n)})})}function p(t,n,i){t.operation(function(){var o=r(t),s=a(t,o.query,n?o.posFrom:o.posTo);!s.find(n)&&(s=a(t,o.query,n?e.Pos(t.lastLine()):e.Pos(t.firstLine(),0)),!s.find(n))||(t.setSelection(s.from(),s.to()),t.scrollIntoView({from:s.from(),to:s.to()},20),o.posFrom=s.from(),o.posTo=s.to(),i&&i(s.from(),s.to()))})}function m(e){e.operation(function(){var t=r(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&=(t.annotate.clear(),null))})}function h(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var r in t)n[r]=t[r];for(var i=2;i<arguments.length;i++){var a=arguments[i];n.appendChild(typeof a==`string`?document.createTextNode(a):a)}return n}function g(e){var t=h(`label`,{className:`CodeMirror-search-label`},e.phrase(`Search:`),h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`,id:`CodeMirror-search-field`}));return t.setAttribute(`for`,`CodeMirror-search-field`),h(``,null,t,` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function _(e){return h(``,null,` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}),` `,h(`span`,{style:`color: #666`,className:`CodeMirror-search-hint`},e.phrase(`(Use /re/ syntax for regexp search)`)))}function v(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`With:`)),` `,h(`input`,{type:`text`,style:`width: 10em`,className:`CodeMirror-search-field`}))}function y(e){return h(``,null,h(`span`,{className:`CodeMirror-search-label`},e.phrase(`Replace?`)),` `,h(`button`,{},e.phrase(`Yes`)),` `,h(`button`,{},e.phrase(`No`)),` `,h(`button`,{},e.phrase(`All`)),` `,h(`button`,{},e.phrase(`Stop`)))}function b(e,t,n){e.operation(function(){for(var r=a(e,t);r.findNext();)if(typeof t!=`string`){var i=e.getRange(r.from(),r.to()).match(t);r.replace(n.replace(/\$(\d)/g,function(e,t){return i[t]}))}else r.replace(n)})}function x(e,t){if(!e.getOption(`readOnly`)){var n=e.getSelection()||r(e).lastQuery,i=t?e.phrase(`Replace all:`):e.phrase(`Replace:`);s(e,h(``,null,h(`span`,{className:`CodeMirror-search-label`},i),_(e)),i,n,function(n){n&&(n=u(n),s(e,v(e),e.phrase(`Replace with:`),``,function(r){if(r=l(r),t)b(e,n,r);else{m(e);var i=a(e,n,e.getCursor(`from`)),o=function(){var t=i.from(),l;!(l=i.findNext())&&(i=a(e,n),!(l=i.findNext())||t&&i.from().line==t.line&&i.from().ch==t.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),c(e,y(e),e.phrase(`Replace?`),[function(){s(l)},o,function(){b(e,n,r)}]))},s=function(e){i.replace(typeof n==`string`?r:r.replace(/\$(\d)/g,function(t,n){return e[n]})),o()};o()}}))})}}e.commands.find=function(e){m(e),f(e)},e.commands.findPersistent=function(e){m(e),f(e,!1,!0)},e.commands.findPersistentNext=function(e){f(e,!1,!0,!0)},e.commands.findPersistentPrev=function(e){f(e,!0,!0,!0)},e.commands.findNext=f,e.commands.findPrev=function(e){f(e,!0)},e.commands.clearSearch=m,e.commands.replace=x,e.commands.replaceAll=function(e){x(e,!0)}})}))(),st(),ot();var ct=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`css`,function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode(`text/css`));var i=t.indentUnit,a=n.tokenHooks,o=n.documentTypes||{},s=n.mediaTypes||{},c=n.mediaFeatures||{},l=n.mediaValueKeywords||{},u=n.propertyKeywords||{},d=n.nonStandardPropertyKeywords||{},f=n.fontProperties||{},p=n.counterDescriptors||{},m=n.colorKeywords||{},h=n.valueKeywords||{},g=n.allowNested,_=n.lineComment,v=n.supportsAtComponent===!0,y=t.highlightNonStandardPropertyKeywords!==!1,b,x;function S(e,t){return b=t,e}function C(e,t){var n=e.next();if(a[n]){var r=a[n](e,t);if(r!==!1)return r}if(n==`@`)return e.eatWhile(/[\w\\\-]/),S(`def`,e.current());if(n==`=`||(n==`~`||n==`|`)&&e.eat(`=`))return S(null,`compare`);if(n==`"`||n==`'`)return t.tokenize=w(n),t.tokenize(e,t);if(n==`#`)return e.eatWhile(/[\w\\\-]/),S(`atom`,`hash`);if(n==`!`)return e.match(/^\s*\w*/),S(`keyword`,`important`);if(/\d/.test(n)||n==`.`&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(n===`-`){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),S(`number`,`unit`);if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?S(`variable-2`,`variable-definition`):S(`variable-2`,`variable`);if(e.match(/^\w+-/))return S(`meta`,`meta`)}else if(/[,+>*\/]/.test(n))return S(null,`select-op`);else if(n==`.`&&e.match(/^-?[_a-z][_a-z0-9-]*/i))return S(`qualifier`,`qualifier`);else if(/[:;{}\[\]\(\)]/.test(n))return S(null,n);else if(e.match(/^[\w-.]+(?=\()/))return/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=T),S(`variable callee`,`variable`);else if(/[\w\\\-]/.test(n))return e.eatWhile(/[\w\\\-]/),S(`property`,`word`);else return S(null,null)}function w(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),S(`string`,`string`)}}function T(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=w(`)`),S(null,`(`)}function E(e,t,n){this.type=e,this.indent=t,this.prev=n}function D(e,t,n,r){return e.context=new E(n,t.indentation()+(r===!1?0:i),e.context),n}function O(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function k(e,t,n){return M[n.context.type](e,t,n)}function A(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return k(e,t,n)}function j(e){var t=e.current().toLowerCase();x=h.hasOwnProperty(t)?`atom`:m.hasOwnProperty(t)?`keyword`:`variable`}var M={};return M.top=function(e,t,n){if(e==`{`)return D(n,t,`block`);if(e==`}`&&n.context.prev)return O(n);if(v&&/@component/i.test(e))return D(n,t,`atComponentBlock`);if(/^@(-moz-)?document$/i.test(e))return D(n,t,`documentTypes`);if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return D(n,t,`atBlock`);if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,`restricted_atBlock_before`;if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return`keyframes`;if(e&&e.charAt(0)==`@`)return D(n,t,`at`);if(e==`hash`)x=`builtin`;else if(e==`word`)x=`tag`;else if(e==`variable-definition`)return`maybeprop`;else if(e==`interpolation`)return D(n,t,`interpolation`);else if(e==`:`)return`pseudo`;else if(g&&e==`(`)return D(n,t,`parens`);return n.context.type},M.block=function(e,t,n){if(e==`word`){var r=t.current().toLowerCase();return u.hasOwnProperty(r)?(x=`property`,`maybeprop`):d.hasOwnProperty(r)?(x=y?`string-2`:`property`,`maybeprop`):g?(x=t.match(/^\s*:(?:\s|$)/,!1)?`property`:`tag`,`block`):(x+=` error`,`maybeprop`)}else if(e==`meta`)return`block`;else if(!g&&(e==`hash`||e==`qualifier`))return x=`error`,`block`;else return M.top(e,t,n)},M.maybeprop=function(e,t,n){return e==`:`?D(n,t,`prop`):k(e,t,n)},M.prop=function(e,t,n){if(e==`;`)return O(n);if(e==`{`&&g)return D(n,t,`propBlock`);if(e==`}`||e==`{`)return A(e,t,n);if(e==`(`)return D(n,t,`parens`);if(e==`hash`&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current()))x+=` error`;else if(e==`word`)j(t);else if(e==`interpolation`)return D(n,t,`interpolation`);return`prop`},M.propBlock=function(e,t,n){return e==`}`?O(n):e==`word`?(x=`property`,`maybeprop`):n.context.type},M.parens=function(e,t,n){return e==`{`||e==`}`?A(e,t,n):e==`)`?O(n):e==`(`?D(n,t,`parens`):e==`interpolation`?D(n,t,`interpolation`):(e==`word`&&j(t),`parens`)},M.pseudo=function(e,t,n){return e==`meta`?`pseudo`:e==`word`?(x=`variable-3`,n.context.type):k(e,t,n)},M.documentTypes=function(e,t,n){return e==`word`&&o.hasOwnProperty(t.current())?(x=`tag`,n.context.type):M.atBlock(e,t,n)},M.atBlock=function(e,t,n){if(e==`(`)return D(n,t,`atBlock_parens`);if(e==`}`||e==`;`)return A(e,t,n);if(e==`{`)return O(n)&&D(n,t,g?`block`:`top`);if(e==`interpolation`)return D(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();x=r==`only`||r==`not`||r==`and`||r==`or`?`keyword`:s.hasOwnProperty(r)?`attribute`:c.hasOwnProperty(r)?`property`:l.hasOwnProperty(r)?`keyword`:u.hasOwnProperty(r)?`property`:d.hasOwnProperty(r)?y?`string-2`:`property`:h.hasOwnProperty(r)?`atom`:m.hasOwnProperty(r)?`keyword`:`error`}return n.context.type},M.atComponentBlock=function(e,t,n){return e==`}`?A(e,t,n):e==`{`?O(n)&&D(n,t,g?`block`:`top`,!1):(e==`word`&&(x=`error`),n.context.type)},M.atBlock_parens=function(e,t,n){return e==`)`?O(n):e==`{`||e==`}`?A(e,t,n,2):M.atBlock(e,t,n)},M.restricted_atBlock_before=function(e,t,n){return e==`{`?D(n,t,`restricted_atBlock`):e==`word`&&n.stateArg==`@counter-style`?(x=`variable`,`restricted_atBlock_before`):k(e,t,n)},M.restricted_atBlock=function(e,t,n){return e==`}`?(n.stateArg=null,O(n)):e==`word`?(x=n.stateArg==`@font-face`&&!f.hasOwnProperty(t.current().toLowerCase())||n.stateArg==`@counter-style`&&!p.hasOwnProperty(t.current().toLowerCase())?`error`:`property`,`maybeprop`):`restricted_atBlock`},M.keyframes=function(e,t,n){return e==`word`?(x=`variable`,`keyframes`):e==`{`?D(n,t,`top`):k(e,t,n)},M.at=function(e,t,n){return e==`;`?O(n):e==`{`||e==`}`?A(e,t,n):(e==`word`?x=`tag`:e==`hash`&&(x=`builtin`),`at`)},M.interpolation=function(e,t,n){return e==`}`?O(n):e==`{`||e==`;`?A(e,t,n):(e==`word`?x=`variable`:e!=`variable`&&e!=`(`&&e!=`)`&&(x=`error`),`interpolation`)},{startState:function(e){return{tokenize:null,state:r?`block`:`top`,stateArg:null,context:new E(r?`block`:`top`,e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||C)(e,t);return n&&typeof n==`object`&&(b=n[1],n=n[0]),x=n,b!=`comment`&&(t.state=M[t.state](b,e,t)),x},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),a=n.indent;return n.type==`prop`&&(r==`}`||r==`)`)&&(n=n.prev),n.prev&&(r==`}`&&(n.type==`block`||n.type==`top`||n.type==`interpolation`||n.type==`restricted_atBlock`)?(n=n.prev,a=n.indent):(r==`)`&&(n.type==`parens`||n.type==`atBlock_parens`)||r==`{`&&(n.type==`at`||n.type==`atBlock`))&&(a=Math.max(0,n.indent-i))),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:_,fold:`brace`}});function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}var n=[`domain`,`regexp`,`url`,`url-prefix`],r=t(n),i=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],a=t(i),o=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range`.split(`.`),s=t(o),c=[`landscape`,`portrait`,`none`,`coarse`,`fine`,`on-demand`,`hover`,`interlace`,`progressive`,`dark`,`light`,`standard`,`high`],l=t(c),u=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode`.split(`.`),d=t(u),f=`accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom`.split(`.`),p=t(f),m=t([`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`]),h=t([`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`]),g=`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`),_=t(g),v=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`),y=t(v),b=n.concat(i).concat(o).concat(c).concat(u).concat(f).concat(g).concat(v);e.registerHelper(`hintWords`,`css`,b);function x(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}e.defineMIME(`text/css`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`}),e.defineMIME(`text/x-scss`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`]},"#":function(e){return e.eat(`{`)?[null,`interpolation`]:!1}},name:`css`,helperType:`scss`}),e.defineMIME(`text/x-less`,{mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=x,x(e,t)):[`operator`,`operator`]},"@":function(e){return e.eat(`{`)?[null,`interpolation`]:e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?[`variable-2`,`variable-definition`]:[`variable-2`,`variable`])},"&":function(){return[`atom`,`atom`]}},name:`css`,helperType:`less`}),e.defineMIME(`text/x-gss`,{documentTypes:r,mediaTypes:a,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=x,x(e,t)):!1}},name:`css`,helperType:`gss`})})})),lt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineSimpleMode=function(t,n){e.defineMode(t,function(t){return e.simpleMode(t,n)})},e.simpleMode=function(n,r){t(r,`start`);var o={},s=r.meta||{},c=!1;for(var u in r)if(u!=s&&r.hasOwnProperty(u))for(var d=o[u]=[],f=r[u],p=0;p<f.length;p++){var m=f[p];d.push(new i(m,r)),(m.indent||m.dedent)&&(c=!0)}var h={startState:function(){return{state:`start`,pending:null,local:null,localState:null,indent:c?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var r=t.persistentStates;r;r=r.next)n.persistentStates={mode:r.mode,spec:r.spec,state:r.state==t.localState?n.localState:e.copyState(r.mode,r.state),next:n.persistentStates};return n},token:a(o,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:l(o,s)};if(s)for(var g in s)s.hasOwnProperty(g)&&(h[g]=s[g]);return h};function t(e,t){if(!e.hasOwnProperty(t))throw Error(`Undefined state `+t+` in simple mode`)}function n(e,t){if(!e)return/(?:)/;var n=``;return e instanceof RegExp?(e.ignoreCase&&(n=`i`),e.unicode&&(n+=`u`),e=e.source):e=String(e),RegExp((t===!1?``:`^`)+`(?:`+e+`)`,n)}function r(e){if(!e)return null;if(e.apply)return e;if(typeof e==`string`)return e.replace(/\./g,` `);for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g,` `));return t}function i(e,i){(e.next||e.push)&&t(i,e.next||e.push),this.regex=n(e.regex),this.token=r(e.token),this.data=e}function a(e,t){return function(n,r){if(r.pending){var i=r.pending.shift();return r.pending.length==0&&(r.pending=null),n.pos+=i.text.length,i.token}if(r.local)if(r.local.end&&n.match(r.local.end)){var a=r.local.endToken||null;return r.local=r.localState=null,a}else{var a=r.local.mode.token(n,r.localState),o;return r.local.endScan&&(o=r.local.endScan.exec(n.current()))&&(n.pos=n.start+o.index),a}for(var c=e[r.state],l=0;l<c.length;l++){var u=c[l],d=(!u.data.sol||n.sol())&&n.match(u.regex);if(d){u.data.next?r.state=u.data.next:u.data.push?((r.stack||=[]).push(r.state),r.state=u.data.push):u.data.pop&&r.stack&&r.stack.length&&(r.state=r.stack.pop()),u.data.mode&&s(t,r,u.data.mode,u.token),u.data.indent&&r.indent.push(n.indentation()+t.indentUnit),u.data.dedent&&r.indent.pop();var f=u.token;if(f&&f.apply&&(f=f(d)),d.length>2&&u.token&&typeof u.token!=`string`){for(var p=2;p<d.length;p++)d[p]&&(r.pending||=[]).push({text:d[p],token:u.token[p-1]});return n.backUp(d[0].length-(d[1]?d[1].length:0)),f[0]}else if(f&&f.join)return f[0];else return f}}return n.next(),null}}function o(e,t){if(e===t)return!0;if(!e||typeof e!=`object`||!t||typeof t!=`object`)return!1;var n=0;for(var r in e)if(e.hasOwnProperty(r)){if(!t.hasOwnProperty(r)||!o(e[r],t[r]))return!1;n++}for(var r in t)t.hasOwnProperty(r)&&n--;return n==0}function s(t,r,i,a){var s;if(i.persistent)for(var c=r.persistentStates;c&&!s;c=c.next)(i.spec?o(i.spec,c.spec):i.mode==c.mode)&&(s=c);var l=s?s.mode:i.mode||e.getMode(t,i.spec),u=s?s.state:e.startState(l);i.persistent&&!s&&(r.persistentStates={mode:l,spec:i.spec,state:u,next:r.persistentStates}),r.localState=u,r.local={mode:l,end:i.end&&n(i.end),endScan:i.end&&i.forceEnd!==!1&&n(i.end,!1),endToken:a&&a.join?a[a.length-1]:a}}function c(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}function l(t,n){return function(r,i,a){if(r.local&&r.local.mode.indent)return r.local.mode.indent(r.localState,i,a);if(r.indent==null||r.local||n.dontIndentStates&&c(r.state,n.dontIndentStates)>-1)return e.Pass;var o=r.indent.length-1,s=t[r.state];scan:for(;;){for(var l=0;l<s.length;l++){var u=s[l];if(u.data.dedent&&u.data.dedentIfLineStart!==!1){var d=u.regex.exec(i);if(d&&d[0]){o--,(u.next||u.push)&&(s=t[u.next||u.push]),i=i.slice(d[0].length);continue scan}}}break}return o<0?0:r.indent[o]}}})})),ut=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.multiplexingMode=function(t){var n=Array.prototype.slice.call(arguments,1);function r(e,t,n,r){if(typeof t==`string`){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var a=t.exec(n?e.slice(n):e);return a?a.index+n+(r?a[0].length:0):-1}return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null,startingInner:!1}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner),startingInner:n.startingInner}},token:function(i,a){if(a.innerActive){var o=a.innerActive,s=i.string;if(!o.close&&i.sol())return a.innerActive=a.inner=null,this.token(i,a);var c=o.close&&!a.startingInner?r(s,o.close,i.pos,o.parseDelimiters):-1;if(c==i.pos&&!o.parseDelimiters)return i.match(o.close),a.innerActive=a.inner=null,o.delimStyle&&o.delimStyle+` `+o.delimStyle+`-close`;c>-1&&(i.string=s.slice(0,c));var l=o.mode.token(i,a.inner);return c>-1?i.string=s:i.pos>i.start&&(a.startingInner=!1),c==i.pos&&o.parseDelimiters&&(a.innerActive=a.inner=null),o.innerStyle&&(l=l?l+` `+o.innerStyle:o.innerStyle),l}else{for(var u=1/0,s=i.string,d=0;d<n.length;++d){var f=n[d],c=r(s,f.open,i.pos);if(c==i.pos){f.parseDelimiters||i.match(f.open),a.startingInner=!!f.parseDelimiters,a.innerActive=f;var p=0;if(t.indent){var m=t.indent(a.outer,``,``);m!==e.Pass&&(p=m)}return a.inner=e.startState(f.mode,p),f.delimStyle&&f.delimStyle+` `+f.delimStyle+`-open`}else c!=-1&&c<u&&(u=c)}u!=1/0&&(i.string=s.slice(0,u));var h=t.token(i,a.outer);return u!=1/0&&(i.string=s),h}},indent:function(n,r,i){var a=n.innerActive?n.innerActive.mode:t;return a.indent?a.indent(n.innerActive?n.inner:n.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:t;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)r.innerActive.close===`
|
|
32
|
+
`&&(r.innerActive=r.inner=null);else for(var a=0;a<n.length;++a){var o=n[a];o.open===`
|
|
33
|
+
`&&(r.innerActive=o,r.inner=e.startState(o.mode,i.indent?i.indent(r.outer,``,``):0))}},electricChars:t.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:t}}}}})})),J=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),lt(),ut()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../../addon/mode/simple`,`../../addon/mode/multiplex`],n):n(CodeMirror)})(function(e){e.defineSimpleMode(`handlebars-tags`,{start:[{regex:/\{\{\{/,push:`handlebars_raw`,token:`tag`},{regex:/\{\{!--/,push:`dash_comment`,token:`comment`},{regex:/\{\{!/,push:`comment`,token:`comment`},{regex:/\{\{/,push:`handlebars`,token:`tag`}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:`tag`}],handlebars:[{regex:/\}\}/,pop:!0,token:`tag`},{regex:/"(?:[^\\"]|\\.)*"?/,token:`string`},{regex:/'(?:[^\\']|\\.)*'?/,token:`string`},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:`keyword`},{regex:/(?:else|this)\b/,token:`keyword`},{regex:/\d+/i,token:`number`},{regex:/=|~|@|true|false/,token:`atom`},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:`variable-2`}],dash_comment:[{regex:/--\}\}/,pop:!0,token:`comment`},{regex:/./,token:`comment`}],comment:[{regex:/\}\}/,pop:!0,token:`comment`},{regex:/./,token:`comment`}],meta:{blockCommentStart:`{{--`,blockCommentEnd:`--}}`}}),e.defineMode(`handlebars`,function(t,n){var r=e.getMode(t,`handlebars-tags`);return!n||!n.base?r:e.multiplexingMode(e.getMode(t,n.base),{open:`{{`,close:/\}\}\}?/,mode:r,parseDelimiters:!0})}),e.defineMIME(`text/x-handlebars-template`,`handlebars`)})})),dt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode(`xml`,function(r,i){var a=r.indentUnit,o={},s=i.htmlMode?t:n;for(var c in s)o[c]=s[c];for(var c in i)o[c]=i[c];var l,u;function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return r==`<`?e.eat(`!`)?e.eat(`[`)?e.match(`CDATA[`)?n(m(`atom`,`]]>`)):null:e.match(`--`)?n(m(`comment`,`-->`)):e.match(`DOCTYPE`,!0,!0)?(e.eatWhile(/[\w\._\-]/),n(h(1))):null:e.eat(`?`)?(e.eatWhile(/[\w\._\-]/),t.tokenize=m(`meta`,`?>`),`meta`):(l=e.eat(`/`)?`closeTag`:`openTag`,t.tokenize=f,`tag bracket`):r==`&`?(e.eat(`#`)?e.eat(`x`)?e.eatWhile(/[a-fA-F\d]/)&&e.eat(`;`):e.eatWhile(/[\d]/)&&e.eat(`;`):e.eatWhile(/[\w\.\-:]/)&&e.eat(`;`))?`atom`:`error`:(e.eatWhile(/[^&<]/),null)}d.isInText=!0;function f(e,t){var n=e.next();if(n==`>`||n==`/`&&e.eat(`>`))return t.tokenize=d,l=n==`>`?`endTag`:`selfcloseTag`,`tag bracket`;if(n==`=`)return l=`equals`,null;if(n==`<`){t.tokenize=d,t.state=b,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+` tag error`:`tag error`}else if(/[\'\"]/.test(n))return t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t);else return e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),`word`}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=f;break}return`string`};return t.isInAttribute=!0,t}function m(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function h(e){return function(t,n){for(var r;(r=t.next())!=null;)if(r==`<`)return n.tokenize=h(e+1),n.tokenize(t,n);else if(r==`>`)if(e==1){n.tokenize=d;break}else return n.tokenize=h(e-1),n.tokenize(t,n);return`meta`}}function g(e){return e&&e.toLowerCase()}function _(e,t,n){this.prev=e.context,this.tagName=t||``,this.indent=e.indented,this.startOfLine=n,(o.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&=e.context.prev}function y(e,t){for(var n;;){if(!e.context||(n=e.context.tagName,!o.contextGrabbers.hasOwnProperty(g(n))||!o.contextGrabbers[g(n)].hasOwnProperty(g(t))))return;v(e)}}function b(e,t,n){return e==`openTag`?(n.tagStart=t.column(),x):e==`closeTag`?S:b}function x(e,t,n){return e==`word`?(n.tagName=t.current(),u=`tag`,T):o.allowMissingTagName&&e==`endTag`?(u=`tag bracket`,T(e,t,n)):(u=`error`,x)}function S(e,t,n){if(e==`word`){var r=t.current();return n.context&&n.context.tagName!=r&&o.implicitlyClosed.hasOwnProperty(g(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||o.matchClosing===!1?(u=`tag`,C):(u=`tag error`,w)}else if(o.allowMissingTagName&&e==`endTag`)return u=`tag bracket`,C(e,t,n);else return u=`error`,w}function C(e,t,n){return e==`endTag`?(v(n),b):(u=`error`,C)}function w(e,t,n){return u=`error`,C(e,t,n)}function T(e,t,n){if(e==`word`)return u=`attribute`,E;if(e==`endTag`||e==`selfcloseTag`){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,e==`selfcloseTag`||o.autoSelfClosers.hasOwnProperty(g(r))?y(n,r):(y(n,r),n.context=new _(n,r,i==n.indented)),b}return u=`error`,T}function E(e,t,n){return e==`equals`?D:(o.allowMissing||(u=`error`),T(e,t,n))}function D(e,t,n){return e==`string`?O:e==`word`&&o.allowUnquoted?(u=`string`,T):(u=`error`,T(e,t,n))}function O(e,t,n){return e==`string`?O:T(e,t,n)}return{startState:function(e){var t={tokenize:d,state:b,indented:e||0,tagName:null,tagStart:null,context:null};return e!=null&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;l=null;var n=t.tokenize(e,t);return(n||l)&&n!=`comment`&&(u=null,t.state=t.state(l||n,e,t),u&&(n=u==`error`?n+` error`:u)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return o.multilineTagIndentPastTag===!1?t.tagStart+a*(o.multilineTagIndentFactor||1):t.tagStart+t.tagName.length+2;if(o.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var s=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(s&&s[1])for(;i;)if(i.tagName==s[2]){i=i.prev;break}else if(o.implicitlyClosed.hasOwnProperty(g(i.tagName)))i=i.prev;else break;else if(s)for(;i;){var c=o.contextGrabbers[g(i.tagName)];if(c&&c.hasOwnProperty(g(s[2])))i=i.prev;else break}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:`<!--`,blockCommentEnd:`-->`,configuration:o.htmlMode?`html`:`xml`,helperType:o.htmlMode?`html`:`xml`,skipAttribute:function(e){e.state==D&&(e.state=T)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:e.type==`closeTag`}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}}),e.defineMIME(`text/xml`,`xml`),e.defineMIME(`application/xml`,`xml`),e.mimeModes.hasOwnProperty(`text/html`)||e.defineMIME(`text/html`,{name:`xml`,htmlMode:!0})})})),ft=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`javascript`,function(t,n){var r=t.indentUnit,i=n.statementIndent,a=n.jsonld,o=n.json||a,s=n.trackScope!==!1,c=n.typescript,l=n.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function e(e){return{type:e,style:`keyword`}}var t=e(`keyword a`),n=e(`keyword b`),r=e(`keyword c`),i=e(`keyword d`),a=e(`operator`),o={type:`atom`,style:`atom`};return{if:e(`if`),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e(`new`),delete:r,void:r,throw:r,debugger:e(`debugger`),var:e(`var`),const:e(`var`),let:e(`var`),function:e(`function`),catch:e(`catch`),for:e(`for`),switch:e(`switch`),case:e(`case`),default:e(`default`),in:a,typeof:a,instanceof:a,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e(`this`),class:e(`class`),super:e(`atom`),yield:r,export:e(`export`),import:e(`import`),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,f=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function p(e){for(var t=!1,n,r=!1;(n=e.next())!=null;){if(!t){if(n==`/`&&!r)return;n==`[`?r=!0:r&&n==`]`&&(r=!1)}t=!t&&n==`\\`}}var m,h;function g(e,t,n){return m=e,h=n,t}function _(e,t){var n=e.next();if(n==`"`||n==`'`)return t.tokenize=v(n),t.tokenize(e,t);if(n==`.`&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g(`number`,`number`);if(n==`.`&&e.match(`..`))return g(`spread`,`meta`);if(/[\[\]{}\(\),;\:\.]/.test(n))return g(n);if(n==`=`&&e.eat(`>`))return g(`=>`,`operator`);if(n==`0`&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g(`number`,`number`);if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g(`number`,`number`);if(n==`/`)return e.eat(`*`)?(t.tokenize=y,y(e,t)):e.eat(`/`)?(e.skipToEnd(),g(`comment`,`comment`)):ut(e,t,1)?(p(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g(`regexp`,`string-2`)):(e.eat(`=`),g(`operator`,`operator`,e.current()));if(n=="`")return t.tokenize=b,b(e,t);if(n==`#`&&e.peek()==`!`)return e.skipToEnd(),g(`meta`,`meta`);if(n==`#`&&e.eatWhile(l))return g(`variable`,`property`);if(n==`<`&&e.match(`!--`)||n==`-`&&e.match(`->`)&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g(`comment`,`comment`);if(d.test(n))return(n!=`>`||!t.lexical||t.lexical.type!=`>`)&&(e.eat(`=`)?(n==`!`||n==`=`)&&e.eat(`=`):/[<>*+\-|&?]/.test(n)&&(e.eat(n),n==`>`&&e.eat(n))),n==`?`&&e.eat(`.`)?g(`.`):g(`operator`,`operator`,e.current());if(l.test(n)){e.eatWhile(l);var r=e.current();if(t.lastType!=`.`){if(u.propertyIsEnumerable(r)){var i=u[r];return g(i.type,i.style,r)}if(r==`async`&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g(`async`,`keyword`,r)}return g(`variable`,`variable`,r)}}function v(e){return function(t,n){var r=!1,i;if(a&&t.peek()==`@`&&t.match(f))return n.tokenize=_,g(`jsonld-keyword`,`meta`);for(;(i=t.next())!=null&&!(i==e&&!r);)r=!r&&i==`\\`;return r||(n.tokenize=_),g(`string`,`string`)}}function y(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=_;break}n=r==`*`}return g(`comment`,`comment`)}function b(e,t){for(var n=!1,r;(r=e.next())!=null;){if(!n&&(r=="`"||r==`$`&&e.eat(`{`))){t.tokenize=_;break}n=!n&&r==`\\`}return g(`quasi`,`string-2`,e.current())}var x=`([{}])`;function S(e,t){t.fatArrowAt&&=null;var n=e.string.indexOf(`=>`,e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),u=x.indexOf(s);if(u>=0&&u<3){if(!i){++o;break}if(--i==0){s==`(`&&(a=!0);break}}else if(u>=3&&u<6)++i;else if(l.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(o==0)return;if(e.string.charAt(o-1)==s&&e.string.charAt(o-2)!=`\\`){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,r!=null&&(this.align=r)}function T(e,t){if(!s)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function E(e,t,n,r,i){var a=e.cc;for(D.state=e,D.stream=i,D.marked=null,D.cc=a,D.style=t,e.lexical.hasOwnProperty(`align`)||(e.lexical.align=!0);;)if((a.length?a.pop():o?V:B)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return D.marked?D.marked:n==`variable`&&T(e,r)?`variable-2`:t}}var D={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)D.cc.push(arguments[e])}function k(){return O.apply(null,arguments),!0}function A(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function j(e){var t=D.state;if(D.marked=`def`,s){if(t.context){if(t.lexical.info==`var`&&t.context&&t.context.block){var r=M(e,t.context);if(r!=null){t.context=r;return}}else if(!A(e,t.localVars)){t.localVars=new P(e,t.localVars);return}}n.globalVars&&!A(e,t.globalVars)&&(t.globalVars=new P(e,t.globalVars))}}function M(e,t){if(!t)return null;if(t.block){var n=M(e,t.prev);return n?n==t.prev?t:new ee(n,t.vars,!0):null}else if(A(e,t.vars))return t;else return new ee(t.prev,new P(e,t.vars),!1)}function N(e){return e==`public`||e==`private`||e==`protected`||e==`abstract`||e==`readonly`}function ee(e,t,n){this.prev=e,this.vars=t,this.block=n}function P(e,t){this.name=e,this.next=t}var te=new P(`this`,new P(`arguments`,null));function F(){D.state.context=new ee(D.state.context,D.state.localVars,!1),D.state.localVars=te}function ne(){D.state.context=new ee(D.state.context,D.state.localVars,!0),D.state.localVars=null}F.lex=ne.lex=!0;function I(){D.state.localVars=D.state.context.vars,D.state.context=D.state.context.prev}I.lex=!0;function L(e,t){var n=function(){var n=D.state,r=n.indented;if(n.lexical.type==`stat`)r=n.lexical.indented;else for(var i=n.lexical;i&&i.type==`)`&&i.align;i=i.prev)r=i.indented;n.lexical=new w(r,D.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=D.state;e.lexical.prev&&(e.lexical.type==`)`&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}R.lex=!0;function z(e){function t(n){return n==e?k():e==`;`||n==`}`||n==`)`||n==`]`?O():k(t)}return t}function B(e,t){return e==`var`?k(L(`vardef`,t),Fe,z(`;`),R):e==`keyword a`?k(L(`form`),ae,B,R):e==`keyword b`?k(L(`form`),B,R):e==`keyword d`?D.stream.match(/^\s*$/,!1)?k():k(L(`stat`),oe,z(`;`),R):e==`debugger`?k(z(`;`)):e==`{`?k(L(`}`),ne,xe,R,I):e==`;`?k():e==`if`?(D.state.lexical.info==`else`&&D.state.cc[D.state.cc.length-1]==R&&D.state.cc.pop()(),k(L(`form`),ae,B,R,Ve)):e==`function`?k(Ge):e==`for`?k(L(`form`),ne,He,B,I,R):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(L(`form`,e==`class`?e:t),Xe,R)):e==`variable`?c&&t==`declare`?(D.marked=`keyword`,k(B)):c&&(t==`module`||t==`enum`||t==`type`)&&D.stream.match(/^\s*\w/,!1)?(D.marked=`keyword`,t==`enum`?k(q):t==`type`?k(qe,z(`operator`),G,z(`;`)):k(L(`form`),Ie,z(`{`),L(`}`),xe,R,R)):c&&t==`namespace`?(D.marked=`keyword`,k(L(`form`),V,B,R)):c&&t==`abstract`?(D.marked=`keyword`,k(B)):k(L(`stat`),he):e==`switch`?k(L(`form`),ae,z(`{`),L(`}`,`switch`),ne,xe,R,R,I):e==`case`?k(V,z(`:`)):e==`default`?k(z(`:`)):e==`catch`?k(L(`form`),F,re,B,R,I):e==`export`?k(L(`stat`),et,R):e==`import`?k(L(`stat`),nt,R):e==`async`?k(B):t==`@`?k(V,B):O(L(`stat`),V,z(`;`),R)}function re(e){if(e==`(`)return k(Je,z(`)`))}function V(e,t){return H(e,t,!1)}function ie(e,t){return H(e,t,!0)}function ae(e){return e==`(`?k(L(`)`),oe,z(`)`),R):O()}function H(e,t,n){if(D.state.fatArrowAt==D.stream.start){var r=n?de:U;if(e==`(`)return k(F,L(`)`),be(Je,`)`),R,z(`=>`),r,I);if(e==`variable`)return O(F,Ie,z(`=>`),r,I)}var i=n?ce:se;return C.hasOwnProperty(e)?k(i):e==`function`?k(Ge,i):e==`class`||c&&t==`interface`?(D.marked=`keyword`,k(L(`form`),Ye,R)):e==`keyword c`||e==`async`?k(n?ie:V):e==`(`?k(L(`)`),oe,z(`)`),R,i):e==`operator`||e==`spread`?k(n?ie:V):e==`[`?k(L(`]`),st,R,i):e==`{`?W(_e,`}`,null,i):e==`quasi`?O(le,i):e==`new`?k(fe(n)):k()}function oe(e){return e.match(/[;\}\)\],]/)?O():O(V)}function se(e,t){return e==`,`?k(oe):ce(e,t,!1)}function ce(e,t,n){var r=n==0?se:ce,i=n==0?V:ie;if(e==`=>`)return k(F,n?de:U,I);if(e==`operator`)return/\+\+|--/.test(t)||c&&t==`!`?k(r):c&&t==`<`&&D.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(L(`>`),be(G,`>`),R,r):t==`?`?k(V,z(`:`),i):k(i);if(e==`quasi`)return O(le,r);if(e!=`;`){if(e==`(`)return W(ie,`)`,`call`,r);if(e==`.`)return k(ge,r);if(e==`[`)return k(L(`]`),oe,z(`]`),R,r);if(c&&t==`as`)return D.marked=`keyword`,k(G,r);if(e==`regexp`)return D.state.lastType=D.marked=`operator`,D.stream.backUp(D.stream.pos-D.stream.start-1),k(i)}}function le(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(oe,ue):k(le):O()}function ue(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(le)}function U(e){return S(D.stream,D.state),O(e==`{`?B:V)}function de(e){return S(D.stream,D.state),O(e==`{`?B:ie)}function fe(e){return function(t){return t==`.`?k(e?me:pe):t==`variable`&&c?k(Me,e?ce:se):O(e?ie:V)}}function pe(e,t){if(t==`target`)return D.marked=`keyword`,k(se)}function me(e,t){if(t==`target`)return D.marked=`keyword`,k(ce)}function he(e){return e==`:`?k(R,B):O(se,z(`;`),R)}function ge(e){if(e==`variable`)return D.marked=`property`,k()}function _e(e,t){if(e==`async`)return D.marked=`property`,k(_e);if(e==`variable`||D.style==`keyword`){if(D.marked=`property`,t==`get`||t==`set`)return k(ve);var n;return c&&D.state.fatArrowAt==D.stream.start&&(n=D.stream.match(/^\s*:\s*/,!1))&&(D.state.fatArrowAt=D.stream.pos+n[0].length),k(ye)}else if(e==`number`||e==`string`)return D.marked=a?`property`:D.style+` property`,k(ye);else if(e==`jsonld-keyword`)return k(ye);else if(c&&N(t))return D.marked=`keyword`,k(_e);else if(e==`[`)return k(V,Se,z(`]`),ye);else if(e==`spread`)return k(ie,ye);else if(t==`*`)return D.marked=`keyword`,k(_e);else if(e==`:`)return O(ye)}function ve(e){return e==`variable`?(D.marked=`property`,k(Ge)):O(ye)}function ye(e){if(e==`:`)return k(ie);if(e==`(`)return O(Ge)}function be(e,t,n){function r(i,a){if(n?n.indexOf(i)>-1:i==`,`){var o=D.state.lexical;return o.info==`call`&&(o.pos=(o.pos||0)+1),k(function(n,r){return n==t||r==t?O():O(e)},r)}return i==t||a==t?k():n&&n.indexOf(`;`)>-1?O(e):k(z(t))}return function(n,i){return n==t||i==t?k():O(e,r)}}function W(e,t,n){for(var r=3;r<arguments.length;r++)D.cc.push(arguments[r]);return k(L(t,n),be(e,t),R)}function xe(e){return e==`}`?k():O(B,xe)}function Se(e,t){if(c){if(e==`:`)return k(G);if(t==`?`)return k(Se)}}function Ce(e,t){if(c&&(e==`:`||t==`in`))return k(G)}function we(e){if(c&&e==`:`)return D.stream.match(/^\s*\w+\s+is\b/,!1)?k(V,Te,G):k(G)}function Te(e,t){if(t==`is`)return D.marked=`keyword`,k()}function G(e,t){if(t==`keyof`||t==`typeof`||t==`infer`||t==`readonly`)return D.marked=`keyword`,k(t==`typeof`?ie:G);if(e==`variable`||t==`void`)return D.marked=`type`,k(je);if(t==`|`||t==`&`)return k(G);if(e==`string`||e==`number`||e==`atom`)return k(je);if(e==`[`)return k(L(`]`),be(G,`]`,`,`),R,je);if(e==`{`)return k(L(`}`),K,R,je);if(e==`(`)return k(be(Ae,`)`),Ee,je);if(e==`<`)return k(be(G,`>`),G);if(e==`quasi`)return O(Oe,je)}function Ee(e){if(e==`=>`)return k(G)}function K(e){return e.match(/[\}\)\]]/)?k():e==`,`||e==`;`?k(K):O(De,K)}function De(e,t){if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k(De);if(t==`?`||e==`number`||e==`string`)return k(De);if(e==`:`)return k(G);if(e==`[`)return k(z(`variable`),Ce,z(`]`),De);if(e==`(`)return O(Ke,De);if(!e.match(/[;\}\)\],]/))return k()}function Oe(e,t){return e==`quasi`?t.slice(t.length-2)=="${"?k(G,ke):k(Oe):O()}function ke(e){if(e==`}`)return D.marked=`string-2`,D.state.tokenize=b,k(Oe)}function Ae(e,t){return e==`variable`&&D.stream.match(/^\s*[?:]/,!1)||t==`?`?k(Ae):e==`:`?k(G):e==`spread`?k(Ae):O(G)}function je(e,t){if(t==`<`)return k(L(`>`),be(G,`>`),R,je);if(t==`|`||e==`.`||t==`&`)return k(G);if(e==`[`)return k(G,z(`]`),je);if(t==`extends`||t==`implements`)return D.marked=`keyword`,k(G);if(t==`?`)return k(G,z(`:`),G)}function Me(e,t){if(t==`<`)return k(L(`>`),be(G,`>`),R,je)}function Ne(){return O(G,Pe)}function Pe(e,t){if(t==`=`)return k(G)}function Fe(e,t){return t==`enum`?(D.marked=`keyword`,k(q)):O(Ie,Se,ze,Be)}function Ie(e,t){if(c&&N(t))return D.marked=`keyword`,k(Ie);if(e==`variable`)return j(t),k();if(e==`spread`)return k(Ie);if(e==`[`)return W(Re,`]`);if(e==`{`)return W(Le,`}`)}function Le(e,t){return e==`variable`&&!D.stream.match(/^\s*:/,!1)?(j(t),k(ze)):(e==`variable`&&(D.marked=`property`),e==`spread`?k(Ie):e==`}`?O():e==`[`?k(V,z(`]`),z(`:`),Le):k(z(`:`),Ie,ze))}function Re(){return O(Ie,ze)}function ze(e,t){if(t==`=`)return k(ie)}function Be(e){if(e==`,`)return k(Fe)}function Ve(e,t){if(e==`keyword b`&&t==`else`)return k(L(`form`,`else`),B,R)}function He(e,t){if(t==`await`)return k(He);if(e==`(`)return k(L(`)`),Ue,R)}function Ue(e){return e==`var`?k(Fe,We):e==`variable`?k(We):O(We)}function We(e,t){return e==`)`?k():e==`;`?k(We):t==`in`||t==`of`?(D.marked=`keyword`,k(V,We)):O(V,We)}function Ge(e,t){if(t==`*`)return D.marked=`keyword`,k(Ge);if(e==`variable`)return j(t),k(Ge);if(e==`(`)return k(F,L(`)`),be(Je,`)`),R,we,B,I);if(c&&t==`<`)return k(L(`>`),be(Ne,`>`),R,Ge)}function Ke(e,t){if(t==`*`)return D.marked=`keyword`,k(Ke);if(e==`variable`)return j(t),k(Ke);if(e==`(`)return k(F,L(`)`),be(Je,`)`),R,we,I);if(c&&t==`<`)return k(L(`>`),be(Ne,`>`),R,Ke)}function qe(e,t){if(e==`keyword`||e==`variable`)return D.marked=`type`,k(qe);if(t==`<`)return k(L(`>`),be(Ne,`>`),R)}function Je(e,t){return t==`@`&&k(V,Je),e==`spread`?k(Je):c&&N(t)?(D.marked=`keyword`,k(Je)):c&&e==`this`?k(Se,ze):O(Ie,Se,ze)}function Ye(e,t){return e==`variable`?Xe(e,t):Ze(e,t)}function Xe(e,t){if(e==`variable`)return j(t),k(Ze)}function Ze(e,t){if(t==`<`)return k(L(`>`),be(Ne,`>`),R,Ze);if(t==`extends`||t==`implements`||c&&e==`,`)return t==`implements`&&(D.marked=`keyword`),k(c?G:V,Ze);if(e==`{`)return k(L(`}`),Qe,R)}function Qe(e,t){if(e==`async`||e==`variable`&&(t==`static`||t==`get`||t==`set`||c&&N(t))&&D.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return D.marked=`keyword`,k(Qe);if(e==`variable`||D.style==`keyword`)return D.marked=`property`,k($e,Qe);if(e==`number`||e==`string`)return k($e,Qe);if(e==`[`)return k(V,Se,z(`]`),$e,Qe);if(t==`*`)return D.marked=`keyword`,k(Qe);if(c&&e==`(`)return O(Ke,Qe);if(e==`;`||e==`,`)return k(Qe);if(e==`}`)return k();if(t==`@`)return k(V,Qe)}function $e(e,t){if(t==`!`||t==`?`)return k($e);if(e==`:`)return k(G,ze);if(t==`=`)return k(ie);var n=D.state.lexical.prev;return O(n&&n.info==`interface`?Ke:Ge)}function et(e,t){return t==`*`?(D.marked=`keyword`,k(ot,z(`;`))):t==`default`?(D.marked=`keyword`,k(V,z(`;`))):e==`{`?k(be(tt,`}`),ot,z(`;`)):O(B)}function tt(e,t){if(t==`as`)return D.marked=`keyword`,k(z(`variable`));if(e==`variable`)return O(ie,tt)}function nt(e){return e==`string`?k():e==`(`?O(V):e==`.`?O(se):O(rt,it,ot)}function rt(e,t){return e==`{`?W(rt,`}`):(e==`variable`&&j(t),t==`*`&&(D.marked=`keyword`),k(at))}function it(e){if(e==`,`)return k(rt,it)}function at(e,t){if(t==`as`)return D.marked=`keyword`,k(rt)}function ot(e,t){if(t==`from`)return D.marked=`keyword`,k(V)}function st(e){return e==`]`?k():O(be(ie,`]`))}function q(){return O(L(`form`),Ie,z(`{`),L(`}`),be(ct,`}`),R,R)}function ct(){return O(Ie,ze)}function lt(e,t){return e.lastType==`operator`||e.lastType==`,`||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}function ut(e,t,n){return t.tokenize==_&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||t.lastType==`quasi`&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return{startState:function(e){var t={tokenize:_,lastType:`sof`,cc:[],lexical:new w((e||0)-r,0,`block`,!1),localVars:n.localVars,context:n.localVars&&new ee(null,null,!1),indented:e||0};return n.globalVars&&typeof n.globalVars==`object`&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty(`align`)||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=y&&e.eatSpace())return null;var n=t.tokenize(e,t);return m==`comment`?n:(t.lastType=m==`operator`&&(h==`++`||h==`--`)?`incdec`:m,E(t,n,m,h,e))},indent:function(t,a){if(t.tokenize==y||t.tokenize==b)return e.Pass;if(t.tokenize!=_)return 0;var o=a&&a.charAt(0),s=t.lexical,c;if(!/^\s*else\b/.test(a))for(var l=t.cc.length-1;l>=0;--l){var u=t.cc[l];if(u==R)s=s.prev;else if(u!=Ve&&u!=I)break}for(;(s.type==`stat`||s.type==`form`)&&(o==`}`||(c=t.cc[t.cc.length-1])&&(c==se||c==ce)&&!/^[,\.=+\-*:?[\(]/.test(a));)s=s.prev;i&&s.type==`)`&&s.prev.type==`stat`&&(s=s.prev);var d=s.type,f=o==d;return d==`vardef`?s.indented+(t.lastType==`operator`||t.lastType==`,`?s.info.length+1:0):d==`form`&&o==`{`?s.indented:d==`form`?s.indented+r:d==`stat`?s.indented+(lt(t,a)?i||r:0):s.info==`switch`&&!f&&n.doubleIndentSwitch!=0?s.indented+(/^(?:case|default)\b/.test(a)?r:2*r):s.align?s.column+(f?0:1):s.indented+(f?0:r)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:o?null:`/*`,blockCommentEnd:o?null:`*/`,blockCommentContinue:o?null:` * `,lineComment:o?null:`//`,fold:`brace`,closeBrackets:`()[]{}''""\`\``,helperType:o?`json`:`javascript`,jsonldMode:a,jsonMode:o,expressionAllowed:ut,skipExpression:function(t){E(t,`atom`,`atom`,`true`,new e.StringStream(``,2,null))}}}),e.registerHelper(`wordChars`,`javascript`,/[\w$]/),e.defineMIME(`text/javascript`,`javascript`),e.defineMIME(`text/ecmascript`,`javascript`),e.defineMIME(`application/javascript`,`javascript`),e.defineMIME(`application/x-javascript`,`javascript`),e.defineMIME(`application/ecmascript`,`javascript`),e.defineMIME(`application/json`,{name:`javascript`,json:!0}),e.defineMIME(`application/x-json`,{name:`javascript`,json:!0}),e.defineMIME(`application/manifest+json`,{name:`javascript`,json:!0}),e.defineMIME(`application/ld+json`,{name:`javascript`,jsonld:!0}),e.defineMIME(`text/typescript`,{name:`javascript`,typescript:!0}),e.defineMIME(`application/typescript`,{name:`javascript`,typescript:!0})})})),pt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),dt(),ft(),ct()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../javascript/javascript`,`../css/css`],n):n(CodeMirror)})(function(e){var t={script:[[`lang`,/(javascript|babel)/i,`javascript`],[`type`,/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,`javascript`],[`type`,/./,`text/plain`],[null,null,`javascript`]],style:[[`lang`,/^css$/i,`css`],[`type`,/^(text\/)?(x-)?(stylesheet|css)$/i,`css`],[`type`,/./,`text/plain`],[null,null,`css`]]};function n(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}var r={};function i(e){return r[e]||(r[e]=RegExp(`\\s+`+e+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function a(e,t){var n=e.match(i(t));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:``}function o(e,t){return RegExp((t?`^`:``)+`</\\s*`+e+`\\s*>`,`i`)}function s(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],a=i.length-1;a>=0;a--)r.unshift(i[a])}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(!r[0]||r[1].test(a(t,r[0])))return r[2]}}e.defineMode(`htmlmixed`,function(r,i){var a=e.getMode(r,{name:`xml`,htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag,allowMissingTagName:i.allowMissingTagName}),l={},u=i&&i.tags,d=i&&i.scriptTypes;if(s(t,l),u&&s(u,l),d)for(var f=d.length-1;f>=0;f--)l.script.unshift([`type`,d[f].matches,d[f].mode]);function p(t,i){var s=a.token(t,i.htmlState),u=/\btag\b/.test(s),d;if(u&&!/[<>\s\/]/.test(t.current())&&(d=i.htmlState.tagName&&i.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(d))i.inTag=d+` `;else if(i.inTag&&u&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(i.inTag);i.inTag=null;var m=t.current()==`>`&&c(l[f[1]],f[2]),h=e.getMode(r,m),g=o(f[1],!0),_=o(f[1],!1);i.token=function(e,t){return e.match(g,!1)?(t.token=p,t.localState=t.localMode=null,null):n(e,_,t.localMode.token(e,t.localState))},i.localMode=h,i.localState=e.startState(h,a.indent(i.htmlState,``,``))}else i.inTag&&(i.inTag+=t.current(),t.eol()&&(i.inTag+=` `));return s}return{startState:function(){return{token:p,inTag:null,localMode:null,localState:null,htmlState:e.startState(a)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(a,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?a.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}},`xml`,`javascript`,`css`),e.defineMIME(`text/html`,`htmlmixed`)})})),Y=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../lib/codemirror`],n):n(CodeMirror)})(function(e){e.modeInfo=[{name:`APL`,mime:`text/apl`,mode:`apl`,ext:[`dyalog`,`apl`]},{name:`PGP`,mimes:[`application/pgp`,`application/pgp-encrypted`,`application/pgp-keys`,`application/pgp-signature`],mode:`asciiarmor`,ext:[`asc`,`pgp`,`sig`]},{name:`ASN.1`,mime:`text/x-ttcn-asn`,mode:`asn.1`,ext:[`asn`,`asn1`]},{name:`Asterisk`,mime:`text/x-asterisk`,mode:`asterisk`,file:/^extensions\.conf$/i},{name:`Brainfuck`,mime:`text/x-brainfuck`,mode:`brainfuck`,ext:[`b`,`bf`]},{name:`C`,mime:`text/x-csrc`,mode:`clike`,ext:[`c`,`h`,`ino`]},{name:`C++`,mime:`text/x-c++src`,mode:`clike`,ext:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],alias:[`cpp`]},{name:`Cobol`,mime:`text/x-cobol`,mode:`cobol`,ext:[`cob`,`cpy`,`cbl`]},{name:`C#`,mime:`text/x-csharp`,mode:`clike`,ext:[`cs`],alias:[`csharp`,`cs`]},{name:`Clojure`,mime:`text/x-clojure`,mode:`clojure`,ext:[`clj`,`cljc`,`cljx`]},{name:`ClojureScript`,mime:`text/x-clojurescript`,mode:`clojure`,ext:[`cljs`]},{name:`Closure Stylesheets (GSS)`,mime:`text/x-gss`,mode:`css`,ext:[`gss`]},{name:`CMake`,mime:`text/x-cmake`,mode:`cmake`,ext:[`cmake`,`cmake.in`],file:/^CMakeLists\.txt$/},{name:`CoffeeScript`,mimes:[`application/vnd.coffeescript`,`text/coffeescript`,`text/x-coffeescript`],mode:`coffeescript`,ext:[`coffee`],alias:[`coffee`,`coffee-script`]},{name:`Common Lisp`,mime:`text/x-common-lisp`,mode:`commonlisp`,ext:[`cl`,`lisp`,`el`],alias:[`lisp`]},{name:`Cypher`,mime:`application/x-cypher-query`,mode:`cypher`,ext:[`cyp`,`cypher`]},{name:`Cython`,mime:`text/x-cython`,mode:`python`,ext:[`pyx`,`pxd`,`pxi`]},{name:`Crystal`,mime:`text/x-crystal`,mode:`crystal`,ext:[`cr`]},{name:`CSS`,mime:`text/css`,mode:`css`,ext:[`css`]},{name:`CQL`,mime:`text/x-cassandra`,mode:`sql`,ext:[`cql`]},{name:`D`,mime:`text/x-d`,mode:`d`,ext:[`d`]},{name:`Dart`,mimes:[`application/dart`,`text/x-dart`],mode:`dart`,ext:[`dart`]},{name:`diff`,mime:`text/x-diff`,mode:`diff`,ext:[`diff`,`patch`]},{name:`Django`,mime:`text/x-django`,mode:`django`},{name:`Dockerfile`,mime:`text/x-dockerfile`,mode:`dockerfile`,file:/^Dockerfile$/},{name:`DTD`,mime:`application/xml-dtd`,mode:`dtd`,ext:[`dtd`]},{name:`Dylan`,mime:`text/x-dylan`,mode:`dylan`,ext:[`dylan`,`dyl`,`intr`]},{name:`EBNF`,mime:`text/x-ebnf`,mode:`ebnf`},{name:`ECL`,mime:`text/x-ecl`,mode:`ecl`,ext:[`ecl`]},{name:`edn`,mime:`application/edn`,mode:`clojure`,ext:[`edn`]},{name:`Eiffel`,mime:`text/x-eiffel`,mode:`eiffel`,ext:[`e`]},{name:`Elm`,mime:`text/x-elm`,mode:`elm`,ext:[`elm`]},{name:`Embedded JavaScript`,mime:`application/x-ejs`,mode:`htmlembedded`,ext:[`ejs`]},{name:`Embedded Ruby`,mime:`application/x-erb`,mode:`htmlembedded`,ext:[`erb`]},{name:`Erlang`,mime:`text/x-erlang`,mode:`erlang`,ext:[`erl`]},{name:`Esper`,mime:`text/x-esper`,mode:`sql`},{name:`Factor`,mime:`text/x-factor`,mode:`factor`,ext:[`factor`]},{name:`FCL`,mime:`text/x-fcl`,mode:`fcl`},{name:`Forth`,mime:`text/x-forth`,mode:`forth`,ext:[`forth`,`fth`,`4th`]},{name:`Fortran`,mime:`text/x-fortran`,mode:`fortran`,ext:[`f`,`for`,`f77`,`f90`,`f95`]},{name:`F#`,mime:`text/x-fsharp`,mode:`mllike`,ext:[`fs`],alias:[`fsharp`]},{name:`Gas`,mime:`text/x-gas`,mode:`gas`,ext:[`s`]},{name:`Gherkin`,mime:`text/x-feature`,mode:`gherkin`,ext:[`feature`]},{name:`GitHub Flavored Markdown`,mime:`text/x-gfm`,mode:`gfm`,file:/^(readme|contributing|history)\.md$/i},{name:`Go`,mime:`text/x-go`,mode:`go`,ext:[`go`]},{name:`Groovy`,mime:`text/x-groovy`,mode:`groovy`,ext:[`groovy`,`gradle`],file:/^Jenkinsfile$/},{name:`HAML`,mime:`text/x-haml`,mode:`haml`,ext:[`haml`]},{name:`Haskell`,mime:`text/x-haskell`,mode:`haskell`,ext:[`hs`]},{name:`Haskell (Literate)`,mime:`text/x-literate-haskell`,mode:`haskell-literate`,ext:[`lhs`]},{name:`Haxe`,mime:`text/x-haxe`,mode:`haxe`,ext:[`hx`]},{name:`HXML`,mime:`text/x-hxml`,mode:`haxe`,ext:[`hxml`]},{name:`ASP.NET`,mime:`application/x-aspx`,mode:`htmlembedded`,ext:[`aspx`],alias:[`asp`,`aspx`]},{name:`HTML`,mime:`text/html`,mode:`htmlmixed`,ext:[`html`,`htm`,`handlebars`,`hbs`],alias:[`xhtml`]},{name:`HTTP`,mime:`message/http`,mode:`http`},{name:`IDL`,mime:`text/x-idl`,mode:`idl`,ext:[`pro`]},{name:`Pug`,mime:`text/x-pug`,mode:`pug`,ext:[`jade`,`pug`],alias:[`jade`]},{name:`Java`,mime:`text/x-java`,mode:`clike`,ext:[`java`]},{name:`Java Server Pages`,mime:`application/x-jsp`,mode:`htmlembedded`,ext:[`jsp`],alias:[`jsp`]},{name:`JavaScript`,mimes:[`text/javascript`,`text/ecmascript`,`application/javascript`,`application/x-javascript`,`application/ecmascript`],mode:`javascript`,ext:[`js`],alias:[`ecmascript`,`js`,`node`]},{name:`JSON`,mimes:[`application/json`,`application/x-json`],mode:`javascript`,ext:[`json`,`map`],alias:[`json5`]},{name:`JSON-LD`,mime:`application/ld+json`,mode:`javascript`,ext:[`jsonld`],alias:[`jsonld`]},{name:`JSX`,mime:`text/jsx`,mode:`jsx`,ext:[`jsx`]},{name:`Jinja2`,mime:`text/jinja2`,mode:`jinja2`,ext:[`j2`,`jinja`,`jinja2`]},{name:`Julia`,mime:`text/x-julia`,mode:`julia`,ext:[`jl`],alias:[`jl`]},{name:`Kotlin`,mime:`text/x-kotlin`,mode:`clike`,ext:[`kt`]},{name:`LESS`,mime:`text/x-less`,mode:`css`,ext:[`less`]},{name:`LiveScript`,mime:`text/x-livescript`,mode:`livescript`,ext:[`ls`],alias:[`ls`]},{name:`Lua`,mime:`text/x-lua`,mode:`lua`,ext:[`lua`]},{name:`Markdown`,mime:`text/x-markdown`,mode:`markdown`,ext:[`markdown`,`md`,`mkd`]},{name:`mIRC`,mime:`text/mirc`,mode:`mirc`},{name:`MariaDB SQL`,mime:`text/x-mariadb`,mode:`sql`},{name:`Mathematica`,mime:`text/x-mathematica`,mode:`mathematica`,ext:[`m`,`nb`,`wl`,`wls`]},{name:`Modelica`,mime:`text/x-modelica`,mode:`modelica`,ext:[`mo`]},{name:`MUMPS`,mime:`text/x-mumps`,mode:`mumps`,ext:[`mps`]},{name:`MS SQL`,mime:`text/x-mssql`,mode:`sql`},{name:`mbox`,mime:`application/mbox`,mode:`mbox`,ext:[`mbox`]},{name:`MySQL`,mime:`text/x-mysql`,mode:`sql`},{name:`Nginx`,mime:`text/x-nginx-conf`,mode:`nginx`,file:/nginx.*\.conf$/i},{name:`NSIS`,mime:`text/x-nsis`,mode:`nsis`,ext:[`nsh`,`nsi`]},{name:`NTriples`,mimes:[`application/n-triples`,`application/n-quads`,`text/n-triples`],mode:`ntriples`,ext:[`nt`,`nq`]},{name:`Objective-C`,mime:`text/x-objectivec`,mode:`clike`,ext:[`m`],alias:[`objective-c`,`objc`]},{name:`Objective-C++`,mime:`text/x-objectivec++`,mode:`clike`,ext:[`mm`],alias:[`objective-c++`,`objc++`]},{name:`OCaml`,mime:`text/x-ocaml`,mode:`mllike`,ext:[`ml`,`mli`,`mll`,`mly`]},{name:`Octave`,mime:`text/x-octave`,mode:`octave`,ext:[`m`]},{name:`Oz`,mime:`text/x-oz`,mode:`oz`,ext:[`oz`]},{name:`Pascal`,mime:`text/x-pascal`,mode:`pascal`,ext:[`p`,`pas`]},{name:`PEG.js`,mime:`null`,mode:`pegjs`,ext:[`jsonld`]},{name:`Perl`,mime:`text/x-perl`,mode:`perl`,ext:[`pl`,`pm`]},{name:`PHP`,mimes:[`text/x-php`,`application/x-httpd-php`,`application/x-httpd-php-open`],mode:`php`,ext:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`]},{name:`Pig`,mime:`text/x-pig`,mode:`pig`,ext:[`pig`]},{name:`Plain Text`,mime:`text/plain`,mode:`null`,ext:[`txt`,`text`,`conf`,`def`,`list`,`log`]},{name:`PLSQL`,mime:`text/x-plsql`,mode:`sql`,ext:[`pls`]},{name:`PostgreSQL`,mime:`text/x-pgsql`,mode:`sql`},{name:`PowerShell`,mime:`application/x-powershell`,mode:`powershell`,ext:[`ps1`,`psd1`,`psm1`]},{name:`Properties files`,mime:`text/x-properties`,mode:`properties`,ext:[`properties`,`ini`,`in`],alias:[`ini`,`properties`]},{name:`ProtoBuf`,mime:`text/x-protobuf`,mode:`protobuf`,ext:[`proto`]},{name:`Python`,mime:`text/x-python`,mode:`python`,ext:[`BUILD`,`bzl`,`py`,`pyw`],file:/^(BUCK|BUILD)$/},{name:`Puppet`,mime:`text/x-puppet`,mode:`puppet`,ext:[`pp`]},{name:`Q`,mime:`text/x-q`,mode:`q`,ext:[`q`]},{name:`R`,mime:`text/x-rsrc`,mode:`r`,ext:[`r`,`R`],alias:[`rscript`]},{name:`reStructuredText`,mime:`text/x-rst`,mode:`rst`,ext:[`rst`],alias:[`rst`]},{name:`RPM Changes`,mime:`text/x-rpm-changes`,mode:`rpm`},{name:`RPM Spec`,mime:`text/x-rpm-spec`,mode:`rpm`,ext:[`spec`]},{name:`Ruby`,mime:`text/x-ruby`,mode:`ruby`,ext:[`rb`],alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`]},{name:`Rust`,mime:`text/x-rustsrc`,mode:`rust`,ext:[`rs`]},{name:`SAS`,mime:`text/x-sas`,mode:`sas`,ext:[`sas`]},{name:`Sass`,mime:`text/x-sass`,mode:`sass`,ext:[`sass`]},{name:`Scala`,mime:`text/x-scala`,mode:`clike`,ext:[`scala`]},{name:`Scheme`,mime:`text/x-scheme`,mode:`scheme`,ext:[`scm`,`ss`]},{name:`SCSS`,mime:`text/x-scss`,mode:`css`,ext:[`scss`]},{name:`Shell`,mimes:[`text/x-sh`,`application/x-sh`],mode:`shell`,ext:[`sh`,`ksh`,`bash`],alias:[`bash`,`sh`,`zsh`],file:/^PKGBUILD$/},{name:`Sieve`,mime:`application/sieve`,mode:`sieve`,ext:[`siv`,`sieve`]},{name:`Slim`,mimes:[`text/x-slim`,`application/x-slim`],mode:`slim`,ext:[`slim`]},{name:`Smalltalk`,mime:`text/x-stsrc`,mode:`smalltalk`,ext:[`st`]},{name:`Smarty`,mime:`text/x-smarty`,mode:`smarty`,ext:[`tpl`]},{name:`Solr`,mime:`text/x-solr`,mode:`solr`},{name:`SML`,mime:`text/x-sml`,mode:`mllike`,ext:[`sml`,`sig`,`fun`,`smackspec`]},{name:`Soy`,mime:`text/x-soy`,mode:`soy`,ext:[`soy`],alias:[`closure template`]},{name:`SPARQL`,mime:`application/sparql-query`,mode:`sparql`,ext:[`rq`,`sparql`],alias:[`sparul`]},{name:`Spreadsheet`,mime:`text/x-spreadsheet`,mode:`spreadsheet`,alias:[`excel`,`formula`]},{name:`SQL`,mime:`text/x-sql`,mode:`sql`,ext:[`sql`]},{name:`SQLite`,mime:`text/x-sqlite`,mode:`sql`},{name:`Squirrel`,mime:`text/x-squirrel`,mode:`clike`,ext:[`nut`]},{name:`Stylus`,mime:`text/x-styl`,mode:`stylus`,ext:[`styl`]},{name:`Swift`,mime:`text/x-swift`,mode:`swift`,ext:[`swift`]},{name:`sTeX`,mime:`text/x-stex`,mode:`stex`},{name:`LaTeX`,mime:`text/x-latex`,mode:`stex`,ext:[`text`,`ltx`,`tex`],alias:[`tex`]},{name:`SystemVerilog`,mime:`text/x-systemverilog`,mode:`verilog`,ext:[`v`,`sv`,`svh`]},{name:`Tcl`,mime:`text/x-tcl`,mode:`tcl`,ext:[`tcl`]},{name:`Textile`,mime:`text/x-textile`,mode:`textile`,ext:[`textile`]},{name:`TiddlyWiki`,mime:`text/x-tiddlywiki`,mode:`tiddlywiki`},{name:`Tiki wiki`,mime:`text/tiki`,mode:`tiki`},{name:`TOML`,mime:`text/x-toml`,mode:`toml`,ext:[`toml`]},{name:`Tornado`,mime:`text/x-tornado`,mode:`tornado`},{name:`troff`,mime:`text/troff`,mode:`troff`,ext:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`]},{name:`TTCN`,mime:`text/x-ttcn`,mode:`ttcn`,ext:[`ttcn`,`ttcn3`,`ttcnpp`]},{name:`TTCN_CFG`,mime:`text/x-ttcn-cfg`,mode:`ttcn-cfg`,ext:[`cfg`]},{name:`Turtle`,mime:`text/turtle`,mode:`turtle`,ext:[`ttl`]},{name:`TypeScript`,mime:`application/typescript`,mode:`javascript`,ext:[`ts`],alias:[`ts`]},{name:`TypeScript-JSX`,mime:`text/typescript-jsx`,mode:`jsx`,ext:[`tsx`],alias:[`tsx`]},{name:`Twig`,mime:`text/x-twig`,mode:`twig`},{name:`Web IDL`,mime:`text/x-webidl`,mode:`webidl`,ext:[`webidl`]},{name:`VB.NET`,mime:`text/x-vb`,mode:`vb`,ext:[`vb`]},{name:`VBScript`,mime:`text/vbscript`,mode:`vbscript`,ext:[`vbs`]},{name:`Velocity`,mime:`text/velocity`,mode:`velocity`,ext:[`vtl`]},{name:`Verilog`,mime:`text/x-verilog`,mode:`verilog`,ext:[`v`]},{name:`VHDL`,mime:`text/x-vhdl`,mode:`vhdl`,ext:[`vhd`,`vhdl`]},{name:`Vue.js Component`,mimes:[`script/x-vue`,`text/x-vue`],mode:`vue`,ext:[`vue`]},{name:`XML`,mimes:[`application/xml`,`text/xml`],mode:`xml`,ext:[`xml`,`xsl`,`xsd`,`svg`],alias:[`rss`,`wsdl`,`xsd`]},{name:`XQuery`,mime:`application/xquery`,mode:`xquery`,ext:[`xy`,`xquery`]},{name:`Yacas`,mime:`text/x-yacas`,mode:`yacas`,ext:[`ys`]},{name:`YAML`,mimes:[`text/x-yaml`,`text/yaml`],mode:`yaml`,ext:[`yaml`,`yml`],alias:[`yml`]},{name:`Z80`,mime:`text/x-z80`,mode:`z80`,ext:[`z80`]},{name:`mscgen`,mime:`text/x-mscgen`,mode:`mscgen`,ext:[`mscgen`,`mscin`,`msc`]},{name:`xu`,mime:`text/x-xu`,mode:`mscgen`,ext:[`xu`]},{name:`msgenny`,mime:`text/x-msgenny`,mode:`mscgen`,ext:[`msgenny`]},{name:`WebAssembly`,mime:`text/webassembly`,mode:`wast`,ext:[`wat`,`wast`]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes){for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}}if(/\+xml$/.test(t))return e.findModeByMIME(`application/xml`);if(/\+json$/.test(t))return e.findModeByMIME(`application/json`)},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext){for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf(`.`),a=i>-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias){for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}})})),X=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),dt(),Y()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../xml/xml`,`../meta`],n):n(CodeMirror)})(function(e){e.defineMode(`markdown`,function(t,n){var r=e.getMode(t,`text/html`),i=r.name==`null`;function a(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return i.name==`null`?null:i}n.highlightFormatting===void 0&&(n.highlightFormatting=!1),n.maxBlockquoteDepth===void 0&&(n.maxBlockquoteDepth=0),n.taskLists===void 0&&(n.taskLists=!1),n.strikethrough===void 0&&(n.strikethrough=!1),n.emoji===void 0&&(n.emoji=!1),n.fencedCodeBlockHighlighting===void 0&&(n.fencedCodeBlockHighlighting=!0),n.fencedCodeBlockDefaultMode===void 0&&(n.fencedCodeBlockDefaultMode=`text/plain`),n.xml===void 0&&(n.xml=!0),n.tokenTypeOverrides===void 0&&(n.tokenTypeOverrides={});var o={header:`header`,code:`comment`,quote:`quote`,list1:`variable-2`,list2:`variable-3`,list3:`keyword`,hr:`hr`,image:`image`,imageAltText:`image-alt-text`,imageMarker:`image-marker`,formatting:`formatting`,linkInline:`link`,linkEmail:`link`,linkText:`link`,linkHref:`string`,em:`em`,strong:`strong`,strikethrough:`strikethrough`,emoji:`builtin`};for(var s in o)o.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(o[s]=n.tokenTypeOverrides[s]);var c=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,m=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,h=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,_=` `;function v(e,t,n){return t.f=t.inline=n,n(e,t)}function y(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var n=i;if(!n){var a=e.innerMode(r,t.htmlState);n=a.mode.name==`xml`&&a.state.tagStart===null&&!a.state.context&&a.state.tokenize.isInText}n&&(t.f=D,t.block=S,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function S(t,r){var i=t.column()===r.indentation,s=b(r.prevLine.stream),p=r.indentedCode,g=r.prevLine.hr,_=r.list!==!1,y=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var x=r.indentation;if(r.indentationDiff===null&&(r.indentationDiff=r.indentation,_)){for(r.list=null;x<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;r.list!==!1&&(r.indentationDiff=x-r.listStack[r.listStack.length-1])}var S=!s&&!g&&!r.prevLine.header&&(!_||!p)&&!r.prevLine.fencedCodeEnd,C=(r.list===!1||g||s)&&r.indentation<=y&&t.match(c),E=null;if(r.indentationDiff>=4&&(p||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,o.code;if(t.eatSpace())return null;if(i&&r.indentation<=y&&(E=t.match(d))&&E[1].length<=6)return r.quote=0,r.header=E[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting=`header`),r.f=r.inline,T(r);if(r.indentation<=y&&t.eat(`>`))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting=`quote`),t.eatSpace(),T(r);if(!C&&!r.setext&&i&&r.indentation<=y&&(E=t.match(l))){var D=E[1]?`ol`:`ul`;return r.indentation=x+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=[`list`,`list-`+D]),T(r)}else if(i&&r.indentation<=y&&(E=t.match(m,!0)))return r.quote=0,r.fencedEndRE=RegExp(E[1]+`+ *$`),r.localMode=n.fencedCodeBlockHighlighting&&a(E[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=w,n.highlightFormatting&&(r.formatting=`code-block`),r.code=-1,T(r);else if(r.setext||(!S||!_)&&!r.quote&&r.list===!1&&!r.code&&!C&&!h.test(t.string)&&(E=t.lookAhead(1))&&(E=E.match(f)))return r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting=`header`)):(r.header=E[0].charAt(0)==`=`?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,T(r);else if(C)return t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr;else if(t.peek()===`[`)return v(t,r,M);return v(t,r,r.inline)}function C(t,n){var a=r.token(t,n.htmlState);if(!i){var o=e.innerMode(r,n.htmlState);(o.mode.name==`xml`&&o.state.tagStart===null&&!o.state.context&&o.state.tokenize.isInText||n.md_inside&&t.current().indexOf(`>`)>-1)&&(n.f=D,n.block=S,n.htmlState=null)}return a}function w(e,t){var r=t.listStack[t.listStack.length-1]||0,i=t.indentation<r,a=r+3;if(t.fencedEndRE&&t.indentation<=a&&(i||e.match(t.fencedEndRE))){n.highlightFormatting&&(t.formatting=`code-block`);var s;return i||(s=T(t)),t.localMode=t.localState=null,t.block=S,t.f=D,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,i?y(e,t,t.block):s}else if(t.localMode)return t.localMode.token(e,t.localState);else return e.skipToEnd(),o.code}function T(e){var t=[];if(e.formatting){t.push(o.formatting),typeof e.formatting==`string`&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(o.formatting+`-`+e.formatting[r]),e.formatting[r]===`header`&&t.push(o.formatting+`-`+e.formatting[r]+`-`+e.header),e.formatting[r]===`quote`&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.formatting+`-`+e.formatting[r]+`-`+e.quote):t.push(`error`))}if(e.taskOpen)return t.push(`meta`),t.length?t.join(` `):null;if(e.taskClosed)return t.push(`property`),t.length?t.join(` `):null;if(e.linkHref?t.push(o.linkHref,`url`):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,`link`),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+`-`+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+`-`+e.quote):t.push(o.quote+`-`+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?i===1?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push(`trailing-space-new-line`):e.trailingSpace&&t.push(`trailing-space-`+(e.trailingSpace%2?`a`:`b`)),t.length?t.join(` `):null}function E(e,t){if(e.match(p,!0))return T(t)}function D(t,i){var a=i.text(t,i);if(a!==void 0)return a;if(i.list)return i.list=null,T(i);if(i.taskList)return t.match(u,!0)[1]===` `?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting=`task`),i.taskList=!1,T(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting=`header`),T(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;s===`(`&&(c=`)`),c=(c+``).replace(/([.?*+^\[\]\\(){}|-])/g,`\\$1`);var l=`^\\s*(?:[^`+c+`\\\\]+|\\\\\\\\|\\\\.)`+c;if(t.match(new RegExp(l),!0))return o.linkHref}if(s==="`"){var d=i.formatting;n.highlightFormatting&&(i.formatting=`code`),t.eatWhile("`");var f=t.current().length;if(i.code==0&&(!i.quote||f==1))return i.code=f,T(i);if(f==i.code){var p=T(i);return i.code=0,p}else return i.formatting=d,T(i)}else if(i.code)return T(i);if(s===`\\`&&(t.next(),n.highlightFormatting)){var m=T(i),h=o.formatting+`-escape`;return m?m+` `+h:h}if(s===`!`&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`[`&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting=`image`),T(i);if(s===`]`&&i.imageAltText){n.highlightFormatting&&(i.formatting=`image`);var m=T(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=k,m}if(s===`[`&&!i.image)return i.linkText&&t.match(/^.*?\]/)?T(i):(i.linkText=!0,n.highlightFormatting&&(i.formatting=`link`),T(i));if(s===`]`&&i.linkText){n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?k:D,m}if(s===`<`&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkInline}if(s===`<`&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=O,n.highlightFormatting&&(i.formatting=`link`);var m=T(i);return m?m+=` `:m=``,m+o.linkEmail}if(n.xml&&s===`<`&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var _=t.string.indexOf(`>`,t.pos);if(_!=-1){var v=t.string.substring(t.start,_);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),y(t,i,C)}if(n.xml&&s===`<`&&t.match(/^\/\w*?>/))return i.md_inside=!1,`tag`;if(s===`*`||s===`_`){for(var b=1,x=t.pos==1?` `:t.string.charAt(t.pos-2);b<3&&t.eat(s);)b++;var S=t.peek()||` `,w=!/\s/.test(S)&&(!g.test(S)||/\s/.test(x)||g.test(x)),E=!/\s/.test(x)&&(!g.test(x)||/\s/.test(S)||g.test(S)),A=null,j=null;if(b%2&&(!i.em&&w&&(s===`*`||!E||g.test(x))?A=!0:i.em==s&&E&&(s===`*`||!w||g.test(S))&&(A=!1)),b>1&&(!i.strong&&w&&(s===`*`||!E||g.test(x))?j=!0:i.strong==s&&E&&(s===`*`||!w||g.test(S))&&(j=!1)),j!=null||A!=null){n.highlightFormatting&&(i.formatting=A==null?`strong`:j==null?`em`:`strong em`),A===!0&&(i.em=s),j===!0&&(i.strong=s);var p=T(i);return A===!1&&(i.em=!1),j===!1&&(i.strong=!1),p}}else if(s===` `&&(t.eat(`*`)||t.eat(`_`))){if(t.peek()===` `)return T(i);t.backUp(1)}if(n.strikethrough){if(s===`~`&&t.eatWhile(s)){if(i.strikethrough){n.highlightFormatting&&(i.formatting=`strikethrough`);var p=T(i);return i.strikethrough=!1,p}else if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting=`strikethrough`),T(i)}else if(s===` `&&t.match(`~~`,!0)){if(t.peek()===` `)return T(i);t.backUp(2)}}if(n.emoji&&s===`:`&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting=`emoji`);var M=T(i);return i.emoji=!1,M}return s===` `&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),T(i)}function O(e,t){if(e.next()===`>`){t.f=t.inline=D,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return r?r+=` `:r=``,r+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function k(e,t){if(e.eatSpace())return null;var r=e.next();return r===`(`||r===`[`?(t.f=t.inline=j(r===`(`?`)`:`]`),n.highlightFormatting&&(t.formatting=`link-string`),t.linkHref=!0,T(t)):`error`}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function j(e){return function(t,r){if(t.next()===e){r.f=r.inline=D,n.highlightFormatting&&(r.formatting=`link-string`);var i=T(r);return r.linkHref=!1,i}return t.match(A[e]),r.linkHref=!0,T(r)}}function M(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=N,e.next(),n.highlightFormatting&&(t.formatting=`link`),t.linkText=!0,T(t)):v(e,t,D)}function N(e,t){if(e.match(`]:`,!0)){t.f=t.inline=ee,n.highlightFormatting&&(t.formatting=`link`);var r=T(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function ee(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),e.peek()===void 0?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=D,o.linkHref+` url`)}var P={startState:function(){return{f:S,prevLine:{stream:null},thisLine:{stream:null},block:S,htmlState:null,indentation:0,inline:D,text:E,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=C)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,_).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==C?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:P}},indent:function(t,n,i){return t.block==C&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:x,getType:T,blockCommentStart:`<!--`,blockCommentEnd:`-->`,closeBrackets:`()[]{}''""\`\``,fold:`markdown`};return P},`xml`),e.defineMIME(`text/markdown`,`markdown`),e.defineMIME(`text/x-markdown`,`markdown`)})})),mt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),ft(),ct(),pt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../javascript/javascript`,`../css/css`,`../htmlmixed/htmlmixed`],n):n(CodeMirror)})(function(e){e.defineMode(`pug`,function(t){var n=`keyword`,r=`meta`,i=`builtin`,a=`qualifier`,o={"{":`}`,"(":`)`,"[":`]`},s=e.getMode(t,`javascript`);function c(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=e.startState(s),this.restOfLine=``,this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag=``,this.scriptType=``,this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue=``,this.indentOf=1/0,this.indentToken=``,this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}c.prototype.copy=function(){var t=new c;return t.javaScriptLine=this.javaScriptLine,t.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,t.javaScriptArguments=this.javaScriptArguments,t.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,t.isInterpolating=this.isInterpolating,t.interpolationNesting=this.interpolationNesting,t.jsState=e.copyState(s,this.jsState),t.innerMode=this.innerMode,this.innerMode&&this.innerState&&(t.innerState=e.copyState(this.innerMode,this.innerState)),t.restOfLine=this.restOfLine,t.isIncludeFiltered=this.isIncludeFiltered,t.isEach=this.isEach,t.lastTag=this.lastTag,t.scriptType=this.scriptType,t.isAttrs=this.isAttrs,t.attrsNest=this.attrsNest.slice(),t.inAttributeName=this.inAttributeName,t.attributeIsType=this.attributeIsType,t.attrValue=this.attrValue,t.indentOf=this.indentOf,t.indentToken=this.indentToken,t.innerModeForLine=this.innerModeForLine,t};function l(e,t){if(e.sol()&&(t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1),t.javaScriptLine){if(t.javaScriptLineExcludesColon&&e.peek()===`:`){t.javaScriptLine=!1,t.javaScriptLineExcludesColon=!1;return}var n=s.token(e,t.jsState);return e.eol()&&(t.javaScriptLine=!1),n||!0}}function u(e,t){if(t.javaScriptArguments){if(t.javaScriptArgumentsDepth===0&&e.peek()!==`(`){t.javaScriptArguments=!1;return}if(e.peek()===`(`?t.javaScriptArgumentsDepth++:e.peek()===`)`&&t.javaScriptArgumentsDepth--,t.javaScriptArgumentsDepth===0){t.javaScriptArguments=!1;return}return s.token(e,t.jsState)||!0}}function d(e){if(e.match(/^yield\b/))return`keyword`}function f(e){if(e.match(/^(?:doctype) *([^\n]+)?/))return r}function p(e,t){if(e.match(`#{`))return t.isInterpolating=!0,t.interpolationNesting=0,`punctuation`}function m(e,t){if(t.isInterpolating){if(e.peek()===`}`){if(t.interpolationNesting--,t.interpolationNesting<0)return e.next(),t.isInterpolating=!1,`punctuation`}else e.peek()===`{`&&t.interpolationNesting++;return s.token(e,t.jsState)||!0}}function h(e,t){if(e.match(/^case\b/))return t.javaScriptLine=!0,n}function g(e,t){if(e.match(/^when\b/))return t.javaScriptLine=!0,t.javaScriptLineExcludesColon=!0,n}function _(e){if(e.match(/^default\b/))return n}function v(e,t){if(e.match(/^extends?\b/))return t.restOfLine=`string`,n}function y(e,t){if(e.match(/^append\b/))return t.restOfLine=`variable`,n}function b(e,t){if(e.match(/^prepend\b/))return t.restOfLine=`variable`,n}function x(e,t){if(e.match(/^block\b *(?:(prepend|append)\b)?/))return t.restOfLine=`variable`,n}function S(e,t){if(e.match(/^include\b/))return t.restOfLine=`string`,n}function C(e,t){if(e.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&e.match(`include`))return t.isIncludeFiltered=!0,n}function w(e,t){if(t.isIncludeFiltered){var n=N(e,t);return t.isIncludeFiltered=!1,t.restOfLine=`string`,n}}function T(e,t){if(e.match(/^mixin\b/))return t.javaScriptLine=!0,n}function E(e,t){if(e.match(/^\+([-\w]+)/))return e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),`variable`;if(e.match(`+#{`,!1))return e.next(),t.mixinCallAfter=!0,p(e,t)}function D(e,t){if(t.mixinCallAfter)return t.mixinCallAfter=!1,e.match(/^\( *[-\w]+ *=/,!1)||(t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0),!0}function O(e,t){if(e.match(/^(if|unless|else if|else)\b/))return t.javaScriptLine=!0,n}function k(e,t){if(e.match(/^(- *)?(each|for)\b/))return t.isEach=!0,n}function A(e,t){if(t.isEach){if(e.match(/^ in\b/))return t.javaScriptLine=!0,t.isEach=!1,n;if(e.sol()||e.eol())t.isEach=!1;else if(e.next()){for(;!e.match(/^ in\b/,!1)&&e.next(););return`variable`}}}function j(e,t){if(e.match(/^while\b/))return t.javaScriptLine=!0,n}function M(e,t){var n;if(n=e.match(/^(\w(?:[-:\w]*\w)?)\/?/))return t.lastTag=n[1].toLowerCase(),t.lastTag===`script`&&(t.scriptType=`application/javascript`),`tag`}function N(n,r){if(n.match(/^:([\w\-]+)/)){var i;return t&&t.innerModes&&(i=t.innerModes(n.current().substring(1))),i||=n.current().substring(1),typeof i==`string`&&(i=e.getMode(t,i)),ie(n,r,i),`atom`}}function ee(e,t){if(e.match(/^(!?=|-)/))return t.javaScriptLine=!0,`punctuation`}function P(e){if(e.match(/^#([\w-]+)/))return i}function te(e){if(e.match(/^\.([\w-]+)/))return a}function F(e,t){if(e.peek()==`(`)return e.next(),t.isAttrs=!0,t.attrsNest=[],t.inAttributeName=!0,t.attrValue=``,t.attributeIsType=!1,`punctuation`}function ne(t,n){if(n.isAttrs){if(o[t.peek()]&&n.attrsNest.push(o[t.peek()]),n.attrsNest[n.attrsNest.length-1]===t.peek())n.attrsNest.pop();else if(t.eat(`)`))return n.isAttrs=!1,`punctuation`;if(n.inAttributeName&&t.match(/^[^=,\)!]+/))return(t.peek()===`=`||t.peek()===`!`)&&(n.inAttributeName=!1,n.jsState=e.startState(s),n.lastTag===`script`&&t.current().trim().toLowerCase()===`type`?n.attributeIsType=!0:n.attributeIsType=!1),`attribute`;var r=s.token(t,n.jsState);if(n.attributeIsType&&r===`string`&&(n.scriptType=t.current().toString()),n.attrsNest.length===0&&(r===`string`||r===`variable`||r===`keyword`))try{return Function(``,`var x `+n.attrValue.replace(/,\s*$/,``).replace(/^!/,``)),n.inAttributeName=!0,n.attrValue=``,t.backUp(t.current().length),ne(t,n)}catch{}return n.attrValue+=t.current(),r||!0}}function I(e,t){if(e.match(/^&attributes\b/))return t.javaScriptArguments=!0,t.javaScriptArgumentsDepth=0,`keyword`}function L(e){if(e.sol()&&e.eatSpace())return`indent`}function R(e,t){if(e.match(/^ *\/\/(-)?([^\n]*)/))return t.indentOf=e.indentation(),t.indentToken=`comment`,`comment`}function z(e){if(e.match(/^: */))return`colon`}function B(e,t){if(e.match(/^(?:\| ?| )([^\n]+)/))return`string`;if(e.match(/^(<[^\n]*)/,!1))return ie(e,t,`htmlmixed`),t.innerModeForLine=!0,ae(e,t,!0)}function re(e,t){if(e.eat(`.`)){var n=null;return t.lastTag===`script`&&t.scriptType.toLowerCase().indexOf(`javascript`)!=-1?n=t.scriptType.toLowerCase().replace(/"|'/g,``):t.lastTag===`style`&&(n=`css`),ie(e,t,n),`dot`}}function V(e){return e.next(),null}function ie(n,r,i){i=e.mimeModes[i]||i,i=t.innerModes&&t.innerModes(i)||i,i=e.mimeModes[i]||i,i=e.getMode(t,i),r.indentOf=n.indentation(),i&&i.name!==`null`?r.innerMode=i:r.indentToken=`string`}function ae(t,n,r){if(t.indentation()>n.indentOf||n.innerModeForLine&&!t.sol()||r)return n.innerMode?(n.innerState||=n.innerMode.startState?e.startState(n.innerMode,t.indentation()):{},t.hideFirstChars(n.indentOf+2,function(){return n.innerMode.token(t,n.innerState)||!0})):(t.skipToEnd(),n.indentToken);t.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}function H(e,t){if(e.sol()&&(t.restOfLine=``),t.restOfLine){e.skipToEnd();var n=t.restOfLine;return t.restOfLine=``,n}}function oe(){return new c}function se(e){return e.copy()}function ce(e,t){var n=ae(e,t)||H(e,t)||m(e,t)||w(e,t)||A(e,t)||ne(e,t)||l(e,t)||u(e,t)||D(e,t)||d(e)||f(e)||p(e,t)||h(e,t)||g(e,t)||_(e)||v(e,t)||y(e,t)||b(e,t)||x(e,t)||S(e,t)||C(e,t)||T(e,t)||E(e,t)||O(e,t)||k(e,t)||j(e,t)||M(e,t)||N(e,t)||ee(e,t)||P(e)||te(e)||F(e,t)||I(e,t)||L(e)||B(e,t)||R(e,t)||z(e)||re(e,t)||V(e);return n===!0?null:n}return{startState:oe,copyState:se,token:ce}},`javascript`,`css`,`htmlmixed`),e.defineMIME(`text/x-pug`,`pug`),e.defineMIME(`text/x-jade`,`pug`)})})),ht=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),ct()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../css/css`],n):n(CodeMirror)})(function(e){e.defineMode(`sass`,function(t){var n=e.mimeModes[`text/css`],r=n.propertyKeywords||{},i=n.colorKeywords||{},a=n.valueKeywords||{},o=n.fontProperties||{};function s(e){return RegExp(`^`+e.join(`|`))}var c=RegExp(`^`+[`true`,`false`,`null`,`auto`].join(`|`)),l=s([`\\(`,`\\)`,`=`,`>`,`<`,`==`,`>=`,`<=`,`\\+`,`-`,`\\!=`,`/`,`\\*`,`%`,`and`,`or`,`not`,`;`,`\\{`,`\\}`,`:`]),u=/^::?[a-zA-Z_][\w\-]*/,d;function f(e){return!e.peek()||e.match(/\s+$/,!1)}function p(e,t){var n=e.peek();return n===`)`?(e.next(),t.tokenizer=y,`operator`):n===`(`?(e.next(),e.eatSpace(),`operator`):n===`'`||n===`"`?(t.tokenizer=h(e.next()),`string`):(t.tokenizer=h(`)`,!1),`string`)}function m(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=y,y(n,r)):(t&&n.skipTo(`*/`)?(n.next(),n.next(),r.tokenizer=y):n.skipToEnd(),`comment`)}}function h(e,t){t??=!0;function n(r,i){var a=r.next(),o=r.peek(),s=r.string.charAt(r.pos-2);return a!==`\\`&&o===e||a===e&&s!==`\\`?(a!==e&&t&&r.next(),f(r)&&(i.cursorHalf=0),i.tokenizer=y,`string`):a===`#`&&o===`{`?(i.tokenizer=g(n),r.next(),`operator`):`string`}return n}function g(e){return function(t,n){return t.peek()===`}`?(t.next(),n.tokenizer=e,`operator`):y(t,n)}}function _(e){if(e.indentCount==0){e.indentCount++;var n=e.scopes[0].offset+t.indentUnit;e.scopes.unshift({offset:n})}}function v(e){e.scopes.length!=1&&e.scopes.shift()}function y(e,t){var n=e.peek();if(e.match(`/*`))return t.tokenizer=m(e.indentation(),!0),t.tokenizer(e,t);if(e.match(`//`))return t.tokenizer=m(e.indentation(),!1),t.tokenizer(e,t);if(e.match(`#{`))return t.tokenizer=g(y),`operator`;if(n===`"`||n===`'`)return e.next(),t.tokenizer=h(n),`string`;if(t.cursorHalf){if(n===`#`&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/))||e.match(/^-?[0-9\.]+/))return f(e)&&(t.cursorHalf=0),`number`;if(e.match(/^(px|em|in)\b/))return f(e)&&(t.cursorHalf=0),`unit`;if(e.match(c))return f(e)&&(t.cursorHalf=0),`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=p,f(e)&&(t.cursorHalf=0),`atom`;if(n===`$`)return e.next(),e.eatWhile(/[\w-]/),f(e)&&(t.cursorHalf=0),`variable-2`;if(n===`!`)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?`keyword`:`operator`;if(e.match(l))return f(e)&&(t.cursorHalf=0),`operator`;if(e.eatWhile(/[\w-]/))return f(e)&&(t.cursorHalf=0),d=e.current().toLowerCase(),a.hasOwnProperty(d)?`atom`:i.hasOwnProperty(d)?`keyword`:r.hasOwnProperty(d)?(t.prevProp=e.current().toLowerCase(),`property`):`tag`;if(f(e))return t.cursorHalf=0,null}else{if(n===`-`&&e.match(/^-\w+-/))return`meta`;if(n===`.`){if(e.next(),e.match(/^[\w-]+/))return _(t),`qualifier`;if(e.peek()===`#`)return _(t),`tag`}if(n===`#`){if(e.next(),e.match(/^[\w-]+/))return _(t),`builtin`;if(e.peek()===`#`)return _(t),`tag`}if(n===`$`)return e.next(),e.eatWhile(/[\w-]/),`variable-2`;if(e.match(/^-?[0-9\.]+/))return`number`;if(e.match(/^(px|em|in)\b/))return`unit`;if(e.match(c))return`keyword`;if(e.match(/^url/)&&e.peek()===`(`)return t.tokenizer=p,`atom`;if(n===`=`&&e.match(/^=[\w-]+/))return _(t),`meta`;if(n===`+`&&e.match(/^\+[\w-]+/))return`variable-3`;if(n===`@`&&e.match(`@extend`)&&(e.match(/\s*[\w]/)||v(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return _(t),`def`;if(n===`@`)return e.next(),e.eatWhile(/[\w-]/),`def`;if(e.eatWhile(/[\w-]/))if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){d=e.current().toLowerCase();var s=t.prevProp+`-`+d;return r.hasOwnProperty(s)?`property`:r.hasOwnProperty(d)?(t.prevProp=d,`property`):o.hasOwnProperty(d)?`property`:`tag`}else if(e.match(/ *:/,!1))return _(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),`property`;else if(e.match(/ *,/,!1))return`tag`;else return _(t),`tag`;if(n===`:`)return e.match(u)?`variable-3`:(e.next(),t.cursorHalf=1,`operator`)}return e.match(l)?`operator`:(e.next(),null)}function b(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if((i===`@return`||i===`}`)&&v(n),r!==null){for(var a=e.pos-i.length+t.indentUnit*n.indentCount,o=[],s=0;s<n.scopes.length;s++){var c=n.scopes[s];c.offset<=a&&o.push(c)}n.scopes=o}return r}return{startState:function(){return{tokenizer:y,scopes:[{offset:0,type:`sass`}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=b(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset},blockCommentStart:`/*`,blockCommentEnd:`*/`,lineComment:`//`,fold:`indent`}},`css`),e.defineMIME(`text/x-sass`,`sass`)})})),gt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=n.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),i.overlayCur==null?i.baseCur:i.baseCur!=null&&i.overlay.combineTokens||r&&i.overlay.combineTokens==null?i.baseCur+` `+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,a;return t.blankLine&&(i=t.blankLine(e.base)),n.blankLine&&(a=n.blankLine(e.overlay)),a==null?i:r&&i!=null?i+` `+a:a}}}})})),_t=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`coffeescript`,function(e,t){var n=`error`;function r(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`)}var i=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,a=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,o=/^[_A-Za-z$][_A-Za-z$0-9]*/,s=/^@[_A-Za-z$][_A-Za-z$0-9]*/,c=r([`and`,`or`,`not`,`is`,`isnt`,`in`,`instanceof`,`typeof`]),l=[`for`,`while`,`loop`,`if`,`unless`,`else`,`switch`,`try`,`catch`,`finally`,`class`],u=r(l.concat([`break`,`by`,`continue`,`debugger`,`delete`,`do`,`in`,`of`,`new`,`return`,`then`,`this`,`@`,`throw`,`when`,`until`,`extends`]));l=r(l);var d=/^('{3}|\"{3}|['\"])/,f=/^(\/{3}|\/)/,p=r([`Infinity`,`NaN`,`undefined`,`null`,`true`,`false`,`on`,`off`,`yes`,`no`]);function m(e,t){if(e.sol()){t.scope.align===null&&(t.scope.align=!1);var r=t.scope.offset;if(e.eatSpace()){var l=e.indentation();return l>r&&t.scope.type==`coffee`?`indent`:l<r?`dedent`:null}else r>0&&v(e,t)}if(e.eatSpace())return null;var m=e.peek();if(e.match(`####`))return e.skipToEnd(),`comment`;if(e.match(`###`))return t.tokenize=g,t.tokenize(e,t);if(m===`#`)return e.skipToEnd(),`comment`;if(e.match(/^-?[0-9\.]/,!1)){var _=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(_=!0),e.match(/^-?\d+\.\d*/)&&(_=!0),e.match(/^-?\.\d+/)&&(_=!0),_)return e.peek()==`.`&&e.backUp(1),`number`;var y=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(y=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(y=!0),e.match(/^-?0(?![\dx])/i)&&(y=!0),y)return`number`}if(e.match(d))return t.tokenize=h(e.current(),!1,`string`),t.tokenize(e,t);if(e.match(f)){if(e.current()!=`/`||e.match(/^.*\//,!1))return t.tokenize=h(e.current(),!0,`string-2`),t.tokenize(e,t);e.backUp(1)}return e.match(i)||e.match(c)?`operator`:e.match(a)?`punctuation`:e.match(p)?`atom`:e.match(s)||t.prop&&e.match(o)?`property`:e.match(u)?`keyword`:e.match(o)?`variable`:(e.next(),n)}function h(e,r,i){return function(a,o){for(;!a.eol();)if(a.eatWhile(/[^'"\/\\]/),a.eat(`\\`)){if(a.next(),r&&a.eol())return i}else if(a.match(e))return o.tokenize=m,i;else a.eat(/['"\/]/);return r&&(t.singleLineStringErrors?i=n:o.tokenize=m),i}}function g(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match(`###`)){t.tokenize=m;break}e.eatWhile(`#`)}return`comment`}function _(t,n,r){r||=`coffee`;for(var i=0,a=!1,o=null,s=n.scope;s;s=s.prev)if(s.type===`coffee`||s.type==`}`){i=s.offset+e.indentUnit;break}r===`coffee`?n.scope.align&&(n.scope.align=!1):(a=null,o=t.column()+t.current().length),n.scope={offset:i,type:r,prev:n.scope,align:a,alignOffset:o}}function v(e,t){if(t.scope.prev)if(t.scope.type===`coffee`){for(var n=e.indentation(),r=!1,i=t.scope;i;i=i.prev)if(n===i.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}else return t.scope=t.scope.prev,!1}function y(e,t){var r=t.tokenize(e,t),i=e.current();i===`return`&&(t.dedent=!0),((i===`->`||i===`=>`)&&e.eol()||r===`indent`)&&_(e,t);var a=`[({`.indexOf(i);if(a!==-1&&_(e,t,`])}`.slice(a,a+1)),l.exec(i)&&_(e,t),i==`then`&&v(e,t),r===`dedent`&&v(e,t))return n;if(a=`])}`.indexOf(i),a!==-1){for(;t.scope.type==`coffee`&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==i&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&(t.scope.type==`coffee`&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),r}return{startState:function(e){return{tokenize:m,scope:{offset:e||0,type:`coffee`,prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=t.scope.align===null&&t.scope;n&&e.sol()&&(n.align=!1);var r=y(e,t);return r&&r!=`comment`&&(n&&(n.align=!0),t.prop=r==`punctuation`&&e.current()==`.`),r},indent:function(e,t){if(e.tokenize!=m)return 0;var n=e.scope,r=t&&`])}`.indexOf(t.charAt(0))>-1;if(r)for(;n.type==`coffee`&&n.prev;)n=n.prev;var i=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(i?1:0):(i?n.prev:n).offset},lineComment:`#`,fold:`indent`}}),e.defineMIME(`application/vnd.coffeescript`,`coffeescript`),e.defineMIME(`text/x-coffeescript`,`coffeescript`),e.defineMIME(`text/coffeescript`,`coffeescript`)})})),vt=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`],n):n(CodeMirror)})(function(e){e.defineMode(`stylus`,function(e){for(var p=e.indentUnit,_=``,v=h(t),y=/^(a|b|i|s|col|em)$/i,b=h(a),x=h(o),S=h(l),C=h(c),w=h(n),T=m(n),E=h(i),D=h(r),O=h(s),k=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,A=m(u),j=h(d),M=new RegExp(/^\-(moz|ms|o|webkit)-/i),N=h(f),ee=``,P={},te,F,ne,I;_.length<p;)_+=` `;function L(e,t){if(ee=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=ee?ee[0].replace(/^\s*/,``):``,t.context.line.indent=e.indentation(),te=e.peek(),e.match(`//`))return e.skipToEnd(),[`comment`,`comment`];if(e.match(`/*`))return t.tokenize=R,R(e,t);if(te==`"`||te==`'`)return e.next(),t.tokenize=z(te),t.tokenize(e,t);if(te==`@`)return e.next(),e.eatWhile(/[\w\\-]/),[`def`,e.current()];if(te==`#`){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return[`atom`,`atom`];if(e.match(/^[a-z][\w-]*/i))return[`builtin`,`hash`]}return e.match(M)?[`meta`,`vendor-prefixes`]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),[`number`,`unit`]):te==`!`?(e.next(),[e.match(/^(important|optional)/i)?`keyword`:`operator`,`important`]):te==`.`&&e.match(/^\.[a-z][\w-]*/i)?[`qualifier`,`qualifier`]:e.match(T)?(e.peek()==`(`&&(t.tokenize=B),[`property`,`word`]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),[`keyword`,`mixin`]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),[`keyword`,`block-mixin`]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?[`qualifier`,`qualifier`]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),[`variable-3`,`reference`]):e.match(/^&{1}\s*$/)?[`variable-3`,`reference`]:e.match(A)?[`operator`,`operator`]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!oe(e.current())?(e.match(`.`),[`variable-2`,`variable-name`]):[`variable-2`,`word`]:e.match(k)?[`operator`,e.current()]:/[:;,{}\[\]\(\)]/.test(te)?(e.next(),[null,te]):(e.next(),[null,null])}function R(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}function z(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),[`string`,`string`]}}function B(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=z(`)`),[null,`(`]}function re(e,t,n,r){this.type=e,this.indent=t,this.prev=n,this.line=r||{firstWord:``,indent:0}}function V(e,t,n,r){return r=r>=0?r:p,e.context=new re(n,t.indentation()+r,e.context),n}function ie(e,t){var n=e.context.indent-p;return t||=!1,e.context=e.context.prev,t&&(e.context.indent=n),e.context.type}function ae(e,t,n){return P[n.context.type](e,t,n)}function H(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return ae(e,t,n)}function oe(e){return e.toLowerCase()in v}function se(e){return e=e.toLowerCase(),e in b||e in O}function ce(e){return e.toLowerCase()in j}function le(e){return e.toLowerCase().match(M)}function ue(e){var t=e.toLowerCase(),n=`variable-2`;return oe(e)?n=`tag`:ce(e)?n=`block-keyword`:se(e)?n=`property`:t in S||t in N?n=`atom`:t==`return`||t in C?n=`keyword`:e.match(/^[A-Z]/)&&(n=`string`),n}function U(e,t){return me(t)&&(e==`{`||e==`]`||e==`hash`||e==`qualifier`)||e==`block-mixin`}function de(e,t){return e==`{`&&t.match(/^\s*\$?[\w-]+/i,!1)}function fe(e,t){return e==`:`&&t.match(/^[a-z-]+/,!1)}function pe(e){return e.sol()||e.string.match(RegExp(`^\\s*`+g(e.current())))}function me(e){return e.eol()||e.match(/^\s*$/,!1)}function he(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,n=typeof e==`string`?e.match(t):e.string.match(t);return n?n[0].replace(/^\s*/,``):``}return P.block=function(e,t,n){if(e==`comment`&&pe(t)||e==`,`&&me(t)||e==`mixin`)return V(n,t,`block`,0);if(de(e,t))return V(n,t,`interpolation`);if(me(t)&&e==`]`&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!oe(he(t)))return V(n,t,`block`,0);if(U(e,t))return V(n,t,`block`);if(e==`}`&&me(t))return V(n,t,`block`,0);if(e==`variable-name`)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||ce(he(t))?V(n,t,`variableName`):V(n,t,`variableName`,0);if(e==`=`)return!me(t)&&!ce(he(t))?V(n,t,`block`,0):V(n,t,`block`);if(e==`*`&&(me(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return I=`tag`,V(n,t,`block`);if(fe(e,t))return V(n,t,`pseudo`);if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return V(n,t,me(t)?`block`:`atBlock`);if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return V(n,t,`keyframes`);if(/@extends?/.test(e))return V(n,t,`extend`,0);if(e&&e.charAt(0)==`@`)return t.indentation()>0&&se(t.current().slice(1))?(I=`variable-2`,`block`):/(@import|@require|@charset)/.test(e)?V(n,t,`block`,0):V(n,t,`block`);if(e==`reference`&&me(t))return V(n,t,`block`);if(e==`(`)return V(n,t,`parens`);if(e==`vendor-prefixes`)return V(n,t,`vendorPrefixes`);if(e==`word`){var r=t.current();if(I=ue(r),I==`property`)return pe(t)?V(n,t,`block`,0):(I=`atom`,`block`);if(I==`tag`){if(/embed|menu|pre|progress|sub|table/.test(r)&&se(he(t))||t.string.match(RegExp(`\\[\\s*`+r+`|`+r+`\\s*\\]`)))return I=`atom`,`block`;if(y.test(r)&&(pe(t)&&t.string.match(/=/)||!pe(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!oe(he(t))))return I=`variable-2`,ce(he(t))?`block`:V(n,t,`block`,0);if(me(t))return V(n,t,`block`)}if(I==`block-keyword`)return I=`keyword`,t.current(/(if|unless)/)&&!pe(t)?`block`:V(n,t,`block`);if(r==`return`)return V(n,t,`block`,0);if(I==`variable-2`&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return V(n,t,`block`)}return n.context.type},P.parens=function(e,t,n){if(e==`(`)return V(n,t,`parens`);if(e==`)`)return n.context.prev.type==`parens`?ie(n):t.string.match(/^[a-z][\w-]*\(/i)&&me(t)||ce(he(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(he(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&oe(he(t))?V(n,t,`block`):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?V(n,t,`block`,0):me(t)?V(n,t,`block`):V(n,t,`block`,0);if(e&&e.charAt(0)==`@`&&se(t.current().slice(1))&&(I=`variable-2`),e==`word`){var r=t.current();I=ue(r),I==`tag`&&y.test(r)&&(I=`variable-2`),(I==`property`||r==`to`)&&(I=`atom`)}return e==`variable-name`?V(n,t,`variableName`):fe(e,t)?V(n,t,`pseudo`):n.context.type},P.vendorPrefixes=function(e,t,n){return e==`word`?(I=`property`,V(n,t,`block`,0)):ie(n)},P.pseudo=function(e,t,n){return se(he(t.string))?H(e,t,n):(t.match(/^[a-z-]+/),I=`variable-3`,me(t)?V(n,t,`block`):ie(n))},P.atBlock=function(e,t,n){if(e==`(`)return V(n,t,`atBlock_parens`);if(U(e,t))return V(n,t,`block`);if(de(e,t))return V(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();if(I=/^(only|not|and|or)$/.test(r)?`keyword`:w.hasOwnProperty(r)?`tag`:D.hasOwnProperty(r)?`attribute`:E.hasOwnProperty(r)?`property`:x.hasOwnProperty(r)?`string-2`:ue(t.current()),I==`tag`&&me(t))return V(n,t,`block`)}return e==`operator`&&/^(not|and|or)$/.test(t.current())&&(I=`keyword`),n.context.type},P.atBlock_parens=function(e,t,n){if(e==`{`||e==`}`)return n.context.type;if(e==`)`)return me(t)?V(n,t,`block`):V(n,t,`atBlock`);if(e==`word`){var r=t.current().toLowerCase();return I=ue(r),/^(max|min)/.test(r)&&(I=`property`),I==`tag`&&(I=y.test(r)?`variable-2`:`atom`),n.context.type}return P.atBlock(e,t,n)},P.keyframes=function(e,t,n){return t.indentation()==`0`&&(e==`}`&&pe(t)||e==`]`||e==`hash`||e==`qualifier`||oe(t.current()))?H(e,t,n):e==`{`?V(n,t,`keyframes`):e==`}`?pe(t)?ie(n,!0):V(n,t,`keyframes`):e==`unit`&&/^[0-9]+\%$/.test(t.current())?V(n,t,`keyframes`):e==`word`&&(I=ue(t.current()),I==`block-keyword`)?(I=`keyword`,V(n,t,`keyframes`)):/@(font-face|media|supports|(-moz-)?document)/.test(e)?V(n,t,me(t)?`block`:`atBlock`):e==`mixin`?V(n,t,`block`,0):n.context.type},P.interpolation=function(e,t,n){return e==`{`&&ie(n)&&V(n,t,`block`),e==`}`?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&oe(he(t))?V(n,t,`block`):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?V(n,t,`block`,0):V(n,t,`block`):e==`variable-name`?V(n,t,`variableName`,0):(e==`word`&&(I=ue(t.current()),I==`tag`&&(I=`atom`)),n.context.type)},P.extend=function(e,t,n){return e==`[`||e==`=`?`extend`:e==`]`?ie(n):e==`word`?(I=ue(t.current()),`extend`):ie(n)},P.variableName=function(e,t,n){return e==`string`||e==`[`||e==`]`||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(I=`variable-2`),`variableName`):H(e,t,n)},{startState:function(e){return{tokenize:null,state:`block`,context:new re(`block`,e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:(F=(t.tokenize||L)(e,t),F&&typeof F==`object`&&(ne=F[1],F=F[0]),I=F,t.state=P[t.state](ne,e,t),I)},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),a=r.indent,o=he(t),s=n.match(/^\s*/)[0].replace(/\t/g,_).length,c=e.context.prev?e.context.prev.line.firstWord:``,l=e.context.prev?e.context.prev.line.indent:s;return r.prev&&(i==`}`&&(r.type==`block`||r.type==`atBlock`||r.type==`keyframes`)||i==`)`&&(r.type==`parens`||r.type==`atBlock_parens`)||i==`{`&&r.type==`at`)?a=r.indent-p:/(\})/.test(i)||(/@|\$|\d/.test(i)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(c)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||ce(o)?a=s:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(i)||oe(o)?a=/\,\s*$/.test(c)?l:/^\s+/.test(n)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(c)||oe(c))?s<=l?l:l+p:s:!/,\s*$/.test(n)&&(le(o)||se(o))&&(a=ce(c)?s<=l?l:l+p:/^\{/.test(c)?s<=l?s:l+p:le(c)||se(c)?s>=l?l:s:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(c)||/=\s*$/.test(c)||oe(c)||/^\$[\w-\.\[\]\'\"]/.test(c)?l+p:s)),a},electricChars:`}`,blockCommentStart:`/*`,blockCommentEnd:`*/`,blockCommentContinue:` * `,lineComment:`//`,fold:`indent`}});var t=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.bgsound.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.nobr.noframes.noscript.object.ol.optgroup.option.output.p.param.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.tr.track.u.ul.var.video`.split(`.`),n=[`domain`,`regexp`,`url-prefix`,`url`],r=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],i=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.dynamic-range.video-dynamic-range`.split(`.`),a=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backface-visibility.background.background-attachment.background-clip.background-color.background-image.background-origin.background-position.background-repeat.background-size.baseline-shift.binding.bleed.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-feature-settings.font-family.font-kerning.font-language-override.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-weight.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-position.grid-auto-rows.grid-column.grid-column-end.grid-column-start.grid-row.grid-row-end.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.justify-content.left.letter-spacing.line-break.line-height.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marker-offset.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.max-height.max-width.min-height.min-width.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotation.rotation-point.ruby-align.ruby-overhang.ruby-position.ruby-span.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-outline.text-overflow.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.unicode-bidi.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode.font-smoothing.osx-font-smoothing`.split(`.`),o=[`scrollbar-arrow-color`,`scrollbar-base-color`,`scrollbar-dark-shadow-color`,`scrollbar-face-color`,`scrollbar-highlight-color`,`scrollbar-shadow-color`,`scrollbar-3d-light-color`,`scrollbar-track-color`,`shape-inside`,`searchfield-cancel-button`,`searchfield-decoration`,`searchfield-results-button`,`searchfield-results-decoration`,`zoom`],s=[`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`],c=`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.grey.green.greenyellow.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`),l=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.avoid.avoid-column.avoid-page.avoid-region.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.column.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.copy.counter.counters.cover.crop.cross.crosshair.currentcolor.cursive.cyclic.dashed.decimal.decimal-leading-zero.default.default-button.destination-atop.destination-in.destination-out.destination-over.devanagari.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fixed.flat.flex.footnotes.forwards.from.geometricPrecision.georgian.graytext.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hebrew.help.hidden.hide.high.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.malayalam.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row-resize.rtl.run-in.running.s-resize.sans-serif.scale.scale3d.scaleX.scaleY.scaleZ.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.semi-condensed.semi-expanded.separate.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.solid.somali.source-atop.source-in.source-out.source-over.space.spell-out.square.square-button.standard.start.static.status-bar.stretch.stroke.sub.subpixel-antialiased.super.sw-resize.symbolic.symbols.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.x-large.x-small.xor.xx-large.xx-small.bicubic.optimizespeed.grayscale.row.row-reverse.wrap.wrap-reverse.column-reverse.flex-start.flex-end.space-between.space-around.unset`.split(`.`),u=[`in`,`and`,`or`,`not`,`is not`,`is a`,`is`,`isnt`,`defined`,`if unless`],d=[`for`,`if`,`else`,`unless`,`from`,`to`],f=[`null`,`true`,`false`,`href`,`title`,`type`,`not-allowed`,`readonly`,`disabled`],p=t.concat(n,r,i,a,o,c,l,s,u,d,f,[`@font-face`,`@keyframes`,`@media`,`@viewport`,`@page`,`@host`,`@supports`,`@block`,`@css`]);function m(e){return e=e.sort(function(e,t){return t>e}),RegExp(`^((`+e.join(`)|(`)+`))\\b`)}function h(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=!0;return t}function g(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}e.registerHelper(`hintWords`,`stylus`,p),e.defineMIME(`text/x-styl`,`stylus`)})})),Z=B(((e,t)=>{(function(n){typeof e==`object`&&typeof t==`object`?n(rt(),gt(),dt(),ft(),_t(),ct(),ht(),vt(),mt(),J()):typeof define==`function`&&define.amd?define([`../../lib/codemirror`,`../../addon/mode/overlay`,`../xml/xml`,`../javascript/javascript`,`../coffeescript/coffeescript`,`../css/css`,`../sass/sass`,`../stylus/stylus`,`../pug/pug`,`../handlebars/handlebars`],n):n(CodeMirror)})(function(e){var t={script:[[`lang`,/coffee(script)?/,`coffeescript`],[`type`,/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,`coffeescript`],[`lang`,/^babel$/,`javascript`],[`type`,/^text\/babel$/,`javascript`],[`type`,/^text\/ecmascript-\d+$/,`javascript`]],style:[[`lang`,/^stylus$/i,`stylus`],[`lang`,/^sass$/i,`sass`],[`lang`,/^less$/i,`text/x-less`],[`lang`,/^scss$/i,`text/x-scss`],[`type`,/^(text\/)?(x-)?styl(us)?$/i,`stylus`],[`type`,/^text\/sass/i,`sass`],[`type`,/^(text\/)?(x-)?scss$/i,`text/x-scss`],[`type`,/^(text\/)?(x-)?less$/i,`text/x-less`]],template:[[`lang`,/^vue-template$/i,`vue`],[`lang`,/^pug$/i,`pug`],[`lang`,/^handlebars$/i,`handlebars`],[`type`,/^(text\/)?(x-)?pug$/i,`pug`],[`type`,/^text\/x-handlebars-template$/i,`handlebars`],[null,null,`vue-template`]]};e.defineMode(`vue-template`,function(t,n){return e.overlayMode(e.getMode(t,n.backdrop||`text/html`),{token:function(e){if(e.match(/^\{\{.*?\}\}/))return`meta mustache`;for(;e.next()&&!e.match(`{{`,!1););return null}})}),e.defineMode(`vue`,function(n){return e.getMode(n,{name:`htmlmixed`,tags:t})},`htmlmixed`,`xml`,`javascript`,`coffeescript`,`css`,`sass`,`stylus`,`pug`,`handlebars`),e.defineMIME(`script/x-vue`,`vue`),e.defineMIME(`text/x-vue`,`vue`)})}));ct(),J(),pt(),ft(),X(),mt(),ht(),Z(),dt();function yt(e,t,n={}){let i=(0,at.default)(e.value,{theme:`vars`,value:t.value,...n}),a=!1;return i.on(`change`,()=>{if(a){a=!1;return}t.value=i.getValue()}),r(t,e=>{if(e!==i.getValue()){a=!0;let t=i.listSelections();i.replaceRange(e,i.posFromIndex(0),i.posFromIndex(1/0)),i.setSelections(t),i.scrollTo(0,0)}},{immediate:!0}),i}function bt(e,t){let n=e.getScrollInfo(),r=t.getScrollInfo(),i=(r.width-r.clientWidth)/(n.width-n.clientWidth)*n.left,a=(r.height-r.clientHeight)/(n.height-n.clientHeight)*n.top;i=Number.isNaN(i)?0:i,a=Number.isNaN(a)?0:a,t.scrollTo(i,a)}function xt(e,t){let n=1;e.getWrapperElement().addEventListener(`mouseenter`,()=>{n=1}),t.getWrapperElement().addEventListener(`mouseenter`,()=>{n=2}),e.on(`scroll`,e=>{n===1&&bt(e,t)}),e.on(`scrollCursorIntoView`,e=>bt(e,t)),t.on(`scroll`,t=>{n===2&&bt(t,e)}),t.on(`scrollCursorIntoView`,t=>bt(t,e))}function St(e){return e.trimStart().startsWith(`<`)?`htmlmixed`:e.match(/^import\s/)?`javascript`:e.match(/^[.#].+\{/)?`css`:`javascript`}var Ct=e({__name:`Viewer`,props:{code:{}},setup(e){let{code:t}=n(e),r,i=v(`codeEl`);return k(()=>{r=yt(i,t,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),se(()=>{r.setOption(`lineWrapping`,W.value.codeviewerLineWrap)})}),(e,t)=>(H(),C(`div`,{ref_key:`codeEl`,ref:i},null,512))}}),wt=Object.assign(Ct,{__name:`CodeViewer`}),Tt={flex:``,px2:``},Et={"overflow-hidden":``,"text-ellipsis":``},Dt={"overflow-hidden":``,"text-ellipsis":``},Ot=[`d`],kt=20,At=e({__name:`AssetRelationships`,props:{importers:{},imports:{}},setup(e){let t=e,n={width:400,height:35,padding:4,marginX:8,border:1,margin:8,dot:16,dotOffset:80},i=v(`container`),c=_([]),u=o(()=>Math.min(Math.max(t.importers?.length||0,t.imports?.length||0),kt)),f=o(()=>Math.min(t.importers?.length||0,kt)),h=o(()=>Math.min(t.imports?.length||0,kt)),x=o(()=>n.height*u.value+n.padding*(u.value+1)+n.border*2),S=o(()=>{let e=Math.max(0,h.value-f.value)*(n.height+n.padding)/2;return Math.min(e,x.value/2)}),w=o(()=>{let e=Math.max(0,f.value-h.value)*(n.height+n.padding)/2;return Math.min(e,x.value/2)}),T=o(()=>`${x.value/2-n.dot/2}px ${n.dotOffset}px 0 ${t.importers?.length?n.dotOffset:0}px`),E=o(()=>t.importers?.length?n.width+n.marginX:n.marginX),D=o(()=>t.importers?.length?E.value+n.dotOffset:E.value),O=o(()=>(n.height*u.value+(u.value+1)*n.padding)/2);function A(e){switch(e){case`importer-start`:return E.value;case`importer-end`:return D.value;case`import-start`:return D.value+n.dot;case`import-end`:return t.importers?.length?E.value+n.dotOffset*2+n.dot:E.value+n.dotOffset+n.dot}}function j(e,t){switch(e){case`importer-start`:return(n.height+n.padding)*t+(n.height/2+n.padding)+S.value;case`import-end`:return(n.height+n.padding)*t+(n.height/2+n.padding)+w.value;case`importer-end`:case`import-start`:return O.value}}function M(){if(c.value=[],t.importers?.length){let e=Array.from({length:f.value},(e,t)=>({id:`importer-${t}`,source:{x:A(`importer-start`),y:j(`importer-start`,t)},target:{x:A(`importer-end`),y:j(`importer-end`)}}));c.value.push(...e)}if(t.imports?.length){let e=Array.from({length:h.value},(e,t)=>({id:`import-${t}`,source:{x:A(`import-start`),y:j(`import-start`)},target:{x:A(`import-end`),y:j(`import-end`,t)}}));c.value.push(...e)}}return k(()=>{r(()=>[t.importers,t.imports],M,{immediate:!0})}),(t,r)=>{let o=pe,u=le;return e.importers?.length||e.imports?.length?(H(),C(`div`,{key:0,ref_key:`container`,ref:i,"w-full":``,relative:``,"select-none":``},[p(`div`,Tt,[e.importers?.length?(H(),C(`div`,{key:0,py1:``,style:s({width:`${n.width}px`,marginTop:`${S.value}px`})},[(H(!0),C(y,null,F(e.importers,(t,r)=>(H(),z(u,{key:t.filename,to:{query:{asset:t.filename}},hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"z-graph-node":``,border:`~ base rounded`,"font-mono":``,"text-sm":``,style:s({width:`${n.width}px`,height:`${n.height}px`,overflow:`hidden`,marginBottom:`${r===e.importers.length-1?0:n.padding}px`,display:`flex`,alignItems:`center`,gap:`0.25rem`})},{default:a(()=>[g(o,{filename:t.filename},null,8,[`filename`]),p(`span`,Et,m(t.filename),1)]),_:2},1032,[`to`,`style`]))),128))],4)):d(``,!0),p(`div`,{"bg-base":``,"rounded-full":``,"border-3":``,"font-mono":``,"border-active":``,"flex-shrink-0":``,style:s({margin:T.value,width:`${n.dot}px`,height:`${n.dot}px`})},null,4),e.imports?.length?(H(),C(`div`,{key:1,py1:``,style:s({width:`${n.width}px`,marginTop:`${w.value}px`})},[(H(!0),C(y,null,F(e.imports,(t,r)=>(H(),z(u,{key:t.filename,to:{query:{asset:t.filename}},hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"z-graph-node":``,border:`~ base rounded`,"font-mono":``,"text-sm":``,style:s({width:`${n.width}px`,height:`${n.height}px`,overflow:`hidden`,marginBottom:`${r===e.imports.length-1?0:n.padding}px`,display:`flex`,alignItems:`center`,gap:`0.25rem`})},{default:a(()=>[g(o,{filename:t.filename},null,8,[`filename`]),p(`span`,Dt,m(t.filename),1)]),_:2},1032,[`to`,`style`]))),128))],4)):d(``,!0)]),(H(),C(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,"w-full":``,style:s({height:`${x.value}px`})},[p(`g`,null,[(H(!0),C(y,null,F(c.value,e=>(H(),C(`path`,{key:e.id,d:l(Ie)(e),class:b(l(Fe)(e)),fill:`none`},null,10,Ot))),128))])],4))],512)):d(``,!0)}}}),jt=Object.assign(At,{__name:`DataAssetRelationships`}),Mt=[`title`],Nt=e({__name:`DisplayIconButton`,props:{title:{},classIcon:{},active:{type:Boolean}},setup(e){let t=e;return(e,n)=>(H(),C(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,class:b(t.active?`bg-active op90 text-green-400`:``),hover:`bg-active op100`,op50:``,title:t.title},[M(e.$slots,`default`,{},()=>[p(`div`,{class:b(t.classIcon)},null,2)])],10,Mt))}}),Pt={flex:`~ col gap-3`},Ft={flex:`~ gap-4 items-center wrap`},It={flex:`~ gap-2`},Lt={flex:`~ gap-2 items-center`},Rt={class:`w-full of-auto px2 py1`,border:`~ base rounded-lg`},zt={key:1,flex:`~ col gap-4`},Bt={flex:`~ col gap-2`},Vt={key:0,flex:`~ col gap-2`},Ht={key:2,flex:`~ col gap-1`},Ut={key:0,flex:`~ items-center gap-2`},Wt=e({__name:`AssetDetails`,props:{session:{},asset:{},chunks:{},importers:{},imports:{},lazy:{type:Boolean,default:!1}},setup(e){let t=e,n=ae(),r=P(),i=u(!1),{state:s}=we(async()=>{if(!t.lazy)return;let e=await n.value.call(`vite:rolldown:get-asset-details`,{session:t.session.id,id:t.asset.filename});return`chunk`in e?{chunks:[{...e?.chunk,type:`chunk`}],importers:e?.importers,imports:e?.imports}:{chunks:[],importers:[],imports:[]}},null),c=o(()=>t.lazy?s.value?.chunks:t.chunks?.filter(e=>e.chunk_id===t.asset.chunk_id)),f=o(()=>t.lazy?s.value?.importers:t.importers),m=o(()=>t.lazy?s.value?.imports:t.imports);function h(){n.value.call(`vite:core:open-in-editor`,`${t.session.meta.dir}/${t.asset.filename}`)}return(t,n)=>{let o=Me,s=wt,u=Ne,_=le,v=jt;return H(),C(`div`,Pt,[p(`div`,Ft,[g(o,{asset:e.asset},null,8,[`asset`]),n[5]||=p(`div`,{"flex-auto":``},null,-1),p(`div`,It,[p(`button`,{"btn-action":``,onClick:h},[...n[3]||=[p(`div`,{"i-ph-arrow-square-out-duotone":``},null,-1),w(` Open in editor `,-1)]]),p(`button`,{"btn-action":``,onClick:n[0]||=e=>i.value=!0},[...n[4]||=[p(`div`,{"i-ph-file-text":``},null,-1),w(` View source `,-1)]]),M(t.$slots,`default`)])]),i.value?(H(),C(y,{key:0},[p(`div`,Lt,[n[6]||=p(`div`,{op50:``},` Source `,-1),n[7]||=p(`span`,{"flex-auto":``},null,-1),g(Nt,{title:`Line Wrapping`,"class-icon":`i-ph-arrow-u-down-left-duotone`,active:l(W).codeviewerLineWrap,onClick:n[1]||=e=>l(W).codeviewerLineWrap=!l(W).codeviewerLineWrap},null,8,[`active`]),g(Le,{onClick:n[2]||=e=>i.value=!1})]),p(`div`,Rt,[g(s,{code:e.asset.content},null,8,[`code`])])],64)):d(``,!0),c.value&&c.value.length>0?(H(),C(`div`,zt,[p(`div`,Bt,[n[8]||=p(`div`,{op50:``},` Chunks `,-1),(H(!0),C(y,null,F(c.value,t=>(H(),z(_,{key:t.chunk_id,border:`~ base rounded-lg`,px2:``,py1:``,"min-w-fit":``,to:{path:l(r).path,query:{chunk:t.chunk_id}}},{default:a(()=>[g(u,{chunk:t,session:e.session,"show-details":!1},null,8,[`chunk`,`session`])]),_:2},1032,[`to`]))),128))]),f.value?.length||m.value?.length?(H(),C(`div`,Vt,[n[9]||=p(`div`,{op50:``},` Asset Relationships `,-1),g(v,{importers:f.value,imports:m.value},null,8,[`importers`,`imports`])])):d(``,!0)])):(H(),C(`div`,Ht,[n[12]||=p(`div`,{op50:``},` [Non-Module Asset] `,-1),e.asset.filename.endsWith(`.map`)?(H(),C(`div`,Ut,[n[10]||=p(`span`,{op50:``},`Source Map for`,-1),n[11]||=w(),g(me,{text:JSON.parse(e.asset.content).file},null,8,[`text`])])):d(``,!0)]))])}}}),Gt=Object.assign(Wt,{__name:`DataAssetDetails`}),Kt=Symbol(`Comlink.proxy`),qt=Symbol(`Comlink.endpoint`),Jt=Symbol(`Comlink.releaseProxy`),Yt=Symbol(`Comlink.finalizer`),Xt=Symbol(`Comlink.thrown`),Zt=e=>typeof e==`object`&&!!e||typeof e==`function`,Qt=new Map([[`proxy`,{canHandle:e=>Zt(e)&&e[Kt],serialize(e){let{port1:t,port2:n}=new MessageChannel;return en(e,t),[n,[n]]},deserialize(e){return e.start(),rn(e)}}],[`throw`,{canHandle:e=>Zt(e)&&Xt in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(Error(e.value.message),e.value):e.value}}]]);function $t(e,t){for(let n of e)if(t===n||n===`*`||n instanceof RegExp&&n.test(t))return!0;return!1}function en(e,t=globalThis,n=[`*`]){t.addEventListener(`message`,function r(i){if(!i||!i.data)return;if(!$t(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}let{id:a,type:o,path:s}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(vn),l;try{let t=s.slice(0,-1).reduce((e,t)=>e[t],e),n=s.reduce((e,t)=>e[t],e);switch(o){case`GET`:l=n;break;case`SET`:t[s.slice(-1)[0]]=vn(i.data.value),l=!0;break;case`APPLY`:l=n.apply(t,c);break;case`CONSTRUCT`:l=gn(new n(...c));break;case`ENDPOINT`:{let{port1:t,port2:n}=new MessageChannel;en(e,n),l=hn(t,[t])}break;case`RELEASE`:l=void 0;break;default:return}}catch(e){l={value:e,[Xt]:0}}Promise.resolve(l).catch(e=>({value:e,[Xt]:0})).then(n=>{let[i,s]=_n(n);t.postMessage(Object.assign(Object.assign({},i),{id:a}),s),o===`RELEASE`&&(t.removeEventListener(`message`,r),nn(t),Yt in e&&typeof e[Yt]==`function`&&e[Yt]())}).catch(e=>{let[n,r]=_n({value:TypeError(`Unserializable return value`),[Xt]:0});t.postMessage(Object.assign(Object.assign({},n),{id:a}),r)})}),t.start&&t.start()}function tn(e){return e.constructor.name===`MessagePort`}function nn(e){tn(e)&&e.close()}function rn(e,t){let n=new Map;return e.addEventListener(`message`,function(e){let{data:t}=e;if(!t||!t.id)return;let r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}}),dn(e,n,[],t)}function an(e){if(e)throw Error(`Proxy has been released and is not useable`)}function on(e){return yn(e,new Map,{type:`RELEASE`}).then(()=>{nn(e)})}var sn=new WeakMap,cn=`FinalizationRegistry`in globalThis&&new FinalizationRegistry(e=>{let t=(sn.get(e)||0)-1;sn.set(e,t),t===0&&on(e)});function ln(e,t){let n=(sn.get(t)||0)+1;sn.set(t,n),cn&&cn.register(e,t,e)}function un(e){cn&&cn.unregister(e)}function dn(e,t,n=[],r=function(){}){let i=!1,a=new Proxy(r,{get(r,o){if(an(i),o===Jt)return()=>{un(a),on(e),t.clear(),i=!0};if(o===`then`){if(n.length===0)return{then:()=>a};let r=yn(e,t,{type:`GET`,path:n.map(e=>e.toString())}).then(vn);return r.then.bind(r)}return dn(e,t,[...n,o])},set(r,a,o){an(i);let[s,c]=_n(o);return yn(e,t,{type:`SET`,path:[...n,a].map(e=>e.toString()),value:s},c).then(vn)},apply(r,a,o){an(i);let s=n[n.length-1];if(s===qt)return yn(e,t,{type:`ENDPOINT`}).then(vn);if(s===`bind`)return dn(e,t,n.slice(0,-1));let[c,l]=pn(o);return yn(e,t,{type:`APPLY`,path:n.map(e=>e.toString()),argumentList:c},l).then(vn)},construct(r,a){an(i);let[o,s]=pn(a);return yn(e,t,{type:`CONSTRUCT`,path:n.map(e=>e.toString()),argumentList:o},s).then(vn)}});return ln(a,e),a}function fn(e){return Array.prototype.concat.apply([],e)}function pn(e){let t=e.map(_n);return[t.map(e=>e[0]),fn(t.map(e=>e[1]))]}var mn=new WeakMap;function hn(e,t){return mn.set(e,t),e}function gn(e){return Object.assign(e,{[Kt]:!0})}function _n(e){for(let[t,n]of Qt)if(n.canHandle(e)){let[r,i]=n.serialize(e);return[{type:`HANDLER`,name:t,value:r},i]}return[{type:`RAW`,value:e},mn.get(e)||[]]}function vn(e){switch(e.type){case`HANDLER`:return Qt.get(e.name).deserialize(e.value);case`RAW`:return e.value}}function yn(e,t,n,r){return new Promise(i=>{let a=bn();t.set(a,i),e.start&&e.start(),e.postMessage(Object.assign({id:a},n),r)})}function bn(){return[,,,,].fill(0).map(()=>Math.floor(Math.random()*(2**53-1)).toString(16)).join(`-`)}var xn;async function Sn(e,t){return xn||=rn(new Worker(new URL(``+new URL(`diff.worker-CvsEE-qa.js`,import.meta.url).href,``+import.meta.url),{type:`module`})),await xn.calculateDiff(e,t)}var Cn=e({__name:`DiffEditor`,props:{from:{},to:{},oneColumn:{type:Boolean},diff:{type:Boolean}},setup(e){let t=e,{from:r,to:s}=n(t),c=v(`fromEl`),u=v(`toEl`),d,f;k(()=>{d=yt(c,r,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),f=yt(u,s,{mode:`javascript`,readOnly:!0,lineNumbers:!0}),xt(d,f),se(()=>{d.setOption(`lineWrapping`,W.value.codeviewerLineWrap),f.setOption(`lineWrapping`,W.value.codeviewerLineWrap)}),se(async()=>{d.getWrapperElement().style.display=t.oneColumn?`none`:``,t.oneColumn||(await R(),d.refresh(),bt(f,d))}),se(async()=>{let e=r.value,n=s.value,i=t.diff;d.setOption(`mode`,St(e)),f.setOption(`mode`,St(n)),await R(),d.startOperation(),f.startOperation(),d.getAllMarks().forEach(e=>e.clear()),f.getAllMarks().forEach(e=>e.clear());for(let e=0;e<d.lineCount()+2;e++)d.removeLineClass(e,`background`,`diff-removed`);for(let e=0;e<f.lineCount()+2;e++)f.removeLineClass(e,`background`,`diff-added`);if(i&&r.value){let t=await Sn(e,n),r=new Set,i=new Set,a=0,o=0;t.forEach(([e,t])=>{if(e===1){let e=f.posFromIndex(o);o+=t.length;let n=f.posFromIndex(o);f.markText(e,n,{className:`diff-added-inline`});for(let t=e.line;t<=n.line;t++)r.add(t)}else if(e===-1){let e=d.posFromIndex(a);a+=t.length;let n=d.posFromIndex(a);d.markText(e,n,{className:`diff-removed-inline`});for(let t=e.line;t<=n.line;t++)i.add(t)}else a+=t.length,o+=t.length}),Array.from(i).forEach(e=>d.addLineClass(e,`background`,`diff-removed`)),Array.from(r).forEach(e=>f.addLineClass(e,`background`,`diff-added`))}d.endOperation(),f.endOperation()})});let m=o(()=>t.oneColumn?0:W.value.codeviewerDiffPanelSize);function h(e){d?.refresh(),f?.refresh(),!t.oneColumn&&(W.value.codeviewerDiffPanelSize=e)}return(t,n)=>(H(),z(l(tt),{onResize:n[0]||=e=>h(e.prevPane.size)},{default:a(()=>[i(g(l(nt),{"min-size":`10`,size:m.value},{default:a(()=>[p(`div`,{ref_key:`fromEl`,ref:c,"h-inherit":``},null,512)]),_:1},8,[`size`]),[[x,!e.oneColumn]]),g(l(nt),{"min-size":`10`,size:100-m.value},{default:a(()=>[p(`div`,{ref_key:`toEl`,ref:u,"h-inherit":``},null,512)]),_:1},8,[`size`])]),_:1}))}}),wn=Object.assign(Cn,{__name:`CodeDiffEditor`}),Tn={key:0,p4:``,"h-full":``,"of-auto":``,style:{"overscroll-behavior":`contain`}},En={key:1,p4:``,"h-full":``,"of-auto":``,style:{"overscroll-behavior":`contain`}},Dn={pl4:``,p2:``,"font-mono":``,border:`b base`,flex:`~ items-center gap-2`},On={key:0,op50:``,"text-xs":``},kn={key:3,op50:``,italic:``,ma:``},An=e({__name:`ModuleFlowDetails`,props:{selected:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=o(()=>!n.selected||!(`type`in n.selected)?null:n.selected.type===`transform`?{type:`transform`,plugin_name:n.selected.plugin_name,from:n.selected.content_from,to:n.selected.content_to}:n.selected.type===`load`?{type:`load`,from:``,plugin_name:n.selected.plugin_name,to:n.selected.content}:null);function a(){r(`close`)}return(t,n)=>{let r=Ne,o=Gt,s=wn;return H(),C(`div`,{"bg-glass":``,"w-full":``,"h-full":``,class:b(i.value?.from&&i.value?.to?``:`border-dashed`),border:`~ base rounded-lg`,"of-hidden":``,flex:`~ col`},[e.selected?.type===`chunk`?(H(),C(`div`,Tn,[g(r,{chunk:e.selected,session:e.session},null,8,[`chunk`,`session`])])):e.selected?.type===`asset`?(H(),C(`div`,En,[g(o,{asset:e.selected,session:e.session,lazy:!0},null,8,[`asset`,`session`])])):i.value?.from&&i.value?.to?(H(),C(y,{key:2},[p(`div`,Dn,[g(Be,{name:i.value?.plugin_name??``},null,8,[`name`]),i.value?.type?(H(),C(`span`,On,m(i.value?.type===`load`?`Load`:`Transform`),1)):d(``,!0),n[1]||=p(`div`,{"flex-auto":``},null,-1),g(Nt,{title:`Line Wrapping`,"class-icon":`i-ph-arrow-u-down-left-duotone`,active:l(W).codeviewerLineWrap,onClick:n[0]||=e=>l(W).codeviewerLineWrap=!l(W).codeviewerLineWrap},null,8,[`active`]),g(Le,{onClick:c(a,[`stop`])})]),g(s,{from:i.value?.from??``,to:i.value?.to??``,diff:!0,"one-column":!1},null,8,[`from`,`to`])],64)):(H(),C(`span`,kn,` No data `))],2)}}}),jn=Object.assign(An,{__name:`FlowmapModuleFlowDetails`}),Mn={flex:`~ col`,relative:``},Nn=e({__name:`Node`,props:N({lines:{},classNodeInline:{},classNodeOuter:{},classNodeInner:{},classLineTop:{},classLineBottom:{},active:{type:Boolean}},{expanded:{type:Boolean,required:!1,default:!0},expandedModifiers:{}}),emits:[`update:expanded`],setup(e){let t=e,n=D(e,`expanded`);return(r,i)=>(H(),C(`div`,Mn,[t.lines?.top?(H(),C(`div`,{key:0,absolute:``,"top-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:b([e.active?`border-flow-line-active`:`border-flow-line`,t.classLineTop]),style:s(typeof t.lines?.top==`number`?`height: ${t.lines.top}px`:``)},null,6)):d(``,!0),t.lines?.bottom?(H(),C(`div`,{key:1,absolute:``,"bottom-0":``,"left-10":``,border:`r`,h:`1/2`,"max-h-4":``,"z-flowmap-line":``,class:b([e.active?`border-flow-line-active`:`border-flow-line`,t.classLineBottom]),style:s(typeof t.lines?.bottom==`number`?`height: ${t.lines.bottom}px`:``)},null,6)):d(``,!0),M(r.$slots,`before`),p(`div`,{flex:`~`,"w-max":``,class:b([t.classNodeInline,`flowmap-node-inline`])},[M(r.$slots,`inline-before`),p(`div`,{class:b([t.classNodeOuter,e.active?`border-flow-active`:`border-flow`]),border:`~ rounded-2xl`,"bg-base":``,"of-hidden":``,"cursor-pointer":``,onClick:i[0]||=e=>n.value=!n.value},[M(r.$slots,`inner`,{},()=>[p(`div`,{px3:``,py1:``,class:b(t.classNodeInner),flex:`~ inline gap-2 items-center`},[M(r.$slots,`content`)],2)])],2),M(r.$slots,`inline-after`)],2),M(r.$slots,`after`)]))}}),Pn=Object.assign(Nn,{__name:`FlowmapNode`});const Fn=_(!1);Oe(window,[`pointerup`,`pointercancel`,`pointerleave`],()=>{Fn.value=!1});var In={key:0,pl10:``},Ln={op50:``},Rn={key:1,pl10:``},zn={op50:``},Bn={key:0,"text-xs":``,op25:``},Vn={key:1},Hn={"font-mono":``,"text-xs":``,flex:`~ gap-1 items-center`},Un={"text-green":``},Wn={"text-red":``},Gn={flex:`~ gap-2 items-center`},Kn=e({__name:`NodeModuleInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`,`toggleShowAll`],setup(e,{emit:t}){let n=e,r=t,i=o(()=>{switch(n.item.type){case`transform`:return n.item.content_from===n.item.content_to;case`load`:return n.item.content==null;default:return!1}});function s(){Fn.value&&r(`select`,n.item)}function c(){r(`select`,n.item),Fn.value=!0}let l=o(()=>{if(n.item.type!==`resolve`)return;let e=n.item.importer;return n.session.modulesList.find(t=>t.id===e)});return(t,n)=>{let o=Be,u=he,f=Pn;return e.item.type===`no_changes_collapsed`?(H(),C(`div`,In,[p(`div`,{flex:`~ gap-2 items-center`,"text-sm":``,border:`l`,py1:``,class:b(e.active?`border-flow-line-active`:`border-flow-line`)},[p(`div`,{"w-2":``,"h-2":``,border:`4`,"rounded-full":``,"ml--1":``,"translate-x--0.5px":``,class:b(e.active?`border-flow-line-active`:`border-flow-line`)},null,2),p(`span`,Ln,m(e.item.count)+` plugins did not change the content but cost`,1),g(Se,{duration:e.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),n[3]||=p(`span`,{op50:``,"flex-shrink-0":``},`in total`,-1),p(`button`,{border:`~ base rounded-full`,px2:``,"py-px":``,op50:``,hover:`op100`,onClick:n[0]||=t=>r(`toggleShowAll`,e.item)},` Expand `)],2)])):e.item.type===`no_changes_hide`?(H(),C(`div`,Rn,[p(`div`,{flex:`~ gap-2 items-center`,"text-sm":``,border:`l`,py1:``,class:b(e.active?`border-flow-line-active`:`border-flow-line`)},[p(`div`,{"w-2":``,"h-2":``,border:`4`,"rounded-full":``,"ml--1":``,"translate-x--0.5px":``,class:b(e.active?`border-flow-line-active`:`border-flow-line`)},null,2),p(`span`,zn,m(e.item.count)+` plugins did not change the content but cost`,1),g(Se,{duration:e.item.duration,color:!0,factor:5,"text-xs":``},null,8,[`duration`]),n[4]||=p(`span`,{op50:``,"flex-shrink-0":``},`in total`,-1),p(`button`,{border:`~ base rounded-full`,px2:``,"py-px":``,op50:``,hover:`op100`,onClick:n[1]||=t=>r(`toggleShowAll`,e.item)},` Hide `)],2)])):(H(),z(f,{key:2,lines:{top:!0},"class-node-outer":i.value?`border-dashed`:``,active:e.active,"class-node-inline":`gap-2 items-center`,pl6:``,onPointerenter:s},S({inner:a(()=>[p(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:n[2]||=t=>r(`select`,e.item),onPointerdown:c},[M(t.$slots,`button`,{},()=>[`plugin_name`in e.item?(H(),z(o,{key:0,class:b([i.value?`op50`:``,`font-mono text-sm ws-nowrap`]),name:e.item.plugin_name},null,8,[`class`,`name`])):d(``,!0)])],32)]),"inline-after":a(()=>[`duration`in e.item?(H(),z(Se,{key:0,duration:e.item.duration,color:!0,factor:5,"text-xs":``,"flex-shrink-0":``},null,8,[`duration`])):d(``,!0),e.item.type===`transform`?(H(),C(y,{key:1},[e.item.content_from===e.item.content_to?(H(),C(`div`,Bn,` no changes `)):(H(),C(`div`,Vn,[p(`div`,Hn,[p(`span`,Un,`+`+m(e.item.diff_added),1),p(`span`,Wn,`-`+m(e.item.diff_removed),1)])]))],64)):d(``,!0)]),_:2},[e.item.type===`resolve`&&e.item.resolved_id&&e.item.importer?{name:`after`,fn:a(()=>[p(`div`,{p3:``,ml4:``,border:`l`,flex:`~ col gap-1`,class:b(e.active?`border-flow-line-active`:`border-flow-line`)},[p(`div`,Gn,[n[5]||=p(`div`,{"i-ph-arrow-elbow-left-down":``,"text-base":``,op50:``,"flex-none":``,"ml0.8":``},null,-1),g(u,{id:e.item.importer,session:e.session,link:!!l.value,class:b(l.value?`hover:bg-active`:``),px2:``,py1:``,rounded:``},null,8,[`id`,`session`,`link`,`class`])]),g(u,{id:e.item.module_request,session:e.session},null,8,[`id`,`session`])],2)]),key:`0`}:void 0]),1032,[`class-node-outer`,`active`]))}}}),qn=Object.assign(Kn,{__name:`FlowmapNodeModuleInfo`}),Jn={"ml-2px":``},Yn=e({__name:`Expandable`,props:N({expandable:{type:Boolean},classRootNode:{},activeStart:{type:Boolean},activeEnd:{type:Boolean},showTail:{type:Boolean,default:!0}},{expanded:{type:Boolean,required:!1,default:!0},expandedModifiers:{}}),emits:[`update:expanded`],setup(e){let t=D(e,`expanded`);return(n,r)=>{let i=Pn;return H(),z(i,{expanded:t.value,"onUpdate:expanded":r[1]||=e=>t.value=e,lines:{top:!0,bottom:!e.expandable||!t.value},pl6:``,pt4:``,"class-node-outer":e.classRootNode,active:e.activeStart},S({content:a(()=>[M(n.$slots,`node`)]),_:2},[e.expandable?{name:`inline-before`,fn:a(()=>[p(`button`,{"w-6":``,"h-6":``,mr1:``,"ml--7":``,mya:``,"rounded-full":``,hover:`bg-active`,flex:`~ items-center justify-center`,"cursor-pointer":``,onClick:r[0]||=e=>t.value=!t.value},[p(`div`,{"i-ph-caret-right":``,"text-sm":``,op50:``,transition:``,"duration-300":``,class:b({"rotate-90":t.value})},null,2)])]),key:`0`}:void 0,e.expandable&&t.value?{name:`after`,fn:a(()=>[p(`div`,null,[(H(),C(`svg`,{"ml-1em":``,"w-27px":``,"h-30px":``,viewBox:`0 0 27 30`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:b(e.activeStart?`fg-flow-line-active`:`fg-flow-line`)},[...r[2]||=[p(`g`,null,[p(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)]],2)),p(`div`,Jn,[M(n.$slots,`container`)]),e.showTail?(H(),C(`svg`,{key:0,"ml-1em":``,"w-27px":``,"h-30px":``,style:{transform:`scaleX(-1)`},viewBox:`0 0 27 30`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,class:b(e.activeEnd?`fg-flow-line-active`:`fg-flow-line`)},[...r[3]||=[p(`g`,null,[p(`path`,{d:`M0.5 0C0.5 18 26.5 12 26.5 30`,stroke:`currentColor`,"stroke-width":`1px`})],-1)]],2)):d(``,!0)])]),key:`1`}:void 0]),1032,[`expanded`,`lines`,`class-node-outer`,`active`])}}}),Xn=Object.assign(Yn,{__name:`FlowmapExpandable`}),Zn={flex:`~ col gap-1 items-start`,p1:``},Qn={flex:`~ gap-2 items-center`},$n=[`title`],er={"text-sm":``},tr=e({__name:`NodeChunkInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=t;return(t,r)=>{let i=Pn;return H(),z(i,{lines:{top:!0},active:e.active,"class-node-inline":`gap-2 items-center`,pl6:``},{inner:a(()=>[p(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:r[0]||=t=>n(`select`,e.item)},[M(t.$slots,`button`,{},()=>[p(`div`,Zn,[p(`div`,Qn,[g(me,{text:e.item.name||`<unnamed chunk>`},null,8,[`text`]),r[1]||=p(`div`,{"flex-auto":``},null,-1),p(`div`,{title:`Chunk ID: ${e.item.chunk_id}`,op50:``,"font-mono":``,"text-sm":``},` #`+m(e.item.chunk_id),9,$n)]),p(`div`,er,m(e.item.modules.length)+` modules `,1)])])])]),"inline-after":a(()=>[g(me,{text:e.item.reason},null,8,[`text`])]),_:3},8,[`active`])}}}),nr=Object.assign(tr,{__name:`FlowmapNodeChunkInfo`}),rr={flex:`~ col gap-1 items-start`,p1:``},ir={flex:`~ gap-2 items-center`},ar=e({__name:`NodeAssetInfo`,props:{item:{},session:{},active:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let n=t;return(t,r)=>{let i=he,o=be,s=Pn;return H(),z(s,{lines:{top:!0},active:e.active,"class-node-inline":`gap-2 items-center`,pl6:``},{inner:a(()=>[p(`button`,{px3:``,py1:``,hover:`bg-active`,flex:`~ inline gap-2 items-center`,onClick:r[0]||=t=>n(`select`,e.item)},[M(t.$slots,`button`,{},()=>[p(`div`,rr,[p(`div`,ir,[g(i,{id:e.item.filename,session:e.session},null,8,[`id`,`session`])])])])])]),"inline-after":a(()=>[g(o,{bytes:e.item.size,"text-sm":``},null,8,[`bytes`]),g(me,{text:e.item.type},null,8,[`text`])]),_:3},8,[`active`])}}}),or=Object.assign(ar,{__name:`FlowmapNodeAssetInfo`}),sr={"select-none":``,"h-full":``,"of-auto":``,"ws-nowrap":``,"w-100vh":``,"of-visible":``},cr={key:0,"text-sm":``},lr={flex:``},ur={flex:`~ items-center gap-1`,"text-sm":``,"text-blue":``,px3:``,py1:``},dr={p2:``,flex:`~ col gap-1`},fr={flex:`~`},pr={p2:``},mr={flex:`~ items-center gap-1`,"text-sm":``,"text-orange":``,px3:``,py1:``},hr={p2:``,flex:`~ col gap-1`},gr={op50:``,"text-xs":``},_r={op50:``,"text-xs":``},vr={key:0,"i-ph-spinner":``,"animate-spin":``},yr={key:1,op50:``,"text-xs":``},br={op50:``,"text-xs":``},xr={op50:``,"text-xs":``},Sr=e({__name:`ModuleFlowTimeline`,props:{info:{},session:{},transformsLoading:{type:Boolean},selected:{}},emits:[`select`],setup(e,{emit:t}){let r=e,i=t,{info:s}=n(r),{flowShowAllTransforms:c,flowShowAllLoads:u,flowExpandTransforms:f,flowExpandLoads:h,flowExpandResolveId:_,flowExpandChunks:v,flowExpandAssets:x}=ye,S=o(()=>s?.value?.resolve_ids??[]),T=o(()=>{let e=s?.value?.transforms?.filter(e=>e.content_from===e.content_to),t=s?.value?.transforms?.filter(e=>e.content_from!==e.content_to);return c.value&&!e?.length?s?.value?.transforms??[]:c.value&&e?.length?[...s.value.transforms??[],{type:`no_changes_hide`,id:`no_changes_hide`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0}]:e?.length?[{type:`no_changes_collapsed`,id:`no_changes_collapsed`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),E=o(()=>{let e=s?.value?.loads?.filter(e=>!e.content),t=s?.value?.loads?.filter(e=>e.content);return u.value&&!e?.length?s?.value?.loads??[]:u.value&&e?.length?[...s.value.loads??[],{type:`no_changes_hide`,id:`no_changes_hide`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0}]:e?.length?[{type:`no_changes_collapsed`,id:`no_changes_collapsed`,count:e?.length??0,duration:e?.reduce((e,t)=>e+t.duration,0)??0},...t??[]]:t??[]}),D=o(()=>[...S.value,...E.value,...T.value,...s.value.chunks,...s.value.assets]);function k(e){return!r.selected||!e?!1:D.value.indexOf(r.selected)>=D.value.indexOf(e)}function A(e){i(`select`,e)}return(t,n)=>{let r=Pn,i=he,o=qn,D=Xn,j=nr,M=or;return H(),C(`div`,sr,[l(s).importers?.length?(H(),C(`div`,cr,[p(`div`,lr,[g(l(O),null,{popper:a(({hide:t})=>[p(`div`,dr,[(H(!0),C(y,null,F(l(s).importers,n=>(H(),z(i,{id:n,key:n,session:e.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:t},null,8,[`id`,`session`,`onClick`]))),128))])]),default:a(()=>[g(r,{"class-node-outer":`border-dashed`},{inner:a(()=>[p(`div`,ur,[n[7]||=p(`div`,{"i-ph-arrows-merge-duotone":``,"rotate-270":``},null,-1),w(` `+m(l(s).importers?.length)+` importers `,1)])]),_:1})]),_:1})]),n[8]||=p(`div`,{"pl-10":``,border:`r`,"h-4":``,"w-1px":``,"z-flowmap-line":``,class:`border-flow-line border-dashed`},null,-1)])):d(``,!0),p(`div`,fr,[g(r,{lines:{bottom:!0},active:e.selected!=null},{content:a(()=>[p(`div`,pr,[g(i,{id:l(s).id,session:e.session},null,8,[`id`,`session`])])]),_:1},8,[`active`]),l(s).imports?.length?(H(),C(y,{key:0},[n[10]||=p(`div`,{"w-10":``,border:`t base dashed`,mya:``},null,-1),g(l(O),{mya:``},{popper:a(({hide:t})=>[p(`div`,hr,[(H(!0),C(y,null,F(l(s).imports,n=>(H(),z(i,{id:n.module_id,key:n.module_id,kind:n.kind,session:e.session,link:!0,class:`hover:bg-active`,px2:``,py1:``,rounded:``,onClick:t},null,8,[`id`,`kind`,`session`,`onClick`]))),128))])]),default:a(()=>[g(r,{"class-node-outer":`border-dashed`},{inner:a(()=>[p(`div`,mr,[n[9]||=p(`div`,{"i-ph-arrows-split-duotone":``,"rotate-270":``},null,-1),w(` `+m(l(s).imports?.length)+` imports `,1)])]),_:1})]),_:1})],64)):d(``,!0)]),g(D,{expanded:l(_),"onUpdate:expanded":n[0]||=e=>ee(_)?_.value=e:null,expandable:S.value.length>0,"class-root-node":S.value.length===0?`border-dashed`:``,"active-start":k(S.value[0]||E.value[0]),"active-end":k(E.value[0])},{node:a(()=>[n[11]||=p(`div`,{"i-ph-magnifying-glass-duotone":``},null,-1),n[12]||=w(` Resolve Id `,-1),p(`span`,gr,`(`+m(l(s).resolve_ids.length)+`)`,1)]),container:a(()=>[p(`div`,null,[(H(!0),C(y,null,F(S.value,(t,n)=>(H(),z(o,{key:t.id,item:t,session:e.session,active:k(t),class:b(n>0?`pt-2`:``),onSelect:A},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),g(D,{expanded:l(h),"onUpdate:expanded":n[2]||=e=>ee(h)?h.value=e:null,expandable:E.value.length>0,"class-root-node":E.value.length===0?`border-dashed`:``,"active-start":k(E.value[0]),"active-end":k(T.value[0])},{node:a(()=>[n[13]||=p(`div`,{"i-ph-upload-simple-duotone":``},null,-1),n[14]||=w(` Load `,-1),p(`span`,_r,`(`+m(l(s).loads.length)+`)`,1)]),container:a(()=>[p(`div`,null,[(H(!0),C(y,null,F(E.value,(t,r)=>(H(),z(o,{key:t.id,item:t,session:e.session,active:k(t),class:b(r>0&&t.type!==`no_changes_hide`?`pt-2`:``),onSelect:A,onToggleShowAll:n[1]||=e=>u.value=!l(u)},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),g(D,{expanded:l(f),"onUpdate:expanded":n[4]||=e=>ee(f)?f.value=e:null,expandable:T.value.length>0,"class-root-node":T.value.length===0?`border-dashed`:``,"active-start":k(T.value[0]),"active-end":k(l(s).chunks[0]||T.value.at(-1))},{node:a(()=>[n[15]||=p(`div`,{"i-ph-magic-wand-duotone":``},null,-1),n[16]||=w(` Transform `,-1),e.transformsLoading?(H(),C(`span`,vr)):(H(),C(`span`,yr,`(`+m(l(s).transforms.length)+`)`,1))]),container:a(()=>[p(`div`,null,[(H(!0),C(y,null,F(T.value,(t,r)=>(H(),z(o,{key:t.id,item:t,session:e.session,active:k(t),class:b(r>0&&t.type!==`no_changes_hide`?`pt-2`:``),onSelect:A,onToggleShowAll:n[3]||=e=>c.value=!l(c)},null,8,[`item`,`session`,`active`,`class`]))),128))])]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),g(D,{expanded:l(v),"onUpdate:expanded":n[5]||=e=>ee(v)?v.value=e:null,lines:{top:!0},expandable:l(s).chunks.length>0,"class-root-node":l(s).chunks.length===0?`border-dashed`:``,"active-start":k(l(s).chunks[0]),"active-end":k(l(s).chunks.at(-1)),pl6:``,pt4:``},{node:a(()=>[n[17]||=p(`div`,{"i-ph-shapes-duotone":``},null,-1),n[18]||=w(` Chunk `,-1),p(`span`,br,`(`+m(l(s).chunks.length)+`)`,1)]),container:a(()=>[(H(!0),C(y,null,F(l(s).chunks,t=>(H(),z(j,{key:t.chunk_id,item:t,active:k(t),session:e.session,onSelect:A},null,8,[`item`,`active`,`session`]))),128))]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`]),g(D,{expanded:l(x),"onUpdate:expanded":n[6]||=e=>ee(x)?x.value=e:null,lines:{top:!0},expandable:l(s).assets.length>0,"class-root-node":l(s).assets.length===0?`border-dashed`:``,"active-start":k(l(s).assets[0]),"active-end":k(l(s).assets.at(-1)),"show-tail":!1,pl6:``,pt4:``},{node:a(()=>[n[19]||=p(`div`,{"i-ph-package-duotone":``},null,-1),n[20]||=w(` Assets `,-1),p(`span`,xr,`(`+m(l(s).assets.length)+`)`,1)]),container:a(()=>[(H(!0),C(y,null,F(l(s).assets,t=>(H(),z(M,{key:t.filename,item:t,active:k(t),session:e.session,onSelect:A},null,8,[`item`,`active`,`session`]))),128))]),_:1},8,[`expanded`,`expandable`,`class-root-node`,`active-start`,`active-end`])])}}}),Cr=Object.assign(Sr,{__name:`FlowmapModuleFlowTimeline`}),wr={"w-full":``,h:`[calc(100vh-(var(--spacing)*58))]`,"pointer-events-auto":``,sticky:``,"top-4":``},Tr={p4:``},Er=e({__name:`ModuleFlow`,props:{info:{},session:{},transformsLoading:{type:Boolean}},emits:[`select`],setup(e,{emit:t}){let o=e,s=t,{info:c}=n(o),u=_(null);r(u,e=>{s(`select`,!!e)});function f(e){u.value=e}function m(){u.value=null}return(t,n)=>(H(),C(y,null,[u.value?(H(),z(l(tt),{key:0,class:`!h-auto w-full module-flow-splitter right-4 bottom-4 fixed z-10 pointer-events-none`},{default:a(()=>[g(l(nt),{size:`45`,"min-size":`10`,"max-size":`90`,class:`!h-auto pointer-events-none`}),g(l(nt),{size:`55`,"min-size":`10`,"max-size":`90`,class:`!h-auto !of-visible`},{default:a(()=>[i((H(),C(`div`,wr,[n[0]||=p(`div`,{absolute:``,"left-0":``,top:`1/2`,"translate-x":`-1/2`,"translate-y":`-1/2`,bg:`#DFDFDF dark:#313131`,"h-10":``,"w-2":``,"rounded-full":``,"z-10":``,"cursor-col-resize":``},null,-1),g(jn,{selected:u.value,session:e.session,onClose:m},null,8,[`selected`,`session`])])),[[l($e),[m,{ignore:[`.splitpanes__splitter`,`.flowmap-node-inline`]}]]])]),_:1})]),_:1})):d(``,!0),p(`div`,Tr,[g(Cr,{info:l(c),session:e.session,"transforms-loading":e.transformsLoading,selected:u.value,onSelect:f},null,8,[`info`,`session`,`transforms-loading`,`selected`])])],64))}}),Dr=Object.assign(Er,{__name:`FlowmapModuleFlow`}),Or={relative:``,border:`t base`,pb10:``,py1:``,mt4:``},kr={key:0,border:`~ base`,"rounded-lg":``,"shadow-lg":``,px3:``,py2:``,"bg-glass":``,"pointer-events-none":``,"text-sm":``,"max-w-80":``},Ar={"font-semibold":``,"font-mono":``,"text-base":``,mb2:``},jr={key:0,border:`t base`,pt2:``,flex:`~ col gap-1.5`,"min-w-48":``},Mr={flex:`~ justify-between items-center`,py1:``},Nr=[`datetime`],Pr={flex:`~ justify-between items-center`,py1:``},Fr=[`datetime`],Ir={flex:`~ justify-between items-center`,py1:``,border:`t base dashed`,pt2:``},Lr={key:1},Rr=e({__name:`ModuleFlamegraph`,props:{info:{},session:{},flowNodeSelected:{type:Boolean}},setup(e){let t=e,n=e=>Ke(e,void 0,!1),i=o(()=>{let e=t.info.resolve_ids.map((e,t)=>n({id:`resolveId-${t}`,text:e.plugin_name,size:e.duration,meta:e})),r=t.info.loads.map((e,t)=>n({id:`load-${t}`,text:e.plugin_name,size:e.duration,meta:e})),i=t.info.transforms.map((e,t)=>n({id:`transform-${t}`,text:e.plugin_name,size:e.duration,meta:e}));return n({id:`~root`,text:`Module Flamegraph`,children:[n({id:`~resolves`,text:`Resolve Id`,children:e}),n({id:`~loads`,text:`Load`,children:r}),n({id:`~transforms`,text:`Transform`,children:i})]})}),s=u(null),c=u(0),f=u(0),h=v(`el`),y=_(null);function b(){y.value=new Ge(i.value,{animate:!0,palette:{fg:`#888`},getSubtext:e=>{let t=e.size/i.value.size*100;if(t>15&&t!==100)return`${t.toFixed(1)}%`},onHover(e,t){if(!e){s.value=null;return}t&&(c.value=t.clientX,f.value=t.clientY),s.value={plugin_name:e.text,duration:e.size,meta:e.meta}},onLeave(){s.value=null}}),h.value.appendChild(y.value.el)}function x(){y.value?.dispose()}return k(()=>{b()}),te(()=>{x()}),r(i,async()=>{x(),b()},{deep:!0}),r(()=>t.flowNodeSelected,async()=>{await R(),y.value?.resize()}),(e,t)=>{let n=Ve;return H(),C(`div`,Or,[g(n,{"hover-x":c.value,"hover-y":f.value},{default:a(()=>[s.value?(H(),C(`div`,kr,[p(`div`,Ar,m(s.value.plugin_name),1),s.value.meta?(H(),C(`div`,jr,[p(`div`,Mr,[t[0]||=p(`label`,{"text-xs":``,"opacity-70":``},`Start Time`,-1),p(`time`,{datetime:new Date(s.value.meta.timestamp_start).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},m(l(ue)(s.value.meta.timestamp_start)),9,Nr)]),p(`div`,Pr,[t[1]||=p(`label`,{"text-xs":``,"opacity-70":``},`End Time`,-1),p(`time`,{datetime:new Date(s.value.meta.timestamp_end).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},m(l(ue)(s.value.meta.timestamp_end)),9,Fr)]),p(`div`,Ir,[t[2]||=p(`label`,{text:`xs`,op70:``},`Duration`,-1),g(Se,{duration:s.value.duration},null,8,[`duration`])])])):(H(),C(`div`,Lr,[g(Se,{duration:s.value.duration},null,8,[`duration`])]))])):d(``,!0)]),_:1},8,[`hover-x`,`hover-y`]),p(`div`,{ref_key:`el`,ref:h,"min-h-30":``},null,512)])}}}),zr=Object.assign(Rr,{__name:`ChartModuleFlamegraph`}),Br={flex:``,px2:``},Vr=[`d`,`stroke-dasharray`],Hr=20,Ur=e({__name:`ModuleImportRelationships`,props:{module:{},session:{}},setup(e){let t=e,n={width:400,height:30,padding:4,marginX:8,border:1,margin:8,dot:16,dotOffset:80,linkOffset:0},i=v(`container`),a=_([]),c=o(()=>{let e=new Map;for(let n of t.session.modulesList)e.set(n.id,n);return e}),u=o(()=>t.module.importers?.map(e=>c.value.get(e))),f=o(()=>Math.min(Math.max(t.module.importers?.length||0,t.module.imports?.length||0),Hr)),m=o(()=>Math.min(u.value?.length||0,Hr)),h=o(()=>Math.min(t.module.imports?.length||0,Hr)),g=o(()=>n.height*f.value+n.padding*(f.value+1)+n.border*2),x=o(()=>{let e=Math.max(0,h.value-m.value)*(n.height+n.padding)/2;return Math.min(e,g.value/2)}),S=o(()=>{let e=Math.max(0,m.value-h.value)*(n.height+n.padding)/2;return Math.min(e,g.value/2)}),w=o(()=>`${g.value/2-n.dot/2}px ${n.dotOffset}px 0 ${u.value?.length?n.dotOffset:0}px`),T=o(()=>u.value?.length?n.width+n.marginX:n.marginX),E=o(()=>u.value?.length?T.value+n.dotOffset:T.value),D=o(()=>(n.height*f.value+(f.value+1)*n.padding)/2);function O(e){switch(e){case`importer-start`:return T.value;case`importer-end`:return E.value;case`import-start`:return E.value+n.dot;case`import-end`:return u.value?.length?T.value+n.dotOffset*2+n.dot:T.value+n.dotOffset+n.dot}}function A(e,t){switch(e){case`importer-start`:return(n.height+n.padding)*t+(n.height/2+n.padding)+x.value;case`import-end`:return(n.height+n.padding)*t+(n.height/2+n.padding)+S.value;case`importer-end`:case`import-start`:return D.value}}function j(){if(a.value=[],u.value?.length){let e=Array.from({length:m.value},(e,t)=>({id:``,source:{x:O(`importer-start`),y:A(`importer-start`,t)},target:{x:O(`importer-end`),y:A(`importer-end`)}}));a.value.push(...e)}if(t.module?.imports?.length){let e=Array.from({length:h.value},(e,t)=>({id:``,source:{x:O(`import-start`),y:A(`import-start`)},target:{x:O(`import-end`),y:A(`import-end`,t)}}));a.value.push(...e)}}return k(()=>{r(()=>[t.module],j,{immediate:!0})}),(t,r)=>{let o=he;return H(),C(`div`,{ref_key:`container`,ref:i,"w-full":``,relative:``,"select-none":``,mt4:``},[p(`div`,Br,[u.value?.length?(H(),C(`div`,{key:0,py1:``,style:s({width:`${n.width}px`,marginTop:`${x.value}px`})},[(H(!0),C(y,null,F(u.value,(t,r)=>(H(),z(o,{key:t.id,id:t.id,hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"ws-nowrap":``,"z-graph-node":``,border:`~ base rounded`,link:!0,session:e.session,minimal:!0,style:s({width:`${n.width}px`,height:`${n.height}px`,overflow:`hidden`,marginBottom:`${r===u.value.length-1?0:n.padding}px`})},null,8,[`id`,`session`,`style`]))),128))],4)):d(``,!0),p(`div`,{"bg-base":``,"rounded-full":``,"border-3":``,"font-mono":``,"border-active":``,"flex-shrink-0":``,style:s({margin:w.value,width:`${n.dot}px`,height:`${n.dot}px`})},null,4),e.module.imports?.length?(H(),C(`div`,{key:1,py1:``,style:s({width:`${n.width}px`,marginTop:`${S.value}px`})},[(H(!0),C(y,null,F(e.module.imports,(t,r)=>(H(),z(o,{key:t.module_id,id:t.module_id,hover:`bg-active`,block:``,px2:``,p1:``,"bg-base":``,"ws-nowrap":``,"z-graph-node":``,border:`~ base rounded`,link:!0,session:e.session,minimal:!0,style:s({width:`${n.width}px`,height:`${n.height}px`,overflow:`hidden`,marginBottom:`${r===e.module.imports.length-1?0:n.padding}px`})},null,8,[`id`,`session`,`style`]))),128))],4)):d(``,!0)]),(H(),C(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,"w-full":``,style:s({height:`${g.value}px`})},[p(`g`,null,[(H(!0),C(y,null,F(a.value,e=>(H(),C(`path`,{key:e.id,d:l(Ie)(e),class:b(l(Fe)(e)),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,Vr))),128))])],4))],512)}}}),Wr=Object.assign(Ur,{__name:`DataModuleImportRelationships`}),Gr={key:0,relative:``,"h-full":``,"w-full":``},Kr={"bg-glass":``,absolute:``,"left-2":``,"top-2":``,"z-panel-content":``,p2:``,border:`~ base rounded-lg`,flex:`~ col gap-2`},qr={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},Jr={flex:`~ gap-2`},Yr={"of-auto":``,"h-full":``,"pt-30":``},Xr=e({__name:`ModuleDetailsLoader`,props:{session:{},module:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ae(),a=u([]),o=u(!1),s=u(!1);se(async()=>{let e={session:n.session.id,module:n.module};R(async()=>{a.value=[],o.value=!0,a.value=await i.value.call(`vite:rolldown:get-module-transforms`,e),o.value=!1})});let c=ke(async()=>{let e={session:n.session.id,module:n.module};return{transforms:a.value,...await i.value.call(`vite:rolldown:get-module-info`,e)}});function f(e){s.value=e}return(t,n)=>{let i=he,a=Ce,u=Dr,m=zr,h=Wr,_=re;return l(c)?(H(),C(`div`,Gr,[g(Le,{absolute:``,"right-2":``,"top-1.5":``,"bg-glass":``,"z-panel-content":``,onClick:n[0]||=e=>r(`close`)}),p(`div`,Kr,[g(i,{id:e.module,px2:``,pt1:``,session:e.session},null,8,[`id`,`session`]),p(`div`,qr,[l(c)?(H(),z(a,{key:0,metrics:l(c).build_metrics},null,8,[`metrics`])):d(``,!0)]),p(`div`,Jr,[p(`button`,{class:b(l(W).moduleDetailsViewType===`flow`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[1]||=e=>l(W).moduleDetailsViewType=`flow`},[...n[4]||=[p(`div`,{"i-ph-git-branch-duotone":``,"rotate-180":``},null,-1),w(` Build Flow `,-1)]],2),p(`button`,{class:b(l(W).moduleDetailsViewType===`charts`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[2]||=e=>l(W).moduleDetailsViewType=`charts`},[...n[5]||=[p(`div`,{"i-ph-chart-donut-duotone":``},null,-1),w(` Charts `,-1)]],2),p(`button`,{class:b(l(W).moduleDetailsViewType===`imports`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[3]||=e=>l(W).moduleDetailsViewType=`imports`},[...n[6]||=[p(`div`,{"i-ph-graph-duotone":``},null,-1),w(` Imports `,-1)]],2)])]),p(`div`,Yr,[l(W).moduleDetailsViewType===`flow`?(H(),z(u,{key:0,info:l(c),session:e.session,"transforms-loading":o.value,onSelect:f},null,8,[`info`,`session`,`transforms-loading`])):d(``,!0),l(W).moduleDetailsViewType===`charts`?(H(),z(m,{key:1,info:l(c),session:e.session,"flow-node-selected":s.value},null,8,[`info`,`session`,`flow-node-selected`])):d(``,!0),l(W).moduleDetailsViewType===`imports`?(H(),z(h,{key:2,module:l(c),session:e.session},null,8,[`module`,`session`])):d(``,!0)])])):(H(),z(_,{key:1}))}}}),Zr=Object.assign(Xr,{__name:`DataModuleDetailsLoader`}),Qr={key:0,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"bg-glass":``,"z-panel-content":``},$r=e({__name:`AssetDetailsLoader`,props:{asset:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ae(),{state:o}=we(async()=>{let e=await i.value.call(`vite:rolldown:get-asset-details`,{session:n.session.id,id:n.asset});return`chunk`in e?{asset:{...e?.asset,type:`asset`},chunks:[{...e?.chunk,type:`chunk`}],importers:e?.importers,imports:e?.imports}:{asset:{...e?.asset,type:`asset`},chunks:[],importers:[],imports:[]}},null);return(t,n)=>{let i=Gt;return l(o)?.asset?(H(),C(`div`,Qr,[g(i,{asset:l(o).asset,session:e.session,chunks:l(o)?.chunks,importers:l(o)?.importers,imports:l(o)?.imports},{default:a(()=>[g(Le,{onClick:n[0]||=e=>r(`close`)})]),_:1},8,[`asset`,`session`,`chunks`,`importers`,`imports`])])):d(``,!0)}}}),ei=Object.assign($r,{__name:`DataAssetDetailsLoader`}),ti={op50:``,"text-xs":``,flex:``,"justify-center":``,"items-center":``},ni=e({__name:`NodePluginInfo`,props:{modules:{},calls:{},duration:{}},setup(e){return(t,n)=>(H(),C(`span`,ti,[g(Pe,{number:e.modules,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${e.modules}`},null,8,[`number`,`title`]),n[1]||=p(`span`,{op40:``},`|`,-1),g(Pe,{number:e.calls,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${e.calls}`},null,8,[`number`,`title`]),n[2]||=p(`span`,{op40:``},`|`,-1),g(Se,{duration:e.duration,flex:`~ gap-1 items-center`,px1:``,title:`Total build cost: ${l(xe)(e.duration,!0)}`},{default:a(()=>[...n[0]||=[p(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`])]))}}),ri=Object.assign(ni,{__name:`FlowmapNodePluginInfo`}),ii={flex:`~ col w-full`},ai={"select-none":``,"h-full":``,"of-auto":``,"ws-nowrap":``,"w-auto":``,"of-visible":``,p4:``,flex:`~ col`},oi={flex:`~`},si={flex:`~ items-center justify-center`,relative:``,"w-60":``,h14:``},ci={op50:``,"text-xs":``,flex:`~ items-center justify-center gap-1`,h6:``},li=[`datetime`],ui={flex:`~ items-center justify-center`,relative:``,"w-60":``,h14:``},di={op50:``,"text-xs":``,flex:`~ items-center justify-center gap-1`,h6:``},fi=[`datetime`],pi=e({__name:`PluginFlowTimeline`,props:{session:{},buildMetrics:{}},setup(e){let t=e;function n(e){let t={duration:0,calls:e.length,modules:0},n=new Set;return e.forEach(e=>{n.has(e.module)||(n.add(e.module),t.modules++),t.duration+=e.duration}),t}let r=o(()=>n(t.buildMetrics.resolveIdMetrics)),i=o(()=>n(t.buildMetrics.loadMetrics)),s=o(()=>n(t.buildMetrics.transformMetrics)),c=o(()=>{let e=t.buildMetrics.calls;if(e?.length)return e[0].timestamp_start}),u=o(()=>{let e=t.buildMetrics.calls;if(e?.length)return e[e.length-1].timestamp_end});return(t,n)=>{let o=Be,f=Pn,h=ri;return H(),C(`div`,ii,[M(t.$slots,`header`),p(`div`,ai,[p(`div`,oi,[g(f,{active:!1,"class-node-inner":`w60`},{content:a(()=>[p(`div`,{p2:``,"w-full":``,"text-center":``,onClick:n[0]||=e=>l(W).pluginDetailSelectedHook=``},[g(o,{name:e.buildMetrics.plugin_name,class:`font-mono text-sm ws-nowrap text-ellipsis line-clamp-1`},null,8,[`name`])])]),_:1})]),p(`div`,si,[n[5]||=p(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-0":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),n[6]||=p(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-10":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),p(`span`,ci,[n[4]||=p(`i`,{"i-ph-airplane-takeoff-thin":``,"text-4":``,"inline-flex":``},null,-1),c.value?(H(),C(`time`,{key:0,datetime:new Date(c.value).toISOString()},m(new Date(c.value).toLocaleString()),9,li)):d(``,!0)])]),g(f,{"class-node-inner":`w60`,"class-node-outer":`${!r.value.modules&&!r.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,pb4:``,w60:``,lines:{bottom:!0},active:l(W).pluginDetailSelectedHook===`resolve`},{content:a(()=>[p(`div`,{flex:`~ col gap1`,"w-full":``,onClick:n[1]||=e=>l(W).pluginDetailSelectedHook=`resolve`},[n[7]||=p(`span`,{flex:`~ items-center justify-center gap-1`},[p(`i`,{"i-ph-magnifying-glass-duotone":``}),w(` Resolve Id `)],-1),p(`div`,null,[g(h,{modules:r.value.modules,calls:r.value.calls,duration:r.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`class-node-outer`,`active`]),g(f,{active:l(W).pluginDetailSelectedHook===`load`,"class-node-inner":`w60`,"class-node-outer":`${!i.value.modules&&!i.value.calls?`b-dashed!`:``}`,"class-line-bottom":`left-50%! translate-x--1/2`,pb4:``,w60:``,lines:{bottom:!0}},{content:a(()=>[p(`div`,{flex:`~ col gap1`,"w-full":``,onClick:n[2]||=e=>l(W).pluginDetailSelectedHook=`load`},[n[8]||=p(`span`,{flex:`~ items-center justify-center gap-1`},[p(`i`,{"i-ph-upload-simple-duotone":``}),w(` Load `)],-1),p(`div`,null,[g(h,{modules:i.value.modules,calls:i.value.calls,duration:i.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),g(f,{active:l(W).pluginDetailSelectedHook===`transform`,"class-node-inner":`w60`,"class-node-outer":`${!s.value.modules&&!s.value.calls?`b-dashed!`:``}`},{content:a(()=>[p(`div`,{flex:`~ col gap1`,"w-full":``,onClick:n[3]||=e=>l(W).pluginDetailSelectedHook=`transform`},[n[9]||=p(`span`,{flex:`~ items-center justify-center gap-1`},[p(`i`,{"i-ph-magic-wand-duotone":``}),w(` Transform `)],-1),p(`div`,null,[g(h,{modules:s.value.modules,calls:s.value.calls,duration:s.value.duration},null,8,[`modules`,`calls`,`duration`])])])]),_:1},8,[`active`,`class-node-outer`]),p(`div`,ui,[n[11]||=p(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-0":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),n[12]||=p(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-10":``,border:`r`,"z-flowmap-line":``,h4:``},null,-1),n[13]||=p(`div`,{class:`border-flow-line left-50% translate-x--1/2`,absolute:``,"top-14":``,"w-2":``,"h-2":``,border:`4`,"rounded-full":``},null,-1),p(`span`,di,[n[10]||=p(`i`,{"i-ph-airplane-landing-thin":``,"text-4":``,"inline-flex":``},null,-1),u.value?(H(),C(`time`,{key:0,datetime:new Date(u.value).toISOString()},m(new Date(u.value).toLocaleString()),9,fi)):d(``,!0)])])])])}}}),mi=Object.assign(pi,{__name:`FlowmapPluginFlowTimeline`}),hi={role:`table`,"min-w-max":``},gi={role:`row`,class:`sticky top-0 z10 border-b border-base`,flex:`~ row`},_i={key:0,role:`columnheader`,"bg-base":``,"flex-none":``,w32:``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},vi={key:1,role:`columnheader`,"bg-base":``,"flex-1":``,"min-w100":``,"ws-nowrap":``,p1:``,"text-left":``,"font-600":``},yi={flex:`~ row gap1 items-center`,"w-full":``},bi={"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`},xi={class:`p2`,flex:`~ col gap2`},Si=[`title`],Ci=[`checked`,`onChange`],wi={"text-sm":``},Ti={key:2,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``,"w-27":``},Ei={"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`},Di={key:3,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"min-w52":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},Oi={key:4,role:`columnheader`,"rounded-tr-2":``,"bg-base":``,"flex-none":``,"min-w52":``,"ws-nowrap":``,p1:``,"text-center":``,"font-600":``},ki={key:0,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,w32:``,"ws-nowrap":``,op80:``},Ai={key:1,role:`cell`,"flex-1":``,"min-w100":``,"text-left":``,"text-ellipsis":``,"line-clamp-2":``},ji={key:2,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"text-sm":``,"w-27":``},Mi={key:3,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"font-mono":``,"text-sm":``,"min-w52":``,op80:``},Ni={key:4,role:`cell`,flex:`~ items-center justify-center`,"flex-none":``,"text-center":``,"font-mono":``,"text-sm":``,"min-w52":``,op80:``},Pi={key:1},Fi={p4:``},Ii={"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},Li={key:0},Ri={key:1},zi=e({__name:`PluginDetailsTable`,props:{session:{},buildMetrics:{},selectedFields:{}},setup(e){let t=e,n={resolve:`Resolve Id`,load:`Load`,transform:`Transform`},r=o(()=>t.session.modulesList.map(e=>({mod:e,path:ge(e.id,t.session.meta.cwd),type:fe(e.id)}))),i=o(()=>U.filter(e=>r.value.some(t=>e.match.test(t.mod.id)))),s=u(W.value.pluginDetailsModuleTypes??i.value.map(e=>e.name)),{state:c,next:f}=K([``,`desc`,`asc`],{initialValue:W.value.pluginDetailsDurationSortType}),h=o(()=>(c.value?[...t.buildMetrics.calls].sort((e,t)=>c.value===`asc`?e.duration-t.duration:t.duration-e.duration):t.buildMetrics.calls).filter(e=>{if(!e.module)return!1;let t=fe(e.module);return s.value.includes(t.name)}).filter(W.value.pluginDetailSelectedHook?e=>e.type===W.value.pluginDetailSelectedHook:Boolean).filter(e=>W.value.pluginDetailsShowType===`all`||![`load`,`transform`].includes(W.value.pluginDetailSelectedHook)?!0:W.value.pluginDetailsShowType===`changed`?!e.unchanged:e.unchanged));function _(e){s.value?.includes(e.name)?s.value=s.value?.filter(t=>t!==e.name):s.value?.push(e.name),W.value.pluginDetailsModuleTypes=s.value}function v(){f(),W.value.pluginDetailsDurationSortType=c.value}return(t,r)=>{let o=he;return H(),C(`div`,hi,[p(`div`,gi,[e.selectedFields.includes(`hookName`)?(H(),C(`div`,_i,` Hook name `)):d(``,!0),e.selectedFields.includes(`module`)?(H(),C(`div`,vi,[p(`button`,yi,[r[0]||=w(` Module `,-1),g(l(O),null,{popper:a(()=>[p(`div`,xi,[(H(!0),C(y,null,F(i.value,e=>(H(),C(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:`cursor-pointer module-type-filter`},[p(`input`,{type:`checkbox`,mr1:``,checked:s.value?.includes(e.name),onChange:t=>_(e)},null,40,Ci),p(`div`,{class:b(e.icon),"icon-catppuccin":``},null,2),p(`div`,wi,m(e.description||e.name),1)],8,Si))),128))])]),default:a(()=>[p(`span`,bi,[p(`i`,{"text-xs":``,class:b([`i-ph-funnel-duotone`,s.value.length===i.value.length?`op50`:`text-primary op100`])},null,2)])]),_:1})])])):d(``,!0),e.selectedFields.includes(`duration`)?(H(),C(`div`,Ti,[p(`button`,{flex:`~ row gap1 items-center justify-center`,"w-full":``,onClick:v},[r[1]||=w(` Duration `,-1),p(`span`,Ei,[p(`i`,{"text-xs":``,class:b([l(c)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,l(c)?`op100 text-primary`:`op50`])},null,2)])])])):d(``,!0),e.selectedFields.includes(`startTime`)?(H(),C(`div`,Di,` Start Time `)):d(``,!0),e.selectedFields.includes(`endTime`)?(H(),C(`div`,Oi,` End Time `)):d(``,!0)]),h.value.length&&e.selectedFields.length?(H(),z(ze,{key:0,role:`rowgroup`,items:h.value,"key-prop":`id`},{default:a(({item:t,index:r})=>[p(`div`,{role:`row`,flex:`~ row`,class:b([`border-base border-b border-dashed`,[r===h.value.length-1?`border-b-0`:``]])},[e.selectedFields.includes(`hookName`)?(H(),C(`div`,ki,[g(me,{text:n[t.type]},null,8,[`text`])])):d(``,!0),e.selectedFields.includes(`module`)?(H(),C(`div`,Ai,[g(o,{id:t.module,"w-full":``,"border-none":``,"ws-nowrap":``,session:e.session,link:`/session/${e.session.id}/graph?module=${t.module}`,hover:`bg-active`,border:`~ base rounded`,block:``,px2:``,py1:``},null,8,[`id`,`session`,`link`])])):d(``,!0),e.selectedFields.includes(`duration`)?(H(),C(`div`,ji,[g(Se,{duration:t.duration},null,8,[`duration`])])):d(``,!0),e.selectedFields.includes(`startTime`)?(H(),C(`div`,Mi,m(l(ue)(t.timestamp_start)),1)):d(``,!0),e.selectedFields.includes(`endTime`)?(H(),C(`div`,Ni,m(l(ue)(t.timestamp_end)),1)):d(``,!0)],2)]),_:1},8,[`items`])):(H(),C(`div`,Pi,[p(`div`,Fi,[p(`div`,Ii,[e.selectedFields.length?(H(),C(`p`,Ri,` No data `)):(H(),C(`p`,Li,` No columns selected `))])])]))])}}}),Bi=Object.assign(zi,{__name:`DataPluginDetailsTable`}),Vi={p2:``,"h-full":``,"w-full":``},Hi={flex:`~`,border:`~ base`,"rounded-2":``,"h-full":``,relative:``,"of-hidden":``},Ui={key:0,"of-hidden":``,border:`r base`},Wi={px2:``,h10:``,border:`b base`,"bg-base":``,"rounded-t-2":``,flex:`~ items-center justify-end`},Gi={"flex-1":``,"of-y-auto":``,"h-full":``,flex:`~ col`},Ki={flex:`~ items-center justify-between`,border:`b base`,px2:``,h10:``,"bg-base":``,"rounded-t-2":``,"of-x-auto":``,"ws-nowrap":``},qi={flex:`~ items-center`,"h-full":``},Ji={key:0,flex:`~ items-center justify-center gap1`,"h-full":``,"text-xs":``,py1:``},Yi={class:`op50`,flex:`~ items-center gap-1`},Xi=[`title`],Zi={class:`text-xs op50`},Qi={"flex-1":``,"of-y-auto":``,"overscroll-contain":``},$i=e({__name:`PluginFlow`,props:{session:{},buildMetrics:{}},setup(e){let t=e,[n,i]=G(!0),s=[{match:/hookName/,name:`hookName`,description:`Hook name`,icon:`i-ph-function-duotone`},{match:/module/,name:`module`,description:`Module`,icon:`i-ph-package-duotone`},{match:/duration/,name:`duration`,description:`Duration`,icon:`i-ph-clock-countdown-duotone`},{match:/startTime/,name:`startTime`,description:`Start Time`,icon:`i-ph-clock-duotone`},{match:/endTime/,name:`endTime`,description:`End Time`,icon:`i-ph-clock-duotone`}],c=u({selected:W.value.pluginDetailsTableFields,search:!1}),f=o(()=>W.value.pluginDetailsTableFields?W.value.pluginDetailsTableFields:s.map(e=>e.name)),{state:h,next:_}=K([`changed`,`unchanged`,`all`],{initialValue:W.value.pluginDetailsShowType}),v=o(()=>h.value===`all`?`Show Changed`:h.value===`changed`?`Show Unchanged`:`Show All`),y=o(()=>!(![`load`,`transform`].includes(W.value.pluginDetailSelectedHook)||!t.buildMetrics.calls?.filter(e=>e.type===W.value.pluginDetailSelectedHook).filter(e=>e.unchanged).length)),b=o(()=>{let e=t.buildMetrics.calls?.filter(e=>e.type===W.value.pluginDetailSelectedHook).filter(e=>e.unchanged),n=e.reduce((e,t)=>e+t.duration,0);return{count:e.length,duration:n}});r(()=>c.value.selected,e=>{W.value.pluginDetailsTableFields=e});function x(){_(),W.value.pluginDetailsShowType=h.value}return(t,r)=>{let o=mi,u=Re,h=Bi;return H(),C(`div`,Vi,[p(`div`,Hi,[l(n)?(H(),C(`div`,Ui,[g(o,{session:e.session,"build-metrics":e.buildMetrics},{header:a(()=>[p(`div`,Wi,[p(`button`,{w8:``,h8:``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:r[0]||=e=>l(i)(!1)},[...r[3]||=[p(`i`,{"i-ph-sidebar-simple-duotone":``,"inline-flex":``,op50:``},null,-1)]])])]),_:1},8,[`session`,`build-metrics`])])):d(``,!0),p(`div`,Gi,[p(`div`,Ki,[p(`div`,qi,[l(n)?d(``,!0):(H(),C(`button`,{key:0,w8:``,h8:``,"rounded-full":``,"cursor-pointer":``,mr1:``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:r[1]||=e=>l(i)(!0)},[...r[4]||=[p(`i`,{"i-ph-sidebar-duotone":``,"inline-flex":``,op50:``},null,-1)]])),g(u,{modelValue:c.value,"onUpdate:modelValue":r[2]||=e=>c.value=e,"h-full":``,"border-none":``,"selected-container-class":`px0! py1 border-none bg-none flex-nowrap! h-full`,rules:s,class:`[&_[icon-catppuccin]]:filter-none!`},null,8,[`modelValue`])]),y.value?(H(),C(`div`,Ji,[p(`p`,Yi,[g(Pe,{number:b.value.count},null,8,[`number`]),r[5]||=w(` module unchanged, but cost `,-1),g(Se,{duration:b.value.duration},null,8,[`duration`])]),p(`button`,{"rounded-md":``,px2:``,py1:``,"select-none":``,"h-full":``,border:`~ base rounded-lg`,hover:`bg-active`,title:v.value,onClick:x},[p(`div`,Zi,m(v.value),1)],8,Xi)])):d(``,!0)]),p(`div`,Qi,[g(h,{session:e.session,"build-metrics":e.buildMetrics,"selected-fields":f.value},null,8,[`session`,`build-metrics`,`selected-fields`])])])])])}}}),ea=Object.assign($i,{__name:`FlowmapPluginFlow`}),ta={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},na={flex:`~ col gap-4`},ra={key:0,grid:`~ cols-[300px_1fr] gap-1`},ia=[`onClick`],aa={key:0,hover:`bg-active`,class:`flex gap2 items-center pl2`},oa={"font-mono":``,"text-sm":``},sa=[`onClick`],ca=[`title`],la=e({__name:`Sunburst`,props:{graph:{},selected:{},session:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,a=v(`el`);return se(()=>a.value?.append(n.graph.el)),(t,n)=>{let o=Ue,c=he,u=T(`tooltip`);return H(),C(`div`,ta,[p(`div`,{ref_key:`el`,ref:a,"w-500px":``},null,512),p(`div`,na,[g(o,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),e.selected?(H(),C(`div`,ra,[(H(!0),C(y,null,F(e.selected.children,t=>(H(),C(y,{key:t.id},[p(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>r(`select`,t)},[t.meta?.type===`hook`?(H(),C(`div`,aa,[n[1]||=p(`i`,{class:`i-ph-function-duotone inline-flex`},null,-1),p(`span`,oa,m(t.text),1)])):(H(),z(c,{key:1,id:t.text,"w-full":``,"border-none":``,"ws-nowrap":``,session:e.session,hover:`bg-active`,border:`~ base rounded`,block:``,px2:``,py1:``},null,8,[`id`,`session`]))],8,ia),p(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>r(`select`,t)},[p(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:s({background:l(We)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),g(Se,{duration:t.size,"text-xs":``},null,8,[`duration`]),t.children.length>0&&t.meta?.type!==`hook`?i((H(),C(`div`,{key:0,title:`${t.children.length} dependencies`,"text-xs":``,"op-fade":``},[w(` (`+m(t.children.length)+`) `,1)],8,ca)),[[u,`${t.children.length} dependencies`]]):d(``,!0)],8,sa)],64))),128))])):d(``,!0)])])}}}),ua=Object.assign(la,{__name:`PluginsSunburst`}),Q={key:1,relative:``,"h-full":``,"w-full":``},da={"bg-glass":``,absolute:``,"left-2":``,"top-2":``,"z-panel-content":``,p2:``,border:`~ base rounded-lg`,flex:`~ col gap-2`},fa={"font-mono":``,px1:``},pa={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},ma={flex:`~ gap-2`},ha={"of-auto":``,"h-full":``,"pt-30":``},ga={key:2,flex:`~ items-center justify-center`,"w-full":``,"h-full":``},_a={key:0,border:`~ base`,"rounded-lg":``,"shadow-lg":``,px3:``,py2:``,"bg-glass":``,"pointer-events-none":``,"text-sm":``,"max-w-80":``},va={key:0,flex:`~ items-center gap2`},ya={key:0,flex:`~`,"font-semibold":``,"font-mono":``,"text-base":``,mb2:``},ba={key:1,border:`t base`,pt2:``,flex:`~ col gap-1.5`,"min-w-48":``},xa={flex:`~ justify-between items-center`,py1:``},Sa=[`datetime`],Ca={flex:`~ justify-between items-center`,py1:``},wa=[`datetime`],Ta={flex:`~ justify-between items-center`,py1:``,border:`t base dashed`,pt2:``},Ea={key:2},Da=e({__name:`PluginDetailsLoader`,props:{plugin:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,i=t,s=P(),c=ae(),{state:u,isLoading:f}=we(async()=>await c.value.call(`vite:rolldown:get-plugin-details`,{session:n.session.id,id:s.query.plugin}),null),_=o(()=>{let e=new Set;return u.value?.calls?.filter(t=>e.has(t.module)?!1:(e.add(t.module),!0))??[]}),v=o(()=>u.value?.loadMetrics.reduce((e,t)=>e+t.duration,0)),x=o(()=>u.value?.transformMetrics.reduce((e,t)=>e+t.duration,0)),S=o(()=>u.value?.resolveIdMetrics.reduce((e,t)=>e+t.duration,0)),T=o(()=>u.value?.calls?.reduce((e,t)=>e+t.duration,0)),E=o(()=>n.session.modulesList.map(e=>({mod:e,path:ge(e.id,n.session.meta.cwd),type:fe(e.id)}))),D=o(()=>U.filter(e=>E.value.some(t=>e.match.test(t.mod.id)))),O=o(()=>{let e=new Map;if(!u.value)return{root:t({id:`~root`,text:`Project`,children:[]}),map:new Map,maxDepth:3};function t(t,n){e.set(t.id,t);let r=Ke(t,n,(e,t)=>(t?.meta?.duration??0)-(e?.meta?.duration??0));return r.children&&r.children.forEach(e=>{e.parent=r}),r}function n(e,n){let r=n.filter(e=>!D.value.some(t=>fe(e.module).name===t.name));return[...D.value.map((r,i)=>{let a=n.filter(e=>fe(e.module).name===r.name);return t({id:`${e}-${r.name}-${i}`,text:r.description,children:a.map((n,r)=>t({id:`${e}-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:r.description,id:`${e}-${r.name}-${i}`,duration:a.reduce((e,t)=>e+t.duration,0)}})}),t({id:`${e}-other`,text:`Other`,children:r.map((n,r)=>t({id:`${e}-other-${r}`,text:n.module,size:n.duration,meta:n})),meta:{type:`module`,title:`Other`,id:`${e}-other`,duration:r.reduce((e,t)=>e+t.duration,0)}})]}let r=n(`resolveId`,u.value.resolveIdMetrics),i=n(`loads`,u.value.loadMetrics),a=n(`transforms`,u.value.transformMetrics);function o(e,n,r){return t({id:e,text:n,children:r.sort((e,t)=>t.size-e.size),meta:{id:e,type:`hook`,title:n,duration:{"~loads":v.value,"~resolves":S.value,"~transforms":x.value}[e]}})}return{root:t({id:`~root`,text:`Project`,children:[o(`~resolves`,`Resolve Id`,r),o(`~loads`,`Load`,i),o(`~transforms`,`Transform`,a)]}),map:e,maxDepth:3}}),k=h(Ae()),{tree:A,chartOptions:j,graph:M,nodeHover:N,nodeSelected:ee,selectedNode:te,selectNode:F,buildGraph:ne}=qe({data:[],tree:O,nameKey:`id`,sizeKey:`duration`,rootText:`Project`,graphOptions:{onClick(e){e&&(N.value=e),te.value=e.meta},onHover(e){e&&(N.value=e),e===null&&(N.value=void 0)},onLeave(){N.value=void 0},onSelect(e){ee.value=e||A.value.root,te.value=e?.meta},getSubtext(e){return xe(e.size,!0)}},onUpdate(){M.value=new He(A.value.root,j.value)}});return r(()=>W.value.pluginDetailsViewType,()=>{ne()}),(t,n)=>{let r=re,o=Be,s=ea,c=ua,h=he,E=Ve;return H(),C(y,null,[l(f)?(H(),z(r,{key:0})):l(u)?.calls?.length?(H(),C(`div`,Q,[g(Le,{absolute:``,"right-2":``,"top-1.5":``,onClick:n[0]||=e=>i(`close`)}),p(`div`,da,[p(`div`,fa,[g(o,{name:l(u)?.plugin_name},null,8,[`name`])]),p(`div`,pa,[g(Se,{duration:S.value,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${l(xe)(S.value,!0)}`},{default:a(()=>[...n[3]||=[p(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),g(Se,{duration:v.value,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${l(xe)(v.value,!0)}`},{default:a(()=>[...n[4]||=[p(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),g(Se,{duration:x.value,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${l(xe)(x.value,!0)}`},{default:a(()=>[...n[5]||=[p(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),n[7]||=p(`span`,{op40:``},`|`,-1),g(Se,{duration:T.value,flex:`~ gap-1 items-center`,title:`Total build cost: ${l(xe)(T.value,!0)}`},{default:a(()=>[...n[6]||=[p(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),n[8]||=p(`span`,{op40:``},`|`,-1),g(Pe,{number:_.value.length,icon:`i-catppuccin-java-class-abstract`,color:`transparent color-scale-neutral`,title:`Module processed: ${_.value.length}`},null,8,[`number`,`title`]),n[9]||=p(`span`,{op40:``},`|`,-1),g(Pe,{number:l(u)?.calls?.length??0,icon:`i-ph-arrow-counter-clockwise`,color:`transparent color-scale-neutral`,title:`Total calls: ${l(u)?.calls?.length??0}`},null,8,[`number`,`title`])]),p(`div`,ma,[p(`button`,{class:b(l(W).pluginDetailsViewType===`flow`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[1]||=e=>l(W).pluginDetailsViewType=`flow`},[...n[10]||=[p(`div`,{"i-ph-git-branch-duotone":``,"rotate-180":``},null,-1),w(` Build Flow `,-1)]],2),p(`button`,{class:b(l(W).pluginDetailsViewType===`sunburst`?`text-primary`:``),flex:`~ gap-2 items-center justify-center`,px2:``,py1:``,"w-40":``,border:`~ base rounded-lg`,hover:`bg-active`,onClick:n[2]||=e=>l(W).pluginDetailsViewType=`sunburst`},[...n[11]||=[p(`div`,{"i-ph-chart-sunburst-duotone":``},null,-1),w(` Sunburst `,-1)]],2)])]),p(`div`,ha,[l(W).pluginDetailsViewType===`flow`?(H(),z(s,{key:0,session:e.session,"build-metrics":l(u)},null,8,[`session`,`build-metrics`])):d(``,!0),l(W).pluginDetailsViewType===`sunburst`&&l(M)?(H(),z(c,{key:1,graph:l(M),session:e.session,selected:l(ee),onSelect:l(F)},null,8,[`graph`,`session`,`selected`,`onSelect`])):d(``,!0)])])):(H(),C(`div`,ga,[...n[12]||=[p(`span`,{italic:``,op50:``},` No data `,-1)]])),g(E,{"hover-x":k.x,"hover-y":k.y},{default:a(()=>[l(N)?(H(),C(`div`,_a,[l(N).meta?.title?(H(),C(`div`,va,[w(m(l(N).meta.title)+` `,1),g(Se,{duration:l(N).meta.duration},null,8,[`duration`])])):(H(),C(y,{key:1},[l(N).meta?.module?(H(),C(`div`,ya,[g(h,{id:l(N).meta.module,session:e.session,link:!1},null,8,[`id`,`session`])])):d(``,!0),l(N).meta?.module?(H(),C(`div`,ba,[p(`div`,xa,[n[13]||=p(`label`,{"text-xs":``,"opacity-70":``},`Start Time`,-1),p(`time`,{datetime:new Date(l(N).meta.timestamp_start).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},m(l(ue)(l(N).meta.timestamp_start)),9,Sa)]),p(`div`,Ca,[n[14]||=p(`label`,{"text-xs":``,"opacity-70":``},`End Time`,-1),p(`time`,{datetime:new Date(l(N).meta.timestamp_end).toISOString(),"font-mono":``,text:`xs`,bg:`base/10`,"px1.5":``,"py0.5":``,rounded:``},m(l(ue)(l(N).meta.timestamp_end)),9,wa)]),p(`div`,Ta,[n[15]||=p(`label`,{text:`xs`,op70:``},`Duration`,-1),g(Se,{duration:l(N).meta.duration},null,8,[`duration`])])])):(H(),C(`div`,Ea,[g(Se,{duration:l(N).meta?.duration},null,8,[`duration`])]))],64))])):d(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],64)}}}),Oa=Object.assign(Da,{__name:`DataPluginDetailsLoader`}),ka={key:1,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"z-panel-content":``},Aa=e({__name:`ChunkDetailsLoader`,props:{chunk:{},session:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=ae(),{state:o,isLoading:s}=we(async()=>await i.value.call(`vite:rolldown:get-chunk-info`,{session:n.session.id,id:n.chunk}),null);return(t,n)=>{let i=re,c=Ne;return H(),C(y,null,[l(s)?(H(),z(i,{key:0})):d(``,!0),l(o)?(H(),C(`div`,ka,[g(c,{session:e.session,chunk:l(o)},{default:a(()=>[g(Le,{onClick:n[0]||=e=>r(`close`)})]),_:1},8,[`session`,`chunk`])])):d(``,!0)],64)}}}),ja=Object.assign(Aa,{__name:`DataChunkDetailsLoader`}),Ma={key:1,p4:``,relative:``,"h-full":``,"w-full":``,"of-auto":``,"z-panel-content":``},Na={flex:`~ col gap-3`},Pa=[`title`],Fa={flex:`~ items-center gap-1`},Ia={open:`true`},La={op50:``},Ra={"inline-flex":``},za={open:`true`},Ba={op50:``},Va=e({__name:`PackageDetailsLoader`,props:{session:{},package:{}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=o(()=>{let[,e,t]=n.package.match(/^(@?[^@]+)@(.+)$/);return{name:e,version:t}}),s=ae(),{state:c,isLoading:u}=we(async()=>await s.value.call(`vite:rolldown:get-package-details`,{session:n.session.id,id:n.package}),null),f=o(()=>c.value?.files?.filter(e=>!!e.transformedCodeSize)??[]),h=o(()=>{let e=new Map;return c.value?.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(c.value?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});function _(){let e=`https://www.npmjs.com/package/${i.value.name}`;window.open(e,`_blank`)}return(t,n)=>{let o=re,s=Je,v=be,b=he,x=je;return H(),C(y,null,[l(u)?(H(),z(o,{key:0})):d(``,!0),l(c)?(H(),C(`div`,Ma,[p(`div`,Na,[p(`div`,{flex:`~ gap-3 items-center`,title:e.package},[p(`div`,Fa,[p(`div`,null,[g(s,{name:i.value.name},null,8,[`name`])]),g(v,{bytes:l(c).transformedCodeSize},null,8,[`bytes`])]),n[2]||=p(`div`,{"flex-auto":``},null,-1),p(`button`,{"btn-action":``,flex:`~ items-center`,onClick:_},[...n[1]||=[p(`div`,{"i-ph-arrow-square-out-duotone":``},null,-1),w(` Open in npm `,-1)]]),g(Le,{onClick:n[0]||=e=>r(`close`)})],8,Pa),p(`details`,Ia,[p(`summary`,La,[p(`span`,null,`Bundled Files (`+m(f.value.length)+`)`,1)]),g(x,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:f.value},{default:a(({items:t})=>[(H(!0),C(y,null,F(t,t=>(H(),C(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},[g(b,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:l(c).dir},null,8,[`id`,`session`,`cwd`]),p(`span`,Ra,[g(v,{bytes:t.transformedCodeSize,"text-xs":``},null,8,[`bytes`])])]))),128))]),_:1},8,[`list`])]),p(`details`,za,[p(`summary`,Ba,[p(`span`,null,`Importers (`+m(h.value.length)+`)`,1)]),g(x,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:h.value},{default:a(({items:t})=>[(H(!0),C(y,null,F(t,t=>(H(),C(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},[g(b,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version?(H(),z(me,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):d(``,!0)]))),128))]),_:1},8,[`list`])])])])):d(``,!0)],64)}}}),Ha=Object.assign(Va,{__name:`DataPackageDetailsLoader`}),Ua={key:1,grid:`~ cols-[max-content_1fr]`,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``},Wa={"of-auto":``,"h-screen":``,"max-h-screen":``,relative:``},Ga=e({__name:`[session]`,setup(e){let n=P().params,r=u(!0),i=h({id:o(()=>n.session),meta:void 0,modulesList:_([]),buildDuration:0}),a=ae(),s=t(),f=P(),m=o(()=>[`module`,`asset`,`plugin`,`chunk`,`package`].find(e=>f.query[e]!==void 0));function v(){m.value&&s.replace({query:{...f.query,[m.value]:void 0}})}return De(`Escape`,e=>{e.preventDefault(),!(!e.isTrusted||e.repeat)&&v()}),_e(()=>i.meta?[{title:`Home`,to:`/session/${i.id}`,icon:`i-ph-house-duotone`},{title:`Modules Graph`,to:`/session/${i.id}/graph`,icon:`i-ph-graph-duotone`,category:`session`},{title:`Plugins`,to:`/session/${i.id}/plugins`,icon:`i-ph-plugs-duotone`,category:`session`},{title:`Chunks`,to:`/session/${i.id}/chunks`,icon:`i-ph-shapes-duotone `,category:`session`},{title:`Assets`,to:`/session/${i.id}/assets`,icon:`i-ph-files-duotone`,category:`session`},{title:`Packages`,to:`/session/${i.id}/packages`,icon:`i-ph-package-duotone`,category:`session`}]:[]),k(async()=>{let e=await a.value.call(`vite:rolldown:get-session-summary`,{session:n.session});i.meta=e.meta,i.modulesList=e.modules.map(e=>({id:e.id,fileType:de(e.id).name,imports:e.imports??[],importers:e.importers??[],buildMetrics:e.build_metrics})),i.buildDuration=e.build_duration,r.value=!1}),(e,t)=>{let n=re,a=Ze,o=ne,s=Zr,u=ei,h=Oa,_=ja,y=Ha;return r.value?(H(),z(n,{key:0})):(H(),C(`div`,Ua,[g(a),p(`div`,Wa,[g(o,{session:i},null,8,[`session`])]),m.value?(H(),C(`div`,{key:0,fixed:``,"inset-0":``,"backdrop-blur-8":``,"backdrop-brightness-95":``,"z-panel-content":``,onClick:c(v,[`self`])},[m.value===`module`?(H(),C(`div`,{key:l(f).query.module,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"left-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`},[g(s,{module:l(f).query.module,session:i,onClose:v},null,8,[`module`,`session`])])):d(``,!0),m.value===`asset`?(H(),C(`div`,{key:l(f).query.asset,fixed:``,"right-0":``,"bottom-0":``,"top-30":``,"z-panel-content":``,"of-hidden":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[g(u,{asset:l(f).query.asset,session:i,onClose:v},null,8,[`asset`,`session`])])):d(``,!0),m.value===`plugin`?(H(),C(`div`,{key:l(f).query.plugin,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"left-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`},[g(h,{plugin:l(f).query.plugin,session:i,onClose:v},null,8,[`plugin`,`session`])])):d(``,!0),m.value===`chunk`?(H(),C(`div`,{key:l(f).query.chunk,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[g(_,{chunk:Number(l(f).query.chunk),session:i,onClose:v},null,8,[`chunk`,`session`])])):d(``,!0),m.value===`package`?(H(),C(`div`,{key:l(f).query.package,fixed:``,"right-0":``,"bottom-0":``,"top-20":``,"z-panel-content":``,"bg-glass":``,border:`l t base rounded-tl-xl`,class:`left-20 xl:left-100 2xl:left-150`},[g(y,{package:l(f).query.package,session:i,onClose:v},null,8,[`package`,`session`])])):d(``,!0)])):d(``,!0)]))}}});export{Ga as default};
|