BookStack/public/dist/app.js

71 lines
763 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 Go=Object.defineProperty,pb=Object.prototype.hasOwnProperty,Me=(n,t)=>()=>(t||(t={exports:{}},n(t.exports,t)),t.exports),Rc=n=>Go(n,"__esModule",{value:!0}),mb=(n,t)=>{Rc(n);for(var i in t)Go(n,i,{get:t[i],enumerable:!0})},gb=(n,t)=>{if(Rc(n),typeof t=="object"||typeof t=="function")for(let i in t)!pb.call(n,i)&&i!=="default"&&Go(n,i,{get:()=>t[i],enumerable:!0});return n},St=n=>n&&n.__esModule?n:gb(Go({},"default",{value:n,enumerable:!0}),n);var At=Me((Is,Ls)=>{(function(n,t){typeof Is=="object"&&typeof Ls!="undefined"?Ls.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.CodeMirror=t())})(Is,function(){"use strict";var n=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(n),u=/MSIE \d/.test(n),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),h=/Edge\/(\d+)/.exec(n),a=u||c||h,d=a&&(u?document.documentMode||6:+(h||c)[1]),f=!h&&/WebKit\//.test(n),p=f&&/Qt\/\d+\.\d+/.test(n),y=!h&&/Chrome\//.test(n),m=/Opera\//.test(n),v=/Apple Computer/.test(navigator.vendor),b=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),S=/PhantomJS/.test(n),E=v&&(/Mobile\/\w+/.test(n)||navigator.maxTouchPoints>2),x=/Android/.test(n),D=E||x||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),C=E||/Mac/.test(t),N=/\bCrOS\b/.test(n),R=/win/i.test(t),H=m&&n.match(/Version\/(\d*\.\d*)/);H&&(H=Number(H[1])),H&&H>=15&&(m=!1,f=!0);var j=C&&(p||m&&(H==null||H<12.11)),J=i||a&&d>=9;function W(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Y=function(e,r){var s=e.className,o=W(r).exec(s);if(o){var l=s.slice(o.index+o[0].length);e.className=s.slice(0,o.index)+(l?o[1]+l:"")}};function M(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function K(e,r){return M(e).appendChild(r)}function k(e,r,s,o){var l=document.createElement(e);if(s&&(l.className=s),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var g=0;g<r.length;++g)l.appendChild(r[g]);return l}function G(e,r,s,o){var l=k(e,r,s,o);return l.setAttribute("role","presentation"),l}var B;document.createRange?B=function(e,r,s,o){var l=document.createRange();return l.setEnd(o||e,s),l.setStart(e,r),l}:B=function(e,r,s){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(l){return o}return o.collapse(!0),o.moveEnd("character",s),o.moveStart("character",r),o};function re(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 I(){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 P(e,r){var s=e.className;W(r).test(s)||(e.className+=(s?" ":"")+r)}function le(e,r){for(var s=e.split(" "),o=0;o<s.length;o++)s[o]&&!W(s[o]).test(r)&&(r+=" "+s[o]);return r}var ke=function(e){e.select()};E?ke=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(ke=function(e){try{e.select()}catch(r){}});function q(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function L(e,r,s){r||(r={});for(var o in e)e.hasOwnProperty(o)&&(s!==!1||!r.hasOwnProperty(o))&&(r[o]=e[o]);return r}function xe(e,r,s,o,l){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var g=o||0,w=l||0;;){var _=e.indexOf(" ",g);if(_<0||_>=r)return w+(r-g);w+=_-g,w+=s-w%s,g=_+1}}var Se=function(){this.id=null,this.f=null,this.time=0,this.handler=q(this.onTimeout,this)};Se.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Se.prototype.set=function(e,r){this.f=r;var s=+new Date+e;(!this.id||s<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=s)};function be(e,r){for(var s=0;s<e.length;++s)if(e[s]==r)return s;return-1}var Fe=50,Xe={toString:function(){return"CodeMirror.Pass"}},nt={scroll:!1},fe={origin:"*mouse"},Ae={origin:"+move"};function Qe(e,r,s){for(var o=0,l=0;;){var g=e.indexOf(" ",o);g==-1&&(g=e.length);var w=g-o;if(g==e.length||l+w>=r)return o+Math.min(w,r-l);if(l+=g-o,l+=s-l%s,o=g+1,l>=r)return o}}var ot=[""];function ft(e){for(;ot.length<=e;)ot.push(Pe(ot)+" ");return ot[e]}function Pe(e){return e[e.length-1]}function Le(e,r){for(var s=[],o=0;o<e.length;o++)s[o]=r(e[o],o);return s}function Be(e,r,s){for(var o=0,l=s(r);o<e.length&&s(e[o])<=l;)o++;e.splice(o,0,r)}function Ke(){}function je(e,r){var s;return Object.create?s=Object.create(e):(Ke.prototype=e,s=new Ke),r&&L(r,s),s}var Ge=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ge.test(e))}function V(e,r){return r?r.source.indexOf("\\w")>-1&&Ee(e)?!0:r.test(e):Ee(e)}function he(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var ue=/[\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 rt(e){return e.charCodeAt(0)>=768&&ue.test(e)}function Ne(e,r,s){for(;(s<0?r>0:r<e.length)&&rt(e.charAt(r));)r+=s;return r}function it(e,r,s){for(var o=r>s?-1:1;;){if(r==s)return r;var l=(r+s)/2,g=o<0?Math.ceil(l):Math.floor(l);if(g==r)return e(g)?r:s;e(g)?s=g:r=g+o}}function He(e,r,s,o){if(!e)return o(r,s,"ltr",0);for(var l=!1,g=0;g<e.length;++g){var w=e[g];(w.from<s&&w.to>r||r==s&&w.to==r)&&(o(Math.max(w.from,r),Math.min(w.to,s),w.level==1?"rtl":"ltr",g),l=!0)}l||o(r,s,"ltr")}var ze=null;function tt(e,r,s){var o;ze=null;for(var l=0;l<e.length;++l){var g=e[l];if(g.from<r&&g.to>r)return l;g.to==r&&(g.from!=g.to&&s=="before"?o=l:ze=l),g.from==r&&(g.from!=g.to&&s!="before"?o=l:ze=l)}return o!=null?o:ze}var Ht=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function s(T){return T<=247?e.charAt(T):1424<=T&&T<=1524?"R":1536<=T&&T<=1785?r.charAt(T-1536):1774<=T&&T<=2220?"r":8192<=T&&T<=8203?"w":T==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,g=/[LRr]/,w=/[Lb1n]/,_=/[1n]/;function A(T,$,Q){this.level=T,this.from=$,this.to=Q}return function(T,$){var Q=$=="ltr"?"L":"R";if(T.length==0||$=="ltr"&&!o.test(T))return!1;for(var de=T.length,se=[],we=0;we<de;++we)se.push(s(T.charCodeAt(we)));for(var _e=0,Re=Q;_e<de;++_e){var qe=se[_e];qe=="m"?se[_e]=Re:Re=qe}for(var Ze=0,Ue=Q;Ze<de;++Ze){var et=se[Ze];et=="1"&&Ue=="r"?se[Ze]="n":g.test(et)&&(Ue=et,et=="r"&&(se[Ze]="R"))}for(var ct=1,ut=se[0];ct<de-1;++ct){var yt=se[ct];yt=="+"&&ut=="1"&&se[ct+1]=="1"?se[ct]="1":yt==","&&ut==se[ct+1]&&(ut=="1"||ut=="n")&&(se[ct]=ut),ut=yt}for(var Mt=0;Mt<de;++Mt){var rr=se[Mt];if(rr==",")se[Mt]="N";else if(rr=="%"){var Bt=void 0;for(Bt=Mt+1;Bt<de&&se[Bt]=="%";++Bt);for(var Tr=Mt&&se[Mt-1]=="!"||Bt<de&&se[Bt]=="1"?"1":"N",xr=Mt;xr<Bt;++xr)se[xr]=Tr;Mt=Bt-1}}for(var Kt=0,kr=Q;Kt<de;++Kt){var sr=se[Kt];kr=="L"&&sr=="1"?se[Kt]="L":g.test(sr)&&(kr=sr)}for(var Xt=0;Xt<de;++Xt)if(l.test(se[Xt])){var Vt=void 0;for(Vt=Xt+1;Vt<de&&l.test(se[Vt]);++Vt);for(var jt=(Xt?se[Xt-1]:Q)=="L",Sr=(Vt<de?se[Vt]:Q)=="L",oi=jt==Sr?jt?"L":"R":Q,xn=Xt;xn<Vt;++xn)se[xn]=oi;Xt=Vt-1}for(var cr=[],Xr,nr=0;nr<de;)if(w.test(se[nr])){var Ts=nr;for(++nr;nr<de&&w.test(se[nr]);++nr);cr.push(new A(0,Ts,nr))}else{var ln=nr,Rn=cr.length,On=$=="rtl"?1:0;for(++nr;nr<de&&se[nr]!="L";++nr);for(var mr=ln;mr<nr;)if(_.test(se[mr])){ln<mr&&(cr.splice(Rn,0,new A(1,ln,mr)),Rn+=On);var ai=mr;for(++mr;mr<nr&&_.test(se[mr]);++mr);cr.splice(Rn,0,new A(2,ai,mr)),Rn+=On,ln=mr}else++mr;ln<nr&&cr.splice(Rn,0,new A(1,ln,nr))}return $=="ltr"&&(cr[0].level==1&&(Xr=T.match(/^\s+/))&&(cr[0].from=Xr[0].length,cr.unshift(new A(0,0,Xr[0].length))),Pe(cr).level==1&&(Xr=T.match(/\s+$/))&&(Pe(cr).to-=Xr[0].length,cr.push(new A(0,de-Xr[0].length,de)))),$=="rtl"?cr.reverse():cr}}();function Et(e,r){var s=e.order;return s==null&&(s=e.order=Ht(e.text,r)),s}var Pr=[],st=function(e,r,s){if(e.addEventListener)e.addEventListener(r,s,!1);else if(e.attachEvent)e.attachEvent("on"+r,s);else{var o=e._handlers||(e._handlers={});o[r]=(o[r]||Pr).concat(s)}};function Ft(e,r){return e._handlers&&e._handlers[r]||Pr}function Je(e,r,s){if(e.removeEventListener)e.removeEventListener(r,s,!1);else if(e.detachEvent)e.detachEvent("on"+r,s);else{var o=e._handlers,l=o&&o[r];if(l){var g=be(l,s);g>-1&&(o[r]=l.slice(0,g).concat(l.slice(g+1)))}}}function ht(e,r){var s=Ft(e,r);if(!s.length)return;for(var o=Array.prototype.slice.call(arguments,2),l=0;l<s.length;++l)s[l].apply(null,o)}function wt(e,r,s){return typeof r=="string"&&(r={type:r,preventDefault:function(){this.defaultPrevented=!0}}),ht(e,s||r.type,e,r),Cr(r)||r.codemirrorIgnore}function Qt(e){var r=e._handlers&&e._handlers.cursorActivity;if(!r)return;for(var s=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),o=0;o<r.length;++o)be(s,r[o])==-1&&s.push(r[o])}function Tt(e,r){return Ft(e,r).length>0}function Ot(e){e.prototype.on=function(r,s){st(this,r,s)},e.prototype.off=function(r,s){Je(this,r,s)}}function kt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function at(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Cr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function vr(e){kt(e),at(e)}function Nt(e){return e.target||e.srcElement}function or(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),C&&e.ctrlKey&&r==1&&(r=3),r}var rn=function(){if(a&&d<9)return!1;var e=k("div");return"draggable"in e||"dragDrop"in e}(),Wt;function yr(e){if(Wt==null){var r=k("span","");K(e,k("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Wt=r.offsetWidth<=1&&r.offsetHeight>2&&!(a&&d<8))}var s=Wt?k("span",""):k("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return s.setAttribute("cm-text",""),s}var Jt;function _r(e){if(Jt!=null)return Jt;var r=K(e,document.createTextNode("AخA")),s=B(r,0,1).getBoundingClientRect(),o=B(r,1,2).getBoundingClientRect();return M(e),!s||s.left==s.right?!1:Jt=o.right-s.right<3}var oe=`
b`.split(/\n/).length!=3?function(e){for(var r=0,s=[],o=e.length;r<=o;){var l=e.indexOf(`
`,r);l==-1&&(l=e.length);var g=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),w=g.indexOf("\r");w!=-1?(s.push(g.slice(0,w)),r+=w+1):(s.push(g),r=l+1)}return s}:function(e){return e.split(/\r\n?|\n/)},ie=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(s){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Z=function(){var e=k("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ne=null;function O(e){if(ne!=null)return ne;var r=K(e,k("span","x")),s=r.getBoundingClientRect(),o=B(r,0,1).getBoundingClientRect();return ne=Math.abs(s.left-o.left)>1}var z={},te={};function ce(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),z[e]=r}function ye(e,r){te[e]=r}function me(e){if(typeof e=="string"&&te.hasOwnProperty(e))e=te[e];else if(e&&typeof e.name=="string"&&te.hasOwnProperty(e.name)){var r=te[e.name];typeof r=="string"&&(r={name:r}),e=je(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return me("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return me("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Te(e,r){r=me(r);var s=z[r.name];if(!s)return Te(e,"text/plain");var o=s(e,r);if(Oe.hasOwnProperty(r.name)){var l=Oe[r.name];for(var g in l){if(!l.hasOwnProperty(g))continue;o.hasOwnProperty(g)&&(o["_"+g]=o[g]),o[g]=l[g]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var w in r.modeProps)o[w]=r.modeProps[w];return o}var Oe={};function De(e,r){var s=Oe.hasOwnProperty(e)?Oe[e]:Oe[e]={};L(r,s)}function Ye(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var s={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),s[o]=l}return s}function xt(e,r){for(var s;e.innerMode&&!(s=e.innerMode(r),!s||s.mode==e);)r=s.state,e=s.mode;return s||{mode:e,state:r}}function gt(e,r,s){return e.startState?e.startState(r,s):!0}var U=function(e,r,s){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=s};U.prototype.eol=function(){return this.pos>=this.string.length},U.prototype.sol=function(){return this.pos==this.lineStart},U.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},U.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},U.prototype.eat=function(e){var r=this.string.charAt(this.pos),s;if(typeof e=="string"?s=r==e:s=r&&(e.test?e.test(r):e(r)),s)return++this.pos,r},U.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},U.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},U.prototype.skipToEnd=function(){this.pos=this.string.length},U.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},U.prototype.backUp=function(e){this.pos-=e},U.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=xe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},U.prototype.indentation=function(){return xe(this.string,null,this.tabSize)-(this.lineStart?xe(this.string,this.lineStart,this.tabSize):0)},U.prototype.match=function(e,r,s){if(typeof e=="string"){var o=function(w){return s?w.toLowerCase():w},l=this.string.substr(this.pos,e.length);if(o(l)==o(e))return r!==!1&&(this.pos+=e.length),!0}else{var g=this.string.slice(this.pos).match(e);return g&&g.index>0?null:(g&&r!==!1&&(this.pos+=g[0].length),g)}},U.prototype.current=function(){return this.string.slice(this.start,this.pos)},U.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},U.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},U.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ae(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 s=e;!s.lines;)for(var o=0;;++o){var l=s.children[o],g=l.chunkSize();if(r<g){s=l;break}r-=g}return s.lines[r]}function ve(e,r,s){var o=[],l=r.line;return e.iter(r.line,s.line+1,function(g){var w=g.text;l==s.line&&(w=w.slice(0,s.ch)),l==r.line&&(w=w.slice(r.ch)),o.push(w),++l}),o}function Ce(e,r,s){var o=[];return e.iter(r,s,function(l){o.push(l.text)}),o}function Ie(e,r){var s=r-e.height;if(s)for(var o=e;o;o=o.parent)o.height+=s}function We(e){if(e.parent==null)return null;for(var r=e.parent,s=be(r.lines,e),o=r.parent;o;r=o,o=o.parent)for(var l=0;!(o.children[l]==r);++l)s+=o.children[l].chunkSize();return s+r.first}function Ve(e,r){var s=e.first;e:do{for(var o=0;o<e.children.length;++o){var l=e.children[o],g=l.height;if(r<g){e=l;continue e}r-=g,s+=l.chunkSize()}return s}while(!e.lines);for(var w=0;w<e.lines.length;++w){var _=e.lines[w],A=_.height;if(r<A)break;r-=A}return s+w}function F(e,r){return r>=e.first&&r<e.first+e.size}function X(e,r){return String(e.lineNumberFormatter(r+e.firstLineNumber))}function ee(e,r,s){if(s===void 0&&(s=null),!(this instanceof ee))return new ee(e,r,s);this.line=e,this.ch=r,this.sticky=s}function pe(e,r){return e.line-r.line||e.ch-r.ch}function ge(e,r){return e.sticky==r.sticky&&pe(e,r)==0}function lt(e){return ee(e.line,e.ch)}function vt(e,r){return pe(e,r)<0?r:e}function zt(e,r){return pe(e,r)<0?e:r}function hr(e,r){return Math.max(e.first,Math.min(r,e.first+e.size-1))}function dt(e,r){if(r.line<e.first)return ee(e.first,0);var s=e.first+e.size-1;return r.line>s?ee(s,ae(e,s).text.length):ki(r,ae(e,r.line).text.length)}function ki(e,r){var s=e.ch;return s==null||s>r?ee(e.line,r):s<0?ee(e.line,0):e}function Rl(e,r){for(var s=[],o=0;o<r.length;o++)s[o]=dt(e,r[o]);return s}var vo=function(e,r){this.state=e,this.lookAhead=r},$r=function(e,r,s,o){this.state=r,this.doc=e,this.line=s,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};$r.prototype.lookAhead=function(e){var r=this.doc.getLine(this.line+e);return r!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),r},$r.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}},$r.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},$r.fromSaved=function(e,r,s){return r instanceof vo?new $r(e,Ye(e.mode,r.state),s,r.lookAhead):new $r(e,Ye(e.mode,r),s)},$r.prototype.save=function(e){var r=e!==!1?Ye(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vo(r,this.maxLookAhead):r};function Ol(e,r,s,o){var l=[e.state.modeGen],g={};ql(e,r.text,e.doc.mode,s,function(T,$){return l.push(T,$)},g,o);for(var w=s.state,_=function(T){s.baseTokens=l;var $=e.state.overlays[T],Q=1,de=0;s.state=!0,ql(e,r.text,$.mode,s,function(se,we){for(var _e=Q;de<se;){var Re=l[Q];Re>se&&l.splice(Q,1,se,l[Q+1],Re),Q+=2,de=Math.min(se,Re)}if(!we)return;if($.opaque)l.splice(_e,Q-_e,se,"overlay "+we),Q=_e+2;else for(;_e<Q;_e+=2){var qe=l[_e+1];l[_e+1]=(qe?qe+" ":"")+"overlay "+we}},g),s.state=w,s.baseTokens=null,s.baseTokenPos=1},A=0;A<e.state.overlays.length;++A)_(A);return{styles:l,classes:g.bgClass||g.textClass?g:null}}function Pl(e,r,s){if(!r.styles||r.styles[0]!=e.state.modeGen){var o=Si(e,We(r)),l=r.text.length>e.options.maxHighlightLength&&Ye(e.doc.mode,o.state),g=Ol(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=g.styles,g.classes?r.styleClasses=g.classes:r.styleClasses&&(r.styleClasses=null),s===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function Si(e,r,s){var o=e.doc,l=e.display;if(!o.mode.startState)return new $r(o,!0,r);var g=gv(e,r,s),w=g>o.first&&ae(o,g-1).stateAfter,_=w?$r.fromSaved(o,w,g):new $r(o,gt(o.mode),g);return o.iter(g,r,function(A){za(e,A.text,_);var T=_.line;A.stateAfter=T==r-1||T%5==0||T>=l.viewFrom&&T<l.viewTo?_.save():null,_.nextLine()}),s&&(o.modeFrontier=_.line),_}function za(e,r,s,o){var l=e.doc.mode,g=new U(r,e.options.tabSize,s);for(g.start=g.pos=o||0,r==""&&Nl(l,s.state);!g.eol();)Ba(l,g,s.state),g.start=g.pos}function Nl(e,r){if(e.blankLine)return e.blankLine(r);if(!e.innerMode)return;var s=xt(e,r);if(s.mode.blankLine)return s.mode.blankLine(s.state)}function Ba(e,r,s,o){for(var l=0;l<10;l++){o&&(o[0]=xt(e,s).mode);var g=e.token(r,s);if(r.pos>r.start)return g}throw new Error("Mode "+e.name+" failed to advance stream.")}var zl=function(e,r,s){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=s};function Bl(e,r,s,o){var l=e.doc,g=l.mode,w;r=dt(l,r);var _=ae(l,r.line),A=Si(e,r.line,s),T=new U(_.text,e.options.tabSize,A),$;for(o&&($=[]);(o||T.pos<r.ch)&&!T.eol();)T.start=T.pos,w=Ba(g,T,A.state),o&&$.push(new zl(T,w,Ye(l.mode,A.state)));return o?$:new zl(T,w,A.state)}function jl(e,r){if(e)for(;;){var s=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!s)break;e=e.slice(0,s.index)+e.slice(s.index+s[0].length);var o=s[1]?"bgClass":"textClass";r[o]==null?r[o]=s[2]:new RegExp("(?:^|\\s)"+s[2]+"(?:$|\\s)").test(r[o])||(r[o]+=" "+s[2])}return e}function ql(e,r,s,o,l,g,w){var _=s.flattenSpans;_==null&&(_=e.options.flattenSpans);var A=0,T=null,$=new U(r,e.options.tabSize,o),Q,de=e.options.addModeClass&&[null];for(r==""&&jl(Nl(s,o.state),g);!$.eol();){if($.pos>e.options.maxHighlightLength?(_=!1,w&&za(e,r,o,$.pos),$.pos=r.length,Q=null):Q=jl(Ba(s,$,o.state,de),g),de){var se=de[0].name;se&&(Q="m-"+(Q?se+" "+Q:se))}if(!_||T!=Q){for(;A<$.start;)A=Math.min($.start,A+5e3),l(A,T);T=Q}$.start=$.pos}for(;A<$.pos;){var we=Math.min($.pos,A+5e3);l(we,T),A=we}}function gv(e,r,s){for(var o,l,g=e.doc,w=s?-1:r-(e.doc.mode.innerMode?1e3:100),_=r;_>w;--_){if(_<=g.first)return g.first;var A=ae(g,_-1),T=A.stateAfter;if(T&&(!s||_+(T instanceof vo?T.lookAhead:0)<=g.modeFrontier))return _;var $=xe(A.text,null,e.options.tabSize);(l==null||o>$)&&(l=_-1,o=$)}return l}function vv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontier<r-10)return;for(var s=e.first,o=r-1;o>s;o--){var l=ae(e,o).stateAfter;if(l&&(!(l instanceof vo)||o+l.lookAhead<r)){s=o+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,s)}var Ul=!1,nn=!1;function yv(){Ul=!0}function bv(){nn=!0}function yo(e,r,s){this.marker=e,this.from=r,this.to=s}function Ei(e,r){if(e)for(var s=0;s<e.length;++s){var o=e[s];if(o.marker==r)return o}}function wv(e,r){for(var s,o=0;o<e.length;++o)e[o]!=r&&(s||(s=[])).push(e[o]);return s}function xv(e,r){e.markedSpans=e.markedSpans?e.markedSpans.concat([r]):[r],r.marker.attachLine(e)}function kv(e,r,s){var o;if(e)for(var l=0;l<e.length;++l){var g=e[l],w=g.marker,_=g.from==null||(w.inclusiveLeft?g.from<=r:g.from<r);if(_||g.from==r&&w.type=="bookmark"&&(!s||!g.marker.insertLeft)){var A=g.to==null||(w.inclusiveRight?g.to>=r:g.to>r);(o||(o=[])).push(new yo(w,g.from,A?null:g.to))}}return o}function Sv(e,r,s){var o;if(e)for(var l=0;l<e.length;++l){var g=e[l],w=g.marker,_=g.to==null||(w.inclusiveRight?g.to>=r:g.to>r);if(_||g.from==r&&w.type=="bookmark"&&(!s||g.marker.insertLeft)){var A=g.from==null||(w.inclusiveLeft?g.from<=r:g.from<r);(o||(o=[])).push(new yo(w,A?null:g.from-r,g.to==null?null:g.to-r))}}return o}function ja(e,r){if(r.full)return null;var s=F(e,r.from.line)&&ae(e,r.from.line).markedSpans,o=F(e,r.to.line)&&ae(e,r.to.line).markedSpans;if(!s&&!o)return null;var l=r.from.ch,g=r.to.ch,w=pe(r.from,r.to)==0,_=kv(s,l,w),A=Sv(o,g,w),T=r.text.length==1,$=Pe(r.text).length+(T?l:0);if(_)for(var Q=0;Q<_.length;++Q){var de=_[Q];if(de.to==null){var se=Ei(A,de.marker);se?T&&(de.to=se.to==null?null:se.to+$):de.to=l}}if(A)for(var we=0;we<A.length;++we){var _e=A[we];if(_e.to!=null&&(_e.to+=$),_e.from==null){var Re=Ei(_,_e.marker);Re||(_e.from=$,T&&(_||(_=[])).push(_e))}else _e.from+=$,T&&(_||(_=[])).push(_e)}_&&(_=Hl(_)),A&&A!=_&&(A=Hl(A));var qe=[_];if(!T){var Ze=r.text.length-2,Ue;if(Ze>0&&_)for(var et=0;et<_.length;++et)_[et].to==null&&(Ue||(Ue=[])).push(new yo(_[et].marker,null,null));for(var ct=0;ct<Ze;++ct)qe.push(Ue);qe.push(A)}return qe}function Hl(e){for(var r=0;r<e.length;++r){var s=e[r];s.from!=null&&s.from==s.to&&s.marker.clearWhenEmpty!==!1&&e.splice(r--,1)}return e.length?e:null}function Ev(e,r,s){var o=null;if(e.iter(r.line,s.line+1,function(se){if(se.markedSpans)for(var we=0;we<se.markedSpans.length;++we){var _e=se.markedSpans[we].marker;_e.readOnly&&(!o||be(o,_e)==-1)&&(o||(o=[])).push(_e)}}),!o)return null;for(var l=[{from:r,to:s}],g=0;g<o.length;++g)for(var w=o[g],_=w.find(0),A=0;A<l.length;++A){var T=l[A];if(pe(T.to,_.from)<0||pe(T.from,_.to)>0)continue;var $=[A,1],Q=pe(T.from,_.from),de=pe(T.to,_.to);(Q<0||!w.inclusiveLeft&&!Q)&&$.push({from:T.from,to:_.from}),(de>0||!w.inclusiveRight&&!de)&&$.push({from:_.to,to:T.to}),l.splice.apply(l,$),A+=$.length-3}return l}function Wl(e){var r=e.markedSpans;if(!r)return;for(var s=0;s<r.length;++s)r[s].marker.detachLine(e);e.markedSpans=null}function $l(e,r){if(!r)return;for(var s=0;s<r.length;++s)r[s].marker.attachLine(e);e.markedSpans=r}function bo(e){return e.inclusiveLeft?-1:0}function wo(e){return e.inclusiveRight?1:0}function qa(e,r){var s=e.lines.length-r.lines.length;if(s!=0)return s;var o=e.find(),l=r.find(),g=pe(o.from,l.from)||bo(e)-bo(r);if(g)return-g;var w=pe(o.to,l.to)||wo(e)-wo(r);return w||r.id-e.id}function Gl(e,r){var s=nn&&e.markedSpans,o;if(s)for(var l=void 0,g=0;g<s.length;++g)l=s[g],l.marker.collapsed&&(r?l.from:l.to)==null&&(!o||qa(o,l.marker)<0)&&(o=l.marker);return o}function Kl(e){return Gl(e,!0)}function xo(e){return Gl(e,!1)}function Cv(e,r){var s=nn&&e.markedSpans,o;if(s)for(var l=0;l<s.length;++l){var g=s[l];g.marker.collapsed&&(g.from==null||g.from<r)&&(g.to==null||g.to>r)&&(!o||qa(o,g.marker)<0)&&(o=g.marker)}return o}function Vl(e,r,s,o,l){var g=ae(e,r),w=nn&&g.markedSpans;if(w)for(var _=0;_<w.length;++_){var A=w[_];if(!A.marker.collapsed)continue;var T=A.marker.find(0),$=pe(T.from,s)||bo(A.marker)-bo(l),Q=pe(T.to,o)||wo(A.marker)-wo(l);if($>=0&&Q<=0||$<=0&&Q>=0)continue;if($<=0&&(A.marker.inclusiveRight&&l.inclusiveLeft?pe(T.to,s)>=0:pe(T.to,s)>0)||$>=0&&(A.marker.inclusiveRight&&l.inclusiveLeft?pe(T.from,o)<=0:pe(T.from,o)<0))return!0}}function Gr(e){for(var r;r=Kl(e);)e=r.find(-1,!0).line;return e}function _v(e){for(var r;r=xo(e);)e=r.find(1,!0).line;return e}function Av(e){for(var r,s;r=xo(e);)e=r.find(1,!0).line,(s||(s=[])).push(e);return s}function Ua(e,r){var s=ae(e,r),o=Gr(s);return s==o?r:We(o)}function Xl(e,r){if(r>e.lastLine())return r;var s=ae(e,r),o;if(!hn(e,s))return r;for(;o=xo(s);)s=o.find(1,!0).line;return We(s)+1}function hn(e,r){var s=nn&&r.markedSpans;if(s)for(var o=void 0,l=0;l<s.length;++l){if(o=s[l],!o.marker.collapsed)continue;if(o.from==null)return!0;if(o.marker.widgetNode)continue;if(o.from==0&&o.marker.inclusiveLeft&&Ha(e,r,o))return!0}}function Ha(e,r,s){if(s.to==null){var o=s.marker.find(1,!0);return Ha(e,o.line,Ei(o.line.markedSpans,s.marker))}if(s.marker.inclusiveRight&&s.to==r.text.length)return!0;for(var l=void 0,g=0;g<r.markedSpans.length;++g)if(l=r.markedSpans[g],l.marker.collapsed&&!l.marker.widgetNode&&l.from==s.to&&(l.to==null||l.to!=s.from)&&(l.marker.inclusiveLeft||s.marker.inclusiveRight)&&Ha(e,r,l))return!0}function on(e){e=Gr(e);for(var r=0,s=e.parent,o=0;o<s.lines.length;++o){var l=s.lines[o];if(l==e)break;r+=l.height}for(var g=s.parent;g;s=g,g=s.parent)for(var w=0;w<g.children.length;++w){var _=g.children[w];if(_==s)break;r+=_.height}return r}function ko(e){if(e.height==0)return 0;for(var r=e.text.length,s,o=e;s=Kl(o);){var l=s.find(0,!0);o=l.from.line,r+=l.from.ch-l.to.ch}for(o=e;s=xo(o);){var g=s.find(0,!0);r-=o.text.length-g.from.ch,o=g.to.line,r+=o.text.length-g.to.ch}return r}function Wa(e){var r=e.display,s=e.doc;r.maxLine=ae(s,s.first),r.maxLineLength=ko(r.maxLine),r.maxLineChanged=!0,s.iter(function(o){var l=ko(o);l>r.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var Un=function(e,r,s){this.text=e,$l(this,r),this.height=s?s(this):1};Un.prototype.lineNo=function(){return We(this)},Ot(Un);function Tv(e,r,s,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Wl(e),$l(e,s);var l=o?o(e):1;l!=e.height&&Ie(e,l)}function Dv(e){e.parent=null,Wl(e)}var Iv={},Lv={};function Yl(e,r){if(!e||/^\s*$/.test(e))return null;var s=r.addModeClass?Lv:Iv;return s[e]||(s[e]=e.replace(/\S+/g,"cm-$&"))}function Zl(e,r){var s=G("span",null,null,f?"padding-right: .1px":null),o={pre:G("pre",[s],"CodeMirror-line"),content:s,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 g=l?r.rest[l-1]:r.line,w=void 0;o.pos=0,o.addToken=Mv,_r(e.display.measure)&&(w=Et(g,e.doc.direction))&&(o.addToken=Ov(o.addToken,w)),o.map=[];var _=r!=e.display.externalMeasured&&We(g);Pv(g,o,Pl(e,g,_)),g.styleClasses&&(g.styleClasses.bgClass&&(o.bgClass=le(g.styleClasses.bgClass,o.bgClass||"")),g.styleClasses.textClass&&(o.textClass=le(g.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(yr(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(f){var A=o.content.lastChild;(/\bcm-tab\b/.test(A.className)||A.querySelector&&A.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return ht(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=le(o.pre.className,o.textClass||"")),o}function Fv(e){var r=k("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function Mv(e,r,s,o,l,g,w){if(!r)return;var _=e.splitSpaces?Rv(r,e.trailingSpace):r,A=e.cm.state.specialChars,T=!1,$;if(!A.test(r))e.col+=r.length,$=document.createTextNode(_),e.map.push(e.pos,e.pos+r.length,$),a&&d<9&&(T=!0),e.pos+=r.length;else{$=document.createDocumentFragment();for(var Q=0;;){A.lastIndex=Q;var de=A.exec(r),se=de?de.index-Q:r.length-Q;if(se){var we=document.createTextNode(_.slice(Q,Q+se));a&&d<9?$.appendChild(k("span",[we])):$.appendChild(we),e.map.push(e.pos,e.pos+se,we),e.col+=se,e.pos+=se}if(!de)break;Q+=se+1;var _e=void 0;if(de[0]==" "){var Re=e.cm.options.tabSize,qe=Re-e.col%Re;_e=$.appendChild(k("span",ft(qe),"cm-tab")),_e.setAttribute("role","presentation"),_e.setAttribute("cm-text"," "),e.col+=qe}else de[0]=="\r"||de[0]==`
`?(_e=$.appendChild(k("span",de[0]=="\r"?"␍":"␤","cm-invalidchar")),_e.setAttribute("cm-text",de[0]),e.col+=1):(_e=e.cm.options.specialCharPlaceholder(de[0]),_e.setAttribute("cm-text",de[0]),a&&d<9?$.appendChild(k("span",[_e])):$.appendChild(_e),e.col+=1);e.map.push(e.pos,e.pos+1,_e),e.pos++}}if(e.trailingSpace=_.charCodeAt(r.length-1)==32,s||o||l||T||g||w){var Ze=s||"";o&&(Ze+=o),l&&(Ze+=l);var Ue=k("span",[$],Ze,g);if(w)for(var et in w)w.hasOwnProperty(et)&&et!="style"&&et!="class"&&Ue.setAttribute(et,w[et]);return e.content.appendChild(Ue)}e.content.appendChild($)}function Rv(e,r){if(e.length>1&&!/ /.test(e))return e;for(var s=r,o="",l=0;l<e.length;l++){var g=e.charAt(l);g==" "&&s&&(l==e.length-1||e.charCodeAt(l+1)==32)&&(g=" "),o+=g,s=g==" "}return o}function Ov(e,r){return function(s,o,l,g,w,_,A){l=l?l+" cm-force-border":"cm-force-border";for(var T=s.pos,$=T+o.length;;){for(var Q=void 0,de=0;de<r.length&&!(Q=r[de],Q.to>T&&Q.from<=T);de++);if(Q.to>=$)return e(s,o,l,g,w,_,A);e(s,o.slice(0,Q.to-T),l,g,null,_,A),g=null,o=o.slice(Q.to-T),T=Q.to}}}function Ql(e,r,s,o){var l=!o&&s.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",s.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function Pv(e,r,s){var o=e.markedSpans,l=e.text,g=0;if(!o){for(var w=1;w<s.length;w+=2)r.addToken(r,l.slice(g,g=s[w]),Yl(s[w+1],r.cm.options));return}for(var _=l.length,A=0,T=1,$="",Q,de,se=0,we,_e,Re,qe,Ze;;){if(se==A){we=_e=Re=de="",Ze=null,qe=null,se=Infinity;for(var Ue=[],et=void 0,ct=0;ct<o.length;++ct){var ut=o[ct],yt=ut.marker;if(yt.type=="bookmark"&&ut.from==A&&yt.widgetNode)Ue.push(yt);else if(ut.from<=A&&(ut.to==null||ut.to>A||yt.collapsed&&ut.to==A&&ut.from==A)){if(ut.to!=null&&ut.to!=A&&se>ut.to&&(se=ut.to,_e=""),yt.className&&(we+=" "+yt.className),yt.css&&(de=(de?de+";":"")+yt.css),yt.startStyle&&ut.from==A&&(Re+=" "+yt.startStyle),yt.endStyle&&ut.to==se&&(et||(et=[])).push(yt.endStyle,ut.to),yt.title&&((Ze||(Ze={})).title=yt.title),yt.attributes)for(var Mt in yt.attributes)(Ze||(Ze={}))[Mt]=yt.attributes[Mt];yt.collapsed&&(!qe||qa(qe.marker,yt)<0)&&(qe=ut)}else ut.from>A&&se>ut.from&&(se=ut.from)}if(et)for(var rr=0;rr<et.length;rr+=2)et[rr+1]==se&&(_e+=" "+et[rr]);if(!qe||qe.from==A)for(var Bt=0;Bt<Ue.length;++Bt)Ql(r,0,Ue[Bt]);if(qe&&(qe.from||0)==A){if(Ql(r,(qe.to==null?_+1:qe.to)-A,qe.marker,qe.from==null),qe.to==null)return;qe.to==A&&(qe=!1)}}if(A>=_)break;for(var Tr=Math.min(_,se);;){if($){var xr=A+$.length;if(!qe){var Kt=xr>Tr?$.slice(0,Tr-A):$;r.addToken(r,Kt,Q?Q+we:we,Re,A+Kt.length==se?_e:"",de,Ze)}if(xr>=Tr){$=$.slice(Tr-A),A=Tr;break}A=xr,Re=""}$=l.slice(g,g=s[T++]),Q=Yl(s[T++],r.cm.options)}}}function Jl(e,r,s){this.line=r,this.rest=Av(r),this.size=this.rest?We(Pe(this.rest))-s+1:1,this.node=this.text=null,this.hidden=hn(e,r)}function So(e,r,s){for(var o=[],l,g=r;g<s;g=l){var w=new Jl(e.doc,ae(e.doc,g),g);l=g+w.size,o.push(w)}return o}var Hn=null;function Nv(e){Hn?Hn.ops.push(e):e.ownsGroup=Hn={ops:[e],delayedCallbacks:[]}}function zv(e){var r=e.delayedCallbacks,s=0;do{for(;s<r.length;s++)r[s].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(s<r.length)}function Bv(e,r){var s=e.ownsGroup;if(!s)return;try{zv(s)}finally{Hn=null,r(s)}}var Ci=null;function ar(e,r){var s=Ft(e,r);if(!s.length)return;var o=Array.prototype.slice.call(arguments,2),l;Hn?l=Hn.delayedCallbacks:Ci?l=Ci:(l=Ci=[],setTimeout(jv,0));for(var g=function(_){l.push(function(){return s[_].apply(null,o)})},w=0;w<s.length;++w)g(w)}function jv(){var e=Ci;Ci=null;for(var r=0;r<e.length;++r)e[r]()}function eu(e,r,s,o){for(var l=0;l<r.changes.length;l++){var g=r.changes[l];g=="text"?Uv(e,r):g=="gutter"?ru(e,r,s,o):g=="class"?$a(e,r):g=="widget"&&Hv(e,r,o)}r.changes=null}function _i(e){return e.node==e.text&&(e.node=k("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&d<8&&(e.node.style.zIndex=2)),e.node}function qv(e,r){var s=r.bgClass?r.bgClass+" "+(r.line.bgClass||""):r.line.bgClass;if(s&&(s+=" CodeMirror-linebackground"),r.background)s?r.background.className=s:(r.background.parentNode.removeChild(r.background),r.background=null);else if(s){var o=_i(r);r.background=o.insertBefore(k("div",null,s),o.firstChild),e.display.input.setUneditable(r.background)}}function tu(e,r){var s=e.display.externalMeasured;return s&&s.line==r.line?(e.display.externalMeasured=null,r.measure=s.measure,s.built):Zl(e,r)}function Uv(e,r){var s=r.text.className,o=tu(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,$a(e,r)):s&&(r.text.className=s)}function $a(e,r){qv(e,r),r.line.wrapClass?_i(r).className=r.line.wrapClass:r.node!=r.text&&(r.node.className="");var s=r.textClass?r.textClass+" "+(r.line.textClass||""):r.line.textClass;r.text.className=s||""}function ru(e,r,s,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=_i(r);r.gutterBackground=k("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 g=r.line.gutterMarkers;if(e.options.lineNumbers||g){var w=_i(r),_=r.gutter=k("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(e.display.input.setUneditable(_),w.insertBefore(_,r.text),r.line.gutterClass&&(_.className+=" "+r.line.gutterClass),e.options.lineNumbers&&(!g||!g["CodeMirror-linenumbers"])&&(r.lineNumber=_.appendChild(k("div",X(e.options,s),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),g)for(var A=0;A<e.display.gutterSpecs.length;++A){var T=e.display.gutterSpecs[A].className,$=g.hasOwnProperty(T)&&g[T];$&&_.appendChild(k("div",[$],"CodeMirror-gutter-elt","left: "+o.gutterLeft[T]+"px; width: "+o.gutterWidth[T]+"px"))}}}function Hv(e,r,s){r.alignable&&(r.alignable=null);for(var o=W("CodeMirror-linewidget"),l=r.node.firstChild,g=void 0;l;l=g)g=l.nextSibling,o.test(l.className)&&r.node.removeChild(l);nu(e,r,s)}function Wv(e,r,s,o){var l=tu(e,r);return r.text=r.node=l.pre,l.bgClass&&(r.bgClass=l.bgClass),l.textClass&&(r.textClass=l.textClass),$a(e,r),ru(e,r,s,o),nu(e,r,o),r.node}function nu(e,r,s){if(iu(e,r.line,r,s,!0),r.rest)for(var o=0;o<r.rest.length;o++)iu(e,r.rest[o],r,s,!1)}function iu(e,r,s,o,l){if(!r.widgets)return;for(var g=_i(s),w=0,_=r.widgets;w<_.length;++w){var A=_[w],T=k("div",[A.node],"CodeMirror-linewidget"+(A.className?" "+A.className:""));A.handleMouseEvents||T.setAttribute("cm-ignore-events","true"),$v(A,T,s,o),e.display.input.setUneditable(T),l&&A.above?g.insertBefore(T,s.gutter||s.text):g.appendChild(T),ar(A,"redraw")}}function $v(e,r,s,o){if(e.noHScroll){(s.alignable||(s.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 Ai(e){if(e.height!=null)return e.height;var r=e.doc.cm;if(!r)return 0;if(!re(document.body,e.node)){var s="position: relative;";e.coverGutter&&(s+="margin-left: -"+r.display.gutters.offsetWidth+"px;"),e.noHScroll&&(s+="width: "+r.display.wrapper.clientWidth+"px;"),K(r.display.measure,k("div",[e.node],null,s))}return e.height=e.node.parentNode.offsetHeight}function an(e,r){for(var s=Nt(r);s!=e.wrapper;s=s.parentNode)if(!s||s.nodeType==1&&s.getAttribute("cm-ignore-events")=="true"||s.parentNode==e.sizer&&s!=e.mover)return!0}function Eo(e){return e.lineSpace.offsetTop}function Ga(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function ou(e){if(e.cachedPaddingH)return e.cachedPaddingH;var r=K(e.measure,k("pre","x","CodeMirror-line-like")),s=window.getComputedStyle?window.getComputedStyle(r):r.currentStyle,o={left:parseInt(s.paddingLeft),right:parseInt(s.paddingRight)};return!isNaN(o.left)&&!isNaN(o.right)&&(e.cachedPaddingH=o),o}function Kr(e){return Fe-e.display.nativeBarWidth}function _n(e){return e.display.scroller.clientWidth-Kr(e)-e.display.barWidth}function Ka(e){return e.display.scroller.clientHeight-Kr(e)-e.display.barHeight}function Gv(e,r,s){var o=e.options.lineWrapping,l=o&&_n(e);if(!r.measure.heights||o&&r.measure.width!=l){var g=r.measure.heights=[];if(o){r.measure.width=l;for(var w=r.text.firstChild.getClientRects(),_=0;_<w.length-1;_++){var A=w[_],T=w[_+1];Math.abs(A.bottom-T.bottom)>2&&g.push((A.bottom+T.top)/2-s.top)}}g.push(s.bottom-s.top)}}function au(e,r,s){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(We(e.rest[l])>s)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}function Kv(e,r){r=Gr(r);var s=We(r),o=e.display.externalMeasured=new Jl(e.doc,r,s);o.lineN=s;var l=o.built=Zl(e,o);return o.text=l.pre,K(e.display.lineMeasure,l.pre),o}function su(e,r,s,o){return Vr(e,Wn(e,r),s,o)}function Va(e,r){if(r>=e.display.viewFrom&&r<e.display.viewTo)return e.display.view[Dn(e,r)];var s=e.display.externalMeasured;if(s&&r>=s.lineN&&r<s.lineN+s.size)return s}function Wn(e,r){var s=We(r),o=Va(e,s);o&&!o.text?o=null:o&&o.changes&&(eu(e,o,s,es(e)),e.curOp.forceUpdate=!0),o||(o=Kv(e,r));var l=au(o,r,s);return{line:r,view:o,rect:null,map:l.map,cache:l.cache,before:l.before,hasHeights:!1}}function Vr(e,r,s,o,l){r.before&&(s=-1);var g=s+(o||""),w;return r.cache.hasOwnProperty(g)?w=r.cache[g]:(r.rect||(r.rect=r.view.text.getBoundingClientRect()),r.hasHeights||(Gv(e,r.view,r.rect),r.hasHeights=!0),w=Xv(e,r,s,o),w.bogus||(r.cache[g]=w)),{left:w.left,right:w.right,top:l?w.rtop:w.top,bottom:l?w.rbottom:w.bottom}}var lu={left:0,right:0,top:0,bottom:0};function uu(e,r,s){for(var o,l,g,w,_,A,T=0;T<e.length;T+=3)if(_=e[T],A=e[T+1],r<_?(l=0,g=1,w="left"):r<A?(l=r-_,g=l+1):(T==e.length-3||r==A&&e[T+3]>r)&&(g=A-_,l=g-1,r>=A&&(w="right")),l!=null){if(o=e[T+2],_==A&&s==(o.insertLeft?"left":"right")&&(w=s),s=="left"&&l==0)for(;T&&e[T-2]==e[T-3]&&e[T-1].insertLeft;)o=e[(T-=3)+2],w="left";if(s=="right"&&l==A-_)for(;T<e.length-3&&e[T+3]==e[T+4]&&!e[T+5].insertLeft;)o=e[(T+=3)+2],w="right";break}return{node:o,start:l,end:g,collapse:w,coverStart:_,coverEnd:A}}function Vv(e,r){var s=lu;if(r=="left")for(var o=0;o<e.length&&!((s=e[o]).left!=s.right);o++);else for(var l=e.length-1;l>=0&&!((s=e[l]).left!=s.right);l--);return s}function Xv(e,r,s,o){var l=uu(r.map,s,o),g=l.node,w=l.start,_=l.end,A=l.collapse,T;if(g.nodeType==3){for(var $=0;$<4;$++){for(;w&&rt(r.line.text.charAt(l.coverStart+w));)--w;for(;l.coverStart+_<l.coverEnd&&rt(r.line.text.charAt(l.coverStart+_));)++_;if(a&&d<9&&w==0&&_==l.coverEnd-l.coverStart?T=g.parentNode.getBoundingClientRect():T=Vv(B(g,w,_).getClientRects(),o),T.left||T.right||w==0)break;_=w,w=w-1,A="right"}a&&d<11&&(T=Yv(e.display.measure,T))}else{w>0&&(A=o="right");var Q;e.options.lineWrapping&&(Q=g.getClientRects()).length>1?T=Q[o=="right"?Q.length-1:0]:T=g.getBoundingClientRect()}if(a&&d<9&&!w&&(!T||!T.left&&!T.right)){var de=g.parentNode.getClientRects()[0];de?T={left:de.left,right:de.left+Gn(e.display),top:de.top,bottom:de.bottom}:T=lu}for(var se=T.top-r.rect.top,we=T.bottom-r.rect.top,_e=(se+we)/2,Re=r.view.measure.heights,qe=0;qe<Re.length-1&&!(_e<Re[qe]);qe++);var Ze=qe?Re[qe-1]:0,Ue=Re[qe],et={left:(A=="right"?T.right:T.left)-r.rect.left,right:(A=="left"?T.left:T.right)-r.rect.left,top:Ze,bottom:Ue};return!T.left&&!T.right&&(et.bogus=!0),e.options.singleCursorHeightPerLine||(et.rtop=se,et.rbottom=we),et}function Yv(e,r){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!O(e))return r;var s=screen.logicalXDPI/screen.deviceXDPI,o=screen.logicalYDPI/screen.deviceYDPI;return{left:r.left*s,right:r.right*s,top:r.top*o,bottom:r.bottom*o}}function cu(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 du(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)cu(e.display.view[r])}function Ti(e){du(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fu(){return y&&x?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hu(){return y&&x?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Xa(e){var r=0;if(e.widgets)for(var s=0;s<e.widgets.length;++s)e.widgets[s].above&&(r+=Ai(e.widgets[s]));return r}function Co(e,r,s,o,l){if(!l){var g=Xa(r);s.top+=g,s.bottom+=g}if(o=="line")return s;o||(o="local");var w=on(r);if(o=="local"?w+=Eo(e.display):w-=e.display.viewOffset,o=="page"||o=="window"){var _=e.display.lineSpace.getBoundingClientRect();w+=_.top+(o=="window"?0:hu());var A=_.left+(o=="window"?0:fu());s.left+=A,s.right+=A}return s.top+=w,s.bottom+=w,s}function pu(e,r,s){if(s=="div")return r;var o=r.left,l=r.top;if(s=="page")o-=fu(),l-=hu();else if(s=="local"||!s){var g=e.display.sizer.getBoundingClientRect();o+=g.left,l+=g.top}var w=e.display.lineSpace.getBoundingClientRect();return{left:o-w.left,top:l-w.top}}function Ya(e,r,s,o,l){return o||(o=ae(e.doc,r.line)),Co(e,o,su(e,o,r.ch,l),s)}function jr(e,r,s,o,l,g){o=o||ae(e.doc,r.line),l||(l=Wn(e,o));function w(we,_e){var Re=Vr(e,l,we,_e?"right":"left",g);return _e?Re.left=Re.right:Re.right=Re.left,Co(e,o,Re,s)}var _=Et(o,e.doc.direction),A=r.ch,T=r.sticky;if(A>=o.text.length?(A=o.text.length,T="before"):A<=0&&(A=0,T="after"),!_)return w(T=="before"?A-1:A,T=="before");function $(we,_e,Re){var qe=_[_e],Ze=qe.level==1;return w(Re?we-1:we,Ze!=Re)}var Q=tt(_,A,T),de=ze,se=$(A,Q,T=="before");return de!=null&&(se.other=$(A,de,T!="before")),se}function mu(e,r){var s=0;r=dt(e.doc,r),e.options.lineWrapping||(s=Gn(e.display)*r.ch);var o=ae(e.doc,r.line),l=on(o)+Eo(e.display);return{left:s,right:s,top:l,bottom:l+o.height}}function Za(e,r,s,o,l){var g=ee(e,r,s);return g.xRel=l,o&&(g.outside=o),g}function Qa(e,r,s){var o=e.doc;if(s+=e.display.viewOffset,s<0)return Za(o.first,0,null,-1,-1);var l=Ve(o,s),g=o.first+o.size-1;if(l>g)return Za(o.first+o.size-1,ae(o,g).text.length,null,1,1);r<0&&(r=0);for(var w=ae(o,l);;){var _=Zv(e,w,l,r,s),A=Cv(w,_.ch+(_.xRel>0||_.outside>0?1:0));if(!A)return _;var T=A.find(1);if(T.line==l)return T;w=ae(o,l=T.line)}}function gu(e,r,s,o){o-=Xa(r);var l=r.text.length,g=it(function(w){return Vr(e,s,w-1).bottom<=o},l,0);return l=it(function(w){return Vr(e,s,w).top>o},g,l),{begin:g,end:l}}function vu(e,r,s,o){s||(s=Wn(e,r));var l=Co(e,r,Vr(e,s,o),"line").top;return gu(e,r,s,l)}function Ja(e,r,s,o){return e.bottom<=s?!1:e.top>s?!0:(o?e.left:e.right)>r}function Zv(e,r,s,o,l){l-=on(r);var g=Wn(e,r),w=Xa(r),_=0,A=r.text.length,T=!0,$=Et(r,e.doc.direction);if($){var Q=(e.options.lineWrapping?Jv:Qv)(e,r,s,g,$,o,l);T=Q.level!=1,_=T?Q.from:Q.to-1,A=T?Q.to:Q.from-1}var de=null,se=null,we=it(function(ct){var ut=Vr(e,g,ct);return ut.top+=w,ut.bottom+=w,Ja(ut,o,l,!1)?(ut.top<=l&&ut.left<=o&&(de=ct,se=ut),!0):!1},_,A),_e,Re,qe=!1;if(se){var Ze=o-se.left<se.right-o,Ue=Ze==T;we=de+(Ue?0:1),Re=Ue?"after":"before",_e=Ze?se.left:se.right}else{!T&&(we==A||we==_)&&we++,Re=we==0?"after":we==r.text.length?"before":Vr(e,g,we-(T?1:0)).bottom+w<=l==T?"after":"before";var et=jr(e,ee(s,we,Re),"line",r,g);_e=et.left,qe=l<et.top?-1:l>=et.bottom?1:0}return we=Ne(r.text,we,1),Za(s,we,Re,qe,o-_e)}function Qv(e,r,s,o,l,g,w){var _=it(function(Q){var de=l[Q],se=de.level!=1;return Ja(jr(e,ee(s,se?de.to:de.from,se?"before":"after"),"line",r,o),g,w,!0)},0,l.length-1),A=l[_];if(_>0){var T=A.level!=1,$=jr(e,ee(s,T?A.from:A.to,T?"after":"before"),"line",r,o);Ja($,g,w,!0)&&$.top>w&&(A=l[_-1])}return A}function Jv(e,r,s,o,l,g,w){var _=gu(e,r,o,w),A=_.begin,T=_.end;/\s/.test(r.text.charAt(T-1))&&T--;for(var $=null,Q=null,de=0;de<l.length;de++){var se=l[de];if(se.from>=T||se.to<=A)continue;var we=se.level!=1,_e=Vr(e,o,we?Math.min(T,se.to)-1:Math.max(A,se.from)).right,Re=_e<g?g-_e+1e9:_e-g;(!$||Q>Re)&&($=se,Q=Re)}return $||($=l[l.length-1]),$.from<A&&($={from:A,to:$.to,level:$.level}),$.to>T&&($={from:$.from,to:T,level:$.level}),$}var An;function $n(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(An==null){An=k("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)An.appendChild(document.createTextNode("x")),An.appendChild(k("br"));An.appendChild(document.createTextNode("x"))}K(e.measure,An);var s=An.offsetHeight/50;return s>3&&(e.cachedTextHeight=s),M(e.measure),s||1}function Gn(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=k("span","xxxxxxxxxx"),s=k("pre",[r],"CodeMirror-line-like");K(e.measure,s);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function es(e){for(var r=e.display,s={},o={},l=r.gutters.clientLeft,g=r.gutters.firstChild,w=0;g;g=g.nextSibling,++w){var _=e.display.gutterSpecs[w].className;s[_]=g.offsetLeft+g.clientLeft+l,o[_]=g.clientWidth}return{fixedPos:ts(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:s,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function ts(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function yu(e){var r=$n(e.display),s=e.options.lineWrapping,o=s&&Math.max(5,e.display.scroller.clientWidth/Gn(e.display)-3);return function(l){if(hn(e.doc,l))return 0;var g=0;if(l.widgets)for(var w=0;w<l.widgets.length;w++)l.widgets[w].height&&(g+=l.widgets[w].height);return s?g+(Math.ceil(l.text.length/o)||1)*r:g+r}}function rs(e){var r=e.doc,s=yu(e);r.iter(function(o){var l=s(o);l!=o.height&&Ie(o,l)})}function Tn(e,r,s,o){var l=e.display;if(!s&&Nt(r).getAttribute("cm-not-content")=="true")return null;var g,w,_=l.lineSpace.getBoundingClientRect();try{g=r.clientX-_.left,w=r.clientY-_.top}catch(Q){return null}var A=Qa(e,g,w),T;if(o&&A.xRel>0&&(T=ae(e.doc,A.line).text).length==A.ch){var $=xe(T,T.length,e.options.tabSize)-T.length;A=ee(A.line,Math.max(0,Math.round((g-ou(e.display).left)/Gn(e.display))-$))}return A}function Dn(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var s=e.display.view,o=0;o<s.length;o++)if(r-=s[o].size,r<0)return o}function br(e,r,s,o){r==null&&(r=e.doc.first),s==null&&(s=e.doc.first+e.doc.size),o||(o=0);var l=e.display;if(o&&s<l.viewTo&&(l.updateLineNumbers==null||l.updateLineNumbers>r)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)nn&&Ua(e.doc,r)<l.viewTo&&mn(e);else if(s<=l.viewFrom)nn&&Xl(e.doc,s+o)>l.viewFrom?mn(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&s>=l.viewTo)mn(e);else if(r<=l.viewFrom){var g=_o(e,s,s+o,1);g?(l.view=l.view.slice(g.index),l.viewFrom=g.lineN,l.viewTo+=o):mn(e)}else if(s>=l.viewTo){var w=_o(e,r,r,-1);w?(l.view=l.view.slice(0,w.index),l.viewTo=w.lineN):mn(e)}else{var _=_o(e,r,r,-1),A=_o(e,s,s+o,1);_&&A?(l.view=l.view.slice(0,_.index).concat(So(e,_.lineN,A.lineN)).concat(l.view.slice(A.index)),l.viewTo+=o):mn(e)}var T=l.externalMeasured;T&&(s<T.lineN?T.lineN+=o:r<T.lineN+T.size&&(l.externalMeasured=null))}function pn(e,r,s){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 g=o.view[Dn(e,r)];if(g.node==null)return;var w=g.changes||(g.changes=[]);be(w,s)==-1&&w.push(s)}function mn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _o(e,r,s,o){var l=Dn(e,r),g,w=e.display.view;if(!nn||s==e.doc.first+e.doc.size)return{index:l,lineN:s};for(var _=e.display.viewFrom,A=0;A<l;A++)_+=w[A].size;if(_!=r){if(o>0){if(l==w.length-1)return null;g=_+w[l].size-r,l++}else g=_-r;r+=g,s+=g}for(;Ua(e.doc,s)!=s;){if(l==(o<0?0:w.length-1))return null;s+=o*w[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:s}}function ey(e,r,s){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||s<=o.viewFrom?(o.view=So(e,r,s),o.viewFrom=r):(o.viewFrom>r?o.view=So(e,r,o.viewFrom).concat(o.view):o.viewFrom<r&&(o.view=o.view.slice(Dn(e,r))),o.viewFrom=r,o.viewTo<s?o.view=o.view.concat(So(e,o.viewTo,s)):o.viewTo>s&&(o.view=o.view.slice(0,Dn(e,s)))),o.viewTo=s}function bu(e){for(var r=e.display.view,s=0,o=0;o<r.length;o++){var l=r[o];!l.hidden&&(!l.node||l.changes)&&++s}return s}function Di(e){e.display.input.showSelection(e.display.input.prepareSelection())}function wu(e,r){r===void 0&&(r=!0);for(var s=e.doc,o={},l=o.cursors=document.createDocumentFragment(),g=o.selection=document.createDocumentFragment(),w=0;w<s.sel.ranges.length;w++){if(!r&&w==s.sel.primIndex)continue;var _=s.sel.ranges[w];if(_.from().line>=e.display.viewTo||_.to().line<e.display.viewFrom)continue;var A=_.empty();(A||e.options.showCursorWhenSelecting)&&xu(e,_.head,l),A||ty(e,_,g)}return o}function xu(e,r,s){var o=jr(e,r,"div",null,null,!e.options.singleCursorHeightPerLine),l=s.appendChild(k("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 g=s.appendChild(k("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));g.style.display="",g.style.left=o.other.left+"px",g.style.top=o.other.top+"px",g.style.height=(o.other.bottom-o.other.top)*.85+"px"}}function Ao(e,r){return e.top-r.top||e.left-r.left}function ty(e,r,s){var o=e.display,l=e.doc,g=document.createDocumentFragment(),w=ou(e.display),_=w.left,A=Math.max(o.sizerWidth,_n(e)-o.sizer.offsetLeft)-w.right,T=l.direction=="ltr";function $(Ue,et,ct,ut){et<0&&(et=0),et=Math.round(et),ut=Math.round(ut),g.appendChild(k("div",null,"CodeMirror-selected","position: absolute; left: "+Ue+`px;
top: `+et+"px; width: "+(ct==null?A-Ue:ct)+`px;
height: `+(ut-et)+"px"))}function Q(Ue,et,ct){var ut=ae(l,Ue),yt=ut.text.length,Mt,rr;function Bt(Kt,kr){return Ya(e,ee(Ue,Kt),"div",ut,kr)}function Tr(Kt,kr,sr){var Xt=vu(e,ut,null,Kt),Vt=kr=="ltr"==(sr=="after")?"left":"right",jt=sr=="after"?Xt.begin:Xt.end-(/\s/.test(ut.text.charAt(Xt.end-1))?2:1);return Bt(jt,Vt)[Vt]}var xr=Et(ut,l.direction);return He(xr,et||0,ct==null?yt:ct,function(Kt,kr,sr,Xt){var Vt=sr=="ltr",jt=Bt(Kt,Vt?"left":"right"),Sr=Bt(kr-1,Vt?"right":"left"),oi=et==null&&Kt==0,xn=ct==null&&kr==yt,cr=Xt==0,Xr=!xr||Xt==xr.length-1;if(Sr.top-jt.top<=3){var nr=(T?oi:xn)&&cr,Ts=(T?xn:oi)&&Xr,ln=nr?_:(Vt?jt:Sr).left,Rn=Ts?A:(Vt?Sr:jt).right;$(ln,jt.top,Rn-ln,jt.bottom)}else{var On,mr,ai,Ds;Vt?(On=T&&oi&&cr?_:jt.left,mr=T?A:Tr(Kt,sr,"before"),ai=T?_:Tr(kr,sr,"after"),Ds=T&&xn&&Xr?A:Sr.right):(On=T?Tr(Kt,sr,"before"):_,mr=!T&&oi&&cr?A:jt.right,ai=!T&&xn&&Xr?_:Sr.left,Ds=T?Tr(kr,sr,"after"):A),$(On,jt.top,mr-On,jt.bottom),jt.bottom<Sr.top&&$(_,jt.bottom,null,Sr.top),$(ai,Sr.top,Ds-ai,Sr.bottom)}(!Mt||Ao(jt,Mt)<0)&&(Mt=jt),Ao(Sr,Mt)<0&&(Mt=Sr),(!rr||Ao(jt,rr)<0)&&(rr=jt),Ao(Sr,rr)<0&&(rr=Sr)}),{start:Mt,end:rr}}var de=r.from(),se=r.to();if(de.line==se.line)Q(de.line,de.ch,se.ch);else{var we=ae(l,de.line),_e=ae(l,se.line),Re=Gr(we)==Gr(_e),qe=Q(de.line,de.ch,Re?we.text.length+1:null).end,Ze=Q(se.line,Re?0:null,se.ch).start;Re&&(qe.top<Ze.top-2?($(qe.right,qe.top,null,qe.bottom),$(_,Ze.top,Ze.left,Ze.bottom)):$(qe.right,qe.top,Ze.left-qe.right,qe.bottom)),qe.bottom<Ze.top&&$(_,qe.bottom,null,Ze.top)}s.appendChild(g)}function ns(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var s=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Kn(e),r.cursorDiv.style.visibility=(s=!s)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function ku(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||os(e))}function is(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Kn(e))},100)}function os(e,r){if(e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ht(e,"focus",e,r),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),f&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),ns(e)}function Kn(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ht(e,"blur",e,r),e.state.focused=!1,Y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function To(e){for(var r=e.display,s=r.lineDiv.offsetTop,o=0;o<r.view.length;o++){var l=r.view[o],g=e.options.lineWrapping,w=void 0,_=0;if(l.hidden)continue;if(a&&d<8){var A=l.node.offsetTop+l.node.offsetHeight;w=A-s,s=A}else{var T=l.node.getBoundingClientRect();w=T.bottom-T.top,!g&&l.text.firstChild&&(_=l.text.firstChild.getBoundingClientRect().right-T.left-1)}var $=l.line.height-w;if(($>.005||$<-.005)&&(Ie(l.line,w),Su(l.line),l.rest))for(var Q=0;Q<l.rest.length;Q++)Su(l.rest[Q]);if(_>e.display.sizerWidth){var de=Math.ceil(_/Gn(e.display));de>e.display.maxLineLength&&(e.display.maxLineLength=de,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}function Su(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var s=e.widgets[r],o=s.node.parentNode;o&&(s.height=o.offsetHeight)}}function Do(e,r,s){var o=s&&s.top!=null?Math.max(0,s.top):e.scroller.scrollTop;o=Math.floor(o-Eo(e));var l=s&&s.bottom!=null?s.bottom:o+e.wrapper.clientHeight,g=Ve(r,o),w=Ve(r,l);if(s&&s.ensure){var _=s.ensure.from.line,A=s.ensure.to.line;_<g?(g=_,w=Ve(r,on(ae(r,_))+e.wrapper.clientHeight)):Math.min(A,r.lastLine())>=w&&(g=Ve(r,on(ae(r,A))-e.wrapper.clientHeight),w=A)}return{from:g,to:Math.max(w,g+1)}}function ry(e,r){if(wt(e,"scrollCursorIntoView"))return;var s=e.display,o=s.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&&!S){var g=k("div","",null,`position: absolute;
top: `+(r.top-s.viewOffset-Eo(e.display))+`px;
height: `+(r.bottom-r.top+Kr(e)+s.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(g),g.scrollIntoView(l),e.display.lineSpace.removeChild(g)}}function ny(e,r,s,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==s&&(r=r.ch?ee(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,s=r.sticky=="before"?ee(r.line,r.ch+1,"before"):r);for(var g=0;g<5;g++){var w=!1,_=jr(e,r),A=!s||s==r?_:jr(e,s);l={left:Math.min(_.left,A.left),top:Math.min(_.top,A.top)-o,right:Math.max(_.left,A.left),bottom:Math.max(_.bottom,A.bottom)+o};var T=as(e,l),$=e.doc.scrollTop,Q=e.doc.scrollLeft;if(T.scrollTop!=null&&(Li(e,T.scrollTop),Math.abs(e.doc.scrollTop-$)>1&&(w=!0)),T.scrollLeft!=null&&(In(e,T.scrollLeft),Math.abs(e.doc.scrollLeft-Q)>1&&(w=!0)),!w)break}return l}function iy(e,r){var s=as(e,r);s.scrollTop!=null&&Li(e,s.scrollTop),s.scrollLeft!=null&&In(e,s.scrollLeft)}function as(e,r){var s=e.display,o=$n(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,g=Ka(e),w={};r.bottom-r.top>g&&(r.bottom=r.top+g);var _=e.doc.height+Ga(s),A=r.top<o,T=r.bottom>_-o;if(r.top<l)w.scrollTop=A?0:r.top;else if(r.bottom>l+g){var $=Math.min(r.top,(T?_:r.bottom)-g);$!=l&&(w.scrollTop=$)}var Q=e.options.fixedGutter?0:s.gutters.offsetWidth,de=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft-Q,se=_n(e)-s.gutters.offsetWidth,we=r.right-r.left>se;return we&&(r.right=r.left+se),r.left<10?w.scrollLeft=0:r.left<de?w.scrollLeft=Math.max(0,r.left+Q-(we?0:10)):r.right>se+de-3&&(w.scrollLeft=r.right+(we?0:10)-se),w}function ss(e,r){if(r==null)return;Io(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Vn(e){Io(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ii(e,r,s){(r!=null||s!=null)&&Io(e),r!=null&&(e.curOp.scrollLeft=r),s!=null&&(e.curOp.scrollTop=s)}function oy(e,r){Io(e),e.curOp.scrollToPos=r}function Io(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var s=mu(e,r.from),o=mu(e,r.to);Eu(e,s,o,r.margin)}}function Eu(e,r,s,o){var l=as(e,{left:Math.min(r.left,s.left),top:Math.min(r.top,s.top)-o,right:Math.max(r.right,s.right),bottom:Math.max(r.bottom,s.bottom)+o});Ii(e,l.scrollLeft,l.scrollTop)}function Li(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||us(e,{top:r}),Cu(e,r,!0),i&&us(e),Ri(e,100)}function Cu(e,r,s){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!s)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function In(e,r,s,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(s?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Iu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Fi(e){var r=e.display,s=r.gutters.offsetWidth,o=Math.round(e.doc.height+Ga(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?s:0,docHeight:o,scrollHeight:o+Kr(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:s}}var Ln=function(e,r,s){this.cm=s;var o=this.vert=k("div",[k("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=k("div",[k("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),st(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),st(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&d<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ln.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,s=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(s){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=s?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var g=e.viewWidth-e.barLeft-(s?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+g)+"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:s?o:0,bottom:r?o:0}},Ln.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ln.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ln.prototype.zeroWidthHack=function(){var e=C&&!b?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Se,this.disableVert=new Se},Ln.prototype.enableZeroWidthBar=function(e,r,s){e.style.pointerEvents="auto";function o(){var l=e.getBoundingClientRect(),g=s=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);g!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},Ln.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Mi=function(){};Mi.prototype.update=function(){return{bottom:0,right:0}},Mi.prototype.setScrollLeft=function(){},Mi.prototype.setScrollTop=function(){},Mi.prototype.clear=function(){};function Xn(e,r){r||(r=Fi(e));var s=e.display.barWidth,o=e.display.barHeight;_u(e,r);for(var l=0;l<4&&s!=e.display.barWidth||o!=e.display.barHeight;l++)s!=e.display.barWidth&&e.options.lineWrapping&&To(e),_u(e,Fi(e)),s=e.display.barWidth,o=e.display.barHeight}function _u(e,r){var s=e.display,o=s.scrollbars.update(r);s.sizer.style.paddingRight=(s.barWidth=o.right)+"px",s.sizer.style.paddingBottom=(s.barHeight=o.bottom)+"px",s.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(s.scrollbarFiller.style.display="block",s.scrollbarFiller.style.height=o.bottom+"px",s.scrollbarFiller.style.width=o.right+"px"):s.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(s.gutterFiller.style.display="block",s.gutterFiller.style.height=o.bottom+"px",s.gutterFiller.style.width=r.gutterWidth+"px"):s.gutterFiller.style.display=""}var Au={native:Ln,null:Mi};function Tu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Y(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Au[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),st(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,s){s=="horizontal"?In(e,r):Li(e,r)},e),e.display.scrollbars.addClass&&P(e.display.wrapper,e.display.scrollbars.addClass)}var ay=0;function Fn(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:++ay},Nv(e.curOp)}function Mn(e){var r=e.curOp;r&&Bv(r,function(s){for(var o=0;o<s.ops.length;o++)s.ops[o].cm.curOp=null;sy(s)})}function sy(e){for(var r=e.ops,s=0;s<r.length;s++)ly(r[s]);for(var o=0;o<r.length;o++)uy(r[o]);for(var l=0;l<r.length;l++)cy(r[l]);for(var g=0;g<r.length;g++)dy(r[g]);for(var w=0;w<r.length;w++)fy(r[w])}function ly(e){var r=e.cm,s=r.display;py(r),e.updateMaxLine&&Wa(r),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<s.viewFrom||e.scrollToPos.to.line>=s.viewTo)||s.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new Lo(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function uy(e){e.updatedDisplay=e.mustUpdate&&ls(e.cm,e.update)}function cy(e){var r=e.cm,s=r.display;e.updatedDisplay&&To(r),e.barMeasure=Fi(r),s.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=su(r,s.maxLine,s.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(s.scroller.clientWidth,s.sizer.offsetLeft+e.adjustWidthTo+Kr(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,s.sizer.offsetLeft+e.adjustWidthTo-_n(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=s.input.prepareSelection())}function dy(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<r.doc.scrollLeft&&In(r,Math.min(r.display.scroller.scrollLeft,e.maxScrollLeft),!0),r.display.maxLineChanged=!1);var s=e.focus&&e.focus==I();e.preparedSelection&&r.display.input.showSelection(e.preparedSelection,s),(e.updatedDisplay||e.startHeight!=r.doc.height)&&Xn(r,e.barMeasure),e.updatedDisplay&&ds(r,e.barMeasure),e.selectionChanged&&ns(r),r.state.focused&&e.updateInput&&r.display.input.reset(e.typing),s&&ku(e.cm)}function fy(e){var r=e.cm,s=r.display,o=r.doc;if(e.updatedDisplay&&Du(r,e.update),s.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(s.wheelStartX=s.wheelStartY=null),e.scrollTop!=null&&Cu(r,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&In(r,e.scrollLeft,!0,!0),e.scrollToPos){var l=ny(r,dt(o,e.scrollToPos.from),dt(o,e.scrollToPos.to),e.scrollToPos.margin);ry(r,l)}var g=e.maybeHiddenMarkers,w=e.maybeUnhiddenMarkers;if(g)for(var _=0;_<g.length;++_)g[_].lines.length||ht(g[_],"hide");if(w)for(var A=0;A<w.length;++A)w[A].lines.length&&ht(w[A],"unhide");s.wrapper.offsetHeight&&(o.scrollTop=r.display.scroller.scrollTop),e.changeObjs&&ht(r,"changes",r,e.changeObjs),e.update&&e.update.finish()}function Ar(e,r){if(e.curOp)return r();Fn(e);try{return r()}finally{Mn(e)}}function er(e,r){return function(){if(e.curOp)return r.apply(e,arguments);Fn(e);try{return r.apply(e,arguments)}finally{Mn(e)}}}function pr(e){return function(){if(this.curOp)return e.apply(this,arguments);Fn(this);try{return e.apply(this,arguments)}finally{Mn(this)}}}function tr(e){return function(){var r=this.cm;if(!r||r.curOp)return e.apply(this,arguments);Fn(r);try{return e.apply(this,arguments)}finally{Mn(r)}}}function Ri(e,r){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(r,q(hy,e))}function hy(e){var r=e.doc;if(r.highlightFrontier>=e.display.viewTo)return;var s=+new Date+e.options.workTime,o=Si(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(g){if(o.line>=e.display.viewFrom){var w=g.styles,_=g.text.length>e.options.maxHighlightLength?Ye(r.mode,o.state):null,A=Ol(e,g,o,!0);_&&(o.state=_),g.styles=A.styles;var T=g.styleClasses,$=A.classes;$?g.styleClasses=$:T&&(g.styleClasses=null);for(var Q=!w||w.length!=g.styles.length||T!=$&&(!T||!$||T.bgClass!=$.bgClass||T.textClass!=$.textClass),de=0;!Q&&de<w.length;++de)Q=w[de]!=g.styles[de];Q&&l.push(o.line),g.stateAfter=o.save(),o.nextLine()}else g.text.length<=e.options.maxHighlightLength&&za(e,g.text,o),g.stateAfter=o.line%5==0?o.save():null,o.nextLine();if(+new Date>s)return Ri(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&Ar(e,function(){for(var g=0;g<l.length;g++)pn(e,l[g],"text")})}var Lo=function(e,r,s){var o=e.display;this.viewport=r,this.visible=Do(o,e.doc,r),this.editorIsHidden=!o.wrapper.offsetWidth,this.wrapperHeight=o.wrapper.clientHeight,this.wrapperWidth=o.wrapper.clientWidth,this.oldDisplayWidth=_n(e),this.force=s,this.dims=es(e),this.events=[]};Lo.prototype.signal=function(e,r){Tt(e,r)&&this.events.push(arguments)},Lo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ht.apply(null,this.events[e])};function py(e){var r=e.display;!r.scrollbarsClipped&&r.scroller.offsetWidth&&(r.nativeBarWidth=r.scroller.offsetWidth-r.scroller.clientWidth,r.heightForcer.style.height=Kr(e)+"px",r.sizer.style.marginBottom=-r.nativeBarWidth+"px",r.sizer.style.borderRightWidth=Kr(e)+"px",r.scrollbarsClipped=!0)}function my(e){if(e.hasFocus())return null;var r=I();if(!r||!re(e.display.lineDiv,r))return null;var s={activeElt:r};if(window.getSelection){var o=window.getSelection();o.anchorNode&&o.extend&&re(e.display.lineDiv,o.anchorNode)&&(s.anchorNode=o.anchorNode,s.anchorOffset=o.anchorOffset,s.focusNode=o.focusNode,s.focusOffset=o.focusOffset)}return s}function gy(e){if(!e||!e.activeElt||e.activeElt==I())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&re(document.body,e.anchorNode)&&re(document.body,e.focusNode)){var r=window.getSelection(),s=document.createRange();s.setEnd(e.anchorNode,e.anchorOffset),s.collapse(!1),r.removeAllRanges(),r.addRange(s),r.extend(e.focusNode,e.focusOffset)}}function ls(e,r){var s=e.display,o=e.doc;if(r.editorIsHidden)return mn(e),!1;if(!r.force&&r.visible.from>=s.viewFrom&&r.visible.to<=s.viewTo&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo)&&s.renderedView==s.view&&bu(e)==0)return!1;Lu(e)&&(mn(e),r.dims=es(e));var l=o.first+o.size,g=Math.max(r.visible.from-e.options.viewportMargin,o.first),w=Math.min(l,r.visible.to+e.options.viewportMargin);s.viewFrom<g&&g-s.viewFrom<20&&(g=Math.max(o.first,s.viewFrom)),s.viewTo>w&&s.viewTo-w<20&&(w=Math.min(l,s.viewTo)),nn&&(g=Ua(e.doc,g),w=Xl(e.doc,w));var _=g!=s.viewFrom||w!=s.viewTo||s.lastWrapHeight!=r.wrapperHeight||s.lastWrapWidth!=r.wrapperWidth;ey(e,g,w),s.viewOffset=on(ae(e.doc,s.viewFrom)),e.display.mover.style.top=s.viewOffset+"px";var A=bu(e);if(!_&&A==0&&!r.force&&s.renderedView==s.view&&(s.updateLineNumbers==null||s.updateLineNumbers>=s.viewTo))return!1;var T=my(e);return A>4&&(s.lineDiv.style.display="none"),vy(e,s.updateLineNumbers,r.dims),A>4&&(s.lineDiv.style.display=""),s.renderedView=s.view,gy(T),M(s.cursorDiv),M(s.selectionDiv),s.gutters.style.height=s.sizer.style.minHeight=0,_&&(s.lastWrapHeight=r.wrapperHeight,s.lastWrapWidth=r.wrapperWidth,Ri(e,400)),s.updateLineNumbers=null,!0}function Du(e,r){for(var s=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==_n(e)){if(s&&s.top!=null&&(s={top:Math.min(e.doc.height+Ga(e.display)-Ka(e),s.top)}),r.visible=Do(e.display,e.doc,s),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Do(e.display,e.doc,s));if(!ls(e,r))break;To(e);var l=Fi(e);Di(e),Xn(e,l),ds(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 us(e,r){var s=new Lo(e,r);if(ls(e,s)){To(e),Du(e,s);var o=Fi(e);Di(e),Xn(e,o),ds(e,o),s.finish()}}function vy(e,r,s){var o=e.display,l=e.options.lineNumbers,g=o.lineDiv,w=g.firstChild;function _(we){var _e=we.nextSibling;return f&&C&&e.display.currentWheelTarget==we?we.style.display="none":we.parentNode.removeChild(we),_e}for(var A=o.view,T=o.viewFrom,$=0;$<A.length;$++){var Q=A[$];if(!Q.hidden)if(!Q.node||Q.node.parentNode!=g){var de=Wv(e,Q,T,s);g.insertBefore(de,w)}else{for(;w!=Q.node;)w=_(w);var se=l&&r!=null&&r<=T&&Q.lineNumber;Q.changes&&(be(Q.changes,"gutter")>-1&&(se=!1),eu(e,Q,T,s)),se&&(M(Q.lineNumber),Q.lineNumber.appendChild(document.createTextNode(X(e.options,T)))),w=Q.node.nextSibling}T+=Q.size}for(;w;)w=_(w)}function cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function ds(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+Kr(e)+"px"}function Iu(e){var r=e.display,s=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=ts(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,g=o+"px",w=0;w<s.length;w++)if(!s[w].hidden){e.options.fixedGutter&&(s[w].gutter&&(s[w].gutter.style.left=g),s[w].gutterBackground&&(s[w].gutterBackground.style.left=g));var _=s[w].alignable;if(_)for(var A=0;A<_.length;A++)_[A].style.left=g}e.options.fixedGutter&&(r.gutters.style.left=o+l+"px")}function Lu(e){if(!e.options.lineNumbers)return!1;var r=e.doc,s=X(e.options,r.first+r.size-1),o=e.display;if(s.length!=o.lineNumChars){var l=o.measure.appendChild(k("div",[k("div",s)],"CodeMirror-linenumber CodeMirror-gutter-elt")),g=l.firstChild.offsetWidth,w=l.offsetWidth-g;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(g,o.lineGutter.offsetWidth-w)+1,o.lineNumWidth=o.lineNumInnerWidth+w,o.lineNumChars=o.lineNumInnerWidth?s.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",cs(e.display),!0}return!1}function fs(e,r){for(var s=[],o=!1,l=0;l<e.length;l++){var g=e[l],w=null;if(typeof g!="string"&&(w=g.style,g=g.className),g=="CodeMirror-linenumbers")if(r)o=!0;else continue;s.push({className:g,style:w})}return r&&!o&&s.push({className:"CodeMirror-linenumbers",style:null}),s}function Fu(e){var r=e.gutters,s=e.gutterSpecs;M(r),e.lineGutter=null;for(var o=0;o<s.length;++o){var l=s[o],g=l.className,w=l.style,_=r.appendChild(k("div",null,"CodeMirror-gutter "+g));w&&(_.style.cssText=w),g=="CodeMirror-linenumbers"&&(e.lineGutter=_,_.style.width=(e.lineNumWidth||1)+"px")}r.style.display=s.length?"":"none",cs(e)}function Oi(e){Fu(e.display),br(e),Iu(e)}function yy(e,r,s,o){var l=this;this.input=s,l.scrollbarFiller=k("div",null,"CodeMirror-scrollbar-filler"),l.scrollbarFiller.setAttribute("cm-not-content","true"),l.gutterFiller=k("div",null,"CodeMirror-gutter-filler"),l.gutterFiller.setAttribute("cm-not-content","true"),l.lineDiv=G("div",null,"CodeMirror-code"),l.selectionDiv=k("div",null,null,"position: relative; z-index: 1"),l.cursorDiv=k("div",null,"CodeMirror-cursors"),l.measure=k("div",null,"CodeMirror-measure"),l.lineMeasure=k("div",null,"CodeMirror-measure"),l.lineSpace=G("div",[l.measure,l.lineMeasure,l.selectionDiv,l.cursorDiv,l.lineDiv],null,"position: relative; outline: none");var g=G("div",[l.lineSpace],"CodeMirror-lines");l.mover=k("div",[g],null,"position: relative"),l.sizer=k("div",[l.mover],"CodeMirror-sizer"),l.sizerWidth=null,l.heightForcer=k("div",null,null,"position: absolute; height: "+Fe+"px; width: 1px;"),l.gutters=k("div",null,"CodeMirror-gutters"),l.lineGutter=null,l.scroller=k("div",[l.sizer,l.heightForcer,l.gutters],"CodeMirror-scroll"),l.scroller.setAttribute("tabIndex","-1"),l.wrapper=k("div",[l.scrollbarFiller,l.gutterFiller,l.scroller],"CodeMirror"),a&&d<8&&(l.gutters.style.zIndex=-1,l.scroller.style.paddingRight=0),!f&&!(i&&D)&&(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=fs(o.gutters,o.lineNumbers),Fu(l),s.init(l)}var Fo=0,Ir=null;a?Ir=-.53:i?Ir=15:y?Ir=-.7:v&&(Ir=-1/3);function Mu(e){var r=e.wheelDeltaX,s=e.wheelDeltaY;return r==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(r=e.detail),s==null&&e.detail&&e.axis==e.VERTICAL_AXIS?s=e.detail:s==null&&(s=e.wheelDelta),{x:r,y:s}}function by(e){var r=Mu(e);return r.x*=Ir,r.y*=Ir,r}function Ru(e,r){var s=Mu(r),o=s.x,l=s.y,g=e.display,w=g.scroller,_=w.scrollWidth>w.clientWidth,A=w.scrollHeight>w.clientHeight;if(!(o&&_||l&&A))return;if(l&&C&&f){e:for(var T=r.target,$=g.view;T!=w;T=T.parentNode)for(var Q=0;Q<$.length;Q++)if($[Q].node==T){e.display.currentWheelTarget=T;break e}}if(o&&!i&&!m&&Ir!=null){l&&A&&Li(e,Math.max(0,w.scrollTop+l*Ir)),In(e,Math.max(0,w.scrollLeft+o*Ir)),(!l||l&&A)&&kt(r),g.wheelStartX=null;return}if(l&&Ir!=null){var de=l*Ir,se=e.doc.scrollTop,we=se+g.wrapper.clientHeight;de<0?se=Math.max(0,se+de-50):we=Math.min(e.doc.height,we+de+50),us(e,{top:se,bottom:we})}Fo<20&&(g.wheelStartX==null?(g.wheelStartX=w.scrollLeft,g.wheelStartY=w.scrollTop,g.wheelDX=o,g.wheelDY=l,setTimeout(function(){if(g.wheelStartX==null)return;var _e=w.scrollLeft-g.wheelStartX,Re=w.scrollTop-g.wheelStartY,qe=Re&&g.wheelDY&&Re/g.wheelDY||_e&&g.wheelDX&&_e/g.wheelDX;if(g.wheelStartX=g.wheelStartY=null,!qe)return;Ir=(Ir*Fo+qe)/(Fo+1),++Fo},200)):(g.wheelDX+=o,g.wheelDY+=l))}var Lr=function(e,r){this.ranges=e,this.primIndex=r};Lr.prototype.primary=function(){return this.ranges[this.primIndex]},Lr.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 s=this.ranges[r],o=e.ranges[r];if(!ge(s.anchor,o.anchor)||!ge(s.head,o.head))return!1}return!0},Lr.prototype.deepCopy=function(){for(var e=[],r=0;r<this.ranges.length;r++)e[r]=new _t(lt(this.ranges[r].anchor),lt(this.ranges[r].head));return new Lr(e,this.primIndex)},Lr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Lr.prototype.contains=function(e,r){r||(r=e);for(var s=0;s<this.ranges.length;s++){var o=this.ranges[s];if(pe(r,o.from())>=0&&pe(e,o.to())<=0)return s}return-1};var _t=function(e,r){this.anchor=e,this.head=r};_t.prototype.from=function(){return zt(this.anchor,this.head)},_t.prototype.to=function(){return vt(this.anchor,this.head)},_t.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function qr(e,r,s){var o=e&&e.options.selectionsMayTouch,l=r[s];r.sort(function(de,se){return pe(de.from(),se.from())}),s=be(r,l);for(var g=1;g<r.length;g++){var w=r[g],_=r[g-1],A=pe(_.to(),w.from());if(o&&!w.empty()?A>0:A>=0){var T=zt(_.from(),w.from()),$=vt(_.to(),w.to()),Q=_.empty()?w.from()==w.head:_.from()==_.head;g<=s&&--s,r.splice(--g,2,new _t(Q?$:T,Q?T:$))}}return new Lr(r,s)}function gn(e,r){return new Lr([new _t(e,r||e)],0)}function vn(e){return e.text?ee(e.from.line+e.text.length-1,Pe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ou(e,r){if(pe(e,r.from)<0)return e;if(pe(e,r.to)<=0)return vn(r);var s=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=vn(r).ch-r.to.ch),ee(s,o)}function hs(e,r){for(var s=[],o=0;o<e.sel.ranges.length;o++){var l=e.sel.ranges[o];s.push(new _t(Ou(l.anchor,r),Ou(l.head,r)))}return qr(e.cm,s,e.sel.primIndex)}function Pu(e,r,s){return e.line==r.line?ee(s.line,e.ch-r.ch+s.ch):ee(s.line+(e.line-r.line),e.ch)}function wy(e,r,s){for(var o=[],l=ee(e.first,0),g=l,w=0;w<r.length;w++){var _=r[w],A=Pu(_.from,l,g),T=Pu(vn(_),l,g);if(l=_.to,g=T,s=="around"){var $=e.sel.ranges[w],Q=pe($.head,$.anchor)<0;o[w]=new _t(Q?T:A,Q?A:T)}else o[w]=new _t(A,A)}return new Lr(o,e.sel.primIndex)}function ps(e){e.doc.mode=Te(e.options,e.doc.modeOption),Pi(e)}function Pi(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,Ri(e,100),e.state.modeGen++,e.curOp&&br(e)}function Nu(e,r){return r.from.ch==0&&r.to.ch==0&&Pe(r.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function ms(e,r,s,o){function l(Ze){return s?s[Ze]:null}function g(Ze,Ue,et){Tv(Ze,Ue,et,o),ar(Ze,"change",Ze,r)}function w(Ze,Ue){for(var et=[],ct=Ze;ct<Ue;++ct)et.push(new Un(T[ct],l(ct),o));return et}var _=r.from,A=r.to,T=r.text,$=ae(e,_.line),Q=ae(e,A.line),de=Pe(T),se=l(T.length-1),we=A.line-_.line;if(r.full)e.insert(0,w(0,T.length)),e.remove(T.length,e.size-T.length);else if(Nu(e,r)){var _e=w(0,T.length-1);g(Q,Q.text,se),we&&e.remove(_.line,we),_e.length&&e.insert(_.line,_e)}else if($==Q)if(T.length==1)g($,$.text.slice(0,_.ch)+de+$.text.slice(A.ch),se);else{var Re=w(1,T.length-1);Re.push(new Un(de+$.text.slice(A.ch),se,o)),g($,$.text.slice(0,_.ch)+T[0],l(0)),e.insert(_.line+1,Re)}else if(T.length==1)g($,$.text.slice(0,_.ch)+T[0]+Q.text.slice(A.ch),l(0)),e.remove(_.line+1,we);else{g($,$.text.slice(0,_.ch)+T[0],l(0)),g(Q,de+Q.text.slice(A.ch),se);var qe=w(1,T.length-1);we>1&&e.remove(_.line+1,we-1),e.insert(_.line+1,qe)}ar(e,"change",e,r)}function yn(e,r,s){function o(l,g,w){if(l.linked)for(var _=0;_<l.linked.length;++_){var A=l.linked[_];if(A.doc==g)continue;var T=w&&A.sharedHist;if(s&&!T)continue;r(A.doc,T),o(A.doc,l,T)}}o(e,null,!0)}function zu(e,r){if(r.cm)throw new Error("This document is already in use.");e.doc=r,r.cm=e,rs(e),ps(e),Bu(e),e.options.lineWrapping||Wa(e),e.options.mode=r.modeOption,br(e)}function Bu(e){(e.doc.direction=="rtl"?P:Y)(e.display.lineDiv,"CodeMirror-rtl")}function xy(e){Ar(e,function(){Bu(e),br(e)})}function Mo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function gs(e,r){var s={from:lt(r.from),to:vn(r),text:ve(e,r.from,r.to)};return Uu(e,s,r.from.line,r.to.line+1),yn(e,function(o){return Uu(o,s,r.from.line,r.to.line+1)},!0),s}function ju(e){for(;e.length;){var r=Pe(e);if(r.ranges)e.pop();else break}}function ky(e,r){if(r)return ju(e.done),Pe(e.done);if(e.done.length&&!Pe(e.done).ranges)return Pe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Pe(e.done)}function qu(e,r,s,o){var l=e.history;l.undone.length=0;var g=+new Date,w,_;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>g-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(w=ky(l,l.lastOp==o)))_=Pe(w.changes),pe(r.from,r.to)==0&&pe(r.from,_.to)==0?_.to=vn(r):w.changes.push(gs(e,r));else{var A=Pe(l.done);for((!A||!A.ranges)&&Ro(e.sel,l.done),w={changes:[gs(e,r)],generation:l.generation},l.done.push(w);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(s),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=g,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,_||ht(e,"historyAdded")}function Sy(e,r,s,o){var l=r.charAt(0);return l=="*"||l=="+"&&s.ranges.length==o.ranges.length&&s.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ey(e,r,s,o){var l=e.history,g=o&&o.origin;s==l.lastSelOp||g&&l.lastSelOrigin==g&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==g||Sy(e,g,Pe(l.done),r))?l.done[l.done.length-1]=r:Ro(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=g,l.lastSelOp=s,o&&o.clearRedo!==!1&&ju(l.undone)}function Ro(e,r){var s=Pe(r);s&&s.ranges&&s.equals(e)||r.push(e)}function Uu(e,r,s,o){var l=r["spans_"+e.id],g=0;e.iter(Math.max(e.first,s),Math.min(e.first+e.size,o),function(w){w.markedSpans&&((l||(l=r["spans_"+e.id]={}))[g]=w.markedSpans),++g})}function Cy(e){if(!e)return null;for(var r,s=0;s<e.length;++s)e[s].marker.explicitlyCleared?r||(r=e.slice(0,s)):r&&r.push(e[s]);return r?r.length?r:null:e}function _y(e,r){var s=r["spans_"+e.id];if(!s)return null;for(var o=[],l=0;l<r.text.length;++l)o.push(Cy(s[l]));return o}function Hu(e,r){var s=_y(e,r),o=ja(e,r);if(!s)return o;if(!o)return s;for(var l=0;l<s.length;++l){var g=s[l],w=o[l];if(g&&w){e:for(var _=0;_<w.length;++_){for(var A=w[_],T=0;T<g.length;++T)if(g[T].marker==A.marker)continue e;g.push(A)}}else w&&(s[l]=w)}return s}function Yn(e,r,s){for(var o=[],l=0;l<e.length;++l){var g=e[l];if(g.ranges){o.push(s?Lr.prototype.deepCopy.call(g):g);continue}var w=g.changes,_=[];o.push({changes:_});for(var A=0;A<w.length;++A){var T=w[A],$=void 0;if(_.push({from:T.from,to:T.to,text:T.text}),r)for(var Q in T)($=Q.match(/^spans_(\d+)$/))&&(be(r,Number($[1]))>-1&&(Pe(_)[Q]=T[Q],delete T[Q]))}}return o}function vs(e,r,s,o){if(o){var l=e.anchor;if(s){var g=pe(r,l)<0;g!=pe(s,l)<0?(l=r,r=s):g!=pe(r,s)<0&&(r=s)}return new _t(l,r)}else return new _t(s||r,r)}function Oo(e,r,s,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),ur(e,new Lr([vs(e.sel.primary(),r,s,l)],0),o)}function Wu(e,r,s){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),g=0;g<e.sel.ranges.length;g++)o[g]=vs(e.sel.ranges[g],r[g],null,l);var w=qr(e.cm,o,e.sel.primIndex);ur(e,w,s)}function ys(e,r,s,o){var l=e.sel.ranges.slice(0);l[r]=s,ur(e,qr(e.cm,l,e.sel.primIndex),o)}function $u(e,r,s,o){ur(e,gn(r,s),o)}function Ay(e,r,s){var o={ranges:r.ranges,update:function(l){this.ranges=[];for(var g=0;g<l.length;g++)this.ranges[g]=new _t(dt(e,l[g].anchor),dt(e,l[g].head))},origin:s&&s.origin};return ht(e,"beforeSelectionChange",e,o),e.cm&&ht(e.cm,"beforeSelectionChange",e.cm,o),o.ranges!=r.ranges?qr(e.cm,o.ranges,o.ranges.length-1):r}function Gu(e,r,s){var o=e.history.done,l=Pe(o);l&&l.ranges?(o[o.length-1]=r,Po(e,r,s)):ur(e,r,s)}function ur(e,r,s){Po(e,r,s),Ey(e,e.sel,e.cm?e.cm.curOp.id:NaN,s)}function Po(e,r,s){(Tt(e,"beforeSelectionChange")||e.cm&&Tt(e.cm,"beforeSelectionChange"))&&(r=Ay(e,r,s));var o=s&&s.bias||(pe(r.primary().head,e.sel.primary().head)<0?-1:1);Ku(e,Xu(e,r,o,!0)),!(s&&s.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Vn(e.cm)}function Ku(e,r){if(r.equals(e.sel))return;e.sel=r,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Qt(e.cm)),ar(e,"cursorActivity",e)}function Vu(e){Ku(e,Xu(e,e.sel,null,!1))}function Xu(e,r,s,o){for(var l,g=0;g<r.ranges.length;g++){var w=r.ranges[g],_=r.ranges.length==e.sel.ranges.length&&e.sel.ranges[g],A=No(e,w.anchor,_&&_.anchor,s,o),T=No(e,w.head,_&&_.head,s,o);(l||A!=w.anchor||T!=w.head)&&(l||(l=r.ranges.slice(0,g)),l[g]=new _t(A,T))}return l?qr(e.cm,l,r.primIndex):r}function Zn(e,r,s,o,l){var g=ae(e,r.line);if(g.markedSpans)for(var w=0;w<g.markedSpans.length;++w){var _=g.markedSpans[w],A=_.marker,T="selectLeft"in A?!A.selectLeft:A.inclusiveLeft,$="selectRight"in A?!A.selectRight:A.inclusiveRight;if((_.from==null||(T?_.from<=r.ch:_.from<r.ch))&&(_.to==null||($?_.to>=r.ch:_.to>r.ch))){if(l&&(ht(A,"beforeCursorEnter"),A.explicitlyCleared))if(g.markedSpans){--w;continue}else break;if(!A.atomic)continue;if(s){var Q=A.find(o<0?1:-1),de=void 0;if((o<0?$:T)&&(Q=Yu(e,Q,-o,Q&&Q.line==r.line?g:null)),Q&&Q.line==r.line&&(de=pe(Q,s))&&(o<0?de<0:de>0))return Zn(e,Q,r,o,l)}var se=A.find(o<0?-1:1);return(o<0?T:$)&&(se=Yu(e,se,o,se.line==r.line?g:null)),se?Zn(e,se,r,o,l):null}}return r}function No(e,r,s,o,l){var g=o||1,w=Zn(e,r,s,g,l)||!l&&Zn(e,r,s,g,!0)||Zn(e,r,s,-g,l)||!l&&Zn(e,r,s,-g,!0);return w||(e.cantEdit=!0,ee(e.first,0))}function Yu(e,r,s,o){return s<0&&r.ch==0?r.line>e.first?dt(e,ee(r.line-1)):null:s>0&&r.ch==(o||ae(e,r.line)).text.length?r.line<e.first+e.size-1?ee(r.line+1,0):null:new ee(r.line,r.ch+s)}function Zu(e){e.setSelection(ee(e.firstLine(),0),ee(e.lastLine()),nt)}function Qu(e,r,s){var o={canceled:!1,from:r.from,to:r.to,text:r.text,origin:r.origin,cancel:function(){return o.canceled=!0}};return s&&(o.update=function(l,g,w,_){l&&(o.from=dt(e,l)),g&&(o.to=dt(e,g)),w&&(o.text=w),_!==void 0&&(o.origin=_)}),ht(e,"beforeChange",e,o),e.cm&&ht(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 Qn(e,r,s){if(e.cm){if(!e.cm.curOp)return er(e.cm,Qn)(e,r,s);if(e.cm.state.suppressEdits)return}if((Tt(e,"beforeChange")||e.cm&&Tt(e.cm,"beforeChange"))&&(r=Qu(e,r,!0),!r))return;var o=Ul&&!s&&Ev(e,r.from,r.to);if(o)for(var l=o.length-1;l>=0;--l)Ju(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else Ju(e,r)}function Ju(e,r){if(r.text.length==1&&r.text[0]==""&&pe(r.from,r.to)==0)return;var s=hs(e,r);qu(e,r,s,e.cm?e.cm.curOp.id:NaN),Ni(e,r,s,ja(e,r));var o=[];yn(e,function(l,g){!g&&be(o,l.history)==-1&&(nc(l.history,r),o.push(l.history)),Ni(l,r,null,ja(l,r))})}function zo(e,r,s){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!s)return;for(var l=e.history,g,w=e.sel,_=r=="undo"?l.done:l.undone,A=r=="undo"?l.undone:l.done,T=0;T<_.length&&!(g=_[T],s?g.ranges&&!g.equals(e.sel):!g.ranges);T++);if(T==_.length)return;for(l.lastOrigin=l.lastSelOrigin=null;;)if(g=_.pop(),g.ranges){if(Ro(g,A),s&&!g.equals(e.sel)){ur(e,g,{clearRedo:!1});return}w=g}else if(o){_.push(g);return}else break;var $=[];Ro(w,A),A.push({changes:$,generation:l.generation}),l.generation=g.generation||++l.maxGeneration;for(var Q=Tt(e,"beforeChange")||e.cm&&Tt(e.cm,"beforeChange"),de=function(_e){var Re=g.changes[_e];if(Re.origin=r,Q&&!Qu(e,Re,!1))return _.length=0,{};$.push(gs(e,Re));var qe=_e?hs(e,Re):Pe(_);Ni(e,Re,qe,Hu(e,Re)),!_e&&e.cm&&e.cm.scrollIntoView({from:Re.from,to:vn(Re)});var Ze=[];yn(e,function(Ue,et){!et&&be(Ze,Ue.history)==-1&&(nc(Ue.history,Re),Ze.push(Ue.history)),Ni(Ue,Re,null,Hu(Ue,Re))})},se=g.changes.length-1;se>=0;--se){var we=de(se);if(we)return we.v}}function ec(e,r){if(r==0)return;if(e.first+=r,e.sel=new Lr(Le(e.sel.ranges,function(l){return new _t(ee(l.anchor.line+r,l.anchor.ch),ee(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm){br(e.cm,e.first,e.first-r,r);for(var s=e.cm.display,o=s.viewFrom;o<s.viewTo;o++)pn(e.cm,o,"gutter")}}function Ni(e,r,s,o){if(e.cm&&!e.cm.curOp)return er(e.cm,Ni)(e,r,s,o);if(r.to.line<e.first){ec(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);ec(e,l),r={from:ee(e.first,0),to:ee(r.to.line+l,r.to.ch),text:[Pe(r.text)],origin:r.origin}}var g=e.lastLine();r.to.line>g&&(r={from:r.from,to:ee(g,ae(e,g).text.length),text:[r.text[0]],origin:r.origin}),r.removed=ve(e,r.from,r.to),s||(s=hs(e,r)),e.cm?Ty(e.cm,r,o):ms(e,r,o),Po(e,s,nt),e.cantEdit&&No(e,ee(e.firstLine(),0))&&(e.cantEdit=!1)}function Ty(e,r,s){var o=e.doc,l=e.display,g=r.from,w=r.to,_=!1,A=g.line;e.options.lineWrapping||(A=We(Gr(ae(o,g.line))),o.iter(A,w.line+1,function(se){if(se==l.maxLine)return _=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Qt(e),ms(o,r,s,yu(e)),e.options.lineWrapping||(o.iter(A,g.line+r.text.length,function(se){var we=ko(se);we>l.maxLineLength&&(l.maxLine=se,l.maxLineLength=we,l.maxLineChanged=!0,_=!1)}),_&&(e.curOp.updateMaxLine=!0)),vv(o,g.line),Ri(e,400);var T=r.text.length-(w.line-g.line)-1;r.full?br(e):g.line==w.line&&r.text.length==1&&!Nu(e.doc,r)?pn(e,g.line,"text"):br(e,g.line,w.line+1,T);var $=Tt(e,"changes"),Q=Tt(e,"change");if(Q||$){var de={from:g,to:w,text:r.text,removed:r.removed,origin:r.origin};Q&&ar(e,"change",e,de),$&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(de)}e.display.selForContextMenu=null}function Jn(e,r,s,o,l){var g;o||(o=s),pe(o,s)<0&&(g=[o,s],s=g[0],o=g[1]),typeof r=="string"&&(r=e.splitLines(r)),Qn(e,{from:s,to:o,text:r,origin:l})}function tc(e,r,s,o){s<e.line?e.line+=o:r<e.line&&(e.line=r,e.ch=0)}function rc(e,r,s,o){for(var l=0;l<e.length;++l){var g=e[l],w=!0;if(g.ranges){g.copied||(g=e[l]=g.deepCopy(),g.copied=!0);for(var _=0;_<g.ranges.length;_++)tc(g.ranges[_].anchor,r,s,o),tc(g.ranges[_].head,r,s,o);continue}for(var A=0;A<g.changes.length;++A){var T=g.changes[A];if(s<T.from.line)T.from=ee(T.from.line+o,T.from.ch),T.to=ee(T.to.line+o,T.to.ch);else if(r<=T.to.line){w=!1;break}}w||(e.splice(0,l+1),l=0)}}function nc(e,r){var s=r.from.line,o=r.to.line,l=r.text.length-(o-s)-1;rc(e.done,s,o,l),rc(e.undone,s,o,l)}function zi(e,r,s,o){var l=r,g=r;return typeof r=="number"?g=ae(e,hr(e,r)):l=We(r),l==null?null:(o(g,l)&&e.cm&&pn(e.cm,l,s),g)}function Bi(e){this.lines=e,this.parent=null;for(var r=0,s=0;s<e.length;++s)e[s].parent=this,r+=e[s].height;this.height=r}Bi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,r){for(var s=e,o=e+r;s<o;++s){var l=this.lines[s];this.height-=l.height,Dv(l),ar(l,"delete")}this.lines.splice(e,r)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,r,s){this.height+=s,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,s){for(var o=e+r;e<o;++e)if(s(this.lines[e]))return!0}};function ji(e){this.children=e;for(var r=0,s=0,o=0;o<e.length;++o){var l=e[o];r+=l.chunkSize(),s+=l.height,l.parent=this}this.size=r,this.height=s,this.parent=null}ji.prototype={chunkSize:function(){return this.size},removeInner:function(e,r){this.size-=r;for(var s=0;s<this.children.length;++s){var o=this.children[s],l=o.chunkSize();if(e<l){var g=Math.min(r,l-e),w=o.height;if(o.removeInner(e,g),this.height-=w-o.height,l==g&&(this.children.splice(s--,1),o.parent=null),(r-=g)==0)break;e=0}else e-=l}if(this.size-r<25&&(this.children.length>1||!(this.children[0]instanceof Bi))){var _=[];this.collapse(_),this.children=[new Bi(_)],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,s){this.size+=r.length,this.height+=s;for(var o=0;o<this.children.length;++o){var l=this.children[o],g=l.chunkSize();if(e<=g){if(l.insertInner(e,r,s),l.lines&&l.lines.length>50){for(var w=l.lines.length%25+25,_=w;_<l.lines.length;){var A=new Bi(l.lines.slice(_,_+=25));l.height-=A.height,this.children.splice(++o,0,A),A.parent=this}l.lines=l.lines.slice(0,w),this.maybeSpill()}break}e-=g}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var r=e.children.splice(e.children.length-5,5),s=new ji(r);if(e.parent){e.size-=s.size,e.height-=s.height;var l=be(e.parent.children,e);e.parent.children.splice(l+1,0,s)}else{var o=new ji(e.children);o.parent=e,e.children=[o,s],e=o}s.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,r,s){for(var o=0;o<this.children.length;++o){var l=this.children[o],g=l.chunkSize();if(e<g){var w=Math.min(r,g-e);if(l.iterN(e,w,s))return!0;if((r-=w)==0)break;e=0}else e-=g}}};var qi=function(e,r,s){if(s)for(var o in s)s.hasOwnProperty(o)&&(this[o]=s[o]);this.doc=e,this.node=r};qi.prototype.clear=function(){var e=this.doc.cm,r=this.line.widgets,s=this.line,o=We(s);if(o==null||!r)return;for(var l=0;l<r.length;++l)r[l]==this&&r.splice(l--,1);r.length||(s.widgets=null);var g=Ai(this);Ie(s,Math.max(0,s.height-g)),e&&(Ar(e,function(){ic(e,s,-g),pn(e,o,"widget")}),ar(e,"lineWidgetCleared",e,this,o))},qi.prototype.changed=function(){var e=this,r=this.height,s=this.doc.cm,o=this.line;this.height=null;var l=Ai(this)-r;if(!l)return;hn(this.doc,o)||Ie(o,o.height+l),s&&Ar(s,function(){s.curOp.forceUpdate=!0,ic(s,o,l),ar(s,"lineWidgetChanged",s,e,We(o))})},Ot(qi);function ic(e,r,s){on(r)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ss(e,s)}function Dy(e,r,s,o){var l=new qi(e,s,o),g=e.cm;return g&&l.noHScroll&&(g.display.alignWidgets=!0),zi(e,r,"widget",function(w){var _=w.widgets||(w.widgets=[]);if(l.insertAt==null?_.push(l):_.splice(Math.min(_.length,Math.max(0,l.insertAt)),0,l),l.line=w,g&&!hn(e,w)){var A=on(w)<e.scrollTop;Ie(w,w.height+Ai(l)),A&&ss(g,l.height),g.curOp.forceUpdate=!0}return!0}),g&&ar(g,"lineWidgetAdded",g,l,typeof r=="number"?r:We(r)),l}var oc=0,bn=function(e,r){this.lines=[],this.type=r,this.doc=e,this.id=++oc};bn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,r=e&&!e.curOp;if(r&&Fn(e),Tt(this,"clear")){var s=this.find();s&&ar(this,"clear",s.from,s.to)}for(var o=null,l=null,g=0;g<this.lines.length;++g){var w=this.lines[g],_=Ei(w.markedSpans,this);e&&!this.collapsed?pn(e,We(w),"text"):e&&(_.to!=null&&(l=We(w)),_.from!=null&&(o=We(w))),w.markedSpans=wv(w.markedSpans,_),_.from==null&&this.collapsed&&!hn(this.doc,w)&&e&&Ie(w,$n(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var A=0;A<this.lines.length;++A){var T=Gr(this.lines[A]),$=ko(T);$>e.display.maxLineLength&&(e.display.maxLine=T,e.display.maxLineLength=$,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&br(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vu(e.doc)),e&&ar(e,"markerCleared",e,this,o,l),r&&Mn(e),this.parent&&this.parent.clear()},bn.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var s,o,l=0;l<this.lines.length;++l){var g=this.lines[l],w=Ei(g.markedSpans,this);if(w.from!=null&&(s=ee(r?g:We(g),w.from),e==-1))return s;if(w.to!=null&&(o=ee(r?g:We(g),w.to),e==1))return o}return s&&{from:s,to:o}},bn.prototype.changed=function(){var e=this,r=this.find(-1,!0),s=this,o=this.doc.cm;if(!r||!o)return;Ar(o,function(){var l=r.line,g=We(r.line),w=Va(o,g);if(w&&(cu(w),o.curOp.selectionChanged=o.curOp.forceUpdate=!0),o.curOp.updateMaxLine=!0,!hn(s.doc,l)&&s.height!=null){var _=s.height;s.height=null;var A=Ai(s)-_;A&&Ie(l,l.height+A)}ar(o,"markerChanged",o,e)})},bn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(!r.maybeHiddenMarkers||be(r.maybeHiddenMarkers,this)==-1)&&(r.maybeUnhiddenMarkers||(r.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},bn.prototype.detachLine=function(e){if(this.lines.splice(be(this.lines,e),1),!this.lines.length&&this.doc.cm){var r=this.doc.cm.curOp;(r.maybeHiddenMarkers||(r.maybeHiddenMarkers=[])).push(this)}},Ot(bn);function ei(e,r,s,o,l){if(o&&o.shared)return Iy(e,r,s,o,l);if(e.cm&&!e.cm.curOp)return er(e.cm,ei)(e,r,s,o,l);var g=new bn(e,l),w=pe(r,s);if(o&&L(o,g,!1),w>0||w==0&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=G("span",[g.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(Vl(e,r.line,r,s,g)||r.line!=s.line&&Vl(e,s.line,r,s,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");bv()}g.addToHistory&&qu(e,{from:r,to:s,origin:"markText"},e.sel,NaN);var _=r.line,A=e.cm,T;if(e.iter(_,s.line+1,function(Q){A&&g.collapsed&&!A.options.lineWrapping&&Gr(Q)==A.display.maxLine&&(T=!0),g.collapsed&&_!=r.line&&Ie(Q,0),xv(Q,new yo(g,_==r.line?r.ch:null,_==s.line?s.ch:null)),++_}),g.collapsed&&e.iter(r.line,s.line+1,function(Q){hn(e,Q)&&Ie(Q,0)}),g.clearOnEnter&&st(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(yv(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),g.collapsed&&(g.id=++oc,g.atomic=!0),A){if(T&&(A.curOp.updateMaxLine=!0),g.collapsed)br(A,r.line,s.line+1);else if(g.className||g.startStyle||g.endStyle||g.css||g.attributes||g.title)for(var $=r.line;$<=s.line;$++)pn(A,$,"text");g.atomic&&Vu(A.doc),ar(A,"markerAdded",A,g)}return g}var Ui=function(e,r){this.markers=e,this.primary=r;for(var s=0;s<e.length;++s)e[s].parent=this};Ui.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ar(this,"clear")},Ui.prototype.find=function(e,r){return this.primary.find(e,r)},Ot(Ui);function Iy(e,r,s,o,l){o=L(o),o.shared=!1;var g=[ei(e,r,s,o,l)],w=g[0],_=o.widgetNode;return yn(e,function(A){_&&(o.widgetNode=_.cloneNode(!0)),g.push(ei(A,dt(A,r),dt(A,s),o,l));for(var T=0;T<A.linked.length;++T)if(A.linked[T].isParent)return;w=Pe(g)}),new Ui(g,w)}function ac(e){return e.findMarks(ee(e.first,0),e.clipPos(ee(e.lastLine())),function(r){return r.parent})}function Ly(e,r){for(var s=0;s<r.length;s++){var o=r[s],l=o.find(),g=e.clipPos(l.from),w=e.clipPos(l.to);if(pe(g,w)){var _=ei(e,g,w,o.primary,o.primary.type);o.markers.push(_),_.parent=o}}}function Fy(e){for(var r=function(o){var l=e[o],g=[l.primary.doc];yn(l.primary.doc,function(A){return g.push(A)});for(var w=0;w<l.markers.length;w++){var _=l.markers[w];be(g,_.doc)==-1&&(_.parent=null,l.markers.splice(w--,1))}},s=0;s<e.length;s++)r(s)}var My=0,wr=function(e,r,s,o,l){if(!(this instanceof wr))return new wr(e,r,s,o,l);s==null&&(s=0),ji.call(this,[new Bi([new Un("",null)])]),this.first=s,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=s;var g=ee(s,0);this.sel=gn(g),this.history=new Mo(null),this.id=++My,this.modeOption=r,this.lineSep=o,this.direction=l=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),ms(this,{from:g,to:g,text:e}),ur(this,gn(g),nt)};wr.prototype=je(ji.prototype,{constructor:wr,iter:function(e,r,s){s?this.iterN(e-this.first,r-e,s):this.iterN(this.first,this.first+this.size,e)},insert:function(e,r){for(var s=0,o=0;o<r.length;++o)s+=r[o].height;this.insertInner(e-this.first,r,s)},remove:function(e,r){this.removeInner(e-this.first,r)},getValue:function(e){var r=Ce(this,this.first,this.first+this.size);return e===!1?r:r.join(e||this.lineSeparator())},setValue:tr(function(e){var r=ee(this.first,0),s=this.first+this.size-1;Qn(this,{from:r,to:ee(s,ae(this,s).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ii(this.cm,0,0),ur(this,gn(r),nt)}),replaceRange:function(e,r,s,o){r=dt(this,r),s=s?dt(this,s):r,Jn(this,e,r,s,o)},getRange:function(e,r,s){var o=ve(this,dt(this,e),dt(this,r));return s===!1?o:o.join(s||this.lineSeparator())},getLine:function(e){var r=this.getLineHandle(e);return r&&r.text},getLineHandle:function(e){if(F(this,e))return ae(this,e)},getLineNumber:function(e){return We(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=ae(this,e)),Gr(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(this,e)},getCursor:function(e){var r=this.sel.primary(),s;return e==null||e=="head"?s=r.head:e=="anchor"?s=r.anchor:e=="end"||e=="to"||e===!1?s=r.to():s=r.from(),s},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:tr(function(e,r,s){$u(this,dt(this,typeof e=="number"?ee(e,r||0):e),null,s)}),setSelection:tr(function(e,r,s){$u(this,dt(this,e),dt(this,r||e),s)}),extendSelection:tr(function(e,r,s){Oo(this,dt(this,e),r&&dt(this,r),s)}),extendSelections:tr(function(e,r){Wu(this,Rl(this,e),r)}),extendSelectionsBy:tr(function(e,r){var s=Le(this.sel.ranges,e);Wu(this,Rl(this,s),r)}),setSelections:tr(function(e,r,s){if(!e.length)return;for(var o=[],l=0;l<e.length;l++)o[l]=new _t(dt(this,e[l].anchor),dt(this,e[l].head||e[l].anchor));r==null&&(r=Math.min(e.length-1,this.sel.primIndex)),ur(this,qr(this.cm,o,r),s)}),addSelection:tr(function(e,r,s){var o=this.sel.ranges.slice(0);o.push(new _t(dt(this,e),dt(this,r||e))),ur(this,qr(this.cm,o,o.length-1),s)}),getSelection:function(e){for(var r=this.sel.ranges,s,o=0;o<r.length;o++){var l=ve(this,r[o].from(),r[o].to());s=s?s.concat(l):l}return e===!1?s:s.join(e||this.lineSeparator())},getSelections:function(e){for(var r=[],s=this.sel.ranges,o=0;o<s.length;o++){var l=ve(this,s[o].from(),s[o].to());e!==!1&&(l=l.join(e||this.lineSeparator())),r[o]=l}return r},replaceSelection:function(e,r,s){for(var o=[],l=0;l<this.sel.ranges.length;l++)o[l]=e;this.replaceSelections(o,r,s||"+input")},replaceSelections:tr(function(e,r,s){for(var o=[],l=this.sel,g=0;g<l.ranges.length;g++){var w=l.ranges[g];o[g]={from:w.from(),to:w.to(),text:this.splitLines(e[g]),origin:s}}for(var _=r&&r!="end"&&wy(this,o,r),A=o.length-1;A>=0;A--)Qn(this,o[A]);_?Gu(this,_):this.cm&&Vn(this.cm)}),undo:tr(function(){zo(this,"undo")}),redo:tr(function(){zo(this,"redo")}),undoSelection:tr(function(){zo(this,"undo",!0)}),redoSelection:tr(function(){zo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,s=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||++s;return{undo:r,redo:s}},clearHistory:function(){var e=this;this.history=new Mo(this.history),yn(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:Yn(this.history.done),undone:Yn(this.history.undone)}},setHistory:function(e){var r=this.history=new Mo(this.history);r.done=Yn(e.done.slice(0),null,!0),r.undone=Yn(e.undone.slice(0),null,!0)},setGutterMarker:tr(function(e,r,s){return zi(this,e,"gutter",function(o){var l=o.gutterMarkers||(o.gutterMarkers={});return l[r]=s,!s&&he(l)&&(o.gutterMarkers=null),!0})}),clearGutter:tr(function(e){var r=this;this.iter(function(s){s.gutterMarkers&&s.gutterMarkers[e]&&zi(r,s,"gutter",function(){return s.gutterMarkers[e]=null,he(s.gutterMarkers)&&(s.gutterMarkers=null),!0})})}),lineInfo:function(e){var r;if(typeof e=="number"){if(!F(this,e))return null;if(r=e,e=ae(this,e),!e)return null}else if(r=We(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:tr(function(e,r,s){return zi(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]=s;else{if(W(s).test(o[l]))return!1;o[l]+=" "+s}return!0})}),removeLineClass:tr(function(e,r,s){return zi(this,e,r=="gutter"?"gutter":"class",function(o){var l=r=="text"?"textClass":r=="background"?"bgClass":r=="gutter"?"gutterClass":"wrapClass",g=o[l];if(g)if(s==null)o[l]=null;else{var w=g.match(W(s));if(!w)return!1;var _=w.index+w[0].length;o[l]=g.slice(0,w.index)+(!w.index||_==g.length?"":" ")+g.slice(_)||null}else return!1;return!0})}),addLineWidget:tr(function(e,r,s){return Dy(this,e,r,s)}),removeLineWidget:function(e){e.clear()},markText:function(e,r,s){return ei(this,dt(this,e),dt(this,r),s,s&&s.type||"range")},setBookmark:function(e,r){var s={replacedWith:r&&(r.nodeType==null?r.widget:r),insertLeft:r&&r.insertLeft,clearWhenEmpty:!1,shared:r&&r.shared,handleMouseEvents:r&&r.handleMouseEvents};return e=dt(this,e),ei(this,e,e,s,"bookmark")},findMarksAt:function(e){e=dt(this,e);var r=[],s=ae(this,e.line).markedSpans;if(s)for(var o=0;o<s.length;++o){var l=s[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,s){e=dt(this,e),r=dt(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(g){var w=g.markedSpans;if(w)for(var _=0;_<w.length;_++){var A=w[_];!(A.to!=null&&l==e.line&&e.ch>=A.to||A.from==null&&l!=e.line||A.from!=null&&l==r.line&&A.from>=r.ch)&&(!s||s(A.marker))&&o.push(A.marker.parent||A.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var s=r.markedSpans;if(s)for(var o=0;o<s.length;++o)s[o].from!=null&&e.push(s[o].marker)}),e},posFromIndex:function(e){var r,s=this.first,o=this.lineSeparator().length;return this.iter(function(l){var g=l.text.length+o;if(g>e)return r=e,!0;e-=g,++s}),dt(this,ee(s,r))},indexFromPos:function(e){e=dt(this,e);var r=e.ch;if(e.line<this.first||e.ch<0)return 0;var s=this.lineSeparator().length;return this.iter(this.first,e.line,function(o){r+=o.text.length+s}),r},copy:function(e){var r=new wr(Ce(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,s=this.first+this.size;e.from!=null&&e.from>r&&(r=e.from),e.to!=null&&e.to<s&&(s=e.to);var o=new wr(Ce(this,r,s),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}],Ly(o,ac(this)),o},unlinkDoc:function(e){if(e instanceof Pt&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var s=this.linked[r];if(s.doc!=e)continue;this.linked.splice(r,1),e.unlinkDoc(this),Fy(ac(this));break}if(e.history==this.history){var o=[e.id];yn(e,function(l){return o.push(l.id)},!0),e.history=new Mo(null),e.history.done=Yn(this.history.done,o),e.history.undone=Yn(this.history.undone,o)}},iterLinkedDocs:function(e){yn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):oe(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:tr(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&xy(this.cm)})}),wr.prototype.eachLine=wr.prototype.iter;var sc=0;function Ry(e){var r=this;if(lc(r),wt(r,e)||an(r.display,e))return;kt(e),a&&(sc=+new Date);var s=Tn(r,e,!0),o=e.dataTransfer.files;if(!s||r.isReadOnly())return;if(o&&o.length&&window.FileReader&&window.File)for(var l=o.length,g=Array(l),w=0,_=function(){++w==l&&er(r,function(){s=dt(r.doc,s);var se={from:s,to:s,text:r.doc.splitLines(g.filter(function(we){return we!=null}).join(r.doc.lineSeparator())),origin:"paste"};Qn(r.doc,se),Gu(r.doc,gn(dt(r.doc,s),dt(r.doc,vn(se))))})()},A=function(se,we){if(r.options.allowDropFileTypes&&be(r.options.allowDropFileTypes,se.type)==-1){_();return}var _e=new FileReader;_e.onerror=function(){return _()},_e.onload=function(){var Re=_e.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Re)){_();return}g[we]=Re,_()},_e.readAsText(se)},T=0;T<o.length;T++)A(o[T],T);else{if(r.state.draggingText&&r.doc.sel.contains(s)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var $=e.dataTransfer.getData("Text");if($){var Q;if(r.state.draggingText&&!r.state.draggingText.copy&&(Q=r.listSelections()),Po(r.doc,gn(s,s)),Q)for(var de=0;de<Q.length;++de)Jn(r.doc,"",Q[de].anchor,Q[de].head,"drag");r.replaceSelection($,"around","paste"),r.display.input.focus()}}catch(se){}}}function Oy(e,r){if(a&&(!e.state.draggingText||+new Date-sc<100)){vr(r);return}if(wt(e,r)||an(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!v){var s=k("img",null,null,"position: fixed; left: 0; top: 0;");s.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(s.width=s.height=1,e.display.wrapper.appendChild(s),s._top=s.offsetTop),r.dataTransfer.setDragImage(s,0,0),m&&s.parentNode.removeChild(s)}}function Py(e,r){var s=Tn(e,r);if(!s)return;var o=document.createDocumentFragment();xu(e,s,o),e.display.dragCursor||(e.display.dragCursor=k("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),K(e.display.dragCursor,o)}function lc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function uc(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),s=[],o=0;o<r.length;o++){var l=r[o].CodeMirror;l&&s.push(l)}s.length&&s[0].operation(function(){for(var g=0;g<s.length;g++)e(s[g])})}var cc=!1;function Ny(){if(cc)return;zy(),cc=!0}function zy(){var e;st(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,uc(By)},100))}),st(window,"blur",function(){return uc(Kn)})}function By(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var wn={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"},Hi=0;Hi<10;Hi++)wn[Hi+48]=wn[Hi+96]=String(Hi);for(var Bo=65;Bo<=90;Bo++)wn[Bo]=String.fromCharCode(Bo);for(var Wi=1;Wi<=12;Wi++)wn[Wi+111]=wn[Wi+63235]="F"+Wi;var sn={};sn.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"},sn.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"},sn.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"},sn.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"]},sn.default=C?sn.macDefault:sn.pcDefault;function jy(e){var r=e.split(/-(?!$)/);e=r[r.length-1];for(var s,o,l,g,w=0;w<r.length-1;w++){var _=r[w];if(/^(cmd|meta|m)$/i.test(_))g=!0;else if(/^a(lt)?$/i.test(_))s=!0;else if(/^(c|ctrl|control)$/i.test(_))o=!0;else if(/^s(hift)?$/i.test(_))l=!0;else throw new Error("Unrecognized modifier name: "+_)}return s&&(e="Alt-"+e),o&&(e="Ctrl-"+e),g&&(e="Cmd-"+e),l&&(e="Shift-"+e),e}function qy(e){var r={};for(var s in e)if(e.hasOwnProperty(s)){var o=e[s];if(/^(name|fallthrough|(de|at)tach)$/.test(s))continue;if(o=="..."){delete e[s];continue}for(var l=Le(s.split(" "),jy),g=0;g<l.length;g++){var w=void 0,_=void 0;g==l.length-1?(_=l.join(" "),w=o):(_=l.slice(0,g+1).join(" "),w="...");var A=r[_];if(!A)r[_]=w;else if(A!=w)throw new Error("Inconsistent bindings for "+_)}delete e[s]}for(var T in r)e[T]=r[T];return e}function ti(e,r,s,o){r=jo(r);var l=r.call?r.call(e,o):r[e];if(l===!1)return"nothing";if(l==="...")return"multi";if(l!=null&&s(l))return"handled";if(r.fallthrough){if(Object.prototype.toString.call(r.fallthrough)!="[object Array]")return ti(e,r.fallthrough,s,o);for(var g=0;g<r.fallthrough.length;g++){var w=ti(e,r.fallthrough[g],s,o);if(w)return w}}}function dc(e){var r=typeof e=="string"?e:wn[e.keyCode];return r=="Ctrl"||r=="Alt"||r=="Shift"||r=="Mod"}function fc(e,r,s){var o=e;return r.altKey&&o!="Alt"&&(e="Alt-"+e),(j?r.metaKey:r.ctrlKey)&&o!="Ctrl"&&(e="Ctrl-"+e),(j?r.ctrlKey:r.metaKey)&&o!="Mod"&&(e="Cmd-"+e),!s&&r.shiftKey&&o!="Shift"&&(e="Shift-"+e),e}function hc(e,r){if(m&&e.keyCode==34&&e.char)return!1;var s=wn[e.keyCode];return s==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(s=e.code),fc(s,e,r))}function jo(e){return typeof e=="string"?sn[e]:e}function ri(e,r){for(var s=e.doc.sel.ranges,o=[],l=0;l<s.length;l++){for(var g=r(s[l]);o.length&&pe(g.from,Pe(o).to)<=0;){var w=o.pop();if(pe(w.from,g.from)<0){g.from=w.from;break}}o.push(g)}Ar(e,function(){for(var _=o.length-1;_>=0;_--)Jn(e.doc,"",o[_].from,o[_].to,"+delete");Vn(e)})}function bs(e,r,s){var o=Ne(e.text,r+s,s);return o<0||o>e.text.length?null:o}function ws(e,r,s){var o=bs(e,r.ch,s);return o==null?null:new ee(r.line,o,s<0?"after":"before")}function xs(e,r,s,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var g=Et(s,r.doc.direction);if(g){var w=l<0?Pe(g):g[0],_=l<0==(w.level==1),A=_?"after":"before",T;if(w.level>0||r.doc.direction=="rtl"){var $=Wn(r,s);T=l<0?s.text.length-1:0;var Q=Vr(r,$,T).top;T=it(function(de){return Vr(r,$,de).top==Q},l<0==(w.level==1)?w.from:w.to-1,T),A=="before"&&(T=bs(s,T,1))}else T=l<0?w.to:w.from;return new ee(o,T,A)}}return new ee(o,l<0?s.text.length:0,l<0?"before":"after")}function Uy(e,r,s,o){var l=Et(r,e.doc.direction);if(!l)return ws(r,s,o);s.ch>=r.text.length?(s.ch=r.text.length,s.sticky="before"):s.ch<=0&&(s.ch=0,s.sticky="after");var g=tt(l,s.ch,s.sticky),w=l[g];if(e.doc.direction=="ltr"&&w.level%2==0&&(o>0?w.to>s.ch:w.from<s.ch))return ws(r,s,o);var _=function(qe,Ze){return bs(r,qe instanceof ee?qe.ch:qe,Ze)},A,T=function(qe){return e.options.lineWrapping?(A=A||Wn(e,r),vu(e,r,A,qe)):{begin:0,end:r.text.length}},$=T(s.sticky=="before"?_(s,-1):s.ch);if(e.doc.direction=="rtl"||w.level==1){var Q=w.level==1==o<0,de=_(s,Q?1:-1);if(de!=null&&(Q?de<=w.to&&de<=$.end:de>=w.from&&de>=$.begin)){var se=Q?"before":"after";return new ee(s.line,de,se)}}var we=function(qe,Ze,Ue){for(var et=function(Mt,rr){return rr?new ee(s.line,_(Mt,1),"before"):new ee(s.line,Mt,"after")};qe>=0&&qe<l.length;qe+=Ze){var ct=l[qe],ut=Ze>0==(ct.level!=1),yt=ut?Ue.begin:_(Ue.end,-1);if(ct.from<=yt&&yt<ct.to)return et(yt,ut);if(yt=ut?ct.from:_(ct.to,-1),Ue.begin<=yt&&yt<Ue.end)return et(yt,ut)}},_e=we(g+o,o,$);if(_e)return _e;var Re=o>0?$.end:_($.begin,-1);return Re!=null&&!(o>0&&Re==r.text.length)&&(_e=we(o>0?0:l.length-1,o,T(Re)),_e)?_e:null}var $i={selectAll:Zu,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),nt)},killLine:function(e){return ri(e,function(r){if(r.empty()){var s=ae(e.doc,r.head.line).text.length;return r.head.ch==s&&r.head.line<e.lastLine()?{from:r.head,to:ee(r.head.line+1,0)}:{from:r.head,to:ee(r.head.line,s)}}else return{from:r.from(),to:r.to()}})},deleteLine:function(e){return ri(e,function(r){return{from:ee(r.from().line,0),to:dt(e.doc,ee(r.to().line+1,0))}})},delLineLeft:function(e){return ri(e,function(r){return{from:ee(r.from().line,0),to:r.from()}})},delWrappedLineLeft:function(e){return ri(e,function(r){var s=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:s},"div");return{from:o,to:r.from()}})},delWrappedLineRight:function(e){return ri(e,function(r){var s=e.charCoords(r.head,"div").top+5,o=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"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(ee(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ee(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(r){return pc(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 Hy(e,r.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:s},"div")},Ae)},goLineLeft:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5;return e.coordsChar({left:0,top:s},"div")},Ae)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(r){var s=e.cursorCoords(r.head,"div").top+5,o=e.coordsChar({left:0,top:s},"div");return o.ch<e.getLine(o.line).search(/\S/)?mc(e,r.head):o},Ae)},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=[],s=e.listSelections(),o=e.options.tabSize,l=0;l<s.length;l++){var g=s[l].from(),w=xe(e.getLine(g.line),g.ch,o);r.push(ft(o-w%o))}e.replaceSelections(r)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ar(e,function(){for(var r=e.listSelections(),s=[],o=0;o<r.length;o++){if(!r[o].empty())continue;var l=r[o].head,g=ae(e.doc,l.line).text;if(g){if(l.ch==g.length&&(l=new ee(l.line,l.ch-1)),l.ch>0)l=new ee(l.line,l.ch+1),e.replaceRange(g.charAt(l.ch-1)+g.charAt(l.ch-2),ee(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var w=ae(e.doc,l.line-1).text;w&&(l=new ee(l.line,1),e.replaceRange(g.charAt(0)+e.doc.lineSeparator()+w.charAt(w.length-1),ee(l.line-1,w.length-1),l,"+transpose"))}}s.push(new _t(l,l))}e.setSelections(s)})},newlineAndIndent:function(e){return Ar(e,function(){for(var r=e.listSelections(),s=r.length-1;s>=0;s--)e.replaceRange(e.doc.lineSeparator(),r[s].anchor,r[s].head,"+input");r=e.listSelections();for(var o=0;o<r.length;o++)e.indentLine(r[o].from().line,null,!0);Vn(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function pc(e,r){var s=ae(e.doc,r),o=Gr(s);return o!=s&&(r=We(o)),xs(!0,e,o,r,1)}function Hy(e,r){var s=ae(e.doc,r),o=_v(s);return o!=s&&(r=We(o)),xs(!0,e,s,r,-1)}function mc(e,r){var s=pc(e,r.line),o=ae(e.doc,s.line),l=Et(o,e.doc.direction);if(!l||l[0].level==0){var g=Math.max(s.ch,o.text.search(/\S/)),w=r.line==s.line&&r.ch<=g&&r.ch;return ee(s.line,w?0:g,s.sticky)}return s}function qo(e,r,s){if(typeof r=="string"&&(r=$i[r],!r))return!1;e.display.input.ensurePolled();var o=e.display.shift,l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s&&(e.display.shift=!1),l=r(e)!=Xe}finally{e.display.shift=o,e.state.suppressEdits=!1}return l}function Wy(e,r,s){for(var o=0;o<e.state.keyMaps.length;o++){var l=ti(r,e.state.keyMaps[o],s,e);if(l)return l}return e.options.extraKeys&&ti(r,e.options.extraKeys,s,e)||ti(r,e.options.keyMap,s,e)}var $y=new Se;function Gi(e,r,s,o){var l=e.state.keySeq;if(l){if(dc(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:$y.set(50,function(){e.state.keySeq==l&&(e.state.keySeq=null,e.display.input.reset())}),gc(e,l+" "+r,s,o))return!0}return gc(e,r,s,o)}function gc(e,r,s,o){var l=Wy(e,r,o);return l=="multi"&&(e.state.keySeq=r),l=="handled"&&ar(e,"keyHandled",e,r,s),(l=="handled"||l=="multi")&&(kt(s),ns(e)),!!l}function vc(e,r){var s=hc(r,!0);return s?r.shiftKey&&!e.state.keySeq?Gi(e,"Shift-"+s,r,function(o){return qo(e,o,!0)})||Gi(e,s,r,function(o){if(typeof o=="string"?/^go[A-Z]/.test(o):o.motion)return qo(e,o)}):Gi(e,s,r,function(o){return qo(e,o)}):!1}function Gy(e,r,s){return Gi(e,"'"+s+"'",r,function(o){return qo(e,o,!0)})}var ks=null;function yc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=I(),wt(r,e))return;a&&d<11&&e.keyCode==27&&(e.returnValue=!1);var s=e.keyCode;r.display.shift=s==16||e.shiftKey;var o=vc(r,e);m&&(ks=o?s:null,!o&&s==88&&!Z&&(C?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),i&&!C&&!o&&s==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),s==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&Ky(r)}function Ky(e){var r=e.display.lineDiv;P(r,"CodeMirror-crosshair");function s(o){(o.keyCode==18||!o.altKey)&&(Y(r,"CodeMirror-crosshair"),Je(document,"keyup",s),Je(document,"mouseover",s))}st(document,"keyup",s),st(document,"mouseover",s)}function bc(e){e.keyCode==16&&(this.doc.sel.shift=!1),wt(this,e)}function wc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(an(r.display,e)||wt(r,e)||e.ctrlKey&&!e.altKey||C&&e.metaKey)return;var s=e.keyCode,o=e.charCode;if(m&&s==ks){ks=null,kt(e);return}if(m&&(!e.which||e.which<10)&&vc(r,e))return;var l=String.fromCharCode(o==null?s:o);if(l=="\b")return;if(Gy(r,e,l))return;r.display.input.onKeyPress(e)}var Vy=400,Ss=function(e,r,s){this.time=e,this.pos=r,this.button=s};Ss.prototype.compare=function(e,r,s){return this.time+Vy>e&&pe(r,this.pos)==0&&s==this.button};var Ki,Vi;function Xy(e,r){var s=+new Date;return Vi&&Vi.compare(s,e,r)?(Ki=Vi=null,"triple"):Ki&&Ki.compare(s,e,r)?(Vi=new Ss(s,e,r),Ki=null,"double"):(Ki=new Ss(s,e,r),Vi=null,"single")}function xc(e){var r=this,s=r.display;if(wt(r,e)||s.activeTouch&&s.input.supportsTouch())return;if(s.input.ensurePolled(),s.shift=e.shiftKey,an(s,e)){f||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));return}if(Es(r,e))return;var o=Tn(r,e),l=or(e),g=o?Xy(o,l):"single";if(window.focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),o&&Yy(r,l,o,g,e))return;l==1?o?Qy(r,o,g,e):Nt(e)==s.scroller&&kt(e):l==2?(o&&Oo(r.doc,o),setTimeout(function(){return s.input.focus()},20)):l==3&&(J?r.display.input.onContextMenu(e):is(r))}function Yy(e,r,s,o,l){var g="Click";return o=="double"?g="Double"+g:o=="triple"&&(g="Triple"+g),g=(r==1?"Left":r==2?"Middle":"Right")+g,Gi(e,fc(g,l),l,function(w){if(typeof w=="string"&&(w=$i[w]),!w)return!1;var _=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),_=w(e,s)!=Xe}finally{e.state.suppressEdits=!1}return _})}function Zy(e,r,s){var o=e.getOption("configureMouse"),l=o?o(e,r,s):{};if(l.unit==null){var g=N?s.shiftKey&&s.metaKey:s.altKey;l.unit=g?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||s.shiftKey),l.addNew==null&&(l.addNew=C?s.metaKey:s.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(C?s.altKey:s.ctrlKey)),l}function Qy(e,r,s,o){a?setTimeout(q(ku,e),0):e.curOp.focus=I();var l=Zy(e,s,o),g=e.doc.sel,w;e.options.dragDrop&&rn&&!e.isReadOnly()&&s=="single"&&(w=g.contains(r))>-1&&(pe((w=g.ranges[w]).from(),r)<0||r.xRel>0)&&(pe(w.to(),r)>0||r.xRel<0)?Jy(e,o,r,l):eb(e,o,r,l)}function Jy(e,r,s,o){var l=e.display,g=!1,w=er(e,function(T){f&&(l.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:is(e)),Je(l.wrapper.ownerDocument,"mouseup",w),Je(l.wrapper.ownerDocument,"mousemove",_),Je(l.scroller,"dragstart",A),Je(l.scroller,"drop",w),g||(kt(T),o.addNew||Oo(e.doc,s,null,null,o.extend),f&&!v||a&&d==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),_=function(T){g=g||Math.abs(r.clientX-T.clientX)+Math.abs(r.clientY-T.clientY)>=10},A=function(){return g=!0};f&&(l.scroller.draggable=!0),e.state.draggingText=w,w.copy=!o.moveOnDrag,st(l.wrapper.ownerDocument,"mouseup",w),st(l.wrapper.ownerDocument,"mousemove",_),st(l.scroller,"dragstart",A),st(l.scroller,"drop",w),e.state.delayingBlurEvent=!0,setTimeout(function(){return l.input.focus()},20),l.scroller.dragDrop&&l.scroller.dragDrop()}function kc(e,r,s){if(s=="char")return new _t(r,r);if(s=="word")return e.findWordAt(r);if(s=="line")return new _t(ee(r.line,0),dt(e.doc,ee(r.line+1,0)));var o=s(e,r);return new _t(o.from,o.to)}function eb(e,r,s,o){a&&is(e);var l=e.display,g=e.doc;kt(r);var w,_,A=g.sel,T=A.ranges;if(o.addNew&&!o.extend?(_=g.sel.contains(s),_>-1?w=T[_]:w=new _t(s,s)):(w=g.sel.primary(),_=g.sel.primIndex),o.unit=="rectangle")o.addNew||(w=new _t(s,s)),s=Tn(e,r,!0,!0),_=-1;else{var $=kc(e,s,o.unit);o.extend?w=vs(w,$.anchor,$.head,o.extend):w=$}o.addNew?_==-1?(_=T.length,ur(g,qr(e,T.concat([w]),_),{scroll:!1,origin:"*mouse"})):T.length>1&&T[_].empty()&&o.unit=="char"&&!o.extend?(ur(g,qr(e,T.slice(0,_).concat(T.slice(_+1)),0),{scroll:!1,origin:"*mouse"}),A=g.sel):ys(g,_,w,fe):(_=0,ur(g,new Lr([w],0),fe),A=g.sel);var Q=s;function de(Ue){if(pe(Q,Ue)==0)return;if(Q=Ue,o.unit=="rectangle"){for(var et=[],ct=e.options.tabSize,ut=xe(ae(g,s.line).text,s.ch,ct),yt=xe(ae(g,Ue.line).text,Ue.ch,ct),Mt=Math.min(ut,yt),rr=Math.max(ut,yt),Bt=Math.min(s.line,Ue.line),Tr=Math.min(e.lastLine(),Math.max(s.line,Ue.line));Bt<=Tr;Bt++){var xr=ae(g,Bt).text,Kt=Qe(xr,Mt,ct);Mt==rr?et.push(new _t(ee(Bt,Kt),ee(Bt,Kt))):xr.length>Kt&&et.push(new _t(ee(Bt,Kt),ee(Bt,Qe(xr,rr,ct))))}et.length||et.push(new _t(s,s)),ur(g,qr(e,A.ranges.slice(0,_).concat(et),_),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Ue)}else{var kr=w,sr=kc(e,Ue,o.unit),Xt=kr.anchor,Vt;pe(sr.anchor,Xt)>0?(Vt=sr.head,Xt=zt(kr.from(),sr.anchor)):(Vt=sr.anchor,Xt=vt(kr.to(),sr.head));var jt=A.ranges.slice(0);jt[_]=tb(e,new _t(dt(g,Xt),Vt)),ur(g,qr(e,jt,_),fe)}}var se=l.wrapper.getBoundingClientRect(),we=0;function _e(Ue){var et=++we,ct=Tn(e,Ue,!0,o.unit=="rectangle");if(!ct)return;if(pe(ct,Q)!=0){e.curOp.focus=I(),de(ct);var ut=Do(l,g);(ct.line>=ut.to||ct.line<ut.from)&&setTimeout(er(e,function(){we==et&&_e(Ue)}),150)}else{var yt=Ue.clientY<se.top?-20:Ue.clientY>se.bottom?20:0;yt&&setTimeout(er(e,function(){if(we!=et)return;l.scroller.scrollTop+=yt,_e(Ue)}),50)}}function Re(Ue){e.state.selectingText=!1,we=Infinity,Ue&&(kt(Ue),l.input.focus()),Je(l.wrapper.ownerDocument,"mousemove",qe),Je(l.wrapper.ownerDocument,"mouseup",Ze),g.history.lastSelOrigin=null}var qe=er(e,function(Ue){Ue.buttons===0||!or(Ue)?Re(Ue):_e(Ue)}),Ze=er(e,Re);e.state.selectingText=Ze,st(l.wrapper.ownerDocument,"mousemove",qe),st(l.wrapper.ownerDocument,"mouseup",Ze)}function tb(e,r){var s=r.anchor,o=r.head,l=ae(e.doc,s.line);if(pe(s,o)==0&&s.sticky==o.sticky)return r;var g=Et(l);if(!g)return r;var w=tt(g,s.ch,s.sticky),_=g[w];if(_.from!=s.ch&&_.to!=s.ch)return r;var A=w+(_.from==s.ch==(_.level!=1)?0:1);if(A==0||A==g.length)return r;var T;if(o.line!=s.line)T=(o.line-s.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var $=tt(g,o.ch,o.sticky),Q=$-w||(o.ch-s.ch)*(_.level==1?-1:1);$==A-1||$==A?T=Q<0:T=Q>0}var de=g[A+(T?-1:0)],se=T==(de.level==1),we=se?de.from:de.to,_e=se?"after":"before";return s.ch==we&&s.sticky==_e?r:new _t(new ee(s.line,we,_e),o)}function Sc(e,r,s,o){var l,g;if(r.touches)l=r.touches[0].clientX,g=r.touches[0].clientY;else try{l=r.clientX,g=r.clientY}catch(de){return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&kt(r);var w=e.display,_=w.lineDiv.getBoundingClientRect();if(g>_.bottom||!Tt(e,s))return Cr(r);g-=_.top-w.viewOffset;for(var A=0;A<e.display.gutterSpecs.length;++A){var T=w.gutters.childNodes[A];if(T&&T.getBoundingClientRect().right>=l){var $=Ve(e.doc,g),Q=e.display.gutterSpecs[A];return ht(e,s,e,$,Q.className,r),Cr(r)}}}function Es(e,r){return Sc(e,r,"gutterClick",!0)}function Ec(e,r){if(an(e.display,r)||rb(e,r))return;if(wt(e,r,"contextmenu"))return;J||e.display.input.onContextMenu(r)}function rb(e,r){return Tt(e,"gutterContextMenu")?Sc(e,r,"gutterContextMenu",!1):!1}function Cc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ti(e)}var ni={toString:function(){return"CodeMirror.Init"}},_c={},Uo={};function nb(e){var r=e.optionHandlers;function s(o,l,g,w){e.defaults[o]=l,g&&(r[o]=w?function(_,A,T){T!=ni&&g(_,A,T)}:g)}e.defineOption=s,e.Init=ni,s("value","",function(o,l){return o.setValue(l)},!0),s("mode",null,function(o,l){o.doc.modeOption=l,ps(o)},!0),s("indentUnit",2,ps,!0),s("indentWithTabs",!1),s("smartIndent",!0),s("tabSize",4,function(o){Pi(o),Ti(o),br(o)},!0),s("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!l)return;var g=[],w=o.doc.first;o.doc.iter(function(A){for(var T=0;;){var $=A.text.indexOf(l,T);if($==-1)break;T=$+l.length,g.push(ee(w,$))}w++});for(var _=g.length-1;_>=0;_--)Jn(o.doc,l,g[_],ee(g[_].line,g[_].ch+l.length))}),s("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,l,g){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),g!=ni&&o.refresh()}),s("specialCharPlaceholder",Fv,function(o){return o.refresh()},!0),s("electricChars",!0),s("inputStyle",D?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),s("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),s("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),s("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),s("rtlMoveVisually",!R),s("wholeLineUpdateBefore",!0),s("theme","default",function(o){Cc(o),Oi(o)},!0),s("keyMap","default",function(o,l,g){var w=jo(l),_=g!=ni&&jo(g);_&&_.detach&&_.detach(o,w),w.attach&&w.attach(o,_||null)}),s("extraKeys",null),s("configureMouse",null),s("lineWrapping",!1,ob,!0),s("gutters",[],function(o,l){o.display.gutterSpecs=fs(l,o.options.lineNumbers),Oi(o)},!0),s("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?ts(o.display)+"px":"0",o.refresh()},!0),s("coverGutterNextToScrollbar",!1,function(o){return Xn(o)},!0),s("scrollbarStyle","native",function(o){Tu(o),Xn(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),s("lineNumbers",!1,function(o,l){o.display.gutterSpecs=fs(o.options.gutters,l),Oi(o)},!0),s("firstLineNumber",1,Oi,!0),s("lineNumberFormatter",function(o){return o},Oi,!0),s("showCursorWhenSelecting",!1,Di,!0),s("resetSelectionOnContextMenu",!0),s("lineWiseCopyCut",!0),s("pasteLinesPerSelection",!0),s("selectionsMayTouch",!1),s("readOnly",!1,function(o,l){l=="nocursor"&&(Kn(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),s("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),s("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),s("dragDrop",!0,ib),s("allowDropFileTypes",null),s("cursorBlinkRate",530),s("cursorScrollMargin",0),s("cursorHeight",1,Di,!0),s("singleCursorHeightPerLine",!0,Di,!0),s("workTime",100),s("workDelay",100),s("flattenSpans",!0,Pi,!0),s("addModeClass",!1,Pi,!0),s("pollInterval",100),s("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),s("historyEventDelay",1250),s("viewportMargin",10,function(o){return o.refresh()},!0),s("maxHighlightLength",1e4,Pi,!0),s("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),s("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),s("autofocus",null),s("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),s("phrases",null)}function ib(e,r,s){var o=s&&s!=ni;if(!r!=!o){var l=e.display.dragFunctions,g=r?st:Je;g(e.display.scroller,"dragstart",l.start),g(e.display.scroller,"dragenter",l.enter),g(e.display.scroller,"dragover",l.over),g(e.display.scroller,"dragleave",l.leave),g(e.display.scroller,"drop",l.drop)}}function ob(e){e.options.lineWrapping?(P(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Y(e.display.wrapper,"CodeMirror-wrap"),Wa(e)),rs(e),br(e),Ti(e),setTimeout(function(){return Xn(e)},100)}function Pt(e,r){var s=this;if(!(this instanceof Pt))return new Pt(e,r);this.options=r=r?L(r):{},L(_c,r,!1);var o=r.value;typeof o=="string"?o=new wr(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new Pt.inputStyles[r.inputStyle](this),g=this.display=new yy(e,o,l,r);g.wrapper.CodeMirror=this,Cc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Tu(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 Se,keySeq:null,specialChars:null},r.autofocus&&!D&&g.input.focus(),a&&d<11&&setTimeout(function(){return s.display.input.reset(!0)},20),ab(this),Ny(),Fn(this),this.curOp.forceUpdate=!0,zu(this,o),r.autofocus&&!D||this.hasFocus()?setTimeout(function(){s.hasFocus()&&!s.state.focused&&os(s)},20):Kn(this);for(var w in Uo)Uo.hasOwnProperty(w)&&Uo[w](this,r[w],ni);Lu(this),r.finishInit&&r.finishInit(this);for(var _=0;_<Cs.length;++_)Cs[_](this);Mn(this),f&&r.lineWrapping&&getComputedStyle(g.lineDiv).textRendering=="optimizelegibility"&&(g.lineDiv.style.textRendering="auto")}Pt.defaults=_c,Pt.optionHandlers=Uo;function ab(e){var r=e.display;st(r.scroller,"mousedown",er(e,xc)),a&&d<11?st(r.scroller,"dblclick",er(e,function(A){if(wt(e,A))return;var T=Tn(e,A);if(!T||Es(e,A)||an(e.display,A))return;kt(A);var $=e.findWordAt(T);Oo(e.doc,$.anchor,$.head)})):st(r.scroller,"dblclick",function(A){return wt(e,A)||kt(A)}),st(r.scroller,"contextmenu",function(A){return Ec(e,A)}),st(r.input.getField(),"contextmenu",function(A){r.scroller.contains(A.target)||Ec(e,A)});var s,o={end:0};function l(){r.activeTouch&&(s=setTimeout(function(){return r.activeTouch=null},1e3),o=r.activeTouch,o.end=+new Date)}function g(A){if(A.touches.length!=1)return!1;var T=A.touches[0];return T.radiusX<=1&&T.radiusY<=1}function w(A,T){if(T.left==null)return!0;var $=T.left-A.left,Q=T.top-A.top;return $*$+Q*Q>20*20}st(r.scroller,"touchstart",function(A){if(!wt(e,A)&&!g(A)&&!Es(e,A)){r.input.ensurePolled(),clearTimeout(s);var T=+new Date;r.activeTouch={start:T,moved:!1,prev:T-o.end<=300?o:null},A.touches.length==1&&(r.activeTouch.left=A.touches[0].pageX,r.activeTouch.top=A.touches[0].pageY)}}),st(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),st(r.scroller,"touchend",function(A){var T=r.activeTouch;if(T&&!an(r,A)&&T.left!=null&&!T.moved&&new Date-T.start<300){var $=e.coordsChar(r.activeTouch,"page"),Q;!T.prev||w(T,T.prev)?Q=new _t($,$):!T.prev.prev||w(T,T.prev.prev)?Q=e.findWordAt($):Q=new _t(ee($.line,0),dt(e.doc,ee($.line+1,0))),e.setSelection(Q.anchor,Q.head),e.focus(),kt(A)}l()}),st(r.scroller,"touchcancel",l),st(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Li(e,r.scroller.scrollTop),In(e,r.scroller.scrollLeft,!0),ht(e,"scroll",e))}),st(r.scroller,"mousewheel",function(A){return Ru(e,A)}),st(r.scroller,"DOMMouseScroll",function(A){return Ru(e,A)}),st(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(A){wt(e,A)||vr(A)},over:function(A){wt(e,A)||(Py(e,A),vr(A))},start:function(A){return Oy(e,A)},drop:er(e,Ry),leave:function(A){wt(e,A)||lc(e)}};var _=r.input.getField();st(_,"keyup",function(A){return bc.call(e,A)}),st(_,"keydown",er(e,yc)),st(_,"keypress",er(e,wc)),st(_,"focus",function(A){return os(e,A)}),st(_,"blur",function(A){return Kn(e,A)})}var Cs=[];Pt.defineInitHook=function(e){return Cs.push(e)};function Xi(e,r,s,o){var l=e.doc,g;s==null&&(s="add"),s=="smart"&&(l.mode.indent?g=Si(e,r).state:s="prev");var w=e.options.tabSize,_=ae(l,r),A=xe(_.text,null,w);_.stateAfter&&(_.stateAfter=null);var T=_.text.match(/^\s*/)[0],$;if(!o&&!/\S/.test(_.text))$=0,s="not";else if(s=="smart"&&($=l.mode.indent(g,_.text.slice(T.length),_.text),$==Xe||$>150)){if(!o)return;s="prev"}s=="prev"?r>l.first?$=xe(ae(l,r-1).text,null,w):$=0:s=="add"?$=A+e.options.indentUnit:s=="subtract"?$=A-e.options.indentUnit:typeof s=="number"&&($=A+s),$=Math.max(0,$);var Q="",de=0;if(e.options.indentWithTabs)for(var se=Math.floor($/w);se;--se)de+=w,Q+=" ";if(de<$&&(Q+=ft($-de)),Q!=T)return Jn(l,Q,ee(r,0),ee(r,T.length),"+input"),_.stateAfter=null,!0;for(var we=0;we<l.sel.ranges.length;we++){var _e=l.sel.ranges[we];if(_e.head.line==r&&_e.head.ch<T.length){var Re=ee(r,T.length);ys(l,we,new _t(Re,Re));break}}}var Ur=null;function Ho(e){Ur=e}function _s(e,r,s,o,l){var g=e.doc;e.display.shift=!1,o||(o=g.sel);var w=+new Date-200,_=l=="paste"||e.state.pasteIncoming>w,A=oe(r),T=null;if(_&&o.ranges.length>1)if(Ur&&Ur.text.join(`
`)==r){if(o.ranges.length%Ur.text.length==0){T=[];for(var $=0;$<Ur.text.length;$++)T.push(g.splitLines(Ur.text[$]))}}else A.length==o.ranges.length&&e.options.pasteLinesPerSelection&&(T=Le(A,function(qe){return[qe]}));for(var Q=e.curOp.updateInput,de=o.ranges.length-1;de>=0;de--){var se=o.ranges[de],we=se.from(),_e=se.to();se.empty()&&(s&&s>0?we=ee(we.line,we.ch-s):e.state.overwrite&&!_?_e=ee(_e.line,Math.min(ae(g,_e.line).text.length,_e.ch+Pe(A).length)):_&&Ur&&Ur.lineWise&&Ur.text.join(`
`)==A.join(`
`)&&(we=_e=ee(we.line,0)));var Re={from:we,to:_e,text:T?T[de%T.length]:A,origin:l||(_?"paste":e.state.cutIncoming>w?"cut":"+input")};Qn(e.doc,Re),ar(e,"inputRead",e,Re)}r&&!_&&Tc(e,r),Vn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Q),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ac(e,r){var s=e.clipboardData&&e.clipboardData.getData("Text");if(s)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ar(r,function(){return _s(r,s,0,null,"paste")}),!0}function Tc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var s=e.doc.sel,o=s.ranges.length-1;o>=0;o--){var l=s.ranges[o];if(l.head.ch>100||o&&s.ranges[o-1].head.line==l.head.line)continue;var g=e.getModeAt(l.head),w=!1;if(g.electricChars){for(var _=0;_<g.electricChars.length;_++)if(r.indexOf(g.electricChars.charAt(_))>-1){w=Xi(e,l.head.line,"smart");break}}else g.electricInput&&(g.electricInput.test(ae(e.doc,l.head.line).text.slice(0,l.head.ch))&&(w=Xi(e,l.head.line,"smart")));w&&ar(e,"electricInput",e,l.head.line)}}function Dc(e){for(var r=[],s=[],o=0;o<e.doc.sel.ranges.length;o++){var l=e.doc.sel.ranges[o].head.line,g={anchor:ee(l,0),head:ee(l+1,0)};s.push(g),r.push(e.getRange(g.anchor,g.head))}return{text:r,ranges:s}}function Ic(e,r,s,o){e.setAttribute("autocorrect",s?"":"off"),e.setAttribute("autocapitalize",o?"":"off"),e.setAttribute("spellcheck",!!r)}function Lc(){var e=k("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=k("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return f?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Ic(e),r}function sb(e){var r=e.optionHandlers,s=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(o,l){var g=this.options,w=g[o];if(g[o]==l&&o!="mode")return;g[o]=l,r.hasOwnProperty(o)&&er(this,r[o])(this,l,w),ht(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"](jo(o))},removeKeyMap:function(o){for(var l=this.state.keyMaps,g=0;g<l.length;++g)if(l[g]==o||l[g].name==o)return l.splice(g,1),!0},addOverlay:pr(function(o,l){var g=o.token?o:e.getMode(this.options,o);if(g.startState)throw new Error("Overlays may not be stateful.");Be(this.state.overlays,{mode:g,modeSpec:o,opaque:l&&l.opaque,priority:l&&l.priority||0},function(w){return w.priority}),this.state.modeGen++,br(this)}),removeOverlay:pr(function(o){for(var l=this.state.overlays,g=0;g<l.length;++g){var w=l[g].modeSpec;if(w==o||typeof o=="string"&&w.name==o){l.splice(g,1),this.state.modeGen++,br(this);return}}}),indentLine:pr(function(o,l,g){typeof l!="string"&&typeof l!="number"&&(l==null?l=this.options.smartIndent?"smart":"prev":l=l?"add":"subtract"),F(this.doc,o)&&Xi(this,o,l,g)}),indentSelection:pr(function(o){for(var l=this.doc.sel.ranges,g=-1,w=0;w<l.length;w++){var _=l[w];if(_.empty())_.head.line>g&&(Xi(this,_.head.line,o,!0),g=_.head.line,w==this.doc.sel.primIndex&&Vn(this));else{var A=_.from(),T=_.to(),$=Math.max(g,A.line);g=Math.min(this.lastLine(),T.line-(T.ch?0:1))+1;for(var Q=$;Q<g;++Q)Xi(this,Q,o);var de=this.doc.sel.ranges;A.ch==0&&l.length==de.length&&de[w].from().ch>0&&ys(this.doc,w,new _t(A,de[w].to()),nt)}}}),getTokenAt:function(o,l){return Bl(this,o,l)},getLineTokens:function(o,l){return Bl(this,ee(o),l,!0)},getTokenTypeAt:function(o){o=dt(this.doc,o);var l=Pl(this,ae(this.doc,o.line)),g=0,w=(l.length-1)/2,_=o.ch,A;if(_==0)A=l[2];else for(;;){var T=g+w>>1;if((T?l[T*2-1]:0)>=_)w=T;else if(l[T*2+1]<_)g=T+1;else{A=l[T*2+2];break}}var $=A?A.indexOf("overlay "):-1;return $<0?A:$==0?null:A.slice(0,$-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 g=[];if(!s.hasOwnProperty(l))return g;var w=s[l],_=this.getModeAt(o);if(typeof _[l]=="string")w[_[l]]&&g.push(w[_[l]]);else if(_[l])for(var A=0;A<_[l].length;A++){var T=w[_[l][A]];T&&g.push(T)}else _.helperType&&w[_.helperType]?g.push(w[_.helperType]):w[_.name]&&g.push(w[_.name]);for(var $=0;$<w._global.length;$++){var Q=w._global[$];Q.pred(_,this)&&be(g,Q.val)==-1&&g.push(Q.val)}return g},getStateAfter:function(o,l){var g=this.doc;return o=hr(g,o==null?g.first+g.size-1:o),Si(this,o+1,l).state},cursorCoords:function(o,l){var g,w=this.doc.sel.primary();return o==null?g=w.head:typeof o=="object"?g=dt(this.doc,o):g=o?w.from():w.to(),jr(this,g,l||"page")},charCoords:function(o,l){return Ya(this,dt(this.doc,o),l||"page")},coordsChar:function(o,l){return o=pu(this,o,l||"page"),Qa(this,o.left,o.top)},lineAtHeight:function(o,l){return o=pu(this,{top:o,left:0},l||"page").top,Ve(this.doc,o+this.display.viewOffset)},heightAtLine:function(o,l,g){var w=!1,_;if(typeof o=="number"){var A=this.doc.first+this.doc.size-1;o<this.doc.first?o=this.doc.first:o>A&&(o=A,w=!0),_=ae(this.doc,o)}else _=o;return Co(this,_,{top:0,left:0},l||"page",g||w).top+(w?this.doc.height-on(_):0)},defaultTextHeight:function(){return $n(this.display)},defaultCharWidth:function(){return Gn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,g,w,_){var A=this.display;o=jr(this,dt(this.doc,o));var T=o.bottom,$=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),A.sizer.appendChild(l),w=="over")T=o.top;else if(w=="above"||w=="near"){var Q=Math.max(A.wrapper.clientHeight,this.doc.height),de=Math.max(A.sizer.clientWidth,A.lineSpace.clientWidth);(w=="above"||o.bottom+l.offsetHeight>Q)&&o.top>l.offsetHeight?T=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=Q&&(T=o.bottom),$+l.offsetWidth>de&&($=de-l.offsetWidth)}l.style.top=T+"px",l.style.left=l.style.right="",_=="right"?($=A.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(_=="left"?$=0:_=="middle"&&($=(A.sizer.clientWidth-l.offsetWidth)/2),l.style.left=$+"px"),g&&iy(this,{left:$,top:T,right:$+l.offsetWidth,bottom:T+l.offsetHeight})},triggerOnKeyDown:pr(yc),triggerOnKeyPress:pr(wc),triggerOnKeyUp:bc,triggerOnMouseDown:pr(xc),execCommand:function(o){if($i.hasOwnProperty(o))return $i[o].call(null,this)},triggerElectric:pr(function(o){Tc(this,o)}),findPosH:function(o,l,g,w){var _=1;l<0&&(_=-1,l=-l);for(var A=dt(this.doc,o),T=0;T<l&&!(A=As(this.doc,A,_,g,w),A.hitSide);++T);return A},moveH:pr(function(o,l){var g=this;this.extendSelectionsBy(function(w){return g.display.shift||g.doc.extend||w.empty()?As(g.doc,w.head,o,l,g.options.rtlMoveVisually):o<0?w.from():w.to()},Ae)}),deleteH:pr(function(o,l){var g=this.doc.sel,w=this.doc;g.somethingSelected()?w.replaceSelection("",null,"+delete"):ri(this,function(_){var A=As(w,_.head,o,l,!1);return o<0?{from:A,to:_.head}:{from:_.head,to:A}})}),findPosV:function(o,l,g,w){var _=1,A=w;l<0&&(_=-1,l=-l);for(var T=dt(this.doc,o),$=0;$<l;++$){var Q=jr(this,T,"div");if(A==null?A=Q.left:Q.left=A,T=Fc(this,Q,_,g),T.hitSide)break}return T},moveV:pr(function(o,l){var g=this,w=this.doc,_=[],A=!this.display.shift&&!w.extend&&w.sel.somethingSelected();if(w.extendSelectionsBy(function($){if(A)return o<0?$.from():$.to();var Q=jr(g,$.head,"div");$.goalColumn!=null&&(Q.left=$.goalColumn),_.push(Q.left);var de=Fc(g,Q,o,l);return l=="page"&&$==w.sel.primary()&&ss(g,Ya(g,de,"div").top-Q.top),de},Ae),_.length)for(var T=0;T<w.sel.ranges.length;T++)w.sel.ranges[T].goalColumn=_[T]}),findWordAt:function(o){var l=this.doc,g=ae(l,o.line).text,w=o.ch,_=o.ch;if(g){var A=this.getHelper(o,"wordChars");(o.sticky=="before"||_==g.length)&&w?--w:++_;for(var T=g.charAt(w),$=V(T,A)?function(Q){return V(Q,A)}:/\s/.test(T)?function(Q){return/\s/.test(Q)}:function(Q){return!/\s/.test(Q)&&!V(Q)};w>0&&$(g.charAt(w-1));)--w;for(;_<g.length&&$(g.charAt(_));)++_}return new _t(ee(o.line,w),ee(o.line,_))},toggleOverwrite:function(o){if(o!=null&&o==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?P(this.display.cursorDiv,"CodeMirror-overwrite"):Y(this.display.cursorDiv,"CodeMirror-overwrite"),ht(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:pr(function(o,l){Ii(this,o,l)}),getScrollInfo:function(){var o=this.display.scroller;return{left:o.scrollLeft,top:o.scrollTop,height:o.scrollHeight-Kr(this)-this.display.barHeight,width:o.scrollWidth-Kr(this)-this.display.barWidth,clientHeight:Ka(this),clientWidth:_n(this)}},scrollIntoView:pr(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:ee(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?oy(this,o):Eu(this,o.from,o.to,o.margin)}),setSize:pr(function(o,l){var g=this,w=function(A){return typeof A=="number"||/^\d+$/.test(String(A))?A+"px":A};o!=null&&(this.display.wrapper.style.width=w(o)),l!=null&&(this.display.wrapper.style.height=w(l)),this.options.lineWrapping&&du(this);var _=this.display.viewFrom;this.doc.iter(_,this.display.viewTo,function(A){if(A.widgets){for(var T=0;T<A.widgets.length;T++)if(A.widgets[T].noHScroll){pn(g,_,"widget");break}}++_}),this.curOp.forceUpdate=!0,ht(this,"refresh",this)}),operation:function(o){return Ar(this,o)},startOperation:function(){return Fn(this)},endOperation:function(){return Mn(this)},refresh:pr(function(){var o=this.display.cachedTextHeight;br(this),this.curOp.forceUpdate=!0,Ti(this),Ii(this,this.doc.scrollLeft,this.doc.scrollTop),cs(this.display),(o==null||Math.abs(o-$n(this.display))>.5||this.options.lineWrapping)&&rs(this),ht(this,"refresh",this)}),swapDoc:pr(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),zu(this,o),Ti(this),this.display.input.reset(),Ii(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,ar(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}},Ot(e),e.registerHelper=function(o,l,g){s.hasOwnProperty(o)||(s[o]=e[o]={_global:[]}),s[o][l]=g},e.registerGlobalHelper=function(o,l,g,w){e.registerHelper(o,l,w),s[o]._global.push({pred:g,val:w})}}function As(e,r,s,o,l){var g=r,w=s,_=ae(e,r.line),A=l&&e.direction=="rtl"?-s:s;function T(){var Ze=r.line+A;return Ze<e.first||Ze>=e.first+e.size?!1:(r=new ee(Ze,r.ch,r.sticky),_=ae(e,Ze))}function $(Ze){var Ue;if(o=="codepoint"){var et=_.text.charCodeAt(r.ch+(s>0?0:-1));if(isNaN(et))Ue=null;else{var ct=s>0?et>=55296&&et<56320:et>=56320&&et<57343;Ue=new ee(r.line,Math.max(0,Math.min(_.text.length,r.ch+s*(ct?2:1))),-s)}}else l?Ue=Uy(e.cm,_,r,s):Ue=ws(_,r,s);if(Ue==null)if(!Ze&&T())r=xs(l,e.cm,_,r.line,A);else return!1;else r=Ue;return!0}if(o=="char"||o=="codepoint")$();else if(o=="column")$(!0);else if(o=="word"||o=="group")for(var Q=null,de=o=="group",se=e.cm&&e.cm.getHelper(r,"wordChars"),we=!0;!(s<0&&!$(!we));we=!1){var _e=_.text.charAt(r.ch)||`
`,Re=V(_e,se)?"w":de&&_e==`
`?"n":!de||/\s/.test(_e)?null:"p";if(de&&!we&&!Re&&(Re="s"),Q&&Q!=Re){s<0&&(s=1,$(),r.sticky="after");break}if(Re&&(Q=Re),s>0&&!$(!we))break}var qe=No(e,r,g,w,!0);return ge(g,qe)&&(qe.hitSide=!0),qe}function Fc(e,r,s,o){var l=e.doc,g=r.left,w;if(o=="page"){var _=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),A=Math.max(_-.5*$n(e.display),3);w=(s>0?r.bottom:r.top)+s*A}else o=="line"&&(w=s>0?r.bottom+3:r.top-3);for(var T;!(T=Qa(e,g,w),!T.outside);){if(s<0?w<=0:w>=l.height){T.hitSide=!0;break}w+=s*5}return T}var Lt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Se,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Lt.prototype.init=function(e){var r=this,s=this,o=s.cm,l=s.div=e.lineDiv;l.contentEditable=!0,Ic(l,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function g(_){for(var A=_.target;A;A=A.parentNode){if(A==l)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(A.className))break}return!1}st(l,"paste",function(_){if(!g(_)||wt(o,_)||Ac(_,o))return;d<=11&&setTimeout(er(o,function(){return r.updateFromDOM()}),20)}),st(l,"compositionstart",function(_){r.composing={data:_.data,done:!1}}),st(l,"compositionupdate",function(_){r.composing||(r.composing={data:_.data,done:!1})}),st(l,"compositionend",function(_){r.composing&&(_.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),st(l,"touchstart",function(){return s.forceCompositionEnd()}),st(l,"input",function(){r.composing||r.readFromDOMSoon()});function w(_){if(!g(_)||wt(o,_))return;if(o.somethingSelected())Ho({lineWise:!1,text:o.getSelections()}),_.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var A=Dc(o);Ho({lineWise:!0,text:A.text}),_.type=="cut"&&o.operation(function(){o.setSelections(A.ranges,0,nt),o.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var T=Ur.text.join(`
`);if(_.clipboardData.setData("Text",T),_.clipboardData.getData("Text")==T){_.preventDefault();return}}var $=Lc(),Q=$.firstChild;o.display.lineSpace.insertBefore($,o.display.lineSpace.firstChild),Q.value=Ur.text.join(`
`);var de=document.activeElement;ke(Q),setTimeout(function(){o.display.lineSpace.removeChild($),de.focus(),de==l&&s.showPrimarySelection()},50)}st(l,"copy",w),st(l,"cut",w)},Lt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Lt.prototype.prepareSelection=function(){var e=wu(this.cm,!1);return e.focus=document.activeElement==this.div,e},Lt.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},Lt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Lt.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,s=r.doc.sel.primary(),o=s.from(),l=s.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||l.line<r.display.viewFrom){e.removeAllRanges();return}var g=Wo(r,e.anchorNode,e.anchorOffset),w=Wo(r,e.focusNode,e.focusOffset);if(g&&!g.bad&&w&&!w.bad&&pe(zt(g,w),o)==0&&pe(vt(g,w),l)==0)return;var _=r.display.view,A=o.line>=r.display.viewFrom&&Mc(r,o)||{node:_[0].measure.map[2],offset:0},T=l.line<r.display.viewTo&&Mc(r,l);if(!T){var $=_[_.length-1].measure,Q=$.maps?$.maps[$.maps.length-1]:$.map;T={node:Q[Q.length-1],offset:Q[Q.length-2]-Q[Q.length-3]}}if(!A||!T){e.removeAllRanges();return}var de=e.rangeCount&&e.getRangeAt(0),se;try{se=B(A.node,A.offset,T.offset,T.node)}catch(we){}se&&(!i&&r.state.focused?(e.collapse(A.node,A.offset),se.collapsed||(e.removeAllRanges(),e.addRange(se))):(e.removeAllRanges(),e.addRange(se)),de&&e.anchorNode==null?e.addRange(de):i&&this.startGracePeriod()),this.rememberSelection()},Lt.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)},Lt.prototype.showMultipleSelections=function(e){K(this.cm.display.cursorDiv,e.cursors),K(this.cm.display.selectionDiv,e.selection)},Lt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Lt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return re(this.div,r)},Lt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Lt.prototype.blur=function(){this.div.blur()},Lt.prototype.getField=function(){return this.div},Lt.prototype.supportsTouch=function(){return!0},Lt.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Ar(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)},Lt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Lt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(x&&y&&this.cm.display.gutterSpecs.length&&lb(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var s=Wo(r,e.anchorNode,e.anchorOffset),o=Wo(r,e.focusNode,e.focusOffset);s&&o&&Ar(r,function(){ur(r.doc,gn(s,o),nt),(s.bad||o.bad)&&(r.curOp.selectionChanged=!0)})},Lt.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,s=e.doc.sel.primary(),o=s.from(),l=s.to();if(o.ch==0&&o.line>e.firstLine()&&(o=ee(o.line-1,ae(e.doc,o.line-1).length)),l.ch==ae(e.doc,l.line).text.length&&l.line<e.lastLine()&&(l=ee(l.line+1,0)),o.line<r.viewFrom||l.line>r.viewTo-1)return!1;var g,w,_;o.line==r.viewFrom||(g=Dn(e,o.line))==0?(w=We(r.view[0].line),_=r.view[0].node):(w=We(r.view[g].line),_=r.view[g-1].node.nextSibling);var A=Dn(e,l.line),T,$;if(A==r.view.length-1?(T=r.viewTo-1,$=r.lineDiv.lastChild):(T=We(r.view[A+1].line)-1,$=r.view[A+1].node.previousSibling),!_)return!1;for(var Q=e.doc.splitLines(ub(e,_,$,w,T)),de=ve(e.doc,ee(w,0),ee(T,ae(e.doc,T).text.length));Q.length>1&&de.length>1;)if(Pe(Q)==Pe(de))Q.pop(),de.pop(),T--;else if(Q[0]==de[0])Q.shift(),de.shift(),w++;else break;for(var se=0,we=0,_e=Q[0],Re=de[0],qe=Math.min(_e.length,Re.length);se<qe&&_e.charCodeAt(se)==Re.charCodeAt(se);)++se;for(var Ze=Pe(Q),Ue=Pe(de),et=Math.min(Ze.length-(Q.length==1?se:0),Ue.length-(de.length==1?se:0));we<et&&Ze.charCodeAt(Ze.length-we-1)==Ue.charCodeAt(Ue.length-we-1);)++we;if(Q.length==1&&de.length==1&&w==o.line)for(;se&&se>o.ch&&Ze.charCodeAt(Ze.length-we-1)==Ue.charCodeAt(Ue.length-we-1);)se--,we++;Q[Q.length-1]=Ze.slice(0,Ze.length-we).replace(/^\u200b+/,""),Q[0]=Q[0].slice(se).replace(/\u200b+$/,"");var ct=ee(w,se),ut=ee(T,de.length?Pe(de).length-we:0);if(Q.length>1||Q[0]||pe(ct,ut))return Jn(e.doc,Q,ct,ut,"+input"),!0},Lt.prototype.ensurePolled=function(){this.forceCompositionEnd()},Lt.prototype.reset=function(){this.forceCompositionEnd()},Lt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Lt.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)},Lt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ar(this.cm,function(){return br(e.cm)})},Lt.prototype.setUneditable=function(e){e.contentEditable="false"},Lt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||er(this.cm,_s)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},Lt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Lt.prototype.onContextMenu=function(){},Lt.prototype.resetPosition=function(){},Lt.prototype.needsContentAttribute=!0;function Mc(e,r){var s=Va(e,r.line);if(!s||s.hidden)return null;var o=ae(e.doc,r.line),l=au(s,o,r.line),g=Et(o,e.doc.direction),w="left";if(g){var _=tt(g,r.ch);w=_%2?"right":"left"}var A=uu(l.map,r.ch,w);return A.offset=A.collapse=="right"?A.end:A.start,A}function lb(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function ii(e,r){return r&&(e.bad=!0),e}function ub(e,r,s,o,l){var g="",w=!1,_=e.doc.lineSeparator(),A=!1;function T(se){return function(we){return we.id==se}}function $(){w&&(g+=_,A&&(g+=_),w=A=!1)}function Q(se){se&&($(),g+=se)}function de(se){if(se.nodeType==1){var we=se.getAttribute("cm-text");if(we){Q(we);return}var _e=se.getAttribute("cm-marker"),Re;if(_e){var qe=e.findMarks(ee(o,0),ee(l+1,0),T(+_e));qe.length&&(Re=qe[0].find(0))&&Q(ve(e.doc,Re.from,Re.to).join(_));return}if(se.getAttribute("contenteditable")=="false")return;var Ze=/^(pre|div|p|li|table|br)$/i.test(se.nodeName);if(!/^br$/i.test(se.nodeName)&&se.textContent.length==0)return;Ze&&$();for(var Ue=0;Ue<se.childNodes.length;Ue++)de(se.childNodes[Ue]);/^(pre|p)$/i.test(se.nodeName)&&(A=!0),Ze&&(w=!0)}else se.nodeType==3&&Q(se.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(de(r),r==s);)r=r.nextSibling,A=!1;return g}function Wo(e,r,s){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[s],!o)return ii(e.clipPos(ee(e.display.viewTo-1)),!0);r=null,s=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 g=e.display.view[l];if(g.node==o)return cb(g,r,s)}}function cb(e,r,s){var o=e.text.firstChild,l=!1;if(!r||!re(o,r))return ii(ee(We(e.line),0),!0);if(r==o&&(l=!0,r=o.childNodes[s],s=0,!r)){var g=e.rest?Pe(e.rest):e.line;return ii(ee(We(g),g.text.length),l)}var w=r.nodeType==3?r:null,_=r;for(!w&&r.childNodes.length==1&&r.firstChild.nodeType==3&&(w=r.firstChild,s&&(s=w.nodeValue.length));_.parentNode!=o;)_=_.parentNode;var A=e.measure,T=A.maps;function $(Re,qe,Ze){for(var Ue=-1;Ue<(T?T.length:0);Ue++)for(var et=Ue<0?A.map:T[Ue],ct=0;ct<et.length;ct+=3){var ut=et[ct+2];if(ut==Re||ut==qe){var yt=We(Ue<0?e.line:e.rest[Ue]),Mt=et[ct]+Ze;return(Ze<0||ut!=Re)&&(Mt=et[ct+(Ze?1:0)]),ee(yt,Mt)}}}var Q=$(w,_,s);if(Q)return ii(Q,l);for(var de=_.nextSibling,se=w?w.nodeValue.length-s:0;de;de=de.nextSibling){if(Q=$(de,de.firstChild,0),Q)return ii(ee(Q.line,Q.ch-se),l);se+=de.textContent.length}for(var we=_.previousSibling,_e=s;we;we=we.previousSibling){if(Q=$(we,we.firstChild,-1),Q)return ii(ee(Q.line,Q.ch+_e),l);_e+=we.textContent.length}}var $t=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Se,this.hasSelection=!1,this.composing=null};$t.prototype.init=function(e){var r=this,s=this,o=this.cm;this.createField(e);var l=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),E&&(l.style.width="0px"),st(l,"input",function(){a&&d>=9&&r.hasSelection&&(r.hasSelection=null),s.poll()}),st(l,"paste",function(w){if(wt(o,w)||Ac(w,o))return;o.state.pasteIncoming=+new Date,s.fastPoll()});function g(w){if(wt(o,w))return;if(o.somethingSelected())Ho({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var _=Dc(o);Ho({lineWise:!0,text:_.text}),w.type=="cut"?o.setSelections(_.ranges,null,nt):(s.prevInput="",l.value=_.text.join(`
`),ke(l))}else return;w.type=="cut"&&(o.state.cutIncoming=+new Date)}st(l,"cut",g),st(l,"copy",g),st(e.scroller,"paste",function(w){if(an(e,w)||wt(o,w))return;if(!l.dispatchEvent){o.state.pasteIncoming=+new Date,s.focus();return}var _=new Event("paste");_.clipboardData=w.clipboardData,l.dispatchEvent(_)}),st(e.lineSpace,"selectstart",function(w){an(e,w)||kt(w)}),st(l,"compositionstart",function(){var w=o.getCursor("from");s.composing&&s.composing.range.clear(),s.composing={start:w,range:o.markText(w,o.getCursor("to"),{className:"CodeMirror-composing"})}}),st(l,"compositionend",function(){s.composing&&(s.poll(),s.composing.range.clear(),s.composing=null)})},$t.prototype.createField=function(e){this.wrapper=Lc(),this.textarea=this.wrapper.firstChild},$t.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$t.prototype.prepareSelection=function(){var e=this.cm,r=e.display,s=e.doc,o=wu(e);if(e.options.moveInputWithCursor){var l=jr(e,s.sel.primary().head,"div"),g=r.wrapper.getBoundingClientRect(),w=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,l.top+w.top-g.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,l.left+w.left-g.left))}return o},$t.prototype.showSelection=function(e){var r=this.cm,s=r.display;K(s.cursorDiv,e.cursors),K(s.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$t.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var s=r.getSelection();this.textarea.value=s,r.state.focused&&ke(this.textarea),a&&d>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",a&&d>=9&&(this.hasSelection=null))},$t.prototype.getField=function(){return this.textarea},$t.prototype.supportsTouch=function(){return!1},$t.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!D||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},$t.prototype.blur=function(){this.textarea.blur()},$t.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$t.prototype.receivedFocus=function(){this.slowPoll()},$t.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()})},$t.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function s(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,s)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,s)},$t.prototype.poll=function(){var e=this,r=this.cm,s=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||ie(s)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var l=s.value;if(l==o&&!r.somethingSelected())return!1;if(a&&d>=9&&this.hasSelection===l||C&&/[\uf700-\uf7ff]/.test(l))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var g=l.charCodeAt(0);if(g==8203&&!o&&(o=""),g==8666)return this.reset(),this.cm.execCommand("undo")}for(var w=0,_=Math.min(o.length,l.length);w<_&&o.charCodeAt(w)==l.charCodeAt(w);)++w;return Ar(r,function(){_s(r,l.slice(w),o.length-w,null,e.composing?"*compose":null),l.length>1e3||l.indexOf(`
`)>-1?s.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},$t.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$t.prototype.onKeyPress=function(){a&&d>=9&&(this.hasSelection=null),this.fastPoll()},$t.prototype.onContextMenu=function(e){var r=this,s=r.cm,o=s.display,l=r.textarea;r.contextMenuPending&&r.contextMenuPending();var g=Tn(s,e),w=o.scroller.scrollTop;if(!g||m)return;var _=s.options.resetSelectionOnContextMenu;_&&s.doc.sel.contains(g)==-1&&er(s,ur)(s.doc,gn(g),nt);var A=l.style.cssText,T=r.wrapper.style.cssText,$=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",l.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-$.top-5)+"px; left: "+(e.clientX-$.left-5)+`px;
z-index: 1000; background: `+(a?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Q;f&&(Q=window.scrollY),o.input.focus(),f&&window.scrollTo(null,Q),o.input.reset(),s.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=se,o.selForContextMenu=s.doc.sel,clearTimeout(o.detectingSelectAll);function de(){if(l.selectionStart!=null){var _e=s.somethingSelected(),Re=""+(_e?l.value:"");l.value="⇚",l.value=Re,r.prevInput=_e?"":"",l.selectionStart=1,l.selectionEnd=Re.length,o.selForContextMenu=s.doc.sel}}function se(){if(r.contextMenuPending!=se)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=T,l.style.cssText=A,a&&d<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=w),l.selectionStart!=null){(!a||a&&d<9)&&de();var _e=0,Re=function(){o.selForContextMenu==s.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput==""?er(s,Zu)(s):_e++<10?o.detectingSelectAll=setTimeout(Re,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(Re,200)}}if(a&&d>=9&&de(),J){vr(e);var we=function(){Je(window,"mouseup",we),setTimeout(se,20)};st(window,"mouseup",we)}else setTimeout(se,50)},$t.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$t.prototype.setUneditable=function(){},$t.prototype.needsContentAttribute=!1;function db(e,r){if(r=r?L(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 s=I();r.autofocus=s==e||e.getAttribute("autofocus")!=null&&s==document.body}function o(){e.value=_.getValue()}var l;if(e.form&&(st(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var g=e.form;l=g.submit;try{var w=g.submit=function(){o(),g.submit=l,g.submit(),g.submit=w}}catch(A){}}r.finishInit=function(A){A.save=o,A.getTextArea=function(){return e},A.toTextArea=function(){A.toTextArea=isNaN,o(),e.parentNode.removeChild(A.getWrapperElement()),e.style.display="",e.form&&(Je(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var _=Pt(function(A){return e.parentNode.insertBefore(A,e.nextSibling)},r);return _}function fb(e){e.off=Je,e.on=st,e.wheelEventPixels=by,e.Doc=wr,e.splitLines=oe,e.countColumn=xe,e.findColumn=Qe,e.isWordChar=Ee,e.Pass=Xe,e.signal=ht,e.Line=Un,e.changeEnd=vn,e.scrollbarModel=Au,e.Pos=ee,e.cmpPos=pe,e.modes=z,e.mimeModes=te,e.resolveMode=me,e.getMode=Te,e.modeExtensions=Oe,e.extendMode=De,e.copyState=Ye,e.startState=gt,e.innerMode=xt,e.commands=$i,e.keyMap=sn,e.keyName=hc,e.isModifierKey=dc,e.lookupKey=ti,e.normalizeKeyMap=qy,e.StringStream=U,e.SharedTextMarker=Ui,e.TextMarker=bn,e.LineWidget=qi,e.e_preventDefault=kt,e.e_stopPropagation=at,e.e_stop=vr,e.addClass=P,e.contains=re,e.rmClass=Y,e.keyNames=wn}nb(Pt),sb(Pt);var hb="iter insert remove copy getEditor constructor".split(" ");for(var $o in wr.prototype)wr.prototype.hasOwnProperty($o)&&be(hb,$o)<0&&(Pt.prototype[$o]=function(e){return function(){return e.apply(this.doc,arguments)}}(wr.prototype[$o]));return Ot(wr),Pt.inputStyles={textarea:$t,contenteditable:Lt},Pt.defineMode=function(e){!Pt.defaults.mode&&e!="null"&&(Pt.defaults.mode=e),ce.apply(this,arguments)},Pt.defineMIME=ye,Pt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Pt.defineMIME("text/plain","null"),Pt.defineExtension=function(e,r){Pt.prototype[e]=r},Pt.defineDocExtension=function(e,r){wr.prototype[e]=r},Pt.fromTextArea=db,fb(Pt),Pt.version="5.60.0",Pt})});var Ms=Me((Yi,Fs)=>{!function(n,t){typeof Yi=="object"&&typeof Fs=="object"?Fs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Yi=="object"?Yi.ClipboardJS=t():n.ClipboardJS=t()}(Yi,function(){return t={134:function(u,c,h){"use strict";h.d(c,{default:function(){return C}});var c=h(279),a=h.n(c),c=h(370),d=h.n(c),c=h(817),f=h.n(c);function p(N){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(N)}function y(N,R){for(var H=0;H<R.length;H++){var j=R[H];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(N,j.key,j)}}var m=function(){function N(J){!function(W){if(!(W instanceof N))throw new TypeError("Cannot call a class as a function")}(this),this.resolveOptions(J),this.initSelection()}var R,H,j;return R=N,(H=[{key:"resolveOptions",value:function(){var J=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.action=J.action,this.container=J.container,this.emitter=J.emitter,this.target=J.target,this.text=J.text,this.trigger=J.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var J=document.documentElement.getAttribute("dir")==="rtl";return 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[J?"right":"left"]="-9999px",J=window.pageYOffset||document.documentElement.scrollTop,this.fakeElem.style.top="".concat(J,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var J=this,W=this.createFakeElement();this.fakeHandlerCallback=function(){return J.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(W),this.selectedText=f()(W),this.copyText(),this.removeFake()}},{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=f()(this.target),this.copyText()}},{key:"copyText",value:function(){var J;try{J=document.execCommand(this.action)}catch(W){J=!1}this.handleResult(J)}},{key:"handleResult",value:function(J){this.emitter.emit(J?"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(){var J=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"copy";if(this._action=J,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(J){if(J!==void 0){if(!J||p(J)!=="object"||J.nodeType!==1)throw new Error('Invalid "target" value, use a valid Element');if(this.action==="copy"&&J.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(this.action==="cut"&&(J.hasAttribute("readonly")||J.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`);this._target=J}},get:function(){return this._target}}])&&y(R.prototype,H),j&&y(R,j),N}();function v(N){return(v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R})(N)}function b(N,R){for(var H=0;H<R.length;H++){var j=R[H];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(N,j.key,j)}}function S(N,R){return(S=Object.setPrototypeOf||function(H,j){return H.__proto__=j,H})(N,R)}function E(N){var R=function(){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(H){return!1}}();return function(){var H,j=x(N);return H=R?(H=x(this).constructor,Reflect.construct(j,arguments,H)):j.apply(this,arguments),j=this,!(H=H)||v(H)!=="object"&&typeof H!="function"?function(J){if(J!==void 0)return J;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(j):H}}function x(N){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)})(N)}function D(N,R){if(N="data-clipboard-".concat(N),R.hasAttribute(N))return R.getAttribute(N)}var C=function(){!function(W,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(Y&&Y.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Y&&S(W,Y)}(J,a());var N,R,H,j=E(J);function J(W,Y){var M;return function(K){if(!(K instanceof J))throw new TypeError("Cannot call a class as a function")}(this),(M=j.call(this)).resolveOptions(Y),M.listenClick(W),M}return N=J,H=[{key:"isSupported",value:function(){var W=0<arguments.length&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof W=="string"?[W]:W,Y=!!document.queryCommandSupported;return W.forEach(function(M){Y=Y&&!!document.queryCommandSupported(M)}),Y}}],(R=[{key:"resolveOptions",value:function(){var W=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof W.action=="function"?W.action:this.defaultAction,this.target=typeof W.target=="function"?W.target:this.defaultTarget,this.text=typeof W.text=="function"?W.text:this.defaultText,this.container=v(W.container)==="object"?W.container:document.body}},{key:"listenClick",value:function(W){var Y=this;this.listener=d()(W,"click",function(M){return Y.onClick(M)})}},{key:"onClick",value:function(W){W=W.delegateTarget||W.currentTarget,this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new m({action:this.action(W),target:this.target(W),text:this.text(W),container:this.container,trigger:W,emitter:this})}},{key:"defaultAction",value:function(W){return D("action",W)}},{key:"defaultTarget",value:function(W){if(W=D("target",W),W)return document.querySelector(W)}},{key:"defaultText",value:function(W){return D("text",W)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}])&&b(N.prototype,R),H&&b(N,H),J}()},828:function(u){var c;typeof Element=="undefined"||Element.prototype.matches||((c=Element.prototype).matches=c.matchesSelector||c.mozMatchesSelector||c.msMatchesSelector||c.oMatchesSelector||c.webkitMatchesSelector),u.exports=function(h,a){for(;h&&h.nodeType!==9;){if(typeof h.matches=="function"&&h.matches(a))return h;h=h.parentNode}}},438:function(u,c,h){var a=h(828);function d(f,p,y,m,v){var b=function(S,E,x,D){return function(C){C.delegateTarget=a(C.target,E),C.delegateTarget&&D.call(S,C)}}.apply(this,arguments);return f.addEventListener(y,b,v),{destroy:function(){f.removeEventListener(y,b,v)}}}u.exports=function(f,p,y,m,v){return typeof f.addEventListener=="function"?d.apply(null,arguments):typeof y=="function"?d.bind(null,document).apply(null,arguments):(typeof f=="string"&&(f=document.querySelectorAll(f)),Array.prototype.map.call(f,function(b){return d(b,p,y,m,v)}))}},879:function(u,c){c.node=function(h){return h!==void 0&&h instanceof HTMLElement&&h.nodeType===1},c.nodeList=function(h){var a=Object.prototype.toString.call(h);return h!==void 0&&(a==="[object NodeList]"||a==="[object HTMLCollection]")&&"length"in h&&(h.length===0||c.node(h[0]))},c.string=function(h){return typeof h=="string"||h instanceof String},c.fn=function(h){return Object.prototype.toString.call(h)==="[object Function]"}},370:function(u,c,h){var a=h(879),d=h(438);u.exports=function(f,p,y){if(!f&&!p&&!y)throw new Error("Missing required arguments");if(!a.string(p))throw new TypeError("Second argument must be a String");if(!a.fn(y))throw new TypeError("Third argument must be a Function");if(a.node(f))return E=p,x=y,(S=f).addEventListener(E,x),{destroy:function(){S.removeEventListener(E,x)}};if(a.nodeList(f))return m=f,v=p,b=y,Array.prototype.forEach.call(m,function(D){D.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(m,function(D){D.removeEventListener(v,b)})}};if(a.string(f))return f=f,p=p,y=y,d(document.body,f,p,y);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var m,v,b,S,E,x}},817:function(u){u.exports=function(c){var h,a=c.nodeName==="SELECT"?(c.focus(),c.value):c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"?((h=c.hasAttribute("readonly"))||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),c.value):(c.hasAttribute("contenteditable")&&c.focus(),a=window.getSelection(),(h=document.createRange()).selectNodeContents(c),a.removeAllRanges(),a.addRange(h),a.toString());return a}},279:function(u){function c(){}c.prototype={on:function(h,a,d){var f=this.e||(this.e={});return(f[h]||(f[h]=[])).push({fn:a,ctx:d}),this},once:function(h,a,d){var f=this;function p(){f.off(h,p),a.apply(d,arguments)}return p._=a,this.on(h,p,d)},emit:function(h){for(var a=[].slice.call(arguments,1),d=((this.e||(this.e={}))[h]||[]).slice(),f=0,p=d.length;f<p;f++)d[f].fn.apply(d[f].ctx,a);return this},off:function(h,a){var d=this.e||(this.e={}),f=d[h],p=[];if(f&&a)for(var y=0,m=f.length;y<m;y++)f[y].fn!==a&&f[y].fn._!==a&&p.push(f[y]);return p.length?d[h]=p:delete d[h],this}},u.exports=c,u.exports.TinyEmitter=c}},i={},n.n=function(u){var c=u&&u.__esModule?function(){return u.default}:function(){return u};return n.d(c,{a:c}),c},n.d=function(u,c){for(var h in c)n.o(c,h)&&!n.o(u,h)&&Object.defineProperty(u,h,{enumerable:!0,get:c[h]})},n.o=function(u,c){return Object.prototype.hasOwnProperty.call(u,c)},n(134).default;function n(u){if(i[u])return i[u].exports;var c=i[u]={exports:{}};return t[u](c,c.exports,n),c.exports}var t,i})});var Rs=Me((Oc,Pc)=>{(function(n){typeof Oc=="object"&&typeof Pc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("css",function(W,Y){var M=Y.inline;Y.propertyKeywords||(Y=n.resolveMode("text/css"));var K=W.indentUnit,k=Y.tokenHooks,G=Y.documentTypes||{},B=Y.mediaTypes||{},re=Y.mediaFeatures||{},I=Y.mediaValueKeywords||{},P=Y.propertyKeywords||{},le=Y.nonStandardPropertyKeywords||{},ke=Y.fontProperties||{},q=Y.counterDescriptors||{},L=Y.colorKeywords||{},xe=Y.valueKeywords||{},Se=Y.allowNested,be=Y.lineComment,Fe=Y.supportsAtComponent===!0,Xe=W.highlightNonStandardPropertyKeywords!==!1,nt,fe;function Ae(V,he){return nt=he,V}function Qe(V,he){var ue=V.next();if(k[ue]){var rt=k[ue](V,he);if(rt!==!1)return rt}if(ue=="@")return V.eatWhile(/[\w\\\-]/),Ae("def",V.current());if(ue=="="||(ue=="~"||ue=="|")&&V.eat("="))return Ae(null,"compare");if(ue=='"'||ue=="'")return he.tokenize=ot(ue),he.tokenize(V,he);if(ue=="#")return V.eatWhile(/[\w\\\-]/),Ae("atom","hash");if(ue=="!")return V.match(/^\s*\w*/),Ae("keyword","important");if(/\d/.test(ue)||ue=="."&&V.eat(/\d/))return V.eatWhile(/[\w.%]/),Ae("number","unit");if(ue==="-"){if(/[\d.]/.test(V.peek()))return V.eatWhile(/[\w.%]/),Ae("number","unit");if(V.match(/^-[\w\\\-]*/))return V.eatWhile(/[\w\\\-]/),V.match(/^\s*:/,!1)?Ae("variable-2","variable-definition"):Ae("variable-2","variable");if(V.match(/^\w+-/))return Ae("meta","meta")}else return/[,+>*\/]/.test(ue)?Ae(null,"select-op"):ue=="."&&V.match(/^-?[_a-z][_a-z0-9-]*/i)?Ae("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ue)?Ae(null,ue):V.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(V.current())&&(he.tokenize=ft),Ae("variable callee","variable")):/[\w\\\-]/.test(ue)?(V.eatWhile(/[\w\\\-]/),Ae("property","word")):Ae(null,null)}function ot(V){return function(he,ue){for(var rt=!1,Ne;(Ne=he.next())!=null;){if(Ne==V&&!rt){V==")"&&he.backUp(1);break}rt=!rt&&Ne=="\\"}return(Ne==V||!rt&&V!=")")&&(ue.tokenize=null),Ae("string","string")}}function ft(V,he){return V.next(),V.match(/^\s*[\"\')]/,!1)?he.tokenize=null:he.tokenize=ot(")"),Ae(null,"(")}function Pe(V,he,ue){this.type=V,this.indent=he,this.prev=ue}function Le(V,he,ue,rt){return V.context=new Pe(ue,he.indentation()+(rt===!1?0:K),V.context),ue}function Be(V){return V.context.prev&&(V.context=V.context.prev),V.context.type}function Ke(V,he,ue){return Ee[ue.context.type](V,he,ue)}function je(V,he,ue,rt){for(var Ne=rt||1;Ne>0;Ne--)ue.context=ue.context.prev;return Ke(V,he,ue)}function Ge(V){var he=V.current().toLowerCase();xe.hasOwnProperty(he)?fe="atom":L.hasOwnProperty(he)?fe="keyword":fe="variable"}var Ee={};return Ee.top=function(V,he,ue){if(V=="{")return Le(ue,he,"block");if(V=="}"&&ue.context.prev)return Be(ue);if(Fe&&/@component/i.test(V))return Le(ue,he,"atComponentBlock");if(/^@(-moz-)?document$/i.test(V))return Le(ue,he,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(V))return Le(ue,he,"atBlock");if(/^@(font-face|counter-style)/i.test(V))return ue.stateArg=V,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(V))return"keyframes";if(V&&V.charAt(0)=="@")return Le(ue,he,"at");if(V=="hash")fe="builtin";else if(V=="word")fe="tag";else{if(V=="variable-definition")return"maybeprop";if(V=="interpolation")return Le(ue,he,"interpolation");if(V==":")return"pseudo";if(Se&&V=="(")return Le(ue,he,"parens")}return ue.context.type},Ee.block=function(V,he,ue){if(V=="word"){var rt=he.current().toLowerCase();return P.hasOwnProperty(rt)?(fe="property","maybeprop"):le.hasOwnProperty(rt)?(fe=Xe?"string-2":"property","maybeprop"):Se?(fe=he.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(fe+=" error","maybeprop")}else return V=="meta"?"block":!Se&&(V=="hash"||V=="qualifier")?(fe="error","block"):Ee.top(V,he,ue)},Ee.maybeprop=function(V,he,ue){return V==":"?Le(ue,he,"prop"):Ke(V,he,ue)},Ee.prop=function(V,he,ue){if(V==";")return Be(ue);if(V=="{"&&Se)return Le(ue,he,"propBlock");if(V=="}"||V=="{")return je(V,he,ue);if(V=="(")return Le(ue,he,"parens");if(V=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(he.current()))fe+=" error";else if(V=="word")Ge(he);else if(V=="interpolation")return Le(ue,he,"interpolation");return"prop"},Ee.propBlock=function(V,he,ue){return V=="}"?Be(ue):V=="word"?(fe="property","maybeprop"):ue.context.type},Ee.parens=function(V,he,ue){return V=="{"||V=="}"?je(V,he,ue):V==")"?Be(ue):V=="("?Le(ue,he,"parens"):V=="interpolation"?Le(ue,he,"interpolation"):(V=="word"&&Ge(he),"parens")},Ee.pseudo=function(V,he,ue){return V=="meta"?"pseudo":V=="word"?(fe="variable-3",ue.context.type):Ke(V,he,ue)},Ee.documentTypes=function(V,he,ue){return V=="word"&&G.hasOwnProperty(he.current())?(fe="tag",ue.context.type):Ee.atBlock(V,he,ue)},Ee.atBlock=function(V,he,ue){if(V=="(")return Le(ue,he,"atBlock_parens");if(V=="}"||V==";")return je(V,he,ue);if(V=="{")return Be(ue)&&Le(ue,he,Se?"block":"top");if(V=="interpolation")return Le(ue,he,"interpolation");if(V=="word"){var rt=he.current().toLowerCase();rt=="only"||rt=="not"||rt=="and"||rt=="or"?fe="keyword":B.hasOwnProperty(rt)?fe="attribute":re.hasOwnProperty(rt)?fe="property":I.hasOwnProperty(rt)?fe="keyword":P.hasOwnProperty(rt)?fe="property":le.hasOwnProperty(rt)?fe=Xe?"string-2":"property":xe.hasOwnProperty(rt)?fe="atom":L.hasOwnProperty(rt)?fe="keyword":fe="error"}return ue.context.type},Ee.atComponentBlock=function(V,he,ue){return V=="}"?je(V,he,ue):V=="{"?Be(ue)&&Le(ue,he,Se?"block":"top",!1):(V=="word"&&(fe="error"),ue.context.type)},Ee.atBlock_parens=function(V,he,ue){return V==")"?Be(ue):V=="{"||V=="}"?je(V,he,ue,2):Ee.atBlock(V,he,ue)},Ee.restricted_atBlock_before=function(V,he,ue){return V=="{"?Le(ue,he,"restricted_atBlock"):V=="word"&&ue.stateArg=="@counter-style"?(fe="variable","restricted_atBlock_before"):Ke(V,he,ue)},Ee.restricted_atBlock=function(V,he,ue){return V=="}"?(ue.stateArg=null,Be(ue)):V=="word"?(ue.stateArg=="@font-face"&&!ke.hasOwnProperty(he.current().toLowerCase())||ue.stateArg=="@counter-style"&&!q.hasOwnProperty(he.current().toLowerCase())?fe="error":fe="property","maybeprop"):"restricted_atBlock"},Ee.keyframes=function(V,he,ue){return V=="word"?(fe="variable","keyframes"):V=="{"?Le(ue,he,"top"):Ke(V,he,ue)},Ee.at=function(V,he,ue){return V==";"?Be(ue):V=="{"||V=="}"?je(V,he,ue):(V=="word"?fe="tag":V=="hash"&&(fe="builtin"),"at")},Ee.interpolation=function(V,he,ue){return V=="}"?Be(ue):V=="{"||V==";"?je(V,he,ue):(V=="word"?fe="variable":V!="variable"&&V!="("&&V!=")"&&(fe="error"),"interpolation")},{startState:function(V){return{tokenize:null,state:M?"block":"top",stateArg:null,context:new Pe(M?"block":"top",V||0,null)}},token:function(V,he){if(!he.tokenize&&V.eatSpace())return null;var ue=(he.tokenize||Qe)(V,he);return ue&&typeof ue=="object"&&(nt=ue[1],ue=ue[0]),fe=ue,nt!="comment"&&(he.state=Ee[he.state](nt,V,he)),fe},indent:function(V,he){var ue=V.context,rt=he&&he.charAt(0),Ne=ue.indent;return ue.type=="prop"&&(rt=="}"||rt==")")&&(ue=ue.prev),ue.prev&&(rt=="}"&&(ue.type=="block"||ue.type=="top"||ue.type=="interpolation"||ue.type=="restricted_atBlock")?(ue=ue.prev,Ne=ue.indent):(rt==")"&&(ue.type=="parens"||ue.type=="atBlock_parens")||rt=="{"&&(ue.type=="at"||ue.type=="atBlock"))&&(Ne=Math.max(0,ue.indent-K))),Ne},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:be,fold:"brace"}});function t(W){for(var Y={},M=0;M<W.length;++M)Y[W[M].toLowerCase()]=!0;return Y}var i=["domain","regexp","url","url-prefix"],u=t(i),c=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],h=t(c),a=["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"],d=t(a),f=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],p=t(f),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=t(y),v=["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"],b=t(v),S=["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],E=t(S),x=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],D=t(x),C=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],N=t(C),R=["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"],H=t(R),j=i.concat(c).concat(a).concat(f).concat(y).concat(v).concat(C).concat(R);n.registerHelper("hintWords","css",j);function J(W,Y){for(var M=!1,K;(K=W.next())!=null;){if(M&&K=="/"){Y.tokenize=null;break}M=K=="*"}return["comment","comment"]}n.defineMIME("text/css",{documentTypes:u,mediaTypes:h,mediaFeatures:d,mediaValueKeywords:p,propertyKeywords:m,nonStandardPropertyKeywords:b,fontProperties:E,counterDescriptors:D,colorKeywords:N,valueKeywords:H,tokenHooks:{"/":function(W,Y){return W.eat("*")?(Y.tokenize=J,J(W,Y)):!1}},name:"css"}),n.defineMIME("text/x-scss",{mediaTypes:h,mediaFeatures:d,mediaValueKeywords:p,propertyKeywords:m,nonStandardPropertyKeywords:b,colorKeywords:N,valueKeywords:H,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(W,Y){return W.eat("/")?(W.skipToEnd(),["comment","comment"]):W.eat("*")?(Y.tokenize=J,J(W,Y)):["operator","operator"]},":":function(W){return W.match(/^\s*\{/,!1)?[null,null]:!1},$:function(W){return W.match(/^[\w-]+/),W.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(W){return W.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),n.defineMIME("text/x-less",{mediaTypes:h,mediaFeatures:d,mediaValueKeywords:p,propertyKeywords:m,nonStandardPropertyKeywords:b,colorKeywords:N,valueKeywords:H,fontProperties:E,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(W,Y){return W.eat("/")?(W.skipToEnd(),["comment","comment"]):W.eat("*")?(Y.tokenize=J,J(W,Y)):["operator","operator"]},"@":function(W){return W.eat("{")?[null,"interpolation"]:W.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)?!1:(W.eatWhile(/[\w\\\-]/),W.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),n.defineMIME("text/x-gss",{documentTypes:u,mediaTypes:h,mediaFeatures:d,propertyKeywords:m,nonStandardPropertyKeywords:b,fontProperties:E,counterDescriptors:D,colorKeywords:N,valueKeywords:H,supportsAtComponent:!0,tokenHooks:{"/":function(W,Y){return W.eat("*")?(Y.tokenize=J,J(W,Y)):!1}},name:"css",helperType:"gss"})})});var Os=Me((Nc,zc)=>{(function(n){typeof Nc=="object"&&typeof zc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(I,P,le,ke,q,L){this.indented=I,this.column=P,this.type=le,this.info=ke,this.align=q,this.prev=L}function i(I,P,le,ke){var q=I.indented;return I.context&&I.context.type=="statement"&&le!="statement"&&(q=I.context.indented),I.context=new t(q,P,le,ke,null,I.context)}function u(I){var P=I.context.type;return(P==")"||P=="]"||P=="}")&&(I.indented=I.context.indented),I.context=I.context.prev}function c(I,P,le){if(P.prevToken=="variable"||P.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(I.string.slice(0,le)))return!0;if(P.typeAtEndOfLine&&I.column()==I.indentation())return!0}function h(I){for(;;){if(!I||I.type=="top")return!0;if(I.type=="}"&&I.prev.info!="namespace")return!1;I=I.prev}}n.defineMode("clike",function(I,P){var le=I.indentUnit,ke=P.statementIndentUnit||le,q=P.dontAlignCalls,L=P.keywords||{},xe=P.types||{},Se=P.builtin||{},be=P.blockKeywords||{},Fe=P.defKeywords||{},Xe=P.atoms||{},nt=P.hooks||{},fe=P.multiLineStrings,Ae=P.indentStatements!==!1,Qe=P.indentSwitch!==!1,ot=P.namespaceSeparator,ft=P.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Pe=P.numberStart||/[\d\.]/,Le=P.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,Be=P.isOperatorChar||/[+\-*&%=<>!?|\/]/,Ke=P.isIdentifierChar||/[\w\$_\xa1-\uffff]/,je=P.isReservedIdentifier||!1,Ge,Ee;function V(Ne,it){var He=Ne.next();if(nt[He]){var ze=nt[He](Ne,it);if(ze!==!1)return ze}if(He=='"'||He=="'")return it.tokenize=he(He),it.tokenize(Ne,it);if(Pe.test(He)){if(Ne.backUp(1),Ne.match(Le))return"number";Ne.next()}if(ft.test(He))return Ge=He,null;if(He=="/"){if(Ne.eat("*"))return it.tokenize=ue,ue(Ne,it);if(Ne.eat("/"))return Ne.skipToEnd(),"comment"}if(Be.test(He)){for(;!Ne.match(/^\/[\/*]/,!1)&&Ne.eat(Be););return"operator"}if(Ne.eatWhile(Ke),ot)for(;Ne.match(ot);)Ne.eatWhile(Ke);var tt=Ne.current();return d(L,tt)?(d(be,tt)&&(Ge="newstatement"),d(Fe,tt)&&(Ee=!0),"keyword"):d(xe,tt)?"type":d(Se,tt)||je&&je(tt)?(d(be,tt)&&(Ge="newstatement"),"builtin"):d(Xe,tt)?"atom":"variable"}function he(Ne){return function(it,He){for(var ze=!1,tt,Ht=!1;(tt=it.next())!=null;){if(tt==Ne&&!ze){Ht=!0;break}ze=!ze&&tt=="\\"}return(Ht||!(ze||fe))&&(He.tokenize=null),"string"}}function ue(Ne,it){for(var He=!1,ze;ze=Ne.next();){if(ze=="/"&&He){it.tokenize=null;break}He=ze=="*"}return"comment"}function rt(Ne,it){P.typeFirstDefinitions&&Ne.eol()&&h(it.context)&&(it.typeAtEndOfLine=c(Ne,it,Ne.pos))}return{startState:function(Ne){return{tokenize:null,context:new t((Ne||0)-le,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ne,it){var He=it.context;if(Ne.sol()&&(He.align==null&&(He.align=!1),it.indented=Ne.indentation(),it.startOfLine=!0),Ne.eatSpace())return rt(Ne,it),null;Ge=Ee=null;var ze=(it.tokenize||V)(Ne,it);if(ze=="comment"||ze=="meta")return ze;if(He.align==null&&(He.align=!0),Ge==";"||Ge==":"||Ge==","&&Ne.match(/^\s*(?:\/\/.*)?$/,!1))for(;it.context.type=="statement";)u(it);else if(Ge=="{")i(it,Ne.column(),"}");else if(Ge=="[")i(it,Ne.column(),"]");else if(Ge=="(")i(it,Ne.column(),")");else if(Ge=="}"){for(;He.type=="statement";)He=u(it);for(He.type=="}"&&(He=u(it));He.type=="statement";)He=u(it)}else Ge==He.type?u(it):Ae&&((He.type=="}"||He.type=="top")&&Ge!=";"||He.type=="statement"&&Ge=="newstatement")&&i(it,Ne.column(),"statement",Ne.current());if(ze=="variable"&&(it.prevToken=="def"||P.typeFirstDefinitions&&c(Ne,it,Ne.start)&&h(it.context)&&Ne.match(/^\s*\(/,!1))&&(ze="def"),nt.token){var tt=nt.token(Ne,it,ze);tt!==void 0&&(ze=tt)}return ze=="def"&&P.styleDefs===!1&&(ze="variable"),it.startOfLine=!1,it.prevToken=Ee?"def":ze||Ge,rt(Ne,it),ze},indent:function(Ne,it){if(Ne.tokenize!=V&&Ne.tokenize!=null||Ne.typeAtEndOfLine)return n.Pass;var He=Ne.context,ze=it&&it.charAt(0),tt=ze==He.type;if(He.type=="statement"&&ze=="}"&&(He=He.prev),P.dontIndentStatements)for(;He.type=="statement"&&P.dontIndentStatements.test(He.info);)He=He.prev;if(nt.indent){var Ht=nt.indent(Ne,He,it,le);if(typeof Ht=="number")return Ht}var Et=He.prev&&He.prev.info=="switch";if(P.allmanIndentation&&/[{(]/.test(ze)){for(;He.type!="top"&&He.type!="}";)He=He.prev;return He.indented}return He.type=="statement"?He.indented+(ze=="{"?0:ke):He.align&&(!q||He.type!=")")?He.column+(tt?0:1):He.type==")"&&!tt?He.indented+ke:He.indented+(tt?0:le)+(!tt&&Et&&!/^(?:case|default)\b/.test(it)?le:0)},electricInput:Qe?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function a(I){for(var P={},le=I.split(" "),ke=0;ke<le.length;++ke)P[le[ke]]=!0;return P}function d(I,P){return typeof I=="function"?I(P):I.propertyIsEnumerable(P)}var f="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",p="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",v=a("int long char short double float unsigned signed void bool"),b=a("SEL instancetype id Class Protocol BOOL");function S(I){return d(v,I)||/.+_t$/.test(I)}function E(I){return S(I)||d(b,I)}var x="case do else for if switch while struct enum union",D="struct enum union";function C(I,P){if(!P.startOfLine)return!1;for(var le,ke=null;le=I.peek();){if(le=="\\"&&I.match(/^.$/)){ke=C;break}else if(le=="/"&&I.match(/^\/[\/\*]/,!1))break;I.next()}return P.tokenize=ke,"meta"}function N(I,P){return P.prevToken=="type"?"type":!1}function R(I){return!I||I.length<2||I[0]!="_"?!1:I[1]=="_"||I[1]!==I[1].toLowerCase()}function H(I){return I.eatWhile(/[\w\.']/),"number"}function j(I,P){if(I.backUp(1),I.match(/^(?:R|u8R|uR|UR|LR)/)){var le=I.match(/^"([^\s\\()]{0,16})\(/);return le?(P.cpp11RawStringDelim=le[1],P.tokenize=Y,Y(I,P)):!1}return I.match(/^(?:u8|u|U|L)/)?I.match(/^["']/,!1)?"string":!1:(I.next(),!1)}function J(I){var P=/(\w+)::~?(\w+)$/.exec(I);return P&&P[1]==P[2]}function W(I,P){for(var le;(le=I.next())!=null;)if(le=='"'&&!I.eat('"')){P.tokenize=null;break}return"string"}function Y(I,P){var le=P.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),ke=I.match(new RegExp(".*?\\)"+le+'"'));return ke?P.tokenize=null:I.skipToEnd(),"string"}function M(I,P){typeof I=="string"&&(I=[I]);var le=[];function ke(L){if(L)for(var xe in L)L.hasOwnProperty(xe)&&le.push(xe)}ke(P.keywords),ke(P.types),ke(P.builtin),ke(P.atoms),le.length&&(P.helperType=I[0],n.registerHelper("hintWords",I[0],le));for(var q=0;q<I.length;++q)n.defineMIME(I[q],P)}M(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(f),types:S,blockKeywords:a(x),defKeywords:a(D),typeFirstDefinitions:!0,atoms:a("NULL true false"),isReservedIdentifier:R,hooks:{"#":C,"*":N},modeProps:{fold:["brace","include"]}}),M(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(f+" "+p),types:S,blockKeywords:a(x+" class try catch"),defKeywords:a(D+" class namespace"),typeFirstDefinitions:!0,atoms:a("true false NULL nullptr"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,isReservedIdentifier:R,hooks:{"#":C,"*":N,u:j,U:j,L:j,R:j,"0":H,"1":H,"2":H,"3":H,"4":H,"5":H,"6":H,"7":H,"8":H,"9":H,token:function(I,P,le){if(le=="variable"&&I.peek()=="("&&(P.prevToken==";"||P.prevToken==null||P.prevToken=="}")&&J(I.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-java",{name:"clike",keywords:a("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:a("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface enum @interface"),typeFirstDefinitions:!0,atoms:a("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(I){return I.match("interface",!1)?!1:(I.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),M("text/x-csharp",{name:"clike",keywords:a("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:a("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:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(I,P){return I.eat('"')?(P.tokenize=W,W(I,P)):(I.eatWhile(/[\w\$_]/),"meta")}}});function K(I,P){for(var le=!1;!I.eol();){if(!le&&I.match('"""')){P.tokenize=null;break}le=I.next()=="\\"&&!le}return"string"}function k(I){return function(P,le){for(var ke;ke=P.next();)if(ke=="*"&&P.eat("/"))if(I==1){le.tokenize=null;break}else return le.tokenize=k(I-1),le.tokenize(P,le);else if(ke=="/"&&P.eat("*"))return le.tokenize=k(I+1),le.tokenize(P,le);return"comment"}}M("text/x-scala",{name:"clike",keywords:a("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:a("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:a("catch class enum do else finally for forSome if match switch try while"),defKeywords:a("class enum def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,P){return I.match('""')?(P.tokenize=K,P.tokenize(I,P)):!1},"'":function(I){return I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(I,P){var le=P.context;return le.type=="}"&&le.align&&I.eat(">")?(P.context=new t(le.indented,le.column,le.type,le.info,null,le.prev),"operator"):!1},"/":function(I,P){return I.eat("*")?(P.tokenize=k(1),P.tokenize(I,P)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function G(I){return function(P,le){for(var ke=!1,q,L=!1;!P.eol();){if(!I&&!ke&&P.match('"')){L=!0;break}if(I&&P.match('"""')){L=!0;break}q=P.next(),!ke&&q=="$"&&P.match("{")&&P.skipTo("}"),ke=!ke&&q=="\\"&&!I}return(L||!I)&&(le.tokenize=null),"string"}}M("text/x-kotlin",{name:"clike",keywords:a("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:a("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:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object interface fun"),atoms:a("true false null this"),hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},"*":function(I,P){return P.prevToken=="."?"variable":"operator"},'"':function(I,P){return P.tokenize=G(I.match('""')),P.tokenize(I,P)},"/":function(I,P){return I.eat("*")?(P.tokenize=k(1),P.tokenize(I,P)):!1},indent:function(I,P,le,ke){var q=le&&le.charAt(0);if((I.prevToken=="}"||I.prevToken==")")&&le=="")return I.indented;if(I.prevToken=="operator"&&le!="}"&&I.context.type!="}"||I.prevToken=="variable"&&q=="."||(I.prevToken=="}"||I.prevToken==")")&&q==".")return ke*2+P.indented;if(P.align&&P.type=="}")return P.indented+(I.context.type==(le||"").charAt(0)?0:ke)}},modeProps:{closeBrackets:{triples:'"'}}}),M(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("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:a("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_TextureMatrixTranspose 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:{"#":C},modeProps:{fold:["brace","include"]}}),M("text/x-nesc",{name:"clike",keywords:a(f+" 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:S,blockKeywords:a(x),atoms:a("null true false"),hooks:{"#":C},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec",{name:"clike",keywords:a(f+" "+y),types:E,builtin:a(m),blockKeywords:a(x+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:a(D+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:R,hooks:{"#":C,"*":N},modeProps:{fold:["brace","include"]}}),M("text/x-objectivec++",{name:"clike",keywords:a(f+" "+y+" "+p),types:E,builtin:a(m),blockKeywords:a(x+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:a(D+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:a("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:R,hooks:{"#":C,"*":N,u:j,U:j,L:j,R:j,"0":H,"1":H,"2":H,"3":H,"4":H,"5":H,"6":H,"7":H,"8":H,"9":H,token:function(I,P,le){if(le=="variable"&&I.peek()=="("&&(P.prevToken==";"||P.prevToken==null||P.prevToken=="}")&&J(I.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),M("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:S,blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":C},modeProps:{fold:["brace","include"]}});var B=null;function re(I){return function(P,le){for(var ke=!1,q,L=!1;!P.eol();){if(!ke&&P.match('"')&&(I=="single"||P.match('""'))){L=!0;break}if(!ke&&P.match("``")){B=re(I),L=!0;break}q=P.next(),ke=I=="single"&&!ke&&q=="\\"}return L&&(le.tokenize=null),"string"}}M("text/x-ceylon",{name:"clike",keywords:a("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(I){var P=I.charAt(0);return P===P.toUpperCase()&&P!==P.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("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:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(I){return I.eatWhile(/[\w\$_]/),"meta"},'"':function(I,P){return P.tokenize=re(I.match('""')?"triple":"single"),P.tokenize(I,P)},"`":function(I,P){return!B||!I.match("`")?!1:(P.tokenize=B,B=null,P.tokenize(I,P))},"'":function(I){return I.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(I,P,le){if((le=="variable"||le=="type")&&P.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var qc=Me((Bc,jc)=>{(function(n){typeof Bc=="object"&&typeof jc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("diff",function(){var t={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var u=i.string.search(/[\t ]+?$/);if(!i.sol()||u===0)return i.skipToEnd(),("error "+(t[i.string.charAt(0)]||"")).replace(/ $/,"");var c=t[i.peek()]||i.skipToEnd();return u===-1?i.skipToEnd():i.pos=u,c}}}),n.defineMIME("text/x-diff","diff")})});var Wc=Me((Uc,Hc)=>{(function(n){typeof Uc=="object"&&typeof Hc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("fortran",function(){function t(p){for(var y={},m=0;m<p.length;++m)y[p[m]]=!0;return y}var i=t(["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"]),u=t(["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"]),c=t(["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"]),h=/[+\-*&=<>\/\:]/,a=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function d(p,y){if(p.match(a))return"operator";var m=p.next();if(m=="!")return p.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=f(m),y.tokenize(p,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return p.eatWhile(/[\w\.]/),"number";if(h.test(m))return p.eatWhile(h),"operator";p.eatWhile(/[\w\$_]/);var v=p.current().toLowerCase();return i.hasOwnProperty(v)?"keyword":u.hasOwnProperty(v)||c.hasOwnProperty(v)?"builtin":"variable"}function f(p){return function(y,m){for(var v=!1,b,S=!1;(b=y.next())!=null;){if(b==p&&!v){S=!0;break}v=!v&&b=="\\"}return(S||!v)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(p,y){if(p.eatSpace())return null;var m=(y.tokenize||d)(p,y);return m=="comment"||m=="meta",m}}}),n.defineMIME("text/x-fortran","fortran")})});var Kc=Me(($c,Gc)=>{(function(n){typeof $c=="object"&&typeof Gc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("go",function(t){var i=t.indentUnit,u={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},c={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},h=/[+\-*&^%:=<>!|\/]/,a;function d(b,S){var E=b.next();if(E=='"'||E=="'"||E=="`")return S.tokenize=f(E),S.tokenize(b,S);if(/[\d\.]/.test(E))return E=="."?b.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?b.match(/^[xX][0-9a-fA-F]+/)||b.match(/^0[0-7]+/):b.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return a=E,null;if(E=="/"){if(b.eat("*"))return S.tokenize=p,p(b,S);if(b.eat("/"))return b.skipToEnd(),"comment"}if(h.test(E))return b.eatWhile(h),"operator";b.eatWhile(/[\w\$_\xa1-\uffff]/);var x=b.current();return u.propertyIsEnumerable(x)?((x=="case"||x=="default")&&(a="case"),"keyword"):c.propertyIsEnumerable(x)?"atom":"variable"}function f(b){return function(S,E){for(var x=!1,D,C=!1;(D=S.next())!=null;){if(D==b&&!x){C=!0;break}x=!x&&b!="`"&&D=="\\"}return(C||!(x||b=="`"))&&(E.tokenize=d),"string"}}function p(b,S){for(var E=!1,x;x=b.next();){if(x=="/"&&E){S.tokenize=d;break}E=x=="*"}return"comment"}function y(b,S,E,x,D){this.indented=b,this.column=S,this.type=E,this.align=x,this.prev=D}function m(b,S,E){return b.context=new y(b.indented,S,E,null,b.context)}function v(b){if(!b.context.prev)return;var S=b.context.type;return(S==")"||S=="]"||S=="}")&&(b.indented=b.context.indented),b.context=b.context.prev}return{startState:function(b){return{tokenize:null,context:new y((b||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(b,S){var E=S.context;if(b.sol()&&(E.align==null&&(E.align=!1),S.indented=b.indentation(),S.startOfLine=!0,E.type=="case"&&(E.type="}")),b.eatSpace())return null;a=null;var x=(S.tokenize||d)(b,S);return x=="comment"||(E.align==null&&(E.align=!0),a=="{"?m(S,b.column(),"}"):a=="["?m(S,b.column(),"]"):a=="("?m(S,b.column(),")"):a=="case"?E.type="case":(a=="}"&&E.type=="}"||a==E.type)&&v(S),S.startOfLine=!1),x},indent:function(b,S){if(b.tokenize!=d&&b.tokenize!=null)return n.Pass;var E=b.context,x=S&&S.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(S))return b.context.type="}",E.indented;var D=x==E.type;return E.align?E.column+(D?0:1):E.indented+(D?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),n.defineMIME("text/x-go","go")})});var Yc=Me((Vc,Xc)=>{(function(n){typeof Vc=="object"&&typeof Xc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("haskell",function(t,i){function u(C,N,R){return N(R),R(C,N)}var c=/[a-z_]/,h=/[A-Z]/,a=/\d/,d=/[0-9A-Fa-f]/,f=/[0-7]/,p=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,v=/[ \t\v\f]/;function b(C,N){if(C.eatWhile(v))return null;var R=C.next();if(m.test(R)){if(R=="{"&&C.eat("-")){var H="comment";return C.eat("#")&&(H="meta"),u(C,N,S(H,1))}return null}if(R=="'")return C.eat("\\"),C.next(),C.eat("'")?"string":"string error";if(R=='"')return u(C,N,E);if(h.test(R))return C.eatWhile(p),C.eat(".")?"qualifier":"variable-2";if(c.test(R))return C.eatWhile(p),"variable";if(a.test(R)){if(R=="0"){if(C.eat(/[xX]/))return C.eatWhile(d),"integer";if(C.eat(/[oO]/))return C.eatWhile(f),"number"}C.eatWhile(a);var H="number";return C.match(/^\.\d+/)&&(H="number"),C.eat(/[eE]/)&&(H="number",C.eat(/[-+]/),C.eatWhile(a)),H}if(R=="."&&C.eat("."))return"keyword";if(y.test(R)){if(R=="-"&&C.eat(/-/)&&(C.eatWhile(/-/),!C.eat(y)))return C.skipToEnd(),"comment";var H="variable";return R==":"&&(H="variable-2"),C.eatWhile(y),H}return"error"}function S(C,N){return N==0?b:function(R,H){for(var j=N;!R.eol();){var J=R.next();if(J=="{"&&R.eat("-"))++j;else if(J=="-"&&R.eat("}")&&(--j,j==0))return H(b),C}return H(S(C,j)),C}}function E(C,N){for(;!C.eol();){var R=C.next();if(R=='"')return N(b),"string";if(R=="\\"){if(C.eol()||C.eat(v))return N(x),"string";C.eat("&")||C.next()}}return N(b),"string error"}function x(C,N){return C.eat("\\")?u(C,N,E):(C.next(),N(b),"error")}var D=function(){var C={};function N(j){return function(){for(var J=0;J<arguments.length;J++)C[arguments[J]]=j}}N("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),N("keyword")("..",":","::","=","\\","<-","->","@","~","=>"),N("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),N("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"),N("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 R=i.overrideKeywords;if(R)for(var H in R)R.hasOwnProperty(H)&&(C[H]=R[H]);return C}();return{startState:function(){return{f:b}},copyState:function(C){return{f:C.f}},token:function(C,N){var R=N.f(C,function(j){N.f=j}),H=C.current();return D.hasOwnProperty(H)?D[H]:R},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),n.defineMIME("text/x-haskell","haskell")})});var Ko=Me((Zc,Qc)=>{(function(n){typeof Zc=="object"&&typeof Qc=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};n.defineMode("xml",function(u,c){var h=u.indentUnit,a={},d=c.htmlMode?t:i;for(var f in d)a[f]=d[f];for(var f in c)a[f]=c[f];var p,y;function m(k,G){function B(P){return G.tokenize=P,P(k,G)}var re=k.next();if(re=="<")return k.eat("!")?k.eat("[")?k.match("CDATA[")?B(S("atom","]]>")):null:k.match("--")?B(S("comment","-->")):k.match("DOCTYPE",!0,!0)?(k.eatWhile(/[\w\._\-]/),B(E(1))):null:k.eat("?")?(k.eatWhile(/[\w\._\-]/),G.tokenize=S("meta","?>"),"meta"):(p=k.eat("/")?"closeTag":"openTag",G.tokenize=v,"tag bracket");if(re=="&"){var I;return k.eat("#")?k.eat("x")?I=k.eatWhile(/[a-fA-F\d]/)&&k.eat(";"):I=k.eatWhile(/[\d]/)&&k.eat(";"):I=k.eatWhile(/[\w\.\-:]/)&&k.eat(";"),I?"atom":"error"}else return k.eatWhile(/[^&<]/),null}m.isInText=!0;function v(k,G){var B=k.next();if(B==">"||B=="/"&&k.eat(">"))return G.tokenize=m,p=B==">"?"endTag":"selfcloseTag","tag bracket";if(B=="=")return p="equals",null;if(B=="<"){G.tokenize=m,G.state=N,G.tagName=G.tagStart=null;var re=G.tokenize(k,G);return re?re+" tag error":"tag error"}else return/[\'\"]/.test(B)?(G.tokenize=b(B),G.stringStartCol=k.column(),G.tokenize(k,G)):(k.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function b(k){var G=function(B,re){for(;!B.eol();)if(B.next()==k){re.tokenize=v;break}return"string"};return G.isInAttribute=!0,G}function S(k,G){return function(B,re){for(;!B.eol();){if(B.match(G)){re.tokenize=m;break}B.next()}return k}}function E(k){return function(G,B){for(var re;(re=G.next())!=null;){if(re=="<")return B.tokenize=E(k+1),B.tokenize(G,B);if(re==">")if(k==1){B.tokenize=m;break}else return B.tokenize=E(k-1),B.tokenize(G,B)}return"meta"}}function x(k,G,B){this.prev=k.context,this.tagName=G||"",this.indent=k.indented,this.startOfLine=B,(a.doNotIndent.hasOwnProperty(G)||k.context&&k.context.noIndent)&&(this.noIndent=!0)}function D(k){k.context&&(k.context=k.context.prev)}function C(k,G){for(var B;;){if(!k.context)return;if(B=k.context.tagName,!a.contextGrabbers.hasOwnProperty(B)||!a.contextGrabbers[B].hasOwnProperty(G))return;D(k)}}function N(k,G,B){return k=="openTag"?(B.tagStart=G.column(),R):k=="closeTag"?H:N}function R(k,G,B){return k=="word"?(B.tagName=G.current(),y="tag",W):a.allowMissingTagName&&k=="endTag"?(y="tag bracket",W(k,G,B)):(y="error",R)}function H(k,G,B){if(k=="word"){var re=G.current();return B.context&&B.context.tagName!=re&&a.implicitlyClosed.hasOwnProperty(B.context.tagName)&&D(B),B.context&&B.context.tagName==re||a.matchClosing===!1?(y="tag",j):(y="tag error",J)}else return a.allowMissingTagName&&k=="endTag"?(y="tag bracket",j(k,G,B)):(y="error",J)}function j(k,G,B){return k!="endTag"?(y="error",j):(D(B),N)}function J(k,G,B){return y="error",j(k,G,B)}function W(k,G,B){if(k=="word")return y="attribute",Y;if(k=="endTag"||k=="selfcloseTag"){var re=B.tagName,I=B.tagStart;return B.tagName=B.tagStart=null,k=="selfcloseTag"||a.autoSelfClosers.hasOwnProperty(re)?C(B,re):(C(B,re),B.context=new x(B,re,I==B.indented)),N}return y="error",W}function Y(k,G,B){return k=="equals"?M:(a.allowMissing||(y="error"),W(k,G,B))}function M(k,G,B){return k=="string"?K:k=="word"&&a.allowUnquoted?(y="string",W):(y="error",W(k,G,B))}function K(k,G,B){return k=="string"?K:W(k,G,B)}return{startState:function(k){var G={tokenize:m,state:N,indented:k||0,tagName:null,tagStart:null,context:null};return k!=null&&(G.baseIndent=k),G},token:function(k,G){if(!G.tagName&&k.sol()&&(G.indented=k.indentation()),k.eatSpace())return null;p=null;var B=G.tokenize(k,G);return(B||p)&&B!="comment"&&(y=null,G.state=G.state(p||B,k,G),y&&(B=y=="error"?B+" error":y)),B},indent:function(k,G,B){var re=k.context;if(k.tokenize.isInAttribute)return k.tagStart==k.indented?k.stringStartCol+1:k.indented+h;if(re&&re.noIndent)return n.Pass;if(k.tokenize!=v&&k.tokenize!=m)return B?B.match(/^(\s*)/)[0].length:0;if(k.tagName)return a.multilineTagIndentPastTag!==!1?k.tagStart+k.tagName.length+2:k.tagStart+h*(a.multilineTagIndentFactor||1);if(a.alignCDATA&&/<!\[CDATA\[/.test(G))return 0;var I=G&&/^<(\/)?([\w_:\.-]*)/.exec(G);if(I&&I[1])for(;re;)if(re.tagName==I[2]){re=re.prev;break}else if(a.implicitlyClosed.hasOwnProperty(re.tagName))re=re.prev;else break;else if(I)for(;re;){var P=a.contextGrabbers[re.tagName];if(P&&P.hasOwnProperty(I[2]))re=re.prev;else break}for(;re&&re.prev&&!re.startOfLine;)re=re.prev;return re?re.indent+h:k.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:a.htmlMode?"html":"xml",helperType:a.htmlMode?"html":"xml",skipAttribute:function(k){k.state==M&&(k.state=W)},xmlCurrentTag:function(k){return k.tagName?{name:k.tagName,close:k.type=="closeTag"}:null},xmlCurrentContext:function(k){for(var G=[],B=k.context;B;B=B.prev)G.push(B.tagName);return G.reverse()}}}),n.defineMIME("text/xml","xml"),n.defineMIME("application/xml","xml"),n.mimeModes.hasOwnProperty("text/html")||n.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Ps=Me((Jc,ed)=>{(function(n){typeof Jc=="object"&&typeof ed=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("javascript",function(t,i){var u=t.indentUnit,c=i.statementIndent,h=i.jsonld,a=i.json||h,d=i.typescript,f=i.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function F(zt){return{type:zt,style:"keyword"}}var X=F("keyword a"),ee=F("keyword b"),pe=F("keyword c"),ge=F("keyword d"),lt=F("operator"),vt={type:"atom",style:"atom"};return{if:F("if"),while:X,with:X,else:ee,do:ee,try:ee,finally:ee,return:ge,break:ge,continue:ge,new:F("new"),delete:pe,void:pe,throw:pe,debugger:F("debugger"),var:F("var"),const:F("var"),let:F("var"),function:F("function"),catch:F("catch"),for:F("for"),switch:F("switch"),case:F("case"),default:F("default"),in:lt,typeof:lt,instanceof:lt,true:vt,false:vt,null:vt,undefined:vt,NaN:vt,Infinity:vt,this:F("this"),class:F("class"),super:F("atom"),yield:pe,export:F("export"),import:F("import"),extends:pe,await:pe}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(F){for(var X=!1,ee,pe=!1;(ee=F.next())!=null;){if(!X){if(ee=="/"&&!pe)return;ee=="["?pe=!0:pe&&ee=="]"&&(pe=!1)}X=!X&&ee=="\\"}}var b,S;function E(F,X,ee){return b=F,S=ee,X}function x(F,X){var ee=F.next();if(ee=='"'||ee=="'")return X.tokenize=D(ee),X.tokenize(F,X);if(ee=="."&&F.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(ee=="."&&F.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ee))return E(ee);if(ee=="="&&F.eat(">"))return E("=>","operator");if(ee=="0"&&F.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(ee))return F.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(ee=="/")return F.eat("*")?(X.tokenize=C,C(F,X)):F.eat("/")?(F.skipToEnd(),E("comment","comment")):Ve(F,X,1)?(v(F),F.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(F.eat("="),E("operator","operator",F.current()));if(ee=="`")return X.tokenize=N,N(F,X);if(ee=="#"&&F.peek()=="!")return F.skipToEnd(),E("meta","meta");if(ee=="#"&&F.eatWhile(f))return E("variable","property");if(ee=="<"&&F.match("!--")||ee=="-"&&F.match("->")&&!/\S/.test(F.string.slice(0,F.start)))return F.skipToEnd(),E("comment","comment");if(y.test(ee))return(ee!=">"||!X.lexical||X.lexical.type!=">")&&(F.eat("=")?(ee=="!"||ee=="=")&&F.eat("="):/[<>*+\-|&?]/.test(ee)&&(F.eat(ee),ee==">"&&F.eat(ee))),ee=="?"&&F.eat(".")?E("."):E("operator","operator",F.current());if(f.test(ee)){F.eatWhile(f);var pe=F.current();if(X.lastType!="."){if(p.propertyIsEnumerable(pe)){var ge=p[pe];return E(ge.type,ge.style,pe)}if(pe=="async"&&F.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",pe)}return E("variable","variable",pe)}}function D(F){return function(X,ee){var pe=!1,ge;if(h&&X.peek()=="@"&&X.match(m))return ee.tokenize=x,E("jsonld-keyword","meta");for(;(ge=X.next())!=null&&!(ge==F&&!pe);)pe=!pe&&ge=="\\";return pe||(ee.tokenize=x),E("string","string")}}function C(F,X){for(var ee=!1,pe;pe=F.next();){if(pe=="/"&&ee){X.tokenize=x;break}ee=pe=="*"}return E("comment","comment")}function N(F,X){for(var ee=!1,pe;(pe=F.next())!=null;){if(!ee&&(pe=="`"||pe=="$"&&F.eat("{"))){X.tokenize=x;break}ee=!ee&&pe=="\\"}return E("quasi","string-2",F.current())}var R="([{}])";function H(F,X){X.fatArrowAt&&(X.fatArrowAt=null);var ee=F.string.indexOf("=>",F.start);if(ee<0)return;if(d){var pe=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(F.string.slice(F.start,ee));pe&&(ee=pe.index)}for(var ge=0,lt=!1,vt=ee-1;vt>=0;--vt){var zt=F.string.charAt(vt),hr=R.indexOf(zt);if(hr>=0&&hr<3){if(!ge){++vt;break}if(--ge==0){zt=="("&&(lt=!0);break}}else if(hr>=3&&hr<6)++ge;else if(f.test(zt))lt=!0;else if(/["'\/`]/.test(zt))for(;;--vt){if(vt==0)return;var dt=F.string.charAt(vt-1);if(dt==zt&&F.string.charAt(vt-2)!="\\"){vt--;break}}else if(lt&&!ge){++vt;break}}lt&&!ge&&(X.fatArrowAt=vt)}var j={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function J(F,X,ee,pe,ge,lt){this.indented=F,this.column=X,this.type=ee,this.prev=ge,this.info=lt,pe!=null&&(this.align=pe)}function W(F,X){for(var ee=F.localVars;ee;ee=ee.next)if(ee.name==X)return!0;for(var pe=F.context;pe;pe=pe.prev)for(var ee=pe.vars;ee;ee=ee.next)if(ee.name==X)return!0}function Y(F,X,ee,pe,ge){var lt=F.cc;for(M.state=F,M.stream=ge,M.marked=null,M.cc=lt,M.style=X,F.lexical.hasOwnProperty("align")||(F.lexical.align=!0);;){var vt=lt.length?lt.pop():a?fe:Xe;if(vt(ee,pe)){for(;lt.length&&lt[lt.length-1].lex;)lt.pop()();return M.marked?M.marked:ee=="variable"&&W(F,pe)?"variable-2":X}}}var M={state:null,column:null,marked:null,cc:null};function K(){for(var F=arguments.length-1;F>=0;F--)M.cc.push(arguments[F])}function k(){return K.apply(null,arguments),!0}function G(F,X){for(var ee=X;ee;ee=ee.next)if(ee.name==F)return!0;return!1}function B(F){var X=M.state;if(M.marked="def",X.context){if(X.lexical.info=="var"&&X.context&&X.context.block){var ee=re(F,X.context);if(ee!=null){X.context=ee;return}}else if(!G(F,X.localVars)){X.localVars=new le(F,X.localVars);return}}i.globalVars&&!G(F,X.globalVars)&&(X.globalVars=new le(F,X.globalVars))}function re(F,X){if(X)if(X.block){var ee=re(F,X.prev);return ee?ee==X.prev?X:new P(ee,X.vars,!0):null}else return G(F,X.vars)?X:new P(X.prev,new le(F,X.vars),!1);else return null}function I(F){return F=="public"||F=="private"||F=="protected"||F=="abstract"||F=="readonly"}function P(F,X,ee){this.prev=F,this.vars=X,this.block=ee}function le(F,X){this.name=F,this.next=X}var ke=new le("this",new le("arguments",null));function q(){M.state.context=new P(M.state.context,M.state.localVars,!1),M.state.localVars=ke}function L(){M.state.context=new P(M.state.context,M.state.localVars,!0),M.state.localVars=null}function xe(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}xe.lex=!0;function Se(F,X){var ee=function(){var pe=M.state,ge=pe.indented;if(pe.lexical.type=="stat")ge=pe.lexical.indented;else for(var lt=pe.lexical;lt&&lt.type==")"&&lt.align;lt=lt.prev)ge=lt.indented;pe.lexical=new J(ge,M.stream.column(),F,null,pe.lexical,X)};return ee.lex=!0,ee}function be(){var F=M.state;F.lexical.prev&&(F.lexical.type==")"&&(F.indented=F.lexical.indented),F.lexical=F.lexical.prev)}be.lex=!0;function Fe(F){function X(ee){return ee==F?k():F==";"||ee=="}"||ee==")"||ee=="]"?K():k(X)}return X}function Xe(F,X){return F=="var"?k(Se("vardef",X),vr,Fe(";"),be):F=="keyword a"?k(Se("form"),Qe,Xe,be):F=="keyword b"?k(Se("form"),Xe,be):F=="keyword d"?M.stream.match(/^\s*$/,!1)?k():k(Se("stat"),ft,Fe(";"),be):F=="debugger"?k(Fe(";")):F=="{"?k(Se("}"),L,Ht,be,xe):F==";"?k():F=="if"?(M.state.lexical.info=="else"&&M.state.cc[M.state.cc.length-1]==be&&M.state.cc.pop()(),k(Se("form"),Qe,Xe,be,Jt)):F=="function"?k(Z):F=="for"?k(Se("form"),_r,Xe,be):F=="class"||d&&X=="interface"?(M.marked="keyword",k(Se("form",F=="class"?F:X),ce,be)):F=="variable"?d&&X=="declare"?(M.marked="keyword",k(Xe)):d&&(X=="module"||X=="enum"||X=="type")&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword",X=="enum"?k(Ce):X=="type"?k(O,Fe("operator"),Je,Fe(";")):k(Se("form"),Nt,Fe("{"),Se("}"),Ht,be,be)):d&&X=="namespace"?(M.marked="keyword",k(Se("form"),fe,Xe,be)):d&&X=="abstract"?(M.marked="keyword",k(Xe)):k(Se("stat"),ue):F=="switch"?k(Se("form"),Qe,Fe("{"),Se("}","switch"),L,Ht,be,be,xe):F=="case"?k(fe,Fe(":")):F=="default"?k(Fe(":")):F=="catch"?k(Se("form"),q,nt,Xe,be,xe):F=="export"?k(Se("stat"),Oe,be):F=="import"?k(Se("stat"),Ye,be):F=="async"?k(Xe):X=="@"?k(fe,Xe):K(Se("stat"),fe,Fe(";"),be)}function nt(F){if(F=="(")return k(z,Fe(")"))}function fe(F,X){return ot(F,X,!1)}function Ae(F,X){return ot(F,X,!0)}function Qe(F){return F!="("?K():k(Se(")"),ft,Fe(")"),be)}function ot(F,X,ee){if(M.state.fatArrowAt==M.stream.start){var pe=ee?Ge:je;if(F=="(")return k(q,Se(")"),ze(z,")"),be,Fe("=>"),pe,xe);if(F=="variable")return K(q,Nt,Fe("=>"),pe,xe)}var ge=ee?Le:Pe;return j.hasOwnProperty(F)?k(ge):F=="function"?k(Z,ge):F=="class"||d&&X=="interface"?(M.marked="keyword",k(Se("form"),te,be)):F=="keyword c"||F=="async"?k(ee?Ae:fe):F=="("?k(Se(")"),ft,Fe(")"),be,ge):F=="operator"||F=="spread"?k(ee?Ae:fe):F=="["?k(Se("]"),ve,be,ge):F=="{"?tt(Ne,"}",null,ge):F=="quasi"?K(Be,ge):F=="new"?k(Ee(ee)):k()}function ft(F){return F.match(/[;\}\)\],]/)?K():K(fe)}function Pe(F,X){return F==","?k(ft):Le(F,X,!1)}function Le(F,X,ee){var pe=ee==!1?Pe:Le,ge=ee==!1?fe:Ae;if(F=="=>")return k(q,ee?Ge:je,xe);if(F=="operator")return/\+\+|--/.test(X)||d&&X=="!"?k(pe):d&&X=="<"&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?k(Se(">"),ze(Je,">"),be,pe):X=="?"?k(fe,Fe(":"),ge):k(ge);if(F=="quasi")return K(Be,pe);if(F==";")return;if(F=="(")return tt(Ae,")","call",pe);if(F==".")return k(rt,pe);if(F=="[")return k(Se("]"),ft,Fe("]"),be,pe);if(d&&X=="as")return M.marked="keyword",k(Je,pe);if(F=="regexp")return M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),k(ge)}function Be(F,X){return F!="quasi"?K():X.slice(X.length-2)!="${"?k(Be):k(fe,Ke)}function Ke(F){if(F=="}")return M.marked="string-2",M.state.tokenize=N,k(Be)}function je(F){return H(M.stream,M.state),K(F=="{"?Xe:fe)}function Ge(F){return H(M.stream,M.state),K(F=="{"?Xe:Ae)}function Ee(F){return function(X){return X=="."?k(F?he:V):X=="variable"&&d?k(kt,F?Le:Pe):K(F?Ae:fe)}}function V(F,X){if(X=="target")return M.marked="keyword",k(Pe)}function he(F,X){if(X=="target")return M.marked="keyword",k(Le)}function ue(F){return F==":"?k(be,Xe):K(Pe,Fe(";"),be)}function rt(F){if(F=="variable")return M.marked="property",k()}function Ne(F,X){if(F=="async")return M.marked="property",k(Ne);if(F=="variable"||M.style=="keyword"){if(M.marked="property",X=="get"||X=="set")return k(it);var ee;return d&&M.state.fatArrowAt==M.stream.start&&(ee=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+ee[0].length),k(He)}else{if(F=="number"||F=="string")return M.marked=h?"property":M.style+" property",k(He);if(F=="jsonld-keyword")return k(He);if(d&&I(X))return M.marked="keyword",k(Ne);if(F=="[")return k(fe,Et,Fe("]"),He);if(F=="spread")return k(Ae,He);if(X=="*")return M.marked="keyword",k(Ne);if(F==":")return K(He)}}function it(F){return F!="variable"?K(He):(M.marked="property",k(Z))}function He(F){if(F==":")return k(Ae);if(F=="(")return K(Z)}function ze(F,X,ee){function pe(ge,lt){if(ee?ee.indexOf(ge)>-1:ge==","){var vt=M.state.lexical;return vt.info=="call"&&(vt.pos=(vt.pos||0)+1),k(function(zt,hr){return zt==X||hr==X?K():K(F)},pe)}return ge==X||lt==X?k():ee&&ee.indexOf(";")>-1?K(F):k(Fe(X))}return function(ge,lt){return ge==X||lt==X?k():K(F,pe)}}function tt(F,X,ee){for(var pe=3;pe<arguments.length;pe++)M.cc.push(arguments[pe]);return k(Se(X,ee),ze(F,X),be)}function Ht(F){return F=="}"?k():K(Xe,Ht)}function Et(F,X){if(d){if(F==":")return k(Je);if(X=="?")return k(Et)}}function Pr(F,X){if(d&&(F==":"||X=="in"))return k(Je)}function st(F){if(d&&F==":")return M.stream.match(/^\s*\w+\s+is\b/,!1)?k(fe,Ft,Je):k(Je)}function Ft(F,X){if(X=="is")return M.marked="keyword",k()}function Je(F,X){if(X=="keyof"||X=="typeof"||X=="infer"||X=="readonly")return M.marked="keyword",k(X=="typeof"?Ae:Je);if(F=="variable"||X=="void")return M.marked="type",k(Ot);if(X=="|"||X=="&")return k(Je);if(F=="string"||F=="number"||F=="atom")return k(Ot);if(F=="[")return k(Se("]"),ze(Je,"]",","),be,Ot);if(F=="{")return k(Se("}"),wt,be,Ot);if(F=="(")return k(ze(Tt,")"),ht,Ot);if(F=="<")return k(ze(Je,">"),Je)}function ht(F){if(F=="=>")return k(Je)}function wt(F){return F.match(/[\}\)\]]/)?k():F==","||F==";"?k(wt):K(Qt,wt)}function Qt(F,X){if(F=="variable"||M.style=="keyword")return M.marked="property",k(Qt);if(X=="?"||F=="number"||F=="string")return k(Qt);if(F==":")return k(Je);if(F=="[")return k(Fe("variable"),Pr,Fe("]"),Qt);if(F=="(")return K(ne,Qt);if(!F.match(/[;\}\)\],]/))return k()}function Tt(F,X){return F=="variable"&&M.stream.match(/^\s*[?:]/,!1)||X=="?"?k(Tt):F==":"?k(Je):F=="spread"?k(Tt):K(Je)}function Ot(F,X){if(X=="<")return k(Se(">"),ze(Je,">"),be,Ot);if(X=="|"||F=="."||X=="&")return k(Je);if(F=="[")return k(Je,Fe("]"),Ot);if(X=="extends"||X=="implements")return M.marked="keyword",k(Je);if(X=="?")return k(Je,Fe(":"),Je)}function kt(F,X){if(X=="<")return k(Se(">"),ze(Je,">"),be,Ot)}function at(){return K(Je,Cr)}function Cr(F,X){if(X=="=")return k(Je)}function vr(F,X){return X=="enum"?(M.marked="keyword",k(Ce)):K(Nt,Et,Wt,yr)}function Nt(F,X){if(d&&I(X))return M.marked="keyword",k(Nt);if(F=="variable")return B(X),k();if(F=="spread")return k(Nt);if(F=="[")return tt(rn,"]");if(F=="{")return tt(or,"}")}function or(F,X){return F=="variable"&&!M.stream.match(/^\s*:/,!1)?(B(X),k(Wt)):(F=="variable"&&(M.marked="property"),F=="spread"?k(Nt):F=="}"?K():F=="["?k(fe,Fe("]"),Fe(":"),or):k(Fe(":"),Nt,Wt))}function rn(){return K(Nt,Wt)}function Wt(F,X){if(X=="=")return k(Ae)}function yr(F){if(F==",")return k(vr)}function Jt(F,X){if(F=="keyword b"&&X=="else")return k(Se("form","else"),Xe,be)}function _r(F,X){if(X=="await")return k(_r);if(F=="(")return k(Se(")"),oe,be)}function oe(F){return F=="var"?k(vr,ie):F=="variable"?k(ie):K(ie)}function ie(F,X){return F==")"?k():F==";"?k(ie):X=="in"||X=="of"?(M.marked="keyword",k(fe,ie)):K(fe,ie)}function Z(F,X){if(X=="*")return M.marked="keyword",k(Z);if(F=="variable")return B(X),k(Z);if(F=="(")return k(q,Se(")"),ze(z,")"),be,st,Xe,xe);if(d&&X=="<")return k(Se(">"),ze(at,">"),be,Z)}function ne(F,X){if(X=="*")return M.marked="keyword",k(ne);if(F=="variable")return B(X),k(ne);if(F=="(")return k(q,Se(")"),ze(z,")"),be,st,xe);if(d&&X=="<")return k(Se(">"),ze(at,">"),be,ne)}function O(F,X){if(F=="keyword"||F=="variable")return M.marked="type",k(O);if(X=="<")return k(Se(">"),ze(at,">"),be)}function z(F,X){return X=="@"&&k(fe,z),F=="spread"?k(z):d&&I(X)?(M.marked="keyword",k(z)):d&&F=="this"?k(Et,Wt):K(Nt,Et,Wt)}function te(F,X){return F=="variable"?ce(F,X):ye(F,X)}function ce(F,X){if(F=="variable")return B(X),k(ye)}function ye(F,X){if(X=="<")return k(Se(">"),ze(at,">"),be,ye);if(X=="extends"||X=="implements"||d&&F==",")return X=="implements"&&(M.marked="keyword"),k(d?Je:fe,ye);if(F=="{")return k(Se("}"),me,be)}function me(F,X){if(F=="async"||F=="variable"&&(X=="static"||X=="get"||X=="set"||d&&I(X))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return M.marked="keyword",k(me);if(F=="variable"||M.style=="keyword")return M.marked="property",k(Te,me);if(F=="number"||F=="string")return k(Te,me);if(F=="[")return k(fe,Et,Fe("]"),Te,me);if(X=="*")return M.marked="keyword",k(me);if(d&&F=="(")return K(ne,me);if(F==";"||F==",")return k(me);if(F=="}")return k();if(X=="@")return k(fe,me)}function Te(F,X){if(X=="?")return k(Te);if(F==":")return k(Je,Wt);if(X=="=")return k(Ae);var ee=M.state.lexical.prev,pe=ee&&ee.info=="interface";return K(pe?ne:Z)}function Oe(F,X){return X=="*"?(M.marked="keyword",k(ae,Fe(";"))):X=="default"?(M.marked="keyword",k(fe,Fe(";"))):F=="{"?k(ze(De,"}"),ae,Fe(";")):K(Xe)}function De(F,X){if(X=="as")return M.marked="keyword",k(Fe("variable"));if(F=="variable")return K(Ae,De)}function Ye(F){return F=="string"?k():F=="("?K(fe):F=="."?K(Pe):K(xt,gt,ae)}function xt(F,X){return F=="{"?tt(xt,"}"):(F=="variable"&&B(X),X=="*"&&(M.marked="keyword"),k(U))}function gt(F){if(F==",")return k(xt,gt)}function U(F,X){if(X=="as")return M.marked="keyword",k(xt)}function ae(F,X){if(X=="from")return M.marked="keyword",k(fe)}function ve(F){return F=="]"?k():K(ze(Ae,"]"))}function Ce(){return K(Se("form"),Nt,Fe("{"),Se("}"),ze(Ie,"}"),be,be)}function Ie(){return K(Nt,Wt)}function We(F,X){return F.lastType=="operator"||F.lastType==","||y.test(X.charAt(0))||/[,.]/.test(X.charAt(0))}function Ve(F,X,ee){return X.tokenize==x&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(X.lastType)||X.lastType=="quasi"&&/\{\s*$/.test(F.string.slice(0,F.pos-(ee||0)))}return{startState:function(F){var X={tokenize:x,lastType:"sof",cc:[],lexical:new J((F||0)-u,0,"block",!1),localVars:i.localVars,context:i.localVars&&new P(null,null,!1),indented:F||0};return i.globalVars&&typeof i.globalVars=="object"&&(X.globalVars=i.globalVars),X},token:function(F,X){if(F.sol()&&(X.lexical.hasOwnProperty("align")||(X.lexical.align=!1),X.indented=F.indentation(),H(F,X)),X.tokenize!=C&&F.eatSpace())return null;var ee=X.tokenize(F,X);return b=="comment"?ee:(X.lastType=b=="operator"&&(S=="++"||S=="--")?"incdec":b,Y(X,ee,b,S,F))},indent:function(F,X){if(F.tokenize==C||F.tokenize==N)return n.Pass;if(F.tokenize!=x)return 0;var ee=X&&X.charAt(0),pe=F.lexical,ge;if(!/^\s*else\b/.test(X))for(var lt=F.cc.length-1;lt>=0;--lt){var vt=F.cc[lt];if(vt==be)pe=pe.prev;else if(vt!=Jt)break}for(;(pe.type=="stat"||pe.type=="form")&&(ee=="}"||(ge=F.cc[F.cc.length-1])&&(ge==Pe||ge==Le)&&!/^[,\.=+\-*:?[\(]/.test(X));)pe=pe.prev;c&&pe.type==")"&&pe.prev.type=="stat"&&(pe=pe.prev);var zt=pe.type,hr=ee==zt;return zt=="vardef"?pe.indented+(F.lastType=="operator"||F.lastType==","?pe.info.length+1:0):zt=="form"&&ee=="{"?pe.indented:zt=="form"?pe.indented+u:zt=="stat"?pe.indented+(We(F,X)?c||u:0):pe.info=="switch"&&!hr&&i.doubleIndentSwitch!=!1?pe.indented+(/^(?:case|default)\b/.test(X)?u:2*u):pe.align?pe.column+(hr?0:1):pe.indented+(hr?0:u)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:a?null:"/*",blockCommentEnd:a?null:"*/",blockCommentContinue:a?null:" * ",lineComment:a?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:a?"json":"javascript",jsonldMode:h,jsonMode:a,expressionAllowed:Ve,skipExpression:function(F){var X=F.cc[F.cc.length-1];(X==fe||X==Ae)&&F.cc.pop()}}}),n.registerHelper("wordChars","javascript",/[\w$]/),n.defineMIME("text/javascript","javascript"),n.defineMIME("text/ecmascript","javascript"),n.defineMIME("application/javascript","javascript"),n.defineMIME("application/x-javascript","javascript"),n.defineMIME("application/ecmascript","javascript"),n.defineMIME("application/json",{name:"javascript",json:!0}),n.defineMIME("application/x-json",{name:"javascript",json:!0}),n.defineMIME("application/manifest+json",{name:"javascript",json:!0}),n.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),n.defineMIME("text/typescript",{name:"javascript",typescript:!0}),n.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Ns=Me((td,rd)=>{(function(n){typeof td=="object"&&typeof rd=="object"?n(At(),Ko(),Ps(),Rs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],n):n(CodeMirror)})(function(n){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(p,y,m){var v=p.current(),b=v.search(y);return b>-1?p.backUp(v.length-b):v.match(/<\/?$/)&&(p.backUp(v.length),p.match(y,!1)||p.match(v)),m}var u={};function c(p){var y=u[p];return y||(u[p]=new RegExp("\\s+"+p+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function h(p,y){var m=p.match(c(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function a(p,y){return new RegExp((y?"^":"")+"</s*"+p+"s*>","i")}function d(p,y){for(var m in p)for(var v=y[m]||(y[m]=[]),b=p[m],S=b.length-1;S>=0;S--)v.unshift(b[S])}function f(p,y){for(var m=0;m<p.length;m++){var v=p[m];if(!v[0]||v[1].test(h(y,v[0])))return v[2]}}n.defineMode("htmlmixed",function(p,y){var m=n.getMode(p,{name:"xml",htmlMode:!0,multilineTagIndentFactor:y.multilineTagIndentFactor,multilineTagIndentPastTag:y.multilineTagIndentPastTag,allowMissingTagName:y.allowMissingTagName}),v={},b=y&&y.tags,S=y&&y.scriptTypes;if(d(t,v),b&&d(b,v),S)for(var E=S.length-1;E>=0;E--)v.script.unshift(["type",S[E].matches,S[E].mode]);function x(D,C){var N=m.token(D,C.htmlState),R=/\btag\b/.test(N),H;if(R&&!/[<>\s\/]/.test(D.current())&&(H=C.htmlState.tagName&&C.htmlState.tagName.toLowerCase())&&v.hasOwnProperty(H))C.inTag=H+" ";else if(C.inTag&&R&&/>$/.test(D.current())){var j=/^([\S]+) (.*)/.exec(C.inTag);C.inTag=null;var J=D.current()==">"&&f(v[j[1]],j[2]),W=n.getMode(p,J),Y=a(j[1],!0),M=a(j[1],!1);C.token=function(K,k){return K.match(Y,!1)?(k.token=x,k.localState=k.localMode=null,null):i(K,M,k.localMode.token(K,k.localState))},C.localMode=W,C.localState=n.startState(W,m.indent(C.htmlState,"",""))}else C.inTag&&(C.inTag+=D.current(),D.eol()&&(C.inTag+=" "));return N}return{startState:function(){var D=n.startState(m);return{token:x,inTag:null,localMode:null,localState:null,htmlState:D}},copyState:function(D){var C;return D.localState&&(C=n.copyState(D.localMode,D.localState)),{token:D.token,inTag:D.inTag,localMode:D.localMode,localState:C,htmlState:n.copyState(m,D.htmlState)}},token:function(D,C){return C.token(D,C)},indent:function(D,C,N){return!D.localMode||/^\s*<\//.test(C)?m.indent(D.htmlState,C,N):D.localMode.indent?D.localMode.indent(D.localState,C,N):n.Pass},innerMode:function(D){return{state:D.localState||D.htmlState,mode:D.localMode||m}}}},"xml","javascript","css"),n.defineMIME("text/html","htmlmixed")})});var od=Me((nd,id)=>{(function(n){typeof nd=="object"&&typeof id=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("julia",function(t,i){function u(I,P){return typeof P=="undefined"&&(P="\\b"),new RegExp("^(("+I.join(")|(")+"))"+P)}var c="\\\\[0-7]{1,3}",h="\\\\x[A-Fa-f0-9]{1,2}",a=`\\\\[abefnrtv0%?'"\\\\]`,d="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",f=i.operators||u(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),p=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=u([c,h,a,d],"'"),v=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],b=["end","else","elseif","catch","finally"],S=["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"];n.registerHelper("hintWords","julia",S.concat(E));var x=u(v),D=u(b),C=u(S),N=u(E),R=/^@[_A-Za-z][\w]*/,H=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,j=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function J(I){return I.nestedArrays>0}function W(I){return I.nestedGenerators>0}function Y(I,P){return typeof P=="undefined"&&(P=0),I.scopes.length<=P?null:I.scopes[I.scopes.length-(P+1)]}function M(I,P){if(I.match("#=",!1))return P.tokenize=k,P.tokenize(I,P);var le=P.leavingExpr;if(I.sol()&&(le=!1),P.leavingExpr=!1,le&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var ke=I.peek();if(ke==="#")return I.skipToEnd(),"comment";if(ke==="["&&(P.scopes.push("["),P.nestedArrays++),ke==="("&&(P.scopes.push("("),P.nestedGenerators++),J(P)&&ke==="]"){for(;P.scopes.length&&Y(P)!=="[";)P.scopes.pop();P.scopes.pop(),P.nestedArrays--,P.leavingExpr=!0}if(W(P)&&ke===")"){for(;P.scopes.length&&Y(P)!=="(";)P.scopes.pop();P.scopes.pop(),P.nestedGenerators--,P.leavingExpr=!0}if(J(P)){if(P.lastToken=="end"&&I.match(":"))return"operator";if(I.match("end"))return"number"}var q;if((q=I.match(x,!1))&&P.scopes.push(q[0]),I.match(D,!1)&&P.scopes.pop(),I.match(/^::(?![:\$])/))return P.tokenize=K,P.tokenize(I,P);if(!le&&I.match(H)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(f))return"operator";if(I.match(/^\.?\d/,!1)){var L=RegExp(/^im\b/),xe=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(xe=!0),I.match(/^0x[0-9a-f_]+/i)&&(xe=!0),I.match(/^0b[01_]+/i)&&(xe=!0),I.match(/^0o[0-7_]+/i)&&(xe=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(xe=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(xe=!0),xe)return I.match(L),P.leavingExpr=!0,"number"}if(I.match("'"))return P.tokenize=G,P.tokenize(I,P);if(I.match(j))return P.tokenize=B(I.current()),P.tokenize(I,P);if(I.match(R))return"meta";if(I.match(p))return null;if(I.match(C))return"keyword";if(I.match(N))return"builtin";var Se=P.isDefinition||P.lastToken=="function"||P.lastToken=="macro"||P.lastToken=="type"||P.lastToken=="struct"||P.lastToken=="immutable";return I.match(y)?Se?I.peek()==="."?(P.isDefinition=!0,"variable"):(P.isDefinition=!1,"def"):(P.leavingExpr=!0,"variable"):(I.next(),"error")}function K(I,P){return I.match(/.*?(?=[,;{}()=\s]|$)/),I.match("{")?P.nestedParameters++:I.match("}")&&P.nestedParameters>0&&P.nestedParameters--,P.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():P.nestedParameters==0&&(P.tokenize=M),"builtin"}function k(I,P){return I.match("#=")&&P.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match("=#")&&(P.nestedComments--,P.nestedComments==0&&(P.tokenize=M)),"comment"}function G(I,P){var le=!1,ke;if(I.match(m))le=!0;else if(ke=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var q=parseInt(ke[1],16);(q<=55295||q>=57344)&&(le=!0,I.next())}else if(ke=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var q=parseInt(ke[1],16);q<=1114111&&(le=!0,I.next())}return le?(P.leavingExpr=!0,P.tokenize=M,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match("'")&&(P.tokenize=M),"error")}function B(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function P(le,ke){if(le.eat("\\"))le.next();else{if(le.match(I))return ke.tokenize=M,ke.leavingExpr=!0,"string";le.eat(/[`"]/)}return le.eatWhile(/[^\\`"]/),"string"}return P}var re={startState:function(){return{tokenize:M,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(I,P){var le=P.tokenize(I,P),ke=I.current();return ke&&le&&(P.lastToken=ke),le},indent:function(I,P){var le=0;return(P==="]"||P===")"||/^end\b/.test(P)||/^else/.test(P)||/^catch\b/.test(P)||/^elseif\b/.test(P)||/^finally/.test(P))&&(le=-1),(I.scopes.length+le)*t.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return re}),n.defineMIME("text/x-julia","julia")})});var ld=Me((ad,sd)=>{(function(n){typeof ad=="object"&&typeof sd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("lua",function(t,i){var u=t.indentUnit;function c(x){return new RegExp("^(?:"+x.join("|")+")","i")}function h(x){return new RegExp("^(?:"+x.join("|")+")$","i")}var a=h(i.specials||[]),d=h(["_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"]),f=h(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),p=h(["function","if","repeat","do","\\(","{"]),y=h(["end","until","\\)","}"]),m=c(["end","until","\\)","}","else","elseif"]);function v(x){for(var D=0;x.eat("=");)++D;return x.eat("["),D}function b(x,D){var C=x.next();return C=="-"&&x.eat("-")?x.eat("[")&&x.eat("[")?(D.cur=S(v(x),"comment"))(x,D):(x.skipToEnd(),"comment"):C=='"'||C=="'"?(D.cur=E(C))(x,D):C=="["&&/[\[=]/.test(x.peek())?(D.cur=S(v(x),"string"))(x,D):/\d/.test(C)?(x.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(C)?(x.eatWhile(/[\w\\\-_.]/),"variable"):null}function S(x,D){return function(C,N){for(var R=null,H;(H=C.next())!=null;)if(R==null)H=="]"&&(R=0);else if(H=="=")++R;else if(H=="]"&&R==x){N.cur=b;break}else R=null;return D}}function E(x){return function(D,C){for(var N=!1,R;(R=D.next())!=null&&!(R==x&&!N);)N=!N&&R=="\\";return N||(C.cur=b),"string"}}return{startState:function(x){return{basecol:x||0,indentDepth:0,cur:b}},token:function(x,D){if(x.eatSpace())return null;var C=D.cur(x,D),N=x.current();return C=="variable"&&(f.test(N)?C="keyword":d.test(N)?C="builtin":a.test(N)&&(C="variable-2")),C!="comment"&&C!="string"&&(p.test(N)?++D.indentDepth:y.test(N)&&--D.indentDepth),C},indent:function(x,D){var C=m.test(D);return x.basecol+u*(x.indentDepth-(C?1:0))},electricInput:/^\s*(?:end|until|else|\)|\})$/,lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),n.defineMIME("text/x-lua","lua")})});var dd=Me((ud,cd)=>{(function(n){typeof ud=="object"&&typeof cd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.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"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<n.modeInfo.length;t++){var i=n.modeInfo[t];i.mimes&&(i.mime=i.mimes[0])}n.findModeByMIME=function(u){u=u.toLowerCase();for(var c=0;c<n.modeInfo.length;c++){var h=n.modeInfo[c];if(h.mime==u)return h;if(h.mimes){for(var a=0;a<h.mimes.length;a++)if(h.mimes[a]==u)return h}}if(/\+xml$/.test(u))return n.findModeByMIME("application/xml");if(/\+json$/.test(u))return n.findModeByMIME("application/json")},n.findModeByExtension=function(u){u=u.toLowerCase();for(var c=0;c<n.modeInfo.length;c++){var h=n.modeInfo[c];if(h.ext){for(var a=0;a<h.ext.length;a++)if(h.ext[a]==u)return h}}},n.findModeByFileName=function(u){for(var c=0;c<n.modeInfo.length;c++){var h=n.modeInfo[c];if(h.file&&h.file.test(u))return h}var a=u.lastIndexOf("."),d=a>-1&&u.substring(a+1,u.length);if(d)return n.findModeByExtension(d)},n.findModeByName=function(u){u=u.toLowerCase();for(var c=0;c<n.modeInfo.length;c++){var h=n.modeInfo[c];if(h.name.toLowerCase()==u)return h;if(h.alias){for(var a=0;a<h.alias.length;a++)if(h.alias[a].toLowerCase()==u)return h}}}})});var pd=Me((fd,hd)=>{(function(n){typeof fd=="object"&&typeof hd=="object"?n(At(),Ko(),dd()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("markdown",function(t,i){var u=n.getMode(t,"text/html"),c=u.name=="null";function h(q){if(n.findModeByName){var L=n.findModeByName(q);L&&(q=L.mime||L.mimes[0])}var xe=n.getMode(t,q);return xe.name=="null"?null:xe}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 a={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 d in a)a.hasOwnProperty(d)&&i.tokenTypeOverrides[d]&&(a[d]=i.tokenTypeOverrides[d]);var f=/^([*\-_])(?:\s*\1){2,}\s*$/,p=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,v=/^ {0,3}(?:\={1,}|-{2,})\s*$/,b=/^[^#!\[\]*_\\<>` "'(~:]+/,S=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,x=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,D=" ";function C(q,L,xe){return L.f=L.inline=xe,xe(q,L)}function N(q,L,xe){return L.f=L.block=xe,xe(q,L)}function R(q){return!q||!/\S/.test(q.string)}function H(q){if(q.linkTitle=!1,q.linkHref=!1,q.linkText=!1,q.em=!1,q.strong=!1,q.strikethrough=!1,q.quote=0,q.indentedCode=!1,q.f==J){var L=c;if(!L){var xe=n.innerMode(u,q.htmlState);L=xe.mode.name=="xml"&&xe.state.tagStart===null&&!xe.state.context&&xe.state.tokenize.isInText}L&&(q.f=K,q.block=j,q.htmlState=null)}return q.trailingSpace=0,q.trailingSpaceNewLine=!1,q.prevLine=q.thisLine,q.thisLine={stream:null},null}function j(q,L){var xe=q.column()===L.indentation,Se=R(L.prevLine.stream),be=L.indentedCode,Fe=L.prevLine.hr,Xe=L.list!==!1,nt=(L.listStack[L.listStack.length-1]||0)+3;L.indentedCode=!1;var fe=L.indentation;if(L.indentationDiff===null&&(L.indentationDiff=L.indentation,Xe)){for(L.list=null;fe<L.listStack[L.listStack.length-1];)L.listStack.pop(),L.listStack.length?L.indentation=L.listStack[L.listStack.length-1]:L.list=!1;L.list!==!1&&(L.indentationDiff=fe-L.listStack[L.listStack.length-1])}var Ae=!Se&&!Fe&&!L.prevLine.header&&(!Xe||!be)&&!L.prevLine.fencedCodeEnd,Qe=(L.list===!1||Fe||Se)&&L.indentation<=nt&&q.match(f),ot=null;if(L.indentationDiff>=4&&(be||L.prevLine.fencedCodeEnd||L.prevLine.header||Se))return q.skipToEnd(),L.indentedCode=!0,a.code;if(q.eatSpace())return null;if(xe&&L.indentation<=nt&&(ot=q.match(m))&&ot[1].length<=6)return L.quote=0,L.header=ot[1].length,L.thisLine.header=!0,i.highlightFormatting&&(L.formatting="header"),L.f=L.inline,Y(L);if(L.indentation<=nt&&q.eat(">"))return L.quote=xe?1:L.quote+1,i.highlightFormatting&&(L.formatting="quote"),q.eatSpace(),Y(L);if(!Qe&&!L.setext&&xe&&L.indentation<=nt&&(ot=q.match(p))){var ft=ot[1]?"ol":"ul";return L.indentation=fe+q.current().length,L.list=!0,L.quote=0,L.listStack.push(L.indentation),L.em=!1,L.strong=!1,L.code=!1,L.strikethrough=!1,i.taskLists&&q.match(y,!1)&&(L.taskList=!0),L.f=L.inline,i.highlightFormatting&&(L.formatting=["list","list-"+ft]),Y(L)}else{if(xe&&L.indentation<=nt&&(ot=q.match(S,!0)))return L.quote=0,L.fencedEndRE=new RegExp(ot[1]+"+ *$"),L.localMode=i.fencedCodeBlockHighlighting&&h(ot[2]||i.fencedCodeBlockDefaultMode),L.localMode&&(L.localState=n.startState(L.localMode)),L.f=L.block=W,i.highlightFormatting&&(L.formatting="code-block"),L.code=-1,Y(L);if(L.setext||(!Ae||!Xe)&&!L.quote&&L.list===!1&&!L.code&&!Qe&&!E.test(q.string)&&(ot=q.lookAhead(1))&&(ot=ot.match(v)))return L.setext?(L.header=L.setext,L.setext=0,q.skipToEnd(),i.highlightFormatting&&(L.formatting="header")):(L.header=ot[0].charAt(0)=="="?1:2,L.setext=L.header),L.thisLine.header=!0,L.f=L.inline,Y(L);if(Qe)return q.skipToEnd(),L.hr=!0,L.thisLine.hr=!0,a.hr;if(q.peek()==="[")return C(q,L,I)}return C(q,L,L.inline)}function J(q,L){var xe=u.token(q,L.htmlState);if(!c){var Se=n.innerMode(u,L.htmlState);(Se.mode.name=="xml"&&Se.state.tagStart===null&&!Se.state.context&&Se.state.tokenize.isInText||L.md_inside&&q.current().indexOf(">")>-1)&&(L.f=K,L.block=j,L.htmlState=null)}return xe}function W(q,L){var xe=L.listStack[L.listStack.length-1]||0,Se=L.indentation<xe,be=xe+3;if(L.fencedEndRE&&L.indentation<=be&&(Se||q.match(L.fencedEndRE))){i.highlightFormatting&&(L.formatting="code-block");var Fe;return Se||(Fe=Y(L)),L.localMode=L.localState=null,L.block=j,L.f=K,L.fencedEndRE=null,L.code=0,L.thisLine.fencedCodeEnd=!0,Se?N(q,L,L.block):Fe}else return L.localMode?L.localMode.token(q,L.localState):(q.skipToEnd(),a.code)}function Y(q){var L=[];if(q.formatting){L.push(a.formatting),typeof q.formatting=="string"&&(q.formatting=[q.formatting]);for(var xe=0;xe<q.formatting.length;xe++)L.push(a.formatting+"-"+q.formatting[xe]),q.formatting[xe]==="header"&&L.push(a.formatting+"-"+q.formatting[xe]+"-"+q.header),q.formatting[xe]==="quote"&&(!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=q.quote?L.push(a.formatting+"-"+q.formatting[xe]+"-"+q.quote):L.push("error"))}if(q.taskOpen)return L.push("meta"),L.length?L.join(" "):null;if(q.taskClosed)return L.push("property"),L.length?L.join(" "):null;if(q.linkHref?L.push(a.linkHref,"url"):(q.strong&&L.push(a.strong),q.em&&L.push(a.em),q.strikethrough&&L.push(a.strikethrough),q.emoji&&L.push(a.emoji),q.linkText&&L.push(a.linkText),q.code&&L.push(a.code),q.image&&L.push(a.image),q.imageAltText&&L.push(a.imageAltText,"link"),q.imageMarker&&L.push(a.imageMarker)),q.header&&L.push(a.header,a.header+"-"+q.header),q.quote&&(L.push(a.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=q.quote?L.push(a.quote+"-"+q.quote):L.push(a.quote+"-"+i.maxBlockquoteDepth)),q.list!==!1){var Se=(q.listStack.length-1)%3;Se?Se===1?L.push(a.list2):L.push(a.list3):L.push(a.list1)}return q.trailingSpaceNewLine?L.push("trailing-space-new-line"):q.trailingSpace&&L.push("trailing-space-"+(q.trailingSpace%2?"a":"b")),L.length?L.join(" "):null}function M(q,L){return q.match(b,!0)?Y(L):void 0}function K(q,L){var xe=L.text(q,L);if(typeof xe!="undefined")return xe;if(L.list)return L.list=null,Y(L);if(L.taskList){var Se=q.match(y,!0)[1]===" ";return Se?L.taskOpen=!0:L.taskClosed=!0,i.highlightFormatting&&(L.formatting="task"),L.taskList=!1,Y(L)}if(L.taskOpen=!1,L.taskClosed=!1,L.header&&q.match(/^#+$/,!0))return i.highlightFormatting&&(L.formatting="header"),Y(L);var be=q.next();if(L.linkTitle){L.linkTitle=!1;var Fe=be;be==="("&&(Fe=")"),Fe=(Fe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Xe="^\\s*(?:[^"+Fe+"\\\\]+|\\\\\\\\|\\\\.)"+Fe;if(q.match(new RegExp(Xe),!0))return a.linkHref}if(be==="`"){var nt=L.formatting;i.highlightFormatting&&(L.formatting="code"),q.eatWhile("`");var fe=q.current().length;if(L.code==0&&(!L.quote||fe==1))return L.code=fe,Y(L);if(fe==L.code){var Ae=Y(L);return L.code=0,Ae}else return L.formatting=nt,Y(L)}else if(L.code)return Y(L);if(be==="\\"&&(q.next(),i.highlightFormatting)){var Qe=Y(L),ot=a.formatting+"-escape";return Qe?Qe+" "+ot:ot}if(be==="!"&&q.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return L.imageMarker=!0,L.image=!0,i.highlightFormatting&&(L.formatting="image"),Y(L);if(be==="["&&L.imageMarker&&q.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return L.imageMarker=!1,L.imageAltText=!0,i.highlightFormatting&&(L.formatting="image"),Y(L);if(be==="]"&&L.imageAltText){i.highlightFormatting&&(L.formatting="image");var Qe=Y(L);return L.imageAltText=!1,L.image=!1,L.inline=L.f=G,Qe}if(be==="["&&!L.image)return L.linkText&&q.match(/^.*?\]/)||(L.linkText=!0,i.highlightFormatting&&(L.formatting="link")),Y(L);if(be==="]"&&L.linkText){i.highlightFormatting&&(L.formatting="link");var Qe=Y(L);return L.linkText=!1,L.inline=L.f=q.match(/\(.*?\)| ?\[.*?\]/,!1)?G:K,Qe}if(be==="<"&&q.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=k,i.highlightFormatting&&(L.formatting="link");var Qe=Y(L);return Qe?Qe+=" ":Qe="",Qe+a.linkInline}if(be==="<"&&q.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){L.f=L.inline=k,i.highlightFormatting&&(L.formatting="link");var Qe=Y(L);return Qe?Qe+=" ":Qe="",Qe+a.linkEmail}if(i.xml&&be==="<"&&q.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var ft=q.string.indexOf(">",q.pos);if(ft!=-1){var Pe=q.string.substring(q.start,ft);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Pe)&&(L.md_inside=!0)}return q.backUp(1),L.htmlState=n.startState(u),N(q,L,J)}if(i.xml&&be==="<"&&q.match(/^\/\w*?>/))return L.md_inside=!1,"tag";if(be==="*"||be==="_"){for(var Le=1,Be=q.pos==1?" ":q.string.charAt(q.pos-2);Le<3&&q.eat(be);)Le++;var Ke=q.peek()||" ",je=!/\s/.test(Ke)&&(!x.test(Ke)||/\s/.test(Be)||x.test(Be)),Ge=!/\s/.test(Be)&&(!x.test(Be)||/\s/.test(Ke)||x.test(Ke)),Ee=null,V=null;if(Le%2&&(!L.em&&je&&(be==="*"||!Ge||x.test(Be))?Ee=!0:L.em==be&&Ge&&(be==="*"||!je||x.test(Ke))&&(Ee=!1)),Le>1&&(!L.strong&&je&&(be==="*"||!Ge||x.test(Be))?V=!0:L.strong==be&&Ge&&(be==="*"||!je||x.test(Ke))&&(V=!1)),V!=null||Ee!=null){i.highlightFormatting&&(L.formatting=Ee==null?"strong":V==null?"em":"strong em"),Ee===!0&&(L.em=be),V===!0&&(L.strong=be);var Ae=Y(L);return Ee===!1&&(L.em=!1),V===!1&&(L.strong=!1),Ae}}else if(be===" "&&(q.eat("*")||q.eat("_"))){if(q.peek()===" ")return Y(L);q.backUp(1)}if(i.strikethrough){if(be==="~"&&q.eatWhile(be)){if(L.strikethrough){i.highlightFormatting&&(L.formatting="strikethrough");var Ae=Y(L);return L.strikethrough=!1,Ae}else if(q.match(/^[^\s]/,!1))return L.strikethrough=!0,i.highlightFormatting&&(L.formatting="strikethrough"),Y(L)}else if(be===" "&&q.match("~~",!0)){if(q.peek()===" ")return Y(L);q.backUp(2)}}if(i.emoji&&be===":"&&q.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){L.emoji=!0,i.highlightFormatting&&(L.formatting="emoji");var he=Y(L);return L.emoji=!1,he}return be===" "&&(q.match(/^ +$/,!1)?L.trailingSpace++:L.trailingSpace&&(L.trailingSpaceNewLine=!0)),Y(L)}function k(q,L){var xe=q.next();if(xe===">"){L.f=L.inline=K,i.highlightFormatting&&(L.formatting="link");var Se=Y(L);return Se?Se+=" ":Se="",Se+a.linkInline}return q.match(/^[^>]+/,!0),a.linkInline}function G(q,L){if(q.eatSpace())return null;var xe=q.next();return xe==="("||xe==="["?(L.f=L.inline=re(xe==="("?")":"]"),i.highlightFormatting&&(L.formatting="link-string"),L.linkHref=!0,Y(L)):"error"}var B={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function re(q){return function(L,xe){var Se=L.next();if(Se===q){xe.f=xe.inline=K,i.highlightFormatting&&(xe.formatting="link-string");var be=Y(xe);return xe.linkHref=!1,be}return L.match(B[q]),xe.linkHref=!0,Y(xe)}}function I(q,L){return q.match(/^([^\]\\]|\\.)*\]:/,!1)?(L.f=P,q.next(),i.highlightFormatting&&(L.formatting="link"),L.linkText=!0,Y(L)):C(q,L,K)}function P(q,L){if(q.match("]:",!0)){L.f=L.inline=le,i.highlightFormatting&&(L.formatting="link");var xe=Y(L);return L.linkText=!1,xe}return q.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function le(q,L){return q.eatSpace()?null:(q.match(/^[^\s]+/,!0),q.peek()===void 0?L.linkTitle=!0:q.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),L.f=L.inline=K,a.linkHref+" url")}var ke={startState:function(){return{f:j,prevLine:{stream:null},thisLine:{stream:null},block:j,htmlState:null,indentation:0,inline:K,text:M,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(q){return{f:q.f,prevLine:q.prevLine,thisLine:q.thisLine,block:q.block,htmlState:q.htmlState&&n.copyState(u,q.htmlState),indentation:q.indentation,localMode:q.localMode,localState:q.localMode?n.copyState(q.localMode,q.localState):null,inline:q.inline,text:q.text,formatting:!1,linkText:q.linkText,linkTitle:q.linkTitle,linkHref:q.linkHref,code:q.code,em:q.em,strong:q.strong,strikethrough:q.strikethrough,emoji:q.emoji,header:q.header,setext:q.setext,hr:q.hr,taskList:q.taskList,list:q.list,listStack:q.listStack.slice(0),quote:q.quote,indentedCode:q.indentedCode,trailingSpace:q.trailingSpace,trailingSpaceNewLine:q.trailingSpaceNewLine,md_inside:q.md_inside,fencedEndRE:q.fencedEndRE}},token:function(q,L){if(L.formatting=!1,q!=L.thisLine.stream){if(L.header=0,L.hr=!1,q.match(/^\s*$/,!0))return H(L),null;if(L.prevLine=L.thisLine,L.thisLine={stream:q},L.taskList=!1,L.trailingSpace=0,L.trailingSpaceNewLine=!1,!L.localState&&(L.f=L.block,L.f!=J)){var xe=q.match(/^\s*/,!0)[0].replace(/\t/g,D).length;if(L.indentation=xe,L.indentationDiff=null,xe>0)return null}}return L.f(q,L)},innerMode:function(q){return q.block==J?{state:q.htmlState,mode:u}:q.localState?{state:q.localState,mode:q.localMode}:{state:q,mode:ke}},indent:function(q,L,xe){return q.block==J&&u.indent?u.indent(q.htmlState,L,xe):q.localState&&q.localMode.indent?q.localMode.indent(q.localState,L,xe):n.Pass},blankLine:H,getType:Y,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ke},"xml"),n.defineMIME("text/markdown","markdown"),n.defineMIME("text/x-markdown","markdown")})});var vd=Me((md,gd)=>{(function(n){typeof md=="object"&&typeof gd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("mllike",function(t,i){var u={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"},c=i.extraWords||{};for(var h in c)c.hasOwnProperty(h)&&(u[h]=i.extraWords[h]);var a=[];for(var d in u)a.push(d);n.registerHelper("hintWords","mllike",a);function f(v,b){var S=v.next();if(S==='"')return b.tokenize=p,b.tokenize(v,b);if(S==="{"&&v.eat("|"))return b.longString=!0,b.tokenize=m,b.tokenize(v,b);if(S==="("&&v.eat("*"))return b.commentLevel++,b.tokenize=y,b.tokenize(v,b);if(S==="~"||S==="?")return v.eatWhile(/\w/),"variable-2";if(S==="`")return v.eatWhile(/\w/),"quote";if(S==="/"&&i.slashComments&&v.eat("/"))return v.skipToEnd(),"comment";if(/\d/.test(S))return S==="0"&&v.eat(/[bB]/)&&v.eatWhile(/[01]/),S==="0"&&v.eat(/[xX]/)&&v.eatWhile(/[0-9a-fA-F]/),S==="0"&&v.eat(/[oO]/)?v.eatWhile(/[0-7]/):(v.eatWhile(/[\d_]/),v.eat(".")&&v.eatWhile(/[\d]/),v.eat(/[eE]/)&&v.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(S))return"operator";if(/[\w\xa1-\uffff]/.test(S)){v.eatWhile(/[\w\xa1-\uffff]/);var E=v.current();return u.hasOwnProperty(E)?u[E]:"variable"}return null}function p(v,b){for(var S,E=!1,x=!1;(S=v.next())!=null;){if(S==='"'&&!x){E=!0;break}x=!x&&S==="\\"}return E&&!x&&(b.tokenize=f),"string"}function y(v,b){for(var S,E;b.commentLevel>0&&(E=v.next())!=null;)S==="("&&E==="*"&&b.commentLevel++,S==="*"&&E===")"&&b.commentLevel--,S=E;return b.commentLevel<=0&&(b.tokenize=f),"comment"}function m(v,b){for(var S,E;b.longString&&(E=v.next())!=null;)S==="|"&&E==="}"&&(b.longString=!1),S=E;return b.longString||(b.tokenize=f),"string"}return{startState:function(){return{tokenize:f,commentLevel:0,longString:!1}},token:function(v,b){return v.eatSpace()?null:b.tokenize(v,b)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),n.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"}}),n.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}),n.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 wd=Me((yd,bd)=>{(function(n){typeof yd=="object"&&typeof bd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("nginx",function(t){function i(b){for(var S={},E=b.split(" "),x=0;x<E.length;++x)S[E[x]]=!0;return S}var u=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"),c=i("http mail events server types location upstream charset_map limit_except if geo map"),h=i("include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"),a=t.indentUnit,d;function f(b,S){return d=S,b}function p(b,S){b.eatWhile(/[\w\$_]/);var E=b.current();if(u.propertyIsEnumerable(E))return"keyword";if(c.propertyIsEnumerable(E))return"variable-2";if(h.propertyIsEnumerable(E))return"string-2";var x=b.next();if(x=="@")return b.eatWhile(/[\w\\\-]/),f("meta",b.current());if(x=="/"&&b.eat("*"))return S.tokenize=y,y(b,S);if(x=="<"&&b.eat("!"))return S.tokenize=m,m(b,S);if(x=="=")f(null,"compare");else return(x=="~"||x=="|")&&b.eat("=")?f(null,"compare"):x=='"'||x=="'"?(S.tokenize=v(x),S.tokenize(b,S)):x=="#"?(b.skipToEnd(),f("comment","comment")):x=="!"?(b.match(/^\s*\w*/),f("keyword","important")):/\d/.test(x)?(b.eatWhile(/[\w.%]/),f("number","unit")):/[,.+>*\/]/.test(x)?f(null,"select-op"):/[;{}:\[\]]/.test(x)?f(null,x):(b.eatWhile(/[\w\\\-]/),f("variable","variable"))}function y(b,S){for(var E=!1,x;(x=b.next())!=null;){if(E&&x=="/"){S.tokenize=p;break}E=x=="*"}return f("comment","comment")}function m(b,S){for(var E=0,x;(x=b.next())!=null;){if(E>=2&&x==">"){S.tokenize=p;break}E=x=="-"?E+1:0}return f("comment","comment")}function v(b){return function(S,E){for(var x=!1,D;(D=S.next())!=null&&!(D==b&&!x);)x=!x&&D=="\\";return x||(E.tokenize=p),f("string","string")}}return{startState:function(b){return{tokenize:p,baseIndent:b||0,stack:[]}},token:function(b,S){if(b.eatSpace())return null;d=null;var E=S.tokenize(b,S),x=S.stack[S.stack.length-1];return d=="hash"&&x=="rule"?E="atom":E=="variable"&&(x=="rule"?E="number":(!x||x=="@media{")&&(E="tag")),x=="rule"&&/^[\{\};]$/.test(d)&&S.stack.pop(),d=="{"?x=="@media"?S.stack[S.stack.length-1]="@media{":S.stack.push("{"):d=="}"?S.stack.pop():d=="@media"?S.stack.push("@media"):x=="{"&&d!="comment"&&S.stack.push("rule"),E},indent:function(b,S){var E=b.stack.length;return/^\}/.test(S)&&(E-=b.stack[b.stack.length-1]=="rule"?2:1),b.baseIndent+E*a},electricChars:"}"}}),n.defineMIME("text/x-nginx-conf","nginx")})});var Sd=Me((xd,kd)=>{(function(n){typeof xd=="object"&&typeof kd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("perl",function(){var h={"->":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},a="string-2",d=/[goseximacplud]/;function f(m,v,b,S,E){return v.chain=null,v.style=null,v.tail=null,v.tokenize=function(x,D){for(var C=!1,N,R=0;N=x.next();){if(N===b[R]&&!C)return b[++R]!==void 0?(D.chain=b[R],D.style=S,D.tail=E):E&&x.eatWhile(E),D.tokenize=y,S;C=!C&&N=="\\"}return S},v.tokenize(m,v)}function p(m,v,b){return v.tokenize=function(S,E){return S.string==b&&(E.tokenize=y),S.skipToEnd(),"string"},v.tokenize(m,v)}function y(m,v){if(m.eatSpace())return null;if(v.chain)return f(m,v,v.chain,v.style,v.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(/^<<(?=[_a-zA-Z])/))return m.eatWhile(/\w/),p(m,v,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return p(m,v,"=cut");var b=m.next();if(b=='"'||b=="'"){if(i(m,3)=="<<"+b){var S=m.pos;m.eatWhile(/\w/);var E=m.current().substr(1);if(E&&m.eat(b))return p(m,v,E);m.pos=S}return f(m,v,[b],"string")}if(b=="q"){var x=t(m,-2);if(!(x&&/\w/.test(x))){if(x=t(m,0),x=="x"){if(x=t(m,1),x=="(")return c(m,2),f(m,v,[")"],a,d);if(x=="[")return c(m,2),f(m,v,["]"],a,d);if(x=="{")return c(m,2),f(m,v,["}"],a,d);if(x=="<")return c(m,2),f(m,v,[">"],a,d);if(/[\^'"!~\/]/.test(x))return c(m,1),f(m,v,[m.eat(x)],a,d)}else if(x=="q"){if(x=t(m,1),x=="(")return c(m,2),f(m,v,[")"],"string");if(x=="[")return c(m,2),f(m,v,["]"],"string");if(x=="{")return c(m,2),f(m,v,["}"],"string");if(x=="<")return c(m,2),f(m,v,[">"],"string");if(/[\^'"!~\/]/.test(x))return c(m,1),f(m,v,[m.eat(x)],"string")}else if(x=="w"){if(x=t(m,1),x=="(")return c(m,2),f(m,v,[")"],"bracket");if(x=="[")return c(m,2),f(m,v,["]"],"bracket");if(x=="{")return c(m,2),f(m,v,["}"],"bracket");if(x=="<")return c(m,2),f(m,v,[">"],"bracket");if(/[\^'"!~\/]/.test(x))return c(m,1),f(m,v,[m.eat(x)],"bracket")}else if(x=="r"){if(x=t(m,1),x=="(")return c(m,2),f(m,v,[")"],a,d);if(x=="[")return c(m,2),f(m,v,["]"],a,d);if(x=="{")return c(m,2),f(m,v,["}"],a,d);if(x=="<")return c(m,2),f(m,v,[">"],a,d);if(/[\^'"!~\/]/.test(x))return c(m,1),f(m,v,[m.eat(x)],a,d)}else if(/[\^'"!~\/(\[{<]/.test(x)){if(x=="(")return c(m,1),f(m,v,[")"],"string");if(x=="[")return c(m,1),f(m,v,["]"],"string");if(x=="{")return c(m,1),f(m,v,["}"],"string");if(x=="<")return c(m,1),f(m,v,[">"],"string");if(/[\^'"!~\/]/.test(x))return f(m,v,[m.eat(x)],"string")}}}if(b=="m"){var x=t(m,-2);if(!(x&&/\w/.test(x))&&(x=m.eat(/[(\[{<\^'"!~\/]/),x)){if(/[\^'"!~\/]/.test(x))return f(m,v,[x],a,d);if(x=="(")return f(m,v,[")"],a,d);if(x=="[")return f(m,v,["]"],a,d);if(x=="{")return f(m,v,["}"],a,d);if(x=="<")return f(m,v,[">"],a,d)}}if(b=="s"){var x=/[\/>\]})\w]/.test(t(m,-2));if(!x&&(x=m.eat(/[(\[{<\^'"!~\/]/),x))return x=="["?f(m,v,["]","]"],a,d):x=="{"?f(m,v,["}","}"],a,d):x=="<"?f(m,v,[">",">"],a,d):x=="("?f(m,v,[")",")"],a,d):f(m,v,[x,x],a,d)}if(b=="y"){var x=/[\/>\]})\w]/.test(t(m,-2));if(!x&&(x=m.eat(/[(\[{<\^'"!~\/]/),x))return x=="["?f(m,v,["]","]"],a,d):x=="{"?f(m,v,["}","}"],a,d):x=="<"?f(m,v,[">",">"],a,d):x=="("?f(m,v,[")",")"],a,d):f(m,v,[x,x],a,d)}if(b=="t"){var x=/[\/>\]})\w]/.test(t(m,-2));if(!x&&(x=m.eat("r"),x&&(x=m.eat(/[(\[{<\^'"!~\/]/),x)))return x=="["?f(m,v,["]","]"],a,d):x=="{"?f(m,v,["}","}"],a,d):x=="<"?f(m,v,[">",">"],a,d):x=="("?f(m,v,[")",")"],a,d):f(m,v,[x,x],a,d)}if(b=="`")return f(m,v,[b],"variable-2");if(b=="/")return/~\s*$/.test(i(m))?f(m,v,[b],a,d):"operator";if(b=="$"){var S=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=S}if(/[$@%]/.test(b)){var S=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(t(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var x=m.current();if(h[x])return"variable-2"}m.pos=S}if(/[$@%&]/.test(b)&&(m.eatWhile(/[\w$]/)||m.eat("{")&&m.eatWhile(/[\w$]/)&&m.eat("}"))){var x=m.current();return h[x]?"variable-2":"variable"}if(b=="#"&&t(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(b)){var S=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),h[m.current()])return"operator";m.pos=S}if(b=="_"&&m.pos==1){if(u(m,6)=="_END__")return f(m,v,["\0"],"comment");if(u(m,7)=="_DATA__")return f(m,v,["\0"],"variable-2");if(u(m,7)=="_C__")return f(m,v,["\0"],"string")}if(/\w/.test(b)){var S=m.pos;if(t(m,-2)=="{"&&(t(m,0)=="}"||m.eatWhile(/\w/)&&t(m,0)=="}"))return"string";m.pos=S}if(/[A-Z]/.test(b)){var D=t(m,-2),S=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(t(m,0)))m.pos=S;else{var x=h[m.current()];return x?(x[1]&&(x=x[0]),D!=":"?x==1?"keyword":x==2?"def":x==3?"atom":x==4?"operator":x==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(b)){var D=t(m,-2);m.eatWhile(/\w/);var x=h[m.current()];return x?(x[1]&&(x=x[0]),D!=":"?x==1?"keyword":x==2?"def":x==3?"atom":x==4?"operator":x==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,v){return(v.tokenize||y)(m,v)},lineComment:"#"}}),n.registerHelper("wordChars","perl",/[\w$]/),n.defineMIME("text/x-perl","perl");function t(h,a){return h.string.charAt(h.pos+(a||0))}function i(h,a){if(a){var d=h.pos-a;return h.string.substr(d>=0?d:0,a)}else return h.string.substr(0,h.pos-1)}function u(h,a){var d=h.string.length,f=d-h.pos+1;return h.string.substr(h.pos,a&&a<d?a:f)}function c(h,a){var d=h.pos+a,f;d<=0?h.pos=0:d>=(f=h.string.length-1)?h.pos=f:h.pos=d}})});var _d=Me((Ed,Cd)=>{(function(n){typeof Ed=="object"&&typeof Cd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("pascal",function(){function t(p){for(var y={},m=p.split(" "),v=0;v<m.length;++v)y[m[v]]=!0;return y}var i=t("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"),u={null:!0},c=/[+\-*&%=<>!?|\/]/;function h(p,y){var m=p.next();if(m=="#"&&y.startOfLine)return p.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=a(m),y.tokenize(p,y);if(m=="("&&p.eat("*"))return y.tokenize=d,d(p,y);if(m=="{")return y.tokenize=f,f(p,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return p.eatWhile(/[\w\.]/),"number";if(m=="/"&&p.eat("/"))return p.skipToEnd(),"comment";if(c.test(m))return p.eatWhile(c),"operator";p.eatWhile(/[\w\$_]/);var v=p.current();return i.propertyIsEnumerable(v)?"keyword":u.propertyIsEnumerable(v)?"atom":"variable"}function a(p){return function(y,m){for(var v=!1,b,S=!1;(b=y.next())!=null;){if(b==p&&!v){S=!0;break}v=!v&&b=="\\"}return(S||!v)&&(m.tokenize=null),"string"}}function d(p,y){for(var m=!1,v;v=p.next();){if(v==")"&&m){y.tokenize=null;break}m=v=="*"}return"comment"}function f(p,y){for(var m;m=p.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(p,y){if(p.eatSpace())return null;var m=(y.tokenize||h)(p,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),n.defineMIME("text/x-pascal","pascal")})});var Dd=Me((Ad,Td)=>{(function(n){typeof Ad=="object"&&typeof Td=="object"?n(At(),Ns(),Os()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],n):n(CodeMirror)})(function(n){"use strict";function t(p){for(var y={},m=p.split(" "),v=0;v<m.length;++v)y[m[v]]=!0;return y}function i(p,y,m){return p.length==0?u(y):function(v,b){for(var S=p[0],E=0;E<S.length;E++)if(v.match(S[E][0]))return b.tokenize=i(p.slice(1),y),S[E][1];return b.tokenize=u(y,m),"string"}}function u(p,y){return function(m,v){return c(m,v,p,y)}}function c(p,y,m,v){if(v!==!1&&p.match("${",!1)||p.match("{$",!1))return y.tokenize=null,"string";if(v!==!1&&p.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return p.match("[",!1)&&(y.tokenize=i([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],m,v)),p.match(/^->\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,v)),"variable-2";for(var b=!1;!p.eol()&&(b||v===!1||!p.match("{$",!1)&&!p.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!b&&p.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}b=p.next()=="\\"&&!b}return"string"}var h="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",a="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",d="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";n.registerHelper("hintWords","php",[h,a,d].join(" ").split(" ")),n.registerHelper("wordChars","php",/[\w$]/);var f={name:"clike",helperType:"php",keywords:t(h),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(a),builtin:t(d),multiLineStrings:!0,hooks:{$:function(p){return p.eatWhile(/[\w\$_]/),"variable-2"},"<":function(p,y){var m;if(m=p.match(/^<<\s*/)){var v=p.eat(/['"]/);p.eatWhile(/[\w\.]/);var b=p.current().slice(m[0].length+(v?2:1));if(v&&p.eat(v),b)return(y.tokStack||(y.tokStack=[])).push(b,0),y.tokenize=u(b,v!="'"),"string"}return!1},"#":function(p){for(;!p.eol()&&!p.match("?>",!1);)p.next();return"comment"},"/":function(p){if(p.eat("/")){for(;!p.eol()&&!p.match("?>",!1);)p.next();return"comment"}return!1},'"':function(p,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=u('"'),"string"},"{":function(p,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(p,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=u(y.tokStack[y.tokStack.length-2])),!1}}};n.defineMode("php",function(p,y){var m=n.getMode(p,y&&y.htmlMode||"text/html"),v=n.getMode(p,f);function b(S,E){var x=E.curMode==v;if(S.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),x)return x&&E.php.tokenize==null&&S.match("?>")?(E.curMode=m,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):v.token(S,E.curState);if(S.match(/^<\?\w*/))return E.curMode=v,E.php||(E.php=n.startState(v,m.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!S.eol()&&S.next()!=E.pending;);var D="string"}else if(E.pending&&S.pos<E.pending.end){S.pos=E.pending.end;var D=E.pending.style}else var D=m.token(S,E.curState);E.pending&&(E.pending=null);var C=S.current(),N=C.search(/<\?/),R;return N!=-1&&(D=="string"&&(R=C.match(/[\'\"]$/))&&!/\?>/.test(C)?E.pending=R[0]:E.pending={end:S.pos,style:D},S.backUp(C.length-N)),D}return{startState:function(){var S=n.startState(m),E=y.startOpen?n.startState(v):null;return{html:S,php:E,curMode:y.startOpen?v:m,curState:y.startOpen?E:S,pending:null}},copyState:function(S){var E=S.html,x=n.copyState(m,E),D=S.php,C=D&&n.copyState(v,D),N;return S.curMode==m?N=x:N=C,{html:x,php:C,curMode:S.curMode,curState:N,pending:S.pending}},token:b,indent:function(S,E,x){return S.curMode!=v&&/^\s*<\//.test(E)||S.curMode==v&&/^\?>/.test(E)?m.indent(S.html,E,x):S.curMode.indent(S.curState,E,x)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(S){return{state:S.curState,mode:S.curMode}}}},"htmlmixed","clike"),n.defineMIME("application/x-httpd-php","php"),n.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),n.defineMIME("text/x-php",f)})});var Fd=Me((Id,Ld)=>{(function(n){"use strict";typeof Id=="object"&&typeof Ld=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(window.CodeMirror)})(function(n){"use strict";n.defineMode("powershell",function(){function t(k,G){G=G||{};for(var B=G.prefix!==void 0?G.prefix:"^",re=G.suffix!==void 0?G.suffix:"\\b",I=0;I<k.length;I++)k[I]instanceof RegExp?k[I]=k[I].source:k[I]=k[I].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(B+"("+k.join("|")+")"+re,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",u=/[\w\-:]/,c=t([/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}),h=/[\[\]{},;`\\\.]|@[({]/,a=t(["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:"-"}),d=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,f=t([a,d],{suffix:""}),p=/^((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,v=t([/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:""}),b=t([/[$?^_]|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:""}),S=t([m,v,b],{suffix:i}),E={keyword:c,number:p,operator:f,builtin:S,punctuation:h,identifier:y};function x(k,G){var B=G.returnStack[G.returnStack.length-1];if(B&&B.shouldReturnFrom(G))return G.tokenize=B.tokenize,G.returnStack.pop(),G.tokenize(k,G);if(k.eatSpace())return null;if(k.eat("("))return G.bracketNesting+=1,"punctuation";if(k.eat(")"))return G.bracketNesting-=1,"punctuation";for(var re in E)if(k.match(E[re]))return re;var I=k.next();if(I==="'")return D(k,G);if(I==="$")return W(k,G);if(I==='"')return C(k,G);if(I==="<"&&k.eat("#"))return G.tokenize=J,J(k,G);if(I==="#")return k.skipToEnd(),"comment";if(I==="@"){var P=k.eat(/["']/);if(P&&k.eol())return G.tokenize=M,G.startQuote=P[0],M(k,G);if(k.eol())return"error";if(k.peek().match(/[({]/))return"punctuation";if(k.peek().match(u))return W(k,G)}return"error"}function D(k,G){for(var B;(B=k.peek())!=null;)if(k.next(),B==="'"&&!k.eat("'"))return G.tokenize=x,"string";return"error"}function C(k,G){for(var B;(B=k.peek())!=null;){if(B==="$")return G.tokenize=N,"string";if(k.next(),B==="`"){k.next();continue}if(B==='"'&&!k.eat('"'))return G.tokenize=x,"string"}return"error"}function N(k,G){return j(k,G,C)}function R(k,G){return G.tokenize=M,G.startQuote='"',M(k,G)}function H(k,G){return j(k,G,R)}function j(k,G,B){if(k.match("$(")){var re=G.bracketNesting;return G.returnStack.push({shouldReturnFrom:function(I){return I.bracketNesting===re},tokenize:B}),G.tokenize=x,G.bracketNesting+=1,"punctuation"}else return k.next(),G.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:B}),G.tokenize=W,G.tokenize(k,G)}function J(k,G){for(var B=!1,re;(re=k.next())!=null;){if(B&&re==">"){G.tokenize=x;break}B=re==="#"}return"comment"}function W(k,G){var B=k.peek();return k.eat("{")?(G.tokenize=Y,Y(k,G)):B!=null&&B.match(u)?(k.eatWhile(u),G.tokenize=x,"variable-2"):(G.tokenize=x,"error")}function Y(k,G){for(var B;(B=k.next())!=null;)if(B==="}"){G.tokenize=x;break}return"variable-2"}function M(k,G){var B=G.startQuote;if(k.sol()&&k.match(new RegExp(B+"@")))G.tokenize=x;else if(B==='"')for(;!k.eol();){var re=k.peek();if(re==="$")return G.tokenize=H,"string";k.next(),re==="`"&&k.next()}else k.skipToEnd();return"string"}var K={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:x}},token:function(k,G){return G.tokenize(k,G)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return K}),n.defineMIME("application/x-powershell","powershell")})});var Od=Me((Md,Rd)=>{(function(n){typeof Md=="object"&&typeof Rd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("properties",function(){return{token:function(t,i){var u=t.sol()||i.afterSection,c=t.eol();if(i.afterSection=!1,u&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),c&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),u)for(;t.eatSpace(););var h=t.next();return u&&(h==="#"||h==="!"||h===";")?(i.position="comment",t.skipToEnd(),"comment"):u&&h==="["?(i.afterSection=!0,t.skipTo("]"),t.eat("]"),"header"):h==="="||h===":"?(i.position="quote",null):(h==="\\"&&i.position==="quote"&&(t.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),n.defineMIME("text/x-properties","properties"),n.defineMIME("text/x-ini","properties")})});var zd=Me((Pd,Nd)=>{(function(n){typeof Pd=="object"&&typeof Nd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(d){return new RegExp("^(("+d.join(")|(")+"))\\b")}var i=t(["and","or","not","is"]),u=["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"],c=["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__"];n.registerHelper("hintWords","python",u.concat(c));function h(d){return d.scopes[d.scopes.length-1]}n.defineMode("python",function(d,f){for(var p="error",y=f.delimiters||f.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[f.singleOperators,f.doubleOperators,f.doubleDelimiters,f.tripleDelimiters,f.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],v=0;v<m.length;v++)m[v]||m.splice(v--,1);var b=f.hangingIndent||d.indentUnit,S=u,E=c;f.extra_keywords!=null&&(S=S.concat(f.extra_keywords)),f.extra_builtins!=null&&(E=E.concat(f.extra_builtins));var x=!(f.version&&Number(f.version)<3);if(x){var D=f.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;S=S.concat(["nonlocal","False","True","None","async","await"]),E=E.concat(["ascii","bytes","exec","print"]);var C=new RegExp(`^(([rbuf]|(br)|(fr))?('{3}|"{3}|['"]))`,"i")}else{var D=f.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;S=S.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 C=new RegExp(`^(([rubf]|(ur)|(br))?('{3}|"{3}|['"]))`,"i")}var N=t(S),R=t(E);function H(B,re){var I=B.sol()&&re.lastToken!="\\";if(I&&(re.indent=B.indentation()),I&&h(re).type=="py"){var P=h(re).offset;if(B.eatSpace()){var le=B.indentation();return le>P?Y(re):le<P&&K(B,re)&&B.peek()!="#"&&(re.errorToken=!0),null}else{var ke=j(B,re);return P>0&&K(B,re)&&(ke+=" "+p),ke}}return j(B,re)}function j(B,re,I){if(B.eatSpace())return null;if(!I&&B.match(/^#.*/))return"comment";if(B.match(/^[0-9\.]/,!1)){var P=!1;if(B.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(P=!0),B.match(/^[\d_]+\.\d*/)&&(P=!0),B.match(/^\.\d+/)&&(P=!0),P)return B.eat(/J/i),"number";var le=!1;if(B.match(/^0x[0-9a-f_]+/i)&&(le=!0),B.match(/^0b[01_]+/i)&&(le=!0),B.match(/^0o[0-7_]+/i)&&(le=!0),B.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(B.eat(/J/i),le=!0),B.match(/^0(?![\dx])/i)&&(le=!0),le)return B.eat(/L/i),"number"}if(B.match(C)){var ke=B.current().toLowerCase().indexOf("f")!==-1;return ke?(re.tokenize=J(B.current(),re.tokenize),re.tokenize(B,re)):(re.tokenize=W(B.current(),re.tokenize),re.tokenize(B,re))}for(var q=0;q<m.length;q++)if(B.match(m[q]))return"operator";return B.match(y)?"punctuation":re.lastToken=="."&&B.match(D)?"property":B.match(N)||B.match(i)?"keyword":B.match(R)?"builtin":B.match(/^(self|cls)\b/)?"variable-2":B.match(D)?re.lastToken=="def"||re.lastToken=="class"?"def":"variable":(B.next(),I?null:p)}function J(B,re){for(;"rubf".indexOf(B.charAt(0).toLowerCase())>=0;)B=B.substr(1);var I=B.length==1,P="string";function le(q){return function(L,xe){var Se=j(L,xe,!0);return Se=="punctuation"&&(L.current()=="{"?xe.tokenize=le(q+1):L.current()=="}"&&(q>1?xe.tokenize=le(q-1):xe.tokenize=ke)),Se}}function ke(q,L){for(;!q.eol();)if(q.eatWhile(/[^'"\{\}\\]/),q.eat("\\")){if(q.next(),I&&q.eol())return P}else{if(q.match(B))return L.tokenize=re,P;if(q.match("{{"))return P;if(q.match("{",!1))return L.tokenize=le(0),q.current()?P:L.tokenize(q,L);if(q.match("}}"))return P;if(q.match("}"))return p;q.eat(/['"]/)}if(I){if(f.singleLineStringErrors)return p;L.tokenize=re}return P}return ke.isString=!0,ke}function W(B,re){for(;"rubf".indexOf(B.charAt(0).toLowerCase())>=0;)B=B.substr(1);var I=B.length==1,P="string";function le(ke,q){for(;!ke.eol();)if(ke.eatWhile(/[^'"\\]/),ke.eat("\\")){if(ke.next(),I&&ke.eol())return P}else{if(ke.match(B))return q.tokenize=re,P;ke.eat(/['"]/)}if(I){if(f.singleLineStringErrors)return p;q.tokenize=re}return P}return le.isString=!0,le}function Y(B){for(;h(B).type!="py";)B.scopes.pop();B.scopes.push({offset:h(B).offset+d.indentUnit,type:"py",align:null})}function M(B,re,I){var P=B.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:B.column()+1;re.scopes.push({offset:re.indent+b,type:I,align:P})}function K(B,re){for(var I=B.indentation();re.scopes.length>1&&h(re).offset>I;){if(h(re).type!="py")return!0;re.scopes.pop()}return h(re).offset!=I}function k(B,re){B.sol()&&(re.beginningOfLine=!0);var I=re.tokenize(B,re),P=B.current();if(re.beginningOfLine&&P=="@")return B.match(D,!1)?"meta":x?"operator":p;if(/\S/.test(P)&&(re.beginningOfLine=!1),(I=="variable"||I=="builtin")&&re.lastToken=="meta"&&(I="meta"),(P=="pass"||P=="return")&&(re.dedent+=1),P=="lambda"&&(re.lambda=!0),P==":"&&!re.lambda&&h(re).type=="py"&&Y(re),P.length==1&&!/string|comment/.test(I)){var le="[({".indexOf(P);if(le!=-1&&M(B,re,"])}".slice(le,le+1)),le="])}".indexOf(P),le!=-1)if(h(re).type==P)re.indent=re.scopes.pop().offset-b;else return p}return re.dedent>0&&B.eol()&&h(re).type=="py"&&(re.scopes.length>1&&re.scopes.pop(),re.dedent-=1),I}var G={startState:function(B){return{tokenize:H,scopes:[{offset:B||0,type:"py",align:null}],indent:B||0,lastToken:null,lambda:!1,dedent:0}},token:function(B,re){var I=re.errorToken;I&&(re.errorToken=!1);var P=k(B,re);return P&&P!="comment"&&(re.lastToken=P=="keyword"||P=="punctuation"?B.current():P),P=="punctuation"&&(P=null),B.eol()&&re.lambda&&(re.lambda=!1),I?P+" "+p:P},indent:function(B,re){if(B.tokenize!=H)return B.tokenize.isString?n.Pass:0;var I=h(B),P=I.type==re.charAt(0);return I.align!=null?I.align-(P?1:0):I.offset-(P?b:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return G}),n.defineMIME("text/x-python","python");var a=function(d){return d.split(" ")};n.defineMIME("text/x-cython",{name:"python",extra_keywords:a("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var qd=Me((Bd,jd)=>{(function(n){typeof Bd=="object"&&typeof jd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";function t(f){for(var p={},y=0,m=f.length;y<m;++y)p[f[y]]=!0;return p}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__"],u=t(i),c=t(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),h=t(["end","until"]),a={"[":"]","{":"}","(":")"},d={"]":"[","}":"{",")":"("};n.defineMode("ruby",function(f){var p;function y(C,N,R){return R.tokenize.push(C),C(N,R)}function m(C,N){if(C.sol()&&C.match("=begin")&&C.eol())return N.tokenize.push(D),"comment";if(C.eatSpace())return null;var R=C.next(),H;if(R=="`"||R=="'"||R=='"')return y(E(R,"string",R=='"'||R=="`"),C,N);if(R=="/")return v(C)?y(E(R,"string-2",!0),C,N):"operator";if(R=="%"){var j="string",J=!0;C.eat("s")?j="atom":C.eat(/[WQ]/)?j="string":C.eat(/[r]/)?j="string-2":C.eat(/[wxq]/)&&(j="string",J=!1);var W=C.eat(/[^\w\s=]/);return W?(a.propertyIsEnumerable(W)&&(W=a[W]),y(E(W,j,J,!0),C,N)):"operator"}else{if(R=="#")return C.skipToEnd(),"comment";if(R=="<"&&(H=C.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return y(x(H[2],H[1]),C,N);if(R=="0")return C.eat("x")?C.eatWhile(/[\da-fA-F]/):C.eat("b")?C.eatWhile(/[01]/):C.eatWhile(/[0-7]/),"number";if(/\d/.test(R))return C.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if(R=="?"){for(;C.match(/^\\[CM]-/););return C.eat("\\")?C.eatWhile(/\w/):C.next(),"string"}else{if(R==":")return C.eat("'")?y(E("'","atom",!1),C,N):C.eat('"')?y(E('"',"atom",!0),C,N):C.eat(/[\<\>]/)?(C.eat(/[\<\>]/),"atom"):C.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":C.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(C.eatWhile(/[\w$\xa1-\uffff]/),C.eat(/[\?\!\=]/),"atom"):"operator";if(R=="@"&&C.match(/^@?[a-zA-Z_\xa1-\uffff]/))return C.eat("@"),C.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(R=="$")return C.eat(/[a-zA-Z_]/)?C.eatWhile(/[\w]/):C.eat(/\d/)?C.eat(/\d/):C.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(R))return C.eatWhile(/[\w\xa1-\uffff]/),C.eat(/[\?\!]/),C.eat(":")?"atom":"ident";if(R=="|"&&(N.varList||N.lastTok=="{"||N.lastTok=="do"))return p="|",null;if(/[\(\)\[\]{}\\;]/.test(R))return p=R,null;if(R=="-"&&C.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(R)){var Y=C.eatWhile(/[=+\-\/*:\.^%<>~|]/);return R=="."&&!Y&&(p="."),"operator"}else return null}}}function v(C){for(var N=C.pos,R=0,H,j=!1,J=!1;(H=C.next())!=null;)if(J)J=!1;else{if("[{(".indexOf(H)>-1)R++;else if("]})".indexOf(H)>-1){if(R--,R<0)break}else if(H=="/"&&R==0){j=!0;break}J=H=="\\"}return C.backUp(C.pos-N),j}function b(C){return C||(C=1),function(N,R){if(N.peek()=="}"){if(C==1)return R.tokenize.pop(),R.tokenize[R.tokenize.length-1](N,R);R.tokenize[R.tokenize.length-1]=b(C-1)}else N.peek()=="{"&&(R.tokenize[R.tokenize.length-1]=b(C+1));return m(N,R)}}function S(){var C=!1;return function(N,R){return C?(R.tokenize.pop(),R.tokenize[R.tokenize.length-1](N,R)):(C=!0,m(N,R))}}function E(C,N,R,H){return function(j,J){var W=!1,Y;for(J.context.type==="read-quoted-paused"&&(J.context=J.context.prev,j.eat("}"));(Y=j.next())!=null;){if(Y==C&&(H||!W)){J.tokenize.pop();break}if(R&&Y=="#"&&!W){if(j.eat("{")){C=="}"&&(J.context={prev:J.context,type:"read-quoted-paused"}),J.tokenize.push(b());break}else if(/[@\$]/.test(j.peek())){J.tokenize.push(S());break}}W=!W&&Y=="\\"}return N}}function x(C,N){return function(R,H){return N&&R.eatSpace(),R.match(C)?H.tokenize.pop():R.skipToEnd(),"string"}}function D(C,N){return C.sol()&&C.match("=end")&&C.eol()&&N.tokenize.pop(),C.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-f.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(C,N){p=null,C.sol()&&(N.indented=C.indentation());var R=N.tokenize[N.tokenize.length-1](C,N),H,j=p;if(R=="ident"){var J=C.current();R=N.lastTok=="."?"property":u.propertyIsEnumerable(C.current())?"keyword":/^[A-Z]/.test(J)?"tag":N.lastTok=="def"||N.lastTok=="class"||N.varList?"def":"variable",R=="keyword"&&(j=J,c.propertyIsEnumerable(J)?H="indent":h.propertyIsEnumerable(J)?H="dedent":((J=="if"||J=="unless")&&C.column()==C.indentation()||J=="do"&&N.context.indented<N.indented)&&(H="indent"))}return(p||R&&R!="comment")&&(N.lastTok=j),p=="|"&&(N.varList=!N.varList),H=="indent"||/[\(\[\{]/.test(p)?N.context={prev:N.context,type:p||R,indented:N.indented}:(H=="dedent"||/[\)\]\}]/.test(p))&&N.context.prev&&(N.context=N.context.prev),C.eol()&&(N.continuedLine=p=="\\"||R=="operator"),R},indent:function(C,N){if(C.tokenize[C.tokenize.length-1]!=m)return n.Pass;var R=N&&N.charAt(0),H=C.context,j=H.type==d[R]||H.type=="keyword"&&/^(?:end|until|else|elsif|when|rescue)\b/.test(N);return H.indented+(j?0:f.indentUnit)+(C.continuedLine?f.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#",fold:"indent"}}),n.defineMIME("text/x-ruby","ruby"),n.registerHelper("hintWords","ruby",i)})});var Wd=Me((Ud,Hd)=>{(function(n){typeof Ud=="object"&&typeof Hd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineSimpleMode=function(y,m){n.defineMode(y,function(v){return n.simpleMode(v,m)})},n.simpleMode=function(y,m){t(m,"start");var v={},b=m.meta||{},S=!1;for(var E in m)if(E!=b&&m.hasOwnProperty(E))for(var x=v[E]=[],D=m[E],C=0;C<D.length;C++){var N=D[C];x.push(new c(N,m)),(N.indent||N.dedent)&&(S=!0)}var R={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:S?[]:null}},copyState:function(j){var J={state:j.state,pending:j.pending,local:j.local,localState:null,indent:j.indent&&j.indent.slice(0)};j.localState&&(J.localState=n.copyState(j.local.mode,j.localState)),j.stack&&(J.stack=j.stack.slice(0));for(var W=j.persistentStates;W;W=W.next)J.persistentStates={mode:W.mode,spec:W.spec,state:W.state==j.localState?J.localState:n.copyState(W.mode,W.state),next:J.persistentStates};return J},token:h(v,y),innerMode:function(j){return j.local&&{mode:j.local.mode,state:j.localState}},indent:p(v,b)};if(b)for(var H in b)b.hasOwnProperty(H)&&(R[H]=b[H]);return R};function t(y,m){if(!y.hasOwnProperty(m))throw new Error("Undefined state "+m+" in simple mode")}function i(y,m){if(!y)return/(?:)/;var v="";return y instanceof RegExp?(y.ignoreCase&&(v="i"),y=y.source):y=String(y),new RegExp((m===!1?"":"^")+"(?:"+y+")",v)}function u(y){if(!y)return null;if(y.apply)return y;if(typeof y=="string")return y.replace(/\./g," ");for(var m=[],v=0;v<y.length;v++)m.push(y[v]&&y[v].replace(/\./g," "));return m}function c(y,m){(y.next||y.push)&&t(m,y.next||y.push),this.regex=i(y.regex),this.token=u(y.token),this.data=y}function h(y,m){return function(v,b){if(b.pending){var S=b.pending.shift();return b.pending.length==0&&(b.pending=null),v.pos+=S.text.length,S.token}if(b.local)if(b.local.end&&v.match(b.local.end)){var E=b.local.endToken||null;return b.local=b.localState=null,E}else{var E=b.local.mode.token(v,b.localState),x;return b.local.endScan&&(x=b.local.endScan.exec(v.current()))&&(v.pos=v.start+x.index),E}for(var D=y[b.state],C=0;C<D.length;C++){var N=D[C],R=(!N.data.sol||v.sol())&&v.match(N.regex);if(R){N.data.next?b.state=N.data.next:N.data.push?((b.stack||(b.stack=[])).push(b.state),b.state=N.data.push):N.data.pop&&b.stack&&b.stack.length&&(b.state=b.stack.pop()),N.data.mode&&d(m,b,N.data.mode,N.token),N.data.indent&&b.indent.push(v.indentation()+m.indentUnit),N.data.dedent&&b.indent.pop();var H=N.token;if(H&&H.apply&&(H=H(R)),R.length>2&&N.token&&typeof N.token!="string"){for(var j=2;j<R.length;j++)R[j]&&(b.pending||(b.pending=[])).push({text:R[j],token:N.token[j-1]});return v.backUp(R[0].length-(R[1]?R[1].length:0)),H[0]}else return H&&H.join?H[0]:H}}return v.next(),null}}function a(y,m){if(y===m)return!0;if(!y||typeof y!="object"||!m||typeof m!="object")return!1;var v=0;for(var b in y)if(y.hasOwnProperty(b)){if(!m.hasOwnProperty(b)||!a(y[b],m[b]))return!1;v++}for(var b in m)m.hasOwnProperty(b)&&v--;return v==0}function d(y,m,v,b){var S;if(v.persistent)for(var E=m.persistentStates;E&&!S;E=E.next)(v.spec?a(v.spec,E.spec):v.mode==E.mode)&&(S=E);var x=S?S.mode:v.mode||n.getMode(y,v.spec),D=S?S.state:n.startState(x);v.persistent&&!S&&(m.persistentStates={mode:x,spec:v.spec,state:D,next:m.persistentStates}),m.localState=D,m.local={mode:x,end:v.end&&i(v.end),endScan:v.end&&v.forceEnd!==!1&&i(v.end,!1),endToken:b&&b.join?b[b.length-1]:b}}function f(y,m){for(var v=0;v<m.length;v++)if(m[v]===y)return!0}function p(y,m){return function(v,b,S){if(v.local&&v.local.mode.indent)return v.local.mode.indent(v.localState,b,S);if(v.indent==null||v.local||m.dontIndentStates&&f(v.state,m.dontIndentStates)>-1)return n.Pass;var E=v.indent.length-1,x=y[v.state];e:for(;;){for(var D=0;D<x.length;D++){var C=x[D];if(C.data.dedent&&C.data.dedentIfLineStart!==!1){var N=C.regex.exec(b);if(N&&N[0]){E--,(C.next||C.push)&&(x=y[C.next||C.push]),b=b.slice(N[0].length);continue e}}}break}return E<0?0:v.indent[E]}}})});var Kd=Me(($d,Gd)=>{(function(n){typeof $d=="object"&&typeof Gd=="object"?n(At(),Wd()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],n):n(CodeMirror)})(function(n){"use strict";n.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"}}),n.defineMIME("text/x-rustsrc","rust"),n.defineMIME("text/rust","rust")})});var Yd=Me((Vd,Xd)=>{(function(n){typeof Vd=="object"&&typeof Xd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("shell",function(){var t={};function i(v,b){for(var S=0;S<b.length;S++)t[b[S]]=v}var u=["true","false"],c=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],h=["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"];n.registerHelper("hintWords","shell",u.concat(c,h)),i("atom",u),i("keyword",c),i("builtin",h);function a(v,b){if(v.eatSpace())return null;var S=v.sol(),E=v.next();if(E==="\\")return v.next(),null;if(E==="'"||E==='"'||E==="`")return b.tokens.unshift(d(E,E==="`"?"quote":"string")),m(v,b);if(E==="#")return S&&v.eat("!")?(v.skipToEnd(),"meta"):(v.skipToEnd(),"comment");if(E==="$")return b.tokens.unshift(p),m(v,b);if(E==="+"||E==="=")return"operator";if(E==="-")return v.eat("-"),v.eatWhile(/\w/),"attribute";if(E=="<"){if(v.match("<<"))return"operator";var x=v.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(x)return b.tokens.unshift(y(x[1])),"string-2"}if(/\d/.test(E)&&(v.eatWhile(/\d/),v.eol()||!/\w/.test(v.peek())))return"number";v.eatWhile(/[\w-]/);var D=v.current();return v.peek()==="="&&/\w+/.test(D)?"def":t.hasOwnProperty(D)?t[D]:null}function d(v,b){var S=v=="("?")":v=="{"?"}":v;return function(E,x){for(var D,C=!1;(D=E.next())!=null;){if(D===S&&!C){x.tokens.shift();break}else if(D==="$"&&!C&&v!=="'"&&E.peek()!=S){C=!0,E.backUp(1),x.tokens.unshift(p);break}else{if(!C&&v!==S&&D===v)return x.tokens.unshift(d(v,b)),m(E,x);if(!C&&/['"]/.test(D)&&!/['"]/.test(v)){x.tokens.unshift(f(D,"string")),E.backUp(1);break}}C=!C&&D==="\\"}return b}}function f(v,b){return function(S,E){return E.tokens[0]=d(v,b),S.next(),m(S,E)}}var p=function(v,b){b.tokens.length>1&&v.eat("$");var S=v.next();return/['"({]/.test(S)?(b.tokens[0]=d(S,S=="("?"quote":S=="{"?"def":"string"),m(v,b)):(/\d/.test(S)||v.eatWhile(/\w/),b.tokens.shift(),"def")};function y(v){return function(b,S){return b.sol()&&b.string==v&&S.tokens.shift(),b.skipToEnd(),"string-2"}}function m(v,b){return(b.tokens[0]||a)(v,b)}return{startState:function(){return{tokens:[]}},token:function(v,b){return m(v,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),n.defineMIME("text/x-sh","shell"),n.defineMIME("application/x-sh","shell")})});var Jd=Me((Zd,Qd)=>{(function(n){typeof Zd=="object"&&typeof Qd=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("sql",function(f,p){var y=p.client||{},m=p.atoms||{false:!0,true:!0,null:!0},v=p.builtin||a(d),b=p.keywords||a(h),S=p.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=p.support||{},x=p.hooks||{},D=p.dateSQL||{date:!0,time:!0,timestamp:!0},C=p.backslashStringEscapes!==!1,N=p.brackets||/^[\{}\(\)\[\]]/,R=p.punctuation||/^[;.,:]/;function H(M,K){var k=M.next();if(x[k]){var G=x[k](M,K);if(G!==!1)return G}if(E.hexNumber&&(k=="0"&&M.match(/^[xX][0-9a-fA-F]+/)||(k=="x"||k=="X")&&M.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((k=="b"||k=="B")&&M.match(/^'[01]+'/)||k=="0"&&M.match(/^b[01]+/)))return"number";if(k.charCodeAt(0)>47&&k.charCodeAt(0)<58)return M.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&M.match(/^\.(?!\.)/),"number";if(k=="?"&&(M.eatSpace()||M.eol()||M.eat(";")))return"variable-3";if(k=="'"||k=='"'&&E.doubleQuote)return K.tokenize=j(k),K.tokenize(M,K);if((E.nCharCast&&(k=="n"||k=="N")||E.charsetCast&&k=="_"&&M.match(/[a-z][a-z0-9]*/i))&&(M.peek()=="'"||M.peek()=='"'))return"keyword";if(E.escapeConstant&&(k=="e"||k=="E")&&(M.peek()=="'"||M.peek()=='"'&&E.doubleQuote))return K.tokenize=function(re,I){return(I.tokenize=j(re.next(),!0))(re,I)},"keyword";if(E.commentSlashSlash&&k=="/"&&M.eat("/"))return M.skipToEnd(),"comment";if(E.commentHash&&k=="#"||k=="-"&&M.eat("-")&&(!E.commentSpaceRequired||M.eat(" ")))return M.skipToEnd(),"comment";if(k=="/"&&M.eat("*"))return K.tokenize=J(1),K.tokenize(M,K);if(k=="."){if(E.zerolessFloat&&M.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(M.match(/^\.+/))return null;if(E.ODBCdotTable&&M.match(/^[\w\d_$#]+/))return"variable-2"}else{if(S.test(k))return M.eatWhile(S),"operator";if(N.test(k))return"bracket";if(R.test(k))return M.eatWhile(R),"punctuation";if(k=="{"&&(M.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||M.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";M.eatWhile(/^[_\w\d]/);var B=M.current().toLowerCase();return D.hasOwnProperty(B)&&(M.match(/^( )+'[^']*'/)||M.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(B)?"atom":v.hasOwnProperty(B)?"builtin":b.hasOwnProperty(B)?"keyword":y.hasOwnProperty(B)?"string-2":null}}function j(M,K){return function(k,G){for(var B=!1,re;(re=k.next())!=null;){if(re==M&&!B){G.tokenize=H;break}B=(C||K)&&!B&&re=="\\"}return"string"}}function J(M){return function(K,k){var G=K.match(/^.*?(\/\*|\*\/)/);return G?G[1]=="/*"?k.tokenize=J(M+1):M>1?k.tokenize=J(M-1):k.tokenize=H:K.skipToEnd(),"comment"}}function W(M,K,k){K.context={prev:K.context,indent:M.indentation(),col:M.column(),type:k}}function Y(M){M.indent=M.context.indent,M.context=M.context.prev}return{startState:function(){return{tokenize:H,context:null}},token:function(M,K){if(M.sol()&&(K.context&&K.context.align==null&&(K.context.align=!1)),K.tokenize==H&&M.eatSpace())return null;var k=K.tokenize(M,K);if(k=="comment")return k;K.context&&K.context.align==null&&(K.context.align=!0);var G=M.current();return G=="("?W(M,K,")"):G=="["?W(M,K,"]"):K.context&&K.context.type==G&&Y(K),k},indent:function(M,K){var k=M.context;if(!k)return n.Pass;var G=K.charAt(0)==k.type;return k.align?k.col+(G?0:1):k.indent+(G?0:f.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function t(f){for(var p;(p=f.next())!=null;)if(p=="`"&&!f.eat("`"))return"variable-2";return f.backUp(f.current().length-1),f.eatWhile(/\w/)?"variable-2":null}function i(f){for(var p;(p=f.next())!=null;)if(p=='"'&&!f.eat('"'))return"variable-2";return f.backUp(f.current().length-1),f.eatWhile(/\w/)?"variable-2":null}function u(f){return f.eat("@")&&(f.match("session."),f.match("local."),f.match("global.")),f.eat("'")?(f.match(/^.*'/),"variable-2"):f.eat('"')?(f.match(/^.*"/),"variable-2"):f.eat("`")?(f.match(/^.*`/),"variable-2"):f.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function c(f){return f.eat("N")?"atom":f.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var h="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 a(f){for(var p={},y=f.split(" "),m=0;m<y.length;++m)p[y[m]]=!0;return p}var d="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";n.defineMIME("text/x-sql",{name:"sql",keywords:a(h+"begin"),builtin:a(d),atoms:a("false true null unknown"),dateSQL:a("date time timestamp"),support:a("ODBCdotTable doubleQuote binaryNumber hexNumber")}),n.defineMIME("text/x-mssql",{name:"sql",client:a("$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:a(h+"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:a("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:a("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:a("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":u}}),n.defineMIME("text/x-mysql",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(h+"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:a("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:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":t,"\\":c}}),n.defineMIME("text/x-mariadb",{name:"sql",client:a("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:a(h+"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:a("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:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":u,"`":t,"\\":c}}),n.defineMIME("text/x-sqlite",{name:"sql",client:a("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:a(h+"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:a("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:a("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:a("date time timestamp datetime"),support:a("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":u,":":u,"?":u,$:u,'"':i,"`":t}}),n.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:a("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:a("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:a("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:a("commentSlashSlash decimallessFloat"),hooks:{}}),n.defineMIME("text/x-plsql",{name:"sql",client:a("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:a("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:a("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:a("date time timestamp"),support:a("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),n.defineMIME("text/x-hive",{name:"sql",keywords:a("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:a("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:a("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:a("date timestamp"),support:a("ODBCdotTable doubleQuote binaryNumber hexNumber")}),n.defineMIME("text/x-pgsql",{name:"sql",client:a("source"),keywords:a(h+"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:a("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:a("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),n.defineMIME("text/x-gql",{name:"sql",keywords:a("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:a("false true"),builtin:a("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),n.defineMIME("text/x-gpsql",{name:"sql",client:a("source"),keywords:a("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:a("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:a("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),n.defineMIME("text/x-sparksql",{name:"sql",keywords:a("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 data 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:a("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:a("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:a("date time timestamp"),support:a("ODBCdotTable doubleQuote zerolessFloat")}),n.defineMIME("text/x-esper",{name:"sql",client:a("source"),keywords:a("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:a("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:a("time"),support:a("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var rf=Me((ef,tf)=>{(function(n){typeof ef=="object"&&typeof tf=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(t,i){if(!i.inString&&(t.peek()=='"'||t.peek()=="'")&&(i.stringType=t.peek(),t.next(),i.inString=!0),t.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!t.eol();)t.peek()===i.stringType?(t.next(),i.inString=!1):t.peek()==="\\"?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&t.peek()==="]")return t.next(),i.inArray--,"bracket";if(i.lhs&&t.peek()==="["&&t.skipTo("]"))return t.next(),t.peek()==="]"&&t.next(),"atom";if(t.peek()==="#")return t.skipToEnd(),"comment";if(t.eatSpace())return null;if(i.lhs&&t.eatWhile(function(u){return u!="="&&u!=" "}))return"property";if(i.lhs&&t.peek()==="=")return t.next(),i.lhs=!1,null;if(!i.lhs&&t.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(t.match("true")||t.match("false")))return"atom";if(!i.lhs&&t.peek()==="[")return i.inArray++,t.next(),"bracket";if(!i.lhs&&t.match(/^\-?\d+(?:\.\d+)?/))return"number";t.eatSpace()||t.next()}return null}}}),n.defineMIME("text/x-toml","toml")})});var af=Me((nf,of)=>{(function(n){typeof nf=="object"&&typeof of=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("vbscript",function(t,i){var u="error";function c(fe){return new RegExp("^(("+fe.join(")|(")+"))\\b","i")}var h=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),a=new RegExp("^((<>)|(<=)|(>=))"),d=new RegExp("^[\\.,]"),f=new RegExp("^[\\(\\)]"),p=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),y=["class","sub","select","while","if","function","property","with","for"],m=["else","elseif","case"],v=["next","loop","wend"],b=c(["and","or","not","xor","is","mod","eqv","imp"]),S=["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"],x=["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"],D=["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"],C=["WScript","err","debug","RegExp"],N=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],R=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],H=["server","response","request","session","application"],j=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],J=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],W=R.concat(N);C=C.concat(D),t.isASP&&(C=C.concat(H),W=W.concat(J,j));var Y=c(S),M=c(E),K=c(x),k=c(C),G=c(W),B='"',re=c(y),I=c(m),P=c(v),le=c(["end"]),ke=c(["do"]),q=c(["on error resume next","exit"]),L=c(["rem"]);function xe(fe,Ae){Ae.currentIndent++}function Se(fe,Ae){Ae.currentIndent--}function be(fe,Ae){if(fe.eatSpace())return"space";var Qe=fe.peek();if(Qe==="'")return fe.skipToEnd(),"comment";if(fe.match(L))return fe.skipToEnd(),"comment";if(fe.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!fe.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var ot=!1;if((fe.match(/^\d*\.\d+/i)||(fe.match(/^\d+\.\d*/)||fe.match(/^\.\d+/)))&&(ot=!0),ot)return fe.eat(/J/i),"number";var ft=!1;if(fe.match(/^&H[0-9a-f]+/i)||fe.match(/^&O[0-7]+/i)?ft=!0:fe.match(/^[1-9]\d*F?/)?(fe.eat(/J/i),ft=!0):fe.match(/^0(?![\dx])/i)&&(ft=!0),ft)return fe.eat(/L/i),"number"}return fe.match(B)?(Ae.tokenize=Fe(fe.current()),Ae.tokenize(fe,Ae)):fe.match(a)||fe.match(h)||fe.match(b)?"operator":fe.match(d)?null:fe.match(f)?"bracket":fe.match(q)?(Ae.doInCurrentLine=!0,"keyword"):fe.match(ke)?(xe(fe,Ae),Ae.doInCurrentLine=!0,"keyword"):fe.match(re)?(Ae.doInCurrentLine?Ae.doInCurrentLine=!1:xe(fe,Ae),"keyword"):fe.match(I)?"keyword":fe.match(le)?(Se(fe,Ae),Se(fe,Ae),"keyword"):fe.match(P)?(Ae.doInCurrentLine?Ae.doInCurrentLine=!1:Se(fe,Ae),"keyword"):fe.match(Y)?"keyword":fe.match(M)?"atom":fe.match(G)?"variable-2":fe.match(K)?"builtin":fe.match(k)?"variable-2":fe.match(p)?"variable":(fe.next(),u)}function Fe(fe){var Ae=fe.length==1,Qe="string";return function(ot,ft){for(;!ot.eol();){if(ot.eatWhile(/[^'"]/),ot.match(fe))return ft.tokenize=be,Qe;ot.eat(/['"]/)}if(Ae){if(i.singleLineStringErrors)return u;ft.tokenize=be}return Qe}}function Xe(fe,Ae){var Qe=Ae.tokenize(fe,Ae),ot=fe.current();return ot==="."?(Qe=Ae.tokenize(fe,Ae),ot=fe.current(),Qe&&(Qe.substr(0,8)==="variable"||Qe==="builtin"||Qe==="keyword")?((Qe==="builtin"||Qe==="keyword")&&(Qe="variable"),W.indexOf(ot.substr(1))>-1&&(Qe="variable-2"),Qe):u):Qe}var nt={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:be,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(fe,Ae){fe.sol()&&(Ae.currentIndent+=Ae.nextLineIndent,Ae.nextLineIndent=0,Ae.doInCurrentLine=0);var Qe=Xe(fe,Ae);return Ae.lastToken={style:Qe,content:fe.current()},Qe==="space"&&(Qe=null),Qe},indent:function(fe,Ae){var Qe=Ae.replace(/^\s+|\s+$/g,"");return Qe.match(P)||Qe.match(le)||Qe.match(I)?t.indentUnit*(fe.currentIndent-1):fe.currentIndent<0?0:fe.currentIndent*t.indentUnit}};return nt}),n.defineMIME("text/vbscript","vbscript")})});var uf=Me((sf,lf)=>{(function(n){typeof sf=="object"&&typeof lf=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineMode("yaml",function(){var t=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+t.join(")|(")+"))$","i");return{token:function(u,c){var h=u.peek(),a=c.escaped;if(c.escaped=!1,h=="#"&&(u.pos==0||/\s/.test(u.string.charAt(u.pos-1))))return u.skipToEnd(),"comment";if(u.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(c.literal&&u.indentation()>c.keyCol)return u.skipToEnd(),"string";if(c.literal&&(c.literal=!1),u.sol()){if(c.keyCol=0,c.pair=!1,c.pairStart=!1,u.match("---"))return"def";if(u.match("..."))return"def";if(u.match(/\s*-\s+/))return"meta"}if(u.match(/^(\{|\}|\[|\])/))return h=="{"?c.inlinePairs++:h=="}"?c.inlinePairs--:h=="["?c.inlineList++:c.inlineList--,"meta";if(c.inlineList>0&&!a&&h==",")return u.next(),"meta";if(c.inlinePairs>0&&!a&&h==",")return c.keyCol=0,c.pair=!1,c.pairStart=!1,u.next(),"meta";if(c.pairStart){if(u.match(/^\s*(\||\>)\s*/))return c.literal=!0,"meta";if(u.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(c.inlinePairs==0&&u.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(c.inlinePairs>0&&u.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(u.match(i))return"keyword"}return!c.pair&&u.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(c.pair=!0,c.keyCol=u.indentation(),"atom"):c.pair&&u.match(/^:\s*/)?(c.pairStart=!0,"meta"):(c.pairStart=!1,c.escaped=h=="\\",u.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),n.defineMIME("text/x-yaml","yaml"),n.defineMIME("text/yaml","yaml")})});var ff=Me((cf,df)=>{(function(n){typeof cf=="object"&&typeof df=="object"?n(At()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)})(function(n){"use strict";n.defineOption("scrollPastEnd",!1,function(u,c,h){h&&h!=n.Init&&(u.off("change",t),u.off("refresh",i),u.display.lineSpace.parentNode.style.paddingBottom="",u.state.scrollPastEndPadding=null),c&&(u.on("change",t),u.on("refresh",i),i(u))});function t(u,c){n.changeEnd(c).line==u.lastLine()&&i(u)}function i(u){var c="";if(u.lineCount()>1){var h=u.display.scroller.clientHeight-30,a=u.getLineHandle(u.lastLine()).height;c=h-a+"px"}u.state.scrollPastEndPadding!=c&&(u.state.scrollPastEndPadding=c,u.display.lineSpace.parentNode.style.paddingBottom=c,u.off("refresh",i),u.setSize(),u.on("refresh",i))}})});var hf=Me((Vo,zs)=>{(function(t,i){if(typeof Vo=="object"&&typeof zs=="object")zs.exports=i();else if(typeof define=="function"&&define.amd)define([],i);else{var u=i();for(var c in u)(typeof Vo=="object"?Vo:t)[c]=u[c]}})(self,function(){return function(){var n={3099:function(c){c.exports=function(h){if(typeof h!="function")throw TypeError(String(h)+" is not a function");return h}},6077:function(c,h,a){var d=a(111);c.exports=function(f){if(!d(f)&&f!==null)throw TypeError("Can't set "+String(f)+" as a prototype");return f}},1223:function(c,h,a){var d=a(5112),f=a(30),p=a(3070),y=d("unscopables"),m=Array.prototype;m[y]==null&&p.f(m,y,{configurable:!0,value:f(null)}),c.exports=function(v){m[y][v]=!0}},1530:function(c,h,a){"use strict";var d=a(8710).charAt;c.exports=function(f,p,y){return p+(y?d(f,p).length:1)}},5787:function(c){c.exports=function(h,a,d){if(!(h instanceof a))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return h}},9670:function(c,h,a){var d=a(111);c.exports=function(f){if(!d(f))throw TypeError(String(f)+" is not an object");return f}},4019:function(c){c.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},260:function(c,h,a){"use strict";var d=a(4019),f=a(9781),p=a(7854),y=a(111),m=a(6656),v=a(648),b=a(8880),S=a(1320),E=a(3070).f,x=a(9518),D=a(7674),C=a(5112),N=a(9711),R=p.Int8Array,H=R&&R.prototype,j=p.Uint8ClampedArray,J=j&&j.prototype,W=R&&x(R),Y=H&&x(H),M=Object.prototype,K=M.isPrototypeOf,k=C("toStringTag"),G=N("TYPED_ARRAY_TAG"),B=d&&!!D&&v(p.opera)!=="Opera",re=!1,I,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},le={BigInt64Array:8,BigUint64Array:8},ke=function(Xe){if(!y(Xe))return!1;var nt=v(Xe);return nt==="DataView"||m(P,nt)||m(le,nt)},q=function(Fe){if(!y(Fe))return!1;var Xe=v(Fe);return m(P,Xe)||m(le,Xe)},L=function(Fe){if(q(Fe))return Fe;throw TypeError("Target is not a typed array")},xe=function(Fe){if(D){if(K.call(W,Fe))return Fe}else for(var Xe in P)if(m(P,I)){var nt=p[Xe];if(nt&&(Fe===nt||K.call(nt,Fe)))return Fe}throw TypeError("Target is not a typed array constructor")},Se=function(Fe,Xe,nt){if(!f)return;if(nt)for(var fe in P){var Ae=p[fe];Ae&&m(Ae.prototype,Fe)&&delete Ae.prototype[Fe]}(!Y[Fe]||nt)&&S(Y,Fe,nt?Xe:B&&H[Fe]||Xe)},be=function(Fe,Xe,nt){var fe,Ae;if(!f)return;if(D){if(nt)for(fe in P)Ae=p[fe],Ae&&m(Ae,Fe)&&delete Ae[Fe];if(!W[Fe]||nt)try{return S(W,Fe,nt?Xe:B&&R[Fe]||Xe)}catch(Qe){}else return}for(fe in P)Ae=p[fe],Ae&&(!Ae[Fe]||nt)&&S(Ae,Fe,Xe)};for(I in P)p[I]||(B=!1);if((!B||typeof W!="function"||W===Function.prototype)&&(W=function(){throw TypeError("Incorrect invocation")},B))for(I in P)p[I]&&D(p[I],W);if((!B||!Y||Y===M)&&(Y=W.prototype,B))for(I in P)p[I]&&D(p[I].prototype,Y);if(B&&x(J)!==Y&&D(J,Y),f&&!m(Y,k)){re=!0,E(Y,k,{get:function(){return y(this)?this[G]:void 0}});for(I in P)p[I]&&b(p[I],G,I)}c.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:re&&G,aTypedArray:L,aTypedArrayConstructor:xe,exportTypedArrayMethod:Se,exportTypedArrayStaticMethod:be,isView:ke,isTypedArray:q,TypedArray:W,TypedArrayPrototype:Y}},3331:function(c,h,a){"use strict";var d=a(7854),f=a(9781),p=a(4019),y=a(8880),m=a(2248),v=a(7293),b=a(5787),S=a(9958),E=a(7466),x=a(7067),D=a(1179),C=a(9518),N=a(7674),R=a(8006).f,H=a(3070).f,j=a(1285),J=a(8003),W=a(9909),Y=W.get,M=W.set,K="ArrayBuffer",k="DataView",G="prototype",B="Wrong length",re="Wrong index",I=d[K],P=I,le=d[k],ke=le&&le[G],q=Object.prototype,L=d.RangeError,xe=D.pack,Se=D.unpack,be=function(Ee){return[Ee&255]},Fe=function(Ee){return[Ee&255,Ee>>8&255]},Xe=function(Ee){return[Ee&255,Ee>>8&255,Ee>>16&255,Ee>>24&255]},nt=function(Ee){return Ee[3]<<24|Ee[2]<<16|Ee[1]<<8|Ee[0]},fe=function(Ee){return xe(Ee,23,4)},Ae=function(Ee){return xe(Ee,52,8)},Qe=function(Ee,V){H(Ee[G],V,{get:function(){return Y(this)[V]}})},ot=function(Ee,V,he,ue){var rt=x(he),Ne=Y(Ee);if(rt+V>Ne.byteLength)throw L(re);var it=Y(Ne.buffer).bytes,He=rt+Ne.byteOffset,ze=it.slice(He,He+V);return ue?ze:ze.reverse()},ft=function(Ee,V,he,ue,rt,Ne){var it=x(he),He=Y(Ee);if(it+V>He.byteLength)throw L(re);for(var ze=Y(He.buffer).bytes,tt=it+He.byteOffset,Ht=ue(+rt),Et=0;Et<V;Et++)ze[tt+Et]=Ht[Ne?Et:V-Et-1]};if(!p)P=function(V){b(this,P,K);var he=x(V);M(this,{bytes:j.call(new Array(he),0),byteLength:he}),f||(this.byteLength=he)},le=function(V,he,ue){b(this,le,k),b(V,P,k);var rt=Y(V).byteLength,Ne=S(he);if(Ne<0||Ne>rt)throw L("Wrong offset");if(ue=ue===void 0?rt-Ne:E(ue),Ne+ue>rt)throw L(B);M(this,{buffer:V,byteLength:ue,byteOffset:Ne}),f||(this.buffer=V,this.byteLength=ue,this.byteOffset=Ne)},f&&(Qe(P,"byteLength"),Qe(le,"buffer"),Qe(le,"byteLength"),Qe(le,"byteOffset")),m(le[G],{getInt8:function(V){return ot(this,1,V)[0]<<24>>24},getUint8:function(V){return ot(this,1,V)[0]},getInt16:function(V){var he=ot(this,2,V,arguments.length>1?arguments[1]:void 0);return(he[1]<<8|he[0])<<16>>16},getUint16:function(V){var he=ot(this,2,V,arguments.length>1?arguments[1]:void 0);return he[1]<<8|he[0]},getInt32:function(V){return nt(ot(this,4,V,arguments.length>1?arguments[1]:void 0))},getUint32:function(V){return nt(ot(this,4,V,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(V){return Se(ot(this,4,V,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(V){return Se(ot(this,8,V,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(V,he){ft(this,1,V,be,he)},setUint8:function(V,he){ft(this,1,V,be,he)},setInt16:function(V,he){ft(this,2,V,Fe,he,arguments.length>2?arguments[2]:void 0)},setUint16:function(V,he){ft(this,2,V,Fe,he,arguments.length>2?arguments[2]:void 0)},setInt32:function(V,he){ft(this,4,V,Xe,he,arguments.length>2?arguments[2]:void 0)},setUint32:function(V,he){ft(this,4,V,Xe,he,arguments.length>2?arguments[2]:void 0)},setFloat32:function(V,he){ft(this,4,V,fe,he,arguments.length>2?arguments[2]:void 0)},setFloat64:function(V,he){ft(this,8,V,Ae,he,arguments.length>2?arguments[2]:void 0)}});else{if(!v(function(){I(1)})||!v(function(){new I(-1)})||v(function(){return new I,new I(1.5),new I(NaN),I.name!=K})){P=function(V){return b(this,P),new I(x(V))};for(var Pe=P[G]=I[G],Le=R(I),Be=0,Ke;Le.length>Be;)(Ke=Le[Be++])in P||y(P,Ke,I[Ke]);Pe.constructor=P}N&&C(ke)!==q&&N(ke,q);var je=new le(new P(2)),Ge=ke.setInt8;je.setInt8(0,2147483648),je.setInt8(1,2147483649),(je.getInt8(0)||!je.getInt8(1))&&m(ke,{setInt8:function(V,he){Ge.call(this,V,he<<24>>24)},setUint8:function(V,he){Ge.call(this,V,he<<24>>24)}},{unsafe:!0})}J(P,K),J(le,k),c.exports={ArrayBuffer:P,DataView:le}},1048:function(c,h,a){"use strict";var d=a(7908),f=a(1400),p=a(7466),y=Math.min;c.exports=[].copyWithin||function(v,b){var S=d(this),E=p(S.length),x=f(v,E),D=f(b,E),C=arguments.length>2?arguments[2]:void 0,N=y((C===void 0?E:f(C,E))-D,E-x),R=1;for(D<x&&x<D+N&&(R=-1,D+=N-1,x+=N-1);N-- >0;)D in S?S[x]=S[D]:delete S[x],x+=R,D+=R;return S}},1285:function(c,h,a){"use strict";var d=a(7908),f=a(1400),p=a(7466);c.exports=function(m){for(var v=d(this),b=p(v.length),S=arguments.length,E=f(S>1?arguments[1]:void 0,b),x=S>2?arguments[2]:void 0,D=x===void 0?b:f(x,b);D>E;)v[E++]=m;return v}},8533:function(c,h,a){"use strict";var d=a(2092).forEach,f=a(9341),p=f("forEach");c.exports=p?[].forEach:function(m){return d(this,m,arguments.length>1?arguments[1]:void 0)}},8457:function(c,h,a){"use strict";var d=a(9974),f=a(7908),p=a(3411),y=a(7659),m=a(7466),v=a(6135),b=a(1246);c.exports=function(E){var x=f(E),D=typeof this=="function"?this:Array,C=arguments.length,N=C>1?arguments[1]:void 0,R=N!==void 0,H=b(x),j=0,J,W,Y,M,K,k;if(R&&(N=d(N,C>2?arguments[2]:void 0,2)),H!=null&&!(D==Array&&y(H)))for(M=H.call(x),K=M.next,W=new D;!(Y=K.call(M)).done;j++)k=R?p(M,N,[Y.value,j],!0):Y.value,v(W,j,k);else for(J=m(x.length),W=new D(J);J>j;j++)k=R?N(x[j],j):x[j],v(W,j,k);return W.length=j,W}},1318:function(c,h,a){var d=a(5656),f=a(7466),p=a(1400),y=function(m){return function(v,b,S){var E=d(v),x=f(E.length),D=p(S,x),C;if(m&&b!=b){for(;x>D;)if(C=E[D++],C!=C)return!0}else for(;x>D;D++)if((m||D in E)&&E[D]===b)return m||D||0;return!m&&-1}};c.exports={includes:y(!0),indexOf:y(!1)}},2092:function(c,h,a){var d=a(9974),f=a(8361),p=a(7908),y=a(7466),m=a(5417),v=[].push,b=function(S){var E=S==1,x=S==2,D=S==3,C=S==4,N=S==6,R=S==7,H=S==5||N;return function(j,J,W,Y){for(var M=p(j),K=f(M),k=d(J,W,3),G=y(K.length),B=0,re=Y||m,I=E?re(j,G):x||R?re(j,0):void 0,P,le;G>B;B++)if((H||B in K)&&(P=K[B],le=k(P,B,M),S))if(E)I[B]=le;else if(le)switch(S){case 3:return!0;case 5:return P;case 6:return B;case 2:v.call(I,P)}else switch(S){case 4:return!1;case 7:v.call(I,P)}return N?-1:D||C?C:I}};c.exports={forEach:b(0),map:b(1),filter:b(2),some:b(3),every:b(4),find:b(5),findIndex:b(6),filterOut:b(7)}},6583:function(c,h,a){"use strict";var d=a(5656),f=a(9958),p=a(7466),y=a(9341),m=Math.min,v=[].lastIndexOf,b=!!v&&1/[1].lastIndexOf(1,-0)<0,S=y("lastIndexOf"),E=b||!S;c.exports=E?function(D){if(b)return v.apply(this,arguments)||0;var C=d(this),N=p(C.length),R=N-1;for(arguments.length>1&&(R=m(R,f(arguments[1]))),R<0&&(R=N+R);R>=0;R--)if(R in C&&C[R]===D)return R||0;return-1}:v},1194:function(c,h,a){var d=a(7293),f=a(5112),p=a(7392),y=f("species");c.exports=function(m){return p>=51||!d(function(){var v=[],b=v.constructor={};return b[y]=function(){return{foo:1}},v[m](Boolean).foo!==1})}},9341:function(c,h,a){"use strict";var d=a(7293);c.exports=function(f,p){var y=[][f];return!!y&&d(function(){y.call(null,p||function(){throw 1},1)})}},3671:function(c,h,a){var d=a(3099),f=a(7908),p=a(8361),y=a(7466),m=function(v){return function(b,S,E,x){d(S);var D=f(b),C=p(D),N=y(D.length),R=v?N-1:0,H=v?-1:1;if(E<2)for(;;){if(R in C){x=C[R],R+=H;break}if(R+=H,v?R<0:N<=R)throw TypeError("Reduce of empty array with no initial value")}for(;v?R>=0:N>R;R+=H)R in C&&(x=S(x,C[R],R,D));return x}};c.exports={left:m(!1),right:m(!0)}},5417:function(c,h,a){var d=a(111),f=a(3157),p=a(5112),y=p("species");c.exports=function(m,v){var b;return f(m)&&(b=m.constructor,typeof b=="function"&&(b===Array||f(b.prototype))?b=void 0:d(b)&&(b=b[y],b===null&&(b=void 0))),new(b===void 0?Array:b)(v===0?0:v)}},3411:function(c,h,a){var d=a(9670),f=a(9212);c.exports=function(p,y,m,v){try{return v?y(d(m)[0],m[1]):y(m)}catch(b){throw f(p),b}}},7072:function(c,h,a){var d=a(5112),f=d("iterator"),p=!1;try{var y=0,m={next:function(){return{done:!!y++}},return:function(){p=!0}};m[f]=function(){return this},Array.from(m,function(){throw 2})}catch(v){}c.exports=function(v,b){if(!b&&!p)return!1;var S=!1;try{var E={};E[f]=function(){return{next:function(){return{done:S=!0}}}},v(E)}catch(x){}return S}},4326:function(c){var h={}.toString;c.exports=function(a){return h.call(a).slice(8,-1)}},648:function(c,h,a){var d=a(1694),f=a(4326),p=a(5112),y=p("toStringTag"),m=f(function(){return arguments}())=="Arguments",v=function(b,S){try{return b[S]}catch(E){}};c.exports=d?f:function(b){var S,E,x;return b===void 0?"Undefined":b===null?"Null":typeof(E=v(S=Object(b),y))=="string"?E:m?f(S):(x=f(S))=="Object"&&typeof S.callee=="function"?"Arguments":x}},9920:function(c,h,a){var d=a(6656),f=a(3887),p=a(1236),y=a(3070);c.exports=function(m,v){for(var b=f(v),S=y.f,E=p.f,x=0;x<b.length;x++){var D=b[x];d(m,D)||S(m,D,E(v,D))}}},8544:function(c,h,a){var d=a(7293);c.exports=!d(function(){function f(){}return f.prototype.constructor=null,Object.getPrototypeOf(new f)!==f.prototype})},4994:function(c,h,a){"use strict";var d=a(3383).IteratorPrototype,f=a(30),p=a(9114),y=a(8003),m=a(7497),v=function(){return this};c.exports=function(b,S,E){var x=S+" Iterator";return b.prototype=f(d,{next:p(1,E)}),y(b,x,!1,!0),m[x]=v,b}},8880:function(c,h,a){var d=a(9781),f=a(3070),p=a(9114);c.exports=d?function(y,m,v){return f.f(y,m,p(1,v))}:function(y,m,v){return y[m]=v,y}},9114:function(c){c.exports=function(h,a){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:a}}},6135:function(c,h,a){"use strict";var d=a(7593),f=a(3070),p=a(9114);c.exports=function(y,m,v){var b=d(m);b in y?f.f(y,b,p(0,v)):y[b]=v}},654:function(c,h,a){"use strict";var d=a(2109),f=a(4994),p=a(9518),y=a(7674),m=a(8003),v=a(8880),b=a(1320),S=a(5112),E=a(1913),x=a(7497),D=a(3383),C=D.IteratorPrototype,N=D.BUGGY_SAFARI_ITERATORS,R=S("iterator"),H="keys",j="values",J="entries",W=function(){return this};c.exports=function(Y,M,K,k,G,B,re){f(K,M,k);var I=function(Xe){if(Xe===G&&L)return L;if(!N&&Xe in ke)return ke[Xe];switch(Xe){case H:return function(){return new K(this,Xe)};case j:return function(){return new K(this,Xe)};case J:return function(){return new K(this,Xe)}}return function(){return new K(this)}},P=M+" Iterator",le=!1,ke=Y.prototype,q=ke[R]||ke["@@iterator"]||G&&ke[G],L=!N&&q||I(G),xe=M=="Array"&&ke.entries||q,Se,be,Fe;if(xe&&(Se=p(xe.call(new Y)),C!==Object.prototype&&Se.next&&(!E&&p(Se)!==C&&(y?y(Se,C):typeof Se[R]!="function"&&v(Se,R,W)),m(Se,P,!0,!0),E&&(x[P]=W))),G==j&&q&&q.name!==j&&(le=!0,L=function(){return q.call(this)}),(!E||re)&&ke[R]!==L&&v(ke,R,L),x[M]=L,G)if(be={values:I(j),keys:B?L:I(H),entries:I(J)},re)for(Fe in be)(N||le||!(Fe in ke))&&b(ke,Fe,be[Fe]);else d({target:M,proto:!0,forced:N||le},be);return be}},9781:function(c,h,a){var d=a(7293);c.exports=!d(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(c,h,a){var d=a(7854),f=a(111),p=d.document,y=f(p)&&f(p.createElement);c.exports=function(m){return y?p.createElement(m):{}}},8324:function(c){c.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(c,h,a){var d=a(5005);c.exports=d("navigator","userAgent")||""},7392:function(c,h,a){var d=a(7854),f=a(8113),p=d.process,y=p&&p.versions,m=y&&y.v8,v,b;m?(v=m.split("."),b=v[0]+v[1]):f&&(v=f.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=f.match(/Chrome\/(\d+)/),v&&(b=v[1]))),c.exports=b&&+b},748:function(c){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(c,h,a){var d=a(7854),f=a(1236).f,p=a(8880),y=a(1320),m=a(3505),v=a(9920),b=a(4705);c.exports=function(S,E){var x=S.target,D=S.global,C=S.stat,N,R,H,j,J,W;if(D?R=d:C?R=d[x]||m(x,{}):R=(d[x]||{}).prototype,R)for(H in E){if(J=E[H],S.noTargetGet?(W=f(R,H),j=W&&W.value):j=R[H],N=b(D?H:x+(C?".":"#")+H,S.forced),!N&&j!==void 0){if(typeof J===typeof j)continue;v(J,j)}(S.sham||j&&j.sham)&&p(J,"sham",!0),y(R,H,J,S)}}},7293:function(c){c.exports=function(h){try{return!!h()}catch(a){return!0}}},7007:function(c,h,a){"use strict";a(4916);var d=a(1320),f=a(7293),p=a(5112),y=a(2261),m=a(8880),v=p("species"),b=!f(function(){var C=/./;return C.exec=function(){var N=[];return N.groups={a:"7"},N},"".replace(C,"$<a>")!=="7"}),S=function(){return"a".replace(/./,"$0")==="$0"}(),E=p("replace"),x=function(){return/./[E]?/./[E]("a","$0")==="":!1}(),D=!f(function(){var C=/(?:)/,N=C.exec;C.exec=function(){return N.apply(this,arguments)};var R="ab".split(C);return R.length!==2||R[0]!=="a"||R[1]!=="b"});c.exports=function(C,N,R,H){var j=p(C),J=!f(function(){var G={};return G[j]=function(){return 7},""[C](G)!=7}),W=J&&!f(function(){var G=!1,B=/a/;return C==="split"&&(B={},B.constructor={},B.constructor[v]=function(){return B},B.flags="",B[j]=/./[j]),B.exec=function(){return G=!0,null},B[j](""),!G});if(!J||!W||C==="replace"&&!(b&&S&&!x)||C==="split"&&!D){var Y=/./[j],M=R(j,""[C],function(G,B,re,I,P){return B.exec===y?J&&!P?{done:!0,value:Y.call(B,re,I)}:{done:!0,value:G.call(re,B,I)}:{done:!1}},{REPLACE_KEEPS_$0:S,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:x}),K=M[0],k=M[1];d(String.prototype,C,K),d(RegExp.prototype,j,N==2?function(G,B){return k.call(G,this,B)}:function(G){return k.call(G,this)})}H&&m(RegExp.prototype[j],"sham",!0)}},9974:function(c,h,a){var d=a(3099);c.exports=function(f,p,y){if(d(f),p===void 0)return f;switch(y){case 0:return function(){return f.call(p)};case 1:return function(m){return f.call(p,m)};case 2:return function(m,v){return f.call(p,m,v)};case 3:return function(m,v,b){return f.call(p,m,v,b)}}return function(){return f.apply(p,arguments)}}},5005:function(c,h,a){var d=a(857),f=a(7854),p=function(y){return typeof y=="function"?y:void 0};c.exports=function(y,m){return arguments.length<2?p(d[y])||p(f[y]):d[y]&&d[y][m]||f[y]&&f[y][m]}},1246:function(c,h,a){var d=a(648),f=a(7497),p=a(5112),y=p("iterator");c.exports=function(m){if(m!=null)return m[y]||m["@@iterator"]||f[d(m)]}},8554:function(c,h,a){var d=a(9670),f=a(1246);c.exports=function(p){var y=f(p);if(typeof y!="function")throw TypeError(String(p)+" is not iterable");return d(y.call(p))}},647:function(c,h,a){var d=a(7908),f=Math.floor,p="".replace,y=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;c.exports=function(v,b,S,E,x,D){var C=S+v.length,N=E.length,R=m;return x!==void 0&&(x=d(x),R=y),p.call(D,R,function(H,j){var J;switch(j.charAt(0)){case"$":return"$";case"&":return v;case"`":return b.slice(0,S);case"'":return b.slice(C);case"<":J=x[j.slice(1,-1)];break;default:var W=+j;if(W===0)return H;if(W>N){var Y=f(W/10);return Y===0?H:Y<=N?E[Y-1]===void 0?j.charAt(1):E[Y-1]+j.charAt(1):H}J=E[W-1]}return J===void 0?"":J})}},7854:function(c,h,a){var d=function(f){return f&&f.Math==Math&&f};c.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof a.g=="object"&&a.g)||function(){return this}()||Function("return this")()},6656:function(c){var h={}.hasOwnProperty;c.exports=function(a,d){return h.call(a,d)}},3501:function(c){c.exports={}},490:function(c,h,a){var d=a(5005);c.exports=d("document","documentElement")},4664:function(c,h,a){var d=a(9781),f=a(7293),p=a(317);c.exports=!d&&!f(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(c){var h=Math.abs,a=Math.pow,d=Math.floor,f=Math.log,p=Math.LN2,y=function(v,b,S){var E=new Array(S),x=S*8-b-1,D=(1<<x)-1,C=D>>1,N=b===23?a(2,-24)-a(2,-77):0,R=v<0||v===0&&1/v<0?1:0,H=0,j,J,W;for(v=h(v),v!=v||v===Infinity?(J=v!=v?1:0,j=D):(j=d(f(v)/p),v*(W=a(2,-j))<1&&(j--,W*=2),j+C>=1?v+=N/W:v+=N*a(2,1-C),v*W>=2&&(j++,W/=2),j+C>=D?(J=0,j=D):j+C>=1?(J=(v*W-1)*a(2,b),j=j+C):(J=v*a(2,C-1)*a(2,b),j=0));b>=8;E[H++]=J&255,J/=256,b-=8);for(j=j<<b|J,x+=b;x>0;E[H++]=j&255,j/=256,x-=8);return E[--H]|=R*128,E},m=function(v,b){var S=v.length,E=S*8-b-1,x=(1<<E)-1,D=x>>1,C=E-7,N=S-1,R=v[N--],H=R&127,j;for(R>>=7;C>0;H=H*256+v[N],N--,C-=8);for(j=H&(1<<-C)-1,H>>=-C,C+=b;C>0;j=j*256+v[N],N--,C-=8);if(H===0)H=1-D;else{if(H===x)return j?NaN:R?-Infinity:Infinity;j=j+a(2,b),H=H-D}return(R?-1:1)*j*a(2,H-b)};c.exports={pack:y,unpack:m}},8361:function(c,h,a){var d=a(7293),f=a(4326),p="".split;c.exports=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(y){return f(y)=="String"?p.call(y,""):Object(y)}:Object},9587:function(c,h,a){var d=a(111),f=a(7674);c.exports=function(p,y,m){var v,b;return f&&typeof(v=y.constructor)=="function"&&v!==m&&d(b=v.prototype)&&b!==m.prototype&&f(p,b),p}},2788:function(c,h,a){var d=a(5465),f=Function.toString;typeof d.inspectSource!="function"&&(d.inspectSource=function(p){return f.call(p)}),c.exports=d.inspectSource},9909:function(c,h,a){var d=a(8536),f=a(7854),p=a(111),y=a(8880),m=a(6656),v=a(5465),b=a(6200),S=a(3501),E=f.WeakMap,x,D,C,N=function(M){return C(M)?D(M):x(M,{})},R=function(M){return function(K){var k;if(!p(K)||(k=D(K)).type!==M)throw TypeError("Incompatible receiver, "+M+" required");return k}};if(d){var H=v.state||(v.state=new E),j=H.get,J=H.has,W=H.set;x=function(M,K){return K.facade=M,W.call(H,M,K),K},D=function(M){return j.call(H,M)||{}},C=function(M){return J.call(H,M)}}else{var Y=b("state");S[Y]=!0,x=function(M,K){return K.facade=M,y(M,Y,K),K},D=function(M){return m(M,Y)?M[Y]:{}},C=function(M){return m(M,Y)}}c.exports={set:x,get:D,has:C,enforce:N,getterFor:R}},7659:function(c,h,a){var d=a(5112),f=a(7497),p=d("iterator"),y=Array.prototype;c.exports=function(m){return m!==void 0&&(f.Array===m||y[p]===m)}},3157:function(c,h,a){var d=a(4326);c.exports=Array.isArray||function(p){return d(p)=="Array"}},4705:function(c,h,a){var d=a(7293),f=/#|\.prototype\./,p=function(S,E){var x=m[y(S)];return x==b?!0:x==v?!1:typeof E=="function"?d(E):!!E},y=p.normalize=function(S){return String(S).replace(f,".").toLowerCase()},m=p.data={},v=p.NATIVE="N",b=p.POLYFILL="P";c.exports=p},111:function(c){c.exports=function(h){return typeof h=="object"?h!==null:typeof h=="function"}},1913:function(c){c.exports=!1},7850:function(c,h,a){var d=a(111),f=a(4326),p=a(5112),y=p("match");c.exports=function(m){var v;return d(m)&&((v=m[y])!==void 0?!!v:f(m)=="RegExp")}},9212:function(c,h,a){var d=a(9670);c.exports=function(f){var p=f.return;if(p!==void 0)return d(p.call(f)).value}},3383:function(c,h,a){"use strict";var d=a(7293),f=a(9518),p=a(8880),y=a(6656),m=a(5112),v=a(1913),b=m("iterator"),S=!1,E=function(){return this},x,D,C;[].keys&&(C=[].keys(),"next"in C?(D=f(f(C)),D!==Object.prototype&&(x=D)):S=!0);var N=x==null||d(function(){var R={};return x[b].call(R)!==R});N&&(x={}),(!v||N)&&!y(x,b)&&p(x,b,E),c.exports={IteratorPrototype:x,BUGGY_SAFARI_ITERATORS:S}},7497:function(c){c.exports={}},133:function(c,h,a){var d=a(7293);c.exports=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())})},590:function(c,h,a){var d=a(7293),f=a(5112),p=a(1913),y=f("iterator");c.exports=!d(function(){var m=new URL("b?a=1&b=2&c=3","http://a"),v=m.searchParams,b="";return m.pathname="c%20d",v.forEach(function(S,E){v.delete("b"),b+=E+S}),p&&!m.toJSON||!v.sort||m.href!=="http://a/c%20d?a=1&c=3"||v.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!v[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||b!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(c,h,a){var d=a(7854),f=a(2788),p=d.WeakMap;c.exports=typeof p=="function"&&/native code/.test(f(p))},1574:function(c,h,a){"use strict";var d=a(9781),f=a(7293),p=a(1956),y=a(5181),m=a(5296),v=a(7908),b=a(8361),S=Object.assign,E=Object.defineProperty;c.exports=!S||f(function(){if(d&&S({b:1},S(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var x={},D={},C=Symbol(),N="abcdefghijklmnopqrst";return x[C]=7,N.split("").forEach(function(R){D[R]=R}),S({},x)[C]!=7||p(S({},D)).join("")!=N})?function(D,C){for(var N=v(D),R=arguments.length,H=1,j=y.f,J=m.f;R>H;)for(var W=b(arguments[H++]),Y=j?p(W).concat(j(W)):p(W),M=Y.length,K=0,k;M>K;)k=Y[K++],(!d||J.call(W,k))&&(N[k]=W[k]);return N}:S},30:function(c,h,a){var d=a(9670),f=a(6048),p=a(748),y=a(3501),m=a(490),v=a(317),b=a(6200),S=">",E="<",x="prototype",D="script",C=b("IE_PROTO"),N=function(){},R=function(Y){return E+D+S+Y+E+"/"+D+S},H=function(Y){Y.write(R("")),Y.close();var M=Y.parentWindow.Object;return Y=null,M},j=function(){var Y=v("iframe"),M="java"+D+":",K;return Y.style.display="none",m.appendChild(Y),Y.src=String(M),K=Y.contentWindow.document,K.open(),K.write(R("document.F=Object")),K.close(),K.F},J,W=function(){try{J=document.domain&&new ActiveXObject("htmlfile")}catch(M){}W=J?H(J):j();for(var Y=p.length;Y--;)delete W[x][p[Y]];return W()};y[C]=!0,c.exports=Object.create||function(M,K){var k;return M!==null?(N[x]=d(M),k=new N,N[x]=null,k[C]=M):k=W(),K===void 0?k:f(k,K)}},6048:function(c,h,a){var d=a(9781),f=a(3070),p=a(9670),y=a(1956);c.exports=d?Object.defineProperties:function(v,b){p(v);for(var S=y(b),E=S.length,x=0,D;E>x;)f.f(v,D=S[x++],b[D]);return v}},3070:function(c,h,a){var d=a(9781),f=a(4664),p=a(9670),y=a(7593),m=Object.defineProperty;h.f=d?m:function(b,S,E){if(p(b),S=y(S,!0),p(E),f)try{return m(b,S,E)}catch(x){}if("get"in E||"set"in E)throw TypeError("Accessors not supported");return"value"in E&&(b[S]=E.value),b}},1236:function(c,h,a){var d=a(9781),f=a(5296),p=a(9114),y=a(5656),m=a(7593),v=a(6656),b=a(4664),S=Object.getOwnPropertyDescriptor;h.f=d?S:function(x,D){if(x=y(x),D=m(D,!0),b)try{return S(x,D)}catch(C){}if(v(x,D))return p(!f.f.call(x,D),x[D])}},8006:function(c,h,a){var d=a(6324),f=a(748),p=f.concat("length","prototype");h.f=Object.getOwnPropertyNames||function(m){return d(m,p)}},5181:function(c,h){h.f=Object.getOwnPropertySymbols},9518:function(c,h,a){var d=a(6656),f=a(7908),p=a(6200),y=a(8544),m=p("IE_PROTO"),v=Object.prototype;c.exports=y?Object.getPrototypeOf:function(b){return b=f(b),d(b,m)?b[m]:typeof b.constructor=="function"&&b instanceof b.constructor?b.constructor.prototype:b instanceof Object?v:null}},6324:function(c,h,a){var d=a(6656),f=a(5656),p=a(1318).indexOf,y=a(3501);c.exports=function(m,v){var b=f(m),S=0,E=[],x;for(x in b)!d(y,x)&&d(b,x)&&E.push(x);for(;v.length>S;)d(b,x=v[S++])&&(~p(E,x)||E.push(x));return E}},1956:function(c,h,a){var d=a(6324),f=a(748);c.exports=Object.keys||function(y){return d(y,f)}},5296:function(c,h){"use strict";var a={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,f=d&&!a.call({1:2},1);h.f=f?function(y){var m=d(this,y);return!!m&&m.enumerable}:a},7674:function(c,h,a){var d=a(9670),f=a(6077);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var p=!1,y={},m;try{m=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,m.call(y,[]),p=y instanceof Array}catch(v){}return function(b,S){return d(b),f(S),p?m.call(b,S):b.__proto__=S,b}}():void 0)},288:function(c,h,a){"use strict";var d=a(1694),f=a(648);c.exports=d?{}.toString:function(){return"[object "+f(this)+"]"}},3887:function(c,h,a){var d=a(5005),f=a(8006),p=a(5181),y=a(9670);c.exports=d("Reflect","ownKeys")||function(v){var b=f.f(y(v)),S=p.f;return S?b.concat(S(v)):b}},857:function(c,h,a){var d=a(7854);c.exports=d},2248:function(c,h,a){var d=a(1320);c.exports=function(f,p,y){for(var m in p)d(f,m,p[m],y);return f}},1320:function(c,h,a){var d=a(7854),f=a(8880),p=a(6656),y=a(3505),m=a(2788),v=a(9909),b=v.get,S=v.enforce,E=String(String).split("String");(c.exports=function(x,D,C,N){var R=N?!!N.unsafe:!1,H=N?!!N.enumerable:!1,j=N?!!N.noTargetGet:!1,J;if(typeof C=="function"&&(typeof D=="string"&&!p(C,"name")&&f(C,"name",D),J=S(C),J.source||(J.source=E.join(typeof D=="string"?D:""))),x===d){H?x[D]=C:y(D,C);return}else R?!j&&x[D]&&(H=!0):delete x[D];H?x[D]=C:f(x,D,C)})(Function.prototype,"toString",function(){return typeof this=="function"&&b(this).source||m(this)})},7651:function(c,h,a){var d=a(4326),f=a(2261);c.exports=function(p,y){var m=p.exec;if(typeof m=="function"){var v=m.call(p,y);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(d(p)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return f.call(p,y)}},2261:function(c,h,a){"use strict";var d=a(7066),f=a(2999),p=RegExp.prototype.exec,y=String.prototype.replace,m=p,v=function(){var x=/a/,D=/b*/g;return p.call(x,"a"),p.call(D,"a"),x.lastIndex!==0||D.lastIndex!==0}(),b=f.UNSUPPORTED_Y||f.BROKEN_CARET,S=/()??/.exec("")[1]!==void 0,E=v||S||b;E&&(m=function(D){var C=this,N,R,H,j,J=b&&C.sticky,W=d.call(C),Y=C.source,M=0,K=D;return J&&(W=W.replace("y",""),W.indexOf("g")===-1&&(W+="g"),K=String(D).slice(C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&D[C.lastIndex-1]!==`
`)&&(Y="(?: "+Y+")",K=" "+K,M++),R=new RegExp("^(?:"+Y+")",W)),S&&(R=new RegExp("^"+Y+"$(?!\\s)",W)),v&&(N=C.lastIndex),H=p.call(J?R:C,K),J?H?(H.input=H.input.slice(M),H[0]=H[0].slice(M),H.index=C.lastIndex,C.lastIndex+=H[0].length):C.lastIndex=0:v&&H&&(C.lastIndex=C.global?H.index+H[0].length:N),S&&H&&H.length>1&&y.call(H[0],R,function(){for(j=1;j<arguments.length-2;j++)arguments[j]===void 0&&(H[j]=void 0)}),H}),c.exports=m},7066:function(c,h,a){"use strict";var d=a(9670);c.exports=function(){var f=d(this),p="";return f.global&&(p+="g"),f.ignoreCase&&(p+="i"),f.multiline&&(p+="m"),f.dotAll&&(p+="s"),f.unicode&&(p+="u"),f.sticky&&(p+="y"),p}},2999:function(c,h,a){"use strict";var d=a(7293);function f(p,y){return RegExp(p,y)}h.UNSUPPORTED_Y=d(function(){var p=f("a","y");return p.lastIndex=2,p.exec("abcd")!=null}),h.BROKEN_CARET=d(function(){var p=f("^r","gy");return p.lastIndex=2,p.exec("str")!=null})},4488:function(c){c.exports=function(h){if(h==null)throw TypeError("Can't call method on "+h);return h}},3505:function(c,h,a){var d=a(7854),f=a(8880);c.exports=function(p,y){try{f(d,p,y)}catch(m){d[p]=y}return y}},6340:function(c,h,a){"use strict";var d=a(5005),f=a(3070),p=a(5112),y=a(9781),m=p("species");c.exports=function(v){var b=d(v),S=f.f;y&&b&&!b[m]&&S(b,m,{configurable:!0,get:function(){return this}})}},8003:function(c,h,a){var d=a(3070).f,f=a(6656),p=a(5112),y=p("toStringTag");c.exports=function(m,v,b){m&&!f(m=b?m:m.prototype,y)&&d(m,y,{configurable:!0,value:v})}},6200:function(c,h,a){var d=a(2309),f=a(9711),p=d("keys");c.exports=function(y){return p[y]||(p[y]=f(y))}},5465:function(c,h,a){var d=a(7854),f=a(3505),p="__core-js_shared__",y=d[p]||f(p,{});c.exports=y},2309:function(c,h,a){var d=a(1913),f=a(5465);(c.exports=function(p,y){return f[p]||(f[p]=y!==void 0?y:{})})("versions",[]).push({version:"3.9.0",mode:d?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(c,h,a){var d=a(9670),f=a(3099),p=a(5112),y=p("species");c.exports=function(m,v){var b=d(m).constructor,S;return b===void 0||(S=d(b)[y])==null?v:f(S)}},8710:function(c,h,a){var d=a(9958),f=a(4488),p=function(y){return function(m,v){var b=String(f(m)),S=d(v),E=b.length,x,D;return S<0||S>=E?y?"":void 0:(x=b.charCodeAt(S),x<55296||x>56319||S+1===E||(D=b.charCodeAt(S+1))<56320||D>57343?y?b.charAt(S):x:y?b.slice(S,S+2):(x-55296<<10)+(D-56320)+65536)}};c.exports={codeAt:p(!1),charAt:p(!0)}},3197:function(c){"use strict";var h=2147483647,a=36,d=1,f=26,p=38,y=700,m=72,v=128,b="-",S=/[^\0-\u007E]/,E=/[.\u3002\uFF0E\uFF61]/g,x="Overflow: input needs wider integers to process",D=a-d,C=Math.floor,N=String.fromCharCode,R=function(W){for(var Y=[],M=0,K=W.length;M<K;){var k=W.charCodeAt(M++);if(k>=55296&&k<=56319&&M<K){var G=W.charCodeAt(M++);(G&64512)==56320?Y.push(((k&1023)<<10)+(G&1023)+65536):(Y.push(k),M--)}else Y.push(k)}return Y},H=function(W){return W+22+75*(W<26)},j=function(W,Y,M){var K=0;for(W=M?C(W/y):W>>1,W+=C(W/Y);W>D*f>>1;K+=a)W=C(W/D);return C(K+(D+1)*W/(W+p))},J=function(W){var Y=[];W=R(W);var M=W.length,K=v,k=0,G=m,B,re;for(B=0;B<W.length;B++)re=W[B],re<128&&Y.push(N(re));var I=Y.length,P=I;for(I&&Y.push(b);P<M;){var le=h;for(B=0;B<W.length;B++)re=W[B],re>=K&&re<le&&(le=re);var ke=P+1;if(le-K>C((h-k)/ke))throw RangeError(x);for(k+=(le-K)*ke,K=le,B=0;B<W.length;B++){if(re=W[B],re<K&&++k>h)throw RangeError(x);if(re==K){for(var q=k,L=a;;L+=a){var xe=L<=G?d:L>=G+f?f:L-G;if(q<xe)break;var Se=q-xe,be=a-xe;Y.push(N(H(xe+Se%be))),q=C(Se/be)}Y.push(N(H(q))),G=j(k,ke,P==I),k=0,++P}}++k,++K}return Y.join("")};c.exports=function(W){var Y=[],M=W.toLowerCase().replace(E,".").split("."),K,k;for(K=0;K<M.length;K++)k=M[K],Y.push(S.test(k)?"xn--"+J(k):k);return Y.join(".")}},6091:function(c,h,a){var d=a(7293),f=a(1361),p="…";c.exports=function(y){return d(function(){return!!f[y]()||p[y]()!=p||f[y].name!==y})}},3111:function(c,h,a){var d=a(4488),f=a(1361),p="["+f+"]",y=RegExp("^"+p+p+"*"),m=RegExp(p+p+"*$"),v=function(b){return function(S){var E=String(d(S));return b&1&&(E=E.replace(y,"")),b&2&&(E=E.replace(m,"")),E}};c.exports={start:v(1),end:v(2),trim:v(3)}},1400:function(c,h,a){var d=a(9958),f=Math.max,p=Math.min;c.exports=function(y,m){var v=d(y);return v<0?f(v+m,0):p(v,m)}},7067:function(c,h,a){var d=a(9958),f=a(7466);c.exports=function(p){if(p===void 0)return 0;var y=d(p),m=f(y);if(y!==m)throw RangeError("Wrong length or index");return m}},5656:function(c,h,a){var d=a(8361),f=a(4488);c.exports=function(p){return d(f(p))}},9958:function(c){var h=Math.ceil,a=Math.floor;c.exports=function(d){return isNaN(d=+d)?0:(d>0?a:h)(d)}},7466:function(c,h,a){var d=a(9958),f=Math.min;c.exports=function(p){return p>0?f(d(p),9007199254740991):0}},7908:function(c,h,a){var d=a(4488);c.exports=function(f){return Object(d(f))}},4590:function(c,h,a){var d=a(3002);c.exports=function(f,p){var y=d(f);if(y%p)throw RangeError("Wrong offset");return y}},3002:function(c,h,a){var d=a(9958);c.exports=function(f){var p=d(f);if(p<0)throw RangeError("The argument can't be less than 0");return p}},7593:function(c,h,a){var d=a(111);c.exports=function(f,p){if(!d(f))return f;var y,m;if(p&&typeof(y=f.toString)=="function"&&!d(m=y.call(f)))return m;if(typeof(y=f.valueOf)=="function"&&!d(m=y.call(f)))return m;if(!p&&typeof(y=f.toString)=="function"&&!d(m=y.call(f)))return m;throw TypeError("Can't convert object to primitive value")}},1694:function(c,h,a){var d=a(5112),f=d("toStringTag"),p={};p[f]="z",c.exports=String(p)==="[object z]"},9843:function(c,h,a){"use strict";var d=a(2109),f=a(7854),p=a(9781),y=a(3832),m=a(260),v=a(3331),b=a(5787),S=a(9114),E=a(8880),x=a(7466),D=a(7067),C=a(4590),N=a(7593),R=a(6656),H=a(648),j=a(111),J=a(30),W=a(7674),Y=a(8006).f,M=a(7321),K=a(2092).forEach,k=a(6340),G=a(3070),B=a(1236),re=a(9909),I=a(9587),P=re.get,le=re.set,ke=G.f,q=B.f,L=Math.round,xe=f.RangeError,Se=v.ArrayBuffer,be=v.DataView,Fe=m.NATIVE_ARRAY_BUFFER_VIEWS,Xe=m.TYPED_ARRAY_TAG,nt=m.TypedArray,fe=m.TypedArrayPrototype,Ae=m.aTypedArrayConstructor,Qe=m.isTypedArray,ot="BYTES_PER_ELEMENT",ft="Wrong length",Pe=function(Ee,V){for(var he=0,ue=V.length,rt=new(Ae(Ee))(ue);ue>he;)rt[he]=V[he++];return rt},Le=function(Ee,V){ke(Ee,V,{get:function(){return P(this)[V]}})},Be=function(Ee){var V;return Ee instanceof Se||(V=H(Ee))=="ArrayBuffer"||V=="SharedArrayBuffer"},Ke=function(Ee,V){return Qe(Ee)&&typeof V!="symbol"&&V in Ee&&String(+V)==String(V)},je=function(V,he){return Ke(V,he=N(he,!0))?S(2,V[he]):q(V,he)},Ge=function(V,he,ue){return Ke(V,he=N(he,!0))&&j(ue)&&R(ue,"value")&&!R(ue,"get")&&!R(ue,"set")&&!ue.configurable&&(!R(ue,"writable")||ue.writable)&&(!R(ue,"enumerable")||ue.enumerable)?(V[he]=ue.value,V):ke(V,he,ue)};p?(Fe||(B.f=je,G.f=Ge,Le(fe,"buffer"),Le(fe,"byteOffset"),Le(fe,"byteLength"),Le(fe,"length")),d({target:"Object",stat:!0,forced:!Fe},{getOwnPropertyDescriptor:je,defineProperty:Ge}),c.exports=function(Ee,V,he){var ue=Ee.match(/\d+$/)[0]/8,rt=Ee+(he?"Clamped":"")+"Array",Ne="get"+Ee,it="set"+Ee,He=f[rt],ze=He,tt=ze&&ze.prototype,Ht={},Et=function(Ft,Je){var ht=P(Ft);return ht.view[Ne](Je*ue+ht.byteOffset,!0)},Pr=function(Ft,Je,ht){var wt=P(Ft);he&&(ht=(ht=L(ht))<0?0:ht>255?255:ht&255),wt.view[it](Je*ue+wt.byteOffset,ht,!0)},st=function(Ft,Je){ke(Ft,Je,{get:function(){return Et(this,Je)},set:function(ht){return Pr(this,Je,ht)},enumerable:!0})};Fe?y&&(ze=V(function(Ft,Je,ht,wt){return b(Ft,ze,rt),I(function(){return j(Je)?Be(Je)?wt!==void 0?new He(Je,C(ht,ue),wt):ht!==void 0?new He(Je,C(ht,ue)):new He(Je):Qe(Je)?Pe(ze,Je):M.call(ze,Je):new He(D(Je))}(),Ft,ze)}),W&&W(ze,nt),K(Y(He),function(Ft){Ft in ze||E(ze,Ft,He[Ft])}),ze.prototype=tt):(ze=V(function(Ft,Je,ht,wt){b(Ft,ze,rt);var Qt=0,Tt=0,Ot,kt,at;if(!j(Je))at=D(Je),kt=at*ue,Ot=new Se(kt);else if(Be(Je)){Ot=Je,Tt=C(ht,ue);var Cr=Je.byteLength;if(wt===void 0){if(Cr%ue)throw xe(ft);if(kt=Cr-Tt,kt<0)throw xe(ft)}else if(kt=x(wt)*ue,kt+Tt>Cr)throw xe(ft);at=kt/ue}else return Qe(Je)?Pe(ze,Je):M.call(ze,Je);for(le(Ft,{buffer:Ot,byteOffset:Tt,byteLength:kt,length:at,view:new be(Ot)});Qt<at;)st(Ft,Qt++)}),W&&W(ze,nt),tt=ze.prototype=J(fe)),tt.constructor!==ze&&E(tt,"constructor",ze),Xe&&E(tt,Xe,rt),Ht[rt]=ze,d({global:!0,forced:ze!=He,sham:!Fe},Ht),ot in ze||E(ze,ot,ue),ot in tt||E(tt,ot,ue),k(rt)}):c.exports=function(){}},3832:function(c,h,a){var d=a(7854),f=a(7293),p=a(7072),y=a(260).NATIVE_ARRAY_BUFFER_VIEWS,m=d.ArrayBuffer,v=d.Int8Array;c.exports=!y||!f(function(){v(1)})||!f(function(){new v(-1)})||!p(function(b){new v,new v(null),new v(1.5),new v(b)},!0)||f(function(){return new v(new m(2),1,void 0).length!==1})},3074:function(c,h,a){var d=a(260).aTypedArrayConstructor,f=a(6707);c.exports=function(p,y){for(var m=f(p,p.constructor),v=0,b=y.length,S=new(d(m))(b);b>v;)S[v]=y[v++];return S}},7321:function(c,h,a){var d=a(7908),f=a(7466),p=a(1246),y=a(7659),m=a(9974),v=a(260).aTypedArrayConstructor;c.exports=function(S){var E=d(S),x=arguments.length,D=x>1?arguments[1]:void 0,C=D!==void 0,N=p(E),R,H,j,J,W,Y;if(N!=null&&!y(N))for(W=N.call(E),Y=W.next,E=[];!(J=Y.call(W)).done;)E.push(J.value);for(C&&x>2&&(D=m(D,arguments[2],2)),H=f(E.length),j=new(v(this))(H),R=0;H>R;R++)j[R]=C?D(E[R],R):E[R];return j}},9711:function(c){var h=0,a=Math.random();c.exports=function(d){return"Symbol("+String(d===void 0?"":d)+")_"+(++h+a).toString(36)}},3307:function(c,h,a){var d=a(133);c.exports=d&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},5112:function(c,h,a){var d=a(7854),f=a(2309),p=a(6656),y=a(9711),m=a(133),v=a(3307),b=f("wks"),S=d.Symbol,E=v?S:S&&S.withoutSetter||y;c.exports=function(x){return p(b,x)||(m&&p(S,x)?b[x]=S[x]:b[x]=E("Symbol."+x)),b[x]}},1361:function(c){c.exports=`
\v\f\r    \u2028\u2029`},8264:function(c,h,a){"use strict";var d=a(2109),f=a(7854),p=a(3331),y=a(6340),m="ArrayBuffer",v=p[m],b=f[m];d({global:!0,forced:b!==v},{ArrayBuffer:v}),y(m)},2222:function(c,h,a){"use strict";var d=a(2109),f=a(7293),p=a(3157),y=a(111),m=a(7908),v=a(7466),b=a(6135),S=a(5417),E=a(1194),x=a(5112),D=a(7392),C=x("isConcatSpreadable"),N=9007199254740991,R="Maximum allowed index exceeded",H=D>=51||!f(function(){var Y=[];return Y[C]=!1,Y.concat()[0]!==Y}),j=E("concat"),J=function(Y){if(!y(Y))return!1;var M=Y[C];return M!==void 0?!!M:p(Y)},W=!H||!j;d({target:"Array",proto:!0,forced:W},{concat:function(M){var K=m(this),k=S(K,0),G=0,B,re,I,P,le;for(B=-1,I=arguments.length;B<I;B++)if(le=B===-1?K:arguments[B],J(le)){if(P=v(le.length),G+P>N)throw TypeError(R);for(re=0;re<P;re++,G++)re in le&&b(k,G,le[re])}else{if(G>=N)throw TypeError(R);b(k,G++,le)}return k.length=G,k}})},7327:function(c,h,a){"use strict";var d=a(2109),f=a(2092).filter,p=a(1194),y=p("filter");d({target:"Array",proto:!0,forced:!y},{filter:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},2772:function(c,h,a){"use strict";var d=a(2109),f=a(1318).indexOf,p=a(9341),y=[].indexOf,m=!!y&&1/[1].indexOf(1,-0)<0,v=p("indexOf");d({target:"Array",proto:!0,forced:m||!v},{indexOf:function(S){return m?y.apply(this,arguments)||0:f(this,S,arguments.length>1?arguments[1]:void 0)}})},6992:function(c,h,a){"use strict";var d=a(5656),f=a(1223),p=a(7497),y=a(9909),m=a(654),v="Array Iterator",b=y.set,S=y.getterFor(v);c.exports=m(Array,"Array",function(E,x){b(this,{type:v,target:d(E),index:0,kind:x})},function(){var E=S(this),x=E.target,D=E.kind,C=E.index++;return!x||C>=x.length?(E.target=void 0,{value:void 0,done:!0}):D=="keys"?{value:C,done:!1}:D=="values"?{value:x[C],done:!1}:{value:[C,x[C]],done:!1}},"values"),p.Arguments=p.Array,f("keys"),f("values"),f("entries")},1249:function(c,h,a){"use strict";var d=a(2109),f=a(2092).map,p=a(1194),y=p("map");d({target:"Array",proto:!0,forced:!y},{map:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},7042:function(c,h,a){"use strict";var d=a(2109),f=a(111),p=a(3157),y=a(1400),m=a(7466),v=a(5656),b=a(6135),S=a(5112),E=a(1194),x=E("slice"),D=S("species"),C=[].slice,N=Math.max;d({target:"Array",proto:!0,forced:!x},{slice:function(H,j){var J=v(this),W=m(J.length),Y=y(H,W),M=y(j===void 0?W:j,W),K,k,G;if(p(J)&&(K=J.constructor,typeof K=="function"&&(K===Array||p(K.prototype))?K=void 0:f(K)&&(K=K[D],K===null&&(K=void 0)),K===Array||K===void 0))return C.call(J,Y,M);for(k=new(K===void 0?Array:K)(N(M-Y,0)),G=0;Y<M;Y++,G++)Y in J&&b(k,G,J[Y]);return k.length=G,k}})},561:function(c,h,a){"use strict";var d=a(2109),f=a(1400),p=a(9958),y=a(7466),m=a(7908),v=a(5417),b=a(6135),S=a(1194),E=S("splice"),x=Math.max,D=Math.min,C=9007199254740991,N="Maximum allowed length exceeded";d({target:"Array",proto:!0,forced:!E},{splice:function(H,j){var J=m(this),W=y(J.length),Y=f(H,W),M=arguments.length,K,k,G,B,re,I;if(M===0?K=k=0:M===1?(K=0,k=W-Y):(K=M-2,k=D(x(p(j),0),W-Y)),W+K-k>C)throw TypeError(N);for(G=v(J,k),B=0;B<k;B++)re=Y+B,re in J&&b(G,B,J[re]);if(G.length=k,K<k){for(B=Y;B<W-k;B++)re=B+k,I=B+K,re in J?J[I]=J[re]:delete J[I];for(B=W;B>W-k+K;B--)delete J[B-1]}else if(K>k)for(B=W-k;B>Y;B--)re=B+k-1,I=B+K-1,re in J?J[I]=J[re]:delete J[I];for(B=0;B<K;B++)J[B+Y]=arguments[B+2];return J.length=W-k+K,G}})},8309:function(c,h,a){var d=a(9781),f=a(3070).f,p=Function.prototype,y=p.toString,m=/^\s*function ([^ (]*)/,v="name";d&&!(v in p)&&f(p,v,{configurable:!0,get:function(){try{return y.call(this).match(m)[1]}catch(b){return""}}})},489:function(c,h,a){var d=a(2109),f=a(7293),p=a(7908),y=a(9518),m=a(8544),v=f(function(){y(1)});d({target:"Object",stat:!0,forced:v,sham:!m},{getPrototypeOf:function(S){return y(p(S))}})},1539:function(c,h,a){var d=a(1694),f=a(1320),p=a(288);d||f(Object.prototype,"toString",p,{unsafe:!0})},4916:function(c,h,a){"use strict";var d=a(2109),f=a(2261);d({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},9714:function(c,h,a){"use strict";var d=a(1320),f=a(9670),p=a(7293),y=a(7066),m="toString",v=RegExp.prototype,b=v[m],S=p(function(){return b.call({source:"a",flags:"b"})!="/a/b"}),E=b.name!=m;(S||E)&&d(RegExp.prototype,m,function(){var D=f(this),C=String(D.source),N=D.flags,R=String(N===void 0&&D instanceof RegExp&&!("flags"in v)?y.call(D):N);return"/"+C+"/"+R},{unsafe:!0})},8783:function(c,h,a){"use strict";var d=a(8710).charAt,f=a(9909),p=a(654),y="String Iterator",m=f.set,v=f.getterFor(y);p(String,"String",function(b){m(this,{type:y,string:String(b),index:0})},function(){var S=v(this),E=S.string,x=S.index,D;return x>=E.length?{value:void 0,done:!0}:(D=d(E,x),S.index+=D.length,{value:D,done:!1})})},4723:function(c,h,a){"use strict";var d=a(7007),f=a(9670),p=a(7466),y=a(4488),m=a(1530),v=a(7651);d("match",1,function(b,S,E){return[function(D){var C=y(this),N=D==null?void 0:D[b];return N!==void 0?N.call(D,C):new RegExp(D)[b](String(C))},function(x){var D=E(S,x,this);if(D.done)return D.value;var C=f(x),N=String(this);if(!C.global)return v(C,N);var R=C.unicode;C.lastIndex=0;for(var H=[],j=0,J;(J=v(C,N))!==null;){var W=String(J[0]);H[j]=W,W===""&&(C.lastIndex=m(N,p(C.lastIndex),R)),j++}return j===0?null:H}]})},5306:function(c,h,a){"use strict";var d=a(7007),f=a(9670),p=a(7466),y=a(9958),m=a(4488),v=a(1530),b=a(647),S=a(7651),E=Math.max,x=Math.min,D=function(C){return C===void 0?C:String(C)};d("replace",2,function(C,N,R,H){var j=H.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,J=H.REPLACE_KEEPS_$0,W=j?"$":"$0";return[function(M,K){var k=m(this),G=M==null?void 0:M[C];return G!==void 0?G.call(M,k,K):N.call(String(k),M,K)},function(Y,M){if(!j&&J||typeof M=="string"&&M.indexOf(W)===-1){var K=R(N,Y,this,M);if(K.done)return K.value}var k=f(Y),G=String(this),B=typeof M=="function";B||(M=String(M));var re=k.global;if(re){var I=k.unicode;k.lastIndex=0}for(var P=[];;){var le=S(k,G);if(le===null)break;if(P.push(le),!re)break;var ke=String(le[0]);ke===""&&(k.lastIndex=v(G,p(k.lastIndex),I))}for(var q="",L=0,xe=0;xe<P.length;xe++){le=P[xe];for(var Se=String(le[0]),be=E(x(y(le.index),G.length),0),Fe=[],Xe=1;Xe<le.length;Xe++)Fe.push(D(le[Xe]));var nt=le.groups;if(B){var fe=[Se].concat(Fe,be,G);nt!==void 0&&fe.push(nt);var Ae=String(M.apply(void 0,fe))}else Ae=b(Se,G,be,Fe,nt,M);be>=L&&(q+=G.slice(L,be)+Ae,L=be+Se.length)}return q+G.slice(L)}]})},3123:function(c,h,a){"use strict";var d=a(7007),f=a(7850),p=a(9670),y=a(4488),m=a(6707),v=a(1530),b=a(7466),S=a(7651),E=a(2261),x=a(7293),D=[].push,C=Math.min,N=4294967295,R=!x(function(){return!RegExp(N,"y")});d("split",2,function(H,j,J){var W;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?W=function(Y,M){var K=String(y(this)),k=M===void 0?N:M>>>0;if(k===0)return[];if(Y===void 0)return[K];if(!f(Y))return j.call(K,Y,k);for(var G=[],B=(Y.ignoreCase?"i":"")+(Y.multiline?"m":"")+(Y.unicode?"u":"")+(Y.sticky?"y":""),re=0,I=new RegExp(Y.source,B+"g"),P,le,ke;(P=E.call(I,K))&&!(le=I.lastIndex,le>re&&(G.push(K.slice(re,P.index)),P.length>1&&P.index<K.length&&D.apply(G,P.slice(1)),ke=P[0].length,re=le,G.length>=k));)I.lastIndex===P.index&&I.lastIndex++;return re===K.length?(ke||!I.test(""))&&G.push(""):G.push(K.slice(re)),G.length>k?G.slice(0,k):G}:"0".split(void 0,0).length?W=function(Y,M){return Y===void 0&&M===0?[]:j.call(this,Y,M)}:W=j,[function(M,K){var k=y(this),G=M==null?void 0:M[H];return G!==void 0?G.call(M,k,K):W.call(String(k),M,K)},function(Y,M){var K=J(W,Y,this,M,W!==j);if(K.done)return K.value;var k=p(Y),G=String(this),B=m(k,RegExp),re=k.unicode,I=(k.ignoreCase?"i":"")+(k.multiline?"m":"")+(k.unicode?"u":"")+(R?"y":"g"),P=new B(R?k:"^(?:"+k.source+")",I),le=M===void 0?N:M>>>0;if(le===0)return[];if(G.length===0)return S(P,G)===null?[G]:[];for(var ke=0,q=0,L=[];q<G.length;){P.lastIndex=R?q:0;var xe=S(P,R?G:G.slice(q)),Se;if(xe===null||(Se=C(b(P.lastIndex+(R?0:q)),G.length))===ke)q=v(G,q,re);else{if(L.push(G.slice(ke,q)),L.length===le)return L;for(var be=1;be<=xe.length-1;be++)if(L.push(xe[be]),L.length===le)return L;q=ke=Se}}return L.push(G.slice(ke)),L}]},!R)},3210:function(c,h,a){"use strict";var d=a(2109),f=a(3111).trim,p=a(6091);d({target:"String",proto:!0,forced:p("trim")},{trim:function(){return f(this)}})},2990:function(c,h,a){"use strict";var d=a(260),f=a(1048),p=d.aTypedArray,y=d.exportTypedArrayMethod;y("copyWithin",function(v,b){return f.call(p(this),v,b,arguments.length>2?arguments[2]:void 0)})},8927:function(c,h,a){"use strict";var d=a(260),f=a(2092).every,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("every",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},3105:function(c,h,a){"use strict";var d=a(260),f=a(1285),p=d.aTypedArray,y=d.exportTypedArrayMethod;y("fill",function(v){return f.apply(p(this),arguments)})},5035:function(c,h,a){"use strict";var d=a(260),f=a(2092).filter,p=a(3074),y=d.aTypedArray,m=d.exportTypedArrayMethod;m("filter",function(b){var S=f(y(this),b,arguments.length>1?arguments[1]:void 0);return p(this,S)})},7174:function(c,h,a){"use strict";var d=a(260),f=a(2092).findIndex,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("findIndex",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},4345:function(c,h,a){"use strict";var d=a(260),f=a(2092).find,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("find",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},2846:function(c,h,a){"use strict";var d=a(260),f=a(2092).forEach,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("forEach",function(v){f(p(this),v,arguments.length>1?arguments[1]:void 0)})},4731:function(c,h,a){"use strict";var d=a(260),f=a(1318).includes,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("includes",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},7209:function(c,h,a){"use strict";var d=a(260),f=a(1318).indexOf,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("indexOf",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},6319:function(c,h,a){"use strict";var d=a(7854),f=a(260),p=a(6992),y=a(5112),m=y("iterator"),v=d.Uint8Array,b=p.values,S=p.keys,E=p.entries,x=f.aTypedArray,D=f.exportTypedArrayMethod,C=v&&v.prototype[m],N=!!C&&(C.name=="values"||C.name==null),R=function(){return b.call(x(this))};D("entries",function(){return E.call(x(this))}),D("keys",function(){return S.call(x(this))}),D("values",R,!N),D(m,R,!N)},8867:function(c,h,a){"use strict";var d=a(260),f=d.aTypedArray,p=d.exportTypedArrayMethod,y=[].join;p("join",function(v){return y.apply(f(this),arguments)})},7789:function(c,h,a){"use strict";var d=a(260),f=a(6583),p=d.aTypedArray,y=d.exportTypedArrayMethod;y("lastIndexOf",function(v){return f.apply(p(this),arguments)})},3739:function(c,h,a){"use strict";var d=a(260),f=a(2092).map,p=a(6707),y=d.aTypedArray,m=d.aTypedArrayConstructor,v=d.exportTypedArrayMethod;v("map",function(S){return f(y(this),S,arguments.length>1?arguments[1]:void 0,function(E,x){return new(m(p(E,E.constructor)))(x)})})},4483:function(c,h,a){"use strict";var d=a(260),f=a(3671).right,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("reduceRight",function(v){return f(p(this),v,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(c,h,a){"use strict";var d=a(260),f=a(3671).left,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("reduce",function(v){return f(p(this),v,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(c,h,a){"use strict";var d=a(260),f=d.aTypedArray,p=d.exportTypedArrayMethod,y=Math.floor;p("reverse",function(){for(var v=this,b=f(v).length,S=y(b/2),E=0,x;E<S;)x=v[E],v[E++]=v[--b],v[b]=x;return v})},3462:function(c,h,a){"use strict";var d=a(260),f=a(7466),p=a(4590),y=a(7908),m=a(7293),v=d.aTypedArray,b=d.exportTypedArrayMethod,S=m(function(){new Int8Array(1).set({})});b("set",function(x){v(this);var D=p(arguments.length>1?arguments[1]:void 0,1),C=this.length,N=y(x),R=f(N.length),H=0;if(R+D>C)throw RangeError("Wrong length");for(;H<R;)this[D+H]=N[H++]},S)},678:function(c,h,a){"use strict";var d=a(260),f=a(6707),p=a(7293),y=d.aTypedArray,m=d.aTypedArrayConstructor,v=d.exportTypedArrayMethod,b=[].slice,S=p(function(){new Int8Array(1).slice()});v("slice",function(x,D){for(var C=b.call(y(this),x,D),N=f(this,this.constructor),R=0,H=C.length,j=new(m(N))(H);H>R;)j[R]=C[R++];return j},S)},7462:function(c,h,a){"use strict";var d=a(260),f=a(2092).some,p=d.aTypedArray,y=d.exportTypedArrayMethod;y("some",function(v){return f(p(this),v,arguments.length>1?arguments[1]:void 0)})},3824:function(c,h,a){"use strict";var d=a(260),f=d.aTypedArray,p=d.exportTypedArrayMethod,y=[].sort;p("sort",function(v){return y.call(f(this),v)})},5021:function(c,h,a){"use strict";var d=a(260),f=a(7466),p=a(1400),y=a(6707),m=d.aTypedArray,v=d.exportTypedArrayMethod;v("subarray",function(S,E){var x=m(this),D=x.length,C=p(S,D);return new(y(x,x.constructor))(x.buffer,x.byteOffset+C*x.BYTES_PER_ELEMENT,f((E===void 0?D:p(E,D))-C))})},2974:function(c,h,a){"use strict";var d=a(7854),f=a(260),p=a(7293),y=d.Int8Array,m=f.aTypedArray,v=f.exportTypedArrayMethod,b=[].toLocaleString,S=[].slice,E=!!y&&p(function(){b.call(new y(1))}),x=p(function(){return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!p(function(){y.prototype.toLocaleString.call([1,2])});v("toLocaleString",function(){return b.apply(E?S.call(m(this)):m(this),arguments)},x)},5016:function(c,h,a){"use strict";var d=a(260).exportTypedArrayMethod,f=a(7293),p=a(7854),y=p.Uint8Array,m=y&&y.prototype||{},v=[].toString,b=[].join;f(function(){v.call({})})&&(v=function(){return b.call(this)});var S=m.toString!=v;d("toString",v,S)},2472:function(c,h,a){var d=a(9843);d("Uint8",function(f){return function(y,m,v){return f(this,y,m,v)}})},4747:function(c,h,a){var d=a(7854),f=a(8324),p=a(8533),y=a(8880);for(var m in f){var v=d[m],b=v&&v.prototype;if(b&&b.forEach!==p)try{y(b,"forEach",p)}catch(S){b.forEach=p}}},3948:function(c,h,a){var d=a(7854),f=a(8324),p=a(6992),y=a(8880),m=a(5112),v=m("iterator"),b=m("toStringTag"),S=p.values;for(var E in f){var x=d[E],D=x&&x.prototype;if(D){if(D[v]!==S)try{y(D,v,S)}catch(N){D[v]=S}if(D[b]||y(D,b,E),f[E]){for(var C in p)if(D[C]!==p[C])try{y(D,C,p[C])}catch(N){D[C]=p[C]}}}}},1637:function(c,h,a){"use strict";a(6992);var d=a(2109),f=a(5005),p=a(590),y=a(1320),m=a(2248),v=a(8003),b=a(4994),S=a(9909),E=a(5787),x=a(6656),D=a(9974),C=a(648),N=a(9670),R=a(111),H=a(30),j=a(9114),J=a(8554),W=a(1246),Y=a(5112),M=f("fetch"),K=f("Headers"),k=Y("iterator"),G="URLSearchParams",B=G+"Iterator",re=S.set,I=S.getterFor(G),P=S.getterFor(B),le=/\+/g,ke=Array(4),q=function(Pe){return ke[Pe-1]||(ke[Pe-1]=RegExp("((?:%[\\da-f]{2}){"+Pe+"})","gi"))},L=function(Pe){try{return decodeURIComponent(Pe)}catch(Le){return Pe}},xe=function(Pe){var Le=Pe.replace(le," "),Be=4;try{return decodeURIComponent(Le)}catch(Ke){for(;Be;)Le=Le.replace(q(Be--),L);return Le}},Se=/[!'()~]|%20/g,be={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Fe=function(Pe){return be[Pe]},Xe=function(Pe){return encodeURIComponent(Pe).replace(Se,Fe)},nt=function(Pe,Le){if(Le)for(var Be=Le.split("&"),Ke=0,je,Ge;Ke<Be.length;)je=Be[Ke++],je.length&&(Ge=je.split("="),Pe.push({key:xe(Ge.shift()),value:xe(Ge.join("="))}))},fe=function(Pe){this.entries.length=0,nt(this.entries,Pe)},Ae=function(Pe,Le){if(Pe<Le)throw TypeError("Not enough arguments")},Qe=b(function(Le,Be){re(this,{type:B,iterator:J(I(Le).entries),kind:Be})},"Iterator",function(){var Le=P(this),Be=Le.kind,Ke=Le.iterator.next(),je=Ke.value;return Ke.done||(Ke.value=Be==="keys"?je.key:Be==="values"?je.value:[je.key,je.value]),Ke}),ot=function(){E(this,ot,G);var Le=arguments.length>0?arguments[0]:void 0,Be=this,Ke=[],je,Ge,Ee,V,he,ue,rt,Ne,it;if(re(Be,{type:G,entries:Ke,updateURL:function(){},updateSearchParams:fe}),Le!==void 0)if(R(Le))if(je=W(Le),typeof je=="function")for(Ge=je.call(Le),Ee=Ge.next;!(V=Ee.call(Ge)).done;){if(he=J(N(V.value)),ue=he.next,(rt=ue.call(he)).done||(Ne=ue.call(he)).done||!ue.call(he).done)throw TypeError("Expected sequence with length 2");Ke.push({key:rt.value+"",value:Ne.value+""})}else for(it in Le)x(Le,it)&&Ke.push({key:it,value:Le[it]+""});else nt(Ke,typeof Le=="string"?Le.charAt(0)==="?"?Le.slice(1):Le:Le+"")},ft=ot.prototype;m(ft,{append:function(Le,Be){Ae(arguments.length,2);var Ke=I(this);Ke.entries.push({key:Le+"",value:Be+""}),Ke.updateURL()},delete:function(Pe){Ae(arguments.length,1);for(var Le=I(this),Be=Le.entries,Ke=Pe+"",je=0;je<Be.length;)Be[je].key===Ke?Be.splice(je,1):je++;Le.updateURL()},get:function(Le){Ae(arguments.length,1);for(var Be=I(this).entries,Ke=Le+"",je=0;je<Be.length;je++)if(Be[je].key===Ke)return Be[je].value;return null},getAll:function(Le){Ae(arguments.length,1);for(var Be=I(this).entries,Ke=Le+"",je=[],Ge=0;Ge<Be.length;Ge++)Be[Ge].key===Ke&&je.push(Be[Ge].value);return je},has:function(Le){Ae(arguments.length,1);for(var Be=I(this).entries,Ke=Le+"",je=0;je<Be.length;)if(Be[je++].key===Ke)return!0;return!1},set:function(Le,Be){Ae(arguments.length,1);for(var Ke=I(this),je=Ke.entries,Ge=!1,Ee=Le+"",V=Be+"",he=0,ue;he<je.length;he++)ue=je[he],ue.key===Ee&&(Ge?je.splice(he--,1):(Ge=!0,ue.value=V));Ge||je.push({key:Ee,value:V}),Ke.updateURL()},sort:function(){var Le=I(this),Be=Le.entries,Ke=Be.slice(),je,Ge,Ee;for(Be.length=0,Ee=0;Ee<Ke.length;Ee++){for(je=Ke[Ee],Ge=0;Ge<Ee;Ge++)if(Be[Ge].key>je.key){Be.splice(Ge,0,je);break}Ge===Ee&&Be.push(je)}Le.updateURL()},forEach:function(Le){for(var Be=I(this).entries,Ke=D(Le,arguments.length>1?arguments[1]:void 0,3),je=0,Ge;je<Be.length;)Ge=Be[je++],Ke(Ge.value,Ge.key,this)},keys:function(){return new Qe(this,"keys")},values:function(){return new Qe(this,"values")},entries:function(){return new Qe(this,"entries")}},{enumerable:!0}),y(ft,k,ft.entries),y(ft,"toString",function(){for(var Le=I(this).entries,Be=[],Ke=0,je;Ke<Le.length;)je=Le[Ke++],Be.push(Xe(je.key)+"="+Xe(je.value));return Be.join("&")},{enumerable:!0}),v(ot,G),d({global:!0,forced:!p},{URLSearchParams:ot}),!p&&typeof M=="function"&&typeof K=="function"&&d({global:!0,enumerable:!0,forced:!0},{fetch:function(Le){var Be=[Le],Ke,je,Ge;return arguments.length>1&&(Ke=arguments[1],R(Ke)&&(je=Ke.body,C(je)===G&&(Ge=Ke.headers?new K(Ke.headers):new K,Ge.has("content-type")||Ge.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ke=H(Ke,{body:j(0,String(je)),headers:j(0,Ge)}))),Be.push(Ke)),M.apply(this,Be)}}),c.exports={URLSearchParams:ot,getState:I}},285:function(c,h,a){"use strict";a(8783);var d=a(2109),f=a(9781),p=a(590),y=a(7854),m=a(6048),v=a(1320),b=a(5787),S=a(6656),E=a(1574),x=a(8457),D=a(8710).codeAt,C=a(3197),N=a(8003),R=a(1637),H=a(9909),j=y.URL,J=R.URLSearchParams,W=R.getState,Y=H.set,M=H.getterFor("URL"),K=Math.floor,k=Math.pow,G="Invalid authority",B="Invalid scheme",re="Invalid host",I="Invalid port",P=/[A-Za-z]/,le=/[\d+-.A-Za-z]/,ke=/\d/,q=/^(0x|0X)/,L=/^[0-7]+$/,xe=/^\d+$/,Se=/^[\dA-Fa-f]+$/,be=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,Fe=/[\u0000\t\u000A\u000D #/:?@[\\]]/,Xe=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,nt=/[\t\u000A\u000D]/g,fe,Ae=function(U,ae){var ve,Ce,Ie;if(ae.charAt(0)=="["){if(ae.charAt(ae.length-1)!="]")return re;if(ve=ot(ae.slice(1,-1)),!ve)return re;U.host=ve}else if(V(U)){if(ae=C(ae),be.test(ae))return re;if(ve=Qe(ae),ve===null)return re;U.host=ve}else{if(Fe.test(ae))return re;for(ve="",Ce=x(ae),Ie=0;Ie<Ce.length;Ie++)ve+=Ge(Ce[Ie],Le);U.host=ve}},Qe=function(U){var ae=U.split("."),ve,Ce,Ie,We,Ve,F,X;if(ae.length&&ae[ae.length-1]==""&&ae.pop(),ve=ae.length,ve>4)return U;for(Ce=[],Ie=0;Ie<ve;Ie++){if(We=ae[Ie],We=="")return U;if(Ve=10,We.length>1&&We.charAt(0)=="0"&&(Ve=q.test(We)?16:8,We=We.slice(Ve==8?1:2)),We==="")F=0;else{if(!(Ve==10?xe:Ve==8?L:Se).test(We))return U;F=parseInt(We,Ve)}Ce.push(F)}for(Ie=0;Ie<ve;Ie++)if(F=Ce[Ie],Ie==ve-1){if(F>=k(256,5-ve))return null}else if(F>255)return null;for(X=Ce.pop(),Ie=0;Ie<Ce.length;Ie++)X+=Ce[Ie]*k(256,3-Ie);return X},ot=function(U){var ae=[0,0,0,0,0,0,0,0],ve=0,Ce=null,Ie=0,We,Ve,F,X,ee,pe,ge,lt=function(){return U.charAt(Ie)};if(lt()==":"){if(U.charAt(1)!=":")return;Ie+=2,ve++,Ce=ve}for(;lt();){if(ve==8)return;if(lt()==":"){if(Ce!==null)return;Ie++,ve++,Ce=ve;continue}for(We=Ve=0;Ve<4&&Se.test(lt());)We=We*16+parseInt(lt(),16),Ie++,Ve++;if(lt()=="."){if(Ve==0)return;if(Ie-=Ve,ve>6)return;for(F=0;lt();){if(X=null,F>0)if(lt()=="."&&F<4)Ie++;else return;if(!ke.test(lt()))return;for(;ke.test(lt());){if(ee=parseInt(lt(),10),X===null)X=ee;else{if(X==0)return;X=X*10+ee}if(X>255)return;Ie++}ae[ve]=ae[ve]*256+X,F++,(F==2||F==4)&&ve++}if(F!=4)return;break}else if(lt()==":"){if(Ie++,!lt())return}else if(lt())return;ae[ve++]=We}if(Ce!==null)for(pe=ve-Ce,ve=7;ve!=0&&pe>0;)ge=ae[ve],ae[ve--]=ae[Ce+pe-1],ae[Ce+--pe]=ge;else if(ve!=8)return;return ae},ft=function(U){for(var ae=null,ve=1,Ce=null,Ie=0,We=0;We<8;We++)U[We]!==0?(Ie>ve&&(ae=Ce,ve=Ie),Ce=null,Ie=0):(Ce===null&&(Ce=We),++Ie);return Ie>ve&&(ae=Ce,ve=Ie),ae},Pe=function(U){var ae,ve,Ce,Ie;if(typeof U=="number"){for(ae=[],ve=0;ve<4;ve++)ae.unshift(U%256),U=K(U/256);return ae.join(".")}else if(typeof U=="object"){for(ae="",Ce=ft(U),ve=0;ve<8;ve++){if(Ie&&U[ve]===0)continue;Ie&&(Ie=!1),Ce===ve?(ae+=ve?":":"::",Ie=!0):(ae+=U[ve].toString(16),ve<7&&(ae+=":"))}return"["+ae+"]"}return U},Le={},Be=E({},Le,{" ":1,'"':1,"<":1,">":1,"`":1}),Ke=E({},Be,{"#":1,"?":1,"{":1,"}":1}),je=E({},Ke,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ge=function(U,ae){var ve=D(U,0);return ve>32&&ve<127&&!S(ae,U)?U:encodeURIComponent(U)},Ee={ftp:21,file:null,http:80,https:443,ws:80,wss:443},V=function(U){return S(Ee,U.scheme)},he=function(U){return U.username!=""||U.password!=""},ue=function(U){return!U.host||U.cannotBeABaseURL||U.scheme=="file"},rt=function(U,ae){var ve;return U.length==2&&P.test(U.charAt(0))&&((ve=U.charAt(1))==":"||!ae&&ve=="|")},Ne=function(U){var ae;return U.length>1&&rt(U.slice(0,2))&&(U.length==2||((ae=U.charAt(2))==="/"||ae==="\\"||ae==="?")||ae==="#")},it=function(U){var ae=U.path,ve=ae.length;ve&&(U.scheme!="file"||ve!=1||!rt(ae[0],!0))&&ae.pop()},He=function(U){return U==="."||U.toLowerCase()==="%2e"},ze=function(U){return U=U.toLowerCase(),U===".."||U==="%2e."||U===".%2e"||U==="%2e%2e"},tt={},Ht={},Et={},Pr={},st={},Ft={},Je={},ht={},wt={},Qt={},Tt={},Ot={},kt={},at={},Cr={},vr={},Nt={},or={},rn={},Wt={},yr={},Jt=function(U,ae,ve,Ce){var Ie=ve||tt,We=0,Ve="",F=!1,X=!1,ee=!1,pe,ge,lt,vt;for(ve||(U.scheme="",U.username="",U.password="",U.host=null,U.port=null,U.path=[],U.query=null,U.fragment=null,U.cannotBeABaseURL=!1,ae=ae.replace(Xe,"")),ae=ae.replace(nt,""),pe=x(ae);We<=pe.length;){ge=pe[We];switch(Ie){case tt:if(ge&&P.test(ge))Ve+=ge.toLowerCase(),Ie=Ht;else{if(ve)return B;Ie=Et;continue}break;case Ht:if(ge&&(le.test(ge)||ge=="+"||ge=="-"||ge=="."))Ve+=ge.toLowerCase();else if(ge==":"){if(ve&&(V(U)!=S(Ee,Ve)||Ve=="file"&&(he(U)||U.port!==null)||U.scheme=="file"&&!U.host))return;if(U.scheme=Ve,ve){V(U)&&Ee[U.scheme]==U.port&&(U.port=null);return}Ve="",U.scheme=="file"?Ie=at:V(U)&&Ce&&Ce.scheme==U.scheme?Ie=Pr:V(U)?Ie=ht:pe[We+1]=="/"?(Ie=st,We++):(U.cannotBeABaseURL=!0,U.path.push(""),Ie=rn)}else{if(ve)return B;Ve="",Ie=Et,We=0;continue}break;case Et:if(!Ce||Ce.cannotBeABaseURL&&ge!="#")return B;if(Ce.cannotBeABaseURL&&ge=="#"){U.scheme=Ce.scheme,U.path=Ce.path.slice(),U.query=Ce.query,U.fragment="",U.cannotBeABaseURL=!0,Ie=yr;break}Ie=Ce.scheme=="file"?at:Ft;continue;case Pr:if(ge=="/"&&pe[We+1]=="/")Ie=wt,We++;else{Ie=Ft;continue}break;case st:if(ge=="/"){Ie=Qt;break}else{Ie=or;continue}case Ft:if(U.scheme=Ce.scheme,ge==fe)U.username=Ce.username,U.password=Ce.password,U.host=Ce.host,U.port=Ce.port,U.path=Ce.path.slice(),U.query=Ce.query;else if(ge=="/"||ge=="\\"&&V(U))Ie=Je;else if(ge=="?")U.username=Ce.username,U.password=Ce.password,U.host=Ce.host,U.port=Ce.port,U.path=Ce.path.slice(),U.query="",Ie=Wt;else if(ge=="#")U.username=Ce.username,U.password=Ce.password,U.host=Ce.host,U.port=Ce.port,U.path=Ce.path.slice(),U.query=Ce.query,U.fragment="",Ie=yr;else{U.username=Ce.username,U.password=Ce.password,U.host=Ce.host,U.port=Ce.port,U.path=Ce.path.slice(),U.path.pop(),Ie=or;continue}break;case Je:if(V(U)&&(ge=="/"||ge=="\\"))Ie=wt;else if(ge=="/")Ie=Qt;else{U.username=Ce.username,U.password=Ce.password,U.host=Ce.host,U.port=Ce.port,Ie=or;continue}break;case ht:if(Ie=wt,ge!="/"||Ve.charAt(We+1)!="/")continue;We++;break;case wt:if(ge!="/"&&ge!="\\"){Ie=Qt;continue}break;case Qt:if(ge=="@"){F&&(Ve="%40"+Ve),F=!0,lt=x(Ve);for(var zt=0;zt<lt.length;zt++){var hr=lt[zt];if(hr==":"&&!ee){ee=!0;continue}var dt=Ge(hr,je);ee?U.password+=dt:U.username+=dt}Ve=""}else if(ge==fe||ge=="/"||ge=="?"||ge=="#"||ge=="\\"&&V(U)){if(F&&Ve=="")return G;We-=x(Ve).length+1,Ve="",Ie=Tt}else Ve+=ge;break;case Tt:case Ot:if(ve&&U.scheme=="file"){Ie=vr;continue}else if(ge==":"&&!X){if(Ve=="")return re;if(vt=Ae(U,Ve),vt)return vt;if(Ve="",Ie=kt,ve==Ot)return}else if(ge==fe||ge=="/"||ge=="?"||ge=="#"||ge=="\\"&&V(U)){if(V(U)&&Ve=="")return re;if(ve&&Ve==""&&(he(U)||U.port!==null))return;if(vt=Ae(U,Ve),vt)return vt;if(Ve="",Ie=Nt,ve)return;continue}else ge=="["?X=!0:ge=="]"&&(X=!1),Ve+=ge;break;case kt:if(ke.test(ge))Ve+=ge;else if(ge==fe||ge=="/"||ge=="?"||ge=="#"||ge=="\\"&&V(U)||ve){if(Ve!=""){var ki=parseInt(Ve,10);if(ki>65535)return I;U.port=V(U)&&ki===Ee[U.scheme]?null:ki,Ve=""}if(ve)return;Ie=Nt;continue}else return I;break;case at:if(U.scheme="file",ge=="/"||ge=="\\")Ie=Cr;else if(Ce&&Ce.scheme=="file")if(ge==fe)U.host=Ce.host,U.path=Ce.path.slice(),U.query=Ce.query;else if(ge=="?")U.host=Ce.host,U.path=Ce.path.slice(),U.query="",Ie=Wt;else if(ge=="#")U.host=Ce.host,U.path=Ce.path.slice(),U.query=Ce.query,U.fragment="",Ie=yr;else{Ne(pe.slice(We).join(""))||(U.host=Ce.host,U.path=Ce.path.slice(),it(U)),Ie=or;continue}else{Ie=or;continue}break;case Cr:if(ge=="/"||ge=="\\"){Ie=vr;break}Ce&&Ce.scheme=="file"&&!Ne(pe.slice(We).join(""))&&(rt(Ce.path[0],!0)?U.path.push(Ce.path[0]):U.host=Ce.host),Ie=or;continue;case vr:if(ge==fe||ge=="/"||ge=="\\"||ge=="?"||ge=="#"){if(!ve&&rt(Ve))Ie=or;else if(Ve==""){if(U.host="",ve)return;Ie=Nt}else{if(vt=Ae(U,Ve),vt)return vt;if(U.host=="localhost"&&(U.host=""),ve)return;Ve="",Ie=Nt}continue}else Ve+=ge;break;case Nt:if(V(U)){if(Ie=or,ge!="/"&&ge!="\\")continue}else if(!ve&&ge=="?")U.query="",Ie=Wt;else if(!ve&&ge=="#")U.fragment="",Ie=yr;else if(ge!=fe&&(Ie=or,ge!="/"))continue;break;case or:if(ge==fe||ge=="/"||ge=="\\"&&V(U)||!ve&&(ge=="?"||ge=="#")){if(ze(Ve)?(it(U),ge!="/"&&!(ge=="\\"&&V(U))&&U.path.push("")):He(Ve)?ge!="/"&&!(ge=="\\"&&V(U))&&U.path.push(""):(U.scheme=="file"&&!U.path.length&&rt(Ve)&&(U.host&&(U.host=""),Ve=Ve.charAt(0)+":"),U.path.push(Ve)),Ve="",U.scheme=="file"&&(ge==fe||ge=="?"||ge=="#"))for(;U.path.length>1&&U.path[0]==="";)U.path.shift();ge=="?"?(U.query="",Ie=Wt):ge=="#"&&(U.fragment="",Ie=yr)}else Ve+=Ge(ge,Ke);break;case rn:ge=="?"?(U.query="",Ie=Wt):ge=="#"?(U.fragment="",Ie=yr):ge!=fe&&(U.path[0]+=Ge(ge,Le));break;case Wt:!ve&&ge=="#"?(U.fragment="",Ie=yr):ge!=fe&&(ge=="'"&&V(U)?U.query+="%27":ge=="#"?U.query+="%23":U.query+=Ge(ge,Le));break;case yr:ge!=fe&&(U.fragment+=Ge(ge,Be));break}We++}},_r=function(ae){var ve=b(this,_r,"URL"),Ce=arguments.length>1?arguments[1]:void 0,Ie=String(ae),We=Y(ve,{type:"URL"}),Ve,F;if(Ce!==void 0){if(Ce instanceof _r)Ve=M(Ce);else if(F=Jt(Ve={},String(Ce)),F)throw TypeError(F)}if(F=Jt(We,Ie,null,Ve),F)throw TypeError(F);var X=We.searchParams=new J,ee=W(X);ee.updateSearchParams(We.query),ee.updateURL=function(){We.query=String(X)||null},f||(ve.href=ie.call(ve),ve.origin=Z.call(ve),ve.protocol=ne.call(ve),ve.username=O.call(ve),ve.password=z.call(ve),ve.host=te.call(ve),ve.hostname=ce.call(ve),ve.port=ye.call(ve),ve.pathname=me.call(ve),ve.search=Te.call(ve),ve.searchParams=Oe.call(ve),ve.hash=De.call(ve))},oe=_r.prototype,ie=function(){var U=M(this),ae=U.scheme,ve=U.username,Ce=U.password,Ie=U.host,We=U.port,Ve=U.path,F=U.query,X=U.fragment,ee=ae+":";return Ie!==null?(ee+="//",he(U)&&(ee+=ve+(Ce?":"+Ce:"")+"@"),ee+=Pe(Ie),We!==null&&(ee+=":"+We)):ae=="file"&&(ee+="//"),ee+=U.cannotBeABaseURL?Ve[0]:Ve.length?"/"+Ve.join("/"):"",F!==null&&(ee+="?"+F),X!==null&&(ee+="#"+X),ee},Z=function(){var U=M(this),ae=U.scheme,ve=U.port;if(ae=="blob")try{return new URL(ae.path[0]).origin}catch(Ce){return"null"}return ae=="file"||!V(U)?"null":ae+"://"+Pe(U.host)+(ve!==null?":"+ve:"")},ne=function(){return M(this).scheme+":"},O=function(){return M(this).username},z=function(){return M(this).password},te=function(){var U=M(this),ae=U.host,ve=U.port;return ae===null?"":ve===null?Pe(ae):Pe(ae)+":"+ve},ce=function(){var U=M(this).host;return U===null?"":Pe(U)},ye=function(){var U=M(this).port;return U===null?"":String(U)},me=function(){var U=M(this),ae=U.path;return U.cannotBeABaseURL?ae[0]:ae.length?"/"+ae.join("/"):""},Te=function(){var U=M(this).query;return U?"?"+U:""},Oe=function(){return M(this).searchParams},De=function(){var U=M(this).fragment;return U?"#"+U:""},Ye=function(U,ae){return{get:U,set:ae,configurable:!0,enumerable:!0}};if(f&&m(oe,{href:Ye(ie,function(U){var ae=M(this),ve=String(U),Ce=Jt(ae,ve);if(Ce)throw TypeError(Ce);W(ae.searchParams).updateSearchParams(ae.query)}),origin:Ye(Z),protocol:Ye(ne,function(U){var ae=M(this);Jt(ae,String(U)+":",tt)}),username:Ye(O,function(U){var ae=M(this),ve=x(String(U));if(ue(ae))return;ae.username="";for(var Ce=0;Ce<ve.length;Ce++)ae.username+=Ge(ve[Ce],je)}),password:Ye(z,function(U){var ae=M(this),ve=x(String(U));if(ue(ae))return;ae.password="";for(var Ce=0;Ce<ve.length;Ce++)ae.password+=Ge(ve[Ce],je)}),host:Ye(te,function(U){var ae=M(this);if(ae.cannotBeABaseURL)return;Jt(ae,String(U),Tt)}),hostname:Ye(ce,function(U){var ae=M(this);if(ae.cannotBeABaseURL)return;Jt(ae,String(U),Ot)}),port:Ye(ye,function(U){var ae=M(this);if(ue(ae))return;U=String(U),U==""?ae.port=null:Jt(ae,U,kt)}),pathname:Ye(me,function(U){var ae=M(this);if(ae.cannotBeABaseURL)return;ae.path=[],Jt(ae,U+"",Nt)}),search:Ye(Te,function(U){var ae=M(this);U=String(U),U==""?ae.query=null:(U.charAt(0)=="?"&&(U=U.slice(1)),ae.query="",Jt(ae,U,Wt)),W(ae.searchParams).updateSearchParams(ae.query)}),searchParams:Ye(Oe),hash:Ye(De,function(U){var ae=M(this);if(U=String(U),U==""){ae.fragment=null;return}U.charAt(0)=="#"&&(U=U.slice(1)),ae.fragment="",Jt(ae,U,yr)})}),v(oe,"toJSON",function(){return ie.call(this)},{enumerable:!0}),v(oe,"toString",function(){return ie.call(this)},{enumerable:!0}),j){var xt=j.createObjectURL,gt=j.revokeObjectURL;xt&&v(_r,"createObjectURL",function(ae){return xt.apply(j,arguments)}),gt&&v(_r,"revokeObjectURL",function(ae){return gt.apply(j,arguments)})}N(_r,"URL"),d({global:!0,forced:!p,sham:!f},{URL:_r})}},t={};function i(c){if(t[c])return t[c].exports;var h=t[c]={exports:{}};return n[c](h,h.exports,i),h.exports}!function(){i.d=function(c,h){for(var a in h)i.o(h,a)&&!i.o(c,a)&&Object.defineProperty(c,a,{enumerable:!0,get:h[a]})}}(),!function(){i.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(c){if(typeof window=="object")return window}}()}(),!function(){i.o=function(c,h){return Object.prototype.hasOwnProperty.call(c,h)}}(),!function(){i.r=function(c){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})}}();var u={};return!function(){"use strict";i.r(u),i.d(u,{Dropzone:function(){return at},default:function(){return _r}});var c=i(2222),h=i(7327),a=i(2772),d=i(6992),f=i(1249),p=i(7042),y=i(561),m=i(8264),v=i(8309),b=i(489),S=i(1539),E=i(4916),x=i(9714),D=i(8783),C=i(4723),N=i(5306),R=i(3123),H=i(3210),j=i(2472),J=i(2990),W=i(8927),Y=i(3105),M=i(5035),K=i(4345),k=i(7174),G=i(2846),B=i(4731),re=i(7209),I=i(6319),P=i(8867),le=i(7789),ke=i(3739),q=i(9368),L=i(4483),xe=i(2056),Se=i(3462),be=i(678),Fe=i(7462),Xe=i(3824),nt=i(5021),fe=i(2974),Ae=i(5016),Qe=i(4747),ot=i(3948),ft=i(285);function Pe(oe,ie){var Z;if(typeof Symbol=="undefined"||oe[Symbol.iterator]==null){if(Array.isArray(oe)||(Z=Le(oe))||ie&&oe&&typeof oe.length=="number"){Z&&(oe=Z);var ne=0,O=function(){};return{s:O,n:function(){return ne>=oe.length?{done:!0}:{done:!1,value:oe[ne++]}},e:function(me){throw me},f:O}}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 z=!0,te=!1,ce;return{s:function(){Z=oe[Symbol.iterator]()},n:function(){var me=Z.next();return z=me.done,me},e:function(me){te=!0,ce=me},f:function(){try{!z&&Z.return!=null&&Z.return()}finally{if(te)throw ce}}}}function Le(oe,ie){if(!oe)return;if(typeof oe=="string")return Be(oe,ie);var Z=Object.prototype.toString.call(oe).slice(8,-1);if(Z==="Object"&&oe.constructor&&(Z=oe.constructor.name),Z==="Map"||Z==="Set")return Array.from(oe);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return Be(oe,ie)}function Be(oe,ie){(ie==null||ie>oe.length)&&(ie=oe.length);for(var Z=0,ne=new Array(ie);Z<ie;Z++)ne[Z]=oe[Z];return ne}function Ke(oe,ie){if(!(oe instanceof ie))throw new TypeError("Cannot call a class as a function")}function je(oe,ie){for(var Z=0;Z<ie.length;Z++){var ne=ie[Z];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(oe,ne.key,ne)}}function Ge(oe,ie,Z){return ie&&je(oe.prototype,ie),Z&&je(oe,Z),oe}var Ee=function(){function oe(){Ke(this,oe)}return Ge(oe,[{key:"on",value:function(Z,ne){return this._callbacks=this._callbacks||{},this._callbacks[Z]||(this._callbacks[Z]=[]),this._callbacks[Z].push(ne),this}},{key:"emit",value:function(Z){this._callbacks=this._callbacks||{};for(var ne=this._callbacks[Z],O=arguments.length,z=new Array(O>1?O-1:0),te=1;te<O;te++)z[te-1]=arguments[te];if(ne){var ce=Pe(ne,!0),ye;try{for(ce.s();!(ye=ce.n()).done;){var me=ye.value;me.apply(this,z)}}catch(Te){ce.e(Te)}finally{ce.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+Z,{args:z})),this}},{key:"makeEvent",value:function(Z,ne){var O={bubbles:!0,cancelable:!0,detail:ne};if(typeof window.CustomEvent=="function")return new CustomEvent(Z,O);var z=document.createEvent("CustomEvent");return z.initCustomEvent(Z,O.bubbles,O.cancelable,O.detail),z}},{key:"off",value:function(Z,ne){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var O=this._callbacks[Z];if(!O)return this;if(arguments.length===1)return delete this._callbacks[Z],this;for(var z=0;z<O.length;z++){var te=O[z];if(te===ne){O.splice(z,1);break}}return this}}]),oe}(),V='<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> ',he=V;function ue(oe,ie){var Z;if(typeof Symbol=="undefined"||oe[Symbol.iterator]==null){if(Array.isArray(oe)||(Z=rt(oe))||ie&&oe&&typeof oe.length=="number"){Z&&(oe=Z);var ne=0,O=function(){};return{s:O,n:function(){return ne>=oe.length?{done:!0}:{done:!1,value:oe[ne++]}},e:function(me){throw me},f:O}}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 z=!0,te=!1,ce;return{s:function(){Z=oe[Symbol.iterator]()},n:function(){var me=Z.next();return z=me.done,me},e:function(me){te=!0,ce=me},f:function(){try{!z&&Z.return!=null&&Z.return()}finally{if(te)throw ce}}}}function rt(oe,ie){if(!oe)return;if(typeof oe=="string")return Ne(oe,ie);var Z=Object.prototype.toString.call(oe).slice(8,-1);if(Z==="Object"&&oe.constructor&&(Z=oe.constructor.name),Z==="Map"||Z==="Set")return Array.from(oe);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return Ne(oe,ie)}function Ne(oe,ie){(ie==null||ie>oe.length)&&(ie=oe.length);for(var Z=0,ne=new Array(ie);Z<ie;Z++)ne[Z]=oe[Z];return ne}var it={url:null,method:"post",withCredentials:!1,timeout:null,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,disablePreviews:!1,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(ie,Z,ne){if(ne)return{dzuuid:ne.file.upload.uuid,dzchunkindex:ne.index,dztotalfilesize:ne.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:ne.file.upload.totalChunkCount,dzchunkbyteoffset:ne.index*this.options.chunkSize}},accept:function(ie,Z){return Z()},chunksUploaded:function(ie,Z){Z()},fallback:function(){var ie;this.element.className="".concat(this.element.className," dz-browser-not-supported");var Z=ue(this.element.getElementsByTagName("div"),!0),ne;try{for(Z.s();!(ne=Z.n()).done;){var O=ne.value;if(/(^| )dz-message($| )/.test(O.className)){ie=O,O.className="dz-message";break}}}catch(te){Z.e(te)}finally{Z.f()}ie||(ie=at.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(ie));var z=ie.getElementsByTagName("span")[0];return z&&(z.textContent!=null?z.textContent=this.options.dictFallbackMessage:z.innerText!=null&&(z.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(ie,Z,ne,O){var z={srcX:0,srcY:0,srcWidth:ie.width,srcHeight:ie.height},te=ie.width/ie.height;Z==null&&ne==null?(Z=z.srcWidth,ne=z.srcHeight):Z==null?Z=ne*te:ne==null&&(ne=Z/te),Z=Math.min(Z,z.srcWidth),ne=Math.min(ne,z.srcHeight);var ce=Z/ne;if(z.srcWidth>Z||z.srcHeight>ne)if(O==="crop")te>ce?(z.srcHeight=ie.height,z.srcWidth=z.srcHeight*ce):(z.srcWidth=ie.width,z.srcHeight=z.srcWidth/ce);else if(O==="contain")te>ce?ne=Z/te:Z=ne*te;else throw new Error("Unknown resizeMethod '".concat(O,"'"));return z.srcX=(ie.width-z.srcWidth)/2,z.srcY=(ie.height-z.srcHeight)/2,z.trgWidth=Z,z.trgHeight=ne,z},transformFile:function(ie,Z){return(this.options.resizeWidth||this.options.resizeHeight)&&ie.type.match(/image.*/)?this.resizeImage(ie,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,Z):Z(ie)},previewTemplate:he,drop:function(ie){return this.element.classList.remove("dz-drag-hover")},dragstart:function(ie){},dragend:function(ie){return this.element.classList.remove("dz-drag-hover")},dragenter:function(ie){return this.element.classList.add("dz-drag-hover")},dragover:function(ie){return this.element.classList.add("dz-drag-hover")},dragleave:function(ie){return this.element.classList.remove("dz-drag-hover")},paste:function(ie){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(ie){var Z=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){ie.previewElement=at.createElement(this.options.previewTemplate.trim()),ie.previewTemplate=ie.previewElement,this.previewsContainer.appendChild(ie.previewElement);var ne=ue(ie.previewElement.querySelectorAll("[data-dz-name]"),!0),O;try{for(ne.s();!(O=ne.n()).done;){var z=O.value;z.textContent=ie.name}}catch(De){ne.e(De)}finally{ne.f()}var te=ue(ie.previewElement.querySelectorAll("[data-dz-size]"),!0),ce;try{for(te.s();!(ce=te.n()).done;)z=ce.value,z.innerHTML=this.filesize(ie.size)}catch(De){te.e(De)}finally{te.f()}this.options.addRemoveLinks&&(ie._removeLink=at.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),ie.previewElement.appendChild(ie._removeLink));var ye=function(Ye){return Ye.preventDefault(),Ye.stopPropagation(),ie.status===at.UPLOADING?at.confirm(Z.options.dictCancelUploadConfirmation,function(){return Z.removeFile(ie)}):Z.options.dictRemoveFileConfirmation?at.confirm(Z.options.dictRemoveFileConfirmation,function(){return Z.removeFile(ie)}):Z.removeFile(ie)},me=ue(ie.previewElement.querySelectorAll("[data-dz-remove]"),!0),Te;try{for(me.s();!(Te=me.n()).done;){var Oe=Te.value;Oe.addEventListener("click",ye)}}catch(De){me.e(De)}finally{me.f()}}},removedfile:function(ie){return ie.previewElement!=null&&ie.previewElement.parentNode!=null&&ie.previewElement.parentNode.removeChild(ie.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(ie,Z){if(ie.previewElement){ie.previewElement.classList.remove("dz-file-preview");var ne=ue(ie.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),O;try{for(ne.s();!(O=ne.n()).done;){var z=O.value;z.alt=ie.name,z.src=Z}}catch(te){ne.e(te)}finally{ne.f()}return setTimeout(function(){return ie.previewElement.classList.add("dz-image-preview")},1)}},error:function(ie,Z){if(ie.previewElement){ie.previewElement.classList.add("dz-error"),typeof Z!="string"&&Z.error&&(Z=Z.error);var ne=ue(ie.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),O;try{for(ne.s();!(O=ne.n()).done;){var z=O.value;z.textContent=Z}}catch(te){ne.e(te)}finally{ne.f()}}},errormultiple:function(){},processing:function(ie){if(ie.previewElement&&(ie.previewElement.classList.add("dz-processing"),ie._removeLink))return ie._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(ie,Z,ne){if(ie.previewElement){var O=ue(ie.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),z;try{for(O.s();!(z=O.n()).done;){var te=z.value;te.nodeName==="PROGRESS"?te.value=Z:te.style.width="".concat(Z,"%")}}catch(ce){O.e(ce)}finally{O.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(ie){if(ie.previewElement)return ie.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(ie){return this.emit("error",ie,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(ie){if(ie._removeLink&&(ie._removeLink.innerHTML=this.options.dictRemoveFile),ie.previewElement)return ie.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},He=it;function ze(oe){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ze=function(Z){return typeof Z}:ze=function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},ze(oe)}function tt(oe,ie){var Z;if(typeof Symbol=="undefined"||oe[Symbol.iterator]==null){if(Array.isArray(oe)||(Z=Ht(oe))||ie&&oe&&typeof oe.length=="number"){Z&&(oe=Z);var ne=0,O=function(){};return{s:O,n:function(){return ne>=oe.length?{done:!0}:{done:!1,value:oe[ne++]}},e:function(me){throw me},f:O}}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 z=!0,te=!1,ce;return{s:function(){Z=oe[Symbol.iterator]()},n:function(){var me=Z.next();return z=me.done,me},e:function(me){te=!0,ce=me},f:function(){try{!z&&Z.return!=null&&Z.return()}finally{if(te)throw ce}}}}function Ht(oe,ie){if(!oe)return;if(typeof oe=="string")return Et(oe,ie);var Z=Object.prototype.toString.call(oe).slice(8,-1);if(Z==="Object"&&oe.constructor&&(Z=oe.constructor.name),Z==="Map"||Z==="Set")return Array.from(oe);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return Et(oe,ie)}function Et(oe,ie){(ie==null||ie>oe.length)&&(ie=oe.length);for(var Z=0,ne=new Array(ie);Z<ie;Z++)ne[Z]=oe[Z];return ne}function Pr(oe,ie){if(!(oe instanceof ie))throw new TypeError("Cannot call a class as a function")}function st(oe,ie){for(var Z=0;Z<ie.length;Z++){var ne=ie[Z];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(oe,ne.key,ne)}}function Ft(oe,ie,Z){return ie&&st(oe.prototype,ie),Z&&st(oe,Z),oe}function Je(oe,ie){if(typeof ie!="function"&&ie!==null)throw new TypeError("Super expression must either be null or a function");oe.prototype=Object.create(ie&&ie.prototype,{constructor:{value:oe,writable:!0,configurable:!0}}),ie&&ht(oe,ie)}function ht(oe,ie){return ht=Object.setPrototypeOf||function(ne,O){return ne.__proto__=O,ne},ht(oe,ie)}function wt(oe){var ie=Ot();return function(){var ne=kt(oe),O;if(ie){var z=kt(this).constructor;O=Reflect.construct(ne,arguments,z)}else O=ne.apply(this,arguments);return Qt(this,O)}}function Qt(oe,ie){return ie&&(ze(ie)==="object"||typeof ie=="function")?ie:Tt(oe)}function Tt(oe){if(oe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe}function Ot(){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(oe){return!1}}function kt(oe){return kt=Object.setPrototypeOf?Object.getPrototypeOf:function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},kt(oe)}var at=function(oe){Je(Z,oe);var ie=wt(Z);function Z(ne,O){var z;Pr(this,Z),z=ie.call(this);var te,ce;if(z.element=ne,z.version=Z.version,z.clickableElements=[],z.listeners=[],z.files=[],typeof z.element=="string"&&(z.element=document.querySelector(z.element)),!z.element||z.element.nodeType==null)throw new Error("Invalid dropzone element.");if(z.element.dropzone)throw new Error("Dropzone already attached.");Z.instances.push(Tt(z)),z.element.dropzone=Tt(z);var ye=(ce=Z.optionsForElement(z.element))!=null?ce:{};if(z.options=Z.extend({},He,ye,O!=null?O:{}),z.options.previewTemplate=z.options.previewTemplate.replace(/\n*/g,""),z.options.forceFallback||!Z.isBrowserSupported())return Qt(z,z.options.fallback.call(Tt(z)));if(z.options.url==null&&(z.options.url=z.element.getAttribute("action")),!z.options.url)throw new Error("No URL provided.");if(z.options.acceptedFiles&&z.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(z.options.uploadMultiple&&z.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return z.options.acceptedMimeTypes&&(z.options.acceptedFiles=z.options.acceptedMimeTypes,delete z.options.acceptedMimeTypes),z.options.renameFilename!=null&&(z.options.renameFile=function(me){return z.options.renameFilename.call(Tt(z),me.name,me)}),typeof z.options.method=="string"&&(z.options.method=z.options.method.toUpperCase()),(te=z.getExistingFallback())&&te.parentNode&&te.parentNode.removeChild(te),z.options.previewsContainer!==!1&&(z.options.previewsContainer?z.previewsContainer=Z.getElement(z.options.previewsContainer,"previewsContainer"):z.previewsContainer=z.element),z.options.clickable&&(z.options.clickable===!0?z.clickableElements=[z.element]:z.clickableElements=Z.getElements(z.options.clickable,"clickable")),z.init(),z}return Ft(Z,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(O){return O.accepted}).map(function(O){return O})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(O){return!O.accepted}).map(function(O){return O})}},{key:"getFilesWithStatus",value:function(O){return this.files.filter(function(z){return z.status===O}).map(function(z){return z})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(Z.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(Z.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(Z.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(O){return O.status===Z.UPLOADING||O.status===Z.QUEUED}).map(function(O){return O})}},{key:"init",value:function(){var O=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(Z.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var z=function Oe(){O.hiddenFileInput&&O.hiddenFileInput.parentNode.removeChild(O.hiddenFileInput),O.hiddenFileInput=document.createElement("input"),O.hiddenFileInput.setAttribute("type","file"),(O.options.maxFiles===null||O.options.maxFiles>1)&&O.hiddenFileInput.setAttribute("multiple","multiple"),O.hiddenFileInput.className="dz-hidden-input",O.options.acceptedFiles!==null&&O.hiddenFileInput.setAttribute("accept",O.options.acceptedFiles),O.options.capture!==null&&O.hiddenFileInput.setAttribute("capture",O.options.capture),O.hiddenFileInput.setAttribute("tabindex","-1"),O.hiddenFileInput.style.visibility="hidden",O.hiddenFileInput.style.position="absolute",O.hiddenFileInput.style.top="0",O.hiddenFileInput.style.left="0",O.hiddenFileInput.style.height="0",O.hiddenFileInput.style.width="0",Z.getElement(O.options.hiddenInputContainer,"hiddenInputContainer").appendChild(O.hiddenFileInput),O.hiddenFileInput.addEventListener("change",function(){var De=O.hiddenFileInput.files;if(De.length){var Ye=tt(De,!0),xt;try{for(Ye.s();!(xt=Ye.n()).done;){var gt=xt.value;O.addFile(gt)}}catch(U){Ye.e(U)}finally{Ye.f()}}O.emit("addedfiles",De),Oe()})};z()}this.URL=window.URL!==null?window.URL:window.webkitURL;var te=tt(this.events,!0),ce;try{for(te.s();!(ce=te.n()).done;){var ye=ce.value;this.on(ye,this.options[ye])}}catch(Oe){te.e(Oe)}finally{te.f()}this.on("uploadprogress",function(){return O.updateTotalUploadProgress()}),this.on("removedfile",function(){return O.updateTotalUploadProgress()}),this.on("canceled",function(Oe){return O.emit("complete",Oe)}),this.on("complete",function(Oe){if(O.getAddedFiles().length===0&&O.getUploadingFiles().length===0&&O.getQueuedFiles().length===0)return setTimeout(function(){return O.emit("queuecomplete")},0)});var me=function(De){if(De.dataTransfer.types){for(var Ye=0;Ye<De.dataTransfer.types.length;Ye++)if(De.dataTransfer.types[Ye]==="Files")return!0}return!1},Te=function(De){return me(De)?(De.stopPropagation(),De.preventDefault?De.preventDefault():De.returnValue=!1):void 0};return this.listeners=[{element:this.element,events:{dragstart:function(De){return O.emit("dragstart",De)},dragenter:function(De){return Te(De),O.emit("dragenter",De)},dragover:function(De){var Ye;try{Ye=De.dataTransfer.effectAllowed}catch(xt){}return De.dataTransfer.dropEffect=Ye==="move"||Ye==="linkMove"?"move":"copy",Te(De),O.emit("dragover",De)},dragleave:function(De){return O.emit("dragleave",De)},drop:function(De){return Te(De),O.drop(De)},dragend:function(De){return O.emit("dragend",De)}}}],this.clickableElements.forEach(function(Oe){return O.listeners.push({element:Oe,events:{click:function(Ye){return(Oe!==O.element||Ye.target===O.element||Z.elementInside(Ye.target,O.element.querySelector(".dz-message")))&&O.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,Z.instances.splice(Z.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var O,z=0,te=0,ce=this.getActiveFiles();if(ce.length){var ye=tt(this.getActiveFiles(),!0),me;try{for(ye.s();!(me=ye.n()).done;){var Te=me.value;z+=Te.upload.bytesSent,te+=Te.upload.total}}catch(Oe){ye.e(Oe)}finally{ye.f()}O=100*z/te}else O=100;return this.emit("totaluploadprogress",O,te,z)}},{key:"_getParamName",value:function(O){return typeof this.options.paramName=="function"?this.options.paramName(O):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(O,"]"):"")}},{key:"_renameFile",value:function(O){return typeof this.options.renameFile!="function"?O.name:this.options.renameFile(O)}},{key:"getFallbackForm",value:function(){var O,z;if(O=this.getExistingFallback())return O;var te='<div class="dz-fallback">';this.options.dictFallbackText&&(te+="<p>".concat(this.options.dictFallbackText,"</p>")),te+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var ce=Z.createElement(te);return this.element.tagName!=="FORM"?(z=Z.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),z.appendChild(ce)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),z!=null?z:ce}},{key:"getExistingFallback",value:function(){for(var O=function(Te){var Oe=tt(Te,!0),De;try{for(Oe.s();!(De=Oe.n()).done;){var Ye=De.value;if(/(^| )fallback($| )/.test(Ye.className))return Ye}}catch(xt){Oe.e(xt)}finally{Oe.f()}},z=0,te=["div","form"];z<te.length;z++){var ce=te[z],ye;if(ye=O(this.element.getElementsByTagName(ce)))return ye}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(O){return function(){var z=[];for(var te in O.events){var ce=O.events[te];z.push(O.element.addEventListener(te,ce,!1))}return z}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(O){return function(){var z=[];for(var te in O.events){var ce=O.events[te];z.push(O.element.removeEventListener(te,ce,!1))}return z}()})}},{key:"disable",value:function(){var O=this;return this.clickableElements.forEach(function(z){return z.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(z){return O.cancelUpload(z)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(O){return O.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(O){var z=0,te="b";if(O>0){for(var ce=["tb","gb","mb","kb","b"],ye=0;ye<ce.length;ye++){var me=ce[ye],Te=Math.pow(this.options.filesizeBase,4-ye)/10;if(O>=Te){z=O/Math.pow(this.options.filesizeBase,4-ye),te=me;break}}z=Math.round(10*z)/10}return"<strong>".concat(z,"</strong> ").concat(this.options.dictFileSizeUnits[te])}},{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(O){if(!O.dataTransfer)return;this.emit("drop",O);for(var z=[],te=0;te<O.dataTransfer.files.length;te++)z[te]=O.dataTransfer.files[te];if(z.length){var ce=O.dataTransfer.items;ce&&ce.length&&ce[0].webkitGetAsEntry!=null?this._addFilesFromItems(ce):this.handleFiles(z)}this.emit("addedfiles",z)}},{key:"paste",value:function(O){if(yr(O!=null?O.clipboardData:void 0,function(te){return te.items})==null)return;this.emit("paste",O);var z=O.clipboardData.items;if(z.length)return this._addFilesFromItems(z)}},{key:"handleFiles",value:function(O){var z=tt(O,!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value;this.addFile(ce)}}catch(ye){z.e(ye)}finally{z.f()}}},{key:"_addFilesFromItems",value:function(O){var z=this;return function(){var te=[],ce=tt(O,!0),ye;try{for(ce.s();!(ye=ce.n()).done;){var me=ye.value,Te;me.webkitGetAsEntry!=null&&(Te=me.webkitGetAsEntry())?Te.isFile?te.push(z.addFile(me.getAsFile())):Te.isDirectory?te.push(z._addFilesFromDirectory(Te,Te.name)):te.push(void 0):me.getAsFile!=null&&(me.kind==null||me.kind==="file")?te.push(z.addFile(me.getAsFile())):te.push(void 0)}}catch(Oe){ce.e(Oe)}finally{ce.f()}return te}()}},{key:"_addFilesFromDirectory",value:function(O,z){var te=this,ce=O.createReader(),ye=function(Oe){return Jt(console,"log",function(De){return De.log(Oe)})},me=function Te(){return ce.readEntries(function(Oe){if(Oe.length>0){var De=tt(Oe,!0),Ye;try{for(De.s();!(Ye=De.n()).done;){var xt=Ye.value;xt.isFile?xt.file(function(gt){return te.options.ignoreHiddenFiles&&gt.name.substring(0,1)==="."?void 0:(gt.fullPath="".concat(z,"/").concat(gt.name),te.addFile(gt))}):xt.isDirectory&&te._addFilesFromDirectory(xt,"".concat(z,"/").concat(xt.name))}}catch(gt){De.e(gt)}finally{De.f()}Te()}return null},ye)};return me()}},{key:"accept",value:function(O,z){this.options.maxFilesize&&O.size>this.options.maxFilesize*1024*1024?z(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(O.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):Z.isValidFile(O,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(z(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",O)):this.options.accept.call(this,O,z):z(this.options.dictInvalidFileType)}},{key:"addFile",value:function(O){var z=this;O.upload={uuid:Z.uuidv4(),progress:0,total:O.size,bytesSent:0,filename:this._renameFile(O)},this.files.push(O),O.status=Z.ADDED,this.emit("addedfile",O),this._enqueueThumbnail(O),this.accept(O,function(te){te?(O.accepted=!1,z._errorProcessing([O],te)):(O.accepted=!0,z.options.autoQueue&&z.enqueueFile(O)),z._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(O){var z=tt(O,!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value;this.enqueueFile(ce)}}catch(ye){z.e(ye)}finally{z.f()}return null}},{key:"enqueueFile",value:function(O){var z=this;if(O.status===Z.ADDED&&O.accepted===!0){if(O.status=Z.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return z.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(O){var z=this;if(this.options.createImageThumbnails&&O.type.match(/image.*/)&&O.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(O),setTimeout(function(){return z._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var O=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var z=this._thumbnailQueue.shift();return this.createThumbnail(z,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(te){return O.emit("thumbnail",z,te),O._processingThumbnail=!1,O._processThumbnailQueue()})}},{key:"removeFile",value:function(O){if(O.status===Z.UPLOADING&&this.cancelUpload(O),this.files=Cr(this.files,O),this.emit("removedfile",O),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(O){O==null&&(O=!1);var z=tt(this.files.slice(),!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value;(ce.status!==Z.UPLOADING||O)&&this.removeFile(ce)}}catch(ye){z.e(ye)}finally{z.f()}return null}},{key:"resizeImage",value:function(O,z,te,ce,ye){var me=this;return this.createThumbnail(O,z,te,ce,!0,function(Te,Oe){if(Oe==null)return ye(O);var De=me.options.resizeMimeType;De==null&&(De=O.type);var Ye=Oe.toDataURL(De,me.options.resizeQuality);return(De==="image/jpeg"||De==="image/jpg")&&(Ye=rn.restore(O.dataURL,Ye)),ye(Z.dataURItoBlob(Ye))})}},{key:"createThumbnail",value:function(O,z,te,ce,ye,me){var Te=this,Oe=new FileReader;Oe.onload=function(){if(O.dataURL=Oe.result,O.type==="image/svg+xml"){me!=null&&me(Oe.result);return}Te.createThumbnailFromUrl(O,z,te,ce,ye,me)},Oe.readAsDataURL(O)}},{key:"displayExistingFile",value:function(O,z,te,ce){var ye=this,me=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",O),this.emit("complete",O),!me)this.emit("thumbnail",O,z),te&&te();else{var Te=function(De){ye.emit("thumbnail",O,De),te&&te()};O.dataURL=z,this.createThumbnailFromUrl(O,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,Te,ce)}}},{key:"createThumbnailFromUrl",value:function(O,z,te,ce,ye,me,Te){var Oe=this,De=document.createElement("img");return Te&&(De.crossOrigin=Te),ye=getComputedStyle(document.body).imageOrientation=="from-image"?!1:ye,De.onload=function(){var Ye=function(gt){return gt(1)};return typeof EXIF!="undefined"&&EXIF!==null&&ye&&(Ye=function(gt){return EXIF.getData(De,function(){return gt(EXIF.getTag(this,"Orientation"))})}),Ye(function(xt){O.width=De.width,O.height=De.height;var gt=Oe.options.resize.call(Oe,O,z,te,ce),U=document.createElement("canvas"),ae=U.getContext("2d");U.width=gt.trgWidth,U.height=gt.trgHeight,xt>4&&(U.width=gt.trgHeight,U.height=gt.trgWidth);switch(xt){case 2:ae.translate(U.width,0),ae.scale(-1,1);break;case 3:ae.translate(U.width,U.height),ae.rotate(Math.PI);break;case 4:ae.translate(0,U.height),ae.scale(1,-1);break;case 5:ae.rotate(.5*Math.PI),ae.scale(1,-1);break;case 6:ae.rotate(.5*Math.PI),ae.translate(0,-U.width);break;case 7:ae.rotate(.5*Math.PI),ae.translate(U.height,-U.width),ae.scale(-1,1);break;case 8:ae.rotate(-.5*Math.PI),ae.translate(-U.height,0);break}or(ae,De,gt.srcX!=null?gt.srcX:0,gt.srcY!=null?gt.srcY:0,gt.srcWidth,gt.srcHeight,gt.trgX!=null?gt.trgX:0,gt.trgY!=null?gt.trgY:0,gt.trgWidth,gt.trgHeight);var ve=U.toDataURL("image/png");if(me!=null)return me(ve,U)})},me!=null&&(De.onerror=me),De.src=O.dataURL}},{key:"processQueue",value:function(){var O=this.options.parallelUploads,z=this.getUploadingFiles().length,te=z;if(z>=O)return;var ce=this.getQueuedFiles();if(!(ce.length>0))return;if(this.options.uploadMultiple)return this.processFiles(ce.slice(0,O-z));for(;te<O;){if(!ce.length)return;this.processFile(ce.shift()),te++}}},{key:"processFile",value:function(O){return this.processFiles([O])}},{key:"processFiles",value:function(O){var z=tt(O,!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value;ce.processing=!0,ce.status=Z.UPLOADING,this.emit("processing",ce)}}catch(ye){z.e(ye)}finally{z.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",O),this.uploadFiles(O)}},{key:"_getFilesWithXhr",value:function(O){var z;return z=this.files.filter(function(te){return te.xhr===O}).map(function(te){return te})}},{key:"cancelUpload",value:function(O){if(O.status===Z.UPLOADING){var z=this._getFilesWithXhr(O.xhr),te=tt(z,!0),ce;try{for(te.s();!(ce=te.n()).done;){var ye=ce.value;ye.status=Z.CANCELED}}catch(De){te.e(De)}finally{te.f()}typeof O.xhr!="undefined"&&O.xhr.abort();var me=tt(z,!0),Te;try{for(me.s();!(Te=me.n()).done;){var Oe=Te.value;this.emit("canceled",Oe)}}catch(De){me.e(De)}finally{me.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",z)}else(O.status===Z.ADDED||O.status===Z.QUEUED)&&(O.status=Z.CANCELED,this.emit("canceled",O),this.options.uploadMultiple&&this.emit("canceledmultiple",[O]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(O){if(typeof O=="function"){for(var z=arguments.length,te=new Array(z>1?z-1:0),ce=1;ce<z;ce++)te[ce-1]=arguments[ce];return O.apply(this,te)}return O}},{key:"uploadFile",value:function(O){return this.uploadFiles([O])}},{key:"uploadFiles",value:function(O){var z=this;this._transformFiles(O,function(te){if(z.options.chunking){var ce=te[0];O[0].upload.chunked=z.options.chunking&&(z.options.forceChunking||ce.size>z.options.chunkSize),O[0].upload.totalChunkCount=Math.ceil(ce.size/z.options.chunkSize)}if(O[0].upload.chunked){var ye=O[0],me=te[0],Te=0;ye.upload.chunks=[];var Oe=function(){for(var U=0;ye.upload.chunks[U]!==void 0;)U++;if(U>=ye.upload.totalChunkCount)return;Te++;var ae=U*z.options.chunkSize,ve=Math.min(ae+z.options.chunkSize,me.size),Ce={name:z._getParamName(0),data:me.webkitSlice?me.webkitSlice(ae,ve):me.slice(ae,ve),filename:ye.upload.filename,chunkIndex:U};ye.upload.chunks[U]={file:ye,index:U,dataBlock:Ce,status:Z.UPLOADING,progress:0,retries:0},z._uploadData(O,[Ce])};if(ye.upload.finishedChunkUpload=function(gt,U){var ae=!0;gt.status=Z.SUCCESS,gt.dataBlock=null,gt.xhr=null;for(var ve=0;ve<ye.upload.totalChunkCount;ve++){if(ye.upload.chunks[ve]===void 0)return Oe();ye.upload.chunks[ve].status!==Z.SUCCESS&&(ae=!1)}ae&&z.options.chunksUploaded(ye,function(){z._finished(O,U,null)})},z.options.parallelChunkUploads)for(var De=0;De<ye.upload.totalChunkCount;De++)Oe();else Oe()}else{for(var Ye=[],xt=0;xt<O.length;xt++)Ye[xt]={name:z._getParamName(xt),data:te[xt],filename:O[xt].upload.filename};z._uploadData(O,Ye)}})}},{key:"_getChunk",value:function(O,z){for(var te=0;te<O.upload.totalChunkCount;te++)if(O.upload.chunks[te]!==void 0&&O.upload.chunks[te].xhr===z)return O.upload.chunks[te]}},{key:"_uploadData",value:function(O,z){var te=this,ce=new XMLHttpRequest,ye=tt(O,!0),me;try{for(ye.s();!(me=ye.n()).done;){var Te=me.value;Te.xhr=ce}}catch(lt){ye.e(lt)}finally{ye.f()}O[0].upload.chunked&&(O[0].upload.chunks[z[0].chunkIndex].xhr=ce);var Oe=this.resolveOption(this.options.method,O),De=this.resolveOption(this.options.url,O);ce.open(Oe,De,!0);var Ye=this.resolveOption(this.options.timeout,O);Ye&&(ce.timeout=this.resolveOption(this.options.timeout,O)),ce.withCredentials=!!this.options.withCredentials,ce.onload=function(lt){te._finishedUploading(O,ce,lt)},ce.ontimeout=function(){te._handleUploadError(O,ce,"Request timedout after ".concat(te.options.timeout/1e3," seconds"))},ce.onerror=function(){te._handleUploadError(O,ce)};var xt=ce.upload!=null?ce.upload:ce;xt.onprogress=function(lt){return te._updateFilesUploadProgress(O,ce,lt)};var gt={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&Z.extend(gt,this.options.headers);for(var U in gt){var ae=gt[U];ae&&ce.setRequestHeader(U,ae)}var ve=new FormData;if(this.options.params){var Ce=this.options.params;typeof Ce=="function"&&(Ce=Ce.call(this,O,ce,O[0].upload.chunked?this._getChunk(O[0],ce):null));for(var Ie in Ce){var We=Ce[Ie];if(Array.isArray(We))for(var Ve=0;Ve<We.length;Ve++)ve.append(Ie,We[Ve]);else ve.append(Ie,We)}}var F=tt(O,!0),X;try{for(F.s();!(X=F.n()).done;){var ee=X.value;this.emit("sending",ee,ce,ve)}}catch(lt){F.e(lt)}finally{F.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",O,ce,ve),this._addFormElementData(ve);for(var pe=0;pe<z.length;pe++){var ge=z[pe];ve.append(ge.name,ge.data,ge.filename)}this.submitRequest(ce,ve,O)}},{key:"_transformFiles",value:function(O,z){for(var te=this,ce=[],ye=0,me=function(De){te.options.transformFile.call(te,O[De],function(Ye){ce[De]=Ye,++ye===O.length&&z(ce)})},Te=0;Te<O.length;Te++)me(Te)}},{key:"_addFormElementData",value:function(O){if(this.element.tagName==="FORM"){var z=tt(this.element.querySelectorAll("input, textarea, select, button"),!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value,ye=ce.getAttribute("name"),me=ce.getAttribute("type");if(me&&(me=me.toLowerCase()),typeof ye=="undefined"||ye===null)continue;if(ce.tagName==="SELECT"&&ce.hasAttribute("multiple")){var Te=tt(ce.options,!0),Oe;try{for(Te.s();!(Oe=Te.n()).done;){var De=Oe.value;De.selected&&O.append(ye,De.value)}}catch(Ye){Te.e(Ye)}finally{Te.f()}}else(!me||me!=="checkbox"&&me!=="radio"||ce.checked)&&O.append(ye,ce.value)}}catch(Ye){z.e(Ye)}finally{z.f()}}}},{key:"_updateFilesUploadProgress",value:function(O,z,te){if(O[0].upload.chunked){var Te=O[0],Oe=this._getChunk(Te,z);te?(Oe.progress=100*te.loaded/te.total,Oe.total=te.total,Oe.bytesSent=te.loaded):(Oe.progress=100,Oe.bytesSent=Oe.total),Te.upload.progress=0,Te.upload.total=0,Te.upload.bytesSent=0;for(var De=0;De<Te.upload.totalChunkCount;De++)Te.upload.chunks[De]&&typeof Te.upload.chunks[De].progress!="undefined"&&(Te.upload.progress+=Te.upload.chunks[De].progress,Te.upload.total+=Te.upload.chunks[De].total,Te.upload.bytesSent+=Te.upload.chunks[De].bytesSent);Te.upload.progress=Te.upload.progress/Te.upload.totalChunkCount,this.emit("uploadprogress",Te,Te.upload.progress,Te.upload.bytesSent)}else{var ce=tt(O,!0),ye;try{for(ce.s();!(ye=ce.n()).done;){var me=ye.value;if(me.upload.total&&me.upload.bytesSent&&me.upload.bytesSent==me.upload.total)continue;te?(me.upload.progress=100*te.loaded/te.total,me.upload.total=te.total,me.upload.bytesSent=te.loaded):(me.upload.progress=100,me.upload.bytesSent=me.upload.total),this.emit("uploadprogress",me,me.upload.progress,me.upload.bytesSent)}}catch(Ye){ce.e(Ye)}finally{ce.f()}}}},{key:"_finishedUploading",value:function(O,z,te){var ce;if(O[0].status===Z.CANCELED)return;if(z.readyState!==4)return;if(z.responseType!=="arraybuffer"&&z.responseType!=="blob"&&(ce=z.responseText,z.getResponseHeader("content-type")&&~z.getResponseHeader("content-type").indexOf("application/json")))try{ce=JSON.parse(ce)}catch(ye){te=ye,ce="Invalid JSON response from server."}this._updateFilesUploadProgress(O,z),200<=z.status&&z.status<300?O[0].upload.chunked?O[0].upload.finishedChunkUpload(this._getChunk(O[0],z),ce):this._finished(O,ce,te):this._handleUploadError(O,z,ce)}},{key:"_handleUploadError",value:function(O,z,te){if(O[0].status===Z.CANCELED)return;if(O[0].upload.chunked&&this.options.retryChunks){var ce=this._getChunk(O[0],z);if(ce.retries++<this.options.retryChunksLimit){this._uploadData(O,[ce.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(O,te||this.options.dictResponseError.replace("{{statusCode}}",z.status),z)}},{key:"submitRequest",value:function(O,z,te){if(O.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}O.send(z)}},{key:"_finished",value:function(O,z,te){var ce=tt(O,!0),ye;try{for(ce.s();!(ye=ce.n()).done;){var me=ye.value;me.status=Z.SUCCESS,this.emit("success",me,z,te),this.emit("complete",me)}}catch(Te){ce.e(Te)}finally{ce.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",O,z,te),this.emit("completemultiple",O)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(O,z,te){var ce=tt(O,!0),ye;try{for(ce.s();!(ye=ce.n()).done;){var me=ye.value;me.status=Z.ERROR,this.emit("error",me,z,te),this.emit("complete",me)}}catch(Te){ce.e(Te)}finally{ce.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",O,z,te),this.emit("completemultiple",O)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=Ee,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._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(O){for(var z=arguments.length,te=new Array(z>1?z-1:0),ce=1;ce<z;ce++)te[ce-1]=arguments[ce];for(var ye=0,me=te;ye<me.length;ye++){var Te=me[ye];for(var Oe in Te){var De=Te[Oe];O[Oe]=De}}return O}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(O){var z=Math.random()*16|0,te=O==="x"?z:z&3|8;return te.toString(16)})}}]),Z}(Ee);at.initClass(),at.version="5.9.2",at.options={},at.optionsForElement=function(oe){return oe.getAttribute("id")?at.options[vr(oe.getAttribute("id"))]:void 0},at.instances=[],at.forElement=function(oe){if(typeof oe=="string"&&(oe=document.querySelector(oe)),(oe!=null?oe.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 oe.dropzone},at.autoDiscover=!0,at.discover=function(){var oe;if(document.querySelectorAll)oe=document.querySelectorAll(".dropzone");else{oe=[];var ie=function(ne){return function(){var O=[],z=tt(ne,!0),te;try{for(z.s();!(te=z.n()).done;){var ce=te.value;/(^| )dropzone($| )/.test(ce.className)?O.push(oe.push(ce)):O.push(void 0)}}catch(ye){z.e(ye)}finally{z.f()}return O}()};ie(document.getElementsByTagName("div")),ie(document.getElementsByTagName("form"))}return function(){var Z=[],ne=tt(oe,!0),O;try{for(ne.s();!(O=ne.n()).done;){var z=O.value;at.optionsForElement(z)!==!1?Z.push(new at(z)):Z.push(void 0)}}catch(te){ne.e(te)}finally{ne.f()}return Z}()},at.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],at.isBrowserSupported=function(){var oe=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))oe=!1;else{at.blacklistedBrowsers!==void 0&&(at.blockedBrowsers=at.blacklistedBrowsers);var ie=tt(at.blockedBrowsers,!0),Z;try{for(ie.s();!(Z=ie.n()).done;){var ne=Z.value;if(ne.test(navigator.userAgent)){oe=!1;continue}}}catch(O){ie.e(O)}finally{ie.f()}}else oe=!1;return oe},at.dataURItoBlob=function(oe){for(var ie=atob(oe.split(",")[1]),Z=oe.split(",")[0].split(":")[1].split(";")[0],ne=new ArrayBuffer(ie.length),O=new Uint8Array(ne),z=0,te=ie.length,ce=0<=te;ce?z<=te:z>=te;ce?z++:z--)O[z]=ie.charCodeAt(z);return new Blob([ne],{type:Z})};var Cr=function(ie,Z){return ie.filter(function(ne){return ne!==Z}).map(function(ne){return ne})},vr=function(ie){return ie.replace(/[\-_](\w)/g,function(Z){return Z.charAt(1).toUpperCase()})};at.createElement=function(oe){var ie=document.createElement("div");return ie.innerHTML=oe,ie.childNodes[0]},at.elementInside=function(oe,ie){if(oe===ie)return!0;for(;oe=oe.parentNode;)if(oe===ie)return!0;return!1},at.getElement=function(oe,ie){var Z;if(typeof oe=="string"?Z=document.querySelector(oe):oe.nodeType!=null&&(Z=oe),Z==null)throw new Error("Invalid `".concat(ie,"` option provided. Please provide a CSS selector or a plain HTML element."));return Z},at.getElements=function(oe,ie){var Z,ne;if(oe instanceof Array){ne=[];try{var O=tt(oe,!0),z;try{for(O.s();!(z=O.n()).done;)Z=z.value,ne.push(this.getElement(Z,ie))}catch(ye){O.e(ye)}finally{O.f()}}catch(ye){ne=null}}else if(typeof oe=="string"){ne=[];var te=tt(document.querySelectorAll(oe),!0),ce;try{for(te.s();!(ce=te.n()).done;)Z=ce.value,ne.push(Z)}catch(ye){te.e(ye)}finally{te.f()}}else oe.nodeType!=null&&(ne=[oe]);if(ne==null||!ne.length)throw new Error("Invalid `".concat(ie,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return ne},at.confirm=function(oe,ie,Z){if(window.confirm(oe))return ie();if(Z!=null)return Z()},at.isValidFile=function(oe,ie){if(!ie)return!0;ie=ie.split(",");var Z=oe.type,ne=Z.replace(/\/.*$/,""),O=tt(ie,!0),z;try{for(O.s();!(z=O.n()).done;){var te=z.value;if(te=te.trim(),te.charAt(0)==="."){if(oe.name.toLowerCase().indexOf(te.toLowerCase(),oe.name.length-te.length)!==-1)return!0}else if(/\/\*$/.test(te)){if(ne===te.replace(/\/.*$/,""))return!0}else if(Z===te)return!0}}catch(ce){O.e(ce)}finally{O.f()}return!1},typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(oe){return this.each(function(){return new at(this,oe)})}),at.ADDED="added",at.QUEUED="queued",at.ACCEPTED=at.QUEUED,at.UPLOADING="uploading",at.PROCESSING=at.UPLOADING,at.CANCELED="canceled",at.ERROR="error",at.SUCCESS="success";var Nt=function(ie){var Z=ie.naturalWidth,ne=ie.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=ne;var z=O.getContext("2d");z.drawImage(ie,0,0);for(var te=z.getImageData(1,0,1,ne),ce=te.data,ye=0,me=ne,Te=ne;Te>ye;){var Oe=ce[(Te-1)*4+3];Oe===0?me=Te:ye=Te,Te=me+ye>>1}var De=Te/ne;return De===0?1:De},or=function(ie,Z,ne,O,z,te,ce,ye,me,Te){var Oe=Nt(Z);return ie.drawImage(Z,ne,O,z,te,ce,ye,me,Te/Oe)},rn=function(){function oe(){Pr(this,oe)}return Ft(oe,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(Z){for(var ne="",O=void 0,z=void 0,te="",ce=void 0,ye=void 0,me=void 0,Te="",Oe=0;!(O=Z[Oe++],z=Z[Oe++],te=Z[Oe++],ce=O>>2,ye=(O&3)<<4|z>>4,me=(z&15)<<2|te>>6,Te=te&63,isNaN(z)?me=Te=64:isNaN(te)&&(Te=64),ne=ne+this.KEY_STR.charAt(ce)+this.KEY_STR.charAt(ye)+this.KEY_STR.charAt(me)+this.KEY_STR.charAt(Te),O=z=te="",ce=ye=me=Te="",!(Oe<Z.length)););return ne}},{key:"restore",value:function(Z,ne){if(!Z.match("data:image/jpeg;base64,"))return ne;var O=this.decode64(Z.replace("data:image/jpeg;base64,","")),z=this.slice2Segments(O),te=this.exifManipulation(ne,z);return"data:image/jpeg;base64,".concat(this.encode64(te))}},{key:"exifManipulation",value:function(Z,ne){var O=this.getExifArray(ne),z=this.insertExif(Z,O),te=new Uint8Array(z);return te}},{key:"getExifArray",value:function(Z){for(var ne=void 0,O=0;O<Z.length;){if(ne=Z[O],ne[0]===255&ne[1]===225)return ne;O++}return[]}},{key:"insertExif",value:function(Z,ne){var O=Z.replace("data:image/jpeg;base64,",""),z=this.decode64(O),te=z.indexOf(255,3),ce=z.slice(0,te),ye=z.slice(te),me=ce;return me=me.concat(ne),me=me.concat(ye),me}},{key:"slice2Segments",value:function(Z){for(var ne=0,O=[];;){var z;if(Z[ne]===255&Z[ne+1]===218)break;if(Z[ne]===255&Z[ne+1]===216)ne+=2;else{z=Z[ne+2]*256+Z[ne+3];var te=ne+z+2,ce=Z.slice(ne,te);O.push(ce),ne=te}if(ne>Z.length)break}return O}},{key:"decode64",value:function(Z){var ne="",O=void 0,z=void 0,te="",ce=void 0,ye=void 0,me=void 0,Te="",Oe=0,De=[],Ye=/[^A-Za-z0-9\+\/\=]/g;for(Ye.exec(Z)&&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.`),Z=Z.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(ce=this.KEY_STR.indexOf(Z.charAt(Oe++)),ye=this.KEY_STR.indexOf(Z.charAt(Oe++)),me=this.KEY_STR.indexOf(Z.charAt(Oe++)),Te=this.KEY_STR.indexOf(Z.charAt(Oe++)),O=ce<<2|ye>>4,z=(ye&15)<<4|me>>2,te=(me&3)<<6|Te,De.push(O),me!==64&&De.push(z),Te!==64&&De.push(te),O=z=te="",ce=ye=me=Te="",!(Oe<Z.length)););return De}}]),oe}();rn.initClass();var Wt=function(ie,Z){var ne=!1,O=!0,z=ie.document,te=z.documentElement,ce=z.addEventListener?"addEventListener":"attachEvent",ye=z.addEventListener?"removeEventListener":"detachEvent",me=z.addEventListener?"":"on",Te=function De(Ye){if(Ye.type==="readystatechange"&&z.readyState!=="complete")return;if((Ye.type==="load"?ie:z)[ye](me+Ye.type,De,!1),!ne&&(ne=!0))return Z.call(ie,Ye.type||Ye)},Oe=function De(){try{te.doScroll("left")}catch(Ye){setTimeout(De,50);return}return Te("poll")};if(z.readyState!=="complete"){if(z.createEventObject&&te.doScroll){try{O=!ie.frameElement}catch(De){}O&&Oe()}return z[ce](me+"DOMContentLoaded",Te,!1),z[ce](me+"readystatechange",Te,!1),ie[ce](me+"load",Te,!1)}};at._autoDiscoverFunction=function(){if(at.autoDiscover)return at.discover()},Wt(window,at._autoDiscoverFunction);function yr(oe,ie){return typeof oe!="undefined"&&oe!==null?ie(oe):void 0}function Jt(oe,ie,Z){return typeof oe!="undefined"&&oe!==null&&typeof oe[ie]=="function"?Z(oe,ie):void 0}window.Dropzone=at;var _r=at}(),u}()})});var mf=Me((Wk,pf)=>{pf.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 Bs=Me(($k,gf)=>{"use strict";gf.exports=mf()});var Xo=Me((Gk,vf)=>{vf.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 wf=Me((Kk,yf)=>{"use strict";var bf={};function vb(n){var t,i,u=bf[n];if(u)return u;for(u=bf[n]=[],t=0;t<128;t++)i=String.fromCharCode(t),/^[0-9a-z]$/i.test(i)?u.push(i):u.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<n.length;t++)u[n.charCodeAt(t)]=n[t];return u}function Yo(n,t,i){var u,c,h,a,d,f="";for(typeof t!="string"&&(i=t,t=Yo.defaultChars),typeof i=="undefined"&&(i=!0),d=vb(t),u=0,c=n.length;u<c;u++){if(h=n.charCodeAt(u),i&&h===37&&u+2<c&&/^[0-9a-f]{2}$/i.test(n.slice(u+1,u+3))){f+=n.slice(u,u+3),u+=2;continue}if(h<128){f+=d[h];continue}if(h>=55296&&h<=57343){if(h>=55296&&h<=56319&&u+1<c&&(a=n.charCodeAt(u+1),a>=56320&&a<=57343)){f+=encodeURIComponent(n[u]+n[u+1]),u++;continue}f+="%EF%BF%BD";continue}f+=encodeURIComponent(n[u])}return f}Yo.defaultChars=";/?:@&=+$,-_.!~*'()#";Yo.componentChars="-_.!~*'()";yf.exports=Yo});var Sf=Me((Vk,xf)=>{"use strict";var kf={};function yb(n){var t,i,u=kf[n];if(u)return u;for(u=kf[n]=[],t=0;t<128;t++)i=String.fromCharCode(t),u.push(i);for(t=0;t<n.length;t++)i=n.charCodeAt(t),u[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2);return u}function Zo(n,t){var i;return typeof t!="string"&&(t=Zo.defaultChars),i=yb(t),n.replace(/(%[a-f0-9]{2})+/gi,function(u){var c,h,a,d,f,p,y,m="";for(c=0,h=u.length;c<h;c+=3){if(a=parseInt(u.slice(c+1,c+3),16),a<128){m+=i[a];continue}if((a&224)===192&&c+3<h&&(d=parseInt(u.slice(c+4,c+6),16),(d&192)===128)){y=a<<6&1984|d&63,y<128?m+="<22><>":m+=String.fromCharCode(y),c+=3;continue}if((a&240)===224&&c+6<h&&(d=parseInt(u.slice(c+4,c+6),16),f=parseInt(u.slice(c+7,c+9),16),(d&192)===128&&(f&192)===128)){y=a<<12&61440|d<<6&4032|f&63,y<2048||y>=55296&&y<=57343?m+="<22><><EFBFBD>":m+=String.fromCharCode(y),c+=6;continue}if((a&248)===240&&c+9<h&&(d=parseInt(u.slice(c+4,c+6),16),f=parseInt(u.slice(c+7,c+9),16),p=parseInt(u.slice(c+10,c+12),16),(d&192)===128&&(f&192)===128&&(p&192)===128)){y=a<<18&1835008|d<<12&258048|f<<6&4032|p&63,y<65536||y>1114111?m+="<22><><EFBFBD><EFBFBD>":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),c+=9;continue}m+="<22>"}return m})}Zo.defaultChars=";/?:@&=+$,#";Zo.componentChars="";xf.exports=Zo});var Cf=Me((Xk,Ef)=>{"use strict";Ef.exports=function(t){var i="";return i+=t.protocol||"",i+=t.slashes?"//":"",i+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?i+="["+t.hostname+"]":i+=t.hostname||"",i+=t.port?":"+t.port:"",i+=t.pathname||"",i+=t.search||"",i+=t.hash||"",i}});var Ff=Me((Yk,_f)=>{"use strict";function Qo(){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 bb=/^([a-z0-9.+-]+:)/i,wb=/:[0-9]*$/,xb=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,kb=["<",">",'"',"`"," ","\r",`
`," "],Sb=["{","}","|","\\","^","`"].concat(kb),Eb=["'"].concat(Sb),Af=["%","/","?",";","#"].concat(Eb),Tf=["/","?","#"],Cb=255,Df=/^[+a-z0-9A-Z_-]{0,63}$/,_b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,If={javascript:!0,"javascript:":!0},Lf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Ab(n,t){if(n&&n instanceof Qo)return n;var i=new Qo;return i.parse(n,t),i}Qo.prototype.parse=function(n,t){var i,u,c,h,a,d=n;if(d=d.trim(),!t&&n.split("#").length===1){var f=xb.exec(d);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var p=bb.exec(d);if(p&&(p=p[0],c=p.toLowerCase(),this.protocol=p,d=d.substr(p.length)),(t||p||d.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=d.substr(0,2)==="//",a&&!(p&&If[p])&&(d=d.substr(2),this.slashes=!0)),!If[p]&&(a||p&&!Lf[p])){var y=-1;for(i=0;i<Tf.length;i++)h=d.indexOf(Tf[i]),h!==-1&&(y===-1||h<y)&&(y=h);var m,v;for(y===-1?v=d.lastIndexOf("@"):v=d.lastIndexOf("@",y),v!==-1&&(m=d.slice(0,v),d=d.slice(v+1),this.auth=m),y=-1,i=0;i<Af.length;i++)h=d.indexOf(Af[i]),h!==-1&&(y===-1||h<y)&&(y=h);y===-1&&(y=d.length),d[y-1]===":"&&y--;var b=d.slice(0,y);d=d.slice(y),this.parseHost(b),this.hostname=this.hostname||"";var S=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!S){var E=this.hostname.split(/\./);for(i=0,u=E.length;i<u;i++){var x=E[i];if(!x)continue;if(!x.match(Df)){for(var D="",C=0,N=x.length;C<N;C++)x.charCodeAt(C)>127?D+="x":D+=x[C];if(!D.match(Df)){var R=E.slice(0,i),H=E.slice(i+1),j=x.match(_b);j&&(R.push(j[1]),H.unshift(j[2])),H.length&&(d=H.join(".")+d),this.hostname=R.join(".");break}}}}this.hostname.length>Cb&&(this.hostname=""),S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var J=d.indexOf("#");J!==-1&&(this.hash=d.substr(J),d=d.slice(0,J));var W=d.indexOf("?");return W!==-1&&(this.search=d.substr(W),d=d.slice(0,W)),d&&(this.pathname=d),Lf[c]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Qo.prototype.parseHost=function(n){var t=wb.exec(n);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),n=n.substr(0,n.length-t.length)),n&&(this.hostname=n)};_f.exports=Ab});var js=Me((Zk,Zi)=>{"use strict";Zi.exports.encode=wf();Zi.exports.decode=Sf();Zi.exports.format=Cf();Zi.exports.parse=Ff()});var qs=Me((Qk,Mf)=>{Mf.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var Us=Me((Jk,Rf)=>{Rf.exports=/[\0-\x1F\x7F-\x9F]/});var Pf=Me((e2,Of)=>{Of.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 Hs=Me((t2,Nf)=>{Nf.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var zf=Me(si=>{"use strict";si.Any=qs();si.Cc=Us();si.Cf=Pf();si.P=Xo();si.Z=Hs()});var Dt=Me(ir=>{"use strict";function Tb(n){return Object.prototype.toString.call(n)}function Db(n){return Tb(n)==="[object String]"}var Ib=Object.prototype.hasOwnProperty;function Bf(n,t){return Ib.call(n,t)}function Lb(n){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(u){n[u]=i[u]})}),n}function Fb(n,t,i){return[].concat(n.slice(0,t),i,n.slice(t+1))}function jf(n){return n>=55296&&n<=57343||(n>=64976&&n<=65007||((n&65535)===65535||(n&65535)===65534||(n>=0&&n<=8||(n===11||(n>=14&&n<=31||n>=127&&n<=159)))))?!1:!(n>1114111)}function qf(n){if(n>65535){n-=65536;var t=55296+(n>>10),i=56320+(n&1023);return String.fromCharCode(t,i)}return String.fromCharCode(n)}var Uf=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,Mb=/&([a-z#][a-z0-9]{1,31});/gi,Rb=new RegExp(Uf.source+"|"+Mb.source,"gi"),Ob=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,Hf=Bs();function Pb(n,t){var i=0;return Bf(Hf,t)?Hf[t]:t.charCodeAt(0)===35&&Ob.test(t)&&(i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),jf(i))?qf(i):n}function Nb(n){return n.indexOf("\\")<0?n:n.replace(Uf,"$1")}function zb(n){return n.indexOf("\\")<0&&n.indexOf("&")<0?n:n.replace(Rb,function(t,i,u){return i||Pb(t,u)})}var Bb=/[&<>"]/,jb=/[&<>"]/g,qb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Ub(n){return qb[n]}function Hb(n){return Bb.test(n)?n.replace(jb,Ub):n}var Wb=/[.?*+^$[\]\\(){}|-]/g;function $b(n){return n.replace(Wb,"\\$&")}function Gb(n){switch(n){case 9:case 32:return!0}return!1}function Kb(n){if(n>=8192&&n<=8202)return!0;switch(n){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 Vb=Xo();function Xb(n){return Vb.test(n)}function Yb(n){switch(n){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 Zb(n){return n=n.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(n=n.replace(/ẞ/g,"ß")),n.toLowerCase().toUpperCase()}ir.lib={};ir.lib.mdurl=js();ir.lib.ucmicro=zf();ir.assign=Lb;ir.isString=Db;ir.has=Bf;ir.unescapeMd=Nb;ir.unescapeAll=zb;ir.isValidEntityCode=jf;ir.fromCodePoint=qf;ir.escapeHtml=Hb;ir.arrayReplaceAt=Fb;ir.isSpace=Gb;ir.isWhiteSpace=Kb;ir.isMdAsciiPunct=Yb;ir.isPunctChar=Xb;ir.escapeRE=$b;ir.normalizeReference=Zb});var $f=Me((i2,Wf)=>{"use strict";Wf.exports=function(t,i,u){var c,h,a,d,f=-1,p=t.posMax,y=t.pos;for(t.pos=i+1,c=1;t.pos<p;){if(a=t.src.charCodeAt(t.pos),a===93&&(c--,c===0)){h=!0;break}if(d=t.pos,t.md.inline.skipToken(t),a===91){if(d===t.pos-1)c++;else if(u)return t.pos=y,-1}}return h&&(f=t.pos),t.pos=y,f}});var Vf=Me((o2,Gf)=>{"use strict";var Kf=Dt().unescapeAll;Gf.exports=function(t,i,u){var c,h,a=0,d=i,f={ok:!1,pos:0,lines:0,str:""};if(t.charCodeAt(i)===60){for(i++;i<u;){if(c=t.charCodeAt(i),c===10)return f;if(c===62)return f.pos=i+1,f.str=Kf(t.slice(d+1,i)),f.ok=!0,f;if(c===92&&i+1<u){i+=2;continue}i++}return f}for(h=0;i<u&&!(c=t.charCodeAt(i),c===32);){if(c<32||c===127)break;if(c===92&&i+1<u){i+=2;continue}if(c===40&&h++,c===41){if(h===0)break;h--}i++}return d===i||(h!==0||(f.str=Kf(t.slice(d,i)),f.lines=a,f.pos=i,f.ok=!0)),f}});var Yf=Me((a2,Xf)=>{"use strict";var Qb=Dt().unescapeAll;Xf.exports=function(t,i,u){var c,h,a=0,d=i,f={ok:!1,pos:0,lines:0,str:""};if(i>=u)return f;if(h=t.charCodeAt(i),h!==34&&h!==39&&h!==40)return f;for(i++,h===40&&(h=41);i<u;){if(c=t.charCodeAt(i),c===h)return f.pos=i+1,f.lines=a,f.str=Qb(t.slice(d+1,i)),f.ok=!0,f;c===10?a++:c===92&&i+1<u&&(i++,t.charCodeAt(i)===10&&a++),i++}return f}});var Zf=Me(Jo=>{"use strict";Jo.parseLinkLabel=$f();Jo.parseLinkDestination=Vf();Jo.parseLinkTitle=Yf()});var Jf=Me((l2,Qf)=>{"use strict";var Jb=Dt().assign,ew=Dt().unescapeAll,Pn=Dt().escapeHtml,Yr={};Yr.code_inline=function(n,t,i,u,c){var h=n[t];return"<code"+c.renderAttrs(h)+">"+Pn(n[t].content)+"</code>"};Yr.code_block=function(n,t,i,u,c){var h=n[t];return"<pre"+c.renderAttrs(h)+"><code>"+Pn(n[t].content)+`</code></pre>
`};Yr.fence=function(n,t,i,u,c){var h=n[t],a=h.info?ew(h.info).trim():"",d="",f,p,y,m;return a&&(d=a.split(/\s+/g)[0]),i.highlight?f=i.highlight(h.content,d)||Pn(h.content):f=Pn(h.content),f.indexOf("<pre")===0?f+`
`:a?(p=h.attrIndex("class"),y=h.attrs?h.attrs.slice():[],p<0?y.push(["class",i.langPrefix+d]):y[p][1]+=" "+i.langPrefix+d,m={attrs:y},"<pre><code"+c.renderAttrs(m)+">"+f+`</code></pre>
`):"<pre><code"+c.renderAttrs(h)+">"+f+`</code></pre>
`};Yr.image=function(n,t,i,u,c){var h=n[t];return h.attrs[h.attrIndex("alt")][1]=c.renderInlineAsText(h.children,i,u),c.renderToken(n,t,i)};Yr.hardbreak=function(n,t,i){return i.xhtmlOut?`<br />
`:`<br>
`};Yr.softbreak=function(n,t,i){return i.breaks?i.xhtmlOut?`<br />
`:`<br>
`:`
`};Yr.text=function(n,t){return Pn(n[t].content)};Yr.html_block=function(n,t){return n[t].content};Yr.html_inline=function(n,t){return n[t].content};function li(){this.rules=Jb({},Yr)}li.prototype.renderAttrs=function(t){var i,u,c;if(!t.attrs)return"";for(c="",i=0,u=t.attrs.length;i<u;i++)c+=" "+Pn(t.attrs[i][0])+'="'+Pn(t.attrs[i][1])+'"';return c};li.prototype.renderToken=function(t,i,u){var c,h="",a=!1,d=t[i];return d.hidden?"":(d.block&&d.nesting!==-1&&i&&t[i-1].hidden&&(h+=`
`),h+=(d.nesting===-1?"</":"<")+d.tag,h+=this.renderAttrs(d),d.nesting===0&&u.xhtmlOut&&(h+=" /"),d.block&&(a=!0,d.nesting===1&&(i+1<t.length&&(c=t[i+1],(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===d.tag)&&(a=!1)))),h+=a?`>
`:">",h)};li.prototype.renderInline=function(n,t,i){for(var u,c="",h=this.rules,a=0,d=n.length;a<d;a++)u=n[a].type,typeof h[u]!="undefined"?c+=h[u](n,a,t,i,this):c+=this.renderToken(n,a,t);return c};li.prototype.renderInlineAsText=function(n,t,i){for(var u="",c=0,h=n.length;c<h;c++)n[c].type==="text"?u+=n[c].content:n[c].type==="image"&&(u+=this.renderInlineAsText(n[c].children,t,i));return u};li.prototype.render=function(n,t,i){var u,c,h,a="",d=this.rules;for(u=0,c=n.length;u<c;u++)h=n[u].type,h==="inline"?a+=this.renderInline(n[u].children,t,i):typeof d[h]!="undefined"?a+=d[n[u].type](n,u,t,i,this):a+=this.renderToken(n,u,t,i);return a};Qf.exports=li});var ea=Me((u2,eh)=>{"use strict";function Hr(){this.__rules__=[],this.__cache__=null}Hr.prototype.__find__=function(n){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===n)return t;return-1};Hr.prototype.__compile__=function(){var n=this,t=[""];n.__rules__.forEach(function(i){if(!i.enabled)return;i.alt.forEach(function(u){t.indexOf(u)<0&&t.push(u)})}),n.__cache__={},t.forEach(function(i){n.__cache__[i]=[],n.__rules__.forEach(function(u){if(!u.enabled)return;if(i&&u.alt.indexOf(i)<0)return;n.__cache__[i].push(u.fn)})})};Hr.prototype.at=function(n,t,i){var u=this.__find__(n),c=i||{};if(u===-1)throw new Error("Parser rule not found: "+n);this.__rules__[u].fn=t,this.__rules__[u].alt=c.alt||[],this.__cache__=null};Hr.prototype.before=function(n,t,i,u){var c=this.__find__(n),h=u||{};if(c===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(c,0,{name:t,enabled:!0,fn:i,alt:h.alt||[]}),this.__cache__=null};Hr.prototype.after=function(n,t,i,u){var c=this.__find__(n),h=u||{};if(c===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(c+1,0,{name:t,enabled:!0,fn:i,alt:h.alt||[]}),this.__cache__=null};Hr.prototype.push=function(n,t,i){var u=i||{};this.__rules__.push({name:n,enabled:!0,fn:t,alt:u.alt||[]}),this.__cache__=null};Hr.prototype.enable=function(n,t){Array.isArray(n)||(n=[n]);var i=[];return n.forEach(function(u){var c=this.__find__(u);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[c].enabled=!0,i.push(u)},this),this.__cache__=null,i};Hr.prototype.enableOnly=function(n,t){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(i){i.enabled=!1}),this.enable(n,t)};Hr.prototype.disable=function(n,t){Array.isArray(n)||(n=[n]);var i=[];return n.forEach(function(u){var c=this.__find__(u);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+u)}this.__rules__[c].enabled=!1,i.push(u)},this),this.__cache__=null,i};Hr.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};eh.exports=Hr});var rh=Me((c2,th)=>{"use strict";var tw=/\r\n?|\n/g,rw=/\0/g;th.exports=function(t){var i;i=t.src.replace(tw,`
`),i=i.replace(rw,"<22>"),t.src=i}});var ih=Me((d2,nh)=>{"use strict";nh.exports=function(t){var i;t.inlineMode?(i=new t.Token("inline","",0),i.content=t.src,i.map=[0,1],i.children=[],t.tokens.push(i)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var ah=Me((f2,oh)=>{"use strict";oh.exports=function(t){var i=t.tokens,u,c,h;for(c=0,h=i.length;c<h;c++)u=i[c],u.type==="inline"&&t.md.inline.parse(u.content,t.md,t.env,u.children)}});var lh=Me((h2,sh)=>{"use strict";var nw=Dt().arrayReplaceAt;function iw(n){return/^<a[>\s]/i.test(n)}function ow(n){return/^<\/a\s*>/i.test(n)}sh.exports=function(t){var i,u,c,h,a,d,f,p,y,m,v,b,S,E,x,D,C=t.tokens,N;if(!t.md.options.linkify)return;for(u=0,c=C.length;u<c;u++){if(C[u].type!=="inline"||!t.md.linkify.pretest(C[u].content))continue;for(h=C[u].children,S=0,i=h.length-1;i>=0;i--){if(d=h[i],d.type==="link_close"){for(i--;h[i].level!==d.level&&h[i].type!=="link_open";)i--;continue}if(d.type==="html_inline"&&(iw(d.content)&&S>0&&S--,ow(d.content)&&S++),S>0)continue;if(d.type==="text"&&t.md.linkify.test(d.content)){for(y=d.content,N=t.md.linkify.match(y),f=[],b=d.level,v=0,p=0;p<N.length;p++){if(E=N[p].url,x=t.md.normalizeLink(E),!t.md.validateLink(x))continue;D=N[p].text,N[p].schema?N[p].schema==="mailto:"&&!/^mailto:/i.test(D)?D=t.md.normalizeLinkText("mailto:"+D).replace(/^mailto:/,""):D=t.md.normalizeLinkText(D):D=t.md.normalizeLinkText("http://"+D).replace(/^http:\/\//,""),m=N[p].index,m>v&&(a=new t.Token("text","",0),a.content=y.slice(v,m),a.level=b,f.push(a)),a=new t.Token("link_open","a",1),a.attrs=[["href",x]],a.level=b++,a.markup="linkify",a.info="auto",f.push(a),a=new t.Token("text","",0),a.content=D,a.level=b,f.push(a),a=new t.Token("link_close","a",-1),a.level=--b,a.markup="linkify",a.info="auto",f.push(a),v=N[p].lastIndex}v<y.length&&(a=new t.Token("text","",0),a.content=y.slice(v),a.level=b,f.push(a)),C[u].children=h=nw(h,i,f)}}}}});var dh=Me((p2,uh)=>{"use strict";var ch=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,aw=/\((c|tm|r|p)\)/i,sw=/\((c|tm|r|p)\)/ig,lw={c:"©",r:"®",p:"§",tm:"™"};function uw(n,t){return lw[t.toLowerCase()]}function cw(n){var t,i,u=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!u&&(i.content=i.content.replace(sw,uw)),i.type==="link_open"&&i.info==="auto"&&u--,i.type==="link_close"&&i.info==="auto"&&u++}function dw(n){var t,i,u=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!u&&(ch.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"&&u--,i.type==="link_close"&&i.info==="auto"&&u++}uh.exports=function(t){var i;if(!t.md.options.typographer)return;for(i=t.tokens.length-1;i>=0;i--){if(t.tokens[i].type!=="inline")continue;aw.test(t.tokens[i].content)&&cw(t.tokens[i].children),ch.test(t.tokens[i].content)&&dw(t.tokens[i].children)}}});var yh=Me((m2,fh)=>{"use strict";var hh=Dt().isWhiteSpace,ph=Dt().isPunctChar,mh=Dt().isMdAsciiPunct,fw=/['"]/,gh=/['"]/g,vh="";function ta(n,t,i){return n.substr(0,t)+i+n.substr(t+1)}function hw(n,t){var i,u,c,h,a,d,f,p,y,m,v,b,S,E,x,D,C,N,R,H,j;for(R=[],i=0;i<n.length;i++){for(u=n[i],f=n[i].level,C=R.length-1;C>=0&&!(R[C].level<=f);C--);if(R.length=C+1,u.type!=="text")continue;c=u.content,a=0,d=c.length;e:for(;a<d&&!(gh.lastIndex=a,h=gh.exec(c),!h);){if(x=D=!0,a=h.index+1,N=h[0]==="'",y=32,h.index-1>=0)y=c.charCodeAt(h.index-1);else for(C=i-1;C>=0&&!(n[C].type==="softbreak"||n[C].type==="hardbreak");C--){if(!n[C].content)continue;y=n[C].content.charCodeAt(n[C].content.length-1);break}if(m=32,a<d)m=c.charCodeAt(a);else for(C=i+1;C<n.length&&!(n[C].type==="softbreak"||n[C].type==="hardbreak");C++){if(!n[C].content)continue;m=n[C].content.charCodeAt(0);break}if(v=mh(y)||ph(String.fromCharCode(y)),b=mh(m)||ph(String.fromCharCode(m)),S=hh(y),E=hh(m),E?x=!1:b&&(S||v||(x=!1)),S?D=!1:v&&(E||b||(D=!1)),m===34&&h[0]==='"'&&(y>=48&&y<=57&&(D=x=!1)),x&&D&&(x=v,D=b),!x&&!D){N&&(u.content=ta(u.content,h.index,vh));continue}if(D){for(C=R.length-1;C>=0&&!(p=R[C],R[C].level<f);C--)if(p.single===N&&R[C].level===f){p=R[C],N?(H=t.md.options.quotes[2],j=t.md.options.quotes[3]):(H=t.md.options.quotes[0],j=t.md.options.quotes[1]),u.content=ta(u.content,h.index,j),n[p.token].content=ta(n[p.token].content,p.pos,H),a+=j.length-1,p.token===i&&(a+=H.length-1),c=u.content,d=c.length,R.length=C;continue e}}x?R.push({token:i,pos:h.index,single:N,level:f}):D&&N&&(u.content=ta(u.content,h.index,vh))}}}fh.exports=function(t){var i;if(!t.md.options.typographer)return;for(i=t.tokens.length-1;i>=0;i--){if(t.tokens[i].type!=="inline"||!fw.test(t.tokens[i].content))continue;hw(t.tokens[i].children,t)}}});var ra=Me((g2,bh)=>{"use strict";function ui(n,t,i){this.type=n,this.tag=t,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}ui.prototype.attrIndex=function(t){var i,u,c;if(!this.attrs)return-1;for(i=this.attrs,u=0,c=i.length;u<c;u++)if(i[u][0]===t)return u;return-1};ui.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};ui.prototype.attrSet=function(t,i){var u=this.attrIndex(t),c=[t,i];u<0?this.attrPush(c):this.attrs[u]=c};ui.prototype.attrGet=function(t){var i=this.attrIndex(t),u=null;return i>=0&&(u=this.attrs[i][1]),u};ui.prototype.attrJoin=function(t,i){var u=this.attrIndex(t);u<0?this.attrPush([t,i]):this.attrs[u][1]=this.attrs[u][1]+" "+i};bh.exports=ui});var kh=Me((v2,wh)=>{"use strict";var pw=ra();function xh(n,t,i){this.src=n,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=t}xh.prototype.Token=pw;wh.exports=xh});var Eh=Me((y2,Sh)=>{"use strict";var mw=ea(),Ws=[["normalize",rh()],["block",ih()],["inline",ah()],["linkify",lh()],["replacements",dh()],["smartquotes",yh()]];function $s(){this.ruler=new mw;for(var n=0;n<Ws.length;n++)this.ruler.push(Ws[n][0],Ws[n][1])}$s.prototype.process=function(n){var t,i,u;for(u=this.ruler.getRules(""),t=0,i=u.length;t<i;t++)u[t](n)};$s.prototype.State=kh();Sh.exports=$s});var Ah=Me((b2,Ch)=>{"use strict";var gw=Dt().isSpace;function Gs(n,t){var i=n.bMarks[t]+n.blkIndent,u=n.eMarks[t];return n.src.substr(i,u-i)}function _h(n){var t=[],i=0,u=n.length,c,h=0,a=0,d=!1,f=0;for(c=n.charCodeAt(i);i<u;)c===96?d?(d=!1,f=i):h%2===0&&(d=!0,f=i):c===124&&h%2===0&&!d&&(t.push(n.substring(a,i)),a=i+1),c===92?h++:h=0,i++,i===u&&d&&(d=!1,i=f+1),c=n.charCodeAt(i);return t.push(n.substring(a)),t}Ch.exports=function(t,i,u,c){var h,a,d,f,p,y,m,v,b,S,E,x;if(i+2>u)return!1;if(p=i+1,t.sCount[p]<t.blkIndent)return!1;if(t.sCount[p]-t.blkIndent>=4)return!1;if(d=t.bMarks[p]+t.tShift[p],d>=t.eMarks[p])return!1;if(h=t.src.charCodeAt(d++),h!==124&&h!==45&&h!==58)return!1;for(;d<t.eMarks[p];){if(h=t.src.charCodeAt(d),h!==124&&h!==45&&h!==58&&!gw(h))return!1;d++}for(a=Gs(t,i+1),y=a.split("|"),b=[],f=0;f<y.length;f++){if(S=y[f].trim(),!S){if(f===0||f===y.length-1)continue;return!1}if(!/^:?-+:?$/.test(S))return!1;S.charCodeAt(S.length-1)===58?b.push(S.charCodeAt(0)===58?"center":"right"):S.charCodeAt(0)===58?b.push("left"):b.push("")}if(a=Gs(t,i).trim(),a.indexOf("|")===-1)return!1;if(t.sCount[i]-t.blkIndent>=4)return!1;if(y=_h(a.replace(/^\||\|$/g,"")),m=y.length,m>b.length)return!1;if(c)return!0;for(v=t.push("table_open","table",1),v.map=E=[i,0],v=t.push("thead_open","thead",1),v.map=[i,i+1],v=t.push("tr_open","tr",1),v.map=[i,i+1],f=0;f<y.length;f++)v=t.push("th_open","th",1),v.map=[i,i+1],b[f]&&(v.attrs=[["style","text-align:"+b[f]]]),v=t.push("inline","",0),v.content=y[f].trim(),v.map=[i,i+1],v.children=[],v=t.push("th_close","th",-1);for(v=t.push("tr_close","tr",-1),v=t.push("thead_close","thead",-1),v=t.push("tbody_open","tbody",1),v.map=x=[i+2,0],p=i+2;p<u&&!(t.sCount[p]<t.blkIndent);p++){if(a=Gs(t,p).trim(),a.indexOf("|")===-1)break;if(t.sCount[p]-t.blkIndent>=4)break;for(y=_h(a.replace(/^\||\|$/g,"")),v=t.push("tr_open","tr",1),f=0;f<m;f++)v=t.push("td_open","td",1),v.map=[p,p+1],b[f]&&(v.attrs=[["style","text-align:"+b[f]]]),v=t.push("inline","",0),v.map=[p,p+1],v.content=y[f]?y[f].trim():"",v.children=[],v=t.push("td_close","td",-1);v=t.push("tr_close","tr",-1)}return v=t.push("tbody_close","tbody",-1),v=t.push("table_close","table",-1),E[1]=x[1]=p,t.line=p,!0}});var Dh=Me((w2,Th)=>{"use strict";Th.exports=function(t,i,u){var c,h,a;if(t.sCount[i]-t.blkIndent<4)return!1;for(h=c=i+1;c<u;){if(t.isEmpty(c)){c++;continue}if(t.sCount[c]-t.blkIndent>=4){c++,h=c;continue}break}return t.line=h,a=t.push("code_block","code",0),a.content=t.getLines(i,h,4+t.blkIndent,!0),a.map=[i,t.line],!0}});var Lh=Me((x2,Ih)=>{"use strict";Ih.exports=function(t,i,u,c){var h,a,d,f,p,y,m,v=!1,b=t.bMarks[i]+t.tShift[i],S=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(b+3>S)return!1;if(h=t.src.charCodeAt(b),h!==126&&h!==96)return!1;if(p=b,b=t.skipChars(b,h),a=b-p,a<3)return!1;if(m=t.src.slice(p,b),d=t.src.slice(b,S),h===96&&d.indexOf(String.fromCharCode(h))>=0)return!1;if(c)return!0;for(f=i;!(f++,f>=u);){if(b=p=t.bMarks[f]+t.tShift[f],S=t.eMarks[f],b<S&&t.sCount[f]<t.blkIndent)break;if(t.src.charCodeAt(b)!==h)continue;if(t.sCount[f]-t.blkIndent>=4)continue;if(b=t.skipChars(b,h),b-p<a)continue;if(b=t.skipSpaces(b),b<S)continue;v=!0;break}return a=t.sCount[i],t.line=f+(v?1:0),y=t.push("fence","code",0),y.info=d,y.content=t.getLines(i+1,f,a,!0),y.markup=m,y.map=[i,t.line],!0}});var Rh=Me((k2,Fh)=>{"use strict";var Mh=Dt().isSpace;Fh.exports=function(t,i,u,c){var h,a,d,f,p,y,m,v,b,S,E,x,D,C,N,R,H,j,J,W,Y=t.lineMax,M=t.bMarks[i]+t.tShift[i],K=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(t.src.charCodeAt(M++)!==62)return!1;if(c)return!0;for(f=b=t.sCount[i]+1,t.src.charCodeAt(M)===32?(M++,f++,b++,h=!1,R=!0):t.src.charCodeAt(M)===9?(R=!0,(t.bsCount[i]+b)%4===3?(M++,f++,b++,h=!1):h=!0):R=!1,S=[t.bMarks[i]],t.bMarks[i]=M;M<K&&(a=t.src.charCodeAt(M),Mh(a));){a===9?b+=4-(b+t.bsCount[i]+(h?1:0))%4:b++;M++}for(E=[t.bsCount[i]],t.bsCount[i]=t.sCount[i]+1+(R?1:0),y=M>=K,C=[t.sCount[i]],t.sCount[i]=b-f,N=[t.tShift[i]],t.tShift[i]=M-t.bMarks[i],j=t.md.block.ruler.getRules("blockquote"),D=t.parentType,t.parentType="blockquote",v=i+1;v<u&&!(W=t.sCount[v]<t.blkIndent,M=t.bMarks[v]+t.tShift[v],K=t.eMarks[v],M>=K);v++){if(t.src.charCodeAt(M++)===62&&!W){for(f=b=t.sCount[v]+1,t.src.charCodeAt(M)===32?(M++,f++,b++,h=!1,R=!0):t.src.charCodeAt(M)===9?(R=!0,(t.bsCount[v]+b)%4===3?(M++,f++,b++,h=!1):h=!0):R=!1,S.push(t.bMarks[v]),t.bMarks[v]=M;M<K&&(a=t.src.charCodeAt(M),Mh(a));){a===9?b+=4-(b+t.bsCount[v]+(h?1:0))%4:b++;M++}y=M>=K,E.push(t.bsCount[v]),t.bsCount[v]=t.sCount[v]+1+(R?1:0),C.push(t.sCount[v]),t.sCount[v]=b-f,N.push(t.tShift[v]),t.tShift[v]=M-t.bMarks[v];continue}if(y)break;for(H=!1,d=0,p=j.length;d<p;d++)if(j[d](t,v,u,!0)){H=!0;break}if(H){t.lineMax=v,t.blkIndent!==0&&(S.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),C.push(t.sCount[v]),t.sCount[v]-=t.blkIndent);break}S.push(t.bMarks[v]),E.push(t.bsCount[v]),N.push(t.tShift[v]),C.push(t.sCount[v]),t.sCount[v]=-1}for(x=t.blkIndent,t.blkIndent=0,J=t.push("blockquote_open","blockquote",1),J.markup=">",J.map=m=[i,0],t.md.block.tokenize(t,i,v),J=t.push("blockquote_close","blockquote",-1),J.markup=">",t.lineMax=Y,t.parentType=D,m[1]=t.line,d=0;d<N.length;d++)t.bMarks[d+i]=S[d],t.tShift[d+i]=N[d],t.sCount[d+i]=C[d],t.bsCount[d+i]=E[d];return t.blkIndent=x,!0}});var Ph=Me((S2,Oh)=>{"use strict";var vw=Dt().isSpace;Oh.exports=function(t,i,u,c){var h,a,d,f,p=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(h=t.src.charCodeAt(p++),h!==42&&h!==45&&h!==95)return!1;for(a=1;p<y;){if(d=t.src.charCodeAt(p++),d!==h&&!vw(d))return!1;d===h&&a++}return a<3?!1:(c||(t.line=i+1,f=t.push("hr","hr",0),f.map=[i,t.line],f.markup=Array(a+1).join(String.fromCharCode(h))),!0)}});var qh=Me((E2,Nh)=>{"use strict";var zh=Dt().isSpace;function Bh(n,t){var i,u,c,h;return u=n.bMarks[t]+n.tShift[t],c=n.eMarks[t],i=n.src.charCodeAt(u++),i!==42&&i!==45&&i!==43||u<c&&(h=n.src.charCodeAt(u),!zh(h))?-1:u}function jh(n,t){var i,u=n.bMarks[t]+n.tShift[t],c=u,h=n.eMarks[t];if(c+1>=h)return-1;if(i=n.src.charCodeAt(c++),i<48||i>57)return-1;for(;;){if(c>=h)return-1;if(i=n.src.charCodeAt(c++),i>=48&&i<=57){if(c-u>=10)return-1;continue}if(i===41||i===46)break;return-1}return c<h&&(i=n.src.charCodeAt(c),!zh(i))?-1:c}function yw(n,t){var i,u,c=n.level+2;for(i=t+2,u=n.tokens.length-2;i<u;i++)n.tokens[i].level===c&&n.tokens[i].type==="paragraph_open"&&(n.tokens[i+2].hidden=!0,n.tokens[i].hidden=!0,i+=2)}Nh.exports=function(t,i,u,c){var h,a,d,f,p,y,m,v,b,S,E,x,D,C,N,R,H,j,J,W,Y,M,K,k,G,B,re,I,P=!1,le=!0;if(t.sCount[i]-t.blkIndent>=4)return!1;if(t.listIndent>=0&&t.sCount[i]-t.listIndent>=4&&t.sCount[i]<t.blkIndent)return!1;if(c&&t.parentType==="paragraph"&&(t.tShift[i]>=t.blkIndent&&(P=!0)),(K=jh(t,i))>=0){if(m=!0,G=t.bMarks[i]+t.tShift[i],D=Number(t.src.substr(G,K-G-1)),P&&D!==1)return!1}else if((K=Bh(t,i))>=0)m=!1;else return!1;if(P&&t.skipSpaces(K)>=t.eMarks[i])return!1;if(x=t.src.charCodeAt(K-1),c)return!0;for(E=t.tokens.length,m?(I=t.push("ordered_list_open","ol",1),D!==1&&(I.attrs=[["start",D]])):I=t.push("bullet_list_open","ul",1),I.map=S=[i,0],I.markup=String.fromCharCode(x),N=i,k=!1,re=t.md.block.ruler.getRules("list"),j=t.parentType,t.parentType="list";N<u;){for(M=K,C=t.eMarks[N],y=R=t.sCount[N]+K-(t.bMarks[i]+t.tShift[i]);M<C;){if(h=t.src.charCodeAt(M),h===9)R+=4-(R+t.bsCount[N])%4;else if(h===32)R++;else break;M++}if(a=M,a>=C?p=1:p=R-y,p>4&&(p=1),f=y+p,I=t.push("list_item_open","li",1),I.markup=String.fromCharCode(x),I.map=v=[i,0],Y=t.tight,W=t.tShift[i],J=t.sCount[i],H=t.listIndent,t.listIndent=t.blkIndent,t.blkIndent=f,t.tight=!0,t.tShift[i]=a-t.bMarks[i],t.sCount[i]=R,a>=C&&t.isEmpty(i+1)?t.line=Math.min(t.line+2,u):t.md.block.tokenize(t,i,u,!0),(!t.tight||k)&&(le=!1),k=t.line-i>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=H,t.tShift[i]=W,t.sCount[i]=J,t.tight=Y,I=t.push("list_item_close","li",-1),I.markup=String.fromCharCode(x),N=i=t.line,v[1]=N,a=t.bMarks[i],N>=u)break;if(t.sCount[N]<t.blkIndent)break;if(t.sCount[i]-t.blkIndent>=4)break;for(B=!1,d=0,b=re.length;d<b;d++)if(re[d](t,N,u,!0)){B=!0;break}if(B)break;if(m){if(K=jh(t,N),K<0)break}else if(K=Bh(t,N),K<0)break;if(x!==t.src.charCodeAt(K-1))break}return m?I=t.push("ordered_list_close","ol",-1):I=t.push("bullet_list_close","ul",-1),I.markup=String.fromCharCode(x),S[1]=N,t.line=N,t.parentType=j,le&&yw(t,E),!0}});var Hh=Me((C2,Uh)=>{"use strict";var bw=Dt().normalizeReference,na=Dt().isSpace;Uh.exports=function(t,i,u,c){var h,a,d,f,p,y,m,v,b,S,E,x,D,C,N,R,H=0,j=t.bMarks[i]+t.tShift[i],J=t.eMarks[i],W=i+1;if(t.sCount[i]-t.blkIndent>=4)return!1;if(t.src.charCodeAt(j)!==91)return!1;for(;++j<J;)if(t.src.charCodeAt(j)===93&&t.src.charCodeAt(j-1)!==92){if(j+1===J)return!1;if(t.src.charCodeAt(j+1)!==58)return!1;break}for(f=t.lineMax,N=t.md.block.ruler.getRules("reference"),S=t.parentType,t.parentType="reference";W<f&&!t.isEmpty(W);W++){if(t.sCount[W]-t.blkIndent>3)continue;if(t.sCount[W]<0)continue;for(C=!1,y=0,m=N.length;y<m;y++)if(N[y](t,W,f,!0)){C=!0;break}if(C)break}for(D=t.getLines(i,W,t.blkIndent,!1).trim(),J=D.length,j=1;j<J;j++){if(h=D.charCodeAt(j),h===91)return!1;if(h===93){b=j;break}else h===10?H++:h===92&&(j++,j<J&&D.charCodeAt(j)===10&&H++)}if(b<0||D.charCodeAt(b+1)!==58)return!1;for(j=b+2;j<J;j++)if(h=D.charCodeAt(j),h===10)H++;else if(!na(h))break;if(E=t.md.helpers.parseLinkDestination(D,j,J),!E.ok)return!1;if(p=t.md.normalizeLink(E.str),!t.md.validateLink(p))return!1;for(j=E.pos,H+=E.lines,a=j,d=H,x=j;j<J;j++)if(h=D.charCodeAt(j),h===10)H++;else if(!na(h))break;for(E=t.md.helpers.parseLinkTitle(D,j,J),j<J&&x!==j&&E.ok?(R=E.str,j=E.pos,H+=E.lines):(R="",j=a,H=d);j<J&&!(h=D.charCodeAt(j),!na(h));)j++;if(j<J&&D.charCodeAt(j)!==10&&R)for(R="",j=a,H=d;j<J&&!(h=D.charCodeAt(j),!na(h));)j++;return j<J&&D.charCodeAt(j)!==10?!1:(v=bw(D.slice(1,b)),v?(c||(typeof t.env.references=="undefined"&&(t.env.references={}),typeof t.env.references[v]=="undefined"&&(t.env.references[v]={title:R,href:p}),t.parentType=S,t.line=i+H+1),!0):!1)}});var Gh=Me((_2,Wh)=>{"use strict";var $h=Dt().isSpace;Wh.exports=function(t,i,u,c){var h,a,d,f,p=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(h=t.src.charCodeAt(p),h!==35||p>=y)return!1;for(a=1,h=t.src.charCodeAt(++p);h===35&&p<y&&a<=6;)a++,h=t.src.charCodeAt(++p);return a>6||p<y&&!$h(h)?!1:(c||(y=t.skipSpacesBack(y,p),d=t.skipCharsBack(y,35,p),d>p&&$h(t.src.charCodeAt(d-1))&&(y=d),t.line=i+1,f=t.push("heading_open","h"+String(a),1),f.markup="########".slice(0,a),f.map=[i,t.line],f=t.push("inline","",0),f.content=t.src.slice(p,y).trim(),f.map=[i,t.line],f.children=[],f=t.push("heading_close","h"+String(a),-1),f.markup="########".slice(0,a)),!0)}});var Vh=Me((A2,Kh)=>{"use strict";Kh.exports=function(t,i,u){var c,h,a,d,f,p,y,m,v,b=i+1,S,E=t.md.block.ruler.getRules("paragraph");if(t.sCount[i]-t.blkIndent>=4)return!1;for(S=t.parentType,t.parentType="paragraph";b<u&&!t.isEmpty(b);b++){if(t.sCount[b]-t.blkIndent>3)continue;if(t.sCount[b]>=t.blkIndent&&(p=t.bMarks[b]+t.tShift[b],y=t.eMarks[b],p<y&&(v=t.src.charCodeAt(p),(v===45||v===61)&&(p=t.skipChars(p,v),p=t.skipSpaces(p),p>=y)))){m=v===61?1:2;break}if(t.sCount[b]<0)continue;for(h=!1,a=0,d=E.length;a<d;a++)if(E[a](t,b,u,!0)){h=!0;break}if(h)break}return m?(c=t.getLines(i,b,t.blkIndent,!1).trim(),t.line=b+1,f=t.push("heading_open","h"+String(m),1),f.markup=String.fromCharCode(v),f.map=[i,t.line],f=t.push("inline","",0),f.content=c,f.map=[i,t.line-1],f.children=[],f=t.push("heading_close","h"+String(m),-1),f.markup=String.fromCharCode(v),t.parentType=S,!0):!1}});var Yh=Me((T2,Xh)=>{"use strict";Xh.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 Vs=Me((D2,Ks)=>{"use strict";var ww="[a-zA-Z_:][a-zA-Z0-9:._-]*",xw="[^\"'=<>`\\x00-\\x20]+",kw="'[^']*'",Sw='"[^"]*"',Ew="(?:"+xw+"|"+kw+"|"+Sw+")",Cw="(?:\\s+"+ww+"(?:\\s*=\\s*"+Ew+")?)",Zh="<[A-Za-z][A-Za-z0-9\\-]*"+Cw+"*\\s*\\/?>",Qh="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",_w="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Aw="<[?].*?[?]>",Tw="<![A-Z]+\\s+[^>]*>",Dw="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Iw=new RegExp("^(?:"+Zh+"|"+Qh+"|"+_w+"|"+Aw+"|"+Tw+"|"+Dw+")"),Lw=new RegExp("^(?:"+Zh+"|"+Qh+")");Ks.exports.HTML_TAG_RE=Iw;Ks.exports.HTML_OPEN_CLOSE_TAG_RE=Lw});var ep=Me((I2,Jh)=>{"use strict";var Fw=Yh(),Mw=Vs().HTML_OPEN_CLOSE_TAG_RE,ci=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Fw.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Mw.source+"\\s*$"),/^$/,!1]];Jh.exports=function(t,i,u,c){var h,a,d,f,p=t.bMarks[i]+t.tShift[i],y=t.eMarks[i];if(t.sCount[i]-t.blkIndent>=4)return!1;if(!t.md.options.html)return!1;if(t.src.charCodeAt(p)!==60)return!1;for(f=t.src.slice(p,y),h=0;h<ci.length&&!ci[h][0].test(f);h++);if(h===ci.length)return!1;if(c)return ci[h][2];if(a=i+1,!ci[h][1].test(f)){for(;a<u&&!(t.sCount[a]<t.blkIndent);a++)if(p=t.bMarks[a]+t.tShift[a],y=t.eMarks[a],f=t.src.slice(p,y),ci[h][1].test(f)){f.length!==0&&a++;break}}return t.line=a,d=t.push("html_block","",0),d.map=[i,a],d.content=t.getLines(i,a,t.blkIndent,!0),!0}});var rp=Me((L2,tp)=>{"use strict";tp.exports=function(t,i){var u,c,h,a,d,f,p=i+1,y=t.md.block.ruler.getRules("paragraph"),m=t.lineMax;for(f=t.parentType,t.parentType="paragraph";p<m&&!t.isEmpty(p);p++){if(t.sCount[p]-t.blkIndent>3)continue;if(t.sCount[p]<0)continue;for(c=!1,h=0,a=y.length;h<a;h++)if(y[h](t,p,m,!0)){c=!0;break}if(c)break}return u=t.getLines(i,p,t.blkIndent,!1).trim(),t.line=p,d=t.push("paragraph_open","p",1),d.map=[i,t.line],d=t.push("inline","",0),d.content=u,d.map=[i,t.line],d.children=[],d=t.push("paragraph_close","p",-1),t.parentType=f,!0}});var op=Me((F2,np)=>{"use strict";var ip=ra(),ia=Dt().isSpace;function Zr(n,t,i,u){var c,h,a,d,f,p,y,m;for(this.src=n,this.md=t,this.env=i,this.tokens=u,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="",h=this.src,m=!1,a=d=p=y=0,f=h.length;d<f;d++){if(c=h.charCodeAt(d),!m)if(ia(c)){p++,c===9?y+=4-y%4:y++;continue}else m=!0;(c===10||d===f-1)&&(c!==10&&d++,this.bMarks.push(a),this.eMarks.push(d),this.tShift.push(p),this.sCount.push(y),this.bsCount.push(0),m=!1,p=0,y=0,a=d+1)}this.bMarks.push(h.length),this.eMarks.push(h.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Zr.prototype.push=function(n,t,i){var u=new ip(n,t,i);return u.block=!0,i<0&&this.level--,u.level=this.level,i>0&&this.level++,this.tokens.push(u),u};Zr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Zr.prototype.skipEmptyLines=function(t){for(var i=this.lineMax;t<i&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};Zr.prototype.skipSpaces=function(t){for(var i,u=this.src.length;t<u&&!(i=this.src.charCodeAt(t),!ia(i));t++);return t};Zr.prototype.skipSpacesBack=function(t,i){if(t<=i)return t;for(;t>i;)if(!ia(this.src.charCodeAt(--t)))return t+1;return t};Zr.prototype.skipChars=function(t,i){for(var u=this.src.length;t<u&&!(this.src.charCodeAt(t)!==i);t++);return t};Zr.prototype.skipCharsBack=function(t,i,u){if(t<=u)return t;for(;t>u;)if(i!==this.src.charCodeAt(--t))return t+1;return t};Zr.prototype.getLines=function(t,i,u,c){var h,a,d,f,p,y,m,v=t;if(t>=i)return"";for(y=new Array(i-t),h=0;v<i;v++,h++){for(a=0,m=f=this.bMarks[v],v+1<i||c?p=this.eMarks[v]+1:p=this.eMarks[v];f<p&&a<u;){if(d=this.src.charCodeAt(f),ia(d))d===9?a+=4-(a+this.bsCount[v])%4:a++;else if(f-m<this.tShift[v])a++;else break;f++}a>u?y[h]=new Array(a-u+1).join(" ")+this.src.slice(f,p):y[h]=this.src.slice(f,p)}return y.join("")};Zr.prototype.Token=ip;np.exports=Zr});var sp=Me((M2,ap)=>{"use strict";var Rw=ea(),oa=[["table",Ah(),["paragraph","reference"]],["code",Dh()],["fence",Lh(),["paragraph","reference","blockquote","list"]],["blockquote",Rh(),["paragraph","reference","blockquote","list"]],["hr",Ph(),["paragraph","reference","blockquote","list"]],["list",qh(),["paragraph","reference","blockquote"]],["reference",Hh()],["heading",Gh(),["paragraph","reference","blockquote"]],["lheading",Vh()],["html_block",ep(),["paragraph","reference","blockquote"]],["paragraph",rp()]];function aa(){this.ruler=new Rw;for(var n=0;n<oa.length;n++)this.ruler.push(oa[n][0],oa[n][1],{alt:(oa[n][2]||[]).slice()})}aa.prototype.tokenize=function(n,t,i){for(var u,c,h=this.ruler.getRules(""),a=h.length,d=t,f=!1,p=n.md.options.maxNesting;d<i&&!(n.line=d=n.skipEmptyLines(d),d>=i);){if(n.sCount[d]<n.blkIndent)break;if(n.level>=p){n.line=i;break}for(c=0;c<a&&!(u=h[c](n,d,i,!1),u);c++);n.tight=!f,n.isEmpty(n.line-1)&&(f=!0),d=n.line,d<i&&n.isEmpty(d)&&(f=!0,d++,n.line=d)}};aa.prototype.parse=function(n,t,i,u){var c;if(!n)return;c=new this.State(n,t,i,u),this.tokenize(c,c.line,c.lineMax)};aa.prototype.State=op();ap.exports=aa});var up=Me((R2,lp)=>{"use strict";function Ow(n){switch(n){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}}lp.exports=function(t,i){for(var u=t.pos;u<t.posMax&&!Ow(t.src.charCodeAt(u));)u++;return u===t.pos?!1:(i||(t.pending+=t.src.slice(t.pos,u)),t.pos=u,!0)}});var dp=Me((O2,cp)=>{"use strict";var Pw=Dt().isSpace;cp.exports=function(t,i){var u,c,h=t.pos;if(t.src.charCodeAt(h)!==10)return!1;for(u=t.pending.length-1,c=t.posMax,i||(u>=0&&t.pending.charCodeAt(u)===32?u>=1&&t.pending.charCodeAt(u-1)===32?(t.pending=t.pending.replace(/ +$/,""),t.push("hardbreak","br",0)):(t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0)):t.push("softbreak","br",0)),h++;h<c&&Pw(t.src.charCodeAt(h));)h++;return t.pos=h,!0}});var pp=Me((P2,fp)=>{"use strict";var Nw=Dt().isSpace,Xs=[];for(var hp=0;hp<256;hp++)Xs.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){Xs[n.charCodeAt(0)]=1});fp.exports=function(t,i){var u,c=t.pos,h=t.posMax;if(t.src.charCodeAt(c)!==92)return!1;if(c++,c<h){if(u=t.src.charCodeAt(c),u<256&&Xs[u]!==0)return i||(t.pending+=t.src[c]),t.pos+=2,!0;if(u===10){for(i||t.push("hardbreak","br",0),c++;c<h&&!(u=t.src.charCodeAt(c),!Nw(u));)c++;return t.pos=c,!0}}return i||(t.pending+="\\"),t.pos++,!0}});var gp=Me((N2,mp)=>{"use strict";mp.exports=function(t,i){var u,c,h,a,d,f,p=t.pos,y=t.src.charCodeAt(p);if(y!==96)return!1;for(u=p,p++,c=t.posMax;p<c&&t.src.charCodeAt(p)===96;)p++;for(h=t.src.slice(u,p),a=d=p;(a=t.src.indexOf("`",d))!==-1;){for(d=a+1;d<c&&t.src.charCodeAt(d)===96;)d++;if(d-a===h.length)return i||(f=t.push("code_inline","code",0),f.markup=h,f.content=t.src.slice(p,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),t.pos=d,!0}return i||(t.pending+=h),t.pos+=h.length,!0}});var Zs=Me((z2,Ys)=>{"use strict";Ys.exports.tokenize=function(t,i){var u,c,h,a,d,f=t.pos,p=t.src.charCodeAt(f);if(i)return!1;if(p!==126)return!1;if(c=t.scanDelims(t.pos,!0),a=c.length,d=String.fromCharCode(p),a<2)return!1;for(a%2&&(h=t.push("text","",0),h.content=d,a--),u=0;u<a;u+=2)h=t.push("text","",0),h.content=d+d,t.delimiters.push({marker:p,length:0,jump:u,token:t.tokens.length-1,end:-1,open:c.can_open,close:c.can_close});return t.pos+=c.length,!0};function vp(n,t){var i,u,c,h,a,d=[],f=t.length;for(i=0;i<f;i++){if(c=t[i],c.marker!==126)continue;if(c.end===-1)continue;h=t[c.end],a=n.tokens[c.token],a.type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",a=n.tokens[h.token],a.type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="",n.tokens[h.token-1].type==="text"&&n.tokens[h.token-1].content==="~"&&d.push(h.token-1)}for(;d.length;){for(i=d.pop(),u=i+1;u<n.tokens.length&&n.tokens[u].type==="s_close";)u++;u--,i!==u&&(a=n.tokens[u],n.tokens[u]=n.tokens[i],n.tokens[i]=a)}}Ys.exports.postProcess=function(t){var i,u=t.tokens_meta,c=t.tokens_meta.length;for(vp(t,t.delimiters),i=0;i<c;i++)u[i]&&u[i].delimiters&&vp(t,u[i].delimiters)}});var Js=Me((B2,Qs)=>{"use strict";Qs.exports.tokenize=function(t,i){var u,c,h,a=t.pos,d=t.src.charCodeAt(a);if(i)return!1;if(d!==95&&d!==42)return!1;for(c=t.scanDelims(t.pos,d===42),u=0;u<c.length;u++)h=t.push("text","",0),h.content=String.fromCharCode(d),t.delimiters.push({marker:d,length:c.length,jump:u,token:t.tokens.length-1,end:-1,open:c.can_open,close:c.can_close});return t.pos+=c.length,!0};function yp(n,t){var i,u,c,h,a,d,f=t.length;for(i=f-1;i>=0;i--){if(u=t[i],u.marker!==95&&u.marker!==42)continue;if(u.end===-1)continue;c=t[u.end],d=i>0&&t[i-1].end===u.end+1&&t[i-1].token===u.token-1&&t[u.end+1].token===c.token+1&&t[i-1].marker===u.marker,a=String.fromCharCode(u.marker),h=n.tokens[u.token],h.type=d?"strong_open":"em_open",h.tag=d?"strong":"em",h.nesting=1,h.markup=d?a+a:a,h.content="",h=n.tokens[c.token],h.type=d?"strong_close":"em_close",h.tag=d?"strong":"em",h.nesting=-1,h.markup=d?a+a:a,h.content="",d&&(n.tokens[t[i-1].token].content="",n.tokens[t[u.end+1].token].content="",i--)}}Qs.exports.postProcess=function(t){var i,u=t.tokens_meta,c=t.tokens_meta.length;for(yp(t,t.delimiters),i=0;i<c;i++)u[i]&&u[i].delimiters&&yp(t,u[i].delimiters)}});var wp=Me((j2,bp)=>{"use strict";var zw=Dt().normalizeReference,el=Dt().isSpace;bp.exports=function(t,i){var u,c,h,a,d,f,p,y,m,v,b="",S=t.pos,E=t.posMax,x=t.pos,D=!0;if(t.src.charCodeAt(t.pos)!==91)return!1;if(d=t.pos+1,a=t.md.helpers.parseLinkLabel(t,t.pos,!0),a<0)return!1;if(f=a+1,f<E&&t.src.charCodeAt(f)===40){for(D=!1,f++;f<E&&!(c=t.src.charCodeAt(f),!el(c)&&c!==10);f++);if(f>=E)return!1;for(x=f,p=t.md.helpers.parseLinkDestination(t.src,f,t.posMax),p.ok&&(b=t.md.normalizeLink(p.str),t.md.validateLink(b)?f=p.pos:b=""),x=f;f<E&&!(c=t.src.charCodeAt(f),!el(c)&&c!==10);f++);if(p=t.md.helpers.parseLinkTitle(t.src,f,t.posMax),f<E&&x!==f&&p.ok)for(m=p.str,f=p.pos;f<E&&!(c=t.src.charCodeAt(f),!el(c)&&c!==10);f++);else m="";(f>=E||t.src.charCodeAt(f)!==41)&&(D=!0),f++}if(D){if(typeof t.env.references=="undefined")return!1;if(f<E&&t.src.charCodeAt(f)===91?(x=f+1,f=t.md.helpers.parseLinkLabel(t,f),f>=0?h=t.src.slice(x,f++):f=a+1):f=a+1,h||(h=t.src.slice(d,a)),y=t.env.references[zw(h)],!y)return t.pos=S,!1;b=y.href,m=y.title}return i||(t.pos=d,t.posMax=a,v=t.push("link_open","a",1),v.attrs=u=[["href",b]],m&&u.push(["title",m]),t.md.inline.tokenize(t),v=t.push("link_close","a",-1)),t.pos=f,t.posMax=E,!0}});var kp=Me((q2,xp)=>{"use strict";var Bw=Dt().normalizeReference,tl=Dt().isSpace;xp.exports=function(t,i){var u,c,h,a,d,f,p,y,m,v,b,S,E,x="",D=t.pos,C=t.posMax;if(t.src.charCodeAt(t.pos)!==33)return!1;if(t.src.charCodeAt(t.pos+1)!==91)return!1;if(f=t.pos+2,d=t.md.helpers.parseLinkLabel(t,t.pos+1,!1),d<0)return!1;if(p=d+1,p<C&&t.src.charCodeAt(p)===40){for(p++;p<C&&!(c=t.src.charCodeAt(p),!tl(c)&&c!==10);p++);if(p>=C)return!1;for(E=p,m=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),m.ok&&(x=t.md.normalizeLink(m.str),t.md.validateLink(x)?p=m.pos:x=""),E=p;p<C&&!(c=t.src.charCodeAt(p),!tl(c)&&c!==10);p++);if(m=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<C&&E!==p&&m.ok)for(v=m.str,p=m.pos;p<C&&!(c=t.src.charCodeAt(p),!tl(c)&&c!==10);p++);else v="";if(p>=C||t.src.charCodeAt(p)!==41)return t.pos=D,!1;p++}else{if(typeof t.env.references=="undefined")return!1;if(p<C&&t.src.charCodeAt(p)===91?(E=p+1,p=t.md.helpers.parseLinkLabel(t,p),p>=0?a=t.src.slice(E,p++):p=d+1):p=d+1,a||(a=t.src.slice(f,d)),y=t.env.references[Bw(a)],!y)return t.pos=D,!1;x=y.href,v=y.title}return i||(h=t.src.slice(f,d),t.md.inline.parse(h,t.md,t.env,S=[]),b=t.push("image","img",0),b.attrs=u=[["src",x],["alt",""]],b.children=S,b.content=h,v&&u.push(["title",v])),t.pos=p,t.posMax=C,!0}});var _p=Me((U2,Sp)=>{"use strict";var Ep=/^<([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])?)*)>/,Cp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;Sp.exports=function(t,i){var u,c,h,a,d,f,p=t.pos;return t.src.charCodeAt(p)!==60?!1:(u=t.src.slice(p),u.indexOf(">")<0?!1:Cp.test(u)?(c=u.match(Cp),a=c[0].slice(1,-1),d=t.md.normalizeLink(a),t.md.validateLink(d)?(i||(f=t.push("link_open","a",1),f.attrs=[["href",d]],f.markup="autolink",f.info="auto",f=t.push("text","",0),f.content=t.md.normalizeLinkText(a),f=t.push("link_close","a",-1),f.markup="autolink",f.info="auto"),t.pos+=c[0].length,!0):!1):Ep.test(u)?(h=u.match(Ep),a=h[0].slice(1,-1),d=t.md.normalizeLink("mailto:"+a),t.md.validateLink(d)?(i||(f=t.push("link_open","a",1),f.attrs=[["href",d]],f.markup="autolink",f.info="auto",f=t.push("text","",0),f.content=t.md.normalizeLinkText(a),f=t.push("link_close","a",-1),f.markup="autolink",f.info="auto"),t.pos+=h[0].length,!0):!1):!1)}});var Tp=Me((H2,Ap)=>{"use strict";var jw=Vs().HTML_TAG_RE;function qw(n){var t=n|32;return t>=97&&t<=122}Ap.exports=function(t,i){var u,c,h,a,d=t.pos;return t.md.options.html?(h=t.posMax,t.src.charCodeAt(d)!==60||d+2>=h?!1:(u=t.src.charCodeAt(d+1),u!==33&&u!==63&&u!==47&&!qw(u)?!1:(c=t.src.slice(d).match(jw),c?(i||(a=t.push("html_inline","",0),a.content=t.src.slice(d,d+c[0].length)),t.pos+=c[0].length,!0):!1))):!1}});var Fp=Me((W2,Dp)=>{"use strict";var Ip=Bs(),Uw=Dt().has,Hw=Dt().isValidEntityCode,Lp=Dt().fromCodePoint,Ww=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,$w=/^&([a-z][a-z0-9]{1,31});/i;Dp.exports=function(t,i){var u,c,h,a=t.pos,d=t.posMax;if(t.src.charCodeAt(a)!==38)return!1;if(a+1<d){if(u=t.src.charCodeAt(a+1),u===35){if(h=t.src.slice(a).match(Ww),h)return i||(c=h[1][0].toLowerCase()==="x"?parseInt(h[1].slice(1),16):parseInt(h[1],10),t.pending+=Hw(c)?Lp(c):Lp(65533)),t.pos+=h[0].length,!0}else if(h=t.src.slice(a).match($w),h&&Uw(Ip,h[1]))return i||(t.pending+=Ip[h[1]]),t.pos+=h[0].length,!0}return i||(t.pending+="&"),t.pos++,!0}});var Op=Me(($2,Mp)=>{"use strict";function Rp(n,t){var i,u,c,h,a,d,f,p,y={},m=t.length;for(i=0;i<m;i++){if(c=t[i],c.length=c.length||0,!c.close)continue;for(y.hasOwnProperty(c.marker)||(y[c.marker]=[-1,-1,-1]),a=y[c.marker][c.length%3],d=-1,u=i-c.jump-1;u>a;u-=h.jump+1){if(h=t[u],h.marker!==c.marker)continue;if(d===-1&&(d=u),h.open&&h.end<0&&(f=!1,(h.close||c.open)&&((h.length+c.length)%3===0&&((h.length%3!==0||c.length%3!==0)&&(f=!0))),!f)){p=u>0&&!t[u-1].open?t[u-1].jump+1:0,c.jump=i-u+p,c.open=!1,h.end=i,h.jump=p,h.close=!1,d=-1;break}}d!==-1&&(y[c.marker][(c.length||0)%3]=d)}}Mp.exports=function(t){var i,u=t.tokens_meta,c=t.tokens_meta.length;for(Rp(t,t.delimiters),i=0;i<c;i++)u[i]&&u[i].delimiters&&Rp(t,u[i].delimiters)}});var Np=Me((G2,Pp)=>{"use strict";Pp.exports=function(t){var i,u,c=0,h=t.tokens,a=t.tokens.length;for(i=u=0;i<a;i++)h[i].nesting<0&&c--,h[i].level=c,h[i].nesting>0&&c++,h[i].type==="text"&&i+1<a&&h[i+1].type==="text"?h[i+1].content=h[i].content+h[i+1].content:(i!==u&&(h[u]=h[i]),u++);i!==u&&(h.length=u)}});var Up=Me((K2,zp)=>{"use strict";var rl=ra(),Bp=Dt().isWhiteSpace,jp=Dt().isPunctChar,qp=Dt().isMdAsciiPunct;function Qi(n,t,i,u){this.src=n,this.env=i,this.md=t,this.tokens=u,this.tokens_meta=Array(u.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Qi.prototype.pushPending=function(){var n=new rl("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n};Qi.prototype.push=function(n,t,i){this.pending&&this.pushPending();var u=new rl(n,t,i),c=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),u.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],c={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(u),this.tokens_meta.push(c),u};Qi.prototype.scanDelims=function(n,t){var i=n,u,c,h,a,d,f,p,y,m,v=!0,b=!0,S=this.posMax,E=this.src.charCodeAt(n);for(u=n>0?this.src.charCodeAt(n-1):32;i<S&&this.src.charCodeAt(i)===E;)i++;return h=i-n,c=i<S?this.src.charCodeAt(i):32,p=qp(u)||jp(String.fromCharCode(u)),m=qp(c)||jp(String.fromCharCode(c)),f=Bp(u),y=Bp(c),y?v=!1:m&&(f||p||(v=!1)),f?b=!1:p&&(y||m||(b=!1)),t?(a=v,d=b):(a=v&&(!b||p),d=b&&(!v||m)),{can_open:a,can_close:d,length:h}};Qi.prototype.Token=rl;zp.exports=Qi});var $p=Me((V2,Hp)=>{"use strict";var Wp=ea(),nl=[["text",up()],["newline",dp()],["escape",pp()],["backticks",gp()],["strikethrough",Zs().tokenize],["emphasis",Js().tokenize],["link",wp()],["image",kp()],["autolink",_p()],["html_inline",Tp()],["entity",Fp()]],il=[["balance_pairs",Op()],["strikethrough",Zs().postProcess],["emphasis",Js().postProcess],["text_collapse",Np()]];function Ji(){var n;for(this.ruler=new Wp,n=0;n<nl.length;n++)this.ruler.push(nl[n][0],nl[n][1]);for(this.ruler2=new Wp,n=0;n<il.length;n++)this.ruler2.push(il[n][0],il[n][1])}Ji.prototype.skipToken=function(n){var t,i,u=n.pos,c=this.ruler.getRules(""),h=c.length,a=n.md.options.maxNesting,d=n.cache;if(typeof d[u]!="undefined"){n.pos=d[u];return}if(n.level<a)for(i=0;i<h&&!(n.level++,t=c[i](n,!0),n.level--,t);i++);else n.pos=n.posMax;t||n.pos++,d[u]=n.pos};Ji.prototype.tokenize=function(n){for(var t,i,u=this.ruler.getRules(""),c=u.length,h=n.posMax,a=n.md.options.maxNesting;n.pos<h;){if(n.level<a)for(i=0;i<c&&!(t=u[i](n,!1),t);i++);if(t){if(n.pos>=h)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()};Ji.prototype.parse=function(n,t,i,u){var c,h,a,d=new this.State(n,t,i,u);for(this.tokenize(d),h=this.ruler2.getRules(""),a=h.length,c=0;c<a;c++)h[c](d)};Ji.prototype.State=Up();Hp.exports=Ji});var Kp=Me((X2,Gp)=>{"use strict";Gp.exports=function(n){var t={};t.src_Any=qs().source,t.src_Cc=Us().source,t.src_Z=Hs().source,t.src_P=Xo().source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var i="[><]";return t.src_pseudo_letter="(?:(?!"+i+"|"+t.src_ZPCc+")"+t.src_Any+")",t.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]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+i+"|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(n&&n["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+t.src_ZPCc+"))((?![$+<=>^`|])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|]|"+t.src_ZPCc+"))((?![$+<=>^`|])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}});var Jp=Me((Y2,Vp)=>{"use strict";function ol(n){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(u){n[u]=i[u]})}),n}function sa(n){return Object.prototype.toString.call(n)}function Gw(n){return sa(n)==="[object String]"}function Kw(n){return sa(n)==="[object Object]"}function Vw(n){return sa(n)==="[object RegExp]"}function Xp(n){return sa(n)==="[object Function]"}function Xw(n){return n.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var Yp={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Yw(n){return Object.keys(n||{}).reduce(function(t,i){return t||Yp.hasOwnProperty(i)},!1)}var Zw={"http:":{validate:function(n,t,i){var u=n.slice(t);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(u)?u.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(n,t,i){var u=n.slice(t);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(u)?t>=3&&n[t-3]===":"||t>=3&&n[t-3]==="/"?0:u.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(n,t,i){var u=n.slice(t);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(u)?u.match(i.re.mailto)[0].length:0}}},Qw="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]",Jw="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function ex(n){n.__index__=-1,n.__text_cache__=""}function tx(n){return function(t,i){var u=t.slice(i);return n.test(u)?u.match(n)[0].length:0}}function Zp(){return function(n,t){t.normalize(n)}}function la(n){var t=n.re=Kp()(n.__opts__),i=n.__tlds__.slice();n.onCompile(),n.__tlds_replaced__||i.push(Qw),i.push(t.src_xn),t.src_tlds=i.join("|");function u(d){return d.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(u(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(u(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(u(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(u(t.tpl_host_fuzzy_test),"i");var c=[];n.__compiled__={};function h(d,f){throw new Error('(LinkifyIt) Invalid schema "'+d+'": '+f)}Object.keys(n.__schemas__).forEach(function(d){var f=n.__schemas__[d];if(f===null)return;var p={validate:null,link:null};if(n.__compiled__[d]=p,Kw(f)){Vw(f.validate)?p.validate=tx(f.validate):Xp(f.validate)?p.validate=f.validate:h(d,f),Xp(f.normalize)?p.normalize=f.normalize:f.normalize?h(d,f):p.normalize=Zp();return}if(Gw(f)){c.push(d);return}h(d,f)}),c.forEach(function(d){if(!n.__compiled__[n.__schemas__[d]])return;n.__compiled__[d].validate=n.__compiled__[n.__schemas__[d]].validate,n.__compiled__[d].normalize=n.__compiled__[n.__schemas__[d]].normalize}),n.__compiled__[""]={validate:null,normalize:Zp()};var a=Object.keys(n.__compiled__).filter(function(d){return d.length>0&&n.__compiled__[d]}).map(Xw).join("|");n.re.schema_test=RegExp("(^|(?!_)(?:[><]|"+t.src_ZPCc+"))("+a+")","i"),n.re.schema_search=RegExp("(^|(?!_)(?:[><]|"+t.src_ZPCc+"))("+a+")","ig"),n.re.pretest=RegExp("("+n.re.schema_test.source+")|("+n.re.host_fuzzy_test.source+")|@","i"),ex(n)}function rx(n,t){var i=n.__index__,u=n.__last_index__,c=n.__text_cache__.slice(i,u);this.schema=n.__schema__.toLowerCase(),this.index=i+t,this.lastIndex=u+t,this.raw=c,this.text=c,this.url=c}function Qp(n,t){var i=new rx(n,t);return n.__compiled__[i.schema].normalize(i,n),i}function Nr(n,t){if(!(this instanceof Nr))return new Nr(n,t);t||Yw(n)&&(t=n,n={}),this.__opts__=ol({},Yp,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ol({},Zw,n),this.__compiled__={},this.__tlds__=Jw,this.__tlds_replaced__=!1,this.re={},la(this)}Nr.prototype.add=function(t,i){return this.__schemas__[t]=i,la(this),this};Nr.prototype.set=function(t){return this.__opts__=ol(this.__opts__,t),this};Nr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;var i,u,c,h,a,d,f,p,y;if(this.re.schema_test.test(t)){for(f=this.re.schema_search,f.lastIndex=0;(i=f.exec(t))!==null;)if(h=this.testSchemaAt(t,i[2],f.lastIndex),h){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+h;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(p=t.search(this.re.host_fuzzy_test),p>=0&&((this.__index__<0||p<this.__index__)&&((u=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=u.index+u[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=u.index+u[0].length))))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(y=t.indexOf("@"),y>=0&&((c=t.match(this.re.email_fuzzy))!==null&&(a=c.index+c[1].length,d=c.index+c[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&d>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=d)))),this.__index__>=0};Nr.prototype.pretest=function(t){return this.re.pretest.test(t)};Nr.prototype.testSchemaAt=function(t,i,u){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(t,u,this):0};Nr.prototype.match=function(t){var i=0,u=[];this.__index__>=0&&this.__text_cache__===t&&(u.push(Qp(this,i)),i=this.__last_index__);for(var c=i?t.slice(i):t;this.test(c);)u.push(Qp(this,i)),c=c.slice(this.__last_index__),i+=this.__last_index__;return u.length?u:null};Nr.prototype.tlds=function(t,i){return t=Array.isArray(t)?t:[t],i?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(u,c,h){return u!==h[c-1]}).reverse(),la(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,la(this),this)};Nr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Nr.prototype.onCompile=function(){};Vp.exports=Nr});var um=Me(nx=>{mb(nx,{decode:()=>cl,default:()=>hx,encode:()=>dl,toASCII:()=>lm,toUnicode:()=>sm,ucs2decode:()=>ul,ucs2encode:()=>im});"use strict";const di=2147483647,Qr=36,al=1,eo=26,ix=38,ox=700,em=72,tm=128,rm="-",ax=/^xn--/,sx=/[^\0-\x7E]/,lx=/[\x2E\u3002\uFF0E\uFF61]/g,ux={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},sl=Qr-al,Jr=Math.floor,ll=String.fromCharCode;function Nn(n){throw new RangeError(ux[n])}function cx(n,t){const i=[];let u=n.length;for(;u--;)i[u]=t(n[u]);return i}function nm(n,t){const i=n.split("@");let u="";i.length>1&&(u=i[0]+"@",n=i[1]),n=n.replace(lx,".");const c=n.split("."),h=cx(c,t).join(".");return u+h}function ul(n){const t=[];let i=0;const u=n.length;for(;i<u;){const c=n.charCodeAt(i++);if(c>=55296&&c<=56319&&i<u){const h=n.charCodeAt(i++);(h&64512)==56320?t.push(((c&1023)<<10)+(h&1023)+65536):(t.push(c),i--)}else t.push(c)}return t}const im=n=>String.fromCodePoint(...n),dx=function(n){return n-48<10?n-22:n-65<26?n-65:n-97<26?n-97:Qr},om=function(n,t){return n+22+75*(n<26)-((t!=0)<<5)},am=function(n,t,i){let u=0;for(n=i?Jr(n/ox):n>>1,n+=Jr(n/t);n>sl*eo>>1;u+=Qr)n=Jr(n/sl);return Jr(u+(sl+1)*n/(n+ix))},cl=function(n){const t=[],i=n.length;let u=0,c=tm,h=em,a=n.lastIndexOf(rm);a<0&&(a=0);for(let d=0;d<a;++d)n.charCodeAt(d)>=128&&Nn("not-basic"),t.push(n.charCodeAt(d));for(let d=a>0?a+1:0;d<i;){let f=u;for(let y=1,m=Qr;;m+=Qr){d>=i&&Nn("invalid-input");const v=dx(n.charCodeAt(d++));(v>=Qr||v>Jr((di-u)/y))&&Nn("overflow"),u+=v*y;const b=m<=h?al:m>=h+eo?eo:m-h;if(v<b)break;const S=Qr-b;y>Jr(di/S)&&Nn("overflow"),y*=S}const p=t.length+1;h=am(u-f,p,f==0),Jr(u/p)>di-c&&Nn("overflow"),c+=Jr(u/p),u%=p,t.splice(u++,0,c)}return String.fromCodePoint(...t)},dl=function(n){const t=[];n=ul(n);let i=n.length,u=tm,c=0,h=em;for(const f of n)f<128&&t.push(ll(f));let a=t.length,d=a;for(a&&t.push(rm);d<i;){let f=di;for(const y of n)y>=u&&y<f&&(f=y);const p=d+1;f-u>Jr((di-c)/p)&&Nn("overflow"),c+=(f-u)*p,u=f;for(const y of n)if(y<u&&++c>di&&Nn("overflow"),y==u){let m=c;for(let v=Qr;;v+=Qr){const b=v<=h?al:v>=h+eo?eo:v-h;if(m<b)break;const S=m-b,E=Qr-b;t.push(ll(om(b+S%E,0))),m=Jr(S/E)}t.push(ll(om(m,0))),h=am(c,p,d==a),c=0,++d}++c,++u}return t.join("")},sm=function(n){return nm(n,function(t){return ax.test(t)?cl(t.slice(4).toLowerCase()):t})},lm=function(n){return nm(n,function(t){return sx.test(t)?"xn--"+dl(t):t})},fx={version:"2.1.0",ucs2:{decode:ul,encode:im},decode:cl,encode:dl,toASCII:lm,toUnicode:sm};var hx=fx});var dm=Me((Q2,cm)=>{"use strict";cm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var hm=Me((J2,fm)=>{"use strict";fm.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 mm=Me((e1,pm)=>{"use strict";pm.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 bm=Me((t1,gm)=>{"use strict";var to=Dt(),px=Zf(),mx=Jf(),gx=Eh(),vx=sp(),yx=$p(),bx=Jp(),fi=js(),vm=um(),wx={default:dm(),zero:hm(),commonmark:mm()},xx=/^(vbscript|javascript|file|data):/,kx=/^data:image\/(gif|png|jpeg|webp);/;function Sx(n){var t=n.trim().toLowerCase();return xx.test(t)?!!kx.test(t):!0}var ym=["http:","https:","mailto:"];function Ex(n){var t=fi.parse(n,!0);if(t.hostname&&(!t.protocol||ym.indexOf(t.protocol)>=0))try{t.hostname=vm.toASCII(t.hostname)}catch(i){}return fi.encode(fi.format(t))}function Cx(n){var t=fi.parse(n,!0);if(t.hostname&&(!t.protocol||ym.indexOf(t.protocol)>=0))try{t.hostname=vm.toUnicode(t.hostname)}catch(i){}return fi.decode(fi.format(t))}function zr(n,t){if(!(this instanceof zr))return new zr(n,t);t||(to.isString(n)||(t=n||{},n="default")),this.inline=new yx,this.block=new vx,this.core=new gx,this.renderer=new mx,this.linkify=new bx,this.validateLink=Sx,this.normalizeLink=Ex,this.normalizeLinkText=Cx,this.utils=to,this.helpers=to.assign({},px),this.options={},this.configure(n),t&&this.set(t)}zr.prototype.set=function(n){return to.assign(this.options,n),this};zr.prototype.configure=function(n){var t=this,i;if(to.isString(n)&&(i=n,n=wx[i],!n))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&t.set(n.options),n.components&&Object.keys(n.components).forEach(function(u){n.components[u].rules&&t[u].ruler.enableOnly(n.components[u].rules),n.components[u].rules2&&t[u].ruler2.enableOnly(n.components[u].rules2)}),this};zr.prototype.enable=function(n,t){var i=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(c){i=i.concat(this[c].ruler.enable(n,!0))},this),i=i.concat(this.inline.ruler2.enable(n,!0));var u=n.filter(function(c){return i.indexOf(c)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+u);return this};zr.prototype.disable=function(n,t){var i=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(c){i=i.concat(this[c].ruler.disable(n,!0))},this),i=i.concat(this.inline.ruler2.disable(n,!0));var u=n.filter(function(c){return i.indexOf(c)<0});if(u.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+u);return this};zr.prototype.use=function(n){var t=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,t),this};zr.prototype.parse=function(n,t){if(typeof n!="string")throw new Error("Input data should be a String");var i=new this.core.State(n,this,t);return this.core.process(i),i.tokens};zr.prototype.render=function(n,t){return t=t||{},this.renderer.render(this.parse(n,t),this.options,t)};zr.prototype.parseInline=function(n,t){var i=new this.core.State(n,this,t);return i.inlineMode=!0,this.core.process(i),i.tokens};zr.prototype.renderInline=function(n,t){return t=t||{},this.renderer.render(this.parseInline(n,t),this.options,t)};gm.exports=zr});var xm=Me((r1,wm)=>{"use strict";wm.exports=bm()});var _m=Me((n1,km)=>{var fl=!0,Sm=!1,Em=!1;km.exports=function(n,t){t&&(fl=!t.enabled,Sm=!!t.label,Em=!!t.labelAfter),n.core.ruler.after("inline","github-task-lists",function(i){for(var u=i.tokens,c=2;c<u.length;c++)Ax(u,c)&&(Tx(u[c],i.Token),Cm(u[c-2],"class","task-list-item"+(fl?"":" enabled")),Cm(u[_x(u,c-2)],"class","contains-task-list"))})};function Cm(n,t,i){var u=n.attrIndex(t),c=[t,i];u<0?n.attrPush(c):n.attrs[u]=c}function _x(n,t){for(var i=n[t].level-1,u=t-1;u>=0;u--)if(n[u].level===i)return u;return-1}function Ax(n,t){return Dx(n[t])&&Ix(n[t-1])&&Lx(n[t-2])&&Fx(n[t])}function Tx(n,t){if(n.children.unshift(Mx(n,t)),n.children[1].content=n.children[1].content.slice(3),n.content=n.content.slice(3),Sm)if(Em){n.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);n.children[0].content=n.children[0].content.slice(0,-1)+' id="'+i+'">',n.children.push(Px(n.content,i,t))}else n.children.unshift(Rx(t)),n.children.push(Ox(t))}function Mx(n,t){var i=new t("html_inline","",0),u=fl?' disabled="" ':"";return n.content.indexOf("[ ] ")===0?i.content='<input class="task-list-item-checkbox"'+u+'type="checkbox">':(n.content.indexOf("[x] ")===0||n.content.indexOf("[X] ")===0)&&(i.content='<input class="task-list-item-checkbox" checked=""'+u+'type="checkbox">'),i}function Rx(n){var t=new n("html_inline","",0);return t.content="<label>",t}function Ox(n){var t=new n("html_inline","",0);return t.content="</label>",t}function Px(n,t,i){var u=new i("html_inline","",0);return u.content='<label class="task-list-item-label" for="'+t+'">'+n+"</label>",u.attrs=[{for:t}],u}function Dx(n){return n.type==="inline"}function Ix(n){return n.type==="paragraph_open"}function Lx(n){return n.type==="list_item_open"}function Fx(n){return n.content.indexOf("[ ] ")===0||n.content.indexOf("[x] ")===0||n.content.indexOf("[X] ")===0}});const ro={},Nx=[];function ua(n,t){if(Nx.push({name:n,data:t}),typeof ro[n]=="undefined")return this;let i=ro[n];for(let u=0;u<i.length;u++){let c=i[u];c(t)}}function zx(n,t){typeof ro[n]=="undefined"&&(ro[n]=[]),ro[n].push(t)}function Bx(n,t,i){const u=new CustomEvent(t,{detail:i,bubbles:!0});n.dispatchEvent(u)}function jx(n){if(!n.status)return;if(n.status===422&&n.data){const t=Object.values(n.data).flat().join(`
`);ua("error",t)}}var Am={emit:ua,emitPublic:Bx,listen:zx,success:n=>ua("success",n),error:n=>ua("error",n),showValidationErrors:jx};async function qx(n,t={}){return Tm(n,{method:"GET",params:t})}async function Ux(n,t=null){return ca("POST",n,t)}async function Hx(n,t=null){return ca("PUT",n,t)}async function Wx(n,t=null){return ca("PATCH",n,t)}async function $x(n,t=null){return ca("DELETE",n,t)}async function ca(n,t,i=null){const u={method:n,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(u.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},u.body=JSON.stringify(i)),i instanceof FormData&&n!=="post"&&(i.append("_method",n),u.method="post"),Tm(t,u)}async function Tm(n,t={}){if(n.startsWith("http")||(n=window.baseUrl(n)),t.params){const a=new URL(n);for(let d of Object.keys(t.params)){const f=t.params[d];typeof f!="undefined"&&f!==null&&a.searchParams.set(d,f)}n=a.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");t=Object.assign({},t,{credentials:"same-origin"}),t.headers=Object.assign({},t.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const u=await fetch(n,t),c=await Gx(u),h={data:c,headers:u.headers,redirected:u.redirected,status:u.status,statusText:u.statusText,url:u.url,original:u};if(!u.ok)throw h;return h}async function Gx(n){if(n.status===204)return null;const t=n.headers.get("Content-Type")||"",i=t.split(";")[0].split("/").pop();return i==="javascript"||i==="json"?await n.json():await n.text()}var Dm={get:qx,post:Ux,put:Hx,patch:Wx,delete:$x};class Kx{constructor(n){this.store=new Map,this.parseTranslations()}parseTranslations(){const n=document.querySelectorAll('meta[name="translation"]');for(let t of n){const i=t.getAttribute("key"),u=t.getAttribute("value");this.store.set(i,u)}}get(n,t){const i=this.getTransText(n);return this.performReplacements(i,t)}getPlural(n,t,i){const u=this.getTransText(n);return this.parsePlural(u,t,i)}parsePlural(n,t,i){const u=n.split("|"),c=/^{([0-9]+)}/,h=/^\[([0-9]+),([0-9*]+)]/;let a=null;for(let d of u){const f=d.match(c);if(f!==null&&Number(f[1])===t){a=d.replace(c,"").trim();break}const p=d.match(h);if(p!==null){const y=Number(p[1]);if(y<=t&&(p[2]==="*"||Number(p[2])>=t)){a=d.replace(h,"").trim();break}}}return a===null&&u.length>1&&(a=t===1?u[0]:u[1]),a===null&&(a=u[0]),this.performReplacements(a,i)}getTransText(n){const t=this.store.get(n);return t===void 0&&console.warn(`Translation with key "${n}" does not exist`),t}performReplacements(n,t){if(!t)return n;const i=n.match(/:([\S]+)/g);return i===null||i.forEach(u=>{const c=u.substring(1);if(typeof t[c]=="undefined")return;n=n.replace(u,t[c])}),n}}var Im=Kx;function da(n,t){const i=document.querySelectorAll(n);for(let u of i)t(u)}function fa(n,t,i){for(let u of t)n.addEventListener(u,i)}function Rt(n,t){Array.isArray(n)||(n=[n]);for(const i of n)i.addEventListener("click",t),i.addEventListener("keydown",u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),t(u))})}function ha(n,t){Array.isArray(n)||(n=[n]);const i=u=>{u.key==="Enter"&&t(u)};n.forEach(u=>u.addEventListener("keypress",i))}function qt(n,t,i,u){n.addEventListener(i,function(c){const h=c.target.closest(t);h&&u.call(h,c,h)})}function Lm(n,t){const i=document.querySelectorAll(n);t=t.toLowerCase();for(let u of i)if(u.textContent.toLowerCase().includes(t))return u;return null}function no(n){n.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function Fm(n){const t=n.querySelectorAll(".loading-container");for(const i of t)i.remove()}function pa(n,t,i){let u;return function(){const c=this,h=arguments,a=function(){u=null,i||n.apply(c,h)},d=i&&!u;clearTimeout(u),u=setTimeout(a,t),d&&n.apply(c,h)}}function io(n){if(!n)return;n.scrollIntoView({behavior:"smooth"});const t=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.backgroundColor=t,setTimeout(()=>{n.classList.add("selectFade"),n.style.backgroundColor=i},10),setTimeout(()=>{n.classList.remove("selectFade"),n.style.backgroundColor=""},3e3)}function Mm(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Rm(){const n=()=>((1+Math.random())*65536|0).toString(16).substring(1);return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}class Vx{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)),qt(this.$el,this.removeSelector,"click",n=>{const t=n.target.closest(this.rowSelector);t.remove()})}add(){const n=this.modelRow.cloneNode(!0);n.classList.remove("hidden"),this.setClonedInputNames(n),this.modelRow.parentNode.insertBefore(n,this.modelRow),window.components.init(n)}setClonedInputNames(n){const t=Rm(),i=n.querySelectorAll('[name*="randrowid"]');for(const u of i)u.name=u.name.split("randrowid").join(t)}}var Om=Vx;class Xx{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,Rt(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(n=>{typeof n.data=="object"&&n.data.message&&window.$events.emit("success",n.data.message),this.row.remove()}).catch(n=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var Pm=Xx;class Yx{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}ha(this.container,n=>{this.submitFakeForm(),n.preventDefault()}),this.submitButtons.forEach(n=>Rt(n,this.submitFakeForm.bind(this)))}submitFakeForm(){const n=new FormData,t=this.container.querySelectorAll("[name]");for(const i of t)n.append(i.getAttribute("name"),i.value);this.submit(n)}submitRealForm(n){n.preventDefault();const t=new FormData(this.container);this.submit(t)}async submit(n){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const t=await window.$http[this.method.toLowerCase()](this.url,n);this.$emit("success",{formData:n}),this.responseContainer.innerHTML=t.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(t){this.responseContainer.innerHTML=t.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var Nm=Yx;class Zx{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 n=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",n),this.container.addEventListener("ajax-form-success",n),this.container.addEventListener("sortable-list-sort",t=>{this.updateOrder(t.detail.ids)}),this.container.addEventListener("event-emit-select-edit",t=>{this.startEdit(t.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",t=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",t=>{const i=t.target.closest("[data-drag-content]").getAttribute("data-drag-content"),u=JSON.parse(i);window.$events.emit("editor::insert",{html:u["text/html"],markdown:u["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(n=>{this.list.innerHTML=n.data,window.components.init(this.list)})}updateOrder(n){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:n}).then(t=>{window.$events.emit("success",t.data.message)})}async startEdit(n){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),no(this.editContainer);const t=await window.$http.get(`/attachments/edit/${n}`);this.editContainer.innerHTML=t.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var zm=Zx;const hl={};class Qx{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",n=>{n.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),qt(this.list,"button","click",(n,t)=>{this.selectSuggestion(t.textContent)}),qt(this.list,"button","keydown",(n,t)=>{n.key==="Enter"&&this.selectSuggestion(t.textContent)})}selectSuggestion(n){this.input.value=n,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(n){if(n.key==="Enter"&&n.preventDefault(),this.list.classList.contains("hidden"))return;n.key==="ArrowDown"?(this.moveFocus(!0),n.preventDefault()):n.key==="ArrowUp"?(this.moveFocus(!1),n.preventDefault()):n.key==="Escape"&&(this.hideSuggestions(),n.preventDefault())}moveFocus(n=!0){const t=Array.from(this.container.querySelectorAll("input,button")),i=t.indexOf(document.activeElement),u=t[i+(n?1:-1)];u&&u.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const n=this.getNameFilterIfNeeded(),t=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(t,n);let u=i.slice(0,6);t.length>0&&(u=i.filter(c=>c.toLowerCase().includes(t)).slice(0,6)),this.displaySuggestions(u)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(n,t=null){const i={search:n,name:t},u=`${this.url}:${JSON.stringify(i)}`;if(hl[u])return hl[u];const c=await window.$http.get(this.url,i);return hl[u]=c.data,c.data}displaySuggestions(n){if(n.length===0)return this.hideSuggestions();this.list.innerHTML=n.map(t=>`<li><button type="button">${Mm(t)}</button></li>`).join(""),this.list.style.display="block";for(const t of this.list.querySelectorAll("button"))t.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(n){this.container.contains(n.relatedTarget)||this.hideSuggestions()}}var Bm=Qx;class Jx{constructor(n){if(this.elem=n,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 n=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&n>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&n<this.breakPoint&&(this.elem.style.opacity=0,this.showing=!1,setTimeout(()=>{this.elem.style.display="none"},500))}scrollToTop(){let n=this.targetElem.getBoundingClientRect().top,t=document.documentElement.scrollTop?document.documentElement:document.body,i=300,u=Date.now(),c=this.targetElem.getBoundingClientRect().top;function h(){let a=1-(Date.now()-u)/i,d=Math.abs(a*c);a>0?(t.scrollTop=d,requestAnimationFrame(h.bind(this))):t.scrollTop=n}requestAnimationFrame(h.bind(this))}}var jm=Jx;function ma(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ma=function(t){return typeof t}:ma=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(n)}function e0(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n}function un(){return un=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(n[u]=i[u])}return n},un.apply(this,arguments)}function kn(n){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{},u=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(u=u.concat(Object.getOwnPropertySymbols(i).filter(function(c){return Object.getOwnPropertyDescriptor(i,c).enumerable}))),u.forEach(function(c){e0(n,c,i[c])})}return n}function t0(n,t){if(n==null)return{};var i={},u=Object.keys(n),c,h;for(h=0;h<u.length;h++){if(c=u[h],t.indexOf(c)>=0)continue;i[c]=n[c]}return i}function r0(n,t){if(n==null)return{};var i=t0(n,t),u,c;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(c=0;c<h.length;c++){if(u=h[c],t.indexOf(u)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(n,u))continue;i[u]=n[u]}}return i}var n0="1.13.0";function cn(n){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(n)}var dn=cn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),oo=cn(/Edge/i),qm=cn(/firefox/i),ao=cn(/safari/i)&&!cn(/chrome/i)&&!cn(/android/i),Um=cn(/iP(ad|od|hone)/i),i0=cn(/chrome/i)&&cn(/android/i),Hm={capture:!1,passive:!1};function It(n,t,i){n.addEventListener(t,i,!dn&&Hm)}function Ct(n,t,i){n.removeEventListener(t,i,!dn&&Hm)}function ga(n,t){if(!t)return;if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch(i){return!1}return!1}function o0(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function en(n,t,i,u){if(n){i=i||document;do{if(t!=null&&(t[0]===">"?n.parentNode===i&&ga(n,t):ga(n,t))||u&&n===i)return n;if(n===i)break}while(n=o0(n))}return null}var Wm=/\s+/g;function Fr(n,t,i){if(n&&t)if(n.classList)n.classList[i?"add":"remove"](t);else{var u=(" "+n.className+" ").replace(Wm," ").replace(" "+t+" "," ");n.className=(u+(i?" "+t:"")).replace(Wm," ")}}function pt(n,t,i){var u=n&&n.style;if(u){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(i=n.currentStyle),t===void 0?i:i[t];!(t in u)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),u[t]=i+(typeof i=="string"?"":"px")}}function hi(n,t){var i="";if(typeof n=="string")i=n;else do{var u=pt(n,"transform");u&&u!=="none"&&(i=u+" "+i)}while(!t&&(n=n.parentNode));var c=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return c&&new c(i)}function $m(n,t,i){if(n){var u=n.getElementsByTagName(t),c=0,h=u.length;if(i)for(;c<h;c++)i(u[c],c);return u}return[]}function tn(){var n=document.scrollingElement;return n||document.documentElement}function dr(n,t,i,u,c){if(!n.getBoundingClientRect&&n!==window)return;var h,a,d,f,p,y,m;if(n!==window&&n.parentNode&&n!==tn()?(h=n.getBoundingClientRect(),a=h.top,d=h.left,f=h.bottom,p=h.right,y=h.height,m=h.width):(a=0,d=0,f=window.innerHeight,p=window.innerWidth,y=window.innerHeight,m=window.innerWidth),(t||i)&&n!==window&&(c=c||n.parentNode,!dn))do if(c&&c.getBoundingClientRect&&(pt(c,"transform")!=="none"||i&&pt(c,"position")!=="static")){var v=c.getBoundingClientRect();a-=v.top+parseInt(pt(c,"border-top-width")),d-=v.left+parseInt(pt(c,"border-left-width")),f=a+h.height,p=d+h.width;break}while(c=c.parentNode);if(u&&n!==window){var b=hi(c||n),S=b&&b.a,E=b&&b.d;b&&(a/=E,d/=S,m/=S,y/=E,f=a+y,p=d+m)}return{top:a,left:d,bottom:f,right:p,width:m,height:y}}function Gm(n,t,i){for(var u=Sn(n,!0),c=dr(n)[t];u;){var h=dr(u)[i],a=void 0;if(i==="top"||i==="left"?a=c>=h:a=c<=h,!a)return u;if(u===tn())break;u=Sn(u,!1)}return!1}function va(n,t,i){for(var u=0,c=0,h=n.children;c<h.length;){if(h[c].style.display!=="none"&&h[c]!==mt.ghost&&h[c]!==mt.dragged&&en(h[c],i.draggable,n,!1)){if(u===t)return h[c];u++}c++}return null}function pl(n,t){for(var i=n.lastElementChild;i&&(i===mt.ghost||pt(i,"display")==="none"||t&&!ga(i,t));)i=i.previousElementSibling;return i||null}function Br(n,t){var i=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==mt.clone&&(!t||ga(n,t))&&i++;return i}function Km(n){var t=0,i=0,u=tn();if(n)do{var c=hi(n),h=c.a,a=c.d;t+=n.scrollLeft*h,i+=n.scrollTop*a}while(n!==u&&(n=n.parentNode));return[t,i]}function a0(n,t){for(var i in n){if(!n.hasOwnProperty(i))continue;for(var u in t)if(t.hasOwnProperty(u)&&t[u]===n[i][u])return Number(i)}return-1}function Sn(n,t){if(!n||!n.getBoundingClientRect)return tn();var i=n,u=!1;do if(i.clientWidth<i.scrollWidth||i.clientHeight<i.scrollHeight){var c=pt(i);if(i.clientWidth<i.scrollWidth&&(c.overflowX=="auto"||c.overflowX=="scroll")||i.clientHeight<i.scrollHeight&&(c.overflowY=="auto"||c.overflowY=="scroll")){if(!i.getBoundingClientRect||i===document.body)return tn();if(u||t)return i;u=!0}}while(i=i.parentNode);return tn()}function s0(n,t){if(n&&t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function ml(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var so;function Vm(n,t){return function(){if(!so){var i=arguments,u=this;i.length===1?n.call(u,i[0]):n.apply(u,i),so=setTimeout(function(){so=void 0},t)}}}function l0(){clearTimeout(so),so=void 0}function Xm(n,t,i){n.scrollLeft+=t,n.scrollTop+=i}function Ym(n){var t=window.Polymer,i=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):i?i(n).clone(!0)[0]:n.cloneNode(!0)}var Mr="Sortable"+new Date().getTime();function d0(){var n=[],t;return{captureAnimationState:function(){if(n=[],!this.options.animation)return;var u=[].slice.call(this.el.children);u.forEach(function(c){if(pt(c,"display")==="none"||c===mt.ghost)return;n.push({target:c,rect:dr(c)});var h=kn({},n[n.length-1].rect);if(c.thisAnimationDuration){var a=hi(c,!0);a&&(h.top-=a.f,h.left-=a.e)}c.fromRect=h})},addAnimationState:function(u){n.push(u)},removeAnimationState:function(u){n.splice(a0(n,{target:u}),1)},animateAll:function(u){var c=this;if(!this.options.animation){clearTimeout(t),typeof u=="function"&&u();return}var h=!1,a=0;n.forEach(function(d){var f=0,p=d.target,y=p.fromRect,m=dr(p),v=p.prevFromRect,b=p.prevToRect,S=d.rect,E=hi(p,!0);E&&(m.top-=E.f,m.left-=E.e),p.toRect=m,p.thisAnimationDuration&&(ml(v,m)&&!ml(y,m)&&(S.top-m.top)/(S.left-m.left)===(y.top-m.top)/(y.left-m.left)&&(f=c0(S,v,b,c.options))),ml(m,y)||(p.prevFromRect=y,p.prevToRect=m,f||(f=c.options.animation),c.animate(p,S,m,f)),f&&(h=!0,a=Math.max(a,f),clearTimeout(p.animationResetTimer),p.animationResetTimer=setTimeout(function(){p.animationTime=0,p.prevFromRect=null,p.fromRect=null,p.prevToRect=null,p.thisAnimationDuration=null},f),p.thisAnimationDuration=f)}),clearTimeout(t),h?t=setTimeout(function(){typeof u=="function"&&u()},a):typeof u=="function"&&u(),n=[]},animate:function(u,c,h,a){if(a){pt(u,"transition",""),pt(u,"transform","");var d=hi(this.el),f=d&&d.a,p=d&&d.d,y=(c.left-h.left)/(f||1),m=(c.top-h.top)/(p||1);u.animatingX=!!y,u.animatingY=!!m,pt(u,"transform","translate3d("+y+"px,"+m+"px,0)"),this.forRepaintDummy=u0(u),pt(u,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),pt(u,"transform","translate3d(0,0,0)"),typeof u.animated=="number"&&clearTimeout(u.animated),u.animated=setTimeout(function(){pt(u,"transition",""),pt(u,"transform",""),u.animated=!1,u.animatingX=!1,u.animatingY=!1},a)}}}}function u0(n){return n.offsetWidth}function c0(n,t,i,u){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))*u.animation}var pi=[],gl={initializeByDefault:!0},lo={mount:function(t){for(var i in gl)gl.hasOwnProperty(i)&&!(i in t)&&(t[i]=gl[i]);pi.forEach(function(u){if(u.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),pi.push(t)},pluginEvent:function(t,i,u){var c=this;this.eventCanceled=!1,u.cancel=function(){c.eventCanceled=!0};var h=t+"Global";pi.forEach(function(a){if(!i[a.pluginName])return;i[a.pluginName][h]&&i[a.pluginName][h](kn({sortable:i},u)),i.options[a.pluginName]&&i[a.pluginName][t]&&i[a.pluginName][t](kn({sortable:i},u))})},initializePlugins:function(t,i,u,c){pi.forEach(function(d){var f=d.pluginName;if(!t.options[f]&&!d.initializeByDefault)return;var p=new d(t,i,t.options);p.sortable=t,p.options=t.options,t[f]=p,un(u,p.defaults)});for(var h in t.options){if(!t.options.hasOwnProperty(h))continue;var a=this.modifyOption(t,h,t.options[h]);typeof a!="undefined"&&(t.options[h]=a)}},getEventProperties:function(t,i){var u={};return pi.forEach(function(c){if(typeof c.eventProperties!="function")return;un(u,c.eventProperties.call(i[c.pluginName],t))}),u},modifyOption:function(t,i,u){var c;return pi.forEach(function(h){if(!t[h.pluginName])return;h.optionListeners&&typeof h.optionListeners[i]=="function"&&(c=h.optionListeners[i].call(t[h.pluginName],u))}),c}};function f0(n){var t=n.sortable,i=n.rootEl,u=n.name,c=n.targetEl,h=n.cloneEl,a=n.toEl,d=n.fromEl,f=n.oldIndex,p=n.newIndex,y=n.oldDraggableIndex,m=n.newDraggableIndex,v=n.originalEvent,b=n.putSortable,S=n.extraEventProperties;if(t=t||i&&i[Mr],!t)return;var E,x=t.options,D="on"+u.charAt(0).toUpperCase()+u.substr(1);window.CustomEvent&&!dn&&!oo?E=new CustomEvent(u,{bubbles:!0,cancelable:!0}):(E=document.createEvent("Event"),E.initEvent(u,!0,!0)),E.to=a||i,E.from=d||i,E.item=c||i,E.clone=h,E.oldIndex=f,E.newIndex=p,E.oldDraggableIndex=y,E.newDraggableIndex=m,E.originalEvent=v,E.pullMode=b?b.lastPutMode:void 0;var C=kn({},S,lo.getEventProperties(u,t));for(var N in C)E[N]=C[N];i&&i.dispatchEvent(E),x[D]&&x[D].call(t,E)}var Dr=function(t,i){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=u.evt,h=r0(u,["evt"]);lo.pluginEvent.bind(mt)(t,i,kn({dragEl:$e,parentEl:Yt,ghostEl:bt,rootEl:Ut,nextEl:zn,lastDownEl:ya,cloneEl:Gt,cloneHidden:En,dragStarted:co,putSortable:fr,activeSortable:mt.active,originalEvent:c,oldIndex:mi,oldDraggableIndex:uo,newIndex:Rr,newDraggableIndex:Cn,hideGhostForTarget:Zm,unhideGhostForTarget:Qm,cloneNowHidden:function(){En=!0},cloneNowShown:function(){En=!1},dispatchSortableEvent:function(d){Er({sortable:i,name:d,originalEvent:c})}},h))};function Er(n){f0(kn({putSortable:fr,cloneEl:Gt,targetEl:$e,rootEl:Ut,oldIndex:mi,oldDraggableIndex:uo,newIndex:Rr,newDraggableIndex:Cn},n))}var $e,Yt,bt,Ut,zn,ya,Gt,En,mi,Rr,uo,Cn,ba,fr,gi=!1,wa=!1,xa=[],Bn,Wr,vl,yl,Jm,eg,co,vi,fo,ho=!1,ka=!1,Sa,gr,bl=[],wl=!1,Ea=[],Ca=typeof document!="undefined",_a=Um,tg=oo||dn?"cssFloat":"float",h0=Ca&&!i0&&!Um&&"draggable"in document.createElement("div"),rg=function(){if(!Ca)return;if(dn)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}(),ng=function(t,i){var u=pt(t),c=parseInt(u.width)-parseInt(u.paddingLeft)-parseInt(u.paddingRight)-parseInt(u.borderLeftWidth)-parseInt(u.borderRightWidth),h=va(t,0,i),a=va(t,1,i),d=h&&pt(h),f=a&&pt(a),p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+dr(h).width,y=f&&parseInt(f.marginLeft)+parseInt(f.marginRight)+dr(a).width;if(u.display==="flex")return u.flexDirection==="column"||u.flexDirection==="column-reverse"?"vertical":"horizontal";if(u.display==="grid")return u.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(h&&d.float&&d.float!=="none"){var m=d.float==="left"?"left":"right";return a&&(f.clear==="both"||f.clear===m)?"vertical":"horizontal"}return h&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||p>=c&&u[tg]==="none"||a&&u[tg]==="none"&&p+y>c)?"vertical":"horizontal"},p0=function(t,i,u){var c=u?t.left:t.top,h=u?t.right:t.bottom,a=u?t.width:t.height,d=u?i.left:i.top,f=u?i.right:i.bottom,p=u?i.width:i.height;return c===d||h===f||c+a/2===d+p/2},m0=function(t,i){var u;return xa.some(function(c){if(pl(c))return;var h=dr(c),a=c[Mr].options.emptyInsertThreshold,d=t>=h.left-a&&t<=h.right+a,f=i>=h.top-a&&i<=h.bottom+a;if(a&&d&&f)return u=c}),u},ig=function(t){function i(h,a){return function(d,f,p,y){var m=d.options.group.name&&f.options.group.name&&d.options.group.name===f.options.group.name;if(h==null&&(a||m))return!0;if(h==null||h===!1)return!1;if(a&&h==="clone")return h;if(typeof h=="function")return i(h(d,f,p,y),a)(d,f,p,y);var v=(a?d:f).options.group.name;return h===!0||typeof h=="string"&&h===v||h.join&&h.indexOf(v)>-1}}var u={},c=t.group;(!c||ma(c)!="object")&&(c={name:c}),u.name=c.name,u.checkPull=i(c.pull,!0),u.checkPut=i(c.put),u.revertClone=c.revertClone,t.group=u},Zm=function(){!rg&&bt&&pt(bt,"display","none")},Qm=function(){!rg&&bt&&pt(bt,"display","")};Ca&&document.addEventListener("click",function(n){if(wa)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),wa=!1,!1},!0);var jn=function(t){if($e){t=t.touches?t.touches[0]:t;var i=m0(t.clientX,t.clientY);if(i){var u={};for(var c in t)t.hasOwnProperty(c)&&(u[c]=t[c]);u.target=u.rootEl=i,u.preventDefault=void 0,u.stopPropagation=void 0,i[Mr]._onDragOver(u)}}},g0=function(t){$e&&$e.parentNode[Mr]._isOutsideThisEl(t.target)};function mt(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=un({},t),n[Mr]=this;var i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ng(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,d){a.setData("Text",d.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:mt.supportPointer!==!1&&"PointerEvent"in window&&!ao,emptyInsertThreshold:5};lo.initializePlugins(this,n,i);for(var u in i)!(u in t)&&(t[u]=i[u]);ig(t);for(var c in this)c.charAt(0)==="_"&&typeof this[c]=="function"&&(this[c]=this[c].bind(this));this.nativeDraggable=t.forceFallback?!1:h0,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?It(n,"pointerdown",this._onTapStart):(It(n,"mousedown",this._onTapStart),It(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(It(n,"dragover",this),It(n,"dragenter",this)),xa.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),un(this,d0())}mt.prototype={constructor:mt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(vi=null)},_getDirection:function(t,i){return typeof this.options.direction=="function"?this.options.direction.call(this,t,i,$e):this.options.direction},_onTapStart:function(t){if(!t.cancelable)return;var i=this,u=this.el,c=this.options,h=c.preventOnFilter,a=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,f=(d||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||f,y=c.filter;if(k0(u),$e)return;if(/mousedown|pointerdown/.test(a)&&t.button!==0||c.disabled)return;if(p.isContentEditable)return;if(!this.nativeDraggable&&ao&&f&&f.tagName.toUpperCase()==="SELECT")return;if(f=en(f,c.draggable,u,!1),f&&f.animated)return;if(ya===f)return;if(mi=Br(f),uo=Br(f,c.draggable),typeof y=="function"){if(y.call(this,t,f,this)){Er({sortable:i,rootEl:p,name:"filter",targetEl:f,toEl:u,fromEl:u}),Dr("filter",i,{evt:t}),h&&t.cancelable&&t.preventDefault();return}}else if(y&&(y=y.split(",").some(function(m){if(m=en(p,m.trim(),u,!1),m)return Er({sortable:i,rootEl:m,name:"filter",targetEl:f,fromEl:u,toEl:u}),Dr("filter",i,{evt:t}),!0}),y)){h&&t.cancelable&&t.preventDefault();return}if(c.handle&&!en(p,c.handle,u,!1))return;this._prepareDragStart(t,d,f)},_prepareDragStart:function(t,i,u){var c=this,h=c.el,a=c.options,d=h.ownerDocument,f;if(u&&!$e&&u.parentNode===h){var p=dr(u);if(Ut=h,$e=u,Yt=$e.parentNode,zn=$e.nextSibling,ya=u,ba=a.group,mt.dragged=$e,Bn={target:$e,clientX:(i||t).clientX,clientY:(i||t).clientY},Jm=Bn.clientX-p.left,eg=Bn.clientY-p.top,this._lastX=(i||t).clientX,this._lastY=(i||t).clientY,$e.style["will-change"]="all",f=function(){if(Dr("delayEnded",c,{evt:t}),mt.eventCanceled){c._onDrop();return}c._disableDelayedDragEvents(),!qm&&c.nativeDraggable&&($e.draggable=!0),c._triggerDragStart(t,i),Er({sortable:c,name:"choose",originalEvent:t}),Fr($e,a.chosenClass,!0)},a.ignore.split(",").forEach(function(y){$m($e,y.trim(),kl)}),It(d,"dragover",jn),It(d,"mousemove",jn),It(d,"touchmove",jn),It(d,"mouseup",c._onDrop),It(d,"touchend",c._onDrop),It(d,"touchcancel",c._onDrop),qm&&this.nativeDraggable&&(this.options.touchStartThreshold=4,$e.draggable=!0),Dr("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||i)&&(!this.nativeDraggable||!(oo||dn))){if(mt.eventCanceled){this._onDrop();return}It(d,"mouseup",c._disableDelayedDrag),It(d,"touchend",c._disableDelayedDrag),It(d,"touchcancel",c._disableDelayedDrag),It(d,"mousemove",c._delayedDragTouchMoveHandler),It(d,"touchmove",c._delayedDragTouchMoveHandler),a.supportPointer&&It(d,"pointermove",c._delayedDragTouchMoveHandler),c._dragStartTimer=setTimeout(f,a.delay)}else f()}},_delayedDragTouchMoveHandler:function(t){var i=t.touches?t.touches[0]:t;Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){$e&&kl($e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Ct(t,"mouseup",this._disableDelayedDrag),Ct(t,"touchend",this._disableDelayedDrag),Ct(t,"touchcancel",this._disableDelayedDrag),Ct(t,"mousemove",this._delayedDragTouchMoveHandler),Ct(t,"touchmove",this._delayedDragTouchMoveHandler),Ct(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,i){i=i||t.pointerType=="touch"&&t,!this.nativeDraggable||i?this.options.supportPointer?It(document,"pointermove",this._onTouchMove):i?It(document,"touchmove",this._onTouchMove):It(document,"mousemove",this._onTouchMove):(It($e,"dragend",this),It(Ut,"dragstart",this._onDragStart));try{document.selection?Aa(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(u){}},_dragStarted:function(t,i){if(gi=!1,Ut&&$e){Dr("dragStarted",this,{evt:i}),this.nativeDraggable&&It(document,"dragover",g0);var u=this.options;!t&&Fr($e,u.dragClass,!1),Fr($e,u.ghostClass,!0),mt.active=this,t&&this._appendGhost(),Er({sortable:this,name:"start",originalEvent:i})}else this._nulling()},_emulateDragOver:function(){if(Wr){this._lastX=Wr.clientX,this._lastY=Wr.clientY,Zm();for(var t=document.elementFromPoint(Wr.clientX,Wr.clientY),i=t;t&&t.shadowRoot&&!(t=t.shadowRoot.elementFromPoint(Wr.clientX,Wr.clientY),t===i);)i=t;if($e.parentNode[Mr]._isOutsideThisEl(t),i)do{if(i[Mr]){var u=void 0;if(u=i[Mr]._onDragOver({clientX:Wr.clientX,clientY:Wr.clientY,target:t,rootEl:i}),u&&!this.options.dragoverBubble)break}t=i}while(i=i.parentNode);Qm()}},_onTouchMove:function(t){if(Bn){var i=this.options,u=i.fallbackTolerance,c=i.fallbackOffset,h=t.touches?t.touches[0]:t,a=bt&&hi(bt,!0),d=bt&&a&&a.a,f=bt&&a&&a.d,p=_a&&gr&&Km(gr),y=(h.clientX-Bn.clientX+c.x)/(d||1)+(p?p[0]-bl[0]:0)/(d||1),m=(h.clientY-Bn.clientY+c.y)/(f||1)+(p?p[1]-bl[1]:0)/(f||1);if(!mt.active&&!gi){if(u&&Math.max(Math.abs(h.clientX-this._lastX),Math.abs(h.clientY-this._lastY))<u)return;this._onDragStart(t,!0)}if(bt){a?(a.e+=y-(vl||0),a.f+=m-(yl||0)):a={a:1,b:0,c:0,d:1,e:y,f:m};var v="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");pt(bt,"webkitTransform",v),pt(bt,"mozTransform",v),pt(bt,"msTransform",v),pt(bt,"transform",v),vl=y,yl=m,Wr=h}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!bt){var t=this.options.fallbackOnBody?document.body:Ut,i=dr($e,!0,_a,!0,t),u=this.options;if(_a){for(gr=t;pt(gr,"position")==="static"&&pt(gr,"transform")==="none"&&gr!==document;)gr=gr.parentNode;gr!==document.body&&gr!==document.documentElement?(gr===document&&(gr=tn()),i.top+=gr.scrollTop,i.left+=gr.scrollLeft):gr=tn(),bl=Km(gr)}bt=$e.cloneNode(!0),Fr(bt,u.ghostClass,!1),Fr(bt,u.fallbackClass,!0),Fr(bt,u.dragClass,!0),pt(bt,"transition",""),pt(bt,"transform",""),pt(bt,"box-sizing","border-box"),pt(bt,"margin",0),pt(bt,"top",i.top),pt(bt,"left",i.left),pt(bt,"width",i.width),pt(bt,"height",i.height),pt(bt,"opacity","0.8"),pt(bt,"position",_a?"absolute":"fixed"),pt(bt,"zIndex","100000"),pt(bt,"pointerEvents","none"),mt.ghost=bt,t.appendChild(bt),pt(bt,"transform-origin",Jm/parseInt(bt.style.width)*100+"% "+eg/parseInt(bt.style.height)*100+"%")}},_onDragStart:function(t,i){var u=this,c=t.dataTransfer,h=u.options;if(Dr("dragStart",this,{evt:t}),mt.eventCanceled){this._onDrop();return}Dr("setupClone",this),mt.eventCanceled||(Gt=Ym($e),Gt.draggable=!1,Gt.style["will-change"]="",this._hideClone(),Fr(Gt,this.options.chosenClass,!1),mt.clone=Gt),u.cloneId=Aa(function(){if(Dr("clone",u),mt.eventCanceled)return;u.options.removeCloneOnHide||Ut.insertBefore(Gt,$e),u._hideClone(),Er({sortable:u,name:"clone"})}),!i&&Fr($e,h.dragClass,!0),i?(wa=!0,u._loopId=setInterval(u._emulateDragOver,50)):(Ct(document,"mouseup",u._onDrop),Ct(document,"touchend",u._onDrop),Ct(document,"touchcancel",u._onDrop),c&&(c.effectAllowed="move",h.setData&&h.setData.call(u,c,$e)),It(document,"drop",u),pt($e,"transform","translateZ(0)")),gi=!0,u._dragStartId=Aa(u._dragStarted.bind(u,i,t)),It(document,"selectstart",u),co=!0,ao&&pt(document.body,"user-select","none")},_onDragOver:function(t){var i=this.el,u=t.target,c,h,a,d=this.options,f=d.group,p=mt.active,y=ba===f,m=d.sort,v=fr||p,b,S=this,E=!1;if(wl)return;function x(P,le){Dr(P,S,kn({evt:t,isOwner:y,axis:b?"vertical":"horizontal",revert:a,dragRect:c,targetRect:h,canSort:m,fromSortable:v,target:u,completed:C,onMove:function(q,L){return xl(Ut,i,$e,c,q,dr(q),t,L)},changed:N},le))}function D(){x("dragOverAnimationCapture"),S.captureAnimationState(),S!==v&&v.captureAnimationState()}function C(P){return x("dragOverCompleted",{insertion:P}),P&&(y?p._hideClone():p._showClone(S),S!==v&&(Fr($e,fr?fr.options.ghostClass:p.options.ghostClass,!1),Fr($e,d.ghostClass,!0)),fr!==S&&S!==mt.active?fr=S:S===mt.active&&fr&&(fr=null),v===S&&(S._ignoreWhileAnimating=u),S.animateAll(function(){x("dragOverAnimationComplete"),S._ignoreWhileAnimating=null}),S!==v&&(v.animateAll(),v._ignoreWhileAnimating=null)),(u===$e&&!$e.animated||u===i&&!u.animated)&&(vi=null),!d.dragoverBubble&&!t.rootEl&&u!==document&&($e.parentNode[Mr]._isOutsideThisEl(t.target),!P&&jn(t)),!d.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),E=!0}function N(){Rr=Br($e),Cn=Br($e,d.draggable),Er({sortable:S,name:"change",toEl:i,newIndex:Rr,newDraggableIndex:Cn,originalEvent:t})}if(t.preventDefault!==void 0&&(t.cancelable&&t.preventDefault()),u=en(u,d.draggable,i,!0),x("dragOver"),mt.eventCanceled)return E;if($e.contains(t.target)||u.animated&&u.animatingX&&u.animatingY||S._ignoreWhileAnimating===u)return C(!1);if(wa=!1,p&&!d.disabled&&(y?m||(a=!Ut.contains($e)):fr===this||(this.lastPutMode=ba.checkPull(this,p,$e,t))&&f.checkPut(this,p,$e,t))){if(b=this._getDirection(t,u)==="vertical",c=dr($e),x("dragOverValid"),mt.eventCanceled)return E;if(a)return Yt=Ut,D(),this._hideClone(),x("revert"),mt.eventCanceled||(zn?Ut.insertBefore($e,zn):Ut.appendChild($e)),C(!0);var R=pl(i,d.draggable);if(!R||b0(t,b,this)&&!R.animated){if(R===$e)return C(!1);if(R&&i===t.target&&(u=R),u&&(h=dr(u)),xl(Ut,i,$e,c,u,h,t,!!u)!==!1)return D(),i.appendChild($e),Yt=i,N(),C(!0)}else if(u.parentNode===i){h=dr(u);var H=0,j,J=$e.parentNode!==i,W=!p0($e.animated&&$e.toRect||c,u.animated&&u.toRect||h,b),Y=b?"top":"left",M=Gm(u,"top","top")||Gm($e,"top","top"),K=M?M.scrollTop:void 0;vi!==u&&(j=h[Y],ho=!1,ka=!W&&d.invertSwap||J),H=w0(t,u,h,b,W?1:d.swapThreshold,d.invertedSwapThreshold==null?d.swapThreshold:d.invertedSwapThreshold,ka,vi===u);var k;if(H!==0){var G=Br($e);do G-=H,k=Yt.children[G];while(k&&(pt(k,"display")==="none"||k===bt))}if(H===0||k===u)return C(!1);vi=u,fo=H;var B=u.nextElementSibling,re=!1;re=H===1;var I=xl(Ut,i,$e,c,u,h,t,re);if(I!==!1)return(I===1||I===-1)&&(re=I===1),wl=!0,setTimeout(y0,30),D(),re&&!B?i.appendChild($e):u.parentNode.insertBefore($e,re?B:u),M&&Xm(M,0,K-M.scrollTop),Yt=$e.parentNode,j!==void 0&&!ka&&(Sa=Math.abs(j-dr(u)[Y])),N(),C(!0)}if(i.contains($e))return C(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Ct(document,"mousemove",this._onTouchMove),Ct(document,"touchmove",this._onTouchMove),Ct(document,"pointermove",this._onTouchMove),Ct(document,"dragover",jn),Ct(document,"mousemove",jn),Ct(document,"touchmove",jn)},_offUpEvents:function(){var t=this.el.ownerDocument;Ct(t,"mouseup",this._onDrop),Ct(t,"touchend",this._onDrop),Ct(t,"pointerup",this._onDrop),Ct(t,"touchcancel",this._onDrop),Ct(document,"selectstart",this)},_onDrop:function(t){var i=this.el,u=this.options;if(Rr=Br($e),Cn=Br($e,u.draggable),Dr("drop",this,{evt:t}),Yt=$e&&$e.parentNode,Rr=Br($e),Cn=Br($e,u.draggable),mt.eventCanceled){this._nulling();return}gi=!1,ka=!1,ho=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Sl(this.cloneId),Sl(this._dragStartId),this.nativeDraggable&&(Ct(document,"drop",this),Ct(i,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ao&&pt(document.body,"user-select",""),pt($e,"transform",""),t&&(co&&(t.cancelable&&t.preventDefault(),!u.dropBubble&&t.stopPropagation()),bt&&bt.parentNode&&bt.parentNode.removeChild(bt),(Ut===Yt||fr&&fr.lastPutMode!=="clone")&&(Gt&&Gt.parentNode&&Gt.parentNode.removeChild(Gt)),$e&&(this.nativeDraggable&&Ct($e,"dragend",this),kl($e),$e.style["will-change"]="",co&&!gi&&Fr($e,fr?fr.options.ghostClass:this.options.ghostClass,!1),Fr($e,this.options.chosenClass,!1),Er({sortable:this,name:"unchoose",toEl:Yt,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ut!==Yt?(Rr>=0&&(Er({rootEl:Yt,name:"add",toEl:Yt,fromEl:Ut,originalEvent:t}),Er({sortable:this,name:"remove",toEl:Yt,originalEvent:t}),Er({rootEl:Yt,name:"sort",toEl:Yt,fromEl:Ut,originalEvent:t}),Er({sortable:this,name:"sort",toEl:Yt,originalEvent:t})),fr&&fr.save()):Rr!==mi&&(Rr>=0&&(Er({sortable:this,name:"update",toEl:Yt,originalEvent:t}),Er({sortable:this,name:"sort",toEl:Yt,originalEvent:t}))),mt.active&&((Rr==null||Rr===-1)&&(Rr=mi,Cn=uo),Er({sortable:this,name:"end",toEl:Yt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Dr("nulling",this),Ut=$e=Yt=bt=zn=Gt=ya=En=Bn=Wr=co=Rr=Cn=mi=uo=vi=fo=fr=ba=mt.dragged=mt.ghost=mt.clone=mt.active=null,Ea.forEach(function(t){t.checked=!0}),Ea.length=vl=yl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":$e&&(this._onDragOver(t),v0(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],i,u=this.el.children,c=0,h=u.length,a=this.options;c<h;c++)i=u[c],en(i,a.draggable,this.el,!1)&&t.push(i.getAttribute(a.dataIdAttr)||x0(i));return t},sort:function(t,i){var u={},c=this.el;this.toArray().forEach(function(h,a){var d=c.children[a];en(d,this.options.draggable,c,!1)&&(u[h]=d)},this),i&&this.captureAnimationState(),t.forEach(function(h){u[h]&&(c.removeChild(u[h]),c.appendChild(u[h]))}),i&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,i){return en(t,i||this.options.draggable,this.el,!1)},option:function(t,i){var u=this.options;if(i===void 0)return u[t];var c=lo.modifyOption(this,t,i);typeof c!="undefined"?u[t]=c:u[t]=i,t==="group"&&ig(u)},destroy:function(){Dr("destroy",this);var t=this.el;t[Mr]=null,Ct(t,"mousedown",this._onTapStart),Ct(t,"touchstart",this._onTapStart),Ct(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Ct(t,"dragover",this),Ct(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(i){i.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xa.splice(xa.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!En){if(Dr("hideClone",this),mt.eventCanceled)return;pt(Gt,"display","none"),this.options.removeCloneOnHide&&Gt.parentNode&&Gt.parentNode.removeChild(Gt),En=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(En){if(Dr("showClone",this),mt.eventCanceled)return;$e.parentNode==Ut&&!this.options.group.revertClone?Ut.insertBefore(Gt,$e):zn?Ut.insertBefore(Gt,zn):Ut.appendChild(Gt),this.options.group.revertClone&&this.animate($e,Gt),pt(Gt,"display",""),En=!1}}};function v0(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function xl(n,t,i,u,c,h,a,d){var f,p=n[Mr],y=p.options.onMove,m;return window.CustomEvent&&!dn&&!oo?f=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(f=document.createEvent("Event"),f.initEvent("move",!0,!0)),f.to=t,f.from=n,f.dragged=i,f.draggedRect=u,f.related=c||t,f.relatedRect=h||dr(t),f.willInsertAfter=d,f.originalEvent=a,n.dispatchEvent(f),y&&(m=y.call(p,f,a)),m}function kl(n){n.draggable=!1}function y0(){wl=!1}function b0(n,t,i){var u=dr(pl(i.el,i.options.draggable)),c=10;return t?n.clientX>u.right+c||n.clientX<=u.right&&n.clientY>u.bottom&&n.clientX>=u.left:n.clientX>u.right&&n.clientY>u.top||n.clientX<=u.right&&n.clientY>u.bottom+c}function w0(n,t,i,u,c,h,a,d){var f=u?n.clientY:n.clientX,p=u?i.height:i.width,y=u?i.top:i.left,m=u?i.bottom:i.right,v=!1;if(!a){if(d&&Sa<p*c){if(!ho&&(fo===1?f>y+p*h/2:f<m-p*h/2)&&(ho=!0),ho)v=!0;else if(fo===1?f<y+Sa:f>m-Sa)return-fo}else if(f>y+p*(1-c)/2&&f<m-p*(1-c)/2)return S0(t)}return v=v||a,v&&(f<y+p*h/2||f>m-p*h/2)?f>y+p/2?1:-1:0}function S0(n){return Br($e)<Br(n)?1:-1}function x0(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,i=t.length,u=0;i--;)u+=t.charCodeAt(i);return u.toString(36)}function k0(n){Ea.length=0;for(var t=n.getElementsByTagName("input"),i=t.length;i--;){var u=t[i];u.checked&&Ea.push(u)}}function Aa(n){return setTimeout(n,0)}function Sl(n){return clearTimeout(n)}Ca&&It(document,"touchmove",function(n){(mt.active||gi)&&n.cancelable&&n.preventDefault()});mt.utils={on:It,off:Ct,css:pt,find:$m,is:function(t,i){return!!en(t,i,t,!1)},extend:s0,throttle:Vm,closest:en,toggleClass:Fr,clone:Ym,index:Br,nextTick:Aa,cancelNextTick:Sl,detectDirection:ng,getChild:va};mt.get=function(n){return n[Mr]};mt.mount=function(){for(var n=arguments.length,t=new Array(n),i=0;i<n;i++)t[i]=arguments[i];t[0].constructor===Array&&(t=t[0]),t.forEach(function(u){if(!u.prototype||!u.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(u));u.utils&&(mt.utils=kn({},mt.utils,u.utils)),lo.mount(u)})};mt.create=function(n,t){return new mt(n,t)};mt.version=n0;var Zt=[],po,El,Cl=!1,_l,Al,Ta,mo;function E0(){function n(){this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return n.prototype={dragStarted:function(i){var u=i.originalEvent;this.sortable.nativeDraggable?It(document,"dragover",this._handleAutoScroll):this.options.supportPointer?It(document,"pointermove",this._handleFallbackAutoScroll):u.touches?It(document,"touchmove",this._handleFallbackAutoScroll):It(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(i){var u=i.originalEvent;!this.options.dragOverBubble&&!u.rootEl&&this._handleAutoScroll(u)},drop:function(){this.sortable.nativeDraggable?Ct(document,"dragover",this._handleAutoScroll):(Ct(document,"pointermove",this._handleFallbackAutoScroll),Ct(document,"touchmove",this._handleFallbackAutoScroll),Ct(document,"mousemove",this._handleFallbackAutoScroll)),og(),Da(),l0()},nulling:function(){Ta=El=po=Cl=mo=_l=Al=null,Zt.length=0},_handleFallbackAutoScroll:function(i){this._handleAutoScroll(i,!0)},_handleAutoScroll:function(i,u){var c=this,h=(i.touches?i.touches[0]:i).clientX,a=(i.touches?i.touches[0]:i).clientY,d=document.elementFromPoint(h,a);if(Ta=i,u||oo||dn||ao){Tl(i,this.options,d,u);var f=Sn(d,!0);Cl&&(!mo||h!==_l||a!==Al)&&(mo&&og(),mo=setInterval(function(){var p=Sn(document.elementFromPoint(h,a),!0);p!==f&&(f=p,Da()),Tl(i,c.options,p,u)},10),_l=h,Al=a)}else{if(!this.options.bubbleScroll||Sn(d,!0)===tn()){Da();return}Tl(i,this.options,Sn(d,!1),!1)}}},un(n,{pluginName:"scroll",initializeByDefault:!0})}function Da(){Zt.forEach(function(n){clearInterval(n.pid)}),Zt=[]}function og(){clearInterval(mo)}var Tl=Vm(function(n,t,i,u){if(!t.scroll)return;var c=(n.touches?n.touches[0]:n).clientX,h=(n.touches?n.touches[0]:n).clientY,a=t.scrollSensitivity,d=t.scrollSpeed,f=tn(),p=!1,y;El!==i&&(El=i,Da(),po=t.scroll,y=t.scrollFn,po===!0&&(po=Sn(i,!0)));var m=0,v=po;do{var b=v,S=dr(b),E=S.top,x=S.bottom,D=S.left,C=S.right,N=S.width,R=S.height,H=void 0,j=void 0,J=b.scrollWidth,W=b.scrollHeight,Y=pt(b),M=b.scrollLeft,K=b.scrollTop;b===f?(H=N<J&&(Y.overflowX==="auto"||Y.overflowX==="scroll"||Y.overflowX==="visible"),j=R<W&&(Y.overflowY==="auto"||Y.overflowY==="scroll"||Y.overflowY==="visible")):(H=N<J&&(Y.overflowX==="auto"||Y.overflowX==="scroll"),j=R<W&&(Y.overflowY==="auto"||Y.overflowY==="scroll"));var k=H&&(Math.abs(C-c)<=a&&M+N<J)-(Math.abs(D-c)<=a&&!!M),G=j&&(Math.abs(x-h)<=a&&K+R<W)-(Math.abs(E-h)<=a&&!!K);if(!Zt[m])for(var B=0;B<=m;B++)Zt[B]||(Zt[B]={});(Zt[m].vx!=k||Zt[m].vy!=G||Zt[m].el!==b)&&(Zt[m].el=b,Zt[m].vx=k,Zt[m].vy=G,clearInterval(Zt[m].pid),(k!=0||G!=0)&&(p=!0,Zt[m].pid=setInterval(function(){u&&this.layer===0&&mt.active._onTouchMove(Ta);var re=Zt[this.layer].vy?Zt[this.layer].vy*d:0,I=Zt[this.layer].vx?Zt[this.layer].vx*d:0;if(typeof y=="function"&&y.call(mt.dragged.parentNode[Mr],I,re,n,Ta,Zt[this.layer].el)!=="continue")return;Xm(Zt[this.layer].el,I,re)}.bind({layer:m}),24))),m++}while(t.bubbleScroll&&v!==f&&(v=Sn(v,!1)));Cl=p},30),ag=function(t){var i=t.originalEvent,u=t.putSortable,c=t.dragEl,h=t.activeSortable,a=t.dispatchSortableEvent,d=t.hideGhostForTarget,f=t.unhideGhostForTarget;if(!i)return;var p=u||h;d();var y=i.changedTouches&&i.changedTouches.length?i.changedTouches[0]:i,m=document.elementFromPoint(y.clientX,y.clientY);f(),p&&!p.el.contains(m)&&(a("spill"),this.onSpill({dragEl:c,putSortable:u}))};function Dl(){}Dl.prototype={startIndex:null,dragStart:function(t){var i=t.oldDraggableIndex;this.startIndex=i},onSpill:function(t){var i=t.dragEl,u=t.putSortable;this.sortable.captureAnimationState(),u&&u.captureAnimationState();var c=va(this.sortable.el,this.startIndex,this.options);c?this.sortable.el.insertBefore(i,c):this.sortable.el.appendChild(i),this.sortable.animateAll(),u&&u.animateAll()},drop:ag};un(Dl,{pluginName:"revertOnSpill"});function Il(){}Il.prototype={onSpill:function(t){var i=t.dragEl,u=t.putSortable,c=u||this.sortable;c.captureAnimationState(),i.parentNode&&i.parentNode.removeChild(i),c.animateAll()},drop:ag};un(Il,{pluginName:"removeOnSpill"});mt.mount(new E0);mt.mount(Il,Dl);var yi=mt;const sg={name:function(n,t){const i=n.getAttribute("data-name").trim().toLowerCase(),u=t.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(u)},created:function(n,t){const i=Number(n.getAttribute("data-created")),u=Number(t.getAttribute("data-created"));return u-i},updated:function(n,t){const i=Number(n.getAttribute("data-updated")),u=Number(t.getAttribute("data-updated"));return u-i},chaptersFirst:function(n,t){const i=n.getAttribute("data-type"),u=t.getAttribute("data-type");return i===u?0:i==="chapter"?-1:1},chaptersLast:function(n,t){const i=n.getAttribute("data-type"),u=t.getAttribute("data-type");return i===u?0:i==="chapter"?1:-1}};class C0{constructor(n){this.elem=n,this.sortContainer=n.querySelector("[book-sort-boxes]"),this.input=n.querySelector("[book-sort-input]");const t=n.querySelector(".sort-box");this.setupBookSortable(t),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let n="",t=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",u=>{const c=u.target.closest(".sort-box-options [data-sort]");if(!c)return;u.preventDefault();const h=c.closest(".sort-box").querySelectorAll("ul"),a=c.getAttribute("data-sort");t=n===a?!t:!1;let d=sg[a];t&&i.includes(a)&&(d=function(f,p){return 0-sg[a](f,p)});for(let f of h){const p=Array.from(f.children).filter(y=>y.matches("li"));p.sort(d).forEach(y=>{f.appendChild(y)})}n=a,this.updateMapInput()})}bookSelect(n){const t=this.elem.querySelector(`[data-type="book"][data-id="${n.id}"]`)!==null;if(t)return;const i=n.link+"/sort-item";window.$http.get(i).then(u=>{const c=document.createElement("div");c.innerHTML=u.data;const h=c.children[0];this.sortContainer.append(h),this.setupBookSortable(h)})}setupBookSortable(n){const t=[n.querySelector(".sort-list")];t.push(...n.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},u={name:"chapter",pull:["book","chapter"],put:function(c,h,a){return a.getAttribute("data-type")==="page"}};for(let c of t)new yi(c,{group:c.classList.contains("sort-list")?i:u,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 n=this.buildEntityMap();this.input.value=JSON.stringify(n)}buildEntityMap(){const n=[],t=this.elem.querySelectorAll(".sort-list");for(let i of t){const u=i.closest('[data-type="book"]').getAttribute("data-id"),c=Array.from(i.children).filter(h=>h.matches('[data-type="page"], [data-type="chapter"]'));for(let h=0;h<c.length;h++)this.addBookChildToMap(c[h],h,u,n)}return n}addBookChildToMap(n,t,i,u){const c=n.getAttribute("data-type"),h=!1,a=n.getAttribute("data-id");u.push({id:a,sort:t,parentChapter:h,type:c,book:i});const d=n.querySelectorAll('[data-type="page"]');for(let f=0;f<d.length;f++)u.push({id:d[f].getAttribute("data-id"),sort:f,parentChapter:a,type:"page",book:i})}}var lg=C0;const Ia=new WeakMap;function ug(n,t=400,i=null){Fa(n),n.style.display="block",La(n,{opacity:["0","1"]},t,()=>{i&&i()})}function Ma(n,t=400,i=null){Fa(n),La(n,{opacity:["1","0"]},t,()=>{n.style.display="none",i&&i()})}function bi(n,t=400){Fa(n);const i=n.getBoundingClientRect().height,u=getComputedStyle(n),c=u.getPropertyValue("padding-top"),h=u.getPropertyValue("padding-bottom"),a={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[c,"0px"],paddingBottom:[h,"0px"]};La(n,a,t,()=>{n.style.display="none"})}function wi(n,t=400){Fa(n),n.style.display="block";const i=n.getBoundingClientRect().height,u=getComputedStyle(n),c=u.getPropertyValue("padding-top"),h=u.getPropertyValue("padding-bottom"),a={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",c],paddingBottom:["0px",h]};La(n,a,t)}function La(n,t,i=400,u=null){const c=Object.keys(t);for(let a of c)n.style[a]=t[a][0];const h=()=>{for(let a of c)n.style[a]=null;n.style.transition=null,n.removeEventListener("transitionend",h),Ia.delete(n),u&&u()};setTimeout(()=>{n.style.transition=`all ease-in-out ${i}ms`;for(let a of c)n.style[a]=t[a][1];n.addEventListener("transitionend",h),Ia.set(n,h)},15)}function Fa(n){if(Ia.has(n)){const t=Ia.get(n);t()}}class _0{constructor(n){this.elem=n,this.isOpen=n.classList.contains("open"),n.addEventListener("click",this.click.bind(this))}open(){const n=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),wi(n,240)}close(){const n=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),bi(n,240)}click(n){n.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var cg=_0;const qn=St(At()),dg=St(Ms()),D1=St(Rs()),I1=St(Os()),L1=St(qc()),F1=St(Wc()),M1=St(Kc()),R1=St(Yc()),O1=St(Ns()),P1=St(Ps()),N1=St(od()),z1=St(ld()),B1=St(pd()),j1=St(vd()),q1=St(wd()),U1=St(Sd()),H1=St(_d()),W1=St(Dd()),$1=St(Fd()),G1=St(Od()),K1=St(zd()),V1=St(qd()),X1=St(Kd()),Y1=St(Yd()),Z1=St(Jd()),Q1=St(rf()),J1=St(af()),eS=St(Ko()),tS=St(uf()),rS=St(ff()),Ll={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:n=>n.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 A0(){const n=document.querySelectorAll(".page-content pre, .comment-box .content pre");for(const t of n)fg(t)}function T0(n){const t=n.querySelectorAll("pre");for(const i of t)fg(i)}function fg(n){const t=n.querySelector("code[class^=language-]");n.innerHTML=n.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);const i=n.textContent.trimEnd();let u="";if(t!==null){const h=t.className.replace("language-","");u=Ra(h,i)}const c=qn.default(function(h){n.parentNode.replaceChild(h,n)},{value:i,mode:u,lineNumbers:!0,lineWrapping:!1,theme:Oa(),readOnly:!0});D0(c)}function D0(n){const t='<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=t,n.display.wrapper.appendChild(i);const u=new dg.default(i,{text:function(c){return n.getValue()}});u.on("success",c=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ra(n,t){n=n.trim().replace(/^\./g,"").toLowerCase();const i=typeof Ll[n];return i==="undefined"?"":i==="function"?Ll[n](t):Ll[n]}function Oa(){const n=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(n?"darcula":"default")}function I0(n){const t=n.ownerDocument,i=n.querySelector("code");let u=(n.className||"").replace("language-","");u===""&&i&&(u=(i.className||"").replace("language-","")),n.innerHTML=n.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);const c=n.textContent,h=t.createElement("div"),a=t.createElement("textarea");h.className="CodeMirrorContainer",h.setAttribute("data-lang",u),h.setAttribute("dir","ltr"),a.style.display="none",n.parentNode.replaceChild(h,n),h.appendChild(a),h.contentEditable=!1,a.textContent=c;let d=qn.default(function(f){h.appendChild(f)},{value:c,mode:Ra(u,c),lineNumbers:!0,lineWrapping:!1,theme:Oa(),readOnly:!0});return{wrap:h,editor:d}}function L0(n,t){const i=n.textContent;return qn.default(function(u){n.parentNode.insertBefore(u,n),n.style.display="none"},{value:i,mode:Ra(t,i),lineNumbers:!0,lineWrapping:!1,theme:Oa()})}function F0(n,t,i){n.setOption("mode",Ra(t,i))}function M0(n,t){n.setValue(t),setTimeout(()=>{hg(n)},10)}function hg(n){n.refresh()}function R0(n){const t=n.textContent,i={value:t,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Oa(),scrollPastEnd:!0};return window.$events.emitPublic(n,"editor-markdown-cm::pre-init",{config:i}),qn.default(function(u){n.parentNode.insertBefore(u,n),n.style.display="none"},i)}function O0(){let n=qn.default.keyMap.default==qn.default.keyMap.macDefault;return n?"Cmd":"Ctrl"}var lr={highlight:A0,highlightWithin:T0,wysiwygView:I0,popupEditor:L0,setMode:F0,setContent:M0,updateLayout:hg,markdownEditor:R0,getMetaKey:O0};class P0{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",n=>{n.ctrlKey&&n.key==="Enter"&&this.save()}),Rt(this.languageLinks,n=>{const t=n.target.dataset.lang;this.languageInput.value=t,this.updateEditorMode(t)}),ha(this.languageInput,n=>this.save()),Rt(this.saveButton,n=>this.save()),qt(this.historyList,"button","click",(n,t)=>{n.preventDefault();const i=t.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(n,t,i){this.languageInput.value=t,this.callback=i,this.show(),this.updateEditorMode(t),lr.setContent(this.editor,n)}show(){this.editor||(this.editor=lr.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{lr.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(n){lr.setMode(this.editor,n,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const n=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",n.length===0),this.historyList.innerHTML=n.map(t=>{const i=new Date(parseInt(t)).toLocaleTimeString();return`<li><button type="button" data-time="${t}">${i}</button></li>`}).join("")}addHistory(){if(!this.editor)return;const n=this.editor.getValue();if(!n)return;const t=Object.keys(this.history).pop();if(this.history[t]===n)return;this.history[String(Date.now())]=n;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var pg=P0;class N0{constructor(n){lr.highlightWithin(n)}}var mg=N0;class z0{constructor(n){if(this.elem=n,this.trigger=n.querySelector("[collapsible-trigger]"),this.content=n.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"),wi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),bi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const n=this.content.querySelector(".text-neg.text-small");n&&this.open()}}var gg=z0;class B0{constructor(n){this.elem=n,this.checkbox=n.querySelector("input[type=checkbox]"),this.display=n.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(n){const t=n.keyCode===32||n.keyCode===13;t&&(n.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const n=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",n)}}var vg=B0;class j0{constructor(n){this.elem=n,this.dealtWith=!1,n.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;lr.highlightWithin(this.elem),this.dealtWith=!0}}var yg=j0;class q0{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.bubbleEscapes=this.$opts.bubbleEscapes==="true",this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners(),this.hide=this.hide.bind(this)}show(n=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",u=>{this.menu.contains(u.target)||this.hide()});const t=this.menu.querySelector("input");t!==null&&t.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),n&&n.stopPropagation()}hideAll(){for(let n of window.components.dropdown)n.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 n=this.getFocusable(),t=n.indexOf(document.activeElement);let i=t+1;i>=n.length&&(i=0),n[i].focus()}focusPrevious(){const n=this.getFocusable(),t=n.indexOf(document.activeElement);let i=t-1;i<0&&(i=n.length-1),n[i].focus()}setupListeners(){this.container.addEventListener("click",t=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(t.target)&&this.hide()}),Rt(this.toggle,t=>{t.stopPropagation(),this.show(t),t instanceof KeyboardEvent&&this.focusNext()});const n=t=>{t.key==="ArrowDown"||t.key==="ArrowRight"?(this.focusNext(),t.preventDefault()):t.key==="ArrowUp"||t.key==="ArrowLeft"?(this.focusPrevious(),t.preventDefault()):t.key==="Escape"&&(this.hide(),this.toggle.focus(),this.bubbleEscapes||t.stopPropagation())};this.container.addEventListener("keydown",n),this.moveMenu&&this.menu.addEventListener("keydown",n),this.menu.addEventListener("keydown ",t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),this.hide())})}}var bg=q0;class U0{setup(){this.elem=this.$el,this.searchInput=this.$refs.searchInput,this.loadingElem=this.$refs.loading,this.listContainerElem=this.$refs.listContainer,this.localSearchSelector=this.$opts.localSearchSelector,this.url=this.$opts.url,this.elem.addEventListener("show",this.onShow.bind(this)),this.searchInput.addEventListener("input",this.onSearch.bind(this)),this.runAjaxSearch=pa(this.runAjaxSearch,300,!1)}onShow(){this.loadList()}onSearch(){const n=this.searchInput.value.toLowerCase().trim();this.localSearchSelector?this.runLocalSearch(n):(this.toggleLoading(!0),this.runAjaxSearch(n))}runAjaxSearch(n){this.loadList(n)}runLocalSearch(n){const t=this.listContainerElem.querySelectorAll(this.localSearchSelector);for(let i of t){const u=!n||i.textContent.toLowerCase().includes(n);i.style.display=u?"flex":"none",i.classList.toggle("hidden",!u)}}async loadList(n=""){this.listContainerElem.innerHTML="",this.toggleLoading(!0);try{const t=await window.$http.get(this.getAjaxUrl(n));this.listContainerElem.innerHTML=t.data}catch(t){console.error(t)}this.toggleLoading(!1),this.localSearchSelector&&this.onSearch()}getAjaxUrl(n=null){if(!n)return this.url;const t=this.url.includes("?")?"&":"?";return`${this.url}${t}search=${encodeURIComponent(n)}`}toggleLoading(n=!1){this.loadingElem.style.display=n?"block":"none"}}var wg=U0;const xg=St(hf());class H0{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 n=this;this.dz=new xg.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",n.onSending.bind(n)),this.dz.on("success",n.onSuccess.bind(n)),this.dz.on("error",n.onError.bind(n))}})}onSending(n,t,i){const u=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",u),t.ontimeout=c=>{this.dz.emit("complete",n),this.dz.emit("error",n,this.timeoutMessage)}}onSuccess(n,t){this.$emit("success",{file:n,data:t}),this.successMessage&&window.$events.emit("success",this.successMessage),Ma(n.previewElement,800,()=>{this.dz.removeFile(n)})}onError(n,t,i){this.$emit("error",{file:n,errorMessage:t,xhr:i});const u=c=>{const h=n.previewElement.querySelector("[data-dz-errormessage]");h.textContent=c};i&&i.status===413?u(this.uploadLimitMessage):t.file&&u(t.file)}removeAll(){this.dz.removeAllFiles(!0)}}var kg=H0;class W0{constructor(n){this.elem=n,this.buttons=n.querySelectorAll("[toolbox-tab-button]"),this.contentElements=n.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=n.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",t=>{let i=t.target.closest("[toolbox-tab-button]");if(i===null)return;let u=i.getAttribute("toolbox-tab-button");this.setActiveTab(u,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const n=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",n)}setActiveTab(n,t=!1){for(let i=0,u=this.buttons.length;i<u;i++){this.buttons[i].classList.remove("active");let c=this.buttons[i].getAttribute("toolbox-tab-button");c===n&&this.buttons[i].classList.add("active")}for(let i=0,u=this.contentElements.length;i<u;i++){this.contentElements[i].style.display="none";let c=this.contentElements[i].getAttribute("toolbox-tab-content");c===n&&(this.contentElements[i].style.display="block")}t&&this.elem.classList.add("open")}}var Sg=W0;class $0{constructor(n){this.permissionsTable=n.querySelector("[permissions-table]"),this.restrictedCheckbox=n.querySelector("[name=restricted]"),this.restrictedCheckbox.addEventListener("change",this.updateTableVisibility.bind(this))}updateTableVisibility(){this.permissionsTable.style.display=this.restrictedCheckbox.checked?null:"none"}}var Eg=$0;class G0{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",n=>{n.preventDefault(),this.runSearch()}),Rt(this.clearButton,this.clearSearch.bind(this))}runSearch(){const n=this.searchInput.value.trim();if(n.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const t=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(t,{term:n}).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 Cg=G0;class K0{setup(){this.elem=this.$el,this.entityTypes=this.$opts.entityTypes||"page,book,chapter",this.entityPermission=this.$opts.entityPermission||"view",this.input=this.$refs.input,this.searchInput=this.$refs.search,this.loading=this.$refs.loading,this.resultsContainer=this.$refs.results,this.addButton=this.$refs.add,this.search="",this.lastClick=0,this.selectedItemData=null,this.setupListeners(),this.showLoading(),this.initialLoad()}setupListeners(){this.elem.addEventListener("click",this.onClick.bind(this));let n=0;this.searchInput.addEventListener("input",t=>{n=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-n<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",t=>{t.keyCode===13&&t.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",t=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),qt(this.$el,"[data-entity-type]","keydown",(t,i)=>{if(t.ctrlKey&&t.code==="Enter"){const u=this.$el.closest("form");if(u){u.submit(),t.preventDefault();return}}t.code==="ArrowDown"&&this.focusAdjacent(!0),t.code==="ArrowUp"&&this.focusAdjacent(!1)}),this.searchInput.addEventListener("keydown",t=>{t.code==="ArrowDown"&&this.focusAdjacent(!0)})}focusAdjacent(n=!0){const t=Array.from(this.resultsContainer.querySelectorAll("[data-entity-type]")),i=t.indexOf(document.activeElement),u=t[i+(n?1:-1)]||t[0];u&&u.focus()}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(n=>{this.resultsContainer.innerHTML=n.data,this.hideLoading()})}searchUrl(){return`/ajax/search/entities?types=${encodeURIComponent(this.entityTypes)}&permission=${encodeURIComponent(this.entityPermission)}`}searchEntities(n){this.input.value="";const t=`${this.searchUrl()}&term=${encodeURIComponent(n)}`;window.$http.get(t).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){const n=Date.now(),t=n-this.lastClick<300;return this.lastClick=n,t}onClick(n){const t=n.target.closest("[data-entity-type]");t&&(n.preventDefault(),n.stopPropagation(),this.selectItem(t))}selectItem(n){const t=this.isDoubleClick(),i=n.getAttribute("data-entity-type"),u=n.getAttribute("data-entity-id"),c=!n.classList.contains("selected")||t;this.unselectAll(),this.input.value=c?`${i}:${u}`:"";const h=n.getAttribute("href"),a=n.querySelector(".entity-list-item-name").textContent,d={id:Number(u),name:a,link:h};if(c?(n.classList.add("selected"),this.selectedItemData=d):window.$events.emit("entity-select-change",null),!t&&!c)return;t&&this.confirmSelection(d),c&&window.$events.emit("entity-select-change",d)}confirmSelection(n){window.$events.emit("entity-select-confirm",n)}unselectAll(){const n=this.elem.querySelectorAll(".selected");for(const t of n)t.classList.remove("selected","primary-background");this.selectedItemData=null}}var _g=K0;class V0{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(n){this.callback=n,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(n){this.hide(),this.callback&&n&&this.callback(n)}onSelectionChange(n){this.selection=n,n===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var Ag=V0;class X0{setup(){this.container=this.$el,this.name=this.$opts.name,Rt(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var Tg=X0;class Y0{constructor(n){this.elem=n,this.isOpen=n.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=n.getAttribute("expand-toggle-update-endpoint"),this.selector=n.getAttribute("expand-toggle"),n.addEventListener("click",this.click.bind(this))}open(n){wi(n,200)}close(n){bi(n,200)}click(n){n.preventDefault();const t=document.querySelectorAll(this.selector);for(let i of t)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(n){window.$http.patch(this.updateEndpoint,{expand:n?"true":"false"})}}var Dg=Y0;class Z0{setup(){this.elem=this.$el,this.toggleButton=this.$refs.toggle,this.menu=this.$refs.menu,this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}onToggle(n){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.toggleButton.setAttribute("aria-expanded",this.open?"true":"false"),this.open?(this.elem.addEventListener("keydown",this.onKeyDown),window.addEventListener("click",this.onWindowClick)):(this.elem.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("click",this.onWindowClick)),n.stopPropagation()}onKeyDown(n){n.code==="Escape"&&this.onToggle(n)}onWindowClick(n){this.onToggle(n)}}var Ig=Z0;class Q0{constructor(n){this.elem=n,this.typeControl=n.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=n.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const n=this.typeControl.value==="page";this.pagePickerContainer.style.display=n?"block":"none"}}var Lg=Q0;class J0{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(){Rt(this.filterTabs,n=>{this.resetAll(),this.filter=n.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",n=>{this.resetListView(),this.loadGallery(),n.preventDefault()}),Rt(this.cancelSearch,n=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",n=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),qt(this.listContainer,".load-more","click",async n=>{no(n.target),this.page++,await this.loadGallery(),n.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),Rt(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),qt(this.formContainer,"#image-manager-delete","click",n=>{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(n,t="gallery"){this.resetAll(),this.callback=n,this.type=t,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",t!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const n={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:t}=await window.$http.get(`images/${this.type}`,n);this.addReturnedHtmlElementsToList(t),Fm(this.listContainer)}addReturnedHtmlElementsToList(n){const t=document.createElement("div");t.innerHTML=n,window.components.init(t);for(const i of[...t.children])this.listContainer.appendChild(i)}setActiveFilterTab(n){this.filterTabs.forEach(i=>i.classList.remove("selected"));const t=this.filterTabs.find(i=>i.dataset.filter===n);t&&t.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(n){const t=JSON.parse(n.detail.data),i=t&&t.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,u=n.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(c=>{c.classList.remove("selected")}),u?this.resetEditForm():(n.target.classList.add("selected"),this.loadImageEditForm(t.id)),this.selectButton.classList.toggle("hidden",u),i&&this.callback&&(this.callback(t),this.hide()),this.lastSelected=t,this.lastSelectedTime=Date.now()}async loadImageEditForm(n,t=!1){t||(this.formContainer.innerHTML="");const i=t?{delete:!0}:{},{data:u}=await window.$http.get(`/images/edit/${n}`,i);this.formContainer.innerHTML=u,window.components.init(this.formContainer)}}var Fg=J0;class ek{constructor(n){this.elem=n,this.imageElem=n.querySelector("img"),this.imageInput=n.querySelector("input[type=file]"),this.resetInput=n.querySelector("input[data-reset-input]"),this.removeInput=n.querySelector("input[data-remove-input]"),this.defaultImage=n.getAttribute("data-default-image");const t=n.querySelector('button[data-action="reset-image"]');t.addEventListener("click",this.reset.bind(this));const i=n.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 n of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(n);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 Mg=ek;class tk{constructor(n){this.elem=n,this.menu=n.querySelector("ul"),this.sortInput=n.querySelector('[name="sort"]'),this.orderInput=n.querySelector('[name="order"]'),this.form=n.querySelector("form"),this.menu.addEventListener("click",t=>{t.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(t)}),this.elem.addEventListener("click",t=>{t.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(t)})}sortOptionClick(n){const t=n.target.closest("[data-sort-value]");this.sortInput.value=t.getAttribute("data-sort-value"),n.preventDefault(),this.form.submit()}sortDirectionClick(n){const t=this.orderInput.value,i=t==="asc"?"desc":"asc";this.orderInput.value=i,n.preventDefault(),this.form.submit()}}var Rg=tk;class rk{constructor(n){this.data=n}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const n=this.data.getData("text/rtf");return n&&n.includes("\\trowd")}getImages(){const n=this.data.types,t=this.data.files,i=[];for(const u of n)if(u.includes("image")){const c=this.data.getData(u);i.push(c.getAsFile())}for(const u of t)u.type.includes("image")&&i.push(u);return i}}var go=rk;let fn=null,Fl,Ml;function nk(n,t,i){Fl=t,Ml=i,fn=document.createElement("iframe"),fn.setAttribute("frameborder","0"),window.addEventListener("message",Og),fn.setAttribute("src",n),fn.setAttribute("class","fullscreen"),fn.style.backgroundColor="#FFFFFF",document.body.appendChild(fn)}function ik(){Pg()}function Og(n){if(!n.data||n.data.length<1)return;let t=JSON.parse(n.data);t.event==="init"?sk():t.event==="exit"?Pg():t.event==="save"?ak(t):t.event==="export"&&ok(t)}function ok(n){Ml&&Ml(n.data)}function ak(n){Ng({action:"export",format:"xmlpng",xml:n.xml,spin:"Updating drawing"})}function sk(){if(!Fl)return;Fl().then(n=>{Ng({action:"load",autosave:1,xml:n})})}function Pg(){window.removeEventListener("message",Og),fn&&document.body.removeChild(fn)}function Ng(n){fn.contentWindow.postMessage(JSON.stringify(n),"*")}async function lk(n,t){let i={image:n,uploaded_to:t};const u=await window.$http.post(window.baseUrl("/images/drawio"),i);return u.data}async function uk(n){const t=await window.$http.get(window.baseUrl(`/images/drawio/base64/${n}`));return`data:image/png;base64,${t.data.content}`}var Or={show:nk,close:ik,upload:lk,load:uk};const zg=St(xm()),Bg=St(_m());class ck{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.markdown=new zg.default({html:!0}),this.markdown.use(Bg.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.cm=lr.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const n=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?n():this.display.addEventListener("load",n.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let n=0;this.displayDoc.addEventListener("click",u=>{let c=Date.now()-n<300,h=u.target.closest("a");if(h!==null){u.preventDefault(),window.open(h.getAttribute("href"));return}let a=u.target.closest("[drawio-diagram]");if(a!==null&&c){this.actionEditDrawing(a);return}n=Date.now()}),this.elem.addEventListener("click",u=>{let c=u.target.closest("button[data-action]");if(c===null)return;let h=c.getAttribute("data-action");if(h==="insertImage"&&this.actionInsertImage(),h==="insertLink"&&this.actionShowLinkSelector(),h==="insertDrawing"&&(u.ctrlKey||u.metaKey)){this.actionShowImageManager();return}h==="insertDrawing"&&this.actionStartDrawing(),h==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",u=>{const c=u.target.closest(".editor-toolbar-label");if(!c)return;const h=this.elem.querySelectorAll(".markdown-editor-wrap");for(let a of h)a.classList.remove("active");c.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",u=>{this.cm.setValue(u),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const t=new URL(window.location).searchParams,i=t.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const n=this.cm.getValue();this.input.value=n;const t=this.markdown.render(n);window.$events.emit("editor-html-change",t),window.$events.emit("editor-markdown-change",n),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=t,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 n=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let t of n){const i=t.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(n){const t=this.displayDoc.body.children;if(t.length<=n)return;const i=n===-1?t[t.length-1]:t[n];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const n=this.cm,t=this;n.setOption("direction","ltr");let i=lr.getMetaKey();const u={};u[`${i}-Alt-I`]=function(m){let v=m.getSelection(),b=`![${v}](http://)`,S=m.getCursor("from");m.replaceSelection(b),m.setCursor(S.line,S.ch+b.length-1)},u[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},u[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},u[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},u[`${i}-K`]=m=>{y()},u[`${i}-1`]=m=>{a("##")},u[`${i}-2`]=m=>{a("###")},u[`${i}-3`]=m=>{a("####")},u[`${i}-4`]=m=>{a("#####")},u[`${i}-5`]=m=>{a("")},u[`${i}-d`]=m=>{a("")},u[`${i}-6`]=m=>{a(">")},u[`${i}-q`]=m=>{a(">")},u[`${i}-7`]=m=>{f("\n```\n","\n```")},u[`${i}-8`]=m=>{f("`","`")},u[`Shift-${i}-E`]=m=>{f("`","`")},u[`${i}-9`]=m=>{f('<p class="callout info">',"</p>")},n.setOption("extraKeys",u),n.on("change",(m,v)=>{this.updateAndRender()});const c=pa(m=>{let v=m.getScrollInfo(),b=v.top+v.clientHeight===v.height;if(b){this.onMarkdownScroll(-1);return}let S=m.lineAtHeight(v.top,"local"),E=m.getRange({line:0,ch:null},{line:S,ch:null}),x=new DOMParser,D=x.parseFromString(this.markdown.render(E),"text/html"),C=D.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(C.length)},100);n.on("scroll",m=>{c(m)}),n.on("paste",(m,v)=>{const b=new go(v.clipboardData||v.dataTransfer);if(!b.hasItems()||b.containsTabularData())return;const S=b.getImages();for(const E of S)p(E)}),n.on("drop",(m,v)=>{const b=v.dataTransfer.getData("bookstack/template");if(b){const E=m.coordsChar({left:v.pageX,top:v.pageY});m.setCursor(E),v.preventDefault(),window.$http.get(`/templates/${b}`).then(x=>{const D=x.data.markdown||x.data.html;m.replaceSelection(D)})}const S=new go(v.dataTransfer);if(S.hasItems()&&S.getImages().length>0){const E=m.coordsChar({left:v.pageX,top:v.pageY});m.setCursor(E),v.stopPropagation(),v.preventDefault();const x=S.getImages();for(const D of x)p(D)}});function h(m,v){let b=n.getValue(),S=n.listSelections();n.setValue(b.replace(m,v)),n.setSelections(S)}function a(m){let v=n.getCursor(),b=n.getLine(v.line),S=b.length,E=b.split(" ")[0];if(E===m){b=b.replace(`${m} `,""),n.replaceRange(b,{line:v.line,ch:0},{line:v.line,ch:S}),n.setCursor({line:v.line,ch:v.ch-(m.length+1)});return}let x=/^[#>`]/.test(E),D=0;x?(D=m.length-E.length,b=b.replace(E,m).trim()):m!==""&&(D=m.length+1,b=m+" "+b),n.replaceRange(b,{line:v.line,ch:0},{line:v.line,ch:S}),n.setCursor({line:v.line,ch:v.ch+D})}function d(m,v){let b=n.getCursor(),S=n.getLine(b.line),E=S.length,x=S;S.indexOf(m)===0&&S.slice(-v.length)===v?x=S.slice(m.length,S.length-v.length):x=`${m}${S}${v}`,n.replaceRange(x,{line:b.line,ch:0},{line:b.line,ch:E}),n.setCursor({line:b.line,ch:b.ch+m.length})}function f(m,v){let b=n.getSelection();if(b==="")return d(m,v);let S=b,E=0,x=0;b.indexOf(m)===0&&b.slice(-v.length)===v?(S=b.slice(m.length,b.length-v.length),x=-(v.length+m.length)):(S=`${m}${b}${v}`,x=m.length+v.length);let D=n.listSelections()[0];n.replaceSelection(S);let C=D.head.ch<=D.anchor.ch;D.head.ch+=C?E:x,D.anchor.ch+=C?x:E,n.setSelections([D])}function p(m){if(m===null||m.type.indexOf("image")!==0)return;let v="png";if(m.name){let R=m.name.match(/\.(.+)$/);R.length>1&&(v=R[1])}const b="image-"+Math.random().toString(16).slice(2),S=window.baseUrl(`/loading.gif#upload${b}`),E=n.getSelection(),x=`![${E}](${S})`,D=n.getCursor();n.replaceSelection(x),n.setCursor({line:D.line,ch:D.ch+E.length+3});const C="image-"+Date.now()+"."+v,N=new FormData;N.append("file",m,C),N.append("uploaded_to",t.pageId),window.$http.post("/images/gallery",N).then(R=>{const H=`[![${E}](${R.data.thumbs.display})](${R.data.url})`;h(x,H)}).catch(R=>{window.$events.emit("error",t.imageUploadErrorText),h(x,E),console.log(R)})}function y(){let m=n.getCursor("from"),v=n.getSelection()||"",b=`[${v}]()`;n.focus(),n.replaceSelection(b);let S=v===""?-3:-1;n.setCursor(m.line,m.ch+b.length+S)}this.updateAndRender()}actionInsertImage(){const n=this.cm.getCursor("from");window.ImageManager.show(t=>{let i=this.cm.getSelection(),u="[!["+(i||t.name)+"]("+t.thumbs.display+")]("+t.url+")";this.cm.focus(),this.cm.replaceSelection(u),this.cm.setCursor(n.line,n.ch+u.length)},"gallery")}actionShowImageManager(){const n=this.cm.getCursor("from");window.ImageManager.show(t=>{this.insertDrawing(t,n)},"drawio")}actionShowLinkSelector(){const n=this.cm.getCursor("from");window.EntitySelectorPopup.show(t=>{let i=this.cm.getSelection()||t.name,u=`[${i}](${t.link})`;this.cm.focus(),this.cm.replaceSelection(u),this.cm.setCursor(n.line,n.ch+u.length)})}getDrawioUrl(){const n=document.querySelector("[drawio-url]");return n?n.getAttribute("drawio-url"):!1}actionStartDrawing(){const n=this.getDrawioUrl();if(!n)return;const t=this.cm.getCursor("from");Or.show(n,()=>Promise.resolve(""),i=>{const u={image:i,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",u).then(c=>{this.insertDrawing(c.data,t),Or.close()}).catch(c=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(c)})})}insertDrawing(n,t){const i=`<div drawio-diagram="${n.id}"><img src="${n.url}"></div>`;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(t.line,t.ch+i.length)}actionEditDrawing(n){const t=this.getDrawioUrl();if(!t)return;const i=this.cm.getCursor("from"),u=n.getAttribute("drawio-diagram");Or.show(t,()=>Or.load(u),c=>{let h={image:c,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",h).then(a=>{let d=`<div drawio-diagram="${a.data.id}"><img src="${a.data.url}"></div>`,f=this.cm.getValue().split(`
`).map(p=>p.indexOf(`drawio-diagram="${u}"`)!==-1?d:p).join(`
`);this.cm.setValue(f),this.cm.setCursor(i),this.cm.focus(),Or.close()}).catch(a=>{window.$events.emit("error",this.imageUploadErrorText),console.log(a)})})}actionFullScreen(){const n=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!n),document.body.classList.toggle("markdown-fullscreen",!n)}scrollToText(n){if(!n)return;const t=this.cm.getValue(),i=t.split(/\r?\n/);let u=i.findIndex(c=>c&&c.indexOf(n)!==-1);if(u===-1)return;this.cm.scrollIntoView({line:u},200),this.cm.focus(),this.cm.setCursor({line:u,char:i[u].length})}listenForBookStackEditorEvents(){function n({html:t,markdown:i}){return i||t}window.$events.listen("editor::replace",t=>{const i=n(t);this.cm.setValue(i)}),window.$events.listen("editor::append",t=>{const i=this.cm.getCursor("from"),u=n(t),c=this.cm.getValue()+`
`+u;this.cm.setValue(c),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",t=>{const i=this.cm.getCursor("from"),u=n(t),c=u+`
`+this.cm.getValue();this.cm.setValue(c);const h=u.split(`
`).length;this.cm.setCursor(i.line+h,i.ch)}),window.$events.listen("editor::insert",t=>{const i=n(t);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var jg=ck;class dk{constructor(n){this.elem=n,this.inviteOption=n.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const n=this.inviteOption.value==="true",t=this.elem.querySelectorAll("input[type=password]");for(const u of t)u.disabled=n;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=n?"none":"block")}}var qg=dk;class fk{constructor(n){this.elem=n,this.type=n.getAttribute("notification"),this.textElem=n.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,t=>{this.show(t)}),n.addEventListener("click",this.hide.bind(this)),n.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(n=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=n,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const t=n.split(" ").length,i=Math.max(2e3,1e3+250*t);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 Ug=fk;class hk{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){Rt(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),Rt(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var Hg=hk;class pk{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(n){let t=n.target.closest("[action]");if(n.target.matches('a[href^="#"]')){const c=n.target.href.split("#")[1];io(document.querySelector("#"+c))}if(t===null)return;n.preventDefault();const i=t.getAttribute("action"),u=t.closest("[comment]");i==="edit"&&this.editComment(u),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(u),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(u),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(n){this.hideForm(),this.editingComment&&this.closeUpdateForm(),n.querySelector("[comment-content]").style.display="none",n.querySelector("[comment-edit-container]").style.display="block";let t=n.querySelector("[comment-edit-container] textarea"),i=t.value.split(`
`).length;t.style.height=i*20+40+"px",this.editingComment=n}updateComment(n){let t=n.target;n.preventDefault();let i=t.querySelector("textarea").value,u={text:i,parent_id:this.parentId||null};this.showLoading(t);let c=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${c}`,u).then(h=>{let a=document.createElement("div");a.innerHTML=h.data,this.editingComment.innerHTML=a.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(t)})}deleteComment(n){let t=n.getAttribute("comment");this.showLoading(n.querySelector("[comment-content]")),window.$http.delete(`/comment/${t}`).then(i=>{n.parentNode.removeChild(n),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(n){n.preventDefault(),n.stopPropagation();let t=this.formInput.value,i={text:t,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(u=>{let c=document.createElement("div");c.innerHTML=u.data;let h=c.children[0];this.container.appendChild(h),window.components.init(h),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(u=>{window.$events.showValidationErrors(u),this.hideLoading(this.form)})}updateCount(){let n=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,n,{count:n})}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(n){this.showForm(),this.parentId=Number(n.getAttribute("local-id")),this.replyToRow.style.display="block";const t=this.replyToRow.querySelector("a");t.textContent=`#${this.parentId}`,t.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="none";n.querySelector(".form-group.loading").style.display="block"}hideLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="block";n.querySelector(".form-group.loading").style.display="none"}}var Wg=pk;const $g=St(Ms());class mk{constructor(n){if(this.elem=n,this.pageId=n.getAttribute("page-display"),lr.highlight(),this.setupPointer(),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const t=document.querySelector(".sidebar-page-nav");t&&qt(t,"a","click",(i,u)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const c=u.getAttribute("href").substr(1);this.goToText(c),window.history.pushState(null,null,"#"+c)})}goToText(n){const t=document.getElementById(n);if(da(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),t!==null)io(t);else{const i=Lm(".page-content > div > *",n);i&&io(i)}}setupPointer(){let n=document.getElementById("pointer");if(!n)return;n=n.parentNode.removeChild(n);const t=n.querySelector("div.pointer");let i=!1,u=!1,c=!0,h="";qt(n,"input","click",(d,f)=>{f.select(),d.stopPropagation()}),fa(n,["click","focus"],d=>{d.stopPropagation()}),qt(n,"span.icon","click",(d,f)=>{d.stopPropagation(),c=!c,f.querySelector('[data-icon="include"]').style.display=c?"none":"inline",f.querySelector('[data-icon="link"]').style.display=c?"inline":"none",a()}),new $g.default(n.querySelector("button")),fa(document.body,["click","focus"],d=>{if(!i||u)return;n=n.parentElement.removeChild(n),i=!1});let a=d=>{let f=c?window.baseUrl(`/link/${this.pageId}#${h}`):`{{@${this.pageId}#${h}}}`;c&&!f.startsWith("http")&&(f=window.location.protocol+"//"+window.location.host+f),n.querySelector("input").value=f;const p=n.querySelector("#pointer-edit");if(p&&d){const y=p.dataset.editHref,m=d.id,v=d.textContent&&d.textContent.substring(0,50);p.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(v)}`}};da('.page-content [id^="bkmrk"]',d=>{fa(d,["mouseup","keyup"],f=>{f.stopPropagation();let p=window.getSelection();if(p.toString().length===0)return;h=d.id,a(d),d.parentNode.insertBefore(n,d),n.style.display="block",i=!0,u=!0,requestAnimationFrame(()=>{const y=d.getBoundingClientRect();let m=f.pageX-y.left-164;m<0&&(m=0);const v=m/y.width*100;t.style.left=v+"%",setTimeout(()=>{u=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let n=document.querySelector(".sidebar-page-nav"),t=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.length>0&&n!==null&&i(t);function i(h){let a={rootMargin:"0px 0px 0px 0px",threshold:1},d=new IntersectionObserver(u,a);for(let f of h)d.observe(f)}function u(h,a){for(let d of h){let f=d.intersectionRatio===1;c(d.target.id,f)}}function c(h,a){da('a[href="#'+h+'"]',d=>{d.closest("li").classList.toggle("current-heading",a)})}}setupDetailsCodeBlockRefresh(){const n=i=>{const u=[...i.target.querySelectorAll(".CodeMirror")];u.forEach(c=>c.CodeMirror&&c.CodeMirror.refresh())},t=[...this.elem.querySelectorAll("details")];t.forEach(i=>i.addEventListener("toggle",n))}}var Gg=mk;function Kg(n){let t=new Date(n*1e3),i=t.getHours(),u=t.getMinutes();return`${(i>9?"":"0")+i}:${(u>9?"":"0")+u}`}class gk{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.hasDefaultTitle||!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",n=>{this.editorHTML=n}),window.$events.listen("editor-markdown-change",n=>{this.editorMarkdown=n}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),Rt(this.saveDraftButton,this.saveDraft.bind(this)),Rt(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let n=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let t=Date.now()-this.autoSave.last<this.autoSave.frequency/2;if(t)return;const i=this.titleElem.value.trim()+"::"+this.editorHTML;i!==n&&(n=i,this.saveDraft())},this.autoSave.frequency)}savePage(){this.container.closest("form").submit()}async saveDraft(){const n={name:this.titleElem.value.trim(),html:this.editorHTML};this.editorType==="markdown"&&(n.markdown=this.editorMarkdown);try{const t=await window.$http.put(`/ajax/page/${this.pageId}/save-draft`,n);this.isNewDraft||this.toggleDiscardDraftVisibility(!0),this.draftNotifyChange(`${t.data.message} ${Kg(t.data.timestamp)}`),this.autoSave.last=Date.now()}catch(t){try{const i=`draft-save-fail-${new Date().toISOString()}`;window.localStorage.setItem(i,JSON.stringify(n))}catch(i){}window.$events.emit("error",this.autosaveFailText)}}draftNotifyChange(n){this.draftDisplay.innerText=n,this.draftDisplayIcon.classList.add("visible"),window.setTimeout(()=>{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let n;try{n=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(t){return console.error(t)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",n.data.html||""),window.$events.emit("editor-markdown-update",n.data.markdown||n.data.html),this.titleElem.value=n.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let n=this.changelogInput.value.trim();n.length===0?n=this.setChangelogText:n.length>16&&(n=n.slice(0,16)+"..."),this.changelogDisplay.innerText=n}toggleDiscardDraftVisibility(n){this.discardDraftWrap.classList.toggle("hidden",!n)}}var Vg=gk;class vk{constructor(n){this.elem=n,this.input=n.querySelector("input"),this.resetButton=n.querySelector("[page-picker-reset]"),this.selectButton=n.querySelector("[page-picker-select]"),this.display=n.querySelector("[page-picker-display]"),this.defaultDisplay=n.querySelector("[page-picker-default]"),this.buttonSep=n.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",n=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(n=>{this.setValue(n.id,n.name)})}setValue(n,t){this.value=n,this.input.value=n,this.controlView(t)}controlView(n){let t=this.value&&this.value!==0;if(Pa(this.resetButton,t),Pa(this.buttonSep,t),Pa(this.defaultDisplay,!t),Pa(this.display,t),t){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${n}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Pa(n,t){let i=n.tagName==="BUTTON"||n.tagName==="SPAN"?"inline-block":"block";n.style.display=t?i:"none"}var Xg=vk;class yk{constructor(n){this.container=n;const t=n.querySelector("[permissions-table-toggle-all]");t.addEventListener("click",this.toggleAllClick.bind(this));const i=n.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let c of i)c.addEventListener("click",this.toggleRowClick.bind(this));const u=n.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let c of u)c.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(n){n.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(n){n.preventDefault(),this.toggleAllInElement(n.target.closest("tr"))}toggleColumnClick(n){n.preventDefault();const t=n.target.closest("th,td"),i=Array.from(t.parentElement.children).indexOf(t),u=t.closest("table").querySelectorAll("tr"),c=[];for(let h of u){const a=h.children[i];a&&c.push(...a.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(c)}toggleAllInElement(n){const t=n.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(t)}toggleAllInputs(n){const t=n.length>0?n[0].checked:!1;for(let i of n)i.checked=!t,i.dispatchEvent(new Event("change"))}}var Yg=yk;class bk{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let n=null;this.container.addEventListener("mousedown",t=>{n=t.target}),this.container.addEventListener("click",t=>{if(t.target===this.container&&n===this.container)return this.hide()}),Rt(this.hideButtons,t=>this.hide())}hide(n=null){Ma(this.container,240,n),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(n=null,t=null){ug(this.container,240,n),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=t}}var Zg=bk;class wk{constructor(n){this.elem=n,this.colorInput=n.querySelector("input[type=color]"),this.lightColorInput=n.querySelector('input[name="setting-app-color-light"]'),this.resetButton=n.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=n.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",t=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const n=this.colorInput.value,t=this.hexToRgb(n),i="rgba("+[t.r,t.g,t.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const u=document.getElementById("custom-styles"),c=u.getAttribute("data-color"),h=u.getAttribute("data-color-light");u.innerHTML=u.innerHTML.split(c).join(n),u.innerHTML=u.innerHTML.split(h).join(i),u.setAttribute("data-color",n),u.setAttribute("data-color-light",i)}hexToRgb(n){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return{r:t?parseInt(t[1],16):0,g:t?parseInt(t[2],16):0,b:t?parseInt(t[3],16):0}}}var Qg=wk;class xk{constructor(n){this.elem=n,this.colorInput=n.querySelector("input[type=color]"),this.resetButton=n.querySelector("[setting-color-picker-reset]"),this.defaultButton=n.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default})}}var Jg=xk;class kk{constructor(n){this.elem=n,this.input=document.getElementById("books-input"),this.shelfBooksList=n.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const n=this.elem.querySelectorAll(".scroll-box");for(let t of n)new yi(t,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",n=>{const t=n.target.closest(".scroll-box-item:not(.instruction)");t&&(n.preventDefault(),this.sortItemClick(t))})}sortItemClick(n){const t=this.elem.querySelectorAll(".scroll-box"),i=Array.from(t).filter(u=>n.parentElement!==u);i.length>0&&i[0].appendChild(n),this.onChange()}onChange(){const n=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=n.map(t=>t.getAttribute("data-id")).join(",")}}var ev=kk;class Sk{constructor(n){this.elem=n,this.toggleElem=n.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(n=!0){this.elem.classList.toggle("open")}}var tv=Sk;class Ek{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const n=new yi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:n.toArray()})},setData(t,i){const u=i.getAttribute("data-drag-content");if(u){const c=JSON.parse(u);for(const[h,a]of Object.entries(c))t.setData(h,a)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var rv=Ek;class Ck{setup(){this.$el.addEventListener("change",()=>{const n=this.$el.closest("form");n&&n.submit()})}}var nv=Ck;class _k{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[n,t]of Object.entries(this.$manyRefs||{})){if(n.startsWith("toggle")){const i=n.replace("toggle","").toLowerCase();Rt(t,u=>this.show(i)),this.allButtons.push(...t),this.tabButtonsByName[i]=t}if(n.startsWith("content")){const i=n.replace("content","").toLowerCase();this.tabContentsByName[i]=t,this.allContents.push(...t)}}}show(n){this.allContents.forEach(u=>{u.classList.add("hidden"),u.classList.remove("selected")}),this.allButtons.forEach(u=>u.classList.remove("selected"));const t=this.tabContentsByName[n]||[],i=this.tabButtonsByName[n]||[];t.length>0&&(t.forEach(u=>{u.classList.remove("hidden"),u.classList.add("selected")}),i.forEach(u=>u.classList.add("selected")))}}var iv=_k;class Ak{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",n=>{const t=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||t.add()})}hasEmptyRows(){const n=this.container.querySelectorAll(this.rowSelector),t=[...n].find(i=>[...i.querySelectorAll("input")].filter(u=>u.value).length===0);return t!==void 0}}var ov=Ak;class Tk{constructor(n){this.elem=n,this.list=n.querySelector("[template-manager-list]"),this.searching=!1,qt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),qt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),qt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),qt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(n,t){const i=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(n,t){const i=t.closest("[template-id]").getAttribute("template-id");n.dataTransfer.setData("bookstack/template",i),n.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(n,t){n.stopPropagation();const i=t.getAttribute("template-action"),u=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(u,i)}async insertTemplate(n,t="replace"){const i=await window.$http.get(`/templates/${n}`),u="editor::"+t;window.$events.emit(u,i.data)}async handlePaginationClick(n,t){n.preventDefault();const i=t.getAttribute("href"),u=await window.$http.get(i);this.list.innerHTML=u.data}setupSearchBox(){const n=this.elem.querySelector(".search-box");if(!n)return;const t=n.querySelector("input"),i=n.querySelector("button"),u=n.querySelector("button.search-box-cancel");async function c(){const h=t.value,a=await window.$http.get("/templates",{search:h});u.style.display=h?"block":"none",this.list.innerHTML=a.data}c=c.bind(this),n.addEventListener("keypress",h=>{h.key==="Enter"&&(h.preventDefault(),c())}),i.addEventListener("click",h=>{c()}),u.addEventListener("click",h=>{t.value="",c()})}}var av=Tk;class Dk{constructor(n){this.elem=n,this.input=n.querySelector("input[type=hidden]"),this.checkbox=n.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const n=new Event("change");this.input.dispatchEvent(n)}}var sv=Dk;class Ik{setup(){this.container=this.$refs.container,this.tabs=this.$manyRefs.tab,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 n="tablet";if(window.innerWidth<=1e3&&(n="mobile"),window.innerWidth>=1400&&(n="desktop"),n===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),n==="desktop"?this.setupDesktop():n==="mobile"&&this.setupMobile(),this.lastLayoutType=n}setupMobile(){for(const n of this.tabs)n.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(const n of this.tabs)n.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(n){const t=n.target.dataset.tab;this.showTab(t)}showContent(){this.showTab("content",!1)}showTab(n,t=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;for(const u of this.tabs){const c=u.dataset.tab===n;u.setAttribute("aria-selected",c?"true":"false")}const i=n==="info";if(this.container.classList.toggle("show-info",i),t){const u=document.querySelector("header"),c=u.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[n]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[n]||c},50)}this.lastTabShown=n}}var lv=Ik;class Lk{setup(){this.input=this.$refs.input,this.userInfoContainer=this.$refs.userInfo,this.hide=this.$el.components.dropdown.hide,qt(this.$el,"a.dropdown-search-item","click",this.selectUser.bind(this))}selectUser(n,t){n.preventDefault();const i=t.getAttribute("data-id");this.input.value=i,this.userInfoContainer.innerHTML=t.innerHTML,this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hide()}}var uv=Lk;function cv(n,t,i){const u=new go(n.clipboardData||n.dataTransfer);if(!u.hasItems()||u.containsTabularData())return;const c=u.getImages();for(const h of c){const a="image-"+Math.random().toString(16).slice(2),d=window.baseUrl("/loading.gif");n.preventDefault(),setTimeout(()=>{t.insertContent(`<p><img src="${d}" id="${a}"></p>`),Fk(h,i).then(f=>{const p=f.name.replace(/"/g,""),y=`<img src="${f.thumbs.display}" alt="${p}" />`,m=t.dom.create("a",{target:"_blank",href:f.url},y);t.dom.replace(m,a)}).catch(f=>{t.dom.remove(a),window.$events.emit("error",i.imageUploadErrorText),console.log(f)})},10)}}async function Fk(n,t){if(n===null||n.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(n.name){let a=n.name.match(/\.(.+)$/);a.length>1&&(i=a[1])}const u="image-"+Date.now()+"."+i,c=new FormData;c.append("file",n,u),c.append("uploaded_to",t.pageId);const h=await window.$http.post(window.baseUrl("/images/gallery"),c);return h.data}function Mk(n){for(let t=1;t<5;t++)n.shortcuts.add("meta+"+t,"",["FormatBlock",!1,"h"+(t+1)]);n.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),n.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),n.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),n.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),n.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),n.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),n.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),n.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),n.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),n.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),n.shortcuts.add("meta+9","",function(){const t=n.selection.getNode(),i=t?t.closest(".callout"):null,u=["info","success","warning","danger"],c=u.findIndex(d=>i&&i.classList.contains(d)),h=(c+1)%u.length,a=u[h];n.formatter.apply("callout"+a)})}function Rk(n){window.$http.get(window.baseUrl("/custom-head-content")).then(t=>{if(!t.data)return;let i=n.getDoc().querySelector("head");i.innerHTML+=t.data})}function Ok(){function n(u){return u.className==="CodeMirrorContainer"}function t(u){const c=u.selection.getNode();if(!n(c)){const d=u.selection.getNode().textContent;window.components.first("code-editor").open(d,"",(f,p)=>{const y=document.createElement("div");y.innerHTML=`<pre><code class="language-${p}"></code></pre>`,y.querySelector("code").innerText=f,u.formatter.toggle("pre");const m=u.selection.getNode();u.dom.setHTML(m,y.querySelector("pre").innerHTML),u.fire("SetContent"),u.focus()});return}const h=c.hasAttribute("data-lang")?c.getAttribute("data-lang"):"",a=c.querySelector("textarea").textContent;window.components.first("code-editor").open(a,h,(d,f)=>{const p=c.querySelector(".CodeMirror"),y=p.CodeMirror;y&&(lr.setContent(y,d),lr.setMode(y,f,d));const m=c.querySelector("textarea");m&&(m.textContent=d),c.setAttribute("data-lang",f),u.focus()})}function i(u){const c=u.querySelector("textarea"),h=c.textContent,a=u.getAttribute("data-lang");u.removeAttribute("contentEditable");const d=document.createElement("pre"),f=document.createElement("code");f.classList.add(`language-${a}`),f.textContent=h,d.appendChild(f),u.parentElement.replaceChild(d,u)}window.tinymce.PluginManager.add("codeeditor",function(u,c){const h=u.$;u.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),u.addCommand("codeeditor",()=>{t(u)}),u.on("PreProcess",function(d){h("div.CodeMirrorContainer",d.node).each((f,p)=>{i(p)})}),u.on("dblclick",d=>{let f=u.selection.getNode();if(!n(f))return;t(u)});function a(){h(".CodeMirrorContainer").filter((f,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((f,p)=>{i(p)});const d=h("body > pre").filter((f,p)=>p.contentEditable!=="false");d.each((f,p)=>{lr.wysiwygView(p)})}u.on("init",function(){u.undoManager.transact(function(){a()}),setTimeout(()=>{u.on("SetContent",()=>{setTimeout(a,100)})},200)})})}function Pk(n,t,i,u){let c=null,h=null;function a(m){return m.hasAttribute("drawio-diagram")}function d(m,v=null){c=m,h=v,window.ImageManager.show(function(b){if(v){let S=v.querySelector("img");c.dom.setAttrib(S,"src",b.url),c.dom.setAttrib(v,"drawio-diagram",b.id)}else{let S=`<div drawio-diagram="${b.id}" contenteditable="false"><img src="${b.url}"></div>`;c.insertContent(S)}},"drawio")}function f(m,v=null){c=m,h=v,Or.show(n,y,p)}async function p(m){const v="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif");if(h){Or.close();let S=h.querySelector("img");try{const E=await Or.upload(m,i);c.dom.setAttrib(S,"src",E.url),c.dom.setAttrib(h,"drawio-diagram",E.id)}catch(E){window.$events.emit("error",u.imageUploadErrorText),console.log(E)}return}setTimeout(async()=>{c.insertContent(`<div drawio-diagram contenteditable="false"><img src="${b}" id="${v}"></div>`),Or.close();try{const S=await Or.upload(m,i);c.dom.setAttrib(v,"src",S.url),c.dom.get(v).parentNode.setAttribute("drawio-diagram",S.id)}catch(S){c.dom.remove(v),window.$events.emit("error",u.imageUploadErrorText),console.log(S)}},5)}function y(){if(!h)return Promise.resolve("");let m=h.getAttribute("drawio-diagram");return Or.load(m)}window.tinymce.PluginManager.add("drawio",function(m,v){m.addCommand("drawio",()=>{const b=m.selection.getNode();f(m,a(b)?b:null)}),m.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(`<svg viewBox="0 0 24 24" fill="${t?"#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=m.selection.getNode();d(m,a(b)?b:null)}}]}),m.on("dblclick",b=>{let S=m.selection.getNode();if(!a(S))return;f(m,S)}),m.on("SetContent",function(){const b=m.$("body > div[drawio-diagram]");if(!b.length)return;m.undoManager.transact(function(){b.each((S,E)=>{E.setAttribute("contenteditable","false")})})})})}function Nk(){window.tinymce.PluginManager.add("customhr",function(n){n.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),i=n.selection.getNode(),u=i.parentNode;u.insertBefore(t,i)}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function zk(n){window.$events.listen("editor::replace",({html:t})=>{n.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{const i=n.getContent()+t;n.setContent(i)}),window.$events.listen("editor::prepend",({html:t})=>{const i=t+n.getContent();n.setContent(i)}),window.$events.listen("editor::insert",({html:t})=>{n.insertContent(t)}),window.$events.listen("editor::focus",()=>{n.focus()})}class Bk{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image imagetools 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(){Ok(),Nk();const n=document.querySelector("[drawio-url]");if(n){const t=n.getAttribute("drawio-url");Pk(t,this.isDarkMode,this.pageId,this),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const n=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 ${n} fullscreen`}getTinyMceConfig(){const n=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(t,i,u,c){u==="file"&&window.EntitySelectorPopup.show(function(h){const a=c.document.getElementById(t);a.value=h.link;const d=a.closest(".mce-form"),f=d.querySelectorAll("input");f[1].value||(f[1].value=h.name),f[2].value=h.name}),u==="image"&&window.ImageManager.show(function(h){if(c.document.getElementById(t).value=h.url,"createEvent"in document){let d=document.createEvent("HTMLEvents");d.initEvent("change",!1,!0),c.document.getElementById(t).dispatchEvent(d)}else c.document.getElementById(t).fireEvent("onchange");let a=`<a href="${h.url}" target="_blank">`;a+=`<img src="${h.thumbs.display}" alt="${h.name}">`,a+="</a>",c.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,a)},"gallery")},paste_preprocess:function(t,i){let u=i.content;u.indexOf('<img src="file://')!==-1&&(i.content="")},init_instance_callback:function(t){Rk(t)},setup:function(t){t.on("ExecCommand change input NodeChange ObjectResized",i),t.on("init",()=>{i();const d=new URL(window.location).searchParams,f=d.get("content-id");f&&u(f);const p=t.getContainer(),y=p.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",v=>{v.stopPropagation()});window.editor=t});function i(){const d=t.getContent();n.isDarkMode&&t.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",d)}function u(d){const f=t.dom.get(encodeURIComponent(d).replace(/!/g,"%21"));if(!f)return;f.scrollIntoView(),t.selection.select(f,!0),t.selection.collapse(!1),t.focus()}zk(t),window.$events.listen("editor-html-update",d=>{t.setContent(d),t.selection.select(t.getBody(),!0),t.selection.collapse(!1),i(d)}),Mk(t);let c,h;function a(d){return d&&!!(d.textContent||d.innerText)}t.on("dragstart",function(){let d=t.selection.getNode();d.nodeName==="IMG"&&(c=t.dom.getParent(d,".mceTemp"),!c&&d.parentNode.nodeName==="A"&&!a(d.parentNode)&&(c=d.parentNode)),d.hasAttribute("contenteditable")&&d.getAttribute("contenteditable")==="false"&&(h=d)}),t.on("drop",function(d){let f=t.dom,p=tinymce.dom.RangeUtils.getCaretRangeFromPoint(d.clientX,d.clientY,t.getDoc());const y=d.dataTransfer&&d.dataTransfer.getData("bookstack/template");y&&(d.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{t.selection.setRng(p),t.undoManager.transact(function(){t.execCommand("mceInsertContent",!1,m.data.html)})})),f.getParent(p.startContainer,".mceTemp")?d.preventDefault():c&&(d.preventDefault(),t.undoManager.transact(function(){t.selection.setRng(p),t.selection.setNode(c),f.remove(c)})),!d.isDefaultPrevented()&&h&&(d.preventDefault(),t.undoManager.transact(function(){const m=t.selection.getNode(),v=t.selection.getRng(),b=m.closest("body > *");v.startOffset>v.startContainer.length/2?t.$(b).after(h):t.$(b).before(h)})),d.isDefaultPrevented()||cv(d,t,n),c=null}),t.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(d){let f=`<a href="${d.url}" target="_blank">`;f+=`<img src="${d.thumbs.display}" alt="${d.name}">`,f+="</a>",t.execCommand("mceInsertContent",!1,f)},"gallery")}}),t.on("paste",d=>cv(d,t,n)),window.$events.emitPublic(n.elem,"editor-tinymce::setup",{editor:t})}}}}var dv=Bk;const fv={"add-remove-rows":Om,"ajax-delete-row":Pm,"ajax-form":Nm,attachments:zm,"auto-suggest":Bm,"back-to-top":jm,"book-sort":lg,"chapter-toggle":cg,"code-editor":pg,"code-highlighter":mg,collapsible:gg,"custom-checkbox":vg,"details-highlighter":yg,dropdown:bg,"dropdown-search":wg,dropzone:kg,"editor-toolbox":Sg,"entity-permissions-editor":Eg,"entity-search":Cg,"entity-selector":_g,"entity-selector-popup":Ag,"event-emit-select":Tg,"expand-toggle":Dg,"header-mobile-toggle":Ig,"homepage-control":Lg,"image-manager":Fg,"image-picker":Mg,index:Na,"list-sort-control":Rg,"markdown-editor":jg,"new-user-password":qg,notification:Ug,"optional-input":Hg,"page-comments":Wg,"page-display":Gg,"page-editor":Vg,"page-picker":Xg,"permissions-table":Yg,popup:Zg,"setting-app-color-picker":Qg,"setting-color-picker":Jg,"shelf-sort":ev,sidebar:tv,"sortable-list":rv,"submit-on-change":nv,tabs:iv,"tag-manager":ov,"template-manager":av,"toggle-switch":sv,"tri-layout":lv,"user-select":uv,"wysiwyg-editor":dv};window.components={};function jk(n,t){const i=t.querySelectorAll(`[${n}]`);for(let u=0,c=i.length;u<c;u++)hv(n,i[u])}function hv(n,t){const i=fv[n];if(i===void 0)return;let u;try{u=new i(t),u.$el=t;const c=qk(n,t);u.$refs=c.refs,u.$manyRefs=c.manyRefs,u.$opts=Uk(n,t),u.$emit=(h,a={})=>{a.from=u;const d=new CustomEvent(`${n}-${h}`,{bubbles:!0,detail:a});u.$el.dispatchEvent(d)},typeof u.setup=="function"&&u.setup()}catch(c){console.error("Failed to create component",c,n,t)}typeof window.components[n]=="undefined"&&(window.components[n]=[]),window.components[n].push(u),typeof t.components=="undefined"&&(t.components={}),t.components[n]=u}function qk(n,t){const i={},u={},c=`${n}@`,h=`[refs*="${c}"]`,a=[...t.querySelectorAll(h)];t.matches(h)&&a.push(t);for(const d of a){const f=d.getAttribute("refs").split(" ").filter(p=>p.startsWith(c)).map(p=>p.replace(c,"")).map(pv);for(const p of f)i[p]=d,typeof u[p]=="undefined"&&(u[p]=[]),u[p].push(d)}return{refs:i,manyRefs:u}}function Uk(n,t){const i={},u=`option:${n}:`;for(const{name:c,value:h}of t.attributes)if(c.startsWith(u)){const a=c.replace(u,"");i[pv(a)]=h||""}return i}function pv(n){const t=u=>u.slice(0,1).toUpperCase()+u.slice(1),i=n.split("-");return i[0]+i.slice(1).map(t).join("")}function mv(n){typeof n=="undefined"&&(n=document);for(const i of Object.keys(fv))jk(i,n);const t=n.querySelectorAll("[component],[components]");for(const i of t){const u=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const c of u)hv(c,i)}}window.components.init=mv;window.components.first=n=>(window.components[n]||[null])[0];var Na=mv;window.baseUrl=function(n){let t=document.querySelector('meta[name="base-url"]').getAttribute("content");return t[t.length-1]==="/"&&(t=t.slice(0,t.length-1)),n[0]==="/"&&(n=n.slice(1)),t+"/"+n};window.$http=Dm;window.$events=Am;const xi=new Im;window.trans=xi.get.bind(xi);window.trans_choice=xi.getPlural.bind(xi);window.trans_plural=xi.parsePlural.bind(xi);Na();})();
/*!
* clipboard.js v2.0.8
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/**!
* Sortable 1.13.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
//# sourceMappingURL=app.js.map