BookStack/public/dist/app.js

87 lines
695 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var ea=Object.defineProperty,jy=Object.prototype.hasOwnProperty,ue=(t,n)=>()=>(n||(n={exports:{}},t(n.exports,n)),n.exports),Qc=t=>ea(t,"__esModule",{value:!0}),Hy=(t,n)=>{Qc(t);for(var i in n)ea(t,i,{get:n[i],enumerable:!0})},Uy=(t,n)=>{if(Qc(t),typeof n=="object"||typeof n=="function")for(let i in n)!jy.call(t,i)&&i!=="default"&&ea(t,i,{get:()=>n[i],enumerable:!0});return t},Ke=t=>t&&t.__esModule?t:Uy(ea({},"default",{value:t,enumerable:!0}),t);var Ze=ue((Ws,$s)=>{(function(t,n){typeof Ws=="object"&&typeof $s!="undefined"?$s.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self,t.CodeMirror=n())})(Ws,function(){"use strict";var t=navigator.userAgent,n=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),c=/Edge\/(\d+)/.exec(t),d=s||u||c,h=d&&(s?document.documentMode||6:+(c||u)[1]),p=!c&&/WebKit\//.test(t),g=p&&/Qt\/\d+\.\d+/.test(t),y=!c&&/Chrome\//.test(t),m=/Opera\//.test(t),b=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),D=/PhantomJS/.test(t),E=!c&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),S=/Android/.test(t),z=E||S||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),A=E||/Mac/.test(n),R=/\bCrOS\b/.test(t),U=/win/i.test(n),Y=m&&t.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(m=!1,p=!0);var B=A&&(g||m&&(Y==null||Y<12.11)),G=i||d&&h>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var J=function(e,r){var a=e.className,o=ee(r).exec(a);if(o){var l=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(l?o[1]+l:"")}};function O(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Z(e,r){return O(e).appendChild(r)}function _(e,r,a,o){var l=document.createElement(e);if(a&&(l.className=a),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var f=0;f<r.length;++f)l.appendChild(r[f]);return l}function V(e,r,a,o){var l=_(e,r,a,o);return l.setAttribute("role","presentation"),l}var j;document.createRange?j=function(e,r,a,o){var l=document.createRange();return l.setEnd(o||e,a),l.setStart(e,r),l}:j=function(e,r,a){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(l){return o}return o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",r),o};function Q(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function q(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function I(e,r){var a=e.className;ee(r).test(a)||(e.className+=(a?" ":"")+r)}function H(e,r){for(var a=e.split(" "),o=0;o<a.length;o++)a[o]&&!ee(a[o]).test(r)&&(r+=" "+a[o]);return r}var se=function(e){e.select()};E?se=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:d&&(se=function(e){try{e.select()}catch(r){}});function F(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function T(e,r,a){r||(r={});for(var o in e)e.hasOwnProperty(o)&&(a!==!1||!r.hasOwnProperty(o))&&(r[o]=e[o]);return r}function de(e,r,a,o,l){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var f=o||0,v=l||0;;){var k=e.indexOf(" ",f);if(k<0||k>=r)return v+(r-f);v+=k-f,v+=a-v%a,f=k+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ce.prototype.set=function(e,r){this.f=r;var a=+new Date+e;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=a)};function oe(e,r){for(var a=0;a<e.length;++a)if(e[a]==r)return a;return-1}var xe=50,Oe={toString:function(){return"CodeMirror.Pass"}},ye={scroll:!1},re={origin:"*mouse"},we={origin:"+move"};function De(e,r,a){for(var o=0,l=0;;){var f=e.indexOf(" ",o);f==-1&&(f=e.length);var v=f-o;if(f==e.length||l+v>=r)return o+Math.min(v,r-l);if(l+=f-o,l+=a-l%a,o=f+1,l>=r)return o}}var Pe=[""];function rt(e){for(;Pe.length<=e;)Pe.push(Ce(Pe)+" ");return Pe[e]}function Ce(e){return e[e.length-1]}function nt(e,r){for(var a=[],o=0;o<e.length;o++)a[o]=r(e[o],o);return a}function mt(e,r,a){for(var o=0,l=a(r);o<e.length&&a(e[o])<=l;)o++;e.splice(o,0,r)}function gt(){}function Wt(e,r){var a;return Object.create?a=Object.create(e):(gt.prototype=e,a=new gt),r&&T(r,a),a}var qe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function X(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qe.test(e))}function le(e,r){return r?r.source.indexOf("\\w")>-1&&X(e)?!0:r.test(e):X(e)}function te(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var He=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ct(e){return e.charCodeAt(0)>=768&&He.test(e)}function Ae(e,r,a){for(;(a<0?r>0:r<e.length)&&Ct(e.charAt(r));)r+=a;return r}function Fe(e,r,a){for(var o=r>a?-1:1;;){if(r==a)return r;var l=(r+a)/2,f=o<0?Math.ceil(l):Math.floor(l);if(f==r)return e(f)?r:a;e(f)?a=f:r=f+o}}function ke(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var l=!1,f=0;f<e.length;++f){var v=e[f];(v.from<a&&v.to>r||r==a&&v.to==r)&&(o(Math.max(v.from,r),Math.min(v.to,a),v.level==1?"rtl":"ltr",f),l=!0)}l||o(r,a,"ltr")}var Ie=null;function Ye(e,r,a){var o;Ie=null;for(var l=0;l<e.length;++l){var f=e[l];if(f.from<r&&f.to>r)return l;f.to==r&&(f.from!=f.to&&a=="before"?o=l:Ie=l),f.from==r&&(f.from!=f.to&&a!="before"?o=l:Ie=l)}return o!=null?o:Ie}var hn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?r.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,f=/[LRr]/,v=/[Lb1n]/,k=/[1n]/;function x(C,M,P){this.level=C,this.from=M,this.to=P}return function(C,M){var P=M=="ltr"?"L":"R";if(C.length==0||M=="ltr"&&!o.test(C))return!1;for(var K=C.length,$=[],ne=0;ne<K;++ne)$.push(a(C.charCodeAt(ne)));for(var ae=0,he=P;ae<K;++ae){var pe=$[ae];pe=="m"?$[ae]=he:he=pe}for(var ve=0,me=P;ve<K;++ve){var be=$[ve];be=="1"&&me=="r"?$[ve]="n":f.test(be)&&(me=be,be=="r"&&($[ve]="R"))}for(var Le=1,Ee=$[0];Le<K-1;++Le){var Ne=$[Le];Ne=="+"&&Ee=="1"&&$[Le+1]=="1"?$[Le]="1":Ne==","&&Ee==$[Le+1]&&(Ee=="1"||Ee=="n")&&($[Le]=Ee),Ee=Ne}for(var it=0;it<K;++it){var Ft=$[it];if(Ft==",")$[it]="N";else if(Ft=="%"){var ct=void 0;for(ct=it+1;ct<K&&$[ct]=="%";++ct);for(var rn=it&&$[it-1]=="!"||ct<K&&$[ct]=="1"?"1":"N",Qt=it;Qt<ct;++Qt)$[Qt]=rn;it=ct-1}}for(var kt=0,Jt=P;kt<K;++kt){var Pt=$[kt];Jt=="L"&&Pt=="1"?$[kt]="L":f.test(Pt)&&(Jt=Pt)}for(var Dt=0;Dt<K;++Dt)if(l.test($[Dt])){var xt=void 0;for(xt=Dt+1;xt<K&&l.test($[xt]);++xt);for(var ht=(Dt?$[Dt-1]:P)=="L",en=(xt<K?$[xt]:P)=="L",Jr=ht==en?ht?"L":"R":P,ur=Dt;ur<xt;++ur)$[ur]=Jr;Dt=xt-1}for(var Ht=[],qn,Mt=0;Mt<K;)if(v.test($[Mt])){var Hs=Mt;for(++Mt;Mt<K&&v.test($[Mt]);++Mt);Ht.push(new x(0,Hs,Mt))}else{var Vn=Mt,xr=Ht.length,_r=M=="rtl"?1:0;for(++Mt;Mt<K&&$[Mt]!="L";++Mt);for(var Gt=Vn;Gt<Mt;)if(k.test($[Gt])){Vn<Gt&&(Ht.splice(xr,0,new x(1,Vn,Gt)),xr+=_r);var ei=Gt;for(++Gt;Gt<Mt&&k.test($[Gt]);++Gt);Ht.splice(xr,0,new x(2,ei,Gt)),xr+=_r,Vn=Gt}else++Gt;Vn<Mt&&Ht.splice(xr,0,new x(1,Vn,Mt))}return M=="ltr"&&(Ht[0].level==1&&(qn=C.match(/^\s+/))&&(Ht[0].from=qn[0].length,Ht.unshift(new x(0,0,qn[0].length))),Ce(Ht).level==1&&(qn=C.match(/\s+$/))&&(Ce(Ht).to-=qn[0].length,Ht.push(new x(0,K-qn[0].length,K)))),M=="rtl"?Ht.reverse():Ht}}();function Ot(e,r){var a=e.order;return a==null&&(a=e.order=hn(e.text,r)),a}var yo=[],Te=function(e,r,a){if(e.addEventListener)e.addEventListener(r,a,!1);else if(e.attachEvent)e.attachEvent("on"+r,a);else{var o=e._handlers||(e._handlers={});o[r]=(o[r]||yo).concat(a)}};function gi(e,r){return e._handlers&&e._handlers[r]||yo}function Be(e,r,a){if(e.removeEventListener)e.removeEventListener(r,a,!1);else if(e.detachEvent)e.detachEvent("on"+r,a);else{var o=e._handlers,l=o&&o[r];if(l){var f=oe(l,a);f>-1&&(o[r]=l.slice(0,f).concat(l.slice(f+1)))}}}function dt(e,r){var a=gi(e,r);if(!a.length)return;for(var o=Array.prototype.slice.call(arguments,2),l=0;l<a.length;++l)a[l].apply(null,o)}function st(e,r,a){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),dt(e,a||r.type,e,r),fr(r)||r.codemirrorIgnore}function Lr(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var a=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),o=0;o<r.length;++o)oe(a,r[o])==-1&&a.push(r[o])}function wt(e,r){return gi(e,r).length>0}function Jn(e){e.prototype.on=function(r,a){Te(this,r,a)},e.prototype.off=function(r,a){Be(this,r,a)}}function St(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function wo(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Bt(e){St(e),wo(e)}function Ir(e){return e.target||e.srcElement}function ko(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),A&&e.ctrlKey&&r==1&&(r=3),r}var En=function(){if(d&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),vi;function xo(e){if(vi==null){var r=_("span","");Z(e,_("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vi=r.offsetWidth<=1&&r.offsetHeight>2&&!(d&&h<8))}var a=vi?_("span",""):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Fr;function Za(e){if(Fr!=null)return Fr;var r=Z(e,document.createTextNode("AخA")),a=j(r,0,1).getBoundingClientRect(),o=j(r,1,2).getBoundingClientRect();return O(e),!a||a.left==a.right?!1:Fr=o.right-a.right<3}var Dn=`
b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var l=e.indexOf(`
`,r);l==-1&&(l=e.length);var f=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),v=f.indexOf("\r");v!=-1?(a.push(f.slice(0,v)),r+=v+1):(a.push(f),r=l+1)}return a}:function(e){return e.split(/\r\n?|\n/)},An=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(a){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},er=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mr=null;function Bn(e){if(Mr!=null)return Mr;var r=Z(e,_("span","x")),a=r.getBoundingClientRect(),o=j(r,0,1).getBoundingClientRect();return Mr=Math.abs(a.left-o.left)>1}var bi={},jn={};function qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),bi[e]=r}function bn(e,r){jn[e]=r}function Hn(e){if(typeof e=="string"&&jn.hasOwnProperty(e))e=jn[e];else if(e&&typeof e.name=="string"&&jn.hasOwnProperty(e.name)){var r=jn[e.name];typeof r=="string"&&(r={name:r}),e=Wt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function yi(e,r){r=Hn(r);var a=bi[r.name];if(!a)return yi(e,"text/plain");var o=a(e,r);if(Un.hasOwnProperty(r.name)){var l=Un[r.name];for(var f in l){if(!l.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=l[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var v in r.modeProps)o[v]=r.modeProps[v];return o}var Un={};function Qa(e,r){var a=Un.hasOwnProperty(e)?Un[e]:Un[e]={};T(r,a)}function fn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),a[o]=l}return a}function zr(e,r){for(var a;e.innerMode&&!(a=e.innerMode(r),!a||a.mode==e);)r=a.state,e=a.mode;return a||{mode:e,state:r}}function _o(e,r,a){return e.startState?e.startState(r,a):!0}var lt=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};lt.prototype.eol=function(){return this.pos>=this.string.length},lt.prototype.sol=function(){return this.pos==this.lineStart},lt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},lt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},lt.prototype.eat=function(e){var r=this.string.charAt(this.pos),a;if(typeof e=="string"?a=r==e:a=r&&(e.test?e.test(r):e(r)),a)return++this.pos,r},lt.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},lt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},lt.prototype.skipToEnd=function(){this.pos=this.string.length},lt.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},lt.prototype.backUp=function(e){this.pos-=e},lt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=de(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},lt.prototype.indentation=function(){return de(this.string,null,this.tabSize)-(this.lineStart?de(this.string,this.lineStart,this.tabSize):0)},lt.prototype.match=function(e,r,a){if(typeof e=="string"){var o=function(v){return a?v.toLowerCase():v},l=this.string.substr(this.pos,e.length);if(o(l)==o(e))return r!==!1&&(this.pos+=e.length),!0}else{var f=this.string.slice(this.pos).match(e);return f&&f.index>0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},lt.prototype.current=function(){return this.string.slice(this.start,this.pos)},lt.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},lt.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},lt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function _e(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var l=a.children[o],f=l.chunkSize();if(r<f){a=l;break}r-=f}return a.lines[r]}function Tn(e,r,a){var o=[],l=r.line;return e.iter(r.line,a.line+1,function(f){var v=f.text;l==a.line&&(v=v.slice(0,a.ch)),l==r.line&&(v=v.slice(r.ch)),o.push(v),++l}),o}function wi(e,r,a){var o=[];return e.iter(r,a,function(l){o.push(l.text)}),o}function pn(e,r){var a=r-e.height;if(a)for(var o=e;o;o=o.parent)o.height+=a}function Ve(e){if(e.parent==null)return null;for(var r=e.parent,a=oe(r.lines,e),o=r.parent;o;r=o,o=o.parent)for(var l=0;!(o.children[l]==r);++l)a+=o.children[l].chunkSize();return a+r.first}function L(e,r){var a=e.first;e:do{for(var o=0;o<e.children.length;++o){var l=e.children[o],f=l.height;if(r<f){e=l;continue e}r-=f,a+=l.chunkSize()}return a}while(!e.lines);for(var v=0;v<e.lines.length;++v){var k=e.lines[v],x=k.height;if(r<x)break;r-=x}return a+v}function N(e,r){return r>=e.first&&r<e.first+e.size}function ie(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function W(e,r,a){if(a===void 0&&(a=null),!(this instanceof W))return new W(e,r,a);this.line=e,this.ch=r,this.sticky=a}function fe(e,r){return e.line-r.line||e.ch-r.ch}function $e(e,r){return e.sticky==r.sticky&&fe(e,r)==0}function Je(e){return W(e.line,e.ch)}function Et(e,r){return fe(e,r)<0?r:e}function Yt(e,r){return fe(e,r)<0?e:r}function Co(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function ze(e,r){if(r.line<e.first)return W(e.first,0);var a=e.first+e.size-1;return r.line>a?W(a,_e(e,a).text.length):Hv(r,_e(e,r.line).text.length)}function Hv(e,r){var a=e.ch;return a==null||a>r?W(e.line,r):a<0?W(e.line,0):e}function Zl(e,r){for(var a=[],o=0;o<r.length;o++)a[o]=ze(e,r[o]);return a}var So=function(e,r){this.state=e,this.lookAhead=r},Ln=function(e,r,a,o){this.state=r,this.doc=e,this.line=a,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};Ln.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},Ln.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,r,a){return r instanceof So?new Ln(e,fn(e.mode,r.state),a,r.lookAhead):new Ln(e,fn(e.mode,r),a)},Ln.prototype.save=function(e){var r=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new So(r,this.maxLookAhead):r};function Ql(e,r,a,o){var l=[e.state.modeGen],f={};iu(e,r.text,e.doc.mode,a,function(C,M){return l.push(C,M)},f,o);for(var v=a.state,k=function(C){a.baseTokens=l;var M=e.state.overlays[C],P=1,K=0;a.state=!0,iu(e,r.text,M.mode,a,function($,ne){for(var ae=P;K<$;){var he=l[P];he>$&&l.splice(P,1,$,l[P+1],he),P+=2,K=Math.min($,he)}if(!ne)return;if(M.opaque)l.splice(ae,P-ae,$,"overlay "+ne),P=ae+2;else for(;ae<P;ae+=2){var pe=l[ae+1];l[ae+1]=(pe?pe+" ":"")+"overlay "+ne}},f),a.state=v,a.baseTokens=null,a.baseTokenPos=1},x=0;x<e.state.overlays.length;++x)k(x);return{styles:l,classes:f.bgClass||f.textClass?f:null}}function Jl(e,r,a){if(!r.styles||r.styles[0]!=e.state.modeGen){var o=ki(e,Ve(r)),l=r.text.length>e.options.maxHighlightLength&&fn(e.doc.mode,o.state),f=Ql(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=f.styles,f.classes?r.styleClasses=f.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function ki(e,r,a){var o=e.doc,l=e.display;if(!o.mode.startState)return new Ln(o,!0,r);var f=Uv(e,r,a),v=f>o.first&&_e(o,f-1).stateAfter,k=v?Ln.fromSaved(o,v,f):new Ln(o,_o(o.mode),f);return o.iter(f,r,function(x){Ja(e,x.text,k);var C=k.line;x.stateAfter=C==r-1||C%5==0||C>=l.viewFrom&&C<l.viewTo?k.save():null,k.nextLine()}),a&&(o.modeFrontier=k.line),k}function Ja(e,r,a,o){var l=e.doc.mode,f=new lt(r,e.options.tabSize,a);for(f.start=f.pos=o||0,r==""&&eu(l,a.state);!f.eol();)es(l,f,a.state),f.start=f.pos}function eu(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var a=zr(e,r);if(a.mode.blankLine)return a.mode.blankLine(a.state)}function es(e,r,a,o){for(var l=0;l<10;l++){o&&(o[0]=zr(e,a).mode);var f=e.token(r,a);if(r.pos>r.start)return f}throw new Error("Mode "+e.name+" failed to advance stream.")}var tu=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function nu(e,r,a,o){var l=e.doc,f=l.mode,v;r=ze(l,r);var k=_e(l,r.line),x=ki(e,r.line,a),C=new lt(k.text,e.options.tabSize,x),M;for(o&&(M=[]);(o||C.pos<r.ch)&&!C.eol();)C.start=C.pos,v=es(f,C,x.state),o&&M.push(new tu(C,v,fn(l.mode,x.state)));return o?M:new tu(C,v,x.state)}function ru(e,r){if(e)for(;;){var a=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!a)break;e=e.slice(0,a.index)+e.slice(a.index+a[0].length);var o=a[1]?"bgClass":"textClass";r[o]==null?r[o]=a[2]:new RegExp("(?:^|\\s)"+a[2]+"(?:$|\\s)").test(r[o])||(r[o]+=" "+a[2])}return e}function iu(e,r,a,o,l,f,v){var k=a.flattenSpans;k==null&&(k=e.options.flattenSpans);var x=0,C=null,M=new lt(r,e.options.tabSize,o),P,K=e.options.addModeClass&&[null];for(r==""&&ru(eu(a,o.state),f);!M.eol();){if(M.pos>e.options.maxHighlightLength?(k=!1,v&&Ja(e,r,o,M.pos),M.pos=r.length,P=null):P=ru(es(a,M,o.state,K),f),K){var $=K[0].name;$&&(P="m-"+(P?$+" "+P:$))}if(!k||C!=P){for(;x<M.start;)x=Math.min(M.start,x+5e3),l(x,C);C=P}M.start=M.pos}for(;x<M.pos;){var ne=Math.min(M.pos,x+5e3);l(ne,C),x=ne}}function Uv(e,r,a){for(var o,l,f=e.doc,v=a?-1:r-(e.doc.mode.innerMode?1e3:100),k=r;k>v;--k){if(k<=f.first)return f.first;var x=_e(f,k-1),C=x.stateAfter;if(C&&(!a||k+(C instanceof So?C.lookAhead:0)<=f.modeFrontier))return k;var M=de(x.text,null,e.options.tabSize);(l==null||o>M)&&(l=k-1,o=M)}return l}function Wv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var a=e.first,o=r-1;o>a;o--){var l=_e(e,o).stateAfter;if(l&&(!(l instanceof So)||o+l.lookAhead<r)){a=o+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,a)}var ou=!1,Wn=!1;function $v(){ou=!0}function Gv(){Wn=!0}function Eo(e,r,a){this.marker=e,this.from=r,this.to=a}function xi(e,r){if(e)for(var a=0;a<e.length;++a){var o=e[a];if(o.marker==r)return o}}function Kv(e,r){for(var a,o=0;o<e.length;++o)e[o]!=r&&(a||(a=[])).push(e[o]);return a}function Vv(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function Yv(e,r,a){var o;if(e)for(var l=0;l<e.length;++l){var f=e[l],v=f.marker,k=f.from==null||(v.inclusiveLeft?f.from<=r:f.from<r);if(k||f.from==r&&v.type=="bookmark"&&(!a||!f.marker.insertLeft)){var x=f.to==null||(v.inclusiveRight?f.to>=r:f.to>r);(o||(o=[])).push(new Eo(v,f.from,x?null:f.to))}}return o}function Xv(e,r,a){var o;if(e)for(var l=0;l<e.length;++l){var f=e[l],v=f.marker,k=f.to==null||(v.inclusiveRight?f.to>=r:f.to>r);if(k||f.from==r&&v.type=="bookmark"&&(!a||f.marker.insertLeft)){var x=f.from==null||(v.inclusiveLeft?f.from<=r:f.from<r);(o||(o=[])).push(new Eo(v,x?null:f.from-r,f.to==null?null:f.to-r))}}return o}function ts(e,r){if(r.full)return null;var a=N(e,r.from.line)&&_e(e,r.from.line).markedSpans,o=N(e,r.to.line)&&_e(e,r.to.line).markedSpans;if(!a&&!o)return null;var l=r.from.ch,f=r.to.ch,v=fe(r.from,r.to)==0,k=Yv(a,l,v),x=Xv(o,f,v),C=r.text.length==1,M=Ce(r.text).length+(C?l:0);if(k)for(var P=0;P<k.length;++P){var K=k[P];if(K.to==null){var $=xi(x,K.marker);$?C&&(K.to=$.to==null?null:$.to+M):K.to=l}}if(x)for(var ne=0;ne<x.length;++ne){var ae=x[ne];if(ae.to!=null&&(ae.to+=M),ae.from==null){var he=xi(k,ae.marker);he||(ae.from=M,C&&(k||(k=[])).push(ae))}else ae.from+=M,C&&(k||(k=[])).push(ae)}k&&(k=au(k)),x&&x!=k&&(x=au(x));var pe=[k];if(!C){var ve=r.text.length-2,me;if(ve>0&&k)for(var be=0;be<k.length;++be)k[be].to==null&&(me||(me=[])).push(new Eo(k[be].marker,null,null));for(var Le=0;Le<ve;++Le)pe.push(me);pe.push(x)}return pe}function au(e){for(var r=0;r<e.length;++r){var a=e[r];a.from!=null&&a.from==a.to&&a.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Zv(e,r,a){var o=null;if(e.iter(r.line,a.line+1,function($){if($.markedSpans)for(var ne=0;ne<$.markedSpans.length;++ne){var ae=$.markedSpans[ne].marker;ae.readOnly&&(!o||oe(o,ae)==-1)&&(o||(o=[])).push(ae)}}),!o)return null;for(var l=[{from:r,to:a}],f=0;f<o.length;++f)for(var v=o[f],k=v.find(0),x=0;x<l.length;++x){var C=l[x];if(fe(C.to,k.from)<0||fe(C.from,k.to)>0)continue;var M=[x,1],P=fe(C.from,k.from),K=fe(C.to,k.to);(P<0||!v.inclusiveLeft&&!P)&&M.push({from:C.from,to:k.from}),(K>0||!v.inclusiveRight&&!K)&&M.push({from:k.to,to:C.to}),l.splice.apply(l,M),x+=M.length-3}return l}function su(e){var r=e.markedSpans;if(!r)return;for(var a=0;a<r.length;++a)r[a].marker.detachLine(e);e.markedSpans=null}function lu(e,r){if(!r)return;for(var a=0;a<r.length;++a)r[a].marker.attachLine(e);e.markedSpans=r}function Do(e){return e.inclusiveLeft?-1:0}function Ao(e){return e.inclusiveRight?1:0}function ns(e,r){var a=e.lines.length-r.lines.length;if(a!=0)return a;var o=e.find(),l=r.find(),f=fe(o.from,l.from)||Do(e)-Do(r);if(f)return-f;var v=fe(o.to,l.to)||Ao(e)-Ao(r);return v||r.id-e.id}function uu(e,r){var a=Wn&&e.markedSpans,o;if(a)for(var l=void 0,f=0;f<a.length;++f)l=a[f],l.marker.collapsed&&(r?l.from:l.to)==null&&(!o||ns(o,l.marker)<0)&&(o=l.marker);return o}function cu(e){return uu(e,!0)}function To(e){return uu(e,!1)}function Qv(e,r){var a=Wn&&e.markedSpans,o;if(a)for(var l=0;l<a.length;++l){var f=a[l];f.marker.collapsed&&(f.from==null||f.from<r)&&(f.to==null||f.to>r)&&(!o||ns(o,f.marker)<0)&&(o=f.marker)}return o}function du(e,r,a,o,l){var f=_e(e,r),v=Wn&&f.markedSpans;if(v)for(var k=0;k<v.length;++k){var x=v[k];if(!x.marker.collapsed)continue;var C=x.marker.find(0),M=fe(C.from,a)||Do(x.marker)-Do(l),P=fe(C.to,o)||Ao(x.marker)-Ao(l);if(M>=0&&P<=0||M<=0&&P>=0)continue;if(M<=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?fe(C.to,a)>=0:fe(C.to,a)>0)||M>=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?fe(C.from,o)<=0:fe(C.from,o)<0))return!0}}function In(e){for(var r;r=cu(e);)e=r.find(-1,!0).line;return e}function Jv(e){for(var r;r=To(e);)e=r.find(1,!0).line;return e}function eb(e){for(var r,a;r=To(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function rs(e,r){var a=_e(e,r),o=In(a);return a==o?r:Ve(o)}function hu(e,r){if(r>e.lastLine())return r;var a=_e(e,r),o;if(!tr(e,a))return r;for(;o=To(a);)a=o.find(1,!0).line;return Ve(a)+1}function tr(e,r){var a=Wn&&r.markedSpans;if(a)for(var o=void 0,l=0;l<a.length;++l){if(o=a[l],!o.marker.collapsed)continue;if(o.from==null)return!0;if(o.marker.widgetNode)continue;if(o.from==0&&o.marker.inclusiveLeft&&is(e,r,o))return!0}}function is(e,r,a){if(a.to==null){var o=a.marker.find(1,!0);return is(e,o.line,xi(o.line.markedSpans,a.marker))}if(a.marker.inclusiveRight&&a.to==r.text.length)return!0;for(var l=void 0,f=0;f<r.markedSpans.length;++f)if(l=r.markedSpans[f],l.marker.collapsed&&!l.marker.widgetNode&&l.from==a.to&&(l.to==null||l.to!=a.from)&&(l.marker.inclusiveLeft||a.marker.inclusiveRight)&&is(e,r,l))return!0}function $n(e){e=In(e);for(var r=0,a=e.parent,o=0;o<a.lines.length;++o){var l=a.lines[o];if(l==e)break;r+=l.height}for(var f=a.parent;f;a=f,f=a.parent)for(var v=0;v<f.children.length;++v){var k=f.children[v];if(k==a)break;r+=k.height}return r}function Lo(e){if(e.height==0)return 0;for(var r=e.text.length,a,o=e;a=cu(o);){var l=a.find(0,!0);o=l.from.line,r+=l.from.ch-l.to.ch}for(o=e;a=To(o);){var f=a.find(0,!0);r-=o.text.length-f.from.ch,o=f.to.line,r+=o.text.length-f.to.ch}return r}function os(e){var r=e.display,a=e.doc;r.maxLine=_e(a,a.first),r.maxLineLength=Lo(r.maxLine),r.maxLineChanged=!0,a.iter(function(o){var l=Lo(o);l>r.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var Or=function(e,r,a){this.text=e,lu(this,r),this.height=a?a(this):1};Or.prototype.lineNo=function(){return Ve(this)},Jn(Or);function tb(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),su(e),lu(e,a);var l=o?o(e):1;l!=e.height&&pn(e,l)}function nb(e){e.parent=null,su(e)}var rb={},ib={};function fu(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?ib:rb;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function pu(e,r){var a=V("span",null,null,p?"padding-right: .1px":null),o={pre:V("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var l=0;l<=(r.rest?r.rest.length:0);l++){var f=l?r.rest[l-1]:r.line,v=void 0;o.pos=0,o.addToken=ab,Za(e.display.measure)&&(v=Ot(f,e.doc.direction))&&(o.addToken=lb(o.addToken,v)),o.map=[];var k=r!=e.display.externalMeasured&&Ve(f);ub(f,o,Jl(e,f,k)),f.styleClasses&&(f.styleClasses.bgClass&&(o.bgClass=H(f.styleClasses.bgClass,o.bgClass||"")),f.styleClasses.textClass&&(o.textClass=H(f.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(xo(e.display.measure))),l==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(p){var x=o.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return dt(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=H(o.pre.className,o.textClass||"")),o}function ob(e){var r=_("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function ab(e,r,a,o,l,f,v){if(!r)return;var k=e.splitSpaces?sb(r,e.trailingSpace):r,x=e.cm.state.specialChars,C=!1,M;if(!x.test(r))e.col+=r.length,M=document.createTextNode(k),e.map.push(e.pos,e.pos+r.length,M),d&&h<9&&(C=!0),e.pos+=r.length;else{M=document.createDocumentFragment();for(var P=0;;){x.lastIndex=P;var K=x.exec(r),$=K?K.index-P:r.length-P;if($){var ne=document.createTextNode(k.slice(P,P+$));d&&h<9?M.appendChild(_("span",[ne])):M.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!K)break;P+=$+1;var ae=void 0;if(K[0]==" "){var he=e.cm.options.tabSize,pe=he-e.col%he;ae=M.appendChild(_("span",rt(pe),"cm-tab")),ae.setAttribute("role","presentation"),ae.setAttribute("cm-text"," "),e.col+=pe}else K[0]=="\r"||K[0]==`
`?(ae=M.appendChild(_("span",K[0]=="\r"?"␍":"␤","cm-invalidchar")),ae.setAttribute("cm-text",K[0]),e.col+=1):(ae=e.cm.options.specialCharPlaceholder(K[0]),ae.setAttribute("cm-text",K[0]),d&&h<9?M.appendChild(_("span",[ae])):M.appendChild(ae),e.col+=1);e.map.push(e.pos,e.pos+1,ae),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||l||C||f||v){var ve=a||"";o&&(ve+=o),l&&(ve+=l);var me=_("span",[M],ve,f);if(v)for(var be in v)v.hasOwnProperty(be)&&be!="style"&&be!="class"&&me.setAttribute(be,v[be]);return e.content.appendChild(me)}e.content.appendChild(M)}function sb(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",l=0;l<e.length;l++){var f=e.charAt(l);f==" "&&a&&(l==e.length-1||e.charCodeAt(l+1)==32)&&(f=" "),o+=f,a=f==" "}return o}function lb(e,r){return function(a,o,l,f,v,k,x){l=l?l+" cm-force-border":"cm-force-border";for(var C=a.pos,M=C+o.length;;){for(var P=void 0,K=0;K<r.length&&!(P=r[K],P.to>C&&P.from<=C);K++);if(P.to>=M)return e(a,o,l,f,v,k,x);e(a,o.slice(0,P.to-C),l,f,null,k,x),f=null,o=o.slice(P.to-C),C=P.to}}}function mu(e,r,a,o){var l=!o&&a.widgetNode;l&&e.map.push(e.pos,e.pos+r,l),!o&&e.cm.display.input.needsContentAttribute&&(l||(l=e.content.appendChild(document.createElement("span"))),l.setAttribute("cm-marker",a.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function ub(e,r,a){var o=e.markedSpans,l=e.text,f=0;if(!o){for(var v=1;v<a.length;v+=2)r.addToken(r,l.slice(f,f=a[v]),fu(a[v+1],r.cm.options));return}for(var k=l.length,x=0,C=1,M="",P,K,$=0,ne,ae,he,pe,ve;;){if($==x){ne=ae=he=K="",ve=null,pe=null,$=Infinity;for(var me=[],be=void 0,Le=0;Le<o.length;++Le){var Ee=o[Le],Ne=Ee.marker;if(Ne.type=="bookmark"&&Ee.from==x&&Ne.widgetNode)me.push(Ne);else if(Ee.from<=x&&(Ee.to==null||Ee.to>x||Ne.collapsed&&Ee.to==x&&Ee.from==x)){if(Ee.to!=null&&Ee.to!=x&&$>Ee.to&&($=Ee.to,ae=""),Ne.className&&(ne+=" "+Ne.className),Ne.css&&(K=(K?K+";":"")+Ne.css),Ne.startStyle&&Ee.from==x&&(he+=" "+Ne.startStyle),Ne.endStyle&&Ee.to==$&&(be||(be=[])).push(Ne.endStyle,Ee.to),Ne.title&&((ve||(ve={})).title=Ne.title),Ne.attributes)for(var it in Ne.attributes)(ve||(ve={}))[it]=Ne.attributes[it];Ne.collapsed&&(!pe||ns(pe.marker,Ne)<0)&&(pe=Ee)}else Ee.from>x&&$>Ee.from&&($=Ee.from)}if(be)for(var Ft=0;Ft<be.length;Ft+=2)be[Ft+1]==$&&(ae+=" "+be[Ft]);if(!pe||pe.from==x)for(var ct=0;ct<me.length;++ct)mu(r,0,me[ct]);if(pe&&(pe.from||0)==x){if(mu(r,(pe.to==null?k+1:pe.to)-x,pe.marker,pe.from==null),pe.to==null)return;pe.to==x&&(pe=!1)}}if(x>=k)break;for(var rn=Math.min(k,$);;){if(M){var Qt=x+M.length;if(!pe){var kt=Qt>rn?M.slice(0,rn-x):M;r.addToken(r,kt,P?P+ne:ne,he,x+kt.length==$?ae:"",K,ve)}if(Qt>=rn){M=M.slice(rn-x),x=rn;break}x=Qt,he=""}M=l.slice(f,f=a[C++]),P=fu(a[C++],r.cm.options)}}}function gu(e,r,a){this.line=r,this.rest=eb(r),this.size=this.rest?Ve(Ce(this.rest))-a+1:1,this.node=this.text=null,this.hidden=tr(e,r)}function Io(e,r,a){for(var o=[],l,f=r;f<a;f=l){var v=new gu(e.doc,_e(e.doc,f),f);l=f+v.size,o.push(v)}return o}var Rr=null;function cb(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function db(e){var r=e.delayedCallbacks,a=0;do{for(;a<r.length;a++)r[a].call(null);for(var o=0;o<e.ops.length;o++){var l=e.ops[o];if(l.cursorActivityHandlers)for(;l.cursorActivityCalled<l.cursorActivityHandlers.length;)l.cursorActivityHandlers[l.cursorActivityCalled++].call(null,l.cm)}}while(a<r.length)}function hb(e,r){var a=e.ownsGroup;if(!a)return;try{db(a)}finally{Rr=null,r(a)}}var _i=null;function Rt(e,r){var a=gi(e,r);if(!a.length)return;var o=Array.prototype.slice.call(arguments,2),l;Rr?l=Rr.delayedCallbacks:_i?l=_i:(l=_i=[],setTimeout(fb,0));for(var f=function(k){l.push(function(){return a[k].apply(null,o)})},v=0;v<a.length;++v)f(v)}function fb(){var e=_i;_i=null;for(var r=0;r<e.length;++r)e[r]()}function vu(e,r,a,o){for(var l=0;l<r.changes.length;l++){var f=r.changes[l];f=="text"?mb(e,r):f=="gutter"?yu(e,r,a,o):f=="class"?as(e,r):f=="widget"&&gb(e,r,o)}r.changes=null}function Ci(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),d&&h<8&&(e.node.style.zIndex=2)),e.node}function pb(e,r){var a=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(a&&(a+=" CodeMirror-linebackground"),r.background)a?r.background.className=a:(r.background.parentNode.removeChild(r.background),r.background=null);else if(a){var o=Ci(r);r.background=o.insertBefore(_("div",null,a),o.firstChild),e.display.input.setUneditable(r.background)}}function bu(e,r){var a=e.display.externalMeasured;return a&&a.line==r.line?(e.display.externalMeasured=null,r.measure=a.measure,a.built):pu(e,r)}function mb(e,r){var a=r.text.className,o=bu(e,r);r.text==r.node&&(r.node=o.pre),r.text.parentNode.replaceChild(o.pre,r.text),r.text=o.pre,o.bgClass!=r.bgClass||o.textClass!=r.textClass?(r.bgClass=o.bgClass,r.textClass=o.textClass,as(e,r)):a&&(r.text.className=a)}function as(e,r){pb(e,r),r.line.wrapClass?Ci(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var a=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=a||""}function yu(e,r,a,o){if(r.gutter&&(r.node.removeChild(r.gutter),r.gutter=null),r.gutterBackground&&(r.node.removeChild(r.gutterBackground),r.gutterBackground=null),r.line.gutterClass){var l=Ci(r);r.gutterBackground=_("div",null,"CodeMirror-gutter-background "+r.line.gutterClass,"left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),e.display.input.setUneditable(r.gutterBackground),l.insertBefore(r.gutterBackground,r.text)}var f=r.line.gutterMarkers;if(e.options.lineNumbers||f){var v=Ci(r),k=r.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(e.display.input.setUneditable(k),v.insertBefore(k,r.text),r.line.gutterClass&&(k.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!f||!f["CodeMirror-linenumbers"])&&(r.lineNumber=k.appendChild(_("div",ie(e.options,a),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),f)for(var x=0;x<e.display.gutterSpecs.length;++x){var C=e.display.gutterSpecs[x].className,M=f.hasOwnProperty(C)&&f[C];M&&k.appendChild(_("div",[M],"CodeMirror-gutter-elt","left: "+o.gutterLeft[C]+"px; width: "+o.gutterWidth[C]+"px"))}}}function gb(e,r,a){r.alignable&&(r.alignable=null);for(var o=ee("CodeMirror-linewidget"),l=r.node.firstChild,f=void 0;l;l=f)f=l.nextSibling,o.test(l.className)&&r.node.removeChild(l);wu(e,r,a)}function vb(e,r,a,o){var l=bu(e,r);return r.text=r.node=l.pre,l.bgClass&&(r.bgClass=l.bgClass),l.textClass&&(r.textClass=l.textClass),as(e,r),yu(e,r,a,o),wu(e,r,o),r.node}function wu(e,r,a){if(ku(e,r.line,r,a,!0),r.rest)for(var o=0;o<r.rest.length;o++)ku(e,r.rest[o],r,a,!1)}function ku(e,r,a,o,l){if(!r.widgets)return;for(var f=Ci(a),v=0,k=r.widgets;v<k.length;++v){var x=k[v],C=_("div",[x.node],"CodeMirror-linewidget"+(x.className?" "+x.className:""));x.handleMouseEvents||C.setAttribute("cm-ignore-events","true"),bb(x,C,a,o),e.display.input.setUneditable(C),l&&x.above?f.insertBefore(C,a.gutter||a.text):f.appendChild(C),Rt(x,"redraw")}}function bb(e,r,a,o){if(e.noHScroll){(a.alignable||(a.alignable=[])).push(r);var l=o.wrapperWidth;r.style.left=o.fixedPos+"px",e.coverGutter||(l-=o.gutterTotalWidth,r.style.paddingLeft=o.gutterTotalWidth+"px"),r.style.width=l+"px"}e.coverGutter&&(r.style.zIndex=5,r.style.position="relative",e.noHScroll||(r.style.marginLeft=-o.gutterTotalWidth+"px"))}function Si(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!Q(document.body,e.node)){var a="position: relative;";e.coverGutter&&(a+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(a+="width: "+r.display.wrapper.clientWidth+"px;"),Z(r.display.measure,_("div",[e.node],null,a))}return e.height=e.node.parentNode.offsetHeight}function Gn(e,r){for(var a=Ir(r);a!=e.wrapper;a=a.parentNode)if(!a||a.nodeType==1&&a.getAttribute("cm-ignore-events")=="true"||a.parentNode==e.sizer&&a!=e.mover)return!0}function Fo(e){return e.lineSpace.offsetTop}function ss(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function xu(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=Z(e.measure,_("pre","x","CodeMirror-line-like")),a=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,o={left:parseInt(a.paddingLeft),right:parseInt(a.paddingRight)};return!isNaN(o.left)&&!isNaN(o.right)&&(e.cachedPaddingH=o),o}function Fn(e){return xe-e.display.nativeBarWidth}function pr(e){return e.display.scroller.clientWidth-Fn(e)-e.display.barWidth}function ls(e){return e.display.scroller.clientHeight-Fn(e)-e.display.barHeight}function yb(e,r,a){var o=e.options.lineWrapping,l=o&&pr(e);if(!r.measure.heights||o&&r.measure.width!=l){var f=r.measure.heights=[];if(o){r.measure.width=l;for(var v=r.text.firstChild.getClientRects(),k=0;k<v.length-1;k++){var x=v[k],C=v[k+1];Math.abs(x.bottom-C.bottom)>2&&f.push((x.bottom+C.top)/2-a.top)}}f.push(a.bottom-a.top)}}function _u(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;o<e.rest.length;o++)if(e.rest[o]==r)return{map:e.measure.maps[o],cache:e.measure.caches[o]};for(var l=0;l<e.rest.length;l++)if(Ve(e.rest[l])>a)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}function wb(e,r){r=In(r);var a=Ve(r),o=e.display.externalMeasured=new gu(e.doc,r,a);o.lineN=a;var l=o.built=pu(e,o);return o.text=l.pre,Z(e.display.lineMeasure,l.pre),o}function Cu(e,r,a,o){return Mn(e,Pr(e,r),a,o)}function us(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[vr(e,r)];var a=e.display.externalMeasured;if(a&&r>=a.lineN&&r<a.lineN+a.size)return a}function Pr(e,r){var a=Ve(r),o=us(e,a);o&&!o.text?o=null:o&&o.changes&&(vu(e,o,a,ms(e)),e.curOp.forceUpdate=!0),o||(o=wb(e,r));var l=_u(o,r,a);return{line:r,view:o,rect:null,map:l.map,cache:l.cache,before:l.before,hasHeights:!1}}function Mn(e,r,a,o,l){r.before&&(a=-1);var f=a+(o||""),v;return r.cache.hasOwnProperty(f)?v=r.cache[f]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(yb(e,r.view,r.rect),r.hasHeights=!0),v=xb(e,r,a,o),v.bogus||(r.cache[f]=v)),{left:v.left,right:v.right,top:l?v.rtop:v.top,bottom:l?v.rbottom:v.bottom}}var Su={left:0,right:0,top:0,bottom:0};function Eu(e,r,a){for(var o,l,f,v,k,x,C=0;C<e.length;C+=3)if(k=e[C],x=e[C+1],r<k?(l=0,f=1,v="left"):r<x?(l=r-k,f=l+1):(C==e.length-3||r==x&&e[C+3]>r)&&(f=x-k,l=f-1,r>=x&&(v="right")),l!=null){if(o=e[C+2],k==x&&a==(o.insertLeft?"left":"right")&&(v=a),a=="left"&&l==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)o=e[(C-=3)+2],v="left";if(a=="right"&&l==x-k)for(;C<e.length-3&&e[C+3]==e[C+4]&&!e[C+5].insertLeft;)o=e[(C+=3)+2],v="right";break}return{node:o,start:l,end:f,collapse:v,coverStart:k,coverEnd:x}}function kb(e,r){var a=Su;if(r=="left")for(var o=0;o<e.length&&!((a=e[o]).left!=a.right);o++);else for(var l=e.length-1;l>=0&&!((a=e[l]).left!=a.right);l--);return a}function xb(e,r,a,o){var l=Eu(r.map,a,o),f=l.node,v=l.start,k=l.end,x=l.collapse,C;if(f.nodeType==3){for(var M=0;M<4;M++){for(;v&&Ct(r.line.text.charAt(l.coverStart+v));)--v;for(;l.coverStart+k<l.coverEnd&&Ct(r.line.text.charAt(l.coverStart+k));)++k;if(d&&h<9&&v==0&&k==l.coverEnd-l.coverStart?C=f.parentNode.getBoundingClientRect():C=kb(j(f,v,k).getClientRects(),o),C.left||C.right||v==0)break;k=v,v=v-1,x="right"}d&&h<11&&(C=_b(e.display.measure,C))}else{v>0&&(x=o="right");var P;e.options.lineWrapping&&(P=f.getClientRects()).length>1?C=P[o=="right"?P.length-1:0]:C=f.getBoundingClientRect()}if(d&&h<9&&!v&&(!C||!C.left&&!C.right)){var K=f.parentNode.getClientRects()[0];K?C={left:K.left,right:K.left+Br(e.display),top:K.top,bottom:K.bottom}:C=Su}for(var $=C.top-r.rect.top,ne=C.bottom-r.rect.top,ae=($+ne)/2,he=r.view.measure.heights,pe=0;pe<he.length-1&&!(ae<he[pe]);pe++);var ve=pe?he[pe-1]:0,me=he[pe],be={left:(x=="right"?C.right:C.left)-r.rect.left,right:(x=="left"?C.left:C.right)-r.rect.left,top:ve,bottom:me};return!C.left&&!C.right&&(be.bogus=!0),e.options.singleCursorHeightPerLine||(be.rtop=$,be.rbottom=ne),be}function _b(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Bn(e))return r;var a=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*a,right:r.right*a,top:r.top*o,bottom:r.bottom*o}}function Du(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var r=0;r<e.rest.length;r++)e.measure.caches[r]={}}function Au(e){e.display.externalMeasure=null,O(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)Du(e.display.view[r])}function Ei(e){Au(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Tu(){return y&&S?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Lu(){return y&&S?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function cs(e){var r=0;if(e.widgets)for(var a=0;a<e.widgets.length;++a)e.widgets[a].above&&(r+=Si(e.widgets[a]));return r}function Mo(e,r,a,o,l){if(!l){var f=cs(r);a.top+=f,a.bottom+=f}if(o=="line")return a;o||(o="local");var v=$n(r);if(o=="local"?v+=Fo(e.display):v-=e.display.viewOffset,o=="page"||o=="window"){var k=e.display.lineSpace.getBoundingClientRect();v+=k.top+(o=="window"?0:Lu());var x=k.left+(o=="window"?0:Tu());a.left+=x,a.right+=x}return a.top+=v,a.bottom+=v,a}function Iu(e,r,a){if(a=="div")return r;var o=r.left,l=r.top;if(a=="page")o-=Tu(),l-=Lu();else if(a=="local"||!a){var f=e.display.sizer.getBoundingClientRect();o+=f.left,l+=f.top}var v=e.display.lineSpace.getBoundingClientRect();return{left:o-v.left,top:l-v.top}}function ds(e,r,a,o,l){return o||(o=_e(e.doc,r.line)),Mo(e,o,Cu(e,o,r.ch,l),a)}function yn(e,r,a,o,l,f){o=o||_e(e.doc,r.line),l||(l=Pr(e,o));function v(ne,ae){var he=Mn(e,l,ne,ae?"right":"left",f);return ae?he.left=he.right:he.right=he.left,Mo(e,o,he,a)}var k=Ot(o,e.doc.direction),x=r.ch,C=r.sticky;if(x>=o.text.length?(x=o.text.length,C="before"):x<=0&&(x=0,C="after"),!k)return v(C=="before"?x-1:x,C=="before");function M(ne,ae,he){var pe=k[ae],ve=pe.level==1;return v(he?ne-1:ne,ve!=he)}var P=Ye(k,x,C),K=Ie,$=M(x,P,C=="before");return K!=null&&($.other=M(x,K,C!="before")),$}function Fu(e,r){var a=0;r=ze(e.doc,r),e.options.lineWrapping||(a=Br(e.display)*r.ch);var o=_e(e.doc,r.line),l=$n(o)+Fo(e.display);return{left:a,right:a,top:l,bottom:l+o.height}}function hs(e,r,a,o,l){var f=W(e,r,a);return f.xRel=l,o&&(f.outside=o),f}function fs(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return hs(o.first,0,null,-1,-1);var l=L(o,a),f=o.first+o.size-1;if(l>f)return hs(o.first+o.size-1,_e(o,f).text.length,null,1,1);r<0&&(r=0);for(var v=_e(o,l);;){var k=Cb(e,v,l,r,a),x=Qv(v,k.ch+(k.xRel>0||k.outside>0?1:0));if(!x)return k;var C=x.find(1);if(C.line==l)return C;v=_e(o,l=C.line)}}function Mu(e,r,a,o){o-=cs(r);var l=r.text.length,f=Fe(function(v){return Mn(e,a,v-1).bottom<=o},l,0);return l=Fe(function(v){return Mn(e,a,v).top>o},f,l),{begin:f,end:l}}function qu(e,r,a,o){a||(a=Pr(e,r));var l=Mo(e,r,Mn(e,a,o),"line").top;return Mu(e,r,a,l)}function ps(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function Cb(e,r,a,o,l){l-=$n(r);var f=Pr(e,r),v=cs(r),k=0,x=r.text.length,C=!0,M=Ot(r,e.doc.direction);if(M){var P=(e.options.lineWrapping?Eb:Sb)(e,r,a,f,M,o,l);C=P.level!=1,k=C?P.from:P.to-1,x=C?P.to:P.from-1}var K=null,$=null,ne=Fe(function(Le){var Ee=Mn(e,f,Le);return Ee.top+=v,Ee.bottom+=v,ps(Ee,o,l,!1)?(Ee.top<=l&&Ee.left<=o&&(K=Le,$=Ee),!0):!1},k,x),ae,he,pe=!1;if($){var ve=o-$.left<$.right-o,me=ve==C;ne=K+(me?0:1),he=me?"after":"before",ae=ve?$.left:$.right}else{!C&&(ne==x||ne==k)&&ne++,he=ne==0?"after":ne==r.text.length?"before":Mn(e,f,ne-(C?1:0)).bottom+v<=l==C?"after":"before";var be=yn(e,W(a,ne,he),"line",r,f);ae=be.left,pe=l<be.top?-1:l>=be.bottom?1:0}return ne=Ae(r.text,ne,1),hs(a,ne,he,pe,o-ae)}function Sb(e,r,a,o,l,f,v){var k=Fe(function(P){var K=l[P],$=K.level!=1;return ps(yn(e,W(a,$?K.to:K.from,$?"before":"after"),"line",r,o),f,v,!0)},0,l.length-1),x=l[k];if(k>0){var C=x.level!=1,M=yn(e,W(a,C?x.from:x.to,C?"after":"before"),"line",r,o);ps(M,f,v,!0)&&M.top>v&&(x=l[k-1])}return x}function Eb(e,r,a,o,l,f,v){var k=Mu(e,r,o,v),x=k.begin,C=k.end;/\s/.test(r.text.charAt(C-1))&&C--;for(var M=null,P=null,K=0;K<l.length;K++){var $=l[K];if($.from>=C||$.to<=x)continue;var ne=$.level!=1,ae=Mn(e,o,ne?Math.min(C,$.to)-1:Math.max(x,$.from)).right,he=ae<f?f-ae+1e9:ae-f;(!M||P>he)&&(M=$,P=he)}return M||(M=l[l.length-1]),M.from<x&&(M={from:x,to:M.to,level:M.level}),M.to>C&&(M={from:M.from,to:C,level:M.level}),M}var mr;function Nr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(mr==null){mr=_("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)mr.appendChild(document.createTextNode("x")),mr.appendChild(_("br"));mr.appendChild(document.createTextNode("x"))}Z(e.measure,mr);var a=mr.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),O(e.measure),a||1}function Br(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=_("span","xxxxxxxxxx"),a=_("pre",[r],"CodeMirror-line-like");Z(e.measure,a);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function ms(e){for(var r=e.display,a={},o={},l=r.gutters.clientLeft,f=r.gutters.firstChild,v=0;f;f=f.nextSibling,++v){var k=e.display.gutterSpecs[v].className;a[k]=f.offsetLeft+f.clientLeft+l,o[k]=f.clientWidth}return{fixedPos:gs(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function gs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zu(e){var r=Nr(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/Br(e.display)-3);return function(l){if(tr(e.doc,l))return 0;var f=0;if(l.widgets)for(var v=0;v<l.widgets.length;v++)l.widgets[v].height&&(f+=l.widgets[v].height);return a?f+(Math.ceil(l.text.length/o)||1)*r:f+r}}function vs(e){var r=e.doc,a=zu(e);r.iter(function(o){var l=a(o);l!=o.height&&pn(o,l)})}function gr(e,r,a,o){var l=e.display;if(!a&&Ir(r).getAttribute("cm-not-content")=="true")return null;var f,v,k=l.lineSpace.getBoundingClientRect();try{f=r.clientX-k.left,v=r.clientY-k.top}catch(P){return null}var x=fs(e,f,v),C;if(o&&x.xRel>0&&(C=_e(e.doc,x.line).text).length==x.ch){var M=de(C,C.length,e.options.tabSize)-C.length;x=W(x.line,Math.max(0,Math.round((f-xu(e.display).left)/Br(e.display))-M))}return x}function vr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var a=e.display.view,o=0;o<a.length;o++)if(r-=a[o].size,r<0)return o}function Xt(e,r,a,o){r==null&&(r=e.doc.first),a==null&&(a=e.doc.first+e.doc.size),o||(o=0);var l=e.display;if(o&&a<l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>r)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)Wn&&rs(e.doc,r)<l.viewTo&&rr(e);else if(a<=l.viewFrom)Wn&&hu(e.doc,a+o)>l.viewFrom?rr(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&a>=l.viewTo)rr(e);else if(r<=l.viewFrom){var f=qo(e,a,a+o,1);f?(l.view=l.view.slice(f.index),l.viewFrom=f.lineN,l.viewTo+=o):rr(e)}else if(a>=l.viewTo){var v=qo(e,r,r,-1);v?(l.view=l.view.slice(0,v.index),l.viewTo=v.lineN):rr(e)}else{var k=qo(e,r,r,-1),x=qo(e,a,a+o,1);k&&x?(l.view=l.view.slice(0,k.index).concat(Io(e,k.lineN,x.lineN)).concat(l.view.slice(x.index)),l.viewTo+=o):rr(e)}var C=l.externalMeasured;C&&(a<C.lineN?C.lineN+=o:r<C.lineN+C.size&&(l.externalMeasured=null))}function nr(e,r,a){e.curOp.viewChanged=!0;var o=e.display,l=e.display.externalMeasured;if(l&&r>=l.lineN&&r<l.lineN+l.size&&(o.externalMeasured=null),r<o.viewFrom||r>=o.viewTo)return;var f=o.view[vr(e,r)];if(f.node==null)return;var v=f.changes||(f.changes=[]);oe(v,a)==-1&&v.push(a)}function rr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qo(e,r,a,o){var l=vr(e,r),f,v=e.display.view;if(!Wn||a==e.doc.first+e.doc.size)return{index:l,lineN:a};for(var k=e.display.viewFrom,x=0;x<l;x++)k+=v[x].size;if(k!=r){if(o>0){if(l==v.length-1)return null;f=k+v[l].size-r,l++}else f=k-r;r+=f,a+=f}for(;rs(e.doc,a)!=a;){if(l==(o<0?0:v.length-1))return null;a+=o*v[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:a}}function Db(e,r,a){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=Io(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=Io(e,r,o.viewFrom).concat(o.view):o.viewFrom<r&&(o.view=o.view.slice(vr(e,r))),o.viewFrom=r,o.viewTo<a?o.view=o.view.concat(Io(e,o.viewTo,a)):o.viewTo>a&&(o.view=o.view.slice(0,vr(e,a)))),o.viewTo=a}function Ou(e){for(var r=e.display.view,a=0,o=0;o<r.length;o++){var l=r[o];!l.hidden&&(!l.node||l.changes)&&++a}return a}function Di(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ru(e,r){r===void 0&&(r=!0);for(var a=e.doc,o={},l=o.cursors=document.createDocumentFragment(),f=o.selection=document.createDocumentFragment(),v=0;v<a.sel.ranges.length;v++){if(!r&&v==a.sel.primIndex)continue;var k=a.sel.ranges[v];if(k.from().line>=e.display.viewTo||k.to().line<e.display.viewFrom)continue;var x=k.empty();(x||e.options.showCursorWhenSelecting)&&Pu(e,k.head,l),x||Ab(e,k,f)}return o}function Pu(e,r,a){var o=yn(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),l=a.appendChild(_("div"," ","CodeMirror-cursor"));if(l.style.left=o.left+"px",l.style.top=o.top+"px",l.style.height=Math.max(0,o.bottom-o.top)*e.options.cursorHeight+"px",o.other){var f=a.appendChild(_("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=o.other.left+"px",f.style.top=o.other.top+"px",f.style.height=(o.other.bottom-o.other.top)*.85+"px"}}function zo(e,r){return e.top-r.top||e.left-r.left}function Ab(e,r,a){var o=e.display,l=e.doc,f=document.createDocumentFragment(),v=xu(e.display),k=v.left,x=Math.max(o.sizerWidth,pr(e)-o.sizer.offsetLeft)-v.right,C=l.direction=="ltr";function M(me,be,Le,Ee){be<0&&(be=0),be=Math.round(be),Ee=Math.round(Ee),f.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+me+`px;
top: `+be+"px; width: "+(Le==null?x-me:Le)+`px;
height: `+(Ee-be)+"px"))}function P(me,be,Le){var Ee=_e(l,me),Ne=Ee.text.length,it,Ft;function ct(kt,Jt){return ds(e,W(me,kt),"div",Ee,Jt)}function rn(kt,Jt,Pt){var Dt=qu(e,Ee,null,kt),xt=Jt=="ltr"==(Pt=="after")?"left":"right",ht=Pt=="after"?Dt.begin:Dt.end-(/\s/.test(Ee.text.charAt(Dt.end-1))?2:1);return ct(ht,xt)[xt]}var Qt=Ot(Ee,l.direction);return ke(Qt,be||0,Le==null?Ne:Le,function(kt,Jt,Pt,Dt){var xt=Pt=="ltr",ht=ct(kt,xt?"left":"right"),en=ct(Jt-1,xt?"right":"left"),Jr=be==null&&kt==0,ur=Le==null&&Jt==Ne,Ht=Dt==0,qn=!Qt||Dt==Qt.length-1;if(en.top-ht.top<=3){var Mt=(C?Jr:ur)&&Ht,Hs=(C?ur:Jr)&&qn,Vn=Mt?k:(xt?ht:en).left,xr=Hs?x:(xt?en:ht).right;M(Vn,ht.top,xr-Vn,ht.bottom)}else{var _r,Gt,ei,Us;xt?(_r=C&&Jr&&Ht?k:ht.left,Gt=C?x:rn(kt,Pt,"before"),ei=C?k:rn(Jt,Pt,"after"),Us=C&&ur&&qn?x:en.right):(_r=C?rn(kt,Pt,"before"):k,Gt=!C&&Jr&&Ht?x:ht.right,ei=!C&&ur&&qn?k:en.left,Us=C?rn(Jt,Pt,"after"):x),M(_r,ht.top,Gt-_r,ht.bottom),ht.bottom<en.top&&M(k,ht.bottom,null,en.top),M(ei,en.top,Us-ei,en.bottom)}(!it||zo(ht,it)<0)&&(it=ht),zo(en,it)<0&&(it=en),(!Ft||zo(ht,Ft)<0)&&(Ft=ht),zo(en,Ft)<0&&(Ft=en)}),{start:it,end:Ft}}var K=r.from(),$=r.to();if(K.line==$.line)P(K.line,K.ch,$.ch);else{var ne=_e(l,K.line),ae=_e(l,$.line),he=In(ne)==In(ae),pe=P(K.line,K.ch,he?ne.text.length+1:null).end,ve=P($.line,he?0:null,$.ch).start;he&&(pe.top<ve.top-2?(M(pe.right,pe.top,null,pe.bottom),M(k,ve.top,ve.left,ve.bottom)):M(pe.right,pe.top,ve.left-pe.right,pe.bottom)),pe.bottom<ve.top&&M(k,pe.bottom,null,ve.top)}a.appendChild(f)}function bs(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var a=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||jr(e),r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Nu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Bu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function ys(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(dt(e,"focus",e,r),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bs(e)}function jr(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(dt(e,"blur",e,r),e.state.focused=!1,J(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Oo(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o<r.view.length;o++){var l=r.view[o],f=e.options.lineWrapping,v=void 0,k=0;if(l.hidden)continue;if(d&&h<8){var x=l.node.offsetTop+l.node.offsetHeight;v=x-a,a=x}else{var C=l.node.getBoundingClientRect();v=C.bottom-C.top,!f&&l.text.firstChild&&(k=l.text.firstChild.getBoundingClientRect().right-C.left-1)}var M=l.line.height-v;if((M>.005||M<-.005)&&(pn(l.line,v),ju(l.line),l.rest))for(var P=0;P<l.rest.length;P++)ju(l.rest[P]);if(k>e.display.sizerWidth){var K=Math.ceil(k/Br(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}function ju(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var a=e.widgets[r],o=a.node.parentNode;o&&(a.height=o.offsetHeight)}}function Ro(e,r,a){var o=a&&a.top!=null?Math.max(0,a.top):e.scroller.scrollTop;o=Math.floor(o-Fo(e));var l=a&&a.bottom!=null?a.bottom:o+e.wrapper.clientHeight,f=L(r,o),v=L(r,l);if(a&&a.ensure){var k=a.ensure.from.line,x=a.ensure.to.line;k<f?(f=k,v=L(r,$n(_e(r,k))+e.wrapper.clientHeight)):Math.min(x,r.lastLine())>=v&&(f=L(r,$n(_e(r,x))-e.wrapper.clientHeight),v=x)}return{from:f,to:Math.max(v,f+1)}}function Tb(e,r){if(st(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),l=null;if(r.top+o.top<0?l=!0:r.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(l=!1),l!=null&&!D){var f=_("div","",null,`position: absolute;
top: `+(r.top-a.viewOffset-Fo(e.display))+`px;
height: `+(r.bottom-r.top+Fn(e)+a.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(f),f.scrollIntoView(l),e.display.lineSpace.removeChild(f)}}function Lb(e,r,a,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==a&&(r=r.ch?W(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?W(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var v=!1,k=yn(e,r),x=!a||a==r?k:yn(e,a);l={left:Math.min(k.left,x.left),top:Math.min(k.top,x.top)-o,right:Math.max(k.left,x.left),bottom:Math.max(k.bottom,x.bottom)+o};var C=ws(e,l),M=e.doc.scrollTop,P=e.doc.scrollLeft;if(C.scrollTop!=null&&(Ti(e,C.scrollTop),Math.abs(e.doc.scrollTop-M)>1&&(v=!0)),C.scrollLeft!=null&&(br(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-P)>1&&(v=!0)),!v)break}return l}function Ib(e,r){var a=ws(e,r);a.scrollTop!=null&&Ti(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Nr(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),v={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.top<o,C=r.bottom>k-o;if(r.top<l)v.scrollTop=x?0:r.top;else if(r.bottom>l+f){var M=Math.min(r.top,(C?k:r.bottom)-f);M!=l&&(v.scrollTop=M)}var P=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,K=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>K;return $&&(r.right=r.left+K),r.left<10?v.scrollLeft=0:r.left<P?v.scrollLeft=Math.max(0,r.left-($?0:10)):r.right>K+P-3&&(v.scrollLeft=r.right+($?0:10)-K),v}function ks(e,r){if(r==null)return;Po(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Hr(e){Po(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ai(e,r,a){(r!=null||a!=null)&&Po(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Fb(e,r){Po(e),e.curOp.scrollToPos=r}function Po(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Fu(e,r.from),o=Fu(e,r.to);Hu(e,a,o,r.margin)}}function Hu(e,r,a,o){var l=ws(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Ai(e,l.scrollLeft,l.scrollTop)}function Ti(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),Uu(e,r,!0),i&&_s(e),Fi(e,100)}function Uu(e,r,a){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!a)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function br(e,r,a,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Vu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Li(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+ss(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Fn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var yr=function(e,r,a){this.cm=a;var o=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),Te(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),Te(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var l=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+l)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var f=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var e=A&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},yr.prototype.enableZeroWidthBar=function(e,r,a){e.style.pointerEvents="auto";function o(){var l=e.getBoundingClientRect(),f=a=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);f!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function Ur(e,r){r||(r=Li(e));var a=e.display.barWidth,o=e.display.barHeight;Wu(e,r);for(var l=0;l<4&&a!=e.display.barWidth||o!=e.display.barHeight;l++)a!=e.display.barWidth&&e.options.lineWrapping&&Oo(e),Wu(e,Li(e)),a=e.display.barWidth,o=e.display.barHeight}function Wu(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var $u={native:yr,null:Ii};function Gu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&J(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $u[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Te(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?br(e,r):Ti(e,r)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Mb=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Mb},cb(e.curOp)}function kr(e){var r=e.curOp;r&&hb(r,function(a){for(var o=0;o<a.ops.length;o++)a.ops[o].cm.curOp=null;qb(a)})}function qb(e){for(var r=e.ops,a=0;a<r.length;a++)zb(r[a]);for(var o=0;o<r.length;o++)Ob(r[o]);for(var l=0;l<r.length;l++)Rb(r[l]);for(var f=0;f<r.length;f++)Pb(r[f]);for(var v=0;v<r.length;v++)Nb(r[v])}function zb(e){var r=e.cm,a=r.display;jb(r),e.updateMaxLine&&os(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<a.viewFrom||e.scrollToPos.to.line>=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new No(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ob(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Rb(e){var r=e.cm,a=r.display;e.updatedDisplay&&Oo(r),e.barMeasure=Li(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Cu(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Fn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function Pb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&br(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var a=e.focus&&e.focus==q();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,a),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Ur(r,e.barMeasure),e.updatedDisplay&&Ss(r,e.barMeasure),e.selectionChanged&&bs(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),a&&Nu(e.cm)}function Nb(e){var r=e.cm,a=r.display,o=r.doc;if(e.updatedDisplay&&Ku(r,e.update),a.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(a.wheelStartX=a.wheelStartY=null),e.scrollTop!=null&&Uu(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&br(r,e.scrollLeft,!0,!0),e.scrollToPos){var l=Lb(r,ze(o,e.scrollToPos.from),ze(o,e.scrollToPos.to),e.scrollToPos.margin);Tb(r,l)}var f=e.maybeHiddenMarkers,v=e.maybeUnhiddenMarkers;if(f)for(var k=0;k<f.length;++k)f[k].lines.length||dt(f[k],"hide");if(v)for(var x=0;x<v.length;++x)v[x].lines.length&&dt(v[x],"unhide");a.wrapper.offsetHeight&&(o.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&dt(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function nn(e,r){if(e.curOp)return r();wr(e);try{return r()}finally{kr(e)}}function Lt(e,r){return function(){if(e.curOp)return r.apply(e,arguments);wr(e);try{return r.apply(e,arguments)}finally{kr(e)}}}function $t(e){return function(){if(this.curOp)return e.apply(this,arguments);wr(this);try{return e.apply(this,arguments)}finally{kr(this)}}}function It(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);wr(r);try{return e.apply(this,arguments)}finally{kr(r)}}}function Fi(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,F(Bb,e))}function Bb(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var a=+new Date+e.options.workTime,o=ki(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(f){if(o.line>=e.display.viewFrom){var v=f.styles,k=f.text.length>e.options.maxHighlightLength?fn(r.mode,o.state):null,x=Ql(e,f,o,!0);k&&(o.state=k),f.styles=x.styles;var C=f.styleClasses,M=x.classes;M?f.styleClasses=M:C&&(f.styleClasses=null);for(var P=!v||v.length!=f.styles.length||C!=M&&(!C||!M||C.bgClass!=M.bgClass||C.textClass!=M.textClass),K=0;!P&&K<v.length;++K)P=v[K]!=f.styles[K];P&&l.push(o.line),f.stateAfter=o.save(),o.nextLine()}else f.text.length<=e.options.maxHighlightLength&&Ja(e,f.text,o),f.stateAfter=o.line%5==0?o.save():null,o.nextLine();if(+new Date>a)return Fi(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&nn(e,function(){for(var f=0;f<l.length;f++)nr(e,l[f],"text")})}var No=function(e,r,a){var o=e.display;this.viewport=r,this.visible=Ro(o,e.doc,r),this.editorIsHidden=!o.wrapper.offsetWidth,this.wrapperHeight=o.wrapper.clientHeight,this.wrapperWidth=o.wrapper.clientWidth,this.oldDisplayWidth=pr(e),this.force=a,this.dims=ms(e),this.events=[]};No.prototype.signal=function(e,r){wt(e,r)&&this.events.push(arguments)},No.prototype.finish=function(){for(var e=0;e<this.events.length;e++)dt.apply(null,this.events[e])};function jb(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Fn(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Fn(e)+"px",r.scrollbarsClipped=!0)}function Hb(e){if(e.hasFocus())return null;var r=q();if(!r||!Q(e.display.lineDiv,r))return null;var a={activeElt:r};if(window.getSelection){var o=window.getSelection();o.anchorNode&&o.extend&&Q(e.display.lineDiv,o.anchorNode)&&(a.anchorNode=o.anchorNode,a.anchorOffset=o.anchorOffset,a.focusNode=o.focusNode,a.focusOffset=o.focusOffset)}return a}function Ub(e){if(!e||!e.activeElt||e.activeElt==q())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&Q(document.body,e.anchorNode)&&Q(document.body,e.focusNode)){var r=window.getSelection(),a=document.createRange();a.setEnd(e.anchorNode,e.anchorOffset),a.collapse(!1),r.removeAllRanges(),r.addRange(a),r.extend(e.focusNode,e.focusOffset)}}function xs(e,r){var a=e.display,o=e.doc;if(r.editorIsHidden)return rr(e),!1;if(!r.force&&r.visible.from>=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Ou(e)==0)return!1;Yu(e)&&(rr(e),r.dims=ms(e));var l=o.first+o.size,f=Math.max(r.visible.from-e.options.viewportMargin,o.first),v=Math.min(l,r.visible.to+e.options.viewportMargin);a.viewFrom<f&&f-a.viewFrom<20&&(f=Math.max(o.first,a.viewFrom)),a.viewTo>v&&a.viewTo-v<20&&(v=Math.min(l,a.viewTo)),Wn&&(f=rs(e.doc,f),v=hu(e.doc,v));var k=f!=a.viewFrom||v!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;Db(e,f,v),a.viewOffset=$n(_e(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var x=Ou(e);if(!k&&x==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var C=Hb(e);return x>4&&(a.lineDiv.style.display="none"),Wb(e,a.updateLineNumbers,r.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Ub(C),O(a.cursorDiv),O(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,k&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,Fi(e,400)),a.updateLineNumbers=null,!0}function Ku(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+ss(e.display)-ls(e),a.top)}),r.visible=Ro(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Ro(e.display,e.doc,a));if(!xs(e,r))break;Oo(e);var l=Li(e);Di(e),Ur(e,l),Ss(e,l),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _s(e,r){var a=new No(e,r);if(xs(e,a)){Oo(e),Ku(e,a);var o=Li(e);Di(e),Ur(e,o),Ss(e,o),a.finish()}}function Wb(e,r,a){var o=e.display,l=e.options.lineNumbers,f=o.lineDiv,v=f.firstChild;function k(ne){var ae=ne.nextSibling;return p&&A&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),ae}for(var x=o.view,C=o.viewFrom,M=0;M<x.length;M++){var P=x[M];if(!P.hidden)if(!P.node||P.node.parentNode!=f){var K=vb(e,P,C,a);f.insertBefore(K,v)}else{for(;v!=P.node;)v=k(v);var $=l&&r!=null&&r<=C&&P.lineNumber;P.changes&&(oe(P.changes,"gutter")>-1&&($=!1),vu(e,P,C,a)),$&&(O(P.lineNumber),P.lineNumber.appendChild(document.createTextNode(ie(e.options,C)))),v=P.node.nextSibling}C+=P.size}for(;v;)v=k(v)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ss(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Fn(e)+"px"}function Vu(e){var r=e.display,a=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=gs(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,f=o+"px",v=0;v<a.length;v++)if(!a[v].hidden){e.options.fixedGutter&&(a[v].gutter&&(a[v].gutter.style.left=f),a[v].gutterBackground&&(a[v].gutterBackground.style.left=f));var k=a[v].alignable;if(k)for(var x=0;x<k.length;x++)k[x].style.left=f}e.options.fixedGutter&&(r.gutters.style.left=o+l+"px")}function Yu(e){if(!e.options.lineNumbers)return!1;var r=e.doc,a=ie(e.options,r.first+r.size-1),o=e.display;if(a.length!=o.lineNumChars){var l=o.measure.appendChild(_("div",[_("div",a)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=l.firstChild.offsetWidth,v=l.offsetWidth-f;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(f,o.lineGutter.offsetWidth-v)+1,o.lineNumWidth=o.lineNumInnerWidth+v,o.lineNumChars=o.lineNumInnerWidth?a.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",Cs(e.display),!0}return!1}function Es(e,r){for(var a=[],o=!1,l=0;l<e.length;l++){var f=e[l],v=null;if(typeof f!="string"&&(v=f.style,f=f.className),f=="CodeMirror-linenumbers")if(r)o=!0;else continue;a.push({className:f,style:v})}return r&&!o&&a.push({className:"CodeMirror-linenumbers",style:null}),a}function Xu(e){var r=e.gutters,a=e.gutterSpecs;O(r),e.lineGutter=null;for(var o=0;o<a.length;++o){var l=a[o],f=l.className,v=l.style,k=r.appendChild(_("div",null,"CodeMirror-gutter "+f));v&&(k.style.cssText=v),f=="CodeMirror-linenumbers"&&(e.lineGutter=k,k.style.width=(e.lineNumWidth||1)+"px")}r.style.display=a.length?"":"none",Cs(e)}function Mi(e){Xu(e.display),Xt(e),Vu(e)}function $b(e,r,a,o){var l=this;this.input=a,l.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),l.scrollbarFiller.setAttribute("cm-not-content","true"),l.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),l.gutterFiller.setAttribute("cm-not-content","true"),l.lineDiv=V("div",null,"CodeMirror-code"),l.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),l.cursorDiv=_("div",null,"CodeMirror-cursors"),l.measure=_("div",null,"CodeMirror-measure"),l.lineMeasure=_("div",null,"CodeMirror-measure"),l.lineSpace=V("div",[l.measure,l.lineMeasure,l.selectionDiv,l.cursorDiv,l.lineDiv],null,"position: relative; outline: none");var f=V("div",[l.lineSpace],"CodeMirror-lines");l.mover=_("div",[f],null,"position: relative"),l.sizer=_("div",[l.mover],"CodeMirror-sizer"),l.sizerWidth=null,l.heightForcer=_("div",null,null,"position: absolute; height: "+xe+"px; width: 1px;"),l.gutters=_("div",null,"CodeMirror-gutters"),l.lineGutter=null,l.scroller=_("div",[l.sizer,l.heightForcer,l.gutters],"CodeMirror-scroll"),l.scroller.setAttribute("tabIndex","-1"),l.wrapper=_("div",[l.scrollbarFiller,l.gutterFiller,l.scroller],"CodeMirror"),d&&h<8&&(l.gutters.style.zIndex=-1,l.scroller.style.paddingRight=0),!p&&!(i&&z)&&(l.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(l.wrapper):e(l.wrapper)),l.viewFrom=l.viewTo=r.first,l.reportedViewFrom=l.reportedViewTo=r.first,l.view=[],l.renderedView=null,l.externalMeasured=null,l.viewOffset=0,l.lastWrapHeight=l.lastWrapWidth=0,l.updateLineNumbers=null,l.nativeBarWidth=l.barHeight=l.barWidth=0,l.scrollbarsClipped=!1,l.lineNumWidth=l.lineNumInnerWidth=l.lineNumChars=null,l.alignWidgets=!1,l.cachedCharWidth=l.cachedTextHeight=l.cachedPaddingH=null,l.maxLine=null,l.maxLineLength=0,l.maxLineChanged=!1,l.wheelDX=l.wheelDY=l.wheelStartX=l.wheelStartY=null,l.shift=!1,l.selForContextMenu=null,l.activeTouch=null,l.gutterSpecs=Es(o.gutters,o.lineNumbers),Xu(l),a.init(l)}var Bo=0,an=null;d?an=-.53:i?an=15:y?an=-.7:b&&(an=-1/3);function Zu(e){var r=e.wheelDeltaX,a=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),a==null&&e.detail&&e.axis==e.VERTICAL_AXIS?a=e.detail:a==null&&(a=e.wheelDelta),{x:r,y:a}}function Gb(e){var r=Zu(e);return r.x*=an,r.y*=an,r}function Qu(e,r){var a=Zu(r),o=a.x,l=a.y,f=e.display,v=f.scroller,k=v.scrollWidth>v.clientWidth,x=v.scrollHeight>v.clientHeight;if(!(o&&k||l&&x))return;if(l&&A&&p){e:for(var C=r.target,M=f.view;C!=v;C=C.parentNode)for(var P=0;P<M.length;P++)if(M[P].node==C){e.display.currentWheelTarget=C;break e}}if(o&&!i&&!m&&an!=null){l&&x&&Ti(e,Math.max(0,v.scrollTop+l*an)),br(e,Math.max(0,v.scrollLeft+o*an)),(!l||l&&x)&&St(r),f.wheelStartX=null;return}if(l&&an!=null){var K=l*an,$=e.doc.scrollTop,ne=$+f.wrapper.clientHeight;K<0?$=Math.max(0,$+K-50):ne=Math.min(e.doc.height,ne+K+50),_s(e,{top:$,bottom:ne})}Bo<20&&(f.wheelStartX==null?(f.wheelStartX=v.scrollLeft,f.wheelStartY=v.scrollTop,f.wheelDX=o,f.wheelDY=l,setTimeout(function(){if(f.wheelStartX==null)return;var ae=v.scrollLeft-f.wheelStartX,he=v.scrollTop-f.wheelStartY,pe=he&&f.wheelDY&&he/f.wheelDY||ae&&f.wheelDX&&ae/f.wheelDX;if(f.wheelStartX=f.wheelStartY=null,!pe)return;an=(an*Bo+pe)/(Bo+1),++Bo},200)):(f.wheelDX+=o,f.wheelDY+=l))}var sn=function(e,r){this.ranges=e,this.primIndex=r};sn.prototype.primary=function(){return this.ranges[this.primIndex]},sn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var a=this.ranges[r],o=e.ranges[r];if(!$e(a.anchor,o.anchor)||!$e(a.head,o.head))return!1}return!0},sn.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new Xe(Je(this.ranges[r].anchor),Je(this.ranges[r].head));return new sn(e,this.primIndex)},sn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},sn.prototype.contains=function(e,r){r||(r=e);for(var a=0;a<this.ranges.length;a++){var o=this.ranges[a];if(fe(r,o.from())>=0&&fe(e,o.to())<=0)return a}return-1};var Xe=function(e,r){this.anchor=e,this.head=r};Xe.prototype.from=function(){return Yt(this.anchor,this.head)},Xe.prototype.to=function(){return Et(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wn(e,r,a){var o=e&&e.options.selectionsMayTouch,l=r[a];r.sort(function(K,$){return fe(K.from(),$.from())}),a=oe(r,l);for(var f=1;f<r.length;f++){var v=r[f],k=r[f-1],x=fe(k.to(),v.from());if(o&&!v.empty()?x>0:x>=0){var C=Yt(k.from(),v.from()),M=Et(k.to(),v.to()),P=k.empty()?v.from()==v.head:k.from()==k.head;f<=a&&--a,r.splice(--f,2,new Xe(P?M:C,P?C:M))}}return new sn(r,a)}function ir(e,r){return new sn([new Xe(e,r||e)],0)}function or(e){return e.text?W(e.from.line+e.text.length-1,Ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ju(e,r){if(fe(e,r.from)<0)return e;if(fe(e,r.to)<=0)return or(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=or(r).ch-r.to.ch),W(a,o)}function Ds(e,r){for(var a=[],o=0;o<e.sel.ranges.length;o++){var l=e.sel.ranges[o];a.push(new Xe(Ju(l.anchor,r),Ju(l.head,r)))}return wn(e.cm,a,e.sel.primIndex)}function ec(e,r,a){return e.line==r.line?W(a.line,e.ch-r.ch+a.ch):W(a.line+(e.line-r.line),e.ch)}function Kb(e,r,a){for(var o=[],l=W(e.first,0),f=l,v=0;v<r.length;v++){var k=r[v],x=ec(k.from,l,f),C=ec(or(k),l,f);if(l=k.to,f=C,a=="around"){var M=e.sel.ranges[v],P=fe(M.head,M.anchor)<0;o[v]=new Xe(P?C:x,P?x:C)}else o[v]=new Xe(x,x)}return new sn(o,e.sel.primIndex)}function As(e){e.doc.mode=yi(e.options,e.doc.modeOption),qi(e)}function qi(e){e.doc.iter(function(r){r.stateAfter&&(r.stateAfter=null),r.styles&&(r.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Fi(e,100),e.state.modeGen++,e.curOp&&Xt(e)}function tc(e,r){return r.from.ch==0&&r.to.ch==0&&Ce(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ts(e,r,a,o){function l(ve){return a?a[ve]:null}function f(ve,me,be){tb(ve,me,be,o),Rt(ve,"change",ve,r)}function v(ve,me){for(var be=[],Le=ve;Le<me;++Le)be.push(new Or(C[Le],l(Le),o));return be}var k=r.from,x=r.to,C=r.text,M=_e(e,k.line),P=_e(e,x.line),K=Ce(C),$=l(C.length-1),ne=x.line-k.line;if(r.full)e.insert(0,v(0,C.length)),e.remove(C.length,e.size-C.length);else if(tc(e,r)){var ae=v(0,C.length-1);f(P,P.text,$),ne&&e.remove(k.line,ne),ae.length&&e.insert(k.line,ae)}else if(M==P)if(C.length==1)f(M,M.text.slice(0,k.ch)+K+M.text.slice(x.ch),$);else{var he=v(1,C.length-1);he.push(new Or(K+M.text.slice(x.ch),$,o)),f(M,M.text.slice(0,k.ch)+C[0],l(0)),e.insert(k.line+1,he)}else if(C.length==1)f(M,M.text.slice(0,k.ch)+C[0]+P.text.slice(x.ch),l(0)),e.remove(k.line+1,ne);else{f(M,M.text.slice(0,k.ch)+C[0],l(0)),f(P,K+P.text.slice(x.ch),$);var pe=v(1,C.length-1);ne>1&&e.remove(k.line+1,ne-1),e.insert(k.line+1,pe)}Rt(e,"change",e,r)}function ar(e,r,a){function o(l,f,v){if(l.linked)for(var k=0;k<l.linked.length;++k){var x=l.linked[k];if(x.doc==f)continue;var C=v&&x.sharedHist;if(a&&!C)continue;r(x.doc,C),o(x.doc,l,C)}}o(e,null,!0)}function nc(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,vs(e),As(e),rc(e),e.options.lineWrapping||os(e),e.options.mode=r.modeOption,Xt(e)}function rc(e){(e.doc.direction=="rtl"?I:J)(e.display.lineDiv,"CodeMirror-rtl")}function Vb(e){nn(e,function(){rc(e),Xt(e)})}function jo(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Ls(e,r){var a={from:Je(r.from),to:or(r),text:Tn(e,r.from,r.to)};return ac(e,a,r.from.line,r.to.line+1),ar(e,function(o){return ac(o,a,r.from.line,r.to.line+1)},!0),a}function ic(e){for(;e.length;){var r=Ce(e);if(r.ranges)e.pop();else break}}function Yb(e,r){if(r)return ic(e.done),Ce(e.done);if(e.done.length&&!Ce(e.done).ranges)return Ce(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ce(e.done)}function oc(e,r,a,o){var l=e.history;l.undone.length=0;var f=+new Date,v,k;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>f-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(v=Yb(l,l.lastOp==o)))k=Ce(v.changes),fe(r.from,r.to)==0&&fe(r.from,k.to)==0?k.to=or(r):v.changes.push(Ls(e,r));else{var x=Ce(l.done);for((!x||!x.ranges)&&Ho(e.sel,l.done),v={changes:[Ls(e,r)],generation:l.generation},l.done.push(v);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(a),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=f,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,k||dt(e,"historyAdded")}function Xb(e,r,a,o){var l=r.charAt(0);return l=="*"||l=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Zb(e,r,a,o){var l=e.history,f=o&&o.origin;a==l.lastSelOp||f&&l.lastSelOrigin==f&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==f||Xb(e,f,Ce(l.done),r))?l.done[l.done.length-1]=r:Ho(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=f,l.lastSelOp=a,o&&o.clearRedo!==!1&&ic(l.undone)}function Ho(e,r){var a=Ce(r);a&&a.ranges&&a.equals(e)||r.push(e)}function ac(e,r,a,o){var l=r["spans_"+e.id],f=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(v){v.markedSpans&&((l||(l=r["spans_"+e.id]={}))[f]=v.markedSpans),++f})}function Qb(e){if(!e)return null;for(var r,a=0;a<e.length;++a)e[a].marker.explicitlyCleared?r||(r=e.slice(0,a)):r&&r.push(e[a]);return r?r.length?r:null:e}function Jb(e,r){var a=r["spans_"+e.id];if(!a)return null;for(var o=[],l=0;l<r.text.length;++l)o.push(Qb(a[l]));return o}function sc(e,r){var a=Jb(e,r),o=ts(e,r);if(!a)return o;if(!o)return a;for(var l=0;l<a.length;++l){var f=a[l],v=o[l];if(f&&v){e:for(var k=0;k<v.length;++k){for(var x=v[k],C=0;C<f.length;++C)if(f[C].marker==x.marker)continue e;f.push(x)}}else v&&(a[l]=v)}return a}function Wr(e,r,a){for(var o=[],l=0;l<e.length;++l){var f=e[l];if(f.ranges){o.push(a?sn.prototype.deepCopy.call(f):f);continue}var v=f.changes,k=[];o.push({changes:k});for(var x=0;x<v.length;++x){var C=v[x],M=void 0;if(k.push({from:C.from,to:C.to,text:C.text}),r)for(var P in C)(M=P.match(/^spans_(\d+)$/))&&(oe(r,Number(M[1]))>-1&&(Ce(k)[P]=C[P],delete C[P]))}}return o}function Is(e,r,a,o){if(o){var l=e.anchor;if(a){var f=fe(r,l)<0;f!=fe(a,l)<0?(l=r,r=a):f!=fe(r,a)<0&&(r=a)}return new Xe(l,r)}else return new Xe(a||r,r)}function Uo(e,r,a,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),jt(e,new sn([Is(e.sel.primary(),r,a,l)],0),o)}function lc(e,r,a){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),f=0;f<e.sel.ranges.length;f++)o[f]=Is(e.sel.ranges[f],r[f],null,l);var v=wn(e.cm,o,e.sel.primIndex);jt(e,v,a)}function Fs(e,r,a,o){var l=e.sel.ranges.slice(0);l[r]=a,jt(e,wn(e.cm,l,e.sel.primIndex),o)}function uc(e,r,a,o){jt(e,ir(r,a),o)}function ey(e,r,a){var o={ranges:r.ranges,update:function(l){this.ranges=[];for(var f=0;f<l.length;f++)this.ranges[f]=new Xe(ze(e,l[f].anchor),ze(e,l[f].head))},origin:a&&a.origin};return dt(e,"beforeSelectionChange",e,o),e.cm&&dt(e.cm,"beforeSelectionChange",e.cm,o),o.ranges!=r.ranges?wn(e.cm,o.ranges,o.ranges.length-1):r}function cc(e,r,a){var o=e.history.done,l=Ce(o);l&&l.ranges?(o[o.length-1]=r,Wo(e,r,a)):jt(e,r,a)}function jt(e,r,a){Wo(e,r,a),Zb(e,e.sel,e.cm?e.cm.curOp.id:NaN,a)}function Wo(e,r,a){(wt(e,"beforeSelectionChange")||e.cm&&wt(e.cm,"beforeSelectionChange"))&&(r=ey(e,r,a));var o=a&&a.bias||(fe(r.primary().head,e.sel.primary().head)<0?-1:1);dc(e,fc(e,r,o,!0)),!(a&&a.scroll===!1)&&e.cm&&Hr(e.cm)}function dc(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Lr(e.cm)),Rt(e,"cursorActivity",e)}function hc(e){dc(e,fc(e,e.sel,null,!1))}function fc(e,r,a,o){for(var l,f=0;f<r.ranges.length;f++){var v=r.ranges[f],k=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[f],x=$o(e,v.anchor,k&&k.anchor,a,o),C=$o(e,v.head,k&&k.head,a,o);(l||x!=v.anchor||C!=v.head)&&(l||(l=r.ranges.slice(0,f)),l[f]=new Xe(x,C))}return l?wn(e.cm,l,r.primIndex):r}function $r(e,r,a,o,l){var f=_e(e,r.line);if(f.markedSpans)for(var v=0;v<f.markedSpans.length;++v){var k=f.markedSpans[v],x=k.marker,C="selectLeft"in x?!x.selectLeft:x.inclusiveLeft,M="selectRight"in x?!x.selectRight:x.inclusiveRight;if((k.from==null||(C?k.from<=r.ch:k.from<r.ch))&&(k.to==null||(M?k.to>=r.ch:k.to>r.ch))){if(l&&(dt(x,"beforeCursorEnter"),x.explicitlyCleared))if(f.markedSpans){--v;continue}else break;if(!x.atomic)continue;if(a){var P=x.find(o<0?1:-1),K=void 0;if((o<0?M:C)&&(P=pc(e,P,-o,P&&P.line==r.line?f:null)),P&&P.line==r.line&&(K=fe(P,a))&&(o<0?K<0:K>0))return $r(e,P,r,o,l)}var $=x.find(o<0?-1:1);return(o<0?C:M)&&($=pc(e,$,o,$.line==r.line?f:null)),$?$r(e,$,r,o,l):null}}return r}function $o(e,r,a,o,l){var f=o||1,v=$r(e,r,a,f,l)||!l&&$r(e,r,a,f,!0)||$r(e,r,a,-f,l)||!l&&$r(e,r,a,-f,!0);return v||(e.cantEdit=!0,W(e.first,0))}function pc(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?ze(e,W(r.line-1)):null:a>0&&r.ch==(o||_e(e,r.line)).text.length?r.line<e.first+e.size-1?W(r.line+1,0):null:new W(r.line,r.ch+a)}function mc(e){e.setSelection(W(e.firstLine(),0),W(e.lastLine()),ye)}function gc(e,r,a){var o={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return o.canceled=!0}};return a&&(o.update=function(l,f,v,k){l&&(o.from=ze(e,l)),f&&(o.to=ze(e,f)),v&&(o.text=v),k!==void 0&&(o.origin=k)}),dt(e,"beforeChange",e,o),e.cm&&dt(e.cm,"beforeChange",e.cm,o),o.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function Gr(e,r,a){if(e.cm){if(!e.cm.curOp)return Lt(e.cm,Gr)(e,r,a);if(e.cm.state.suppressEdits)return}if((wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"))&&(r=gc(e,r,!0),!r))return;var o=ou&&!a&&Zv(e,r.from,r.to);if(o)for(var l=o.length-1;l>=0;--l)vc(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else vc(e,r)}function vc(e,r){if(r.text.length==1&&r.text[0]==""&&fe(r.from,r.to)==0)return;var a=Ds(e,r);oc(e,r,a,e.cm?e.cm.curOp.id:NaN),zi(e,r,a,ts(e,r));var o=[];ar(e,function(l,f){!f&&oe(o,l.history)==-1&&(kc(l.history,r),o.push(l.history)),zi(l,r,null,ts(l,r))})}function Go(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!a)return;for(var l=e.history,f,v=e.sel,k=r=="undo"?l.done:l.undone,x=r=="undo"?l.undone:l.done,C=0;C<k.length&&!(f=k[C],a?f.ranges&&!f.equals(e.sel):!f.ranges);C++);if(C==k.length)return;for(l.lastOrigin=l.lastSelOrigin=null;;)if(f=k.pop(),f.ranges){if(Ho(f,x),a&&!f.equals(e.sel)){jt(e,f,{clearRedo:!1});return}v=f}else if(o){k.push(f);return}else break;var M=[];Ho(v,x),x.push({changes:M,generation:l.generation}),l.generation=f.generation||++l.maxGeneration;for(var P=wt(e,"beforeChange")||e.cm&&wt(e.cm,"beforeChange"),K=function(ae){var he=f.changes[ae];if(he.origin=r,P&&!gc(e,he,!1))return k.length=0,{};M.push(Ls(e,he));var pe=ae?Ds(e,he):Ce(k);zi(e,he,pe,sc(e,he)),!ae&&e.cm&&e.cm.scrollIntoView({from:he.from,to:or(he)});var ve=[];ar(e,function(me,be){!be&&oe(ve,me.history)==-1&&(kc(me.history,he),ve.push(me.history)),zi(me,he,null,sc(me,he))})},$=f.changes.length-1;$>=0;--$){var ne=K($);if(ne)return ne.v}}function bc(e,r){if(r==0)return;if(e.first+=r,e.sel=new sn(nt(e.sel.ranges,function(l){return new Xe(W(l.anchor.line+r,l.anchor.ch),W(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm){Xt(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;o<a.viewTo;o++)nr(e.cm,o,"gutter")}}function zi(e,r,a,o){if(e.cm&&!e.cm.curOp)return Lt(e.cm,zi)(e,r,a,o);if(r.to.line<e.first){bc(e,r.text.length-1-(r.to.line-r.from.line));return}if(r.from.line>e.lastLine())return;if(r.from.line<e.first){var l=r.text.length-1-(e.first-r.from.line);bc(e,l),r={from:W(e.first,0),to:W(r.to.line+l,r.to.ch),text:[Ce(r.text)],origin:r.origin}}var f=e.lastLine();r.to.line>f&&(r={from:r.from,to:W(f,_e(e,f).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Tn(e,r.from,r.to),a||(a=Ds(e,r)),e.cm?ty(e.cm,r,o):Ts(e,r,o),Wo(e,a,ye),e.cantEdit&&$o(e,W(e.firstLine(),0))&&(e.cantEdit=!1)}function ty(e,r,a){var o=e.doc,l=e.display,f=r.from,v=r.to,k=!1,x=f.line;e.options.lineWrapping||(x=Ve(In(_e(o,f.line))),o.iter(x,v.line+1,function($){if($==l.maxLine)return k=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Lr(e),Ts(o,r,a,zu(e)),e.options.lineWrapping||(o.iter(x,f.line+r.text.length,function($){var ne=Lo($);ne>l.maxLineLength&&(l.maxLine=$,l.maxLineLength=ne,l.maxLineChanged=!0,k=!1)}),k&&(e.curOp.updateMaxLine=!0)),Wv(o,f.line),Fi(e,400);var C=r.text.length-(v.line-f.line)-1;r.full?Xt(e):f.line==v.line&&r.text.length==1&&!tc(e.doc,r)?nr(e,f.line,"text"):Xt(e,f.line,v.line+1,C);var M=wt(e,"changes"),P=wt(e,"change");if(P||M){var K={from:f,to:v,text:r.text,removed:r.removed,origin:r.origin};P&&Rt(e,"change",e,K),M&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(K)}e.display.selForContextMenu=null}function Kr(e,r,a,o,l){var f;o||(o=a),fe(o,a)<0&&(f=[o,a],a=f[0],o=f[1]),typeof r=="string"&&(r=e.splitLines(r)),Gr(e,{from:a,to:o,text:r,origin:l})}function yc(e,r,a,o){a<e.line?e.line+=o:r<e.line&&(e.line=r,e.ch=0)}function wc(e,r,a,o){for(var l=0;l<e.length;++l){var f=e[l],v=!0;if(f.ranges){f.copied||(f=e[l]=f.deepCopy(),f.copied=!0);for(var k=0;k<f.ranges.length;k++)yc(f.ranges[k].anchor,r,a,o),yc(f.ranges[k].head,r,a,o);continue}for(var x=0;x<f.changes.length;++x){var C=f.changes[x];if(a<C.from.line)C.from=W(C.from.line+o,C.from.ch),C.to=W(C.to.line+o,C.to.ch);else if(r<=C.to.line){v=!1;break}}v||(e.splice(0,l+1),l=0)}}function kc(e,r){var a=r.from.line,o=r.to.line,l=r.text.length-(o-a)-1;wc(e.done,a,o,l),wc(e.undone,a,o,l)}function Oi(e,r,a,o){var l=r,f=r;return typeof r=="number"?f=_e(e,Co(e,r)):l=Ve(r),l==null?null:(o(f,l)&&e.cm&&nr(e.cm,l,a),f)}function Ri(e){this.lines=e,this.parent=null;for(var r=0,a=0;a<e.length;++a)e[a].parent=this,r+=e[a].height;this.height=r}Ri.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var a=e,o=e+r;a<o;++a){var l=this.lines[a];this.height-=l.height,nb(l),Rt(l,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,a){this.height+=a,this.lines=this.lines.slice(0,e).concat(r).concat(this.lines.slice(e));for(var o=0;o<r.length;++o)r[o].parent=this},iterN:function(e,r,a){for(var o=e+r;e<o;++e)if(a(this.lines[e]))return!0}};function Pi(e){this.children=e;for(var r=0,a=0,o=0;o<e.length;++o){var l=e[o];r+=l.chunkSize(),a+=l.height,l.parent=this}this.size=r,this.height=a,this.parent=null}Pi.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var a=0;a<this.children.length;++a){var o=this.children[a],l=o.chunkSize();if(e<l){var f=Math.min(r,l-e),v=o.height;if(o.removeInner(e,f),this.height-=v-o.height,l==f&&(this.children.splice(a--,1),o.parent=null),(r-=f)==0)break;e=0}else e-=l}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Ri))){var k=[];this.collapse(k),this.children=[new Ri(k)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r<this.children.length;++r)this.children[r].collapse(e)},insertInner:function(e,r,a){this.size+=r.length,this.height+=a;for(var o=0;o<this.children.length;++o){var l=this.children[o],f=l.chunkSize();if(e<=f){if(l.insertInner(e,r,a),l.lines&&l.lines.length>50){for(var v=l.lines.length%25+25,k=v;k<l.lines.length;){var x=new Ri(l.lines.slice(k,k+=25));l.height-=x.height,this.children.splice(++o,0,x),x.parent=this}l.lines=l.lines.slice(0,v),this.maybeSpill()}break}e-=f}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),a=new Pi(r);if(e.parent){e.size-=a.size,e.height-=a.height;var l=oe(e.parent.children,e);e.parent.children.splice(l+1,0,a)}else{var o=new Pi(e.children);o.parent=e,e.children=[o,a],e=o}a.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,a){for(var o=0;o<this.children.length;++o){var l=this.children[o],f=l.chunkSize();if(e<f){var v=Math.min(r,f-e);if(l.iterN(e,v,a))return!0;if((r-=v)==0)break;e=0}else e-=f}}};var Ni=function(e,r,a){if(a)for(var o in a)a.hasOwnProperty(o)&&(this[o]=a[o]);this.doc=e,this.node=r};Ni.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,a=this.line,o=Ve(a);if(o==null||!r)return;for(var l=0;l<r.length;++l)r[l]==this&&r.splice(l--,1);r.length||(a.widgets=null);var f=Si(this);pn(a,Math.max(0,a.height-f)),e&&(nn(e,function(){xc(e,a,-f),nr(e,o,"widget")}),Rt(e,"lineWidgetCleared",e,this,o))},Ni.prototype.changed=function(){var e=this,r=this.height,a=this.doc.cm,o=this.line;this.height=null;var l=Si(this)-r;if(!l)return;tr(this.doc,o)||pn(o,o.height+l),a&&nn(a,function(){a.curOp.forceUpdate=!0,xc(a,o,l),Rt(a,"lineWidgetChanged",a,e,Ve(o))})},Jn(Ni);function xc(e,r,a){$n(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ks(e,a)}function ny(e,r,a,o){var l=new Ni(e,a,o),f=e.cm;return f&&l.noHScroll&&(f.display.alignWidgets=!0),Oi(e,r,"widget",function(v){var k=v.widgets||(v.widgets=[]);if(l.insertAt==null?k.push(l):k.splice(Math.min(k.length-1,Math.max(0,l.insertAt)),0,l),l.line=v,f&&!tr(e,v)){var x=$n(v)<e.scrollTop;pn(v,v.height+Si(l)),x&&ks(f,l.height),f.curOp.forceUpdate=!0}return!0}),f&&Rt(f,"lineWidgetAdded",f,l,typeof r=="number"?r:Ve(r)),l}var _c=0,sr=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++_c};sr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&wr(e),wt(this,"clear")){var a=this.find();a&&Rt(this,"clear",a.from,a.to)}for(var o=null,l=null,f=0;f<this.lines.length;++f){var v=this.lines[f],k=xi(v.markedSpans,this);e&&!this.collapsed?nr(e,Ve(v),"text"):e&&(k.to!=null&&(l=Ve(v)),k.from!=null&&(o=Ve(v))),v.markedSpans=Kv(v.markedSpans,k),k.from==null&&this.collapsed&&!tr(this.doc,v)&&e&&pn(v,Nr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var x=0;x<this.lines.length;++x){var C=In(this.lines[x]),M=Lo(C);M>e.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=M,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Xt(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&hc(e.doc)),e&&Rt(e,"markerCleared",e,this,o,l),r&&kr(e),this.parent&&this.parent.clear()},sr.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,l=0;l<this.lines.length;++l){var f=this.lines[l],v=xi(f.markedSpans,this);if(v.from!=null&&(a=W(r?f:Ve(f),v.from),e==-1))return a;if(v.to!=null&&(o=W(r?f:Ve(f),v.to),e==1))return o}return a&&{from:a,to:o}},sr.prototype.changed=function(){var e=this,r=this.find(-1,!0),a=this,o=this.doc.cm;if(!r||!o)return;nn(o,function(){var l=r.line,f=Ve(r.line),v=us(o,f);if(v&&(Du(v),o.curOp.selectionChanged=o.curOp.forceUpdate=!0),o.curOp.updateMaxLine=!0,!tr(a.doc,l)&&a.height!=null){var k=a.height;a.height=null;var x=Si(a)-k;x&&pn(l,l.height+x)}Rt(o,"markerChanged",o,e)})},sr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||oe(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},sr.prototype.detachLine=function(e){if(this.lines.splice(oe(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Jn(sr);function Vr(e,r,a,o,l){if(o&&o.shared)return ry(e,r,a,o,l);if(e.cm&&!e.cm.curOp)return Lt(e.cm,Vr)(e,r,a,o,l);var f=new sr(e,l),v=fe(r,a);if(o&&T(o,f,!1),v>0||v==0&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=V("span",[f.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(du(e,r.line,r,a,f)||r.line!=a.line&&du(e,a.line,r,a,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gv()}f.addToHistory&&oc(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var k=r.line,x=e.cm,C;if(e.iter(k,a.line+1,function(P){x&&f.collapsed&&!x.options.lineWrapping&&In(P)==x.display.maxLine&&(C=!0),f.collapsed&&k!=r.line&&pn(P,0),Vv(P,new Eo(f,k==r.line?r.ch:null,k==a.line?a.ch:null)),++k}),f.collapsed&&e.iter(r.line,a.line+1,function(P){tr(e,P)&&pn(P,0)}),f.clearOnEnter&&Te(f,"beforeCursorEnter",function(){return f.clear()}),f.readOnly&&($v(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),f.collapsed&&(f.id=++_c,f.atomic=!0),x){if(C&&(x.curOp.updateMaxLine=!0),f.collapsed)Xt(x,r.line,a.line+1);else if(f.className||f.startStyle||f.endStyle||f.css||f.attributes||f.title)for(var M=r.line;M<=a.line;M++)nr(x,M,"text");f.atomic&&hc(x.doc),Rt(x,"markerAdded",x,f)}return f}var Bi=function(e,r){this.markers=e,this.primary=r;for(var a=0;a<e.length;++a)e[a].parent=this};Bi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Rt(this,"clear")},Bi.prototype.find=function(e,r){return this.primary.find(e,r)},Jn(Bi);function ry(e,r,a,o,l){o=T(o),o.shared=!1;var f=[Vr(e,r,a,o,l)],v=f[0],k=o.widgetNode;return ar(e,function(x){k&&(o.widgetNode=k.cloneNode(!0)),f.push(Vr(x,ze(x,r),ze(x,a),o,l));for(var C=0;C<x.linked.length;++C)if(x.linked[C].isParent)return;v=Ce(f)}),new Bi(f,v)}function Cc(e){return e.findMarks(W(e.first,0),e.clipPos(W(e.lastLine())),function(r){return r.parent})}function iy(e,r){for(var a=0;a<r.length;a++){var o=r[a],l=o.find(),f=e.clipPos(l.from),v=e.clipPos(l.to);if(fe(f,v)){var k=Vr(e,f,v,o.primary,o.primary.type);o.markers.push(k),k.parent=o}}}function oy(e){for(var r=function(o){var l=e[o],f=[l.primary.doc];ar(l.primary.doc,function(x){return f.push(x)});for(var v=0;v<l.markers.length;v++){var k=l.markers[v];oe(f,k.doc)==-1&&(k.parent=null,l.markers.splice(v--,1))}},a=0;a<e.length;a++)r(a)}var ay=0,Zt=function(e,r,a,o,l){if(!(this instanceof Zt))return new Zt(e,r,a,o,l);a==null&&(a=0),Pi.call(this,[new Ri([new Or("",null)])]),this.first=a,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=a;var f=W(a,0);this.sel=ir(f),this.history=new jo(null),this.id=++ay,this.modeOption=r,this.lineSep=o,this.direction=l=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ts(this,{from:f,to:f,text:e}),jt(this,ir(f),ye)};Zt.prototype=Wt(Pi.prototype,{constructor:Zt,iter:function(e,r,a){a?this.iterN(e-this.first,r-e,a):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var a=0,o=0;o<r.length;++o)a+=r[o].height;this.insertInner(e-this.first,r,a)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=wi(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:It(function(e){var r=W(this.first,0),a=this.first+this.size-1;Gr(this,{from:r,to:W(a,_e(this,a).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ai(this.cm,0,0),jt(this,ir(r),ye)}),replaceRange:function(e,r,a,o){r=ze(this,r),a=a?ze(this,a):r,Kr(this,e,r,a,o)},getRange:function(e,r,a){var o=Tn(this,ze(this,e),ze(this,r));return a===!1?o:o.join(a||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(N(this,e))return _e(this,e)},getLineNumber:function(e){return Ve(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=_e(this,e)),In(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ze(this,e)},getCursor:function(e){var r=this.sel.primary(),a;return e==null||e=="head"?a=r.head:e=="anchor"?a=r.anchor:e=="end"||e=="to"||e===!1?a=r.to():a=r.from(),a},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:It(function(e,r,a){uc(this,ze(this,typeof e=="number"?W(e,r||0):e),null,a)}),setSelection:It(function(e,r,a){uc(this,ze(this,e),ze(this,r||e),a)}),extendSelection:It(function(e,r,a){Uo(this,ze(this,e),r&&ze(this,r),a)}),extendSelections:It(function(e,r){lc(this,Zl(this,e),r)}),extendSelectionsBy:It(function(e,r){var a=nt(this.sel.ranges,e);lc(this,Zl(this,a),r)}),setSelections:It(function(e,r,a){if(!e.length)return;for(var o=[],l=0;l<e.length;l++)o[l]=new Xe(ze(this,e[l].anchor),ze(this,e[l].head));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),jt(this,wn(this.cm,o,r),a)}),addSelection:It(function(e,r,a){var o=this.sel.ranges.slice(0);o.push(new Xe(ze(this,e),ze(this,r||e))),jt(this,wn(this.cm,o,o.length-1),a)}),getSelection:function(e){for(var r=this.sel.ranges,a,o=0;o<r.length;o++){var l=Tn(this,r[o].from(),r[o].to());a=a?a.concat(l):l}return e===!1?a:a.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],a=this.sel.ranges,o=0;o<a.length;o++){var l=Tn(this,a[o].from(),a[o].to());e!==!1&&(l=l.join(e||this.lineSeparator())),r[o]=l}return r},replaceSelection:function(e,r,a){for(var o=[],l=0;l<this.sel.ranges.length;l++)o[l]=e;this.replaceSelections(o,r,a||"+input")},replaceSelections:It(function(e,r,a){for(var o=[],l=this.sel,f=0;f<l.ranges.length;f++){var v=l.ranges[f];o[f]={from:v.from(),to:v.to(),text:this.splitLines(e[f]),origin:a}}for(var k=r&&r!="end"&&Kb(this,o,r),x=o.length-1;x>=0;x--)Gr(this,o[x]);k?cc(this,k):this.cm&&Hr(this.cm)}),undo:It(function(){Go(this,"undo")}),redo:It(function(){Go(this,"redo")}),undoSelection:It(function(){Go(this,"undo",!0)}),redoSelection:It(function(){Go(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o<e.done.length;o++)e.done[o].ranges||++r;for(var l=0;l<e.undone.length;l++)e.undone[l].ranges||++a;return{undo:r,redo:a}},clearHistory:function(){var e=this;this.history=new jo(this.history.maxGeneration),ar(this,function(r){return r.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Wr(this.history.done),undone:Wr(this.history.undone)}},setHistory:function(e){var r=this.history=new jo(this.history.maxGeneration);r.done=Wr(e.done.slice(0),null,!0),r.undone=Wr(e.undone.slice(0),null,!0)},setGutterMarker:It(function(e,r,a){return Oi(this,e,"gutter",function(o){var l=o.gutterMarkers||(o.gutterMarkers={});return l[r]=a,!a&&te(l)&&(o.gutterMarkers=null),!0})}),clearGutter:It(function(e){var r=this;this.iter(function(a){a.gutterMarkers&&a.gutterMarkers[e]&&Oi(r,a,"gutter",function(){return a.gutterMarkers[e]=null,te(a.gutterMarkers)&&(a.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!N(this,e))return null;if(r=e,e=_e(this,e),!e)return null}else if(r=Ve(e),r==null)return null;return{line:r,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:It(function(e,r,a){return Oi(this,e,r=="gutter"?"gutter":"class",function(o){var l=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass";if(!o[l])o[l]=a;else{if(ee(a).test(o[l]))return!1;o[l]+=" "+a}return!0})}),removeLineClass:It(function(e,r,a){return Oi(this,e,r=="gutter"?"gutter":"class",function(o){var l=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",f=o[l];if(f)if(a==null)o[l]=null;else{var v=f.match(ee(a));if(!v)return!1;var k=v.index+v[0].length;o[l]=f.slice(0,v.index)+(!v.index||k==f.length?"":" ")+f.slice(k)||null}else return!1;return!0})}),addLineWidget:It(function(e,r,a){return ny(this,e,r,a)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,a){return Vr(this,ze(this,e),ze(this,r),a,a&&a.type||"range")},setBookmark:function(e,r){var a={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=ze(this,e),Vr(this,e,e,a,"bookmark")},findMarksAt:function(e){e=ze(this,e);var r=[],a=_e(this,e.line).markedSpans;if(a)for(var o=0;o<a.length;++o){var l=a[o];(l.from==null||l.from<=e.ch)&&(l.to==null||l.to>=e.ch)&&r.push(l.marker.parent||l.marker)}return r},findMarks:function(e,r,a){e=ze(this,e),r=ze(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(f){var v=f.markedSpans;if(v)for(var k=0;k<v.length;k++){var x=v[k];!(x.to!=null&&l==e.line&&e.ch>=x.to||x.from==null&&l!=e.line||x.from!=null&&l==r.line&&x.from>=r.ch)&&(!a||a(x.marker))&&o.push(x.marker.parent||x.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;o<a.length;++o)a[o].from!=null&&e.push(a[o].marker)}),e},posFromIndex:function(e){var r,a=this.first,o=this.lineSeparator().length;return this.iter(function(l){var f=l.text.length+o;if(f>e)return r=e,!0;e-=f,++a}),ze(this,W(a,r))},indexFromPos:function(e){e=ze(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var a=this.lineSeparator().length;return this.iter(this.first,e.line,function(o){r+=o.text.length+a}),r},copy:function(e){var r=new Zt(wi(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return r.scrollTop=this.scrollTop,r.scrollLeft=this.scrollLeft,r.sel=this.sel,r.extend=!1,e&&(r.history.undoDepth=this.history.undoDepth,r.setHistory(this.getHistory())),r},linkedDoc:function(e){e||(e={});var r=this.first,a=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<a&&(a=e.to);var o=new Zt(wi(this,r,a),e.mode||this.modeOption,r,this.lineSep,this.direction);return e.sharedHist&&(o.history=this.history),(this.linked||(this.linked=[])).push({doc:o,sharedHist:e.sharedHist}),o.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],iy(o,Cc(this)),o},unlinkDoc:function(e){if(e instanceof ut&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var a=this.linked[r];if(a.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),oy(Cc(this));break}if(e.history==this.history){var o=[e.id];ar(e,function(l){return o.push(l.id)},!0),e.history=new jo(null),e.history.done=Wr(this.history.done,o),e.history.undone=Wr(this.history.undone,o)}},iterLinkedDocs:function(e){ar(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Dn(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:It(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Vb(this.cm)})}),Zt.prototype.eachLine=Zt.prototype.iter;var Sc=0;function sy(e){var r=this;if(Ec(r),st(r,e)||Gn(r.display,e))return;St(e),d&&(Sc=+new Date);var a=gr(r,e,!0),o=e.dataTransfer.files;if(!a||r.isReadOnly())return;if(o&&o.length&&window.FileReader&&window.File)for(var l=o.length,f=Array(l),v=0,k=function(){++v==l&&Lt(r,function(){a=ze(r.doc,a);var $={from:a,to:a,text:r.doc.splitLines(f.filter(function(ne){return ne!=null}).join(r.doc.lineSeparator())),origin:"paste"};Gr(r.doc,$),cc(r.doc,ir(ze(r.doc,a),ze(r.doc,or($))))})()},x=function($,ne){if(r.options.allowDropFileTypes&&oe(r.options.allowDropFileTypes,$.type)==-1){k();return}var ae=new FileReader;ae.onerror=function(){return k()},ae.onload=function(){var he=ae.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(he)){k();return}f[ne]=he,k()},ae.readAsText($)},C=0;C<o.length;C++)x(o[C],C);else{if(r.state.draggingText&&r.doc.sel.contains(a)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var M=e.dataTransfer.getData("Text");if(M){var P;if(r.state.draggingText&&!r.state.draggingText.copy&&(P=r.listSelections()),Wo(r.doc,ir(a,a)),P)for(var K=0;K<P.length;++K)Kr(r.doc,"",P[K].anchor,P[K].head,"drag");r.replaceSelection(M,"around","paste"),r.display.input.focus()}}catch($){}}}function ly(e,r){if(d&&(!e.state.draggingText||+new Date-Sc<100)){Bt(r);return}if(st(e,r)||Gn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!b){var a=_("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(a.width=a.height=1,e.display.wrapper.appendChild(a),a._top=a.offsetTop),r.dataTransfer.setDragImage(a,0,0),m&&a.parentNode.removeChild(a)}}function uy(e,r){var a=gr(e,r);if(!a)return;var o=document.createDocumentFragment();Pu(e,a,o),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Z(e.display.dragCursor,o)}function Ec(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Dc(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),a=[],o=0;o<r.length;o++){var l=r[o].CodeMirror;l&&a.push(l)}a.length&&a[0].operation(function(){for(var f=0;f<a.length;f++)e(a[f])})}var Ac=!1;function cy(){if(Ac)return;dy(),Ac=!0}function dy(){var e;Te(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Dc(hy)},100))}),Te(window,"blur",function(){return Dc(jr)})}function hy(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var lr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ji=0;ji<10;ji++)lr[ji+48]=lr[ji+96]=String(ji);for(var Ko=65;Ko<=90;Ko++)lr[Ko]=String.fromCharCode(Ko);for(var Hi=1;Hi<=12;Hi++)lr[Hi+111]=lr[Hi+63235]="F"+Hi;var Kn={};Kn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Kn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Kn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Kn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Kn.default=A?Kn.macDefault:Kn.pcDefault;function fy(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var a,o,l,f,v=0;v<r.length-1;v++){var k=r[v];if(/^(cmd|meta|m)$/i.test(k))f=!0;else if(/^a(lt)?$/i.test(k))a=!0;else if(/^(c|ctrl|control)$/i.test(k))o=!0;else if(/^s(hift)?$/i.test(k))l=!0;else throw new Error("Unrecognized modifier name: "+k)}return a&&(e="Alt-"+e),o&&(e="Ctrl-"+e),f&&(e="Cmd-"+e),l&&(e="Shift-"+e),e}function py(e){var r={};for(var a in e)if(e.hasOwnProperty(a)){var o=e[a];if(/^(name|fallthrough|(de|at)tach)$/.test(a))continue;if(o=="..."){delete e[a];continue}for(var l=nt(a.split(" "),fy),f=0;f<l.length;f++){var v=void 0,k=void 0;f==l.length-1?(k=l.join(" "),v=o):(k=l.slice(0,f+1).join(" "),v="...");var x=r[k];if(!x)r[k]=v;else if(x!=v)throw new Error("Inconsistent bindings for "+k)}delete e[a]}for(var C in r)e[C]=r[C];return e}function Yr(e,r,a,o){r=Vo(r);var l=r.call?r.call(e,o):r[e];if(l===!1)return"nothing";if(l==="...")return"multi";if(l!=null&&a(l))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return Yr(e,r.fallthrough,a,o);for(var f=0;f<r.fallthrough.length;f++){var v=Yr(e,r.fallthrough[f],a,o);if(v)return v}}}function Tc(e){var r=typeof e=="string"?e:lr[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function Lc(e,r,a){var o=e;return r.altKey&&o!="Alt"&&(e="Alt-"+e),(B?r.metaKey:r.ctrlKey)&&o!="Ctrl"&&(e="Ctrl-"+e),(B?r.ctrlKey:r.metaKey)&&o!="Mod"&&(e="Cmd-"+e),!a&&r.shiftKey&&o!="Shift"&&(e="Shift-"+e),e}function Ic(e,r){if(m&&e.keyCode==34&&e.char)return!1;var a=lr[e.keyCode];return a==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(a=e.code),Lc(a,e,r))}function Vo(e){return typeof e=="string"?Kn[e]:e}function Xr(e,r){for(var a=e.doc.sel.ranges,o=[],l=0;l<a.length;l++){for(var f=r(a[l]);o.length&&fe(f.from,Ce(o).to)<=0;){var v=o.pop();if(fe(v.from,f.from)<0){f.from=v.from;break}}o.push(f)}nn(e,function(){for(var k=o.length-1;k>=0;k--)Kr(e.doc,"",o[k].from,o[k].to,"+delete");Hr(e)})}function Ms(e,r,a){var o=Ae(e.text,r+a,a);return o<0||o>e.text.length?null:o}function qs(e,r,a){var o=Ms(e,r.ch,a);return o==null?null:new W(r.line,o,a<0?"after":"before")}function zs(e,r,a,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var f=Ot(a,r.doc.direction);if(f){var v=l<0?Ce(f):f[0],k=l<0==(v.level==1),x=k?"after":"before",C;if(v.level>0||r.doc.direction=="rtl"){var M=Pr(r,a);C=l<0?a.text.length-1:0;var P=Mn(r,M,C).top;C=Fe(function(K){return Mn(r,M,K).top==P},l<0==(v.level==1)?v.from:v.to-1,C),x=="before"&&(C=Ms(a,C,1))}else C=l<0?v.to:v.from;return new W(o,C,x)}}return new W(o,l<0?a.text.length:0,l<0?"before":"after")}function my(e,r,a,o){var l=Ot(r,e.doc.direction);if(!l)return qs(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var f=Ye(l,a.ch,a.sticky),v=l[f];if(e.doc.direction=="ltr"&&v.level%2==0&&(o>0?v.to>a.ch:v.from<a.ch))return qs(r,a,o);var k=function(pe,ve){return Ms(r,pe instanceof W?pe.ch:pe,ve)},x,C=function(pe){return e.options.lineWrapping?(x=x||Pr(e,r),qu(e,r,x,pe)):{begin:0,end:r.text.length}},M=C(a.sticky=="before"?k(a,-1):a.ch);if(e.doc.direction=="rtl"||v.level==1){var P=v.level==1==o<0,K=k(a,P?1:-1);if(K!=null&&(P?K<=v.to&&K<=M.end:K>=v.from&&K>=M.begin)){var $=P?"before":"after";return new W(a.line,K,$)}}var ne=function(pe,ve,me){for(var be=function(it,Ft){return Ft?new W(a.line,k(it,1),"before"):new W(a.line,it,"after")};pe>=0&&pe<l.length;pe+=ve){var Le=l[pe],Ee=ve>0==(Le.level!=1),Ne=Ee?me.begin:k(me.end,-1);if(Le.from<=Ne&&Ne<Le.to)return be(Ne,Ee);if(Ne=Ee?Le.from:k(Le.to,-1),me.begin<=Ne&&Ne<me.end)return be(Ne,Ee)}},ae=ne(f+o,o,M);if(ae)return ae;var he=o>0?M.end:k(M.begin,-1);return he!=null&&!(o>0&&he==r.text.length)&&(ae=ne(o>0?0:l.length-1,o,C(he)),ae)?ae:null}var Ui={selectAll:mc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ye)},killLine:function(e){return Xr(e,function(r){if(r.empty()){var a=_e(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line<e.lastLine()?{from:r.head,to:W(r.head.line+1,0)}:{from:r.head,to:W(r.head.line,a)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return Xr(e,function(r){return{from:W(r.from().line,0),to:ze(e.doc,W(r.to().line+1,0))}})},delLineLeft:function(e){return Xr(e,function(r){return{from:W(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return Xr(e,function(r){var a=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:a},"div");return{from:o,to:r.from()}})},delWrappedLineRight:function(e){return Xr(e,function(r){var a=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"div");return{from:r.from(),to:o}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(W(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(W(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return Fc(e,r.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(r){return Mc(e,r.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(r){return gy(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:a},"div")},we)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:a},"div")},we)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var a=e.cursorCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:a},"div");return o.ch<e.getLine(o.line).search(/\S/)?Mc(e,r.head):o},we)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var r=[],a=e.listSelections(),o=e.options.tabSize,l=0;l<a.length;l++){var f=a[l].from(),v=de(e.getLine(f.line),f.ch,o);r.push(rt(o-v%o))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return nn(e,function(){for(var r=e.listSelections(),a=[],o=0;o<r.length;o++){if(!r[o].empty())continue;var l=r[o].head,f=_e(e.doc,l.line).text;if(f){if(l.ch==f.length&&(l=new W(l.line,l.ch-1)),l.ch>0)l=new W(l.line,l.ch+1),e.replaceRange(f.charAt(l.ch-1)+f.charAt(l.ch-2),W(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var v=_e(e.doc,l.line-1).text;v&&(l=new W(l.line,1),e.replaceRange(f.charAt(0)+e.doc.lineSeparator()+v.charAt(v.length-1),W(l.line-1,v.length-1),l,"+transpose"))}}a.push(new Xe(l,l))}e.setSelections(a)})},newlineAndIndent:function(e){return nn(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;o<r.length;o++)e.indentLine(r[o].from().line,null,!0);Hr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Fc(e,r){var a=_e(e.doc,r),o=In(a);return o!=a&&(r=Ve(o)),zs(!0,e,o,r,1)}function gy(e,r){var a=_e(e.doc,r),o=Jv(a);return o!=a&&(r=Ve(o)),zs(!0,e,a,r,-1)}function Mc(e,r){var a=Fc(e,r.line),o=_e(e.doc,a.line),l=Ot(o,e.doc.direction);if(!l||l[0].level==0){var f=Math.max(a.ch,o.text.search(/\S/)),v=r.line==a.line&&r.ch<=f&&r.ch;return W(a.line,v?0:f,a.sticky)}return a}function Yo(e,r,a){if(typeof r=="string"&&(r=Ui[r],!r))return!1;e.display.input.ensurePolled();var o=e.display.shift,l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a&&(e.display.shift=!1),l=r(e)!=Oe}finally{e.display.shift=o,e.state.suppressEdits=!1}return l}function vy(e,r,a){for(var o=0;o<e.state.keyMaps.length;o++){var l=Yr(r,e.state.keyMaps[o],a,e);if(l)return l}return e.options.extraKeys&&Yr(r,e.options.extraKeys,a,e)||Yr(r,e.options.keyMap,a,e)}var by=new ce;function Wi(e,r,a,o){var l=e.state.keySeq;if(l){if(Tc(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:by.set(50,function(){e.state.keySeq==l&&(e.state.keySeq=null,e.display.input.reset())}),qc(e,l+" "+r,a,o))return!0}return qc(e,r,a,o)}function qc(e,r,a,o){var l=vy(e,r,o);return l=="multi"&&(e.state.keySeq=r),l=="handled"&&Rt(e,"keyHandled",e,r,a),(l=="handled"||l=="multi")&&(St(a),bs(e)),!!l}function zc(e,r){var a=Ic(r,!0);return a?r.shiftKey&&!e.state.keySeq?Wi(e,"Shift-"+a,r,function(o){return Yo(e,o,!0)})||Wi(e,a,r,function(o){if(typeof o=="string"?/^go[A-Z]/.test(o):o.motion)return Yo(e,o)}):Wi(e,a,r,function(o){return Yo(e,o)}):!1}function yy(e,r,a){return Wi(e,"'"+a+"'",r,function(o){return Yo(e,o,!0)})}var Os=null;function Oc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=q(),st(r,e))return;d&&h<11&&e.keyCode==27&&(e.returnValue=!1);var a=e.keyCode;r.display.shift=a==16||e.shiftKey;var o=zc(r,e);m&&(Os=o?a:null,!o&&a==88&&!er&&(A?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),i&&!A&&!o&&a==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&wy(r)}function wy(e){var r=e.display.lineDiv;I(r,"CodeMirror-crosshair");function a(o){(o.keyCode==18||!o.altKey)&&(J(r,"CodeMirror-crosshair"),Be(document,"keyup",a),Be(document,"mouseover",a))}Te(document,"keyup",a),Te(document,"mouseover",a)}function Rc(e){e.keyCode==16&&(this.doc.sel.shift=!1),st(this,e)}function Pc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Gn(r.display,e)||st(r,e)||e.ctrlKey&&!e.altKey||A&&e.metaKey)return;var a=e.keyCode,o=e.charCode;if(m&&a==Os){Os=null,St(e);return}if(m&&(!e.which||e.which<10)&&zc(r,e))return;var l=String.fromCharCode(o==null?a:o);if(l=="\b")return;if(yy(r,e,l))return;r.display.input.onKeyPress(e)}var ky=400,Rs=function(e,r,a){this.time=e,this.pos=r,this.button=a};Rs.prototype.compare=function(e,r,a){return this.time+ky>e&&fe(r,this.pos)==0&&a==this.button};var $i,Gi;function xy(e,r){var a=+new Date;return Gi&&Gi.compare(a,e,r)?($i=Gi=null,"triple"):$i&&$i.compare(a,e,r)?(Gi=new Rs(a,e,r),$i=null,"double"):($i=new Rs(a,e,r),Gi=null,"single")}function Nc(e){var r=this,a=r.display;if(st(r,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){p||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Ps(r,e))return;var o=gr(r,e),l=ko(e),f=o?xy(o,l):"single";if(window.focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),o&&_y(r,l,o,f,e))return;l==1?o?Sy(r,o,f,e):Ir(e)==a.scroller&&St(e):l==2?(o&&Uo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):l==3&&(G?r.display.input.onContextMenu(e):Bu(r))}function _y(e,r,a,o,l){var f="Click";return o=="double"?f="Double"+f:o=="triple"&&(f="Triple"+f),f=(r==1?"Left":r==2?"Middle":"Right")+f,Wi(e,Lc(f,l),l,function(v){if(typeof v=="string"&&(v=Ui[v]),!v)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=v(e,a)!=Oe}finally{e.state.suppressEdits=!1}return k})}function Cy(e,r,a){var o=e.getOption("configureMouse"),l=o?o(e,r,a):{};if(l.unit==null){var f=R?a.shiftKey&&a.metaKey:a.altKey;l.unit=f?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||a.shiftKey),l.addNew==null&&(l.addNew=A?a.metaKey:a.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(A?a.altKey:a.ctrlKey)),l}function Sy(e,r,a,o){d?setTimeout(F(Nu,e),0):e.curOp.focus=q();var l=Cy(e,a,o),f=e.doc.sel,v;e.options.dragDrop&&En&&!e.isReadOnly()&&a=="single"&&(v=f.contains(r))>-1&&(fe((v=f.ranges[v]).from(),r)<0||r.xRel>0)&&(fe(v.to(),r)>0||r.xRel<0)?Ey(e,o,r,l):Dy(e,o,r,l)}function Ey(e,r,a,o){var l=e.display,f=!1,v=Lt(e,function(C){p&&(l.scroller.draggable=!1),e.state.draggingText=!1,Be(l.wrapper.ownerDocument,"mouseup",v),Be(l.wrapper.ownerDocument,"mousemove",k),Be(l.scroller,"dragstart",x),Be(l.scroller,"drop",v),f||(St(C),o.addNew||Uo(e.doc,a,null,null,o.extend),p&&!b||d&&h==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),k=function(C){f=f||Math.abs(r.clientX-C.clientX)+Math.abs(r.clientY-C.clientY)>=10},x=function(){return f=!0};p&&(l.scroller.draggable=!0),e.state.draggingText=v,v.copy=!o.moveOnDrag,l.scroller.dragDrop&&l.scroller.dragDrop(),Te(l.wrapper.ownerDocument,"mouseup",v),Te(l.wrapper.ownerDocument,"mousemove",k),Te(l.scroller,"dragstart",x),Te(l.scroller,"drop",v),Bu(e),setTimeout(function(){return l.input.focus()},20)}function Bc(e,r,a){if(a=="char")return new Xe(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Xe(W(r.line,0),ze(e.doc,W(r.line+1,0)));var o=a(e,r);return new Xe(o.from,o.to)}function Dy(e,r,a,o){var l=e.display,f=e.doc;St(r);var v,k,x=f.sel,C=x.ranges;if(o.addNew&&!o.extend?(k=f.sel.contains(a),k>-1?v=C[k]:v=new Xe(a,a)):(v=f.sel.primary(),k=f.sel.primIndex),o.unit=="rectangle")o.addNew||(v=new Xe(a,a)),a=gr(e,r,!0,!0),k=-1;else{var M=Bc(e,a,o.unit);o.extend?v=Is(v,M.anchor,M.head,o.extend):v=M}o.addNew?k==-1?(k=C.length,jt(f,wn(e,C.concat([v]),k),{scroll:!1,origin:"*mouse"})):C.length>1&&C[k].empty()&&o.unit=="char"&&!o.extend?(jt(f,wn(e,C.slice(0,k).concat(C.slice(k+1)),0),{scroll:!1,origin:"*mouse"}),x=f.sel):Fs(f,k,v,re):(k=0,jt(f,new sn([v],0),re),x=f.sel);var P=a;function K(me){if(fe(P,me)==0)return;if(P=me,o.unit=="rectangle"){for(var be=[],Le=e.options.tabSize,Ee=de(_e(f,a.line).text,a.ch,Le),Ne=de(_e(f,me.line).text,me.ch,Le),it=Math.min(Ee,Ne),Ft=Math.max(Ee,Ne),ct=Math.min(a.line,me.line),rn=Math.min(e.lastLine(),Math.max(a.line,me.line));ct<=rn;ct++){var Qt=_e(f,ct).text,kt=De(Qt,it,Le);it==Ft?be.push(new Xe(W(ct,kt),W(ct,kt))):Qt.length>kt&&be.push(new Xe(W(ct,kt),W(ct,De(Qt,Ft,Le))))}be.length||be.push(new Xe(a,a)),jt(f,wn(e,x.ranges.slice(0,k).concat(be),k),{origin:"*mouse",scroll:!1}),e.scrollIntoView(me)}else{var Jt=v,Pt=Bc(e,me,o.unit),Dt=Jt.anchor,xt;fe(Pt.anchor,Dt)>0?(xt=Pt.head,Dt=Yt(Jt.from(),Pt.anchor)):(xt=Pt.anchor,Dt=Et(Jt.to(),Pt.head));var ht=x.ranges.slice(0);ht[k]=Ay(e,new Xe(ze(f,Dt),xt)),jt(f,wn(e,ht,k),re)}}var $=l.wrapper.getBoundingClientRect(),ne=0;function ae(me){var be=++ne,Le=gr(e,me,!0,o.unit=="rectangle");if(!Le)return;if(fe(Le,P)!=0){e.curOp.focus=q(),K(Le);var Ee=Ro(l,f);(Le.line>=Ee.to||Le.line<Ee.from)&&setTimeout(Lt(e,function(){ne==be&&ae(me)}),150)}else{var Ne=me.clientY<$.top?-20:me.clientY>$.bottom?20:0;Ne&&setTimeout(Lt(e,function(){if(ne!=be)return;l.scroller.scrollTop+=Ne,ae(me)}),50)}}function he(me){e.state.selectingText=!1,ne=Infinity,me&&(St(me),l.input.focus()),Be(l.wrapper.ownerDocument,"mousemove",pe),Be(l.wrapper.ownerDocument,"mouseup",ve),f.history.lastSelOrigin=null}var pe=Lt(e,function(me){me.buttons===0||!ko(me)?he(me):ae(me)}),ve=Lt(e,he);e.state.selectingText=ve,Te(l.wrapper.ownerDocument,"mousemove",pe),Te(l.wrapper.ownerDocument,"mouseup",ve)}function Ay(e,r){var a=r.anchor,o=r.head,l=_e(e.doc,a.line);if(fe(a,o)==0&&a.sticky==o.sticky)return r;var f=Ot(l);if(!f)return r;var v=Ye(f,a.ch,a.sticky),k=f[v];if(k.from!=a.ch&&k.to!=a.ch)return r;var x=v+(k.from==a.ch==(k.level!=1)?0:1);if(x==0||x==f.length)return r;var C;if(o.line!=a.line)C=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var M=Ye(f,o.ch,o.sticky),P=M-v||(o.ch-a.ch)*(k.level==1?-1:1);M==x-1||M==x?C=P<0:C=P>0}var K=f[x+(C?-1:0)],$=C==(K.level==1),ne=$?K.from:K.to,ae=$?"after":"before";return a.ch==ne&&a.sticky==ae?r:new Xe(new W(a.line,ne,ae),o)}function jc(e,r,a,o){var l,f;if(r.touches)l=r.touches[0].clientX,f=r.touches[0].clientY;else try{l=r.clientX,f=r.clientY}catch(K){return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&St(r);var v=e.display,k=v.lineDiv.getBoundingClientRect();if(f>k.bottom||!wt(e,a))return fr(r);f-=k.top-v.viewOffset;for(var x=0;x<e.display.gutterSpecs.length;++x){var C=v.gutters.childNodes[x];if(C&&C.getBoundingClientRect().right>=l){var M=L(e.doc,f),P=e.display.gutterSpecs[x];return dt(e,a,e,M,P.className,r),fr(r)}}}function Ps(e,r){return jc(e,r,"gutterClick",!0)}function Hc(e,r){if(Gn(e.display,r)||Ty(e,r))return;if(st(e,r,"contextmenu"))return;G||e.display.input.onContextMenu(r)}function Ty(e,r){return wt(e,"gutterContextMenu")?jc(e,r,"gutterContextMenu",!1):!1}function Uc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Zr={toString:function(){return"CodeMirror.Init"}},Wc={},Xo={};function Ly(e){var r=e.optionHandlers;function a(o,l,f,v){e.defaults[o]=l,f&&(r[o]=v?function(k,x,C){C!=Zr&&f(k,x,C)}:f)}e.defineOption=a,e.Init=Zr,a("value","",function(o,l){return o.setValue(l)},!0),a("mode",null,function(o,l){o.doc.modeOption=l,As(o)},!0),a("indentUnit",2,As,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){qi(o),Ei(o),Xt(o)},!0),a("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!l)return;var f=[],v=o.doc.first;o.doc.iter(function(x){for(var C=0;;){var M=x.text.indexOf(l,C);if(M==-1)break;C=M+l.length,f.push(W(v,M))}v++});for(var k=f.length-1;k>=0;k--)Kr(o.doc,l,f[k],W(f[k].line,f[k].ch+l.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,l,f){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),f!=Zr&&o.refresh()}),a("specialCharPlaceholder",ob,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),a("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),a("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),a("rtlMoveVisually",!U),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){Uc(o),Mi(o)},!0),a("keyMap","default",function(o,l,f){var v=Vo(l),k=f!=Zr&&Vo(f);k&&k.detach&&k.detach(o,v),v.attach&&v.attach(o,k||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Fy,!0),a("gutters",[],function(o,l){o.display.gutterSpecs=Es(l,o.options.lineNumbers),Mi(o)},!0),a("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?gs(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return Ur(o)},!0),a("scrollbarStyle","native",function(o){Gu(o),Ur(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,l){o.display.gutterSpecs=Es(o.options.gutters,l),Mi(o)},!0),a("firstLineNumber",1,Mi,!0),a("lineNumberFormatter",function(o){return o},Mi,!0),a("showCursorWhenSelecting",!1,Di,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,l){l=="nocursor"&&(jr(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),a("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),a("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),a("dragDrop",!0,Iy),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Di,!0),a("singleCursorHeightPerLine",!0,Di,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qi,!0),a("addModeClass",!1,qi,!0),a("pollInterval",100),a("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,qi,!0),a("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),a("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),a("autofocus",null),a("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),a("phrases",null)}function Iy(e,r,a){var o=a&&a!=Zr;if(!r!=!o){var l=e.display.dragFunctions,f=r?Te:Be;f(e.display.scroller,"dragstart",l.start),f(e.display.scroller,"dragenter",l.enter),f(e.display.scroller,"dragover",l.over),f(e.display.scroller,"dragleave",l.leave),f(e.display.scroller,"drop",l.drop)}}function Fy(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(J(e.display.wrapper,"CodeMirror-wrap"),os(e)),vs(e),Xt(e),Ei(e),setTimeout(function(){return Ur(e)},100)}function ut(e,r){var a=this;if(!(this instanceof ut))return new ut(e,r);this.options=r=r?T(r):{},T(Wc,r,!1);var o=r.value;typeof o=="string"?o=new Zt(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new ut.inputStyles[r.inputStyle](this),f=this.display=new $b(e,o,l,r);f.wrapper.CodeMirror=this,Uc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ce,keySeq:null,specialChars:null},r.autofocus&&!z&&f.input.focus(),d&&h<11&&setTimeout(function(){return a.display.input.reset(!0)},20),My(this),cy(),wr(this),this.curOp.forceUpdate=!0,nc(this,o),r.autofocus&&!z||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ys(a)},20):jr(this);for(var v in Xo)Xo.hasOwnProperty(v)&&Xo[v](this,r[v],Zr);Yu(this),r.finishInit&&r.finishInit(this);for(var k=0;k<Ns.length;++k)Ns[k](this);kr(this),p&&r.lineWrapping&&getComputedStyle(f.lineDiv).textRendering=="optimizelegibility"&&(f.lineDiv.style.textRendering="auto")}ut.defaults=Wc,ut.optionHandlers=Xo;function My(e){var r=e.display;Te(r.scroller,"mousedown",Lt(e,Nc)),d&&h<11?Te(r.scroller,"dblclick",Lt(e,function(x){if(st(e,x))return;var C=gr(e,x);if(!C||Ps(e,x)||Gn(e.display,x))return;St(x);var M=e.findWordAt(C);Uo(e.doc,M.anchor,M.head)})):Te(r.scroller,"dblclick",function(x){return st(e,x)||St(x)}),Te(r.scroller,"contextmenu",function(x){return Hc(e,x)}),Te(r.input.getField(),"contextmenu",function(x){r.scroller.contains(x.target)||Hc(e,x)});var a,o={end:0};function l(){r.activeTouch&&(a=setTimeout(function(){return r.activeTouch=null},1e3),o=r.activeTouch,o.end=+new Date)}function f(x){if(x.touches.length!=1)return!1;var C=x.touches[0];return C.radiusX<=1&&C.radiusY<=1}function v(x,C){if(C.left==null)return!0;var M=C.left-x.left,P=C.top-x.top;return M*M+P*P>20*20}Te(r.scroller,"touchstart",function(x){if(!st(e,x)&&!f(x)&&!Ps(e,x)){r.input.ensurePolled(),clearTimeout(a);var C=+new Date;r.activeTouch={start:C,moved:!1,prev:C-o.end<=300?o:null},x.touches.length==1&&(r.activeTouch.left=x.touches[0].pageX,r.activeTouch.top=x.touches[0].pageY)}}),Te(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Te(r.scroller,"touchend",function(x){var C=r.activeTouch;if(C&&!Gn(r,x)&&C.left!=null&&!C.moved&&new Date-C.start<300){var M=e.coordsChar(r.activeTouch,"page"),P;!C.prev||v(C,C.prev)?P=new Xe(M,M):!C.prev.prev||v(C,C.prev.prev)?P=e.findWordAt(M):P=new Xe(W(M.line,0),ze(e.doc,W(M.line+1,0))),e.setSelection(P.anchor,P.head),e.focus(),St(x)}l()}),Te(r.scroller,"touchcancel",l),Te(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ti(e,r.scroller.scrollTop),br(e,r.scroller.scrollLeft,!0),dt(e,"scroll",e))}),Te(r.scroller,"mousewheel",function(x){return Qu(e,x)}),Te(r.scroller,"DOMMouseScroll",function(x){return Qu(e,x)}),Te(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(x){st(e,x)||Bt(x)},over:function(x){st(e,x)||(uy(e,x),Bt(x))},start:function(x){return ly(e,x)},drop:Lt(e,sy),leave:function(x){st(e,x)||Ec(e)}};var k=r.input.getField();Te(k,"keyup",function(x){return Rc.call(e,x)}),Te(k,"keydown",Lt(e,Oc)),Te(k,"keypress",Lt(e,Pc)),Te(k,"focus",function(x){return ys(e,x)}),Te(k,"blur",function(x){return jr(e,x)})}var Ns=[];ut.defineInitHook=function(e){return Ns.push(e)};function Ki(e,r,a,o){var l=e.doc,f;a==null&&(a="add"),a=="smart"&&(l.mode.indent?f=ki(e,r).state:a="prev");var v=e.options.tabSize,k=_e(l,r),x=de(k.text,null,v);k.stateAfter&&(k.stateAfter=null);var C=k.text.match(/^\s*/)[0],M;if(!o&&!/\S/.test(k.text))M=0,a="not";else if(a=="smart"&&(M=l.mode.indent(f,k.text.slice(C.length),k.text),M==Oe||M>150)){if(!o)return;a="prev"}a=="prev"?r>l.first?M=de(_e(l,r-1).text,null,v):M=0:a=="add"?M=x+e.options.indentUnit:a=="subtract"?M=x-e.options.indentUnit:typeof a=="number"&&(M=x+a),M=Math.max(0,M);var P="",K=0;if(e.options.indentWithTabs)for(var $=Math.floor(M/v);$;--$)K+=v,P+=" ";if(K<M&&(P+=rt(M-K)),P!=C)return Kr(l,P,W(r,0),W(r,C.length),"+input"),k.stateAfter=null,!0;for(var ne=0;ne<l.sel.ranges.length;ne++){var ae=l.sel.ranges[ne];if(ae.head.line==r&&ae.head.ch<C.length){var he=W(r,C.length);Fs(l,ne,new Xe(he,he));break}}}var kn=null;function Zo(e){kn=e}function Bs(e,r,a,o,l){var f=e.doc;e.display.shift=!1,o||(o=f.sel);var v=+new Date-200,k=l=="paste"||e.state.pasteIncoming>v,x=Dn(r),C=null;if(k&&o.ranges.length>1)if(kn&&kn.text.join(`
`)==r){if(o.ranges.length%kn.text.length==0){C=[];for(var M=0;M<kn.text.length;M++)C.push(f.splitLines(kn.text[M]))}}else x.length==o.ranges.length&&e.options.pasteLinesPerSelection&&(C=nt(x,function(pe){return[pe]}));for(var P=e.curOp.updateInput,K=o.ranges.length-1;K>=0;K--){var $=o.ranges[K],ne=$.from(),ae=$.to();$.empty()&&(a&&a>0?ne=W(ne.line,ne.ch-a):e.state.overwrite&&!k?ae=W(ae.line,Math.min(_e(f,ae.line).text.length,ae.ch+Ce(x).length)):k&&kn&&kn.lineWise&&kn.text.join(`
`)==x.join(`
`)&&(ne=ae=W(ne.line,0)));var he={from:ne,to:ae,text:C?C[K%C.length]:x,origin:l||(k?"paste":e.state.cutIncoming>v?"cut":"+input")};Gr(e.doc,he),Rt(e,"inputRead",e,he)}r&&!k&&Gc(e,r),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=P),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function $c(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&nn(r,function(){return Bs(r,a,0,null,"paste")}),!0}function Gc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var l=a.ranges[o];if(l.head.ch>100||o&&a.ranges[o-1].head.line==l.head.line)continue;var f=e.getModeAt(l.head),v=!1;if(f.electricChars){for(var k=0;k<f.electricChars.length;k++)if(r.indexOf(f.electricChars.charAt(k))>-1){v=Ki(e,l.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(_e(e.doc,l.head.line).text.slice(0,l.head.ch))&&(v=Ki(e,l.head.line,"smart")));v&&Rt(e,"electricInput",e,l.head.line)}}function Kc(e){for(var r=[],a=[],o=0;o<e.doc.sel.ranges.length;o++){var l=e.doc.sel.ranges[o].head.line,f={anchor:W(l,0),head:W(l+1,0)};a.push(f),r.push(e.getRange(f.anchor,f.head))}return{text:r,ranges:a}}function Vc(e,r,a,o){e.setAttribute("autocorrect",a?"":"off"),e.setAttribute("autocapitalize",o?"":"off"),e.setAttribute("spellcheck",!!r)}function Yc(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return p?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Vc(e),r}function qy(e){var r=e.optionHandlers,a=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(o,l){var f=this.options,v=f[o];if(f[o]==l&&o!="mode")return;f[o]=l,r.hasOwnProperty(o)&&Lt(this,r[o])(this,l,v),dt(this,"optionChange",this,o)},getOption:function(o){return this.options[o]},getDoc:function(){return this.doc},addKeyMap:function(o,l){this.state.keyMaps[l?"push":"unshift"](Vo(o))},removeKeyMap:function(o){for(var l=this.state.keyMaps,f=0;f<l.length;++f)if(l[f]==o||l[f].name==o)return l.splice(f,1),!0},addOverlay:$t(function(o,l){var f=o.token?o:e.getMode(this.options,o);if(f.startState)throw new Error("Overlays may not be stateful.");mt(this.state.overlays,{mode:f,modeSpec:o,opaque:l&&l.opaque,priority:l&&l.priority||0},function(v){return v.priority}),this.state.modeGen++,Xt(this)}),removeOverlay:$t(function(o){for(var l=this.state.overlays,f=0;f<l.length;++f){var v=l[f].modeSpec;if(v==o||typeof o=="string"&&v.name==o){l.splice(f,1),this.state.modeGen++,Xt(this);return}}}),indentLine:$t(function(o,l,f){typeof l!="string"&&typeof l!="number"&&(l==null?l=this.options.smartIndent?"smart":"prev":l=l?"add":"subtract"),N(this.doc,o)&&Ki(this,o,l,f)}),indentSelection:$t(function(o){for(var l=this.doc.sel.ranges,f=-1,v=0;v<l.length;v++){var k=l[v];if(k.empty())k.head.line>f&&(Ki(this,k.head.line,o,!0),f=k.head.line,v==this.doc.sel.primIndex&&Hr(this));else{var x=k.from(),C=k.to(),M=Math.max(f,x.line);f=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var P=M;P<f;++P)Ki(this,P,o);var K=this.doc.sel.ranges;x.ch==0&&l.length==K.length&&K[v].from().ch>0&&Fs(this.doc,v,new Xe(x,K[v].to()),ye)}}}),getTokenAt:function(o,l){return nu(this,o,l)},getLineTokens:function(o,l){return nu(this,W(o),l,!0)},getTokenTypeAt:function(o){o=ze(this.doc,o);var l=Jl(this,_e(this.doc,o.line)),f=0,v=(l.length-1)/2,k=o.ch,x;if(k==0)x=l[2];else for(;;){var C=f+v>>1;if((C?l[C*2-1]:0)>=k)v=C;else if(l[C*2+1]<k)f=C+1;else{x=l[C*2+2];break}}var M=x?x.indexOf("overlay "):-1;return M<0?x:M==0?null:x.slice(0,M-1)},getModeAt:function(o){var l=this.doc.mode;return l.innerMode?e.innerMode(l,this.getTokenAt(o).state).mode:l},getHelper:function(o,l){return this.getHelpers(o,l)[0]},getHelpers:function(o,l){var f=[];if(!a.hasOwnProperty(l))return f;var v=a[l],k=this.getModeAt(o);if(typeof k[l]=="string")v[k[l]]&&f.push(v[k[l]]);else if(k[l])for(var x=0;x<k[l].length;x++){var C=v[k[l][x]];C&&f.push(C)}else k.helperType&&v[k.helperType]?f.push(v[k.helperType]):v[k.name]&&f.push(v[k.name]);for(var M=0;M<v._global.length;M++){var P=v._global[M];P.pred(k,this)&&oe(f,P.val)==-1&&f.push(P.val)}return f},getStateAfter:function(o,l){var f=this.doc;return o=Co(f,o==null?f.first+f.size-1:o),ki(this,o+1,l).state},cursorCoords:function(o,l){var f,v=this.doc.sel.primary();return o==null?f=v.head:typeof o=="object"?f=ze(this.doc,o):f=o?v.from():v.to(),yn(this,f,l||"page")},charCoords:function(o,l){return ds(this,ze(this.doc,o),l||"page")},coordsChar:function(o,l){return o=Iu(this,o,l||"page"),fs(this,o.left,o.top)},lineAtHeight:function(o,l){return o=Iu(this,{top:o,left:0},l||"page").top,L(this.doc,o+this.display.viewOffset)},heightAtLine:function(o,l,f){var v=!1,k;if(typeof o=="number"){var x=this.doc.first+this.doc.size-1;o<this.doc.first?o=this.doc.first:o>x&&(o=x,v=!0),k=_e(this.doc,o)}else k=o;return Mo(this,k,{top:0,left:0},l||"page",f||v).top+(v?this.doc.height-$n(k):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,f,v,k){var x=this.display;o=yn(this,ze(this.doc,o));var C=o.bottom,M=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),x.sizer.appendChild(l),v=="over")C=o.top;else if(v=="above"||v=="near"){var P=Math.max(x.wrapper.clientHeight,this.doc.height),K=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(v=="above"||o.bottom+l.offsetHeight>P)&&o.top>l.offsetHeight?C=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=P&&(C=o.bottom),M+l.offsetWidth>K&&(M=K-l.offsetWidth)}l.style.top=C+"px",l.style.left=l.style.right="",k=="right"?(M=x.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(k=="left"?M=0:k=="middle"&&(M=(x.sizer.clientWidth-l.offsetWidth)/2),l.style.left=M+"px"),f&&Ib(this,{left:M,top:C,right:M+l.offsetWidth,bottom:C+l.offsetHeight})},triggerOnKeyDown:$t(Oc),triggerOnKeyPress:$t(Pc),triggerOnKeyUp:Rc,triggerOnMouseDown:$t(Nc),execCommand:function(o){if(Ui.hasOwnProperty(o))return Ui[o].call(null,this)},triggerElectric:$t(function(o){Gc(this,o)}),findPosH:function(o,l,f,v){var k=1;l<0&&(k=-1,l=-l);for(var x=ze(this.doc,o),C=0;C<l&&!(x=js(this.doc,x,k,f,v),x.hitSide);++C);return x},moveH:$t(function(o,l){var f=this;this.extendSelectionsBy(function(v){return f.display.shift||f.doc.extend||v.empty()?js(f.doc,v.head,o,l,f.options.rtlMoveVisually):o<0?v.from():v.to()},we)}),deleteH:$t(function(o,l){var f=this.doc.sel,v=this.doc;f.somethingSelected()?v.replaceSelection("",null,"+delete"):Xr(this,function(k){var x=js(v,k.head,o,l,!1);return o<0?{from:x,to:k.head}:{from:k.head,to:x}})}),findPosV:function(o,l,f,v){var k=1,x=v;l<0&&(k=-1,l=-l);for(var C=ze(this.doc,o),M=0;M<l;++M){var P=yn(this,C,"div");if(x==null?x=P.left:P.left=x,C=Xc(this,P,k,f),C.hitSide)break}return C},moveV:$t(function(o,l){var f=this,v=this.doc,k=[],x=!this.display.shift&&!v.extend&&v.sel.somethingSelected();if(v.extendSelectionsBy(function(M){if(x)return o<0?M.from():M.to();var P=yn(f,M.head,"div");M.goalColumn!=null&&(P.left=M.goalColumn),k.push(P.left);var K=Xc(f,P,o,l);return l=="page"&&M==v.sel.primary()&&ks(f,ds(f,K,"div").top-P.top),K},we),k.length)for(var C=0;C<v.sel.ranges.length;C++)v.sel.ranges[C].goalColumn=k[C]}),findWordAt:function(o){var l=this.doc,f=_e(l,o.line).text,v=o.ch,k=o.ch;if(f){var x=this.getHelper(o,"wordChars");(o.sticky=="before"||k==f.length)&&v?--v:++k;for(var C=f.charAt(v),M=le(C,x)?function(P){return le(P,x)}:/\s/.test(C)?function(P){return/\s/.test(P)}:function(P){return!/\s/.test(P)&&!le(P)};v>0&&M(f.charAt(v-1));)--v;for(;k<f.length&&M(f.charAt(k));)++k}return new Xe(W(o.line,v),W(o.line,k))},toggleOverwrite:function(o){if(o!=null&&o==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):J(this.display.cursorDiv,"CodeMirror-overwrite"),dt(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==q()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:$t(function(o,l){Ai(this,o,l)}),getScrollInfo:function(){var o=this.display.scroller;return{left:o.scrollLeft,top:o.scrollTop,height:o.scrollHeight-Fn(this)-this.display.barHeight,width:o.scrollWidth-Fn(this)-this.display.barWidth,clientHeight:ls(this),clientWidth:pr(this)}},scrollIntoView:$t(function(o,l){o==null?(o={from:this.doc.sel.primary().head,to:null},l==null&&(l=this.options.cursorScrollMargin)):typeof o=="number"?o={from:W(o,0),to:null}:o.from==null&&(o={from:o,to:null}),o.to||(o.to=o.from),o.margin=l||0,o.from.line!=null?Fb(this,o):Hu(this,o.from,o.to,o.margin)}),setSize:$t(function(o,l){var f=this,v=function(x){return typeof x=="number"||/^\d+$/.test(String(x))?x+"px":x};o!=null&&(this.display.wrapper.style.width=v(o)),l!=null&&(this.display.wrapper.style.height=v(l)),this.options.lineWrapping&&Au(this);var k=this.display.viewFrom;this.doc.iter(k,this.display.viewTo,function(x){if(x.widgets){for(var C=0;C<x.widgets.length;C++)if(x.widgets[C].noHScroll){nr(f,k,"widget");break}}++k}),this.curOp.forceUpdate=!0,dt(this,"refresh",this)}),operation:function(o){return nn(this,o)},startOperation:function(){return wr(this)},endOperation:function(){return kr(this)},refresh:$t(function(){var o=this.display.cachedTextHeight;Xt(this),this.curOp.forceUpdate=!0,Ei(this),Ai(this,this.doc.scrollLeft,this.doc.scrollTop),Cs(this.display),(o==null||Math.abs(o-Nr(this.display))>.5||this.options.lineWrapping)&&vs(this),dt(this,"refresh",this)}),swapDoc:$t(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),nc(this,o),Ei(this),this.display.input.reset(),Ai(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,Rt(this,"swapDoc",this,l),l}),phrase:function(o){var l=this.options.phrases;return l&&Object.prototype.hasOwnProperty.call(l,o)?l[o]:o},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jn(e),e.registerHelper=function(o,l,f){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][l]=f},e.registerGlobalHelper=function(o,l,f,v){e.registerHelper(o,l,v),a[o]._global.push({pred:f,val:v})}}function js(e,r,a,o,l){var f=r,v=a,k=_e(e,r.line),x=l&&e.direction=="rtl"?-a:a;function C(){var ve=r.line+x;return ve<e.first||ve>=e.first+e.size?!1:(r=new W(ve,r.ch,r.sticky),k=_e(e,ve))}function M(ve){var me;if(o=="codepoint"){var be=k.text.charCodeAt(r.ch+(o>0?0:-1));isNaN(be)?me=null:me=new W(r.line,Math.max(0,Math.min(k.text.length,r.ch+a*(be>=55296&&be<56320?2:1))),-a)}else l?me=my(e.cm,k,r,a):me=qs(k,r,a);if(me==null)if(!ve&&C())r=zs(l,e.cm,k,r.line,x);else return!1;else r=me;return!0}if(o=="char"||o=="codepoint")M();else if(o=="column")M(!0);else if(o=="word"||o=="group")for(var P=null,K=o=="group",$=e.cm&&e.cm.getHelper(r,"wordChars"),ne=!0;!(a<0&&!M(!ne));ne=!1){var ae=k.text.charAt(r.ch)||`
`,he=le(ae,$)?"w":K&&ae==`
`?"n":!K||/\s/.test(ae)?null:"p";if(K&&!ne&&!he&&(he="s"),P&&P!=he){a<0&&(a=1,M(),r.sticky="after");break}if(he&&(P=he),a>0&&!M(!ne))break}var pe=$o(e,r,f,v,!0);return $e(f,pe)&&(pe.hitSide=!0),pe}function Xc(e,r,a,o){var l=e.doc,f=r.left,v;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Nr(e.display),3);v=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(v=a>0?r.bottom+3:r.top-3);for(var C;!(C=fs(e,f,v),!C.outside);){if(a<0?v<=0:v>=l.height){C.hitSide=!0;break}v+=a*5}return C}var tt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};tt.prototype.init=function(e){var r=this,a=this,o=a.cm,l=a.div=e.lineDiv;Vc(l,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==l)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}Te(l,"paste",function(k){if(!f(k)||st(o,k)||$c(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),Te(l,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),Te(l,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),Te(l,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Te(l,"touchstart",function(){return a.forceCompositionEnd()}),Te(l,"input",function(){r.composing||r.readFromDOMSoon()});function v(k){if(!f(k)||st(o,k))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()}),k.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var x=Kc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,ye),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var C=kn.text.join(`
`);if(k.clipboardData.setData("Text",C),k.clipboardData.getData("Text")==C){k.preventDefault();return}}var M=Yc(),P=M.firstChild;o.display.lineSpace.insertBefore(M,o.display.lineSpace.firstChild),P.value=kn.text.join(`
`);var K=document.activeElement;se(P),setTimeout(function(){o.display.lineSpace.removeChild(M),K.focus(),K==l&&a.showPrimarySelection()},50)}Te(l,"copy",v),Te(l,"cut",v)},tt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},tt.prototype.prepareSelection=function(){var e=Ru(this.cm,!1);return e.focus=document.activeElement==this.div,e},tt.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},tt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},tt.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,a=r.doc.sel.primary(),o=a.from(),l=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||l.line<r.display.viewFrom){e.removeAllRanges();return}var f=Qo(r,e.anchorNode,e.anchorOffset),v=Qo(r,e.focusNode,e.focusOffset);if(f&&!f.bad&&v&&!v.bad&&fe(Yt(f,v),o)==0&&fe(Et(f,v),l)==0)return;var k=r.display.view,x=o.line>=r.display.viewFrom&&Zc(r,o)||{node:k[0].measure.map[2],offset:0},C=l.line<r.display.viewTo&&Zc(r,l);if(!C){var M=k[k.length-1].measure,P=M.maps?M.maps[M.maps.length-1]:M.map;C={node:P[P.length-1],offset:P[P.length-2]-P[P.length-3]}}if(!x||!C){e.removeAllRanges();return}var K=e.rangeCount&&e.getRangeAt(0),$;try{$=j(x.node,x.offset,C.offset,C.node)}catch(ne){}$&&(!i&&r.state.focused?(e.collapse(x.node,x.offset),$.collapsed||(e.removeAllRanges(),e.addRange($))):(e.removeAllRanges(),e.addRange($)),K&&e.anchorNode==null?e.addRange(K):i&&this.startGracePeriod()),this.rememberSelection()},tt.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},tt.prototype.showMultipleSelections=function(e){Z(this.cm.display.cursorDiv,e.cursors),Z(this.cm.display.selectionDiv,e.selection)},tt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},tt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return Q(this.div,r)},tt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},tt.prototype.blur=function(){this.div.blur()},tt.prototype.getField=function(){return this.div},tt.prototype.supportsTouch=function(){return!0},tt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():nn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},tt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},tt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(S&&y&&this.cm.display.gutterSpecs.length&&zy(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var a=Qo(r,e.anchorNode,e.anchorOffset),o=Qo(r,e.focusNode,e.focusOffset);a&&o&&nn(r,function(){jt(r.doc,ir(a,o),ye),(a.bad||o.bad)&&(r.curOp.selectionChanged=!0)})},tt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,a=e.doc.sel.primary(),o=a.from(),l=a.to();if(o.ch==0&&o.line>e.firstLine()&&(o=W(o.line-1,_e(e.doc,o.line-1).length)),l.ch==_e(e.doc,l.line).text.length&&l.line<e.lastLine()&&(l=W(l.line+1,0)),o.line<r.viewFrom||l.line>r.viewTo-1)return!1;var f,v,k;o.line==r.viewFrom||(f=vr(e,o.line))==0?(v=Ve(r.view[0].line),k=r.view[0].node):(v=Ve(r.view[f].line),k=r.view[f-1].node.nextSibling);var x=vr(e,l.line),C,M;if(x==r.view.length-1?(C=r.viewTo-1,M=r.lineDiv.lastChild):(C=Ve(r.view[x+1].line)-1,M=r.view[x+1].node.previousSibling),!k)return!1;for(var P=e.doc.splitLines(Oy(e,k,M,v,C)),K=Tn(e.doc,W(v,0),W(C,_e(e.doc,C).text.length));P.length>1&&K.length>1;)if(Ce(P)==Ce(K))P.pop(),K.pop(),C--;else if(P[0]==K[0])P.shift(),K.shift(),v++;else break;for(var $=0,ne=0,ae=P[0],he=K[0],pe=Math.min(ae.length,he.length);$<pe&&ae.charCodeAt($)==he.charCodeAt($);)++$;for(var ve=Ce(P),me=Ce(K),be=Math.min(ve.length-(P.length==1?$:0),me.length-(K.length==1?$:0));ne<be&&ve.charCodeAt(ve.length-ne-1)==me.charCodeAt(me.length-ne-1);)++ne;if(P.length==1&&K.length==1&&v==o.line)for(;$&&$>o.ch&&ve.charCodeAt(ve.length-ne-1)==me.charCodeAt(me.length-ne-1);)$--,ne++;P[P.length-1]=ve.slice(0,ve.length-ne).replace(/^\u200b+/,""),P[0]=P[0].slice($).replace(/\u200b+$/,"");var Le=W(v,$),Ee=W(C,K.length?Ce(K).length-ne:0);if(P.length>1||P[0]||fe(Le,Ee))return Kr(e.doc,P,Le,Ee,"+input"),!0},tt.prototype.ensurePolled=function(){this.forceCompositionEnd()},tt.prototype.reset=function(){this.forceCompositionEnd()},tt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},tt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},tt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return Xt(e.cm)})},tt.prototype.setUneditable=function(e){e.contentEditable="false"},tt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Bs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},tt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},tt.prototype.onContextMenu=function(){},tt.prototype.resetPosition=function(){},tt.prototype.needsContentAttribute=!0;function Zc(e,r){var a=us(e,r.line);if(!a||a.hidden)return null;var o=_e(e.doc,r.line),l=_u(a,o,r.line),f=Ot(o,e.doc.direction),v="left";if(f){var k=Ye(f,r.ch);v=k%2?"right":"left"}var x=Eu(l.map,r.ch,v);return x.offset=x.collapse=="right"?x.end:x.start,x}function zy(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Qr(e,r){return r&&(e.bad=!0),e}function Oy(e,r,a,o,l){var f="",v=!1,k=e.doc.lineSeparator(),x=!1;function C($){return function(ne){return ne.id==$}}function M(){v&&(f+=k,x&&(f+=k),v=x=!1)}function P($){$&&(M(),f+=$)}function K($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){P(ne);return}var ae=$.getAttribute("cm-marker"),he;if(ae){var pe=e.findMarks(W(o,0),W(l+1,0),C(+ae));pe.length&&(he=pe[0].find(0))&&P(Tn(e.doc,he.from,he.to).join(k));return}if($.getAttribute("contenteditable")=="false")return;var ve=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;ve&&M();for(var me=0;me<$.childNodes.length;me++)K($.childNodes[me]);/^(pre|p)$/i.test($.nodeName)&&(x=!0),ve&&(v=!0)}else $.nodeType==3&&P($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(K(r),r==a);)r=r.nextSibling,x=!1;return f}function Qo(e,r,a){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[a],!o)return Qr(e.clipPos(W(e.display.viewTo-1)),!0);r=null,a=0}else for(o=r;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var l=0;l<e.display.view.length;l++){var f=e.display.view[l];if(f.node==o)return Ry(f,r,a)}}function Ry(e,r,a){var o=e.text.firstChild,l=!1;if(!r||!Q(o,r))return Qr(W(Ve(e.line),0),!0);if(r==o&&(l=!0,r=o.childNodes[a],a=0,!r)){var f=e.rest?Ce(e.rest):e.line;return Qr(W(Ve(f),f.text.length),l)}var v=r.nodeType==3?r:null,k=r;for(!v&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(v=r.firstChild,a&&(a=v.nodeValue.length));k.parentNode!=o;)k=k.parentNode;var x=e.measure,C=x.maps;function M(he,pe,ve){for(var me=-1;me<(C?C.length:0);me++)for(var be=me<0?x.map:C[me],Le=0;Le<be.length;Le+=3){var Ee=be[Le+2];if(Ee==he||Ee==pe){var Ne=Ve(me<0?e.line:e.rest[me]),it=be[Le]+ve;return(ve<0||Ee!=he)&&(it=be[Le+(ve?1:0)]),W(Ne,it)}}}var P=M(v,k,a);if(P)return Qr(P,l);for(var K=k.nextSibling,$=v?v.nodeValue.length-a:0;K;K=K.nextSibling){if(P=M(K,K.firstChild,0),P)return Qr(W(P.line,P.ch-$),l);$+=K.textContent.length}for(var ne=k.previousSibling,ae=a;ne;ne=ne.previousSibling){if(P=M(ne,ne.firstChild,-1),P)return Qr(W(P.line,P.ch+ae),l);ae+=ne.textContent.length}}var vt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ce,this.hasSelection=!1,this.composing=null};vt.prototype.init=function(e){var r=this,a=this,o=this.cm;this.createField(e);var l=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),E&&(l.style.width="0px"),Te(l,"input",function(){d&&h>=9&&r.hasSelection&&(r.hasSelection=null),a.poll()}),Te(l,"paste",function(v){if(st(o,v)||$c(v,o))return;o.state.pasteIncoming=+new Date,a.fastPoll()});function f(v){if(st(o,v))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var k=Kc(o);Zo({lineWise:!0,text:k.text}),v.type=="cut"?o.setSelections(k.ranges,null,ye):(a.prevInput="",l.value=k.text.join(`
`),se(l))}else return;v.type=="cut"&&(o.state.cutIncoming=+new Date)}Te(l,"cut",f),Te(l,"copy",f),Te(e.scroller,"paste",function(v){if(Gn(e,v)||st(o,v))return;if(!l.dispatchEvent){o.state.pasteIncoming=+new Date,a.focus();return}var k=new Event("paste");k.clipboardData=v.clipboardData,l.dispatchEvent(k)}),Te(e.lineSpace,"selectstart",function(v){Gn(e,v)||St(v)}),Te(l,"compositionstart",function(){var v=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:v,range:o.markText(v,o.getCursor("to"),{className:"CodeMirror-composing"})}}),Te(l,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},vt.prototype.createField=function(e){this.wrapper=Yc(),this.textarea=this.wrapper.firstChild},vt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},vt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var l=yn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),v=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,l.top+v.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,l.left+v.left-f.left))}return o},vt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Z(a.cursorDiv,e.cursors),Z(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},vt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var a=r.getSelection();this.textarea.value=a,r.state.focused&&se(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},vt.prototype.getField=function(){return this.textarea},vt.prototype.supportsTouch=function(){return!1},vt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},vt.prototype.blur=function(){this.textarea.blur()},vt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vt.prototype.receivedFocus=function(){this.slowPoll()},vt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},vt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function a(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,a)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,a)},vt.prototype.poll=function(){var e=this,r=this.cm,a=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||An(a)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var l=a.value;if(l==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===l||A&&/[\uf700-\uf7ff]/.test(l))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=l.charCodeAt(0);if(f==8203&&!o&&(o=""),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var v=0,k=Math.min(o.length,l.length);v<k&&o.charCodeAt(v)==l.charCodeAt(v);)++v;return nn(r,function(){Bs(r,l.slice(v),o.length-v,null,e.composing?"*compose":null),l.length>1e3||l.indexOf(`
`)>-1?a.value=e.prevInput="":e.prevInput=l,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},vt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},vt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,l=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),v=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,jt)(a.doc,ir(f),ye);var x=l.style.cssText,C=r.wrapper.style.cssText,M=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",l.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-M.top-5)+"px; left: "+(e.clientX-M.left-5)+`px;
z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var P;p&&(P=window.scrollY),o.input.focus(),p&&window.scrollTo(null,P),o.input.reset(),a.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function K(){if(l.selectionStart!=null){var ae=a.somethingSelected(),he=""+(ae?l.value:"");l.value="⇚",l.value=he,r.prevInput=ae?"":"",l.selectionStart=1,l.selectionEnd=he.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=C,l.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=v),l.selectionStart!=null){(!d||d&&h<9)&&K();var ae=0,he=function(){o.selForContextMenu==a.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput==""?Lt(a,mc)(a):ae++<10?o.detectingSelectAll=setTimeout(he,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(he,200)}}if(d&&h>=9&&K(),G){Bt(e);var ne=function(){Be(window,"mouseup",ne),setTimeout($,20)};Te(window,"mouseup",ne)}else setTimeout($,50)},vt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},vt.prototype.setUneditable=function(){},vt.prototype.needsContentAttribute=!1;function Py(e,r){if(r=r?T(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=q();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var l;if(e.form&&(Te(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;l=f.submit;try{var v=f.submit=function(){o(),f.submit=l,f.submit(),f.submit=v}}catch(x){}}r.finishInit=function(x){x.save=o,x.getTextArea=function(){return e},x.toTextArea=function(){x.toTextArea=isNaN,o(),e.parentNode.removeChild(x.getWrapperElement()),e.style.display="",e.form&&(Be(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var k=ut(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Ny(e){e.off=Be,e.on=Te,e.wheelEventPixels=Gb,e.Doc=Zt,e.splitLines=Dn,e.countColumn=de,e.findColumn=De,e.isWordChar=X,e.Pass=Oe,e.signal=dt,e.Line=Or,e.changeEnd=or,e.scrollbarModel=$u,e.Pos=W,e.cmpPos=fe,e.modes=bi,e.mimeModes=jn,e.resolveMode=Hn,e.getMode=yi,e.modeExtensions=Un,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=zr,e.commands=Ui,e.keyMap=Kn,e.keyName=Ic,e.isModifierKey=Tc,e.lookupKey=Yr,e.normalizeKeyMap=py,e.StringStream=lt,e.SharedTextMarker=Bi,e.TextMarker=sr,e.LineWidget=Ni,e.e_preventDefault=St,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=I,e.contains=Q,e.rmClass=J,e.keyNames=lr}Ly(ut),qy(ut);var By="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&oe(By,Jo)<0&&(ut.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Jn(Zt),ut.inputStyles={textarea:vt,contenteditable:tt},ut.defineMode=function(e){!ut.defaults.mode&&e!="null"&&(ut.defaults.mode=e),qr.apply(this,arguments)},ut.defineMIME=bn,ut.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ut.defineMIME("text/plain","null"),ut.defineExtension=function(e,r){ut.prototype[e]=r},ut.defineDocExtension=function(e,r){Zt.prototype[e]=r},ut.fromTextArea=Py,Ny(ut),ut.version="5.58.1",ut})});var Ks=ue((Vi,Gs)=>{!function(t,n){typeof Vi=="object"&&typeof Gs=="object"?Gs.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Vi=="object"?Vi.ClipboardJS=n():t.ClipboardJS=n()}(Vi,function(){return i={},t.m=n=[function(s,u){s.exports=function(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var h=c.hasAttribute("readonly");h||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var p=window.getSelection(),g=document.createRange();g.selectNodeContents(c),p.removeAllRanges(),p.addRange(g),d=p.toString()}return d}},function(s,u){function c(){}c.prototype={on:function(d,h,p){var g=this.e||(this.e={});return(g[d]||(g[d]=[])).push({fn:h,ctx:p}),this},once:function(d,h,p){var g=this;function y(){g.off(d,y),h.apply(p,arguments)}return y._=h,this.on(d,y,p)},emit:function(d){for(var h=[].slice.call(arguments,1),p=((this.e||(this.e={}))[d]||[]).slice(),g=0,y=p.length;g<y;g++)p[g].fn.apply(p[g].ctx,h);return this},off:function(d,h){var p=this.e||(this.e={}),g=p[d],y=[];if(g&&h)for(var m=0,b=g.length;m<b;m++)g[m].fn!==h&&g[m].fn._!==h&&y.push(g[m]);return y.length?p[d]=y:delete p[d],this}},s.exports=c,s.exports.TinyEmitter=c},function(s,u,c){var d=c(3),h=c(4);s.exports=function(p,g,y){if(!p&&!g&&!y)throw new Error("Missing required arguments");if(!d.string(g))throw new TypeError("Second argument must be a String");if(!d.fn(y))throw new TypeError("Third argument must be a Function");if(d.node(p))return A=g,R=y,(z=p).addEventListener(A,R),{destroy:function(){z.removeEventListener(A,R)}};if(d.nodeList(p))return D=p,E=g,S=y,Array.prototype.forEach.call(D,function(U){U.addEventListener(E,S)}),{destroy:function(){Array.prototype.forEach.call(D,function(U){U.removeEventListener(E,S)})}};if(d.string(p))return m=p,b=g,w=y,h(document.body,m,b,w);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var m,b,w,D,E,S,z,A,R}},function(s,u){u.node=function(c){return c!==void 0&&c instanceof HTMLElement&&c.nodeType===1},u.nodeList=function(c){var d=Object.prototype.toString.call(c);return c!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in c&&(c.length===0||u.node(c[0]))},u.string=function(c){return typeof c=="string"||c instanceof String},u.fn=function(c){return Object.prototype.toString.call(c)==="[object Function]"}},function(s,u,c){var d=c(5);function h(p,g,y,m,b){var w=function(D,E,S,z){return function(A){A.delegateTarget=d(A.target,E),A.delegateTarget&&z.call(D,A)}}.apply(this,arguments);return p.addEventListener(y,w,b),{destroy:function(){p.removeEventListener(y,w,b)}}}s.exports=function(p,g,y,m,b){return typeof p.addEventListener=="function"?h.apply(null,arguments):typeof y=="function"?h.bind(null,document).apply(null,arguments):(typeof p=="string"&&(p=document.querySelectorAll(p)),Array.prototype.map.call(p,function(w){return h(w,g,y,m,b)}))}},function(s,u){if(typeof Element!="undefined"&&!Element.prototype.matches){var c=Element.prototype;c.matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector}s.exports=function(d,h){for(;d&&d.nodeType!==9;){if(typeof d.matches=="function"&&d.matches(h))return d;d=d.parentNode}}},function(s,u,c){"use strict";c.r(u);var d=c(0),h=c.n(d),p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B};function g(B,G){for(var ee=0;ee<G.length;ee++){var J=G[ee];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}function y(B){!function(G,ee){if(!(G instanceof ee))throw new TypeError("Cannot call a class as a function")}(this,y),this.resolveOptions(B),this.initSelection()}var m=(function(B,G,ee){return G&&g(B.prototype,G),ee&&g(B,ee),B}(y,[{key:"resolveOptions",value:function(B){var G=0<arguments.length&&B!==void 0?B:{};this.action=G.action,this.container=G.container,this.emitter=G.emitter,this.target=G.target,this.text=G.text,this.trigger=G.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var B=this,G=document.documentElement.getAttribute("dir")=="rtl";this.removeFake(),this.fakeHandlerCallback=function(){return B.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[G?"right":"left"]="-9999px";var ee=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=ee+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=h()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=h()(this.target),this.copyText()}},{key:"copyText",value:function(){var B=void 0;try{B=document.execCommand(this.action)}catch(G){B=!1}this.handleResult(B)}},{key:"handleResult",value:function(B){this.emitter.emit(B?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(B){var G=0<arguments.length&&B!==void 0?B:"copy";if(this._action=G,this._action!=="copy"&&this._action!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(B){if(B!==void 0){if(!B||(B===void 0?"undefined":p(B))!=="object"||B.nodeType!==1)throw new Error('Invalid "target" value, use a valid Element');if(this.action==="copy"&&B.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(this.action==="cut"&&(B.hasAttribute("readonly")||B.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);this._target=B}},get:function(){return this._target}}]),y),b=c(1),w=c.n(b),D=c(2),E=c.n(D),S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},z=function(B,G,ee){return G&&A(B.prototype,G),ee&&A(B,ee),B};function A(B,G){for(var ee=0;ee<G.length;ee++){var J=G[ee];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(B,J.key,J)}}var R=(function(B,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);B.prototype=Object.create(G&&G.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(B,G):B.__proto__=G)}(U,w.a),z(U,[{key:"resolveOptions",value:function(B){var G=0<arguments.length&&B!==void 0?B:{};this.action=typeof G.action=="function"?G.action:this.defaultAction,this.target=typeof G.target=="function"?G.target:this.defaultTarget,this.text=typeof G.text=="function"?G.text:this.defaultText,this.container=S(G.container)==="object"?G.container:document.body}},{key:"listenClick",value:function(B){var G=this;this.listener=E()(B,"click",function(ee){return G.onClick(ee)})}},{key:"onClick",value:function(B){var G=B.delegateTarget||B.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new m({action:this.action(G),target:this.target(G),text:this.text(G),container:this.container,trigger:G,emitter:this})}},{key:"defaultAction",value:function(B){return Y("action",B)}},{key:"defaultTarget",value:function(B){var G=Y("target",B);if(G)return document.querySelector(G)}},{key:"defaultText",value:function(B){return Y("text",B)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(B){var G=0<arguments.length&&B!==void 0?B:["copy","cut"],ee=typeof G=="string"?[G]:G,J=!!document.queryCommandSupported;return ee.forEach(function(O){J=J&&!!document.queryCommandSupported(O)}),J}}]),U);function U(B,G){!function(J,O){if(!(J instanceof O))throw new TypeError("Cannot call a class as a function")}(this,U);var ee=function(J,O){if(!J)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!O||typeof O!="object"&&typeof O!="function"?J:O}(this,(U.__proto__||Object.getPrototypeOf(U)).call(this));return ee.resolveOptions(G),ee.listenClick(B),ee}function Y(B,G){var ee="data-clipboard-"+B;if(G.hasAttribute(ee))return G.getAttribute(ee)}u.default=R}],t.c=i,t.d=function(s,u,c){t.o(s,u)||Object.defineProperty(s,u,{enumerable:!0,get:c})},t.r=function(s){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},t.t=function(s,u){if(1&u&&(s=t(s)),8&u)return s;if(4&u&&typeof s=="object"&&s&&s.__esModule)return s;var c=Object.create(null);if(t.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:s}),2&u&&typeof s!="string")for(var d in s)t.d(c,d,function(h){return s[h]}.bind(null,d));return c},t.n=function(s){var u=s&&s.__esModule?function(){return s.default}:function(){return s};return t.d(u,"a",u),u},t.o=function(s,u){return Object.prototype.hasOwnProperty.call(s,u)},t.p="",t(t.s=6).default;function t(s){if(i[s])return i[s].exports;var u=i[s]={i:s,l:!1,exports:{}};return n[s].call(u.exports,u,u.exports,t),u.l=!0,u.exports}var n,i})});var Vs=ue((Jc,ed)=>{(function(t){typeof Jc=="object"&&typeof ed=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("css",function(ee,J){var O=J.inline;J.propertyKeywords||(J=t.resolveMode("text/css"));var Z=ee.indentUnit,_=J.tokenHooks,V=J.documentTypes||{},j=J.mediaTypes||{},Q=J.mediaFeatures||{},q=J.mediaValueKeywords||{},I=J.propertyKeywords||{},H=J.nonStandardPropertyKeywords||{},se=J.fontProperties||{},F=J.counterDescriptors||{},T=J.colorKeywords||{},de=J.valueKeywords||{},ce=J.allowNested,oe=J.lineComment,xe=J.supportsAtComponent===!0,Oe,ye;function re(X,le){return Oe=le,X}function we(X,le){var te=X.next();if(_[te]){var He=_[te](X,le);if(He!==!1)return He}if(te=="@")return X.eatWhile(/[\w\\\-]/),re("def",X.current());if(te=="="||(te=="~"||te=="|")&&X.eat("="))return re(null,"compare");if(te=='"'||te=="'")return le.tokenize=De(te),le.tokenize(X,le);if(te=="#")return X.eatWhile(/[\w\\\-]/),re("atom","hash");if(te=="!")return X.match(/^\s*\w*/),re("keyword","important");if(/\d/.test(te)||te=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),re("number","unit");if(te==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),re("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?re("variable-2","variable-definition"):re("variable-2","variable");if(X.match(/^\w+-/))return re("meta","meta")}else return/[,+>*\/]/.test(te)?re(null,"select-op"):te=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?re("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(te)?re(null,te):X.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(X.current().toLowerCase())&&(le.tokenize=Pe),re("variable callee","variable")):/[\w\\\-]/.test(te)?(X.eatWhile(/[\w\\\-]/),re("property","word")):re(null,null)}function De(X){return function(le,te){for(var He=!1,Ct;(Ct=le.next())!=null;){if(Ct==X&&!He){X==")"&&le.backUp(1);break}He=!He&&Ct=="\\"}return(Ct==X||!He&&X!=")")&&(te.tokenize=null),re("string","string")}}function Pe(X,le){return X.next(),X.match(/\s*[\"\')]/,!1)?le.tokenize=null:le.tokenize=De(")"),re(null,"(")}function rt(X,le,te){this.type=X,this.indent=le,this.prev=te}function Ce(X,le,te,He){return X.context=new rt(te,le.indentation()+(He===!1?0:Z),X.context),te}function nt(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function mt(X,le,te){return qe[te.context.type](X,le,te)}function gt(X,le,te,He){for(var Ct=He||1;Ct>0;Ct--)te.context=te.context.prev;return mt(X,le,te)}function Wt(X){var le=X.current().toLowerCase();de.hasOwnProperty(le)?ye="atom":T.hasOwnProperty(le)?ye="keyword":ye="variable"}var qe={};return qe.top=function(X,le,te){if(X=="{")return Ce(te,le,"block");if(X=="}"&&te.context.prev)return nt(te);if(xe&&/@component/i.test(X))return Ce(te,le,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return Ce(te,le,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return Ce(te,le,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return te.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return Ce(te,le,"at");if(X=="hash")ye="builtin";else if(X=="word")ye="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return Ce(te,le,"interpolation");if(X==":")return"pseudo";if(ce&&X=="(")return Ce(te,le,"parens")}return te.context.type},qe.block=function(X,le,te){if(X=="word"){var He=le.current().toLowerCase();return I.hasOwnProperty(He)?(ye="property","maybeprop"):H.hasOwnProperty(He)?(ye="string-2","maybeprop"):ce?(ye=le.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ye+=" error","maybeprop")}else return X=="meta"?"block":!ce&&(X=="hash"||X=="qualifier")?(ye="error","block"):qe.top(X,le,te)},qe.maybeprop=function(X,le,te){return X==":"?Ce(te,le,"prop"):mt(X,le,te)},qe.prop=function(X,le,te){if(X==";")return nt(te);if(X=="{"&&ce)return Ce(te,le,"propBlock");if(X=="}"||X=="{")return gt(X,le,te);if(X=="(")return Ce(te,le,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(le.current()))ye+=" error";else if(X=="word")Wt(le);else if(X=="interpolation")return Ce(te,le,"interpolation");return"prop"},qe.propBlock=function(X,le,te){return X=="}"?nt(te):X=="word"?(ye="property","maybeprop"):te.context.type},qe.parens=function(X,le,te){return X=="{"||X=="}"?gt(X,le,te):X==")"?nt(te):X=="("?Ce(te,le,"parens"):X=="interpolation"?Ce(te,le,"interpolation"):(X=="word"&&Wt(le),"parens")},qe.pseudo=function(X,le,te){return X=="meta"?"pseudo":X=="word"?(ye="variable-3",te.context.type):mt(X,le,te)},qe.documentTypes=function(X,le,te){return X=="word"&&V.hasOwnProperty(le.current())?(ye="tag",te.context.type):qe.atBlock(X,le,te)},qe.atBlock=function(X,le,te){if(X=="(")return Ce(te,le,"atBlock_parens");if(X=="}"||X==";")return gt(X,le,te);if(X=="{")return nt(te)&&Ce(te,le,ce?"block":"top");if(X=="interpolation")return Ce(te,le,"interpolation");if(X=="word"){var He=le.current().toLowerCase();He=="only"||He=="not"||He=="and"||He=="or"?ye="keyword":j.hasOwnProperty(He)?ye="attribute":Q.hasOwnProperty(He)?ye="property":q.hasOwnProperty(He)?ye="keyword":I.hasOwnProperty(He)?ye="property":H.hasOwnProperty(He)?ye="string-2":de.hasOwnProperty(He)?ye="atom":T.hasOwnProperty(He)?ye="keyword":ye="error"}return te.context.type},qe.atComponentBlock=function(X,le,te){return X=="}"?gt(X,le,te):X=="{"?nt(te)&&Ce(te,le,ce?"block":"top",!1):(X=="word"&&(ye="error"),te.context.type)},qe.atBlock_parens=function(X,le,te){return X==")"?nt(te):X=="{"||X=="}"?gt(X,le,te,2):qe.atBlock(X,le,te)},qe.restricted_atBlock_before=function(X,le,te){return X=="{"?Ce(te,le,"restricted_atBlock"):X=="word"&&te.stateArg=="@counter-style"?(ye="variable","restricted_atBlock_before"):mt(X,le,te)},qe.restricted_atBlock=function(X,le,te){return X=="}"?(te.stateArg=null,nt(te)):X=="word"?(te.stateArg=="@font-face"&&!se.hasOwnProperty(le.current().toLowerCase())||te.stateArg=="@counter-style"&&!F.hasOwnProperty(le.current().toLowerCase())?ye="error":ye="property","maybeprop"):"restricted_atBlock"},qe.keyframes=function(X,le,te){return X=="word"?(ye="variable","keyframes"):X=="{"?Ce(te,le,"top"):mt(X,le,te)},qe.at=function(X,le,te){return X==";"?nt(te):X=="{"||X=="}"?gt(X,le,te):(X=="word"?ye="tag":X=="hash"&&(ye="builtin"),"at")},qe.interpolation=function(X,le,te){return X=="}"?nt(te):X=="{"||X==";"?gt(X,le,te):(X=="word"?ye="variable":X!="variable"&&X!="("&&X!=")"&&(ye="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:O?"block":"top",stateArg:null,context:new rt(O?"block":"top",X||0,null)}},token:function(X,le){if(!le.tokenize&&X.eatSpace())return null;var te=(le.tokenize||we)(X,le);return te&&typeof te=="object"&&(Oe=te[1],te=te[0]),ye=te,Oe!="comment"&&(le.state=qe[le.state](Oe,X,le)),ye},indent:function(X,le){var te=X.context,He=le&&le.charAt(0),Ct=te.indent;return te.type=="prop"&&(He=="}"||He==")")&&(te=te.prev),te.prev&&(He=="}"&&(te.type=="block"||te.type=="top"||te.type=="interpolation"||te.type=="restricted_atBlock")?(te=te.prev,Ct=te.indent):(He==")"&&(te.type=="parens"||te.type=="atBlock_parens")||He=="{"&&(te.type=="at"||te.type=="atBlock"))&&(Ct=Math.max(0,te.indent-Z))),Ct},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:oe,fold:"brace"}});function n(ee){for(var J={},O=0;O<ee.length;++O)J[ee[O].toLowerCase()]=!0;return J}var i=["domain","regexp","url","url-prefix"],s=n(i),u=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],c=n(u),d=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],h=n(d),p=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],g=n(p),y=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],m=n(y),b=["border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],w=n(b),D=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E=n(D),S=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],z=n(S),A=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],R=n(A),U=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],Y=n(U),B=i.concat(u).concat(d).concat(p).concat(y).concat(b).concat(A).concat(U);t.registerHelper("hintWords","css",B);function G(ee,J){for(var O=!1,Z;(Z=ee.next())!=null;){if(O&&Z=="/"){J.tokenize=null;break}O=Z=="*"}return["comment","comment"]}t.defineMIME("text/css",{documentTypes:s,mediaTypes:c,mediaFeatures:h,mediaValueKeywords:g,propertyKeywords:m,nonStandardPropertyKeywords:w,fontProperties:E,counterDescriptors:z,colorKeywords:R,valueKeywords:Y,tokenHooks:{"/":function(ee,J){return ee.eat("*")?(J.tokenize=G,G(ee,J)):!1}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:c,mediaFeatures:h,mediaValueKeywords:g,propertyKeywords:m,nonStandardPropertyKeywords:w,colorKeywords:R,valueKeywords:Y,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ee,J){return ee.eat("/")?(ee.skipToEnd(),["comment","comment"]):ee.eat("*")?(J.tokenize=G,G(ee,J)):["operator","operator"]},":":function(ee){return ee.match(/\s*\{/,!1)?[null,null]:!1},$:function(ee){return ee.match(/^[\w-]+/),ee.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(ee){return ee.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:c,mediaFeatures:h,mediaValueKeywords:g,propertyKeywords:m,nonStandardPropertyKeywords:w,colorKeywords:R,valueKeywords:Y,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(ee,J){return ee.eat("/")?(ee.skipToEnd(),["comment","comment"]):ee.eat("*")?(J.tokenize=G,G(ee,J)):["operator","operator"]},"@":function(ee){return ee.eat("{")?[null,"interpolation"]:ee.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(ee.eatWhile(/[\w\\\-]/),ee.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:s,mediaTypes:c,mediaFeatures:h,propertyKeywords:m,nonStandardPropertyKeywords:w,fontProperties:E,counterDescriptors:z,colorKeywords:R,valueKeywords:Y,supportsAtComponent:!0,tokenHooks:{"/":function(ee,J){return ee.eat("*")?(J.tokenize=G,G(ee,J)):!1}},name:"css",helperType:"gss"})})});var Ys=ue((td,nd)=>{(function(t){typeof td=="object"&&typeof nd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(q,I,H,se,F,T){this.indented=q,this.column=I,this.type=H,this.info=se,this.align=F,this.prev=T}function i(q,I,H,se){var F=q.indented;return q.context&&q.context.type=="statement"&&H!="statement"&&(F=q.context.indented),q.context=new n(F,I,H,se,null,q.context)}function s(q){var I=q.context.type;return(I==")"||I=="]"||I=="}")&&(q.indented=q.context.indented),q.context=q.context.prev}function u(q,I,H){if(I.prevToken=="variable"||I.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(q.string.slice(0,H)))return!0;if(I.typeAtEndOfLine&&q.column()==q.indentation())return!0}function c(q){for(;;){if(!q||q.type=="top")return!0;if(q.type=="}"&&q.prev.info!="namespace")return!1;q=q.prev}}t.defineMode("clike",function(q,I){var H=q.indentUnit,se=I.statementIndentUnit||H,F=I.dontAlignCalls,T=I.keywords||{},de=I.types||{},ce=I.builtin||{},oe=I.blockKeywords||{},xe=I.defKeywords||{},Oe=I.atoms||{},ye=I.hooks||{},re=I.multiLineStrings,we=I.indentStatements!==!1,De=I.indentSwitch!==!1,Pe=I.namespaceSeparator,rt=I.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Ce=I.numberStart||/[\d\.]/,nt=I.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,mt=I.isOperatorChar||/[+\-*&%=<>!?|\/]/,gt=I.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Wt=I.isReservedIdentifier||!1,qe,X;function le(Ae,Fe){var ke=Ae.next();if(ye[ke]){var Ie=ye[ke](Ae,Fe);if(Ie!==!1)return Ie}if(ke=='"'||ke=="'")return Fe.tokenize=te(ke),Fe.tokenize(Ae,Fe);if(rt.test(ke))return qe=ke,null;if(Ce.test(ke)){if(Ae.backUp(1),Ae.match(nt))return"number";Ae.next()}if(ke=="/"){if(Ae.eat("*"))return Fe.tokenize=He,He(Ae,Fe);if(Ae.eat("/"))return Ae.skipToEnd(),"comment"}if(mt.test(ke)){for(;!Ae.match(/^\/[\/*]/,!1)&&Ae.eat(mt););return"operator"}if(Ae.eatWhile(gt),Pe)for(;Ae.match(Pe);)Ae.eatWhile(gt);var Ye=Ae.current();return h(T,Ye)?(h(oe,Ye)&&(qe="newstatement"),h(xe,Ye)&&(X=!0),"keyword"):h(de,Ye)?"type":h(ce,Ye)||Wt&&Wt(Ye)?(h(oe,Ye)&&(qe="newstatement"),"builtin"):h(Oe,Ye)?"atom":"variable"}function te(Ae){return function(Fe,ke){for(var Ie=!1,Ye,hn=!1;(Ye=Fe.next())!=null;){if(Ye==Ae&&!Ie){hn=!0;break}Ie=!Ie&&Ye=="\\"}return(hn||!(Ie||re))&&(ke.tokenize=null),"string"}}function He(Ae,Fe){for(var ke=!1,Ie;Ie=Ae.next();){if(Ie=="/"&&ke){Fe.tokenize=null;break}ke=Ie=="*"}return"comment"}function Ct(Ae,Fe){I.typeFirstDefinitions&&Ae.eol()&&c(Fe.context)&&(Fe.typeAtEndOfLine=u(Ae,Fe,Ae.pos))}return{startState:function(Ae){return{tokenize:null,context:new n((Ae||0)-H,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ae,Fe){var ke=Fe.context;if(Ae.sol()&&(ke.align==null&&(ke.align=!1),Fe.indented=Ae.indentation(),Fe.startOfLine=!0),Ae.eatSpace())return Ct(Ae,Fe),null;qe=X=null;var Ie=(Fe.tokenize||le)(Ae,Fe);if(Ie=="comment"||Ie=="meta")return Ie;if(ke.align==null&&(ke.align=!0),qe==";"||qe==":"||qe==","&&Ae.match(/^\s*(?:\/\/.*)?$/,!1))for(;Fe.context.type=="statement";)s(Fe);else if(qe=="{")i(Fe,Ae.column(),"}");else if(qe=="[")i(Fe,Ae.column(),"]");else if(qe=="(")i(Fe,Ae.column(),")");else if(qe=="}"){for(;ke.type=="statement";)ke=s(Fe);for(ke.type=="}"&&(ke=s(Fe));ke.type=="statement";)ke=s(Fe)}else qe==ke.type?s(Fe):we&&((ke.type=="}"||ke.type=="top")&&qe!=";"||ke.type=="statement"&&qe=="newstatement")&&i(Fe,Ae.column(),"statement",Ae.current());if(Ie=="variable"&&(Fe.prevToken=="def"||I.typeFirstDefinitions&&u(Ae,Fe,Ae.start)&&c(Fe.context)&&Ae.match(/^\s*\(/,!1))&&(Ie="def"),ye.token){var Ye=ye.token(Ae,Fe,Ie);Ye!==void 0&&(Ie=Ye)}return Ie=="def"&&I.styleDefs===!1&&(Ie="variable"),Fe.startOfLine=!1,Fe.prevToken=X?"def":Ie||qe,Ct(Ae,Fe),Ie},indent:function(Ae,Fe){if(Ae.tokenize!=le&&Ae.tokenize!=null||Ae.typeAtEndOfLine)return t.Pass;var ke=Ae.context,Ie=Fe&&Fe.charAt(0),Ye=Ie==ke.type;if(ke.type=="statement"&&Ie=="}"&&(ke=ke.prev),I.dontIndentStatements)for(;ke.type=="statement"&&I.dontIndentStatements.test(ke.info);)ke=ke.prev;if(ye.indent){var hn=ye.indent(Ae,ke,Fe,H);if(typeof hn=="number")return hn}var Ot=ke.prev&&ke.prev.info=="switch";if(I.allmanIndentation&&/[{(]/.test(Ie)){for(;ke.type!="top"&&ke.type!="}";)ke=ke.prev;return ke.indented}return ke.type=="statement"?ke.indented+(Ie=="{"?0:se):ke.align&&(!F||ke.type!=")")?ke.column+(Ye?0:1):ke.type==")"&&!Ye?ke.indented+se:ke.indented+(Ye?0:H)+(!Ye&&Ot&&!/^(?:case|default)\b/.test(Fe)?H:0)},electricInput:De?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function d(q){for(var I={},H=q.split(" "),se=0;se<H.length;++se)I[H[se]]=!0;return I}function h(q,I){return typeof q=="function"?q(I):q.propertyIsEnumerable(I)}var p="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",g="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",y="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",m="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",b=d("int long char short double float unsigned signed void bool"),w=d("SEL instancetype id Class Protocol BOOL");function D(q){return h(b,q)||/.+_t$/.test(q)}function E(q){return D(q)||h(w,q)}var S="case do else for if switch while struct enum union",z="struct enum union";function A(q,I){if(!I.startOfLine)return!1;for(var H,se=null;H=q.peek();){if(H=="\\"&&q.match(/^.$/)){se=A;break}else if(H=="/"&&q.match(/^\/[\/\*]/,!1))break;q.next()}return I.tokenize=se,"meta"}function R(q,I){return I.prevToken=="type"?"type":!1}function U(q){return!q||q.length<2||q[0]!="_"?!1:q[1]=="_"||q[1]!==q[1].toLowerCase()}function Y(q){return q.eatWhile(/[\w\.']/),"number"}function B(q,I){if(q.backUp(1),q.match(/(R|u8R|uR|UR|LR)/)){var H=q.match(/"([^\s\\()]{0,16})\(/);return H?(I.cpp11RawStringDelim=H[1],I.tokenize=J,J(q,I)):!1}return q.match(/(u8|u|U|L)/)?q.match(/["']/,!1)?"string":!1:(q.next(),!1)}function G(q){var I=/(\w+)::~?(\w+)$/.exec(q);return I&&I[1]==I[2]}function ee(q,I){for(var H;(H=q.next())!=null;)if(H=='"'&&!q.eat('"')){I.tokenize=null;break}return"string"}function J(q,I){var H=I.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),se=q.match(new RegExp(".*?\\)"+H+'"'));return se?I.tokenize=null:q.skipToEnd(),"string"}function O(q,I){typeof q=="string"&&(q=[q]);var H=[];function se(T){if(T)for(var de in T)T.hasOwnProperty(de)&&H.push(de)}se(I.keywords),se(I.types),se(I.builtin),se(I.atoms),H.length&&(I.helperType=q[0],t.registerHelper("hintWords",q[0],H));for(var F=0;F<q.length;++F)t.defineMIME(q[F],I)}O(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:d(p),types:D,blockKeywords:d(S),defKeywords:d(z),typeFirstDefinitions:!0,atoms:d("NULL true false"),isReservedIdentifier:U,hooks:{"#":A,"*":R},modeProps:{fold:["brace","include"]}}),O(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:d(p+" "+g),types:D,blockKeywords:d(S+" class try catch"),defKeywords:d(z+" class namespace"),typeFirstDefinitions:!0,atoms:d("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:U,hooks:{"#":A,"*":R,u:B,U:B,L:B,R:B,"0":Y,"1":Y,"2":Y,"3":Y,"4":Y,"5":Y,"6":Y,"7":Y,"8":Y,"9":Y,token:function(q,I,H){if(H=="variable"&&q.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&G(q.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),O("text/x-java",{name:"clike",keywords:d("abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:d("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:d("catch class do else finally for if switch try while"),defKeywords:d("class interface enum @interface"),typeFirstDefinitions:!0,atoms:d("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(q){return q.match("interface",!1)?!1:(q.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),O("text/x-csharp",{name:"clike",keywords:d("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:d("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:d("catch class do else finally for foreach if struct switch try while"),defKeywords:d("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"@":function(q,I){return q.eat('"')?(I.tokenize=ee,ee(q,I)):(q.eatWhile(/[\w\$_]/),"meta")}}});function Z(q,I){for(var H=!1;!q.eol();){if(!H&&q.match('"""')){I.tokenize=null;break}H=q.next()=="\\"&&!H}return"string"}function _(q){return function(I,H){for(var se;se=I.next();)if(se=="*"&&I.eat("/"))if(q==1){H.tokenize=null;break}else return H.tokenize=_(q-1),H.tokenize(I,H);else if(se=="/"&&I.eat("*"))return H.tokenize=_(q+1),H.tokenize(I,H);return"comment"}}O("text/x-scala",{name:"clike",keywords:d("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:d("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:d("catch class enum do else finally for forSome if match switch try while"),defKeywords:d("class enum def object package trait type val var"),atoms:d("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return q.match('""')?(I.tokenize=Z,I.tokenize(q,I)):!1},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(q,I){var H=I.context;return H.type=="}"&&H.align&&q.eat(">")?(I.context=new n(H.indented,H.column,H.type,H.info,null,H.prev),"operator"):!1},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function V(q){return function(I,H){for(var se=!1,F,T=!1;!I.eol();){if(!q&&!se&&I.match('"')){T=!0;break}if(q&&I.match('"""')){T=!0;break}F=I.next(),!se&&F=="$"&&I.match("{")&&I.skipTo("}"),se=!se&&F=="\\"&&!q}return(T||!q)&&(H.tokenize=null),"string"}}O("text/x-kotlin",{name:"clike",keywords:d("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:d("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:d("catch class do else finally for if where try while enum"),defKeywords:d("class val var object interface fun"),atoms:d("true false null this"),hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},"*":function(q,I){return I.prevToken=="."?"variable":"operator"},'"':function(q,I){return I.tokenize=V(q.match('""')),I.tokenize(q,I)},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1},indent:function(q,I,H,se){var F=H&&H.charAt(0);if((q.prevToken=="}"||q.prevToken==")")&&H=="")return q.indented;if(q.prevToken=="operator"&&H!="}"&&q.context.type!="}"||q.prevToken=="variable"&&F=="."||(q.prevToken=="}"||q.prevToken==")")&&F==".")return se*2+I.indented;if(I.align&&I.type=="}")return I.indented+(q.context.type==(H||"").charAt(0)?0:se)}},modeProps:{closeBrackets:{triples:'"'}}}),O(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":A},modeProps:{fold:["brace","include"]}}),O("text/x-nesc",{name:"clike",keywords:d(p+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:D,blockKeywords:d(S),atoms:d("null true false"),hooks:{"#":A},modeProps:{fold:["brace","include"]}}),O("text/x-objectivec",{name:"clike",keywords:d(p+" "+y),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:d(z+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R},modeProps:{fold:["brace","include"]}}),O("text/x-objectivec++",{name:"clike",keywords:d(p+" "+y+" "+g),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:d(z+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R,u:B,U:B,L:B,R:B,"0":Y,"1":Y,"2":Y,"3":Y,"4":Y,"5":Y,"6":Y,"7":Y,"8":Y,"9":Y,token:function(q,I,H){if(H=="variable"&&q.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&G(q.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),O("text/x-squirrel",{name:"clike",keywords:d("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:D,blockKeywords:d("case catch class else for foreach if switch try while"),defKeywords:d("function local class"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"#":A},modeProps:{fold:["brace","include"]}});var j=null;function Q(q){return function(I,H){for(var se=!1,F,T=!1;!I.eol();){if(!se&&I.match('"')&&(q=="single"||I.match('""'))){T=!0;break}if(!se&&I.match("``")){j=Q(q),T=!0;break}F=I.next(),se=q=="single"&&!se&&F=="\\"}return T&&(H.tokenize=null),"string"}}O("text/x-ceylon",{name:"clike",keywords:d("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(q){var I=q.charAt(0);return I===I.toUpperCase()&&I!==I.toLowerCase()},blockKeywords:d("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:d("class dynamic function interface module object package value"),builtin:d("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:d("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return I.tokenize=Q(q.match('""')?"triple":"single"),I.tokenize(q,I)},"`":function(q,I){return!j||!q.match("`")?!1:(I.tokenize=j,j=null,I.tokenize(q,I))},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(q,I,H){if((H=="variable"||H=="type")&&I.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var od=ue((rd,id)=>{(function(t){typeof rd=="object"&&typeof id=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("diff",function(){var n={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var s=i.string.search(/[\t ]+?$/);if(!i.sol()||s===0)return i.skipToEnd(),("error "+(n[i.string.charAt(0)]||"")).replace(/ $/,"");var u=n[i.peek()]||i.skipToEnd();return s===-1?i.skipToEnd():i.pos=s,u}}}),t.defineMIME("text/x-diff","diff")})});var ld=ue((ad,sd)=>{(function(t){typeof ad=="object"&&typeof sd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("fortran",function(){function n(g){for(var y={},m=0;m<g.length;++m)y[g[m]]=!0;return y}var i=n(["abstract","accept","allocatable","allocate","array","assign","asynchronous","backspace","bind","block","byte","call","case","class","close","common","contains","continue","cycle","data","deallocate","decode","deferred","dimension","do","elemental","else","encode","end","endif","entry","enumerator","equivalence","exit","external","extrinsic","final","forall","format","function","generic","go","goto","if","implicit","import","include","inquire","intent","interface","intrinsic","module","namelist","non_intrinsic","non_overridable","none","nopass","nullify","open","optional","options","parameter","pass","pause","pointer","print","private","program","protected","public","pure","read","recursive","result","return","rewind","save","select","sequence","stop","subroutine","target","then","to","type","use","value","volatile","where","while","write"]),s=n(["abort","abs","access","achar","acos","adjustl","adjustr","aimag","aint","alarm","all","allocated","alog","amax","amin","amod","and","anint","any","asin","associated","atan","besj","besjn","besy","besyn","bit_size","btest","cabs","ccos","ceiling","cexp","char","chdir","chmod","clog","cmplx","command_argument_count","complex","conjg","cos","cosh","count","cpu_time","cshift","csin","csqrt","ctime","c_funloc","c_loc","c_associated","c_null_ptr","c_null_funptr","c_f_pointer","c_null_char","c_alert","c_backspace","c_form_feed","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","dabs","dacos","dasin","datan","date_and_time","dbesj","dbesj","dbesjn","dbesy","dbesy","dbesyn","dble","dcos","dcosh","ddim","derf","derfc","dexp","digits","dim","dint","dlog","dlog","dmax","dmin","dmod","dnint","dot_product","dprod","dsign","dsinh","dsin","dsqrt","dtanh","dtan","dtime","eoshift","epsilon","erf","erfc","etime","exit","exp","exponent","extends_type_of","fdate","fget","fgetc","float","floor","flush","fnum","fputc","fput","fraction","fseek","fstat","ftell","gerror","getarg","get_command","get_command_argument","get_environment_variable","getcwd","getenv","getgid","getlog","getpid","getuid","gmtime","hostnm","huge","iabs","iachar","iand","iargc","ibclr","ibits","ibset","ichar","idate","idim","idint","idnint","ieor","ierrno","ifix","imag","imagpart","index","int","ior","irand","isatty","ishft","ishftc","isign","iso_c_binding","is_iostat_end","is_iostat_eor","itime","kill","kind","lbound","len","len_trim","lge","lgt","link","lle","llt","lnblnk","loc","log","logical","long","lshift","lstat","ltime","matmul","max","maxexponent","maxloc","maxval","mclock","merge","move_alloc","min","minexponent","minloc","minval","mod","modulo","mvbits","nearest","new_line","nint","not","or","pack","perror","precision","present","product","radix","rand","random_number","random_seed","range","real","realpart","rename","repeat","reshape","rrspacing","rshift","same_type_as","scale","scan","second","selected_int_kind","selected_real_kind","set_exponent","shape","short","sign","signal","sinh","sin","sleep","sngl","spacing","spread","sqrt","srand","stat","sum","symlnk","system","system_clock","tan","tanh","time","tiny","transfer","transpose","trim","ttynam","ubound","umask","unlink","unpack","verify","xor","zabs","zcos","zexp","zlog","zsin","zsqrt"]),u=n(["c_bool","c_char","c_double","c_double_complex","c_float","c_float_complex","c_funptr","c_int","c_int16_t","c_int32_t","c_int64_t","c_int8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_int_fast8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_least8_t","c_intmax_t","c_intptr_t","c_long","c_long_double","c_long_double_complex","c_long_long","c_ptr","c_short","c_signed_char","c_size_t","character","complex","double","integer","logical","real"]),c=/[+\-*&=<>\/\:]/,d=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function h(g,y){if(g.match(d))return"operator";var m=g.next();if(m=="!")return g.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=p(m),y.tokenize(g,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(c.test(m))return g.eatWhile(c),"operator";g.eatWhile(/[\w\$_]/);var b=g.current().toLowerCase();return i.hasOwnProperty(b)?"keyword":s.hasOwnProperty(b)||u.hasOwnProperty(b)?"builtin":"variable"}function p(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||h)(g,y);return m=="comment"||m=="meta",m}}}),t.defineMIME("text/x-fortran","fortran")})});var dd=ue((ud,cd)=>{(function(t){typeof ud=="object"&&typeof cd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("go",function(n){var i=n.indentUnit,s={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},u={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},c=/[+\-*&^%:=<>!|\/]/,d;function h(w,D){var E=w.next();if(E=='"'||E=="'"||E=="`")return D.tokenize=p(E),D.tokenize(w,D);if(/[\d\.]/.test(E))return E=="."?w.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?w.match(/^[xX][0-9a-fA-F]+/)||w.match(/^0[0-7]+/):w.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return d=E,null;if(E=="/"){if(w.eat("*"))return D.tokenize=g,g(w,D);if(w.eat("/"))return w.skipToEnd(),"comment"}if(c.test(E))return w.eatWhile(c),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var S=w.current();return s.propertyIsEnumerable(S)?((S=="case"||S=="default")&&(d="case"),"keyword"):u.propertyIsEnumerable(S)?"atom":"variable"}function p(w){return function(D,E){for(var S=!1,z,A=!1;(z=D.next())!=null;){if(z==w&&!S){A=!0;break}S=!S&&w!="`"&&z=="\\"}return(A||!(S||w=="`"))&&(E.tokenize=h),"string"}}function g(w,D){for(var E=!1,S;S=w.next();){if(S=="/"&&E){D.tokenize=h;break}E=S=="*"}return"comment"}function y(w,D,E,S,z){this.indented=w,this.column=D,this.type=E,this.align=S,this.prev=z}function m(w,D,E){return w.context=new y(w.indented,D,E,null,w.context)}function b(w){if(!w.context.prev)return;var D=w.context.type;return(D==")"||D=="]"||D=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}return{startState:function(w){return{tokenize:null,context:new y((w||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,D){var E=D.context;if(w.sol()&&(E.align==null&&(E.align=!1),D.indented=w.indentation(),D.startOfLine=!0,E.type=="case"&&(E.type="}")),w.eatSpace())return null;d=null;var S=(D.tokenize||h)(w,D);return S=="comment"||(E.align==null&&(E.align=!0),d=="{"?m(D,w.column(),"}"):d=="["?m(D,w.column(),"]"):d=="("?m(D,w.column(),")"):d=="case"?E.type="case":(d=="}"&&E.type=="}"||d==E.type)&&b(D),D.startOfLine=!1),S},indent:function(w,D){if(w.tokenize!=h&&w.tokenize!=null)return t.Pass;var E=w.context,S=D&&D.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(D))return w.context.type="}",E.indented;var z=S==E.type;return E.align?E.column+(z?0:1):E.indented+(z?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),t.defineMIME("text/x-go","go")})});var pd=ue((hd,fd)=>{(function(t){typeof hd=="object"&&typeof fd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haskell",function(n,i){function s(A,R,U){return R(U),U(A,R)}var u=/[a-z_]/,c=/[A-Z]/,d=/\d/,h=/[0-9A-Fa-f]/,p=/[0-7]/,g=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,b=/[ \t\v\f]/;function w(A,R){if(A.eatWhile(b))return null;var U=A.next();if(m.test(U)){if(U=="{"&&A.eat("-")){var Y="comment";return A.eat("#")&&(Y="meta"),s(A,R,D(Y,1))}return null}if(U=="'")return A.eat("\\"),A.next(),A.eat("'")?"string":"string error";if(U=='"')return s(A,R,E);if(c.test(U))return A.eatWhile(g),A.eat(".")?"qualifier":"variable-2";if(u.test(U))return A.eatWhile(g),"variable";if(d.test(U)){if(U=="0"){if(A.eat(/[xX]/))return A.eatWhile(h),"integer";if(A.eat(/[oO]/))return A.eatWhile(p),"number"}A.eatWhile(d);var Y="number";return A.match(/^\.\d+/)&&(Y="number"),A.eat(/[eE]/)&&(Y="number",A.eat(/[-+]/),A.eatWhile(d)),Y}if(U=="."&&A.eat("."))return"keyword";if(y.test(U)){if(U=="-"&&A.eat(/-/)&&(A.eatWhile(/-/),!A.eat(y)))return A.skipToEnd(),"comment";var Y="variable";return U==":"&&(Y="variable-2"),A.eatWhile(y),Y}return"error"}function D(A,R){return R==0?w:function(U,Y){for(var B=R;!U.eol();){var G=U.next();if(G=="{"&&U.eat("-"))++B;else if(G=="-"&&U.eat("}")&&(--B,B==0))return Y(w),A}return Y(D(A,B)),A}}function E(A,R){for(;!A.eol();){var U=A.next();if(U=='"')return R(w),"string";if(U=="\\"){if(A.eol()||A.eat(b))return R(S),"string";A.eat("&")||A.next()}}return R(w),"string error"}function S(A,R){return A.eat("\\")?s(A,R,E):(A.next(),R(w),"error")}var z=function(){var A={};function R(B){return function(){for(var G=0;G<arguments.length;G++)A[arguments[G]]=B}}R("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),R("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),R("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),R("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),R("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var U=i.overrideKeywords;if(U)for(var Y in U)U.hasOwnProperty(Y)&&(A[Y]=U[Y]);return A}();return{startState:function(){return{f:w}},copyState:function(A){return{f:A.f}},token:function(A,R){var U=R.f(A,function(B){R.f=B}),Y=A.current();return z.hasOwnProperty(Y)?z[Y]:U},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),t.defineMIME("text/x-haskell","haskell")})});var ta=ue((md,gd)=>{(function(t){typeof md=="object"&&typeof gd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";var n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(s,u){var c=s.indentUnit,d={},h=u.htmlMode?n:i;for(var p in h)d[p]=h[p];for(var p in u)d[p]=u[p];var g,y;function m(_,V){function j(I){return V.tokenize=I,I(_,V)}var Q=_.next();if(Q=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(D("atom","]]>")):null:_.match("--")?j(D("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(E(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),V.tokenize=D("meta","?>"),"meta"):(g=_.eat("/")?"closeTag":"openTag",V.tokenize=b,"tag bracket");if(Q=="&"){var q;return _.eat("#")?_.eat("x")?q=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):q=_.eatWhile(/[\d]/)&&_.eat(";"):q=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),q?"atom":"error"}else return _.eatWhile(/[^&<]/),null}m.isInText=!0;function b(_,V){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return V.tokenize=m,g=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return g="equals",null;if(j=="<"){V.tokenize=m,V.state=R,V.tagName=V.tagStart=null;var Q=V.tokenize(_,V);return Q?Q+" tag error":"tag error"}else return/[\'\"]/.test(j)?(V.tokenize=w(j),V.stringStartCol=_.column(),V.tokenize(_,V)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var V=function(j,Q){for(;!j.eol();)if(j.next()==_){Q.tokenize=b;break}return"string"};return V.isInAttribute=!0,V}function D(_,V){return function(j,Q){for(;!j.eol();){if(j.match(V)){Q.tokenize=m;break}j.next()}return _}}function E(_){return function(V,j){for(var Q;(Q=V.next())!=null;){if(Q=="<")return j.tokenize=E(_+1),j.tokenize(V,j);if(Q==">")if(_==1){j.tokenize=m;break}else return j.tokenize=E(_-1),j.tokenize(V,j)}return"meta"}}function S(_,V,j){this.prev=_.context,this.tagName=V,this.indent=_.indented,this.startOfLine=j,(d.doNotIndent.hasOwnProperty(V)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function z(_){_.context&&(_.context=_.context.prev)}function A(_,V){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!d.contextGrabbers.hasOwnProperty(j)||!d.contextGrabbers[j].hasOwnProperty(V))return;z(_)}}function R(_,V,j){return _=="openTag"?(j.tagStart=V.column(),U):_=="closeTag"?Y:R}function U(_,V,j){return _=="word"?(j.tagName=V.current(),y="tag",ee):d.allowMissingTagName&&_=="endTag"?(y="tag bracket",ee(_,V,j)):(y="error",U)}function Y(_,V,j){if(_=="word"){var Q=V.current();return j.context&&j.context.tagName!=Q&&d.implicitlyClosed.hasOwnProperty(j.context.tagName)&&z(j),j.context&&j.context.tagName==Q||d.matchClosing===!1?(y="tag",B):(y="tag error",G)}else return d.allowMissingTagName&&_=="endTag"?(y="tag bracket",B(_,V,j)):(y="error",G)}function B(_,V,j){return _!="endTag"?(y="error",B):(z(j),R)}function G(_,V,j){return y="error",B(_,V,j)}function ee(_,V,j){if(_=="word")return y="attribute",J;if(_=="endTag"||_=="selfcloseTag"){var Q=j.tagName,q=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(Q)?A(j,Q):(A(j,Q),j.context=new S(j,Q,q==j.indented)),R}return y="error",ee}function J(_,V,j){return _=="equals"?O:(d.allowMissing||(y="error"),ee(_,V,j))}function O(_,V,j){return _=="string"?Z:_=="word"&&d.allowUnquoted?(y="string",ee):(y="error",ee(_,V,j))}function Z(_,V,j){return _=="string"?Z:ee(_,V,j)}return{startState:function(_){var V={tokenize:m,state:R,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(V.baseIndent=_),V},token:function(_,V){if(!V.tagName&&_.sol()&&(V.indented=_.indentation()),_.eatSpace())return null;g=null;var j=V.tokenize(_,V);return(j||g)&&j!="comment"&&(y=null,V.state=V.state(g||j,_,V),y&&(j=y=="error"?j+" error":y)),j},indent:function(_,V,j){var Q=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+c;if(Q&&Q.noIndent)return t.Pass;if(_.tokenize!=b&&_.tokenize!=m)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return d.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+c*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/<!\[CDATA\[/.test(V))return 0;var q=V&&/^<(\/)?([\w_:\.-]*)/.exec(V);if(q&&q[1])for(;Q;)if(Q.tagName==q[2]){Q=Q.prev;break}else if(d.implicitlyClosed.hasOwnProperty(Q.tagName))Q=Q.prev;else break;else if(q)for(;Q;){var I=d.contextGrabbers[Q.tagName];if(I&&I.hasOwnProperty(q[2]))Q=Q.prev;else break}for(;Q&&Q.prev&&!Q.startOfLine;)Q=Q.prev;return Q?Q.indent+c:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(_){_.state==O&&(_.state=ee)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var V=[],j=_.context;j;j=j.prev)j.tagName&&V.push(j.tagName);return V.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Xs=ue((vd,bd)=>{(function(t){typeof vd=="object"&&typeof bd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("javascript",function(n,i){var s=n.indentUnit,u=i.statementIndent,c=i.jsonld,d=i.json||c,h=i.typescript,p=i.wordCharacters||/[\w$\xa1-\uffff]/,g=function(){function L(Et){return{type:Et,style:"keyword"}}var N=L("keyword a"),ie=L("keyword b"),W=L("keyword c"),fe=L("keyword d"),$e=L("operator"),Je={type:"atom",style:"atom"};return{if:L("if"),while:N,with:N,else:ie,do:ie,try:ie,finally:ie,return:fe,break:fe,continue:fe,new:L("new"),delete:W,void:W,throw:W,debugger:L("debugger"),var:L("var"),const:L("var"),let:L("var"),function:L("function"),catch:L("catch"),for:L("for"),switch:L("switch"),case:L("case"),default:L("default"),in:$e,typeof:$e,instanceof:$e,true:Je,false:Je,null:Je,undefined:Je,NaN:Je,Infinity:Je,this:L("this"),class:L("class"),super:L("atom"),yield:W,export:L("export"),import:L("import"),extends:W,await:W}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(L){for(var N=!1,ie,W=!1;(ie=L.next())!=null;){if(!N){if(ie=="/"&&!W)return;ie=="["?W=!0:W&&ie=="]"&&(W=!1)}N=!N&&ie=="\\"}}var w,D;function E(L,N,ie){return w=L,D=ie,N}function S(L,N){var ie=L.next();if(ie=='"'||ie=="'")return N.tokenize=z(ie),N.tokenize(L,N);if(ie=="."&&L.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(ie=="."&&L.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ie))return E(ie);if(ie=="="&&L.eat(">"))return E("=>","operator");if(ie=="0"&&L.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(ie))return L.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(ie=="/")return L.eat("*")?(N.tokenize=A,A(L,N)):L.eat("/")?(L.skipToEnd(),E("comment","comment")):Ve(L,N,1)?(b(L),L.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(L.eat("="),E("operator","operator",L.current()));if(ie=="`")return N.tokenize=R,R(L,N);if(ie=="#"&&L.peek()=="!")return L.skipToEnd(),E("meta","meta");if(ie=="#"&&L.eatWhile(p))return E("variable","property");if(ie=="<"&&L.match("!--")||ie=="-"&&L.match("->")&&!/\S/.test(L.string.slice(0,L.start)))return L.skipToEnd(),E("comment","comment");if(y.test(ie))return(ie!=">"||!N.lexical||N.lexical.type!=">")&&(L.eat("=")?(ie=="!"||ie=="=")&&L.eat("="):/[<>*+\-|&?]/.test(ie)&&(L.eat(ie),ie==">"&&L.eat(ie))),ie=="?"&&L.eat(".")?E("."):E("operator","operator",L.current());if(p.test(ie)){L.eatWhile(p);var W=L.current();if(N.lastType!="."){if(g.propertyIsEnumerable(W)){var fe=g[W];return E(fe.type,fe.style,W)}if(W=="async"&&L.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",W)}return E("variable","variable",W)}}function z(L){return function(N,ie){var W=!1,fe;if(c&&N.peek()=="@"&&N.match(m))return ie.tokenize=S,E("jsonld-keyword","meta");for(;(fe=N.next())!=null&&!(fe==L&&!W);)W=!W&&fe=="\\";return W||(ie.tokenize=S),E("string","string")}}function A(L,N){for(var ie=!1,W;W=L.next();){if(W=="/"&&ie){N.tokenize=S;break}ie=W=="*"}return E("comment","comment")}function R(L,N){for(var ie=!1,W;(W=L.next())!=null;){if(!ie&&(W=="`"||W=="$"&&L.eat("{"))){N.tokenize=S;break}ie=!ie&&W=="\\"}return E("quasi","string-2",L.current())}var U="([{}])";function Y(L,N){N.fatArrowAt&&(N.fatArrowAt=null);var ie=L.string.indexOf("=>",L.start);if(ie<0)return;if(h){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(L.string.slice(L.start,ie));W&&(ie=W.index)}for(var fe=0,$e=!1,Je=ie-1;Je>=0;--Je){var Et=L.string.charAt(Je),Yt=U.indexOf(Et);if(Yt>=0&&Yt<3){if(!fe){++Je;break}if(--fe==0){Et=="("&&($e=!0);break}}else if(Yt>=3&&Yt<6)++fe;else if(p.test(Et))$e=!0;else if(/["'\/`]/.test(Et))for(;;--Je){if(Je==0)return;var Co=L.string.charAt(Je-1);if(Co==Et&&L.string.charAt(Je-2)!="\\"){Je--;break}}else if($e&&!fe){++Je;break}}$e&&!fe&&(N.fatArrowAt=Je)}var B={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function G(L,N,ie,W,fe,$e){this.indented=L,this.column=N,this.type=ie,this.prev=fe,this.info=$e,W!=null&&(this.align=W)}function ee(L,N){for(var ie=L.localVars;ie;ie=ie.next)if(ie.name==N)return!0;for(var W=L.context;W;W=W.prev)for(var ie=W.vars;ie;ie=ie.next)if(ie.name==N)return!0}function J(L,N,ie,W,fe){var $e=L.cc;for(O.state=L,O.stream=fe,O.marked=null,O.cc=$e,O.style=N,L.lexical.hasOwnProperty("align")||(L.lexical.align=!0);;){var Je=$e.length?$e.pop():d?re:Oe;if(Je(ie,W)){for(;$e.length&&$e[$e.length-1].lex;)$e.pop()();return O.marked?O.marked:ie=="variable"&&ee(L,W)?"variable-2":N}}}var O={state:null,column:null,marked:null,cc:null};function Z(){for(var L=arguments.length-1;L>=0;L--)O.cc.push(arguments[L])}function _(){return Z.apply(null,arguments),!0}function V(L,N){for(var ie=N;ie;ie=ie.next)if(ie.name==L)return!0;return!1}function j(L){var N=O.state;if(O.marked="def",N.context){if(N.lexical.info=="var"&&N.context&&N.context.block){var ie=Q(L,N.context);if(ie!=null){N.context=ie;return}}else if(!V(L,N.localVars)){N.localVars=new H(L,N.localVars);return}}i.globalVars&&!V(L,N.globalVars)&&(N.globalVars=new H(L,N.globalVars))}function Q(L,N){if(N)if(N.block){var ie=Q(L,N.prev);return ie?ie==N.prev?N:new I(ie,N.vars,!0):null}else return V(L,N.vars)?N:new I(N.prev,new H(L,N.vars),!1);else return null}function q(L){return L=="public"||L=="private"||L=="protected"||L=="abstract"||L=="readonly"}function I(L,N,ie){this.prev=L,this.vars=N,this.block=ie}function H(L,N){this.name=L,this.next=N}var se=new H("this",new H("arguments",null));function F(){O.state.context=new I(O.state.context,O.state.localVars,!1),O.state.localVars=se}function T(){O.state.context=new I(O.state.context,O.state.localVars,!0),O.state.localVars=null}function de(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}de.lex=!0;function ce(L,N){var ie=function(){var W=O.state,fe=W.indented;if(W.lexical.type=="stat")fe=W.lexical.indented;else for(var $e=W.lexical;$e&&$e.type==")"&&$e.align;$e=$e.prev)fe=$e.indented;W.lexical=new G(fe,O.stream.column(),L,null,W.lexical,N)};return ie.lex=!0,ie}function oe(){var L=O.state;L.lexical.prev&&(L.lexical.type==")"&&(L.indented=L.lexical.indented),L.lexical=L.lexical.prev)}oe.lex=!0;function xe(L){function N(ie){return ie==L?_():L==";"||ie=="}"||ie==")"||ie=="]"?Z():_(N)}return N}function Oe(L,N){return L=="var"?_(ce("vardef",N),fr,xe(";"),oe):L=="keyword a"?_(ce("form"),De,Oe,oe):L=="keyword b"?_(ce("form"),Oe,oe):L=="keyword d"?O.stream.match(/^\s*$/,!1)?_():_(ce("stat"),rt,xe(";"),oe):L=="debugger"?_(xe(";")):L=="{"?_(ce("}"),T,hn,oe,de):L==";"?_():L=="if"?(O.state.lexical.info=="else"&&O.state.cc[O.state.cc.length-1]==oe&&O.state.cc.pop()(),_(ce("form"),De,Oe,oe,xo)):L=="function"?_(An):L=="for"?_(ce("form"),Fr,Oe,oe):L=="class"||h&&N=="interface"?(O.marked="keyword",_(ce("form",L=="class"?L:N),jn,oe)):L=="variable"?h&&N=="declare"?(O.marked="keyword",_(Oe)):h&&(N=="module"||N=="enum"||N=="type")&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword",N=="enum"?_(Tn):N=="type"?_(Mr,xe("operator"),Be,xe(";")):_(ce("form"),Bt,xe("{"),ce("}"),hn,oe,oe)):h&&N=="namespace"?(O.marked="keyword",_(ce("form"),re,Oe,oe)):h&&N=="abstract"?(O.marked="keyword",_(Oe)):_(ce("stat"),He):L=="switch"?_(ce("form"),De,xe("{"),ce("}","switch"),T,hn,oe,oe,de):L=="case"?_(re,xe(":")):L=="default"?_(xe(":")):L=="catch"?_(ce("form"),F,ye,Oe,oe,de):L=="export"?_(ce("stat"),yi,oe):L=="import"?_(ce("stat"),Qa,oe):L=="async"?_(Oe):N=="@"?_(re,Oe):Z(ce("stat"),re,xe(";"),oe)}function ye(L){if(L=="(")return _(Bn,xe(")"))}function re(L,N){return Pe(L,N,!1)}function we(L,N){return Pe(L,N,!0)}function De(L){return L!="("?Z():_(ce(")"),rt,xe(")"),oe)}function Pe(L,N,ie){if(O.state.fatArrowAt==O.stream.start){var W=ie?qe:Wt;if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,xe("=>"),W,de);if(L=="variable")return Z(F,Bt,xe("=>"),W,de)}var fe=ie?nt:Ce;return B.hasOwnProperty(L)?_(fe):L=="function"?_(An,fe):L=="class"||h&&N=="interface"?(O.marked="keyword",_(ce("form"),bi,oe)):L=="keyword c"||L=="async"?_(ie?we:re):L=="("?_(ce(")"),rt,xe(")"),oe,fe):L=="operator"||L=="spread"?_(ie?we:re):L=="["?_(ce("]"),_e,oe,fe):L=="{"?Ye(Ae,"}",null,fe):L=="quasi"?Z(mt,fe):L=="new"?_(X(ie)):L=="import"?_(re):_()}function rt(L){return L.match(/[;\}\)\],]/)?Z():Z(re)}function Ce(L,N){return L==","?_(rt):nt(L,N,!1)}function nt(L,N,ie){var W=ie==!1?Ce:nt,fe=ie==!1?re:we;if(L=="=>")return _(F,ie?qe:Wt,de);if(L=="operator")return/\+\+|--/.test(N)||h&&N=="!"?_(W):h&&N=="<"&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(ce(">"),Ie(Be,">"),oe,W):N=="?"?_(re,xe(":"),fe):_(fe);if(L=="quasi")return Z(mt,W);if(L==";")return;if(L=="(")return Ye(we,")","call",W);if(L==".")return _(Ct,W);if(L=="[")return _(ce("]"),rt,xe("]"),oe,W);if(h&&N=="as")return O.marked="keyword",_(Be,W);if(L=="regexp")return O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),_(fe)}function mt(L,N){return L!="quasi"?Z():N.slice(N.length-2)!="${"?_(mt):_(re,gt)}function gt(L){if(L=="}")return O.marked="string-2",O.state.tokenize=R,_(mt)}function Wt(L){return Y(O.stream,O.state),Z(L=="{"?Oe:re)}function qe(L){return Y(O.stream,O.state),Z(L=="{"?Oe:we)}function X(L){return function(N){return N=="."?_(L?te:le):N=="variable"&&h?_(Jn,L?nt:Ce):Z(L?we:re)}}function le(L,N){if(N=="target")return O.marked="keyword",_(Ce)}function te(L,N){if(N=="target")return O.marked="keyword",_(nt)}function He(L){return L==":"?_(oe,Oe):Z(Ce,xe(";"),oe)}function Ct(L){if(L=="variable")return O.marked="property",_()}function Ae(L,N){if(L=="async")return O.marked="property",_(Ae);if(L=="variable"||O.style=="keyword"){if(O.marked="property",N=="get"||N=="set")return _(Fe);var ie;return h&&O.state.fatArrowAt==O.stream.start&&(ie=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+ie[0].length),_(ke)}else{if(L=="number"||L=="string")return O.marked=c?"property":O.style+" property",_(ke);if(L=="jsonld-keyword")return _(ke);if(h&&q(N))return O.marked="keyword",_(Ae);if(L=="[")return _(re,Ot,xe("]"),ke);if(L=="spread")return _(we,ke);if(N=="*")return O.marked="keyword",_(Ae);if(L==":")return Z(ke)}}function Fe(L){return L!="variable"?Z(ke):(O.marked="property",_(An))}function ke(L){if(L==":")return _(we);if(L=="(")return Z(An)}function Ie(L,N,ie){function W(fe,$e){if(ie?ie.indexOf(fe)>-1:fe==","){var Je=O.state.lexical;return Je.info=="call"&&(Je.pos=(Je.pos||0)+1),_(function(Et,Yt){return Et==N||Yt==N?Z():Z(L)},W)}return fe==N||$e==N?_():ie&&ie.indexOf(";")>-1?Z(L):_(xe(N))}return function(fe,$e){return fe==N||$e==N?_():Z(L,W)}}function Ye(L,N,ie){for(var W=3;W<arguments.length;W++)O.cc.push(arguments[W]);return _(ce(N,ie),Ie(L,N),oe)}function hn(L){return L=="}"?_():Z(Oe,hn)}function Ot(L,N){if(h){if(L==":")return _(Be);if(N=="?")return _(Ot)}}function yo(L,N){if(h&&(L==":"||N=="in"))return _(Be)}function Te(L){if(h&&L==":")return O.stream.match(/^\s*\w+\s+is\b/,!1)?_(re,gi,Be):_(Be)}function gi(L,N){if(N=="is")return O.marked="keyword",_()}function Be(L,N){if(N=="keyof"||N=="typeof"||N=="infer")return O.marked="keyword",_(N=="typeof"?we:Be);if(L=="variable"||N=="void")return O.marked="type",_(wt);if(N=="|"||N=="&")return _(Be);if(L=="string"||L=="number"||L=="atom")return _(wt);if(L=="[")return _(ce("]"),Ie(Be,"]",","),oe,wt);if(L=="{")return _(ce("}"),Ie(st,"}",",;"),oe,wt);if(L=="(")return _(Ie(Lr,")"),dt,wt);if(L=="<")return _(Ie(Be,">"),Be)}function dt(L){if(L=="=>")return _(Be)}function st(L,N){if(L=="variable"||O.style=="keyword")return O.marked="property",_(st);if(N=="?"||L=="number"||L=="string")return _(st);if(L==":")return _(Be);if(L=="[")return _(xe("variable"),yo,xe("]"),st);if(L=="(")return Z(er,st)}function Lr(L,N){return L=="variable"&&O.stream.match(/^\s*[?:]/,!1)||N=="?"?_(Lr):L==":"?_(Be):L=="spread"?_(Lr):Z(Be)}function wt(L,N){if(N=="<")return _(ce(">"),Ie(Be,">"),oe,wt);if(N=="|"||L=="."||N=="&")return _(Be);if(L=="[")return _(Be,xe("]"),wt);if(N=="extends"||N=="implements")return O.marked="keyword",_(Be);if(N=="?")return _(Be,xe(":"),Be)}function Jn(L,N){if(N=="<")return _(ce(">"),Ie(Be,">"),oe,wt)}function St(){return Z(Be,wo)}function wo(L,N){if(N=="=")return _(Be)}function fr(L,N){return N=="enum"?(O.marked="keyword",_(Tn)):Z(Bt,Ot,En,vi)}function Bt(L,N){if(h&&q(N))return O.marked="keyword",_(Bt);if(L=="variable")return j(N),_();if(L=="spread")return _(Bt);if(L=="[")return Ye(ko,"]");if(L=="{")return Ye(Ir,"}")}function Ir(L,N){return L=="variable"&&!O.stream.match(/^\s*:/,!1)?(j(N),_(En)):(L=="variable"&&(O.marked="property"),L=="spread"?_(Bt):L=="}"?Z():L=="["?_(re,xe("]"),xe(":"),Ir):_(xe(":"),Bt,En))}function ko(){return Z(Bt,En)}function En(L,N){if(N=="=")return _(we)}function vi(L){if(L==",")return _(fr)}function xo(L,N){if(L=="keyword b"&&N=="else")return _(ce("form","else"),Oe,oe)}function Fr(L,N){if(N=="await")return _(Fr);if(L=="(")return _(ce(")"),Za,oe)}function Za(L){return L=="var"?_(fr,Dn):L=="variable"?_(Dn):Z(Dn)}function Dn(L,N){return L==")"?_():L==";"?_(Dn):N=="in"||N=="of"?(O.marked="keyword",_(re,Dn)):Z(re,Dn)}function An(L,N){if(N=="*")return O.marked="keyword",_(An);if(L=="variable")return j(N),_(An);if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,Te,Oe,de);if(h&&N=="<")return _(ce(">"),Ie(St,">"),oe,An)}function er(L,N){if(N=="*")return O.marked="keyword",_(er);if(L=="variable")return j(N),_(er);if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,Te,de);if(h&&N=="<")return _(ce(">"),Ie(St,">"),oe,er)}function Mr(L,N){if(L=="keyword"||L=="variable")return O.marked="type",_(Mr);if(N=="<")return _(ce(">"),Ie(St,">"),oe)}function Bn(L,N){return N=="@"&&_(re,Bn),L=="spread"?_(Bn):h&&q(N)?(O.marked="keyword",_(Bn)):h&&L=="this"?_(Ot,En):Z(Bt,Ot,En)}function bi(L,N){return L=="variable"?jn(L,N):qr(L,N)}function jn(L,N){if(L=="variable")return j(N),_(qr)}function qr(L,N){if(N=="<")return _(ce(">"),Ie(St,">"),oe,qr);if(N=="extends"||N=="implements"||h&&L==",")return N=="implements"&&(O.marked="keyword"),_(h?Be:re,qr);if(L=="{")return _(ce("}"),bn,oe)}function bn(L,N){if(L=="async"||L=="variable"&&(N=="static"||N=="get"||N=="set"||h&&q(N))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return O.marked="keyword",_(bn);if(L=="variable"||O.style=="keyword")return O.marked="property",_(Hn,bn);if(L=="number"||L=="string")return _(Hn,bn);if(L=="[")return _(re,Ot,xe("]"),Hn,bn);if(N=="*")return O.marked="keyword",_(bn);if(h&&L=="(")return Z(er,bn);if(L==";"||L==",")return _(bn);if(L=="}")return _();if(N=="@")return _(re,bn)}function Hn(L,N){if(N=="?")return _(Hn);if(L==":")return _(Be,En);if(N=="=")return _(we);var ie=O.state.lexical.prev,W=ie&&ie.info=="interface";return Z(W?er:An)}function yi(L,N){return N=="*"?(O.marked="keyword",_(lt,xe(";"))):N=="default"?(O.marked="keyword",_(re,xe(";"))):L=="{"?_(Ie(Un,"}"),lt,xe(";")):Z(Oe)}function Un(L,N){if(N=="as")return O.marked="keyword",_(xe("variable"));if(L=="variable")return Z(we,Un)}function Qa(L){return L=="string"?_():L=="("?Z(re):Z(fn,zr,lt)}function fn(L,N){return L=="{"?Ye(fn,"}"):(L=="variable"&&j(N),N=="*"&&(O.marked="keyword"),_(_o))}function zr(L){if(L==",")return _(fn,zr)}function _o(L,N){if(N=="as")return O.marked="keyword",_(fn)}function lt(L,N){if(N=="from")return O.marked="keyword",_(re)}function _e(L){return L=="]"?_():Z(Ie(we,"]"))}function Tn(){return Z(ce("form"),Bt,xe("{"),ce("}"),Ie(wi,"}"),oe,oe)}function wi(){return Z(Bt,En)}function pn(L,N){return L.lastType=="operator"||L.lastType==","||y.test(N.charAt(0))||/[,.]/.test(N.charAt(0))}function Ve(L,N,ie){return N.tokenize==S&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(N.lastType)||N.lastType=="quasi"&&/\{\s*$/.test(L.string.slice(0,L.pos-(ie||0)))}return{startState:function(L){var N={tokenize:S,lastType:"sof",cc:[],lexical:new G((L||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new I(null,null,!1),indented:L||0};return i.globalVars&&typeof i.globalVars=="object"&&(N.globalVars=i.globalVars),N},token:function(L,N){if(L.sol()&&(N.lexical.hasOwnProperty("align")||(N.lexical.align=!1),N.indented=L.indentation(),Y(L,N)),N.tokenize!=A&&L.eatSpace())return null;var ie=N.tokenize(L,N);return w=="comment"?ie:(N.lastType=w=="operator"&&(D=="++"||D=="--")?"incdec":w,J(N,ie,w,D,L))},indent:function(L,N){if(L.tokenize==A)return t.Pass;if(L.tokenize!=S)return 0;var ie=N&&N.charAt(0),W=L.lexical,fe;if(!/^\s*else\b/.test(N))for(var $e=L.cc.length-1;$e>=0;--$e){var Je=L.cc[$e];if(Je==oe)W=W.prev;else if(Je!=xo)break}for(;(W.type=="stat"||W.type=="form")&&(ie=="}"||(fe=L.cc[L.cc.length-1])&&(fe==Ce||fe==nt)&&!/^[,\.=+\-*:?[\(]/.test(N));)W=W.prev;u&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var Et=W.type,Yt=ie==Et;return Et=="vardef"?W.indented+(L.lastType=="operator"||L.lastType==","?W.info.length+1:0):Et=="form"&&ie=="{"?W.indented:Et=="form"?W.indented+s:Et=="stat"?W.indented+(pn(L,N)?u||s:0):W.info=="switch"&&!Yt&&i.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(N)?s:2*s):W.align?W.column+(Yt?0:1):W.indented+(Yt?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:c,jsonMode:d,expressionAllowed:Ve,skipExpression:function(L){var N=L.cc[L.cc.length-1];(N==re||N==we)&&L.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Zs=ue((yd,wd)=>{(function(t){typeof yd=="object"&&typeof wd=="object"?t(Ze(),ta(),Xs(),Vs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)})(function(t){"use strict";var n={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(g,y,m){var b=g.current(),w=b.search(y);return w>-1?g.backUp(b.length-w):b.match(/<\/?$/)&&(g.backUp(b.length),g.match(y,!1)||g.match(b)),m}var s={};function u(g){var y=s[g];return y||(s[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function c(g,y){var m=g.match(u(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function d(g,y){return new RegExp((y?"^":"")+"</s*"+g+"s*>","i")}function h(g,y){for(var m in g)for(var b=y[m]||(y[m]=[]),w=g[m],D=w.length-1;D>=0;D--)b.unshift(w[D])}function p(g,y){for(var m=0;m<g.length;m++){var b=g[m];if(!b[0]||b[1].test(c(y,b[0])))return b[2]}}t.defineMode("htmlmixed",function(g,y){var m=t.getMode(g,{name:"xml",htmlMode:!0,multilineTagIndentFactor:y.multilineTagIndentFactor,multilineTagIndentPastTag:y.multilineTagIndentPastTag}),b={},w=y&&y.tags,D=y&&y.scriptTypes;if(h(n,b),w&&h(w,b),D)for(var E=D.length-1;E>=0;E--)b.script.unshift(["type",D[E].matches,D[E].mode]);function S(z,A){var R=m.token(z,A.htmlState),U=/\btag\b/.test(R),Y;if(U&&!/[<>\s\/]/.test(z.current())&&(Y=A.htmlState.tagName&&A.htmlState.tagName.toLowerCase())&&b.hasOwnProperty(Y))A.inTag=Y+" ";else if(A.inTag&&U&&/>$/.test(z.current())){var B=/^([\S]+) (.*)/.exec(A.inTag);A.inTag=null;var G=z.current()==">"&&p(b[B[1]],B[2]),ee=t.getMode(g,G),J=d(B[1],!0),O=d(B[1],!1);A.token=function(Z,_){return Z.match(J,!1)?(_.token=S,_.localState=_.localMode=null,null):i(Z,O,_.localMode.token(Z,_.localState))},A.localMode=ee,A.localState=t.startState(ee,m.indent(A.htmlState,"",""))}else A.inTag&&(A.inTag+=z.current(),z.eol()&&(A.inTag+=" "));return R}return{startState:function(){var z=t.startState(m);return{token:S,inTag:null,localMode:null,localState:null,htmlState:z}},copyState:function(z){var A;return z.localState&&(A=t.copyState(z.localMode,z.localState)),{token:z.token,inTag:z.inTag,localMode:z.localMode,localState:A,htmlState:t.copyState(m,z.htmlState)}},token:function(z,A){return A.token(z,A)},indent:function(z,A,R){return!z.localMode||/^\s*<\//.test(A)?m.indent(z.htmlState,A,R):z.localMode.indent?z.localMode.indent(z.localState,A,R):t.Pass},innerMode:function(z){return{state:z.localState||z.htmlState,mode:z.localMode||m}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})});var _d=ue((kd,xd)=>{(function(t){typeof kd=="object"&&typeof xd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("julia",function(n,i){function s(I,H){return typeof H=="undefined"&&(H="\\b"),new RegExp("^(("+I.join(")|(")+"))"+H)}var u="\\\\[0-7]{1,3}",c="\\\\x[A-Fa-f0-9]{1,2}",d=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",p=i.operators||s(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),g=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=s([u,c,d,h],"'"),b=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],w=["end","else","elseif","catch","finally"],D=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],E=["true","false","nothing","NaN","Inf"];t.registerHelper("hintWords","julia",D.concat(E));var S=s(b),z=s(w),A=s(D),R=s(E),U=/^@[_A-Za-z][\w]*/,Y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,B=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function G(I){return I.nestedArrays>0}function ee(I){return I.nestedGenerators>0}function J(I,H){return typeof H=="undefined"&&(H=0),I.scopes.length<=H?null:I.scopes[I.scopes.length-(H+1)]}function O(I,H){if(I.match(/^#=/,!1))return H.tokenize=V,H.tokenize(I,H);var se=H.leavingExpr;if(I.sol()&&(se=!1),H.leavingExpr=!1,se&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var F=I.peek();if(F==="#")return I.skipToEnd(),"comment";if(F==="["&&(H.scopes.push("["),H.nestedArrays++),F==="("&&(H.scopes.push("("),H.nestedGenerators++),G(H)&&F==="]"){for(;H.scopes.length&&J(H)!=="[";)H.scopes.pop();H.scopes.pop(),H.nestedArrays--,H.leavingExpr=!0}if(ee(H)&&F===")"){for(;H.scopes.length&&J(H)!=="(";)H.scopes.pop();H.scopes.pop(),H.nestedGenerators--,H.leavingExpr=!0}if(G(H)){if(H.lastToken=="end"&&I.match(/^:/))return"operator";if(I.match(/^end/))return"number"}var T;if((T=I.match(S,!1))&&H.scopes.push(T[0]),I.match(z,!1)&&H.scopes.pop(),I.match(/^::(?![:\$])/))return H.tokenize=_,H.tokenize(I,H);if(!se&&I.match(Y)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(p))return"operator";if(I.match(/^\.?\d/,!1)){var de=RegExp(/^im\b/),ce=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(ce=!0),I.match(/^0x[0-9a-f_]+/i)&&(ce=!0),I.match(/^0b[01_]+/i)&&(ce=!0),I.match(/^0o[0-7_]+/i)&&(ce=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(ce=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(ce=!0),ce)return I.match(de),H.leavingExpr=!0,"number"}if(I.match(/^'/))return H.tokenize=j,H.tokenize(I,H);if(I.match(B))return H.tokenize=Q(I.current()),H.tokenize(I,H);if(I.match(U))return"meta";if(I.match(g))return null;if(I.match(A))return"keyword";if(I.match(R))return"builtin";var oe=H.isDefinition||H.lastToken=="function"||H.lastToken=="macro"||H.lastToken=="type"||H.lastToken=="struct"||H.lastToken=="immutable";return I.match(y)?oe?I.peek()==="."?(H.isDefinition=!0,"variable"):(H.isDefinition=!1,"def"):I.match(/^({[^}]*})*\(/,!1)?(H.tokenize=Z,H.tokenize(I,H)):(H.leavingExpr=!0,"variable"):(I.next(),"error")}function Z(I,H){var se=I.match(/^(\(\s*)/);if(se&&(H.firstParenPos<0&&(H.firstParenPos=H.scopes.length),H.scopes.push("("),H.charsAdvanced+=se[1].length),J(H)=="("&&I.match(/^\)/)&&(H.scopes.pop(),H.charsAdvanced+=1,H.scopes.length<=H.firstParenPos)){var F=I.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return I.backUp(H.charsAdvanced),H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=O,F?"def":"builtin"}if(I.match(/^$/g,!1)){for(I.backUp(H.charsAdvanced);H.scopes.length>H.firstParenPos;)H.scopes.pop();return H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=O,"builtin"}return H.charsAdvanced+=I.match(/^([^()]*)/)[1].length,H.tokenize(I,H)}function _(I,H){return I.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),I.match(/^{/)?H.nestedParameters++:I.match(/^}/)&&H.nestedParameters>0&&H.nestedParameters--,H.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():H.nestedParameters==0&&(H.tokenize=O),"builtin"}function V(I,H){return I.match(/^#=/)&&H.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match(/^=#/)&&(H.nestedComments--,H.nestedComments==0&&(H.tokenize=O)),"comment"}function j(I,H){var se=!1,F;if(I.match(m))se=!0;else if(F=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var T=parseInt(F[1],16);(T<=55295||T>=57344)&&(se=!0,I.next())}else if(F=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var T=parseInt(F[1],16);T<=1114111&&(se=!0,I.next())}return se?(H.leavingExpr=!0,H.tokenize=O,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match(/^'/)&&(H.tokenize=O),"error")}function Q(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function H(se,F){if(se.eat("\\"))se.next();else{if(se.match(I))return F.tokenize=O,F.leavingExpr=!0,"string";se.eat(/[`"]/)}return se.eatWhile(/[^\\`"]/),"string"}return H}var q={startState:function(){return{tokenize:O,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(I,H){var se=H.tokenize(I,H),F=I.current();return F&&se&&(H.lastToken=F),se},indent:function(I,H){var se=0;return(H==="]"||H===")"||/^end\b/.test(H)||/^else/.test(H)||/^catch\b/.test(H)||/^elseif\b/.test(H)||/^finally/.test(H))&&(se=-1),(I.scopes.length+se)*n.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return q}),t.defineMIME("text/x-julia","julia")})});var Ed=ue((Cd,Sd)=>{(function(t){typeof Cd=="object"&&typeof Sd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("lua",function(n,i){var s=n.indentUnit;function u(S){return new RegExp("^(?:"+S.join("|")+")","i")}function c(S){return new RegExp("^(?:"+S.join("|")+")$","i")}var d=c(i.specials||[]),h=c(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),p=c(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),g=c(["function","if","repeat","do","\\(","{"]),y=c(["end","until","\\)","}"]),m=u(["end","until","\\)","}","else","elseif"]);function b(S){for(var z=0;S.eat("=");)++z;return S.eat("["),z}function w(S,z){var A=S.next();return A=="-"&&S.eat("-")?S.eat("[")&&S.eat("[")?(z.cur=D(b(S),"comment"))(S,z):(S.skipToEnd(),"comment"):A=='"'||A=="'"?(z.cur=E(A))(S,z):A=="["&&/[\[=]/.test(S.peek())?(z.cur=D(b(S),"string"))(S,z):/\d/.test(A)?(S.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(A)?(S.eatWhile(/[\w\\\-_.]/),"variable"):null}function D(S,z){return function(A,R){for(var U=null,Y;(Y=A.next())!=null;)if(U==null)Y=="]"&&(U=0);else if(Y=="=")++U;else if(Y=="]"&&U==S){R.cur=w;break}else U=null;return z}}function E(S){return function(z,A){for(var R=!1,U;(U=z.next())!=null&&!(U==S&&!R);)R=!R&&U=="\\";return R||(A.cur=w),"string"}}return{startState:function(S){return{basecol:S||0,indentDepth:0,cur:w}},token:function(S,z){if(S.eatSpace())return null;var A=z.cur(S,z),R=S.current();return A=="variable"&&(p.test(R)?A="keyword":h.test(R)?A="builtin":d.test(R)&&(A="variable-2")),A!="comment"&&A!="string"&&(g.test(R)?++z.indentDepth:y.test(R)&&--z.indentDepth),A},indent:function(S,z){var A=m.test(z);return S.basecol+s*(S.indentDepth-(A?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),t.defineMIME("text/x-lua","lua")})});var Td=ue((Dd,Ad)=>{(function(t){typeof Dd=="object"&&typeof Ad=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var n=0;n<t.modeInfo.length;n++){var i=t.modeInfo[n];i.mimes&&(i.mime=i.mimes[0])}t.findModeByMIME=function(s){s=s.toLowerCase();for(var u=0;u<t.modeInfo.length;u++){var c=t.modeInfo[u];if(c.mime==s)return c;if(c.mimes){for(var d=0;d<c.mimes.length;d++)if(c.mimes[d]==s)return c}}if(/\+xml$/.test(s))return t.findModeByMIME("application/xml");if(/\+json$/.test(s))return t.findModeByMIME("application/json")},t.findModeByExtension=function(s){s=s.toLowerCase();for(var u=0;u<t.modeInfo.length;u++){var c=t.modeInfo[u];if(c.ext){for(var d=0;d<c.ext.length;d++)if(c.ext[d]==s)return c}}},t.findModeByFileName=function(s){for(var u=0;u<t.modeInfo.length;u++){var c=t.modeInfo[u];if(c.file&&c.file.test(s))return c}var d=s.lastIndexOf("."),h=d>-1&&s.substring(d+1,s.length);if(h)return t.findModeByExtension(h)},t.findModeByName=function(s){s=s.toLowerCase();for(var u=0;u<t.modeInfo.length;u++){var c=t.modeInfo[u];if(c.name.toLowerCase()==s)return c;if(c.alias){for(var d=0;d<c.alias.length;d++)if(c.alias[d].toLowerCase()==s)return c}}}})});var Fd=ue((Ld,Id)=>{(function(t){typeof Ld=="object"&&typeof Id=="object"?t(Ze(),ta(),Td()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("markdown",function(n,i){var s=t.getMode(n,"text/html"),u=s.name=="null";function c(F){if(t.findModeByName){var T=t.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var de=t.getMode(n,F);return de.name=="null"?null:de}i.highlightFormatting===void 0&&(i.highlightFormatting=!1),i.maxBlockquoteDepth===void 0&&(i.maxBlockquoteDepth=0),i.taskLists===void 0&&(i.taskLists=!1),i.strikethrough===void 0&&(i.strikethrough=!1),i.emoji===void 0&&(i.emoji=!1),i.fencedCodeBlockHighlighting===void 0&&(i.fencedCodeBlockHighlighting=!0),i.fencedCodeBlockDefaultMode===void 0&&(i.fencedCodeBlockDefaultMode="text/plain"),i.xml===void 0&&(i.xml=!0),i.tokenTypeOverrides===void 0&&(i.tokenTypeOverrides={});var d={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in d)d.hasOwnProperty(h)&&i.tokenTypeOverrides[h]&&(d[h]=i.tokenTypeOverrides[h]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,b=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,S=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,z=" ";function A(F,T,de){return T.f=T.inline=de,de(F,T)}function R(F,T,de){return T.f=T.block=de,de(F,T)}function U(F){return!F||!/\S/.test(F.string)}function Y(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==G){var T=u;if(!T){var de=t.innerMode(s,F.htmlState);T=de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText}T&&(F.f=Z,F.block=B,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function B(F,T){var de=F.column()===T.indentation,ce=U(T.prevLine.stream),oe=T.indentedCode,xe=T.prevLine.hr,Oe=T.list!==!1,ye=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var re=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,Oe)){for(T.list=null;re<T.listStack[T.listStack.length-1];)T.listStack.pop(),T.listStack.length?T.indentation=T.listStack[T.listStack.length-1]:T.list=!1;T.list!==!1&&(T.indentationDiff=re-T.listStack[T.listStack.length-1])}var we=!ce&&!xe&&!T.prevLine.header&&(!Oe||!oe)&&!T.prevLine.fencedCodeEnd,De=(T.list===!1||xe||ce)&&T.indentation<=ye&&F.match(p),Pe=null;if(T.indentationDiff>=4&&(oe||T.prevLine.fencedCodeEnd||T.prevLine.header||ce))return F.skipToEnd(),T.indentedCode=!0,d.code;if(F.eatSpace())return null;if(de&&T.indentation<=ye&&(Pe=F.match(m))&&Pe[1].length<=6)return T.quote=0,T.header=Pe[1].length,T.thisLine.header=!0,i.highlightFormatting&&(T.formatting="header"),T.f=T.inline,J(T);if(T.indentation<=ye&&F.eat(">"))return T.quote=de?1:T.quote+1,i.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),J(T);if(!De&&!T.setext&&de&&T.indentation<=ye&&(Pe=F.match(g))){var rt=Pe[1]?"ol":"ul";return T.indentation=re+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,i.taskLists&&F.match(y,!1)&&(T.taskList=!0),T.f=T.inline,i.highlightFormatting&&(T.formatting=["list","list-"+rt]),J(T)}else{if(de&&T.indentation<=ye&&(Pe=F.match(D,!0)))return T.quote=0,T.fencedEndRE=new RegExp(Pe[1]+"+ *$"),T.localMode=i.fencedCodeBlockHighlighting&&c(Pe[2]||i.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=t.startState(T.localMode)),T.f=T.block=ee,i.highlightFormatting&&(T.formatting="code-block"),T.code=-1,J(T);if(T.setext||(!we||!Oe)&&!T.quote&&T.list===!1&&!T.code&&!De&&!E.test(F.string)&&(Pe=F.lookAhead(1))&&(Pe=Pe.match(b)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),i.highlightFormatting&&(T.formatting="header")):(T.header=Pe[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,J(T);if(De)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,d.hr;if(F.peek()==="[")return A(F,T,q)}return A(F,T,T.inline)}function G(F,T){var de=s.token(F,T.htmlState);if(!u){var ce=t.innerMode(s,T.htmlState);(ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=Z,T.block=B,T.htmlState=null)}return de}function ee(F,T){var de=T.listStack[T.listStack.length-1]||0,ce=T.indentation<de,oe=de+3;if(T.fencedEndRE&&T.indentation<=oe&&(ce||F.match(T.fencedEndRE))){i.highlightFormatting&&(T.formatting="code-block");var xe;return ce||(xe=J(T)),T.localMode=T.localState=null,T.block=B,T.f=Z,T.fencedEndRE=null,T.code=0,T.thisLine.fencedCodeEnd=!0,ce?R(F,T,T.block):xe}else return T.localMode?T.localMode.token(F,T.localState):(F.skipToEnd(),d.code)}function J(F){var T=[];if(F.formatting){T.push(d.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var de=0;de<F.formatting.length;de++)T.push(d.formatting+"-"+F.formatting[de]),F.formatting[de]==="header"&&T.push(d.formatting+"-"+F.formatting[de]+"-"+F.header),F.formatting[de]==="quote"&&(!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.formatting+"-"+F.formatting[de]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(d.linkHref,"url"):(F.strong&&T.push(d.strong),F.em&&T.push(d.em),F.strikethrough&&T.push(d.strikethrough),F.emoji&&T.push(d.emoji),F.linkText&&T.push(d.linkText),F.code&&T.push(d.code),F.image&&T.push(d.image),F.imageAltText&&T.push(d.imageAltText,"link"),F.imageMarker&&T.push(d.imageMarker)),F.header&&T.push(d.header,d.header+"-"+F.header),F.quote&&(T.push(d.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.quote+"-"+F.quote):T.push(d.quote+"-"+i.maxBlockquoteDepth)),F.list!==!1){var ce=(F.listStack.length-1)%3;ce?ce===1?T.push(d.list2):T.push(d.list3):T.push(d.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function O(F,T){return F.match(w,!0)?J(T):void 0}function Z(F,T){var de=T.text(F,T);if(typeof de!="undefined")return de;if(T.list)return T.list=null,J(T);if(T.taskList){var ce=F.match(y,!0)[1]===" ";return ce?T.taskOpen=!0:T.taskClosed=!0,i.highlightFormatting&&(T.formatting="task"),T.taskList=!1,J(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return i.highlightFormatting&&(T.formatting="header"),J(T);var oe=F.next();if(T.linkTitle){T.linkTitle=!1;var xe=oe;oe==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(F.match(new RegExp(Oe),!0))return d.linkHref}if(oe==="`"){var ye=T.formatting;i.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var re=F.current().length;if(T.code==0&&(!T.quote||re==1))return T.code=re,J(T);if(re==T.code){var we=J(T);return T.code=0,we}else return T.formatting=ye,J(T)}else if(T.code)return J(T);if(oe==="\\"&&(F.next(),i.highlightFormatting)){var De=J(T),Pe=d.formatting+"-escape";return De?De+" "+Pe:Pe}if(oe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(oe==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(oe==="]"&&T.imageAltText){i.highlightFormatting&&(T.formatting="image");var De=J(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=V,De}if(oe==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,i.highlightFormatting&&(T.formatting="link")),J(T);if(oe==="]"&&T.linkText){i.highlightFormatting&&(T.formatting="link");var De=J(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?V:Z,De}if(oe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var De=J(T);return De?De+=" ":De="",De+d.linkInline}if(oe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var De=J(T);return De?De+=" ":De="",De+d.linkEmail}if(i.xml&&oe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var rt=F.string.indexOf(">",F.pos);if(rt!=-1){var Ce=F.string.substring(F.start,rt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ce)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=t.startState(s),R(F,T,G)}if(i.xml&&oe==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var nt=1,mt=F.pos==1?" ":F.string.charAt(F.pos-2);nt<3&&F.eat(oe);)nt++;var gt=F.peek()||" ",Wt=!/\s/.test(gt)&&(!S.test(gt)||/\s/.test(mt)||S.test(mt)),qe=!/\s/.test(mt)&&(!S.test(mt)||/\s/.test(gt)||S.test(gt)),X=null,le=null;if(nt%2&&(!T.em&&Wt&&(oe==="*"||!qe||S.test(mt))?X=!0:T.em==oe&&qe&&(oe==="*"||!Wt||S.test(gt))&&(X=!1)),nt>1&&(!T.strong&&Wt&&(oe==="*"||!qe||S.test(mt))?le=!0:T.strong==oe&&qe&&(oe==="*"||!Wt||S.test(gt))&&(le=!1)),le!=null||X!=null){i.highlightFormatting&&(T.formatting=X==null?"strong":le==null?"em":"strong em"),X===!0&&(T.em=oe),le===!0&&(T.strong=oe);var we=J(T);return X===!1&&(T.em=!1),le===!1&&(T.strong=!1),we}}else if(oe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return J(T);F.backUp(1)}if(i.strikethrough){if(oe==="~"&&F.eatWhile(oe)){if(T.strikethrough){i.highlightFormatting&&(T.formatting="strikethrough");var we=J(T);return T.strikethrough=!1,we}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,i.highlightFormatting&&(T.formatting="strikethrough"),J(T)}else if(oe===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return J(T);F.backUp(2)}}if(i.emoji&&oe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,i.highlightFormatting&&(T.formatting="emoji");var te=J(T);return T.emoji=!1,te}return oe===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),J(T)}function _(F,T){var de=F.next();if(de===">"){T.f=T.inline=Z,i.highlightFormatting&&(T.formatting="link");var ce=J(T);return ce?ce+=" ":ce="",ce+d.linkInline}return F.match(/^[^>]+/,!0),d.linkInline}function V(F,T){if(F.eatSpace())return null;var de=F.next();return de==="("||de==="["?(T.f=T.inline=Q(de==="("?")":"]"),i.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,J(T)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Q(F){return function(T,de){var ce=T.next();if(ce===F){de.f=de.inline=Z,i.highlightFormatting&&(de.formatting="link-string");var oe=J(de);return de.linkHref=!1,oe}return T.match(j[F]),de.linkHref=!0,J(de)}}function q(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=I,F.next(),i.highlightFormatting&&(T.formatting="link"),T.linkText=!0,J(T)):A(F,T,Z)}function I(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=H,i.highlightFormatting&&(T.formatting="link");var de=J(T);return T.linkText=!1,de}return F.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function H(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=Z,d.linkHref+" url")}var se={startState:function(){return{f:B,prevLine:{stream:null},thisLine:{stream:null},block:B,htmlState:null,indentation:0,inline:Z,text:O,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&t.copyState(s,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?t.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return Y(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=G)){var de=F.match(/^\s*/,!0)[0].replace(/\t/g,z).length;if(T.indentation=de,T.indentationDiff=null,de>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==G?{state:F.htmlState,mode:s}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:se}},indent:function(F,T,de){return F.block==G&&s.indent?s.indent(F.htmlState,T,de):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,de):t.Pass},blankLine:Y,getType:J,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return se},"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")})});var zd=ue((Md,qd)=>{(function(t){typeof Md=="object"&&typeof qd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("mllike",function(n,i){var s={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},u=i.extraWords||{};for(var c in u)u.hasOwnProperty(c)&&(s[c]=i.extraWords[c]);var d=[];for(var h in s)d.push(h);t.registerHelper("hintWords","mllike",d);function p(b,w){var D=b.next();if(D==='"')return w.tokenize=g,w.tokenize(b,w);if(D==="{"&&b.eat("|"))return w.longString=!0,w.tokenize=m,w.tokenize(b,w);if(D==="("&&b.eat("*"))return w.commentLevel++,w.tokenize=y,w.tokenize(b,w);if(D==="~"||D==="?")return b.eatWhile(/\w/),"variable-2";if(D==="`")return b.eatWhile(/\w/),"quote";if(D==="/"&&i.slashComments&&b.eat("/"))return b.skipToEnd(),"comment";if(/\d/.test(D))return D==="0"&&b.eat(/[bB]/)&&b.eatWhile(/[01]/),D==="0"&&b.eat(/[xX]/)&&b.eatWhile(/[0-9a-fA-F]/),D==="0"&&b.eat(/[oO]/)?b.eatWhile(/[0-7]/):(b.eatWhile(/[\d_]/),b.eat(".")&&b.eatWhile(/[\d]/),b.eat(/[eE]/)&&b.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(D))return"operator";if(/[\w\xa1-\uffff]/.test(D)){b.eatWhile(/[\w\xa1-\uffff]/);var E=b.current();return s.hasOwnProperty(E)?s[E]:"variable"}return null}function g(b,w){for(var D,E=!1,S=!1;(D=b.next())!=null;){if(D==='"'&&!S){E=!0;break}S=!S&&D==="\\"}return E&&!S&&(w.tokenize=p),"string"}function y(b,w){for(var D,E;w.commentLevel>0&&(E=b.next())!=null;)D==="("&&E==="*"&&w.commentLevel++,D==="*"&&E===")"&&w.commentLevel--,D=E;return w.commentLevel<=0&&(w.tokenize=p),"comment"}function m(b,w){for(var D,E;w.longString&&(E=b.next())!=null;)D==="|"&&E==="}"&&(w.longString=!1),D=E;return w.longString||(w.tokenize=p),"string"}return{startState:function(){return{tokenize:p,commentLevel:0,longString:!1}},token:function(b,w){return b.eatSpace()?null:w.tokenize(b,w)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),t.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),t.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),t.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})});var Pd=ue((Od,Rd)=>{(function(t){typeof Od=="object"&&typeof Rd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("nginx",function(n){function i(w){for(var D={},E=w.split(" "),S=0;S<E.length;++S)D[E[S]]=!0;return D}var s=i("break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"),u=i("http mail events server types location upstream charset_map limit_except if geo map"),c=i("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),d=n.indentUnit,h;function p(w,D){return h=D,w}function g(w,D){w.eatWhile(/[\w\$_]/);var E=w.current();if(s.propertyIsEnumerable(E))return"keyword";if(u.propertyIsEnumerable(E))return"variable-2";if(c.propertyIsEnumerable(E))return"string-2";var S=w.next();if(S=="@")return w.eatWhile(/[\w\\\-]/),p("meta",w.current());if(S=="/"&&w.eat("*"))return D.tokenize=y,y(w,D);if(S=="<"&&w.eat("!"))return D.tokenize=m,m(w,D);if(S=="=")p(null,"compare");else return(S=="~"||S=="|")&&w.eat("=")?p(null,"compare"):S=='"'||S=="'"?(D.tokenize=b(S),D.tokenize(w,D)):S=="#"?(w.skipToEnd(),p("comment","comment")):S=="!"?(w.match(/^\s*\w*/),p("keyword","important")):/\d/.test(S)?(w.eatWhile(/[\w.%]/),p("number","unit")):/[,.+>*\/]/.test(S)?p(null,"select-op"):/[;{}:\[\]]/.test(S)?p(null,S):(w.eatWhile(/[\w\\\-]/),p("variable","variable"))}function y(w,D){for(var E=!1,S;(S=w.next())!=null;){if(E&&S=="/"){D.tokenize=g;break}E=S=="*"}return p("comment","comment")}function m(w,D){for(var E=0,S;(S=w.next())!=null;){if(E>=2&&S==">"){D.tokenize=g;break}E=S=="-"?E+1:0}return p("comment","comment")}function b(w){return function(D,E){for(var S=!1,z;(z=D.next())!=null&&!(z==w&&!S);)S=!S&&z=="\\";return S||(E.tokenize=g),p("string","string")}}return{startState:function(w){return{tokenize:g,baseIndent:w||0,stack:[]}},token:function(w,D){if(w.eatSpace())return null;h=null;var E=D.tokenize(w,D),S=D.stack[D.stack.length-1];return h=="hash"&&S=="rule"?E="atom":E=="variable"&&(S=="rule"?E="number":(!S||S=="@media{")&&(E="tag")),S=="rule"&&/^[\{\};]$/.test(h)&&D.stack.pop(),h=="{"?S=="@media"?D.stack[D.stack.length-1]="@media{":D.stack.push("{"):h=="}"?D.stack.pop():h=="@media"?D.stack.push("@media"):S=="{"&&h!="comment"&&D.stack.push("rule"),E},indent:function(w,D){var E=w.stack.length;return/^\}/.test(D)&&(E-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+E*d},electricChars:"}"}}),t.defineMIME("text/x-nginx-conf","nginx")})});var jd=ue((Nd,Bd)=>{(function(t){typeof Nd=="object"&&typeof Bd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("perl",function(){var c={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},d="string-2",h=/[goseximacplud]/;function p(m,b,w,D,E){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(S,z){for(var A=!1,R,U=0;R=S.next();){if(R===w[U]&&!A)return w[++U]!==void 0?(z.chain=w[U],z.style=D,z.tail=E):E&&S.eatWhile(E),z.tokenize=y,D;A=!A&&R=="\\"}return D},b.tokenize(m,b)}function g(m,b,w){return b.tokenize=function(D,E){return D.string==w&&(E.tokenize=y),D.skipToEnd(),"string"},b.tokenize(m,b)}function y(m,b){if(m.eatSpace())return null;if(b.chain)return p(m,b,b.chain,b.style,b.tail);if(m.match(/^\-?[\d\.]/,!1)&&m.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(m.match(/^<<(?=\w)/))return m.eatWhile(/\w/),g(m,b,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return g(m,b,"=cut");var w=m.next();if(w=='"'||w=="'"){if(i(m,3)=="<<"+w){var D=m.pos;m.eatWhile(/\w/);var E=m.current().substr(1);if(E&&m.eat(w))return g(m,b,E);m.pos=D}return p(m,b,[w],"string")}if(w=="q"){var S=n(m,-2);if(!(S&&/\w/.test(S))){if(S=n(m,0),S=="x"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(S=="q"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"string");if(S=="[")return u(m,2),p(m,b,["]"],"string");if(S=="{")return u(m,2),p(m,b,["}"],"string");if(S=="<")return u(m,2),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"string")}else if(S=="w"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"bracket");if(S=="[")return u(m,2),p(m,b,["]"],"bracket");if(S=="{")return u(m,2),p(m,b,["}"],"bracket");if(S=="<")return u(m,2),p(m,b,[">"],"bracket");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"bracket")}else if(S=="r"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(/[\^'"!~\/(\[{<]/.test(S)){if(S=="(")return u(m,1),p(m,b,[")"],"string");if(S=="[")return u(m,1),p(m,b,["]"],"string");if(S=="{")return u(m,1),p(m,b,["}"],"string");if(S=="<")return u(m,1),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return p(m,b,[m.eat(S)],"string")}}}if(w=="m"){var S=n(m,-2);if(!(S&&/\w/.test(S))&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)){if(/[\^'"!~\/]/.test(S))return p(m,b,[S],d,h);if(S=="(")return p(m,b,[")"],d,h);if(S=="[")return p(m,b,["]"],d,h);if(S=="{")return p(m,b,["}"],d,h);if(S=="<")return p(m,b,[">"],d,h)}}if(w=="s"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="y"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="t"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat("r"),S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="`")return p(m,b,[w],"variable-2");if(w=="/")return/~\s*$/.test(i(m))?p(m,b,[w],d,h):"operator";if(w=="$"){var D=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=D}if(/[$@%]/.test(w)){var D=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(n(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var S=m.current();if(c[S])return"variable-2"}m.pos=D}if(/[$@%&]/.test(w)&&(m.eatWhile(/[\w$\[\]]/)||m.eat("{")&&m.eatWhile(/[\w$\[\]]/)&&m.eat("}"))){var S=m.current();return c[S]?"variable-2":"variable"}if(w=="#"&&n(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var D=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),c[m.current()])return"operator";m.pos=D}if(w=="_"&&m.pos==1){if(s(m,6)=="_END__")return p(m,b,["\0"],"comment");if(s(m,7)=="_DATA__")return p(m,b,["\0"],"variable-2");if(s(m,7)=="_C__")return p(m,b,["\0"],"string")}if(/\w/.test(w)){var D=m.pos;if(n(m,-2)=="{"&&(n(m,0)=="}"||m.eatWhile(/\w/)&&n(m,0)=="}"))return"string";m.pos=D}if(/[A-Z]/.test(w)){var z=n(m,-2),D=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(n(m,0)))m.pos=D;else{var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var z=n(m,-2);m.eatWhile(/\w/);var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,b){return(b.tokenize||y)(m,b)},lineComment:"#"}}),t.registerHelper("wordChars","perl",/[\w$]/),t.defineMIME("text/x-perl","perl");function n(c,d){return c.string.charAt(c.pos+(d||0))}function i(c,d){if(d){var h=c.pos-d;return c.string.substr(h>=0?h:0,d)}else return c.string.substr(0,c.pos-1)}function s(c,d){var h=c.string.length,p=h-c.pos+1;return c.string.substr(c.pos,d&&d<h?d:p)}function u(c,d){var h=c.pos+d,p;h<=0?c.pos=0:h>=(p=c.string.length-1)?c.pos=p:c.pos=h}})});var Wd=ue((Hd,Ud)=>{(function(t){typeof Hd=="object"&&typeof Ud=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("pascal",function(){function n(g){for(var y={},m=g.split(" "),b=0;b<m.length;++b)y[m[b]]=!0;return y}var i=n("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),s={null:!0},u=/[+\-*&%=<>!?|\/]/;function c(g,y){var m=g.next();if(m=="#"&&y.startOfLine)return g.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=d(m),y.tokenize(g,y);if(m=="("&&g.eat("*"))return y.tokenize=h,h(g,y);if(m=="{")return y.tokenize=p,p(g,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(m=="/"&&g.eat("/"))return g.skipToEnd(),"comment";if(u.test(m))return g.eatWhile(u),"operator";g.eatWhile(/[\w\$_]/);var b=g.current();return i.propertyIsEnumerable(b)?"keyword":s.propertyIsEnumerable(b)?"atom":"variable"}function d(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}function h(g,y){for(var m=!1,b;b=g.next();){if(b==")"&&m){y.tokenize=null;break}m=b=="*"}return"comment"}function p(g,y){for(var m;m=g.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||c)(g,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),t.defineMIME("text/x-pascal","pascal")})});var Kd=ue(($d,Gd)=>{(function(t){typeof $d=="object"&&typeof Gd=="object"?t(Ze(),Zs(),Ys()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],t):t(CodeMirror)})(function(t){"use strict";function n(g){for(var y={},m=g.split(" "),b=0;b<m.length;++b)y[m[b]]=!0;return y}function i(g,y,m){return g.length==0?s(y):function(b,w){for(var D=g[0],E=0;E<D.length;E++)if(b.match(D[E][0]))return w.tokenize=i(g.slice(1),y),D[E][1];return w.tokenize=s(y,m),"string"}}function s(g,y){return function(m,b){return u(m,b,g,y)}}function u(g,y,m,b){if(b!==!1&&g.match("${",!1)||g.match("{$",!1))return y.tokenize=null,"string";if(b!==!1&&g.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return g.match("[",!1)&&(y.tokenize=i([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],m,b)),g.match(/\-\>\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,b)),"variable-2";for(var w=!1;!g.eol()&&(w||b===!1||!g.match("{$",!1)&&!g.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&g.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}w=g.next()=="\\"&&!w}return"string"}var c="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",d="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";t.registerHelper("hintWords","php",[c,d,h].join(" ").split(" ")),t.registerHelper("wordChars","php",/[\w$]/);var p={name:"clike",helperType:"php",keywords:n(c),blockKeywords:n("catch do else elseif for foreach if switch try while finally"),defKeywords:n("class function interface namespace trait"),atoms:n(d),builtin:n(h),multiLineStrings:!0,hooks:{$:function(g){return g.eatWhile(/[\w\$_]/),"variable-2"},"<":function(g,y){var m;if(m=g.match(/<<\s*/)){var b=g.eat(/['"]/);g.eatWhile(/[\w\.]/);var w=g.current().slice(m[0].length+(b?2:1));if(b&&g.eat(b),w)return(y.tokStack||(y.tokStack=[])).push(w,0),y.tokenize=s(w,b!="'"),"string"}return!1},"#":function(g){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"},"/":function(g){if(g.eat("/")){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"}return!1},'"':function(g,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=s('"'),"string"},"{":function(g,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(g,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=s(y.tokStack[y.tokStack.length-2])),!1}}};t.defineMode("php",function(g,y){var m=t.getMode(g,y&&y.htmlMode||"text/html"),b=t.getMode(g,p);function w(D,E){var S=E.curMode==b;if(D.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),S)return S&&E.php.tokenize==null&&D.match("?>")?(E.curMode=m,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):b.token(D,E.curState);if(D.match(/^<\?\w*/))return E.curMode=b,E.php||(E.php=t.startState(b,m.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!D.eol()&&D.next()!=E.pending;);var z="string"}else if(E.pending&&D.pos<E.pending.end){D.pos=E.pending.end;var z=E.pending.style}else var z=m.token(D,E.curState);E.pending&&(E.pending=null);var A=D.current(),R=A.search(/<\?/),U;return R!=-1&&(z=="string"&&(U=A.match(/[\'\"]$/))&&!/\?>/.test(A)?E.pending=U[0]:E.pending={end:D.pos,style:z},D.backUp(A.length-R)),z}return{startState:function(){var D=t.startState(m),E=y.startOpen?t.startState(b):null;return{html:D,php:E,curMode:y.startOpen?b:m,curState:y.startOpen?E:D,pending:null}},copyState:function(D){var E=D.html,S=t.copyState(m,E),z=D.php,A=z&&t.copyState(b,z),R;return D.curMode==m?R=S:R=A,{html:S,php:A,curMode:D.curMode,curState:R,pending:D.pending}},token:w,indent:function(D,E,S){return D.curMode!=b&&/^\s*<\//.test(E)||D.curMode==b&&/^\?>/.test(E)?m.indent(D.html,E,S):D.curMode.indent(D.curState,E,S)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(D){return{state:D.curState,mode:D.curMode}}}},"htmlmixed","clike"),t.defineMIME("application/x-httpd-php","php"),t.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),t.defineMIME("text/x-php",p)})});var Xd=ue((Vd,Yd)=>{(function(t){"use strict";typeof Vd=="object"&&typeof Yd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(window.CodeMirror)})(function(t){"use strict";t.defineMode("powershell",function(){function n(_,V){V=V||{};for(var j=V.prefix!==void 0?V.prefix:"^",Q=V.suffix!==void 0?V.suffix:"\\b",q=0;q<_.length;q++)_[q]instanceof RegExp?_[q]=_[q].source:_[q]=_[q].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(j+"("+_.join("|")+")"+Q,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",s=/[\w\-:]/,u=n([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:i}),c=/[\[\]{},;`\\\.]|@[({]/,d=n(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),h=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,p=n([d,h],{suffix:""}),g=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,m=/[A-Z]:|%|\?/i,b=n([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),w=n([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),D=n([m,b,w],{suffix:i}),E={keyword:u,number:g,operator:p,builtin:D,punctuation:c,identifier:y};function S(_,V){var j=V.returnStack[V.returnStack.length-1];if(j&&j.shouldReturnFrom(V))return V.tokenize=j.tokenize,V.returnStack.pop(),V.tokenize(_,V);if(_.eatSpace())return null;if(_.eat("("))return V.bracketNesting+=1,"punctuation";if(_.eat(")"))return V.bracketNesting-=1,"punctuation";for(var Q in E)if(_.match(E[Q]))return Q;var q=_.next();if(q==="'")return z(_,V);if(q==="$")return ee(_,V);if(q==='"')return A(_,V);if(q==="<"&&_.eat("#"))return V.tokenize=G,G(_,V);if(q==="#")return _.skipToEnd(),"comment";if(q==="@"){var I=_.eat(/["']/);if(I&&_.eol())return V.tokenize=O,V.startQuote=I[0],O(_,V);if(_.eol())return"error";if(_.peek().match(/[({]/))return"punctuation";if(_.peek().match(s))return ee(_,V)}return"error"}function z(_,V){for(var j;(j=_.peek())!=null;)if(_.next(),j==="'"&&!_.eat("'"))return V.tokenize=S,"string";return"error"}function A(_,V){for(var j;(j=_.peek())!=null;){if(j==="$")return V.tokenize=R,"string";if(_.next(),j==="`"){_.next();continue}if(j==='"'&&!_.eat('"'))return V.tokenize=S,"string"}return"error"}function R(_,V){return B(_,V,A)}function U(_,V){return V.tokenize=O,V.startQuote='"',O(_,V)}function Y(_,V){return B(_,V,U)}function B(_,V,j){if(_.match("$(")){var Q=V.bracketNesting;return V.returnStack.push({shouldReturnFrom:function(q){return q.bracketNesting===Q},tokenize:j}),V.tokenize=S,V.bracketNesting+=1,"punctuation"}else return _.next(),V.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:j}),V.tokenize=ee,V.tokenize(_,V)}function G(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(j&&Q==">"){V.tokenize=S;break}j=Q==="#"}return"comment"}function ee(_,V){var j=_.peek();return _.eat("{")?(V.tokenize=J,J(_,V)):j!=null&&j.match(s)?(_.eatWhile(s),V.tokenize=S,"variable-2"):(V.tokenize=S,"error")}function J(_,V){for(var j;(j=_.next())!=null;)if(j==="}"){V.tokenize=S;break}return"variable-2"}function O(_,V){var j=V.startQuote;if(_.sol()&&_.match(new RegExp(j+"@")))V.tokenize=S;else if(j==='"')for(;!_.eol();){var Q=_.peek();if(Q==="$")return V.tokenize=Y,"string";_.next(),Q==="`"&&_.next()}else _.skipToEnd();return"string"}var Z={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:S}},token:function(_,V){return V.tokenize(_,V)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return Z}),t.defineMIME("application/x-powershell","powershell")})});var Jd=ue((Zd,Qd)=>{(function(t){typeof Zd=="object"&&typeof Qd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("properties",function(){return{token:function(n,i){var s=n.sol()||i.afterSection,u=n.eol();if(i.afterSection=!1,s&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),u&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),s)for(;n.eatSpace(););var c=n.next();return s&&(c==="#"||c==="!"||c===";")?(i.position="comment",n.skipToEnd(),"comment"):s&&c==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):c==="="||c===":"?(i.position="quote",null):(c==="\\"&&i.position==="quote"&&(n.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),t.defineMIME("text/x-properties","properties"),t.defineMIME("text/x-ini","properties")})});var nh=ue((eh,th)=>{(function(t){typeof eh=="object"&&typeof th=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var i=n(["and","or","not","is"]),s=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],u=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];t.registerHelper("hintWords","python",s.concat(u));function c(h){return h.scopes[h.scopes.length-1]}t.defineMode("python",function(h,p){for(var g="error",y=p.delimiters||p.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[p.singleOperators,p.doubleOperators,p.doubleDelimiters,p.tripleDelimiters,p.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],b=0;b<m.length;b++)m[b]||m.splice(b--,1);var w=p.hangingIndent||h.indentUnit,D=s,E=u;p.extra_keywords!=null&&(D=D.concat(p.extra_keywords)),p.extra_builtins!=null&&(E=E.concat(p.extra_builtins));var S=!(p.version&&Number(p.version)<3);if(S){var z=p.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;D=D.concat(["nonlocal","False","True","None","async","await"]),E=E.concat(["ascii","bytes","exec","print"]);var A=new RegExp(`^(([rbuf]|(br)|(fr))?('{3}|"{3}|['"]))`,"i")}else{var z=p.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;D=D.concat(["exec","print"]),E=E.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);var A=new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var R=n(D),U=n(E);function Y(j,Q){var q=j.sol()&&Q.lastToken!="\\";if(q&&(Q.indent=j.indentation()),q&&c(Q).type=="py"){var I=c(Q).offset;if(j.eatSpace()){var H=j.indentation();return H>I?J(Q):H<I&&Z(j,Q)&&j.peek()!="#"&&(Q.errorToken=!0),null}else{var se=B(j,Q);return I>0&&Z(j,Q)&&(se+=" "+g),se}}return B(j,Q)}function B(j,Q,q){if(j.eatSpace())return null;if(!q&&j.match(/^#.*/))return"comment";if(j.match(/^[0-9\.]/,!1)){var I=!1;if(j.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(I=!0),j.match(/^[\d_]+\.\d*/)&&(I=!0),j.match(/^\.\d+/)&&(I=!0),I)return j.eat(/J/i),"number";var H=!1;if(j.match(/^0x[0-9a-f_]+/i)&&(H=!0),j.match(/^0b[01_]+/i)&&(H=!0),j.match(/^0o[0-7_]+/i)&&(H=!0),j.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(j.eat(/J/i),H=!0),j.match(/^0(?![\dx])/i)&&(H=!0),H)return j.eat(/L/i),"number"}if(j.match(A)){var se=j.current().toLowerCase().indexOf("f")!==-1;return se?(Q.tokenize=G(j.current(),Q.tokenize),Q.tokenize(j,Q)):(Q.tokenize=ee(j.current(),Q.tokenize),Q.tokenize(j,Q))}for(var F=0;F<m.length;F++)if(j.match(m[F]))return"operator";return j.match(y)?"punctuation":Q.lastToken=="."&&j.match(z)?"property":j.match(R)||j.match(i)?"keyword":j.match(U)?"builtin":j.match(/^(self|cls)\b/)?"variable-2":j.match(z)?Q.lastToken=="def"||Q.lastToken=="class"?"def":"variable":(j.next(),q?null:g)}function G(j,Q){for(;"rubf".indexOf(j.charAt(0).toLowerCase())>=0;)j=j.substr(1);var q=j.length==1,I="string";function H(F){return function(T,de){var ce=B(T,de,!0);return ce=="punctuation"&&(T.current()=="{"?de.tokenize=H(F+1):T.current()=="}"&&(F>1?de.tokenize=H(F-1):de.tokenize=se)),ce}}function se(F,T){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),q&&F.eol())return I}else{if(F.match(j))return T.tokenize=Q,I;if(F.match("{{"))return I;if(F.match("{",!1))return T.tokenize=H(0),F.current()?I:T.tokenize(F,T);if(F.match("}}"))return I;if(F.match("}"))return g;F.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;T.tokenize=Q}return I}return se.isString=!0,se}function ee(j,Q){for(;"rubf".indexOf(j.charAt(0).toLowerCase())>=0;)j=j.substr(1);var q=j.length==1,I="string";function H(se,F){for(;!se.eol();)if(se.eatWhile(/[^'"\\]/),se.eat("\\")){if(se.next(),q&&se.eol())return I}else{if(se.match(j))return F.tokenize=Q,I;se.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;F.tokenize=Q}return I}return H.isString=!0,H}function J(j){for(;c(j).type!="py";)j.scopes.pop();j.scopes.push({offset:c(j).offset+h.indentUnit,type:"py",align:null})}function O(j,Q,q){var I=j.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:j.column()+1;Q.scopes.push({offset:Q.indent+w,type:q,align:I})}function Z(j,Q){for(var q=j.indentation();Q.scopes.length>1&&c(Q).offset>q;){if(c(Q).type!="py")return!0;Q.scopes.pop()}return c(Q).offset!=q}function _(j,Q){j.sol()&&(Q.beginningOfLine=!0);var q=Q.tokenize(j,Q),I=j.current();if(Q.beginningOfLine&&I=="@")return j.match(z,!1)?"meta":S?"operator":g;if(/\S/.test(I)&&(Q.beginningOfLine=!1),(q=="variable"||q=="builtin")&&Q.lastToken=="meta"&&(q="meta"),(I=="pass"||I=="return")&&(Q.dedent+=1),I=="lambda"&&(Q.lambda=!0),I==":"&&!Q.lambda&&c(Q).type=="py"&&J(Q),I.length==1&&!/string|comment/.test(q)){var H="[({".indexOf(I);if(H!=-1&&O(j,Q,"])}".slice(H,H+1)),H="])}".indexOf(I),H!=-1)if(c(Q).type==I)Q.indent=Q.scopes.pop().offset-w;else return g}return Q.dedent>0&&j.eol()&&c(Q).type=="py"&&(Q.scopes.length>1&&Q.scopes.pop(),Q.dedent-=1),q}var V={startState:function(j){return{tokenize:Y,scopes:[{offset:j||0,type:"py",align:null}],indent:j||0,lastToken:null,lambda:!1,dedent:0}},token:function(j,Q){var q=Q.errorToken;q&&(Q.errorToken=!1);var I=_(j,Q);return I&&I!="comment"&&(Q.lastToken=I=="keyword"||I=="punctuation"?j.current():I),I=="punctuation"&&(I=null),j.eol()&&Q.lambda&&(Q.lambda=!1),q?I+" "+g:I},indent:function(j,Q){if(j.tokenize!=Y)return j.tokenize.isString?t.Pass:0;var q=c(j),I=q.type==Q.charAt(0);return q.align!=null?q.align-(I?1:0):q.offset-(I?w:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return V}),t.defineMIME("text/x-python","python");var d=function(h){return h.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:d("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var oh=ue((rh,ih)=>{(function(t){typeof rh=="object"&&typeof ih=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(p){for(var g={},y=0,m=p.length;y<m;++y)g[p[y]]=!0;return g}var i=["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"],s=n(i),u=n(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),c=n(["end","until"]),d={"[":"]","{":"}","(":")"},h={"]":"[","}":"{",")":"("};t.defineMode("ruby",function(p){var g;function y(A,R,U){return U.tokenize.push(A),A(R,U)}function m(A,R){if(A.sol()&&A.match("=begin")&&A.eol())return R.tokenize.push(z),"comment";if(A.eatSpace())return null;var U=A.next(),Y;if(U=="`"||U=="'"||U=='"')return y(E(U,"string",U=='"'||U=="`"),A,R);if(U=="/")return b(A)?y(E(U,"string-2",!0),A,R):"operator";if(U=="%"){var B="string",G=!0;A.eat("s")?B="atom":A.eat(/[WQ]/)?B="string":A.eat(/[r]/)?B="string-2":A.eat(/[wxq]/)&&(B="string",G=!1);var ee=A.eat(/[^\w\s=]/);return ee?(d.propertyIsEnumerable(ee)&&(ee=d[ee]),y(E(ee,B,G,!0),A,R)):"operator"}else{if(U=="#")return A.skipToEnd(),"comment";if(U=="<"&&(Y=A.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return y(S(Y[2],Y[1]),A,R);if(U=="0")return A.eat("x")?A.eatWhile(/[\da-fA-F]/):A.eat("b")?A.eatWhile(/[01]/):A.eatWhile(/[0-7]/),"number";if(/\d/.test(U))return A.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(U=="?"){for(;A.match(/^\\[CM]-/););return A.eat("\\")?A.eatWhile(/\w/):A.next(),"string"}else{if(U==":")return A.eat("'")?y(E("'","atom",!1),A,R):A.eat('"')?y(E('"',"atom",!0),A,R):A.eat(/[\<\>]/)?(A.eat(/[\<\>]/),"atom"):A.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":A.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(A.eatWhile(/[\w$\xa1-\uffff]/),A.eat(/[\?\!\=]/),"atom"):"operator";if(U=="@"&&A.match(/^@?[a-zA-Z_\xa1-\uffff]/))return A.eat("@"),A.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(U=="$")return A.eat(/[a-zA-Z_]/)?A.eatWhile(/[\w]/):A.eat(/\d/)?A.eat(/\d/):A.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(U))return A.eatWhile(/[\w\xa1-\uffff]/),A.eat(/[\?\!]/),A.eat(":")?"atom":"ident";if(U=="|"&&(R.varList||R.lastTok=="{"||R.lastTok=="do"))return g="|",null;if(/[\(\)\[\]{}\\;]/.test(U))return g=U,null;if(U=="-"&&A.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(U)){var J=A.eatWhile(/[=+\-\/*:\.^%<>~|]/);return U=="."&&!J&&(g="."),"operator"}else return null}}}function b(A){for(var R=A.pos,U=0,Y,B=!1,G=!1;(Y=A.next())!=null;)if(G)G=!1;else{if("[{(".indexOf(Y)>-1)U++;else if("]})".indexOf(Y)>-1){if(U--,U<0)break}else if(Y=="/"&&U==0){B=!0;break}G=Y=="\\"}return A.backUp(A.pos-R),B}function w(A){return A||(A=1),function(R,U){if(R.peek()=="}"){if(A==1)return U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U);U.tokenize[U.tokenize.length-1]=w(A-1)}else R.peek()=="{"&&(U.tokenize[U.tokenize.length-1]=w(A+1));return m(R,U)}}function D(){var A=!1;return function(R,U){return A?(U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U)):(A=!0,m(R,U))}}function E(A,R,U,Y){return function(B,G){var ee=!1,J;for(G.context.type==="read-quoted-paused"&&(G.context=G.context.prev,B.eat("}"));(J=B.next())!=null;){if(J==A&&(Y||!ee)){G.tokenize.pop();break}if(U&&J=="#"&&!ee){if(B.eat("{")){A=="}"&&(G.context={prev:G.context,type:"read-quoted-paused"}),G.tokenize.push(w());break}else if(/[@\$]/.test(B.peek())){G.tokenize.push(D());break}}ee=!ee&&J=="\\"}return R}}function S(A,R){return function(U,Y){return R&&U.eatSpace(),U.match(A)?Y.tokenize.pop():U.skipToEnd(),"string"}}function z(A,R){return A.sol()&&A.match("=end")&&A.eol()&&R.tokenize.pop(),A.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-p.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(A,R){g=null,A.sol()&&(R.indented=A.indentation());var U=R.tokenize[R.tokenize.length-1](A,R),Y,B=g;if(U=="ident"){var G=A.current();U=R.lastTok=="."?"property":s.propertyIsEnumerable(A.current())?"keyword":/^[A-Z]/.test(G)?"tag":R.lastTok=="def"||R.lastTok=="class"||R.varList?"def":"variable",U=="keyword"&&(B=G,u.propertyIsEnumerable(G)?Y="indent":c.propertyIsEnumerable(G)?Y="dedent":((G=="if"||G=="unless")&&A.column()==A.indentation()||G=="do"&&R.context.indented<R.indented)&&(Y="indent"))}return(g||U&&U!="comment")&&(R.lastTok=B),g=="|"&&(R.varList=!R.varList),Y=="indent"||/[\(\[\{]/.test(g)?R.context={prev:R.context,type:g||U,indented:R.indented}:(Y=="dedent"||/[\)\]\}]/.test(g))&&R.context.prev&&(R.context=R.context.prev),A.eol()&&(R.continuedLine=g=="\\"||U=="operator"),U},indent:function(A,R){if(A.tokenize[A.tokenize.length-1]!=m)return t.Pass;var U=R&&R.charAt(0),Y=A.context,B=Y.type==h[U]||Y.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(R);return Y.indented+(B?0:p.indentUnit)+(A.continuedLine?p.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-ruby","ruby"),t.registerHelper("hintWords","ruby",i)})});var lh=ue((ah,sh)=>{(function(t){typeof ah=="object"&&typeof sh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode=function(y,m){t.defineMode(y,function(b){return t.simpleMode(b,m)})},t.simpleMode=function(y,m){n(m,"start");var b={},w=m.meta||{},D=!1;for(var E in m)if(E!=w&&m.hasOwnProperty(E))for(var S=b[E]=[],z=m[E],A=0;A<z.length;A++){var R=z[A];S.push(new u(R,m)),(R.indent||R.dedent)&&(D=!0)}var U={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:D?[]:null}},copyState:function(B){var G={state:B.state,pending:B.pending,local:B.local,localState:null,indent:B.indent&&B.indent.slice(0)};B.localState&&(G.localState=t.copyState(B.local.mode,B.localState)),B.stack&&(G.stack=B.stack.slice(0));for(var ee=B.persistentStates;ee;ee=ee.next)G.persistentStates={mode:ee.mode,spec:ee.spec,state:ee.state==B.localState?G.localState:t.copyState(ee.mode,ee.state),next:G.persistentStates};return G},token:c(b,y),innerMode:function(B){return B.local&&{mode:B.local.mode,state:B.localState}},indent:g(b,w)};if(w)for(var Y in w)w.hasOwnProperty(Y)&&(U[Y]=w[Y]);return U};function n(y,m){if(!y.hasOwnProperty(m))throw new Error("Undefined state "+m+" in simple mode")}function i(y,m){if(!y)return/(?:)/;var b="";return y instanceof RegExp?(y.ignoreCase&&(b="i"),y=y.source):y=String(y),new RegExp((m===!1?"":"^")+"(?:"+y+")",b)}function s(y){if(!y)return null;if(y.apply)return y;if(typeof y=="string")return y.replace(/\./g," ");for(var m=[],b=0;b<y.length;b++)m.push(y[b]&&y[b].replace(/\./g," "));return m}function u(y,m){(y.next||y.push)&&n(m,y.next||y.push),this.regex=i(y.regex),this.token=s(y.token),this.data=y}function c(y,m){return function(b,w){if(w.pending){var D=w.pending.shift();return w.pending.length==0&&(w.pending=null),b.pos+=D.text.length,D.token}if(w.local)if(w.local.end&&b.match(w.local.end)){var E=w.local.endToken||null;return w.local=w.localState=null,E}else{var E=w.local.mode.token(b,w.localState),S;return w.local.endScan&&(S=w.local.endScan.exec(b.current()))&&(b.pos=b.start+S.index),E}for(var z=y[w.state],A=0;A<z.length;A++){var R=z[A],U=(!R.data.sol||b.sol())&&b.match(R.regex);if(U){R.data.next?w.state=R.data.next:R.data.push?((w.stack||(w.stack=[])).push(w.state),w.state=R.data.push):R.data.pop&&w.stack&&w.stack.length&&(w.state=w.stack.pop()),R.data.mode&&h(m,w,R.data.mode,R.token),R.data.indent&&w.indent.push(b.indentation()+m.indentUnit),R.data.dedent&&w.indent.pop();var Y=R.token;if(Y&&Y.apply&&(Y=Y(U)),U.length>2&&R.token&&typeof R.token!="string"){w.pending=[];for(var B=2;B<U.length;B++)U[B]&&w.pending.push({text:U[B],token:R.token[B-1]});return b.backUp(U[0].length-(U[1]?U[1].length:0)),Y[0]}else return Y&&Y.join?Y[0]:Y}}return b.next(),null}}function d(y,m){if(y===m)return!0;if(!y||typeof y!="object"||!m||typeof m!="object")return!1;var b=0;for(var w in y)if(y.hasOwnProperty(w)){if(!m.hasOwnProperty(w)||!d(y[w],m[w]))return!1;b++}for(var w in m)m.hasOwnProperty(w)&&b--;return b==0}function h(y,m,b,w){var D;if(b.persistent)for(var E=m.persistentStates;E&&!D;E=E.next)(b.spec?d(b.spec,E.spec):b.mode==E.mode)&&(D=E);var S=D?D.mode:b.mode||t.getMode(y,b.spec),z=D?D.state:t.startState(S);b.persistent&&!D&&(m.persistentStates={mode:S,spec:b.spec,state:z,next:m.persistentStates}),m.localState=z,m.local={mode:S,end:b.end&&i(b.end),endScan:b.end&&b.forceEnd!==!1&&i(b.end,!1),endToken:w&&w.join?w[w.length-1]:w}}function p(y,m){for(var b=0;b<m.length;b++)if(m[b]===y)return!0}function g(y,m){return function(b,w,D){if(b.local&&b.local.mode.indent)return b.local.mode.indent(b.localState,w,D);if(b.indent==null||b.local||m.dontIndentStates&&p(b.state,m.dontIndentStates)>-1)return t.Pass;var E=b.indent.length-1,S=y[b.state];e:for(;;){for(var z=0;z<S.length;z++){var A=S[z];if(A.data.dedent&&A.data.dedentIfLineStart!==!1){var R=A.regex.exec(w);if(R&&R[0]){E--,(A.next||A.push)&&(S=y[A.next||A.push]),w=w.slice(R[0].length);continue e}}}break}return E<0?0:b.indent[E]}}})});var dh=ue((uh,ch)=>{(function(t){typeof uh=="object"&&typeof ch=="object"?t(Ze(),lh()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),t.defineMIME("text/x-rustsrc","rust"),t.defineMIME("text/rust","rust")})});var ph=ue((hh,fh)=>{(function(t){typeof hh=="object"&&typeof fh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("shell",function(){var n={};function i(m,b){for(var w=0;w<b.length;w++)n[b[w]]=m}var s=["true","false"],u=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],c=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];t.registerHelper("hintWords","shell",s.concat(u,c)),i("atom",s),i("keyword",u),i("builtin",c);function d(m,b){if(m.eatSpace())return null;var w=m.sol(),D=m.next();if(D==="\\")return m.next(),null;if(D==="'"||D==='"'||D==="`")return b.tokens.unshift(h(D,D==="`"?"quote":"string")),y(m,b);if(D==="#")return w&&m.eat("!")?(m.skipToEnd(),"meta"):(m.skipToEnd(),"comment");if(D==="$")return b.tokens.unshift(g),y(m,b);if(D==="+"||D==="=")return"operator";if(D==="-")return m.eat("-"),m.eatWhile(/\w/),"attribute";if(/\d/.test(D)&&(m.eatWhile(/\d/),m.eol()||!/\w/.test(m.peek())))return"number";m.eatWhile(/[\w-]/);var E=m.current();return m.peek()==="="&&/\w+/.test(E)?"def":n.hasOwnProperty(E)?n[E]:null}function h(m,b){var w=m=="("?")":m=="{"?"}":m;return function(D,E){for(var S,z=!1;(S=D.next())!=null;){if(S===w&&!z){E.tokens.shift();break}else if(S==="$"&&!z&&m!=="'"&&D.peek()!=w){z=!0,D.backUp(1),E.tokens.unshift(g);break}else{if(!z&&m!==w&&S===m)return E.tokens.unshift(h(m,b)),y(D,E);if(!z&&/['"]/.test(S)&&!/['"]/.test(m)){E.tokens.unshift(p(S,"string")),D.backUp(1);break}}z=!z&&S==="\\"}return b}}function p(m,b){return function(w,D){return D.tokens[0]=h(m,b),w.next(),y(w,D)}}var g=function(m,b){b.tokens.length>1&&m.eat("$");var w=m.next();return/['"({]/.test(w)?(b.tokens[0]=h(w,w=="("?"quote":w=="{"?"def":"string"),y(m,b)):(/\d/.test(w)||m.eatWhile(/\w/),b.tokens.shift(),"def")};function y(m,b){return(b.tokens[0]||d)(m,b)}return{startState:function(){return{tokens:[]}},token:function(m,b){return y(m,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),t.defineMIME("text/x-sh","shell"),t.defineMIME("application/x-sh","shell")})});var vh=ue((mh,gh)=>{(function(t){typeof mh=="object"&&typeof gh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("sql",function(p,g){var y=g.client||{},m=g.atoms||{false:!0,true:!0,null:!0},b=g.builtin||d(h),w=g.keywords||d(c),D=g.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=g.support||{},S=g.hooks||{},z=g.dateSQL||{date:!0,time:!0,timestamp:!0},A=g.backslashStringEscapes!==!1,R=g.brackets||/^[\{}\(\)\[\]]/,U=g.punctuation||/^[;.,:]/;function Y(O,Z){var _=O.next();if(S[_]){var V=S[_](O,Z);if(V!==!1)return V}if(E.hexNumber&&(_=="0"&&O.match(/^[xX][0-9a-fA-F]+/)||(_=="x"||_=="X")&&O.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((_=="b"||_=="B")&&O.match(/^'[01]+'/)||_=="0"&&O.match(/^b[01]+/)))return"number";if(_.charCodeAt(0)>47&&_.charCodeAt(0)<58)return O.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&O.match(/^\.(?!\.)/),"number";if(_=="?"&&(O.eatSpace()||O.eol()||O.eat(";")))return"variable-3";if(_=="'"||_=='"'&&E.doubleQuote)return Z.tokenize=B(_),Z.tokenize(O,Z);if((E.nCharCast&&(_=="n"||_=="N")||E.charsetCast&&_=="_"&&O.match(/[a-z][a-z0-9]*/i))&&(O.peek()=="'"||O.peek()=='"'))return"keyword";if(E.escapeConstant&&(_=="e"||_=="E")&&(O.peek()=="'"||O.peek()=='"'&&E.doubleQuote))return Z.tokenize=function(Q,q){return(q.tokenize=B(Q.next(),!0))(Q,q)},"keyword";if(E.commentSlashSlash&&_=="/"&&O.eat("/"))return O.skipToEnd(),"comment";if(E.commentHash&&_=="#"||_=="-"&&O.eat("-")&&(!E.commentSpaceRequired||O.eat(" ")))return O.skipToEnd(),"comment";if(_=="/"&&O.eat("*"))return Z.tokenize=G(1),Z.tokenize(O,Z);if(_=="."){if(E.zerolessFloat&&O.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(O.match(/^\.+/))return null;if(E.ODBCdotTable&&O.match(/^[\w\d_$#]+/))return"variable-2"}else{if(D.test(_))return O.eatWhile(D),"operator";if(R.test(_))return"bracket";if(U.test(_))return O.eatWhile(U),"punctuation";if(_=="{"&&(O.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||O.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";O.eatWhile(/^[_\w\d]/);var j=O.current().toLowerCase();return z.hasOwnProperty(j)&&(O.match(/^( )+'[^']*'/)||O.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(j)?"atom":b.hasOwnProperty(j)?"builtin":w.hasOwnProperty(j)?"keyword":y.hasOwnProperty(j)?"string-2":null}}function B(O,Z){return function(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(Q==O&&!j){V.tokenize=Y;break}j=(A||Z)&&!j&&Q=="\\"}return"string"}}function G(O){return function(Z,_){var V=Z.match(/^.*?(\/\*|\*\/)/);return V?V[1]=="/*"?_.tokenize=G(O+1):O>1?_.tokenize=G(O-1):_.tokenize=Y:Z.skipToEnd(),"comment"}}function ee(O,Z,_){Z.context={prev:Z.context,indent:O.indentation(),col:O.column(),type:_}}function J(O){O.indent=O.context.indent,O.context=O.context.prev}return{startState:function(){return{tokenize:Y,context:null}},token:function(O,Z){if(O.sol()&&(Z.context&&Z.context.align==null&&(Z.context.align=!1)),Z.tokenize==Y&&O.eatSpace())return null;var _=Z.tokenize(O,Z);if(_=="comment")return _;Z.context&&Z.context.align==null&&(Z.context.align=!0);var V=O.current();return V=="("?ee(O,Z,")"):V=="["?ee(O,Z,"]"):Z.context&&Z.context.type==V&&J(Z),_},indent:function(O,Z){var _=O.context;if(!_)return t.Pass;var V=Z.charAt(0)==_.type;return _.align?_.col+(V?0:1):_.indent+(V?0:p.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function n(p){for(var g;(g=p.next())!=null;)if(g=="`"&&!p.eat("`"))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function i(p){for(var g;(g=p.next())!=null;)if(g=='"'&&!p.eat('"'))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function s(p){return p.eat("@")&&(p.match(/^session\./),p.match(/^local\./),p.match(/^global\./)),p.eat("'")?(p.match(/^.*'/),"variable-2"):p.eat('"')?(p.match(/^.*"/),"variable-2"):p.eat("`")?(p.match(/^.*`/),"variable-2"):p.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function u(p){return p.eat("N")?"atom":p.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var c="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function d(p){for(var g={},y=p.split(" "),m=0;m<y.length;++m)g[y[m]]=!0;return g}var h="bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric";t.defineMIME("text/x-sql",{name:"sql",keywords:d(c+"begin"),builtin:d(h),atoms:d("false true null unknown"),dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-mssql",{name:"sql",client:d("$partition 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"),keywords:d(c+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"),builtin:d("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:d("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"),operatorChars:/^[*+\-%<>!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:d("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":s}}),t.defineMIME("text/x-mysql",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-mariadb",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-sqlite",{name:"sql",client:d("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:d(c+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:d("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:d("date time timestamp datetime"),support:d("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":s,":":s,"?":s,$:s,'"':i,"`":n}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:d("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:d("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:d("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:d("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:d("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:d("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:d("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:d("date time timestamp"),support:d("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:d("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:d("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:d("date timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:d("source"),keywords:d(c+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path 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 precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static 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 system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:d("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:d("false true"),builtin:d("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:d("source"),keywords:d("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:d("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:d("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:d("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:d("source"),keywords:d("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:d("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("time"),support:d("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var wh=ue((bh,yh)=>{(function(t){typeof bh=="object"&&typeof yh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,i){if(!i.inString&&(n.peek()=='"'||n.peek()=="'")&&(i.stringType=n.peek(),n.next(),i.inString=!0),n.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!n.eol();)n.peek()===i.stringType?(n.next(),i.inString=!1):n.peek()==="\\"?(n.next(),n.next()):n.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&n.peek()==="]")return n.next(),i.inArray--,"bracket";if(i.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(i.lhs&&n.eatWhile(function(s){return s!="="&&s!=" "}))return"property";if(i.lhs&&n.peek()==="=")return n.next(),i.lhs=!1,null;if(!i.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(n.match("true")||n.match("false")))return"atom";if(!i.lhs&&n.peek()==="[")return i.inArray++,n.next(),"bracket";if(!i.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null}}}),t.defineMIME("text/x-toml","toml")})});var _h=ue((kh,xh)=>{(function(t){typeof kh=="object"&&typeof xh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("vbscript",function(n,i){var s="error";function u(re){return new RegExp("^(("+re.join(")|(")+"))\\b","i")}var c=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),d=new RegExp("^((<>)|(<=)|(>=))"),h=new RegExp("^[\\.,]"),p=new RegExp("^[\\(\\)]"),g=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),y=["class","sub","select","while","if","function","property","with","for"],m=["else","elseif","case"],b=["next","loop","wend"],w=u(["and","or","not","xor","is","mod","eqv","imp"]),D=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],E=["true","false","nothing","empty","null"],S=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"],z=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"],A=["WScript","err","debug","RegExp"],R=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],U=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],Y=["server","response","request","session","application"],B=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],G=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],ee=U.concat(R);A=A.concat(z),n.isASP&&(A=A.concat(Y),ee=ee.concat(G,B));var J=u(D),O=u(E),Z=u(S),_=u(A),V=u(ee),j='"',Q=u(y),q=u(m),I=u(b),H=u(["end"]),se=u(["do"]),F=u(["on error resume next","exit"]),T=u(["rem"]);function de(re,we){we.currentIndent++}function ce(re,we){we.currentIndent--}function oe(re,we){if(re.eatSpace())return"space";var De=re.peek();if(De==="'")return re.skipToEnd(),"comment";if(re.match(T))return re.skipToEnd(),"comment";if(re.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!re.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var Pe=!1;if((re.match(/^\d*\.\d+/i)||(re.match(/^\d+\.\d*/)||re.match(/^\.\d+/)))&&(Pe=!0),Pe)return re.eat(/J/i),"number";var rt=!1;if(re.match(/^&H[0-9a-f]+/i)||re.match(/^&O[0-7]+/i)?rt=!0:re.match(/^[1-9]\d*F?/)?(re.eat(/J/i),rt=!0):re.match(/^0(?![\dx])/i)&&(rt=!0),rt)return re.eat(/L/i),"number"}return re.match(j)?(we.tokenize=xe(re.current()),we.tokenize(re,we)):re.match(d)||re.match(c)||re.match(w)?"operator":re.match(h)?null:re.match(p)?"bracket":re.match(F)?(we.doInCurrentLine=!0,"keyword"):re.match(se)?(de(re,we),we.doInCurrentLine=!0,"keyword"):re.match(Q)?(we.doInCurrentLine?we.doInCurrentLine=!1:de(re,we),"keyword"):re.match(q)?"keyword":re.match(H)?(ce(re,we),ce(re,we),"keyword"):re.match(I)?(we.doInCurrentLine?we.doInCurrentLine=!1:ce(re,we),"keyword"):re.match(J)?"keyword":re.match(O)?"atom":re.match(V)?"variable-2":re.match(Z)?"builtin":re.match(_)?"variable-2":re.match(g)?"variable":(re.next(),s)}function xe(re){var we=re.length==1,De="string";return function(Pe,rt){for(;!Pe.eol();){if(Pe.eatWhile(/[^'"]/),Pe.match(re))return rt.tokenize=oe,De;Pe.eat(/['"]/)}if(we){if(i.singleLineStringErrors)return s;rt.tokenize=oe}return De}}function Oe(re,we){var De=we.tokenize(re,we),Pe=re.current();return Pe==="."?(De=we.tokenize(re,we),Pe=re.current(),De&&(De.substr(0,8)==="variable"||De==="builtin"||De==="keyword")?((De==="builtin"||De==="keyword")&&(De="variable"),ee.indexOf(Pe.substr(1))>-1&&(De="variable-2"),De):s):De}var ye={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:oe,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(re,we){re.sol()&&(we.currentIndent+=we.nextLineIndent,we.nextLineIndent=0,we.doInCurrentLine=0);var De=Oe(re,we);return we.lastToken={style:De,content:re.current()},De==="space"&&(De=null),De},indent:function(re,we){var De=we.replace(/^\s+|\s+$/g,"");return De.match(I)||De.match(H)||De.match(q)?n.indentUnit*(re.currentIndent-1):re.currentIndent<0?0:re.currentIndent*n.indentUnit}};return ye}),t.defineMIME("text/vbscript","vbscript")})});var Eh=ue((Ch,Sh)=>{(function(t){typeof Ch=="object"&&typeof Sh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("yaml",function(){var n=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+n.join(")|(")+"))$","i");return{token:function(s,u){var c=s.peek(),d=u.escaped;if(u.escaped=!1,c=="#"&&(s.pos==0||/\s/.test(s.string.charAt(s.pos-1))))return s.skipToEnd(),"comment";if(s.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(u.literal&&s.indentation()>u.keyCol)return s.skipToEnd(),"string";if(u.literal&&(u.literal=!1),s.sol()){if(u.keyCol=0,u.pair=!1,u.pairStart=!1,s.match(/---/))return"def";if(s.match(/\.\.\./))return"def";if(s.match(/\s*-\s+/))return"meta"}if(s.match(/^(\{|\}|\[|\])/))return c=="{"?u.inlinePairs++:c=="}"?u.inlinePairs--:c=="["?u.inlineList++:u.inlineList--,"meta";if(u.inlineList>0&&!d&&c==",")return s.next(),"meta";if(u.inlinePairs>0&&!d&&c==",")return u.keyCol=0,u.pair=!1,u.pairStart=!1,s.next(),"meta";if(u.pairStart){if(s.match(/^\s*(\||\>)\s*/))return u.literal=!0,"meta";if(s.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(u.inlinePairs==0&&s.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(u.inlinePairs>0&&s.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(s.match(i))return"keyword"}return!u.pair&&s.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(u.pair=!0,u.keyCol=s.indentation(),"atom"):u.pair&&s.match(/^:\s*/)?(u.pairStart=!0,"meta"):(u.pairStart=!1,u.escaped=c=="\\",s.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-yaml","yaml"),t.defineMIME("text/yaml","yaml")})});var Th=ue((Dh,Ah)=>{(function(t){typeof Dh=="object"&&typeof Ah=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineOption("scrollPastEnd",!1,function(s,u,c){c&&c!=t.Init&&(s.off("change",n),s.off("refresh",i),s.display.lineSpace.parentNode.style.paddingBottom="",s.state.scrollPastEndPadding=null),u&&(s.on("change",n),s.on("refresh",i),i(s))});function n(s,u){t.changeEnd(u).line==s.lastLine()&&i(s)}function i(s){var u="";if(s.lineCount()>1){var c=s.display.scroller.clientHeight-30,d=s.getLineHandle(s.lastLine()).height;u=c-d+"px"}s.state.scrollPastEndPadding!=u&&(s.state.scrollPastEndPadding=u,s.display.lineSpace.parentNode.style.paddingBottom=u,s.off("refresh",i),s.setSize(),s.on("refresh",i))}})});var zh=ue((l_,na)=>{"use strict";function ra(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(i){return typeof i}:ra=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ra(t)}function Wy(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Qs(t,n)}function Qs(t,n){return Qs=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},Qs(t,n)}function Gy(t){var n=$y();return function(){var s=ia(t),u;if(n){var c=ia(this).constructor;u=Reflect.construct(s,arguments,c)}else u=s.apply(this,arguments);return Lh(this,u)}}function Lh(t,n){return n&&(ra(n)==="object"||typeof n=="function")?n:Yi(t)}function Yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ia(t)}function Ge(t,n){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=Ky(t))||n&&t&&typeof t.length=="number"){i&&(t=i);var s=0,u=function(){};return{s:u,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(g){throw g},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=t[Symbol.iterator]()},n:function(){var g=i.next();return c=g.done,g},e:function(g){d=!0,h=g},f:function(){try{!c&&i.return!=null&&i.return()}finally{if(d)throw h}}}}function Ky(t,n){if(!t)return;if(typeof t=="string")return Ih(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ih(t,n)}function Ih(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,s=new Array(n);i<n;i++)s[i]=t[i];return s}function Js(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Fh(t,n){for(var i=0;i<n.length;i++){var s=n[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function oa(t,n,i){return n&&Fh(t.prototype,n),i&&Fh(t,i),t}var Mh=function(){function t(){Js(this,t)}return oa(t,[{key:"on",value:function(i,s){return this._callbacks=this._callbacks||{},this._callbacks[i]||(this._callbacks[i]=[]),this._callbacks[i].push(s),this}},{key:"emit",value:function(i){this._callbacks=this._callbacks||{};var s=this._callbacks[i];if(s){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];var h=Ge(s),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.apply(this,c)}}catch(y){h.e(y)}finally{h.f()}}return this}},{key:"off",value:function(i,s){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var u=this._callbacks[i];if(!u)return this;if(arguments.length===1)return delete this._callbacks[i],this;for(var c=0;c<u.length;c++){var d=u[c];if(d===s){u.splice(c,1);break}}return this}}]),t}(),Ue=function(t){Wy(i,t);var n=Gy(i);oa(i,null,[{key:"initClass",value:function(){this.prototype.Emitter=Mh,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(c,d,h){if(h)return{dzuuid:h.file.upload.uuid,dzchunkindex:h.index,dztotalfilesize:h.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:h.file.upload.totalChunkCount,dzchunkbyteoffset:h.index*this.options.chunkSize}},accept:function(c,d){return d()},chunksUploaded:function(c,d){d()},fallback:function(){var c;this.element.className="".concat(this.element.className," dz-browser-not-supported");var d=Ge(this.element.getElementsByTagName("div")),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;if(/(^| )dz-message($| )/.test(p.className)){c=p,p.className="dz-message";break}}}catch(y){d.e(y)}finally{d.f()}c||(c=i.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(c));var g=c.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(c,d,h,p){var g={srcX:0,srcY:0,srcWidth:c.width,srcHeight:c.height},y=c.width/c.height;d==null&&h==null?(d=g.srcWidth,h=g.srcHeight):d==null?d=h*y:h==null&&(h=d/y),d=Math.min(d,g.srcWidth),h=Math.min(h,g.srcHeight);var m=d/h;if(g.srcWidth>d||g.srcHeight>h)if(p==="crop")y>m?(g.srcHeight=c.height,g.srcWidth=g.srcHeight*m):(g.srcWidth=c.width,g.srcHeight=g.srcWidth/m);else if(p==="contain")y>m?h=d/y:d=h*y;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(c.width-g.srcWidth)/2,g.srcY=(c.height-g.srcHeight)/2,g.trgWidth=d,g.trgHeight=h,g},transformFile:function(c,d){return(this.options.resizeWidth||this.options.resizeHeight)&&c.type.match(/image.*/)?this.resizeImage(c,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,d):d(c)},previewTemplate:`<div class="dz-preview dz-file-preview">
<div class="dz-image"><img data-dz-thumbnail /></div>
<div class="dz-details">
<div class="dz-size"><span data-dz-size></span></div>
<div class="dz-filename"><span data-dz-name></span></div>
</div>
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
<div class="dz-success-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Check</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path>
</g>
</svg>
</div>
<div class="dz-error-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Error</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">
<path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path>
</g>
</g>
</svg>
</div>
</div>`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=Ge(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(S){h.e(S)}finally{h.f()}var y=Ge(c.previewElement.querySelectorAll("[data-dz-size]")),m;try{for(y.s();!(m=y.n()).done;)g=m.value,g.innerHTML=this.filesize(c.size)}catch(S){y.e(S)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),c.previewElement.appendChild(c._removeLink));var b=function(z){return z.preventDefault(),z.stopPropagation(),c.status===i.UPLOADING?i.confirm(d.options.dictCancelUploadConfirmation,function(){return d.removeFile(c)}):d.options.dictRemoveFileConfirmation?i.confirm(d.options.dictRemoveFileConfirmation,function(){return d.removeFile(c)}):d.removeFile(c)},w=Ge(c.previewElement.querySelectorAll("[data-dz-remove]")),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;E.addEventListener("click",b)}}catch(S){w.e(S)}finally{w.f()}}},removedfile:function(c){return c.previewElement!=null&&c.previewElement.parentNode!=null&&c.previewElement.parentNode.removeChild(c.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(c,d){if(c.previewElement){c.previewElement.classList.remove("dz-file-preview");var h=Ge(c.previewElement.querySelectorAll("[data-dz-thumbnail]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.alt=c.name,g.src=d}}catch(y){h.e(y)}finally{h.f()}return setTimeout(function(){return c.previewElement.classList.add("dz-image-preview")},1)}},error:function(c,d){if(c.previewElement){c.previewElement.classList.add("dz-error"),typeof d!="string"&&d.error&&(d=d.error);var h=Ge(c.previewElement.querySelectorAll("[data-dz-errormessage]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=d}}catch(y){h.e(y)}finally{h.f()}}},errormultiple:function(){},processing:function(c){if(c.previewElement&&(c.previewElement.classList.add("dz-processing"),c._removeLink))return c._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(c,d,h){if(c.previewElement){var p=Ge(c.previewElement.querySelectorAll("[data-dz-uploadprogress]")),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.nodeName==="PROGRESS"?y.value=d:y.style.width="".concat(d,"%")}}catch(m){p.e(m)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(c){if(c.previewElement)return c.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(c){return this.emit("error",c,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(c){if(c._removeLink&&(c._removeLink.innerHTML=this.options.dictRemoveFile),c.previewElement)return c.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(u){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h<c;h++)d[h-1]=arguments[h];for(var p=0,g=d;p<g.length;p++){var y=g[p];for(var m in y){var b=y[m];u[m]=b}}return u}}]);function i(s,u){var c;Js(this,i),c=n.call(this);var d,h;if(c.element=s,c.version=i.version,c.defaultOptions.previewTemplate=c.defaultOptions.previewTemplate.replace(/\n*/g,""),c.clickableElements=[],c.listeners=[],c.files=[],typeof c.element=="string"&&(c.element=document.querySelector(c.element)),!c.element||c.element.nodeType==null)throw new Error("Invalid dropzone element.");if(c.element.dropzone)throw new Error("Dropzone already attached.");i.instances.push(Yi(c)),c.element.dropzone=Yi(c);var p=(h=i.optionsForElement(c.element))!=null?h:{};if(c.options=i.extend({},c.defaultOptions,p,u!=null?u:{}),c.options.forceFallback||!i.isBrowserSupported())return Lh(c,c.options.fallback.call(Yi(c)));if(c.options.url==null&&(c.options.url=c.element.getAttribute("action")),!c.options.url)throw new Error("No URL provided.");if(c.options.acceptedFiles&&c.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(c.options.uploadMultiple&&c.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return c.options.acceptedMimeTypes&&(c.options.acceptedFiles=c.options.acceptedMimeTypes,delete c.options.acceptedMimeTypes),c.options.renameFilename!=null&&(c.options.renameFile=function(g){return c.options.renameFilename.call(Yi(c),g.name,g)}),typeof c.options.method=="string"&&(c.options.method=c.options.method.toUpperCase()),(d=c.getExistingFallback())&&d.parentNode&&d.parentNode.removeChild(d),c.options.previewsContainer!==!1&&(c.options.previewsContainer?c.previewsContainer=i.getElement(c.options.previewsContainer,"previewsContainer"):c.previewsContainer=c.element),c.options.clickable&&(c.options.clickable===!0?c.clickableElements=[c.element]:c.clickableElements=i.getElements(c.options.clickable,"clickable")),c.init(),c}return oa(i,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(u){return u.accepted}).map(function(u){return u})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(u){return!u.accepted}).map(function(u){return u})}},{key:"getFilesWithStatus",value:function(u){return this.files.filter(function(c){return c.status===u}).map(function(c){return c})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(i.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(i.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(i.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(u){return u.status===i.UPLOADING||u.status===i.QUEUED}).map(function(u){return u})}},{key:"init",value:function(){var u=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(i.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var c=function m(){return u.hiddenFileInput&&u.hiddenFileInput.parentNode.removeChild(u.hiddenFileInput),u.hiddenFileInput=document.createElement("input"),u.hiddenFileInput.setAttribute("type","file"),(u.options.maxFiles===null||u.options.maxFiles>1)&&u.hiddenFileInput.setAttribute("multiple","multiple"),u.hiddenFileInput.className="dz-hidden-input",u.options.acceptedFiles!==null&&u.hiddenFileInput.setAttribute("accept",u.options.acceptedFiles),u.options.capture!==null&&u.hiddenFileInput.setAttribute("capture",u.options.capture),u.hiddenFileInput.style.visibility="hidden",u.hiddenFileInput.style.position="absolute",u.hiddenFileInput.style.top="0",u.hiddenFileInput.style.left="0",u.hiddenFileInput.style.height="0",u.hiddenFileInput.style.width="0",i.getElement(u.options.hiddenInputContainer,"hiddenInputContainer").appendChild(u.hiddenFileInput),u.hiddenFileInput.addEventListener("change",function(){var b=u.hiddenFileInput.files;if(b.length){var w=Ge(b),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;u.addFile(E)}}catch(S){w.e(S)}finally{w.f()}}return u.emit("addedfiles",b),m()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;var d=Ge(this.events),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;this.on(p,this.options[p])}}catch(m){d.e(m)}finally{d.f()}this.on("uploadprogress",function(){return u.updateTotalUploadProgress()}),this.on("removedfile",function(){return u.updateTotalUploadProgress()}),this.on("canceled",function(m){return u.emit("complete",m)}),this.on("complete",function(m){if(u.getAddedFiles().length===0&&u.getUploadingFiles().length===0&&u.getQueuedFiles().length===0)return setTimeout(function(){return u.emit("queuecomplete")},0)});var g=function(b){if(b.dataTransfer.types){for(var w=0;w<b.dataTransfer.types.length;w++)if(b.dataTransfer.types[w]==="Files")return!0}return!1},y=function(b){return g(b)?(b.stopPropagation(),b.preventDefault?b.preventDefault():b.returnValue=!1):void 0};return this.listeners=[{element:this.element,events:{dragstart:function(b){return u.emit("dragstart",b)},dragenter:function(b){return y(b),u.emit("dragenter",b)},dragover:function(b){var w;try{w=b.dataTransfer.effectAllowed}catch(D){}return b.dataTransfer.dropEffect=w==="move"||w==="linkMove"?"move":"copy",y(b),u.emit("dragover",b)},dragleave:function(b){return u.emit("dragleave",b)},drop:function(b){return y(b),u.drop(b)},dragend:function(b){return u.emit("dragend",b)}}}],this.clickableElements.forEach(function(m){return u.listeners.push({element:m,events:{click:function(w){return(m!==u.element||w.target===u.element||i.elementInside(w.target,u.element.querySelector(".dz-message")))&&u.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(this.hiddenFileInput!=null?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,i.instances.splice(i.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var u,c=0,d=0,h=this.getActiveFiles();if(h.length){var p=Ge(this.getActiveFiles()),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;c+=y.upload.bytesSent,d+=y.upload.total}}catch(m){p.e(m)}finally{p.f()}u=100*c/d}else u=100;return this.emit("totaluploadprogress",u,d,c)}},{key:"_getParamName",value:function(u){return typeof this.options.paramName=="function"?this.options.paramName(u):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(u,"]"):"")}},{key:"_renameFile",value:function(u){return typeof this.options.renameFile!="function"?u.name:this.options.renameFile(u)}},{key:"getFallbackForm",value:function(){var u,c;if(u=this.getExistingFallback())return u;var d='<div class="dz-fallback">';this.options.dictFallbackText&&(d+="<p>".concat(this.options.dictFallbackText,"</p>")),d+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var h=i.createElement(d);return this.element.tagName!=="FORM"?(c=i.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),c.appendChild(h)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),c!=null?c:h}},{key:"getExistingFallback",value:function(){for(var u=function(y){var m=Ge(y),b;try{for(m.s();!(b=m.n()).done;){var w=b.value;if(/(^| )fallback($| )/.test(w.className))return w}}catch(D){m.e(D)}finally{m.f()}},c=0,d=["div","form"];c<d.length;c++){var h=d[c],p;if(p=u(this.element.getElementsByTagName(h)))return p}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(u){return function(){var c=[];for(var d in u.events){var h=u.events[d];c.push(u.element.addEventListener(d,h,!1))}return c}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(u){return function(){var c=[];for(var d in u.events){var h=u.events[d];c.push(u.element.removeEventListener(d,h,!1))}return c}()})}},{key:"disable",value:function(){var u=this;return this.clickableElements.forEach(function(c){return c.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(c){return u.cancelUpload(c)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(u){return u.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(u){var c=0,d="b";if(u>0){for(var h=["tb","gb","mb","kb","b"],p=0;p<h.length;p++){var g=h[p],y=Math.pow(this.options.filesizeBase,4-p)/10;if(u>=y){c=u/Math.pow(this.options.filesizeBase,4-p),d=g;break}}c=Math.round(10*c)/10}return"<strong>".concat(c,"</strong> ").concat(this.options.dictFileSizeUnits[d])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(u){if(!u.dataTransfer)return;this.emit("drop",u);for(var c=[],d=0;d<u.dataTransfer.files.length;d++)c[d]=u.dataTransfer.files[d];if(c.length){var h=u.dataTransfer.items;h&&h.length&&h[0].webkitGetAsEntry!=null?this._addFilesFromItems(h):this.handleFiles(c)}this.emit("addedfiles",c)}},{key:"paste",value:function(u){if(Xy(u!=null?u.clipboardData:void 0,function(d){return d.items})==null)return;this.emit("paste",u);var c=u.clipboardData.items;if(c.length)return this._addFilesFromItems(c)}},{key:"handleFiles",value:function(u){var c=Ge(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.addFile(h)}}catch(p){c.e(p)}finally{c.f()}}},{key:"_addFilesFromItems",value:function(u){var c=this;return function(){var d=[],h=Ge(u),p;try{for(h.s();!(p=h.n()).done;){var g=p.value,y;g.webkitGetAsEntry!=null&&(y=g.webkitGetAsEntry())?y.isFile?d.push(c.addFile(g.getAsFile())):y.isDirectory?d.push(c._addFilesFromDirectory(y,y.name)):d.push(void 0):g.getAsFile!=null&&(g.kind==null||g.kind==="file")?d.push(c.addFile(g.getAsFile())):d.push(void 0)}}catch(m){h.e(m)}finally{h.f()}return d}()}},{key:"_addFilesFromDirectory",value:function(u,c){var d=this,h=u.createReader(),p=function(m){return Zy(console,"log",function(b){return b.log(m)})},g=function y(){return h.readEntries(function(m){if(m.length>0){var b=Ge(m),w;try{for(b.s();!(w=b.n()).done;){var D=w.value;D.isFile?D.file(function(E){return d.options.ignoreHiddenFiles&&E.name.substring(0,1)==="."?void 0:(E.fullPath="".concat(c,"/").concat(E.name),d.addFile(E))}):D.isDirectory&&d._addFilesFromDirectory(D,"".concat(c,"/").concat(D.name))}}catch(E){b.e(E)}finally{b.f()}y()}return null},p)};return g()}},{key:"accept",value:function(u,c){this.options.maxFilesize&&u.size>this.options.maxFilesize*1024*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(u.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(u,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",u)):this.options.accept.call(this,u,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(u){var c=this;u.upload={uuid:i.uuidv4(),progress:0,total:u.size,bytesSent:0,filename:this._renameFile(u)},this.files.push(u),u.status=i.ADDED,this.emit("addedfile",u),this._enqueueThumbnail(u),this.accept(u,function(d){d?(u.accepted=!1,c._errorProcessing([u],d)):(u.accepted=!0,c.options.autoQueue&&c.enqueueFile(u)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(u){var c=Ge(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.enqueueFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"enqueueFile",value:function(u){var c=this;if(u.status===i.ADDED&&u.accepted===!0){if(u.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(u){var c=this;if(this.options.createImageThumbnails&&u.type.match(/image.*/)&&u.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(u),setTimeout(function(){return c._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var u=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(d){return u.emit("thumbnail",c,d),u._processingThumbnail=!1,u._processThumbnailQueue()})}},{key:"removeFile",value:function(u){if(u.status===i.UPLOADING&&this.cancelUpload(u),this.files=Vy(this.files,u),this.emit("removedfile",u),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(u){u==null&&(u=!1);var c=Ge(this.files.slice()),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;(h.status!==i.UPLOADING||u)&&this.removeFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"resizeImage",value:function(u,c,d,h,p){var g=this;return this.createThumbnail(u,c,d,h,!0,function(y,m){if(m==null)return p(u);var b=g.options.resizeMimeType;b==null&&(b=u.type);var w=m.toDataURL(b,g.options.resizeQuality);return(b==="image/jpeg"||b==="image/jpg")&&(w=qh.restore(u.dataURL,w)),p(i.dataURItoBlob(w))})}},{key:"createThumbnail",value:function(u,c,d,h,p,g){var y=this,m=new FileReader;m.onload=function(){if(u.dataURL=m.result,u.type==="image/svg+xml"){g!=null&&g(m.result);return}y.createThumbnailFromUrl(u,c,d,h,p,g)},m.readAsDataURL(u)}},{key:"displayExistingFile",value:function(u,c,d,h){var p=this,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",u),this.emit("complete",u),!g)this.emit("thumbnail",u,c),d&&d();else{var y=function(b){p.emit("thumbnail",u,b),d&&d()};u.dataURL=c,this.createThumbnailFromUrl(u,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,y,h)}}},{key:"createThumbnailFromUrl",value:function(u,c,d,h,p,g,y){var m=this,b=document.createElement("img");return y&&(b.crossOrigin=y),p=getComputedStyle(document.body).imageOrientation=="from-image"?!1:p,b.onload=function(){var w=function(E){return E(1)};return typeof EXIF!="undefined"&&EXIF!==null&&p&&(w=function(E){return EXIF.getData(b,function(){return E(EXIF.getTag(this,"Orientation"))})}),w(function(D){u.width=b.width,u.height=b.height;var E=m.options.resize.call(m,u,c,d,h),S=document.createElement("canvas"),z=S.getContext("2d");S.width=E.trgWidth,S.height=E.trgHeight,D>4&&(S.width=E.trgHeight,S.height=E.trgWidth);switch(D){case 2:z.translate(S.width,0),z.scale(-1,1);break;case 3:z.translate(S.width,S.height),z.rotate(Math.PI);break;case 4:z.translate(0,S.height),z.scale(1,-1);break;case 5:z.rotate(.5*Math.PI),z.scale(1,-1);break;case 6:z.rotate(.5*Math.PI),z.translate(0,-S.width);break;case 7:z.rotate(.5*Math.PI),z.translate(S.height,-S.width),z.scale(-1,1);break;case 8:z.rotate(-.5*Math.PI),z.translate(-S.height,0);break}Yy(z,b,E.srcX!=null?E.srcX:0,E.srcY!=null?E.srcY:0,E.srcWidth,E.srcHeight,E.trgX!=null?E.trgX:0,E.trgY!=null?E.trgY:0,E.trgWidth,E.trgHeight);var A=S.toDataURL("image/png");if(g!=null)return g(A,S)})},g!=null&&(b.onerror=g),b.src=u.dataURL}},{key:"processQueue",value:function(){var u=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=u)return;var h=this.getQueuedFiles();if(!(h.length>0))return;if(this.options.uploadMultiple)return this.processFiles(h.slice(0,u-c));for(;d<u;){if(!h.length)return;this.processFile(h.shift()),d++}}},{key:"processFile",value:function(u){return this.processFiles([u])}},{key:"processFiles",value:function(u){var c=Ge(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;h.processing=!0,h.status=i.UPLOADING,this.emit("processing",h)}}catch(p){c.e(p)}finally{c.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",u),this.uploadFiles(u)}},{key:"_getFilesWithXhr",value:function(u){var c;return c=this.files.filter(function(d){return d.xhr===u}).map(function(d){return d})}},{key:"cancelUpload",value:function(u){if(u.status===i.UPLOADING){var c=this._getFilesWithXhr(u.xhr),d=Ge(c),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;p.status=i.CANCELED}}catch(b){d.e(b)}finally{d.f()}typeof u.xhr!="undefined"&&u.xhr.abort();var g=Ge(c),y;try{for(g.s();!(y=g.n()).done;){var m=y.value;this.emit("canceled",m)}}catch(b){g.e(b)}finally{g.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",c)}else(u.status===i.ADDED||u.status===i.QUEUED)&&(u.status=i.CANCELED,this.emit("canceled",u),this.options.uploadMultiple&&this.emit("canceledmultiple",[u]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(u){if(typeof u=="function"){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h<c;h++)d[h-1]=arguments[h];return u.apply(this,d)}return u}},{key:"uploadFile",value:function(u){return this.uploadFiles([u])}},{key:"uploadFiles",value:function(u){var c=this;this._transformFiles(u,function(d){if(c.options.chunking){var h=d[0];u[0].upload.chunked=c.options.chunking&&(c.options.forceChunking||h.size>c.options.chunkSize),u[0].upload.totalChunkCount=Math.ceil(h.size/c.options.chunkSize)}if(u[0].upload.chunked){var p=u[0],g=d[0],y=0;p.upload.chunks=[];var m=function(){for(var S=0;p.upload.chunks[S]!==void 0;)S++;if(S>=p.upload.totalChunkCount)return;y++;var z=S*c.options.chunkSize,A=Math.min(z+c.options.chunkSize,g.size),R={name:c._getParamName(0),data:g.webkitSlice?g.webkitSlice(z,A):g.slice(z,A),filename:p.upload.filename,chunkIndex:S};p.upload.chunks[S]={file:p,index:S,dataBlock:R,status:i.UPLOADING,progress:0,retries:0},c._uploadData(u,[R])};if(p.upload.finishedChunkUpload=function(E){var S=!0;E.status=i.SUCCESS,E.dataBlock=null,E.xhr=null;for(var z=0;z<p.upload.totalChunkCount;z++){if(p.upload.chunks[z]===void 0)return m();p.upload.chunks[z].status!==i.SUCCESS&&(S=!1)}S&&c.options.chunksUploaded(p,function(){c._finished(u,"",null)})},c.options.parallelChunkUploads)for(var b=0;b<p.upload.totalChunkCount;b++)m();else m()}else{for(var w=[],D=0;D<u.length;D++)w[D]={name:c._getParamName(D),data:d[D],filename:u[D].upload.filename};c._uploadData(u,w)}})}},{key:"_getChunk",value:function(u,c){for(var d=0;d<u.upload.totalChunkCount;d++)if(u.upload.chunks[d]!==void 0&&u.upload.chunks[d].xhr===c)return u.upload.chunks[d]}},{key:"_uploadData",value:function(u,c){var d=this,h=new XMLHttpRequest,p=Ge(u),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.xhr=h}}catch(Z){p.e(Z)}finally{p.f()}u[0].upload.chunked&&(u[0].upload.chunks[c[0].chunkIndex].xhr=h);var m=this.resolveOption(this.options.method,u),b=this.resolveOption(this.options.url,u);h.open(m,b,!0),h.timeout=this.resolveOption(this.options.timeout,u),h.withCredentials=!!this.options.withCredentials,h.onload=function(Z){d._finishedUploading(u,h,Z)},h.ontimeout=function(){d._handleUploadError(u,h,"Request timedout after ".concat(d.options.timeout/1e3," seconds"))},h.onerror=function(){d._handleUploadError(u,h)};var w=h.upload!=null?h.upload:h;w.onprogress=function(Z){return d._updateFilesUploadProgress(u,h,Z)};var D={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&i.extend(D,this.options.headers);for(var E in D){var S=D[E];S&&h.setRequestHeader(E,S)}var z=new FormData;if(this.options.params){var A=this.options.params;typeof A=="function"&&(A=A.call(this,u,h,u[0].upload.chunked?this._getChunk(u[0],h):null));for(var R in A){var U=A[R];if(Array.isArray(U))for(var Y=0;Y<U.length;Y++)z.append(R,U[Y]);else z.append(R,U)}}var B=Ge(u),G;try{for(B.s();!(G=B.n()).done;){var ee=G.value;this.emit("sending",ee,h,z)}}catch(Z){B.e(Z)}finally{B.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",u,h,z),this._addFormElementData(z);for(var J=0;J<c.length;J++){var O=c[J];z.append(O.name,O.data,O.filename)}this.submitRequest(h,z,u)}},{key:"_transformFiles",value:function(u,c){for(var d=this,h=[],p=0,g=function(b){d.options.transformFile.call(d,u[b],function(w){h[b]=w,++p===u.length&&c(h)})},y=0;y<u.length;y++)g(y)}},{key:"_addFormElementData",value:function(u){if(this.element.tagName==="FORM"){var c=Ge(this.element.querySelectorAll("input, textarea, select, button")),d;try{for(c.s();!(d=c.n()).done;){var h=d.value,p=h.getAttribute("name"),g=h.getAttribute("type");if(g&&(g=g.toLowerCase()),typeof p=="undefined"||p===null)continue;if(h.tagName==="SELECT"&&h.hasAttribute("multiple")){var y=Ge(h.options),m;try{for(y.s();!(m=y.n()).done;){var b=m.value;b.selected&&u.append(p,b.value)}}catch(w){y.e(w)}finally{y.f()}}else(!g||g!=="checkbox"&&g!=="radio"||h.checked)&&u.append(p,h.value)}}catch(w){c.e(w)}finally{c.f()}}}},{key:"_updateFilesUploadProgress",value:function(u,c,d){var h;if(typeof d!="undefined"){if(h=100*d.loaded/d.total,u[0].upload.chunked){var p=u[0],g=this._getChunk(p,c);g.progress=h,g.total=d.total,g.bytesSent=d.loaded;var y=0,m,b;p.upload.progress=0,p.upload.total=0,p.upload.bytesSent=0;for(var w=0;w<p.upload.totalChunkCount;w++)p.upload.chunks[w]!==void 0&&p.upload.chunks[w].progress!==void 0&&(p.upload.progress+=p.upload.chunks[w].progress,p.upload.total+=p.upload.chunks[w].total,p.upload.bytesSent+=p.upload.chunks[w].bytesSent);p.upload.progress=p.upload.progress/p.upload.totalChunkCount}else{var D=Ge(u),E;try{for(D.s();!(E=D.n()).done;){var S=E.value;S.upload.progress=h,S.upload.total=d.total,S.upload.bytesSent=d.loaded}}catch(Z){D.e(Z)}finally{D.f()}}var z=Ge(u),A;try{for(z.s();!(A=z.n()).done;){var R=A.value;this.emit("uploadprogress",R,R.upload.progress,R.upload.bytesSent)}}catch(Z){z.e(Z)}finally{z.f()}}else{var U=!0;h=100;var Y=Ge(u),B;try{for(Y.s();!(B=Y.n()).done;){var G=B.value;(G.upload.progress!==100||G.upload.bytesSent!==G.upload.total)&&(U=!1),G.upload.progress=h,G.upload.bytesSent=G.upload.total}}catch(Z){Y.e(Z)}finally{Y.f()}if(U)return;var ee=Ge(u),J;try{for(ee.s();!(J=ee.n()).done;){var O=J.value;this.emit("uploadprogress",O,h,O.upload.bytesSent)}}catch(Z){ee.e(Z)}finally{ee.f()}}}},{key:"_finishedUploading",value:function(u,c,d){var h;if(u[0].status===i.CANCELED)return;if(c.readyState!==4)return;if(c.responseType!=="arraybuffer"&&c.responseType!=="blob"&&(h=c.responseText,c.getResponseHeader("content-type")&&~c.getResponseHeader("content-type").indexOf("application/json")))try{h=JSON.parse(h)}catch(p){d=p,h="Invalid JSON response from server."}this._updateFilesUploadProgress(u),200<=c.status&&c.status<300?u[0].upload.chunked?u[0].upload.finishedChunkUpload(this._getChunk(u[0],c)):this._finished(u,h,d):this._handleUploadError(u,c,h)}},{key:"_handleUploadError",value:function(u,c,d){if(u[0].status===i.CANCELED)return;if(u[0].upload.chunked&&this.options.retryChunks){var h=this._getChunk(u[0],c);if(h.retries++<this.options.retryChunksLimit){this._uploadData(u,[h.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(u,d||this.options.dictResponseError.replace("{{statusCode}}",c.status),c)}},{key:"submitRequest",value:function(u,c,d){u.send(c)}},{key:"_finished",value:function(u,c,d){var h=Ge(u),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.status=i.SUCCESS,this.emit("success",g,c,d),this.emit("complete",g)}}catch(y){h.e(y)}finally{h.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",u,c,d),this.emit("completemultiple",u)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(u,c,d){var h=Ge(u),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.status=i.ERROR,this.emit("error",g,c,d),this.emit("complete",g)}}catch(y){h.e(y)}finally{h.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",u,c,d),this.emit("completemultiple",u)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(u){var c=Math.random()*16|0,d=u==="x"?c:c&3|8;return d.toString(16)})}}]),i}(Mh);Ue.initClass();Ue.version="5.7.2";Ue.options={};Ue.optionsForElement=function(t){return t.getAttribute("id")?Ue.options[Qy(t.getAttribute("id"))]:void 0};Ue.instances=[];Ue.forElement=function(t){if(typeof t=="string"&&(t=document.querySelector(t)),(t!=null?t.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return t.dropzone};Ue.autoDiscover=!0;Ue.discover=function(){var t;if(document.querySelectorAll)t=document.querySelectorAll(".dropzone");else{t=[];var n=function(s){return function(){var u=[],c=Ge(s),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;/(^| )dropzone($| )/.test(h.className)?u.push(t.push(h)):u.push(void 0)}}catch(p){c.e(p)}finally{c.f()}return u}()};n(document.getElementsByTagName("div")),n(document.getElementsByTagName("form"))}return function(){var i=[],s=Ge(t),u;try{for(s.s();!(u=s.n()).done;){var c=u.value;Ue.optionsForElement(c)!==!1?i.push(new Ue(c)):i.push(void 0)}}catch(d){s.e(d)}finally{s.f()}return i}()};Ue.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i];Ue.isBrowserSupported=function(){var t=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))t=!1;else{var n=Ge(Ue.blacklistedBrowsers),i;try{for(n.s();!(i=n.n()).done;){var s=i.value;if(s.test(navigator.userAgent)){t=!1;continue}}}catch(u){n.e(u)}finally{n.f()}}else t=!1;return t};Ue.dataURItoBlob=function(t){for(var n=atob(t.split(",")[1]),i=t.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(n.length),u=new Uint8Array(s),c=0,d=n.length,h=0<=d;h?c<=d:c>=d;h?c++:c--)u[c]=n.charCodeAt(c);return new Blob([s],{type:i})};var Vy=function(n,i){return n.filter(function(s){return s!==i}).map(function(s){return s})},Qy=function(n){return n.replace(/[\-_](\w)/g,function(i){return i.charAt(1).toUpperCase()})};Ue.createElement=function(t){var n=document.createElement("div");return n.innerHTML=t,n.childNodes[0]};Ue.elementInside=function(t,n){if(t===n)return!0;for(;t=t.parentNode;)if(t===n)return!0;return!1};Ue.getElement=function(t,n){var i;if(typeof t=="string"?i=document.querySelector(t):t.nodeType!=null&&(i=t),i==null)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector or a plain HTML element."));return i};Ue.getElements=function(t,n){var i,s;if(t instanceof Array){s=[];try{var u=Ge(t),c;try{for(u.s();!(c=u.n()).done;)i=c.value,s.push(this.getElement(i,n))}catch(p){u.e(p)}finally{u.f()}}catch(p){s=null}}else if(typeof t=="string"){s=[];var d=Ge(document.querySelectorAll(t)),h;try{for(d.s();!(h=d.n()).done;)i=h.value,s.push(i)}catch(p){d.e(p)}finally{d.f()}}else t.nodeType!=null&&(s=[t]);if(s==null||!s.length)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return s};Ue.confirm=function(t,n,i){if(window.confirm(t))return n();if(i!=null)return i()};Ue.isValidFile=function(t,n){if(!n)return!0;n=n.split(",");var i=t.type,s=i.replace(/\/.*$/,""),u=Ge(n),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;if(d=d.trim(),d.charAt(0)==="."){if(t.name.toLowerCase().indexOf(d.toLowerCase(),t.name.length-d.length)!==-1)return!0}else if(/\/\*$/.test(d)){if(s===d.replace(/\/.*$/,""))return!0}else if(i===d)return!0}}catch(h){u.e(h)}finally{u.f()}return!1};typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Ue(this,t)})});typeof na!="undefined"&&na!==null?na.exports=Ue:window.Dropzone=Ue;Ue.ADDED="added";Ue.QUEUED="queued";Ue.ACCEPTED=Ue.QUEUED;Ue.UPLOADING="uploading";Ue.PROCESSING=Ue.UPLOADING;Ue.CANCELED="canceled";Ue.ERROR="error";Ue.SUCCESS="success";var Jy=function(n){var i=n.naturalWidth,s=n.naturalHeight,u=document.createElement("canvas");u.width=1,u.height=s;var c=u.getContext("2d");c.drawImage(n,0,0);for(var d=c.getImageData(1,0,1,s),h=d.data,p=0,g=s,y=s;y>p;){var m=h[(y-1)*4+3];m===0?g=y:p=y,y=g+p>>1}var b=y/s;return b===0?1:b},Yy=function(n,i,s,u,c,d,h,p,g,y){var m=Jy(i);return n.drawImage(i,s,u,c,d,h,p,g,y/m)},qh=function(){function t(){Js(this,t)}return oa(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(i){for(var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0;!(u=i[m++],c=i[m++],d=i[m++],h=u>>2,p=(u&3)<<4|c>>4,g=(c&15)<<2|d>>6,y=d&63,isNaN(c)?g=y=64:isNaN(d)&&(y=64),s=s+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(p)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(y),u=c=d="",h=p=g=y="",!(m<i.length)););return s}},{key:"restore",value:function(i,s){if(!i.match("data:image/jpeg;base64,"))return s;var u=this.decode64(i.replace("data:image/jpeg;base64,","")),c=this.slice2Segments(u),d=this.exifManipulation(s,c);return"data:image/jpeg;base64,".concat(this.encode64(d))}},{key:"exifManipulation",value:function(i,s){var u=this.getExifArray(s),c=this.insertExif(i,u),d=new Uint8Array(c);return d}},{key:"getExifArray",value:function(i){for(var s=void 0,u=0;u<i.length;){if(s=i[u],s[0]===255&s[1]===225)return s;u++}return[]}},{key:"insertExif",value:function(i,s){var u=i.replace("data:image/jpeg;base64,",""),c=this.decode64(u),d=c.indexOf(255,3),h=c.slice(0,d),p=c.slice(d),g=h;return g=g.concat(s),g=g.concat(p),g}},{key:"slice2Segments",value:function(i){for(var s=0,u=[];;){var c;if(i[s]===255&i[s+1]===218)break;if(i[s]===255&i[s+1]===216)s+=2;else{c=i[s+2]*256+i[s+3];var d=s+c+2,h=i.slice(s,d);u.push(h),s=d}if(s>i.length)break}return u}},{key:"decode64",value:function(i){var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0,b=[],w=/[^A-Za-z0-9\+\/\=]/g;for(w.exec(i)&&console.warn(`There were invalid base64 characters in the input text.
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
Expect errors in decoding.`),i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(h=this.KEY_STR.indexOf(i.charAt(m++)),p=this.KEY_STR.indexOf(i.charAt(m++)),g=this.KEY_STR.indexOf(i.charAt(m++)),y=this.KEY_STR.indexOf(i.charAt(m++)),u=h<<2|p>>4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,b.push(u),g!==64&&b.push(c),y!==64&&b.push(d),u=c=d="",h=p=g=y="",!(m<i.length)););return b}}]),t}();qh.initClass();var ew=function(n,i){var s=!1,u=!0,c=n.document,d=c.documentElement,h=c.addEventListener?"addEventListener":"attachEvent",p=c.addEventListener?"removeEventListener":"detachEvent",g=c.addEventListener?"":"on",y=function b(w){if(w.type==="readystatechange"&&c.readyState!=="complete")return;if((w.type==="load"?n:c)[p](g+w.type,b,!1),!s&&(s=!0))return i.call(n,w.type||w)},m=function b(){try{d.doScroll("left")}catch(w){setTimeout(b,50);return}return y("poll")};if(c.readyState!=="complete"){if(c.createEventObject&&d.doScroll){try{u=!n.frameElement}catch(b){}u&&m()}return c[h](g+"DOMContentLoaded",y,!1),c[h](g+"readystatechange",y,!1),n[h](g+"load",y,!1)}};Ue._autoDiscoverFunction=function(){if(Ue.autoDiscover)return Ue.discover()};ew(window,Ue._autoDiscoverFunction);function Xy(t,n){return typeof t!="undefined"&&t!==null?n(t):void 0}function Zy(t,n,i){return typeof t!="undefined"&&t!==null&&typeof t[n]=="function"?i(t,n):void 0}});var Rh=ue((u_,Oh)=>{class tw{constructor(t){this.elem=t,this.toggleButton=t.querySelector(".mobile-menu-toggle"),this.menu=t.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(t){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),t.stopPropagation()}onWindowClick(t){this.onToggle(t)}}Oh.exports=tw});var Nh=ue((c_,Ph)=>{Ph.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"",dd:"",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:"",emsp14:"",emsp:"",ENG:"Ŋ",eng:"ŋ",ensp:"",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"",Escr:"",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"",exponentiale:"",ExponentialE:"",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"",frown:"⌢",fscr:"𝒻",Fscr:"",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:"",half:"½",hamilt:"",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"",HilbertSpace:"",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"",hyphen:"",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"",Igrave:"Ì",igrave:"ì",ii:"",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"",ImaginaryI:"",imagline:"",imagpart:"",imath:"ı",Im:"",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"",lscr:"𝓁",Lscr:"",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"",lsquor:"",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:"",Mellintrf:"",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"",middot:"·",minusb:"⊟",minus:"",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:"",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"",ord:"⩝",order:"",orderof:"",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"",pointint:"⨕",popf:"𝕡",Popf:"",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"",Prime:"″",primes:"",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:"",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"",rationals:"",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"",realine:"",realpart:"",reals:"",Re:"",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"",rscr:"𝓇",Rscr:"",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"",rsquor:"",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"",setmn:"",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"",smashp:"⨳",smeparsl:"⧤",smid:"",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"",ThickSpace:"",ThinSpace:"",thinsp:"",thkap:"≈",thksim:"",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"",Vee:"",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:"",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}});var el=ue((d_,Bh)=>{"use strict";Bh.exports=Nh()});var aa=ue((h_,jh)=>{jh.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/});var Wh=ue((f_,Hh)=>{"use strict";var Uh={};function nw(t){var n,i,s=Uh[t];if(s)return s;for(s=Uh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),/^[0-9a-z]$/i.test(i)?s.push(i):s.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<t.length;n++)s[t.charCodeAt(n)]=t[n];return s}function sa(t,n,i){var s,u,c,d,h,p="";for(typeof n!="string"&&(i=n,n=sa.defaultChars),typeof i=="undefined"&&(i=!0),h=nw(n),s=0,u=t.length;s<u;s++){if(c=t.charCodeAt(s),i&&c===37&&s+2<u&&/^[0-9a-f]{2}$/i.test(t.slice(s+1,s+3))){p+=t.slice(s,s+3),s+=2;continue}if(c<128){p+=h[c];continue}if(c>=55296&&c<=57343){if(c>=55296&&c<=56319&&s+1<u&&(d=t.charCodeAt(s+1),d>=56320&&d<=57343)){p+=encodeURIComponent(t[s]+t[s+1]),s++;continue}p+="%EF%BF%BD";continue}p+=encodeURIComponent(t[s])}return p}sa.defaultChars=";/?:@&=+$,-_.!~*'()#";sa.componentChars="-_.!~*'()";Hh.exports=sa});var Kh=ue((p_,$h)=>{"use strict";var Gh={};function rw(t){var n,i,s=Gh[t];if(s)return s;for(s=Gh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),s.push(i);for(n=0;n<t.length;n++)i=t.charCodeAt(n),s[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2);return s}function la(t,n){var i;return typeof n!="string"&&(n=la.defaultChars),i=rw(n),t.replace(/(%[a-f0-9]{2})+/gi,function(s){var u,c,d,h,p,g,y,m="";for(u=0,c=s.length;u<c;u+=3){if(d=parseInt(s.slice(u+1,u+3),16),d<128){m+=i[d];continue}if((d&224)===192&&u+3<c&&(h=parseInt(s.slice(u+4,u+6),16),(h&192)===128)){y=d<<6&1984|h&63,y<128?m+="<22><>":m+=String.fromCharCode(y),u+=3;continue}if((d&240)===224&&u+6<c&&(h=parseInt(s.slice(u+4,u+6),16),p=parseInt(s.slice(u+7,u+9),16),(h&192)===128&&(p&192)===128)){y=d<<12&61440|h<<6&4032|p&63,y<2048||y>=55296&&y<=57343?m+="<22><><EFBFBD>":m+=String.fromCharCode(y),u+=6;continue}if((d&248)===240&&u+9<c&&(h=parseInt(s.slice(u+4,u+6),16),p=parseInt(s.slice(u+7,u+9),16),g=parseInt(s.slice(u+10,u+12),16),(h&192)===128&&(p&192)===128&&(g&192)===128)){y=d<<18&1835008|h<<12&258048|p<<6&4032|g&63,y<65536||y>1114111?m+="<22><><EFBFBD><EFBFBD>":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),u+=9;continue}m+="<22>"}return m})}la.defaultChars=";/?:@&=+$,#";la.componentChars="";$h.exports=la});var Yh=ue((m_,Vh)=>{"use strict";Vh.exports=function(n){var i="";return i+=n.protocol||"",i+=n.slashes?"//":"",i+=n.auth?n.auth+"@":"",n.hostname&&n.hostname.indexOf(":")!==-1?i+="["+n.hostname+"]":i+=n.hostname||"",i+=n.port?":"+n.port:"",i+=n.pathname||"",i+=n.search||"",i+=n.hash||"",i}});var nf=ue((g_,Xh)=>{"use strict";function ua(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var iw=/^([a-z0-9.+-]+:)/i,ow=/:[0-9]*$/,aw=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,sw=["<",">",'"',"`"," ","\r",`
`," "],lw=["{","}","|","\\","^","`"].concat(sw),uw=["'"].concat(lw),Zh=["%","/","?",";","#"].concat(uw),Qh=["/","?","#"],cw=255,Jh=/^[+a-z0-9A-Z_-]{0,63}$/,dw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ef={javascript:!0,"javascript:":!0},tf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function hw(t,n){if(t&&t instanceof ua)return t;var i=new ua;return i.parse(t,n),i}ua.prototype.parse=function(t,n){var i,s,u,c,d,h=t;if(h=h.trim(),!n&&t.split("#").length===1){var p=aw.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=iw.exec(h);if(g&&(g=g[0],u=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(n||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&ef[g])&&(h=h.substr(2),this.slashes=!0)),!ef[g]&&(d||g&&!tf[g])){var y=-1;for(i=0;i<Qh.length;i++)c=h.indexOf(Qh[i]),c!==-1&&(y===-1||c<y)&&(y=c);var m,b;for(y===-1?b=h.lastIndexOf("@"):b=h.lastIndexOf("@",y),b!==-1&&(m=h.slice(0,b),h=h.slice(b+1),this.auth=m),y=-1,i=0;i<Zh.length;i++)c=h.indexOf(Zh[i]),c!==-1&&(y===-1||c<y)&&(y=c);y===-1&&(y=h.length),h[y-1]===":"&&y--;var w=h.slice(0,y);h=h.slice(y),this.parseHost(w),this.hostname=this.hostname||"";var D=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!D){var E=this.hostname.split(/\./);for(i=0,s=E.length;i<s;i++){var S=E[i];if(!S)continue;if(!S.match(Jh)){for(var z="",A=0,R=S.length;A<R;A++)S.charCodeAt(A)>127?z+="x":z+=S[A];if(!z.match(Jh)){var U=E.slice(0,i),Y=E.slice(i+1),B=S.match(dw);B&&(U.push(B[1]),Y.unshift(B[2])),Y.length&&(h=Y.join(".")+h),this.hostname=U.join(".");break}}}}this.hostname.length>cw&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var G=h.indexOf("#");G!==-1&&(this.hash=h.substr(G),h=h.slice(0,G));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),tf[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(t){var n=ow.exec(t);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};Xh.exports=hw});var tl=ue((v_,Xi)=>{"use strict";Xi.exports.encode=Wh();Xi.exports.decode=Kh();Xi.exports.format=Yh();Xi.exports.parse=nf()});var nl=ue((b_,rf)=>{rf.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=ue((y_,of)=>{of.exports=/[\0-\x1F\x7F-\x9F]/});var sf=ue((w_,af)=>{af.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var il=ue((k_,lf)=>{lf.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var uf=ue(ti=>{"use strict";ti.Any=nl();ti.Cc=rl();ti.Cf=sf();ti.P=aa();ti.Z=il()});var et=ue(qt=>{"use strict";function fw(t){return Object.prototype.toString.call(t)}function pw(t){return fw(t)==="[object String]"}var mw=Object.prototype.hasOwnProperty;function cf(t,n){return mw.call(t,n)}function gw(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function vw(t,n,i){return[].concat(t.slice(0,n),i,t.slice(n+1))}function df(t){return t>=55296&&t<=57343||(t>=64976&&t<=65007||((t&65535)===65535||(t&65535)===65534||(t>=0&&t<=8||(t===11||(t>=14&&t<=31||t>=127&&t<=159)))))?!1:!(t>1114111)}function hf(t){if(t>65535){t-=65536;var n=55296+(t>>10),i=56320+(t&1023);return String.fromCharCode(n,i)}return String.fromCharCode(t)}var ff=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,bw=/&([a-z#][a-z0-9]{1,31});/gi,yw=new RegExp(ff.source+"|"+bw.source,"gi"),ww=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,pf=el();function kw(t,n){var i=0;return cf(pf,n)?pf[n]:n.charCodeAt(0)===35&&ww.test(n)&&(i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10),df(i))?hf(i):t}function xw(t){return t.indexOf("\\")<0?t:t.replace(ff,"$1")}function _w(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(yw,function(n,i,s){return i||kw(n,s)})}var Cw=/[&<>"]/,Sw=/[&<>"]/g,Ew={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Dw(t){return Ew[t]}function Aw(t){return Cw.test(t)?t.replace(Sw,Dw):t}var Tw=/[.?*+^$[\]\\(){}|-]/g;function Lw(t){return t.replace(Tw,"\\$&")}function Iw(t){switch(t){case 9:case 32:return!0}return!1}function Fw(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var Mw=aa();function qw(t){return Mw.test(t)}function zw(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ow(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}qt.lib={};qt.lib.mdurl=tl();qt.lib.ucmicro=uf();qt.assign=gw;qt.isString=pw;qt.has=cf;qt.unescapeMd=xw;qt.unescapeAll=_w;qt.isValidEntityCode=df;qt.fromCodePoint=hf;qt.escapeHtml=Aw;qt.arrayReplaceAt=vw;qt.isSpace=Iw;qt.isWhiteSpace=Fw;qt.isMdAsciiPunct=zw;qt.isPunctChar=qw;qt.escapeRE=Lw;qt.normalizeReference=Ow});var gf=ue((C_,mf)=>{"use strict";mf.exports=function(n,i,s){var u,c,d,h,p=-1,g=n.posMax,y=n.pos;for(n.pos=i+1,u=1;n.pos<g;){if(d=n.src.charCodeAt(n.pos),d===93&&(u--,u===0)){c=!0;break}if(h=n.pos,n.md.inline.skipToken(n),d===91){if(h===n.pos-1)u++;else if(s)return n.pos=y,-1}}return c&&(p=n.pos),n.pos=y,p}});var yf=ue((S_,vf)=>{"use strict";var bf=et().unescapeAll;vf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(n.charCodeAt(i)===60){for(i++;i<s;){if(u=n.charCodeAt(i),u===10)return p;if(u===62)return p.pos=i+1,p.str=bf(n.slice(h+1,i)),p.ok=!0,p;if(u===92&&i+1<s){i+=2;continue}i++}return p}for(c=0;i<s&&!(u=n.charCodeAt(i),u===32);){if(u<32||u===127)break;if(u===92&&i+1<s){i+=2;continue}if(u===40&&c++,u===41){if(c===0)break;c--}i++}return h===i||(c!==0||(p.str=bf(n.slice(h,i)),p.lines=d,p.pos=i,p.ok=!0)),p}});var kf=ue((E_,wf)=>{"use strict";var Rw=et().unescapeAll;wf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(i>=s)return p;if(c=n.charCodeAt(i),c!==34&&c!==39&&c!==40)return p;for(i++,c===40&&(c=41);i<s;){if(u=n.charCodeAt(i),u===c)return p.pos=i+1,p.lines=d,p.str=Rw(n.slice(h+1,i)),p.ok=!0,p;u===10?d++:u===92&&i+1<s&&(i++,n.charCodeAt(i)===10&&d++),i++}return p}});var xf=ue(ca=>{"use strict";ca.parseLinkLabel=gf();ca.parseLinkDestination=yf();ca.parseLinkTitle=kf()});var Cf=ue((A_,_f)=>{"use strict";var Pw=et().assign,Nw=et().unescapeAll,Cr=et().escapeHtml,zn={};zn.code_inline=function(t,n,i,s,u){var c=t[n];return"<code"+u.renderAttrs(c)+">"+Cr(t[n].content)+"</code>"};zn.code_block=function(t,n,i,s,u){var c=t[n];return"<pre"+u.renderAttrs(c)+"><code>"+Cr(t[n].content)+`</code></pre>
`};zn.fence=function(t,n,i,s,u){var c=t[n],d=c.info?Nw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Cr(c.content):p=Cr(c.content),p.indexOf("<pre")===0?p+`
`:d?(g=c.attrIndex("class"),y=c.attrs?c.attrs.slice():[],g<0?y.push(["class",i.langPrefix+h]):y[g][1]+=" "+i.langPrefix+h,m={attrs:y},"<pre><code"+u.renderAttrs(m)+">"+p+`</code></pre>
`):"<pre><code"+u.renderAttrs(c)+">"+p+`</code></pre>
`};zn.image=function(t,n,i,s,u){var c=t[n];return c.attrs[c.attrIndex("alt")][1]=u.renderInlineAsText(c.children,i,s),u.renderToken(t,n,i)};zn.hardbreak=function(t,n,i){return i.xhtmlOut?`<br />
`:`<br>
`};zn.softbreak=function(t,n,i){return i.breaks?i.xhtmlOut?`<br />
`:`<br>
`:`
`};zn.text=function(t,n){return Cr(t[n].content)};zn.html_block=function(t,n){return t[n].content};zn.html_inline=function(t,n){return t[n].content};function ni(){this.rules=Pw({},zn)}ni.prototype.renderAttrs=function(n){var i,s,u;if(!n.attrs)return"";for(u="",i=0,s=n.attrs.length;i<s;i++)u+=" "+Cr(n.attrs[i][0])+'="'+Cr(n.attrs[i][1])+'"';return u};ni.prototype.renderToken=function(n,i,s){var u,c="",d=!1,h=n[i];return h.hidden?"":(h.block&&h.nesting!==-1&&i&&n[i-1].hidden&&(c+=`
`),c+=(h.nesting===-1?"</":"<")+h.tag,c+=this.renderAttrs(h),h.nesting===0&&s.xhtmlOut&&(c+=" /"),h.block&&(d=!0,h.nesting===1&&(i+1<n.length&&(u=n[i+1],(u.type==="inline"||u.hidden||u.nesting===-1&&u.tag===h.tag)&&(d=!1)))),c+=d?`>
`:">",c)};ni.prototype.renderInline=function(t,n,i){for(var s,u="",c=this.rules,d=0,h=t.length;d<h;d++)s=t[d].type,typeof c[s]!="undefined"?u+=c[s](t,d,n,i,this):u+=this.renderToken(t,d,n);return u};ni.prototype.renderInlineAsText=function(t,n,i){for(var s="",u=0,c=t.length;u<c;u++)t[u].type==="text"?s+=t[u].content:t[u].type==="image"&&(s+=this.renderInlineAsText(t[u].children,n,i));return s};ni.prototype.render=function(t,n,i){var s,u,c,d="",h=this.rules;for(s=0,u=t.length;s<u;s++)c=t[s].type,c==="inline"?d+=this.renderInline(t[s].children,n,i):typeof h[c]!="undefined"?d+=h[t[s].type](t,s,n,i,this):d+=this.renderToken(t,s,n,i);return d};_f.exports=ni});var da=ue((T_,Sf)=>{"use strict";function xn(){this.__rules__=[],this.__cache__=null}xn.prototype.__find__=function(t){for(var n=0;n<this.__rules__.length;n++)if(this.__rules__[n].name===t)return n;return-1};xn.prototype.__compile__=function(){var t=this,n=[""];t.__rules__.forEach(function(i){if(!i.enabled)return;i.alt.forEach(function(s){n.indexOf(s)<0&&n.push(s)})}),t.__cache__={},n.forEach(function(i){t.__cache__[i]=[],t.__rules__.forEach(function(s){if(!s.enabled)return;if(i&&s.alt.indexOf(i)<0)return;t.__cache__[i].push(s.fn)})})};xn.prototype.at=function(t,n,i){var s=this.__find__(t),u=i||{};if(s===-1)throw new Error("Parser rule not found: "+t);this.__rules__[s].fn=n,this.__rules__[s].alt=u.alt||[],this.__cache__=null};xn.prototype.before=function(t,n,i,s){var u=this.__find__(t),c=s||{};if(u===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(u,0,{name:n,enabled:!0,fn:i,alt:c.alt||[]}),this.__cache__=null};xn.prototype.after=function(t,n,i,s){var u=this.__find__(t),c=s||{};if(u===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(u+1,0,{name:n,enabled:!0,fn:i,alt:c.alt||[]}),this.__cache__=null};xn.prototype.push=function(t,n,i){var s=i||{};this.__rules__.push({name:t,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null};xn.prototype.enable=function(t,n){Array.isArray(t)||(t=[t]);var i=[];return t.forEach(function(s){var u=this.__find__(s);if(u<0){if(n)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[u].enabled=!0,i.push(s)},this),this.__cache__=null,i};xn.prototype.enableOnly=function(t,n){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(i){i.enabled=!1}),this.enable(t,n)};xn.prototype.disable=function(t,n){Array.isArray(t)||(t=[t]);var i=[];return t.forEach(function(s){var u=this.__find__(s);if(u<0){if(n)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[u].enabled=!1,i.push(s)},this),this.__cache__=null,i};xn.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};Sf.exports=xn});var Df=ue((L_,Ef)=>{"use strict";var Bw=/\r\n?|\n/g,jw=/\0/g;Ef.exports=function(n){var i;i=n.src.replace(Bw,`
`),i=i.replace(jw,"<22>"),n.src=i}});var Tf=ue((I_,Af)=>{"use strict";Af.exports=function(n){var i;n.inlineMode?(i=new n.Token("inline","",0),i.content=n.src,i.map=[0,1],i.children=[],n.tokens.push(i)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}});var If=ue((F_,Lf)=>{"use strict";Lf.exports=function(n){var i=n.tokens,s,u,c;for(u=0,c=i.length;u<c;u++)s=i[u],s.type==="inline"&&n.md.inline.parse(s.content,n.md,n.env,s.children)}});var Mf=ue((M_,Ff)=>{"use strict";var Hw=et().arrayReplaceAt;function Uw(t){return/^<a[>\s]/i.test(t)}function Ww(t){return/^<\/a\s*>/i.test(t)}Ff.exports=function(n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A=n.tokens,R;if(!n.md.options.linkify)return;for(s=0,u=A.length;s<u;s++){if(A[s].type!=="inline"||!n.md.linkify.pretest(A[s].content))continue;for(c=A[s].children,D=0,i=c.length-1;i>=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Uw(h.content)&&D>0&&D--,Ww(h.content)&&D++),D>0)continue;if(h.type==="text"&&n.md.linkify.test(h.content)){for(y=h.content,R=n.md.linkify.match(y),p=[],w=h.level,b=0,g=0;g<R.length;g++){if(E=R[g].url,S=n.md.normalizeLink(E),!n.md.validateLink(S))continue;z=R[g].text,R[g].schema?R[g].schema==="mailto:"&&!/^mailto:/i.test(z)?z=n.md.normalizeLinkText("mailto:"+z).replace(/^mailto:/,""):z=n.md.normalizeLinkText(z):z=n.md.normalizeLinkText("http://"+z).replace(/^http:\/\//,""),m=R[g].index,m>b&&(d=new n.Token("text","",0),d.content=y.slice(b,m),d.level=w,p.push(d)),d=new n.Token("link_open","a",1),d.attrs=[["href",S]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new n.Token("text","",0),d.content=z,d.level=w,p.push(d),d=new n.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),b=R[g].lastIndex}b<y.length&&(d=new n.Token("text","",0),d.content=y.slice(b),d.level=w,p.push(d)),A[s].children=c=Hw(c,i,p)}}}}});var Of=ue((q_,qf)=>{"use strict";var zf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$w=/\((c|tm|r|p)\)/i,Gw=/\((c|tm|r|p)\)/ig,Kw={c:"©",r:"®",p:"§",tm:"™"};function Vw(t,n){return Kw[n.toLowerCase()]}function Yw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(i.content=i.content.replace(Gw,Vw)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Xw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(zf.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1"))),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}qf.exports=function(n){var i;if(!n.md.options.typographer)return;for(i=n.tokens.length-1;i>=0;i--){if(n.tokens[i].type!=="inline")continue;$w.test(n.tokens[i].content)&&Yw(n.tokens[i].children),zf.test(n.tokens[i].content)&&Xw(n.tokens[i].children)}}});var Uf=ue((z_,Rf)=>{"use strict";var Pf=et().isWhiteSpace,Nf=et().isPunctChar,Bf=et().isMdAsciiPunct,Zw=/['"]/,jf=/['"]/g,Hf="";function ha(t,n,i){return t.substr(0,n)+i+t.substr(n+1)}function Qw(t,n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B;for(U=[],i=0;i<t.length;i++){for(s=t[i],p=t[i].level,A=U.length-1;A>=0&&!(U[A].level<=p);A--);if(U.length=A+1,s.type!=="text")continue;u=s.content,d=0,h=u.length;e:for(;d<h&&!(jf.lastIndex=d,c=jf.exec(u),!c);){if(S=z=!0,d=c.index+1,R=c[0]==="'",y=32,c.index-1>=0)y=u.charCodeAt(c.index-1);else for(A=i-1;A>=0&&!(t[A].type==="softbreak"||t[A].type==="hardbreak");A--){if(!t[A].content)continue;y=t[A].content.charCodeAt(t[A].content.length-1);break}if(m=32,d<h)m=u.charCodeAt(d);else for(A=i+1;A<t.length&&!(t[A].type==="softbreak"||t[A].type==="hardbreak");A++){if(!t[A].content)continue;m=t[A].content.charCodeAt(0);break}if(b=Bf(y)||Nf(String.fromCharCode(y)),w=Bf(m)||Nf(String.fromCharCode(m)),D=Pf(y),E=Pf(m),E?S=!1:w&&(D||b||(S=!1)),D?z=!1:b&&(E||w||(z=!1)),m===34&&c[0]==='"'&&(y>=48&&y<=57&&(z=S=!1)),S&&z&&(S=b,z=w),!S&&!z){R&&(s.content=ha(s.content,c.index,Hf));continue}if(z){for(A=U.length-1;A>=0&&!(g=U[A],U[A].level<p);A--)if(g.single===R&&U[A].level===p){g=U[A],R?(Y=n.md.options.quotes[2],B=n.md.options.quotes[3]):(Y=n.md.options.quotes[0],B=n.md.options.quotes[1]),s.content=ha(s.content,c.index,B),t[g.token].content=ha(t[g.token].content,g.pos,Y),d+=B.length-1,g.token===i&&(d+=Y.length-1),u=s.content,h=u.length,U.length=A;continue e}}S?U.push({token:i,pos:c.index,single:R,level:p}):z&&R&&(s.content=ha(s.content,c.index,Hf))}}}Rf.exports=function(n){var i;if(!n.md.options.typographer)return;for(i=n.tokens.length-1;i>=0;i--){if(n.tokens[i].type!=="inline"||!Zw.test(n.tokens[i].content))continue;Qw(n.tokens[i].children,n)}}});var fa=ue((O_,Wf)=>{"use strict";function ri(t,n,i){this.type=t,this.tag=n,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ri.prototype.attrIndex=function(n){var i,s,u;if(!this.attrs)return-1;for(i=this.attrs,s=0,u=i.length;s<u;s++)if(i[s][0]===n)return s;return-1};ri.prototype.attrPush=function(n){this.attrs?this.attrs.push(n):this.attrs=[n]};ri.prototype.attrSet=function(n,i){var s=this.attrIndex(n),u=[n,i];s<0?this.attrPush(u):this.attrs[s]=u};ri.prototype.attrGet=function(n){var i=this.attrIndex(n),s=null;return i>=0&&(s=this.attrs[i][1]),s};ri.prototype.attrJoin=function(n,i){var s=this.attrIndex(n);s<0?this.attrPush([n,i]):this.attrs[s][1]=this.attrs[s][1]+" "+i};Wf.exports=ri});var Kf=ue((R_,$f)=>{"use strict";var Jw=fa();function Gf(t,n,i){this.src=t,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=n}Gf.prototype.Token=Jw;$f.exports=Gf});var Yf=ue((P_,Vf)=>{"use strict";var ek=da(),ol=[["normalize",Df()],["block",Tf()],["inline",If()],["linkify",Mf()],["replacements",Of()],["smartquotes",Uf()]];function al(){this.ruler=new ek;for(var t=0;t<ol.length;t++)this.ruler.push(ol[t][0],ol[t][1])}al.prototype.process=function(t){var n,i,s;for(s=this.ruler.getRules(""),n=0,i=s.length;n<i;n++)s[n](t)};al.prototype.State=Kf();Vf.exports=al});var Qf=ue((N_,Xf)=>{"use strict";var tk=et().isSpace;function sl(t,n){var i=t.bMarks[n]+t.blkIndent,s=t.eMarks[n];return t.src.substr(i,s-i)}function Zf(t){var n=[],i=0,s=t.length,u,c=0,d=0,h=!1,p=0;for(u=t.charCodeAt(i);i<s;)u===96?h?(h=!1,p=i):c%2===0&&(h=!0,p=i):u===124&&c%2===0&&!h&&(n.push(t.substring(d,i)),d=i+1),u===92?c++:c=0,i++,i===s&&h&&(h=!1,i=p+1),u=t.charCodeAt(i);return n.push(t.substring(d)),n}Xf.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S;if(i+2>s)return!1;if(g=i+1,n.sCount[g]<n.blkIndent)return!1;if(n.sCount[g]-n.blkIndent>=4)return!1;if(h=n.bMarks[g]+n.tShift[g],h>=n.eMarks[g])return!1;if(c=n.src.charCodeAt(h++),c!==124&&c!==45&&c!==58)return!1;for(;h<n.eMarks[g];){if(c=n.src.charCodeAt(h),c!==124&&c!==45&&c!==58&&!tk(c))return!1;h++}for(d=sl(n,i+1),y=d.split("|"),w=[],p=0;p<y.length;p++){if(D=y[p].trim(),!D){if(p===0||p===y.length-1)continue;return!1}if(!/^:?-+:?$/.test(D))return!1;D.charCodeAt(D.length-1)===58?w.push(D.charCodeAt(0)===58?"center":"right"):D.charCodeAt(0)===58?w.push("left"):w.push("")}if(d=sl(n,i).trim(),d.indexOf("|")===-1)return!1;if(n.sCount[i]-n.blkIndent>=4)return!1;if(y=Zf(d.replace(/^\||\|$/g,"")),m=y.length,m>w.length)return!1;if(u)return!0;for(b=n.push("table_open","table",1),b.map=E=[i,0],b=n.push("thead_open","thead",1),b.map=[i,i+1],b=n.push("tr_open","tr",1),b.map=[i,i+1],p=0;p<y.length;p++)b=n.push("th_open","th",1),b.map=[i,i+1],w[p]&&(b.attrs=[["style","text-align:"+w[p]]]),b=n.push("inline","",0),b.content=y[p].trim(),b.map=[i,i+1],b.children=[],b=n.push("th_close","th",-1);for(b=n.push("tr_close","tr",-1),b=n.push("thead_close","thead",-1),b=n.push("tbody_open","tbody",1),b.map=S=[i+2,0],g=i+2;g<s&&!(n.sCount[g]<n.blkIndent);g++){if(d=sl(n,g).trim(),d.indexOf("|")===-1)break;if(n.sCount[g]-n.blkIndent>=4)break;for(y=Zf(d.replace(/^\||\|$/g,"")),b=n.push("tr_open","tr",1),p=0;p<m;p++)b=n.push("td_open","td",1),b.map=[g,g+1],w[p]&&(b.attrs=[["style","text-align:"+w[p]]]),b=n.push("inline","",0),b.map=[g,g+1],b.content=y[p]?y[p].trim():"",b.children=[],b=n.push("td_close","td",-1);b=n.push("tr_close","tr",-1)}return b=n.push("tbody_close","tbody",-1),b=n.push("table_close","table",-1),E[1]=S[1]=g,n.line=g,!0}});var ep=ue((B_,Jf)=>{"use strict";Jf.exports=function(n,i,s){var u,c,d;if(n.sCount[i]-n.blkIndent<4)return!1;for(c=u=i+1;u<s;){if(n.isEmpty(u)){u++;continue}if(n.sCount[u]-n.blkIndent>=4){u++,c=u;continue}break}return n.line=c,d=n.push("code_block","code",0),d.content=n.getLines(i,c,4+n.blkIndent,!0),d.map=[i,n.line],!0}});var np=ue((j_,tp)=>{"use strict";tp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b=!1,w=n.bMarks[i]+n.tShift[i],D=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(w+3>D)return!1;if(c=n.src.charCodeAt(w),c!==126&&c!==96)return!1;if(g=w,w=n.skipChars(w,c),d=w-g,d<3)return!1;if(m=n.src.slice(g,w),h=n.src.slice(w,D),c===96&&h.indexOf(String.fromCharCode(c))>=0)return!1;if(u)return!0;for(p=i;!(p++,p>=s);){if(w=g=n.bMarks[p]+n.tShift[p],D=n.eMarks[p],w<D&&n.sCount[p]<n.blkIndent)break;if(n.src.charCodeAt(w)!==c)continue;if(n.sCount[p]-n.blkIndent>=4)continue;if(w=n.skipChars(w,c),w-g<d)continue;if(w=n.skipSpaces(w),w<D)continue;b=!0;break}return d=n.sCount[i],n.line=p+(b?1:0),y=n.push("fence","code",0),y.info=h,y.content=n.getLines(i+1,p,d,!0),y.markup=m,y.map=[i,n.line],!0}});var op=ue((H_,rp)=>{"use strict";var ip=et().isSpace;rp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B,G,ee,J=n.lineMax,O=n.bMarks[i]+n.tShift[i],Z=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(O++)!==62)return!1;if(u)return!0;for(p=w=n.sCount[i]+1,n.src.charCodeAt(O)===32?(O++,p++,w++,c=!1,U=!0):n.src.charCodeAt(O)===9?(U=!0,(n.bsCount[i]+w)%4===3?(O++,p++,w++,c=!1):c=!0):U=!1,D=[n.bMarks[i]],n.bMarks[i]=O;O<Z&&(d=n.src.charCodeAt(O),ip(d));){d===9?w+=4-(w+n.bsCount[i]+(c?1:0))%4:w++;O++}for(E=[n.bsCount[i]],n.bsCount[i]=n.sCount[i]+1+(U?1:0),y=O>=Z,A=[n.sCount[i]],n.sCount[i]=w-p,R=[n.tShift[i]],n.tShift[i]=O-n.bMarks[i],B=n.md.block.ruler.getRules("blockquote"),z=n.parentType,n.parentType="blockquote",b=i+1;b<s&&!(ee=n.sCount[b]<n.blkIndent,O=n.bMarks[b]+n.tShift[b],Z=n.eMarks[b],O>=Z);b++){if(n.src.charCodeAt(O++)===62&&!ee){for(p=w=n.sCount[b]+1,n.src.charCodeAt(O)===32?(O++,p++,w++,c=!1,U=!0):n.src.charCodeAt(O)===9?(U=!0,(n.bsCount[b]+w)%4===3?(O++,p++,w++,c=!1):c=!0):U=!1,D.push(n.bMarks[b]),n.bMarks[b]=O;O<Z&&(d=n.src.charCodeAt(O),ip(d));){d===9?w+=4-(w+n.bsCount[b]+(c?1:0))%4:w++;O++}y=O>=Z,E.push(n.bsCount[b]),n.bsCount[b]=n.sCount[b]+1+(U?1:0),A.push(n.sCount[b]),n.sCount[b]=w-p,R.push(n.tShift[b]),n.tShift[b]=O-n.bMarks[b];continue}if(y)break;for(Y=!1,h=0,g=B.length;h<g;h++)if(B[h](n,b,s,!0)){Y=!0;break}if(Y){n.lineMax=b,n.blkIndent!==0&&(D.push(n.bMarks[b]),E.push(n.bsCount[b]),R.push(n.tShift[b]),A.push(n.sCount[b]),n.sCount[b]-=n.blkIndent);break}D.push(n.bMarks[b]),E.push(n.bsCount[b]),R.push(n.tShift[b]),A.push(n.sCount[b]),n.sCount[b]=-1}for(S=n.blkIndent,n.blkIndent=0,G=n.push("blockquote_open","blockquote",1),G.markup=">",G.map=m=[i,0],n.md.block.tokenize(n,i,b),G=n.push("blockquote_close","blockquote",-1),G.markup=">",n.lineMax=J,n.parentType=z,m[1]=n.line,h=0;h<R.length;h++)n.bMarks[h+i]=D[h],n.tShift[h+i]=R[h],n.sCount[h+i]=A[h],n.bsCount[h+i]=E[h];return n.blkIndent=S,!0}});var sp=ue((U_,ap)=>{"use strict";var nk=et().isSpace;ap.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g++),c!==42&&c!==45&&c!==95)return!1;for(d=1;g<y;){if(h=n.src.charCodeAt(g++),h!==c&&!nk(h))return!1;h===c&&d++}return d<3?!1:(u||(n.line=i+1,p=n.push("hr","hr",0),p.map=[i,n.line],p.markup=Array(d+1).join(String.fromCharCode(c))),!0)}});var hp=ue((W_,lp)=>{"use strict";var up=et().isSpace;function cp(t,n){var i,s,u,c;return s=t.bMarks[n]+t.tShift[n],u=t.eMarks[n],i=t.src.charCodeAt(s++),i!==42&&i!==45&&i!==43||s<u&&(c=t.src.charCodeAt(s),!up(c))?-1:s}function dp(t,n){var i,s=t.bMarks[n]+t.tShift[n],u=s,c=t.eMarks[n];if(u+1>=c)return-1;if(i=t.src.charCodeAt(u++),i<48||i>57)return-1;for(;;){if(u>=c)return-1;if(i=t.src.charCodeAt(u++),i>=48&&i<=57){if(u-s>=10)return-1;continue}if(i===41||i===46)break;return-1}return u<c&&(i=t.src.charCodeAt(u),!up(i))?-1:u}function rk(t,n){var i,s,u=t.level+2;for(i=n+2,s=t.tokens.length-2;i<s;i++)t.tokens[i].level===u&&t.tokens[i].type==="paragraph_open"&&(t.tokens[i+2].hidden=!0,t.tokens[i].hidden=!0,i+=2)}lp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B,G,ee,J,O,Z,_,V,j,Q,q,I=!1,H=!0;if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.listIndent>=0&&n.sCount[i]-n.listIndent>=4&&n.sCount[i]<n.blkIndent)return!1;if(u&&n.parentType==="paragraph"&&(n.tShift[i]>=n.blkIndent&&(I=!0)),(Z=dp(n,i))>=0){if(m=!0,V=n.bMarks[i]+n.tShift[i],z=Number(n.src.substr(V,Z-V-1)),I&&z!==1)return!1}else if((Z=cp(n,i))>=0)m=!1;else return!1;if(I&&n.skipSpaces(Z)>=n.eMarks[i])return!1;if(S=n.src.charCodeAt(Z-1),u)return!0;for(E=n.tokens.length,m?(q=n.push("ordered_list_open","ol",1),z!==1&&(q.attrs=[["start",z]])):q=n.push("bullet_list_open","ul",1),q.map=D=[i,0],q.markup=String.fromCharCode(S),R=i,_=!1,Q=n.md.block.ruler.getRules("list"),B=n.parentType,n.parentType="list";R<s;){for(O=Z,A=n.eMarks[R],y=U=n.sCount[R]+Z-(n.bMarks[i]+n.tShift[i]);O<A;){if(c=n.src.charCodeAt(O),c===9)U+=4-(U+n.bsCount[R])%4;else if(c===32)U++;else break;O++}if(d=O,d>=A?g=1:g=U-y,g>4&&(g=1),p=y+g,q=n.push("list_item_open","li",1),q.markup=String.fromCharCode(S),q.map=b=[i,0],J=n.tight,ee=n.tShift[i],G=n.sCount[i],Y=n.listIndent,n.listIndent=n.blkIndent,n.blkIndent=p,n.tight=!0,n.tShift[i]=d-n.bMarks[i],n.sCount[i]=U,d>=A&&n.isEmpty(i+1)?n.line=Math.min(n.line+2,s):n.md.block.tokenize(n,i,s,!0),(!n.tight||_)&&(H=!1),_=n.line-i>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=Y,n.tShift[i]=ee,n.sCount[i]=G,n.tight=J,q=n.push("list_item_close","li",-1),q.markup=String.fromCharCode(S),R=i=n.line,b[1]=R,d=n.bMarks[i],R>=s)break;if(n.sCount[R]<n.blkIndent)break;if(n.sCount[i]-n.blkIndent>=4)break;for(j=!1,h=0,w=Q.length;h<w;h++)if(Q[h](n,R,s,!0)){j=!0;break}if(j)break;if(m){if(Z=dp(n,R),Z<0)break}else if(Z=cp(n,R),Z<0)break;if(S!==n.src.charCodeAt(Z-1))break}return m?q=n.push("ordered_list_close","ol",-1):q=n.push("bullet_list_close","ul",-1),q.markup=String.fromCharCode(S),D[1]=R,n.line=R,n.parentType=B,H&&rk(n,E),!0}});var pp=ue(($_,fp)=>{"use strict";var ik=et().normalizeReference,pa=et().isSpace;fp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y=0,B=n.bMarks[i]+n.tShift[i],G=n.eMarks[i],ee=i+1;if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(B)!==91)return!1;for(;++B<G;)if(n.src.charCodeAt(B)===93&&n.src.charCodeAt(B-1)!==92){if(B+1===G)return!1;if(n.src.charCodeAt(B+1)!==58)return!1;break}for(p=n.lineMax,R=n.md.block.ruler.getRules("reference"),D=n.parentType,n.parentType="reference";ee<p&&!n.isEmpty(ee);ee++){if(n.sCount[ee]-n.blkIndent>3)continue;if(n.sCount[ee]<0)continue;for(A=!1,y=0,m=R.length;y<m;y++)if(R[y](n,ee,p,!0)){A=!0;break}if(A)break}for(z=n.getLines(i,ee,n.blkIndent,!1).trim(),G=z.length,B=1;B<G;B++){if(c=z.charCodeAt(B),c===91)return!1;if(c===93){w=B;break}else c===10?Y++:c===92&&(B++,B<G&&z.charCodeAt(B)===10&&Y++)}if(w<0||z.charCodeAt(w+1)!==58)return!1;for(B=w+2;B<G;B++)if(c=z.charCodeAt(B),c===10)Y++;else if(!pa(c))break;if(E=n.md.helpers.parseLinkDestination(z,B,G),!E.ok)return!1;if(g=n.md.normalizeLink(E.str),!n.md.validateLink(g))return!1;for(B=E.pos,Y+=E.lines,d=B,h=Y,S=B;B<G;B++)if(c=z.charCodeAt(B),c===10)Y++;else if(!pa(c))break;for(E=n.md.helpers.parseLinkTitle(z,B,G),B<G&&S!==B&&E.ok?(U=E.str,B=E.pos,Y+=E.lines):(U="",B=d,Y=h);B<G&&!(c=z.charCodeAt(B),!pa(c));)B++;if(B<G&&z.charCodeAt(B)!==10&&U)for(U="",B=d,Y=h;B<G&&!(c=z.charCodeAt(B),!pa(c));)B++;return B<G&&z.charCodeAt(B)!==10?!1:(b=ik(z.slice(1,w)),b?(u||(typeof n.env.references=="undefined"&&(n.env.references={}),typeof n.env.references[b]=="undefined"&&(n.env.references[b]={title:U,href:g}),n.parentType=D,n.line=i+Y+1),!0):!1)}});var vp=ue((G_,mp)=>{"use strict";var gp=et().isSpace;mp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g),c!==35||g>=y)return!1;for(d=1,c=n.src.charCodeAt(++g);c===35&&g<y&&d<=6;)d++,c=n.src.charCodeAt(++g);return d>6||g<y&&!gp(c)?!1:(u||(y=n.skipSpacesBack(y,g),h=n.skipCharsBack(y,35,g),h>g&&gp(n.src.charCodeAt(h-1))&&(y=h),n.line=i+1,p=n.push("heading_open","h"+String(d),1),p.markup="########".slice(0,d),p.map=[i,n.line],p=n.push("inline","",0),p.content=n.src.slice(g,y).trim(),p.map=[i,n.line],p.children=[],p=n.push("heading_close","h"+String(d),-1),p.markup="########".slice(0,d)),!0)}});var yp=ue((K_,bp)=>{"use strict";bp.exports=function(n,i,s){var u,c,d,h,p,g,y,m,b,w=i+1,D,E=n.md.block.ruler.getRules("paragraph");if(n.sCount[i]-n.blkIndent>=4)return!1;for(D=n.parentType,n.parentType="paragraph";w<s&&!n.isEmpty(w);w++){if(n.sCount[w]-n.blkIndent>3)continue;if(n.sCount[w]>=n.blkIndent&&(g=n.bMarks[w]+n.tShift[w],y=n.eMarks[w],g<y&&(b=n.src.charCodeAt(g),(b===45||b===61)&&(g=n.skipChars(g,b),g=n.skipSpaces(g),g>=y)))){m=b===61?1:2;break}if(n.sCount[w]<0)continue;for(c=!1,d=0,h=E.length;d<h;d++)if(E[d](n,w,s,!0)){c=!0;break}if(c)break}return m?(u=n.getLines(i,w,n.blkIndent,!1).trim(),n.line=w+1,p=n.push("heading_open","h"+String(m),1),p.markup=String.fromCharCode(b),p.map=[i,n.line],p=n.push("inline","",0),p.content=u,p.map=[i,n.line-1],p.children=[],p=n.push("heading_close","h"+String(m),-1),p.markup=String.fromCharCode(b),n.parentType=D,!0):!1}});var kp=ue((V_,wp)=>{"use strict";wp.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ul=ue((Y_,ll)=>{"use strict";var ok="[a-zA-Z_:][a-zA-Z0-9:._-]*",ak="[^\"'=<>`\\x00-\\x20]+",sk="'[^']*'",lk='"[^"]*"',uk="(?:"+ak+"|"+sk+"|"+lk+")",ck="(?:\\s+"+ok+"(?:\\s*=\\s*"+uk+")?)",xp="<[A-Za-z][A-Za-z0-9\\-]*"+ck+"*\\s*\\/?>",_p="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",dk="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",hk="<[?].*?[?]>",fk="<![A-Z]+\\s+[^>]*>",pk="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",mk=new RegExp("^(?:"+xp+"|"+_p+"|"+dk+"|"+hk+"|"+fk+"|"+pk+")"),gk=new RegExp("^(?:"+xp+"|"+_p+")");ll.exports.HTML_TAG_RE=mk;ll.exports.HTML_OPEN_CLOSE_TAG_RE=gk});var Sp=ue((X_,Cp)=>{"use strict";var vk=kp(),bk=ul().HTML_OPEN_CLOSE_TAG_RE,ii=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+vk.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(bk.source+"\\s*$"),/^$/,!1]];Cp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(!n.md.options.html)return!1;if(n.src.charCodeAt(g)!==60)return!1;for(p=n.src.slice(g,y),c=0;c<ii.length&&!ii[c][0].test(p);c++);if(c===ii.length)return!1;if(u)return ii[c][2];if(d=i+1,!ii[c][1].test(p)){for(;d<s&&!(n.sCount[d]<n.blkIndent);d++)if(g=n.bMarks[d]+n.tShift[d],y=n.eMarks[d],p=n.src.slice(g,y),ii[c][1].test(p)){p.length!==0&&d++;break}}return n.line=d,h=n.push("html_block","",0),h.map=[i,d],h.content=n.getLines(i,d,n.blkIndent,!0),!0}});var Dp=ue((Z_,Ep)=>{"use strict";Ep.exports=function(n,i){var s,u,c,d,h,p,g=i+1,y=n.md.block.ruler.getRules("paragraph"),m=n.lineMax;for(p=n.parentType,n.parentType="paragraph";g<m&&!n.isEmpty(g);g++){if(n.sCount[g]-n.blkIndent>3)continue;if(n.sCount[g]<0)continue;for(u=!1,c=0,d=y.length;c<d;c++)if(y[c](n,g,m,!0)){u=!0;break}if(u)break}return s=n.getLines(i,g,n.blkIndent,!1).trim(),n.line=g,h=n.push("paragraph_open","p",1),h.map=[i,n.line],h=n.push("inline","",0),h.content=s,h.map=[i,n.line],h.children=[],h=n.push("paragraph_close","p",-1),n.parentType=p,!0}});var Lp=ue((Q_,Ap)=>{"use strict";var Tp=fa(),ma=et().isSpace;function On(t,n,i,s){var u,c,d,h,p,g,y,m;for(this.src=t,this.md=n,this.env=i,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",c=this.src,m=!1,d=h=g=y=0,p=c.length;h<p;h++){if(u=c.charCodeAt(h),!m)if(ma(u)){g++,u===9?y+=4-y%4:y++;continue}else m=!0;(u===10||h===p-1)&&(u!==10&&h++,this.bMarks.push(d),this.eMarks.push(h),this.tShift.push(g),this.sCount.push(y),this.bsCount.push(0),m=!1,g=0,y=0,d=h+1)}this.bMarks.push(c.length),this.eMarks.push(c.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}On.prototype.push=function(t,n,i){var s=new Tp(t,n,i);return s.block=!0,i<0&&this.level--,s.level=this.level,i>0&&this.level++,this.tokens.push(s),s};On.prototype.isEmpty=function(n){return this.bMarks[n]+this.tShift[n]>=this.eMarks[n]};On.prototype.skipEmptyLines=function(n){for(var i=this.lineMax;n<i&&!(this.bMarks[n]+this.tShift[n]<this.eMarks[n]);n++);return n};On.prototype.skipSpaces=function(n){for(var i,s=this.src.length;n<s&&!(i=this.src.charCodeAt(n),!ma(i));n++);return n};On.prototype.skipSpacesBack=function(n,i){if(n<=i)return n;for(;n>i;)if(!ma(this.src.charCodeAt(--n)))return n+1;return n};On.prototype.skipChars=function(n,i){for(var s=this.src.length;n<s&&!(this.src.charCodeAt(n)!==i);n++);return n};On.prototype.skipCharsBack=function(n,i,s){if(n<=s)return n;for(;n>s;)if(i!==this.src.charCodeAt(--n))return n+1;return n};On.prototype.getLines=function(n,i,s,u){var c,d,h,p,g,y,m,b=n;if(n>=i)return"";for(y=new Array(i-n),c=0;b<i;b++,c++){for(d=0,m=p=this.bMarks[b],b+1<i||u?g=this.eMarks[b]+1:g=this.eMarks[b];p<g&&d<s;){if(h=this.src.charCodeAt(p),ma(h))h===9?d+=4-(d+this.bsCount[b])%4:d++;else if(p-m<this.tShift[b])d++;else break;p++}d>s?y[c]=new Array(d-s+1).join(" ")+this.src.slice(p,g):y[c]=this.src.slice(p,g)}return y.join("")};On.prototype.Token=Tp;Ap.exports=On});var Fp=ue((J_,Ip)=>{"use strict";var yk=da(),ga=[["table",Qf(),["paragraph","reference"]],["code",ep()],["fence",np(),["paragraph","reference","blockquote","list"]],["blockquote",op(),["paragraph","reference","blockquote","list"]],["hr",sp(),["paragraph","reference","blockquote","list"]],["list",hp(),["paragraph","reference","blockquote"]],["reference",pp()],["heading",vp(),["paragraph","reference","blockquote"]],["lheading",yp()],["html_block",Sp(),["paragraph","reference","blockquote"]],["paragraph",Dp()]];function va(){this.ruler=new yk;for(var t=0;t<ga.length;t++)this.ruler.push(ga[t][0],ga[t][1],{alt:(ga[t][2]||[]).slice()})}va.prototype.tokenize=function(t,n,i){for(var s,u,c=this.ruler.getRules(""),d=c.length,h=n,p=!1,g=t.md.options.maxNesting;h<i&&!(t.line=h=t.skipEmptyLines(h),h>=i);){if(t.sCount[h]<t.blkIndent)break;if(t.level>=g){t.line=i;break}for(u=0;u<d&&!(s=c[u](t,h,i,!1),s);u++);t.tight=!p,t.isEmpty(t.line-1)&&(p=!0),h=t.line,h<i&&t.isEmpty(h)&&(p=!0,h++,t.line=h)}};va.prototype.parse=function(t,n,i,s){var u;if(!t)return;u=new this.State(t,n,i,s),this.tokenize(u,u.line,u.lineMax)};va.prototype.State=Lp();Ip.exports=va});var qp=ue((e2,Mp)=>{"use strict";function wk(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Mp.exports=function(n,i){for(var s=n.pos;s<n.posMax&&!wk(n.src.charCodeAt(s));)s++;return s===n.pos?!1:(i||(n.pending+=n.src.slice(n.pos,s)),n.pos=s,!0)}});var Op=ue((t2,zp)=>{"use strict";var kk=et().isSpace;zp.exports=function(n,i){var s,u,c=n.pos;if(n.src.charCodeAt(c)!==10)return!1;for(s=n.pending.length-1,u=n.posMax,i||(s>=0&&n.pending.charCodeAt(s)===32?s>=1&&n.pending.charCodeAt(s-1)===32?(n.pending=n.pending.replace(/ +$/,""),n.push("hardbreak","br",0)):(n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0)):n.push("softbreak","br",0)),c++;c<u&&kk(n.src.charCodeAt(c));)c++;return n.pos=c,!0}});var Np=ue((n2,Rp)=>{"use strict";var xk=et().isSpace,cl=[];for(var Pp=0;Pp<256;Pp++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){cl[t.charCodeAt(0)]=1});Rp.exports=function(n,i){var s,u=n.pos,c=n.posMax;if(n.src.charCodeAt(u)!==92)return!1;if(u++,u<c){if(s=n.src.charCodeAt(u),s<256&&cl[s]!==0)return i||(n.pending+=n.src[u]),n.pos+=2,!0;if(s===10){for(i||n.push("hardbreak","br",0),u++;u<c&&!(s=n.src.charCodeAt(u),!xk(s));)u++;return n.pos=u,!0}}return i||(n.pending+="\\"),n.pos++,!0}});var jp=ue((r2,Bp)=>{"use strict";Bp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos,y=n.src.charCodeAt(g);if(y!==96)return!1;for(s=g,g++,u=n.posMax;g<u&&n.src.charCodeAt(g)===96;)g++;for(c=n.src.slice(s,g),d=h=g;(d=n.src.indexOf("`",h))!==-1;){for(h=d+1;h<u&&n.src.charCodeAt(h)===96;)h++;if(h-d===c.length)return i||(p=n.push("code_inline","code",0),p.markup=c,p.content=n.src.slice(g,d).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),n.pos=h,!0}return i||(n.pending+=c),n.pos+=c.length,!0}});var hl=ue((i2,dl)=>{"use strict";dl.exports.tokenize=function(n,i){var s,u,c,d,h,p=n.pos,g=n.src.charCodeAt(p);if(i)return!1;if(g!==126)return!1;if(u=n.scanDelims(n.pos,!0),d=u.length,h=String.fromCharCode(g),d<2)return!1;for(d%2&&(c=n.push("text","",0),c.content=h,d--),s=0;s<d;s+=2)c=n.push("text","",0),c.content=h+h,n.delimiters.push({marker:g,length:0,jump:s,token:n.tokens.length-1,end:-1,open:u.can_open,close:u.can_close});return n.pos+=u.length,!0};function Hp(t,n){var i,s,u,c,d,h=[],p=n.length;for(i=0;i<p;i++){if(u=n[i],u.marker!==126)continue;if(u.end===-1)continue;c=n[u.end],d=t.tokens[u.token],d.type="s_open",d.tag="s",d.nesting=1,d.markup="~~",d.content="",d=t.tokens[c.token],d.type="s_close",d.tag="s",d.nesting=-1,d.markup="~~",d.content="",t.tokens[c.token-1].type==="text"&&t.tokens[c.token-1].content==="~"&&h.push(c.token-1)}for(;h.length;){for(i=h.pop(),s=i+1;s<t.tokens.length&&t.tokens[s].type==="s_close";)s++;s--,i!==s&&(d=t.tokens[s],t.tokens[s]=t.tokens[i],t.tokens[i]=d)}}dl.exports.postProcess=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(Hp(n,n.delimiters),i=0;i<u;i++)s[i]&&s[i].delimiters&&Hp(n,s[i].delimiters)}});var pl=ue((o2,fl)=>{"use strict";fl.exports.tokenize=function(n,i){var s,u,c,d=n.pos,h=n.src.charCodeAt(d);if(i)return!1;if(h!==95&&h!==42)return!1;for(u=n.scanDelims(n.pos,h===42),s=0;s<u.length;s++)c=n.push("text","",0),c.content=String.fromCharCode(h),n.delimiters.push({marker:h,length:u.length,jump:s,token:n.tokens.length-1,end:-1,open:u.can_open,close:u.can_close});return n.pos+=u.length,!0};function Up(t,n){var i,s,u,c,d,h,p=n.length;for(i=p-1;i>=0;i--){if(s=n[i],s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;u=n[s.end],h=i>0&&n[i-1].end===s.end+1&&n[i-1].token===s.token-1&&n[s.end+1].token===u.token+1&&n[i-1].marker===s.marker,d=String.fromCharCode(s.marker),c=t.tokens[s.token],c.type=h?"strong_open":"em_open",c.tag=h?"strong":"em",c.nesting=1,c.markup=h?d+d:d,c.content="",c=t.tokens[u.token],c.type=h?"strong_close":"em_close",c.tag=h?"strong":"em",c.nesting=-1,c.markup=h?d+d:d,c.content="",h&&(t.tokens[n[i-1].token].content="",t.tokens[n[s.end+1].token].content="",i--)}}fl.exports.postProcess=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(Up(n,n.delimiters),i=0;i<u;i++)s[i]&&s[i].delimiters&&Up(n,s[i].delimiters)}});var $p=ue((a2,Wp)=>{"use strict";var _k=et().normalizeReference,ml=et().isSpace;Wp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w="",D=n.pos,E=n.posMax,S=n.pos,z=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;if(h=n.pos+1,d=n.md.helpers.parseLinkLabel(n,n.pos,!0),d<0)return!1;if(p=d+1,p<E&&n.src.charCodeAt(p)===40){for(z=!1,p++;p<E&&!(u=n.src.charCodeAt(p),!ml(u)&&u!==10);p++);if(p>=E)return!1;for(S=p,g=n.md.helpers.parseLinkDestination(n.src,p,n.posMax),g.ok&&(w=n.md.normalizeLink(g.str),n.md.validateLink(w)?p=g.pos:w=""),S=p;p<E&&!(u=n.src.charCodeAt(p),!ml(u)&&u!==10);p++);if(g=n.md.helpers.parseLinkTitle(n.src,p,n.posMax),p<E&&S!==p&&g.ok)for(m=g.str,p=g.pos;p<E&&!(u=n.src.charCodeAt(p),!ml(u)&&u!==10);p++);else m="";(p>=E||n.src.charCodeAt(p)!==41)&&(z=!0),p++}if(z){if(typeof n.env.references=="undefined")return!1;if(p<E&&n.src.charCodeAt(p)===91?(S=p+1,p=n.md.helpers.parseLinkLabel(n,p),p>=0?c=n.src.slice(S,p++):p=d+1):p=d+1,c||(c=n.src.slice(h,d)),y=n.env.references[_k(c)],!y)return n.pos=D,!1;w=y.href,m=y.title}return i||(n.pos=h,n.posMax=d,b=n.push("link_open","a",1),b.attrs=s=[["href",w]],m&&s.push(["title",m]),n.md.inline.tokenize(n),b=n.push("link_close","a",-1)),n.pos=p,n.posMax=E,!0}});var Kp=ue((s2,Gp)=>{"use strict";var Ck=et().normalizeReference,gl=et().isSpace;Gp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w,D,E,S="",z=n.pos,A=n.posMax;if(n.src.charCodeAt(n.pos)!==33)return!1;if(n.src.charCodeAt(n.pos+1)!==91)return!1;if(p=n.pos+2,h=n.md.helpers.parseLinkLabel(n,n.pos+1,!1),h<0)return!1;if(g=h+1,g<A&&n.src.charCodeAt(g)===40){for(g++;g<A&&!(u=n.src.charCodeAt(g),!gl(u)&&u!==10);g++);if(g>=A)return!1;for(E=g,m=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),m.ok&&(S=n.md.normalizeLink(m.str),n.md.validateLink(S)?g=m.pos:S=""),E=g;g<A&&!(u=n.src.charCodeAt(g),!gl(u)&&u!==10);g++);if(m=n.md.helpers.parseLinkTitle(n.src,g,n.posMax),g<A&&E!==g&&m.ok)for(b=m.str,g=m.pos;g<A&&!(u=n.src.charCodeAt(g),!gl(u)&&u!==10);g++);else b="";if(g>=A||n.src.charCodeAt(g)!==41)return n.pos=z,!1;g++}else{if(typeof n.env.references=="undefined")return!1;if(g<A&&n.src.charCodeAt(g)===91?(E=g+1,g=n.md.helpers.parseLinkLabel(n,g),g>=0?d=n.src.slice(E,g++):g=h+1):g=h+1,d||(d=n.src.slice(p,h)),y=n.env.references[Ck(d)],!y)return n.pos=z,!1;S=y.href,b=y.title}return i||(c=n.src.slice(p,h),n.md.inline.parse(c,n.md,n.env,D=[]),w=n.push("image","img",0),w.attrs=s=[["src",S],["alt",""]],w.children=D,w.content=c,b&&s.push(["title",b])),n.pos=g,n.posMax=A,!0}});var Zp=ue((l2,Vp)=>{"use strict";var Yp=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Xp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;Vp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos;return n.src.charCodeAt(g)!==60?!1:(s=n.src.slice(g),s.indexOf(">")<0?!1:Xp.test(s)?(u=s.match(Xp),d=u[0].slice(1,-1),h=n.md.normalizeLink(d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=u[0].length,!0):!1):Yp.test(s)?(c=s.match(Yp),d=c[0].slice(1,-1),h=n.md.normalizeLink("mailto:"+d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=c[0].length,!0):!1):!1)}});var Jp=ue((u2,Qp)=>{"use strict";var Sk=ul().HTML_TAG_RE;function Ek(t){var n=t|32;return n>=97&&n<=122}Qp.exports=function(n,i){var s,u,c,d,h=n.pos;return n.md.options.html?(c=n.posMax,n.src.charCodeAt(h)!==60||h+2>=c?!1:(s=n.src.charCodeAt(h+1),s!==33&&s!==63&&s!==47&&!Ek(s)?!1:(u=n.src.slice(h).match(Sk),u?(i||(d=n.push("html_inline","",0),d.content=n.src.slice(h,h+u[0].length)),n.pos+=u[0].length,!0):!1))):!1}});var rm=ue((c2,em)=>{"use strict";var tm=el(),Dk=et().has,Ak=et().isValidEntityCode,nm=et().fromCodePoint,Tk=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Lk=/^&([a-z][a-z0-9]{1,31});/i;em.exports=function(n,i){var s,u,c,d=n.pos,h=n.posMax;if(n.src.charCodeAt(d)!==38)return!1;if(d+1<h){if(s=n.src.charCodeAt(d+1),s===35){if(c=n.src.slice(d).match(Tk),c)return i||(u=c[1][0].toLowerCase()==="x"?parseInt(c[1].slice(1),16):parseInt(c[1],10),n.pending+=Ak(u)?nm(u):nm(65533)),n.pos+=c[0].length,!0}else if(c=n.src.slice(d).match(Lk),c&&Dk(tm,c[1]))return i||(n.pending+=tm[c[1]]),n.pos+=c[0].length,!0}return i||(n.pending+="&"),n.pos++,!0}});var am=ue((d2,im)=>{"use strict";function om(t,n){var i,s,u,c,d,h,p,g,y={},m=n.length;for(i=0;i<m;i++){if(u=n[i],u.length=u.length||0,!u.close)continue;for(y.hasOwnProperty(u.marker)||(y[u.marker]=[-1,-1,-1]),d=y[u.marker][u.length%3],h=-1,s=i-u.jump-1;s>d;s-=c.jump+1){if(c=n[s],c.marker!==u.marker)continue;if(h===-1&&(h=s),c.open&&c.end<0&&(p=!1,(c.close||u.open)&&((c.length+u.length)%3===0&&((c.length%3!==0||u.length%3!==0)&&(p=!0))),!p)){g=s>0&&!n[s-1].open?n[s-1].jump+1:0,u.jump=i-s+g,u.open=!1,c.end=i,c.jump=g,c.close=!1,h=-1;break}}h!==-1&&(y[u.marker][(u.length||0)%3]=h)}}im.exports=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(om(n,n.delimiters),i=0;i<u;i++)s[i]&&s[i].delimiters&&om(n,s[i].delimiters)}});var lm=ue((h2,sm)=>{"use strict";sm.exports=function(n){var i,s,u=0,c=n.tokens,d=n.tokens.length;for(i=s=0;i<d;i++)c[i].nesting<0&&u--,c[i].level=u,c[i].nesting>0&&u++,c[i].type==="text"&&i+1<d&&c[i+1].type==="text"?c[i+1].content=c[i].content+c[i+1].content:(i!==s&&(c[s]=c[i]),s++);i!==s&&(c.length=s)}});var fm=ue((f2,um)=>{"use strict";var vl=fa(),cm=et().isWhiteSpace,dm=et().isPunctChar,hm=et().isMdAsciiPunct;function Zi(t,n,i,s){this.src=t,this.env=i,this.md=n,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Zi.prototype.pushPending=function(){var t=new vl("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};Zi.prototype.push=function(t,n,i){this.pending&&this.pushPending();var s=new vl(t,n,i),u=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],u={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(u),s};Zi.prototype.scanDelims=function(t,n){var i=t,s,u,c,d,h,p,g,y,m,b=!0,w=!0,D=this.posMax,E=this.src.charCodeAt(t);for(s=t>0?this.src.charCodeAt(t-1):32;i<D&&this.src.charCodeAt(i)===E;)i++;return c=i-t,u=i<D?this.src.charCodeAt(i):32,g=hm(s)||dm(String.fromCharCode(s)),m=hm(u)||dm(String.fromCharCode(u)),p=cm(s),y=cm(u),y?b=!1:m&&(p||g||(b=!1)),p?w=!1:g&&(y||m||(w=!1)),n?(d=b,h=w):(d=b&&(!w||g),h=w&&(!b||m)),{can_open:d,can_close:h,length:c}};Zi.prototype.Token=vl;um.exports=Zi});var gm=ue((p2,pm)=>{"use strict";var mm=da(),bl=[["text",qp()],["newline",Op()],["escape",Np()],["backticks",jp()],["strikethrough",hl().tokenize],["emphasis",pl().tokenize],["link",$p()],["image",Kp()],["autolink",Zp()],["html_inline",Jp()],["entity",rm()]],yl=[["balance_pairs",am()],["strikethrough",hl().postProcess],["emphasis",pl().postProcess],["text_collapse",lm()]];function Qi(){var t;for(this.ruler=new mm,t=0;t<bl.length;t++)this.ruler.push(bl[t][0],bl[t][1]);for(this.ruler2=new mm,t=0;t<yl.length;t++)this.ruler2.push(yl[t][0],yl[t][1])}Qi.prototype.skipToken=function(t){var n,i,s=t.pos,u=this.ruler.getRules(""),c=u.length,d=t.md.options.maxNesting,h=t.cache;if(typeof h[s]!="undefined"){t.pos=h[s];return}if(t.level<d)for(i=0;i<c&&!(t.level++,n=u[i](t,!0),t.level--,n);i++);else t.pos=t.posMax;n||t.pos++,h[s]=t.pos};Qi.prototype.tokenize=function(t){for(var n,i,s=this.ruler.getRules(""),u=s.length,c=t.posMax,d=t.md.options.maxNesting;t.pos<c;){if(t.level<d)for(i=0;i<u&&!(n=s[i](t,!1),n);i++);if(n){if(t.pos>=c)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Qi.prototype.parse=function(t,n,i,s){var u,c,d,h=new this.State(t,n,i,s);for(this.tokenize(h),c=this.ruler2.getRules(""),d=c.length,u=0;u<d;u++)c[u](h)};Qi.prototype.State=fm();pm.exports=Qi});var bm=ue((m2,vm)=>{"use strict";vm.exports=function(t){var n={};n.src_Any=nl().source,n.src_Cc=rl().source,n.src_Z=il().source,n.src_P=aa().source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|");var i="[><]";return n.src_pseudo_letter="(?:(?!"+i+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+i+"|"+n.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+n.src_ZCc+").|\\!+(?!"+n.src_ZCc+"|[!]).|\\?(?!"+n.src_ZCc+"|[?]).)+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+n.src_ZPCc+"))((?![$+<=>^`|])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+n.src_ZPCc+"))((?![$+<=>^`|])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n}});var Cm=ue((g2,ym)=>{"use strict";function wl(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function ba(t){return Object.prototype.toString.call(t)}function Ik(t){return ba(t)==="[object String]"}function Fk(t){return ba(t)==="[object Object]"}function Mk(t){return ba(t)==="[object RegExp]"}function wm(t){return ba(t)==="[object Function]"}function qk(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var km={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function zk(t){return Object.keys(t||{}).reduce(function(n,i){return n||km.hasOwnProperty(i)},!1)}var Ok={"http:":{validate:function(t,n,i){var s=t.slice(n);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(s)?s.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,n,i){var s=t.slice(n);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(s)?n>=3&&t[n-3]===":"||n>=3&&t[n-3]==="/"?0:s.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(t,n,i){var s=t.slice(n);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(s)?s.match(i.re.mailto)[0].length:0}}},Rk="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Pk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Nk(t){t.__index__=-1,t.__text_cache__=""}function Bk(t){return function(n,i){var s=n.slice(i);return t.test(s)?s.match(t)[0].length:0}}function xm(){return function(t,n){n.normalize(t)}}function ya(t){var n=t.re=bm()(t.__opts__),i=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||i.push(Rk),i.push(n.src_xn),n.src_tlds=i.join("|");function s(h){return h.replace("%TLDS%",n.src_tlds)}n.email_fuzzy=RegExp(s(n.tpl_email_fuzzy),"i"),n.link_fuzzy=RegExp(s(n.tpl_link_fuzzy),"i"),n.link_no_ip_fuzzy=RegExp(s(n.tpl_link_no_ip_fuzzy),"i"),n.host_fuzzy_test=RegExp(s(n.tpl_host_fuzzy_test),"i");var u=[];t.__compiled__={};function c(h,p){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+p)}Object.keys(t.__schemas__).forEach(function(h){var p=t.__schemas__[h];if(p===null)return;var g={validate:null,link:null};if(t.__compiled__[h]=g,Fk(p)){Mk(p.validate)?g.validate=Bk(p.validate):wm(p.validate)?g.validate=p.validate:c(h,p),wm(p.normalize)?g.normalize=p.normalize:p.normalize?c(h,p):g.normalize=xm();return}if(Ik(p)){u.push(h);return}c(h,p)}),u.forEach(function(h){if(!t.__compiled__[t.__schemas__[h]])return;t.__compiled__[h].validate=t.__compiled__[t.__schemas__[h]].validate,t.__compiled__[h].normalize=t.__compiled__[t.__schemas__[h]].normalize}),t.__compiled__[""]={validate:null,normalize:xm()};var d=Object.keys(t.__compiled__).filter(function(h){return h.length>0&&t.__compiled__[h]}).map(qk).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><]|"+n.src_ZPCc+"))("+d+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><]|"+n.src_ZPCc+"))("+d+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Nk(t)}function jk(t,n){var i=t.__index__,s=t.__last_index__,u=t.__text_cache__.slice(i,s);this.schema=t.__schema__.toLowerCase(),this.index=i+n,this.lastIndex=s+n,this.raw=u,this.text=u,this.url=u}function _m(t,n){var i=new jk(t,n);return t.__compiled__[i.schema].normalize(i,t),i}function mn(t,n){if(!(this instanceof mn))return new mn(t,n);n||zk(t)&&(n=t,t={}),this.__opts__=wl({},km,n),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wl({},Ok,t),this.__compiled__={},this.__tlds__=Pk,this.__tlds_replaced__=!1,this.re={},ya(this)}mn.prototype.add=function(n,i){return this.__schemas__[n]=i,ya(this),this};mn.prototype.set=function(n){return this.__opts__=wl(this.__opts__,n),this};mn.prototype.test=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return!1;var i,s,u,c,d,h,p,g,y;if(this.re.schema_test.test(n)){for(p=this.re.schema_search,p.lastIndex=0;(i=p.exec(n))!==null;)if(c=this.testSchemaAt(n,i[2],p.lastIndex),c){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(g=n.search(this.re.host_fuzzy_test),g>=0&&((this.__index__<0||g<this.__index__)&&((s=n.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(d=s.index+s[1].length,(this.__index__<0||d<this.__index__)&&(this.__schema__="",this.__index__=d,this.__last_index__=s.index+s[0].length))))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(y=n.indexOf("@"),y>=0&&((u=n.match(this.re.email_fuzzy))!==null&&(d=u.index+u[1].length,h=u.index+u[0].length,(this.__index__<0||d<this.__index__||d===this.__index__&&h>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=d,this.__last_index__=h)))),this.__index__>=0};mn.prototype.pretest=function(n){return this.re.pretest.test(n)};mn.prototype.testSchemaAt=function(n,i,s){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(n,s,this):0};mn.prototype.match=function(n){var i=0,s=[];this.__index__>=0&&this.__text_cache__===n&&(s.push(_m(this,i)),i=this.__last_index__);for(var u=i?n.slice(i):n;this.test(u);)s.push(_m(this,i)),u=u.slice(this.__last_index__),i+=this.__last_index__;return s.length?s:null};mn.prototype.tlds=function(n,i){return n=Array.isArray(n)?n:[n],i?(this.__tlds__=this.__tlds__.concat(n).sort().filter(function(s,u,c){return s!==c[u-1]}).reverse(),ya(this),this):(this.__tlds__=n.slice(),this.__tlds_replaced__=!0,ya(this),this)};mn.prototype.normalize=function(n){n.schema||(n.url="http://"+n.url),n.schema==="mailto:"&&!/^mailto:/i.test(n.url)&&(n.url="mailto:"+n.url)};mn.prototype.onCompile=function(){};ym.exports=mn});var qm=ue(Hk=>{Hy(Hk,{decode:()=>Sl,default:()=>Qk,encode:()=>El,toASCII:()=>Mm,toUnicode:()=>Fm,ucs2decode:()=>Cl,ucs2encode:()=>Tm});"use strict";const oi=2147483647,Rn=36,kl=1,Ji=26,Uk=38,Wk=700,Sm=72,Em=128,Dm="-",$k=/^xn--/,Gk=/[^\0-\x7E]/,Kk=/[\x2E\u3002\uFF0E\uFF61]/g,Vk={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xl=Rn-kl,Pn=Math.floor,_l=String.fromCharCode;function Sr(t){throw new RangeError(Vk[t])}function Yk(t,n){const i=[];let s=t.length;for(;s--;)i[s]=n(t[s]);return i}function Am(t,n){const i=t.split("@");let s="";i.length>1&&(s=i[0]+"@",t=i[1]),t=t.replace(Kk,".");const u=t.split("."),c=Yk(u,n).join(".");return s+c}function Cl(t){const n=[];let i=0;const s=t.length;for(;i<s;){const u=t.charCodeAt(i++);if(u>=55296&&u<=56319&&i<s){const c=t.charCodeAt(i++);(c&64512)==56320?n.push(((u&1023)<<10)+(c&1023)+65536):(n.push(u),i--)}else n.push(u)}return n}const Tm=t=>String.fromCodePoint(...t),Xk=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:Rn},Lm=function(t,n){return t+22+75*(t<26)-((n!=0)<<5)},Im=function(t,n,i){let s=0;for(t=i?Pn(t/Wk):t>>1,t+=Pn(t/n);t>xl*Ji>>1;s+=Rn)t=Pn(t/xl);return Pn(s+(xl+1)*t/(t+Uk))},Sl=function(t){const n=[],i=t.length;let s=0,u=Em,c=Sm,d=t.lastIndexOf(Dm);d<0&&(d=0);for(let h=0;h<d;++h)t.charCodeAt(h)>=128&&Sr("not-basic"),n.push(t.charCodeAt(h));for(let h=d>0?d+1:0;h<i;){let p=s;for(let y=1,m=Rn;;m+=Rn){h>=i&&Sr("invalid-input");const b=Xk(t.charCodeAt(h++));(b>=Rn||b>Pn((oi-s)/y))&&Sr("overflow"),s+=b*y;const w=m<=c?kl:m>=c+Ji?Ji:m-c;if(b<w)break;const D=Rn-w;y>Pn(oi/D)&&Sr("overflow"),y*=D}const g=n.length+1;c=Im(s-p,g,p==0),Pn(s/g)>oi-u&&Sr("overflow"),u+=Pn(s/g),s%=g,n.splice(s++,0,u)}return String.fromCodePoint(...n)},El=function(t){const n=[];t=Cl(t);let i=t.length,s=Em,u=0,c=Sm;for(const p of t)p<128&&n.push(_l(p));let d=n.length,h=d;for(d&&n.push(Dm);h<i;){let p=oi;for(const y of t)y>=s&&y<p&&(p=y);const g=h+1;p-s>Pn((oi-u)/g)&&Sr("overflow"),u+=(p-s)*g,s=p;for(const y of t)if(y<s&&++u>oi&&Sr("overflow"),y==s){let m=u;for(let b=Rn;;b+=Rn){const w=b<=c?kl:b>=c+Ji?Ji:b-c;if(m<w)break;const D=m-w,E=Rn-w;n.push(_l(Lm(w+D%E,0))),m=Pn(D/E)}n.push(_l(Lm(m,0))),c=Im(u,g,h==d),u=0,++h}++u,++s}return n.join("")},Fm=function(t){return Am(t,function(n){return $k.test(n)?Sl(n.slice(4).toLowerCase()):n})},Mm=function(t){return Am(t,function(n){return Gk.test(n)?"xn--"+El(n):n})},Zk={version:"2.1.0",ucs2:{decode:Cl,encode:Tm},decode:Sl,encode:El,toASCII:Mm,toUnicode:Fm};var Qk=Zk});var Om=ue((b2,zm)=>{"use strict";zm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var Pm=ue((y2,Rm)=>{"use strict";Rm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var Bm=ue((w2,Nm)=>{"use strict";Nm.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}});var Wm=ue((k2,jm)=>{"use strict";var eo=et(),Jk=xf(),e0=Cf(),t0=Yf(),n0=Fp(),r0=gm(),i0=Cm(),ai=tl(),Hm=qm(),o0={default:Om(),zero:Pm(),commonmark:Bm()},a0=/^(vbscript|javascript|file|data):/,s0=/^data:image\/(gif|png|jpeg|webp);/;function l0(t){var n=t.trim().toLowerCase();return a0.test(n)?!!s0.test(n):!0}var Um=["http:","https:","mailto:"];function u0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Um.indexOf(n.protocol)>=0))try{n.hostname=Hm.toASCII(n.hostname)}catch(i){}return ai.encode(ai.format(n))}function c0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Um.indexOf(n.protocol)>=0))try{n.hostname=Hm.toUnicode(n.hostname)}catch(i){}return ai.decode(ai.format(n))}function gn(t,n){if(!(this instanceof gn))return new gn(t,n);n||(eo.isString(t)||(n=t||{},t="default")),this.inline=new r0,this.block=new n0,this.core=new t0,this.renderer=new e0,this.linkify=new i0,this.validateLink=l0,this.normalizeLink=u0,this.normalizeLinkText=c0,this.utils=eo,this.helpers=eo.assign({},Jk),this.options={},this.configure(t),n&&this.set(n)}gn.prototype.set=function(t){return eo.assign(this.options,t),this};gn.prototype.configure=function(t){var n=this,i;if(eo.isString(t)&&(i=t,t=o0[i],!t))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach(function(s){t.components[s].rules&&n[s].ruler.enableOnly(t.components[s].rules),t.components[s].rules2&&n[s].ruler2.enableOnly(t.components[s].rules2)}),this};gn.prototype.enable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.enable(t,!0))},this),i=i.concat(this.inline.ruler2.enable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+s);return this};gn.prototype.disable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.disable(t,!0))},this),i=i.concat(this.inline.ruler2.disable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+s);return this};gn.prototype.use=function(t){var n=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,n),this};gn.prototype.parse=function(t,n){if(typeof t!="string")throw new Error("Input data should be a String");var i=new this.core.State(t,this,n);return this.core.process(i),i.tokens};gn.prototype.render=function(t,n){return n=n||{},this.renderer.render(this.parse(t,n),this.options,n)};gn.prototype.parseInline=function(t,n){var i=new this.core.State(t,this,n);return i.inlineMode=!0,this.core.process(i),i.tokens};gn.prototype.renderInline=function(t,n){return n=n||{},this.renderer.render(this.parseInline(t,n),this.options,n)};jm.exports=gn});var Gm=ue((x2,$m)=>{"use strict";$m.exports=Wm()});var Zm=ue((_2,Km)=>{var Dl=!0,Vm=!1,Ym=!1;Km.exports=function(t,n){n&&(Dl=!n.enabled,Vm=!!n.label,Ym=!!n.labelAfter),t.core.ruler.after("inline","github-task-lists",function(i){for(var s=i.tokens,u=2;u<s.length;u++)h0(s,u)&&(f0(s[u],i.Token),Xm(s[u-2],"class","task-list-item"+(Dl?"":" enabled")),Xm(s[d0(s,u-2)],"class","contains-task-list"))})};function Xm(t,n,i){var s=t.attrIndex(n),u=[n,i];s<0?t.attrPush(u):t.attrs[s]=u}function d0(t,n){for(var i=t[n].level-1,s=n-1;s>=0;s--)if(t[s].level===i)return s;return-1}function h0(t,n){return p0(t[n])&&m0(t[n-1])&&g0(t[n-2])&&v0(t[n])}function f0(t,n){if(t.children.unshift(b0(t,n)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),Vm)if(Ym){t.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(k0(t.content,i,n))}else t.children.unshift(y0(n)),t.children.push(w0(n))}function b0(t,n){var i=new n("html_inline","",0),s=Dl?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?i.content='<input class="task-list-item-checkbox"'+s+'type="checkbox">':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(i.content='<input class="task-list-item-checkbox" checked=""'+s+'type="checkbox">'),i}function y0(t){var n=new t("html_inline","",0);return n.content="<label>",n}function w0(t){var n=new t("html_inline","",0);return n.content="</label>",n}function k0(t,n,i){var s=new i("html_inline","",0);return s.content='<label class="task-list-item-label" for="'+n+'">'+t+"</label>",s.attrs=[{for:n}],s}function p0(t){return t.type==="inline"}function m0(t){return t.type==="paragraph_open"}function g0(t){return t.type==="list_item_open"}function v0(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});const to={},x0=[];function wa(t,n){if(x0.push({name:t,data:n}),typeof to[t]=="undefined")return this;let i=to[t];for(let s=0;s<i.length;s++){let u=i[s];u(n)}}function _0(t,n){typeof to[t]=="undefined"&&(to[t]=[]),to[t].push(n)}function C0(t,n,i){const s=new CustomEvent(n,{detail:i,bubbles:!0});t.dispatchEvent(s)}function S0(t){if(!t.status)return;if(t.status===422&&t.data){const n=Object.values(t.data).flat().join(`
`);wa("error",n)}}var Qm={emit:wa,emitPublic:C0,listen:_0,success:t=>wa("success",t),error:t=>wa("error",t),showValidationErrors:S0};async function E0(t,n={}){return Jm(t,{method:"GET",params:n})}async function D0(t,n=null){return ka("POST",t,n)}async function A0(t,n=null){return ka("PUT",t,n)}async function T0(t,n=null){return ka("PATCH",t,n)}async function L0(t,n=null){return ka("DELETE",t,n)}async function ka(t,n,i=null){const s={method:t,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(s.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},s.body=JSON.stringify(i)),i instanceof FormData&&t!=="post"&&(i.append("_method",t),s.method="post"),Jm(n,s)}async function Jm(t,n={}){if(t.startsWith("http")||(t=window.baseUrl(t)),n.params){const d=new URL(t);for(let h of Object.keys(n.params)){const p=n.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}t=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");n=Object.assign({},n,{credentials:"same-origin"}),n.headers=Object.assign({},n.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(t,n),u=await I0(s),c={data:u,headers:s.headers,redirected:s.redirected,status:s.status,statusText:s.statusText,url:s.url,original:s};if(!s.ok)throw c;return c}async function I0(t){if(t.status===204)return null;const n=t.headers.get("Content-Type"),i=n.split("/").pop();return i==="javascript"||i==="json"?await t.json():await t.text()}var eg={get:E0,post:D0,put:A0,patch:T0,delete:L0};class F0{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){const t=document.querySelectorAll('meta[name="translation"]');for(let n of t){const i=n.getAttribute("key"),s=n.getAttribute("value");this.store.set(i,s)}}get(t,n){const i=this.getTransText(t);return this.performReplacements(i,n)}getPlural(t,n,i){const s=this.getTransText(t);return this.parsePlural(s,n,i)}parsePlural(t,n,i){const s=t.split("|"),u=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(u);if(p!==null&&Number(p[1])===n){d=h.replace(u,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=n&&(g[2]==="*"||Number(g[2])>=n)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=n===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(t){const n=this.store.get(t);return n===void 0&&console.warn(`Translation with key "${t}" does not exist`),n}performReplacements(t,n){if(!n)return t;const i=t.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const u=s.substring(1);if(typeof n[u]=="undefined")return;t=t.replace(s,n[u])}),t}}var tg=F0;function xa(t,n){const i=document.querySelectorAll(t);for(let s of i)n(s)}function _a(t,n,i){for(let s of n)t.addEventListener(s,i)}function ot(t,n){Array.isArray(t)||(t=[t]);for(const i of t)i.addEventListener("click",n),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(s))})}function Ca(t,n){Array.isArray(t)||(t=[t]);const i=s=>{s.key==="Enter"&&n(s)};t.forEach(s=>s.addEventListener("keypress",i))}function zt(t,n,i,s){t.addEventListener(i,function(u){const c=u.target.closest(n);c&&s.call(c,u,c)})}function ng(t,n){const i=document.querySelectorAll(t);n=n.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(n))return s;return null}function no(t){t.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function rg(t){const n=t.querySelectorAll(".loading-container");for(const i of n)i.remove()}function ig(t,n,i){let s;return function(){const u=this,c=arguments,d=function(){s=null,i||t.apply(u,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,n),h&&t.apply(u,c)}}function ro(t){if(!t)return;t.scrollIntoView({behavior:"smooth"});const n=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(t).getPropertyValue("background-color");t.style.backgroundColor=n,setTimeout(()=>{t.classList.add("selectFade"),t.style.backgroundColor=i},10),setTimeout(()=>{t.classList.remove("selectFade"),t.style.backgroundColor=""},3e3)}function og(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function ag(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}class M0{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),zt(this.$el,this.removeSelector,"click",t=>{const n=t.target.closest(this.rowSelector);n.remove()})}add(){const t=this.modelRow.cloneNode(!0);t.classList.remove("hidden"),this.setClonedInputNames(t),this.modelRow.parentNode.insertBefore(t,this.modelRow),window.components.init(t)}setClonedInputNames(t){const n=ag(),i=t.querySelectorAll('[name*="randrowid"]');for(const s of i)s.name=s.name.split("randrowid").join(n)}}var sg=M0;class q0{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,ot(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(t=>{typeof t.data=="object"&&t.data.message&&window.$events.emit("success",t.data.message),this.row.remove()}).catch(t=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var lg=q0;class z0{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Ca(this.container,t=>{this.submitFakeForm(),t.preventDefault()}),this.submitButtons.forEach(t=>ot(t,this.submitFakeForm.bind(this)))}submitFakeForm(){const t=new FormData,n=this.container.querySelectorAll("[name]");for(const i of n)t.append(i.getAttribute("name"),i.value);this.submit(t)}submitRealForm(t){t.preventDefault();const n=new FormData(this.container);this.submit(n)}async submit(t){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const n=await window.$http[this.method.toLowerCase()](this.url,t);this.$emit("success",{formData:t}),this.responseContainer.innerHTML=n.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(n){this.responseContainer.innerHTML=n.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var ug=z0;class O0{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){const t=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",t),this.container.addEventListener("ajax-form-success",t),this.container.addEventListener("sortable-list-sort",n=>{this.updateOrder(n.detail.ids)}),this.container.addEventListener("event-emit-select-edit",n=>{this.startEdit(n.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",n=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",n=>{const i=n.target.closest("[data-drag-content]").getAttribute("data-drag-content"),s=JSON.parse(i);window.$events.emit("editor::insert",{html:s["text/html"],markdown:s["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(t=>{this.list.innerHTML=t.data,window.components.init(this.list)})}updateOrder(t){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:t}).then(n=>{window.$events.emit("success",n.data.message)})}async startEdit(t){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),no(this.editContainer);const n=await window.$http.get(`/attachments/edit/${t}`);this.editContainer.innerHTML=n.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var cg=O0;const Al={};class R0{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",t=>{t.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),zt(this.list,"button","click",(t,n)=>{this.selectSuggestion(n.textContent)}),zt(this.list,"button","keydown",(t,n)=>{t.key==="Enter"&&this.selectSuggestion(n.textContent)})}selectSuggestion(t){this.input.value=t,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(t){if(t.key==="Enter"&&t.preventDefault(),this.list.classList.contains("hidden"))return;t.key==="ArrowDown"?(this.moveFocus(!0),t.preventDefault()):t.key==="ArrowUp"?(this.moveFocus(!1),t.preventDefault()):t.key==="Escape"&&(this.hideSuggestions(),t.preventDefault())}moveFocus(t=!0){const n=Array.from(this.container.querySelectorAll("input,button")),i=n.indexOf(document.activeElement),s=n[i+(t?1:-1)];s&&s.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const t=this.getNameFilterIfNeeded(),n=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(n,t);let s=i.slice(0,6);n.length>0&&(s=i.filter(u=>u.toLowerCase().includes(n)).slice(0,6)),this.displaySuggestions(s)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(t,n=null){const i={search:t,name:n},s=`${this.url}:${JSON.stringify(i)}`;if(Al[s])return Al[s];const u=await window.$http.get(this.url,i);return Al[s]=u.data,u.data}displaySuggestions(t){if(t.length===0)return this.hideSuggestions();this.list.innerHTML=t.map(n=>`<li><button type="button">${og(n)}</button></li>`).join(""),this.list.style.display="block";for(const n of this.list.querySelectorAll("button"))n.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(t){this.container.contains(t.relatedTarget)||this.hideSuggestions()}}var dg=R0;class P0{constructor(t){if(this.elem=t,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let t=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&t>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&t<this.breakPoint&&(this.elem.style.opacity=0,this.showing=!1,setTimeout(()=>{this.elem.style.display="none"},500))}scrollToTop(){let t=this.targetElem.getBoundingClientRect().top,n=document.documentElement.scrollTop?document.documentElement:document.body,i=300,s=Date.now(),u=this.targetElem.getBoundingClientRect().top;function c(){let d=1-(Date.now()-s)/i,h=Math.abs(d*u);d>0?(n.scrollTop=h,requestAnimationFrame(c.bind(this))):n.scrollTop=t}requestAnimationFrame(c.bind(this))}}var hg=P0;function Yn(){return(Yn=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t}).apply(this,arguments)}function Xn(t){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(t)}var Zn=Xn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),io=Xn(/Edge/i),fg=Xn(/firefox/i),Sa=Xn(/safari/i)&&!Xn(/chrome/i)&&!Xn(/android/i),pg=Xn(/iP(ad|od|hone)/i),N0=Xn(/chrome/i)&&Xn(/android/i),mg={capture:!1,passive:!1};function Qe(t,n,i){t.addEventListener(n,i,!Zn&&mg)}function We(t,n,i){t.removeEventListener(n,i,!Zn&&mg)}function Ea(t,n){if(n){if(n[0]===">"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(i){return!1}return!1}}function B0(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function _n(t,n,i,s){if(t){i=i||document;do{if(n!=null&&(n[0]===">"?t.parentNode===i&&Ea(t,n):Ea(t,n))||s&&t===i)return t;if(t===i)break}while(t=B0(t))}return null}var oo,gg=/\s+/g;function ft(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var s=(" "+t.className+" ").replace(gg," ").replace(" "+n+" "," ");t.className=(s+(i?" "+n:"")).replace(gg," ")}}function Se(t,n,i){var s=t&&t.style;if(s){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),n===void 0?i:i[n];n in s||n.indexOf("webkit")!==-1||(n="-webkit-"+n),s[n]=i+(typeof i=="string"?"":"px")}}function Er(t,n){var i="";if(typeof t=="string")i=t;else do{var s=Se(t,"transform");s&&s!=="none"&&(i=s+" "+i)}while(!n&&(t=t.parentNode));var u=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return u&&new u(i)}function vg(t,n,i){if(t){var s=t.getElementsByTagName(n),u=0,c=s.length;if(i)for(;u<c;u++)i(s[u],u);return s}return[]}function Nn(){return document.scrollingElement||document.documentElement}function bt(t,n,i,s,u){if(t.getBoundingClientRect||t===window){var c,d,h,p,g,y,m;if(t!==window&&t!==Nn()?(d=(c=t.getBoundingClientRect()).top,h=c.left,p=c.bottom,g=c.right,y=c.height,m=c.width):(d=0,h=0,p=window.innerHeight,g=window.innerWidth,y=window.innerHeight,m=window.innerWidth),(n||i)&&t!==window&&(u=u||t.parentNode,!Zn))do if(u&&u.getBoundingClientRect&&(Se(u,"transform")!=="none"||i&&Se(u,"position")!=="static")){var b=u.getBoundingClientRect();d-=b.top+parseInt(Se(u,"border-top-width")),h-=b.left+parseInt(Se(u,"border-left-width")),p=d+c.height,g=h+c.width;break}while(u=u.parentNode);if(s&&t!==window){var w=Er(u||t),D=w&&w.a,E=w&&w.d;w&&(p=(d/=E)+(y/=E),g=(h/=D)+(m/=D))}return{top:d,left:h,bottom:p,right:g,width:m,height:y}}}function bg(t,n,i){for(var s=cr(t,!0),u=bt(t)[n];s;){var c=bt(s)[i];if(!(i==="top"||i==="left"?u>=c:u<=c))return s;if(s===Nn())break;s=cr(s,!1)}return!1}function Da(t,n,i){for(var s=0,u=0,c=t.children;u<c.length;){if(c[u].style.display!=="none"&&c[u]!==Me.ghost&&c[u]!==Me.dragged&&_n(c[u],i.draggable,t,!1)){if(s===n)return c[u];s++}u++}return null}function Tl(t,n){for(var i=t.lastElementChild;i&&(i===Me.ghost||Se(i,"display")==="none"||n&&!Ea(i,n));)i=i.previousElementSibling;return i||null}function yt(t,n){var i=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()==="TEMPLATE"||t===Me.clone||n&&!Ea(t,n)||i++;return i}function yg(t){var n=0,i=0,s=Nn();if(t)do{var u=Er(t);n+=t.scrollLeft*u.a,i+=t.scrollTop*u.d}while(t!==s&&(t=t.parentNode));return[n,i]}function cr(t,n){if(!t||!t.getBoundingClientRect)return Nn();var i=t,s=!1;do if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var u=Se(i);if(i.clientWidth<i.scrollWidth&&(u.overflowX=="auto"||u.overflowX=="scroll")||i.clientHeight<i.scrollHeight&&(u.overflowY=="auto"||u.overflowY=="scroll")){if(!i.getBoundingClientRect||i===document.body)return Nn();if(s||n)return i;s=!0}}while(i=i.parentNode);return Nn()}function Ll(t,n){return Math.round(t.top)===Math.round(n.top)&&Math.round(t.left)===Math.round(n.left)&&Math.round(t.height)===Math.round(n.height)&&Math.round(t.width)===Math.round(n.width)}function wg(t,n){return function(){if(!oo){var i=arguments,s=this;i.length===1?t.call(s,i[0]):t.apply(s,i),oo=setTimeout(function(){oo=void 0},n)}}}function kg(t,n,i){t.scrollLeft+=n,t.scrollTop+=i}function Il(t){var n=window.Polymer,i=window.jQuery||window.Zepto;return n&&n.dom?n.dom(t).cloneNode(!0):i?i(t).clone(!0)[0]:t.cloneNode(!0)}function xg(t,n){Se(t,"position","absolute"),Se(t,"top",n.top),Se(t,"left",n.left),Se(t,"width",n.width),Se(t,"height",n.height)}function Fl(t){Se(t,"position",""),Se(t,"top",""),Se(t,"left",""),Se(t,"width",""),Se(t,"height","")}var Kt="Sortable"+new Date().getTime(),ao=[],Ml={initializeByDefault:!0},so={mount:function(t){for(var n in Ml)Ml.hasOwnProperty(n)&&!(n in t)&&(t[n]=Ml[n]);ao.push(t)},pluginEvent:function(t,n,i){var s=this;this.eventCanceled=!1,i.cancel=function(){s.eventCanceled=!0};var u=t+"Global";ao.forEach(function(c){n[c.pluginName]&&(n[c.pluginName][u]&&n[c.pluginName][u](Yn({sortable:n},i)),n.options[c.pluginName]&&n[c.pluginName][t]&&n[c.pluginName][t](Yn({sortable:n},i)))})},initializePlugins:function(t,n,i,s){for(var u in ao.forEach(function(d){var h=d.pluginName;if(t.options[h]||d.initializeByDefault){var p=new d(t,n,t.options);p.sortable=t,p.options=t.options,t[h]=p,Object.assign(i,p.defaults)}}),t.options)if(t.options.hasOwnProperty(u)){var c=this.modifyOption(t,u,t.options[u]);c!==void 0&&(t.options[u]=c)}},getEventProperties:function(t,n){var i={};return ao.forEach(function(s){typeof s.eventProperties=="function"&&Object.assign(i,s.eventProperties.call(n[s.pluginName],t))}),i},modifyOption:function(t,n,i){var s;return ao.forEach(function(u){t[u.pluginName]&&u.optionListeners&&typeof u.optionListeners[n]=="function"&&(s=u.optionListeners[n].call(t[u.pluginName],i))}),s}};function lo(t){var n=t.sortable,i=t.rootEl,s=t.name,u=t.targetEl,c=t.cloneEl,d=t.toEl,h=t.fromEl,p=t.oldIndex,g=t.newIndex,y=t.oldDraggableIndex,m=t.newDraggableIndex,b=t.originalEvent,w=t.putSortable,D=t.extraEventProperties;if(n=n||i&&i[Kt]){var E,S=n.options,z="on"+s.charAt(0).toUpperCase()+s.substr(1);!window.CustomEvent||Zn||io?(E=document.createEvent("Event")).initEvent(s,!0,!0):E=new CustomEvent(s,{bubbles:!0,cancelable:!0}),E.to=d||i,E.from=h||i,E.item=u||i,E.clone=c,E.oldIndex=p,E.newIndex=g,E.oldDraggableIndex=y,E.newDraggableIndex=m,E.originalEvent=b,E.pullMode=w?w.lastPutMode:void 0;var A=Yn({},D,so.getEventProperties(s,n));for(var R in A)E[R]=A[R];i&&i.dispatchEvent(E),S[z]&&S[z].call(n,E)}}var on=function(t,n,i){var s=i===void 0?{}:i,u=s.evt,c=function(d,h){if(d==null)return{};var p,g,y={},m=Object.keys(d);for(g=0;g<m.length;g++)h.indexOf(p=m[g])>=0||(y[p]=d[p]);return y}(s,["evt"]);so.pluginEvent.bind(Me)(t,n,Yn({dragEl:ge,parentEl:At,ghostEl:je,rootEl:pt,nextEl:Dr,lastDownEl:Aa,cloneEl:_t,cloneHidden:dr,dragStarted:co,putSortable:Ut,activeSortable:Me.active,originalEvent:u,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr,hideGhostForTarget:_g,unhideGhostForTarget:Cg,cloneNowHidden:function(){dr=!0},cloneNowShown:function(){dr=!1},dispatchSortableEvent:function(d){tn({sortable:n,name:d,originalEvent:u})}},c))};function tn(t){lo(Yn({putSortable:Ut,cloneEl:_t,targetEl:ge,rootEl:pt,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr},t))}var ge,At,je,pt,Dr,Aa,_t,dr,si,ln,uo,hr,Ta,Ut,li,Cn,ql,zl,Sg,Eg,co,ui,ho,La,Vt,ci=!1,Ia=!1,Fa=[],fo=!1,Ma=!1,Ol=[],Rl=!1,qa=[],za=typeof document!="undefined",Oa=pg,Dg=io||Zn?"cssFloat":"float",j0=za&&!N0&&!pg&&"draggable"in document.createElement("div"),Ag=function(){if(za){if(Zn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Tg=function(t,n){var i=Se(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),u=Da(t,0,n),c=Da(t,1,n),d=u&&Se(u),h=c&&Se(c),p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+bt(u).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+bt(c).width;return i.display==="flex"?i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal":i.display==="grid"?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":u&&d.float&&d.float!=="none"?!c||h.clear!=="both"&&h.clear!==(d.float==="left"?"left":"right")?"horizontal":"vertical":u&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||p>=s&&i[Dg]==="none"||c&&i[Dg]==="none"&&p+g>s)?"vertical":"horizontal"},Lg=function(t){function n(u,c){return function(d,h,p,g){if(u==null&&(c||d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name))return!0;if(u==null||u===!1)return!1;if(c&&u==="clone")return u;if(typeof u=="function")return n(u(d,h,p,g),c)(d,h,p,g);var y=(c?d:h).options.group.name;return u===!0||typeof u=="string"&&u===y||u.join&&u.indexOf(y)>-1}}var i={},s=t.group;s&&typeof s=="object"||(s={name:s}),i.name=s.name,i.checkPull=n(s.pull,!0),i.checkPut=n(s.put),i.revertClone=s.revertClone,t.group=i},_g=function(){!Ag&&je&&Se(je,"display","none")},Cg=function(){!Ag&&je&&Se(je,"display","")};za&&document.addEventListener("click",function(t){if(Ia)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ia=!1,!1},!0);var vn,Ar=function(t){if(ge){var n=(u=(t=t.touches?t.touches[0]:t).clientX,c=t.clientY,Fa.some(function(h){if(!Tl(h)){var p=bt(h),g=h[Kt].options.emptyInsertThreshold;return g&&u>=p.left-g&&u<=p.right+g&&c>=p.top-g&&c<=p.bottom+g?d=h:void 0}}),d);if(n){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Kt]._onDragOver(i)}}var u,c,d},H0=function(t){ge&&ge.parentNode[Kt]._isOutsideThisEl(t.target)};function Me(t,n){if(!t||!t.nodeType||t.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=n=Object.assign({},n),t[Kt]=this;var i,s,u={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Tg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(h,p){h.setData("Text",p.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Me.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};for(var c in so.initializePlugins(this,t,u),u)!(c in n)&&(n[c]=u[c]);for(var d in Lg(n),this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this));this.nativeDraggable=!n.forceFallback&&j0,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Qe(t,"pointerdown",this._onTapStart):(Qe(t,"mousedown",this._onTapStart),Qe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Qe(t,"dragover",this),Qe(t,"dragenter",this)),Fa.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Object.assign(this,(s=[],{captureAnimationState:function(){s=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(h){if(Se(h,"display")!=="none"&&h!==void 0){s.push({target:h,rect:bt(h)});var p=Yn({},s[s.length-1].rect);if(h.thisAnimationDuration){var g=Er(h,!0);g&&(p.top-=g.f,p.left-=g.e)}h.fromRect=p}})},addAnimationState:function(h){s.push(h)},removeAnimationState:function(h){s.splice(function(p,g){for(var y in p)if(p.hasOwnProperty(y)){for(var m in g)if(g.hasOwnProperty(m)&&g[m]===p[y][m])return Number(y)}return-1}(s,{target:h}),1)},animateAll:function(h){var p=this;if(!this.options.animation)return clearTimeout(i),void(typeof h=="function"&&h());var g=!1,y=0;s.forEach(function(m){var b=0,w=m.target,D=w.fromRect,E=bt(w),S=w.prevFromRect,z=w.prevToRect,A=m.rect,R=Er(w,!0);R&&(E.top-=R.f,E.left-=R.e),w.toRect=E,w.thisAnimationDuration&&Ll(S,E)&&!Ll(D,E)&&(A.top-E.top)/(A.left-E.left)==(D.top-E.top)/(D.left-E.left)&&(b=function(U,Y,B,G){return Math.sqrt(Math.pow(Y.top-U.top,2)+Math.pow(Y.left-U.left,2))/Math.sqrt(Math.pow(Y.top-B.top,2)+Math.pow(Y.left-B.left,2))*G.animation}(A,S,z,p.options)),Ll(E,D)||(w.prevFromRect=D,w.prevToRect=E,b||(b=p.options.animation),p.animate(w,A,E,b)),b&&(g=!0,y=Math.max(y,b),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},b),w.thisAnimationDuration=b)}),clearTimeout(i),g?i=setTimeout(function(){typeof h=="function"&&h()},y):typeof h=="function"&&h(),s=[]},animate:function(h,p,g,y){if(y){Se(h,"transition",""),Se(h,"transform","");var m=Er(this.el),b=(p.left-g.left)/(m&&m.a||1),w=(p.top-g.top)/(m&&m.d||1);h.animatingX=!!b,h.animatingY=!!w,Se(h,"transform","translate3d("+b+"px,"+w+"px,0)"),this.forRepaintDummy=function(D){return D.offsetWidth}(h),Se(h,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Se(h,"transform","translate3d(0,0,0)"),typeof h.animated=="number"&&clearTimeout(h.animated),h.animated=setTimeout(function(){Se(h,"transition",""),Se(h,"transform",""),h.animated=!1,h.animatingX=!1,h.animatingY=!1},y)}}}))}function Pl(t,n,i,s,u,c,d,h){var p,g,y=t[Kt],m=y.options.onMove;return!window.CustomEvent||Zn||io?(p=document.createEvent("Event")).initEvent("move",!0,!0):p=new CustomEvent("move",{bubbles:!0,cancelable:!0}),p.to=n,p.from=t,p.dragged=i,p.draggedRect=s,p.related=u||n,p.relatedRect=c||bt(n),p.willInsertAfter=h,p.originalEvent=d,t.dispatchEvent(p),m&&(g=m.call(y,p,d)),g}function Nl(t){t.draggable=!1}function U0(){Rl=!1}function W0(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,s=0;i--;)s+=n.charCodeAt(i);return s.toString(36)}function Ra(t){return setTimeout(t,0)}function Bl(t){return clearTimeout(t)}Me.prototype={constructor:Me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ui=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,ge):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,s=this.options,u=s.preventOnFilter,c=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,h=(d||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||h,g=s.filter;if(function(y){qa.length=0;for(var m=y.getElementsByTagName("input"),b=m.length;b--;){var w=m[b];w.checked&&qa.push(w)}}(i),!ge&&!(/mousedown|pointerdown/.test(c)&&t.button!==0||s.disabled)&&!p.isContentEditable&&(this.nativeDraggable||!Sa||!h||h.tagName.toUpperCase()!=="SELECT")&&!((h=_n(h,s.draggable,i,!1))&&h.animated||Aa===h)){if(si=yt(h),uo=yt(h,s.draggable),typeof g=="function"){if(g.call(this,t,h,this))return tn({sortable:n,rootEl:p,name:"filter",targetEl:h,toEl:i,fromEl:i}),on("filter",n,{evt:t}),void(u&&t.cancelable&&t.preventDefault())}else if(g&&(g=g.split(",").some(function(y){if(y=_n(p,y.trim(),i,!1))return tn({sortable:n,rootEl:y,name:"filter",targetEl:h,fromEl:i,toEl:i}),on("filter",n,{evt:t}),!0})))return void(u&&t.cancelable&&t.preventDefault());s.handle&&!_n(p,s.handle,i,!1)||this._prepareDragStart(t,d,h)}}},_prepareDragStart:function(t,n,i){var s,u=this,c=u.el,d=u.options,h=c.ownerDocument;if(i&&!ge&&i.parentNode===c){var p=bt(i);if(pt=c,At=(ge=i).parentNode,Dr=ge.nextSibling,Aa=i,Ta=d.group,Me.dragged=ge,Sg=(li={target:ge,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-p.left,Eg=li.clientY-p.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,ge.style["will-change"]="all",s=function(){on("delayEnded",u,{evt:t}),Me.eventCanceled?u._onDrop():(u._disableDelayedDragEvents(),!fg&&u.nativeDraggable&&(ge.draggable=!0),u._triggerDragStart(t,n),tn({sortable:u,name:"choose",originalEvent:t}),ft(ge,d.chosenClass,!0))},d.ignore.split(",").forEach(function(g){vg(ge,g.trim(),Nl)}),Qe(h,"dragover",Ar),Qe(h,"mousemove",Ar),Qe(h,"touchmove",Ar),Qe(h,"mouseup",u._onDrop),Qe(h,"touchend",u._onDrop),Qe(h,"touchcancel",u._onDrop),fg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ge.draggable=!0),on("delayStart",this,{evt:t}),!d.delay||d.delayOnTouchOnly&&!n||this.nativeDraggable&&(io||Zn))s();else{if(Me.eventCanceled)return void this._onDrop();Qe(h,"mouseup",u._disableDelayedDrag),Qe(h,"touchend",u._disableDelayedDrag),Qe(h,"touchcancel",u._disableDelayedDrag),Qe(h,"mousemove",u._delayedDragTouchMoveHandler),Qe(h,"touchmove",u._delayedDragTouchMoveHandler),d.supportPointer&&Qe(h,"pointermove",u._delayedDragTouchMoveHandler),u._dragStartTimer=setTimeout(s,d.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ge&&Nl(ge),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;We(t,"mouseup",this._disableDelayedDrag),We(t,"touchend",this._disableDelayedDrag),We(t,"touchcancel",this._disableDelayedDrag),We(t,"mousemove",this._delayedDragTouchMoveHandler),We(t,"touchmove",this._delayedDragTouchMoveHandler),We(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?Qe(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(Qe(ge,"dragend",this),Qe(pt,"dragstart",this._onDragStart));try{document.selection?Ra(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(t,n){if(ci=!1,pt&&ge){on("dragStarted",this,{evt:n}),this.nativeDraggable&&Qe(document,"dragover",H0);var i=this.options;!t&&ft(ge,i.dragClass,!1),ft(ge,i.ghostClass,!0),Me.active=this,t&&this._appendGhost(),tn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cn){this._lastX=Cn.clientX,this._lastY=Cn.clientY,_g();for(var t=document.elementFromPoint(Cn.clientX,Cn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cn.clientX,Cn.clientY))!==n;)n=t;if(ge.parentNode[Kt]._isOutsideThisEl(t),n)do{if(n[Kt]&&n[Kt]._onDragOver({clientX:Cn.clientX,clientY:Cn.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=n.parentNode);Cg()}},_onTouchMove:function(t){if(li){var n=this.options,i=n.fallbackTolerance,s=n.fallbackOffset,u=t.touches?t.touches[0]:t,c=je&&Er(je,!0),d=je&&c&&c.a,h=je&&c&&c.d,p=Oa&&Vt&&yg(Vt),g=(u.clientX-li.clientX+s.x)/(d||1)+(p?p[0]-Ol[0]:0)/(d||1),y=(u.clientY-li.clientY+s.y)/(h||1)+(p?p[1]-Ol[1]:0)/(h||1);if(!Me.active&&!ci){if(i&&Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(je){c?(c.e+=g-(ql||0),c.f+=y-(zl||0)):c={a:1,b:0,c:0,d:1,e:g,f:y};var m="matrix("+c.a+","+c.b+","+c.c+","+c.d+","+c.e+","+c.f+")";Se(je,"webkitTransform",m),Se(je,"mozTransform",m),Se(je,"msTransform",m),Se(je,"transform",m),ql=g,zl=y,Cn=u}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!je){var t=this.options.fallbackOnBody?document.body:pt,n=bt(ge,!0,Oa,!0,t),i=this.options;if(Oa){for(Vt=t;Se(Vt,"position")==="static"&&Se(Vt,"transform")==="none"&&Vt!==document;)Vt=Vt.parentNode;Vt!==document.body&&Vt!==document.documentElement?(Vt===document&&(Vt=Nn()),n.top+=Vt.scrollTop,n.left+=Vt.scrollLeft):Vt=Nn(),Ol=yg(Vt)}ft(je=ge.cloneNode(!0),i.ghostClass,!1),ft(je,i.fallbackClass,!0),ft(je,i.dragClass,!0),Se(je,"transition",""),Se(je,"transform",""),Se(je,"box-sizing","border-box"),Se(je,"margin",0),Se(je,"top",n.top),Se(je,"left",n.left),Se(je,"width",n.width),Se(je,"height",n.height),Se(je,"opacity","0.8"),Se(je,"position",Oa?"absolute":"fixed"),Se(je,"zIndex","100000"),Se(je,"pointerEvents","none"),Me.ghost=je,t.appendChild(je),Se(je,"transform-origin",Sg/parseInt(je.style.width)*100+"% "+Eg/parseInt(je.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,s=t.dataTransfer,u=i.options;on("dragStart",this,{evt:t}),Me.eventCanceled?this._onDrop():(on("setupClone",this),Me.eventCanceled||((_t=Il(ge)).draggable=!1,_t.style["will-change"]="",this._hideClone(),ft(_t,this.options.chosenClass,!1),Me.clone=_t),i.cloneId=Ra(function(){on("clone",i),Me.eventCanceled||(i.options.removeCloneOnHide||pt.insertBefore(_t,ge),i._hideClone(),tn({sortable:i,name:"clone"}))}),!n&&ft(ge,u.dragClass,!0),n?(Ia=!0,i._loopId=setInterval(i._emulateDragOver,50)):(We(document,"mouseup",i._onDrop),We(document,"touchend",i._onDrop),We(document,"touchcancel",i._onDrop),s&&(s.effectAllowed="move",u.setData&&u.setData.call(i,s,ge)),Qe(document,"drop",i),Se(ge,"transform","translateZ(0)")),ci=!0,i._dragStartId=Ra(i._dragStarted.bind(i,n,t)),Qe(document,"selectstart",i),co=!0,Sa&&Se(document.body,"user-select","none"))},_onDragOver:function(t){var n,i,s,u,c=this.el,d=t.target,h=this.options,p=h.group,g=Me.active,y=Ta===p,m=h.sort,b=Ut||g,w=this,D=!1;if(!Rl){if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),d=_n(d,h.draggable,c,!0),_("dragOver"),Me.eventCanceled)return D;if(ge.contains(t.target)||d.animated&&d.animatingX&&d.animatingY||w._ignoreWhileAnimating===d)return j(!1);if(Ia=!1,g&&!h.disabled&&(y?m||(s=!pt.contains(ge)):Ut===this||(this.lastPutMode=Ta.checkPull(this,g,ge,t))&&p.checkPut(this,g,ge,t))){if(u=this._getDirection(t,d)==="vertical",n=bt(ge),_("dragOverValid"),Me.eventCanceled)return D;if(s)return At=pt,V(),this._hideClone(),_("revert"),Me.eventCanceled||(Dr?pt.insertBefore(ge,Dr):pt.appendChild(ge)),j(!0);var E=Tl(c,h.draggable);if(!E||function(q,I,H){var se=bt(Tl(H.el,H.options.draggable));return I?q.clientX>se.right+10||q.clientX<=se.right&&q.clientY>se.bottom&&q.clientX>=se.left:q.clientX>se.right&&q.clientY>se.top||q.clientX<=se.right&&q.clientY>se.bottom+10}(t,u,this)&&!E.animated){if(E===ge)return j(!1);if(E&&c===t.target&&(d=E),d&&(i=bt(d)),Pl(pt,c,ge,n,d,i,t,!!d)!==!1)return V(),c.appendChild(ge),At=c,Q(),j(!0)}else if(d.parentNode===c){i=bt(d);var S,z,A,R=ge.parentNode!==c,U=!function(q,I,H){var se=H?q.left:q.top,F=H?I.left:I.top;return se===F||(H?q.right:q.bottom)===(H?I.right:I.bottom)||se+(H?q.width:q.height)/2===F+(H?I.width:I.height)/2}(ge.animated&&ge.toRect||n,d.animated&&d.toRect||i,u),Y=u?"top":"left",B=bg(d,"top","top")||bg(ge,"top","top"),G=B?B.scrollTop:void 0;if(ui!==d&&(z=i[Y],fo=!1,Ma=!U&&h.invertSwap||R),(S=function(q,I,H,se,F,T,de,ce){var oe=se?q.clientY:q.clientX,xe=se?H.height:H.width,Oe=se?H.top:H.left,ye=se?H.bottom:H.right,re=!1;if(!de){if(ce&&La<xe*F){if(!fo&&(ho===1?oe>Oe+xe*T/2:oe<ye-xe*T/2)&&(fo=!0),fo)re=!0;else if(ho===1?oe<Oe+La:oe>ye-La)return-ho}else if(oe>Oe+xe*(1-F)/2&&oe<ye-xe*(1-F)/2)return function(we){return yt(ge)<yt(we)?1:-1}(I)}return(re=re||de)&&(oe<Oe+xe*T/2||oe>ye-xe*T/2)?oe>Oe+xe/2?1:-1:0}(t,d,i,u,U?1:h.swapThreshold,h.invertedSwapThreshold==null?h.swapThreshold:h.invertedSwapThreshold,Ma,ui===d))!==0){var ee=yt(ge);do A=At.children[ee-=S];while(A&&(Se(A,"display")==="none"||A===je))}if(S===0||A===d)return j(!1);ui=d,ho=S;var J=d.nextElementSibling,O=!1,Z=Pl(pt,c,ge,n,d,i,t,O=S===1);if(Z!==!1)return Z!==1&&Z!==-1||(O=Z===1),Rl=!0,setTimeout(U0,30),V(),O&&!J?c.appendChild(ge):d.parentNode.insertBefore(ge,O?J:d),B&&kg(B,0,G-B.scrollTop),At=ge.parentNode,z===void 0||Ma||(La=Math.abs(z-bt(d)[Y])),Q(),j(!0)}if(c.contains(ge))return j(!1)}return!1}function _(q,I){on(q,w,Yn({evt:t,isOwner:y,axis:u?"vertical":"horizontal",revert:s,dragRect:n,targetRect:i,canSort:m,fromSortable:b,target:d,completed:j,onMove:function(H,se){return Pl(pt,c,ge,n,H,bt(H),t,se)},changed:Q},I))}function V(){_("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function j(q){return _("dragOverCompleted",{insertion:q}),q&&(y?g._hideClone():g._showClone(w),w!==b&&(ft(ge,Ut?Ut.options.ghostClass:g.options.ghostClass,!1),ft(ge,h.ghostClass,!0)),Ut!==w&&w!==Me.active?Ut=w:w===Me.active&&Ut&&(Ut=null),b===w&&(w._ignoreWhileAnimating=d),w.animateAll(function(){_("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(d===ge&&!ge.animated||d===c&&!d.animated)&&(ui=null),h.dragoverBubble||t.rootEl||d===document||(ge.parentNode[Kt]._isOutsideThisEl(t.target),!q&&Ar(t)),!h.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),D=!0}function Q(){ln=yt(ge),hr=yt(ge,h.draggable),tn({sortable:w,name:"change",toEl:c,newIndex:ln,newDraggableIndex:hr,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){We(document,"mousemove",this._onTouchMove),We(document,"touchmove",this._onTouchMove),We(document,"pointermove",this._onTouchMove),We(document,"dragover",Ar),We(document,"mousemove",Ar),We(document,"touchmove",Ar)},_offUpEvents:function(){var t=this.el.ownerDocument;We(t,"mouseup",this._onDrop),We(t,"touchend",this._onDrop),We(t,"pointerup",this._onDrop),We(t,"touchcancel",this._onDrop),We(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;ln=yt(ge),hr=yt(ge,i.draggable),on("drop",this,{evt:t}),At=ge&&ge.parentNode,ln=yt(ge),hr=yt(ge,i.draggable),Me.eventCanceled||(ci=!1,Ma=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bl(this.cloneId),Bl(this._dragStartId),this.nativeDraggable&&(We(document,"drop",this),We(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sa&&Se(document.body,"user-select",""),Se(ge,"transform",""),t&&(co&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),je&&je.parentNode&&je.parentNode.removeChild(je),(pt===At||Ut&&Ut.lastPutMode!=="clone")&&_t&&_t.parentNode&&_t.parentNode.removeChild(_t),ge&&(this.nativeDraggable&&We(ge,"dragend",this),Nl(ge),ge.style["will-change"]="",co&&!ci&&ft(ge,Ut?Ut.options.ghostClass:this.options.ghostClass,!1),ft(ge,this.options.chosenClass,!1),tn({sortable:this,name:"unchoose",toEl:At,newIndex:null,newDraggableIndex:null,originalEvent:t}),pt!==At?(ln>=0&&(tn({rootEl:At,name:"add",toEl:At,fromEl:pt,originalEvent:t}),tn({sortable:this,name:"remove",toEl:At,originalEvent:t}),tn({rootEl:At,name:"sort",toEl:At,fromEl:pt,originalEvent:t}),tn({sortable:this,name:"sort",toEl:At,originalEvent:t})),Ut&&Ut.save()):ln!==si&&ln>=0&&(tn({sortable:this,name:"update",toEl:At,originalEvent:t}),tn({sortable:this,name:"sort",toEl:At,originalEvent:t})),Me.active&&(ln!=null&&ln!==-1||(ln=si,hr=uo),tn({sortable:this,name:"end",toEl:At,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){on("nulling",this),pt=ge=At=je=Dr=_t=Aa=dr=li=Cn=co=ln=hr=si=uo=ui=ho=Ut=Ta=Me.dragged=Me.ghost=Me.clone=Me.active=null,qa.forEach(function(t){t.checked=!0}),qa.length=ql=zl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ge&&(this._onDragOver(t),function(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,s=0,u=i.length,c=this.options;s<u;s++)_n(t=i[s],c.draggable,this.el,!1)&&n.push(t.getAttribute(c.dataIdAttr)||W0(t));return n},sort:function(t){var n={},i=this.el;this.toArray().forEach(function(s,u){var c=i.children[u];_n(c,this.options.draggable,i,!1)&&(n[s]=c)},this),t.forEach(function(s){n[s]&&(i.removeChild(n[s]),i.appendChild(n[s]))})},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return _n(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var s=so.modifyOption(this,t,n);i[t]=s!==void 0?s:n,t==="group"&&Lg(i)},destroy:function(){on("destroy",this);var t=this.el;t[Kt]=null,We(t,"mousedown",this._onTapStart),We(t,"touchstart",this._onTapStart),We(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(We(t,"dragover",this),We(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Fa.splice(Fa.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!dr){if(on("hideClone",this),Me.eventCanceled)return;Se(_t,"display","none"),this.options.removeCloneOnHide&&_t.parentNode&&_t.parentNode.removeChild(_t),dr=!0}},_showClone:function(t){if(t.lastPutMode==="clone"){if(dr){if(on("showClone",this),Me.eventCanceled)return;ge.parentNode!=pt||this.options.group.revertClone?Dr?pt.insertBefore(_t,Dr):pt.appendChild(_t):pt.insertBefore(_t,ge),this.options.group.revertClone&&this.animate(ge,_t),Se(_t,"display",""),dr=!1}}else this._hideClone()}},za&&Qe(document,"touchmove",function(t){(Me.active||ci)&&t.cancelable&&t.preventDefault()}),Me.utils={on:Qe,off:We,css:Se,find:vg,is:function(t,n){return!!_n(t,n,t,!1)},extend:function(t,n){if(t&&n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i]);return t},throttle:wg,closest:_n,toggleClass:ft,clone:Il,index:yt,nextTick:Ra,cancelNextTick:Bl,detectDirection:Tg,getChild:Da},Me.get=function(t){return t[Kt]},Me.mount=function(){var t=[].slice.call(arguments);t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not "+{}.toString.call(n);n.utils&&(Me.utils=Yn({},Me.utils,n.utils)),so.mount(n)})},Me.create=function(t,n){return new Me(t,n)},Me.version="1.12.0";var po,Sn,at,mo,Pa,Re=[],un=[],go=!1,cn=!1,di=!1;function Ig(t,n){un.forEach(function(i,s){var u=n.children[i.sortableIndex+(t?Number(s):0)];u?n.insertBefore(i,u):n.appendChild(i)})}function Na(){Re.forEach(function(t){t!==at&&t.parentNode&&t.parentNode.removeChild(t)})}var Fg=function(t){var n=t.originalEvent,i=t.putSortable,s=t.dragEl,u=t.dispatchSortableEvent,c=t.unhideGhostForTarget;if(n){var d=i||t.activeSortable;(0,t.hideGhostForTarget)();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,p=document.elementFromPoint(h.clientX,h.clientY);c(),d&&!d.el.contains(p)&&(u("spill"),this.onSpill({dragEl:s,putSortable:i}))}};function jl(){}function Hl(){}jl.prototype={startIndex:null,dragStart:function(t){this.startIndex=t.oldDraggableIndex},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var s=Da(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(n,s):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:Fg},Object.assign(jl,{pluginName:"revertOnSpill"}),Hl.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:Fg},Object.assign(Hl,{pluginName:"removeOnSpill"});var Ba,Ul,Wl,$l,ja,vo,Tt=[],Gl=!1;function Ha(){Tt.forEach(function(t){clearInterval(t.pid)}),Tt=[]}function Mg(){clearInterval(vo)}var Kl=wg(function(t,n,i,s){if(n.scroll){var u,c=(t.touches?t.touches[0]:t).clientX,d=(t.touches?t.touches[0]:t).clientY,h=n.scrollSensitivity,p=n.scrollSpeed,g=Nn(),y=!1;Ul!==i&&(Ul=i,Ha(),u=n.scrollFn,(Ba=n.scroll)===!0&&(Ba=cr(i,!0)));var m=0,b=Ba;do{var w=b,D=bt(w),E=D.top,S=D.bottom,z=D.left,A=D.right,R=D.width,U=D.height,Y=void 0,B=void 0,G=w.scrollWidth,ee=w.scrollHeight,J=Se(w),O=w.scrollLeft,Z=w.scrollTop;w===g?(Y=R<G&&(J.overflowX==="auto"||J.overflowX==="scroll"||J.overflowX==="visible"),B=U<ee&&(J.overflowY==="auto"||J.overflowY==="scroll"||J.overflowY==="visible")):(Y=R<G&&(J.overflowX==="auto"||J.overflowX==="scroll"),B=U<ee&&(J.overflowY==="auto"||J.overflowY==="scroll"));var _=Y&&(Math.abs(A-c)<=h&&O+R<G)-(Math.abs(z-c)<=h&&!!O),V=B&&(Math.abs(S-d)<=h&&Z+U<ee)-(Math.abs(E-d)<=h&&!!Z);if(!Tt[m])for(var j=0;j<=m;j++)Tt[j]||(Tt[j]={});Tt[m].vx==_&&Tt[m].vy==V&&Tt[m].el===w||(Tt[m].el=w,Tt[m].vx=_,Tt[m].vy=V,clearInterval(Tt[m].pid),_==0&&V==0||(y=!0,Tt[m].pid=setInterval(function(){s&&this.layer===0&&Me.active._onTouchMove(ja);var Q=Tt[this.layer].vy?Tt[this.layer].vy*p:0,q=Tt[this.layer].vx?Tt[this.layer].vx*p:0;typeof u=="function"&&u.call(Me.dragged.parentNode[Kt],q,Q,t,ja,Tt[this.layer].el)!=="continue"||kg(Tt[this.layer].el,q,Q)}.bind({layer:m}),24))),m++}while(n.bubbleScroll&&b!==g&&(b=cr(b,!1)));Gl=y}},30);Me.mount(new function(){function t(){for(var n in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return t.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?Qe(document,"dragover",this._handleAutoScroll):Qe(document,this.options.supportPointer?"pointermove":i.touches?"touchmove":"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;this.options.dragOverBubble||i.rootEl||this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?We(document,"dragover",this._handleAutoScroll):(We(document,"pointermove",this._handleFallbackAutoScroll),We(document,"touchmove",this._handleFallbackAutoScroll),We(document,"mousemove",this._handleFallbackAutoScroll)),Mg(),Ha(),clearTimeout(oo),oo=void 0},nulling:function(){ja=Ul=Ba=Gl=vo=Wl=$l=null,Tt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var s=this,u=(n.touches?n.touches[0]:n).clientX,c=(n.touches?n.touches[0]:n).clientY,d=document.elementFromPoint(u,c);if(ja=n,i||io||Zn||Sa){Kl(n,this.options,d,i);var h=cr(d,!0);!Gl||vo&&u===Wl&&c===$l||(vo&&Mg(),vo=setInterval(function(){var p=cr(document.elementFromPoint(u,c),!0);p!==h&&(h=p,Ha()),Kl(n,s.options,p,i)},10),Wl=u,$l=c)}else{if(!this.options.bubbleScroll||cr(d,!0)===Nn())return void Ha();Kl(n,this.options,cr(d,!1),!1)}}},Object.assign(t,{pluginName:"scroll",initializeByDefault:!0})}),Me.mount(Hl,jl),Me.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(n){vn=n.dragEl},dragOverValid:function(n){var i=n.completed,s=n.target,u=n.changed,c=n.cancel;if(n.activeSortable.options.swap){var d=this.options;if(s&&s!==this.sortable.el){var h=vn;(0,n.onMove)(s)!==!1?(ft(s,d.swapClass,!0),vn=s):vn=null,h&&h!==vn&&ft(h,d.swapClass,!1)}u(),i(!0),c()}},drop:function(n){var i,s,u,c,d,h,p=n.activeSortable,g=n.putSortable,y=n.dragEl,m=g||this.sortable,b=this.options;vn&&ft(vn,b.swapClass,!1),vn&&(b.swap||g&&g.options.swap)&&y!==vn&&(m.captureAnimationState(),m!==p&&p.captureAnimationState(),h=(s=vn).parentNode,(d=(i=y).parentNode)&&h&&!d.isEqualNode(s)&&!h.isEqualNode(i)&&(u=yt(i),c=yt(s),d.isEqualNode(h)&&u<c&&c++,d.insertBefore(s,d.children[u]),h.insertBefore(i,h.children[c])),m.animateAll(),m!==p&&p.animateAll())},nulling:function(){vn=null}},Object.assign(t,{pluginName:"swap",eventProperties:function(){return{swapItem:vn}}})}),Me.mount(new function(){function t(n){for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));n.options.supportPointer?Qe(document,"pointerup",this._deselectMultiDrag):(Qe(document,"mouseup",this._deselectMultiDrag),Qe(document,"touchend",this._deselectMultiDrag)),Qe(document,"keydown",this._checkKeyDown),Qe(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(s,u){var c="";Re.length&&Sn===n?Re.forEach(function(d,h){c+=(h?", ":"")+d.textContent}):c=u.textContent,s.setData("Text",c)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(n){at=n.dragEl},delayEnded:function(){this.isMultiDrag=~Re.indexOf(at)},setupClone:function(n){var i=n.sortable,s=n.cancel;if(this.isMultiDrag){for(var u=0;u<Re.length;u++)un.push(Il(Re[u])),un[u].sortableIndex=Re[u].sortableIndex,un[u].draggable=!1,un[u].style["will-change"]="",ft(un[u],this.options.selectedClass,!1),Re[u]===at&&ft(un[u],this.options.chosenClass,!1);i._hideClone(),s()}},clone:function(n){var i=n.dispatchSortableEvent,s=n.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||Re.length&&Sn===n.sortable&&(Ig(!0,n.rootEl),i("clone"),s()))},showClone:function(n){var i=n.cloneNowShown,s=n.cancel;this.isMultiDrag&&(Ig(!1,n.rootEl),un.forEach(function(u){Se(u,"display","")}),i(),Pa=!1,s())},hideClone:function(n){var i=this,s=n.cloneNowHidden,u=n.cancel;this.isMultiDrag&&(un.forEach(function(c){Se(c,"display","none"),i.options.removeCloneOnHide&&c.parentNode&&c.parentNode.removeChild(c)}),s(),Pa=!0,u())},dragStartGlobal:function(n){!this.isMultiDrag&&Sn&&Sn.multiDrag._deselectMultiDrag(),Re.forEach(function(i){i.sortableIndex=yt(i)}),Re=Re.sort(function(i,s){return i.sortableIndex-s.sortableIndex}),di=!0},dragStarted:function(n){var i=this,s=n.sortable;if(this.isMultiDrag){if(this.options.sort&&(s.captureAnimationState(),this.options.animation)){Re.forEach(function(c){c!==at&&Se(c,"position","absolute")});var u=bt(at,!1,!0,!0);Re.forEach(function(c){c!==at&&xg(c,u)}),cn=!0,go=!0}s.animateAll(function(){cn=!1,go=!1,i.options.animation&&Re.forEach(function(c){Fl(c)}),i.options.sort&&Na()})}},dragOver:function(n){var i=n.completed,s=n.cancel;cn&&~Re.indexOf(n.target)&&(i(!1),s())},revert:function(n){var i=n.fromSortable,s=n.rootEl,u=n.sortable,c=n.dragRect;Re.length>1&&(Re.forEach(function(d){u.addAnimationState({target:d,rect:cn?bt(d):c}),Fl(d),d.fromRect=c,i.removeAnimationState(d)}),cn=!1,function(d,h){Re.forEach(function(p,g){var y=h.children[p.sortableIndex+(d?Number(g):0)];y?h.insertBefore(p,y):h.appendChild(p)})}(!this.options.removeCloneOnHide,s))},dragOverCompleted:function(n){var i=n.sortable,s=n.isOwner,u=n.activeSortable,c=n.parentEl,d=n.putSortable,h=this.options;if(n.insertion){if(s&&u._hideClone(),go=!1,h.animation&&Re.length>1&&(cn||!s&&!u.options.sort&&!d)){var p=bt(at,!1,!0,!0);Re.forEach(function(y){y!==at&&(xg(y,p),c.appendChild(y))}),cn=!0}if(!s)if(cn||Na(),Re.length>1){var g=Pa;u._showClone(i),u.options.animation&&!Pa&&g&&un.forEach(function(y){u.addAnimationState({target:y,rect:mo}),y.fromRect=mo,y.thisAnimationDuration=null})}else u._showClone(i)}},dragOverAnimationCapture:function(n){var i=n.dragRect,s=n.isOwner,u=n.activeSortable;if(Re.forEach(function(d){d.thisAnimationDuration=null}),u.options.animation&&!s&&u.multiDrag.isMultiDrag){mo=Object.assign({},i);var c=Er(at,!0);mo.top-=c.f,mo.left-=c.e}},dragOverAnimationComplete:function(){cn&&(cn=!1,Na())},drop:function(n){var i=n.originalEvent,s=n.rootEl,u=n.parentEl,c=n.sortable,d=n.dispatchSortableEvent,h=n.oldIndex,p=n.putSortable,g=p||this.sortable;if(i){var y=this.options,m=u.children;if(!di)if(y.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ft(at,y.selectedClass,!~Re.indexOf(at)),~Re.indexOf(at))Re.splice(Re.indexOf(at),1),po=null,lo({sortable:c,rootEl:s,name:"deselect",targetEl:at,originalEvt:i});else{if(Re.push(at),lo({sortable:c,rootEl:s,name:"select",targetEl:at,originalEvt:i}),i.shiftKey&&po&&c.el.contains(po)){var b,w,D=yt(po),E=yt(at);if(~D&&~E&&D!==E)for(E>D?(w=D,b=E):(w=E,b=D+1);w<b;w++)~Re.indexOf(m[w])||(ft(m[w],y.selectedClass,!0),Re.push(m[w]),lo({sortable:c,rootEl:s,name:"select",targetEl:m[w],originalEvt:i}))}else po=at;Sn=g}if(di&&this.isMultiDrag){if((u[Kt].options.sort||u!==s)&&Re.length>1){var S=bt(at),z=yt(at,":not(."+this.options.selectedClass+")");if(!go&&y.animation&&(at.thisAnimationDuration=null),g.captureAnimationState(),!go&&(y.animation&&(at.fromRect=S,Re.forEach(function(R){if(R.thisAnimationDuration=null,R!==at){var U=cn?bt(R):S;R.fromRect=U,g.addAnimationState({target:R,rect:U})}})),Na(),Re.forEach(function(R){m[z]?u.insertBefore(R,m[z]):u.appendChild(R),z++}),h===yt(at))){var A=!1;Re.forEach(function(R){R.sortableIndex===yt(R)||(A=!0)}),A&&d("update")}Re.forEach(function(R){Fl(R)}),g.animateAll()}Sn=g}(s===u||p&&p.lastPutMode!=="clone")&&un.forEach(function(R){R.parentNode&&R.parentNode.removeChild(R)})}},nullingGlobal:function(){this.isMultiDrag=di=!1,un.length=0},destroyGlobal:function(){this._deselectMultiDrag(),We(document,"pointerup",this._deselectMultiDrag),We(document,"mouseup",this._deselectMultiDrag),We(document,"touchend",this._deselectMultiDrag),We(document,"keydown",this._checkKeyDown),We(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(di!==void 0&&di||Sn!==this.sortable||n&&_n(n.target,this.options.draggable,this.sortable.el,!1)||n&&n.button!==0))for(;Re.length;){var i=Re[0];ft(i,this.options.selectedClass,!1),Re.shift(),lo({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(t,{pluginName:"multiDrag",utils:{select:function(n){var i=n.parentNode[Kt];i&&i.options.multiDrag&&!~Re.indexOf(n)&&(Sn&&Sn!==i&&(Sn.multiDrag._deselectMultiDrag(),Sn=i),ft(n,i.options.selectedClass,!0),Re.push(n))},deselect:function(n){var i=n.parentNode[Kt],s=Re.indexOf(n);i&&i.options.multiDrag&&~s&&(ft(n,i.options.selectedClass,!1),Re.splice(s,1))}},eventProperties:function(){var n=this,i=[],s=[];return Re.forEach(function(u){var c;i.push({multiDragElement:u,index:u.sortableIndex}),c=cn&&u!==at?-1:cn?yt(u,":not(."+n.options.selectedClass+")"):yt(u),s.push({multiDragElement:u,index:c})}),{items:[].concat(Re),clones:[].concat(un),oldIndicies:i,newIndicies:s}},optionListeners:{multiDragKey:function(n){return(n=n.toLowerCase())==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})});var hi=Me;const qg={name:function(t,n){const i=t.getAttribute("data-name").trim().toLowerCase(),s=n.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(s)},created:function(t,n){const i=Number(t.getAttribute("data-created")),s=Number(n.getAttribute("data-created"));return s-i},updated:function(t,n){const i=Number(t.getAttribute("data-updated")),s=Number(n.getAttribute("data-updated"));return s-i},chaptersFirst:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?-1:1},chaptersLast:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?1:-1}};class $0{constructor(t){this.elem=t,this.sortContainer=t.querySelector("[book-sort-boxes]"),this.input=t.querySelector("[book-sort-input]");const n=t.querySelector(".sort-box");this.setupBookSortable(n),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let t="",n=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",s=>{const u=s.target.closest(".sort-box-options [data-sort]");if(!u)return;s.preventDefault();const c=u.closest(".sort-box").querySelectorAll("ul"),d=u.getAttribute("data-sort");n=t===d?!n:!1;let h=qg[d];n&&i.includes(d)&&(h=function(p,g){return 0-qg[d](p,g)});for(let p of c){const g=Array.from(p.children).filter(y=>y.matches("li"));g.sort(h).forEach(y=>{p.appendChild(y)})}t=d,this.updateMapInput()})}bookSelect(t){const n=this.elem.querySelector(`[data-type="book"][data-id="${t.id}"]`)!==null;if(n)return;const i=t.link+"/sort-item";window.$http.get(i).then(s=>{const u=document.createElement("div");u.innerHTML=s.data;const c=u.children[0];this.sortContainer.append(c),this.setupBookSortable(c)})}setupBookSortable(t){const n=[t.querySelector(".sort-list")];n.push(...t.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},s={name:"chapter",pull:["book","chapter"],put:function(u,c,d){return d.getAttribute("data-type")==="page"}};for(let u of n)new hi(u,{group:u.classList.contains("sort-list")?i:s,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){const t=this.buildEntityMap();this.input.value=JSON.stringify(t)}buildEntityMap(){const t=[],n=this.elem.querySelectorAll(".sort-list");for(let i of n){const s=i.closest('[data-type="book"]').getAttribute("data-id"),u=Array.from(i.children).filter(c=>c.matches('[data-type="page"], [data-type="chapter"]'));for(let c=0;c<u.length;c++)this.addBookChildToMap(u[c],c,s,t)}return t}addBookChildToMap(t,n,i,s){const u=t.getAttribute("data-type"),c=!1,d=t.getAttribute("data-id");s.push({id:d,sort:n,parentChapter:c,type:u,book:i});const h=t.querySelectorAll('[data-type="page"]');for(let p=0;p<h.length;p++)s.push({id:h[p].getAttribute("data-id"),sort:p,parentChapter:d,type:"page",book:i})}}var zg=$0;class G0{constructor(t){this.elem=t,this.searchInput=t.querySelector("input"),this.loadingElem=t.querySelector(".loading-container"),this.entityListElem=t.querySelector(".breadcrumb-listing-entity-list");const n=t.getAttribute("breadcrumb-listing").split(":");this.entityType=n[0],this.entityId=Number(n[1]),this.elem.addEventListener("show",this.onShow.bind(this)),this.searchInput.addEventListener("input",this.onSearch.bind(this))}onShow(){this.loadEntityView()}onSearch(){const t=this.searchInput.value.toLowerCase().trim(),n=this.entityListElem.querySelectorAll(".entity-list-item");for(let i of n){const s=!t||i.textContent.toLowerCase().includes(t);i.style.display=s?"flex":"none",i.classList.toggle("hidden",!s)}}loadEntityView(){this.toggleLoading(!0);const t={entity_id:this.entityId,entity_type:this.entityType};window.$http.get("/search/entity/siblings",t).then(n=>{this.entityListElem.innerHTML=n.data}).catch(n=>{console.error(n)}).then(()=>{this.toggleLoading(!1),this.onSearch()})}toggleLoading(t=!1){this.loadingElem.style.display=t?"block":"none"}}var Og=G0;const Ua=new WeakMap;function Rg(t,n=400,i=null){$a(t),t.style.display="block",Wa(t,{opacity:["0","1"]},n,()=>{i&&i()})}function Ga(t,n=400,i=null){$a(t),Wa(t,{opacity:["1","0"]},n,()=>{t.style.display="none",i&&i()})}function fi(t,n=400){$a(t);const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[u,"0px"],paddingBottom:[c,"0px"]};Wa(t,d,n,()=>{t.style.display="none"})}function pi(t,n=400){$a(t),t.style.display="block";const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",u],paddingBottom:["0px",c]};Wa(t,d,n)}function Wa(t,n,i=400,s=null){const u=Object.keys(n);for(let d of u)t.style[d]=n[d][0];const c=()=>{for(let d of u)t.style[d]=null;t.style.transition=null,t.removeEventListener("transitionend",c),Ua.delete(t),s&&s()};setTimeout(()=>{t.style.transition=`all ease-in-out ${i}ms`;for(let d of u)t.style[d]=n[d][1];t.addEventListener("transitionend",c),Ua.set(t,c)},15)}function $a(t){if(Ua.has(t)){const n=Ua.get(t);n()}}class K0{constructor(t){this.elem=t,this.isOpen=t.classList.contains("open"),t.addEventListener("click",this.click.bind(this))}open(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),pi(t,240)}close(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),fi(t,240)}click(t){t.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var Pg=K0;const Tr=Ke(Ze()),Ng=Ke(Ks()),X2=Ke(Vs()),Z2=Ke(Ys()),Q2=Ke(od()),J2=Ke(ld()),e1=Ke(dd()),t1=Ke(pd()),n1=Ke(Zs()),r1=Ke(Xs()),i1=Ke(_d()),o1=Ke(Ed()),a1=Ke(Fd()),s1=Ke(zd()),l1=Ke(Pd()),u1=Ke(jd()),c1=Ke(Wd()),d1=Ke(Kd()),h1=Ke(Xd()),f1=Ke(Jd()),p1=Ke(nh()),m1=Ke(oh()),g1=Ke(dh()),v1=Ke(ph()),b1=Ke(vh()),y1=Ke(wh()),w1=Ke(_h()),k1=Ke(ta()),x1=Ke(Eh()),_1=Ke(Th()),Vl={css:"css",c:"text/x-csrc",java:"text/x-java",scala:"text/x-scala",kotlin:"text/x-kotlin","c++":"text/x-c++src","c#":"text/x-csharp",csharp:"text/x-csharp",diff:"diff",for:"fortran",fortran:"fortran",go:"go",haskell:"haskell",hs:"haskell",html:"htmlmixed",ini:"properties",javascript:"javascript",json:{name:"javascript",json:!0},js:"javascript",jl:"julia",julia:"julia",lua:"lua",md:"markdown",mdown:"markdown",markdown:"markdown",ml:"mllike",nginx:"nginx",perl:"perl",pl:"perl",powershell:"powershell",properties:"properties",ocaml:"mllike",pascal:"text/x-pascal",pas:"text/x-pascal",php:t=>t.includes("<?php")?"php":"text/x-php",py:"python",python:"python",ruby:"ruby",rust:"rust",rb:"ruby",rs:"rust",shell:"shell",sh:"shell",bash:"shell",toml:"toml",sql:"text/x-sql",vbs:"vbscript",vbscript:"vbscript",xml:"xml",yaml:"yaml",yml:"yaml"};function V0(){const t=document.querySelectorAll(".page-content pre, .comment-box .content pre");for(const n of t)Bg(n)}function Y0(t){const n=t.querySelectorAll("pre");for(const i of n)Bg(i)}function Bg(t){const n=t.querySelector("code[class^=language-]");t.innerHTML=t.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);const i=t.textContent.trimEnd();let s="";if(n!==null){const c=n.className.replace("language-","");s=Ka(c,i)}const u=Tr.default(function(c){t.parentNode.replaceChild(c,t)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});X0(u)}function X0(t){const n='<svg viewBox="0 0 24 24" width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=n,t.display.wrapper.appendChild(i);const s=new Ng.default(i,{text:function(u){return t.getValue()}});s.on("success",u=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(t,n){t=t.trim().replace(/^\./g,"").toLowerCase();const i=typeof Vl[t];return i==="undefined"?"":i==="function"?Vl[t](n):Vl[t]}function Va(){const t=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(t?"darcula":"default")}function Z0(t){const n=t.ownerDocument,i=t.querySelector("code");let s=(t.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),t.innerHTML=t.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);const u=t.textContent,c=n.createElement("div"),d=n.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",t.parentNode.replaceChild(c,t),c.appendChild(d),c.contentEditable=!1,d.textContent=u;let h=Tr.default(function(p){c.appendChild(p)},{value:u,mode:Ka(s,u),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function Q0(t,n){const i=t.textContent;return Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},{value:i,mode:Ka(n,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function J0(t,n,i){t.setOption("mode",Ka(n,i))}function ex(t,n){t.setValue(n),setTimeout(()=>{jg(t)},10)}function jg(t){t.refresh()}function tx(t){const n=t.textContent,i={value:n,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(t,"editor-markdown-cm::pre-init",{config:i}),Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},i)}function nx(){let t=Tr.default.keyMap.default==Tr.default.keyMap.macDefault;return t?"Cmd":"Ctrl"}var Nt={highlight:V0,highlightWithin:Y0,wysiwygView:Z0,popupEditor:Q0,setMode:J0,setContent:ex,updateLayout:jg,markdownEditor:tx,getMetaKey:nx};class rx{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),ot(this.languageLinks,t=>{const n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),Ca(this.languageInput,t=>this.save()),ot(this.saveButton,t=>this.save()),zt(this.historyList,"button","click",(t,n)=>{t.preventDefault();const i=n.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,i){this.languageInput.value=n,this.callback=i,this.show(),this.updateEditorMode(n),Nt.setContent(this.editor,t)}show(){this.editor||(this.editor=Nt.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{Nt.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){Nt.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{const i=new Date(parseInt(n)).toLocaleTimeString();return`<li><button type="button" data-time="${n}">${i}</button></li>`}).join("")}addHistory(){if(!this.editor)return;const t=this.editor.getValue();if(!t)return;const n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Hg=rx;class ix{constructor(t){Nt.highlightWithin(t)}}var Ug=ix;class ox{constructor(t){if(this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),pi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),fi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const t=this.content.querySelector(".text-neg.text-small");t&&this.open()}}var Wg=ox;class ax{constructor(t){this.elem=t,this.checkbox=t.querySelector("input[type=checkbox]"),this.display=t.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(t){const n=t.keyCode===32||t.keyCode===13;n&&(t.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const t=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",t)}}var $g=ax;class sx{constructor(t){this.elem=t,this.dealtWith=!1,t.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;Nt.highlightWithin(this.elem),this.dealtWith=!0}}var Gg=sx;class lx{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners()}show(t=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",s=>{this.menu.contains(s.target)||this.hide()});const n=this.menu.querySelector("input");n!==null&&n.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),t&&t.stopPropagation()}hideAll(){for(let t of window.components.dropdown)t.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n+1;i>=t.length&&(i=0),t[i].focus()}focusPrevious(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n-1;i<0&&(i=t.length-1),t[i].focus()}setupListeners(){this.container.addEventListener("click",n=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(n.target)&&this.hide()}),ot(this.toggle,n=>{n.stopPropagation(),this.show(n),n instanceof KeyboardEvent&&this.focusNext()});const t=n=>{n.key==="ArrowDown"||n.key==="ArrowRight"?(this.focusNext(),n.preventDefault()):n.key==="ArrowUp"||n.key==="ArrowLeft"?(this.focusPrevious(),n.preventDefault()):n.key==="Escape"&&(this.hide(),this.toggle.focus(),n.stopPropagation())};this.container.addEventListener("keydown",t),this.moveMenu&&this.menu.addEventListener("keydown",t),this.menu.addEventListener("keydown ",n=>{n.key==="Enter"&&(n.preventDefault(),n.stopPropagation(),this.hide())})}}var Kg=lx;const Vg=Ke(zh());class ux{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;const t=this;this.dz=new Vg.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:Number(window.uploadLimit)||256,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",t.onSending.bind(t)),this.dz.on("success",t.onSuccess.bind(t)),this.dz.on("error",t.onError.bind(t))}})}onSending(t,n,i){const s=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",s),n.ontimeout=u=>{this.dz.emit("complete",t),this.dz.emit("error",t,this.timeoutMessage)}}onSuccess(t,n){this.$emit("success",{file:t,data:n}),this.successMessage&&window.$events.emit("success",this.successMessage),Ga(t.previewElement,800,()=>{this.dz.removeFile(t)})}onError(t,n,i){this.$emit("error",{file:t,errorMessage:n,xhr:i});const s=u=>{const c=t.previewElement.querySelector("[data-dz-errormessage]");c.textContent=u};i&&i.status===413?s(this.uploadLimitMessage):n.file&&s(n.file)}removeAll(){this.dz.removeAllFiles(!0)}}var Yg=ux;class cx{constructor(t){this.elem=t,this.buttons=t.querySelectorAll("[toolbox-tab-button]"),this.contentElements=t.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=t.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",n=>{let i=n.target.closest("[toolbox-tab-button]");if(i===null)return;let s=i.getAttribute("toolbox-tab-button");this.setActiveTab(s,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const t=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",t)}setActiveTab(t,n=!1){for(let i=0,s=this.buttons.length;i<s;i++){this.buttons[i].classList.remove("active");let u=this.buttons[i].getAttribute("toolbox-tab-button");u===t&&this.buttons[i].classList.add("active")}for(let i=0,s=this.contentElements.length;i<s;i++){this.contentElements[i].style.display="none";let u=this.contentElements[i].getAttribute("toolbox-tab-content");u===t&&(this.contentElements[i].style.display="block")}n&&this.elem.classList.add("open")}}var Xg=cx;class dx{constructor(t){this.permissionsTable=t.querySelector("[permissions-table]"),this.restrictedCheckbox=t.querySelector("[name=restricted]"),this.restrictedCheckbox.addEventListener("change",this.updateTableVisibility.bind(this))}updateTableVisibility(){this.permissionsTable.style.display=this.restrictedCheckbox.checked?null:"none"}}var Zg=dx;class hx{setup(){this.entityId=this.$opts.entityId,this.entityType=this.$opts.entityType,this.contentView=this.$refs.contentView,this.searchView=this.$refs.searchView,this.searchResults=this.$refs.searchResults,this.searchInput=this.$refs.searchInput,this.searchForm=this.$refs.searchForm,this.clearButton=this.$refs.clearButton,this.loadingBlock=this.$refs.loadingBlock,this.setupListeners()}setupListeners(){this.searchInput.addEventListener("change",this.runSearch.bind(this)),this.searchForm.addEventListener("submit",t=>{t.preventDefault(),this.runSearch()}),ot(this.clearButton,this.clearSearch.bind(this))}runSearch(){const t=this.searchInput.value.trim();if(t.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const n=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(n,{term:t}).then(i=>{this.searchResults.innerHTML=i.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}}var Qg=hx;class fx{constructor(t){this.elem=t,this.search="",this.lastClick=0,this.selectedItemData=null;const n=t.hasAttribute("entity-types")?t.getAttribute("entity-types"):"page,book,chapter",i=t.hasAttribute("entity-permission")?t.getAttribute("entity-permission"):"view";this.searchUrl=window.baseUrl(`/ajax/search/entities?types=${encodeURIComponent(n)}&permission=${encodeURIComponent(i)}`),this.input=t.querySelector("[entity-selector-input]"),this.searchInput=t.querySelector("[entity-selector-search]"),this.loading=t.querySelector("[entity-selector-loading]"),this.resultsContainer=t.querySelector("[entity-selector-results]"),this.addButton=t.querySelector("[entity-selector-add-button]"),this.elem.addEventListener("click",this.onClick.bind(this));let s=0;this.searchInput.addEventListener("input",u=>{s=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-s<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",u=>{u.keyCode===13&&u.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",u=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),this.showLoading(),this.initialLoad()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl).then(t=>{this.resultsContainer.innerHTML=t.data,this.hideLoading()})}searchEntities(t){this.input.value="";let n=`${this.searchUrl}&term=${encodeURIComponent(t)}`;window.$http.get(n).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){let t=Date.now(),n=t-this.lastClick<300;return this.lastClick=t,n}onClick(t){const n=t.target.closest("[data-entity-type]");n&&(t.preventDefault(),t.stopPropagation(),this.selectItem(n))}selectItem(t){const n=this.isDoubleClick(),i=t.getAttribute("data-entity-type"),s=t.getAttribute("data-entity-id"),u=!t.classList.contains("selected")||n;this.unselectAll(),this.input.value=u?`${i}:${s}`:"";const c=t.getAttribute("href"),d=t.querySelector(".entity-list-item-name").textContent,h={id:Number(s),name:d,link:c};if(u?(t.classList.add("selected"),this.selectedItemData=h):window.$events.emit("entity-select-change",null),!n&&!u)return;n&&this.confirmSelection(h),u&&window.$events.emit("entity-select-change",h)}confirmSelection(t){window.$events.emit("entity-select-confirm",t)}unselectAll(){let t=this.elem.querySelectorAll(".selected");for(let n of t)n.classList.remove("selected","primary-background");this.selectedItemData=null}}var Jg=fx;class px{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(t){this.callback=t,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(t){this.hide(),this.callback&&t&&this.callback(t)}onSelectionChange(t){this.selection=t,t===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var ev=px;class mx{setup(){this.container=this.$el,this.name=this.$opts.name,ot(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var tv=mx;class gx{constructor(t){this.elem=t,this.isOpen=t.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=t.getAttribute("expand-toggle-update-endpoint"),this.selector=t.getAttribute("expand-toggle"),t.addEventListener("click",this.click.bind(this))}open(t){pi(t,200)}close(t){fi(t,200)}click(t){t.preventDefault();const n=document.querySelectorAll(this.selector);for(let i of n)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(t){window.$http.patch(this.updateEndpoint,{expand:t?"true":"false"})}}var nv=gx;class vx{constructor(t){this.elem=t,this.typeControl=t.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=t.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const t=this.typeControl.value==="page";this.pagePickerContainer.style.display=t?"block":"none"}}var rv=vx;class bx{setup(){this.uploadedTo=this.$opts.uploadedTo,this.container=this.$el,this.popupEl=this.$refs.popup,this.searchForm=this.$refs.searchForm,this.searchInput=this.$refs.searchInput,this.cancelSearch=this.$refs.cancelSearch,this.listContainer=this.$refs.listContainer,this.filterTabs=this.$manyRefs.filterTabs,this.selectButton=this.$refs.selectButton,this.formContainer=this.$refs.formContainer,this.dropzoneContainer=this.$refs.dropzoneContainer,this.type="gallery",this.lastSelected={},this.lastSelectedTime=0,this.callback=null,this.resetState=()=>{this.hasData=!1,this.page=1,this.filter="all"},this.resetState(),this.setupListeners(),window.ImageManager=this}setupListeners(){ot(this.filterTabs,t=>{this.resetAll(),this.filter=t.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",t=>{this.resetListView(),this.loadGallery(),t.preventDefault()}),ot(this.cancelSearch,t=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",t=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),zt(this.listContainer,".load-more","click",async t=>{no(t.target),this.page++,await this.loadGallery(),t.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),ot(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),zt(this.formContainer,"#image-manager-delete","click",t=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(t,n="gallery"){this.resetAll(),this.callback=t,this.type=n,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",n!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const t={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:n}=await window.$http.get(`images/${this.type}`,t);this.addReturnedHtmlElementsToList(n),rg(this.listContainer)}addReturnedHtmlElementsToList(t){const n=document.createElement("div");n.innerHTML=t,window.components.init(n);for(const i of[...n.children])this.listContainer.appendChild(i)}setActiveFilterTab(t){this.filterTabs.forEach(i=>i.classList.remove("selected"));const n=this.filterTabs.find(i=>i.dataset.filter===t);n&&n.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){no(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(t){const n=JSON.parse(t.detail.data),i=n&&n.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,s=t.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(u=>{u.classList.remove("selected")}),s?this.resetEditForm():(t.target.classList.add("selected"),this.loadImageEditForm(n.id)),this.selectButton.classList.toggle("hidden",s),i&&this.callback&&(this.callback(n),this.hide()),this.lastSelected=n,this.lastSelectedTime=Date.now()}async loadImageEditForm(t,n=!1){n||(this.formContainer.innerHTML="");const i=n?{delete:!0}:{},{data:s}=await window.$http.get(`/images/edit/${t}`,i);this.formContainer.innerHTML=s,window.components.init(this.formContainer)}}var iv=bx;class yx{constructor(t){this.elem=t,this.imageElem=t.querySelector("img"),this.imageInput=t.querySelector("input[type=file]"),this.resetInput=t.querySelector("input[data-reset-input]"),this.removeInput=t.querySelector("input[data-remove-input]"),this.defaultImage=t.getAttribute("data-default-image");const n=t.querySelector('button[data-action="reset-image"]');n.addEventListener("click",this.reset.bind(this));const i=t.querySelector('button[data-action="remove-image"]');i&&i.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let t of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(t);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}}var ov=yx;class wx{constructor(t){this.elem=t,this.menu=t.querySelector("ul"),this.sortInput=t.querySelector('[name="sort"]'),this.orderInput=t.querySelector('[name="order"]'),this.form=t.querySelector("form"),this.menu.addEventListener("click",n=>{n.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(n)}),this.elem.addEventListener("click",n=>{n.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(n)})}sortOptionClick(t){const n=t.target.closest("[data-sort-value]");this.sortInput.value=n.getAttribute("data-sort-value"),t.preventDefault(),this.form.submit()}sortDirectionClick(t){const n=this.orderInput.value,i=n==="asc"?"desc":"asc";this.orderInput.value=i,t.preventDefault(),this.form.submit()}}var av=wx;class kx{constructor(t){this.data=t}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const t=this.data.getData("text/rtf");return t&&t.includes("\\trowd")}getImages(){const t=this.data.types,n=this.data.files,i=[];for(const s of t)if(s.includes("image")){const u=this.data.getData(s);i.push(u.getAsFile())}for(const s of n)s.type.includes("image")&&i.push(s);return i}}var bo=kx;let Qn=null,Yl,Xl;function xx(t,n,i){Yl=n,Xl=i,Qn=document.createElement("iframe"),Qn.setAttribute("frameborder","0"),window.addEventListener("message",sv),Qn.setAttribute("src",t),Qn.setAttribute("class","fullscreen"),Qn.style.backgroundColor="#FFFFFF",document.body.appendChild(Qn)}function _x(){lv()}function sv(t){if(!t.data||t.data.length<1)return;let n=JSON.parse(t.data);n.event==="init"?Ex():n.event==="exit"?lv():n.event==="save"?Sx(n):n.event==="export"&&Cx(n)}function Cx(t){Xl&&Xl(t.data)}function Sx(t){uv({action:"export",format:"xmlpng",xml:t.xml,spin:"Updating drawing"})}function Ex(){if(!Yl)return;Yl().then(t=>{uv({action:"load",autosave:1,xml:t})})}function lv(){window.removeEventListener("message",sv),Qn&&document.body.removeChild(Qn)}function uv(t){Qn.contentWindow.postMessage(JSON.stringify(t),"*")}async function Dx(t,n){let i={image:t,uploaded_to:n};const s=await window.$http.post(window.baseUrl("/images/drawio"),i);return s.data}async function Ax(t){const n=await window.$http.get(window.baseUrl(`/images/drawio/base64/${t}`));return`data:image/png;base64,${n.data.content}`}var dn={show:xx,close:_x,upload:Dx,load:Ax};const cv=Ke(Gm()),dv=Ke(Zm());class Tx{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.markdown=new cv.default({html:!0}),this.markdown.use(dv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.htmlInput=this.elem.querySelector("input[name=html]"),this.cm=Nt.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const t=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?t():this.display.addEventListener("load",t.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let t=0;this.displayDoc.addEventListener("click",s=>{let u=Date.now()-t<300,c=s.target.closest("a");if(c!==null){s.preventDefault(),window.open(c.getAttribute("href"));return}let d=s.target.closest("[drawio-diagram]");if(d!==null&&u){this.actionEditDrawing(d);return}t=Date.now()}),this.elem.addEventListener("click",s=>{let u=s.target.closest("button[data-action]");if(u===null)return;let c=u.getAttribute("data-action");if(c==="insertImage"&&this.actionInsertImage(),c==="insertLink"&&this.actionShowLinkSelector(),c==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}c==="insertDrawing"&&this.actionStartDrawing(),c==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{const u=s.target.closest(".editor-toolbar-label");if(!u)return;const c=this.elem.querySelectorAll(".markdown-editor-wrap");for(let d of c)d.classList.remove("active");u.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",s=>{this.cm.setValue(s),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const n=new URL(window.location).searchParams,i=n.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const t=this.cm.getValue();this.input.value=t;const n=this.markdown.render(t);window.$events.emit("editor-html-change",n),window.$events.emit("editor-markdown-change",t),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=n,this.htmlInput.value=n,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";const t=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let n of t){const i=n.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(t){const n=this.displayDoc.body.children;if(n.length<=t)return;const i=t===-1?n[n.length-1]:n[t];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const t=this.cm,n=this;t.setOption("direction","ltr");let i=Nt.getMetaKey();const s={};s[`${i}-Alt-I`]=function(m){let b=m.getSelection(),w=`![${b}](http://)`,D=m.getCursor("from");m.replaceSelection(w),m.setCursor(D.line,D.ch+w.length-1)},s[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},s[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},s[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},s[`${i}-K`]=m=>{y()},s[`${i}-1`]=m=>{d("##")},s[`${i}-2`]=m=>{d("###")},s[`${i}-3`]=m=>{d("####")},s[`${i}-4`]=m=>{d("#####")},s[`${i}-5`]=m=>{d("")},s[`${i}-d`]=m=>{d("")},s[`${i}-6`]=m=>{d(">")},s[`${i}-q`]=m=>{d(">")},s[`${i}-7`]=m=>{p("\n```\n","\n```")},s[`${i}-8`]=m=>{p("`","`")},s[`Shift-${i}-E`]=m=>{p("`","`")},s[`${i}-9`]=m=>{p('<p class="callout info">',"</p>")},t.setOption("extraKeys",s),t.on("change",(m,b)=>{this.updateAndRender()});const u=ig(m=>{let b=m.getScrollInfo(),w=b.top+b.clientHeight===b.height;if(w){this.onMarkdownScroll(-1);return}let D=m.lineAtHeight(b.top,"local"),E=m.getRange({line:0,ch:null},{line:D,ch:null}),S=new DOMParser,z=S.parseFromString(this.markdown.render(E),"text/html"),A=z.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(A.length)},100);t.on("scroll",m=>{u(m)}),t.on("paste",(m,b)=>{const w=new bo(b.clipboardData||b.dataTransfer);if(!w.hasItems()||w.containsTabularData())return;const D=w.getImages();for(const E of D)g(E)}),t.on("drop",(m,b)=>{const w=b.dataTransfer.getData("bookstack/template");if(w){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.preventDefault(),window.$http.get(`/templates/${w}`).then(S=>{const z=S.data.markdown||S.data.html;m.replaceSelection(z)})}const D=new bo(b.dataTransfer);if(D.hasItems()&&D.getImages().length>0){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.stopPropagation(),b.preventDefault();const S=D.getImages();for(const z of S)g(z)}});function c(m,b){let w=t.getValue(),D=t.listSelections();t.setValue(w.replace(m,b)),t.setSelections(D)}function d(m){let b=t.getCursor(),w=t.getLine(b.line),D=w.length,E=w.split(" ")[0];if(E===m){w=w.replace(`${m} `,""),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch-(m.length+1)});return}let S=/^[#>`]/.test(E),z=0;S?(z=m.length-E.length,w=w.replace(E,m).trim()):m!==""&&(z=m.length+1,w=m+" "+w),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch+z})}function h(m,b){let w=t.getCursor(),D=t.getLine(w.line),E=D.length,S=D;D.indexOf(m)===0&&D.slice(-b.length)===b?S=D.slice(m.length,D.length-b.length):S=`${m}${D}${b}`,t.replaceRange(S,{line:w.line,ch:0},{line:w.line,ch:E}),t.setCursor({line:w.line,ch:w.ch+m.length})}function p(m,b){let w=t.getSelection();if(w==="")return h(m,b);let D=w,E=0,S=0;w.indexOf(m)===0&&w.slice(-b.length)===b?(D=w.slice(m.length,w.length-b.length),S=-(b.length+m.length)):(D=`${m}${w}${b}`,S=m.length+b.length);let z=t.listSelections()[0];t.replaceSelection(D);let A=z.head.ch<=z.anchor.ch;z.head.ch+=A?E:S,z.anchor.ch+=A?S:E,t.setSelections([z])}function g(m){if(m===null||m.type.indexOf("image")!==0)return;let b="png";if(m.name){let U=m.name.match(/\.(.+)$/);U.length>1&&(b=U[1])}const w="image-"+Math.random().toString(16).slice(2),D=window.baseUrl(`/loading.gif#upload${w}`),E=t.getSelection(),S=`![${E}](${D})`,z=t.getCursor();t.replaceSelection(S),t.setCursor({line:z.line,ch:z.ch+E.length+3});const A="image-"+Date.now()+"."+b,R=new FormData;R.append("file",m,A),R.append("uploaded_to",n.pageId),window.$http.post("/images/gallery",R).then(U=>{const Y=`[![${E}](${U.data.thumbs.display})](${U.data.url})`;c(S,Y)}).catch(U=>{window.$events.emit("error",trans("errors.image_upload_error")),c(S,E),console.log(U)})}function y(){let m=t.getCursor("from"),b=t.getSelection()||"",w=`[${b}]()`;t.focus(),t.replaceSelection(w);let D=b===""?-3:-1;t.setCursor(m.line,m.ch+w.length+D)}this.updateAndRender()}actionInsertImage(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{let i=this.cm.getSelection(),s="[!["+(i||n.name)+"]("+n.thumbs.display+")]("+n.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)},"gallery")}actionShowImageManager(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{this.insertDrawing(n,t)},"drawio")}actionShowLinkSelector(){const t=this.cm.getCursor("from");window.EntitySelectorPopup.show(n=>{let i=this.cm.getSelection()||n.name,s=`[${i}](${n.link})`;this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)})}getDrawioUrl(){const t=document.querySelector("[drawio-url]");return t?t.getAttribute("drawio-url"):!1}actionStartDrawing(){const t=this.getDrawioUrl();if(!t)return;const n=this.cm.getCursor("from");dn.show(t,()=>Promise.resolve(""),i=>{const s={image:i,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",s).then(u=>{this.insertDrawing(u.data,n),dn.close()}).catch(u=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(u)})})}insertDrawing(t,n){const i=`<div drawio-diagram="${t.id}"><img src="${t.url}"></div>`;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(n.line,n.ch+i.length)}actionEditDrawing(t){const n=this.getDrawioUrl();if(!n)return;const i=this.cm.getCursor("from"),s=t.getAttribute("drawio-diagram");dn.show(n,()=>dn.load(s),u=>{let c={image:u,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",c).then(d=>{let h=`<div drawio-diagram="${d.data.id}"><img src="${d.data.url}"></div>`,p=this.cm.getValue().split(`
`).map(g=>g.indexOf(`drawio-diagram="${s}"`)!==-1?h:g).join(`
`);this.cm.setValue(p),this.cm.setCursor(i),this.cm.focus(),dn.close()}).catch(d=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(d)})})}actionFullScreen(){const t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;const n=this.cm.getValue(),i=n.split(/\r?\n/);let s=i.findIndex(u=>u&&u.indexOf(t)!==-1);if(s===-1)return;this.cm.scrollIntoView({line:s},200),this.cm.focus(),this.cm.setCursor({line:s,char:i[s].length})}listenForBookStackEditorEvents(){function t({html:n,markdown:i}){return i||n}window.$events.listen("editor::replace",n=>{const i=t(n);this.cm.setValue(i)}),window.$events.listen("editor::append",n=>{const i=this.cm.getCursor("from"),s=t(n),u=this.cm.getValue()+`
`+s;this.cm.setValue(u),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",n=>{const i=this.cm.getCursor("from"),s=t(n),u=s+`
`+this.cm.getValue();this.cm.setValue(u);const c=s.split(`
`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",n=>{const i=t(n);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var hv=Tx;class Lx{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(const s of n)s.disabled=t;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=t?"none":"block")}}var fv=Lx;class Ix{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const n=t.split(" ").length,i=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var pv=Ix;class Fx{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){ot(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),ot(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var mv=Fx;class Mx{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){const u=t.target.href.split("#")[1];ro(document.querySelector("#"+u))}if(n===null)return;t.preventDefault();const i=n.getAttribute("action"),s=n.closest("[comment]");i==="edit"&&this.editComment(s),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(s),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(s),i==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){if(!this.editingComment)return;this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none"}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),i=n.value.split(`
`).length;n.style.height=i*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let i=n.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(n);let u=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${u}`,s).then(c=>{let d=document.createElement("div");d.innerHTML=c.data,this.editingComment.innerHTML=d.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window.$http.delete(`/comment/${n}`).then(i=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let n=this.formInput.value,i={text:n,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let u=document.createElement("div");u.innerHTML=s.data;let c=u.children[0];this.container.appendChild(c),window.components.init(c),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(s=>{window.$events.showValidationErrors(s),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";const n=this.replyToRow.querySelector("a");n.textContent=`#${this.parentId}`,n.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="block";t.querySelector(".form-group.loading").style.display="none"}}var gv=Mx;const vv=Ke(Ks());class qx{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),Nt.highlight(),this.setupPointer(),this.setupNavHighlighting(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const n=document.querySelector(".sidebar-page-nav");n&&zt(n,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const u=s.getAttribute("href").substr(1);this.goToText(u),window.history.pushState(null,null,"#"+u)})}goToText(t){const n=document.getElementById(t);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),n!==null)ro(n);else{const i=ng(".page-content > div > *",t);i&&ro(i)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);const n=t.querySelector("div.pointer");let i=!1,s=!1,u=!0,c="";zt(t,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(t,["click","focus"],h=>{h.stopPropagation()}),zt(t,"span.icon","click",(h,p)=>{h.stopPropagation(),u=!u,p.querySelector('[data-icon="include"]').style.display=u?"none":"inline",p.querySelector('[data-icon="link"]').style.display=u?"inline":"none",d()}),new vv.default(t.querySelector("button")),_a(document.body,["click","focus"],h=>{if(!i||s)return;t=t.parentElement.removeChild(t),i=!1});let d=h=>{let p=u?window.baseUrl(`/link/${this.pageId}#${c}`):`{{@${this.pageId}#${c}}}`;u&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),t.querySelector("input").value=p;const g=t.querySelector("#pointer-edit");if(g&&h){const y=g.dataset.editHref,m=h.id,b=h.textContent&&h.textContent.substring(0,50);g.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(b)}`}};xa('.page-content [id^="bkmrk"]',h=>{_a(h,["mouseup","keyup"],p=>{p.stopPropagation();let g=window.getSelection();if(g.toString().length===0)return;c=h.id,d(h),h.parentNode.insertBefore(t,h),t.style.display="block",i=!0,s=!0,requestAnimationFrame(()=>{const y=h.getBoundingClientRect();let m=p.pageX-y.left-164;m<0&&(m=0);const b=m/y.width*100;n.style.left=b+"%",setTimeout(()=>{s=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let t=document.querySelector(".sidebar-page-nav"),n=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");n.length>0&&t!==null&&i(n);function i(c){let d={rootMargin:"0px 0px 0px 0px",threshold:1},h=new IntersectionObserver(s,d);for(let p of c)h.observe(p)}function s(c,d){for(let h of c){let p=h.intersectionRatio===1;u(h.target.id,p)}}function u(c,d){xa('a[href="#'+c+'"]',h=>{h.closest("li").classList.toggle("current-heading",d)})}}}var bv=qx;function yv(t){let n=new Date(t*1e3),i=n.getHours(),s=n.getMinutes();return`${(i>9?"":"0")+i}:${(s>9?"":"0")+s}`}class zx{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.isDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",t=>{this.editorHTML=t}),window.$events.listen("editor-markdown-change",t=>{this.editorMarkdown=t}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),ot(this.saveDraftButton,this.saveDraft.bind(this)),ot(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let t=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let n=Date.now()-this.autoSave.last<this.autoSave.frequency/2;if(n)return;const i=this.titleElem.value.trim()+"::"+this.editorHTML;i!==t&&(t=i,this.saveDraft())},this.autoSave.frequency)}savePage(){this.container.closest("form").submit()}async saveDraft(){const t={name:this.titleElem.value.trim(),html:this.editorHTML};this.editorType==="markdown"&&(t.markdown=this.editorMarkdown);try{const n=await window.$http.put(`/ajax/page/${this.pageId}/save-draft`,t);this.isNewDraft||this.toggleDiscardDraftVisibility(!0),this.draftNotifyChange(`${n.data.message} ${yv(n.data.timestamp)}`),this.autoSave.last=Date.now()}catch(n){try{const i=`draft-save-fail-${new Date().toISOString()}`;window.localStorage.setItem(i,JSON.stringify(t))}catch(i){}window.$events.emit("error",this.autosaveFailText)}}draftNotifyChange(t){this.draftDisplay.innerText=t,this.draftDisplayIcon.classList.add("visible"),window.setTimeout(()=>{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let t;try{t=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(n){return console.error(n)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",t.data.html||""),window.$events.emit("editor-markdown-update",t.data.markdown||t.data.html),this.titleElem.value=t.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let t=this.changelogInput.value.trim();t.length===0?t=this.setChangelogText:t.length>16&&(t=t.slice(0,16)+"..."),this.changelogDisplay.innerText=t}toggleDiscardDraftVisibility(t){this.discardDraftWrap.classList.toggle("hidden",!t)}}var wv=zx;class Ox{constructor(t){this.elem=t,this.input=t.querySelector("input"),this.resetButton=t.querySelector("[page-picker-reset]"),this.selectButton=t.querySelector("[page-picker-select]"),this.display=t.querySelector("[page-picker-display]"),this.defaultDisplay=t.querySelector("[page-picker-default]"),this.buttonSep=t.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",t=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(t=>{this.setValue(t.id,t.name)})}setValue(t,n){this.value=t,this.input.value=t,this.controlView(n)}controlView(t){let n=this.value&&this.value!==0;if(Ya(this.resetButton,n),Ya(this.buttonSep,n),Ya(this.defaultDisplay,!n),Ya(this.display,n),n){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${t}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Ya(t,n){let i=t.tagName==="BUTTON"||t.tagName==="SPAN"?"inline-block":"block";t.style.display=n?i:"none"}var kv=Ox;class Rx{constructor(t){this.container=t;const n=t.querySelector("[permissions-table-toggle-all]");n.addEventListener("click",this.toggleAllClick.bind(this));const i=t.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let u of i)u.addEventListener("click",this.toggleRowClick.bind(this));const s=t.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let u of s)u.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(t){t.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(t){t.preventDefault(),this.toggleAllInElement(t.target.closest("tr"))}toggleColumnClick(t){t.preventDefault();const n=t.target.closest("th,td"),i=Array.from(n.parentElement.children).indexOf(n),s=n.closest("table").querySelectorAll("tr"),u=[];for(let c of s){const d=c.children[i];d&&u.push(...d.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(u)}toggleAllInElement(t){const n=t.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(n)}toggleAllInputs(t){const n=t.length>0?t[0].checked:!1;for(let i of t)i.checked=!n,i.dispatchEvent(new Event("change"))}}var xv=Rx;class Px{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let t=null;this.container.addEventListener("mousedown",n=>{t=n.target}),this.container.addEventListener("click",n=>{if(n.target===this.container&&t===this.container)return this.hide()}),ot(this.hideButtons,n=>this.hide())}hide(t=null){Ga(this.container,240,t),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(t=null,n=null){Rg(this.container,240,t),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=n}}var _v=Px;class Nx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.lightColorInput=t.querySelector('input[name="setting-app-color-light"]'),this.resetButton=t.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const t=this.colorInput.value,n=this.hexToRgb(t),i="rgba("+[n.r,n.g,n.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const s=document.getElementById("custom-styles"),u=s.getAttribute("data-color"),c=s.getAttribute("data-color-light");s.innerHTML=s.innerHTML.split(u).join(t),s.innerHTML=s.innerHTML.split(c).join(i),s.setAttribute("data-color",t),s.setAttribute("data-color-light",i)}hexToRgb(t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return{r:n?parseInt(n[1],16):0,g:n?parseInt(n[2],16):0,b:n?parseInt(n[3],16):0}}}var Cv=Nx;class Bx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.resetButton=t.querySelector("[setting-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default})}}var Sv=Bx;class jx{constructor(t){this.elem=t,this.input=document.getElementById("books-input"),this.shelfBooksList=t.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const t=this.elem.querySelectorAll(".scroll-box");for(let n of t)new hi(n,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",t=>{const n=t.target.closest(".scroll-box-item:not(.instruction)");n&&(t.preventDefault(),this.sortItemClick(n))})}sortItemClick(t){const n=this.elem.querySelectorAll(".scroll-box"),i=Array.from(n).filter(s=>t.parentElement!==s);i.length>0&&i[0].appendChild(t),this.onChange()}onChange(){const t=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=t.map(n=>n.getAttribute("data-id")).join(",")}}var Ev=jx;class Hx{constructor(t){this.elem=t,this.toggleElem=t.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(t=!0){this.elem.classList.toggle("open")}}var Dv=Hx;class Ux{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const t=new hi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:t.toArray()})},setData(n,i){const s=i.getAttribute("data-drag-content");if(s){const u=JSON.parse(s);for(const[c,d]of Object.entries(u))n.setData(c,d)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var Av=Ux;class Wx{setup(){this.$el.addEventListener("change",()=>{const t=this.$el.closest("form");t&&t.submit()})}}var Tv=Wx;class $x{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[t,n]of Object.entries(this.$manyRefs||{})){if(t.startsWith("toggle")){const i=t.replace("toggle","").toLowerCase();ot(n,s=>this.show(i)),this.allButtons.push(...n),this.tabButtonsByName[i]=n}if(t.startsWith("content")){const i=t.replace("content","").toLowerCase();this.tabContentsByName[i]=n,this.allContents.push(...n)}}}show(t){this.allContents.forEach(s=>{s.classList.add("hidden"),s.classList.remove("selected")}),this.allButtons.forEach(s=>s.classList.remove("selected"));const n=this.tabContentsByName[t]||[],i=this.tabButtonsByName[t]||[];n.length>0&&(n.forEach(s=>{s.classList.remove("hidden"),s.classList.add("selected")}),i.forEach(s=>s.classList.add("selected")))}}var Lv=$x;class Gx{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",t=>{const n=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||n.add()})}hasEmptyRows(){const t=this.container.querySelectorAll(this.rowSelector),n=[...t].find(i=>[...i.querySelectorAll("input")].filter(s=>s.value).length===0);return n!==void 0}}var Iv=Gx;class Kx{constructor(t){this.elem=t,this.list=t.querySelector("[template-manager-list]"),this.searching=!1,zt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),zt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),zt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),zt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(t,n){const i=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(t,n){const i=n.closest("[template-id]").getAttribute("template-id");t.dataTransfer.setData("bookstack/template",i),t.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(t,n){t.stopPropagation();const i=n.getAttribute("template-action"),s=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(s,i)}async insertTemplate(t,n="replace"){const i=await window.$http.get(`/templates/${t}`),s="editor::"+n;window.$events.emit(s,i.data)}async handlePaginationClick(t,n){t.preventDefault();const i=n.getAttribute("href"),s=await window.$http.get(i);this.list.innerHTML=s.data}setupSearchBox(){const t=this.elem.querySelector(".search-box");if(!t)return;const n=t.querySelector("input"),i=t.querySelector("button"),s=t.querySelector("button.search-box-cancel");async function u(){const c=n.value,d=await window.$http.get("/templates",{search:c});s.style.display=c?"block":"none",this.list.innerHTML=d.data}u=u.bind(this),t.addEventListener("keypress",c=>{c.key==="Enter"&&(c.preventDefault(),u())}),i.addEventListener("click",c=>{u()}),s.addEventListener("click",c=>{n.value="",u()})}}var Fv=Kx;class Vx{constructor(t){this.elem=t,this.input=t.querySelector("input[type=hidden]"),this.checkbox=t.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const t=new Event("change");this.input.dispatchEvent(t)}}var Mv=Vx;class Yx{constructor(t){this.elem=t,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",n=>{this.updateLayout()},{passive:!0})}updateLayout(){let t="tablet";if(window.innerWidth<=1e3&&(t="mobile"),window.innerWidth>=1400&&(t="desktop"),t===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),t==="desktop"?this.setupDesktop():t==="mobile"&&this.setupMobile(),this.lastLayoutType=t}setupMobile(){const t=document.querySelectorAll("[tri-layout-mobile-tab]");for(let n of t)n.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let n of t)n.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(t){const n=t.target.getAttribute("tri-layout-mobile-tab");this.showTab(n)}showContent(){this.showTab("content",!1)}showTab(t,n=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;const i=document.querySelectorAll(".tri-layout-mobile-tab");for(let u of i){const c=u.getAttribute("tri-layout-mobile-tab")===t;u.classList.toggle("active",c)}const s=t==="info";if(this.elem.classList.toggle("show-info",s),n){const u=document.querySelector("header"),c=u.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[t]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[t]||c},50)}this.lastTabShown=t}}var qv=Yx;function zv(t,n,i){const s=new bo(t.clipboardData||t.dataTransfer);if(!s.hasItems()||s.containsTabularData())return;const u=s.getImages();for(const c of u){const d="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");t.preventDefault(),setTimeout(()=>{n.insertContent(`<p><img src="${h}" id="${d}"></p>`),Xx(c,i).then(p=>{const g=p.name.replace(/"/g,""),y=`<img src="${p.thumbs.display}" alt="${g}" />`,m=n.dom.create("a",{target:"_blank",href:p.url},y);n.dom.replace(m,d)}).catch(p=>{n.dom.remove(d),window.$events.emit("error",trans("errors.image_upload_error")),console.log(p)})},10)}}async function Xx(t,n){if(t===null||t.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(t.name){let d=t.name.match(/\.(.+)$/);d.length>1&&(i=d[1])}const s="image-"+Date.now()+"."+i,u=new FormData;u.append("file",t,s),u.append("uploaded_to",n.pageId);const c=await window.$http.post(window.baseUrl("/images/gallery"),u);return c.data}function Zx(t){for(let n=1;n<5;n++)t.shortcuts.add("meta+"+n,"",["FormatBlock",!1,"h"+(n+1)]);t.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),t.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),t.shortcuts.add("meta+9","",function(){const n=t.selection.getNode(),i=n?n.closest(".callout"):null,s=["info","success","warning","danger"],u=s.findIndex(h=>i&&i.classList.contains(h)),c=(u+1)%s.length,d=s[c];t.formatter.apply("callout"+d)})}function Qx(t){window.$http.get(window.baseUrl("/custom-head-content")).then(n=>{if(!n.data)return;let i=t.getDoc().querySelector("head");i.innerHTML+=n.data})}function Jx(){function t(s){return s.className==="CodeMirrorContainer"}function n(s){const u=s.selection.getNode();if(!t(u)){const h=s.selection.getNode().textContent;window.components.first("code-editor").open(h,"",(p,g)=>{const y=document.createElement("div");y.innerHTML=`<pre><code class="language-${g}"></code></pre>`,y.querySelector("code").innerText=p,s.formatter.toggle("pre");const m=s.selection.getNode();s.dom.setHTML(m,y.querySelector("pre").innerHTML),s.fire("SetContent"),s.focus()});return}let c=u.hasAttribute("data-lang")?u.getAttribute("data-lang"):"",d=u.querySelector("textarea").textContent;window.components.first("code-editor").open(d,c,(h,p)=>{const g=u.querySelector(".CodeMirror"),y=g.CodeMirror;y&&(Nt.setContent(y,h),Nt.setMode(y,p,h));const m=u.querySelector("textarea");m&&(m.textContent=h),u.setAttribute("data-lang",p),s.focus()})}function i(s){const u=s.querySelector("textarea"),c=u.textContent,d=s.getAttribute("data-lang");s.removeAttribute("contentEditable");const h=document.createElement("pre"),p=document.createElement("code");p.classList.add(`language-${d}`),p.textContent=c,h.appendChild(p),s.parentElement.replaceChild(h,s)}window.tinymce.PluginManager.add("codeeditor",function(s,u){const c=s.$;s.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),s.addCommand("codeeditor",()=>{n(s)}),s.on("PreProcess",function(d){c("div.CodeMirrorContainer",d.node).each((h,p)=>{i(p)})}),s.on("dblclick",d=>{let h=s.selection.getNode();if(!t(h))return;n(s)}),s.on("SetContent",function(){c(".CodeMirrorContainer").filter((h,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((h,p)=>{i(p)});const d=c("body > pre").filter((h,p)=>p.contentEditable!=="false");if(!d.length)return;s.undoManager.transact(function(){d.each((h,p)=>{Nt.wysiwygView(p)})})})})}function e_(t,n,i){let s=null,u=null;function c(y){return y.hasAttribute("drawio-diagram")}function d(y,m=null){s=y,u=m,window.ImageManager.show(function(b){if(m){let w=m.querySelector("img");s.dom.setAttrib(w,"src",b.url),s.dom.setAttrib(m,"drawio-diagram",b.id)}else{let w=`<div drawio-diagram="${b.id}" contenteditable="false"><img src="${b.url}"></div>`;s.insertContent(w)}},"drawio")}function h(y,m=null){s=y,u=m,dn.show(t,g,p)}async function p(y){const m="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif");if(u){dn.close();let w=u.querySelector("img");try{const D=await dn.upload(y,i);s.dom.setAttrib(w,"src",D.url),s.dom.setAttrib(u,"drawio-diagram",D.id)}catch(D){window.$events.emit("error",trans("errors.image_upload_error")),console.log(D)}return}setTimeout(async()=>{s.insertContent(`<div drawio-diagram contenteditable="false"><img src="${b}" id="${m}"></div>`),dn.close();try{const w=await dn.upload(y,i);s.dom.setAttrib(m,"src",w.url),s.dom.get(m).parentNode.setAttribute("drawio-diagram",w.id)}catch(w){s.dom.remove(m),window.$events.emit("error",trans("errors.image_upload_error")),console.log(w)}},5)}function g(){if(!u)return Promise.resolve("");let y=u.getAttribute("drawio-diagram");return dn.load(y)}window.tinymce.PluginManager.add("drawio",function(y,m){y.addCommand("drawio",()=>{const b=y.selection.getNode();h(y,c(b)?b:null)}),y.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(`<svg viewBox="0 0 24 24" fill="${n?"#BBB":"#000000"}" xmlns="http://www.w3.org/2000/svg">
<path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=y.selection.getNode();d(y,c(b)?b:null)}}]}),y.on("dblclick",b=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const b=y.$("body > div[drawio-diagram]");if(!b.length)return;y.undoManager.transact(function(){b.each((w,D)=>{D.setAttribute("contenteditable","false")})})})})}function t_(){window.tinymce.PluginManager.add("customhr",function(t){t.addCommand("InsertHorizontalRule",function(){let n=document.createElement("hr"),i=t.selection.getNode(),s=i.parentNode;s.insertBefore(n,i)}),t.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),t.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function n_(t){window.$events.listen("editor::replace",({html:n})=>{t.setContent(n)}),window.$events.listen("editor::append",({html:n})=>{const i=t.getContent()+n;t.setContent(i)}),window.$events.listen("editor::prepend",({html:n})=>{const i=n+t.getContent();t.setContent(i)}),window.$events.listen("editor::insert",({html:n})=>{t.insertContent(n)}),window.$events.listen("editor::focus",()=>{t.focus()})}class r_{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){Jx(),t_();const t=document.querySelector("[drawio-url]");if(t){const n=t.getAttribute("drawio-url");e_(n,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const t=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${t} fullscreen`}getTinyMceConfig(){const t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}},file_browser_callback:function(n,i,s,u){s==="file"&&window.EntitySelectorPopup.show(function(c){const d=u.document.getElementById(n);d.value=c.link;const h=d.closest(".mce-form"),p=h.querySelectorAll("input");p[1].value||(p[1].value=c.name),p[2].value=c.name}),s==="image"&&window.ImageManager.show(function(c){if(u.document.getElementById(n).value=c.url,"createEvent"in document){let h=document.createEvent("HTMLEvents");h.initEvent("change",!1,!0),u.document.getElementById(n).dispatchEvent(h)}else u.document.getElementById(n).fireEvent("onchange");let d=`<a href="${c.url}" target="_blank">`;d+=`<img src="${c.thumbs.display}" alt="${c.name}">`,d+="</a>",u.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,d)},"gallery")},paste_preprocess:function(n,i){let s=i.content;s.indexOf('<img src="file://')!==-1&&(i.content="")},init_instance_callback:function(n){Qx(n)},setup:function(n){n.on("ExecCommand change input NodeChange ObjectResized",i),n.on("init",()=>{i();const h=new URL(window.location).searchParams,p=h.get("content-id");p&&s(p);const g=n.getContainer(),y=g.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",b=>{b.stopPropagation()});window.editor=n});function i(){const h=n.getContent();t.isDarkMode&&n.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",h)}function s(h){const p=n.dom.get(encodeURIComponent(h).replace(/!/g,"%21"));if(!p)return;p.scrollIntoView(),n.selection.select(p,!0),n.selection.collapse(!1),n.focus()}n_(n),window.$events.listen("editor-html-update",h=>{n.setContent(h),n.selection.select(n.getBody(),!0),n.selection.collapse(!1),i(h)}),Zx(n);let u,c;function d(h){return h&&!!(h.textContent||h.innerText)}n.on("dragstart",function(){let h=n.selection.getNode();h.nodeName==="IMG"&&(u=n.dom.getParent(h,".mceTemp"),!u&&h.parentNode.nodeName==="A"&&!d(h.parentNode)&&(u=h.parentNode)),h.hasAttribute("contenteditable")&&h.getAttribute("contenteditable")==="false"&&(c=h)}),n.on("drop",function(h){let p=n.dom,g=tinymce.dom.RangeUtils.getCaretRangeFromPoint(h.clientX,h.clientY,n.getDoc());const y=h.dataTransfer&&h.dataTransfer.getData("bookstack/template");y&&(h.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{n.selection.setRng(g),n.undoManager.transact(function(){n.execCommand("mceInsertContent",!1,m.data.html)})})),p.getParent(g.startContainer,".mceTemp")?h.preventDefault():u&&(h.preventDefault(),n.undoManager.transact(function(){n.selection.setRng(g),n.selection.setNode(u),p.remove(u)})),!h.isDefaultPrevented()&&c&&(h.preventDefault(),n.undoManager.transact(function(){const m=n.selection.getNode(),b=n.selection.getRng(),w=m.closest("body > *");b.startOffset>b.startContainer.length/2?n.$(w).after(c):n.$(w).before(c)})),h.isDefaultPrevented()||zv(h,n,t),u=null}),n.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(h){let p=`<a href="${h.url}" target="_blank">`;p+=`<img src="${h.thumbs.display}" alt="${h.name}">`,p+="</a>",n.execCommand("mceInsertContent",!1,p)},"gallery")}}),n.on("paste",h=>zv(h,n,t)),window.$events.emitPublic(t.elem,"editor-tinymce::setup",{editor:n})}}}}var Ov=r_;const Rv=Ke(Rh()),Pv={"add-remove-rows":sg,"ajax-delete-row":lg,"ajax-form":ug,attachments:cg,"auto-suggest":dg,"back-to-top":hg,"book-sort":zg,"breadcrumb-listing":Og,"chapter-toggle":Pg,"code-editor":Hg,"code-highlighter":Ug,collapsible:Wg,"custom-checkbox":$g,"details-highlighter":Gg,dropdown:Kg,dropzone:Yg,"editor-toolbox":Xg,"entity-permissions-editor":Zg,"entity-search":Qg,"entity-selector":Jg,"entity-selector-popup":ev,"event-emit-select":tv,"expand-toggle":nv,"header-mobile-toggle":Rv.default,"homepage-control":rv,"image-manager":iv,"image-picker":ov,index:Xa,"list-sort-control":av,"markdown-editor":hv,"new-user-password":fv,notification:pv,"optional-input":mv,"page-comments":gv,"page-display":bv,"page-editor":wv,"page-picker":kv,"permissions-table":xv,popup:_v,"setting-app-color-picker":Cv,"setting-color-picker":Sv,"shelf-sort":Ev,sidebar:Dv,"sortable-list":Av,"submit-on-change":Tv,tabs:Lv,"tag-manager":Iv,"template-manager":Fv,"toggle-switch":Mv,"tri-layout":qv,"wysiwyg-editor":Ov};window.components={};function i_(t,n){const i=n.querySelectorAll(`[${t}]`);for(let s=0,u=i.length;s<u;s++)Nv(t,i[s])}function Nv(t,n){const i=Pv[t];if(i===void 0)return;let s;try{s=new i(n),s.$el=n;const u=o_(t,n);s.$refs=u.refs,s.$manyRefs=u.manyRefs,s.$opts=a_(t,n),s.$emit=(c,d={})=>{d.from=s;const h=new CustomEvent(`${t}-${c}`,{bubbles:!0,detail:d});s.$el.dispatchEvent(h)},typeof s.setup=="function"&&s.setup()}catch(u){console.error("Failed to create component",u,t,n)}typeof window.components[t]=="undefined"&&(window.components[t]=[]),window.components[t].push(s),typeof n.components=="undefined"&&(n.components={}),n.components[t]=s}function o_(t,n){const i={},s={},u=`${t}@`,c=`[refs*="${u}"]`,d=[...n.querySelectorAll(c)];n.matches(c)&&d.push(n);for(const h of d){const p=h.getAttribute("refs").split(" ").filter(g=>g.startsWith(u)).map(g=>g.replace(u,"")).map(Bv);for(const g of p)i[g]=h,typeof s[g]=="undefined"&&(s[g]=[]),s[g].push(h)}return{refs:i,manyRefs:s}}function a_(t,n){const i={},s=`option:${t}:`;for(const{name:u,value:c}of n.attributes)if(u.startsWith(s)){const d=u.replace(s,"");i[Bv(d)]=c||""}return i}function Bv(t){const n=s=>s.slice(0,1).toUpperCase()+s.slice(1),i=t.split("-");return i[0]+i.slice(1).map(n).join("")}function jv(t){typeof t=="undefined"&&(t=document);for(const i of Object.keys(Pv))i_(i,t);const n=t.querySelectorAll("[component],[components]");for(const i of n){const s=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const u of s)Nv(u,i)}}window.components.init=jv;window.components.first=t=>(window.components[t]||[null])[0];var Xa=jv;window.baseUrl=function(t){let n=document.querySelector('meta[name="base-url"]').getAttribute("content");return n[n.length-1]==="/"&&(n=n.slice(0,n.length-1)),t[0]==="/"&&(t=t.slice(1)),n+"/"+t};window.$http=eg;window.$events=Qm;const mi=new tg;window.trans=mi.get.bind(mi);window.trans_choice=mi.getPlural.bind(mi);window.trans_plural=mi.parsePlural.bind(mi);Xa();})();
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
//# sourceMappingURL=app.js.map