PageSourceSearch

https://outerbase.com/_next/static/chunks/801-e41c574a7c5a5b66.js

js outerbase.com collected 2026-10-02 02:53:51 UTC 208,644 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[801],{6490:(e,t,n)=>{n.d(t,{$w:()=>j,Ar:()=>h,Bc:()=>eg,DH:()=>eO,OO:()=>ew,et:()=>a,rB:()=>U,wm:()=>ec,yU:()=>eb});var i=n(2809),s=n(5622),r=n(1710);class o{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=(0,r.mv)(this.state).resolveInner(this.pos,-1);for(;t&&0>e.indexOf(t.name);)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),s=i.search(f(e,!1));return s<0?null:{from:n+s,to:this.pos,text:i.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(e,t,n){"abort"==e&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function l(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function a(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,i]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:i}of e){t[i[0]]=!0;for(let e=1;e<i.length;e++)n[i[e]]=!0}let i=l(t)+l(n)+"*$";return[RegExp("^"+i),new RegExp(i)]}(t);return e=>{let s=e.matchBefore(i);return s||e.explicit?{from:s?s.from:e.pos,options:t,validFor:n}:null}}function h(e,t){return n=>{for(let t=(0,r.mv)(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}class c{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}}function u(e){return e.selection.main.from}function f(e,t){var n;let{source:i}=e,s=t&&"^"!=i[0],r="$"!=i[i.length-1];return s||r?RegExp(`${s?"^":""}(?:${i})${r?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}let d=i.YH.define(),p=new WeakMap;function m(e){if(!Array.isArray(e))return e;let t=p.get(e);return t||p.set(e,t=a(e)),t}let g=i.Pe.define(),k=i.Pe.define();class v{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=(0,i.vS)(e,t),s=(0,i.Fh)(n);this.chars.push(n);let r=e.slice(t,t+s),o=r.toUpperCase();this.folded.push((0,i.vS)(o==r?r.toLowerCase():o,0)),t+=s}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(0==this.pattern.length)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:s,precise:r,byWord:o}=this;if(1==t.length){let s=(0,i.vS)(e,0),r=(0,i.Fh)(s),o=r==e.length?0:-100;if(s==t[0]);else{if(s!=n[0])return null;o+=-200}return this.ret(o,[0,r])}let l=e.indexOf(this.pattern);if(0==l)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,h=0;if(l<0){for(let r=0,o=Math.min(e.length,200);r<o&&h<a;){let o=(0,i.vS)(e,r);(o==t[h]||o==n[h])&&(s[h++]=r),r+=(0,i.Fh)(o)}if(h<a)return null}let c=0,u=0,f=!1,d=0,p=-1,m=-1,g=/[a-z]/.test(e),k=!0;for(let s=0,h=Math.min(e.length,200),v=0;s<h&&u<a;){let h=(0,i.vS)(e,s);l<0&&(c<a&&h==t[c]&&(r[c++]=s),d<a&&(h==t[d]||h==n[d]?(0==d&&(p=s),m=s+1,d++):d=0));let x,y=h<255?h>=48&&h<=57||h>=97&&h<=122?2:h>=65&&h<=90?1:0:(x=(0,i.MK)(h))!=x.toLowerCase()?1:x!=x.toUpperCase()?2:0;(!s||1==y&&g||0==v&&0!=y)&&(t[u]==h||n[u]==h&&(f=!0)?o[u++]=s:o.length&&(k=!1)),v=y,s+=(0,i.Fh)(h)}return u==a&&0==o[0]&&k?this.result(-100+(f?-200:0),o,e):d==a&&0==p?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):d==a?this.ret(-900-e.length,[p,m]):u==a?this.result(-100+(f?-200:0)+-700+(k?0:-1100),o,e):2==t.length?null:this.result((s[0]?-700:0)+-200+-1100,s,e)}result(e,t,n){let s=[],r=0;for(let e of t){let t=e+(this.astral?(0,i.Fh)((0,i.vS)(n,e)):1);r&&s[r-1]==e?s[r-1]=t:(s[r++]=e,s[r++]=t)}return this.ret(e-n.length,s)}}class x{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}}let y=i.sj.define({combine:e=>(0,i.QR)(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:w,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>b(e(n),t(n)),optionClass:(e,t)=>n=>b(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>
vendor: 4,140 bytes, line 1
1e||t})});function b(e,t){return e?t?e+" "+t:e:t}function w(e,t,n,i,r,o){let l=e.textDirection==s.OP.RTL,a=l,h=!1,c="top",u,f,d=t.left-r.left,p=r.right-t.right,m=i.right-i.left,g=i.bottom-i.top;if(a&&d<Math.min(m,p)?a=!1:!a&&p<Math.min(m,d)&&(a=!0),m<=(a?d:p))u=Math.max(r.top,Math.min(n.top,r.bottom-g))-t.top,f=Math.min(400,a?d:p);else{h=!0,f=Math.min(400,(l?t.right:r.right-t.left)-30);let e=r.bottom-t.bottom;e>=g||e>t.top?u=n.bottom-t.top:(c="bottom",u=t.bottom-n.top)}let k=(t.bottom-t.top)/o.offsetHeight,v=(t.right-t.left)/o.offsetWidth;return{style:`${c}: ${u/k}px; max-width: ${f/v}px`,class:"cm-completionInfo-"+(h?l?"left-narrow":"right-narrow":a?"left":"right")}}function S(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let i=Math.floor((e-t)/n);return{from:e-(i+1)*n,to:e-i*n}}class O{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:s,selected:r}=i.open,o=e.state.facet(y);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n,i){let s=document.createElement("span");s.className="cm-completionLabel";let r=e.displayLabel||e.label,o=0;for(let e=0;e<i.length;){let t=i[e++],n=i[e++];t>o&&s.appendChild(document.createTextNode(r.slice(o,t)));let l=s.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(r.slice(t,n))),l.className="cm-completionMatchedText",o=n}return o<r.length&&s.appendChild(document.createTextNode(r.slice(o))),s},position:50},{render(e){if(!e.detail)return null;let t=document.createElement("span");return t.className="cm-completionDetail",t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=S(s.length,r,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",n=>{let{options:i}=e.state.field(t).open;for(let t=n.target,s;t&&t!=this.dom;t=t.parentNode)if("LI"==t.nodeName&&(s=/-(\d+)$/.exec(t.id))&&+s[1]<i.length){this.applyCompletion(e,i[+s[1]]),n.preventDefault();return}}),this.dom.addEventListener("focusout",t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(y).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:k.of(null)})}),this.showOptions(s,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:s,selected:r,disabled:o}=n.open;i.open&&i.open.options==s||(this.range=S(s.length,r,e.state.facet(y).maxRenderedOptions),this.showOptions(s,n.id)),this.updateSel(),o!=(null===(t=i.open)||void 0===t?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=S(t.options.length,t.selected,this.view.state.facet(y).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();
1let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let r="string"==typeof i?document.createTextNode(i):i(n);if(!r)return;"then"in r?r.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,n)}).catch(e=>(0,s.c_)(this.view.state,e,"completion info")):this.addInfoPane(r,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=e.nodeType)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:i}=e;n.appendChild(t),this.infoDestroy=i||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){var t,n;let i,s,r,o=null;for(let t=this.list.firstChild,n=this.range.from;t;t=t.nextSibling,n++)"LI"==t.nodeName&&t.id?n==e?t.hasAttribute("aria-selected")||(t.setAttribute("aria-selected","true"),o=t):t.hasAttribute("aria-selected")&&t.removeAttribute("aria-selected"):n--;return o&&(t=this.list,n=o,i=t.getBoundingClientRect(),s=n.getBoundingClientRect(),r=i.height/t.offsetHeight,s.top<i.top?t.scrollTop-=(i.top-s.top)/r:s.bottom>i.bottom&&(t.scrollTop+=(s.bottom-i.bottom)/r)),o}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),s=this.space;if(!s){let e=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return i.top>Math.min(s.bottom,t.bottom)-10||i.bottom<Math.max(s.top,t.top)+10?null:this.view.state.facet(y).positionInfo(this.view,t,i,n,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,t,n){let i=document.createElement("ul");i.id=t,i.setAttribute("role","listbox"),i.setAttribute("aria-expanded","true"),i.setAttribute("aria-label",this.view.state.phrase("Completions"));let s=null;for(let r=n.from;r<n.to;r++){let{completion:o,match:l}=e[r],{section:a}=o;if(a){let e="string"==typeof a?a:a.name;e!=s&&(r>n.from||0==n.from)&&(s=e,"string"!=typeof a&&a.header?i.appendChild(a.header(a)):i.appendChild(document.createElement("completion-section")).textContent=e)}let h=i.appendChild(document.createElement("li"));h.id=t+"-"+r,h.setAttribute("role","option");let c=this.optionClass(o);for(let e of(c&&(h.className=c),this.optionContent)){let t=e(o,this.view.state,this.view,l);t&&h.appendChild(t)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.to<e.length&&i.classList.add("cm-completionListIncompleteBottom"),i}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function A(e){return 100*(e.boost||0)+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}class _{constructor(e,t,n,i,s,r){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=s,this.disabled=r}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new _(this.options,T(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,s,r){if(i&&!r&&e.some(e=>e.isPending))return i.setDisabled();let o=function(e,t){let n=[],i=null,s=e=>{n.push(e);let{section:t}=e.completion;if(t){i||(i=[]);let e="string"==typeof t?t:t.name;i.some(t=>t.name==e)||i.push("string"==typeof t?{name:e}:t)}},r=t.facet(y);for(let i of e)if(i.hasResult()){let e=i.result.getMatch;if(!1===i.result.filter)for(let t of i.result.options)s(new c(t,i.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(i.from,i.to),o,l=r.filterStrict?new x(n):new v(n);for(let t of i.result.options)if(o=l.match(t.label)){let n=t.displayLabel?e?e(t,o.matched):[]:o.matched;s(new c(t,i.source,n,o.score+(t.boost||0)))}}}if(i){let e=Object.create(null),t=0;for(let n of i.sort((e,t)=>{var n,i;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(i=t.rank)&&void 0!==i?i:1e9)||(e.name<t.name?-1:1)}))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e["string"==typeof n?n:n.name])}}let o=[],l=null,a=r.compareCompletions;for(let e of n.sort((e,t)=>
1t.score-e.score||a(e.completion,t.completion))){let t=e.completion;l&&l.label==t.label&&l.detail==t.detail&&(null==l.type||null==t.type||l.type==t.type)&&l.apply==t.apply&&l.boost==t.boost?A(e.completion)>A(l)&&(o[o.length-1]=e):o.push(e),l=e.completion}return o}(e,t);if(!o.length)return i&&e.some(e=>e.isPending)?i.setDisabled():null;let l=t.facet(y).selectOnOpen?0:-1;if(i&&i.selected!=l&&-1!=i.selected){let e=i.options[i.selected].completion;for(let t=0;t<o.length;t++)if(o[t].completion==e){l=t;break}}return new _(o,T(n,l),{pos:e.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:F,above:s.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new _(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new _(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class C{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new C(N,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(y),i=(n.override||t.languageDataAt("autocomplete",u(t)).map(m)).map(t=>(this.active.find(e=>e.source==t)||new M(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let s=this.open,r=e.effects.some(e=>e.is(E));for(let o of(s&&e.docChanged&&(s=s.map(e.changes)),e.selection||i.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,i=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;i<t.length&&!t[i].hasResult();)i++;let s=n==e.length,r=i==t.length;if(s||r)return s==r;if(e[n++].result!=t[i++].result)return!1}}(i,this.active)||r?s=_.build(i,t,this.id,s,n,r):s&&s.disabled&&!i.some(e=>e.isPending)&&(s=null),!s&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new M(e.source,0):e)),e.effects))o.is(R)&&(s=s&&s.setSelected(o.value,this.id));return i==this.active&&s==this.open?this:new C(i,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?P:I}}let P={"aria-autocomplete":"list"},I={};function T(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}let N=[];function D(e,t){if(e.isUserEvent("input.complete")){let n=e.annotation(d);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class M{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(e,t){let n=D(e,t),i=this;for(let t of((8&n||16&n&&this.touches(e))&&(i=new M(i.source,0)),4&n&&0==i.state&&(i=new M(this.source,1)),i=i.updateFor(e,n),e.effects))if(t.is(g))i=new M(i.source,1,t.value);else if(t.is(k))i=new M(i.source,0);else if(t.is(E))for(let e of t.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(u(e.state))}}class B extends M{constructor(e,t,n,i,s,r){super(e,3,t),this.limit=n,this.result=i,this.from=s,this.to=r}hasResult(){return!0}updateFor(e,t){var n;if(!(3&t))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let s=e.changes.mapPos(this.from),r=e.changes.mapPos(this.to,1),l=u(e.state);if(l>r||!i||2&t&&(u(e.startState)==this.from||l<this.limit))return new M(this.source,4&t?1:0);let a=e.changes.mapPos(this.limit);return!function(e,t,n,i){if(!e)return!1;let s=t.sliceDoc(n,i);return"function"==typeof e?e(s,n,i,t):f(e,!0).test(s)}(i.validFor,e.state,s,r)?i.update&&(i=i.update(i,s,r,new o(e.state,l,!1)))?new B(this.source,this.explicit,a,i,i.from,null!==(n=i.to)&&void 0!==n?n:u(e.state)):new M(this.source,1,this.explicit):new B(this.source,this.explicit,a,i,s,r)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new B(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new M(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}let E=i.Pe.define({map:(e,t)=>e.map(e=>e.map(t))}),R=i.Pe.define(),z=i.sU.define({create:()=>C.start(),update:(e,t)=>
1e.update(t),provide:e=>[s.DK.from(e,e=>e.tooltip),s.Lz.contentAttributes.from(e,e=>e.attrs)]});function L(e,t){let n=t.completion.apply||t.completion.label,s=e.state.field(z).active.find(e=>e.source==t.source);return s instanceof B&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,s){let{main:r}=e.selection,o=n-r.from,l=s-r.from;return Object.assign(Object.assign({},e.changeByRange(a=>{if(a!=r&&n!=s&&e.sliceDoc(a.from+o,a.from+l)!=e.sliceDoc(n,s))return{range:a};let h=e.toText(t);return{changes:{from:a.from+o,to:s==r.from?a.to:a.from+l,insert:h},range:i.OF.cursor(a.from+o+h.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}(e.state,n,s.from,s.to)),{annotations:d.of(t.completion)})):n(e,t.completion,s.from,s.to),!0)}let F=e=>new O(e,z,L);function Q(e,t="option"){return n=>{let i=n.state.field(z,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(y).interactionDelay)return!1;let r=1,o;"page"==t&&(o=(0,s.Eg)(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:l}=i.open.options,a=i.open.selected>-1?i.open.selected+r*(e?1:-1):e?0:l-1;return a<0?a="page"==t?0:l-1:a>=l&&(a="page"==t?l-1:0),n.dispatch({effects:R.of(a)}),!0}}let j=e=>{let t=e.state.field(z,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(y).interactionDelay)&&L(e,t.open.options[t.open.selected])},U=e=>!!e.state.field(z,!1)&&(e.dispatch({effects:g.of(!0)}),!0);class q{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}let $=s.Z9.fromClass(class{constructor(e){for(let t of(this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0,e.state.field(z).active))t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(z),n=e.state.facet(y);if(!e.selectionSet&&!e.docChanged&&e.startState.field(z)==t)return;let i=e.transactions.some(e=>{let t=D(e,n);return 8&t||(e.selection||e.docChanged)&&!(3&t)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(i||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>50&&Date.now()-n.time>1e3){for(let e of n.context.abortListeners)try{e()}catch(e){(0,s.c_)(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(g)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),r):-1,0!=this.composing)for(let t of e.transactions)t.isUserEvent("input.type")?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(z);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(y).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=u(t),i=new o(t,n,e.explicit,this.view),r=new q(e,i);this.running.push(r),Promise.resolve(e.source(i)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:k.of(null)}),(0,s.c_)(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(y).updateSyncTime))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(y),i=this.view.state.field(z);for(let s=0;s<this.running.length;s++){let r=this.running[s];if(void 0===r.done)continue;if(this.running.splice(s--,1),r.done){let i=u(r.updates.length?r.updates[0].startState:this.view.state),s=Math.min(i,r.done.from+(r.active.explicit?0:1)),o=new B(r.active.source,r.active.explicit,s,r.done,r.done.from,null!==(e=r.done.to)&&void 0!==e?e:i);for(let e of r.updates)o=o.update(e,n);if(o.hasResult()){t.push(o);continue}}let o=i.active.find(e=>e.source==r.active.source);if(o&&o.isPending){if(null==r.done){let e=new M(r.active.source,0);for(let t of r.updates)e=e.update(t,n);e.isPending||t.push(e)}else this.startQuery(o)}}(t.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:E.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(z,!1);if(t&&t.tooltip&&this.view.state.facet(y).closeOnBlur){let n=t.open&&(0,s.Eg)(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||setTimeout(()=>this.view.dispatch({effects:k.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:g.of(!1)}),20),this.composing=0}}}),V="object"==typeof navigator&&/Win/.test(navigator.platform),J=i.Nb.highest(s.Lz.domEventHandlers({ke
vendor: 4,504 bytes, line 1
1ydown(e,t){let n=t.state.field(z,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(V&&e.altKey)||e.metaKey)return!1;let i=n.open.options[n.open.selected],s=n.active.find(e=>e.source==i.source),r=i.completion.commitCharacters||s.result.commitCharacters;return r&&r.indexOf(e.key)>-1&&L(t,i),!1}})),Z=s.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xb7\xb7\xb7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class W{constructor(e,t,n,i){this.field=e,this.line=t,this.from=n,this.to=i}}class H{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,MapMode.TrackDel),n=e.mapPos(this.to,1,MapMode.TrackDel);return null==t||null==n?null:new H(this.field,t,n)}}class X{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],i=[t],s=e.doc.lineAt(t),r=/^\s*/.exec(s.text)[0];for(let s of this.lines){if(n.length){let n=r,o=/^\t*/.exec(s)[0].length;for(let t=0;t<o;t++)n+=e.facet(indentUnit);i.push(t+n.length-o),s=n+s.slice(o)}n.push(s),t+=s.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new H(e.field,i[e.line]+e.from,i[e.line]+e.to))}}static parse(e){let t=[],n=[],i=[],s;for(let r of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(r);){let e=s[1]?+s[1]:null,o=s[2]||s[3]||"",l=-1,a=o.replace(/\\[{}]/g,e=>e[1]);for(let n=0;n<t.length;n++)(null!=e?t[n].seq==e:a&&t[n].name==a)&&(l=n);if(l<0){let n=0;for(;n<t.length&&(null==e||null!=t[n].seq&&t[n].seq<e);)n++;for(let s of(t.splice(n,0,{seq:e,name:a}),l=n,i))s.field>=l&&s.field++}i.push(new W(l,n.length,s.index,s.index+a.length)),r=r.slice(0,s.index)+o+r.slice(s.index+s[0].length)}r=r.replace(/\\([{}])/g,(e,t,s)=>{for(let e of i)e.line==n.length&&e.from>s&&(e.from--,e.to--);return t}),n.push(r)}return new X(n,i)}}let Y=s.NZ.widget({widget:new class extends s.xO{toDOM(){let e=document.createElement("span");
1return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),K=s.NZ.mark({class:"cm-snippetField"});class G{constructor(e,t){this.ranges=e,this.active=t,this.deco=s.NZ.set(e.map(e=>(e.from==e.to?Y:K).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let i=n.map(e);if(!i)return null;t.push(i)}return new G(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}let ee=i.Pe.define({map:(e,t)=>e&&e.map(t)}),et=i.Pe.define(),en=i.sU.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(ee))return n.value;if(n.is(et)&&e)return new G(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>s.Lz.decorations.from(e,e=>e?e.deco:s.NZ.none)});function ei(e){return({state:t,dispatch:n})=>{var s,r;let o=t.field(en,!1);if(!o||e<0&&0==o.active)return!1;let l=o.active+e,a=e>0&&!o.ranges.some(t=>t.field==l+e);return n(t.update({selection:(s=o.ranges,r=l,i.OF.create(s.filter(e=>e.field==r).map(e=>i.OF.range(e.from,e.to)))),effects:ee.of(a?null:new G(o.ranges,l)),scrollIntoView:!0})),!0}}let es=[{key:"Tab",run:ei(1),shift:ei(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(en,!1)&&(t(e.update({effects:ee.of(null)})),!0)}],er=i.sj.define({combine:e=>e.length?e[0]:es}),eo={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},el=i.Pe.define({map(e,t){let n=t.mapPos(e,-1,i.iR.TrackAfter);return null==n?void 0:n}}),ea=new class extends i.FB{};ea.startSide=1,ea.endSide=-1;let eh=i.sU.define({create:()=>i.om.empty,update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(el)&&(e=e.update({add:[ea.range(n.value,n.value+1)]}));return e}});function ec(){return[em,eh]}let eu="()[]{}<>";function ef(e){for(let t=0;t<eu.length;t+=2)if(eu.charCodeAt(t)==e)return eu.charAt(t+1);return(0,i.MK)(e<128?e:e+1)}function ed(e,t){return e.languageDataAt("closeBrackets",t)[0]||eo}let ep="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),em=s.Lz.inputHandler.of((e,t,n,s)=>{if((ep?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let o=e.state.selection.main;if(s.length>2||2==s.length&&1==(0,i.Fh)((0,i.vS)(s,0))||t!=o.from||n!=o.to)return!1;let l=function(e,t){let n=ed(e,e.selection.main.head),s=n.brackets||eo.brackets;for(let o of s){let l=ef((0,i.vS)(o,0));if(t==o)return l==o?function(e,t,n,s){let o=s.stringPrefixes||eo.stringPrefixes,l=null,a=e.changeByRange(s=>{if(!s.empty)return{changes:[{insert:t,from:s.from},{insert:t,from:s.to}],effects:el.of(s.to+t.length),range:i.OF.range(s.anchor+t.length,s.head+t.length)};let a=s.head,h=ev(e.doc,a),c;if(h==t){if(ex(e,a))return{changes:{insert:t+t,from:a},effects:el.of(a+t.length),range:i.OF.cursor(a+t.length)};if(ek(e,a)){let s=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+s.length,insert:s},range:i.OF.cursor(a+s.length)}}}else if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(c=ey(e,a-2*t.length,o))>-1&&ex(e,c))return{changes:{insert:t+t+t+t,from:a},effects:el.of(a+t.length),range:i.OF.cursor(a+t.length)};else if(e.charCategorizer(a)(h)!=i.Je.Word&&ey(e,a,o)>-1&&!function(e,t,n,i){let s=(0,r.mv)(e).resolveInner(t,-1),o=i.reduce((e,t)=>Math.max(e,t.length),0);for(let r=0;r<5;r++){let r=e.sliceDoc(s.from,Math.min(s.to,s.from+n.length+o)),l=r.indexOf(n);if(!l||l>-1&&i.indexOf(r.slice(0,l))>-1){let t=s.firstChild;for(;t&&t.from==s.from&&t.to-t.from>n.length+l;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let a=s.to==t&&s.parent;if(!a)break;s=a}return!1}(e,a,t,o))return{changes:{insert:t+t,from:a},effects:el.of(a+t.length),range:i.OF.cursor(a+t.length)};return{range:l=s}});return l?null:e.update(a,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,s.indexOf(o+o+o)>-1,n):function(e,t,n,s){let r=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:el.of(o.to+t.length),range:i.OF.range(o.anchor+t.length,o.head+t.length)};let l=ev(e.doc,o.head);return!l||/\s/.test(l)||s.indexOf(l)>-1?{changes:{insert:t+n,from:o.head},effects:el.of(o.head+t.length),range:i.OF.cursor(o.head+t.length)}:{range:r=o}});return r?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}(e,o,l,n.before||eo.before);if(t==l&&ek(e,e.selection.main.from))return function(e,t,n){let s=null,r=e.changeByRange(t=>t.empty&&ev(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:i.OF.cursor(t.head+n.length)}:s={range:t});return s?null:e.update(r,{scrollIntoView:!0,userEvent:"input.type"})}(e,0,l)}return null}(e.state,s);
1return!!l&&(e.dispatch(l),!0)}),eg=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=ed(e,e.selection.main.head).brackets||eo.brackets,s=null,r=e.changeByRange(t=>{if(t.empty){let s=function(e,t){let n=e.sliceString(t-2,t);return(0,i.Fh)((0,i.vS)(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let r of n)if(r==s&&ev(e.doc,t.head)==ef((0,i.vS)(r,0)))return{changes:{from:t.head-r.length,to:t.head+r.length},range:i.OF.cursor(t.head-r.length)}}return{range:s=t}});return s||t(e.update(r,{scrollIntoView:!0,userEvent:"delete.backward"})),!s}}];function ek(e,t){let n=!1;return e.field(eh).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function ev(e,t){let n=e.sliceString(t,t+2);return n.slice(0,(0,i.Fh)((0,i.vS)(n,0)))}function ex(e,t){let n=(0,r.mv)(e).resolveInner(t+1);return n.parent&&n.from==t}function ey(e,t,n){let s=e.charCategorizer(t);if(s(e.sliceDoc(t-1,t))!=i.Je.Word)return t;for(let r of n){let n=t-r.length;if(e.sliceDoc(n,t)==r&&s(e.sliceDoc(n-1,n))!=i.Je.Word)return n}return -1}function eb(e={}){return[J,z,y.of(e),$,eS,Z]}let ew=[{key:"Ctrl-Space",run:U},{mac:"Alt-`",run:U},{key:"Escape",run:e=>{let t=e.state.field(z,!1);return!!(t&&t.active.some(e=>0!=e.state))&&(e.dispatch({effects:k.of(null)}),!0)}},{key:"ArrowDown",run:Q(!0)},{key:"ArrowUp",run:Q(!1)},{key:"PageDown",run:Q(!0,"page")},{key:"PageUp",run:Q(!1,"page")},{key:"Enter",run:j}],eS=i.Nb.highest(s.w4.computeN([y],e=>e.facet(y).defaultKeymap?[ew]:[]));function eO(e){let t=e.field(z,!1);return t&&t.active.some(e=>e.isPending)?"pending":t&&t.active.some(e=>0!=e.state)?"active":null}},507:(e,t,n)=>{n.d(t,{Mg:()=>eP,UY:()=>eC,Yc:()=>eN,_G:()=>ew,b6:()=>v,cL:()=>D,pw:()=>eT});var i=n(2809),s=n(5622),r=n(1710),o=n(5817);function l(e,t){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let s=e(t,n);return!!s&&(i(n.update(s)),!0)}}let a=l(function(e,t,n=t.selection.ranges){let i=[],s=-1;for(let{from:e,to:r}of n){let n=i.length,o=1e9,l=u(t,e).line;if(l){for(let n=e;n<=r;){let a=t.doc.lineAt(n);if(a.from>s&&(e==r||r>a.from)){s=a.from;let e=/^\s*/.exec(a.text)[0].length,t=e==a.length,n=a.text.slice(e,e+l.length)==l?e:-1;e<a.text.length&&e<o&&(o=e),i.push({line:a,comment:n,token:l,indent:e,empty:t,single:!1})}n=a.to+1}if(o<1e9)for(let e=n;e<i.length;e++)i[e].indent<i[e].line.text.length&&(i[e].indent=o);i.length==n+1&&(i[n].single=!0)}}if(2!=e&&i.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:s,empty:r,single:o}of i)(o||!r)&&e.push({from:t.from+s,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&i.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:s}of i)if(n>=0){let i=t.from+n,r=i+s.length;" "==t.text[r-t.from]&&r++,e.push({from:i,to:r})}return{changes:e}}return null},0),h=l(f,0),c=l((e,t)=>f(e,t,function(e){let t=[];for(let n of e.selection.ranges){let i=e.doc.lineAt(n.from),s=n.to<=i.to?i:e.doc.lineAt(n.to);s.from>i.from&&s.from==n.to&&(s=n.to==i.to+1?i:e.doc.lineAt(n.to-1));let r=t.length-1;r>=0&&t[r].to>i.from?t[r].to=s.to:t.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:s.to})}return t}(t)),0);function u(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function f(e,t,n=t.selection.ranges){let i=n.map(e=>u(t,e.from).block);if(!i.every(e=>e))return null;let s=n.map((e,n)=>(function(e,{open:t,close:n},i,s){let r,o,l=e.sliceDoc(i-50,i),a=e.sliceDoc(s,s+50),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,u=l.length-h;if(l.slice(u-t.length,u)==t&&a.slice(c,c+n.length)==n)return{open:{pos:i-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-i<=100?r=o=e.sliceDoc(i,s):(r=e.sliceDoc(i,i+50),o=e.sliceDoc(s-50,s));let f=/^\s*/.exec(r)[0].length,d=/\s*$/.exec(o)[0].length,p=o.length-d-n.length;return r.slice(f,f+t.length)==t&&o.slice(p,p+n.length)==n?{open:{pos:i+f+t.length,margin:/\s/.test(r.charAt(f+t.length))?1:0},close:{pos:s-d-n.length,margin:/\s/.test(o.charAt(p-1))?1:0}}:null})(t,i[n],e.from,e.to));if(2!=e&&!s.every(e=>e))return{changes:t.changes(n.map((e,t)=>s[t]?[]:[{from:e.from,insert:i[t].open+" "},{from:e.to,insert:" "+i[t].close}]))};if(1!=e&&s.some(e=>e)){let e=[];for(let t=0,n;t<s.length;t++)if(n=s[t]){let s=i[t],{open:r,close:o}=n;e.push({from:r.pos-s.open.length,to:r.pos+r.margin},{from:o.pos-o.margin,to:o.pos+s.close.length})}return{changes:e}}return null}let d=i.YH.define(),p=i.YH.define(),m=i.sj.define(),g=i.sj.define({combine:e=>(0,i.QR)(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>
1t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,i)=>e(n,i)||t(n,i)})}),k=i.sU.define({create:()=>N.empty,update(e,t){let n=t.state.facet(g),s=t.annotation(d);if(s){let i=O.fromTransaction(t,s.selection),r=s.side,o=0==r?e.undone:e.done;return o=i?A(o,o.length,n.minDepth,i):P(o,t.startState.selection),new N(0==r?s.rest:o,0==r?o:s.rest)}let r=t.annotation(p);if(("full"==r||"before"==r)&&(e=e.isolate()),!1===t.annotation(i.ZX.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=O.fromTransaction(t),l=t.annotation(i.ZX.time),a=t.annotation(i.ZX.userEvent);return o?e=e.addChanges(o,l,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,l,a,n.newGroupDelay)),("full"==r||"after"==r)&&(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new N(e.done.map(O.fromJSON),e.undone.map(O.fromJSON))});function v(e={}){return[k,g.of(e),s.Lz.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?y:"historyRedo"==e.inputType?b:null;return!!n&&(e.preventDefault(),n(t))}})]}function x(e,t){return function({state:n,dispatch:i}){if(!t&&n.readOnly)return!1;let s=n.field(k,!1);if(!s)return!1;let r=s.pop(e,n,t);return!!r&&(i(r),!0)}}let y=x(0,!1),b=x(1,!1),w=x(0,!0),S=x(1,!0);class O{constructor(e,t,n,i,s){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new O(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new O(e.changes&&i.VR.fromJSON(e.changes),[],e.mapped&&i.Gu.fromJSON(e.mapped),e.startSelection&&i.OF.fromJSON(e.startSelection),e.selectionsAfter.map(i.OF.fromJSON))}static fromTransaction(e,t){let n=C;for(let t of e.startState.facet(m)){let i=t(e);i.length&&(n=n.concat(i))}return!n.length&&e.changes.empty?null:new O(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,C)}static selection(e){return new O(void 0,C,void 0,void 0,e)}}function A(e,t,n,i){let s=e.slice(t+1>n+20?t-n-1:0,t);return s.push(i),s}function _(e,t){return e.length?t.length?e.concat(t):e:t}let C=[];function P(e,t){if(!e.length)return[O.selection([t])];{let n=e[e.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return i.length&&i[i.length-1].eq(t)?e:(i.push(t),A(e,e.length-1,1e9,n.setSelAfter(i)))}}function I(e,t){if(!e.length)return e;let n=e.length,s=C;for(;n;){let r=function(e,t,n){let s=_(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):C,n);if(!e.changes)return O.selection(s);let r=e.changes.map(t),o=t.mapDesc(e.changes,!0),l=e.mapped?e.mapped.composeDesc(o):o;return new O(r,i.Pe.mapEffects(e.effects,t),l,e.startSelection.map(o),s)}(e[n-1],t,s);if(r.changes&&!r.changes.empty||r.effects.length){let t=e.slice(0,n);return t[n-1]=r,t}t=r.mapped,n--,s=r.selectionsAfter}return s.length?[O.selection(s)]:C}let T=/^(input\.type|delete)($|\.)/;class N{constructor(e,t,n=0,i){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new N(this.done,this.undone):this}addChanges(e,t,n,s,r){var o,l;let a,h,c=this.done,u=c[c.length-1];return new N(c=u&&u.changes&&!u.changes.empty&&e.changes&&(!n||T.test(n))&&(!u.selectionsAfter.length&&t-this.prevTime<s.newGroupDelay&&s.joinToEvent(r,(o=u.changes,l=e.changes,a=[],h=!1,o.iterChangedRanges((e,t)=>a.push(e,t)),l.iterChangedRanges((e,t,n,i)=>{for(let e=0;e<a.length;){let t=a[e++],s=a[e++];i>=t&&n<=s&&(h=!0)}}),h))||"input.type.compose"==n)?A(c,c.length-1,s.minDepth,new O(e.changes.compose(u.changes),_(i.Pe.mapEffects(e.effects,u.changes),u.effects),u.mapped,u.startSelection,C)):A(c,c.length,s.minDepth,e),C,t,n)}addSelection(e,t,n,i){var s;let r=this.done.length?this.done[this.done.length-1].selectionsAfter:C;return r.length>0&&t-this.prevTime<i&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(s=r[r.length-1]).ranges.length==e.ranges.length&&0===s.ranges.filter((t,
1n)=>t.empty!=e.ranges[n].empty).length?this:new N(P(this.done,e),this.undone,t,n)}addMapping(e){return new N(I(this.done,e),I(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let i=0==e?this.done:this.undone;if(0==i.length)return null;let s=i[i.length-1],r=s.selectionsAfter[0]||t.selection;if(n&&s.selectionsAfter.length){let n,o;return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:d.of({side:e,rest:(n=i[i.length-1],(o=i.slice())[i.length-1]=n.setSelAfter(n.selectionsAfter.slice(0,n.selectionsAfter.length-1)),o),selection:r}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0})}if(!s.changes)return null;{let n=1==i.length?C:i.slice(0,i.length-1);return s.mapped&&(n=I(n,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:d.of({side:e,rest:n,selection:r}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}}}N.empty=new N(C,C);let D=[{key:"Mod-z",run:y,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:b,preventDefault:!0},{linux:"Ctrl-Shift-z",run:b,preventDefault:!0},{key:"Mod-u",run:w,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:S,preventDefault:!0}];function M(e,t){return i.OF.create(e.ranges.map(t),e.mainIndex)}function B(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function E({state:e,dispatch:t},n){let i=M(e.selection,n);return!i.eq(e.selection,!0)&&(t(B(e,i)),!0)}function R(e,t){return i.OF.cursor(t?e.to:e.from)}function z(e,t){return E(e,n=>n.empty?e.moveByChar(n,t):R(n,t))}function L(e){return e.textDirectionAt(e.state.selection.main.head)==s.OP.LTR}let F=e=>z(e,!L(e)),Q=e=>z(e,L(e));function j(e,t){return E(e,n=>n.empty?e.moveByGroup(n,t):R(n,t))}function U(e,t,n){let s,l,a=(0,r.mv)(e).resolveInner(t.head),h=n?o.uY.closedBy:o.uY.openedBy;for(let i=t.head;;){let t=n?a.childAfter(i):a.childBefore(i);if(!t)break;!function(e,t,n){if(t.type.prop(n))return!0;let i=t.to-t.from;return i&&(i>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}(e,t,h)?i=n?t.to:t.from:a=t}return l=a.type.prop(h)&&(s=n?(0,r.jU)(e,a.from,1):(0,r.jU)(e,a.to,-1))&&s.matched?n?s.end.to:s.end.from:n?a.to:a.from,i.OF.cursor(l,n?-1:1)}function q(e,t){return E(e,n=>{if(!n.empty)return R(n,t);let i=e.moveVertically(n,t);return i.head!=n.head?i:e.moveToLineBoundary(n,t)})}"undefined"!=typeof Intl&&Intl.Segmenter;let $=e=>q(e,!1),V=e=>q(e,!0);function J(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,i=0,r;if(t){for(let t of e.state.facet(s.Lz.scrollMargins)){let s=t(e);(null==s?void 0:s.top)&&(n=Math.max(null==s?void 0:s.top,n)),(null==s?void 0:s.bottom)&&(i=Math.max(null==s?void 0:s.bottom,i))}r=e.scrollDOM.clientHeight-n-i}else r=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:t,height:Math.max(e.defaultLineHeight,r-5)}}function Z(e,t){let n,i=J(e),{state:r}=e,o=M(r.selection,n=>n.empty?e.moveVertically(n,t,i.height):R(n,t));if(o.eq(r.selection))return!1;if(i.selfScroll){let t=e.coordsAtPos(r.selection.main.head),l=e.scrollDOM.getBoundingClientRect(),a=l.top+i.marginTop,h=l.bottom-i.marginBottom;t&&t.top>a&&t.bottom<h&&(n=s.Lz.scrollIntoView(o.main.head,{y:"start",yMargin:t.top-a}))}return e.dispatch(B(r,o),{effects:n}),!0}let W=e=>Z(e,!1),H=e=>Z(e,!0);function X(e,t,n){let s=e.lineBlockAt(t.head),r=e.moveToLineBoundary(t,n);if(r.head==t.head&&r.head!=(n?s.to:s.from)&&(r=e.moveToLineBoundary(t,n,!1)),!n&&r.head==s.from&&s.length){let n=/^\s*/.exec(e.state.sliceDoc(s.from,Math.min(s.from+100,s.to)))[0].length;n&&t.head!=s.from+n&&(r=i.OF.cursor(s.from+n))}return r}function Y(e,t){let n=M(e.state.selection,e=>{let n=t(e);return i.OF.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch(B(e.state,n)),!0)}function K(e,t){return Y(e,n=>e.moveByChar(n,t))}let G=e=>K(e,!L(e)),ee=e=>K(e,L(e));function et(e,t){return Y(e,n=>e.moveByGroup(n,t))}function en(e,t){return Y(e,n=>e.moveVertically(n,t))}let ei=e=>en(e,!1),es=e=>en(e,!0);function er(e,t){return Y(e,n=>e.moveVertically(n,t,J(e).height))}let eo=e=>er(e,!1),el=e=>er(e,!0),ea=({state:e,dispatch:t})=>(t(B(e,{anchor:0})),!0),eh=({state:e,dispatch:t})=>(t(B(e,{anchor:e.doc.length})),!0),ec=({state:e,dispatch:t})=>(t(B(e,{anchor:e.selection.main.anchor,head:0})),!0),eu=({state:e,dispatch:t})=>(t(B(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function ef(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange(s=>{let{from:r,to:o}=s;if(r==o){let i=t(s);i<r?(n="delete.backward",i=ed(e,i,!1)):i>r&&(n="delete.forward",i=ed(e,i,!0)),r=Math.min(r,i),o=Math.max(o,i)}else r=ed(e,r,!1),o=ed(e,o,!0);return r==o?{range:s}:{changes:{from:r,to:o},range:i.OF.cursor(r,r<s.head?-1:1)}});return!o.changes.empty&&(e.dispatch(r.update(o,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?s.Lz.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ed(e,t,n){if(e instanceof s.Lz)for(let i of e.state.facet(s.Lz.atomicRanges).map(t=>t(e)))i.between(t,t,(e,i)=>{e<t&&i>t&&(t=n?i:e)});return t}let ep=(e,t,n)=>ef(e,s=>{let o=s.from,{state:l}=e,a=l.doc.lineAt(o),h,c;if(n&&!t&&o>a.from&&o<a.from+200&&!/[^ \t]/.test(h=a.text.slice(0,o-a.from))){if("	"==h[h.length-1])return o-1;let e=(0,i.y$)(h,l.tabSize)%(0,r.tp)(l)||(0,r.tp)(l);for(let t=0;t<e&&" "==h[h.length-1-t];t++)o--;c=o}else(c=(0,i.zK)(a.text,o-a.from,t,t)+a.from)==o&&a.number!=(t?l.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(a.text.slice(c-a.from,o-a.from))&&(c=(0,i.zK)(a.text,c-a.from,!1,!1)+a.from);return c}),em=e=>ep(e,!1,!0),eg=e=>ep(e,!0,!1),ek=(e,t)=>ef(e,n=>{let s=n.head,{state:r}=e,o=r.doc.lineAt(s),l=r.charCategorizer(s);for(let e=null;;){if(s==(t?o.to:o.from)){s==n.head&&o.number!=(t?r.doc.lines:1)&&(s+=t?1:-1);break}let a=(0,i.zK)(o.text,s-o.from,t)+o.from,h=o.text.slice(Math.min(s,a)-o.from,Math.max(s,a)-o.from),c=l(h);if(null!=e&&c!=e)break;(" "!=h||s!=n.head)&&(e=c),s=a}return s}),ev=e=>ek(e,!1);function ex(e){let t=[],n=-1;for(let i of e.selection.ranges){let s=e.doc.lineAt(i.from),r=e.doc.lineAt(i.to);if(i.empty||i.to!=r.from||(r=e.doc.lineAt(i.to-1)),n>=s.number){let e=t[t.length-1];e.to=r.to,e.ranges.push(i)}else t.push({from:s.from,to:r.to,ranges:[i]});n=r.number+1}return t}
1function ey(e,t,n){if(e.readOnly)return!1;let s=[],r=[];for(let t of ex(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),l=o.length+1;if(n)for(let n of(s.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak}),t.ranges))r.push(i.OF.range(Math.min(e.doc.length,n.anchor+l),Math.min(e.doc.length,n.head+l)));else for(let n of(s.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text}),t.ranges))r.push(i.OF.range(n.anchor-l,n.head-l))}return!!s.length&&(t(e.update({changes:s,scrollIntoView:!0,selection:i.OF.create(r,e.selection.mainIndex),userEvent:"move.line"})),!0)}function eb(e,t,n){if(e.readOnly)return!1;let i=[];for(let t of ex(e))n?i.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):i.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}let ew=({state:e,dispatch:t})=>(t(e.update(e.replaceSelection(e.lineBreak),{scrollIntoView:!0,userEvent:"input"})),!0),eS=eA(!1),eO=eA(!0);function eA(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let s=t.changeByRange(n=>{let{from:s,to:l}=n,a=t.doc.lineAt(s),h=!e&&s==l&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=(0,r.mv)(e).resolveInner(t),i=n.childBefore(t),s=n.childAfter(t),l;return i&&s&&i.to<=t&&s.from>=t&&(l=i.type.prop(o.uY.closedBy))&&l.indexOf(s.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(s.from).from&&!/\S/.test(e.sliceDoc(i.to,s.from))?{from:i.to,to:s.from}:null}(t,s);e&&(s=l=(l<=a.to?a:t.doc.lineAt(l)).to);let c=new r.KB(t,{simulateBreak:s,simulateDoubleBreak:!!h}),u=(0,r._v)(c,s);for(null==u&&(u=(0,i.y$)(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));l<a.to&&/\s/.test(a.text[l-a.from]);)l++;h?{from:s,to:l}=h:s>a.from&&s<a.from+100&&!/\S/.test(a.text.slice(0,s))&&(s=a.from);let f=["",(0,r.EI)(t,u)];return h&&f.push((0,r.EI)(t,c.lineIndent(a.from,-1))),{changes:{from:s,to:l,insert:i.EY.of(f)},range:i.OF.cursor(s+1+f[1].length)}});return n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0}}function e_(e,t){let n=-1;return e.changeByRange(s=>{let r=[];for(let i=s.from;i<=s.to;){let o=e.doc.lineAt(i);o.number>n&&(s.empty||s.to>o.from)&&(t(o,r,s),n=o.number),i=o.to+1}let o=e.changes(r);return{changes:r,range:i.OF.range(o.mapPos(s.anchor,1),o.mapPos(s.head,1))}})}let eC=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(e_(e,(t,n)=>{n.push({from:t.from,insert:e.facet(r.Xt)})}),{userEvent:"input.indent"})),!0),eP=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(e_(e,(t,n)=>{let s=/^\s*/.exec(t.text)[0];if(!s)return;let o=(0,i.y$)(s,e.tabSize),l=0,a=(0,r.EI)(e,Math.max(0,o-(0,r.tp)(e)));for(;l<s.length&&l<a.length&&s.charCodeAt(l)==a.charCodeAt(l);)l++;n.push({from:t.from+l,to:t.from+s.length,insert:a.slice(l)})}),{userEvent:"delete.dedent"})),!0),eI=[{key:"Ctrl-b",run:F,shift:G,preventDefault:!0},{key:"Ctrl-f",run:Q,shift:ee},{key:"Ctrl-p",run:$,shift:ei},{key:"Ctrl-n",run:V,shift:es},{key:"Ctrl-a",run:e=>E(e,t=>i.OF.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>Y(e,t=>i.OF.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>E(e,t=>i.OF.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>Y(e,t=>i.OF.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:eg},{key:"Ctrl-h",run:em},{key:"Ctrl-k",run:e=>ef(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})},{key:"Ctrl-Alt-h",run:ev},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:i.EY.of(["",""])},range:i.OF.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,s=e.doc.lineAt(n),r=n==s.from?n-1:(0,i.zK)(s.text,n-s.from,!1)+s.from,o=n==s.to?n+1:(0,i.zK)(s.text,n-s.from,!0)+s.from;return{changes:{from:r,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(r,n))},range:i.OF.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:H}],eT=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:e=>E(e,t=>U(e.state,t,!L(e))),shift:e=>Y(e,t=>U(e.state,t,!L(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>E(e,t=>U(e.state,t,L(e))),shift:e=>Y(e,t=>U(e.state,t,L(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>ey(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>eb(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>ey(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>eb(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,s=null;return n.ranges.length>1?s=i.OF.create([n.main]):n.main.empty||(s=i.OF.create([i.OF.cursor(n.main.head)])),!!s&&(t(B(e,s)),!0)}},{key:"Mod-Enter",run:eO},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=ex(e).map(({from:t,to:n})=>i.OF.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:i.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=M(e.selection,t=>{let n=(0,r.mv)(e),s=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=s.node.from&&e.node.to<=s.node.to&&(s=e)}for(let e=s;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return i.OF.range(n.to,n.from)}return t});return!n.eq(e.selection)&&(t(B(e,n)),!0)},preventDefault:!0},{key:"Mod-[",run:eP},{key:"Mod-]",run:eC},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),i=new r.KB(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),s=e_(e,(t,s,o)=>{let l=(0,r._v)(i,t.from);if(null==l)return;/\S/.test(t.text)||(l=0);let a=/^\s*/.exec(t.text)[0],h=(0,r.EI)(e,l);
1(a!=h||o.from<t.from+a.length)&&(n[t.from]=l,s.push({from:t.from,to:t.from+a.length,insert:h}))});return s.changes.empty||t(e.update(s,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(ex(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),i=M(t.selection,t=>{let n;if(e.lineWrapping){let i=e.lineBlockAt(t.head),s=e.coordsAtPos(t.head,t.assoc||1);s&&(n=i.bottom+e.documentTop-s.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>(function(e,t,n){let s=!1,o=M(e.selection,t=>{let o=(0,r.jU)(e,t.head,-1)||(0,r.jU)(e,t.head,1)||t.head>0&&(0,r.jU)(e,t.head-1,1)||t.head<e.doc.length&&(0,r.jU)(e,t.head+1,-1);if(!o||!o.end)return t;s=!0;let l=o.start.from==t.head?o.end.to:o.end.from;return n?i.OF.range(t.anchor,l):i.OF.cursor(l)});return!!s&&(t(B(e,o)),!0)})(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),i=u(e.state,n.from);return i.line?a(e):!!i.block&&c(e)}},{key:"Alt-A",run:h},{key:"Ctrl-m",mac:"Shift-Alt-m",run:e=>(e.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:F,shift:G,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>j(e,!L(e)),shift:e=>et(e,!L(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>E(e,t=>X(e,t,!L(e))),shift:e=>Y(e,t=>X(e,t,!L(e))),preventDefault:!0},{key:"ArrowRight",run:Q,shift:ee,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>j(e,L(e)),shift:e=>et(e,L(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>E(e,t=>X(e,t,L(e))),shift:e=>Y(e,t=>X(e,t,L(e))),preventDefault:!0},{key:"ArrowUp",run:$,shift:ei,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ea,shift:ec},{mac:"Ctrl-ArrowUp",run:W,shift:eo},{key:"ArrowDown",run:V,shift:es,preventDefault:!0},{mac:"Cmd-ArrowDown",run:eh,shift:eu},{mac:"Ctrl-ArrowDown",run:H,shift:el},{key:"PageUp",run:W,shift:eo},{key:"PageDown",run:H,shift:el},{key:"Home",run:e=>E(e,t=>X(e,t,!1)),shift:e=>Y(e,t=>X(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:ea,shift:ec},{key:"End",run:e=>E(e,t=>X(e,t,!0)),shift:e=>Y(e,t=>X(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:eh,shift:eu},{key:"Enter",run:eS,shift:eS},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:em,shift:em},{key:"Delete",run:eg},{key:"Mod-Backspace",mac:"Alt-Backspace",run:ev},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>ek(e,!0)},{mac:"Mod-Backspace",run:e=>ef(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)})},{mac:"Mod-Delete",run:e=>ef(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)})}].concat(eI.map(e=>({mac:e.key,run:e.run,shift:e.shift})))),eN={key:"Tab",run:eC,shift:eP}},5710:(e,t,n)=>{n.d(t,{Br:()=>eu,hi:()=>ec,Rv:()=>ea,j5:()=>ef,I$:()=>el,ll:()=>eo});var i=n(1710),s=n(895),r=n(5817),o=n(9977);class l{constructor(e,t,n,i,s,r,o,l,a,h=0,c){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=s,this.score=r,this.buffer=o,this.bufferBase=l,this.curContext=a,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new l(e,[],t,n,n,0,[],0,i?new a(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=65535&e,{parser:s}=this.p,r=this.reducePos<this.pos-25;r&&this.setLookAhead(this.pos);let o=s.dynamicPrecedence(i);if(o&&(this.score+=o),0==n){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(n-1)*3-(262144&e?6:0),a=l?this.stack[l-2]:this.p.ranges[0].from,h=this.reducePos-a;h>=2e3&&!(null===(t=this.p.parser.nodeSet.types[i])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=h));let c=l?this.stack[l-1]:0,u=this.bufferBase+this.buffer.length-c;if(i<s.minRepeatTerm||131072&e){let e=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,e,u+4,!0)}if(262144&e)this.state=this.stack[l];else{let e=this.stack[l-3];this.state=s.getGoto(e,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,a)}storeNode(e,t,n,i=4,s=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this,i=this.buffer.length;if(0==i&&e.parent&&(i=e.bufferBase-e.parent.bufferBase,e=e.parent),i>0&&0==e.buffer[i-4]&&e.buffer[i-1]>-1){if(t==n)return;if(e.buffer[i-2]>=t){e.buffer[i-2]=n;return}}}if(s&&this.pos!=n){let s=this.buffer.length;if(s>0&&0!=this.buffer[s-4]){let e=!1;for(let t=s;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;s>0&&this.buffer[s-2]>n;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=t,this.buffer[s+2]=n,this.buffer[s+3]=i}else this.buffer.push(e,t,n,i)}shift(e,t,n,i){if(131072&e)this.pushState(65535&e,this.pos);else if((262144&e)==0){let{parser:s}=this.p;(i>this.pos||t<=s.maxNode)&&(this.pos=i,s.stateFlag(e,1)||(this.reducePos=i)),this.pushState(e,n),this.shiftContext(t,n),t<=s.maxNode&&this.buffer.push(t,n,i,4)}else this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4)}apply(e,t,n,i){65536&e?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new l(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new h(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if((65536&n)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let i=0,s;i<t.length;i+=2)(s=t[i+1])!=this.state&&this.p.parser.hasAction(s,e)&&n.push(t[i],s);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let i=t[e+1];n.some((e,t)=>1&t&&e==i)||n.push(t[e],i)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let i=t[e+1];if(i==this.state)continue;let s=this.split();s.pushState(i,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(t[e],this.pos),s.reducePos=this.pos,s.score-=200,n.push(s)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((65536&t)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,i=65535&t,s=this.stack.length-3*n;if(s<0||0>e.getGoto(this.stack[s],i,!1)){let e=this.findForcedReduction();if(null==e)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,t=>{if(393216&t);else if(65536&t){let n=(t>>
vendor: 5,011 bytes, line 1
119)-s;if(n>1){let i=65535&t,s=this.stack.length-3*n;if(s>=0&&e.getGoto(this.stack[s],i,!1)>=0)return n<<19|65536|i}}else{let e=n(t,s+1);if(null!=e)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||-3!=this.buffer[e])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||-4!=this.buffer[e])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new a(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class a{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class h{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e>>19;0==t?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let n=this.start.p.parser.getGoto(this.stack[this.base-3],65535&e,!0);this.state=n}}class c{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new c(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new c(this.stack,this.pos,this.index)}}function u(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let i=0,s=0;i<e.length;){let r=0;for(;;){let t=e.charCodeAt(i++),n=!1;if(126==t){r=65535;break}t>=92&&t--,t>=34&&t--;let s=t-32;if(s>=46&&(s-=46,n=!0),r+=s,n)break;r*=46}n?n[s++]=r:n=new t(r)}return n}class f{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}let d=new f;class p{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=d,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<n.from;){if(!i)return null;let e=this.ranges[--i];s-=n.from-e.to,n=e}for(;t<0?s>n.to:s>=n.to;){if(i==this.ranges.length-1)return null;let e=this.ranges[++i];s+=e.from-n.to,n=e}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t<this.chunk.length)n=this.pos+e,i=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(null==t)return -1;if((n=t)>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}
1readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=d,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}}class m{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;v(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}m.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class g{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?u(e):e}token(e,t){let n=e.pos,i=0;for(;;){let n=e.next<0,s=e.resolveOffset(1,1);if(v(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(null==this.elseToken)return;if(!n&&i++,null==s)break;e.reset(s,e.token)}i&&(e.reset(n,e.token),e.acceptToken(this.elseToken,i))}}g.prototype.contextual=m.prototype.fallback=m.prototype.extend=!1;class k{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function v(e,t,n,i,s,r){let o=0,l=1<<i,{dialect:a}=n.p.parser;e:for(;(l&e[o])!=0;){let n=e[o+1];for(let i=o+3;i<n;i+=2)if((e[i+1]&l)>0){let n=e[i];if(a.allows(n)&&(-1==t.token.value||t.token.value==n||function(e,t,n,i){let s=x(n,i,t);return s<0||x(n,i,e)<s}(n,t.token.value,s,r))){t.acceptToken(n);break}}let i=t.next,h=0,c=e[o+2];if(t.next<0&&c>h&&65535==e[n+3*c-3]){o=e[n+3*c-1];continue}for(;h<c;){let s=h+c>>1,r=n+s+(s<<1),l=e[r],a=e[r+1]||65536;if(i<l)c=s;else if(i>=a)h=s+1;else{o=e[r+2],t.advance();continue e}}break}}function x(e,t,n){for(let i=t,s;65535!=(s=e[i]);i++)if(s==n)return i-t;return -1}let y=void 0!==o&&o.env&&/\bparse\b/.test(o.env.LOG),b=null;function w(e,t,n){let i=e.cursor(r.Qj.IncludeAnonymous);for(i.moveTo(t);;)if(!(n<0?i.childBefore(t):i.childAfter(t)))for(;;){if((n<0?i.to<t:i.from>t)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,t-25)):Math.min(e.length,Math.max(i.from+1,t+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:e.length}}class S{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?w(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?w(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],i=this.index[t];if(i==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=n.children[i],o=this.start[t]+n.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof r.PH){if(o==e){if(o<this.safeFrom)return null;let e=o+s.length;if(e<=this.safeTo){let t=s.prop(r.uY.lookAhead);if(!t||e+t<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}}class O{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new f)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:s}=i,r=i.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,l=0;for(let i=0;i<s.length;i++){if((1<<i&r)==0)continue;let a=s[i],h=this.tokens[i];if((!n||a.fallback)&&((a.contextual||h.start!=e.pos||h.mask!=r||h.context!=o)&&(this.updateCachedToken(h,a,e),h.mask=r,h.context=o),h.lookAhead>
1h.end+25&&(l=Math.max(h.lookAhead,l)),0!=h.value)){let i=t;if(h.extended>-1&&(t=this.addActions(e,h.extended,h.end,t)),t=this.addActions(e,h.value,h.end,t),!a.extend&&(n=h,t>i))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),n||e.pos!=this.stream.end||((n=new f).value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new f,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:t}=n.p;for(let i=0;i<t.specialized.length;i++)if(t.specialized[i]==e.value){let s=t.specializers[i](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){(1&s)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let t=0;t<i;t+=3)if(this.actions[t]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=n,i}addActions(e,t,n,i){let{state:s}=e,{parser:r}=e.p,{data:o}=r;for(let e=0;e<2;e++)for(let l=r.stateSlot(s,e?2:1);;l+=3){if(65535==o[l]){if(1==o[l+1])l=I(o,l+2);else{0==i&&2==o[l+1]&&(i=this.putAction(I(o,l+2),t,n,i));break}}o[l]==t&&(i=this.putAction(I(o,l+1),t,n,i))}return i}}class A{constructor(e,t,n,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new p(t,i),this.tokens=new O(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[l.start(this,e.top[0],s)],this.fragments=n.length&&this.stream.end-s>4*e.bufferLength?new S(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,i=this.minStackPos,s=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;r<n.length;r++){let o=n[r];for(;;){if(this.tokens.mainToken=null,o.pos>i)s.push(o);else{if(this.advanceStack(o,s,n))continue;e||(e=[],t=[]),e.push(o);let i=this.tokens.getMainToken(o);t.push(i.value,i.end)}break}}if(!s.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}(e);if(t)return y&&console.log("Finish with "+this.stackID(t)),this.stackToTree(t);if(this.parser.strict)throw y&&e&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),SyntaxError("No parse at "+i);this.recovering||(this.recovering=5)}if(this.recovering&&e){let n=null!=this.stoppedAt&&e[0].pos>this.stoppedAt?e[0]:this.runRecovery(e,t,s);if(n)return y&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(s.length>e)for(s.sort((e,t)=>t.score-e.score);s.length>e;)s.pop();s.some(e=>e.reducePos>i)&&this.recovering--}
1else if(s.length>1){t:for(let e=0;e<s.length-1;e++){let t=s[e];for(let n=e+1;n<s.length;n++){let i=s[n];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)s.splice(n--,1);else{s.splice(e--,1);continue t}}}}s.length>12&&s.splice(12,s.length-12)}this.minStackPos=s[0].pos;for(let e=1;e<s.length;e++)s[e].pos<this.minStackPos&&(this.minStackPos=s[e].pos);return null}stopAt(e){if(null!=this.stoppedAt&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let i=e.pos,{parser:s}=this,o=y?this.stackID(e)+" -> ":"";if(null!=this.stoppedAt&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let l=this.fragments.nodeAt(i);l;){let i=this.parser.nodeSet.types[l.type.id]==l.type?s.getGoto(e.state,l.type.id):-1;if(i>-1&&l.length&&(!t||(l.prop(r.uY.contextHash)||0)==n))return e.useNode(l,i),y&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(l.type.id)})`),!0;if(!(l instanceof r.PH)||0==l.children.length||l.positions[0]>0)break;let a=l.children[0];if(a instanceof r.PH&&0==l.positions[0])l=a;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),y&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(65535&l)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let a=this.tokens.getActions(e);for(let r=0;r<a.length;){let l=a[r++],h=a[r++],c=a[r++],u=r==a.length||!n,f=u?e:e.split(),d=this.tokens.mainToken;if(f.apply(l,h,d?d.start:f.pos,c),y&&console.log(o+this.stackID(f)+` (via ${(65536&l)==0?"shift":`reduce of ${s.getName(65535&l)}`} for ${s.getName(h)} @ ${i}${f==e?"":", split"})`),u)return!0;f.pos>i?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return _(e,t),!0}}runRecovery(e,t,n){let i=null,s=!1;for(let r=0;r<e.length;r++){let o=e[r],l=t[r<<1],a=t[(r<<1)+1],h=y?this.stackID(o)+" -> ":"";if(o.deadEnd&&(s||(s=!0,o.restart(),y&&console.log(h+this.stackID(o)+" (restarted)"),this.advanceFully(o,n))))continue;let c=o.split(),u=h;for(let e=0;c.forceReduce()&&e<10&&(y&&console.log(u+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,n));e++)y&&(u=this.stackID(c)+" -> ");for(let e of o.recoverByInsert(l))y&&console.log(h+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>o.pos?(a==o.pos&&(a++,l=0),o.recoverByDelete(l,a),y&&console.log(h+this.stackID(o)+` (via recover-delete ${this.parser.getName(l)})`),_(o,n)):(!i||i.score<o.score)&&(i=o)}return i}stackToTree(e){return e.close(),r.PH.build({buffer:c.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(b||(b=new WeakMap)).get(e);return t||b.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function _(e,t){for(let n=0;n<t.length;n++){let i=t[n];if(i.pos==e.pos&&i.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}class C{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||0==this.disabled[e]}}class P extends r.iX{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push("");let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),i=[];for(let e=0;e<t.length;e++)i.push([]);function s(e,t,n){i[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];"string"==typeof e&&(e=r.uY[e]);for(let n=1;n<t.length;){let i=t[n++];if(i>=0)s(i,e,t[n++]);else{let r=t[n+-i];for(let o=-i;o>0;o--)s(t[n++],e,r);n++}}}this.nodeSet=new r.fI(t.map((t,s)=>r.Z6.define({name:s>=this.minRepeatTerm?void 0:t,id:s,props:i[s],top:n.indexOf(s)>-1,error:0==s,skipped:e.skippedNodes&&e.skippedNodes.indexOf(s)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=r.cF;let o=u(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(T),this.states=u(e.states,Uint32Array),this.data=u(e.stateData),this.goto=u(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>"number"==typeof e?new m(o,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new A(this,e,t,n);for(let s of this.wrappers)i=s(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return -1;for(let s=i[t+1];;){let t=i[s++],r=1&t,o=i[s++];if(r&&n)return o;for(let n=s+(t>>1);s<n;s++)if(i[s]==e)return o;if(r)return -1}}hasAction(e,t){let n=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),r;;s+=3){if(65535==(r=n[s])){if(1==n[s+1])r=n[s=I(n,s+2)];
1else if(2==n[s+1])return I(n,s+2);else break}if(r==t||0==r)return I(n,s+1)}return 0}stateSlot(e,t){return this.states[6*e+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let n=this.stateSlot(e,1);null==i;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=I(this.data,n+2);else break}i=t(I(this.data,n+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1==this.data[n+1])n=I(this.data,n+2);else break}if((1&this.data[n+2])==0){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(P.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let s=e.specializers.find(e=>e.from==n.external);if(!s)return n;let r=Object.assign(Object.assign({},n),{external:s.to});return t.specializers[i]=T(r),r})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let i of e.split(" ")){let e=t.indexOf(i);e>=0&&(n[e]=!0)}let i=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],s;65535!=(s=this.data[n++]);)(i||(i=new Uint8Array(this.maxTerm+1)))[s]=1;return new C(e,n,i)}static deserialize(e){return new P(e)}}function I(e,t){return e[t]|e[t+1]<<16}function T(e){if(e.external){let t=e.extend?1:0;return(n,i)=>e.external(n,i)<<1|t}return e.get}var N=n(6490);function D(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function M(e,t,n){for(let i=!1;;){if(e.next<0)return;if(e.next==t&&!i){e.advance();return}i=n&&!i&&92==e.next,e.advance()}}function B(e,t){for(;95==e.next||D(e.next);)null!=t&&(t+=String.fromCharCode(e.next)),e.advance();return t}function E(e,t){for(;48==e.next||49==e.next;)e.advance();t&&e.next==t&&e.advance()}function R(e,t){for(;;){if(46==e.next){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(69==e.next||101==e.next)for(e.advance(),(43==e.next||45==e.next)&&e.advance();e.next>=48&&e.next<=57;)e.advance()}function z(e){for(;!(e.next<0||10==e.next);)e.advance()}function L(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}let F=" 	\r\n";function Q(e,t,n){let i=Object.create(null);for(let t of(i.true=i.false=5,i.null=i.unknown=6,e.split(" ")))t&&(i[t]=20);for(let e of t.split(" "))e&&(i[e]=21);for(let e of(n||"").split(" "))e&&(i[e]=24);return i}let j="array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying ",U="absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into 
1is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone ",q={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:"*+-%<>!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:Q(U,j)};function $(e){return new k(t=>{var n,i;let{next:s}=t;if(t.advance(),L(s,F)){for(;L(t.next,F);)t.advance();t.acceptToken(36)}else if(36==s&&e.doubleDollarQuotedStrings){let e=B(t,"");36==t.next&&(t.advance(),function(e,t){e:for(;;){if(e.next<0)return;if(36==e.next){e.advance();for(let n=0;n<t.length;n++){if(e.next!=t.charCodeAt(n))continue e;e.advance()}if(36==e.next){e.advance();return}}else e.advance()}}(t,e),t.acceptToken(3))}else if(39==s||34==s&&e.doubleQuotedStrings)M(t,s,e.backslashEscapes),t.acceptToken(3);else if(35==s&&e.hashComments||47==s&&47==t.next&&e.slashComments)z(t),t.acceptToken(1);else if(45!=s||45!=t.next||e.spaceAfterDashes&&32!=t.peek(1)){if(47==s&&42==t.next){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),42==n&&47==t.next){if(e--,t.advance(),!e)break}else 47==n&&42==t.next&&(e++,t.advance())}t.acceptToken(2)}else if((101==s||69==s)&&39==t.next)t.advance(),M(t,39,!0),t.acceptToken(3);else if((110==s||78==s)&&39==t.next&&e.charSetCasts)t.advance(),M(t,39,e.backslashEscapes),t.acceptToken(3);else if(95==s&&e.charSetCasts)for(let n=0;;n++){if(39==t.next&&n>1){t.advance(),M(t,39,e.backslashEscapes),t.acceptToken(3);break}if(!D(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(113==s||81==s)&&39==t.next&&t.peek(1)>0&&!L(t.peek(1),F)){let e=t.peek(1);t.advance(2),function(e,t){let n="[{<(".indexOf(String.fromCharCode(t)),i=n<0?t:"]}>)".charCodeAt(n);for(;;){if(e.next<0)return;if(e.next==i&&39==e.peek(1)){e.advance(2);return}e.advance()}}(t,e),t.acceptToken(3)}else if(40==s)t.acceptToken(7);else if(41==s)t.acceptToken(8);else if(123==s)t.acceptToken(9);else if(125==s)t.acceptToken(10);else if(91==s)t.acceptToken(11);else if(93==s)t.acceptToken(12);else if(59==s)t.acceptToken(13);else if(e.unquotedBitLiterals&&48==s&&98==t.next)t.advance(),E(t),t.acceptToken(22);else if((98==s||66==s)&&(39==t.next||34==t.next)){let n=t.next;t.advance(),e.treatBitsAsBytes?(M(t,n,e.backslashEscapes),t.acceptToken(23)):(E(t,n),t.acceptToken(22))}else if(48==s&&(120==t.next||88==t.next)||(120==s||88==s)&&39==t.next){let e=39==t.next;for(t.advance();(i=t.next)>=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70;)t.advance();e&&39==t.next&&t.advance(),t.acceptToken(4)}else if(46==s&&t.next>=48&&t.next<=57)R(t,!0),t.acceptToken(4);else if(46==s)t.acceptToken(14);else if(s>=48&&s<=57)R(t,!1),t.acceptToken(4);else if(L(s,e.operatorChars)){for(;L(t.next,e.operatorChars);)t.advance();t.acceptToken(15)}else if(L(s,e.specialVar))t.next==s&&t.advance(),function(e){if(39==e.next||34==e.next||96==e.next){let t=e.next;e.advance(),M(e,t,!1)}else B(e)}(t),t.acceptToken(17);else if(L(s,e.identifierQuotes))M(t,s,!1),t.acceptToken(19);else if(58==s||44==s)t.acceptToken(16);else if(D(s)){let i=B(t,String.fromCharCode(s));t.acceptToken(46==t.next||46==t.peek(-i.length-1)?18:null!==(n=e.words[i.toLowerCase()])&&void 0!==n?n:18)}}else z(t),t.acceptToken(1)})}let V=$(q),J=P.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)c
1QQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,V],topRules:{Script:[0,25]},tokenPrec:0});function Z(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function W(e,t){let n=e.sliceString(t.from,t.to),i=/^([`'"])(.*)\1$/.exec(n);return i?i[2]:n}function H(e){return e&&("Identifier"==e.name||"QuotedIdentifier"==e.name)}function X(e,t){for(let n=[];;){if(!t||"."!=t.name)return n;let i=Z(t);if(!H(i))return n;n.unshift(W(e,i)),t=Z(i)}}let Y=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" ")),K=/^\w*$/,G=/^[`'"]?\w*[`'"]?$/;function ee(e){return e.self&&"string"==typeof e.self.label}class et{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null));return t[e]||(e&&!this.list.some(t=>t.label==e)&&this.list.push(en(e,"type",this.idQuote,this.idCaseInsensitive)),t[e]=new et(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(t=>t.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion("string"==typeof t?en(t,"property",this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):ee(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],i=null,s=t.replace(/\\?\./g,e=>"."==e?"\0":e).split("\0"),r=this;ee(n)&&(i=n.self,n=n.children);for(let e=0;e<s.length;e++)i&&e==s.length-1&&r.addCompletion(i),r=r.child(s[e].replace(/\\\./g,"."));r.addNamespace(n)}}}function en(e,t,n,i){return RegExp("^[a-z_][a-z_\\d]*$",i?"i":"").test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+n}}let ei=J.configure({props:[i.Oh.add({Statement:(0,i.mz)()}),i.b_.add({Statement:(e,t)=>({from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}),BlockComment:e=>({from:e.from+2,to:e.to-2})}),(0,s.pn)({Keyword:s._A.keyword,Type:s._A.typeName,Builtin:s._A.standard(s._A.name),Bits:s._A.number,Bytes:s._A.string,Bool:s._A.bool,Null:s._A.null,Number:s._A.number,String:s._A.string,Identifier:s._A.name,QuotedIdentifier:s._A.special(s._A.string),SpecialVar:s._A.special(s._A.name),LineComment:s._A.lineComment,BlockComment:s._A.blockComment,Operator:s._A.operator,"Semi Punctuation":s._A.punctuation,"( )":s._A.paren,"{ }":s._A.brace,"[ ]":s._A.squareBracket})]});class es{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}static define(e){let t=function(e,t,n,i){let s={};for(let t in q)s[t]=(e.hasOwnProperty(t)?e:q)[t];return t&&(s.words=Q(t,n||"",i)),s}(e,e.keywords,e.types,e.builtin),n=i.bj.define({name:"sql",parser:ei.configure({tokenizers:[{from:V,to:$(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new es(t,n,e)}}function er(e,t){return{label:e,type:t,boost:-1}}function eo(e={}){var t,n,s,r,o,l,a;let h,c,u=e.dialect||el;
1return new i.Yy(u.language,[e.schema?(e.dialect||el).language.data.of({autocomplete:e.schema?(t=e.schema,n=e.tables,s=e.schemas,r=e.defaultTable,o=e.defaultSchema,h=new et((null===(a=null==(l=e.dialect||el)?void 0:l.spec.identifierQuotes)||void 0===a?void 0:a[0])||'"',!!(null==l?void 0:l.spec.caseInsensitiveIdentifiers)),c=o?h.child(o):null,h.addNamespace(t),n&&(c||h).addCompletions(n),s&&h.addCompletions(s),c&&h.addCompletions(c.list),r&&h.addCompletions((c||h).child(r).list),e=>{var t,n,s;let o,l;let{parents:a,from:u,quoted:f,empty:d,aliases:p}=(t=e.state,n=e.pos,o=(0,i.mv)(t).resolveInner(n,-1),l=function(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;"Statement"==e.name&&(n=e)}let i=null;for(let t=n.firstChild,s=!1,r=null;t;t=t.nextSibling){let n="Keyword"==t.name?e.sliceString(t.from,t.to).toLowerCase():null,o=null;if(s){if("as"==n&&r&&H(t.nextSibling))o=W(e,t.nextSibling);else if(n&&Y.has(n))break;else r&&H(t)&&(o=W(e,t))}else s="from"==n;o&&(i||(i=Object.create(null)),i[o]=function(e,t){if("CompositeIdentifier"==t.name){let n=[];for(let i=t.firstChild;i;i=i.nextSibling)H(i)&&n.push(W(e,i));return n}return[W(e,t)]}(e,r)),r=/Identifier$/.test(t.name)?t:null}return i}(t.doc,o),"Identifier"==o.name||"QuotedIdentifier"==o.name||"Keyword"==o.name?{from:o.from,quoted:"QuotedIdentifier"==o.name?t.doc.sliceString(o.from,o.from+1):null,parents:X(t.doc,Z(o)),aliases:l}:"."==o.name?{from:n,quoted:null,parents:X(t.doc,o),aliases:l}:{from:n,quoted:null,parents:[],empty:!0,aliases:l});if(d&&!e.explicit)return null;p&&1==a.length&&(a=p[a[0]]||a);let m=h;for(let e of a){for(;!m.children||!m.children[e];)if(m==h&&c)m=c;else{if(m!=c||!r)return null;m=m.child(r)}let t=m.maybeChild(e);if(!t)return null;m=t}let g=f&&e.state.sliceDoc(e.pos,e.pos+1)==f,k=m.list;return m==h&&p&&(k=k.concat(Object.keys(p).map(e=>({label:e,type:"constant"})))),{from:u,to:g?e.pos+1:void 0,options:(s=k,f?s.map(e=>Object.assign(Object.assign({},e),{label:e.label[0]==f?e.label:f+e.label+f,apply:void 0})):s),validFor:f?G:K}}):()=>null}):[],u.language.data.of({autocomplete:function(e,t=!1,n){var i,s;let r;return i=e.dialect.words,s=n||er,r=Object.keys(i).map(e=>{var n;return s(t?e.toUpperCase():e,21==(n=i[e])?"type":20==n?"keyword":"variable")}),(0,N.Ar)(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],(0,N.et)(r))}(u,e.upperCaseKeywords,e.keywordCompletion)})])}let el=es.define({}),ea=es.define({charSetCasts:!0,doubleDollarQuotedStrings:!0,operatorChars:"+-*/<>=~!@#%^&|`?",specialVar:"",keywords:U+"abort abs absent access according ada admin aggregate alias also always analyse analyze array_agg array_max_cardinality asensitive assert assignment asymmetric atomic attach attribute attributes avg backward base64 begin_frame begin_partition bernoulli bit_length blocked bom cache called cardinality catalog_name ceil ceiling chain char_length character_length character_set_catalog character_set_name character_set_schema characteristics characters checkpoint class class_origin cluster coalesce cobol collation_catalog collation_name collation_schema collect column_name columns command_function command_function_code comment comments committed concurrently condition_number configuration conflict connection_name constant constraint_catalog constraint_name constraint_schema contains content control conversion convert copy corr cost covar_pop covar_samp csv cume_dist current_catalog current_row current_schema cursor_name database datalink datatype datetime_interval_code datetime_interval_precision db debug defaults defined definer degree delimiter delimiters dense_rank depends derived detach detail dictionary disable discard dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue document dump dynamic_function dynamic_function_code element elsif empty enable encoding encrypted end_frame end_partition endexec enforced enum errcode error event every exclude excluding exclusive exp explain expression extension extract family file filter final first_value flag floor following force foreach fortran forward frame_row freeze fs functions fusion generated granted greatest groups handler header hex hierarchy hint id ignore ilike immediately immutable implementation implicit import include including increment indent index indexes info inherit inherits inline insensitive instance instantiable instead integrity intersection invoker isnull key_member key_type label lag last_value lead leakproof least length library like_regex link listen ln load location lock locked log logged lower mapping matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text min minvalue mod mode more move multiset mumps name namespace nfc nfd nfkc nfkd nil normalize normalized nothing notice notify notnull nowait nth_value ntile nullable nullif nulls number occurrences_regex octet_length octets off offset oids operator options ordering others over overlay overriding owned owner parallel parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partition pascal passing passthrough password percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding prepared print_strict_params procedural procedures program publication query quote raise range rank reassign recheck recovery refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex rename repeatable replace replica requiring reset respect restart restore result_oid returned_cardinality returned_length returned_octet_length returned_sqlstate returning reverse routine_catalog routine_name routine_schema routines row_count row_number rowtype rule scale schema_name schemas scope scope_catalog scope_name scope_schema security selective self sensitive sequence sequences serializable server server_name setof share show simple skip slice snapshot source specific_name sqlcode sqlerror sqrt stable stacked standalone statement statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time table_name tables tablesample tablespace temp template ties token top_level_count transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex trigger_catalog trigger_name trigger_schema trim trim_array truncate trusted type types uescape unbounded uncommitted unencrypted unlink unlisten unlogged unnamed untyped upper uri use_column use_variable user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema vacuum valid validate validator value_of var_pop var_samp varbinary variable_conflict variadic verbose version versioning views volatile warning whitespace width_bu
1cket window within wrapper xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate yes",types:j+"bigint int8 bigserial serial8 varbit bool box bytea cidr circle precision float8 inet int4 json jsonb line lseg macaddr macaddr8 money numeric pg_lsn point polygon float4 int2 smallserial serial2 serial serial4 text timetz timestamptz tsquery tsvector txid_snapshot uuid xml"}),eh=j+"bool blob long longblob longtext medium mediumblob mediumint mediumtext tinyblob tinyint tinytext text bigint int1 int2 int3 int4 int8 float4 float8 varbinary varcharacter precision datetime unsigned signed",ec=es.define({operatorChars:"*+-%<>!=&|^",charSetCasts:!0,doubleQuotedStrings:!0,unquotedBitLiterals:!0,hashComments:!0,spaceAfterDashes:!0,specialVar:"@?",identifierQuotes:"`",keywords:U+"group_concat accessible algorithm analyze asensitive authors auto_increment autocommit avg avg_row_length binlog btree cache catalog_name chain change changed checkpoint checksum class_origin client_statistics coalesce code collations columns comment committed completion concurrent consistent contains contributors convert database databases day_hour day_microsecond day_minute day_second delay_key_write delayed delimiter des_key_file dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile enable enclosed ends engine engines enum errors escaped even event events every explain extended fast field fields flush force found_rows fulltext grants handler hash high_priority hosts hour_microsecond hour_minute hour_second ignore ignore_server_ids import index index_statistics infile innodb insensitive insert_method install invoker iterate keys kill linear lines list load lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modify mutex mysql_errno no_write_to_binlog offline offset one online optimize optionally outfile pack_keys parser partition partitions password phase plugin plugins prev processlist profile profiles purge query quick range read_write rebuild recover regexp relaylog remove rename reorganize repair repeatable replace require resume rlike row_format rtree schedule schema_name schemas second_microsecond security sensitive separator serializable server share show slave slow snapshot soname spatial sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result ssl starting starts std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace terminated triggers truncate uncommitted uninstall unlock upgrade use use_frm user_resources user_statistics utc_date utc_time utc_timestamp variables views warnings xa xor year_month zerofill",types:eh,builtin:"charset clear edit ego help nopager notee nowarning pager print prompt quit rehash source status system tee"}),eu=es.define({keywords:U+"trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock pivot readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx unpivot updlock with",types:j+"bigint smallint smallmoney tinyint money real text nvarchar ntext varbinary image hierarchyid uniqueidentifier sql_variant xml",builtin:"binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id",operatorChars:"*+-%<>!=^&|/",specialVar:"@"}),ef=es.define({keywords:U+"abort analyze attach autoincrement conflict database detach exclusive fail glob ignore index indexed instead isnull notnull offset plan pragma query raise regexp reindex rename replace temp vacuum virtual",types:j+"bool blob long longblob longtext medium mediumblob mediumint mediumtext tinyblob tinyint tinytext text bigint int2 int8 unsigned signed real",builtin:"auth backup bail changes clone databases dbinfo dump echo eqp explain fullschema headers help import imposter indexes iotrace lint load log mode nullvalue once print prompt quit restore save scanstats separator shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width",operatorChars:"*+-%<>!=&|/~",identifierQuotes:'`"',specialVar:"@:?$"})},1710:(e,t,n)=>{n.d(t,{BH:()=>S,EI:()=>P,KB:()=>T,Lv:()=>ei,Oh:()=>N,SG:()=>ey,WD:()=>R,Xt:()=>_,Yy:()=>O,Zt:()=>ef,_v:()=>I,b_:()=>L,bj:()=>d,cr:()=>er,f7:()=>W,jU:()=>eO,mv:()=>p,mz:()=>E,tp:()=>C,y9:()=>eh});var i,s=n(5817),r=n(2809),o=n(5622),l=n(895),a=n(5002);let h=new s.uY,c=new s.uY;class u{constructor(e,t,n=[],i=""){this.data=e,this.name=i,r.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(r.$t.prototype,"tree",{get(){return p(this)}}),this.parser=t,this.extension=[S.of(this),r.$t.languageData.of((e,t,n)=>{let i=f(e,t,n),s=i.type.prop(h);if(!s)return[];let r=e.facet(s),o=i.type.prop(c);if(o){let s=i.resolve(t-i.from,n);for(let t of o)if(t.test(s,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(r)}}return r})].concat(n)}isActiveAt(e,t,n=-1){return f(e,t,n).type.prop(h)==this.data}findRegions(e){let t=e.facet(S);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(e,t)=>{if(e.prop(h)==this.data){n.push({from:t,to:t+e.length});return}let r=e.prop(s.uY.mounted);if(r){if(r.tree.prop(h)==this.data){if(r.overlay)for(let e of r.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(r.overlay){let e=n.length;if(i(r.tree,r.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let r=e.children[n];r instanceof s.PH&&i(r,e.positions[n]+t)}};return i(p(e),0),n}get allowsNesting(){return!0}}function f(e,t,n){let i=e.facet(S),r=p(e).topNode;if(!i||i.allowsNesting)for(let e=r;e;e=e.enter(t,n,s.Qj.ExcludeBuffers))e.type.isTop&&(r=e);return r}u.setState=r.Pe.define();class d extends u{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(e){var t;let n=(t=e.languageData,r.sj.define({combine:t?e=>e.concat(t):void 0}));return new d(n,e.parser.configure({props:[h.add(e=>e.isTop?n:void 0)]}),e.name)}configure(e,t){return new d(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function p(e){let t=e.field(u.state,!1);return t?t.tree:s.PH.empty}class m{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let g=null;class k{constructor(e,t,n=[],i,s,r,o,l){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=s,this.viewport=r,this.skipped=o,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new k(e,t,[],s.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new m(this.state.doc),this.fragments)}work(e,t){return(null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=s.PH.empty&&this.isDone(null!=t?t:this.state.doc.length))?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i){if(this.fragments=this.withoutTempSkipped(s.rr.addTree(i,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=i,this.parse=null,!(this.treeLen<(null!=t?t:this.state.doc.length)))return!0;this.parse=this.startParse()}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(s.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=g;g=this;try{return e()}finally{g=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=v(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:r,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,i,s)=>t.push({fromA:e,toA:n,fromB:i,toB:s})),n=s.rr.applyChanges(n,t),i=s.PH.empty,r=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length)for(let t of(l=[],this.skipped)){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);n<i&&l.push({from:n,to:i})}}return new k(this.parser,t,n,i,r,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:i}=this.skipped[t];n<e.to&&i>e.from&&(this.fragments=v(this.fragments,n,i),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends s.iX{createParse(t,n,i){let r=i[0].from,o=i[i.length-1].to;return{parsedPos:r,advance(){let t=g;if(t){for(let e of i)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new s.PH(s.Z6.none,[],[],o-r)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return g}}function v(e,t,n){return s.rr.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class x{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new x(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=k.create(e.facet(S).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new x(n)}}u.state=r.sU.define({create:x.init,update(e,t){for(let e of t.effects)if(e.is(u.setState))return e.value;return t.startState.facet(S)!=t.state.facet(S)?x.init(t.state):e.apply(t)}});let y=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(y=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});let b="undefined"!=typeof navigator&&(null===(i=navigator.scheduling)||void 0===i?void 0:i.isInputPending)?()=>navigator.scheduling.isInputPending():null,w=o.Z9.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(u.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(u.state);
1t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=y(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:i}}=this.view,s=n.field(u.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let r=Date.now()+Math.min(this.chunkBudget,100,e&&!b?Math.max(25,e.timeRemaining()-5):1e9),o=s.context.treeLen<i&&n.doc.length>i+1e3,l=s.context.work(()=>b&&b()||Date.now()>r,i+(o?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:u.setState.of(new x(s.context))})),this.chunkBudget>0&&!(l&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>(0,o.c_)(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),S=r.sj.define({combine:e=>e.length?e[0]:null,enables:e=>[u.state,w,o.Lz.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class O{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}let A=r.sj.define(),_=r.sj.define({combine:e=>{if(!e.length)return"  ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function C(e){let t=e.facet(_);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function P(e,t){let n="",i=e.tabSize,s=e.facet(_)[0];if("	"==s){for(;t>=i;)n+="	",t-=i;s=" "}for(let e=0;e<t;e++)n+=s;return n}function I(e,t){for(let n of(e instanceof r.$t&&(e=new T(e)),e.state.facet(A))){let i=n(e,t);if(void 0!==i)return i}let n=p(e.state);return n.length>=t?function(e,t,n){let i=t.resolveStack(n),s=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(s!=i.node){let e=[];for(let t=s;t&&!(t.from==i.node.from&&t.type==i.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)i={node:e[t],next:i}}return D(i,e,n)}(e,n,t):null}class T{constructor(e,t={}){this.state=e,this.options=t,this.unit=C(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return null!=i&&i>=n.from&&i<=n.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:n.text.slice(i-n.from),from:i}:{text:n.text.slice(0,i-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:i}=this.lineAt(e,t);return n.slice(e-i,Math.min(n.length,e+100-i))}column(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.countColumn(n,e-i),r=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return r>-1&&(s+=r-this.countColumn(n,n.search(/\S|$/))),s}countColumn(e,t=e.length){return(0,r.y$)(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let e=s(i);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}let N=new s.uY;function D(e,t,n){for(let i=e;i;i=i.next){let e=function(e){let t=e.type.prop(N);if(t)return t;let n=e.firstChild,i;if(n&&(i=n.type.prop(s.uY.closedBy))){let t=e.lastChild,n=t&&i.indexOf(t.name)>-1;return e=>(function(e,t,n,i,s){let r=e.textAfter,o=r.match(/^\s*/)[0].length,l=i&&r.slice(o,o+i.length)==i||s==e.pos+o,a=t?function(e){let t=e.node,n=t.childAfter(t.from),i=t.lastChild;if(!n)return null;let s=e.options.simulateBreak,r=e.state.doc.lineAt(n.from),o=null==s||s<=r.from?r.to:Math.min(r.to,s);for(let e=n.to;;){let s=t.childAfter(e);if(!s||s==i)return null;if(!s.type.isSkipped){if(s.from>=o)return null;let e=/^ */.exec(r.text.slice(n.to-r.from))[0].length;return{from:n.from,to:n.to+e}}e=s.to}}(e):null;return a?l?e.column(a.from):e.column(a.to):e.baseIndent+(l?0:1*e.unit)})(e,!0,1,void 0,n&&!(e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak)?t.from:void 0)}return null==e.parent?M:null}(i.node);
1if(e)return e(B.create(t,n,i))}return 0}function M(){return 0}class B extends T{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new B(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(function(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return D(this.context.next,this.base,this.pos)}}function E({except:e,units:t=1}={}){return n=>{let i=e&&e.test(n.textAfter);return n.baseIndent+(i?0:t*n.unit)}}function R(){return r.$t.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:i}=e.newSelection.main,s=n.lineAt(i);if(i>s.from+200)return e;let r=n.sliceString(s.from,i);if(!t.some(e=>e.test(r)))return e;let{state:o}=e,l=-1,a=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==l)continue;l=t.from;let n=I(o,t.from);if(null==n)continue;let i=/^\s*/.exec(t.text)[0],s=P(o,n);i!=s&&a.push({from:t.from,to:t.from+i.length,insert:s})}return a.length?[e,{changes:a,sequential:!0}]:e})}let z=r.sj.define(),L=new s.uY;function F(e,t,n){for(let i of e.facet(z)){let s=i(e,t,n);if(s)return s}return function(e,t,n){let i=p(e);if(i.length<n)return null;let s=i.resolveStack(n,1),r=null;for(let o=s;o;o=o.next){let s=o.node;if(s.to<=n||s.from>n)continue;if(r&&s.from<t)break;let l=s.type.prop(L);if(l&&(s.to<i.length-50||i.length==e.doc.length||!function(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}(s))){let i=l(s,e);i&&i.from<=n&&i.from>=t&&i.to>n&&(r=i)}}return r}(e,t,n)}function Q(e,t){let n=t.mapPos(e.from,1),i=t.mapPos(e.to,-1);return n>=i?void 0:{from:n,to:i}}let j=r.Pe.define({map:Q}),U=r.Pe.define({map:Q});function q(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}let $=r.sU.define({create:()=>o.NZ.none,update(e,t){for(let n of(e=e.map(t.changes),t.effects))if(n.is(j)&&!function(e,t,n){let i=!1;return e.between(t,t,(e,s)=>{e==t&&s==n&&(i=!0)}),i}(e,n.value.from,n.value.to)){let{preparePlaceholder:i}=t.state.facet(X),s=i?o.NZ.replace({widget:new ee(i(t.state,n.value))}):G;e=e.update({add:[s.range(n.value.from,n.value.to)]})}else n.is(U)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:i}=t.selection.main;e.between(i,i,(e,t)=>{e<i&&t>i&&(n=!0)}),n&&(e=e.update({filterFrom:i,filterTo:i,filter:(e,t)=>t<=i||e>=i}))}return e},provide:e=>o.Lz.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n<e.length;){let i=e[n++],s=e[n++];if("number"!=typeof i||"number"!=typeof s)throw RangeError("Invalid JSON for fold state");t.push(G.range(i,s))}return o.NZ.set(t,!0)}});function V(e,t,n){var i;let s=null;return null===(i=e.field($,!1))||void 0===i||i.between(t,n,(e,t)=>{(!s||s.from>e)&&(s={from:e,to:t})}),s}function J(e,t){return e.field($,!1)?t:t.concat(r.Pe.appendConfig.of(Y()))}function Z(e,t,n=!0){let i=e.state.doc.lineAt(t.from).number,s=e.state.doc.lineAt(t.to).number;return o.Lz.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${e.state.phrase("to")} ${s}.`)}let W=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of q(e)){let n=F(e.state,t.from,t.to);if(n)return e.dispatch({effects:J(e.state,[j.of(n),Z(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field($,!1))return!1;let t=[];for(let n of q(e)){let i=V(e.state,n.from,n.to);i&&t.push(U.of(i),Z(e,i,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let i=0;i<t.doc.length;){let s=e.lineBlockAt(i),r=F(t,s.from,s.to);r&&n.push(j.of(r)),i=(r?e.lineBlockAt(r.to):s).to+1}return n.length&&e.dispatch({effects:J(e.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:e=>{let t=e.state.field($,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(U.of({from:e,to:t}))}),e.dispatch({effects:n}
1),!0}}],H={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},X=r.sj.define({combine:e=>(0,r.QR)(e,H)});function Y(e){let t=[$,es];return e&&t.push(X.of(e)),t}function K(e,t){let{state:n}=e,i=n.facet(X),s=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),i=V(e.state,n.from,n.to);i&&e.dispatch({effects:U.of(i)}),t.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(e,s,t);let r=document.createElement("span");return r.textContent=i.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=s,r}let G=o.NZ.replace({widget:new class extends o.xO{toDOM(e){return K(e,null)}}});class ee extends o.xO{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return K(e,this.value)}}let et={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class en extends o.wJ{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function ei(e={}){let t=Object.assign(Object.assign({},et),e),n=new en(t,!0),i=new en(t,!1),s=o.Z9.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(S)!=e.state.facet(S)||e.startState.field($,!1)!=e.state.field($,!1)||p(e.startState)!=p(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new r.vB;for(let s of e.viewportLineBlocks){let r=V(e.state,s.from,s.to)?i:F(e.state,s.from,s.to)?n:null;r&&t.add(s.from,s.from,r)}return t.finish()}}),{domEventHandlers:l}=t;return[s,(0,o.cU)({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(s))||void 0===t?void 0:t.markers)||r.om.empty},initialSpacer:()=>new en(t,!1),domEventHandlers:Object.assign(Object.assign({},l),{click:(e,t,n)=>{if(l.click&&l.click(e,t,n))return!0;let i=V(e.state,t.from,t.to);if(i)return e.dispatch({effects:U.of(i)}),!0;let s=F(e.state,t.from,t.to);return!!s&&(e.dispatch({effects:j.of(s)}),!0)}})}),Y()]}let es=o.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class er{constructor(e,t){let n;function i(e){let t=a.G.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;let s="string"==typeof t.all?t.all:t.all?i(t.all):void 0,r=t.scope;this.scope=r instanceof u?e=>e.prop(h)==r.data:r?e=>e==r:void 0,this.style=(0,l.az)(e.map(e=>({tag:e.tag,class:e.class||i(Object.assign({},e,{tag:null}))})),{all:s}).style,this.module=n?new a.G(n):null,this.themeType=t.themeType}static define(e,t){return new er(e,t||{})}}let eo=r.sj.define(),el=r.sj.define({combine:e=>e.length?[e[0]]:null});function ea(e){let t=e.facet(eo);return t.length?t:e.facet(el)}function eh(e,t){let n=[eu],i;return e instanceof er&&(e.module&&n.push(o.Lz.styleModule.of(e.module)),i=e.themeType),(null==t?void 0:t.fallback)?n.push(el.of(e)):i?n.push(eo.computeN([o.Lz.darkTheme],t=>t.facet(o.Lz.darkTheme)==("dark"==i)?[e]:[])):n.push(eo.of(e)),n}class ec{constructor(e){this.markCache=Object.create(null),this.tree=p(e.state),this.decorations=this.buildDeco(e,ea(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=p(e.state),n=ea(e.state),i=n!=ea(e.startState),{viewport:s}=e.view,r=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&r>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=r):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return o.NZ.none;let n=new r.vB;for(let{from:i,to:s}of e.visibleRanges)(0,l.DM)(this.tree,t,(e,t,i)=>{n.add(e,t,this.markCache[i]||(this.markCache[i]=o.NZ.mark({class:i})))},i,s);return n.finish()}}let eu=r.Nb.high(o.Z9.fromClass(ec,{decorations:e=>e.decorations})),ef=er.define([{tag:l._A.meta,color:"#404740"},{tag:l._A.link,textDecoration:"underline"},{tag:l._A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:l._A.emphasis,fontStyle:"italic"},{tag:l._A.strong,fontWeight:"bold"},{tag:l._A.strikethrough,textDecoration:"line-through"}
1,{tag:l._A.keyword,color:"#708"},{tag:[l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName],color:"#219"},{tag:[l._A.literal,l._A.inserted],color:"#164"},{tag:[l._A.string,l._A.deleted],color:"#a11"},{tag:[l._A.regexp,l._A.escape,l._A.special(l._A.string)],color:"#e40"},{tag:l._A.definition(l._A.variableName),color:"#00f"},{tag:l._A.local(l._A.variableName),color:"#30a"},{tag:[l._A.typeName,l._A.namespace],color:"#085"},{tag:l._A.className,color:"#167"},{tag:[l._A.special(l._A.variableName),l._A.macroName],color:"#256"},{tag:l._A.definition(l._A.propertyName),color:"#00c"},{tag:l._A.comment,color:"#940"},{tag:l._A.invalid,color:"#f00"}]),ed=o.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),ep="()[]{}",em=r.sj.define({combine:e=>(0,r.QR)(e,{afterCursor:!0,brackets:ep,maxScanDistance:1e4,renderMatch:ev})}),eg=o.NZ.mark({class:"cm-matchingBracket"}),ek=o.NZ.mark({class:"cm-nonmatchingBracket"});function ev(e){let t=[],n=e.matched?eg:ek;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}let ex=[r.sU.define({create:()=>o.NZ.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],i=t.state.facet(em);for(let e of t.state.selection.ranges){if(!e.empty)continue;let s=eO(t.state,e.head,-1,i)||e.head>0&&eO(t.state,e.head-1,1,i)||i.afterCursor&&(eO(t.state,e.head,1,i)||e.head<t.state.doc.length&&eO(t.state,e.head+1,-1,i));s&&(n=n.concat(i.renderMatch(s,t.state)))}return o.NZ.set(n,!0)},provide:e=>o.Lz.decorations.from(e)}),ed];function ey(e={}){return[em.of(e),ex]}let eb=new s.uY;function ew(e,t,n){let i=e.prop(t<0?s.uY.openedBy:s.uY.closedBy);if(i)return i;if(1==e.name.length){let i=n.indexOf(e.name);if(i>-1&&i%2==(t<0?1:0))return[n[i+t]]}return null}function eS(e){let t=e.type.prop(eb);return t?t(e.node):e}function eO(e,t,n,i={}){let s=i.maxScanDistance||1e4,r=i.brackets||ep,o=p(e),l=o.resolveInner(t,n);for(let e=l;e;e=e.parent){let i=ew(e.type,n,r);if(i&&e.from<e.to){let s=eS(e);if(s&&(n>0?t>=s.from&&t<s.to:t>s.from&&t<=s.to))return function(e,t,n,i,s,r,o){let l=i.parent,a={from:s.from,to:s.to},h=0,c=null==l?void 0:l.cursor();if(c&&(n<0?c.childBefore(i.from):c.childAfter(i.to)))do if(n<0?c.to<=i.from:c.from>=i.to){if(0==h&&r.indexOf(c.type.name)>-1&&c.from<c.to){let e=eS(c);return{start:a,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(ew(c.type,n,o))h++;else if(ew(c.type,-n,o)){if(0==h){let e=eS(c);return{start:a,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}h--}}while(n<0?c.prevSibling():c.nextSibling());return{start:a,matched:!1}}(0,0,n,e,s,i,r)}}return function(e,t,n,i,s,r,o){let l=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),a=o.indexOf(l);if(a<0||a%2==0!=n>0)return null;let h={from:n<0?t-1:t,to:n>0?t+1:t},c=e.doc.iterRange(t,n>0?e.doc.length:0),u=0;for(let e=0;!c.next().done&&e<=r;){let r=c.value;n<0&&(e+=r.length);let l=t+e*n;for(let e=n>0?0:r.length-1,t=n>0?r.length:-1;e!=t;e+=n){let t=o.indexOf(r[e]);if(!(t<0)&&i.resolveInner(l+e,1).type==s){if(t%2==0==n>0)u++;else{if(1==u)return{start:h,end:{from:l+e,to:l+e+1},matched:t>>1==a>>1};u--}}}n>0&&(e+=r.length)}return c.done?{start:h,matched:!1}:null}(e,t,n,o,l.type,s,r)}let eA=Object.create(null),e_=[s.Z6.none],eC=[],eP=Object.create(null),eI=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])eI[e]=function(e,t){let n=[];for(let i of t.split(" ")){let t=[];for(let n of i.split(".")){let i=e[n]||l._A[n];i?"function"==typeof i?t.length?t=t.map(i):eT(n,`Modifier ${n} used at start of tag`):t.length?eT(n,`Tag ${n} used as modifier`):t=Array.isArray(i)?i:[i]:eT(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let i=t.replace(/ /g,"_"),r=i+" "+n.map(e=>e.id),o=eP[r];if(o)return o.id;let a=eP[r]=s.Z6.define({id:e_.length,name:i,props:[(0,l.pn)({[i]:n})]});return e_.push(a),a.id}(eA,t);function eT(e,t){eC.indexOf(e)>-1||(eC.push(e),console.warn(t))}function eN(e){return e.length<=4096&&/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/.test(e)}let eD={rtl:o.NZ.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:o.OP.RTL}),ltr:o.NZ.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:o.OP.LTR}
1),auto:o.NZ.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})}},2809:(e,t,n)=>{let i;n.d(t,{YH:()=>ea,Gu:()=>C,VR:()=>P,Je:()=>ek,xx:()=>X,OF:()=>R,$t:()=>ex,sj:()=>F,iR:()=>_,Nb:()=>W,om:()=>eA,vB:()=>e_,FB:()=>eb,Pe:()=>eu,sU:()=>V,EY:()=>f,ZX:()=>ef,vS:()=>w,Fh:()=>O,QR:()=>ey,y$:()=>ez,zK:()=>b,kn:()=>eL,MK:()=>S});let s=[],r=[];function o(e){return e>=127462&&e<=127487}function l(e,t,n){if(t==e.length)return t;t&&h(e.charCodeAt(t))&&c(e.charCodeAt(t-1))&&t--;let i=a(e,t);for(t+=u(i);t<e.length;){let l=a(e,t);if(8205==i||8205==l||n&&function(e){if(e<768)return!1;for(let t=0,n=s.length;;){let i=t+n>>1;if(e<s[i])n=i;else{if(!(e>=r[i]))return!0;t=i+1}if(t==n)return!1}}(l))t+=u(l),i=l;else if(o(l)){let n=0,i=t-2;for(;i>=0&&o(a(e,i));)n++,i-=2;if(n%2==0)break;t+=2}else break}return t}function a(e,t){let n=e.charCodeAt(t);if(!c(n)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return h(i)?(n-55296<<10)+(i-56320)+65536:n}function h(e){return e>=56320&&e<57344}function c(e){return e>=55296&&e<56320}function u(e){return e<65536?1:2}(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?r:s).push(n+=e[t])})();class f{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=y(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),p.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=y(this,e,t);let n=[];return this.decompose(e,t,n,0),p.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new g(this),s=new g(e);for(let e=t,r=t;;){if(i.next(e),s.next(e),e=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(r+=i.value.length,i.done||r>=n)return!0}}iter(e=1){return new g(this,e)}iterRange(e,t=this.length){return new k(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new v(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(0==e.length)throw RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new d(e):p.from(d.split(e,[])):f.empty}}class d extends f{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let s=0;;s++){let r=this.text[s],o=i+r.length;if((t?n:o)>=e)return new x(i,o,n,r);i=o+1,n++}}decompose(e,t,n,i){let s=e<=0&&t>=this.length?this:new d(m(this.text,[""],e,t),Math.min(t,this.length)-Math.max(0,e));if(1&i){let e=n.pop(),t=m(s.text,e.text.slice(),0,s.length);if(t.length<=32)n.push(new d(t,e.length+s.length));else{let e=t.length>>1;n.push(new d(t.slice(0,e)),new d(t.slice(e)))}}else n.push(s)}replace(e,t,n){if(!(n instanceof d))return super.replace(e,t,n);[e,t]=y(this,e,t);let i=m(this.text,m(n.text,m(this.text,[""],0,e)),t),s=this.length+n.length-(t-e);return i.length<=32?new d(i,s):p.from(d.split(i,[]),s)}sliceString(e,t=this.length,n="\n"){[e,t]=y(this,e,t);let i="";for(let s=0,r=0;
vendor: 7,819 bytes, line 1
1s<=t&&r<this.text.length;r++){let o=this.text[r],l=s+o.length;s>e&&r&&(i+=n),e<l&&t>s&&(i+=o.slice(Math.max(0,e-s),t-s)),s=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let s of e)n.push(s),i+=s.length+1,32==n.length&&(t.push(new d(n,i)),n=[],i=-1);return i>-1&&t.push(new d(n,i)),t}}class p extends f{constructor(e,t){for(let n of(super(),this.children=e,this.length=t,this.lines=0,e))this.lines+=n.lines}lineInner(e,t,n,i){for(let s=0;;s++){let r=this.children[s],o=i+r.length,l=n+r.lines-1;if((t?l:o)>=e)return r.lineInner(e,t,n,i);i=o+1,n=l+1}}decompose(e,t,n,i){for(let s=0,r=0;r<=t&&s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e<=l&&t>=r){let s=i&((r<=e?1:0)|(l>=t?2:0));r>=e&&l<=t&&!s?n.push(o):o.decompose(e-r,t-r,n,s)}r=l+1}}replace(e,t,n){if([e,t]=y(this,e,t),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let r=this.children[i],o=s+r.length;if(e>=s&&t<=o){let l=r.replace(e-s,t-s,n),a=this.lines-r.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let s=this.children.slice();return s[i]=l,new p(s,this.length-(t-e)+n.length)}return super.replace(s,o,l)}s=o+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){[e,t]=y(this,e,t);let i="";for(let s=0,r=0;s<this.children.length&&r<=t;s++){let o=this.children[s],l=r+o.length;r>e&&s&&(i+=n),e<l&&t>r&&(i+=o.sliceString(e-r,t-r,n)),r=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof p))return 0;let n=0,[i,s,r,o]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==r||s==o)return n;let l=this.children[i],a=e.children[s];if(l!=a)return n+l.scanIdentical(a,t);n+=l.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new d(n,t)}let i=Math.max(32,n>>5),s=i<<1,r=i>>1,o=[],l=0,a=-1,h=[];function c(){0!=l&&(o.push(1==h.length?h[0]:p.from(h,a)),a=-1,l=h.length=0)}for(let t of e)!function e(t){let n;if(t.lines>s&&t instanceof p)for(let n of t.children)e(n);else t.lines>r&&(l>r||!l)?(c(),o.push(t)):t instanceof d&&l&&(n=h[h.length-1])instanceof d&&t.lines+n.lines<=32?(l+=t.lines,a+=t.length+1,h[h.length-1]=new d(n.text.concat(t.text),n.length+1+t.length)):(l+t.lines>i&&c(),l+=t.lines,a+=t.length+1,h.push(t))}(t);return c(),1==o.length?o[0]:new p(o,t)}}function m(e,t,n=0,i=1e9){for(let s=0,r=0,o=!0;r<e.length&&s<=i;r++){let l=e[r],a=s+l.length;a>=n&&(a>i&&(l=l.slice(0,i-s)),s<n&&(l=l.slice(n-s)),o?(t[t.length-1]+=l,o=!1):t.push(l)),s=a+1}return t}f.empty=new d([""],0);class g{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof d?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],s=this.offsets[n],r=s>>1,o=i instanceof d?i.text.length:i.children.length;if(r==(t>0?o:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&s)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(i instanceof d){let s=i.text[r+(t<0?-1:0)];if(this.offsets[n]+=t,s.length>Math.max(0,e))return this.value=0==e?s:t>0?s.slice(e):s.slice(0,s.length-e),this;e-=s.length}else{let s=i.children[r+(t<0?-1:0)];e>s.length?(e-=s.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(s),this.offsets.push(t>0?1:(s instanceof d?s.text.length:s.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class k{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new g(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class v{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(f.prototype[Symbol.iterator]=function(){return this.iter()},g.prototype[Symbol.iterator]=k.prototype[Symbol.iterator]=v.prototype[Symbol.iterator]=function(){return this});class x{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}}function y(e,t,n){return[t=Math.max(0,Math.min(e.length,t)),Math.max(t,Math.min(e.length,n))]}function b(e,t,n=!0,i=!0){return function(e,t,n=!0,i=!0){return(n?l:function(e,t,n){for(;t>0;){let i=l(e,t-2,n);if(i<t)return i;t--}return 0})(e,t,i)}(e,t,n,i)}function w(e,t){let n=e.charCodeAt(t);if(!(n>=55296&&n<56320)||t+1==e.length)return n;let i=e.charCodeAt(t+1);return i>=56320&&i<57344?(n-55296<<10)+(i-56320)+65536:n}function S(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10)+55296,(1023&e)+56320)}function O(e){return e<65536?1:2}let A=/\r\n?|\n/;var _=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(_||(_={}));class C{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,i=0;t<this.sections.length;){let s=this.sections[t++],r=this.sections[t++];r<0?(e(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(e,t=!1){N(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];i<0?e.push(n,i):e.push(i,n)}return new C(e)}composeDesc(e){return this.empty?e:e.empty?this:M(this,e)}mapDesc(e,t=!1){return e.empty?this:D(this,e,t)}mapPos(e,t=-1,n=_.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let o=this.sections[r++],l=this.sections[r++],a=i+o;if(l<0){if(a>e)return s+(e-i);s+=o}else{if(n!=_.Simple&&a>=e&&(n==_.TrackDel&&i<e&&a>e||n==_.TrackBefore&&i<e||n==_.TrackAfter&&a>e))return null;if(a>e||a==e&&t<0&&!o)return e==i||t<0?s:s+l;s+=l}i=a}if(e>i)throw RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let n=0,i=0;n<this.sections.length&&i<=t;){let s=this.sections[n++],r=this.sections[n++],o=i+s;if(r>=0&&i<=t&&o>=e)return!(i<e)||!(o>t)||"cover";i=o}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+n+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw RangeError("Invalid JSON representation of ChangeDesc");return new C(e)}static create(e){return new C(e)}}class P extends C{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return N(this,(t,n,i,s,r)=>e=e.replace(i,i+(n-t),r),!1),e}
1mapDesc(e,t=!1){return D(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,s=0;i<t.length;i+=2){let r=t[i],o=t[i+1];if(o>=0){t[i]=o,t[i+1]=r;let l=i>>1;for(;n.length<l;)n.push(f.empty);n.push(r?e.slice(s,s+r):f.empty)}s+=r}return new P(t,n)}compose(e){return this.empty?e:e.empty?this:M(this,e,!0)}map(e,t=!1){return e.empty?this:D(this,e,t,!0)}iterChanges(e,t=!1){N(this,e,t)}get desc(){return C.create(this.sections)}filter(e){let t=[],n=[],i=[],s=new B(this);n:for(let r=0,o=0;;){let l=r==e.length?1e9:e[r++];for(;o<l||o==l&&0==s.len;){if(s.done)break n;let e=Math.min(s.len,l-o);I(i,e,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;I(t,e,r),r>0&&T(n,t,s.text),s.forward(e),o+=e}let a=e[r++];for(;o<a;){if(s.done)break n;let e=Math.min(s.len,a-o);I(t,e,-1),I(i,e,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(e),o+=e}}return{changes:new P(t,n),filtered:C.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],i=this.sections[t+1];i<0?e.push(n):0==i?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let i=[],s=[],r=0,o=null;function l(e=!1){if(!e&&!i.length)return;r<t&&I(i,t-r,-1);let n=new P(i,s);o=o?o.compose(n.map(o)):n,i=[],s=[],r=0}return!function e(a){if(Array.isArray(a))for(let t of a)e(t);else if(a instanceof P){if(a.length!=t)throw RangeError(`Mismatched change set length (got ${a.length}, expected ${t})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:e,to:o=e,insert:h}=a;if(e>o||e<0||o>t)throw RangeError(`Invalid change range ${e} to ${o} (in doc of length ${t})`);let c=h?"string"==typeof h?f.of(h.split(n||A)):h:f.empty,u=c.length;if(e==o&&0==u)return;e<r&&l(),e>r&&I(i,e-r,-1),I(i,o-e,u),T(s,i,c),r=o}}(e),l(!o),o}static empty(e){return new P(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;i<e.length;i++){let s=e[i];if("number"==typeof s)t.push(s,-1);else if(!Array.isArray(s)||"number"!=typeof s[0]||s.some((e,t)=>t&&"string"!=typeof e))throw RangeError("Invalid JSON representation of ChangeSet");else if(1==s.length)t.push(s[0],0);else{for(;n.length<i;)n.push(f.empty);n[i]=f.of(s.slice(1)),t.push(s[0],n[i].length)}}return new P(t,n)}static createSet(e,t){return new P(e,t)}}function I(e,t,n,i=!1){if(0==t&&n<=0)return;let s=e.length-2;s>=0&&n<=0&&n==e[s+1]?e[s]+=t:s>=0&&0==t&&0==e[s]?e[s+1]+=n:i?(e[s]+=t,e[s+1]+=n):e.push(t,n)}function T(e,t,n){if(0==n.length)return;let i=t.length-2>>1;if(i<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<i;)e.push(f.empty);e.push(n)}}function N(e,t,n){let i=e.inserted;for(let s=0,r=0,o=0;o<e.sections.length;){let l=e.sections[o++],a=e.sections[o++];if(a<0)s+=l,r+=l;else{let h=s,c=r,u=f.empty;for(;h+=l,c+=a,a&&i&&(u=u.append(i[o-2>>1])),!n&&o!=e.sections.length&&!(e.sections[o+1]<0);)l=e.sections[o++],a=e.sections[o++];t(s,h,r,c,u),s=h,r=c}}}function D(e,t,n,i=!1){let s=[],r=i?[]:null,o=new B(e),l=new B(t);for(let e=-1;;){if(o.done&&l.len||l.done&&o.len)throw Error("Mismatched change set lengths");if(-1==o.ins&&-1==l.ins){let e=Math.min(o.len,l.len);I(s,e,-1),o.forward(e),l.forward(e)}else if(l.ins>=0&&(o.ins<0||e==o.i||0==o.off&&(l.len<o.len||l.len==o.len&&!n))){let t=l.len;for(I(s,l.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(I(s,0,o.ins),r&&T(r,s,o.text),e=o.i),o.forward(n),t-=n}l.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(-1==l.ins){let e=Math.min(n,l.len);t+=e,n-=e,l.forward(e)}else if(0==l.ins&&l.len<n)n-=l.len,l.next();else break;I(s,t,e<o.i?o.ins:0),r&&e<o.i&&T(r,s,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&l.done)return r?P.createSet(s,r):C.create(s);else throw Error("Mismatched change set lengths")}}function M(e,t,n=!1){let i=[],s=n?[]:null,r=new B(e),o=new B(t);for(let e=!1;;){if(r.done&&o.done)return s?P.createSet(i,s):C.create(i);if(0==r.ins)I(i,r.len,0,e),r.next();else if(0!=o.len||o.done){if(r.done||o.done)throw Error("Mismatched change set lengths");{let t=Math.min(r.len2,o.len),n=i.length;if(-1==r.ins){let n=-1==o.ins?-1:o.off?0:o.ins;I(i,t,n,e),s&&n&&T(s,i,o.text)}else -1==o.ins?(I(i,r.off?0:r.len,t,e),s&&T(s,i,r.textBit(t))):(I(i,r.off?0:r.len,o.off?0:o.ins,e),s&&!o.off&&T(s,i,o.text));e=(r.ins>t||o.ins>=0&&o.len>t)&&(e||i.length>n),r.forward2(t),o.forward(t)}}else I(i,0,o.ins,e),s&&T(s,i,o.text),o.next()}}class B{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return -2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?f.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?f.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}
vendor: 3,209 bytes, line 1
1forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class E{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let e=7&this.flags;return 7==e?null:e}get goalColumn(){let e=this.flags>>6;return 0xffffff==e?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new E(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return R.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return R.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw RangeError("Invalid JSON representation for SelectionRange");return R.range(e.anchor,e.head)}static create(e,t,n){return new E(e,t,n)}}class R{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:R.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new R([this.main],0)}addRange(e,t=!0){return R.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,R.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new R(e.ranges.map(e=>E.fromJSON(e)),e.main)}static single(e,t=e){return new R([R.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw RangeError("A selection needs at least one range");for(let n=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=n:s.from<n)return R.normalized(e.slice(),t);n=s.to}return new R(e,t)}static cursor(e,t=0,n,i){return E.create(e,e,(0==t?0:t<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:0xffffff)<<6)}static range(e,t,n,i){let s=(null!=n?n:0xffffff)<<6|(null==i?7:Math.min(6,i));return t<e?E.create(t,e,48|s):E.create(e,t,(t>e?8:0)|s)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;n<e.length;n++){let i=e[n],s=e[n-1];if(i.empty?i.from<=s.to:i.from<s.to){let r=s.from,o=Math.max(i.to,s.to);n<=t&&t--,e.splice(--n,2,i.anchor>i.head?R.range(o,r):R.range(r,o))}}return new R(e,t)}}function z(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}let L=0;class F{constructor(e,t,n,i,s){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=L++,this.default=e([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(e={}
1){return new F(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:Q),!!e.static,e.enables)}of(e){return new j([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new j(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new j(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function Q(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class j{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=L++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,s=this.id,r=e[s]>>1,o=2==this.type,l=!1,a=!1,h=[];for(let n of this.dependencies)"doc"==n?l=!0:"selection"==n?a=!0:((null!==(t=e[n.id])&&void 0!==t?t:1)&1)==0&&h.push(e[n.id]);return{create:e=>(e.values[r]=n(e),1),update(e,t){if(l&&t.docChanged||a&&(t.docChanged||t.selection)||q(e,h)){let t=n(e);if(o?!U(t,e.values[r],i):!i(t,e.values[r]))return e.values[r]=t,1}return 0},reconfigure:(e,t)=>{let l,a=t.config.address[s];if(null!=a){let s=ee(t,a);if(this.dependencies.every(n=>n instanceof F?t.facet(n)===e.facet(n):!(n instanceof V)||t.field(n,!1)==e.field(n,!1))||(o?U(l=n(e),s,i):i(l=n(e),s)))return e.values[r]=s,0}else l=n(e);return e.values[r]=l,1}}}}function U(e,t,n){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function q(e,t){let n=!1;for(let i of t)1&G(e,i)&&(n=!0);return n}let $=F.define({static:!0});class V{constructor(e,t,n,i,s){this.id=e,this.createF=t,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new V(L++,e.create,e.update,e.compare||((e,t)=>e===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet($).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let i=e.values[t],s=this.updateF(i,n);return this.compareF(i,s)?0:(e.values[t]=s,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,$.of({field:this,create:e})]}get extension(){return this}}let J={lowest:4,low:3,default:2,high:1,highest:0};function Z(e){return t=>new H(t,e)}let W={highest:Z(J.highest),high:Z(J.high),default:Z(J.default),low:Z(J.low),lowest:Z(J.lowest)};class H{constructor(e,t){this.inner=e,this.prec=t}}class X{of(e){return new Y(this,e)}reconfigure(e){return X.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Y{constructor(e,t){this.compartment=e,this.inner=t}}class K{constructor(e,t,n,i,s,r){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return null==t?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let i,s,r=[],o=Object.create(null),l=new Map;for(let n of(i=[[],[],[],[],[]],s=new Map,!function e(n,r){let o=s.get(n);if(null!=o){if(o<=r)return;let e=i[o].indexOf(n);e>-1&&i[o].splice(e,1),n instanceof Y&&l.delete(n.compartment)}if(s.set(n,r),Array.isArray(n))for(let t of n)e(t,r);else if(n instanceof Y){if(l.has(n.compartment))throw RangeError("Duplicate use of compartment in extensions");let i=t.get(n.compartment)||n.inner;l.set(n.compartment,i),e(i,r)}else if(n instanceof H)e(n.inner,n.prec);else if(n instanceof V)i[r].push(n),n.provides&&e(n.provides,r);else if(n instanceof j)i[r].push(n),n.facet.extensions&&e(n.facet.extensions,J.default);else{let t=n.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);e(t,r)}}(e,J.default),i.reduce((e,t)=>e.concat(t))))n instanceof V?r.push(n):(o[n.facet.id]||(o[n.facet.id]=[])).push(n);let a=Object.create(null),h=[],c=[];for(let e of r)a[e.id]=c.length<<1,c.push(t=>e.slot(t));let u=null==n?void 0:n.config.facets;
1for(let e in o){let t=o[e],i=t[0].facet,s=u&&u[e]||[];if(t.every(e=>0==e.type)){if(a[i.id]=h.length<<1|1,Q(s,t))h.push(n.facet(i));else{let e=i.combine(t.map(e=>e.value));h.push(n&&i.compare(e,n.facet(i))?n.facet(i):e)}}else{for(let e of t)0==e.type?(a[e.id]=h.length<<1|1,h.push(e.value)):(a[e.id]=c.length<<1,c.push(t=>e.dynamicSlot(t)));a[i.id]=c.length<<1,c.push(e=>(function(e,t,n){let i=n.map(t=>e[t.id]),s=n.map(e=>e.type),r=i.filter(e=>!(1&e)),o=e[t.id]>>1;function l(e){let n=[];for(let t=0;t<i.length;t++){let r=ee(e,i[t]);if(2==s[t])for(let e of r)n.push(e);else n.push(r)}return t.combine(n)}return{create(e){for(let t of i)G(e,t);return e.values[o]=l(e),1},update(e,n){if(!q(e,r))return 0;let i=l(e);return t.compare(i,e.values[o])?0:(e.values[o]=i,1)},reconfigure(e,s){let r=q(e,i),a=s.config.facets[t.id],h=s.facet(t);if(a&&!r&&Q(n,a))return e.values[o]=h,0;let c=l(e);return t.compare(c,h)?(e.values[o]=h,0):(e.values[o]=c,1)}}})(e,i,t))}}return new K(e,l,c.map(e=>e(a)),a,h,o)}}function G(e,t){if(1&t)return 2;let n=t>>1,i=e.status[n];if(4==i)throw Error("Cyclic dependency between fields and/or facets");if(2&i)return i;e.status[n]=4;let s=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|s}function ee(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}let et=F.define(),en=F.define({combine:e=>e.some(e=>e),static:!0}),ei=F.define({combine:e=>e.length?e[0]:void 0,static:!0}),es=F.define(),er=F.define(),eo=F.define(),el=F.define({combine:e=>!!e.length&&e[0]});class ea{constructor(e,t){this.type=e,this.value=t}static define(){return new eh}}class eh{of(e){return new ea(this,e)}}class ec{constructor(e){this.map=e}of(e){return new eu(this,e)}}class eu{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new eu(this.type,t)}is(e){return this.type==e}static define(e={}){return new ec(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let e=i.map(t);e&&n.push(e)}return n}}eu.reconfigure=eu.define(),eu.appendConfig=eu.define();class ef{constructor(e,t,n,i,s,r){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&z(n,t.newLength),s.some(e=>e.type==ef.time)||(this.annotations=s.concat(ef.time.of(Date.now())))}static create(e,t,n,i,s,r){return new ef(e,t,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ef.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function ed(e,t,n){var i;let s,r,o;return n?(s=t.changes,r=P.empty(t.changes.length),o=e.changes.compose(t.changes)):(s=t.changes.map(e.changes),r=e.changes.mapDesc(t.changes,!0),o=e.changes.compose(s)),{changes:o,selection:t.selection?t.selection.map(r):null===(i=e.selection)||void 0===i?void 0:i.map(s),effects:eu.mapEffects(e.effects,s).concat(eu.mapEffects(t.effects,r)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function ep(e,t,n){let i=t.selection,s=eg(t.annotations);return t.userEvent&&(s=s.concat(ef.userEvent.of(t.userEvent))),{changes:t.changes instanceof P?t.changes:P.of(t.changes||[],n,e.facet(ei)),selection:i&&(i instanceof R?i:R.single(i.anchor,i.head)),effects:eg(t.effects),annotations:s,scrollIntoView:!!t.scrollIntoView}}ef.time=ea.define(),ef.userEvent=ea.define(),ef.addToHistory=ea.define(),ef.remote=ea.define();let em=[];function eg(e){return null==e?em:Array.isArray(e)?e:[e]}var ek=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(ek||(ek={}));let ev=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;try{i=RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}class ex{constructor(e,t,n,i,s,r){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let e=0;e<this.config.dynamicSlots.length;
vendor: 4,767 bytes, line 1
1e++)G(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(null==n){if(t)throw RangeError("Field is not present in this state");return}return G(this,n),ee(this,n)}update(...e){return function e(t,n,i){let s=ep(t,n.length?n[0]:{},t.doc.length);n.length&&!1===n[0].filter&&(i=!1);for(let e=1;e<n.length;e++){!1===n[e].filter&&(i=!1);let r=!!n[e].sequential;s=ed(s,ep(t,n[e],r?s.changes.newLength:t.doc.length),r)}let r=ef.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return function(e){let t=e.startState,n=t.facet(eo),i=e;for(let s=n.length-1;s>=0;s--){let r=n[s](e);r&&Object.keys(r).length&&(i=ed(i,ep(t,r,e.changes.newLength),!0))}return i==e?e:ef.create(t,e.changes,e.selection,i.effects,i.annotations,i.scrollIntoView)}(i?function(t){let n=t.startState,i=!0;for(let e of n.facet(es)){let n=e(t);if(!1===n){i=!1;break}Array.isArray(n)&&(i=!0===i?n:function(e,t){let n=[];for(let i=0,s=0;;){let r,o;if(i<e.length&&(s==t.length||t[s]>=e[i]))r=e[i++],o=e[i++];else{if(!(s<t.length))return n;r=t[s++],o=t[s++]}!n.length||n[n.length-1]<r?n.push(r,o):n[n.length-1]<o&&(n[n.length-1]=o)}}(i,n))}if(!0!==i){let e,s;if(!1===i)s=t.changes.invertedDesc,e=P.empty(n.doc.length);else{let n=t.changes.filter(i);e=n.changes,s=n.filtered.mapDesc(n.changes).invertedDesc}t=ef.create(n,e,t.selection&&t.selection.map(s),eu.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let s=n.facet(er);for(let i=s.length-1;i>=0;i--){let r=s[i](t);t=r instanceof ef?r:Array.isArray(r)&&1==r.length&&r[0]instanceof ef?r[0]:e(n,eg(r),!1)}return t}(r):r)}(this,e,!0)}applyTransaction(e){let t,n=this.config,{base:i,compartments:s}=n;for(let t of e.effects)t.is(X.reconfigure)?(n&&(s=new Map,n.compartments.forEach((e,t)=>s.set(t,e)),n=null),s.set(t.value.compartment,t.value.extension)):t.is(eu.reconfigure)?(n=null,i=t.value):t.is(eu.appendConfig)&&(n=null,i=eg(i).concat(t.value));t=n?e.startState.values.slice():new ex(n=K.resolve(i,s,this),this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values;let r=e.startState.facet(en)?e.newSelection:e.newSelection.asSingle();new ex(n,e.newDoc,r,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:R.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),s=[n.range],r=eg(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),l=this.changes(o.changes),a=l.map(i);for(let e=0;e<n;e++)s[e]=s[e].map(a);let h=i.mapDesc(l,!0);s.push(o.range.map(h)),i=i.compose(a),r=eu.mapEffects(r,a).concat(eu.mapEffects(eg(o.effects),h))}return{changes:i,selection:R.create(s,t.mainIndex),effects:r}}changes(e=[]){return e instanceof P?e:P.of(e,this.doc.length,this.facet(ex.lineSeparator))}toText(e){return f.of(e.split(this.facet(ex.lineSeparator)||A))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return null==t?e.default:(G(this,t),ee(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let i=e[n];i instanceof V&&null!=this.config.address[i.id]&&(t[n]=i.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(e,t={},n){if(!e||"string"!=typeof e.doc)throw RangeError("Invalid JSON representation for EditorState");let i=[];if(n){for(let t in n)if(Object.prototype.hasOwnProperty.call(e,t)){let s=n[t],r=e[t];i.push(s.init(e=>s.spec.fromJSON(r,e)))}}return ex.create({doc:e.doc,selection:R.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=K.resolve(e.extensions||[],new Map),n=e.doc instanceof f?e.doc:f.of((e.doc||"").split(t.staticFacet(ex.lineSeparator)||A)),i=e.selection?e.selection instanceof R?e.selection:R.single(e.selection.anchor,e.selection.head):R.single(0);return z(i,n.length),t.staticFacet(en)||(i=i.asSingle()),new ex(t,n,i,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(ex.tabSize)}get lineBreak(){return this.facet(ex.lineSeparator)||"\n"}get readOnly(){return this.facet(el)}phrase(e,...t){for(let t of this.facet(ex.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>t.length?e:t[i-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let s of this.facet(et))for(let r of s(this,t,n))Object.prototype.hasOwnProperty.call(r,e)&&i.push(r[e]);return i}charCategorizer(e){var t;return t=this.languageDataAt("wordChars",e).join(""),e=>{if(!/\S/.test(e))return ek.Space;if(function(e){if(i)return i.test(e);for(let t=0;t<e.length;t++){let n=e[t];
1if(/\w/.test(n)||n>"\x80"&&(n.toUpperCase()!=n.toLowerCase()||ev.test(n)))return!0}return!1}(e))return ek.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return ek.Word;return ek.Other}}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),r=e-n,o=e-n;for(;r>0;){let e=b(t,r,!1);if(s(t.slice(e,r))!=ek.Word)break;r=e}for(;o<i;){let e=b(t,o);if(s(t.slice(o,e))!=ek.Word)break;o=e}return r==o?null:R.range(r+n,o+n)}}function ey(e,t,n={}){let i={};for(let t of e)for(let e of Object.keys(t)){let s=t[e],r=i[e];if(void 0===r)i[e]=s;else if(r===s||void 0===s);else if(Object.hasOwnProperty.call(n,e))i[e]=n[e](r,s);else throw Error("Config merge conflict for field "+e)}for(let e in t)void 0===i[e]&&(i[e]=t[e]);return i}ex.allowMultipleSelections=en,ex.tabSize=F.define({combine:e=>e.length?e[0]:4}),ex.lineSeparator=ei,ex.readOnly=el,ex.phrases=F.define({compare(e,t){let n=Object.keys(e),i=Object.keys(t);return n.length==i.length&&n.every(n=>e[n]==t[n])}}),ex.languageData=et,ex.changeFilter=es,ex.transactionFilter=er,ex.transactionExtender=eo,X.reconfigure=eu.define();class eb{eq(e){return this==e}range(e,t=e){return ew.create(e,t,this)}}eb.prototype.startSide=eb.prototype.endSide=0,eb.prototype.point=!1,eb.prototype.mapMode=_.TrackDel;class ew{constructor(e,t,n){this.from=e,this.to=t,this.value=n}
vendor: 9,194 bytes, line 1
1static create(e,t,n){return new ew(e,t,n)}}function eS(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class eO{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let s=n?this.to:this.from;for(let r=i,o=s.length;;){if(r==o)return r;let i=r+o>>1,l=s[i]-e||(n?this.value[i].endSide:this.value[i].startSide)-t;if(i==r)return l>=0?r:o;l>=0?o=i:r=i+1}}between(e,t,n,i){for(let s=this.findIndex(t,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(!1===i(this.from[s]+e,this.to[s]+e,this.value[s]))return!1}map(e,t){let n=[],i=[],s=[],r=-1,o=-1;for(let l=0;l<this.value.length;l++){let a=this.value[l],h=this.from[l]+e,c=this.to[l]+e,u,f;if(h==c){let e=t.mapPos(h,a.startSide,a.mapMode);if(null==e||(u=f=e,a.startSide!=a.endSide&&(f=t.mapPos(h,a.endSide))<u))continue}else if((u=t.mapPos(h,a.startSide))>(f=t.mapPos(c,a.endSide))||u==f&&a.startSide>0&&a.endSide<=0)continue;0>(f-u||a.endSide-a.startSide)||(r<0&&(r=u),a.point&&(o=Math.max(o,f-u)),n.push(a),i.push(u-r),s.push(f-r))}return{mapped:n.length?new eO(i,s,n,o):null,pos:r}}}class eA{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new eA(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=e,r=e.filter;if(0==t.length&&!r)return this;if(n&&(t=t.slice().sort(eS)),this.isEmpty)return t.length?eA.of(t):this;let o=new eP(this,null,-1).goto(0),l=0,a=[],h=new e_;for(;o.value||l<t.length;)if(l<t.length&&(o.from-t[l].from||o.startSide-t[l].value.startSide)>=0){let e=t[l++];h.addInner(e.from,e.to,e.value)||a.push(e)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(l==t.length||this.chunkEnd(o.chunkIndex)<t[l].from)&&(!r||i>this.chunkEnd(o.chunkIndex)||s<this.chunkPos[o.chunkIndex])&&h.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!r||i>o.to||s<o.from||r(o.from,o.to,o.value))&&!h.addInner(o.from,o.to,o.value)&&a.push(ew.create(o.from,o.to,o.value)),o.next());return h.finishInner(this.nextLayer.isEmpty&&!a.length?eA.empty:this.nextLayer.update({add:a,filter:r,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],i=-1;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s],l=e.touchesRange(r,r+o.length);if(!1===l)i=Math.max(i,o.maxPoint),t.push(o),n.push(e.mapPos(r));else if(!0===l){let{mapped:s,pos:l}=o.map(r,e);s&&(i=Math.max(i,s.maxPoint),t.push(s),n.push(l))}}let s=this.nextLayer.map(e);return 0==t.length?s:new eA(n,t,s||eA.empty,i)}between(e,t,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(t>=s&&e<=s+r.length&&!1===r.between(s,e-s,t-s,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return eI.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return eI.from(e).goto(t)}static compare(e,t,n,i,s=-1){let r=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=s),l=eC(r,o,n),a=new eN(r,l,s),h=new eN(o,l,s);n.iterGaps((e,t,n)=>eD(a,e,h,t,n,i)),n.empty&&0==n.length&&eD(a,0,h,0,0,i)}static eq(e,t,n=0,i){null==i&&(i=0x3b9ac9ff);let s=e.filter(e=>!e.isEmpty&&0>t.indexOf(e)),r=t.filter(t=>!t.isEmpty&&0>e.indexOf(t));if(s.length!=r.length)return!1;if(!s.length)return!0;let o=eC(s,r),l=new eN(s,o,0).goto(n),a=new eN(r,o,0).goto(n);for(;;){if(l.to!=a.to||!eM(l.active,a.active)||l.point&&(!a.point||!l.point.eq(a.point)))return!1;if(l.to>i)return!0;l.next(),a.next()}}static spans(e,t,n,i,s=-1){let r=new eN(e,null,s).goto(t),o=t,l=r.openStart;for(;;){let e=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),s=r.pointFrom<t?n.length+1:r.point.startSide<0?n.length:Math.min(n.length,l);i.point(o,e,r.point,n,s,r.pointRank),l=Math.min(r.openEnd(e),n.length)}else e>o&&(i.span(o,e,r.active,l),l=r.openEnd(e));if(r.to>n)return l+(r.point&&r.to>n?1:0);o=r.to,r.next()}}static of(e,t=!1){let n=new e_;for(let i of e instanceof ew?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let i=e[n];if(eS(t,i)>0)return e.slice().sort(eS);t=i}return e}(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return eA.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=eA.empty;i=i.nextLayer)t=new eA(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}eA.empty=new eA([],[],null,-1),eA.empty.nextLayer=eA.empty;class e_{finishChunk(e){this.chunks.push(new eO(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new e_)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&0>(e-this.lastFrom||n.startSide-this.last.startSide))throw Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if(0>(e-this.lastTo||t.value[0].startSide-this.last.endSide))return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(eA.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=eA.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function eC(e,t,n){let i=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&i.set(t.chunk[e],t.chunkPos[e]);let s=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let r=i.get(e.chunk[t]);null==r||(n?n.mapPos(r):r)!=e.chunkPos[t]||(null==n?void 0:n.touchesRange(r,r+e.chunk[t].length))||s.add(e.chunk[t])}return s}class eP{constructor(e,t,n,i=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){0>(this.to-e||this.endSide-t)&&this.gotoInner(e,t,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class eI{constructor(e){this.heap=e}static from(e,t=null,n=-1){let i=[];for(let s=0;s<e.length;s++)for(let r=e[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new eP(r,t,n,s));return 1==i.length?i[0]:new eI(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)eT(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)eT(this.heap,e);0>(this.to-e||this.value.endSide-t)&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),eT(this.heap,0)}}}function eT(e,t){for(let n=e[t];;){let i=(t<<1)+1;if(i>=e.length)break;let s=e[i];
1if(i+1<e.length&&s.compare(e[i+1])>=0&&(s=e[i+1],i++),0>n.compare(s))break;e[i]=n,e[t]=s,t=i}}class eN{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eI.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&0>(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t);)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){eB(this.active,e),eB(this.activeTo,e),eB(this.activeRank,e),this.minActive=eR(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;eE(this.active,t,n),eE(this.activeTo,t,i),eE(this.activeRank,t,s),e&&eE(e,t,this.cursor.from),this.minActive=eR(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&0>(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&eB(n,i)}else if(this.cursor.value){if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else this.addActive(n),this.cursor.next()}}else{this.to=this.endSide=1e9;break}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function eD(e,t,n,i,s,r){e.goto(t),n.goto(i);let o=i+s,l=i,a=i-t;for(;;){let t=e.to+a-n.to,i=t||e.endSide-n.endSide,s=i<0?e.to+a:n.to,h=Math.min(s,o);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&eM(e.activeForPoint(e.to),n.activeForPoint(n.to))||r.comparePoint(l,h,e.point,n.point):h>l&&!eM(e.active,n.active)&&r.compareRange(l,h,e.active,n.active),s>o)break;(t||e.openEnd!=n.openEnd)&&r.boundChange&&r.boundChange(s),l=s,i<=0&&e.next(),i>=0&&n.next()}}function eM(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!e[n].eq(t[n]))return!1;return!0}function eB(e,t){for(let n=t,i=e.length-1;n<i;n++)e[n]=e[n+1];e.pop()}function eE(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function eR(e,t){let n=-1,i=1e9;for(let s=0;s<t.length;s++)0>(t[s]-i||e[s].endSide-e[n].endSide)&&(n=s,i=t[s]);return n}function ez(e,t,n=e.length){let i=0;for(let s=0;s<n&&s<e.length;)9==e.charCodeAt(s)?(i+=t-i%t,s++):(i++,s=b(e,s));return i}function eL(e,t,n,i){for(let i=0,s=0;;){if(s>=t)return i;if(i==e.length)break;s+=9==e.charCodeAt(i)?n-s%n:1,i=b(e,i)}return!0===i?-1:e.length}},5817:(e,t,n)=>{var i;n.d(t,{PH:()=>p,Qj:()=>i,Z6:()=>c,cF:()=>s,fI:()=>u,iX:()=>M,rr:()=>D,uY:()=>l});let s=1024,r=0;class o{constructor(e,t){this.from=e,this.to=t}}class l{constructor(e={}){this.id=r++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=c.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}l.closedBy=new l({deserialize:e=>e.split(" ")}),l.openedBy=new l({deserialize:e=>e.split(" ")}),l.group=new l({deserialize:e=>e.split(" ")}),l.isolate=new l({deserialize:e=>{if(e&&"rtl"!=e&&"ltr"!=e&&"auto"!=e)throw RangeError("Invalid value for isolate: "+e);return e||"auto"}}),l.contextHash=new l({perNode:!0}),l.lookAhead=new l({perNode:!0}),l.mounted=new l({perNode:!0});class a{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[l.mounted.id]}}let h=Object.create(null);class c{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):h,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),i=new c(e.name||"",t,e.id,n);if(e.props){for(let n of e.props)if(Array.isArray(n)||(n=n(i)),n){if(n[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(l.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return e=>{for(let n=e.prop(l.group),i=-1;i<(n?n.length:0);i++){let s=t[i<0?e.name:n[i]];if(s)return s}}}}c.none=new c("",Object.create(null),0,8);class u{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let i=null;for(let t of e){let e=t(n);e&&(i||(i=Object.assign({},n.props)),i[e[0].id]=e[1])}t.push(i?new c(n.name,i,n.id,n.flags):n)}return new u(t)}}let f=new WeakMap,d=new WeakMap;!function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays"}(i||(i={}));
1class p{constructor(e,t,n,i,s){if(this.type=e,this.children=t,this.positions=n,this.length=i,this.props=null,s&&s.length)for(let[e,t]of(this.props=Object.create(null),s))this.props["number"==typeof e?e:e.id]=t}toString(){let e=a.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let e of this.children){let n=e.toString();n&&(t&&(t+=","),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new C(this.topNode,e)}cursorAt(e,t=0,n=0){let i=new C(f.get(this)||this.topNode);return i.moveTo(e,t),f.set(this,i._tree),i}get topNode(){return new y(this,0,0,null)}resolve(e,t=0){let n=v(f.get(this)||this.topNode,e,t,!1);return f.set(this,n),n}resolveInner(e,t=0){let n=v(d.get(this)||this.topNode,e,t,!0);return d.set(this,n),n}resolveStack(e,t=0){return function(e,t,n){let i=e.resolveInner(t,n),s=null;for(let e=i instanceof y?i:i.context.parent;e;e=e.parent)if(e.index<0){let r=e.parent;(s||(s=[i])).push(r.resolve(t,n)),e=r}else{let r=a.get(e.tree);if(r&&r.overlay&&r.overlay[0].from<=t&&r.overlay[r.overlay.length-1].to>=t){let o=new y(r.tree,r.overlay[0].from+e.from,-1,e);(s||(s=[i])).push(v(o,t,n,!1))}}return s?A(s):i}(this,e,t)}iterate(e){let{enter:t,leave:n,from:s=0,to:r=this.length}=e,o=e.mode||0,l=(o&i.IncludeAnonymous)>0;for(let e=this.cursor(o|i.IncludeAnonymous);;){let i=!1;if(e.from<=r&&e.to>=s&&(!l&&e.type.isAnonymous||!1!==t(e))){if(e.firstChild())continue;i=!0}for(;i&&n&&(l||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;i=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];
1if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:N(c.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new p(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new p(c.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:r=s,reused:o=[],minRepeatType:a=i.types.length}=e,h=Array.isArray(n)?new m(n,n.length):n,c=i.types,u=0,f=0;function d(e,t,n,s,r,o,l,a,h){let c=[],u=[];for(;e.length>s;)c.push(e.pop()),u.push(t.pop()+n-r);e.push(k(i.types[l],c,u,o-r,a-o,h)),t.push(r-n)}function k(e,t,n,i,s,r,o){if(r){let e=[l.contextHash,r];o=o?[e].concat(o):[e]}if(s>25){let e=[l.lookAhead,s];o=o?[e].concat(o):[e]}return new p(e,t,n,i,o)}let v=[],x=[];for(;h.pos>0;)!function e(t,n,s,m,v,x){let{id:y,start:b,end:w,size:S}=h,O=f,A=u;for(;S<0;){if(h.next(),-1==S){let e=o[y];s.push(e),m.push(b-t);return}if(-3==S){u=y;return}if(-4==S){f=y;return}throw RangeError(`Unrecognized record size: ${S}`)}let _=c[y],C,P,I=b-t;if(w-b<=r&&(P=function(e,t){let n=h.fork(),i=0,s=0,o=0,l=n.end-r,c={size:0,start:0,skip:0};e:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){c.size=i,c.start=s,c.skip=o,o+=4,i+=4,n.next();continue}let h=n.pos-e;if(e<0||h<r||n.start<l)break;let u=n.id>=a?4:0,f=n.start;for(n.next();n.pos>h;){if(n.size<0){if(-3==n.size)u+=4;else break e}else n.id>=a&&(u+=4);n.next()}s=f,i+=e,o+=u}return(t<0||i==e)&&(c.size=i,c.start=s,c.skip=o),c.size>4?c:void 0}(h.pos-n,v))){let e=new Uint16Array(P.size-P.skip),n=h.pos-P.size,s=e.length;for(;h.pos>n;)s=function e(t,n,i){let{id:s,start:r,end:o,size:l}=h;if(h.next(),l>=0&&s<a){let a=i;if(l>4){let s=h.pos-(l-4);for(;h.pos>s;)i=e(t,n,i)}n[--i]=a,n[--i]=o-t,n[--i]=r-t,n[--i]=s}else -3==l?u=s:-4==l&&(f=s);return i}(P.start,e,s);C=new g(e,w-P.start,i),I=P.start-t}else{let t=h.pos-S;h.next();let n=[],s=[],o=y>=a?y:-1,c=0,u=w;for(;h.pos>t;)o>=0&&h.id==o&&h.size>=0?(h.end<=u-r&&(d(n,s,b,c,h.end,u,o,O,A),c=n.length,u=h.end),h.next()):x>2500?function(e,t,n,s){let o=[],l=0,a=-1;for(;h.pos>t;){let{id:e,start:t,end:n,size:i}=h;if(i>4)h.next();else if(a>-1&&t<a)break;
vendor: 6,321 bytes, line 1
1else a<0&&(a=n-r),o.push(e,t,n),l++,h.next()}if(l){let t=new Uint16Array(4*l),r=o[o.length-2];for(let e=o.length-3,n=0;e>=0;e-=3)t[n++]=o[e],t[n++]=o[e+1]-r,t[n++]=o[e+2]-r,t[n++]=n;n.push(new g(t,o[2]-r,i)),s.push(r-e)}}(b,t,n,s):e(b,t,n,s,o,x+1);if(o>=0&&c>0&&c<n.length&&d(n,s,b,c,b,u,o,O,A),n.reverse(),s.reverse(),o>-1&&c>0){let e=function(e,t){return(n,i,s)=>{let r=0,o=n.length-1,a,h;if(o>=0&&(a=n[o])instanceof p){if(!o&&a.type==e&&a.length==s)return a;(h=a.prop(l.lookAhead))&&(r=i[o]+a.length+h)}return k(e,n,i,s,r,t)}}(_,A);C=N(_,n,s,0,n.length,0,w-b,e,e)}else C=k(_,n,s,w-b,O-w,A)}s.push(C),m.push(I)}(e.start||0,e.bufferStart||0,v,x,-1,0);let y=null!==(t=e.length)&&void 0!==t?t:v.length?x[0]+v[0].length:0;return new p(c[e.topID],v.reverse(),x.reverse(),y)}(e)}}p.empty=new p(c.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class g{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return c.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),n==(e+=4))return s;let r=[];for(;e<n;)r.push(this.childString(e)),e=this.buffer[e+3];return s+"("+r.join(",")+")"}findChild(e,t,n,i,s){let{buffer:r}=this,o=-1;for(let l=e;l!=t&&(!k(s,i,r[l+1],r[l+2])||(o=l,!(n>0)));l=r[l+3]);return o}slice(e,t,n){let i=this.buffer,s=new Uint16Array(t-e),r=0;for(let o=e,l=0;o<t;){s[l++]=i[o++],s[l++]=i[o++]-n;let t=s[l++]=i[o++]-n;s[l++]=i[o++]-e,r=Math.max(r,t)}return new g(s,r,this.set)}}function k(e,t,n,i){switch(e){case -2:return n<t;case -1:return i>=t&&n<t;case 0:return n<t&&i>t;case 1:return n<=t&&i>t;case 2:return i>t;case 4:return!0}}function v(e,t,n,s){for(var r;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!s&&e instanceof y&&e.index<0?null:e.parent;if(!t)return e;e=t}let o=s?0:i.IgnoreOverlays;if(s)for(let i=e,s=i.parent;s;s=(i=s).parent)i instanceof y&&i.index<0&&(null===(r=s.enter(t,n,o))||void 0===r?void 0:r.from)!=i.from&&(e=s);for(;;){let i=e.enter(t,n,o);if(!i)return e;e=i}}class x{cursor(e=0){return new C(this,e)}getChild(e,t=null,n=null){let i=b(this,e,t,n);return i.length?i[0]:null}getChildren(e,t=null,n=null){return b(this,e,t,n)}resolve(e,t=0){return v(this,e,t,!1)}resolveInner(e,t=0){return v(this,e,t,!0)}matchContext(e){return w(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}}class y extends x{constructor(e,t,n,i){super(),this._tree=e,this.from=t,this.index=n,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,s,r=0){for(let o=this;;){for(let{children:l,positions:h}=o._tree,c=t>0?l.length:-1;e!=c;e+=t){let c=l[e],u=h[e]+o.from;if(k(s,n,u,u+c.length)){if(c instanceof g){if(r&i.ExcludeBuffers)continue;let l=c.findChild(0,c.buffer.length,t,n-u,s);if(l>-1)return new O(new S(o,c,e,u),null,l)}else if(r&i.IncludeAnonymous||!c.type.isAnonymous||P(c)){let l;if(!(r&i.IgnoreMounts)&&(l=a.get(c))&&!l.overlay)return new y(l.tree,u,e,o);let h=new y(c,u,e,o);return r&i.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(t<0?c.children.length-1:0,t,n,s)}}}if(r&i.IncludeAnonymous||!o.type.isAnonymous||(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,!(o=o._parent)))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let s;if(!(n&i.IgnoreOverlays)&&(s=a.get(this._tree))&&s.overlay){let n=e-this.from;for(let{from:e,to:i}of s.overlay)if((t>0?e<=n:e<n)&&(t<0?i>=n:i>n))return new y(s.tree,s.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function b(e,t,n,i){let s=e.cursor(),r=[];if(!s.firstChild())return r;if(null!=n){for(let e=!1;!e;)if(e=s.type.is(n),!s.nextSibling())return r}for(;;){if(null!=i&&s.type.is(i))return r;if(s.type.is(t)&&r.push(s.node),!s.nextSibling())return null==i?r:[]}}function w(e,t,n=t.length-1){for(let i=e;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(t[n]&&t[n]!=i.name)return!1;n--}}return!0}class S{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class O extends x{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return s<0?null:new O(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&i.ExcludeBuffers)return null;let{buffer:s}=this.context,r=s.findChild(this.index+4,s.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return r<0?null:new O(this.context,this,r)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.
vendor: 1,240 bytes, line 1
1index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new O(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new O(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,s=n.buffer[this.index+3];if(s>i){let r=n.buffer[this.index+1];e.push(n.slice(i,s,r)),t.push(0)}return new p(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function A(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let s=e[i];(s.from>n.from||s.to<n.to)&&(n=s,t=i)}let i=n instanceof y&&n.index<0?null:n.parent,s=e.slice();return i?s[t]=i:s.splice(t,1),new _(s,n)}class _{constructor(e,t){this.heads=e,this.node=t}get next(){return A(this.heads)}}class C{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof y)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;
vendor: 5,215 bytes, line 1
1for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return!!e&&(e instanceof y?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return!(s<0)&&(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&i.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&i.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&i.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:s}=this;if(s){if(e>0){if(this.index<s.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(s.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=s)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let s=t+e,r=e<0?-1:n._tree.children.length;s!=r;s+=e){let e=n._tree.children[s];if(this.mode&i.IncludeAnonymous||e instanceof g||!e.type.isAnonymous||P(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let r=e;r;r=r._parent)if(r.index==i){if(i==this.index)return r;t=r,n=s+1;break e}i=this.stack[--s]}for(let e=n;e<this.stack.length;e++)t=new O(this.buffer,t,this.stack[e]);return this.bufferNode=new O(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let i=!1;if(this.type.isAnonymous||!1!==e(this)){if(this.firstChild()){n++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,i=!0}}}matchContext(e){if(!this.buffer)return w(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return w(this._tree,e,i);let r=n[t.buffer[this.stack[s]]];if(!r.isAnonymous){if(e[i]&&e[i]!=r.name)return!1;i--}}return!0}}function P(e){return e.children.some(e=>e instanceof g||!e.type.isAnonymous||P(e))}let I=new WeakMap;function T(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;let n=I.get(t);if(null==n){for(let i of(n=1,t.children)){if(i.type!=e||!(i instanceof p)){n=1;break}n+=T(e,i)}I.set(t,n)}return n}function N(e,t,n,i,s,r,o,l,a){let h=0;for(let n=i;n<s;n++)h+=T(e,t[n]);let c=Math.ceil(1.5*h/8),u=[],f=[];return!function t(n,i,s,o,l){for(let h=s;h<o;){let s=h,d=i[h],p=T(e,n[h]);for(h++;h<o;h++){let t=T(e,n[h]);if(p+t>=c)break;p+=t}if(h==s+1){if(p>c){let e=n[s];t(e.children,e.positions,0,e.children.length,i[s]+l);continue}u.push(n[s])}else{let t=i[h-1]+n[h-1].length-d;u.push(N(e,n,i,s,h,d,t,null,a))}f.push(d+l-r)}}(t,n,i,s,0),(l||a)(u,f,o)}class D{constructor(e,t,n,i,s=!1,r=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(s?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let i=[new D(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&i.push(n);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],s=1,r=e.length?e[0]:null;for(let o=0,l=0,a=0;;o++){let h=o<t.length?t[o]:null,c=h?h.fromA:1e9;if(c-l>=n)for(;r&&r.from<c;){let t=r;if(l>=t.from||c<=t.to||a){let e=Math.max(t.from,l)-a,n=Math.min(t.to,c)-a;t=e>=n?null:new D(e,n,t.tree,t.offset+a,o>
10,!!h)}if(t&&i.push(t),r.to>c)break;r=s<e.length?e[s++]:null}if(!h)break;l=h.toA,a=h.toA-h.toB}return i}}class M{startParse(e,t,n){return"string"==typeof e&&(e=new B(e)),n=n?n.length?n.map(e=>new o(e.from,e.to)):[new o(0,0)]:[new o(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let e=i.advance();if(e)return e}}}class B{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}let E=new l({perNode:!0});class R{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(i.IncludeAnonymous|i.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from<n;)t.to>=e&&t.enter(n,1,i.IgnoreOverlays|i.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&0==t.positions[0]&&t.children[0]instanceof p)t=t.children[0];else break}return!1}}},895:(e,t,n)=>{n.d(t,{DM:()=>f,_A:()=>I,az:()=>u,pn:()=>a});var i=n(5817);let s=0;class r{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=s++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){if(e instanceof r&&(t=e),null==t?void 0:t.base)throw Error("Can not derive from a modified tag");let n=new r("string"==typeof e?e:"?",[],null,[]);if(n.set.push(n),t)for(let e of t.set)n.set.push(e);return n}static defineModifier(e){let t=new l(e);return e=>e.modified.indexOf(t)>-1?e:l.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}}let o=0;class l{constructor(e){this.name=e,this.instances=[],this.id=o++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{var i;return n.base==e&&(i=n.modified,t.length==i.length&&t.every((e,t)=>e==i[t]))});if(n)return n;let i=[],s=new r(e.name,i,e,t);for(let e of t)e.instances.push(s);let o=function(e){let t=[[]];for(let n=0;n<e.length;n++)for(let i=0,s=t.length;i<s;i++)t.push(t[i].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)i.push(l.get(t,e));return s}}function a(e){let t=Object.create(null);for(let n in e){let i=e[n];for(let e of(Array.isArray(i)||(i=[i]),n.split(" ")))if(e){let n=[],s=2,r=e;for(let t=0;;){if("..."==r&&t>0&&t+3==e.length){s=1;break}let i=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!i)throw RangeError("Invalid path: "+e);if(n.push("*"==i[0]?"":'"'==i[0][0]?JSON.parse(i[0]):i[0]),(t+=i[0].length)==e.length)break;let o=e[t++];if(t==e.length&&"!"==o){s=0;break}if("/"!=o)throw RangeError("Invalid path: "+e);r=e.slice(t)}let o=n.length-1,l=n[o];if(!l)throw RangeError("Invalid path: "+e);let a=new c(i,s,o>0?n.slice(0,o):null);t[l]=a.sort(t[l])}}return h.add(t)}let h=new i.uY;class c{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function u(e,t){let n=Object.create(null);for(let t of e)if(Array.isArray(t.tag))for(let e of t.tag)n[e.id]=t.class;else n[t.tag.id]=t.class;let{scope:i,all:s=null}=t||{};return{style:e=>{let t=s;for(let i of e)for(let e of i.set){let i=n[e.id];if(i){t=t?t+" "+i:i;break}}return t},scope:i}}function f(e,t,n,i=0,s=e.length){let r=new d(i,Array.isArray(t)?t:[t],n);r.highlightRange(e.cursor(),i,s,"",r.highlighters),r.flush(s)}c.empty=new c([],2,null);class d{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,s,r){let{type:o,from:l,to:a}=e;if(l>=n||a<=t)return;o.isTop&&(r=this.highlighters.filter(e=>!e.scope||e.scope(o)));let u=s,f=function(e){let t=e.type.prop(h);for(;t&&t.context&&!e.matchContext(t.context);
1)t=t.next;return t||null}(e)||c.empty,d=function(e,t){let n=null;for(let i of e){let e=i.style(t);e&&(n=n?n+" "+e:e)}return n}(r,f.tags);if(d&&(u&&(u+=" "),u+=d,1==f.mode&&(s+=(s?" ":"")+d)),this.startSpan(Math.max(t,l),u),f.opaque)return;let p=e.tree&&e.tree.prop(i.uY.mounted);if(p&&p.overlay){let i=e.node.enter(p.overlay[0].from+l,1),o=this.highlighters.filter(e=>!e.scope||e.scope(p.tree.type)),h=e.firstChild();for(let c=0,f=l;;c++){let d=c<p.overlay.length?p.overlay[c]:null,m=d?d.from+l:a,g=Math.max(t,f),k=Math.min(n,m);if(g<k&&h)for(;e.from<k&&(this.highlightRange(e,g,k,s,r),this.startSpan(Math.min(k,e.to),u),!(e.to>=m)&&e.nextSibling()););if(!d||m>n)break;(f=d.to+l)>t&&(this.highlightRange(i.cursor(),Math.max(t,d.from+l),Math.min(n,f),"",o),this.startSpan(Math.min(n,f),u))}h&&e.parent()}else if(e.firstChild()){p&&(s="");do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,s,r),this.startSpan(Math.min(n,e.to),u)}while(e.nextSibling());e.parent()}}}let p=r.define,m=p(),g=p(),k=p(g),v=p(g),x=p(),y=p(x),b=p(x),w=p(),S=p(w),O=p(),A=p(),_=p(),C=p(_),P=p(),I={comment:m,lineComment:p(m),blockComment:p(m),docComment:p(m),name:g,variableName:p(g),typeName:k,tagName:p(k),propertyName:v,attributeName:p(v),className:p(g),labelName:p(g),namespace:p(g),macroName:p(g),literal:x,string:y,docString:p(y),character:p(y),attributeValue:p(y),number:b,integer:p(b),float:p(b),bool:p(x),regexp:p(x),escape:p(x),color:p(x),url:p(x),keyword:O,self:p(O),null:p(O),atom:p(O),unit:p(O),modifier:p(O),operatorKeyword:p(O),controlKeyword:p(O),definitionKeyword:p(O),moduleKeyword:p(O),operator:A,derefOperator:p(A),arithmeticOperator:p(A),logicOperator:p(A),bitwiseOperator:p(A),compareOperator:p(A),updateOperator:p(A),definitionOperator:p(A),typeOperator:p(A),controlOperator:p(A),punctuation:_,separator:p(_),bracket:C,angleBracket:p(C),squareBracket:p(C),paren:p(C),brace:p(C),content:w,heading:S,heading1:p(S),heading2:p(S),heading3:p(S),heading4:p(S),heading5:p(S),heading6:p(S),contentSeparator:p(w),list:p(w),quote:p(w),emphasis:p(w),strong:p(w),link:p(w),monospace:p(w),strikethrough:p(w),inserted:p(),deleted:p(),changed:p(),invalid:p(),meta:P,documentMeta:p(P),annotation:p(P),processingInstruction:p(P),definition:r.defineModifier("definition"),constant:r.defineModifier("constant"),function:r.defineModifier("function"),standard:r.defineModifier("standard"),local:r.defineModifier("local"),special:r.defineModifier("special")};for(let e in I){let t=I[e];t instanceof r&&(t.name=e)}u([{tag:I.link,class:"tok-link"},{tag:I.heading,class:"tok-heading"},{tag:I.emphasis,class:"tok-emphasis"},{tag:I.strong,class:"tok-strong"},{tag:I.keyword,class:"tok-keyword"},{tag:I.atom,class:"tok-atom"},{tag:I.bool,class:"tok-bool"},{tag:I.url,class:"tok-url"},{tag:I.labelName,class:"tok-labelName"},{tag:I.inserted,class:"tok-inserted"},{tag:I.deleted,class:"tok-deleted"},{tag:I.literal,class:"tok-literal"},{tag:I.string,class:"tok-string"},{tag:I.number,class:"tok-number"},{tag:[I.regexp,I.escape,I.special(I.string)],class:"tok-string2"},{tag:I.variableName,class:"tok-variableName"},{tag:I.local(I.variableName),class:"tok-variableName tok-local"},{tag:I.definition(I.variableName),class:"tok-variableName tok-definition"},{tag:I.special(I.variableName),class:"tok-variableName2"},{tag:I.definition(I.propertyName),class:"tok-propertyName tok-definition"},{tag:I.typeName,class:"tok-typeName"},{tag:I.namespace,class:"tok-namespace"},{tag:I.className,class:"tok-className"},{tag:I.macroName,class:"tok-macroName"},{tag:I.propertyName,class:"tok-propertyName"},{tag:I.operator,class:"tok-operator"},{tag:I.comment,class:"tok-comment"},{tag:I.meta,class:"tok-meta"},{tag:I.invalid,class:"tok-invalid"},{tag:I.punctuation,class:"tok-punctuation"}])},5002:(e,t,n)=>{n.d(t,{G:()=>o});let i="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),s="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class o{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}for(let t in e)!function e(t,s,r,o){let l=[],a=/^@(\w+)\b/.exec(t[0]),h=a&&"keyframes"==a[1];if(a&&null==s)return r.push(t[0]+";");for(let n in s){let o=s[n];if(/&/.test(n))e(n.split(/,\s*/).map(e=>t.map(t=>e.replace(/&/,t))).reduce((e,t)=>
1e.concat(t)),o,r);else if(o&&"object"==typeof o){if(!a)throw RangeError("The value of a property ("+n+") should be a primitive value.");e(i(n),o,l,h)}else null!=o&&l.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+o+";")}(l.length||h)&&r.push((!n||a||o?t:t.map(n)).join(", ")+" {"+l.join(" ")+"}")}(i(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=r[i]||1;return r[i]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let i=e[s],r=n&&n.nonce;i?r&&i.setNonce(r):i=new a(e,r),i.mount(Array.isArray(t)?t:[t],e)}}let l=new Map;class a{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let t=l.get(n);if(t)return e[s]=t;this.sheet=new i.CSSStyleSheet,l.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[s]=this}mount(e,t){let n=this.sheet,i=0,s=0;for(let t=0;t<e.length;t++){let r=e[t],o=this.modules.indexOf(r);if(o<s&&o>-1&&(this.modules.splice(o,1),s--,o=-1),-1==o){if(this.modules.splice(s++,0,r),n)for(let e=0;e<r.rules.length;e++)n.insertRule(r.rules[e],i++)}else{for(;s<o;)i+=this.modules[s++].rules.length;i+=r.rules.length,s++}}if(n)0>t.adoptedStyleSheets.indexOf(this.sheet)&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e="";for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+"\n";this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}},396:(e,t,n)=>{n.d(t,{BN:()=>s,E3:()=>i,xT:()=>h});for(var i={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},s={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},r="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)i[48+l]=i[96+l]=String(l);for(var l=1;l<=24;l++)i[l+111]="F"+l;for(var l=65;l<=90;l++)i[l]=String.fromCharCode(l+32),s[l]=String.fromCharCode(l);for(var a in i)s.hasOwnProperty(a)||(s[a]=i[a]);function h(e){var t=!(r&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||o&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?s:i)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.