diff --git a/public/dist/app.js b/public/dist/app.js index abf742515..7166c44ab 100644 --- a/public/dist/app.js +++ b/public/dist/app.js @@ -1,28 +1,28 @@ -(()=>{var ea=Object.defineProperty,Oy=Object.prototype.hasOwnProperty,le=(t,n)=>()=>(n||(n={exports:{}},t(n.exports,n)),n.exports),Qc=t=>ea(t,"__esModule",{value:!0}),Ny=(t,n)=>{Qc(t);for(var i in n)ea(t,i,{get:n[i],enumerable:!0})},By=(t,n)=>{if(Qc(t),typeof n=="object"||typeof n=="function")for(let i in n)!Oy.call(t,i)&&i!=="default"&&ea(t,i,{get:()=>n[i],enumerable:!0});return t},$e=t=>t&&t.__esModule?t:By(ea({},"default",{value:t,enumerable:!0}),t);var Qe=le((Ws,$s)=>{(function(t,n){typeof Ws=="object"&&typeof $s!="undefined"?$s.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self,t.CodeMirror=n())})(Ws,function(){"use strict";var t=navigator.userAgent,n=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),c=/Edge\/(\d+)/.exec(t),d=s||u||c,h=d&&(s?document.documentMode||6:+(c||u)[1]),p=!c&&/WebKit\//.test(t),g=p&&/Qt\/\d+\.\d+/.test(t),y=!c&&/Chrome\//.test(t),m=/Opera\//.test(t),b=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),D=/PhantomJS/.test(t),E=!c&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),S=/Android/.test(t),z=E||S||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),A=E||/Mac/.test(n),R=/\bCrOS\b/.test(t),U=/win/i.test(n),Y=m&&t.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(m=!1,p=!0);var B=A&&(g||m&&(Y==null||Y<12.11)),G=i||d&&h>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var J=function(e,r){var a=e.className,o=ee(r).exec(a);if(o){var l=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(l?o[1]+l:"")}};function P(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Z(e,r){return P(e).appendChild(r)}function _(e,r,a,o){var l=document.createElement(e);if(a&&(l.className=a),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var f=0;f=r)return v+(r-f);v+=k-f,v+=a-v%a,f=k+1}}var de=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};de.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},de.prototype.set=function(e,r){this.f=r;var a=+new Date+e;(!this.id||a=r)return o+Math.min(v,r-l);if(l+=f-o,l+=a-l%a,o=f+1,l>=r)return o}}var nt=[""];function Tt(e){for(;nt.length<=e;)nt.push(xe(nt)+" ");return nt[e]}function xe(e){return e[e.length-1]}function tt(e,r){for(var a=[],o=0;o"€"&&(e.toUpperCase()!=e.toLowerCase()||Fe.test(e))}function se(e,r){return r?r.source.indexOf("\\w")>-1&&X(e)?!0:r.test(e):X(e)}function te(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var Ne=/[\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 _t(e){return e.charCodeAt(0)>=768&&Ne.test(e)}function Ee(e,r,a){for(;(a<0?r>0:ra?-1:1;;){if(r==a)return r;var l=(r+a)/2,f=o<0?Math.ceil(l):Math.floor(l);if(f==r)return e(f)?r:a;e(f)?a=f:r=f+o}}function ye(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var l=!1,f=0;fr||r==a&&v.to==r)&&(o(Math.max(v.from,r),Math.min(v.to,a),v.level==1?"rtl":"ltr",f),l=!0)}l||o(r,a,"ltr")}var Te=null;function Ve(e,r,a){var o;Te=null;for(var l=0;lr)return l;f.to==r&&(f.from!=f.to&&a=="before"?o=l:Te=l),f.from==r&&(f.from!=f.to&&a!="before"?o=l:Te=l)}return o!=null?o:Te}var hn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?r.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,f=/[LRr]/,v=/[Lb1n]/,k=/[1n]/;function x(C,M,O){this.level=C,this.from=M,this.to=O}return function(C,M){var O=M=="ltr"?"L":"R";if(C.length==0||M=="ltr"&&!o.test(C))return!1;for(var K=C.length,$=[],ne=0;ne-1&&(o[r]=l.slice(0,f).concat(l.slice(f+1)))}}}function ct(e,r){var a=gi(e,r);if(!a.length)return;for(var o=Array.prototype.slice.call(arguments,2),l=0;l0}function Jn(e){e.prototype.on=function(r,a){De(this,r,a)},e.prototype.off=function(r,a){Re(this,r,a)}}function Ct(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function wo(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Bt(e){Ct(e),wo(e)}function Ir(e){return e.target||e.srcElement}function ko(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),A&&e.ctrlKey&&r==1&&(r=3),r}var En=function(){if(d&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),vi;function xo(e){if(vi==null){var r=_("span","​");Z(e,_("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vi=r.offsetWidth<=1&&r.offsetHeight>2&&!(d&&h<8))}var a=vi?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Fr;function Za(e){if(Fr!=null)return Fr;var r=Z(e,document.createTextNode("AخA")),a=j(r,0,1).getBoundingClientRect(),o=j(r,1,2).getBoundingClientRect();return P(e),!a||a.left==a.right?!1:Fr=o.right-a.right<3}var Dn=` +(()=>{var ea=Object.defineProperty,jy=Object.prototype.hasOwnProperty,ue=(t,n)=>()=>(n||(n={exports:{}},t(n.exports,n)),n.exports),Qc=t=>ea(t,"__esModule",{value:!0}),Hy=(t,n)=>{Qc(t);for(var i in n)ea(t,i,{get:n[i],enumerable:!0})},Uy=(t,n)=>{if(Qc(t),typeof n=="object"||typeof n=="function")for(let i in n)!jy.call(t,i)&&i!=="default"&&ea(t,i,{get:()=>n[i],enumerable:!0});return t},Ke=t=>t&&t.__esModule?t:Uy(ea({},"default",{value:t,enumerable:!0}),t);var Ze=ue((Ws,$s)=>{(function(t,n){typeof Ws=="object"&&typeof $s!="undefined"?$s.exports=n():typeof define=="function"&&define.amd?define(n):(t=t||self,t.CodeMirror=n())})(Ws,function(){"use strict";var t=navigator.userAgent,n=navigator.platform,i=/gecko\/\d/i.test(t),s=/MSIE \d/.test(t),u=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),c=/Edge\/(\d+)/.exec(t),d=s||u||c,h=d&&(s?document.documentMode||6:+(c||u)[1]),p=!c&&/WebKit\//.test(t),g=p&&/Qt\/\d+\.\d+/.test(t),y=!c&&/Chrome\//.test(t),m=/Opera\//.test(t),b=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),D=/PhantomJS/.test(t),E=!c&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),S=/Android/.test(t),z=E||S||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),A=E||/Mac/.test(n),R=/\bCrOS\b/.test(t),U=/win/i.test(n),Y=m&&t.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(m=!1,p=!0);var B=A&&(g||m&&(Y==null||Y<12.11)),G=i||d&&h>=9;function ee(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var J=function(e,r){var a=e.className,o=ee(r).exec(a);if(o){var l=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(l?o[1]+l:"")}};function O(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Z(e,r){return O(e).appendChild(r)}function _(e,r,a,o){var l=document.createElement(e);if(a&&(l.className=a),o&&(l.style.cssText=o),typeof r=="string")l.appendChild(document.createTextNode(r));else if(r)for(var f=0;f=r)return v+(r-f);v+=k-f,v+=a-v%a,f=k+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};ce.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},ce.prototype.set=function(e,r){this.f=r;var a=+new Date+e;(!this.id||a=r)return o+Math.min(v,r-l);if(l+=f-o,l+=a-l%a,o=f+1,l>=r)return o}}var Pe=[""];function rt(e){for(;Pe.length<=e;)Pe.push(Ce(Pe)+" ");return Pe[e]}function Ce(e){return e[e.length-1]}function nt(e,r){for(var a=[],o=0;o"€"&&(e.toUpperCase()!=e.toLowerCase()||qe.test(e))}function le(e,r){return r?r.source.indexOf("\\w")>-1&&X(e)?!0:r.test(e):X(e)}function te(e){for(var r in e)if(e.hasOwnProperty(r)&&e[r])return!1;return!0}var He=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ct(e){return e.charCodeAt(0)>=768&&He.test(e)}function Ae(e,r,a){for(;(a<0?r>0:ra?-1:1;;){if(r==a)return r;var l=(r+a)/2,f=o<0?Math.ceil(l):Math.floor(l);if(f==r)return e(f)?r:a;e(f)?a=f:r=f+o}}function ke(e,r,a,o){if(!e)return o(r,a,"ltr",0);for(var l=!1,f=0;fr||r==a&&v.to==r)&&(o(Math.max(v.from,r),Math.min(v.to,a),v.level==1?"rtl":"ltr",f),l=!0)}l||o(r,a,"ltr")}var Ie=null;function Ye(e,r,a){var o;Ie=null;for(var l=0;lr)return l;f.to==r&&(f.from!=f.to&&a=="before"?o=l:Ie=l),f.from==r&&(f.from!=f.to&&a!="before"?o=l:Ie=l)}return o!=null?o:Ie}var hn=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function a(C){return C<=247?e.charAt(C):1424<=C&&C<=1524?"R":1536<=C&&C<=1785?r.charAt(C-1536):1774<=C&&C<=2220?"r":8192<=C&&C<=8203?"w":C==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,l=/[stwN]/,f=/[LRr]/,v=/[Lb1n]/,k=/[1n]/;function x(C,M,P){this.level=C,this.from=M,this.to=P}return function(C,M){var P=M=="ltr"?"L":"R";if(C.length==0||M=="ltr"&&!o.test(C))return!1;for(var K=C.length,$=[],ne=0;ne-1&&(o[r]=l.slice(0,f).concat(l.slice(f+1)))}}}function dt(e,r){var a=gi(e,r);if(!a.length)return;for(var o=Array.prototype.slice.call(arguments,2),l=0;l0}function Jn(e){e.prototype.on=function(r,a){Te(this,r,a)},e.prototype.off=function(r,a){Be(this,r,a)}}function St(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function wo(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function fr(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Bt(e){St(e),wo(e)}function Ir(e){return e.target||e.srcElement}function ko(e){var r=e.which;return r==null&&(e.button&1?r=1:e.button&2?r=3:e.button&4&&(r=2)),A&&e.ctrlKey&&r==1&&(r=3),r}var En=function(){if(d&&h<9)return!1;var e=_("div");return"draggable"in e||"dragDrop"in e}(),vi;function xo(e){if(vi==null){var r=_("span","​");Z(e,_("span",[r,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(vi=r.offsetWidth<=1&&r.offsetHeight>2&&!(d&&h<8))}var a=vi?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return a.setAttribute("cm-text",""),a}var Fr;function Za(e){if(Fr!=null)return Fr;var r=Z(e,document.createTextNode("AخA")),a=j(r,0,1).getBoundingClientRect(),o=j(r,1,2).getBoundingClientRect();return O(e),!a||a.left==a.right?!1:Fr=o.right-a.right<3}var Dn=` b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var l=e.indexOf(` -`,r);l==-1&&(l=e.length);var f=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),v=f.indexOf("\r");v!=-1?(a.push(f.slice(0,v)),r+=v+1):(a.push(f),r=l+1)}return a}:function(e){return e.split(/\r\n?|\n/)},An=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(a){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},er=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mr=null;function Bn(e){if(Mr!=null)return Mr;var r=Z(e,_("span","x")),a=r.getBoundingClientRect(),o=j(r,0,1).getBoundingClientRect();return Mr=Math.abs(a.left-o.left)>1}var bi={},jn={};function qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),bi[e]=r}function bn(e,r){jn[e]=r}function Hn(e){if(typeof e=="string"&&jn.hasOwnProperty(e))e=jn[e];else if(e&&typeof e.name=="string"&&jn.hasOwnProperty(e.name)){var r=jn[e.name];typeof r=="string"&&(r={name:r}),e=Wt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function yi(e,r){r=Hn(r);var a=bi[r.name];if(!a)return yi(e,"text/plain");var o=a(e,r);if(Un.hasOwnProperty(r.name)){var l=Un[r.name];for(var f in l){if(!l.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=l[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var v in r.modeProps)o[v]=r.modeProps[v];return o}var Un={};function Qa(e,r){var a=Un.hasOwnProperty(e)?Un[e]:Un[e]={};T(r,a)}function fn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),a[o]=l}return a}function zr(e,r){for(var a;e.innerMode&&!(a=e.innerMode(r),!a||a.mode==e);)r=a.state,e=a.mode;return a||{mode:e,state:r}}function _o(e,r,a){return e.startState?e.startState(r,a):!0}var st=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};st.prototype.eol=function(){return this.pos>=this.string.length},st.prototype.sol=function(){return this.pos==this.lineStart},st.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},st.prototype.next=function(){if(this.posr},st.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},st.prototype.skipToEnd=function(){this.pos=this.string.length},st.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},st.prototype.backUp=function(e){this.pos-=e},st.prototype.column=function(){return this.lastColumnPos0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},st.prototype.current=function(){return this.string.slice(this.start,this.pos)},st.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},st.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},st.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ke(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var l=a.children[o],f=l.chunkSize();if(r=e.first&&ra?W(a,ke(e,a).text.length):Nv(r,ke(e,r.line).text.length)}function Nv(e,r){var a=e.ch;return a==null||a>r?W(e.line,r):a<0?W(e.line,0):e}function Zl(e,r){for(var a=[],o=0;othis.maxLookAhead&&(this.maxLookAhead=e),r},Ln.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,r,a){return r instanceof So?new Ln(e,fn(e.mode,r.state),a,r.lookAhead):new Ln(e,fn(e.mode,r),a)},Ln.prototype.save=function(e){var r=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new So(r,this.maxLookAhead):r};function Ql(e,r,a,o){var l=[e.state.modeGen],f={};iu(e,r.text,e.doc.mode,a,function(C,M){return l.push(C,M)},f,o);for(var v=a.state,k=function(C){a.baseTokens=l;var M=e.state.overlays[C],O=1,K=0;a.state=!0,iu(e,r.text,M.mode,a,function($,ne){for(var oe=O;K<$;){var ue=l[O];ue>$&&l.splice(O,1,$,l[O+1],ue),O+=2,K=Math.min($,ue)}if(!ne)return;if(M.opaque)l.splice(oe,O-oe,$,"overlay "+ne),O=oe+2;else for(;oee.options.maxHighlightLength&&fn(e.doc.mode,o.state),f=Ql(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=f.styles,f.classes?r.styleClasses=f.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function ki(e,r,a){var o=e.doc,l=e.display;if(!o.mode.startState)return new Ln(o,!0,r);var f=Bv(e,r,a),v=f>o.first&&ke(o,f-1).stateAfter,k=v?Ln.fromSaved(o,v,f):new Ln(o,_o(o.mode),f);return o.iter(f,r,function(x){Ja(e,x.text,k);var C=k.line;x.stateAfter=C==r-1||C%5==0||C>=l.viewFrom&&Cr.start)return f}throw new Error("Mode "+e.name+" failed to advance stream.")}var tu=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function nu(e,r,a,o){var l=e.doc,f=l.mode,v;r=Me(l,r);var k=ke(l,r.line),x=ki(e,r.line,a),C=new st(k.text,e.options.tabSize,x),M;for(o&&(M=[]);(o||C.pose.options.maxHighlightLength?(k=!1,v&&Ja(e,r,o,M.pos),M.pos=r.length,O=null):O=ru(es(a,M,o.state,K),f),K){var $=K[0].name;$&&(O="m-"+(O?$+" "+O:$))}if(!k||C!=O){for(;xv;--k){if(k<=f.first)return f.first;var x=ke(f,k-1),C=x.stateAfter;if(C&&(!a||k+(C instanceof So?C.lookAhead:0)<=f.modeFrontier))return k;var M=ce(x.text,null,e.options.tabSize);(l==null||o>M)&&(l=k-1,o=M)}return l}function jv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontiera;o--){var l=ke(e,o).stateAfter;if(l&&(!(l instanceof So)||o+l.lookAhead=r:f.to>r);(o||(o=[])).push(new Eo(v,f.from,x?null:f.to))}}return o}function Kv(e,r,a){var o;if(e)for(var l=0;l=r:f.to>r);if(k||f.from==r&&v.type=="bookmark"&&(!a||f.marker.insertLeft)){var x=f.from==null||(v.inclusiveLeft?f.from<=r:f.from0&&k)for(var ve=0;ve0)continue;var M=[x,1],O=he(C.from,k.from),K=he(C.to,k.to);(O<0||!v.inclusiveLeft&&!O)&&M.push({from:C.from,to:k.from}),(K>0||!v.inclusiveRight&&!K)&&M.push({from:k.to,to:C.to}),l.splice.apply(l,M),x+=M.length-3}return l}function su(e){var r=e.markedSpans;if(!r)return;for(var a=0;ar)&&(!o||ns(o,f.marker)<0)&&(o=f.marker)}return o}function du(e,r,a,o,l){var f=ke(e,r),v=Wn&&f.markedSpans;if(v)for(var k=0;k=0&&O<=0||M<=0&&O>=0)continue;if(M<=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?he(C.to,a)>=0:he(C.to,a)>0)||M>=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?he(C.from,o)<=0:he(C.from,o)<0))return!0}}function In(e){for(var r;r=cu(e);)e=r.find(-1,!0).line;return e}function Xv(e){for(var r;r=To(e);)e=r.find(1,!0).line;return e}function Zv(e){for(var r,a;r=To(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function rs(e,r){var a=ke(e,r),o=In(a);return a==o?r:Ke(o)}function hu(e,r){if(r>e.lastLine())return r;var a=ke(e,r),o;if(!tr(e,a))return r;for(;o=To(a);)a=o.find(1,!0).line;return Ke(a)+1}function tr(e,r){var a=Wn&&r.markedSpans;if(a)for(var o=void 0,l=0;lr.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var Pr=function(e,r,a){this.text=e,lu(this,r),this.height=a?a(this):1};Pr.prototype.lineNo=function(){return Ke(this)},Jn(Pr);function Qv(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),su(e),lu(e,a);var l=o?o(e):1;l!=e.height&&pn(e,l)}function Jv(e){e.parent=null,su(e)}var eb={},tb={};function fu(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?tb:eb;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function pu(e,r){var a=V("span",null,null,p?"padding-right: .1px":null),o={pre:V("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var l=0;l<=(r.rest?r.rest.length:0);l++){var f=l?r.rest[l-1]:r.line,v=void 0;o.pos=0,o.addToken=rb,Za(e.display.measure)&&(v=Pt(f,e.doc.direction))&&(o.addToken=ob(o.addToken,v)),o.map=[];var k=r!=e.display.externalMeasured&&Ke(f);ab(f,o,Jl(e,f,k)),f.styleClasses&&(f.styleClasses.bgClass&&(o.bgClass=H(f.styleClasses.bgClass,o.bgClass||"")),f.styleClasses.textClass&&(o.textClass=H(f.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(xo(e.display.measure))),l==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(p){var x=o.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return ct(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=H(o.pre.className,o.textClass||"")),o}function nb(e){var r=_("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function rb(e,r,a,o,l,f,v){if(!r)return;var k=e.splitSpaces?ib(r,e.trailingSpace):r,x=e.cm.state.specialChars,C=!1,M;if(!x.test(r))e.col+=r.length,M=document.createTextNode(k),e.map.push(e.pos,e.pos+r.length,M),d&&h<9&&(C=!0),e.pos+=r.length;else{M=document.createDocumentFragment();for(var O=0;;){x.lastIndex=O;var K=x.exec(r),$=K?K.index-O:r.length-O;if($){var ne=document.createTextNode(k.slice(O,O+$));d&&h<9?M.appendChild(_("span",[ne])):M.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!K)break;O+=$+1;var oe=void 0;if(K[0]==" "){var ue=e.cm.options.tabSize,fe=ue-e.col%ue;oe=M.appendChild(_("span",Tt(fe),"cm-tab")),oe.setAttribute("role","presentation"),oe.setAttribute("cm-text"," "),e.col+=fe}else K[0]=="\r"||K[0]==` -`?(oe=M.appendChild(_("span",K[0]=="\r"?"␍":"␤","cm-invalidchar")),oe.setAttribute("cm-text",K[0]),e.col+=1):(oe=e.cm.options.specialCharPlaceholder(K[0]),oe.setAttribute("cm-text",K[0]),d&&h<9?M.appendChild(_("span",[oe])):M.appendChild(oe),e.col+=1);e.map.push(e.pos,e.pos+1,oe),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||l||C||f||v){var ge=a||"";o&&(ge+=o),l&&(ge+=l);var pe=_("span",[M],ge,f);if(v)for(var ve in v)v.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&pe.setAttribute(ve,v[ve]);return e.content.appendChild(pe)}e.content.appendChild(M)}function ib(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",l=0;lC&&O.from<=C);K++);if(O.to>=M)return e(a,o,l,f,v,k,x);e(a,o.slice(0,O.to-C),l,f,null,k,x),f=null,o=o.slice(O.to-C),C=O.to}}}function mu(e,r,a,o){var l=!o&&a.widgetNode;l&&e.map.push(e.pos,e.pos+r,l),!o&&e.cm.display.input.needsContentAttribute&&(l||(l=e.content.appendChild(document.createElement("span"))),l.setAttribute("cm-marker",a.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function ab(e,r,a){var o=e.markedSpans,l=e.text,f=0;if(!o){for(var v=1;vx||Pe.collapsed&&Se.to==x&&Se.from==x)){if(Se.to!=null&&Se.to!=x&&$>Se.to&&($=Se.to,oe=""),Pe.className&&(ne+=" "+Pe.className),Pe.css&&(K=(K?K+";":"")+Pe.css),Pe.startStyle&&Se.from==x&&(ue+=" "+Pe.startStyle),Pe.endStyle&&Se.to==$&&(ve||(ve=[])).push(Pe.endStyle,Se.to),Pe.title&&((ge||(ge={})).title=Pe.title),Pe.attributes)for(var rt in Pe.attributes)(ge||(ge={}))[rt]=Pe.attributes[rt];Pe.collapsed&&(!fe||ns(fe.marker,Pe)<0)&&(fe=Se)}else Se.from>x&&$>Se.from&&($=Se.from)}if(ve)for(var Ft=0;Ft=k)break;for(var rn=Math.min(k,$);;){if(M){var Qt=x+M.length;if(!fe){var wt=Qt>rn?M.slice(0,rn-x):M;r.addToken(r,wt,O?O+ne:ne,ue,x+wt.length==$?oe:"",K,ge)}if(Qt>=rn){M=M.slice(rn-x),x=rn;break}x=Qt,ue=""}M=l.slice(f,f=a[C++]),O=fu(a[C++],r.cm.options)}}}function gu(e,r,a){this.line=r,this.rest=Zv(r),this.size=this.rest?Ke(xe(this.rest))-a+1:1,this.node=this.text=null,this.hidden=tr(e,r)}function Io(e,r,a){for(var o=[],l,f=r;f2&&f.push((x.bottom+C.top)/2-a.top)}}f.push(a.bottom-a.top)}}function _u(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;oa)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}function vb(e,r){r=In(r);var a=Ke(r),o=e.display.externalMeasured=new gu(e.doc,r,a);o.lineN=a;var l=o.built=pu(e,o);return o.text=l.pre,Z(e.display.lineMeasure,l.pre),o}function Cu(e,r,a,o){return Mn(e,Or(e,r),a,o)}function us(e,r){if(r>=e.display.viewFrom&&r=a.lineN&&rr)&&(f=x-k,l=f-1,r>=x&&(v="right")),l!=null){if(o=e[C+2],k==x&&a==(o.insertLeft?"left":"right")&&(v=a),a=="left"&&l==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)o=e[(C-=3)+2],v="left";if(a=="right"&&l==x-k)for(;C=0&&!((a=e[l]).left!=a.right);l--);return a}function yb(e,r,a,o){var l=Eu(r.map,a,o),f=l.node,v=l.start,k=l.end,x=l.collapse,C;if(f.nodeType==3){for(var M=0;M<4;M++){for(;v&&_t(r.line.text.charAt(l.coverStart+v));)--v;for(;l.coverStart+k0&&(x=o="right");var O;e.options.lineWrapping&&(O=f.getClientRects()).length>1?C=O[o=="right"?O.length-1:0]:C=f.getBoundingClientRect()}if(d&&h<9&&!v&&(!C||!C.left&&!C.right)){var K=f.parentNode.getClientRects()[0];K?C={left:K.left,right:K.left+Br(e.display),top:K.top,bottom:K.bottom}:C=Su}for(var $=C.top-r.rect.top,ne=C.bottom-r.rect.top,oe=($+ne)/2,ue=r.view.measure.heights,fe=0;fe=o.text.length?(x=o.text.length,C="before"):x<=0&&(x=0,C="after"),!k)return v(C=="before"?x-1:x,C=="before");function M(ne,oe,ue){var fe=k[oe],ge=fe.level==1;return v(ue?ne-1:ne,ge!=ue)}var O=Ve(k,x,C),K=Te,$=M(x,O,C=="before");return K!=null&&($.other=M(x,K,C!="before")),$}function Fu(e,r){var a=0;r=Me(e.doc,r),e.options.lineWrapping||(a=Br(e.display)*r.ch);var o=ke(e.doc,r.line),l=$n(o)+Fo(e.display);return{left:a,right:a,top:l,bottom:l+o.height}}function hs(e,r,a,o,l){var f=W(e,r,a);return f.xRel=l,o&&(f.outside=o),f}function fs(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return hs(o.first,0,null,-1,-1);var l=L(o,a),f=o.first+o.size-1;if(l>f)return hs(o.first+o.size-1,ke(o,f).text.length,null,1,1);r<0&&(r=0);for(var v=ke(o,l);;){var k=kb(e,v,l,r,a),x=Yv(v,k.ch+(k.xRel>0||k.outside>0?1:0));if(!x)return k;var C=x.find(1);if(C.line==l)return C;v=ke(o,l=C.line)}}function Mu(e,r,a,o){o-=cs(r);var l=r.text.length,f=Le(function(v){return Mn(e,a,v-1).bottom<=o},l,0);return l=Le(function(v){return Mn(e,a,v).top>o},f,l),{begin:f,end:l}}function qu(e,r,a,o){a||(a=Or(e,r));var l=Mo(e,r,Mn(e,a,o),"line").top;return Mu(e,r,a,l)}function ps(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function kb(e,r,a,o,l){l-=$n(r);var f=Or(e,r),v=cs(r),k=0,x=r.text.length,C=!0,M=Pt(r,e.doc.direction);if(M){var O=(e.options.lineWrapping?_b:xb)(e,r,a,f,M,o,l);C=O.level!=1,k=C?O.from:O.to-1,x=C?O.to:O.from-1}var K=null,$=null,ne=Le(function(Ae){var Se=Mn(e,f,Ae);return Se.top+=v,Se.bottom+=v,ps(Se,o,l,!1)?(Se.top<=l&&Se.left<=o&&(K=Ae,$=Se),!0):!1},k,x),oe,ue,fe=!1;if($){var ge=o-$.left<$.right-o,pe=ge==C;ne=K+(pe?0:1),ue=pe?"after":"before",oe=ge?$.left:$.right}else{!C&&(ne==x||ne==k)&&ne++,ue=ne==0?"after":ne==r.text.length?"before":Mn(e,f,ne-(C?1:0)).bottom+v<=l==C?"after":"before";var ve=yn(e,W(a,ne,ue),"line",r,f);oe=ve.left,fe=l=ve.bottom?1:0}return ne=Ee(r.text,ne,1),hs(a,ne,ue,fe,o-oe)}function xb(e,r,a,o,l,f,v){var k=Le(function(O){var K=l[O],$=K.level!=1;return ps(yn(e,W(a,$?K.to:K.from,$?"before":"after"),"line",r,o),f,v,!0)},0,l.length-1),x=l[k];if(k>0){var C=x.level!=1,M=yn(e,W(a,C?x.from:x.to,C?"after":"before"),"line",r,o);ps(M,f,v,!0)&&M.top>v&&(x=l[k-1])}return x}function _b(e,r,a,o,l,f,v){var k=Mu(e,r,o,v),x=k.begin,C=k.end;/\s/.test(r.text.charAt(C-1))&&C--;for(var M=null,O=null,K=0;K=C||$.to<=x)continue;var ne=$.level!=1,oe=Mn(e,o,ne?Math.min(C,$.to)-1:Math.max(x,$.from)).right,ue=oeue)&&(M=$,O=ue)}return M||(M=l[l.length-1]),M.fromC&&(M={from:M.from,to:C,level:M.level}),M}var mr;function Nr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(mr==null){mr=_("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)mr.appendChild(document.createTextNode("x")),mr.appendChild(_("br"));mr.appendChild(document.createTextNode("x"))}Z(e.measure,mr);var a=mr.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),P(e.measure),a||1}function Br(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=_("span","xxxxxxxxxx"),a=_("pre",[r],"CodeMirror-line-like");Z(e.measure,a);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function ms(e){for(var r=e.display,a={},o={},l=r.gutters.clientLeft,f=r.gutters.firstChild,v=0;f;f=f.nextSibling,++v){var k=e.display.gutterSpecs[v].className;a[k]=f.offsetLeft+f.clientLeft+l,o[k]=f.clientWidth}return{fixedPos:gs(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function gs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zu(e){var r=Nr(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/Br(e.display)-3);return function(l){if(tr(e.doc,l))return 0;var f=0;if(l.widgets)for(var v=0;v0&&(C=ke(e.doc,x.line).text).length==x.ch){var M=ce(C,C.length,e.options.tabSize)-C.length;x=W(x.line,Math.max(0,Math.round((f-xu(e.display).left)/Br(e.display))-M))}return x}function vr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var a=e.display.view,o=0;or)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)Wn&&rs(e.doc,r)l.viewFrom?rr(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&a>=l.viewTo)rr(e);else if(r<=l.viewFrom){var f=qo(e,a,a+o,1);f?(l.view=l.view.slice(f.index),l.viewFrom=f.lineN,l.viewTo+=o):rr(e)}else if(a>=l.viewTo){var v=qo(e,r,r,-1);v?(l.view=l.view.slice(0,v.index),l.viewTo=v.lineN):rr(e)}else{var k=qo(e,r,r,-1),x=qo(e,a,a+o,1);k&&x?(l.view=l.view.slice(0,k.index).concat(Io(e,k.lineN,x.lineN)).concat(l.view.slice(x.index)),l.viewTo+=o):rr(e)}var C=l.externalMeasured;C&&(a=l.lineN&&r=o.viewTo)return;var f=o.view[vr(e,r)];if(f.node==null)return;var v=f.changes||(f.changes=[]);ie(v,a)==-1&&v.push(a)}function rr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qo(e,r,a,o){var l=vr(e,r),f,v=e.display.view;if(!Wn||a==e.doc.first+e.doc.size)return{index:l,lineN:a};for(var k=e.display.viewFrom,x=0;x0){if(l==v.length-1)return null;f=k+v[l].size-r,l++}else f=k-r;r+=f,a+=f}for(;rs(e.doc,a)!=a;){if(l==(o<0?0:v.length-1))return null;a+=o*v[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:a}}function Cb(e,r,a){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=Io(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=Io(e,r,o.viewFrom).concat(o.view):o.viewFroma&&(o.view=o.view.slice(0,vr(e,a)))),o.viewTo=a}function Pu(e){for(var r=e.display.view,a=0,o=0;o=e.display.viewTo||k.to().line0?r.blinker=setInterval(function(){e.hasFocus()||jr(e),r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Nu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Bu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function ys(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ct(e,"focus",e,r),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bs(e)}function jr(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(ct(e,"blur",e,r),e.state.focused=!1,J(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Po(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o.005||M<-.005)&&(pn(l.line,v),ju(l.line),l.rest))for(var O=0;Oe.display.sizerWidth){var K=Math.ceil(k/Br(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}function ju(e){if(e.widgets)for(var r=0;r=v&&(f=L(r,$n(ke(r,x))-e.wrapper.clientHeight),v=x)}return{from:f,to:Math.max(v,f+1)}}function Eb(e,r){if(at(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),l=null;if(r.top+o.top<0?l=!0:r.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(l=!1),l!=null&&!D){var f=_("div","​",null,`position: absolute; +`,r);l==-1&&(l=e.length);var f=e.slice(r,e.charAt(l-1)=="\r"?l-1:l),v=f.indexOf("\r");v!=-1?(a.push(f.slice(0,v)),r+=v+1):(a.push(f),r=l+1)}return a}:function(e){return e.split(/\r\n?|\n/)},An=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(r){return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch(a){}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},er=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Mr=null;function Bn(e){if(Mr!=null)return Mr;var r=Z(e,_("span","x")),a=r.getBoundingClientRect(),o=j(r,0,1).getBoundingClientRect();return Mr=Math.abs(a.left-o.left)>1}var bi={},jn={};function qr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),bi[e]=r}function bn(e,r){jn[e]=r}function Hn(e){if(typeof e=="string"&&jn.hasOwnProperty(e))e=jn[e];else if(e&&typeof e.name=="string"&&jn.hasOwnProperty(e.name)){var r=jn[e.name];typeof r=="string"&&(r={name:r}),e=Wt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Hn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Hn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function yi(e,r){r=Hn(r);var a=bi[r.name];if(!a)return yi(e,"text/plain");var o=a(e,r);if(Un.hasOwnProperty(r.name)){var l=Un[r.name];for(var f in l){if(!l.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=l[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var v in r.modeProps)o[v]=r.modeProps[v];return o}var Un={};function Qa(e,r){var a=Un.hasOwnProperty(e)?Un[e]:Un[e]={};T(r,a)}function fn(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var a={};for(var o in r){var l=r[o];l instanceof Array&&(l=l.concat([])),a[o]=l}return a}function zr(e,r){for(var a;e.innerMode&&!(a=e.innerMode(r),!a||a.mode==e);)r=a.state,e=a.mode;return a||{mode:e,state:r}}function _o(e,r,a){return e.startState?e.startState(r,a):!0}var lt=function(e,r,a){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=a};lt.prototype.eol=function(){return this.pos>=this.string.length},lt.prototype.sol=function(){return this.pos==this.lineStart},lt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},lt.prototype.next=function(){if(this.posr},lt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},lt.prototype.skipToEnd=function(){this.pos=this.string.length},lt.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},lt.prototype.backUp=function(e){this.pos-=e},lt.prototype.column=function(){return this.lastColumnPos0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},lt.prototype.current=function(){return this.string.slice(this.start,this.pos)},lt.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},lt.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},lt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function _e(e,r){if(r-=e.first,r<0||r>=e.size)throw new Error("There is no line "+(r+e.first)+" in the document.");for(var a=e;!a.lines;)for(var o=0;;++o){var l=a.children[o],f=l.chunkSize();if(r=e.first&&ra?W(a,_e(e,a).text.length):Hv(r,_e(e,r.line).text.length)}function Hv(e,r){var a=e.ch;return a==null||a>r?W(e.line,r):a<0?W(e.line,0):e}function Zl(e,r){for(var a=[],o=0;othis.maxLookAhead&&(this.maxLookAhead=e),r},Ln.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var r=this.baseTokens[this.baseTokenPos+1];return{type:r&&r.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Ln.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ln.fromSaved=function(e,r,a){return r instanceof So?new Ln(e,fn(e.mode,r.state),a,r.lookAhead):new Ln(e,fn(e.mode,r),a)},Ln.prototype.save=function(e){var r=e!==!1?fn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new So(r,this.maxLookAhead):r};function Ql(e,r,a,o){var l=[e.state.modeGen],f={};iu(e,r.text,e.doc.mode,a,function(C,M){return l.push(C,M)},f,o);for(var v=a.state,k=function(C){a.baseTokens=l;var M=e.state.overlays[C],P=1,K=0;a.state=!0,iu(e,r.text,M.mode,a,function($,ne){for(var ae=P;K<$;){var he=l[P];he>$&&l.splice(P,1,$,l[P+1],he),P+=2,K=Math.min($,he)}if(!ne)return;if(M.opaque)l.splice(ae,P-ae,$,"overlay "+ne),P=ae+2;else for(;aee.options.maxHighlightLength&&fn(e.doc.mode,o.state),f=Ql(e,r,o);l&&(o.state=l),r.stateAfter=o.save(!l),r.styles=f.styles,f.classes?r.styleClasses=f.classes:r.styleClasses&&(r.styleClasses=null),a===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return r.styles}function ki(e,r,a){var o=e.doc,l=e.display;if(!o.mode.startState)return new Ln(o,!0,r);var f=Uv(e,r,a),v=f>o.first&&_e(o,f-1).stateAfter,k=v?Ln.fromSaved(o,v,f):new Ln(o,_o(o.mode),f);return o.iter(f,r,function(x){Ja(e,x.text,k);var C=k.line;x.stateAfter=C==r-1||C%5==0||C>=l.viewFrom&&Cr.start)return f}throw new Error("Mode "+e.name+" failed to advance stream.")}var tu=function(e,r,a){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=r||null,this.state=a};function nu(e,r,a,o){var l=e.doc,f=l.mode,v;r=ze(l,r);var k=_e(l,r.line),x=ki(e,r.line,a),C=new lt(k.text,e.options.tabSize,x),M;for(o&&(M=[]);(o||C.pose.options.maxHighlightLength?(k=!1,v&&Ja(e,r,o,M.pos),M.pos=r.length,P=null):P=ru(es(a,M,o.state,K),f),K){var $=K[0].name;$&&(P="m-"+(P?$+" "+P:$))}if(!k||C!=P){for(;xv;--k){if(k<=f.first)return f.first;var x=_e(f,k-1),C=x.stateAfter;if(C&&(!a||k+(C instanceof So?C.lookAhead:0)<=f.modeFrontier))return k;var M=de(x.text,null,e.options.tabSize);(l==null||o>M)&&(l=k-1,o=M)}return l}function Wv(e,r){if(e.modeFrontier=Math.min(e.modeFrontier,r),e.highlightFrontiera;o--){var l=_e(e,o).stateAfter;if(l&&(!(l instanceof So)||o+l.lookAhead=r:f.to>r);(o||(o=[])).push(new Eo(v,f.from,x?null:f.to))}}return o}function Xv(e,r,a){var o;if(e)for(var l=0;l=r:f.to>r);if(k||f.from==r&&v.type=="bookmark"&&(!a||f.marker.insertLeft)){var x=f.from==null||(v.inclusiveLeft?f.from<=r:f.from0&&k)for(var be=0;be0)continue;var M=[x,1],P=fe(C.from,k.from),K=fe(C.to,k.to);(P<0||!v.inclusiveLeft&&!P)&&M.push({from:C.from,to:k.from}),(K>0||!v.inclusiveRight&&!K)&&M.push({from:k.to,to:C.to}),l.splice.apply(l,M),x+=M.length-3}return l}function su(e){var r=e.markedSpans;if(!r)return;for(var a=0;ar)&&(!o||ns(o,f.marker)<0)&&(o=f.marker)}return o}function du(e,r,a,o,l){var f=_e(e,r),v=Wn&&f.markedSpans;if(v)for(var k=0;k=0&&P<=0||M<=0&&P>=0)continue;if(M<=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?fe(C.to,a)>=0:fe(C.to,a)>0)||M>=0&&(x.marker.inclusiveRight&&l.inclusiveLeft?fe(C.from,o)<=0:fe(C.from,o)<0))return!0}}function In(e){for(var r;r=cu(e);)e=r.find(-1,!0).line;return e}function Jv(e){for(var r;r=To(e);)e=r.find(1,!0).line;return e}function eb(e){for(var r,a;r=To(e);)e=r.find(1,!0).line,(a||(a=[])).push(e);return a}function rs(e,r){var a=_e(e,r),o=In(a);return a==o?r:Ve(o)}function hu(e,r){if(r>e.lastLine())return r;var a=_e(e,r),o;if(!tr(e,a))return r;for(;o=To(a);)a=o.find(1,!0).line;return Ve(a)+1}function tr(e,r){var a=Wn&&r.markedSpans;if(a)for(var o=void 0,l=0;lr.maxLineLength&&(r.maxLineLength=l,r.maxLine=o)})}var Or=function(e,r,a){this.text=e,lu(this,r),this.height=a?a(this):1};Or.prototype.lineNo=function(){return Ve(this)},Jn(Or);function tb(e,r,a,o){e.text=r,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),su(e),lu(e,a);var l=o?o(e):1;l!=e.height&&pn(e,l)}function nb(e){e.parent=null,su(e)}var rb={},ib={};function fu(e,r){if(!e||/^\s*$/.test(e))return null;var a=r.addModeClass?ib:rb;return a[e]||(a[e]=e.replace(/\S+/g,"cm-$&"))}function pu(e,r){var a=V("span",null,null,p?"padding-right: .1px":null),o={pre:V("pre",[a],"CodeMirror-line"),content:a,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};r.measure={};for(var l=0;l<=(r.rest?r.rest.length:0);l++){var f=l?r.rest[l-1]:r.line,v=void 0;o.pos=0,o.addToken=ab,Za(e.display.measure)&&(v=Ot(f,e.doc.direction))&&(o.addToken=lb(o.addToken,v)),o.map=[];var k=r!=e.display.externalMeasured&&Ve(f);ub(f,o,Jl(e,f,k)),f.styleClasses&&(f.styleClasses.bgClass&&(o.bgClass=H(f.styleClasses.bgClass,o.bgClass||"")),f.styleClasses.textClass&&(o.textClass=H(f.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(xo(e.display.measure))),l==0?(r.measure.map=o.map,r.measure.cache={}):((r.measure.maps||(r.measure.maps=[])).push(o.map),(r.measure.caches||(r.measure.caches=[])).push({}))}if(p){var x=o.content.lastChild;(/\bcm-tab\b/.test(x.className)||x.querySelector&&x.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return dt(e,"renderLine",e,r.line,o.pre),o.pre.className&&(o.textClass=H(o.pre.className,o.textClass||"")),o}function ob(e){var r=_("span","•","cm-invalidchar");return r.title="\\u"+e.charCodeAt(0).toString(16),r.setAttribute("aria-label",r.title),r}function ab(e,r,a,o,l,f,v){if(!r)return;var k=e.splitSpaces?sb(r,e.trailingSpace):r,x=e.cm.state.specialChars,C=!1,M;if(!x.test(r))e.col+=r.length,M=document.createTextNode(k),e.map.push(e.pos,e.pos+r.length,M),d&&h<9&&(C=!0),e.pos+=r.length;else{M=document.createDocumentFragment();for(var P=0;;){x.lastIndex=P;var K=x.exec(r),$=K?K.index-P:r.length-P;if($){var ne=document.createTextNode(k.slice(P,P+$));d&&h<9?M.appendChild(_("span",[ne])):M.appendChild(ne),e.map.push(e.pos,e.pos+$,ne),e.col+=$,e.pos+=$}if(!K)break;P+=$+1;var ae=void 0;if(K[0]==" "){var he=e.cm.options.tabSize,pe=he-e.col%he;ae=M.appendChild(_("span",rt(pe),"cm-tab")),ae.setAttribute("role","presentation"),ae.setAttribute("cm-text"," "),e.col+=pe}else K[0]=="\r"||K[0]==` +`?(ae=M.appendChild(_("span",K[0]=="\r"?"␍":"␤","cm-invalidchar")),ae.setAttribute("cm-text",K[0]),e.col+=1):(ae=e.cm.options.specialCharPlaceholder(K[0]),ae.setAttribute("cm-text",K[0]),d&&h<9?M.appendChild(_("span",[ae])):M.appendChild(ae),e.col+=1);e.map.push(e.pos,e.pos+1,ae),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||l||C||f||v){var ve=a||"";o&&(ve+=o),l&&(ve+=l);var me=_("span",[M],ve,f);if(v)for(var be in v)v.hasOwnProperty(be)&&be!="style"&&be!="class"&&me.setAttribute(be,v[be]);return e.content.appendChild(me)}e.content.appendChild(M)}function sb(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",l=0;lC&&P.from<=C);K++);if(P.to>=M)return e(a,o,l,f,v,k,x);e(a,o.slice(0,P.to-C),l,f,null,k,x),f=null,o=o.slice(P.to-C),C=P.to}}}function mu(e,r,a,o){var l=!o&&a.widgetNode;l&&e.map.push(e.pos,e.pos+r,l),!o&&e.cm.display.input.needsContentAttribute&&(l||(l=e.content.appendChild(document.createElement("span"))),l.setAttribute("cm-marker",a.id)),l&&(e.cm.display.input.setUneditable(l),e.content.appendChild(l)),e.pos+=r,e.trailingSpace=!1}function ub(e,r,a){var o=e.markedSpans,l=e.text,f=0;if(!o){for(var v=1;vx||Ne.collapsed&&Ee.to==x&&Ee.from==x)){if(Ee.to!=null&&Ee.to!=x&&$>Ee.to&&($=Ee.to,ae=""),Ne.className&&(ne+=" "+Ne.className),Ne.css&&(K=(K?K+";":"")+Ne.css),Ne.startStyle&&Ee.from==x&&(he+=" "+Ne.startStyle),Ne.endStyle&&Ee.to==$&&(be||(be=[])).push(Ne.endStyle,Ee.to),Ne.title&&((ve||(ve={})).title=Ne.title),Ne.attributes)for(var it in Ne.attributes)(ve||(ve={}))[it]=Ne.attributes[it];Ne.collapsed&&(!pe||ns(pe.marker,Ne)<0)&&(pe=Ee)}else Ee.from>x&&$>Ee.from&&($=Ee.from)}if(be)for(var Ft=0;Ft=k)break;for(var rn=Math.min(k,$);;){if(M){var Qt=x+M.length;if(!pe){var kt=Qt>rn?M.slice(0,rn-x):M;r.addToken(r,kt,P?P+ne:ne,he,x+kt.length==$?ae:"",K,ve)}if(Qt>=rn){M=M.slice(rn-x),x=rn;break}x=Qt,he=""}M=l.slice(f,f=a[C++]),P=fu(a[C++],r.cm.options)}}}function gu(e,r,a){this.line=r,this.rest=eb(r),this.size=this.rest?Ve(Ce(this.rest))-a+1:1,this.node=this.text=null,this.hidden=tr(e,r)}function Io(e,r,a){for(var o=[],l,f=r;f2&&f.push((x.bottom+C.top)/2-a.top)}}f.push(a.bottom-a.top)}}function _u(e,r,a){if(e.line==r)return{map:e.measure.map,cache:e.measure.cache};for(var o=0;oa)return{map:e.measure.maps[l],cache:e.measure.caches[l],before:!0}}function wb(e,r){r=In(r);var a=Ve(r),o=e.display.externalMeasured=new gu(e.doc,r,a);o.lineN=a;var l=o.built=pu(e,o);return o.text=l.pre,Z(e.display.lineMeasure,l.pre),o}function Cu(e,r,a,o){return Mn(e,Pr(e,r),a,o)}function us(e,r){if(r>=e.display.viewFrom&&r=a.lineN&&rr)&&(f=x-k,l=f-1,r>=x&&(v="right")),l!=null){if(o=e[C+2],k==x&&a==(o.insertLeft?"left":"right")&&(v=a),a=="left"&&l==0)for(;C&&e[C-2]==e[C-3]&&e[C-1].insertLeft;)o=e[(C-=3)+2],v="left";if(a=="right"&&l==x-k)for(;C=0&&!((a=e[l]).left!=a.right);l--);return a}function xb(e,r,a,o){var l=Eu(r.map,a,o),f=l.node,v=l.start,k=l.end,x=l.collapse,C;if(f.nodeType==3){for(var M=0;M<4;M++){for(;v&&Ct(r.line.text.charAt(l.coverStart+v));)--v;for(;l.coverStart+k0&&(x=o="right");var P;e.options.lineWrapping&&(P=f.getClientRects()).length>1?C=P[o=="right"?P.length-1:0]:C=f.getBoundingClientRect()}if(d&&h<9&&!v&&(!C||!C.left&&!C.right)){var K=f.parentNode.getClientRects()[0];K?C={left:K.left,right:K.left+Br(e.display),top:K.top,bottom:K.bottom}:C=Su}for(var $=C.top-r.rect.top,ne=C.bottom-r.rect.top,ae=($+ne)/2,he=r.view.measure.heights,pe=0;pe=o.text.length?(x=o.text.length,C="before"):x<=0&&(x=0,C="after"),!k)return v(C=="before"?x-1:x,C=="before");function M(ne,ae,he){var pe=k[ae],ve=pe.level==1;return v(he?ne-1:ne,ve!=he)}var P=Ye(k,x,C),K=Ie,$=M(x,P,C=="before");return K!=null&&($.other=M(x,K,C!="before")),$}function Fu(e,r){var a=0;r=ze(e.doc,r),e.options.lineWrapping||(a=Br(e.display)*r.ch);var o=_e(e.doc,r.line),l=$n(o)+Fo(e.display);return{left:a,right:a,top:l,bottom:l+o.height}}function hs(e,r,a,o,l){var f=W(e,r,a);return f.xRel=l,o&&(f.outside=o),f}function fs(e,r,a){var o=e.doc;if(a+=e.display.viewOffset,a<0)return hs(o.first,0,null,-1,-1);var l=L(o,a),f=o.first+o.size-1;if(l>f)return hs(o.first+o.size-1,_e(o,f).text.length,null,1,1);r<0&&(r=0);for(var v=_e(o,l);;){var k=Cb(e,v,l,r,a),x=Qv(v,k.ch+(k.xRel>0||k.outside>0?1:0));if(!x)return k;var C=x.find(1);if(C.line==l)return C;v=_e(o,l=C.line)}}function Mu(e,r,a,o){o-=cs(r);var l=r.text.length,f=Fe(function(v){return Mn(e,a,v-1).bottom<=o},l,0);return l=Fe(function(v){return Mn(e,a,v).top>o},f,l),{begin:f,end:l}}function qu(e,r,a,o){a||(a=Pr(e,r));var l=Mo(e,r,Mn(e,a,o),"line").top;return Mu(e,r,a,l)}function ps(e,r,a,o){return e.bottom<=a?!1:e.top>a?!0:(o?e.left:e.right)>r}function Cb(e,r,a,o,l){l-=$n(r);var f=Pr(e,r),v=cs(r),k=0,x=r.text.length,C=!0,M=Ot(r,e.doc.direction);if(M){var P=(e.options.lineWrapping?Eb:Sb)(e,r,a,f,M,o,l);C=P.level!=1,k=C?P.from:P.to-1,x=C?P.to:P.from-1}var K=null,$=null,ne=Fe(function(Le){var Ee=Mn(e,f,Le);return Ee.top+=v,Ee.bottom+=v,ps(Ee,o,l,!1)?(Ee.top<=l&&Ee.left<=o&&(K=Le,$=Ee),!0):!1},k,x),ae,he,pe=!1;if($){var ve=o-$.left<$.right-o,me=ve==C;ne=K+(me?0:1),he=me?"after":"before",ae=ve?$.left:$.right}else{!C&&(ne==x||ne==k)&&ne++,he=ne==0?"after":ne==r.text.length?"before":Mn(e,f,ne-(C?1:0)).bottom+v<=l==C?"after":"before";var be=yn(e,W(a,ne,he),"line",r,f);ae=be.left,pe=l=be.bottom?1:0}return ne=Ae(r.text,ne,1),hs(a,ne,he,pe,o-ae)}function Sb(e,r,a,o,l,f,v){var k=Fe(function(P){var K=l[P],$=K.level!=1;return ps(yn(e,W(a,$?K.to:K.from,$?"before":"after"),"line",r,o),f,v,!0)},0,l.length-1),x=l[k];if(k>0){var C=x.level!=1,M=yn(e,W(a,C?x.from:x.to,C?"after":"before"),"line",r,o);ps(M,f,v,!0)&&M.top>v&&(x=l[k-1])}return x}function Eb(e,r,a,o,l,f,v){var k=Mu(e,r,o,v),x=k.begin,C=k.end;/\s/.test(r.text.charAt(C-1))&&C--;for(var M=null,P=null,K=0;K=C||$.to<=x)continue;var ne=$.level!=1,ae=Mn(e,o,ne?Math.min(C,$.to)-1:Math.max(x,$.from)).right,he=aehe)&&(M=$,P=he)}return M||(M=l[l.length-1]),M.fromC&&(M={from:M.from,to:C,level:M.level}),M}var mr;function Nr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(mr==null){mr=_("pre",null,"CodeMirror-line-like");for(var r=0;r<49;++r)mr.appendChild(document.createTextNode("x")),mr.appendChild(_("br"));mr.appendChild(document.createTextNode("x"))}Z(e.measure,mr);var a=mr.offsetHeight/50;return a>3&&(e.cachedTextHeight=a),O(e.measure),a||1}function Br(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var r=_("span","xxxxxxxxxx"),a=_("pre",[r],"CodeMirror-line-like");Z(e.measure,a);var o=r.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function ms(e){for(var r=e.display,a={},o={},l=r.gutters.clientLeft,f=r.gutters.firstChild,v=0;f;f=f.nextSibling,++v){var k=e.display.gutterSpecs[v].className;a[k]=f.offsetLeft+f.clientLeft+l,o[k]=f.clientWidth}return{fixedPos:gs(r),gutterTotalWidth:r.gutters.offsetWidth,gutterLeft:a,gutterWidth:o,wrapperWidth:r.wrapper.clientWidth}}function gs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function zu(e){var r=Nr(e.display),a=e.options.lineWrapping,o=a&&Math.max(5,e.display.scroller.clientWidth/Br(e.display)-3);return function(l){if(tr(e.doc,l))return 0;var f=0;if(l.widgets)for(var v=0;v0&&(C=_e(e.doc,x.line).text).length==x.ch){var M=de(C,C.length,e.options.tabSize)-C.length;x=W(x.line,Math.max(0,Math.round((f-xu(e.display).left)/Br(e.display))-M))}return x}function vr(e,r){if(r>=e.display.viewTo)return null;if(r-=e.display.viewFrom,r<0)return null;for(var a=e.display.view,o=0;or)&&(l.updateLineNumbers=r),e.curOp.viewChanged=!0,r>=l.viewTo)Wn&&rs(e.doc,r)l.viewFrom?rr(e):(l.viewFrom+=o,l.viewTo+=o);else if(r<=l.viewFrom&&a>=l.viewTo)rr(e);else if(r<=l.viewFrom){var f=qo(e,a,a+o,1);f?(l.view=l.view.slice(f.index),l.viewFrom=f.lineN,l.viewTo+=o):rr(e)}else if(a>=l.viewTo){var v=qo(e,r,r,-1);v?(l.view=l.view.slice(0,v.index),l.viewTo=v.lineN):rr(e)}else{var k=qo(e,r,r,-1),x=qo(e,a,a+o,1);k&&x?(l.view=l.view.slice(0,k.index).concat(Io(e,k.lineN,x.lineN)).concat(l.view.slice(x.index)),l.viewTo+=o):rr(e)}var C=l.externalMeasured;C&&(a=l.lineN&&r=o.viewTo)return;var f=o.view[vr(e,r)];if(f.node==null)return;var v=f.changes||(f.changes=[]);oe(v,a)==-1&&v.push(a)}function rr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function qo(e,r,a,o){var l=vr(e,r),f,v=e.display.view;if(!Wn||a==e.doc.first+e.doc.size)return{index:l,lineN:a};for(var k=e.display.viewFrom,x=0;x0){if(l==v.length-1)return null;f=k+v[l].size-r,l++}else f=k-r;r+=f,a+=f}for(;rs(e.doc,a)!=a;){if(l==(o<0?0:v.length-1))return null;a+=o*v[l-(o<0?1:0)].size,l+=o}return{index:l,lineN:a}}function Db(e,r,a){var o=e.display,l=o.view;l.length==0||r>=o.viewTo||a<=o.viewFrom?(o.view=Io(e,r,a),o.viewFrom=r):(o.viewFrom>r?o.view=Io(e,r,o.viewFrom).concat(o.view):o.viewFroma&&(o.view=o.view.slice(0,vr(e,a)))),o.viewTo=a}function Ou(e){for(var r=e.display.view,a=0,o=0;o=e.display.viewTo||k.to().line0?r.blinker=setInterval(function(){e.hasFocus()||jr(e),r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Nu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Bu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,jr(e))},100)}function ys(e,r){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(dt(e,"focus",e,r),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),p&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bs(e)}function jr(e,r){if(e.state.delayingBlurEvent)return;e.state.focused&&(dt(e,"blur",e,r),e.state.focused=!1,J(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Oo(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o.005||M<-.005)&&(pn(l.line,v),ju(l.line),l.rest))for(var P=0;Pe.display.sizerWidth){var K=Math.ceil(k/Br(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}function ju(e){if(e.widgets)for(var r=0;r=v&&(f=L(r,$n(_e(r,x))-e.wrapper.clientHeight),v=x)}return{from:f,to:Math.max(v,f+1)}}function Tb(e,r){if(st(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),l=null;if(r.top+o.top<0?l=!0:r.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(l=!1),l!=null&&!D){var f=_("div","​",null,`position: absolute; top: `+(r.top-a.viewOffset-Fo(e.display))+`px; height: `+(r.bottom-r.top+Fn(e)+a.barHeight)+`px; - left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(f),f.scrollIntoView(l),e.display.lineSpace.removeChild(f)}}function Db(e,r,a,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==a&&(r=r.ch?W(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?W(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var v=!1,k=yn(e,r),x=!a||a==r?k:yn(e,a);l={left:Math.min(k.left,x.left),top:Math.min(k.top,x.top)-o,right:Math.max(k.left,x.left),bottom:Math.max(k.bottom,x.bottom)+o};var C=ws(e,l),M=e.doc.scrollTop,O=e.doc.scrollLeft;if(C.scrollTop!=null&&(Ti(e,C.scrollTop),Math.abs(e.doc.scrollTop-M)>1&&(v=!0)),C.scrollLeft!=null&&(br(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-O)>1&&(v=!0)),!v)break}return l}function Ab(e,r){var a=ws(e,r);a.scrollTop!=null&&Ti(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Nr(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),v={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.topk-o;if(r.topl+f){var M=Math.min(r.top,(C?k:r.bottom)-f);M!=l&&(v.scrollTop=M)}var O=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,K=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>K;return $&&(r.right=r.left+K),r.left<10?v.scrollLeft=0:r.leftK+O-3&&(v.scrollLeft=r.right+($?0:10)-K),v}function ks(e,r){if(r==null)return;Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Hr(e){Oo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ai(e,r,a){(r!=null||a!=null)&&Oo(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Tb(e,r){Oo(e),e.curOp.scrollToPos=r}function Oo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Fu(e,r.from),o=Fu(e,r.to);Hu(e,a,o,r.margin)}}function Hu(e,r,a,o){var l=ws(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Ai(e,l.scrollLeft,l.scrollTop)}function Ti(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),Uu(e,r,!0),i&&_s(e),Fi(e,100)}function Uu(e,r,a){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!a)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function br(e,r,a,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Vu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Li(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+ss(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Fn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var yr=function(e,r,a){this.cm=a;var o=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),De(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),De(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var l=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+l)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var f=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var e=A&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new de,this.disableVert=new de},yr.prototype.enableZeroWidthBar=function(e,r,a){e.style.pointerEvents="auto";function o(){var l=e.getBoundingClientRect(),f=a=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);f!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function Ur(e,r){r||(r=Li(e));var a=e.display.barWidth,o=e.display.barHeight;Wu(e,r);for(var l=0;l<4&&a!=e.display.barWidth||o!=e.display.barHeight;l++)a!=e.display.barWidth&&e.options.lineWrapping&&Po(e),Wu(e,Li(e)),a=e.display.barWidth,o=e.display.barHeight}function Wu(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var $u={native:yr,null:Ii};function Gu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&J(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $u[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),De(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?br(e,r):Ti(e,r)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Lb=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Lb},sb(e.curOp)}function kr(e){var r=e.curOp;r&&ub(r,function(a){for(var o=0;o=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new No(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Mb(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function qb(e){var r=e.cm,a=r.display;e.updatedDisplay&&Po(r),e.barMeasure=Li(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Cu(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Fn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function zb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date+e.options.workTime,o=ki(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(f){if(o.line>=e.display.viewFrom){var v=f.styles,k=f.text.length>e.options.maxHighlightLength?fn(r.mode,o.state):null,x=Ql(e,f,o,!0);k&&(o.state=k),f.styles=x.styles;var C=f.styleClasses,M=x.classes;M?f.styleClasses=M:C&&(f.styleClasses=null);for(var O=!v||v.length!=f.styles.length||C!=M&&(!C||!M||C.bgClass!=M.bgClass||C.textClass!=M.textClass),K=0;!O&&Ka)return Fi(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&nn(e,function(){for(var f=0;f=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Pu(e)==0)return!1;Yu(e)&&(rr(e),r.dims=ms(e));var l=o.first+o.size,f=Math.max(r.visible.from-e.options.viewportMargin,o.first),v=Math.min(l,r.visible.to+e.options.viewportMargin);a.viewFromv&&a.viewTo-v<20&&(v=Math.min(l,a.viewTo)),Wn&&(f=rs(e.doc,f),v=hu(e.doc,v));var k=f!=a.viewFrom||v!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;Cb(e,f,v),a.viewOffset=$n(ke(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var x=Pu(e);if(!k&&x==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var C=Nb(e);return x>4&&(a.lineDiv.style.display="none"),jb(e,a.updateLineNumbers,r.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Bb(C),P(a.cursorDiv),P(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,k&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,Fi(e,400)),a.updateLineNumbers=null,!0}function Ku(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+ss(e.display)-ls(e),a.top)}),r.visible=Ro(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Ro(e.display,e.doc,a));if(!xs(e,r))break;Po(e);var l=Li(e);Di(e),Ur(e,l),Ss(e,l),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _s(e,r){var a=new No(e,r);if(xs(e,a)){Po(e),Ku(e,a);var o=Li(e);Di(e),Ur(e,o),Ss(e,o),a.finish()}}function jb(e,r,a){var o=e.display,l=e.options.lineNumbers,f=o.lineDiv,v=f.firstChild;function k(ne){var oe=ne.nextSibling;return p&&A&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),oe}for(var x=o.view,C=o.viewFrom,M=0;M-1&&($=!1),vu(e,O,C,a)),$&&(P(O.lineNumber),O.lineNumber.appendChild(document.createTextNode(re(e.options,C)))),v=O.node.nextSibling}C+=O.size}for(;v;)v=k(v)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ss(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Fn(e)+"px"}function Vu(e){var r=e.display,a=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=gs(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,f=o+"px",v=0;vv.clientWidth,x=v.scrollHeight>v.clientHeight;if(!(o&&k||l&&x))return;if(l&&A&&p){e:for(var C=r.target,M=f.view;C!=v;C=C.parentNode)for(var O=0;O=0&&he(e,o.to())<=0)return a}return-1};var Ye=function(e,r){this.anchor=e,this.head=r};Ye.prototype.from=function(){return Yt(this.anchor,this.head)},Ye.prototype.to=function(){return St(this.anchor,this.head)},Ye.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wn(e,r,a){var o=e&&e.options.selectionsMayTouch,l=r[a];r.sort(function(K,$){return he(K.from(),$.from())}),a=ie(r,l);for(var f=1;f0:x>=0){var C=Yt(k.from(),v.from()),M=St(k.to(),v.to()),O=k.empty()?v.from()==v.head:k.from()==k.head;f<=a&&--a,r.splice(--f,2,new Ye(O?M:C,O?C:M))}}return new sn(r,a)}function ir(e,r){return new sn([new Ye(e,r||e)],0)}function or(e){return e.text?W(e.from.line+e.text.length-1,xe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ju(e,r){if(he(e,r.from)<0)return e;if(he(e,r.to)<=0)return or(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=or(r).ch-r.to.ch),W(a,o)}function Ds(e,r){for(var a=[],o=0;o1&&e.remove(k.line+1,ne-1),e.insert(k.line+1,fe)}Rt(e,"change",e,r)}function ar(e,r,a){function o(l,f,v){if(l.linked)for(var k=0;k1&&!e.done[e.done.length-2].ranges)return e.done.pop(),xe(e.done)}function oc(e,r,a,o){var l=e.history;l.undone.length=0;var f=+new Date,v,k;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>f-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(v=Gb(l,l.lastOp==o)))k=xe(v.changes),he(r.from,r.to)==0&&he(r.from,k.to)==0?k.to=or(r):v.changes.push(Ls(e,r));else{var x=xe(l.done);for((!x||!x.ranges)&&Ho(e.sel,l.done),v={changes:[Ls(e,r)],generation:l.generation},l.done.push(v);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(a),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=f,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,k||ct(e,"historyAdded")}function Kb(e,r,a,o){var l=r.charAt(0);return l=="*"||l=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Vb(e,r,a,o){var l=e.history,f=o&&o.origin;a==l.lastSelOp||f&&l.lastSelOrigin==f&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==f||Kb(e,f,xe(l.done),r))?l.done[l.done.length-1]=r:Ho(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=f,l.lastSelOp=a,o&&o.clearRedo!==!1&&ic(l.undone)}function Ho(e,r){var a=xe(r);a&&a.ranges&&a.equals(e)||r.push(e)}function ac(e,r,a,o){var l=r["spans_"+e.id],f=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(v){v.markedSpans&&((l||(l=r["spans_"+e.id]={}))[f]=v.markedSpans),++f})}function Yb(e){if(!e)return null;for(var r,a=0;a-1&&(xe(k)[O]=C[O],delete C[O]))}}return o}function Is(e,r,a,o){if(o){var l=e.anchor;if(a){var f=he(r,l)<0;f!=he(a,l)<0?(l=r,r=a):f!=he(r,a)<0&&(r=a)}return new Ye(l,r)}else return new Ye(a||r,r)}function Uo(e,r,a,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),jt(e,new sn([Is(e.sel.primary(),r,a,l)],0),o)}function lc(e,r,a){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),f=0;f=r.ch:k.to>r.ch))){if(l&&(ct(x,"beforeCursorEnter"),x.explicitlyCleared))if(f.markedSpans){--v;continue}else break;if(!x.atomic)continue;if(a){var O=x.find(o<0?1:-1),K=void 0;if((o<0?M:C)&&(O=pc(e,O,-o,O&&O.line==r.line?f:null)),O&&O.line==r.line&&(K=he(O,a))&&(o<0?K<0:K>0))return $r(e,O,r,o,l)}var $=x.find(o<0?-1:1);return(o<0?C:M)&&($=pc(e,$,o,$.line==r.line?f:null)),$?$r(e,$,r,o,l):null}}return r}function $o(e,r,a,o,l){var f=o||1,v=$r(e,r,a,f,l)||!l&&$r(e,r,a,f,!0)||$r(e,r,a,-f,l)||!l&&$r(e,r,a,-f,!0);return v||(e.cantEdit=!0,W(e.first,0))}function pc(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?Me(e,W(r.line-1)):null:a>0&&r.ch==(o||ke(e,r.line)).text.length?r.line=0;--l)vc(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else vc(e,r)}function vc(e,r){if(r.text.length==1&&r.text[0]==""&&he(r.from,r.to)==0)return;var a=Ds(e,r);oc(e,r,a,e.cm?e.cm.curOp.id:NaN),zi(e,r,a,ts(e,r));var o=[];ar(e,function(l,f){!f&&ie(o,l.history)==-1&&(kc(l.history,r),o.push(l.history)),zi(l,r,null,ts(l,r))})}function Go(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!a)return;for(var l=e.history,f,v=e.sel,k=r=="undo"?l.done:l.undone,x=r=="undo"?l.undone:l.done,C=0;C=0;--$){var ne=K($);if(ne)return ne.v}}function bc(e,r){if(r==0)return;if(e.first+=r,e.sel=new sn(tt(e.sel.ranges,function(l){return new Ye(W(l.anchor.line+r,l.anchor.ch),W(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm){Xt(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;oe.lastLine())return;if(r.from.linef&&(r={from:r.from,to:W(f,ke(e,f).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Tn(e,r.from,r.to),a||(a=Ds(e,r)),e.cm?Qb(e.cm,r,o):Ts(e,r,o),Wo(e,a,be),e.cantEdit&&$o(e,W(e.firstLine(),0))&&(e.cantEdit=!1)}function Qb(e,r,a){var o=e.doc,l=e.display,f=r.from,v=r.to,k=!1,x=f.line;e.options.lineWrapping||(x=Ke(In(ke(o,f.line))),o.iter(x,v.line+1,function($){if($==l.maxLine)return k=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Lr(e),Ts(o,r,a,zu(e)),e.options.lineWrapping||(o.iter(x,f.line+r.text.length,function($){var ne=Lo($);ne>l.maxLineLength&&(l.maxLine=$,l.maxLineLength=ne,l.maxLineChanged=!0,k=!1)}),k&&(e.curOp.updateMaxLine=!0)),jv(o,f.line),Fi(e,400);var C=r.text.length-(v.line-f.line)-1;r.full?Xt(e):f.line==v.line&&r.text.length==1&&!tc(e.doc,r)?nr(e,f.line,"text"):Xt(e,f.line,v.line+1,C);var M=yt(e,"changes"),O=yt(e,"change");if(O||M){var K={from:f,to:v,text:r.text,removed:r.removed,origin:r.origin};O&&Rt(e,"change",e,K),M&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(K)}e.display.selForContextMenu=null}function Kr(e,r,a,o,l){var f;o||(o=a),he(o,a)<0&&(f=[o,a],a=f[0],o=f[1]),typeof r=="string"&&(r=e.splitLines(r)),Gr(e,{from:a,to:o,text:r,origin:l})}function yc(e,r,a,o){a1||!(this.children[0]instanceof Ri))){var k=[];this.collapse(k),this.children=[new Ri(k)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var v=l.lines.length%25+25,k=v;k10);e.parent.maybeSpill()},iterN:function(e,r,a){for(var o=0;oe.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=M,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Xt(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&hc(e.doc)),e&&Rt(e,"markerCleared",e,this,o,l),r&&kr(e),this.parent&&this.parent.clear()},sr.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,l=0;l0||v==0&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=V("span",[f.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(du(e,r.line,r,a,f)||r.line!=a.line&&du(e,a.line,r,a,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Uv()}f.addToHistory&&oc(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var k=r.line,x=e.cm,C;if(e.iter(k,a.line+1,function(O){x&&f.collapsed&&!x.options.lineWrapping&&In(O)==x.display.maxLine&&(C=!0),f.collapsed&&k!=r.line&&pn(O,0),$v(O,new Eo(f,k==r.line?r.ch:null,k==a.line?a.ch:null)),++k}),f.collapsed&&e.iter(r.line,a.line+1,function(O){tr(e,O)&&pn(O,0)}),f.clearOnEnter&&De(f,"beforeCursorEnter",function(){return f.clear()}),f.readOnly&&(Hv(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),f.collapsed&&(f.id=++_c,f.atomic=!0),x){if(C&&(x.curOp.updateMaxLine=!0),f.collapsed)Xt(x,r.line,a.line+1);else if(f.className||f.startStyle||f.endStyle||f.css||f.attributes||f.title)for(var M=r.line;M<=a.line;M++)nr(x,M,"text");f.atomic&&hc(x.doc),Rt(x,"markerAdded",x,f)}return f}var Bi=function(e,r){this.markers=e,this.primary=r;for(var a=0;a=0;x--)Gr(this,o[x]);k?cc(this,k):this.cm&&Hr(this.cm)}),undo:It(function(){Go(this,"undo")}),redo:It(function(){Go(this,"redo")}),undoSelection:It(function(){Go(this,"undo",!0)}),redoSelection:It(function(){Go(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o=e.ch)&&r.push(l.marker.parent||l.marker)}return r},findMarks:function(e,r,a){e=Me(this,e),r=Me(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(f){var v=f.markedSpans;if(v)for(var k=0;k=x.to||x.from==null&&l!=e.line||x.from!=null&&l==r.line&&x.from>=r.ch)&&(!a||a(x.marker))&&o.push(x.marker.parent||x.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;oe)return r=e,!0;e-=f,++a}),Me(this,W(a,r))},indexFromPos:function(e){e=Me(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var M=e.dataTransfer.getData("Text");if(M){var O;if(r.state.draggingText&&!r.state.draggingText.copy&&(O=r.listSelections()),Wo(r.doc,ir(a,a)),O)for(var K=0;K=0;k--)Kr(e.doc,"",o[k].from,o[k].to,"+delete");Hr(e)})}function Ms(e,r,a){var o=Ee(e.text,r+a,a);return o<0||o>e.text.length?null:o}function qs(e,r,a){var o=Ms(e,r.ch,a);return o==null?null:new W(r.line,o,a<0?"after":"before")}function zs(e,r,a,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var f=Pt(a,r.doc.direction);if(f){var v=l<0?xe(f):f[0],k=l<0==(v.level==1),x=k?"after":"before",C;if(v.level>0||r.doc.direction=="rtl"){var M=Or(r,a);C=l<0?a.text.length-1:0;var O=Mn(r,M,C).top;C=Le(function(K){return Mn(r,M,K).top==O},l<0==(v.level==1)?v.from:v.to-1,C),x=="before"&&(C=Ms(a,C,1))}else C=l<0?v.to:v.from;return new W(o,C,x)}}return new W(o,l<0?a.text.length:0,l<0?"before":"after")}function hy(e,r,a,o){var l=Pt(r,e.doc.direction);if(!l)return qs(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var f=Ve(l,a.ch,a.sticky),v=l[f];if(e.doc.direction=="ltr"&&v.level%2==0&&(o>0?v.to>a.ch:v.from=v.from&&K>=M.begin)){var $=O?"before":"after";return new W(a.line,K,$)}}var ne=function(fe,ge,pe){for(var ve=function(rt,Ft){return Ft?new W(a.line,k(rt,1),"before"):new W(a.line,rt,"after")};fe>=0&&fe0==(Ae.level!=1),Pe=Se?pe.begin:k(pe.end,-1);if(Ae.from<=Pe&&Pe0?M.end:k(M.begin,-1);return ue!=null&&!(o>0&&ue==r.text.length)&&(oe=ne(o>0?0:l.length-1,o,C(ue)),oe)?oe:null}var Ui={selectAll:mc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),be)},killLine:function(e){return Xr(e,function(r){if(r.empty()){var a=ke(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line0)l=new W(l.line,l.ch+1),e.replaceRange(f.charAt(l.ch-1)+f.charAt(l.ch-2),W(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var v=ke(e.doc,l.line-1).text;v&&(l=new W(l.line,1),e.replaceRange(f.charAt(0)+e.doc.lineSeparator()+v.charAt(v.length-1),W(l.line-1,v.length-1),l,"+transpose"))}}a.push(new Ye(l,l))}e.setSelections(a)})},newlineAndIndent:function(e){return nn(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;oe&&he(r,this.pos)==0&&a==this.button};var $i,Gi;function yy(e,r){var a=+new Date;return Gi&&Gi.compare(a,e,r)?($i=Gi=null,"triple"):$i&&$i.compare(a,e,r)?(Gi=new Rs(a,e,r),$i=null,"double"):($i=new Rs(a,e,r),Gi=null,"single")}function Nc(e){var r=this,a=r.display;if(at(r,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){p||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Os(r,e))return;var o=gr(r,e),l=ko(e),f=o?yy(o,l):"single";if(window.focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),o&&wy(r,l,o,f,e))return;l==1?o?xy(r,o,f,e):Ir(e)==a.scroller&&Ct(e):l==2?(o&&Uo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):l==3&&(G?r.display.input.onContextMenu(e):Bu(r))}function wy(e,r,a,o,l){var f="Click";return o=="double"?f="Double"+f:o=="triple"&&(f="Triple"+f),f=(r==1?"Left":r==2?"Middle":"Right")+f,Wi(e,Lc(f,l),l,function(v){if(typeof v=="string"&&(v=Ui[v]),!v)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=v(e,a)!=ze}finally{e.state.suppressEdits=!1}return k})}function ky(e,r,a){var o=e.getOption("configureMouse"),l=o?o(e,r,a):{};if(l.unit==null){var f=R?a.shiftKey&&a.metaKey:a.altKey;l.unit=f?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||a.shiftKey),l.addNew==null&&(l.addNew=A?a.metaKey:a.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(A?a.altKey:a.ctrlKey)),l}function xy(e,r,a,o){d?setTimeout(F(Nu,e),0):e.curOp.focus=q();var l=ky(e,a,o),f=e.doc.sel,v;e.options.dragDrop&&En&&!e.isReadOnly()&&a=="single"&&(v=f.contains(r))>-1&&(he((v=f.ranges[v]).from(),r)<0||r.xRel>0)&&(he(v.to(),r)>0||r.xRel<0)?_y(e,o,r,l):Cy(e,o,r,l)}function _y(e,r,a,o){var l=e.display,f=!1,v=Lt(e,function(C){p&&(l.scroller.draggable=!1),e.state.draggingText=!1,Re(l.wrapper.ownerDocument,"mouseup",v),Re(l.wrapper.ownerDocument,"mousemove",k),Re(l.scroller,"dragstart",x),Re(l.scroller,"drop",v),f||(Ct(C),o.addNew||Uo(e.doc,a,null,null,o.extend),p&&!b||d&&h==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),k=function(C){f=f||Math.abs(r.clientX-C.clientX)+Math.abs(r.clientY-C.clientY)>=10},x=function(){return f=!0};p&&(l.scroller.draggable=!0),e.state.draggingText=v,v.copy=!o.moveOnDrag,l.scroller.dragDrop&&l.scroller.dragDrop(),De(l.wrapper.ownerDocument,"mouseup",v),De(l.wrapper.ownerDocument,"mousemove",k),De(l.scroller,"dragstart",x),De(l.scroller,"drop",v),Bu(e),setTimeout(function(){return l.input.focus()},20)}function Bc(e,r,a){if(a=="char")return new Ye(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Ye(W(r.line,0),Me(e.doc,W(r.line+1,0)));var o=a(e,r);return new Ye(o.from,o.to)}function Cy(e,r,a,o){var l=e.display,f=e.doc;Ct(r);var v,k,x=f.sel,C=x.ranges;if(o.addNew&&!o.extend?(k=f.sel.contains(a),k>-1?v=C[k]:v=new Ye(a,a)):(v=f.sel.primary(),k=f.sel.primIndex),o.unit=="rectangle")o.addNew||(v=new Ye(a,a)),a=gr(e,r,!0,!0),k=-1;else{var M=Bc(e,a,o.unit);o.extend?v=Is(v,M.anchor,M.head,o.extend):v=M}o.addNew?k==-1?(k=C.length,jt(f,wn(e,C.concat([v]),k),{scroll:!1,origin:"*mouse"})):C.length>1&&C[k].empty()&&o.unit=="char"&&!o.extend?(jt(f,wn(e,C.slice(0,k).concat(C.slice(k+1)),0),{scroll:!1,origin:"*mouse"}),x=f.sel):Fs(f,k,v,we):(k=0,jt(f,new sn([v],0),we),x=f.sel);var O=a;function K(pe){if(he(O,pe)==0)return;if(O=pe,o.unit=="rectangle"){for(var ve=[],Ae=e.options.tabSize,Se=ce(ke(f,a.line).text,a.ch,Ae),Pe=ce(ke(f,pe.line).text,pe.ch,Ae),rt=Math.min(Se,Pe),Ft=Math.max(Se,Pe),ut=Math.min(a.line,pe.line),rn=Math.min(e.lastLine(),Math.max(a.line,pe.line));ut<=rn;ut++){var Qt=ke(f,ut).text,wt=Ge(Qt,rt,Ae);rt==Ft?ve.push(new Ye(W(ut,wt),W(ut,wt))):Qt.length>wt&&ve.push(new Ye(W(ut,wt),W(ut,Ge(Qt,Ft,Ae))))}ve.length||ve.push(new Ye(a,a)),jt(f,wn(e,x.ranges.slice(0,k).concat(ve),k),{origin:"*mouse",scroll:!1}),e.scrollIntoView(pe)}else{var Jt=v,Ot=Bc(e,pe,o.unit),Et=Jt.anchor,kt;he(Ot.anchor,Et)>0?(kt=Ot.head,Et=Yt(Jt.from(),Ot.anchor)):(kt=Ot.anchor,Et=St(Jt.to(),Ot.head));var dt=x.ranges.slice(0);dt[k]=Sy(e,new Ye(Me(f,Et),kt)),jt(f,wn(e,dt,k),we)}}var $=l.wrapper.getBoundingClientRect(),ne=0;function oe(pe){var ve=++ne,Ae=gr(e,pe,!0,o.unit=="rectangle");if(!Ae)return;if(he(Ae,O)!=0){e.curOp.focus=q(),K(Ae);var Se=Ro(l,f);(Ae.line>=Se.to||Ae.line$.bottom?20:0;Pe&&setTimeout(Lt(e,function(){if(ne!=ve)return;l.scroller.scrollTop+=Pe,oe(pe)}),50)}}function ue(pe){e.state.selectingText=!1,ne=Infinity,pe&&(Ct(pe),l.input.focus()),Re(l.wrapper.ownerDocument,"mousemove",fe),Re(l.wrapper.ownerDocument,"mouseup",ge),f.history.lastSelOrigin=null}var fe=Lt(e,function(pe){pe.buttons===0||!ko(pe)?ue(pe):oe(pe)}),ge=Lt(e,ue);e.state.selectingText=ge,De(l.wrapper.ownerDocument,"mousemove",fe),De(l.wrapper.ownerDocument,"mouseup",ge)}function Sy(e,r){var a=r.anchor,o=r.head,l=ke(e.doc,a.line);if(he(a,o)==0&&a.sticky==o.sticky)return r;var f=Pt(l);if(!f)return r;var v=Ve(f,a.ch,a.sticky),k=f[v];if(k.from!=a.ch&&k.to!=a.ch)return r;var x=v+(k.from==a.ch==(k.level!=1)?0:1);if(x==0||x==f.length)return r;var C;if(o.line!=a.line)C=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var M=Ve(f,o.ch,o.sticky),O=M-v||(o.ch-a.ch)*(k.level==1?-1:1);M==x-1||M==x?C=O<0:C=O>0}var K=f[x+(C?-1:0)],$=C==(K.level==1),ne=$?K.from:K.to,oe=$?"after":"before";return a.ch==ne&&a.sticky==oe?r:new Ye(new W(a.line,ne,oe),o)}function jc(e,r,a,o){var l,f;if(r.touches)l=r.touches[0].clientX,f=r.touches[0].clientY;else try{l=r.clientX,f=r.clientY}catch(K){return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&Ct(r);var v=e.display,k=v.lineDiv.getBoundingClientRect();if(f>k.bottom||!yt(e,a))return fr(r);f-=k.top-v.viewOffset;for(var x=0;x=l){var M=L(e.doc,f),O=e.display.gutterSpecs[x];return ct(e,a,e,M,O.className,r),fr(r)}}}function Os(e,r){return jc(e,r,"gutterClick",!0)}function Hc(e,r){if(Gn(e.display,r)||Ey(e,r))return;if(at(e,r,"contextmenu"))return;G||e.display.input.onContextMenu(r)}function Ey(e,r){return yt(e,"gutterContextMenu")?jc(e,r,"gutterContextMenu",!1):!1}function Uc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Zr={toString:function(){return"CodeMirror.Init"}},Wc={},Xo={};function Dy(e){var r=e.optionHandlers;function a(o,l,f,v){e.defaults[o]=l,f&&(r[o]=v?function(k,x,C){C!=Zr&&f(k,x,C)}:f)}e.defineOption=a,e.Init=Zr,a("value","",function(o,l){return o.setValue(l)},!0),a("mode",null,function(o,l){o.doc.modeOption=l,As(o)},!0),a("indentUnit",2,As,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){qi(o),Ei(o),Xt(o)},!0),a("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!l)return;var f=[],v=o.doc.first;o.doc.iter(function(x){for(var C=0;;){var M=x.text.indexOf(l,C);if(M==-1)break;C=M+l.length,f.push(W(v,M))}v++});for(var k=f.length-1;k>=0;k--)Kr(o.doc,l,f[k],W(f[k].line,f[k].ch+l.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,l,f){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),f!=Zr&&o.refresh()}),a("specialCharPlaceholder",nb,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),a("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),a("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),a("rtlMoveVisually",!U),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){Uc(o),Mi(o)},!0),a("keyMap","default",function(o,l,f){var v=Vo(l),k=f!=Zr&&Vo(f);k&&k.detach&&k.detach(o,v),v.attach&&v.attach(o,k||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Ty,!0),a("gutters",[],function(o,l){o.display.gutterSpecs=Es(l,o.options.lineNumbers),Mi(o)},!0),a("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?gs(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return Ur(o)},!0),a("scrollbarStyle","native",function(o){Gu(o),Ur(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,l){o.display.gutterSpecs=Es(o.options.gutters,l),Mi(o)},!0),a("firstLineNumber",1,Mi,!0),a("lineNumberFormatter",function(o){return o},Mi,!0),a("showCursorWhenSelecting",!1,Di,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,l){l=="nocursor"&&(jr(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),a("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),a("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),a("dragDrop",!0,Ay),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Di,!0),a("singleCursorHeightPerLine",!0,Di,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qi,!0),a("addModeClass",!1,qi,!0),a("pollInterval",100),a("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,qi,!0),a("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),a("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),a("autofocus",null),a("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),a("phrases",null)}function Ay(e,r,a){var o=a&&a!=Zr;if(!r!=!o){var l=e.display.dragFunctions,f=r?De:Re;f(e.display.scroller,"dragstart",l.start),f(e.display.scroller,"dragenter",l.enter),f(e.display.scroller,"dragover",l.over),f(e.display.scroller,"dragleave",l.leave),f(e.display.scroller,"drop",l.drop)}}function Ty(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(J(e.display.wrapper,"CodeMirror-wrap"),os(e)),vs(e),Xt(e),Ei(e),setTimeout(function(){return Ur(e)},100)}function lt(e,r){var a=this;if(!(this instanceof lt))return new lt(e,r);this.options=r=r?T(r):{},T(Wc,r,!1);var o=r.value;typeof o=="string"?o=new Zt(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new lt.inputStyles[r.inputStyle](this),f=this.display=new Hb(e,o,l,r);f.wrapper.CodeMirror=this,Uc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new de,keySeq:null,specialChars:null},r.autofocus&&!z&&f.input.focus(),d&&h<11&&setTimeout(function(){return a.display.input.reset(!0)},20),Ly(this),sy(),wr(this),this.curOp.forceUpdate=!0,nc(this,o),r.autofocus&&!z||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ys(a)},20):jr(this);for(var v in Xo)Xo.hasOwnProperty(v)&&Xo[v](this,r[v],Zr);Yu(this),r.finishInit&&r.finishInit(this);for(var k=0;k20*20}De(r.scroller,"touchstart",function(x){if(!at(e,x)&&!f(x)&&!Os(e,x)){r.input.ensurePolled(),clearTimeout(a);var C=+new Date;r.activeTouch={start:C,moved:!1,prev:C-o.end<=300?o:null},x.touches.length==1&&(r.activeTouch.left=x.touches[0].pageX,r.activeTouch.top=x.touches[0].pageY)}}),De(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),De(r.scroller,"touchend",function(x){var C=r.activeTouch;if(C&&!Gn(r,x)&&C.left!=null&&!C.moved&&new Date-C.start<300){var M=e.coordsChar(r.activeTouch,"page"),O;!C.prev||v(C,C.prev)?O=new Ye(M,M):!C.prev.prev||v(C,C.prev.prev)?O=e.findWordAt(M):O=new Ye(W(M.line,0),Me(e.doc,W(M.line+1,0))),e.setSelection(O.anchor,O.head),e.focus(),Ct(x)}l()}),De(r.scroller,"touchcancel",l),De(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ti(e,r.scroller.scrollTop),br(e,r.scroller.scrollLeft,!0),ct(e,"scroll",e))}),De(r.scroller,"mousewheel",function(x){return Qu(e,x)}),De(r.scroller,"DOMMouseScroll",function(x){return Qu(e,x)}),De(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(x){at(e,x)||Bt(x)},over:function(x){at(e,x)||(ay(e,x),Bt(x))},start:function(x){return oy(e,x)},drop:Lt(e,iy),leave:function(x){at(e,x)||Ec(e)}};var k=r.input.getField();De(k,"keyup",function(x){return Rc.call(e,x)}),De(k,"keydown",Lt(e,Pc)),De(k,"keypress",Lt(e,Oc)),De(k,"focus",function(x){return ys(e,x)}),De(k,"blur",function(x){return jr(e,x)})}var Ns=[];lt.defineInitHook=function(e){return Ns.push(e)};function Ki(e,r,a,o){var l=e.doc,f;a==null&&(a="add"),a=="smart"&&(l.mode.indent?f=ki(e,r).state:a="prev");var v=e.options.tabSize,k=ke(l,r),x=ce(k.text,null,v);k.stateAfter&&(k.stateAfter=null);var C=k.text.match(/^\s*/)[0],M;if(!o&&!/\S/.test(k.text))M=0,a="not";else if(a=="smart"&&(M=l.mode.indent(f,k.text.slice(C.length),k.text),M==ze||M>150)){if(!o)return;a="prev"}a=="prev"?r>l.first?M=ce(ke(l,r-1).text,null,v):M=0:a=="add"?M=x+e.options.indentUnit:a=="subtract"?M=x-e.options.indentUnit:typeof a=="number"&&(M=x+a),M=Math.max(0,M);var O="",K=0;if(e.options.indentWithTabs)for(var $=Math.floor(M/v);$;--$)K+=v,O+=" ";if(Kv,x=Dn(r),C=null;if(k&&o.ranges.length>1)if(kn&&kn.text.join(` -`)==r){if(o.ranges.length%kn.text.length==0){C=[];for(var M=0;M=0;K--){var $=o.ranges[K],ne=$.from(),oe=$.to();$.empty()&&(a&&a>0?ne=W(ne.line,ne.ch-a):e.state.overwrite&&!k?oe=W(oe.line,Math.min(ke(f,oe.line).text.length,oe.ch+xe(x).length)):k&&kn&&kn.lineWise&&kn.text.join(` + left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(f),f.scrollIntoView(l),e.display.lineSpace.removeChild(f)}}function Lb(e,r,a,o){o==null&&(o=0);var l;!e.options.lineWrapping&&r==a&&(r=r.ch?W(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?W(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var v=!1,k=yn(e,r),x=!a||a==r?k:yn(e,a);l={left:Math.min(k.left,x.left),top:Math.min(k.top,x.top)-o,right:Math.max(k.left,x.left),bottom:Math.max(k.bottom,x.bottom)+o};var C=ws(e,l),M=e.doc.scrollTop,P=e.doc.scrollLeft;if(C.scrollTop!=null&&(Ti(e,C.scrollTop),Math.abs(e.doc.scrollTop-M)>1&&(v=!0)),C.scrollLeft!=null&&(br(e,C.scrollLeft),Math.abs(e.doc.scrollLeft-P)>1&&(v=!0)),!v)break}return l}function Ib(e,r){var a=ws(e,r);a.scrollTop!=null&&Ti(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Nr(e.display);r.top<0&&(r.top=0);var l=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),v={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.topk-o;if(r.topl+f){var M=Math.min(r.top,(C?k:r.bottom)-f);M!=l&&(v.scrollTop=M)}var P=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,K=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>K;return $&&(r.right=r.left+K),r.left<10?v.scrollLeft=0:r.leftK+P-3&&(v.scrollLeft=r.right+($?0:10)-K),v}function ks(e,r){if(r==null)return;Po(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Hr(e){Po(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Ai(e,r,a){(r!=null||a!=null)&&Po(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Fb(e,r){Po(e),e.curOp.scrollToPos=r}function Po(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Fu(e,r.from),o=Fu(e,r.to);Hu(e,a,o,r.margin)}}function Hu(e,r,a,o){var l=ws(e,{left:Math.min(r.left,a.left),top:Math.min(r.top,a.top)-o,right:Math.max(r.right,a.right),bottom:Math.max(r.bottom,a.bottom)+o});Ai(e,l.scrollLeft,l.scrollTop)}function Ti(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),Uu(e,r,!0),i&&_s(e),Fi(e,100)}function Uu(e,r,a){if(r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),e.display.scroller.scrollTop==r&&!a)return;e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r)}function br(e,r,a,o){if(r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(a?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)return;e.doc.scrollLeft=r,Vu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Li(e){var r=e.display,a=r.gutters.offsetWidth,o=Math.round(e.doc.height+ss(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?a:0,docHeight:o,scrollHeight:o+Fn(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:a}}var yr=function(e,r,a){this.cm=a;var o=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),l=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=l.tabIndex=-1,e(o),e(l),Te(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),Te(l,"scroll",function(){l.clientWidth&&r(l.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,d&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,a=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(a){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var l=e.viewHeight-(r?o:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+l)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(r){this.horiz.style.display="block",this.horiz.style.right=a?o+"px":"0",this.horiz.style.left=e.barLeft+"px";var f=e.viewWidth-e.barLeft-(a?o:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(o==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:a?o:0,bottom:r?o:0}},yr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var e=A&&!w?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},yr.prototype.enableZeroWidthBar=function(e,r,a){e.style.pointerEvents="auto";function o(){var l=e.getBoundingClientRect(),f=a=="vert"?document.elementFromPoint(l.right-1,(l.top+l.bottom)/2):document.elementFromPoint((l.right+l.left)/2,l.bottom-1);f!=e?e.style.pointerEvents="none":r.set(1e3,o)}r.set(1e3,o)},yr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ii=function(){};Ii.prototype.update=function(){return{bottom:0,right:0}},Ii.prototype.setScrollLeft=function(){},Ii.prototype.setScrollTop=function(){},Ii.prototype.clear=function(){};function Ur(e,r){r||(r=Li(e));var a=e.display.barWidth,o=e.display.barHeight;Wu(e,r);for(var l=0;l<4&&a!=e.display.barWidth||o!=e.display.barHeight;l++)a!=e.display.barWidth&&e.options.lineWrapping&&Oo(e),Wu(e,Li(e)),a=e.display.barWidth,o=e.display.barHeight}function Wu(e,r){var a=e.display,o=a.scrollbars.update(r);a.sizer.style.paddingRight=(a.barWidth=o.right)+"px",a.sizer.style.paddingBottom=(a.barHeight=o.bottom)+"px",a.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=o.bottom+"px",a.scrollbarFiller.style.width=o.right+"px"):a.scrollbarFiller.style.display="",o.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(a.gutterFiller.style.display="block",a.gutterFiller.style.height=o.bottom+"px",a.gutterFiller.style.width=r.gutterWidth+"px"):a.gutterFiller.style.display=""}var $u={native:yr,null:Ii};function Gu(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&J(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new $u[e.options.scrollbarStyle](function(r){e.display.wrapper.insertBefore(r,e.display.scrollbarFiller),Te(r,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),r.setAttribute("cm-not-content","true")},function(r,a){a=="horizontal"?br(e,r):Ti(e,r)},e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Mb=0;function wr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Mb},cb(e.curOp)}function kr(e){var r=e.curOp;r&&hb(r,function(a){for(var o=0;o=a.viewTo)||a.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new No(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ob(e){e.updatedDisplay=e.mustUpdate&&xs(e.cm,e.update)}function Rb(e){var r=e.cm,a=r.display;e.updatedDisplay&&Oo(r),e.barMeasure=Li(r),a.maxLineChanged&&!r.options.lineWrapping&&(e.adjustWidthTo=Cu(r,a.maxLine,a.maxLine.text.length).left+3,r.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(a.scroller.clientWidth,a.sizer.offsetLeft+e.adjustWidthTo+Fn(r)+r.display.barWidth),e.maxScrollLeft=Math.max(0,a.sizer.offsetLeft+e.adjustWidthTo-pr(r))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=a.input.prepareSelection())}function Pb(e){var r=e.cm;e.adjustWidthTo!=null&&(r.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft=e.display.viewTo)return;var a=+new Date+e.options.workTime,o=ki(e,r.highlightFrontier),l=[];r.iter(o.line,Math.min(r.first+r.size,e.display.viewTo+500),function(f){if(o.line>=e.display.viewFrom){var v=f.styles,k=f.text.length>e.options.maxHighlightLength?fn(r.mode,o.state):null,x=Ql(e,f,o,!0);k&&(o.state=k),f.styles=x.styles;var C=f.styleClasses,M=x.classes;M?f.styleClasses=M:C&&(f.styleClasses=null);for(var P=!v||v.length!=f.styles.length||C!=M&&(!C||!M||C.bgClass!=M.bgClass||C.textClass!=M.textClass),K=0;!P&&Ka)return Fi(e,e.options.workDelay),!0}),r.highlightFrontier=o.line,r.modeFrontier=Math.max(r.modeFrontier,o.line),l.length&&nn(e,function(){for(var f=0;f=a.viewFrom&&r.visible.to<=a.viewTo&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo)&&a.renderedView==a.view&&Ou(e)==0)return!1;Yu(e)&&(rr(e),r.dims=ms(e));var l=o.first+o.size,f=Math.max(r.visible.from-e.options.viewportMargin,o.first),v=Math.min(l,r.visible.to+e.options.viewportMargin);a.viewFromv&&a.viewTo-v<20&&(v=Math.min(l,a.viewTo)),Wn&&(f=rs(e.doc,f),v=hu(e.doc,v));var k=f!=a.viewFrom||v!=a.viewTo||a.lastWrapHeight!=r.wrapperHeight||a.lastWrapWidth!=r.wrapperWidth;Db(e,f,v),a.viewOffset=$n(_e(e.doc,a.viewFrom)),e.display.mover.style.top=a.viewOffset+"px";var x=Ou(e);if(!k&&x==0&&!r.force&&a.renderedView==a.view&&(a.updateLineNumbers==null||a.updateLineNumbers>=a.viewTo))return!1;var C=Hb(e);return x>4&&(a.lineDiv.style.display="none"),Wb(e,a.updateLineNumbers,r.dims),x>4&&(a.lineDiv.style.display=""),a.renderedView=a.view,Ub(C),O(a.cursorDiv),O(a.selectionDiv),a.gutters.style.height=a.sizer.style.minHeight=0,k&&(a.lastWrapHeight=r.wrapperHeight,a.lastWrapWidth=r.wrapperWidth,Fi(e,400)),a.updateLineNumbers=null,!0}function Ku(e,r){for(var a=r.viewport,o=!0;;o=!1){if(!o||!e.options.lineWrapping||r.oldDisplayWidth==pr(e)){if(a&&a.top!=null&&(a={top:Math.min(e.doc.height+ss(e.display)-ls(e),a.top)}),r.visible=Ro(e.display,e.doc,a),r.visible.from>=e.display.viewFrom&&r.visible.to<=e.display.viewTo)break}else o&&(r.visible=Ro(e.display,e.doc,a));if(!xs(e,r))break;Oo(e);var l=Li(e);Di(e),Ur(e,l),Ss(e,l),r.force=!1}r.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(r.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function _s(e,r){var a=new No(e,r);if(xs(e,a)){Oo(e),Ku(e,a);var o=Li(e);Di(e),Ur(e,o),Ss(e,o),a.finish()}}function Wb(e,r,a){var o=e.display,l=e.options.lineNumbers,f=o.lineDiv,v=f.firstChild;function k(ne){var ae=ne.nextSibling;return p&&A&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),ae}for(var x=o.view,C=o.viewFrom,M=0;M-1&&($=!1),vu(e,P,C,a)),$&&(O(P.lineNumber),P.lineNumber.appendChild(document.createTextNode(ie(e.options,C)))),v=P.node.nextSibling}C+=P.size}for(;v;)v=k(v)}function Cs(e){var r=e.gutters.offsetWidth;e.sizer.style.marginLeft=r+"px"}function Ss(e,r){e.display.sizer.style.minHeight=r.docHeight+"px",e.display.heightForcer.style.top=r.docHeight+"px",e.display.gutters.style.height=r.docHeight+e.display.barHeight+Fn(e)+"px"}function Vu(e){var r=e.display,a=r.view;if(!r.alignWidgets&&(!r.gutters.firstChild||!e.options.fixedGutter))return;for(var o=gs(r)-r.scroller.scrollLeft+e.doc.scrollLeft,l=r.gutters.offsetWidth,f=o+"px",v=0;vv.clientWidth,x=v.scrollHeight>v.clientHeight;if(!(o&&k||l&&x))return;if(l&&A&&p){e:for(var C=r.target,M=f.view;C!=v;C=C.parentNode)for(var P=0;P=0&&fe(e,o.to())<=0)return a}return-1};var Xe=function(e,r){this.anchor=e,this.head=r};Xe.prototype.from=function(){return Yt(this.anchor,this.head)},Xe.prototype.to=function(){return Et(this.anchor,this.head)},Xe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wn(e,r,a){var o=e&&e.options.selectionsMayTouch,l=r[a];r.sort(function(K,$){return fe(K.from(),$.from())}),a=oe(r,l);for(var f=1;f0:x>=0){var C=Yt(k.from(),v.from()),M=Et(k.to(),v.to()),P=k.empty()?v.from()==v.head:k.from()==k.head;f<=a&&--a,r.splice(--f,2,new Xe(P?M:C,P?C:M))}}return new sn(r,a)}function ir(e,r){return new sn([new Xe(e,r||e)],0)}function or(e){return e.text?W(e.from.line+e.text.length-1,Ce(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ju(e,r){if(fe(e,r.from)<0)return e;if(fe(e,r.to)<=0)return or(r);var a=e.line+r.text.length-(r.to.line-r.from.line)-1,o=e.ch;return e.line==r.to.line&&(o+=or(r).ch-r.to.ch),W(a,o)}function Ds(e,r){for(var a=[],o=0;o1&&e.remove(k.line+1,ne-1),e.insert(k.line+1,pe)}Rt(e,"change",e,r)}function ar(e,r,a){function o(l,f,v){if(l.linked)for(var k=0;k1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Ce(e.done)}function oc(e,r,a,o){var l=e.history;l.undone.length=0;var f=+new Date,v,k;if((l.lastOp==o||l.lastOrigin==r.origin&&r.origin&&(r.origin.charAt(0)=="+"&&l.lastModTime>f-(e.cm?e.cm.options.historyEventDelay:500)||r.origin.charAt(0)=="*"))&&(v=Yb(l,l.lastOp==o)))k=Ce(v.changes),fe(r.from,r.to)==0&&fe(r.from,k.to)==0?k.to=or(r):v.changes.push(Ls(e,r));else{var x=Ce(l.done);for((!x||!x.ranges)&&Ho(e.sel,l.done),v={changes:[Ls(e,r)],generation:l.generation},l.done.push(v);l.done.length>l.undoDepth;)l.done.shift(),l.done[0].ranges||l.done.shift()}l.done.push(a),l.generation=++l.maxGeneration,l.lastModTime=l.lastSelTime=f,l.lastOp=l.lastSelOp=o,l.lastOrigin=l.lastSelOrigin=r.origin,k||dt(e,"historyAdded")}function Xb(e,r,a,o){var l=r.charAt(0);return l=="*"||l=="+"&&a.ranges.length==o.ranges.length&&a.somethingSelected()==o.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Zb(e,r,a,o){var l=e.history,f=o&&o.origin;a==l.lastSelOp||f&&l.lastSelOrigin==f&&(l.lastModTime==l.lastSelTime&&l.lastOrigin==f||Xb(e,f,Ce(l.done),r))?l.done[l.done.length-1]=r:Ho(r,l.done),l.lastSelTime=+new Date,l.lastSelOrigin=f,l.lastSelOp=a,o&&o.clearRedo!==!1&&ic(l.undone)}function Ho(e,r){var a=Ce(r);a&&a.ranges&&a.equals(e)||r.push(e)}function ac(e,r,a,o){var l=r["spans_"+e.id],f=0;e.iter(Math.max(e.first,a),Math.min(e.first+e.size,o),function(v){v.markedSpans&&((l||(l=r["spans_"+e.id]={}))[f]=v.markedSpans),++f})}function Qb(e){if(!e)return null;for(var r,a=0;a-1&&(Ce(k)[P]=C[P],delete C[P]))}}return o}function Is(e,r,a,o){if(o){var l=e.anchor;if(a){var f=fe(r,l)<0;f!=fe(a,l)<0?(l=r,r=a):f!=fe(r,a)<0&&(r=a)}return new Xe(l,r)}else return new Xe(a||r,r)}function Uo(e,r,a,o,l){l==null&&(l=e.cm&&(e.cm.display.shift||e.extend)),jt(e,new sn([Is(e.sel.primary(),r,a,l)],0),o)}function lc(e,r,a){for(var o=[],l=e.cm&&(e.cm.display.shift||e.extend),f=0;f=r.ch:k.to>r.ch))){if(l&&(dt(x,"beforeCursorEnter"),x.explicitlyCleared))if(f.markedSpans){--v;continue}else break;if(!x.atomic)continue;if(a){var P=x.find(o<0?1:-1),K=void 0;if((o<0?M:C)&&(P=pc(e,P,-o,P&&P.line==r.line?f:null)),P&&P.line==r.line&&(K=fe(P,a))&&(o<0?K<0:K>0))return $r(e,P,r,o,l)}var $=x.find(o<0?-1:1);return(o<0?C:M)&&($=pc(e,$,o,$.line==r.line?f:null)),$?$r(e,$,r,o,l):null}}return r}function $o(e,r,a,o,l){var f=o||1,v=$r(e,r,a,f,l)||!l&&$r(e,r,a,f,!0)||$r(e,r,a,-f,l)||!l&&$r(e,r,a,-f,!0);return v||(e.cantEdit=!0,W(e.first,0))}function pc(e,r,a,o){return a<0&&r.ch==0?r.line>e.first?ze(e,W(r.line-1)):null:a>0&&r.ch==(o||_e(e,r.line)).text.length?r.line=0;--l)vc(e,{from:o[l].from,to:o[l].to,text:l?[""]:r.text,origin:r.origin});else vc(e,r)}function vc(e,r){if(r.text.length==1&&r.text[0]==""&&fe(r.from,r.to)==0)return;var a=Ds(e,r);oc(e,r,a,e.cm?e.cm.curOp.id:NaN),zi(e,r,a,ts(e,r));var o=[];ar(e,function(l,f){!f&&oe(o,l.history)==-1&&(kc(l.history,r),o.push(l.history)),zi(l,r,null,ts(l,r))})}function Go(e,r,a){var o=e.cm&&e.cm.state.suppressEdits;if(o&&!a)return;for(var l=e.history,f,v=e.sel,k=r=="undo"?l.done:l.undone,x=r=="undo"?l.undone:l.done,C=0;C=0;--$){var ne=K($);if(ne)return ne.v}}function bc(e,r){if(r==0)return;if(e.first+=r,e.sel=new sn(nt(e.sel.ranges,function(l){return new Xe(W(l.anchor.line+r,l.anchor.ch),W(l.head.line+r,l.head.ch))}),e.sel.primIndex),e.cm){Xt(e.cm,e.first,e.first-r,r);for(var a=e.cm.display,o=a.viewFrom;oe.lastLine())return;if(r.from.linef&&(r={from:r.from,to:W(f,_e(e,f).text.length),text:[r.text[0]],origin:r.origin}),r.removed=Tn(e,r.from,r.to),a||(a=Ds(e,r)),e.cm?ty(e.cm,r,o):Ts(e,r,o),Wo(e,a,ye),e.cantEdit&&$o(e,W(e.firstLine(),0))&&(e.cantEdit=!1)}function ty(e,r,a){var o=e.doc,l=e.display,f=r.from,v=r.to,k=!1,x=f.line;e.options.lineWrapping||(x=Ve(In(_e(o,f.line))),o.iter(x,v.line+1,function($){if($==l.maxLine)return k=!0,!0})),o.sel.contains(r.from,r.to)>-1&&Lr(e),Ts(o,r,a,zu(e)),e.options.lineWrapping||(o.iter(x,f.line+r.text.length,function($){var ne=Lo($);ne>l.maxLineLength&&(l.maxLine=$,l.maxLineLength=ne,l.maxLineChanged=!0,k=!1)}),k&&(e.curOp.updateMaxLine=!0)),Wv(o,f.line),Fi(e,400);var C=r.text.length-(v.line-f.line)-1;r.full?Xt(e):f.line==v.line&&r.text.length==1&&!tc(e.doc,r)?nr(e,f.line,"text"):Xt(e,f.line,v.line+1,C);var M=wt(e,"changes"),P=wt(e,"change");if(P||M){var K={from:f,to:v,text:r.text,removed:r.removed,origin:r.origin};P&&Rt(e,"change",e,K),M&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(K)}e.display.selForContextMenu=null}function Kr(e,r,a,o,l){var f;o||(o=a),fe(o,a)<0&&(f=[o,a],a=f[0],o=f[1]),typeof r=="string"&&(r=e.splitLines(r)),Gr(e,{from:a,to:o,text:r,origin:l})}function yc(e,r,a,o){a1||!(this.children[0]instanceof Ri))){var k=[];this.collapse(k),this.children=[new Ri(k)],this.children[0].parent=this}},collapse:function(e){for(var r=0;r50){for(var v=l.lines.length%25+25,k=v;k10);e.parent.maybeSpill()},iterN:function(e,r,a){for(var o=0;oe.display.maxLineLength&&(e.display.maxLine=C,e.display.maxLineLength=M,e.display.maxLineChanged=!0)}o!=null&&e&&this.collapsed&&Xt(e,o,l+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&hc(e.doc)),e&&Rt(e,"markerCleared",e,this,o,l),r&&kr(e),this.parent&&this.parent.clear()},sr.prototype.find=function(e,r){e==null&&this.type=="bookmark"&&(e=1);for(var a,o,l=0;l0||v==0&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=V("span",[f.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(du(e,r.line,r,a,f)||r.line!=a.line&&du(e,a.line,r,a,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Gv()}f.addToHistory&&oc(e,{from:r,to:a,origin:"markText"},e.sel,NaN);var k=r.line,x=e.cm,C;if(e.iter(k,a.line+1,function(P){x&&f.collapsed&&!x.options.lineWrapping&&In(P)==x.display.maxLine&&(C=!0),f.collapsed&&k!=r.line&&pn(P,0),Vv(P,new Eo(f,k==r.line?r.ch:null,k==a.line?a.ch:null)),++k}),f.collapsed&&e.iter(r.line,a.line+1,function(P){tr(e,P)&&pn(P,0)}),f.clearOnEnter&&Te(f,"beforeCursorEnter",function(){return f.clear()}),f.readOnly&&($v(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),f.collapsed&&(f.id=++_c,f.atomic=!0),x){if(C&&(x.curOp.updateMaxLine=!0),f.collapsed)Xt(x,r.line,a.line+1);else if(f.className||f.startStyle||f.endStyle||f.css||f.attributes||f.title)for(var M=r.line;M<=a.line;M++)nr(x,M,"text");f.atomic&&hc(x.doc),Rt(x,"markerAdded",x,f)}return f}var Bi=function(e,r){this.markers=e,this.primary=r;for(var a=0;a=0;x--)Gr(this,o[x]);k?cc(this,k):this.cm&&Hr(this.cm)}),undo:It(function(){Go(this,"undo")}),redo:It(function(){Go(this,"redo")}),undoSelection:It(function(){Go(this,"undo",!0)}),redoSelection:It(function(){Go(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,r=0,a=0,o=0;o=e.ch)&&r.push(l.marker.parent||l.marker)}return r},findMarks:function(e,r,a){e=ze(this,e),r=ze(this,r);var o=[],l=e.line;return this.iter(e.line,r.line+1,function(f){var v=f.markedSpans;if(v)for(var k=0;k=x.to||x.from==null&&l!=e.line||x.from!=null&&l==r.line&&x.from>=r.ch)&&(!a||a(x.marker))&&o.push(x.marker.parent||x.marker)}++l}),o},getAllMarks:function(){var e=[];return this.iter(function(r){var a=r.markedSpans;if(a)for(var o=0;oe)return r=e,!0;e-=f,++a}),ze(this,W(a,r))},indexFromPos:function(e){e=ze(this,e);var r=e.ch;if(e.liner&&(r=e.from),e.to!=null&&e.to-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var M=e.dataTransfer.getData("Text");if(M){var P;if(r.state.draggingText&&!r.state.draggingText.copy&&(P=r.listSelections()),Wo(r.doc,ir(a,a)),P)for(var K=0;K=0;k--)Kr(e.doc,"",o[k].from,o[k].to,"+delete");Hr(e)})}function Ms(e,r,a){var o=Ae(e.text,r+a,a);return o<0||o>e.text.length?null:o}function qs(e,r,a){var o=Ms(e,r.ch,a);return o==null?null:new W(r.line,o,a<0?"after":"before")}function zs(e,r,a,o,l){if(e){r.doc.direction=="rtl"&&(l=-l);var f=Ot(a,r.doc.direction);if(f){var v=l<0?Ce(f):f[0],k=l<0==(v.level==1),x=k?"after":"before",C;if(v.level>0||r.doc.direction=="rtl"){var M=Pr(r,a);C=l<0?a.text.length-1:0;var P=Mn(r,M,C).top;C=Fe(function(K){return Mn(r,M,K).top==P},l<0==(v.level==1)?v.from:v.to-1,C),x=="before"&&(C=Ms(a,C,1))}else C=l<0?v.to:v.from;return new W(o,C,x)}}return new W(o,l<0?a.text.length:0,l<0?"before":"after")}function my(e,r,a,o){var l=Ot(r,e.doc.direction);if(!l)return qs(r,a,o);a.ch>=r.text.length?(a.ch=r.text.length,a.sticky="before"):a.ch<=0&&(a.ch=0,a.sticky="after");var f=Ye(l,a.ch,a.sticky),v=l[f];if(e.doc.direction=="ltr"&&v.level%2==0&&(o>0?v.to>a.ch:v.from=v.from&&K>=M.begin)){var $=P?"before":"after";return new W(a.line,K,$)}}var ne=function(pe,ve,me){for(var be=function(it,Ft){return Ft?new W(a.line,k(it,1),"before"):new W(a.line,it,"after")};pe>=0&&pe0==(Le.level!=1),Ne=Ee?me.begin:k(me.end,-1);if(Le.from<=Ne&&Ne0?M.end:k(M.begin,-1);return he!=null&&!(o>0&&he==r.text.length)&&(ae=ne(o>0?0:l.length-1,o,C(he)),ae)?ae:null}var Ui={selectAll:mc,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ye)},killLine:function(e){return Xr(e,function(r){if(r.empty()){var a=_e(e.doc,r.head.line).text.length;return r.head.ch==a&&r.head.line0)l=new W(l.line,l.ch+1),e.replaceRange(f.charAt(l.ch-1)+f.charAt(l.ch-2),W(l.line,l.ch-2),l,"+transpose");else if(l.line>e.doc.first){var v=_e(e.doc,l.line-1).text;v&&(l=new W(l.line,1),e.replaceRange(f.charAt(0)+e.doc.lineSeparator()+v.charAt(v.length-1),W(l.line-1,v.length-1),l,"+transpose"))}}a.push(new Xe(l,l))}e.setSelections(a)})},newlineAndIndent:function(e){return nn(e,function(){for(var r=e.listSelections(),a=r.length-1;a>=0;a--)e.replaceRange(e.doc.lineSeparator(),r[a].anchor,r[a].head,"+input");r=e.listSelections();for(var o=0;oe&&fe(r,this.pos)==0&&a==this.button};var $i,Gi;function xy(e,r){var a=+new Date;return Gi&&Gi.compare(a,e,r)?($i=Gi=null,"triple"):$i&&$i.compare(a,e,r)?(Gi=new Rs(a,e,r),$i=null,"double"):($i=new Rs(a,e,r),Gi=null,"single")}function Nc(e){var r=this,a=r.display;if(st(r,e)||a.activeTouch&&a.input.supportsTouch())return;if(a.input.ensurePolled(),a.shift=e.shiftKey,Gn(a,e)){p||(a.scroller.draggable=!1,setTimeout(function(){return a.scroller.draggable=!0},100));return}if(Ps(r,e))return;var o=gr(r,e),l=ko(e),f=o?xy(o,l):"single";if(window.focus(),l==1&&r.state.selectingText&&r.state.selectingText(e),o&&_y(r,l,o,f,e))return;l==1?o?Sy(r,o,f,e):Ir(e)==a.scroller&&St(e):l==2?(o&&Uo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):l==3&&(G?r.display.input.onContextMenu(e):Bu(r))}function _y(e,r,a,o,l){var f="Click";return o=="double"?f="Double"+f:o=="triple"&&(f="Triple"+f),f=(r==1?"Left":r==2?"Middle":"Right")+f,Wi(e,Lc(f,l),l,function(v){if(typeof v=="string"&&(v=Ui[v]),!v)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=v(e,a)!=Oe}finally{e.state.suppressEdits=!1}return k})}function Cy(e,r,a){var o=e.getOption("configureMouse"),l=o?o(e,r,a):{};if(l.unit==null){var f=R?a.shiftKey&&a.metaKey:a.altKey;l.unit=f?"rectangle":r=="single"?"char":r=="double"?"word":"line"}return(l.extend==null||e.doc.extend)&&(l.extend=e.doc.extend||a.shiftKey),l.addNew==null&&(l.addNew=A?a.metaKey:a.ctrlKey),l.moveOnDrag==null&&(l.moveOnDrag=!(A?a.altKey:a.ctrlKey)),l}function Sy(e,r,a,o){d?setTimeout(F(Nu,e),0):e.curOp.focus=q();var l=Cy(e,a,o),f=e.doc.sel,v;e.options.dragDrop&&En&&!e.isReadOnly()&&a=="single"&&(v=f.contains(r))>-1&&(fe((v=f.ranges[v]).from(),r)<0||r.xRel>0)&&(fe(v.to(),r)>0||r.xRel<0)?Ey(e,o,r,l):Dy(e,o,r,l)}function Ey(e,r,a,o){var l=e.display,f=!1,v=Lt(e,function(C){p&&(l.scroller.draggable=!1),e.state.draggingText=!1,Be(l.wrapper.ownerDocument,"mouseup",v),Be(l.wrapper.ownerDocument,"mousemove",k),Be(l.scroller,"dragstart",x),Be(l.scroller,"drop",v),f||(St(C),o.addNew||Uo(e.doc,a,null,null,o.extend),p&&!b||d&&h==9?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),k=function(C){f=f||Math.abs(r.clientX-C.clientX)+Math.abs(r.clientY-C.clientY)>=10},x=function(){return f=!0};p&&(l.scroller.draggable=!0),e.state.draggingText=v,v.copy=!o.moveOnDrag,l.scroller.dragDrop&&l.scroller.dragDrop(),Te(l.wrapper.ownerDocument,"mouseup",v),Te(l.wrapper.ownerDocument,"mousemove",k),Te(l.scroller,"dragstart",x),Te(l.scroller,"drop",v),Bu(e),setTimeout(function(){return l.input.focus()},20)}function Bc(e,r,a){if(a=="char")return new Xe(r,r);if(a=="word")return e.findWordAt(r);if(a=="line")return new Xe(W(r.line,0),ze(e.doc,W(r.line+1,0)));var o=a(e,r);return new Xe(o.from,o.to)}function Dy(e,r,a,o){var l=e.display,f=e.doc;St(r);var v,k,x=f.sel,C=x.ranges;if(o.addNew&&!o.extend?(k=f.sel.contains(a),k>-1?v=C[k]:v=new Xe(a,a)):(v=f.sel.primary(),k=f.sel.primIndex),o.unit=="rectangle")o.addNew||(v=new Xe(a,a)),a=gr(e,r,!0,!0),k=-1;else{var M=Bc(e,a,o.unit);o.extend?v=Is(v,M.anchor,M.head,o.extend):v=M}o.addNew?k==-1?(k=C.length,jt(f,wn(e,C.concat([v]),k),{scroll:!1,origin:"*mouse"})):C.length>1&&C[k].empty()&&o.unit=="char"&&!o.extend?(jt(f,wn(e,C.slice(0,k).concat(C.slice(k+1)),0),{scroll:!1,origin:"*mouse"}),x=f.sel):Fs(f,k,v,re):(k=0,jt(f,new sn([v],0),re),x=f.sel);var P=a;function K(me){if(fe(P,me)==0)return;if(P=me,o.unit=="rectangle"){for(var be=[],Le=e.options.tabSize,Ee=de(_e(f,a.line).text,a.ch,Le),Ne=de(_e(f,me.line).text,me.ch,Le),it=Math.min(Ee,Ne),Ft=Math.max(Ee,Ne),ct=Math.min(a.line,me.line),rn=Math.min(e.lastLine(),Math.max(a.line,me.line));ct<=rn;ct++){var Qt=_e(f,ct).text,kt=De(Qt,it,Le);it==Ft?be.push(new Xe(W(ct,kt),W(ct,kt))):Qt.length>kt&&be.push(new Xe(W(ct,kt),W(ct,De(Qt,Ft,Le))))}be.length||be.push(new Xe(a,a)),jt(f,wn(e,x.ranges.slice(0,k).concat(be),k),{origin:"*mouse",scroll:!1}),e.scrollIntoView(me)}else{var Jt=v,Pt=Bc(e,me,o.unit),Dt=Jt.anchor,xt;fe(Pt.anchor,Dt)>0?(xt=Pt.head,Dt=Yt(Jt.from(),Pt.anchor)):(xt=Pt.anchor,Dt=Et(Jt.to(),Pt.head));var ht=x.ranges.slice(0);ht[k]=Ay(e,new Xe(ze(f,Dt),xt)),jt(f,wn(e,ht,k),re)}}var $=l.wrapper.getBoundingClientRect(),ne=0;function ae(me){var be=++ne,Le=gr(e,me,!0,o.unit=="rectangle");if(!Le)return;if(fe(Le,P)!=0){e.curOp.focus=q(),K(Le);var Ee=Ro(l,f);(Le.line>=Ee.to||Le.line$.bottom?20:0;Ne&&setTimeout(Lt(e,function(){if(ne!=be)return;l.scroller.scrollTop+=Ne,ae(me)}),50)}}function he(me){e.state.selectingText=!1,ne=Infinity,me&&(St(me),l.input.focus()),Be(l.wrapper.ownerDocument,"mousemove",pe),Be(l.wrapper.ownerDocument,"mouseup",ve),f.history.lastSelOrigin=null}var pe=Lt(e,function(me){me.buttons===0||!ko(me)?he(me):ae(me)}),ve=Lt(e,he);e.state.selectingText=ve,Te(l.wrapper.ownerDocument,"mousemove",pe),Te(l.wrapper.ownerDocument,"mouseup",ve)}function Ay(e,r){var a=r.anchor,o=r.head,l=_e(e.doc,a.line);if(fe(a,o)==0&&a.sticky==o.sticky)return r;var f=Ot(l);if(!f)return r;var v=Ye(f,a.ch,a.sticky),k=f[v];if(k.from!=a.ch&&k.to!=a.ch)return r;var x=v+(k.from==a.ch==(k.level!=1)?0:1);if(x==0||x==f.length)return r;var C;if(o.line!=a.line)C=(o.line-a.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var M=Ye(f,o.ch,o.sticky),P=M-v||(o.ch-a.ch)*(k.level==1?-1:1);M==x-1||M==x?C=P<0:C=P>0}var K=f[x+(C?-1:0)],$=C==(K.level==1),ne=$?K.from:K.to,ae=$?"after":"before";return a.ch==ne&&a.sticky==ae?r:new Xe(new W(a.line,ne,ae),o)}function jc(e,r,a,o){var l,f;if(r.touches)l=r.touches[0].clientX,f=r.touches[0].clientY;else try{l=r.clientX,f=r.clientY}catch(K){return!1}if(l>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;o&&St(r);var v=e.display,k=v.lineDiv.getBoundingClientRect();if(f>k.bottom||!wt(e,a))return fr(r);f-=k.top-v.viewOffset;for(var x=0;x=l){var M=L(e.doc,f),P=e.display.gutterSpecs[x];return dt(e,a,e,M,P.className,r),fr(r)}}}function Ps(e,r){return jc(e,r,"gutterClick",!0)}function Hc(e,r){if(Gn(e.display,r)||Ty(e,r))return;if(st(e,r,"contextmenu"))return;G||e.display.input.onContextMenu(r)}function Ty(e,r){return wt(e,"gutterContextMenu")?jc(e,r,"gutterContextMenu",!1):!1}function Uc(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ei(e)}var Zr={toString:function(){return"CodeMirror.Init"}},Wc={},Xo={};function Ly(e){var r=e.optionHandlers;function a(o,l,f,v){e.defaults[o]=l,f&&(r[o]=v?function(k,x,C){C!=Zr&&f(k,x,C)}:f)}e.defineOption=a,e.Init=Zr,a("value","",function(o,l){return o.setValue(l)},!0),a("mode",null,function(o,l){o.doc.modeOption=l,As(o)},!0),a("indentUnit",2,As,!0),a("indentWithTabs",!1),a("smartIndent",!0),a("tabSize",4,function(o){qi(o),Ei(o),Xt(o)},!0),a("lineSeparator",null,function(o,l){if(o.doc.lineSep=l,!l)return;var f=[],v=o.doc.first;o.doc.iter(function(x){for(var C=0;;){var M=x.text.indexOf(l,C);if(M==-1)break;C=M+l.length,f.push(W(v,M))}v++});for(var k=f.length-1;k>=0;k--)Kr(o.doc,l,f[k],W(f[k].line,f[k].ch+l.length))}),a("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(o,l,f){o.state.specialChars=new RegExp(l.source+(l.test(" ")?"":"| "),"g"),f!=Zr&&o.refresh()}),a("specialCharPlaceholder",ob,function(o){return o.refresh()},!0),a("electricChars",!0),a("inputStyle",z?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),a("spellcheck",!1,function(o,l){return o.getInputField().spellcheck=l},!0),a("autocorrect",!1,function(o,l){return o.getInputField().autocorrect=l},!0),a("autocapitalize",!1,function(o,l){return o.getInputField().autocapitalize=l},!0),a("rtlMoveVisually",!U),a("wholeLineUpdateBefore",!0),a("theme","default",function(o){Uc(o),Mi(o)},!0),a("keyMap","default",function(o,l,f){var v=Vo(l),k=f!=Zr&&Vo(f);k&&k.detach&&k.detach(o,v),v.attach&&v.attach(o,k||null)}),a("extraKeys",null),a("configureMouse",null),a("lineWrapping",!1,Fy,!0),a("gutters",[],function(o,l){o.display.gutterSpecs=Es(l,o.options.lineNumbers),Mi(o)},!0),a("fixedGutter",!0,function(o,l){o.display.gutters.style.left=l?gs(o.display)+"px":"0",o.refresh()},!0),a("coverGutterNextToScrollbar",!1,function(o){return Ur(o)},!0),a("scrollbarStyle","native",function(o){Gu(o),Ur(o),o.display.scrollbars.setScrollTop(o.doc.scrollTop),o.display.scrollbars.setScrollLeft(o.doc.scrollLeft)},!0),a("lineNumbers",!1,function(o,l){o.display.gutterSpecs=Es(o.options.gutters,l),Mi(o)},!0),a("firstLineNumber",1,Mi,!0),a("lineNumberFormatter",function(o){return o},Mi,!0),a("showCursorWhenSelecting",!1,Di,!0),a("resetSelectionOnContextMenu",!0),a("lineWiseCopyCut",!0),a("pasteLinesPerSelection",!0),a("selectionsMayTouch",!1),a("readOnly",!1,function(o,l){l=="nocursor"&&(jr(o),o.display.input.blur()),o.display.input.readOnlyChanged(l)}),a("screenReaderLabel",null,function(o,l){l=l===""?null:l,o.display.input.screenReaderLabelChanged(l)}),a("disableInput",!1,function(o,l){l||o.display.input.reset()},!0),a("dragDrop",!0,Iy),a("allowDropFileTypes",null),a("cursorBlinkRate",530),a("cursorScrollMargin",0),a("cursorHeight",1,Di,!0),a("singleCursorHeightPerLine",!0,Di,!0),a("workTime",100),a("workDelay",100),a("flattenSpans",!0,qi,!0),a("addModeClass",!1,qi,!0),a("pollInterval",100),a("undoDepth",200,function(o,l){return o.doc.history.undoDepth=l}),a("historyEventDelay",1250),a("viewportMargin",10,function(o){return o.refresh()},!0),a("maxHighlightLength",1e4,qi,!0),a("moveInputWithCursor",!0,function(o,l){l||o.display.input.resetPosition()}),a("tabindex",null,function(o,l){return o.display.input.getField().tabIndex=l||""}),a("autofocus",null),a("direction","ltr",function(o,l){return o.doc.setDirection(l)},!0),a("phrases",null)}function Iy(e,r,a){var o=a&&a!=Zr;if(!r!=!o){var l=e.display.dragFunctions,f=r?Te:Be;f(e.display.scroller,"dragstart",l.start),f(e.display.scroller,"dragenter",l.enter),f(e.display.scroller,"dragover",l.over),f(e.display.scroller,"dragleave",l.leave),f(e.display.scroller,"drop",l.drop)}}function Fy(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(J(e.display.wrapper,"CodeMirror-wrap"),os(e)),vs(e),Xt(e),Ei(e),setTimeout(function(){return Ur(e)},100)}function ut(e,r){var a=this;if(!(this instanceof ut))return new ut(e,r);this.options=r=r?T(r):{},T(Wc,r,!1);var o=r.value;typeof o=="string"?o=new Zt(o,r.mode,null,r.lineSeparator,r.direction):r.mode&&(o.modeOption=r.mode),this.doc=o;var l=new ut.inputStyles[r.inputStyle](this),f=this.display=new $b(e,o,l,r);f.wrapper.CodeMirror=this,Uc(this),r.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Gu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ce,keySeq:null,specialChars:null},r.autofocus&&!z&&f.input.focus(),d&&h<11&&setTimeout(function(){return a.display.input.reset(!0)},20),My(this),cy(),wr(this),this.curOp.forceUpdate=!0,nc(this,o),r.autofocus&&!z||this.hasFocus()?setTimeout(function(){a.hasFocus()&&!a.state.focused&&ys(a)},20):jr(this);for(var v in Xo)Xo.hasOwnProperty(v)&&Xo[v](this,r[v],Zr);Yu(this),r.finishInit&&r.finishInit(this);for(var k=0;k20*20}Te(r.scroller,"touchstart",function(x){if(!st(e,x)&&!f(x)&&!Ps(e,x)){r.input.ensurePolled(),clearTimeout(a);var C=+new Date;r.activeTouch={start:C,moved:!1,prev:C-o.end<=300?o:null},x.touches.length==1&&(r.activeTouch.left=x.touches[0].pageX,r.activeTouch.top=x.touches[0].pageY)}}),Te(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Te(r.scroller,"touchend",function(x){var C=r.activeTouch;if(C&&!Gn(r,x)&&C.left!=null&&!C.moved&&new Date-C.start<300){var M=e.coordsChar(r.activeTouch,"page"),P;!C.prev||v(C,C.prev)?P=new Xe(M,M):!C.prev.prev||v(C,C.prev.prev)?P=e.findWordAt(M):P=new Xe(W(M.line,0),ze(e.doc,W(M.line+1,0))),e.setSelection(P.anchor,P.head),e.focus(),St(x)}l()}),Te(r.scroller,"touchcancel",l),Te(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Ti(e,r.scroller.scrollTop),br(e,r.scroller.scrollLeft,!0),dt(e,"scroll",e))}),Te(r.scroller,"mousewheel",function(x){return Qu(e,x)}),Te(r.scroller,"DOMMouseScroll",function(x){return Qu(e,x)}),Te(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(x){st(e,x)||Bt(x)},over:function(x){st(e,x)||(uy(e,x),Bt(x))},start:function(x){return ly(e,x)},drop:Lt(e,sy),leave:function(x){st(e,x)||Ec(e)}};var k=r.input.getField();Te(k,"keyup",function(x){return Rc.call(e,x)}),Te(k,"keydown",Lt(e,Oc)),Te(k,"keypress",Lt(e,Pc)),Te(k,"focus",function(x){return ys(e,x)}),Te(k,"blur",function(x){return jr(e,x)})}var Ns=[];ut.defineInitHook=function(e){return Ns.push(e)};function Ki(e,r,a,o){var l=e.doc,f;a==null&&(a="add"),a=="smart"&&(l.mode.indent?f=ki(e,r).state:a="prev");var v=e.options.tabSize,k=_e(l,r),x=de(k.text,null,v);k.stateAfter&&(k.stateAfter=null);var C=k.text.match(/^\s*/)[0],M;if(!o&&!/\S/.test(k.text))M=0,a="not";else if(a=="smart"&&(M=l.mode.indent(f,k.text.slice(C.length),k.text),M==Oe||M>150)){if(!o)return;a="prev"}a=="prev"?r>l.first?M=de(_e(l,r-1).text,null,v):M=0:a=="add"?M=x+e.options.indentUnit:a=="subtract"?M=x-e.options.indentUnit:typeof a=="number"&&(M=x+a),M=Math.max(0,M);var P="",K=0;if(e.options.indentWithTabs)for(var $=Math.floor(M/v);$;--$)K+=v,P+=" ";if(Kv,x=Dn(r),C=null;if(k&&o.ranges.length>1)if(kn&&kn.text.join(` +`)==r){if(o.ranges.length%kn.text.length==0){C=[];for(var M=0;M=0;K--){var $=o.ranges[K],ne=$.from(),ae=$.to();$.empty()&&(a&&a>0?ne=W(ne.line,ne.ch-a):e.state.overwrite&&!k?ae=W(ae.line,Math.min(_e(f,ae.line).text.length,ae.ch+Ce(x).length)):k&&kn&&kn.lineWise&&kn.text.join(` `)==x.join(` -`)&&(ne=oe=W(ne.line,0)));var ue={from:ne,to:oe,text:C?C[K%C.length]:x,origin:l||(k?"paste":e.state.cutIncoming>v?"cut":"+input")};Gr(e.doc,ue),Rt(e,"inputRead",e,ue)}r&&!k&&Gc(e,r),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=O),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function $c(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&nn(r,function(){return Bs(r,a,0,null,"paste")}),!0}function Gc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var l=a.ranges[o];if(l.head.ch>100||o&&a.ranges[o-1].head.line==l.head.line)continue;var f=e.getModeAt(l.head),v=!1;if(f.electricChars){for(var k=0;k-1){v=Ki(e,l.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(ke(e.doc,l.head.line).text.slice(0,l.head.ch))&&(v=Ki(e,l.head.line,"smart")));v&&Rt(e,"electricInput",e,l.head.line)}}function Kc(e){for(var r=[],a=[],o=0;of&&(Ki(this,k.head.line,o,!0),f=k.head.line,v==this.doc.sel.primIndex&&Hr(this));else{var x=k.from(),C=k.to(),M=Math.max(f,x.line);f=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var O=M;O0&&Fs(this.doc,v,new Ye(x,K[v].to()),be)}}}),getTokenAt:function(o,l){return nu(this,o,l)},getLineTokens:function(o,l){return nu(this,W(o),l,!0)},getTokenTypeAt:function(o){o=Me(this.doc,o);var l=Jl(this,ke(this.doc,o.line)),f=0,v=(l.length-1)/2,k=o.ch,x;if(k==0)x=l[2];else for(;;){var C=f+v>>1;if((C?l[C*2-1]:0)>=k)v=C;else if(l[C*2+1]x&&(o=x,v=!0),k=ke(this.doc,o)}else k=o;return Mo(this,k,{top:0,left:0},l||"page",f||v).top+(v?this.doc.height-$n(k):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,f,v,k){var x=this.display;o=yn(this,Me(this.doc,o));var C=o.bottom,M=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),x.sizer.appendChild(l),v=="over")C=o.top;else if(v=="above"||v=="near"){var O=Math.max(x.wrapper.clientHeight,this.doc.height),K=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(v=="above"||o.bottom+l.offsetHeight>O)&&o.top>l.offsetHeight?C=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=O&&(C=o.bottom),M+l.offsetWidth>K&&(M=K-l.offsetWidth)}l.style.top=C+"px",l.style.left=l.style.right="",k=="right"?(M=x.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(k=="left"?M=0:k=="middle"&&(M=(x.sizer.clientWidth-l.offsetWidth)/2),l.style.left=M+"px"),f&&Ab(this,{left:M,top:C,right:M+l.offsetWidth,bottom:C+l.offsetHeight})},triggerOnKeyDown:$t(Pc),triggerOnKeyPress:$t(Oc),triggerOnKeyUp:Rc,triggerOnMouseDown:$t(Nc),execCommand:function(o){if(Ui.hasOwnProperty(o))return Ui[o].call(null,this)},triggerElectric:$t(function(o){Gc(this,o)}),findPosH:function(o,l,f,v){var k=1;l<0&&(k=-1,l=-l);for(var x=Me(this.doc,o),C=0;C0&&M(f.charAt(v-1));)--v;for(;k.5||this.options.lineWrapping)&&vs(this),ct(this,"refresh",this)}),swapDoc:$t(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),nc(this,o),Ei(this),this.display.input.reset(),Ai(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,Rt(this,"swapDoc",this,l),l}),phrase:function(o){var l=this.options.phrases;return l&&Object.prototype.hasOwnProperty.call(l,o)?l[o]:o},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jn(e),e.registerHelper=function(o,l,f){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][l]=f},e.registerGlobalHelper=function(o,l,f,v){e.registerHelper(o,l,v),a[o]._global.push({pred:f,val:v})}}function js(e,r,a,o,l){var f=r,v=a,k=ke(e,r.line),x=l&&e.direction=="rtl"?-a:a;function C(){var ge=r.line+x;return ge=e.first+e.size?!1:(r=new W(ge,r.ch,r.sticky),k=ke(e,ge))}function M(ge){var pe;if(o=="codepoint"){var ve=k.text.charCodeAt(r.ch+(o>0?0:-1));isNaN(ve)?pe=null:pe=new W(r.line,Math.max(0,Math.min(k.text.length,r.ch+a*(ve>=55296&&ve<56320?2:1))),-a)}else l?pe=hy(e.cm,k,r,a):pe=qs(k,r,a);if(pe==null)if(!ge&&C())r=zs(l,e.cm,k,r.line,x);else return!1;else r=pe;return!0}if(o=="char"||o=="codepoint")M();else if(o=="column")M(!0);else if(o=="word"||o=="group")for(var O=null,K=o=="group",$=e.cm&&e.cm.getHelper(r,"wordChars"),ne=!0;!(a<0&&!M(!ne));ne=!1){var oe=k.text.charAt(r.ch)||` -`,ue=se(oe,$)?"w":K&&oe==` -`?"n":!K||/\s/.test(oe)?null:"p";if(K&&!ne&&!ue&&(ue="s"),O&&O!=ue){a<0&&(a=1,M(),r.sticky="after");break}if(ue&&(O=ue),a>0&&!M(!ne))break}var fe=$o(e,r,f,v,!0);return He(f,fe)&&(fe.hitSide=!0),fe}function Xc(e,r,a,o){var l=e.doc,f=r.left,v;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Nr(e.display),3);v=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(v=a>0?r.bottom+3:r.top-3);for(var C;!(C=fs(e,f,v),!C.outside);){if(a<0?v<=0:v>=l.height){C.hitSide=!0;break}v+=a*5}return C}var et=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new de,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};et.prototype.init=function(e){var r=this,a=this,o=a.cm,l=a.div=e.lineDiv;Vc(l,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==l)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}De(l,"paste",function(k){if(!f(k)||at(o,k)||$c(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),De(l,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),De(l,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),De(l,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),De(l,"touchstart",function(){return a.forceCompositionEnd()}),De(l,"input",function(){r.composing||r.readFromDOMSoon()});function v(k){if(!f(k)||at(o,k))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()}),k.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var x=Kc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,be),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var C=kn.text.join(` -`);if(k.clipboardData.setData("Text",C),k.clipboardData.getData("Text")==C){k.preventDefault();return}}var M=Yc(),O=M.firstChild;o.display.lineSpace.insertBefore(M,o.display.lineSpace.firstChild),O.value=kn.text.join(` -`);var K=document.activeElement;ae(O),setTimeout(function(){o.display.lineSpace.removeChild(M),K.focus(),K==l&&a.showPrimarySelection()},50)}De(l,"copy",v),De(l,"cut",v)},et.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},et.prototype.prepareSelection=function(){var e=Ru(this.cm,!1);return e.focus=document.activeElement==this.div,e},et.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},et.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},et.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,a=r.doc.sel.primary(),o=a.from(),l=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||l.line=r.display.viewFrom&&Zc(r,o)||{node:k[0].measure.map[2],offset:0},C=l.linee.firstLine()&&(o=W(o.line-1,ke(e.doc,o.line-1).length)),l.ch==ke(e.doc,l.line).text.length&&l.liner.viewTo-1)return!1;var f,v,k;o.line==r.viewFrom||(f=vr(e,o.line))==0?(v=Ke(r.view[0].line),k=r.view[0].node):(v=Ke(r.view[f].line),k=r.view[f-1].node.nextSibling);var x=vr(e,l.line),C,M;if(x==r.view.length-1?(C=r.viewTo-1,M=r.lineDiv.lastChild):(C=Ke(r.view[x+1].line)-1,M=r.view[x+1].node.previousSibling),!k)return!1;for(var O=e.doc.splitLines(My(e,k,M,v,C)),K=Tn(e.doc,W(v,0),W(C,ke(e.doc,C).text.length));O.length>1&&K.length>1;)if(xe(O)==xe(K))O.pop(),K.pop(),C--;else if(O[0]==K[0])O.shift(),K.shift(),v++;else break;for(var $=0,ne=0,oe=O[0],ue=K[0],fe=Math.min(oe.length,ue.length);$o.ch&&ge.charCodeAt(ge.length-ne-1)==pe.charCodeAt(pe.length-ne-1);)$--,ne++;O[O.length-1]=ge.slice(0,ge.length-ne).replace(/^\u200b+/,""),O[0]=O[0].slice($).replace(/\u200b+$/,"");var Ae=W(v,$),Se=W(C,K.length?xe(K).length-ne:0);if(O.length>1||O[0]||he(Ae,Se))return Kr(e.doc,O,Ae,Se,"+input"),!0},et.prototype.ensurePolled=function(){this.forceCompositionEnd()},et.prototype.reset=function(){this.forceCompositionEnd()},et.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},et.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)},et.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return Xt(e.cm)})},et.prototype.setUneditable=function(e){e.contentEditable="false"},et.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Bs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},et.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},et.prototype.onContextMenu=function(){},et.prototype.resetPosition=function(){},et.prototype.needsContentAttribute=!0;function Zc(e,r){var a=us(e,r.line);if(!a||a.hidden)return null;var o=ke(e.doc,r.line),l=_u(a,o,r.line),f=Pt(o,e.doc.direction),v="left";if(f){var k=Ve(f,r.ch);v=k%2?"right":"left"}var x=Eu(l.map,r.ch,v);return x.offset=x.collapse=="right"?x.end:x.start,x}function Fy(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Qr(e,r){return r&&(e.bad=!0),e}function My(e,r,a,o,l){var f="",v=!1,k=e.doc.lineSeparator(),x=!1;function C($){return function(ne){return ne.id==$}}function M(){v&&(f+=k,x&&(f+=k),v=x=!1)}function O($){$&&(M(),f+=$)}function K($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){O(ne);return}var oe=$.getAttribute("cm-marker"),ue;if(oe){var fe=e.findMarks(W(o,0),W(l+1,0),C(+oe));fe.length&&(ue=fe[0].find(0))&&O(Tn(e.doc,ue.from,ue.to).join(k));return}if($.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;ge&&M();for(var pe=0;pe<$.childNodes.length;pe++)K($.childNodes[pe]);/^(pre|p)$/i.test($.nodeName)&&(x=!0),ge&&(v=!0)}else $.nodeType==3&&O($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(K(r),r==a);)r=r.nextSibling,x=!1;return f}function Qo(e,r,a){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[a],!o)return Qr(e.clipPos(W(e.display.viewTo-1)),!0);r=null,a=0}else for(o=r;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var l=0;l=9&&r.hasSelection&&(r.hasSelection=null),a.poll()}),De(l,"paste",function(v){if(at(o,v)||$c(v,o))return;o.state.pasteIncoming=+new Date,a.fastPoll()});function f(v){if(at(o,v))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var k=Kc(o);Zo({lineWise:!0,text:k.text}),v.type=="cut"?o.setSelections(k.ranges,null,be):(a.prevInput="",l.value=k.text.join(` -`),ae(l))}else return;v.type=="cut"&&(o.state.cutIncoming=+new Date)}De(l,"cut",f),De(l,"copy",f),De(e.scroller,"paste",function(v){if(Gn(e,v)||at(o,v))return;if(!l.dispatchEvent){o.state.pasteIncoming=+new Date,a.focus();return}var k=new Event("paste");k.clipboardData=v.clipboardData,l.dispatchEvent(k)}),De(e.lineSpace,"selectstart",function(v){Gn(e,v)||Ct(v)}),De(l,"compositionstart",function(){var v=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:v,range:o.markText(v,o.getCursor("to"),{className:"CodeMirror-composing"})}}),De(l,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},gt.prototype.createField=function(e){this.wrapper=Yc(),this.textarea=this.wrapper.firstChild},gt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},gt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var l=yn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),v=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,l.top+v.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,l.left+v.left-f.left))}return o},gt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Z(a.cursorDiv,e.cursors),Z(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},gt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var a=r.getSelection();this.textarea.value=a,r.state.focused&&ae(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},gt.prototype.getField=function(){return this.textarea},gt.prototype.supportsTouch=function(){return!1},gt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},gt.prototype.blur=function(){this.textarea.blur()},gt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},gt.prototype.receivedFocus=function(){this.slowPoll()},gt.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()})},gt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function a(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,a)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,a)},gt.prototype.poll=function(){var e=this,r=this.cm,a=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||An(a)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var l=a.value;if(l==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===l||A&&/[\uf700-\uf7ff]/.test(l))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=l.charCodeAt(0);if(f==8203&&!o&&(o="​"),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var v=0,k=Math.min(o.length,l.length);v1e3||l.indexOf(` -`)>-1?a.value=e.prevInput="":e.prevInput=l,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},gt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},gt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},gt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,l=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),v=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,jt)(a.doc,ir(f),be);var x=l.style.cssText,C=r.wrapper.style.cssText,M=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",l.style.cssText=`position: absolute; width: 30px; height: 30px; +`)&&(ne=ae=W(ne.line,0)));var he={from:ne,to:ae,text:C?C[K%C.length]:x,origin:l||(k?"paste":e.state.cutIncoming>v?"cut":"+input")};Gr(e.doc,he),Rt(e,"inputRead",e,he)}r&&!k&&Gc(e,r),Hr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=P),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function $c(e,r){var a=e.clipboardData&&e.clipboardData.getData("Text");if(a)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&nn(r,function(){return Bs(r,a,0,null,"paste")}),!0}function Gc(e,r){if(!e.options.electricChars||!e.options.smartIndent)return;for(var a=e.doc.sel,o=a.ranges.length-1;o>=0;o--){var l=a.ranges[o];if(l.head.ch>100||o&&a.ranges[o-1].head.line==l.head.line)continue;var f=e.getModeAt(l.head),v=!1;if(f.electricChars){for(var k=0;k-1){v=Ki(e,l.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(_e(e.doc,l.head.line).text.slice(0,l.head.ch))&&(v=Ki(e,l.head.line,"smart")));v&&Rt(e,"electricInput",e,l.head.line)}}function Kc(e){for(var r=[],a=[],o=0;of&&(Ki(this,k.head.line,o,!0),f=k.head.line,v==this.doc.sel.primIndex&&Hr(this));else{var x=k.from(),C=k.to(),M=Math.max(f,x.line);f=Math.min(this.lastLine(),C.line-(C.ch?0:1))+1;for(var P=M;P0&&Fs(this.doc,v,new Xe(x,K[v].to()),ye)}}}),getTokenAt:function(o,l){return nu(this,o,l)},getLineTokens:function(o,l){return nu(this,W(o),l,!0)},getTokenTypeAt:function(o){o=ze(this.doc,o);var l=Jl(this,_e(this.doc,o.line)),f=0,v=(l.length-1)/2,k=o.ch,x;if(k==0)x=l[2];else for(;;){var C=f+v>>1;if((C?l[C*2-1]:0)>=k)v=C;else if(l[C*2+1]x&&(o=x,v=!0),k=_e(this.doc,o)}else k=o;return Mo(this,k,{top:0,left:0},l||"page",f||v).top+(v?this.doc.height-$n(k):0)},defaultTextHeight:function(){return Nr(this.display)},defaultCharWidth:function(){return Br(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(o,l,f,v,k){var x=this.display;o=yn(this,ze(this.doc,o));var C=o.bottom,M=o.left;if(l.style.position="absolute",l.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(l),x.sizer.appendChild(l),v=="over")C=o.top;else if(v=="above"||v=="near"){var P=Math.max(x.wrapper.clientHeight,this.doc.height),K=Math.max(x.sizer.clientWidth,x.lineSpace.clientWidth);(v=="above"||o.bottom+l.offsetHeight>P)&&o.top>l.offsetHeight?C=o.top-l.offsetHeight:o.bottom+l.offsetHeight<=P&&(C=o.bottom),M+l.offsetWidth>K&&(M=K-l.offsetWidth)}l.style.top=C+"px",l.style.left=l.style.right="",k=="right"?(M=x.sizer.clientWidth-l.offsetWidth,l.style.right="0px"):(k=="left"?M=0:k=="middle"&&(M=(x.sizer.clientWidth-l.offsetWidth)/2),l.style.left=M+"px"),f&&Ib(this,{left:M,top:C,right:M+l.offsetWidth,bottom:C+l.offsetHeight})},triggerOnKeyDown:$t(Oc),triggerOnKeyPress:$t(Pc),triggerOnKeyUp:Rc,triggerOnMouseDown:$t(Nc),execCommand:function(o){if(Ui.hasOwnProperty(o))return Ui[o].call(null,this)},triggerElectric:$t(function(o){Gc(this,o)}),findPosH:function(o,l,f,v){var k=1;l<0&&(k=-1,l=-l);for(var x=ze(this.doc,o),C=0;C0&&M(f.charAt(v-1));)--v;for(;k.5||this.options.lineWrapping)&&vs(this),dt(this,"refresh",this)}),swapDoc:$t(function(o){var l=this.doc;return l.cm=null,this.state.selectingText&&this.state.selectingText(),nc(this,o),Ei(this),this.display.input.reset(),Ai(this,o.scrollLeft,o.scrollTop),this.curOp.forceScroll=!0,Rt(this,"swapDoc",this,l),l}),phrase:function(o){var l=this.options.phrases;return l&&Object.prototype.hasOwnProperty.call(l,o)?l[o]:o},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Jn(e),e.registerHelper=function(o,l,f){a.hasOwnProperty(o)||(a[o]=e[o]={_global:[]}),a[o][l]=f},e.registerGlobalHelper=function(o,l,f,v){e.registerHelper(o,l,v),a[o]._global.push({pred:f,val:v})}}function js(e,r,a,o,l){var f=r,v=a,k=_e(e,r.line),x=l&&e.direction=="rtl"?-a:a;function C(){var ve=r.line+x;return ve=e.first+e.size?!1:(r=new W(ve,r.ch,r.sticky),k=_e(e,ve))}function M(ve){var me;if(o=="codepoint"){var be=k.text.charCodeAt(r.ch+(o>0?0:-1));isNaN(be)?me=null:me=new W(r.line,Math.max(0,Math.min(k.text.length,r.ch+a*(be>=55296&&be<56320?2:1))),-a)}else l?me=my(e.cm,k,r,a):me=qs(k,r,a);if(me==null)if(!ve&&C())r=zs(l,e.cm,k,r.line,x);else return!1;else r=me;return!0}if(o=="char"||o=="codepoint")M();else if(o=="column")M(!0);else if(o=="word"||o=="group")for(var P=null,K=o=="group",$=e.cm&&e.cm.getHelper(r,"wordChars"),ne=!0;!(a<0&&!M(!ne));ne=!1){var ae=k.text.charAt(r.ch)||` +`,he=le(ae,$)?"w":K&&ae==` +`?"n":!K||/\s/.test(ae)?null:"p";if(K&&!ne&&!he&&(he="s"),P&&P!=he){a<0&&(a=1,M(),r.sticky="after");break}if(he&&(P=he),a>0&&!M(!ne))break}var pe=$o(e,r,f,v,!0);return $e(f,pe)&&(pe.hitSide=!0),pe}function Xc(e,r,a,o){var l=e.doc,f=r.left,v;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Nr(e.display),3);v=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(v=a>0?r.bottom+3:r.top-3);for(var C;!(C=fs(e,f,v),!C.outside);){if(a<0?v<=0:v>=l.height){C.hitSide=!0;break}v+=a*5}return C}var tt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};tt.prototype.init=function(e){var r=this,a=this,o=a.cm,l=a.div=e.lineDiv;Vc(l,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==l)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}Te(l,"paste",function(k){if(!f(k)||st(o,k)||$c(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),Te(l,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),Te(l,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),Te(l,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Te(l,"touchstart",function(){return a.forceCompositionEnd()}),Te(l,"input",function(){r.composing||r.readFromDOMSoon()});function v(k){if(!f(k)||st(o,k))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()}),k.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var x=Kc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,ye),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var C=kn.text.join(` +`);if(k.clipboardData.setData("Text",C),k.clipboardData.getData("Text")==C){k.preventDefault();return}}var M=Yc(),P=M.firstChild;o.display.lineSpace.insertBefore(M,o.display.lineSpace.firstChild),P.value=kn.text.join(` +`);var K=document.activeElement;se(P),setTimeout(function(){o.display.lineSpace.removeChild(M),K.focus(),K==l&&a.showPrimarySelection()},50)}Te(l,"copy",v),Te(l,"cut",v)},tt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},tt.prototype.prepareSelection=function(){var e=Ru(this.cm,!1);return e.focus=document.activeElement==this.div,e},tt.prototype.showSelection=function(e,r){if(!e||!this.cm.display.view.length)return;(e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e)},tt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},tt.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,a=r.doc.sel.primary(),o=a.from(),l=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||l.line=r.display.viewFrom&&Zc(r,o)||{node:k[0].measure.map[2],offset:0},C=l.linee.firstLine()&&(o=W(o.line-1,_e(e.doc,o.line-1).length)),l.ch==_e(e.doc,l.line).text.length&&l.liner.viewTo-1)return!1;var f,v,k;o.line==r.viewFrom||(f=vr(e,o.line))==0?(v=Ve(r.view[0].line),k=r.view[0].node):(v=Ve(r.view[f].line),k=r.view[f-1].node.nextSibling);var x=vr(e,l.line),C,M;if(x==r.view.length-1?(C=r.viewTo-1,M=r.lineDiv.lastChild):(C=Ve(r.view[x+1].line)-1,M=r.view[x+1].node.previousSibling),!k)return!1;for(var P=e.doc.splitLines(Oy(e,k,M,v,C)),K=Tn(e.doc,W(v,0),W(C,_e(e.doc,C).text.length));P.length>1&&K.length>1;)if(Ce(P)==Ce(K))P.pop(),K.pop(),C--;else if(P[0]==K[0])P.shift(),K.shift(),v++;else break;for(var $=0,ne=0,ae=P[0],he=K[0],pe=Math.min(ae.length,he.length);$o.ch&&ve.charCodeAt(ve.length-ne-1)==me.charCodeAt(me.length-ne-1);)$--,ne++;P[P.length-1]=ve.slice(0,ve.length-ne).replace(/^\u200b+/,""),P[0]=P[0].slice($).replace(/\u200b+$/,"");var Le=W(v,$),Ee=W(C,K.length?Ce(K).length-ne:0);if(P.length>1||P[0]||fe(Le,Ee))return Kr(e.doc,P,Le,Ee,"+input"),!0},tt.prototype.ensurePolled=function(){this.forceCompositionEnd()},tt.prototype.reset=function(){this.forceCompositionEnd()},tt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},tt.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},tt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&nn(this.cm,function(){return Xt(e.cm)})},tt.prototype.setUneditable=function(e){e.contentEditable="false"},tt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Lt(this.cm,Bs)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},tt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},tt.prototype.onContextMenu=function(){},tt.prototype.resetPosition=function(){},tt.prototype.needsContentAttribute=!0;function Zc(e,r){var a=us(e,r.line);if(!a||a.hidden)return null;var o=_e(e.doc,r.line),l=_u(a,o,r.line),f=Ot(o,e.doc.direction),v="left";if(f){var k=Ye(f,r.ch);v=k%2?"right":"left"}var x=Eu(l.map,r.ch,v);return x.offset=x.collapse=="right"?x.end:x.start,x}function zy(e){for(var r=e;r;r=r.parentNode)if(/CodeMirror-gutter-wrapper/.test(r.className))return!0;return!1}function Qr(e,r){return r&&(e.bad=!0),e}function Oy(e,r,a,o,l){var f="",v=!1,k=e.doc.lineSeparator(),x=!1;function C($){return function(ne){return ne.id==$}}function M(){v&&(f+=k,x&&(f+=k),v=x=!1)}function P($){$&&(M(),f+=$)}function K($){if($.nodeType==1){var ne=$.getAttribute("cm-text");if(ne){P(ne);return}var ae=$.getAttribute("cm-marker"),he;if(ae){var pe=e.findMarks(W(o,0),W(l+1,0),C(+ae));pe.length&&(he=pe[0].find(0))&&P(Tn(e.doc,he.from,he.to).join(k));return}if($.getAttribute("contenteditable")=="false")return;var ve=/^(pre|div|p|li|table|br)$/i.test($.nodeName);if(!/^br$/i.test($.nodeName)&&$.textContent.length==0)return;ve&&M();for(var me=0;me<$.childNodes.length;me++)K($.childNodes[me]);/^(pre|p)$/i.test($.nodeName)&&(x=!0),ve&&(v=!0)}else $.nodeType==3&&P($.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(K(r),r==a);)r=r.nextSibling,x=!1;return f}function Qo(e,r,a){var o;if(r==e.display.lineDiv){if(o=e.display.lineDiv.childNodes[a],!o)return Qr(e.clipPos(W(e.display.viewTo-1)),!0);r=null,a=0}else for(o=r;;o=o.parentNode){if(!o||o==e.display.lineDiv)return null;if(o.parentNode&&o.parentNode==e.display.lineDiv)break}for(var l=0;l=9&&r.hasSelection&&(r.hasSelection=null),a.poll()}),Te(l,"paste",function(v){if(st(o,v)||$c(v,o))return;o.state.pasteIncoming=+new Date,a.fastPoll()});function f(v){if(st(o,v))return;if(o.somethingSelected())Zo({lineWise:!1,text:o.getSelections()});else if(o.options.lineWiseCopyCut){var k=Kc(o);Zo({lineWise:!0,text:k.text}),v.type=="cut"?o.setSelections(k.ranges,null,ye):(a.prevInput="",l.value=k.text.join(` +`),se(l))}else return;v.type=="cut"&&(o.state.cutIncoming=+new Date)}Te(l,"cut",f),Te(l,"copy",f),Te(e.scroller,"paste",function(v){if(Gn(e,v)||st(o,v))return;if(!l.dispatchEvent){o.state.pasteIncoming=+new Date,a.focus();return}var k=new Event("paste");k.clipboardData=v.clipboardData,l.dispatchEvent(k)}),Te(e.lineSpace,"selectstart",function(v){Gn(e,v)||St(v)}),Te(l,"compositionstart",function(){var v=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:v,range:o.markText(v,o.getCursor("to"),{className:"CodeMirror-composing"})}}),Te(l,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},vt.prototype.createField=function(e){this.wrapper=Yc(),this.textarea=this.wrapper.firstChild},vt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},vt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var l=yn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),v=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,l.top+v.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,l.left+v.left-f.left))}return o},vt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Z(a.cursorDiv,e.cursors),Z(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},vt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var r=this.cm;if(r.somethingSelected()){this.prevInput="";var a=r.getSelection();this.textarea.value=a,r.state.focused&&se(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},vt.prototype.getField=function(){return this.textarea},vt.prototype.supportsTouch=function(){return!1},vt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!z||q()!=this.textarea))try{this.textarea.focus()}catch(e){}},vt.prototype.blur=function(){this.textarea.blur()},vt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},vt.prototype.receivedFocus=function(){this.slowPoll()},vt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},vt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function a(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,a)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,a)},vt.prototype.poll=function(){var e=this,r=this.cm,a=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||An(a)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var l=a.value;if(l==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===l||A&&/[\uf700-\uf7ff]/.test(l))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=l.charCodeAt(0);if(f==8203&&!o&&(o="​"),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var v=0,k=Math.min(o.length,l.length);v1e3||l.indexOf(` +`)>-1?a.value=e.prevInput="":e.prevInput=l,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},vt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},vt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},vt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,l=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),v=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,jt)(a.doc,ir(f),ye);var x=l.style.cssText,C=r.wrapper.style.cssText,M=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",l.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(e.clientY-M.top-5)+"px; left: "+(e.clientX-M.left-5)+`px; z-index: 1000; background: `+(d?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var O;p&&(O=window.scrollY),o.input.focus(),p&&window.scrollTo(null,O),o.input.reset(),a.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function K(){if(l.selectionStart!=null){var oe=a.somethingSelected(),ue="​"+(oe?l.value:"");l.value="⇚",l.value=ue,r.prevInput=oe?"":"​",l.selectionStart=1,l.selectionEnd=ue.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=C,l.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=v),l.selectionStart!=null){(!d||d&&h<9)&&K();var oe=0,ue=function(){o.selForContextMenu==a.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput=="​"?Lt(a,mc)(a):oe++<10?o.detectingSelectAll=setTimeout(ue,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(ue,200)}}if(d&&h>=9&&K(),G){Bt(e);var ne=function(){Re(window,"mouseup",ne),setTimeout($,20)};De(window,"mouseup",ne)}else setTimeout($,50)},gt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},gt.prototype.setUneditable=function(){},gt.prototype.needsContentAttribute=!1;function zy(e,r){if(r=r?T(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=q();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var l;if(e.form&&(De(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;l=f.submit;try{var v=f.submit=function(){o(),f.submit=l,f.submit(),f.submit=v}}catch(x){}}r.finishInit=function(x){x.save=o,x.getTextArea=function(){return e},x.toTextArea=function(){x.toTextArea=isNaN,o(),e.parentNode.removeChild(x.getWrapperElement()),e.style.display="",e.form&&(Re(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var k=lt(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Py(e){e.off=Re,e.on=De,e.wheelEventPixels=Ub,e.Doc=Zt,e.splitLines=Dn,e.countColumn=ce,e.findColumn=Ge,e.isWordChar=X,e.Pass=ze,e.signal=ct,e.Line=Pr,e.changeEnd=or,e.scrollbarModel=$u,e.Pos=W,e.cmpPos=he,e.modes=bi,e.mimeModes=jn,e.resolveMode=Hn,e.getMode=yi,e.modeExtensions=Un,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=zr,e.commands=Ui,e.keyMap=Kn,e.keyName=Ic,e.isModifierKey=Tc,e.lookupKey=Yr,e.normalizeKeyMap=dy,e.StringStream=st,e.SharedTextMarker=Bi,e.TextMarker=sr,e.LineWidget=Ni,e.e_preventDefault=Ct,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=I,e.contains=Q,e.rmClass=J,e.keyNames=lr}Dy(lt),Iy(lt);var Ry="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&ie(Ry,Jo)<0&&(lt.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Jn(Zt),lt.inputStyles={textarea:gt,contenteditable:et},lt.defineMode=function(e){!lt.defaults.mode&&e!="null"&&(lt.defaults.mode=e),qr.apply(this,arguments)},lt.defineMIME=bn,lt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),lt.defineMIME("text/plain","null"),lt.defineExtension=function(e,r){lt.prototype[e]=r},lt.defineDocExtension=function(e,r){Zt.prototype[e]=r},lt.fromTextArea=zy,Py(lt),lt.version="5.58.1",lt})});var Ks=le((Vi,Gs)=>{!function(t,n){typeof Vi=="object"&&typeof Gs=="object"?Gs.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Vi=="object"?Vi.ClipboardJS=n():t.ClipboardJS=n()}(Vi,function(){return i={},t.m=n=[function(s,u){s.exports=function(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var h=c.hasAttribute("readonly");h||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var p=window.getSelection(),g=document.createRange();g.selectNodeContents(c),p.removeAllRanges(),p.addRange(g),d=p.toString()}return d}},function(s,u){function c(){}c.prototype={on:function(d,h,p){var g=this.e||(this.e={});return(g[d]||(g[d]=[])).push({fn:h,ctx:p}),this},once:function(d,h,p){var g=this;function y(){g.off(d,y),h.apply(p,arguments)}return y._=h,this.on(d,y,p)},emit:function(d){for(var h=[].slice.call(arguments,1),p=((this.e||(this.e={}))[d]||[]).slice(),g=0,y=p.length;g{(function(t){typeof Jc=="object"&&typeof ed=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("css",function(ee,J){var P=J.inline;J.propertyKeywords||(J=t.resolveMode("text/css"));var Z=ee.indentUnit,_=J.tokenHooks,V=J.documentTypes||{},j=J.mediaTypes||{},Q=J.mediaFeatures||{},q=J.mediaValueKeywords||{},I=J.propertyKeywords||{},H=J.nonStandardPropertyKeywords||{},ae=J.fontProperties||{},F=J.counterDescriptors||{},T=J.colorKeywords||{},ce=J.valueKeywords||{},de=J.allowNested,ie=J.lineComment,_e=J.supportsAtComponent===!0,ze,be;function we(X,se){return ze=se,X}function We(X,se){var te=X.next();if(_[te]){var Ne=_[te](X,se);if(Ne!==!1)return Ne}if(te=="@")return X.eatWhile(/[\w\\\-]/),we("def",X.current());if(te=="="||(te=="~"||te=="|")&&X.eat("="))return we(null,"compare");if(te=='"'||te=="'")return se.tokenize=Ge(te),se.tokenize(X,se);if(te=="#")return X.eatWhile(/[\w\\\-]/),we("atom","hash");if(te=="!")return X.match(/^\s*\w*/),we("keyword","important");if(/\d/.test(te)||te=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),we("number","unit");if(te==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),we("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?we("variable-2","variable-definition"):we("variable-2","variable");if(X.match(/^\w+-/))return we("meta","meta")}else return/[,+>*\/]/.test(te)?we(null,"select-op"):te=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?we("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(te)?we(null,te):X.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(X.current().toLowerCase())&&(se.tokenize=nt),we("variable callee","variable")):/[\w\\\-]/.test(te)?(X.eatWhile(/[\w\\\-]/),we("property","word")):we(null,null)}function Ge(X){return function(se,te){for(var Ne=!1,_t;(_t=se.next())!=null;){if(_t==X&&!Ne){X==")"&&se.backUp(1);break}Ne=!Ne&&_t=="\\"}return(_t==X||!Ne&&X!=")")&&(te.tokenize=null),we("string","string")}}function nt(X,se){return X.next(),X.match(/\s*[\"\')]/,!1)?se.tokenize=null:se.tokenize=Ge(")"),we(null,"(")}function Tt(X,se,te){this.type=X,this.indent=se,this.prev=te}function xe(X,se,te,Ne){return X.context=new Tt(te,se.indentation()+(Ne===!1?0:Z),X.context),te}function tt(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function pt(X,se,te){return Fe[te.context.type](X,se,te)}function mt(X,se,te,Ne){for(var _t=Ne||1;_t>0;_t--)te.context=te.context.prev;return pt(X,se,te)}function Wt(X){var se=X.current().toLowerCase();ce.hasOwnProperty(se)?be="atom":T.hasOwnProperty(se)?be="keyword":be="variable"}var Fe={};return Fe.top=function(X,se,te){if(X=="{")return xe(te,se,"block");if(X=="}"&&te.context.prev)return tt(te);if(_e&&/@component/i.test(X))return xe(te,se,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return xe(te,se,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return xe(te,se,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return te.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return xe(te,se,"at");if(X=="hash")be="builtin";else if(X=="word")be="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return xe(te,se,"interpolation");if(X==":")return"pseudo";if(de&&X=="(")return xe(te,se,"parens")}return te.context.type},Fe.block=function(X,se,te){if(X=="word"){var Ne=se.current().toLowerCase();return I.hasOwnProperty(Ne)?(be="property","maybeprop"):H.hasOwnProperty(Ne)?(be="string-2","maybeprop"):de?(be=se.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(be+=" error","maybeprop")}else return X=="meta"?"block":!de&&(X=="hash"||X=="qualifier")?(be="error","block"):Fe.top(X,se,te)},Fe.maybeprop=function(X,se,te){return X==":"?xe(te,se,"prop"):pt(X,se,te)},Fe.prop=function(X,se,te){if(X==";")return tt(te);if(X=="{"&&de)return xe(te,se,"propBlock");if(X=="}"||X=="{")return mt(X,se,te);if(X=="(")return xe(te,se,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(se.current()))be+=" error";else if(X=="word")Wt(se);else if(X=="interpolation")return xe(te,se,"interpolation");return"prop"},Fe.propBlock=function(X,se,te){return X=="}"?tt(te):X=="word"?(be="property","maybeprop"):te.context.type},Fe.parens=function(X,se,te){return X=="{"||X=="}"?mt(X,se,te):X==")"?tt(te):X=="("?xe(te,se,"parens"):X=="interpolation"?xe(te,se,"interpolation"):(X=="word"&&Wt(se),"parens")},Fe.pseudo=function(X,se,te){return X=="meta"?"pseudo":X=="word"?(be="variable-3",te.context.type):pt(X,se,te)},Fe.documentTypes=function(X,se,te){return X=="word"&&V.hasOwnProperty(se.current())?(be="tag",te.context.type):Fe.atBlock(X,se,te)},Fe.atBlock=function(X,se,te){if(X=="(")return xe(te,se,"atBlock_parens");if(X=="}"||X==";")return mt(X,se,te);if(X=="{")return tt(te)&&xe(te,se,de?"block":"top");if(X=="interpolation")return xe(te,se,"interpolation");if(X=="word"){var Ne=se.current().toLowerCase();Ne=="only"||Ne=="not"||Ne=="and"||Ne=="or"?be="keyword":j.hasOwnProperty(Ne)?be="attribute":Q.hasOwnProperty(Ne)?be="property":q.hasOwnProperty(Ne)?be="keyword":I.hasOwnProperty(Ne)?be="property":H.hasOwnProperty(Ne)?be="string-2":ce.hasOwnProperty(Ne)?be="atom":T.hasOwnProperty(Ne)?be="keyword":be="error"}return te.context.type},Fe.atComponentBlock=function(X,se,te){return X=="}"?mt(X,se,te):X=="{"?tt(te)&&xe(te,se,de?"block":"top",!1):(X=="word"&&(be="error"),te.context.type)},Fe.atBlock_parens=function(X,se,te){return X==")"?tt(te):X=="{"||X=="}"?mt(X,se,te,2):Fe.atBlock(X,se,te)},Fe.restricted_atBlock_before=function(X,se,te){return X=="{"?xe(te,se,"restricted_atBlock"):X=="word"&&te.stateArg=="@counter-style"?(be="variable","restricted_atBlock_before"):pt(X,se,te)},Fe.restricted_atBlock=function(X,se,te){return X=="}"?(te.stateArg=null,tt(te)):X=="word"?(te.stateArg=="@font-face"&&!ae.hasOwnProperty(se.current().toLowerCase())||te.stateArg=="@counter-style"&&!F.hasOwnProperty(se.current().toLowerCase())?be="error":be="property","maybeprop"):"restricted_atBlock"},Fe.keyframes=function(X,se,te){return X=="word"?(be="variable","keyframes"):X=="{"?xe(te,se,"top"):pt(X,se,te)},Fe.at=function(X,se,te){return X==";"?tt(te):X=="{"||X=="}"?mt(X,se,te):(X=="word"?be="tag":X=="hash"&&(be="builtin"),"at")},Fe.interpolation=function(X,se,te){return X=="}"?tt(te):X=="{"||X==";"?mt(X,se,te):(X=="word"?be="variable":X!="variable"&&X!="("&&X!=")"&&(be="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:P?"block":"top",stateArg:null,context:new Tt(P?"block":"top",X||0,null)}},token:function(X,se){if(!se.tokenize&&X.eatSpace())return null;var te=(se.tokenize||We)(X,se);return te&&typeof te=="object"&&(ze=te[1],te=te[0]),be=te,ze!="comment"&&(se.state=Fe[se.state](ze,X,se)),be},indent:function(X,se){var te=X.context,Ne=se&&se.charAt(0),_t=te.indent;return te.type=="prop"&&(Ne=="}"||Ne==")")&&(te=te.prev),te.prev&&(Ne=="}"&&(te.type=="block"||te.type=="top"||te.type=="interpolation"||te.type=="restricted_atBlock")?(te=te.prev,_t=te.indent):(Ne==")"&&(te.type=="parens"||te.type=="atBlock_parens")||Ne=="{"&&(te.type=="at"||te.type=="atBlock"))&&(_t=Math.max(0,te.indent-Z))),_t},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:ie,fold:"brace"}});function n(ee){for(var J={},P=0;P{(function(t){typeof td=="object"&&typeof nd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(q,I,H,ae,F,T){this.indented=q,this.column=I,this.type=H,this.info=ae,this.align=F,this.prev=T}function i(q,I,H,ae){var F=q.indented;return q.context&&q.context.type=="statement"&&H!="statement"&&(F=q.context.indented),q.context=new n(F,I,H,ae,null,q.context)}function s(q){var I=q.context.type;return(I==")"||I=="]"||I=="}")&&(q.indented=q.context.indented),q.context=q.context.prev}function u(q,I,H){if(I.prevToken=="variable"||I.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(q.string.slice(0,H)))return!0;if(I.typeAtEndOfLine&&q.column()==q.indentation())return!0}function c(q){for(;;){if(!q||q.type=="top")return!0;if(q.type=="}"&&q.prev.info!="namespace")return!1;q=q.prev}}t.defineMode("clike",function(q,I){var H=q.indentUnit,ae=I.statementIndentUnit||H,F=I.dontAlignCalls,T=I.keywords||{},ce=I.types||{},de=I.builtin||{},ie=I.blockKeywords||{},_e=I.defKeywords||{},ze=I.atoms||{},be=I.hooks||{},we=I.multiLineStrings,We=I.indentStatements!==!1,Ge=I.indentSwitch!==!1,nt=I.namespaceSeparator,Tt=I.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,xe=I.numberStart||/[\d\.]/,tt=I.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,pt=I.isOperatorChar||/[+\-*&%=<>!?|\/]/,mt=I.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Wt=I.isReservedIdentifier||!1,Fe,X;function se(Ee,Le){var ye=Ee.next();if(be[ye]){var Te=be[ye](Ee,Le);if(Te!==!1)return Te}if(ye=='"'||ye=="'")return Le.tokenize=te(ye),Le.tokenize(Ee,Le);if(Tt.test(ye))return Fe=ye,null;if(xe.test(ye)){if(Ee.backUp(1),Ee.match(tt))return"number";Ee.next()}if(ye=="/"){if(Ee.eat("*"))return Le.tokenize=Ne,Ne(Ee,Le);if(Ee.eat("/"))return Ee.skipToEnd(),"comment"}if(pt.test(ye)){for(;!Ee.match(/^\/[\/*]/,!1)&&Ee.eat(pt););return"operator"}if(Ee.eatWhile(mt),nt)for(;Ee.match(nt);)Ee.eatWhile(mt);var Ve=Ee.current();return h(T,Ve)?(h(ie,Ve)&&(Fe="newstatement"),h(_e,Ve)&&(X=!0),"keyword"):h(ce,Ve)?"type":h(de,Ve)||Wt&&Wt(Ve)?(h(ie,Ve)&&(Fe="newstatement"),"builtin"):h(ze,Ve)?"atom":"variable"}function te(Ee){return function(Le,ye){for(var Te=!1,Ve,hn=!1;(Ve=Le.next())!=null;){if(Ve==Ee&&!Te){hn=!0;break}Te=!Te&&Ve=="\\"}return(hn||!(Te||we))&&(ye.tokenize=null),"string"}}function Ne(Ee,Le){for(var ye=!1,Te;Te=Ee.next();){if(Te=="/"&&ye){Le.tokenize=null;break}ye=Te=="*"}return"comment"}function _t(Ee,Le){I.typeFirstDefinitions&&Ee.eol()&&c(Le.context)&&(Le.typeAtEndOfLine=u(Ee,Le,Ee.pos))}return{startState:function(Ee){return{tokenize:null,context:new n((Ee||0)-H,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ee,Le){var ye=Le.context;if(Ee.sol()&&(ye.align==null&&(ye.align=!1),Le.indented=Ee.indentation(),Le.startOfLine=!0),Ee.eatSpace())return _t(Ee,Le),null;Fe=X=null;var Te=(Le.tokenize||se)(Ee,Le);if(Te=="comment"||Te=="meta")return Te;if(ye.align==null&&(ye.align=!0),Fe==";"||Fe==":"||Fe==","&&Ee.match(/^\s*(?:\/\/.*)?$/,!1))for(;Le.context.type=="statement";)s(Le);else if(Fe=="{")i(Le,Ee.column(),"}");else if(Fe=="[")i(Le,Ee.column(),"]");else if(Fe=="(")i(Le,Ee.column(),")");else if(Fe=="}"){for(;ye.type=="statement";)ye=s(Le);for(ye.type=="}"&&(ye=s(Le));ye.type=="statement";)ye=s(Le)}else Fe==ye.type?s(Le):We&&((ye.type=="}"||ye.type=="top")&&Fe!=";"||ye.type=="statement"&&Fe=="newstatement")&&i(Le,Ee.column(),"statement",Ee.current());if(Te=="variable"&&(Le.prevToken=="def"||I.typeFirstDefinitions&&u(Ee,Le,Ee.start)&&c(Le.context)&&Ee.match(/^\s*\(/,!1))&&(Te="def"),be.token){var Ve=be.token(Ee,Le,Te);Ve!==void 0&&(Te=Ve)}return Te=="def"&&I.styleDefs===!1&&(Te="variable"),Le.startOfLine=!1,Le.prevToken=X?"def":Te||Fe,_t(Ee,Le),Te},indent:function(Ee,Le){if(Ee.tokenize!=se&&Ee.tokenize!=null||Ee.typeAtEndOfLine)return t.Pass;var ye=Ee.context,Te=Le&&Le.charAt(0),Ve=Te==ye.type;if(ye.type=="statement"&&Te=="}"&&(ye=ye.prev),I.dontIndentStatements)for(;ye.type=="statement"&&I.dontIndentStatements.test(ye.info);)ye=ye.prev;if(be.indent){var hn=be.indent(Ee,ye,Le,H);if(typeof hn=="number")return hn}var Pt=ye.prev&&ye.prev.info=="switch";if(I.allmanIndentation&&/[{(]/.test(Te)){for(;ye.type!="top"&&ye.type!="}";)ye=ye.prev;return ye.indented}return ye.type=="statement"?ye.indented+(Te=="{"?0:ae):ye.align&&(!F||ye.type!=")")?ye.column+(Ve?0:1):ye.type==")"&&!Ve?ye.indented+ae:ye.indented+(Ve?0:H)+(!Ve&&Pt&&!/^(?:case|default)\b/.test(Le)?H:0)},electricInput:Ge?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function d(q){for(var I={},H=q.split(" "),ae=0;ae!?|\/#:@]/,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return q.match('""')?(I.tokenize=Z,I.tokenize(q,I)):!1},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(q,I){var H=I.context;return H.type=="}"&&H.align&&q.eat(">")?(I.context=new n(H.indented,H.column,H.type,H.info,null,H.prev),"operator"):!1},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function V(q){return function(I,H){for(var ae=!1,F,T=!1;!I.eol();){if(!q&&!ae&&I.match('"')){T=!0;break}if(q&&I.match('"""')){T=!0;break}F=I.next(),!ae&&F=="$"&&I.match("{")&&I.skipTo("}"),ae=!ae&&F=="\\"&&!q}return(T||!q)&&(H.tokenize=null),"string"}}P("text/x-kotlin",{name:"clike",keywords:d("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:d("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:d("catch class do else finally for if where try while enum"),defKeywords:d("class val var object interface fun"),atoms:d("true false null this"),hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},"*":function(q,I){return I.prevToken=="."?"variable":"operator"},'"':function(q,I){return I.tokenize=V(q.match('""')),I.tokenize(q,I)},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1},indent:function(q,I,H,ae){var F=H&&H.charAt(0);if((q.prevToken=="}"||q.prevToken==")")&&H=="")return q.indented;if(q.prevToken=="operator"&&H!="}"&&q.context.type!="}"||q.prevToken=="variable"&&F=="."||(q.prevToken=="}"||q.prevToken==")")&&F==".")return ae*2+I.indented;if(I.align&&I.type=="}")return I.indented+(q.context.type==(H||"").charAt(0)?0:ae)}},modeProps:{closeBrackets:{triples:'"'}}}),P(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":A},modeProps:{fold:["brace","include"]}}),P("text/x-nesc",{name:"clike",keywords:d(p+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:D,blockKeywords:d(S),atoms:d("null true false"),hooks:{"#":A},modeProps:{fold:["brace","include"]}}),P("text/x-objectivec",{name:"clike",keywords:d(p+" "+y),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:d(z+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R},modeProps:{fold:["brace","include"]}}),P("text/x-objectivec++",{name:"clike",keywords:d(p+" "+y+" "+g),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:d(z+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R,u:B,U:B,L:B,R:B,"0":Y,"1":Y,"2":Y,"3":Y,"4":Y,"5":Y,"6":Y,"7":Y,"8":Y,"9":Y,token:function(q,I,H){if(H=="variable"&&q.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&G(q.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),P("text/x-squirrel",{name:"clike",keywords:d("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:D,blockKeywords:d("case catch class else for foreach if switch try while"),defKeywords:d("function local class"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"#":A},modeProps:{fold:["brace","include"]}});var j=null;function Q(q){return function(I,H){for(var ae=!1,F,T=!1;!I.eol();){if(!ae&&I.match('"')&&(q=="single"||I.match('""'))){T=!0;break}if(!ae&&I.match("``")){j=Q(q),T=!0;break}F=I.next(),ae=q=="single"&&!ae&&F=="\\"}return T&&(H.tokenize=null),"string"}}P("text/x-ceylon",{name:"clike",keywords:d("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(q){var I=q.charAt(0);return I===I.toUpperCase()&&I!==I.toLowerCase()},blockKeywords:d("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:d("class dynamic function interface module object package value"),builtin:d("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:d("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return I.tokenize=Q(q.match('""')?"triple":"single"),I.tokenize(q,I)},"`":function(q,I){return!j||!q.match("`")?!1:(I.tokenize=j,j=null,I.tokenize(q,I))},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(q,I,H){if((H=="variable"||H=="type")&&I.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var od=le((rd,id)=>{(function(t){typeof rd=="object"&&typeof id=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("diff",function(){var n={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var s=i.string.search(/[\t ]+?$/);if(!i.sol()||s===0)return i.skipToEnd(),("error "+(n[i.string.charAt(0)]||"")).replace(/ $/,"");var u=n[i.peek()]||i.skipToEnd();return s===-1?i.skipToEnd():i.pos=s,u}}}),t.defineMIME("text/x-diff","diff")})});var ld=le((ad,sd)=>{(function(t){typeof ad=="object"&&typeof sd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("fortran",function(){function n(g){for(var y={},m=0;m\/\:]/,d=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function h(g,y){if(g.match(d))return"operator";var m=g.next();if(m=="!")return g.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=p(m),y.tokenize(g,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(c.test(m))return g.eatWhile(c),"operator";g.eatWhile(/[\w\$_]/);var b=g.current().toLowerCase();return i.hasOwnProperty(b)?"keyword":s.hasOwnProperty(b)||u.hasOwnProperty(b)?"builtin":"variable"}function p(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||h)(g,y);return m=="comment"||m=="meta",m}}}),t.defineMIME("text/x-fortran","fortran")})});var dd=le((ud,cd)=>{(function(t){typeof ud=="object"&&typeof cd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("go",function(n){var i=n.indentUnit,s={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},u={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},c=/[+\-*&^%:=<>!|\/]/,d;function h(w,D){var E=w.next();if(E=='"'||E=="'"||E=="`")return D.tokenize=p(E),D.tokenize(w,D);if(/[\d\.]/.test(E))return E=="."?w.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?w.match(/^[xX][0-9a-fA-F]+/)||w.match(/^0[0-7]+/):w.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return d=E,null;if(E=="/"){if(w.eat("*"))return D.tokenize=g,g(w,D);if(w.eat("/"))return w.skipToEnd(),"comment"}if(c.test(E))return w.eatWhile(c),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var S=w.current();return s.propertyIsEnumerable(S)?((S=="case"||S=="default")&&(d="case"),"keyword"):u.propertyIsEnumerable(S)?"atom":"variable"}function p(w){return function(D,E){for(var S=!1,z,A=!1;(z=D.next())!=null;){if(z==w&&!S){A=!0;break}S=!S&&w!="`"&&z=="\\"}return(A||!(S||w=="`"))&&(E.tokenize=h),"string"}}function g(w,D){for(var E=!1,S;S=w.next();){if(S=="/"&&E){D.tokenize=h;break}E=S=="*"}return"comment"}function y(w,D,E,S,z){this.indented=w,this.column=D,this.type=E,this.align=S,this.prev=z}function m(w,D,E){return w.context=new y(w.indented,D,E,null,w.context)}function b(w){if(!w.context.prev)return;var D=w.context.type;return(D==")"||D=="]"||D=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}return{startState:function(w){return{tokenize:null,context:new y((w||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,D){var E=D.context;if(w.sol()&&(E.align==null&&(E.align=!1),D.indented=w.indentation(),D.startOfLine=!0,E.type=="case"&&(E.type="}")),w.eatSpace())return null;d=null;var S=(D.tokenize||h)(w,D);return S=="comment"||(E.align==null&&(E.align=!0),d=="{"?m(D,w.column(),"}"):d=="["?m(D,w.column(),"]"):d=="("?m(D,w.column(),")"):d=="case"?E.type="case":(d=="}"&&E.type=="}"||d==E.type)&&b(D),D.startOfLine=!1),S},indent:function(w,D){if(w.tokenize!=h&&w.tokenize!=null)return t.Pass;var E=w.context,S=D&&D.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(D))return w.context.type="}",E.indented;var z=S==E.type;return E.align?E.column+(z?0:1):E.indented+(z?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),t.defineMIME("text/x-go","go")})});var pd=le((hd,fd)=>{(function(t){typeof hd=="object"&&typeof fd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haskell",function(n,i){function s(A,R,U){return R(U),U(A,R)}var u=/[a-z_]/,c=/[A-Z]/,d=/\d/,h=/[0-9A-Fa-f]/,p=/[0-7]/,g=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,b=/[ \t\v\f]/;function w(A,R){if(A.eatWhile(b))return null;var U=A.next();if(m.test(U)){if(U=="{"&&A.eat("-")){var Y="comment";return A.eat("#")&&(Y="meta"),s(A,R,D(Y,1))}return null}if(U=="'")return A.eat("\\"),A.next(),A.eat("'")?"string":"string error";if(U=='"')return s(A,R,E);if(c.test(U))return A.eatWhile(g),A.eat(".")?"qualifier":"variable-2";if(u.test(U))return A.eatWhile(g),"variable";if(d.test(U)){if(U=="0"){if(A.eat(/[xX]/))return A.eatWhile(h),"integer";if(A.eat(/[oO]/))return A.eatWhile(p),"number"}A.eatWhile(d);var Y="number";return A.match(/^\.\d+/)&&(Y="number"),A.eat(/[eE]/)&&(Y="number",A.eat(/[-+]/),A.eatWhile(d)),Y}if(U=="."&&A.eat("."))return"keyword";if(y.test(U)){if(U=="-"&&A.eat(/-/)&&(A.eatWhile(/-/),!A.eat(y)))return A.skipToEnd(),"comment";var Y="variable";return U==":"&&(Y="variable-2"),A.eatWhile(y),Y}return"error"}function D(A,R){return R==0?w:function(U,Y){for(var B=R;!U.eol();){var G=U.next();if(G=="{"&&U.eat("-"))++B;else if(G=="-"&&U.eat("}")&&(--B,B==0))return Y(w),A}return Y(D(A,B)),A}}function E(A,R){for(;!A.eol();){var U=A.next();if(U=='"')return R(w),"string";if(U=="\\"){if(A.eol()||A.eat(b))return R(S),"string";A.eat("&")||A.next()}}return R(w),"string error"}function S(A,R){return A.eat("\\")?s(A,R,E):(A.next(),R(w),"error")}var z=function(){var A={};function R(B){return function(){for(var G=0;G","@","~","=>"),R("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),R("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),R("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var U=i.overrideKeywords;if(U)for(var Y in U)U.hasOwnProperty(Y)&&(A[Y]=U[Y]);return A}();return{startState:function(){return{f:w}},copyState:function(A){return{f:A.f}},token:function(A,R){var U=R.f(A,function(B){R.f=B}),Y=A.current();return z.hasOwnProperty(Y)?z[Y]:U},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),t.defineMIME("text/x-haskell","haskell")})});var ta=le((md,gd)=>{(function(t){typeof md=="object"&&typeof gd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";var n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(s,u){var c=s.indentUnit,d={},h=u.htmlMode?n:i;for(var p in h)d[p]=h[p];for(var p in u)d[p]=u[p];var g,y;function m(_,V){function j(I){return V.tokenize=I,I(_,V)}var Q=_.next();if(Q=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(D("atom","]]>")):null:_.match("--")?j(D("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(E(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),V.tokenize=D("meta","?>"),"meta"):(g=_.eat("/")?"closeTag":"openTag",V.tokenize=b,"tag bracket");if(Q=="&"){var q;return _.eat("#")?_.eat("x")?q=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):q=_.eatWhile(/[\d]/)&&_.eat(";"):q=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),q?"atom":"error"}else return _.eatWhile(/[^&<]/),null}m.isInText=!0;function b(_,V){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return V.tokenize=m,g=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return g="equals",null;if(j=="<"){V.tokenize=m,V.state=R,V.tagName=V.tagStart=null;var Q=V.tokenize(_,V);return Q?Q+" tag error":"tag error"}else return/[\'\"]/.test(j)?(V.tokenize=w(j),V.stringStartCol=_.column(),V.tokenize(_,V)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var V=function(j,Q){for(;!j.eol();)if(j.next()==_){Q.tokenize=b;break}return"string"};return V.isInAttribute=!0,V}function D(_,V){return function(j,Q){for(;!j.eol();){if(j.match(V)){Q.tokenize=m;break}j.next()}return _}}function E(_){return function(V,j){for(var Q;(Q=V.next())!=null;){if(Q=="<")return j.tokenize=E(_+1),j.tokenize(V,j);if(Q==">")if(_==1){j.tokenize=m;break}else return j.tokenize=E(_-1),j.tokenize(V,j)}return"meta"}}function S(_,V,j){this.prev=_.context,this.tagName=V,this.indent=_.indented,this.startOfLine=j,(d.doNotIndent.hasOwnProperty(V)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function z(_){_.context&&(_.context=_.context.prev)}function A(_,V){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!d.contextGrabbers.hasOwnProperty(j)||!d.contextGrabbers[j].hasOwnProperty(V))return;z(_)}}function R(_,V,j){return _=="openTag"?(j.tagStart=V.column(),U):_=="closeTag"?Y:R}function U(_,V,j){return _=="word"?(j.tagName=V.current(),y="tag",ee):d.allowMissingTagName&&_=="endTag"?(y="tag bracket",ee(_,V,j)):(y="error",U)}function Y(_,V,j){if(_=="word"){var Q=V.current();return j.context&&j.context.tagName!=Q&&d.implicitlyClosed.hasOwnProperty(j.context.tagName)&&z(j),j.context&&j.context.tagName==Q||d.matchClosing===!1?(y="tag",B):(y="tag error",G)}else return d.allowMissingTagName&&_=="endTag"?(y="tag bracket",B(_,V,j)):(y="error",G)}function B(_,V,j){return _!="endTag"?(y="error",B):(z(j),R)}function G(_,V,j){return y="error",B(_,V,j)}function ee(_,V,j){if(_=="word")return y="attribute",J;if(_=="endTag"||_=="selfcloseTag"){var Q=j.tagName,q=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(Q)?A(j,Q):(A(j,Q),j.context=new S(j,Q,q==j.indented)),R}return y="error",ee}function J(_,V,j){return _=="equals"?P:(d.allowMissing||(y="error"),ee(_,V,j))}function P(_,V,j){return _=="string"?Z:_=="word"&&d.allowUnquoted?(y="string",ee):(y="error",ee(_,V,j))}function Z(_,V,j){return _=="string"?Z:ee(_,V,j)}return{startState:function(_){var V={tokenize:m,state:R,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(V.baseIndent=_),V},token:function(_,V){if(!V.tagName&&_.sol()&&(V.indented=_.indentation()),_.eatSpace())return null;g=null;var j=V.tokenize(_,V);return(j||g)&&j!="comment"&&(y=null,V.state=V.state(g||j,_,V),y&&(j=y=="error"?j+" error":y)),j},indent:function(_,V,j){var Q=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+c;if(Q&&Q.noIndent)return t.Pass;if(_.tokenize!=b&&_.tokenize!=m)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return d.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+c*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/$/,blockCommentStart:"",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(_){_.state==P&&(_.state=ee)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var V=[],j=_.context;j;j=j.prev)j.tagName&&V.push(j.tagName);return V.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Xs=le((vd,bd)=>{(function(t){typeof vd=="object"&&typeof bd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("javascript",function(n,i){var s=n.indentUnit,u=i.statementIndent,c=i.jsonld,d=i.json||c,h=i.typescript,p=i.wordCharacters||/[\w$\xa1-\uffff]/,g=function(){function L(St){return{type:St,style:"keyword"}}var N=L("keyword a"),re=L("keyword b"),W=L("keyword c"),he=L("keyword d"),He=L("operator"),Ze={type:"atom",style:"atom"};return{if:L("if"),while:N,with:N,else:re,do:re,try:re,finally:re,return:he,break:he,continue:he,new:L("new"),delete:W,void:W,throw:W,debugger:L("debugger"),var:L("var"),const:L("var"),let:L("var"),function:L("function"),catch:L("catch"),for:L("for"),switch:L("switch"),case:L("case"),default:L("default"),in:He,typeof:He,instanceof:He,true:Ze,false:Ze,null:Ze,undefined:Ze,NaN:Ze,Infinity:Ze,this:L("this"),class:L("class"),super:L("atom"),yield:W,export:L("export"),import:L("import"),extends:W,await:W}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(L){for(var N=!1,re,W=!1;(re=L.next())!=null;){if(!N){if(re=="/"&&!W)return;re=="["?W=!0:W&&re=="]"&&(W=!1)}N=!N&&re=="\\"}}var w,D;function E(L,N,re){return w=L,D=re,N}function S(L,N){var re=L.next();if(re=='"'||re=="'")return N.tokenize=z(re),N.tokenize(L,N);if(re=="."&&L.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(re=="."&&L.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(re))return E(re);if(re=="="&&L.eat(">"))return E("=>","operator");if(re=="0"&&L.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(re))return L.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(re=="/")return L.eat("*")?(N.tokenize=A,A(L,N)):L.eat("/")?(L.skipToEnd(),E("comment","comment")):Ke(L,N,1)?(b(L),L.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(L.eat("="),E("operator","operator",L.current()));if(re=="`")return N.tokenize=R,R(L,N);if(re=="#"&&L.peek()=="!")return L.skipToEnd(),E("meta","meta");if(re=="#"&&L.eatWhile(p))return E("variable","property");if(re=="<"&&L.match("!--")||re=="-"&&L.match("->")&&!/\S/.test(L.string.slice(0,L.start)))return L.skipToEnd(),E("comment","comment");if(y.test(re))return(re!=">"||!N.lexical||N.lexical.type!=">")&&(L.eat("=")?(re=="!"||re=="=")&&L.eat("="):/[<>*+\-|&?]/.test(re)&&(L.eat(re),re==">"&&L.eat(re))),re=="?"&&L.eat(".")?E("."):E("operator","operator",L.current());if(p.test(re)){L.eatWhile(p);var W=L.current();if(N.lastType!="."){if(g.propertyIsEnumerable(W)){var he=g[W];return E(he.type,he.style,W)}if(W=="async"&&L.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",W)}return E("variable","variable",W)}}function z(L){return function(N,re){var W=!1,he;if(c&&N.peek()=="@"&&N.match(m))return re.tokenize=S,E("jsonld-keyword","meta");for(;(he=N.next())!=null&&!(he==L&&!W);)W=!W&&he=="\\";return W||(re.tokenize=S),E("string","string")}}function A(L,N){for(var re=!1,W;W=L.next();){if(W=="/"&&re){N.tokenize=S;break}re=W=="*"}return E("comment","comment")}function R(L,N){for(var re=!1,W;(W=L.next())!=null;){if(!re&&(W=="`"||W=="$"&&L.eat("{"))){N.tokenize=S;break}re=!re&&W=="\\"}return E("quasi","string-2",L.current())}var U="([{}])";function Y(L,N){N.fatArrowAt&&(N.fatArrowAt=null);var re=L.string.indexOf("=>",L.start);if(re<0)return;if(h){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(L.string.slice(L.start,re));W&&(re=W.index)}for(var he=0,He=!1,Ze=re-1;Ze>=0;--Ze){var St=L.string.charAt(Ze),Yt=U.indexOf(St);if(Yt>=0&&Yt<3){if(!he){++Ze;break}if(--he==0){St=="("&&(He=!0);break}}else if(Yt>=3&&Yt<6)++he;else if(p.test(St))He=!0;else if(/["'\/`]/.test(St))for(;;--Ze){if(Ze==0)return;var Co=L.string.charAt(Ze-1);if(Co==St&&L.string.charAt(Ze-2)!="\\"){Ze--;break}}else if(He&&!he){++Ze;break}}He&&!he&&(N.fatArrowAt=Ze)}var B={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function G(L,N,re,W,he,He){this.indented=L,this.column=N,this.type=re,this.prev=he,this.info=He,W!=null&&(this.align=W)}function ee(L,N){for(var re=L.localVars;re;re=re.next)if(re.name==N)return!0;for(var W=L.context;W;W=W.prev)for(var re=W.vars;re;re=re.next)if(re.name==N)return!0}function J(L,N,re,W,he){var He=L.cc;for(P.state=L,P.stream=he,P.marked=null,P.cc=He,P.style=N,L.lexical.hasOwnProperty("align")||(L.lexical.align=!0);;){var Ze=He.length?He.pop():d?we:ze;if(Ze(re,W)){for(;He.length&&He[He.length-1].lex;)He.pop()();return P.marked?P.marked:re=="variable"&&ee(L,W)?"variable-2":N}}}var P={state:null,column:null,marked:null,cc:null};function Z(){for(var L=arguments.length-1;L>=0;L--)P.cc.push(arguments[L])}function _(){return Z.apply(null,arguments),!0}function V(L,N){for(var re=N;re;re=re.next)if(re.name==L)return!0;return!1}function j(L){var N=P.state;if(P.marked="def",N.context){if(N.lexical.info=="var"&&N.context&&N.context.block){var re=Q(L,N.context);if(re!=null){N.context=re;return}}else if(!V(L,N.localVars)){N.localVars=new H(L,N.localVars);return}}i.globalVars&&!V(L,N.globalVars)&&(N.globalVars=new H(L,N.globalVars))}function Q(L,N){if(N)if(N.block){var re=Q(L,N.prev);return re?re==N.prev?N:new I(re,N.vars,!0):null}else return V(L,N.vars)?N:new I(N.prev,new H(L,N.vars),!1);else return null}function q(L){return L=="public"||L=="private"||L=="protected"||L=="abstract"||L=="readonly"}function I(L,N,re){this.prev=L,this.vars=N,this.block=re}function H(L,N){this.name=L,this.next=N}var ae=new H("this",new H("arguments",null));function F(){P.state.context=new I(P.state.context,P.state.localVars,!1),P.state.localVars=ae}function T(){P.state.context=new I(P.state.context,P.state.localVars,!0),P.state.localVars=null}function ce(){P.state.localVars=P.state.context.vars,P.state.context=P.state.context.prev}ce.lex=!0;function de(L,N){var re=function(){var W=P.state,he=W.indented;if(W.lexical.type=="stat")he=W.lexical.indented;else for(var He=W.lexical;He&&He.type==")"&&He.align;He=He.prev)he=He.indented;W.lexical=new G(he,P.stream.column(),L,null,W.lexical,N)};return re.lex=!0,re}function ie(){var L=P.state;L.lexical.prev&&(L.lexical.type==")"&&(L.indented=L.lexical.indented),L.lexical=L.lexical.prev)}ie.lex=!0;function _e(L){function N(re){return re==L?_():L==";"||re=="}"||re==")"||re=="]"?Z():_(N)}return N}function ze(L,N){return L=="var"?_(de("vardef",N),fr,_e(";"),ie):L=="keyword a"?_(de("form"),Ge,ze,ie):L=="keyword b"?_(de("form"),ze,ie):L=="keyword d"?P.stream.match(/^\s*$/,!1)?_():_(de("stat"),Tt,_e(";"),ie):L=="debugger"?_(_e(";")):L=="{"?_(de("}"),T,hn,ie,ce):L==";"?_():L=="if"?(P.state.lexical.info=="else"&&P.state.cc[P.state.cc.length-1]==ie&&P.state.cc.pop()(),_(de("form"),Ge,ze,ie,xo)):L=="function"?_(An):L=="for"?_(de("form"),Fr,ze,ie):L=="class"||h&&N=="interface"?(P.marked="keyword",_(de("form",L=="class"?L:N),jn,ie)):L=="variable"?h&&N=="declare"?(P.marked="keyword",_(ze)):h&&(N=="module"||N=="enum"||N=="type")&&P.stream.match(/^\s*\w/,!1)?(P.marked="keyword",N=="enum"?_(Tn):N=="type"?_(Mr,_e("operator"),Re,_e(";")):_(de("form"),Bt,_e("{"),de("}"),hn,ie,ie)):h&&N=="namespace"?(P.marked="keyword",_(de("form"),we,ze,ie)):h&&N=="abstract"?(P.marked="keyword",_(ze)):_(de("stat"),Ne):L=="switch"?_(de("form"),Ge,_e("{"),de("}","switch"),T,hn,ie,ie,ce):L=="case"?_(we,_e(":")):L=="default"?_(_e(":")):L=="catch"?_(de("form"),F,be,ze,ie,ce):L=="export"?_(de("stat"),yi,ie):L=="import"?_(de("stat"),Qa,ie):L=="async"?_(ze):N=="@"?_(we,ze):Z(de("stat"),we,_e(";"),ie)}function be(L){if(L=="(")return _(Bn,_e(")"))}function we(L,N){return nt(L,N,!1)}function We(L,N){return nt(L,N,!0)}function Ge(L){return L!="("?Z():_(de(")"),Tt,_e(")"),ie)}function nt(L,N,re){if(P.state.fatArrowAt==P.stream.start){var W=re?Fe:Wt;if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,_e("=>"),W,ce);if(L=="variable")return Z(F,Bt,_e("=>"),W,ce)}var he=re?tt:xe;return B.hasOwnProperty(L)?_(he):L=="function"?_(An,he):L=="class"||h&&N=="interface"?(P.marked="keyword",_(de("form"),bi,ie)):L=="keyword c"||L=="async"?_(re?We:we):L=="("?_(de(")"),Tt,_e(")"),ie,he):L=="operator"||L=="spread"?_(re?We:we):L=="["?_(de("]"),ke,ie,he):L=="{"?Ve(Ee,"}",null,he):L=="quasi"?Z(pt,he):L=="new"?_(X(re)):L=="import"?_(we):_()}function Tt(L){return L.match(/[;\}\)\],]/)?Z():Z(we)}function xe(L,N){return L==","?_(Tt):tt(L,N,!1)}function tt(L,N,re){var W=re==!1?xe:tt,he=re==!1?we:We;if(L=="=>")return _(F,re?Fe:Wt,ce);if(L=="operator")return/\+\+|--/.test(N)||h&&N=="!"?_(W):h&&N=="<"&&P.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(de(">"),Te(Re,">"),ie,W):N=="?"?_(we,_e(":"),he):_(he);if(L=="quasi")return Z(pt,W);if(L==";")return;if(L=="(")return Ve(We,")","call",W);if(L==".")return _(_t,W);if(L=="[")return _(de("]"),Tt,_e("]"),ie,W);if(h&&N=="as")return P.marked="keyword",_(Re,W);if(L=="regexp")return P.state.lastType=P.marked="operator",P.stream.backUp(P.stream.pos-P.stream.start-1),_(he)}function pt(L,N){return L!="quasi"?Z():N.slice(N.length-2)!="${"?_(pt):_(we,mt)}function mt(L){if(L=="}")return P.marked="string-2",P.state.tokenize=R,_(pt)}function Wt(L){return Y(P.stream,P.state),Z(L=="{"?ze:we)}function Fe(L){return Y(P.stream,P.state),Z(L=="{"?ze:We)}function X(L){return function(N){return N=="."?_(L?te:se):N=="variable"&&h?_(Jn,L?tt:xe):Z(L?We:we)}}function se(L,N){if(N=="target")return P.marked="keyword",_(xe)}function te(L,N){if(N=="target")return P.marked="keyword",_(tt)}function Ne(L){return L==":"?_(ie,ze):Z(xe,_e(";"),ie)}function _t(L){if(L=="variable")return P.marked="property",_()}function Ee(L,N){if(L=="async")return P.marked="property",_(Ee);if(L=="variable"||P.style=="keyword"){if(P.marked="property",N=="get"||N=="set")return _(Le);var re;return h&&P.state.fatArrowAt==P.stream.start&&(re=P.stream.match(/^\s*:\s*/,!1))&&(P.state.fatArrowAt=P.stream.pos+re[0].length),_(ye)}else{if(L=="number"||L=="string")return P.marked=c?"property":P.style+" property",_(ye);if(L=="jsonld-keyword")return _(ye);if(h&&q(N))return P.marked="keyword",_(Ee);if(L=="[")return _(we,Pt,_e("]"),ye);if(L=="spread")return _(We,ye);if(N=="*")return P.marked="keyword",_(Ee);if(L==":")return Z(ye)}}function Le(L){return L!="variable"?Z(ye):(P.marked="property",_(An))}function ye(L){if(L==":")return _(We);if(L=="(")return Z(An)}function Te(L,N,re){function W(he,He){if(re?re.indexOf(he)>-1:he==","){var Ze=P.state.lexical;return Ze.info=="call"&&(Ze.pos=(Ze.pos||0)+1),_(function(St,Yt){return St==N||Yt==N?Z():Z(L)},W)}return he==N||He==N?_():re&&re.indexOf(";")>-1?Z(L):_(_e(N))}return function(he,He){return he==N||He==N?_():Z(L,W)}}function Ve(L,N,re){for(var W=3;W"),Re)}function ct(L){if(L=="=>")return _(Re)}function at(L,N){if(L=="variable"||P.style=="keyword")return P.marked="property",_(at);if(N=="?"||L=="number"||L=="string")return _(at);if(L==":")return _(Re);if(L=="[")return _(_e("variable"),yo,_e("]"),at);if(L=="(")return Z(er,at)}function Lr(L,N){return L=="variable"&&P.stream.match(/^\s*[?:]/,!1)||N=="?"?_(Lr):L==":"?_(Re):L=="spread"?_(Lr):Z(Re)}function yt(L,N){if(N=="<")return _(de(">"),Te(Re,">"),ie,yt);if(N=="|"||L=="."||N=="&")return _(Re);if(L=="[")return _(Re,_e("]"),yt);if(N=="extends"||N=="implements")return P.marked="keyword",_(Re);if(N=="?")return _(Re,_e(":"),Re)}function Jn(L,N){if(N=="<")return _(de(">"),Te(Re,">"),ie,yt)}function Ct(){return Z(Re,wo)}function wo(L,N){if(N=="=")return _(Re)}function fr(L,N){return N=="enum"?(P.marked="keyword",_(Tn)):Z(Bt,Pt,En,vi)}function Bt(L,N){if(h&&q(N))return P.marked="keyword",_(Bt);if(L=="variable")return j(N),_();if(L=="spread")return _(Bt);if(L=="[")return Ve(ko,"]");if(L=="{")return Ve(Ir,"}")}function Ir(L,N){return L=="variable"&&!P.stream.match(/^\s*:/,!1)?(j(N),_(En)):(L=="variable"&&(P.marked="property"),L=="spread"?_(Bt):L=="}"?Z():L=="["?_(we,_e("]"),_e(":"),Ir):_(_e(":"),Bt,En))}function ko(){return Z(Bt,En)}function En(L,N){if(N=="=")return _(We)}function vi(L){if(L==",")return _(fr)}function xo(L,N){if(L=="keyword b"&&N=="else")return _(de("form","else"),ze,ie)}function Fr(L,N){if(N=="await")return _(Fr);if(L=="(")return _(de(")"),Za,ie)}function Za(L){return L=="var"?_(fr,Dn):L=="variable"?_(Dn):Z(Dn)}function Dn(L,N){return L==")"?_():L==";"?_(Dn):N=="in"||N=="of"?(P.marked="keyword",_(we,Dn)):Z(we,Dn)}function An(L,N){if(N=="*")return P.marked="keyword",_(An);if(L=="variable")return j(N),_(An);if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,De,ze,ce);if(h&&N=="<")return _(de(">"),Te(Ct,">"),ie,An)}function er(L,N){if(N=="*")return P.marked="keyword",_(er);if(L=="variable")return j(N),_(er);if(L=="(")return _(F,de(")"),Te(Bn,")"),ie,De,ce);if(h&&N=="<")return _(de(">"),Te(Ct,">"),ie,er)}function Mr(L,N){if(L=="keyword"||L=="variable")return P.marked="type",_(Mr);if(N=="<")return _(de(">"),Te(Ct,">"),ie)}function Bn(L,N){return N=="@"&&_(we,Bn),L=="spread"?_(Bn):h&&q(N)?(P.marked="keyword",_(Bn)):h&&L=="this"?_(Pt,En):Z(Bt,Pt,En)}function bi(L,N){return L=="variable"?jn(L,N):qr(L,N)}function jn(L,N){if(L=="variable")return j(N),_(qr)}function qr(L,N){if(N=="<")return _(de(">"),Te(Ct,">"),ie,qr);if(N=="extends"||N=="implements"||h&&L==",")return N=="implements"&&(P.marked="keyword"),_(h?Re:we,qr);if(L=="{")return _(de("}"),bn,ie)}function bn(L,N){if(L=="async"||L=="variable"&&(N=="static"||N=="get"||N=="set"||h&&q(N))&&P.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return P.marked="keyword",_(bn);if(L=="variable"||P.style=="keyword")return P.marked="property",_(Hn,bn);if(L=="number"||L=="string")return _(Hn,bn);if(L=="[")return _(we,Pt,_e("]"),Hn,bn);if(N=="*")return P.marked="keyword",_(bn);if(h&&L=="(")return Z(er,bn);if(L==";"||L==",")return _(bn);if(L=="}")return _();if(N=="@")return _(we,bn)}function Hn(L,N){if(N=="?")return _(Hn);if(L==":")return _(Re,En);if(N=="=")return _(We);var re=P.state.lexical.prev,W=re&&re.info=="interface";return Z(W?er:An)}function yi(L,N){return N=="*"?(P.marked="keyword",_(st,_e(";"))):N=="default"?(P.marked="keyword",_(we,_e(";"))):L=="{"?_(Te(Un,"}"),st,_e(";")):Z(ze)}function Un(L,N){if(N=="as")return P.marked="keyword",_(_e("variable"));if(L=="variable")return Z(We,Un)}function Qa(L){return L=="string"?_():L=="("?Z(we):Z(fn,zr,st)}function fn(L,N){return L=="{"?Ve(fn,"}"):(L=="variable"&&j(N),N=="*"&&(P.marked="keyword"),_(_o))}function zr(L){if(L==",")return _(fn,zr)}function _o(L,N){if(N=="as")return P.marked="keyword",_(fn)}function st(L,N){if(N=="from")return P.marked="keyword",_(we)}function ke(L){return L=="]"?_():Z(Te(We,"]"))}function Tn(){return Z(de("form"),Bt,_e("{"),de("}"),Te(wi,"}"),ie,ie)}function wi(){return Z(Bt,En)}function pn(L,N){return L.lastType=="operator"||L.lastType==","||y.test(N.charAt(0))||/[,.]/.test(N.charAt(0))}function Ke(L,N,re){return N.tokenize==S&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(N.lastType)||N.lastType=="quasi"&&/\{\s*$/.test(L.string.slice(0,L.pos-(re||0)))}return{startState:function(L){var N={tokenize:S,lastType:"sof",cc:[],lexical:new G((L||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new I(null,null,!1),indented:L||0};return i.globalVars&&typeof i.globalVars=="object"&&(N.globalVars=i.globalVars),N},token:function(L,N){if(L.sol()&&(N.lexical.hasOwnProperty("align")||(N.lexical.align=!1),N.indented=L.indentation(),Y(L,N)),N.tokenize!=A&&L.eatSpace())return null;var re=N.tokenize(L,N);return w=="comment"?re:(N.lastType=w=="operator"&&(D=="++"||D=="--")?"incdec":w,J(N,re,w,D,L))},indent:function(L,N){if(L.tokenize==A)return t.Pass;if(L.tokenize!=S)return 0;var re=N&&N.charAt(0),W=L.lexical,he;if(!/^\s*else\b/.test(N))for(var He=L.cc.length-1;He>=0;--He){var Ze=L.cc[He];if(Ze==ie)W=W.prev;else if(Ze!=xo)break}for(;(W.type=="stat"||W.type=="form")&&(re=="}"||(he=L.cc[L.cc.length-1])&&(he==xe||he==tt)&&!/^[,\.=+\-*:?[\(]/.test(N));)W=W.prev;u&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var St=W.type,Yt=re==St;return St=="vardef"?W.indented+(L.lastType=="operator"||L.lastType==","?W.info.length+1:0):St=="form"&&re=="{"?W.indented:St=="form"?W.indented+s:St=="stat"?W.indented+(pn(L,N)?u||s:0):W.info=="switch"&&!Yt&&i.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(N)?s:2*s):W.align?W.column+(Yt?0:1):W.indented+(Yt?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:c,jsonMode:d,expressionAllowed:Ke,skipExpression:function(L){var N=L.cc[L.cc.length-1];(N==we||N==We)&&L.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Zs=le((yd,wd)=>{(function(t){typeof yd=="object"&&typeof wd=="object"?t(Qe(),ta(),Xs(),Vs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)})(function(t){"use strict";var n={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(g,y,m){var b=g.current(),w=b.search(y);return w>-1?g.backUp(b.length-w):b.match(/<\/?$/)&&(g.backUp(b.length),g.match(y,!1)||g.match(b)),m}var s={};function u(g){var y=s[g];return y||(s[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function c(g,y){var m=g.match(u(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function d(g,y){return new RegExp((y?"^":"")+"","i")}function h(g,y){for(var m in g)for(var b=y[m]||(y[m]=[]),w=g[m],D=w.length-1;D>=0;D--)b.unshift(w[D])}function p(g,y){for(var m=0;m=0;E--)b.script.unshift(["type",D[E].matches,D[E].mode]);function S(z,A){var R=m.token(z,A.htmlState),U=/\btag\b/.test(R),Y;if(U&&!/[<>\s\/]/.test(z.current())&&(Y=A.htmlState.tagName&&A.htmlState.tagName.toLowerCase())&&b.hasOwnProperty(Y))A.inTag=Y+" ";else if(A.inTag&&U&&/>$/.test(z.current())){var B=/^([\S]+) (.*)/.exec(A.inTag);A.inTag=null;var G=z.current()==">"&&p(b[B[1]],B[2]),ee=t.getMode(g,G),J=d(B[1],!0),P=d(B[1],!1);A.token=function(Z,_){return Z.match(J,!1)?(_.token=S,_.localState=_.localMode=null,null):i(Z,P,_.localMode.token(Z,_.localState))},A.localMode=ee,A.localState=t.startState(ee,m.indent(A.htmlState,"",""))}else A.inTag&&(A.inTag+=z.current(),z.eol()&&(A.inTag+=" "));return R}return{startState:function(){var z=t.startState(m);return{token:S,inTag:null,localMode:null,localState:null,htmlState:z}},copyState:function(z){var A;return z.localState&&(A=t.copyState(z.localMode,z.localState)),{token:z.token,inTag:z.inTag,localMode:z.localMode,localState:A,htmlState:t.copyState(m,z.htmlState)}},token:function(z,A){return A.token(z,A)},indent:function(z,A,R){return!z.localMode||/^\s*<\//.test(A)?m.indent(z.htmlState,A,R):z.localMode.indent?z.localMode.indent(z.localState,A,R):t.Pass},innerMode:function(z){return{state:z.localState||z.htmlState,mode:z.localMode||m}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})});var _d=le((kd,xd)=>{(function(t){typeof kd=="object"&&typeof xd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("julia",function(n,i){function s(I,H){return typeof H=="undefined"&&(H="\\b"),new RegExp("^(("+I.join(")|(")+"))"+H)}var u="\\\\[0-7]{1,3}",c="\\\\x[A-Fa-f0-9]{1,2}",d=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",p=i.operators||s(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),g=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=s([u,c,d,h],"'"),b=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],w=["end","else","elseif","catch","finally"],D=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],E=["true","false","nothing","NaN","Inf"];t.registerHelper("hintWords","julia",D.concat(E));var S=s(b),z=s(w),A=s(D),R=s(E),U=/^@[_A-Za-z][\w]*/,Y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,B=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function G(I){return I.nestedArrays>0}function ee(I){return I.nestedGenerators>0}function J(I,H){return typeof H=="undefined"&&(H=0),I.scopes.length<=H?null:I.scopes[I.scopes.length-(H+1)]}function P(I,H){if(I.match(/^#=/,!1))return H.tokenize=V,H.tokenize(I,H);var ae=H.leavingExpr;if(I.sol()&&(ae=!1),H.leavingExpr=!1,ae&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var F=I.peek();if(F==="#")return I.skipToEnd(),"comment";if(F==="["&&(H.scopes.push("["),H.nestedArrays++),F==="("&&(H.scopes.push("("),H.nestedGenerators++),G(H)&&F==="]"){for(;H.scopes.length&&J(H)!=="[";)H.scopes.pop();H.scopes.pop(),H.nestedArrays--,H.leavingExpr=!0}if(ee(H)&&F===")"){for(;H.scopes.length&&J(H)!=="(";)H.scopes.pop();H.scopes.pop(),H.nestedGenerators--,H.leavingExpr=!0}if(G(H)){if(H.lastToken=="end"&&I.match(/^:/))return"operator";if(I.match(/^end/))return"number"}var T;if((T=I.match(S,!1))&&H.scopes.push(T[0]),I.match(z,!1)&&H.scopes.pop(),I.match(/^::(?![:\$])/))return H.tokenize=_,H.tokenize(I,H);if(!ae&&I.match(Y)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(p))return"operator";if(I.match(/^\.?\d/,!1)){var ce=RegExp(/^im\b/),de=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(de=!0),I.match(/^0x[0-9a-f_]+/i)&&(de=!0),I.match(/^0b[01_]+/i)&&(de=!0),I.match(/^0o[0-7_]+/i)&&(de=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(de=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(de=!0),de)return I.match(ce),H.leavingExpr=!0,"number"}if(I.match(/^'/))return H.tokenize=j,H.tokenize(I,H);if(I.match(B))return H.tokenize=Q(I.current()),H.tokenize(I,H);if(I.match(U))return"meta";if(I.match(g))return null;if(I.match(A))return"keyword";if(I.match(R))return"builtin";var ie=H.isDefinition||H.lastToken=="function"||H.lastToken=="macro"||H.lastToken=="type"||H.lastToken=="struct"||H.lastToken=="immutable";return I.match(y)?ie?I.peek()==="."?(H.isDefinition=!0,"variable"):(H.isDefinition=!1,"def"):I.match(/^({[^}]*})*\(/,!1)?(H.tokenize=Z,H.tokenize(I,H)):(H.leavingExpr=!0,"variable"):(I.next(),"error")}function Z(I,H){var ae=I.match(/^(\(\s*)/);if(ae&&(H.firstParenPos<0&&(H.firstParenPos=H.scopes.length),H.scopes.push("("),H.charsAdvanced+=ae[1].length),J(H)=="("&&I.match(/^\)/)&&(H.scopes.pop(),H.charsAdvanced+=1,H.scopes.length<=H.firstParenPos)){var F=I.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return I.backUp(H.charsAdvanced),H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=P,F?"def":"builtin"}if(I.match(/^$/g,!1)){for(I.backUp(H.charsAdvanced);H.scopes.length>H.firstParenPos;)H.scopes.pop();return H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=P,"builtin"}return H.charsAdvanced+=I.match(/^([^()]*)/)[1].length,H.tokenize(I,H)}function _(I,H){return I.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),I.match(/^{/)?H.nestedParameters++:I.match(/^}/)&&H.nestedParameters>0&&H.nestedParameters--,H.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():H.nestedParameters==0&&(H.tokenize=P),"builtin"}function V(I,H){return I.match(/^#=/)&&H.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match(/^=#/)&&(H.nestedComments--,H.nestedComments==0&&(H.tokenize=P)),"comment"}function j(I,H){var ae=!1,F;if(I.match(m))ae=!0;else if(F=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var T=parseInt(F[1],16);(T<=55295||T>=57344)&&(ae=!0,I.next())}else if(F=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var T=parseInt(F[1],16);T<=1114111&&(ae=!0,I.next())}return ae?(H.leavingExpr=!0,H.tokenize=P,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match(/^'/)&&(H.tokenize=P),"error")}function Q(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function H(ae,F){if(ae.eat("\\"))ae.next();else{if(ae.match(I))return F.tokenize=P,F.leavingExpr=!0,"string";ae.eat(/[`"]/)}return ae.eatWhile(/[^\\`"]/),"string"}return H}var q={startState:function(){return{tokenize:P,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(I,H){var ae=H.tokenize(I,H),F=I.current();return F&&ae&&(H.lastToken=F),ae},indent:function(I,H){var ae=0;return(H==="]"||H===")"||/^end\b/.test(H)||/^else/.test(H)||/^catch\b/.test(H)||/^elseif\b/.test(H)||/^finally/.test(H))&&(ae=-1),(I.scopes.length+ae)*n.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return q}),t.defineMIME("text/x-julia","julia")})});var Ed=le((Cd,Sd)=>{(function(t){typeof Cd=="object"&&typeof Sd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("lua",function(n,i){var s=n.indentUnit;function u(S){return new RegExp("^(?:"+S.join("|")+")","i")}function c(S){return new RegExp("^(?:"+S.join("|")+")$","i")}var d=c(i.specials||[]),h=c(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),p=c(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),g=c(["function","if","repeat","do","\\(","{"]),y=c(["end","until","\\)","}"]),m=u(["end","until","\\)","}","else","elseif"]);function b(S){for(var z=0;S.eat("=");)++z;return S.eat("["),z}function w(S,z){var A=S.next();return A=="-"&&S.eat("-")?S.eat("[")&&S.eat("[")?(z.cur=D(b(S),"comment"))(S,z):(S.skipToEnd(),"comment"):A=='"'||A=="'"?(z.cur=E(A))(S,z):A=="["&&/[\[=]/.test(S.peek())?(z.cur=D(b(S),"string"))(S,z):/\d/.test(A)?(S.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(A)?(S.eatWhile(/[\w\\\-_.]/),"variable"):null}function D(S,z){return function(A,R){for(var U=null,Y;(Y=A.next())!=null;)if(U==null)Y=="]"&&(U=0);else if(Y=="=")++U;else if(Y=="]"&&U==S){R.cur=w;break}else U=null;return z}}function E(S){return function(z,A){for(var R=!1,U;(U=z.next())!=null&&!(U==S&&!R);)R=!R&&U=="\\";return R||(A.cur=w),"string"}}return{startState:function(S){return{basecol:S||0,indentDepth:0,cur:w}},token:function(S,z){if(S.eatSpace())return null;var A=z.cur(S,z),R=S.current();return A=="variable"&&(p.test(R)?A="keyword":h.test(R)?A="builtin":d.test(R)&&(A="variable-2")),A!="comment"&&A!="string"&&(g.test(R)?++z.indentDepth:y.test(R)&&--z.indentDepth),A},indent:function(S,z){var A=m.test(z);return S.basecol+s*(S.indentDepth-(A?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),t.defineMIME("text/x-lua","lua")})});var Td=le((Dd,Ad)=>{(function(t){typeof Dd=="object"&&typeof Ad=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var n=0;n-1&&s.substring(d+1,s.length);if(h)return t.findModeByExtension(h)},t.findModeByName=function(s){s=s.toLowerCase();for(var u=0;u{(function(t){typeof Ld=="object"&&typeof Id=="object"?t(Qe(),ta(),Td()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("markdown",function(n,i){var s=t.getMode(n,"text/html"),u=s.name=="null";function c(F){if(t.findModeByName){var T=t.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var ce=t.getMode(n,F);return ce.name=="null"?null:ce}i.highlightFormatting===void 0&&(i.highlightFormatting=!1),i.maxBlockquoteDepth===void 0&&(i.maxBlockquoteDepth=0),i.taskLists===void 0&&(i.taskLists=!1),i.strikethrough===void 0&&(i.strikethrough=!1),i.emoji===void 0&&(i.emoji=!1),i.fencedCodeBlockHighlighting===void 0&&(i.fencedCodeBlockHighlighting=!0),i.fencedCodeBlockDefaultMode===void 0&&(i.fencedCodeBlockDefaultMode="text/plain"),i.xml===void 0&&(i.xml=!0),i.tokenTypeOverrides===void 0&&(i.tokenTypeOverrides={});var d={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in d)d.hasOwnProperty(h)&&i.tokenTypeOverrides[h]&&(d[h]=i.tokenTypeOverrides[h]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,b=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,S=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,z=" ";function A(F,T,ce){return T.f=T.inline=ce,ce(F,T)}function R(F,T,ce){return T.f=T.block=ce,ce(F,T)}function U(F){return!F||!/\S/.test(F.string)}function Y(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==G){var T=u;if(!T){var ce=t.innerMode(s,F.htmlState);T=ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText}T&&(F.f=Z,F.block=B,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function B(F,T){var ce=F.column()===T.indentation,de=U(T.prevLine.stream),ie=T.indentedCode,_e=T.prevLine.hr,ze=T.list!==!1,be=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var we=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,ze)){for(T.list=null;we=4&&(ie||T.prevLine.fencedCodeEnd||T.prevLine.header||de))return F.skipToEnd(),T.indentedCode=!0,d.code;if(F.eatSpace())return null;if(ce&&T.indentation<=be&&(nt=F.match(m))&&nt[1].length<=6)return T.quote=0,T.header=nt[1].length,T.thisLine.header=!0,i.highlightFormatting&&(T.formatting="header"),T.f=T.inline,J(T);if(T.indentation<=be&&F.eat(">"))return T.quote=ce?1:T.quote+1,i.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),J(T);if(!Ge&&!T.setext&&ce&&T.indentation<=be&&(nt=F.match(g))){var Tt=nt[1]?"ol":"ul";return T.indentation=we+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,i.taskLists&&F.match(y,!1)&&(T.taskList=!0),T.f=T.inline,i.highlightFormatting&&(T.formatting=["list","list-"+Tt]),J(T)}else{if(ce&&T.indentation<=be&&(nt=F.match(D,!0)))return T.quote=0,T.fencedEndRE=new RegExp(nt[1]+"+ *$"),T.localMode=i.fencedCodeBlockHighlighting&&c(nt[2]||i.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=t.startState(T.localMode)),T.f=T.block=ee,i.highlightFormatting&&(T.formatting="code-block"),T.code=-1,J(T);if(T.setext||(!We||!ze)&&!T.quote&&T.list===!1&&!T.code&&!Ge&&!E.test(F.string)&&(nt=F.lookAhead(1))&&(nt=nt.match(b)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),i.highlightFormatting&&(T.formatting="header")):(T.header=nt[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,J(T);if(Ge)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,d.hr;if(F.peek()==="[")return A(F,T,q)}return A(F,T,T.inline)}function G(F,T){var ce=s.token(F,T.htmlState);if(!u){var de=t.innerMode(s,T.htmlState);(de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=Z,T.block=B,T.htmlState=null)}return ce}function ee(F,T){var ce=T.listStack[T.listStack.length-1]||0,de=T.indentation=F.quote?T.push(d.formatting+"-"+F.formatting[ce]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(d.linkHref,"url"):(F.strong&&T.push(d.strong),F.em&&T.push(d.em),F.strikethrough&&T.push(d.strikethrough),F.emoji&&T.push(d.emoji),F.linkText&&T.push(d.linkText),F.code&&T.push(d.code),F.image&&T.push(d.image),F.imageAltText&&T.push(d.imageAltText,"link"),F.imageMarker&&T.push(d.imageMarker)),F.header&&T.push(d.header,d.header+"-"+F.header),F.quote&&(T.push(d.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.quote+"-"+F.quote):T.push(d.quote+"-"+i.maxBlockquoteDepth)),F.list!==!1){var de=(F.listStack.length-1)%3;de?de===1?T.push(d.list2):T.push(d.list3):T.push(d.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function P(F,T){return F.match(w,!0)?J(T):void 0}function Z(F,T){var ce=T.text(F,T);if(typeof ce!="undefined")return ce;if(T.list)return T.list=null,J(T);if(T.taskList){var de=F.match(y,!0)[1]===" ";return de?T.taskOpen=!0:T.taskClosed=!0,i.highlightFormatting&&(T.formatting="task"),T.taskList=!1,J(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return i.highlightFormatting&&(T.formatting="header"),J(T);var ie=F.next();if(T.linkTitle){T.linkTitle=!1;var _e=ie;ie==="("&&(_e=")"),_e=(_e+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var ze="^\\s*(?:[^"+_e+"\\\\]+|\\\\\\\\|\\\\.)"+_e;if(F.match(new RegExp(ze),!0))return d.linkHref}if(ie==="`"){var be=T.formatting;i.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var we=F.current().length;if(T.code==0&&(!T.quote||we==1))return T.code=we,J(T);if(we==T.code){var We=J(T);return T.code=0,We}else return T.formatting=be,J(T)}else if(T.code)return J(T);if(ie==="\\"&&(F.next(),i.highlightFormatting)){var Ge=J(T),nt=d.formatting+"-escape";return Ge?Ge+" "+nt:nt}if(ie==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ie==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(ie==="]"&&T.imageAltText){i.highlightFormatting&&(T.formatting="image");var Ge=J(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=V,Ge}if(ie==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,i.highlightFormatting&&(T.formatting="link")),J(T);if(ie==="]"&&T.linkText){i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?V:Z,Ge}if(ie==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkInline}if(ie==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var Ge=J(T);return Ge?Ge+=" ":Ge="",Ge+d.linkEmail}if(i.xml&&ie==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Tt=F.string.indexOf(">",F.pos);if(Tt!=-1){var xe=F.string.substring(F.start,Tt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(xe)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=t.startState(s),R(F,T,G)}if(i.xml&&ie==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(ie==="*"||ie==="_"){for(var tt=1,pt=F.pos==1?" ":F.string.charAt(F.pos-2);tt<3&&F.eat(ie);)tt++;var mt=F.peek()||" ",Wt=!/\s/.test(mt)&&(!S.test(mt)||/\s/.test(pt)||S.test(pt)),Fe=!/\s/.test(pt)&&(!S.test(pt)||/\s/.test(mt)||S.test(mt)),X=null,se=null;if(tt%2&&(!T.em&&Wt&&(ie==="*"||!Fe||S.test(pt))?X=!0:T.em==ie&&Fe&&(ie==="*"||!Wt||S.test(mt))&&(X=!1)),tt>1&&(!T.strong&&Wt&&(ie==="*"||!Fe||S.test(pt))?se=!0:T.strong==ie&&Fe&&(ie==="*"||!Wt||S.test(mt))&&(se=!1)),se!=null||X!=null){i.highlightFormatting&&(T.formatting=X==null?"strong":se==null?"em":"strong em"),X===!0&&(T.em=ie),se===!0&&(T.strong=ie);var We=J(T);return X===!1&&(T.em=!1),se===!1&&(T.strong=!1),We}}else if(ie===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return J(T);F.backUp(1)}if(i.strikethrough){if(ie==="~"&&F.eatWhile(ie)){if(T.strikethrough){i.highlightFormatting&&(T.formatting="strikethrough");var We=J(T);return T.strikethrough=!1,We}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,i.highlightFormatting&&(T.formatting="strikethrough"),J(T)}else if(ie===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return J(T);F.backUp(2)}}if(i.emoji&&ie===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,i.highlightFormatting&&(T.formatting="emoji");var te=J(T);return T.emoji=!1,te}return ie===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),J(T)}function _(F,T){var ce=F.next();if(ce===">"){T.f=T.inline=Z,i.highlightFormatting&&(T.formatting="link");var de=J(T);return de?de+=" ":de="",de+d.linkInline}return F.match(/^[^>]+/,!0),d.linkInline}function V(F,T){if(F.eatSpace())return null;var ce=F.next();return ce==="("||ce==="["?(T.f=T.inline=Q(ce==="("?")":"]"),i.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,J(T)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Q(F){return function(T,ce){var de=T.next();if(de===F){ce.f=ce.inline=Z,i.highlightFormatting&&(ce.formatting="link-string");var ie=J(ce);return ce.linkHref=!1,ie}return T.match(j[F]),ce.linkHref=!0,J(ce)}}function q(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=I,F.next(),i.highlightFormatting&&(T.formatting="link"),T.linkText=!0,J(T)):A(F,T,Z)}function I(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=H,i.highlightFormatting&&(T.formatting="link");var ce=J(T);return T.linkText=!1,ce}return F.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function H(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=Z,d.linkHref+" url")}var ae={startState:function(){return{f:B,prevLine:{stream:null},thisLine:{stream:null},block:B,htmlState:null,indentation:0,inline:Z,text:P,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&t.copyState(s,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?t.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return Y(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=G)){var ce=F.match(/^\s*/,!0)[0].replace(/\t/g,z).length;if(T.indentation=ce,T.indentationDiff=null,ce>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==G?{state:F.htmlState,mode:s}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:ae}},indent:function(F,T,ce){return F.block==G&&s.indent?s.indent(F.htmlState,T,ce):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,ce):t.Pass},blankLine:Y,getType:J,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ae},"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")})});var zd=le((Md,qd)=>{(function(t){typeof Md=="object"&&typeof qd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("mllike",function(n,i){var s={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},u=i.extraWords||{};for(var c in u)u.hasOwnProperty(c)&&(s[c]=i.extraWords[c]);var d=[];for(var h in s)d.push(h);t.registerHelper("hintWords","mllike",d);function p(b,w){var D=b.next();if(D==='"')return w.tokenize=g,w.tokenize(b,w);if(D==="{"&&b.eat("|"))return w.longString=!0,w.tokenize=m,w.tokenize(b,w);if(D==="("&&b.eat("*"))return w.commentLevel++,w.tokenize=y,w.tokenize(b,w);if(D==="~"||D==="?")return b.eatWhile(/\w/),"variable-2";if(D==="`")return b.eatWhile(/\w/),"quote";if(D==="/"&&i.slashComments&&b.eat("/"))return b.skipToEnd(),"comment";if(/\d/.test(D))return D==="0"&&b.eat(/[bB]/)&&b.eatWhile(/[01]/),D==="0"&&b.eat(/[xX]/)&&b.eatWhile(/[0-9a-fA-F]/),D==="0"&&b.eat(/[oO]/)?b.eatWhile(/[0-7]/):(b.eatWhile(/[\d_]/),b.eat(".")&&b.eatWhile(/[\d]/),b.eat(/[eE]/)&&b.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(D))return"operator";if(/[\w\xa1-\uffff]/.test(D)){b.eatWhile(/[\w\xa1-\uffff]/);var E=b.current();return s.hasOwnProperty(E)?s[E]:"variable"}return null}function g(b,w){for(var D,E=!1,S=!1;(D=b.next())!=null;){if(D==='"'&&!S){E=!0;break}S=!S&&D==="\\"}return E&&!S&&(w.tokenize=p),"string"}function y(b,w){for(var D,E;w.commentLevel>0&&(E=b.next())!=null;)D==="("&&E==="*"&&w.commentLevel++,D==="*"&&E===")"&&w.commentLevel--,D=E;return w.commentLevel<=0&&(w.tokenize=p),"comment"}function m(b,w){for(var D,E;w.longString&&(E=b.next())!=null;)D==="|"&&E==="}"&&(w.longString=!1),D=E;return w.longString||(w.tokenize=p),"string"}return{startState:function(){return{tokenize:p,commentLevel:0,longString:!1}},token:function(b,w){return b.eatSpace()?null:w.tokenize(b,w)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),t.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),t.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),t.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})});var Od=le((Pd,Rd)=>{(function(t){typeof Pd=="object"&&typeof Rd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("nginx",function(n){function i(w){for(var D={},E=w.split(" "),S=0;S*\/]/.test(S)?p(null,"select-op"):/[;{}:\[\]]/.test(S)?p(null,S):(w.eatWhile(/[\w\\\-]/),p("variable","variable"))}function y(w,D){for(var E=!1,S;(S=w.next())!=null;){if(E&&S=="/"){D.tokenize=g;break}E=S=="*"}return p("comment","comment")}function m(w,D){for(var E=0,S;(S=w.next())!=null;){if(E>=2&&S==">"){D.tokenize=g;break}E=S=="-"?E+1:0}return p("comment","comment")}function b(w){return function(D,E){for(var S=!1,z;(z=D.next())!=null&&!(z==w&&!S);)S=!S&&z=="\\";return S||(E.tokenize=g),p("string","string")}}return{startState:function(w){return{tokenize:g,baseIndent:w||0,stack:[]}},token:function(w,D){if(w.eatSpace())return null;h=null;var E=D.tokenize(w,D),S=D.stack[D.stack.length-1];return h=="hash"&&S=="rule"?E="atom":E=="variable"&&(S=="rule"?E="number":(!S||S=="@media{")&&(E="tag")),S=="rule"&&/^[\{\};]$/.test(h)&&D.stack.pop(),h=="{"?S=="@media"?D.stack[D.stack.length-1]="@media{":D.stack.push("{"):h=="}"?D.stack.pop():h=="@media"?D.stack.push("@media"):S=="{"&&h!="comment"&&D.stack.push("rule"),E},indent:function(w,D){var E=w.stack.length;return/^\}/.test(D)&&(E-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+E*d},electricChars:"}"}}),t.defineMIME("text/x-nginx-conf","nginx")})});var jd=le((Nd,Bd)=>{(function(t){typeof Nd=="object"&&typeof Bd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("perl",function(){var c={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},d="string-2",h=/[goseximacplud]/;function p(m,b,w,D,E){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(S,z){for(var A=!1,R,U=0;R=S.next();){if(R===w[U]&&!A)return w[++U]!==void 0?(z.chain=w[U],z.style=D,z.tail=E):E&&S.eatWhile(E),z.tokenize=y,D;A=!A&&R=="\\"}return D},b.tokenize(m,b)}function g(m,b,w){return b.tokenize=function(D,E){return D.string==w&&(E.tokenize=y),D.skipToEnd(),"string"},b.tokenize(m,b)}function y(m,b){if(m.eatSpace())return null;if(b.chain)return p(m,b,b.chain,b.style,b.tail);if(m.match(/^\-?[\d\.]/,!1)&&m.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(m.match(/^<<(?=\w)/))return m.eatWhile(/\w/),g(m,b,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return g(m,b,"=cut");var w=m.next();if(w=='"'||w=="'"){if(i(m,3)=="<<"+w){var D=m.pos;m.eatWhile(/\w/);var E=m.current().substr(1);if(E&&m.eat(w))return g(m,b,E);m.pos=D}return p(m,b,[w],"string")}if(w=="q"){var S=n(m,-2);if(!(S&&/\w/.test(S))){if(S=n(m,0),S=="x"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(S=="q"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"string");if(S=="[")return u(m,2),p(m,b,["]"],"string");if(S=="{")return u(m,2),p(m,b,["}"],"string");if(S=="<")return u(m,2),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"string")}else if(S=="w"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"bracket");if(S=="[")return u(m,2),p(m,b,["]"],"bracket");if(S=="{")return u(m,2),p(m,b,["}"],"bracket");if(S=="<")return u(m,2),p(m,b,[">"],"bracket");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"bracket")}else if(S=="r"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(/[\^'"!~\/(\[{<]/.test(S)){if(S=="(")return u(m,1),p(m,b,[")"],"string");if(S=="[")return u(m,1),p(m,b,["]"],"string");if(S=="{")return u(m,1),p(m,b,["}"],"string");if(S=="<")return u(m,1),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return p(m,b,[m.eat(S)],"string")}}}if(w=="m"){var S=n(m,-2);if(!(S&&/\w/.test(S))&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)){if(/[\^'"!~\/]/.test(S))return p(m,b,[S],d,h);if(S=="(")return p(m,b,[")"],d,h);if(S=="[")return p(m,b,["]"],d,h);if(S=="{")return p(m,b,["}"],d,h);if(S=="<")return p(m,b,[">"],d,h)}}if(w=="s"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="y"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="t"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat("r"),S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="`")return p(m,b,[w],"variable-2");if(w=="/")return/~\s*$/.test(i(m))?p(m,b,[w],d,h):"operator";if(w=="$"){var D=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=D}if(/[$@%]/.test(w)){var D=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(n(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var S=m.current();if(c[S])return"variable-2"}m.pos=D}if(/[$@%&]/.test(w)&&(m.eatWhile(/[\w$\[\]]/)||m.eat("{")&&m.eatWhile(/[\w$\[\]]/)&&m.eat("}"))){var S=m.current();return c[S]?"variable-2":"variable"}if(w=="#"&&n(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var D=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),c[m.current()])return"operator";m.pos=D}if(w=="_"&&m.pos==1){if(s(m,6)=="_END__")return p(m,b,["\0"],"comment");if(s(m,7)=="_DATA__")return p(m,b,["\0"],"variable-2");if(s(m,7)=="_C__")return p(m,b,["\0"],"string")}if(/\w/.test(w)){var D=m.pos;if(n(m,-2)=="{"&&(n(m,0)=="}"||m.eatWhile(/\w/)&&n(m,0)=="}"))return"string";m.pos=D}if(/[A-Z]/.test(w)){var z=n(m,-2),D=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(n(m,0)))m.pos=D;else{var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var z=n(m,-2);m.eatWhile(/\w/);var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,b){return(b.tokenize||y)(m,b)},lineComment:"#"}}),t.registerHelper("wordChars","perl",/[\w$]/),t.defineMIME("text/x-perl","perl");function n(c,d){return c.string.charAt(c.pos+(d||0))}function i(c,d){if(d){var h=c.pos-d;return c.string.substr(h>=0?h:0,d)}else return c.string.substr(0,c.pos-1)}function s(c,d){var h=c.string.length,p=h-c.pos+1;return c.string.substr(c.pos,d&&d=(p=c.string.length-1)?c.pos=p:c.pos=h}})});var Wd=le((Hd,Ud)=>{(function(t){typeof Hd=="object"&&typeof Ud=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("pascal",function(){function n(g){for(var y={},m=g.split(" "),b=0;b!?|\/]/;function c(g,y){var m=g.next();if(m=="#"&&y.startOfLine)return g.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=d(m),y.tokenize(g,y);if(m=="("&&g.eat("*"))return y.tokenize=h,h(g,y);if(m=="{")return y.tokenize=p,p(g,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(m=="/"&&g.eat("/"))return g.skipToEnd(),"comment";if(u.test(m))return g.eatWhile(u),"operator";g.eatWhile(/[\w\$_]/);var b=g.current();return i.propertyIsEnumerable(b)?"keyword":s.propertyIsEnumerable(b)?"atom":"variable"}function d(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}function h(g,y){for(var m=!1,b;b=g.next();){if(b==")"&&m){y.tokenize=null;break}m=b=="*"}return"comment"}function p(g,y){for(var m;m=g.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||c)(g,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),t.defineMIME("text/x-pascal","pascal")})});var Kd=le(($d,Gd)=>{(function(t){typeof $d=="object"&&typeof Gd=="object"?t(Qe(),Zs(),Ys()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],t):t(CodeMirror)})(function(t){"use strict";function n(g){for(var y={},m=g.split(" "),b=0;b\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,b)),"variable-2";for(var w=!1;!g.eol()&&(w||b===!1||!g.match("{$",!1)&&!g.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&g.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}w=g.next()=="\\"&&!w}return"string"}var c="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",d="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";t.registerHelper("hintWords","php",[c,d,h].join(" ").split(" ")),t.registerHelper("wordChars","php",/[\w$]/);var p={name:"clike",helperType:"php",keywords:n(c),blockKeywords:n("catch do else elseif for foreach if switch try while finally"),defKeywords:n("class function interface namespace trait"),atoms:n(d),builtin:n(h),multiLineStrings:!0,hooks:{$:function(g){return g.eatWhile(/[\w\$_]/),"variable-2"},"<":function(g,y){var m;if(m=g.match(/<<\s*/)){var b=g.eat(/['"]/);g.eatWhile(/[\w\.]/);var w=g.current().slice(m[0].length+(b?2:1));if(b&&g.eat(b),w)return(y.tokStack||(y.tokStack=[])).push(w,0),y.tokenize=s(w,b!="'"),"string"}return!1},"#":function(g){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"},"/":function(g){if(g.eat("/")){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"}return!1},'"':function(g,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=s('"'),"string"},"{":function(g,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(g,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=s(y.tokStack[y.tokStack.length-2])),!1}}};t.defineMode("php",function(g,y){var m=t.getMode(g,y&&y.htmlMode||"text/html"),b=t.getMode(g,p);function w(D,E){var S=E.curMode==b;if(D.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),S)return S&&E.php.tokenize==null&&D.match("?>")?(E.curMode=m,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):b.token(D,E.curState);if(D.match(/^<\?\w*/))return E.curMode=b,E.php||(E.php=t.startState(b,m.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!D.eol()&&D.next()!=E.pending;);var z="string"}else if(E.pending&&D.pos/.test(A)?E.pending=U[0]:E.pending={end:D.pos,style:z},D.backUp(A.length-R)),z}return{startState:function(){var D=t.startState(m),E=y.startOpen?t.startState(b):null;return{html:D,php:E,curMode:y.startOpen?b:m,curState:y.startOpen?E:D,pending:null}},copyState:function(D){var E=D.html,S=t.copyState(m,E),z=D.php,A=z&&t.copyState(b,z),R;return D.curMode==m?R=S:R=A,{html:S,php:A,curMode:D.curMode,curState:R,pending:D.pending}},token:w,indent:function(D,E,S){return D.curMode!=b&&/^\s*<\//.test(E)||D.curMode==b&&/^\?>/.test(E)?m.indent(D.html,E,S):D.curMode.indent(D.curState,E,S)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(D){return{state:D.curState,mode:D.curMode}}}},"htmlmixed","clike"),t.defineMIME("application/x-httpd-php","php"),t.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),t.defineMIME("text/x-php",p)})});var Xd=le((Vd,Yd)=>{(function(t){"use strict";typeof Vd=="object"&&typeof Yd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(window.CodeMirror)})(function(t){"use strict";t.defineMode("powershell",function(){function n(_,V){V=V||{};for(var j=V.prefix!==void 0?V.prefix:"^",Q=V.suffix!==void 0?V.suffix:"\\b",q=0;q<_.length;q++)_[q]instanceof RegExp?_[q]=_[q].source:_[q]=_[q].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(j+"("+_.join("|")+")"+Q,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",s=/[\w\-:]/,u=n([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:i}),c=/[\[\]{},;`\\\.]|@[({]/,d=n(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),h=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,p=n([d,h],{suffix:""}),g=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,m=/[A-Z]:|%|\?/i,b=n([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),w=n([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),D=n([m,b,w],{suffix:i}),E={keyword:u,number:g,operator:p,builtin:D,punctuation:c,identifier:y};function S(_,V){var j=V.returnStack[V.returnStack.length-1];if(j&&j.shouldReturnFrom(V))return V.tokenize=j.tokenize,V.returnStack.pop(),V.tokenize(_,V);if(_.eatSpace())return null;if(_.eat("("))return V.bracketNesting+=1,"punctuation";if(_.eat(")"))return V.bracketNesting-=1,"punctuation";for(var Q in E)if(_.match(E[Q]))return Q;var q=_.next();if(q==="'")return z(_,V);if(q==="$")return ee(_,V);if(q==='"')return A(_,V);if(q==="<"&&_.eat("#"))return V.tokenize=G,G(_,V);if(q==="#")return _.skipToEnd(),"comment";if(q==="@"){var I=_.eat(/["']/);if(I&&_.eol())return V.tokenize=P,V.startQuote=I[0],P(_,V);if(_.eol())return"error";if(_.peek().match(/[({]/))return"punctuation";if(_.peek().match(s))return ee(_,V)}return"error"}function z(_,V){for(var j;(j=_.peek())!=null;)if(_.next(),j==="'"&&!_.eat("'"))return V.tokenize=S,"string";return"error"}function A(_,V){for(var j;(j=_.peek())!=null;){if(j==="$")return V.tokenize=R,"string";if(_.next(),j==="`"){_.next();continue}if(j==='"'&&!_.eat('"'))return V.tokenize=S,"string"}return"error"}function R(_,V){return B(_,V,A)}function U(_,V){return V.tokenize=P,V.startQuote='"',P(_,V)}function Y(_,V){return B(_,V,U)}function B(_,V,j){if(_.match("$(")){var Q=V.bracketNesting;return V.returnStack.push({shouldReturnFrom:function(q){return q.bracketNesting===Q},tokenize:j}),V.tokenize=S,V.bracketNesting+=1,"punctuation"}else return _.next(),V.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:j}),V.tokenize=ee,V.tokenize(_,V)}function G(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(j&&Q==">"){V.tokenize=S;break}j=Q==="#"}return"comment"}function ee(_,V){var j=_.peek();return _.eat("{")?(V.tokenize=J,J(_,V)):j!=null&&j.match(s)?(_.eatWhile(s),V.tokenize=S,"variable-2"):(V.tokenize=S,"error")}function J(_,V){for(var j;(j=_.next())!=null;)if(j==="}"){V.tokenize=S;break}return"variable-2"}function P(_,V){var j=V.startQuote;if(_.sol()&&_.match(new RegExp(j+"@")))V.tokenize=S;else if(j==='"')for(;!_.eol();){var Q=_.peek();if(Q==="$")return V.tokenize=Y,"string";_.next(),Q==="`"&&_.next()}else _.skipToEnd();return"string"}var Z={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:S}},token:function(_,V){return V.tokenize(_,V)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return Z}),t.defineMIME("application/x-powershell","powershell")})});var Jd=le((Zd,Qd)=>{(function(t){typeof Zd=="object"&&typeof Qd=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("properties",function(){return{token:function(n,i){var s=n.sol()||i.afterSection,u=n.eol();if(i.afterSection=!1,s&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),u&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),s)for(;n.eatSpace(););var c=n.next();return s&&(c==="#"||c==="!"||c===";")?(i.position="comment",n.skipToEnd(),"comment"):s&&c==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):c==="="||c===":"?(i.position="quote",null):(c==="\\"&&i.position==="quote"&&(n.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),t.defineMIME("text/x-properties","properties"),t.defineMIME("text/x-ini","properties")})});var nh=le((eh,th)=>{(function(t){typeof eh=="object"&&typeof th=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var i=n(["and","or","not","is"]),s=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],u=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];t.registerHelper("hintWords","python",s.concat(u));function c(h){return h.scopes[h.scopes.length-1]}t.defineMode("python",function(h,p){for(var g="error",y=p.delimiters||p.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[p.singleOperators,p.doubleOperators,p.doubleDelimiters,p.tripleDelimiters,p.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],b=0;bI?J(Q):H0&&Z(j,Q)&&(ae+=" "+g),ae}}return B(j,Q)}function B(j,Q,q){if(j.eatSpace())return null;if(!q&&j.match(/^#.*/))return"comment";if(j.match(/^[0-9\.]/,!1)){var I=!1;if(j.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(I=!0),j.match(/^[\d_]+\.\d*/)&&(I=!0),j.match(/^\.\d+/)&&(I=!0),I)return j.eat(/J/i),"number";var H=!1;if(j.match(/^0x[0-9a-f_]+/i)&&(H=!0),j.match(/^0b[01_]+/i)&&(H=!0),j.match(/^0o[0-7_]+/i)&&(H=!0),j.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(j.eat(/J/i),H=!0),j.match(/^0(?![\dx])/i)&&(H=!0),H)return j.eat(/L/i),"number"}if(j.match(A)){var ae=j.current().toLowerCase().indexOf("f")!==-1;return ae?(Q.tokenize=G(j.current(),Q.tokenize),Q.tokenize(j,Q)):(Q.tokenize=ee(j.current(),Q.tokenize),Q.tokenize(j,Q))}for(var F=0;F=0;)j=j.substr(1);var q=j.length==1,I="string";function H(F){return function(T,ce){var de=B(T,ce,!0);return de=="punctuation"&&(T.current()=="{"?ce.tokenize=H(F+1):T.current()=="}"&&(F>1?ce.tokenize=H(F-1):ce.tokenize=ae)),de}}function ae(F,T){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),q&&F.eol())return I}else{if(F.match(j))return T.tokenize=Q,I;if(F.match("{{"))return I;if(F.match("{",!1))return T.tokenize=H(0),F.current()?I:T.tokenize(F,T);if(F.match("}}"))return I;if(F.match("}"))return g;F.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;T.tokenize=Q}return I}return ae.isString=!0,ae}function ee(j,Q){for(;"rubf".indexOf(j.charAt(0).toLowerCase())>=0;)j=j.substr(1);var q=j.length==1,I="string";function H(ae,F){for(;!ae.eol();)if(ae.eatWhile(/[^'"\\]/),ae.eat("\\")){if(ae.next(),q&&ae.eol())return I}else{if(ae.match(j))return F.tokenize=Q,I;ae.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;F.tokenize=Q}return I}return H.isString=!0,H}function J(j){for(;c(j).type!="py";)j.scopes.pop();j.scopes.push({offset:c(j).offset+h.indentUnit,type:"py",align:null})}function P(j,Q,q){var I=j.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:j.column()+1;Q.scopes.push({offset:Q.indent+w,type:q,align:I})}function Z(j,Q){for(var q=j.indentation();Q.scopes.length>1&&c(Q).offset>q;){if(c(Q).type!="py")return!0;Q.scopes.pop()}return c(Q).offset!=q}function _(j,Q){j.sol()&&(Q.beginningOfLine=!0);var q=Q.tokenize(j,Q),I=j.current();if(Q.beginningOfLine&&I=="@")return j.match(z,!1)?"meta":S?"operator":g;if(/\S/.test(I)&&(Q.beginningOfLine=!1),(q=="variable"||q=="builtin")&&Q.lastToken=="meta"&&(q="meta"),(I=="pass"||I=="return")&&(Q.dedent+=1),I=="lambda"&&(Q.lambda=!0),I==":"&&!Q.lambda&&c(Q).type=="py"&&J(Q),I.length==1&&!/string|comment/.test(q)){var H="[({".indexOf(I);if(H!=-1&&P(j,Q,"])}".slice(H,H+1)),H="])}".indexOf(I),H!=-1)if(c(Q).type==I)Q.indent=Q.scopes.pop().offset-w;else return g}return Q.dedent>0&&j.eol()&&c(Q).type=="py"&&(Q.scopes.length>1&&Q.scopes.pop(),Q.dedent-=1),q}var V={startState:function(j){return{tokenize:Y,scopes:[{offset:j||0,type:"py",align:null}],indent:j||0,lastToken:null,lambda:!1,dedent:0}},token:function(j,Q){var q=Q.errorToken;q&&(Q.errorToken=!1);var I=_(j,Q);return I&&I!="comment"&&(Q.lastToken=I=="keyword"||I=="punctuation"?j.current():I),I=="punctuation"&&(I=null),j.eol()&&Q.lambda&&(Q.lambda=!1),q?I+" "+g:I},indent:function(j,Q){if(j.tokenize!=Y)return j.tokenize.isString?t.Pass:0;var q=c(j),I=q.type==Q.charAt(0);return q.align!=null?q.align-(I?1:0):q.offset-(I?w:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return V}),t.defineMIME("text/x-python","python");var d=function(h){return h.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:d("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var oh=le((rh,ih)=>{(function(t){typeof rh=="object"&&typeof ih=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(p){for(var g={},y=0,m=p.length;y]/)?(A.eat(/[\<\>]/),"atom"):A.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":A.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(A.eatWhile(/[\w$\xa1-\uffff]/),A.eat(/[\?\!\=]/),"atom"):"operator";if(U=="@"&&A.match(/^@?[a-zA-Z_\xa1-\uffff]/))return A.eat("@"),A.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(U=="$")return A.eat(/[a-zA-Z_]/)?A.eatWhile(/[\w]/):A.eat(/\d/)?A.eat(/\d/):A.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(U))return A.eatWhile(/[\w\xa1-\uffff]/),A.eat(/[\?\!]/),A.eat(":")?"atom":"ident";if(U=="|"&&(R.varList||R.lastTok=="{"||R.lastTok=="do"))return g="|",null;if(/[\(\)\[\]{}\\;]/.test(U))return g=U,null;if(U=="-"&&A.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(U)){var J=A.eatWhile(/[=+\-\/*:\.^%<>~|]/);return U=="."&&!J&&(g="."),"operator"}else return null}}}function b(A){for(var R=A.pos,U=0,Y,B=!1,G=!1;(Y=A.next())!=null;)if(G)G=!1;else{if("[{(".indexOf(Y)>-1)U++;else if("]})".indexOf(Y)>-1){if(U--,U<0)break}else if(Y=="/"&&U==0){B=!0;break}G=Y=="\\"}return A.backUp(A.pos-R),B}function w(A){return A||(A=1),function(R,U){if(R.peek()=="}"){if(A==1)return U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U);U.tokenize[U.tokenize.length-1]=w(A-1)}else R.peek()=="{"&&(U.tokenize[U.tokenize.length-1]=w(A+1));return m(R,U)}}function D(){var A=!1;return function(R,U){return A?(U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U)):(A=!0,m(R,U))}}function E(A,R,U,Y){return function(B,G){var ee=!1,J;for(G.context.type==="read-quoted-paused"&&(G.context=G.context.prev,B.eat("}"));(J=B.next())!=null;){if(J==A&&(Y||!ee)){G.tokenize.pop();break}if(U&&J=="#"&&!ee){if(B.eat("{")){A=="}"&&(G.context={prev:G.context,type:"read-quoted-paused"}),G.tokenize.push(w());break}else if(/[@\$]/.test(B.peek())){G.tokenize.push(D());break}}ee=!ee&&J=="\\"}return R}}function S(A,R){return function(U,Y){return R&&U.eatSpace(),U.match(A)?Y.tokenize.pop():U.skipToEnd(),"string"}}function z(A,R){return A.sol()&&A.match("=end")&&A.eol()&&R.tokenize.pop(),A.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-p.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(A,R){g=null,A.sol()&&(R.indented=A.indentation());var U=R.tokenize[R.tokenize.length-1](A,R),Y,B=g;if(U=="ident"){var G=A.current();U=R.lastTok=="."?"property":s.propertyIsEnumerable(A.current())?"keyword":/^[A-Z]/.test(G)?"tag":R.lastTok=="def"||R.lastTok=="class"||R.varList?"def":"variable",U=="keyword"&&(B=G,u.propertyIsEnumerable(G)?Y="indent":c.propertyIsEnumerable(G)?Y="dedent":((G=="if"||G=="unless")&&A.column()==A.indentation()||G=="do"&&R.context.indented{(function(t){typeof ah=="object"&&typeof sh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode=function(y,m){t.defineMode(y,function(b){return t.simpleMode(b,m)})},t.simpleMode=function(y,m){n(m,"start");var b={},w=m.meta||{},D=!1;for(var E in m)if(E!=w&&m.hasOwnProperty(E))for(var S=b[E]=[],z=m[E],A=0;A2&&R.token&&typeof R.token!="string"){w.pending=[];for(var B=2;B-1)return t.Pass;var E=b.indent.length-1,S=y[b.state];e:for(;;){for(var z=0;z{(function(t){typeof uh=="object"&&typeof ch=="object"?t(Qe(),lh()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),t.defineMIME("text/x-rustsrc","rust"),t.defineMIME("text/rust","rust")})});var ph=le((hh,fh)=>{(function(t){typeof hh=="object"&&typeof fh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("shell",function(){var n={};function i(m,b){for(var w=0;w1&&m.eat("$");var w=m.next();return/['"({]/.test(w)?(b.tokens[0]=h(w,w=="("?"quote":w=="{"?"def":"string"),y(m,b)):(/\d/.test(w)||m.eatWhile(/\w/),b.tokens.shift(),"def")};function y(m,b){return(b.tokens[0]||d)(m,b)}return{startState:function(){return{tokens:[]}},token:function(m,b){return y(m,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),t.defineMIME("text/x-sh","shell"),t.defineMIME("application/x-sh","shell")})});var vh=le((mh,gh)=>{(function(t){typeof mh=="object"&&typeof gh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("sql",function(p,g){var y=g.client||{},m=g.atoms||{false:!0,true:!0,null:!0},b=g.builtin||d(h),w=g.keywords||d(c),D=g.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=g.support||{},S=g.hooks||{},z=g.dateSQL||{date:!0,time:!0,timestamp:!0},A=g.backslashStringEscapes!==!1,R=g.brackets||/^[\{}\(\)\[\]]/,U=g.punctuation||/^[;.,:]/;function Y(P,Z){var _=P.next();if(S[_]){var V=S[_](P,Z);if(V!==!1)return V}if(E.hexNumber&&(_=="0"&&P.match(/^[xX][0-9a-fA-F]+/)||(_=="x"||_=="X")&&P.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((_=="b"||_=="B")&&P.match(/^'[01]+'/)||_=="0"&&P.match(/^b[01]+/)))return"number";if(_.charCodeAt(0)>47&&_.charCodeAt(0)<58)return P.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&P.match(/^\.(?!\.)/),"number";if(_=="?"&&(P.eatSpace()||P.eol()||P.eat(";")))return"variable-3";if(_=="'"||_=='"'&&E.doubleQuote)return Z.tokenize=B(_),Z.tokenize(P,Z);if((E.nCharCast&&(_=="n"||_=="N")||E.charsetCast&&_=="_"&&P.match(/[a-z][a-z0-9]*/i))&&(P.peek()=="'"||P.peek()=='"'))return"keyword";if(E.escapeConstant&&(_=="e"||_=="E")&&(P.peek()=="'"||P.peek()=='"'&&E.doubleQuote))return Z.tokenize=function(Q,q){return(q.tokenize=B(Q.next(),!0))(Q,q)},"keyword";if(E.commentSlashSlash&&_=="/"&&P.eat("/"))return P.skipToEnd(),"comment";if(E.commentHash&&_=="#"||_=="-"&&P.eat("-")&&(!E.commentSpaceRequired||P.eat(" ")))return P.skipToEnd(),"comment";if(_=="/"&&P.eat("*"))return Z.tokenize=G(1),Z.tokenize(P,Z);if(_=="."){if(E.zerolessFloat&&P.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(P.match(/^\.+/))return null;if(E.ODBCdotTable&&P.match(/^[\w\d_$#]+/))return"variable-2"}else{if(D.test(_))return P.eatWhile(D),"operator";if(R.test(_))return"bracket";if(U.test(_))return P.eatWhile(U),"punctuation";if(_=="{"&&(P.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||P.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";P.eatWhile(/^[_\w\d]/);var j=P.current().toLowerCase();return z.hasOwnProperty(j)&&(P.match(/^( )+'[^']*'/)||P.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(j)?"atom":b.hasOwnProperty(j)?"builtin":w.hasOwnProperty(j)?"keyword":y.hasOwnProperty(j)?"string-2":null}}function B(P,Z){return function(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(Q==P&&!j){V.tokenize=Y;break}j=(A||Z)&&!j&&Q=="\\"}return"string"}}function G(P){return function(Z,_){var V=Z.match(/^.*?(\/\*|\*\/)/);return V?V[1]=="/*"?_.tokenize=G(P+1):P>1?_.tokenize=G(P-1):_.tokenize=Y:Z.skipToEnd(),"comment"}}function ee(P,Z,_){Z.context={prev:Z.context,indent:P.indentation(),col:P.column(),type:_}}function J(P){P.indent=P.context.indent,P.context=P.context.prev}return{startState:function(){return{tokenize:Y,context:null}},token:function(P,Z){if(P.sol()&&(Z.context&&Z.context.align==null&&(Z.context.align=!1)),Z.tokenize==Y&&P.eatSpace())return null;var _=Z.tokenize(P,Z);if(_=="comment")return _;Z.context&&Z.context.align==null&&(Z.context.align=!0);var V=P.current();return V=="("?ee(P,Z,")"):V=="["?ee(P,Z,"]"):Z.context&&Z.context.type==V&&J(Z),_},indent:function(P,Z){var _=P.context;if(!_)return t.Pass;var V=Z.charAt(0)==_.type;return _.align?_.col+(V?0:1):_.indent+(V?0:p.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function n(p){for(var g;(g=p.next())!=null;)if(g=="`"&&!p.eat("`"))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function i(p){for(var g;(g=p.next())!=null;)if(g=='"'&&!p.eat('"'))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function s(p){return p.eat("@")&&(p.match(/^session\./),p.match(/^local\./),p.match(/^global\./)),p.eat("'")?(p.match(/^.*'/),"variable-2"):p.eat('"')?(p.match(/^.*"/),"variable-2"):p.eat("`")?(p.match(/^.*`/),"variable-2"):p.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function u(p){return p.eat("N")?"atom":p.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var c="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function d(p){for(var g={},y=p.split(" "),m=0;m!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:d("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":s}}),t.defineMIME("text/x-mysql",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-mariadb",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-sqlite",{name:"sql",client:d("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:d(c+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:d("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:d("date time timestamp datetime"),support:d("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":s,":":s,"?":s,$:s,'"':i,"`":n}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:d("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:d("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:d("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:d("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:d("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:d("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:d("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:d("date time timestamp"),support:d("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:d("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:d("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:d("date timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:d("source"),keywords:d(c+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:d("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:d("false true"),builtin:d("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:d("source"),keywords:d("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:d("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:d("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:d("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:d("source"),keywords:d("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:d("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("time"),support:d("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var wh=le((bh,yh)=>{(function(t){typeof bh=="object"&&typeof yh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,i){if(!i.inString&&(n.peek()=='"'||n.peek()=="'")&&(i.stringType=n.peek(),n.next(),i.inString=!0),n.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!n.eol();)n.peek()===i.stringType?(n.next(),i.inString=!1):n.peek()==="\\"?(n.next(),n.next()):n.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&n.peek()==="]")return n.next(),i.inArray--,"bracket";if(i.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(i.lhs&&n.eatWhile(function(s){return s!="="&&s!=" "}))return"property";if(i.lhs&&n.peek()==="=")return n.next(),i.lhs=!1,null;if(!i.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(n.match("true")||n.match("false")))return"atom";if(!i.lhs&&n.peek()==="[")return i.inArray++,n.next(),"bracket";if(!i.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null}}}),t.defineMIME("text/x-toml","toml")})});var _h=le((kh,xh)=>{(function(t){typeof kh=="object"&&typeof xh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("yaml",function(){var n=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+n.join(")|(")+"))$","i");return{token:function(s,u){var c=s.peek(),d=u.escaped;if(u.escaped=!1,c=="#"&&(s.pos==0||/\s/.test(s.string.charAt(s.pos-1))))return s.skipToEnd(),"comment";if(s.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(u.literal&&s.indentation()>u.keyCol)return s.skipToEnd(),"string";if(u.literal&&(u.literal=!1),s.sol()){if(u.keyCol=0,u.pair=!1,u.pairStart=!1,s.match(/---/))return"def";if(s.match(/\.\.\./))return"def";if(s.match(/\s*-\s+/))return"meta"}if(s.match(/^(\{|\}|\[|\])/))return c=="{"?u.inlinePairs++:c=="}"?u.inlinePairs--:c=="["?u.inlineList++:u.inlineList--,"meta";if(u.inlineList>0&&!d&&c==",")return s.next(),"meta";if(u.inlinePairs>0&&!d&&c==",")return u.keyCol=0,u.pair=!1,u.pairStart=!1,s.next(),"meta";if(u.pairStart){if(s.match(/^\s*(\||\>)\s*/))return u.literal=!0,"meta";if(s.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(u.inlinePairs==0&&s.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(u.inlinePairs>0&&s.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(s.match(i))return"keyword"}return!u.pair&&s.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(u.pair=!0,u.keyCol=s.indentation(),"atom"):u.pair&&s.match(/^:\s*/)?(u.pairStart=!0,"meta"):(u.pairStart=!1,u.escaped=c=="\\",s.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-yaml","yaml"),t.defineMIME("text/yaml","yaml")})});var Eh=le((Ch,Sh)=>{(function(t){typeof Ch=="object"&&typeof Sh=="object"?t(Qe()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineOption("scrollPastEnd",!1,function(s,u,c){c&&c!=t.Init&&(s.off("change",n),s.off("refresh",i),s.display.lineSpace.parentNode.style.paddingBottom="",s.state.scrollPastEndPadding=null),u&&(s.on("change",n),s.on("refresh",i),i(s))});function n(s,u){t.changeEnd(u).line==s.lastLine()&&i(s)}function i(s){var u="";if(s.lineCount()>1){var c=s.display.scroller.clientHeight-30,d=s.getLineHandle(s.lastLine()).height;u=c-d+"px"}s.state.scrollPastEndPadding!=u&&(s.state.scrollPastEndPadding=u,s.display.lineSpace.parentNode.style.paddingBottom=u,s.off("refresh",i),s.setSize(),s.on("refresh",i))}})});var Fh=le((o_,na)=>{"use strict";function ra(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(i){return typeof i}:ra=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ra(t)}function jy(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Qs(t,n)}function Qs(t,n){return Qs=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},Qs(t,n)}function Uy(t){var n=Hy();return function(){var s=ia(t),u;if(n){var c=ia(this).constructor;u=Reflect.construct(s,arguments,c)}else u=s.apply(this,arguments);return Dh(this,u)}}function Dh(t,n){return n&&(ra(n)==="object"||typeof n=="function")?n:Yi(t)}function Yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hy(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ia(t)}function Ue(t,n){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=Wy(t))||n&&t&&typeof t.length=="number"){i&&(t=i);var s=0,u=function(){};return{s:u,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(g){throw g},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=t[Symbol.iterator]()},n:function(){var g=i.next();return c=g.done,g},e:function(g){d=!0,h=g},f:function(){try{!c&&i.return!=null&&i.return()}finally{if(d)throw h}}}}function Wy(t,n){if(!t)return;if(typeof t=="string")return Ah(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ah(t,n)}function Ah(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,s=new Array(n);i1?u-1:0),d=1;d'),this.element.appendChild(c));var g=c.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(c,d,h,p){var g={srcX:0,srcY:0,srcWidth:c.width,srcHeight:c.height},y=c.width/c.height;d==null&&h==null?(d=g.srcWidth,h=g.srcHeight):d==null?d=h*y:h==null&&(h=d/y),d=Math.min(d,g.srcWidth),h=Math.min(h,g.srcHeight);var m=d/h;if(g.srcWidth>d||g.srcHeight>h)if(p==="crop")y>m?(g.srcHeight=c.height,g.srcWidth=g.srcHeight*m):(g.srcWidth=c.width,g.srcHeight=g.srcWidth/m);else if(p==="contain")y>m?h=d/y:d=h*y;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(c.width-g.srcWidth)/2,g.srcY=(c.height-g.srcHeight)/2,g.trgWidth=d,g.trgHeight=h,g},transformFile:function(c,d){return(this.options.resizeWidth||this.options.resizeHeight)&&c.type.match(/image.*/)?this.resizeImage(c,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,d):d(c)},previewTemplate:`
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var P;p&&(P=window.scrollY),o.input.focus(),p&&window.scrollTo(null,P),o.input.reset(),a.somethingSelected()||(l.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function K(){if(l.selectionStart!=null){var ae=a.somethingSelected(),he="​"+(ae?l.value:"");l.value="⇚",l.value=he,r.prevInput=ae?"":"​",l.selectionStart=1,l.selectionEnd=he.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=C,l.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=v),l.selectionStart!=null){(!d||d&&h<9)&&K();var ae=0,he=function(){o.selForContextMenu==a.doc.sel&&l.selectionStart==0&&l.selectionEnd>0&&r.prevInput=="​"?Lt(a,mc)(a):ae++<10?o.detectingSelectAll=setTimeout(he,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(he,200)}}if(d&&h>=9&&K(),G){Bt(e);var ne=function(){Be(window,"mouseup",ne),setTimeout($,20)};Te(window,"mouseup",ne)}else setTimeout($,50)},vt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},vt.prototype.setUneditable=function(){},vt.prototype.needsContentAttribute=!1;function Py(e,r){if(r=r?T(r):{},r.value=e.value,!r.tabindex&&e.tabIndex&&(r.tabindex=e.tabIndex),!r.placeholder&&e.placeholder&&(r.placeholder=e.placeholder),r.autofocus==null){var a=q();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var l;if(e.form&&(Te(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;l=f.submit;try{var v=f.submit=function(){o(),f.submit=l,f.submit(),f.submit=v}}catch(x){}}r.finishInit=function(x){x.save=o,x.getTextArea=function(){return e},x.toTextArea=function(){x.toTextArea=isNaN,o(),e.parentNode.removeChild(x.getWrapperElement()),e.style.display="",e.form&&(Be(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=l))}},e.style.display="none";var k=ut(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Ny(e){e.off=Be,e.on=Te,e.wheelEventPixels=Gb,e.Doc=Zt,e.splitLines=Dn,e.countColumn=de,e.findColumn=De,e.isWordChar=X,e.Pass=Oe,e.signal=dt,e.Line=Or,e.changeEnd=or,e.scrollbarModel=$u,e.Pos=W,e.cmpPos=fe,e.modes=bi,e.mimeModes=jn,e.resolveMode=Hn,e.getMode=yi,e.modeExtensions=Un,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=zr,e.commands=Ui,e.keyMap=Kn,e.keyName=Ic,e.isModifierKey=Tc,e.lookupKey=Yr,e.normalizeKeyMap=py,e.StringStream=lt,e.SharedTextMarker=Bi,e.TextMarker=sr,e.LineWidget=Ni,e.e_preventDefault=St,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=I,e.contains=Q,e.rmClass=J,e.keyNames=lr}Ly(ut),qy(ut);var By="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&oe(By,Jo)<0&&(ut.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Jn(Zt),ut.inputStyles={textarea:vt,contenteditable:tt},ut.defineMode=function(e){!ut.defaults.mode&&e!="null"&&(ut.defaults.mode=e),qr.apply(this,arguments)},ut.defineMIME=bn,ut.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ut.defineMIME("text/plain","null"),ut.defineExtension=function(e,r){ut.prototype[e]=r},ut.defineDocExtension=function(e,r){Zt.prototype[e]=r},ut.fromTextArea=Py,Ny(ut),ut.version="5.58.1",ut})});var Ks=ue((Vi,Gs)=>{!function(t,n){typeof Vi=="object"&&typeof Gs=="object"?Gs.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Vi=="object"?Vi.ClipboardJS=n():t.ClipboardJS=n()}(Vi,function(){return i={},t.m=n=[function(s,u){s.exports=function(c){var d;if(c.nodeName==="SELECT")c.focus(),d=c.value;else if(c.nodeName==="INPUT"||c.nodeName==="TEXTAREA"){var h=c.hasAttribute("readonly");h||c.setAttribute("readonly",""),c.select(),c.setSelectionRange(0,c.value.length),h||c.removeAttribute("readonly"),d=c.value}else{c.hasAttribute("contenteditable")&&c.focus();var p=window.getSelection(),g=document.createRange();g.selectNodeContents(c),p.removeAllRanges(),p.addRange(g),d=p.toString()}return d}},function(s,u){function c(){}c.prototype={on:function(d,h,p){var g=this.e||(this.e={});return(g[d]||(g[d]=[])).push({fn:h,ctx:p}),this},once:function(d,h,p){var g=this;function y(){g.off(d,y),h.apply(p,arguments)}return y._=h,this.on(d,y,p)},emit:function(d){for(var h=[].slice.call(arguments,1),p=((this.e||(this.e={}))[d]||[]).slice(),g=0,y=p.length;g{(function(t){typeof Jc=="object"&&typeof ed=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("css",function(ee,J){var O=J.inline;J.propertyKeywords||(J=t.resolveMode("text/css"));var Z=ee.indentUnit,_=J.tokenHooks,V=J.documentTypes||{},j=J.mediaTypes||{},Q=J.mediaFeatures||{},q=J.mediaValueKeywords||{},I=J.propertyKeywords||{},H=J.nonStandardPropertyKeywords||{},se=J.fontProperties||{},F=J.counterDescriptors||{},T=J.colorKeywords||{},de=J.valueKeywords||{},ce=J.allowNested,oe=J.lineComment,xe=J.supportsAtComponent===!0,Oe,ye;function re(X,le){return Oe=le,X}function we(X,le){var te=X.next();if(_[te]){var He=_[te](X,le);if(He!==!1)return He}if(te=="@")return X.eatWhile(/[\w\\\-]/),re("def",X.current());if(te=="="||(te=="~"||te=="|")&&X.eat("="))return re(null,"compare");if(te=='"'||te=="'")return le.tokenize=De(te),le.tokenize(X,le);if(te=="#")return X.eatWhile(/[\w\\\-]/),re("atom","hash");if(te=="!")return X.match(/^\s*\w*/),re("keyword","important");if(/\d/.test(te)||te=="."&&X.eat(/\d/))return X.eatWhile(/[\w.%]/),re("number","unit");if(te==="-"){if(/[\d.]/.test(X.peek()))return X.eatWhile(/[\w.%]/),re("number","unit");if(X.match(/^-[\w\\\-]*/))return X.eatWhile(/[\w\\\-]/),X.match(/^\s*:/,!1)?re("variable-2","variable-definition"):re("variable-2","variable");if(X.match(/^\w+-/))return re("meta","meta")}else return/[,+>*\/]/.test(te)?re(null,"select-op"):te=="."&&X.match(/^-?[_a-z][_a-z0-9-]*/i)?re("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(te)?re(null,te):X.match(/[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/.test(X.current().toLowerCase())&&(le.tokenize=Pe),re("variable callee","variable")):/[\w\\\-]/.test(te)?(X.eatWhile(/[\w\\\-]/),re("property","word")):re(null,null)}function De(X){return function(le,te){for(var He=!1,Ct;(Ct=le.next())!=null;){if(Ct==X&&!He){X==")"&&le.backUp(1);break}He=!He&&Ct=="\\"}return(Ct==X||!He&&X!=")")&&(te.tokenize=null),re("string","string")}}function Pe(X,le){return X.next(),X.match(/\s*[\"\')]/,!1)?le.tokenize=null:le.tokenize=De(")"),re(null,"(")}function rt(X,le,te){this.type=X,this.indent=le,this.prev=te}function Ce(X,le,te,He){return X.context=new rt(te,le.indentation()+(He===!1?0:Z),X.context),te}function nt(X){return X.context.prev&&(X.context=X.context.prev),X.context.type}function mt(X,le,te){return qe[te.context.type](X,le,te)}function gt(X,le,te,He){for(var Ct=He||1;Ct>0;Ct--)te.context=te.context.prev;return mt(X,le,te)}function Wt(X){var le=X.current().toLowerCase();de.hasOwnProperty(le)?ye="atom":T.hasOwnProperty(le)?ye="keyword":ye="variable"}var qe={};return qe.top=function(X,le,te){if(X=="{")return Ce(te,le,"block");if(X=="}"&&te.context.prev)return nt(te);if(xe&&/@component/i.test(X))return Ce(te,le,"atComponentBlock");if(/^@(-moz-)?document$/i.test(X))return Ce(te,le,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(X))return Ce(te,le,"atBlock");if(/^@(font-face|counter-style)/i.test(X))return te.stateArg=X,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(X))return"keyframes";if(X&&X.charAt(0)=="@")return Ce(te,le,"at");if(X=="hash")ye="builtin";else if(X=="word")ye="tag";else{if(X=="variable-definition")return"maybeprop";if(X=="interpolation")return Ce(te,le,"interpolation");if(X==":")return"pseudo";if(ce&&X=="(")return Ce(te,le,"parens")}return te.context.type},qe.block=function(X,le,te){if(X=="word"){var He=le.current().toLowerCase();return I.hasOwnProperty(He)?(ye="property","maybeprop"):H.hasOwnProperty(He)?(ye="string-2","maybeprop"):ce?(ye=le.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(ye+=" error","maybeprop")}else return X=="meta"?"block":!ce&&(X=="hash"||X=="qualifier")?(ye="error","block"):qe.top(X,le,te)},qe.maybeprop=function(X,le,te){return X==":"?Ce(te,le,"prop"):mt(X,le,te)},qe.prop=function(X,le,te){if(X==";")return nt(te);if(X=="{"&&ce)return Ce(te,le,"propBlock");if(X=="}"||X=="{")return gt(X,le,te);if(X=="(")return Ce(te,le,"parens");if(X=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(le.current()))ye+=" error";else if(X=="word")Wt(le);else if(X=="interpolation")return Ce(te,le,"interpolation");return"prop"},qe.propBlock=function(X,le,te){return X=="}"?nt(te):X=="word"?(ye="property","maybeprop"):te.context.type},qe.parens=function(X,le,te){return X=="{"||X=="}"?gt(X,le,te):X==")"?nt(te):X=="("?Ce(te,le,"parens"):X=="interpolation"?Ce(te,le,"interpolation"):(X=="word"&&Wt(le),"parens")},qe.pseudo=function(X,le,te){return X=="meta"?"pseudo":X=="word"?(ye="variable-3",te.context.type):mt(X,le,te)},qe.documentTypes=function(X,le,te){return X=="word"&&V.hasOwnProperty(le.current())?(ye="tag",te.context.type):qe.atBlock(X,le,te)},qe.atBlock=function(X,le,te){if(X=="(")return Ce(te,le,"atBlock_parens");if(X=="}"||X==";")return gt(X,le,te);if(X=="{")return nt(te)&&Ce(te,le,ce?"block":"top");if(X=="interpolation")return Ce(te,le,"interpolation");if(X=="word"){var He=le.current().toLowerCase();He=="only"||He=="not"||He=="and"||He=="or"?ye="keyword":j.hasOwnProperty(He)?ye="attribute":Q.hasOwnProperty(He)?ye="property":q.hasOwnProperty(He)?ye="keyword":I.hasOwnProperty(He)?ye="property":H.hasOwnProperty(He)?ye="string-2":de.hasOwnProperty(He)?ye="atom":T.hasOwnProperty(He)?ye="keyword":ye="error"}return te.context.type},qe.atComponentBlock=function(X,le,te){return X=="}"?gt(X,le,te):X=="{"?nt(te)&&Ce(te,le,ce?"block":"top",!1):(X=="word"&&(ye="error"),te.context.type)},qe.atBlock_parens=function(X,le,te){return X==")"?nt(te):X=="{"||X=="}"?gt(X,le,te,2):qe.atBlock(X,le,te)},qe.restricted_atBlock_before=function(X,le,te){return X=="{"?Ce(te,le,"restricted_atBlock"):X=="word"&&te.stateArg=="@counter-style"?(ye="variable","restricted_atBlock_before"):mt(X,le,te)},qe.restricted_atBlock=function(X,le,te){return X=="}"?(te.stateArg=null,nt(te)):X=="word"?(te.stateArg=="@font-face"&&!se.hasOwnProperty(le.current().toLowerCase())||te.stateArg=="@counter-style"&&!F.hasOwnProperty(le.current().toLowerCase())?ye="error":ye="property","maybeprop"):"restricted_atBlock"},qe.keyframes=function(X,le,te){return X=="word"?(ye="variable","keyframes"):X=="{"?Ce(te,le,"top"):mt(X,le,te)},qe.at=function(X,le,te){return X==";"?nt(te):X=="{"||X=="}"?gt(X,le,te):(X=="word"?ye="tag":X=="hash"&&(ye="builtin"),"at")},qe.interpolation=function(X,le,te){return X=="}"?nt(te):X=="{"||X==";"?gt(X,le,te):(X=="word"?ye="variable":X!="variable"&&X!="("&&X!=")"&&(ye="error"),"interpolation")},{startState:function(X){return{tokenize:null,state:O?"block":"top",stateArg:null,context:new rt(O?"block":"top",X||0,null)}},token:function(X,le){if(!le.tokenize&&X.eatSpace())return null;var te=(le.tokenize||we)(X,le);return te&&typeof te=="object"&&(Oe=te[1],te=te[0]),ye=te,Oe!="comment"&&(le.state=qe[le.state](Oe,X,le)),ye},indent:function(X,le){var te=X.context,He=le&&le.charAt(0),Ct=te.indent;return te.type=="prop"&&(He=="}"||He==")")&&(te=te.prev),te.prev&&(He=="}"&&(te.type=="block"||te.type=="top"||te.type=="interpolation"||te.type=="restricted_atBlock")?(te=te.prev,Ct=te.indent):(He==")"&&(te.type=="parens"||te.type=="atBlock_parens")||He=="{"&&(te.type=="at"||te.type=="atBlock"))&&(Ct=Math.max(0,te.indent-Z))),Ct},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:oe,fold:"brace"}});function n(ee){for(var J={},O=0;O{(function(t){typeof td=="object"&&typeof nd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(q,I,H,se,F,T){this.indented=q,this.column=I,this.type=H,this.info=se,this.align=F,this.prev=T}function i(q,I,H,se){var F=q.indented;return q.context&&q.context.type=="statement"&&H!="statement"&&(F=q.context.indented),q.context=new n(F,I,H,se,null,q.context)}function s(q){var I=q.context.type;return(I==")"||I=="]"||I=="}")&&(q.indented=q.context.indented),q.context=q.context.prev}function u(q,I,H){if(I.prevToken=="variable"||I.prevToken=="type")return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(q.string.slice(0,H)))return!0;if(I.typeAtEndOfLine&&q.column()==q.indentation())return!0}function c(q){for(;;){if(!q||q.type=="top")return!0;if(q.type=="}"&&q.prev.info!="namespace")return!1;q=q.prev}}t.defineMode("clike",function(q,I){var H=q.indentUnit,se=I.statementIndentUnit||H,F=I.dontAlignCalls,T=I.keywords||{},de=I.types||{},ce=I.builtin||{},oe=I.blockKeywords||{},xe=I.defKeywords||{},Oe=I.atoms||{},ye=I.hooks||{},re=I.multiLineStrings,we=I.indentStatements!==!1,De=I.indentSwitch!==!1,Pe=I.namespaceSeparator,rt=I.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,Ce=I.numberStart||/[\d\.]/,nt=I.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,mt=I.isOperatorChar||/[+\-*&%=<>!?|\/]/,gt=I.isIdentifierChar||/[\w\$_\xa1-\uffff]/,Wt=I.isReservedIdentifier||!1,qe,X;function le(Ae,Fe){var ke=Ae.next();if(ye[ke]){var Ie=ye[ke](Ae,Fe);if(Ie!==!1)return Ie}if(ke=='"'||ke=="'")return Fe.tokenize=te(ke),Fe.tokenize(Ae,Fe);if(rt.test(ke))return qe=ke,null;if(Ce.test(ke)){if(Ae.backUp(1),Ae.match(nt))return"number";Ae.next()}if(ke=="/"){if(Ae.eat("*"))return Fe.tokenize=He,He(Ae,Fe);if(Ae.eat("/"))return Ae.skipToEnd(),"comment"}if(mt.test(ke)){for(;!Ae.match(/^\/[\/*]/,!1)&&Ae.eat(mt););return"operator"}if(Ae.eatWhile(gt),Pe)for(;Ae.match(Pe);)Ae.eatWhile(gt);var Ye=Ae.current();return h(T,Ye)?(h(oe,Ye)&&(qe="newstatement"),h(xe,Ye)&&(X=!0),"keyword"):h(de,Ye)?"type":h(ce,Ye)||Wt&&Wt(Ye)?(h(oe,Ye)&&(qe="newstatement"),"builtin"):h(Oe,Ye)?"atom":"variable"}function te(Ae){return function(Fe,ke){for(var Ie=!1,Ye,hn=!1;(Ye=Fe.next())!=null;){if(Ye==Ae&&!Ie){hn=!0;break}Ie=!Ie&&Ye=="\\"}return(hn||!(Ie||re))&&(ke.tokenize=null),"string"}}function He(Ae,Fe){for(var ke=!1,Ie;Ie=Ae.next();){if(Ie=="/"&&ke){Fe.tokenize=null;break}ke=Ie=="*"}return"comment"}function Ct(Ae,Fe){I.typeFirstDefinitions&&Ae.eol()&&c(Fe.context)&&(Fe.typeAtEndOfLine=u(Ae,Fe,Ae.pos))}return{startState:function(Ae){return{tokenize:null,context:new n((Ae||0)-H,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(Ae,Fe){var ke=Fe.context;if(Ae.sol()&&(ke.align==null&&(ke.align=!1),Fe.indented=Ae.indentation(),Fe.startOfLine=!0),Ae.eatSpace())return Ct(Ae,Fe),null;qe=X=null;var Ie=(Fe.tokenize||le)(Ae,Fe);if(Ie=="comment"||Ie=="meta")return Ie;if(ke.align==null&&(ke.align=!0),qe==";"||qe==":"||qe==","&&Ae.match(/^\s*(?:\/\/.*)?$/,!1))for(;Fe.context.type=="statement";)s(Fe);else if(qe=="{")i(Fe,Ae.column(),"}");else if(qe=="[")i(Fe,Ae.column(),"]");else if(qe=="(")i(Fe,Ae.column(),")");else if(qe=="}"){for(;ke.type=="statement";)ke=s(Fe);for(ke.type=="}"&&(ke=s(Fe));ke.type=="statement";)ke=s(Fe)}else qe==ke.type?s(Fe):we&&((ke.type=="}"||ke.type=="top")&&qe!=";"||ke.type=="statement"&&qe=="newstatement")&&i(Fe,Ae.column(),"statement",Ae.current());if(Ie=="variable"&&(Fe.prevToken=="def"||I.typeFirstDefinitions&&u(Ae,Fe,Ae.start)&&c(Fe.context)&&Ae.match(/^\s*\(/,!1))&&(Ie="def"),ye.token){var Ye=ye.token(Ae,Fe,Ie);Ye!==void 0&&(Ie=Ye)}return Ie=="def"&&I.styleDefs===!1&&(Ie="variable"),Fe.startOfLine=!1,Fe.prevToken=X?"def":Ie||qe,Ct(Ae,Fe),Ie},indent:function(Ae,Fe){if(Ae.tokenize!=le&&Ae.tokenize!=null||Ae.typeAtEndOfLine)return t.Pass;var ke=Ae.context,Ie=Fe&&Fe.charAt(0),Ye=Ie==ke.type;if(ke.type=="statement"&&Ie=="}"&&(ke=ke.prev),I.dontIndentStatements)for(;ke.type=="statement"&&I.dontIndentStatements.test(ke.info);)ke=ke.prev;if(ye.indent){var hn=ye.indent(Ae,ke,Fe,H);if(typeof hn=="number")return hn}var Ot=ke.prev&&ke.prev.info=="switch";if(I.allmanIndentation&&/[{(]/.test(Ie)){for(;ke.type!="top"&&ke.type!="}";)ke=ke.prev;return ke.indented}return ke.type=="statement"?ke.indented+(Ie=="{"?0:se):ke.align&&(!F||ke.type!=")")?ke.column+(Ye?0:1):ke.type==")"&&!Ye?ke.indented+se:ke.indented+(Ye?0:H)+(!Ye&&Ot&&!/^(?:case|default)\b/.test(Fe)?H:0)},electricInput:De?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});function d(q){for(var I={},H=q.split(" "),se=0;se!?|\/#:@]/,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return q.match('""')?(I.tokenize=Z,I.tokenize(q,I)):!1},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(q,I){var H=I.context;return H.type=="}"&&H.align&&q.eat(">")?(I.context=new n(H.indented,H.column,H.type,H.info,null,H.prev),"operator"):!1},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}});function V(q){return function(I,H){for(var se=!1,F,T=!1;!I.eol();){if(!q&&!se&&I.match('"')){T=!0;break}if(q&&I.match('"""')){T=!0;break}F=I.next(),!se&&F=="$"&&I.match("{")&&I.skipTo("}"),se=!se&&F=="\\"&&!q}return(T||!q)&&(H.tokenize=null),"string"}}O("text/x-kotlin",{name:"clike",keywords:d("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam"),types:d("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:d("catch class do else finally for if where try while enum"),defKeywords:d("class val var object interface fun"),atoms:d("true false null this"),hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},"*":function(q,I){return I.prevToken=="."?"variable":"operator"},'"':function(q,I){return I.tokenize=V(q.match('""')),I.tokenize(q,I)},"/":function(q,I){return q.eat("*")?(I.tokenize=_(1),I.tokenize(q,I)):!1},indent:function(q,I,H,se){var F=H&&H.charAt(0);if((q.prevToken=="}"||q.prevToken==")")&&H=="")return q.indented;if(q.prevToken=="operator"&&H!="}"&&q.context.type!="}"||q.prevToken=="variable"&&F=="."||(q.prevToken=="}"||q.prevToken==")")&&F==".")return se*2+I.indented;if(I.align&&I.type=="}")return I.indented+(q.context.type==(H||"").charAt(0)?0:se)}},modeProps:{closeBrackets:{triples:'"'}}}),O(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:d("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:d("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:d("for while do if else struct"),builtin:d("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:d("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":A},modeProps:{fold:["brace","include"]}}),O("text/x-nesc",{name:"clike",keywords:d(p+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:D,blockKeywords:d(S),atoms:d("null true false"),hooks:{"#":A},modeProps:{fold:["brace","include"]}}),O("text/x-objectivec",{name:"clike",keywords:d(p+" "+y),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:d(z+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R},modeProps:{fold:["brace","include"]}}),O("text/x-objectivec++",{name:"clike",keywords:d(p+" "+y+" "+g),types:E,builtin:d(m),blockKeywords:d(S+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:d(z+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:d("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:U,hooks:{"#":A,"*":R,u:B,U:B,L:B,R:B,"0":Y,"1":Y,"2":Y,"3":Y,"4":Y,"5":Y,"6":Y,"7":Y,"8":Y,"9":Y,token:function(q,I,H){if(H=="variable"&&q.peek()=="("&&(I.prevToken==";"||I.prevToken==null||I.prevToken=="}")&&G(q.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),O("text/x-squirrel",{name:"clike",keywords:d("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:D,blockKeywords:d("case catch class else for foreach if switch try while"),defKeywords:d("function local class"),typeFirstDefinitions:!0,atoms:d("true false null"),hooks:{"#":A},modeProps:{fold:["brace","include"]}});var j=null;function Q(q){return function(I,H){for(var se=!1,F,T=!1;!I.eol();){if(!se&&I.match('"')&&(q=="single"||I.match('""'))){T=!0;break}if(!se&&I.match("``")){j=Q(q),T=!0;break}F=I.next(),se=q=="single"&&!se&&F=="\\"}return T&&(H.tokenize=null),"string"}}O("text/x-ceylon",{name:"clike",keywords:d("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(q){var I=q.charAt(0);return I===I.toUpperCase()&&I!==I.toLowerCase()},blockKeywords:d("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:d("class dynamic function interface module object package value"),builtin:d("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:d("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(q){return q.eatWhile(/[\w\$_]/),"meta"},'"':function(q,I){return I.tokenize=Q(q.match('""')?"triple":"single"),I.tokenize(q,I)},"`":function(q,I){return!j||!q.match("`")?!1:(I.tokenize=j,j=null,I.tokenize(q,I))},"'":function(q){return q.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(q,I,H){if((H=="variable"||H=="type")&&I.prevToken==".")return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})});var od=ue((rd,id)=>{(function(t){typeof rd=="object"&&typeof id=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("diff",function(){var n={"+":"positive","-":"negative","@":"meta"};return{token:function(i){var s=i.string.search(/[\t ]+?$/);if(!i.sol()||s===0)return i.skipToEnd(),("error "+(n[i.string.charAt(0)]||"")).replace(/ $/,"");var u=n[i.peek()]||i.skipToEnd();return s===-1?i.skipToEnd():i.pos=s,u}}}),t.defineMIME("text/x-diff","diff")})});var ld=ue((ad,sd)=>{(function(t){typeof ad=="object"&&typeof sd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("fortran",function(){function n(g){for(var y={},m=0;m\/\:]/,d=new RegExp("(.and.|.or.|.eq.|.lt.|.le.|.gt.|.ge.|.ne.|.not.|.eqv.|.neqv.)","i");function h(g,y){if(g.match(d))return"operator";var m=g.next();if(m=="!")return g.skipToEnd(),"comment";if(m=='"'||m=="'")return y.tokenize=p(m),y.tokenize(g,y);if(/[\[\]\(\),]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(c.test(m))return g.eatWhile(c),"operator";g.eatWhile(/[\w\$_]/);var b=g.current().toLowerCase();return i.hasOwnProperty(b)?"keyword":s.hasOwnProperty(b)||u.hasOwnProperty(b)?"builtin":"variable"}function p(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||h)(g,y);return m=="comment"||m=="meta",m}}}),t.defineMIME("text/x-fortran","fortran")})});var dd=ue((ud,cd)=>{(function(t){typeof ud=="object"&&typeof cd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("go",function(n){var i=n.indentUnit,s={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},u={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},c=/[+\-*&^%:=<>!|\/]/,d;function h(w,D){var E=w.next();if(E=='"'||E=="'"||E=="`")return D.tokenize=p(E),D.tokenize(w,D);if(/[\d\.]/.test(E))return E=="."?w.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):E=="0"?w.match(/^[xX][0-9a-fA-F]+/)||w.match(/^0[0-7]+/):w.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(E))return d=E,null;if(E=="/"){if(w.eat("*"))return D.tokenize=g,g(w,D);if(w.eat("/"))return w.skipToEnd(),"comment"}if(c.test(E))return w.eatWhile(c),"operator";w.eatWhile(/[\w\$_\xa1-\uffff]/);var S=w.current();return s.propertyIsEnumerable(S)?((S=="case"||S=="default")&&(d="case"),"keyword"):u.propertyIsEnumerable(S)?"atom":"variable"}function p(w){return function(D,E){for(var S=!1,z,A=!1;(z=D.next())!=null;){if(z==w&&!S){A=!0;break}S=!S&&w!="`"&&z=="\\"}return(A||!(S||w=="`"))&&(E.tokenize=h),"string"}}function g(w,D){for(var E=!1,S;S=w.next();){if(S=="/"&&E){D.tokenize=h;break}E=S=="*"}return"comment"}function y(w,D,E,S,z){this.indented=w,this.column=D,this.type=E,this.align=S,this.prev=z}function m(w,D,E){return w.context=new y(w.indented,D,E,null,w.context)}function b(w){if(!w.context.prev)return;var D=w.context.type;return(D==")"||D=="]"||D=="}")&&(w.indented=w.context.indented),w.context=w.context.prev}return{startState:function(w){return{tokenize:null,context:new y((w||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(w,D){var E=D.context;if(w.sol()&&(E.align==null&&(E.align=!1),D.indented=w.indentation(),D.startOfLine=!0,E.type=="case"&&(E.type="}")),w.eatSpace())return null;d=null;var S=(D.tokenize||h)(w,D);return S=="comment"||(E.align==null&&(E.align=!0),d=="{"?m(D,w.column(),"}"):d=="["?m(D,w.column(),"]"):d=="("?m(D,w.column(),")"):d=="case"?E.type="case":(d=="}"&&E.type=="}"||d==E.type)&&b(D),D.startOfLine=!1),S},indent:function(w,D){if(w.tokenize!=h&&w.tokenize!=null)return t.Pass;var E=w.context,S=D&&D.charAt(0);if(E.type=="case"&&/^(?:case|default)\b/.test(D))return w.context.type="}",E.indented;var z=S==E.type;return E.align?E.column+(z?0:1):E.indented+(z?0:i)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),t.defineMIME("text/x-go","go")})});var pd=ue((hd,fd)=>{(function(t){typeof hd=="object"&&typeof fd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haskell",function(n,i){function s(A,R,U){return R(U),U(A,R)}var u=/[a-z_]/,c=/[A-Z]/,d=/\d/,h=/[0-9A-Fa-f]/,p=/[0-7]/,g=/[a-z_A-Z0-9'\xa1-\uffff]/,y=/[-!#$%&*+.\/<=>?@\\^|~:]/,m=/[(),;[\]`{}]/,b=/[ \t\v\f]/;function w(A,R){if(A.eatWhile(b))return null;var U=A.next();if(m.test(U)){if(U=="{"&&A.eat("-")){var Y="comment";return A.eat("#")&&(Y="meta"),s(A,R,D(Y,1))}return null}if(U=="'")return A.eat("\\"),A.next(),A.eat("'")?"string":"string error";if(U=='"')return s(A,R,E);if(c.test(U))return A.eatWhile(g),A.eat(".")?"qualifier":"variable-2";if(u.test(U))return A.eatWhile(g),"variable";if(d.test(U)){if(U=="0"){if(A.eat(/[xX]/))return A.eatWhile(h),"integer";if(A.eat(/[oO]/))return A.eatWhile(p),"number"}A.eatWhile(d);var Y="number";return A.match(/^\.\d+/)&&(Y="number"),A.eat(/[eE]/)&&(Y="number",A.eat(/[-+]/),A.eatWhile(d)),Y}if(U=="."&&A.eat("."))return"keyword";if(y.test(U)){if(U=="-"&&A.eat(/-/)&&(A.eatWhile(/-/),!A.eat(y)))return A.skipToEnd(),"comment";var Y="variable";return U==":"&&(Y="variable-2"),A.eatWhile(y),Y}return"error"}function D(A,R){return R==0?w:function(U,Y){for(var B=R;!U.eol();){var G=U.next();if(G=="{"&&U.eat("-"))++B;else if(G=="-"&&U.eat("}")&&(--B,B==0))return Y(w),A}return Y(D(A,B)),A}}function E(A,R){for(;!A.eol();){var U=A.next();if(U=='"')return R(w),"string";if(U=="\\"){if(A.eol()||A.eat(b))return R(S),"string";A.eat("&")||A.next()}}return R(w),"string error"}function S(A,R){return A.eat("\\")?s(A,R,E):(A.next(),R(w),"error")}var z=function(){var A={};function R(B){return function(){for(var G=0;G","@","~","=>"),R("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),R("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),R("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var U=i.overrideKeywords;if(U)for(var Y in U)U.hasOwnProperty(Y)&&(A[Y]=U[Y]);return A}();return{startState:function(){return{f:w}},copyState:function(A){return{f:A.f}},token:function(A,R){var U=R.f(A,function(B){R.f=B}),Y=A.current();return z.hasOwnProperty(Y)?z[Y]:U},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}}),t.defineMIME("text/x-haskell","haskell")})});var ta=ue((md,gd)=>{(function(t){typeof md=="object"&&typeof gd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";var n={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",function(s,u){var c=s.indentUnit,d={},h=u.htmlMode?n:i;for(var p in h)d[p]=h[p];for(var p in u)d[p]=u[p];var g,y;function m(_,V){function j(I){return V.tokenize=I,I(_,V)}var Q=_.next();if(Q=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?j(D("atom","]]>")):null:_.match("--")?j(D("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),j(E(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),V.tokenize=D("meta","?>"),"meta"):(g=_.eat("/")?"closeTag":"openTag",V.tokenize=b,"tag bracket");if(Q=="&"){var q;return _.eat("#")?_.eat("x")?q=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):q=_.eatWhile(/[\d]/)&&_.eat(";"):q=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),q?"atom":"error"}else return _.eatWhile(/[^&<]/),null}m.isInText=!0;function b(_,V){var j=_.next();if(j==">"||j=="/"&&_.eat(">"))return V.tokenize=m,g=j==">"?"endTag":"selfcloseTag","tag bracket";if(j=="=")return g="equals",null;if(j=="<"){V.tokenize=m,V.state=R,V.tagName=V.tagStart=null;var Q=V.tokenize(_,V);return Q?Q+" tag error":"tag error"}else return/[\'\"]/.test(j)?(V.tokenize=w(j),V.stringStartCol=_.column(),V.tokenize(_,V)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function w(_){var V=function(j,Q){for(;!j.eol();)if(j.next()==_){Q.tokenize=b;break}return"string"};return V.isInAttribute=!0,V}function D(_,V){return function(j,Q){for(;!j.eol();){if(j.match(V)){Q.tokenize=m;break}j.next()}return _}}function E(_){return function(V,j){for(var Q;(Q=V.next())!=null;){if(Q=="<")return j.tokenize=E(_+1),j.tokenize(V,j);if(Q==">")if(_==1){j.tokenize=m;break}else return j.tokenize=E(_-1),j.tokenize(V,j)}return"meta"}}function S(_,V,j){this.prev=_.context,this.tagName=V,this.indent=_.indented,this.startOfLine=j,(d.doNotIndent.hasOwnProperty(V)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function z(_){_.context&&(_.context=_.context.prev)}function A(_,V){for(var j;;){if(!_.context)return;if(j=_.context.tagName,!d.contextGrabbers.hasOwnProperty(j)||!d.contextGrabbers[j].hasOwnProperty(V))return;z(_)}}function R(_,V,j){return _=="openTag"?(j.tagStart=V.column(),U):_=="closeTag"?Y:R}function U(_,V,j){return _=="word"?(j.tagName=V.current(),y="tag",ee):d.allowMissingTagName&&_=="endTag"?(y="tag bracket",ee(_,V,j)):(y="error",U)}function Y(_,V,j){if(_=="word"){var Q=V.current();return j.context&&j.context.tagName!=Q&&d.implicitlyClosed.hasOwnProperty(j.context.tagName)&&z(j),j.context&&j.context.tagName==Q||d.matchClosing===!1?(y="tag",B):(y="tag error",G)}else return d.allowMissingTagName&&_=="endTag"?(y="tag bracket",B(_,V,j)):(y="error",G)}function B(_,V,j){return _!="endTag"?(y="error",B):(z(j),R)}function G(_,V,j){return y="error",B(_,V,j)}function ee(_,V,j){if(_=="word")return y="attribute",J;if(_=="endTag"||_=="selfcloseTag"){var Q=j.tagName,q=j.tagStart;return j.tagName=j.tagStart=null,_=="selfcloseTag"||d.autoSelfClosers.hasOwnProperty(Q)?A(j,Q):(A(j,Q),j.context=new S(j,Q,q==j.indented)),R}return y="error",ee}function J(_,V,j){return _=="equals"?O:(d.allowMissing||(y="error"),ee(_,V,j))}function O(_,V,j){return _=="string"?Z:_=="word"&&d.allowUnquoted?(y="string",ee):(y="error",ee(_,V,j))}function Z(_,V,j){return _=="string"?Z:ee(_,V,j)}return{startState:function(_){var V={tokenize:m,state:R,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(V.baseIndent=_),V},token:function(_,V){if(!V.tagName&&_.sol()&&(V.indented=_.indentation()),_.eatSpace())return null;g=null;var j=V.tokenize(_,V);return(j||g)&&j!="comment"&&(y=null,V.state=V.state(g||j,_,V),y&&(j=y=="error"?j+" error":y)),j},indent:function(_,V,j){var Q=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+c;if(Q&&Q.noIndent)return t.Pass;if(_.tokenize!=b&&_.tokenize!=m)return j?j.match(/^(\s*)/)[0].length:0;if(_.tagName)return d.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+c*(d.multilineTagIndentFactor||1);if(d.alignCDATA&&/$/,blockCommentStart:"",configuration:d.htmlMode?"html":"xml",helperType:d.htmlMode?"html":"xml",skipAttribute:function(_){_.state==O&&(_.state=ee)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var V=[],j=_.context;j;j=j.prev)j.tagName&&V.push(j.tagName);return V.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})});var Xs=ue((vd,bd)=>{(function(t){typeof vd=="object"&&typeof bd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("javascript",function(n,i){var s=n.indentUnit,u=i.statementIndent,c=i.jsonld,d=i.json||c,h=i.typescript,p=i.wordCharacters||/[\w$\xa1-\uffff]/,g=function(){function L(Et){return{type:Et,style:"keyword"}}var N=L("keyword a"),ie=L("keyword b"),W=L("keyword c"),fe=L("keyword d"),$e=L("operator"),Je={type:"atom",style:"atom"};return{if:L("if"),while:N,with:N,else:ie,do:ie,try:ie,finally:ie,return:fe,break:fe,continue:fe,new:L("new"),delete:W,void:W,throw:W,debugger:L("debugger"),var:L("var"),const:L("var"),let:L("var"),function:L("function"),catch:L("catch"),for:L("for"),switch:L("switch"),case:L("case"),default:L("default"),in:$e,typeof:$e,instanceof:$e,true:Je,false:Je,null:Je,undefined:Je,NaN:Je,Infinity:Je,this:L("this"),class:L("class"),super:L("atom"),yield:W,export:L("export"),import:L("import"),extends:W,await:W}}(),y=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function b(L){for(var N=!1,ie,W=!1;(ie=L.next())!=null;){if(!N){if(ie=="/"&&!W)return;ie=="["?W=!0:W&&ie=="]"&&(W=!1)}N=!N&&ie=="\\"}}var w,D;function E(L,N,ie){return w=L,D=ie,N}function S(L,N){var ie=L.next();if(ie=='"'||ie=="'")return N.tokenize=z(ie),N.tokenize(L,N);if(ie=="."&&L.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return E("number","number");if(ie=="."&&L.match(".."))return E("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ie))return E(ie);if(ie=="="&&L.eat(">"))return E("=>","operator");if(ie=="0"&&L.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return E("number","number");if(/\d/.test(ie))return L.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),E("number","number");if(ie=="/")return L.eat("*")?(N.tokenize=A,A(L,N)):L.eat("/")?(L.skipToEnd(),E("comment","comment")):Ve(L,N,1)?(b(L),L.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),E("regexp","string-2")):(L.eat("="),E("operator","operator",L.current()));if(ie=="`")return N.tokenize=R,R(L,N);if(ie=="#"&&L.peek()=="!")return L.skipToEnd(),E("meta","meta");if(ie=="#"&&L.eatWhile(p))return E("variable","property");if(ie=="<"&&L.match("!--")||ie=="-"&&L.match("->")&&!/\S/.test(L.string.slice(0,L.start)))return L.skipToEnd(),E("comment","comment");if(y.test(ie))return(ie!=">"||!N.lexical||N.lexical.type!=">")&&(L.eat("=")?(ie=="!"||ie=="=")&&L.eat("="):/[<>*+\-|&?]/.test(ie)&&(L.eat(ie),ie==">"&&L.eat(ie))),ie=="?"&&L.eat(".")?E("."):E("operator","operator",L.current());if(p.test(ie)){L.eatWhile(p);var W=L.current();if(N.lastType!="."){if(g.propertyIsEnumerable(W)){var fe=g[W];return E(fe.type,fe.style,W)}if(W=="async"&&L.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return E("async","keyword",W)}return E("variable","variable",W)}}function z(L){return function(N,ie){var W=!1,fe;if(c&&N.peek()=="@"&&N.match(m))return ie.tokenize=S,E("jsonld-keyword","meta");for(;(fe=N.next())!=null&&!(fe==L&&!W);)W=!W&&fe=="\\";return W||(ie.tokenize=S),E("string","string")}}function A(L,N){for(var ie=!1,W;W=L.next();){if(W=="/"&&ie){N.tokenize=S;break}ie=W=="*"}return E("comment","comment")}function R(L,N){for(var ie=!1,W;(W=L.next())!=null;){if(!ie&&(W=="`"||W=="$"&&L.eat("{"))){N.tokenize=S;break}ie=!ie&&W=="\\"}return E("quasi","string-2",L.current())}var U="([{}])";function Y(L,N){N.fatArrowAt&&(N.fatArrowAt=null);var ie=L.string.indexOf("=>",L.start);if(ie<0)return;if(h){var W=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(L.string.slice(L.start,ie));W&&(ie=W.index)}for(var fe=0,$e=!1,Je=ie-1;Je>=0;--Je){var Et=L.string.charAt(Je),Yt=U.indexOf(Et);if(Yt>=0&&Yt<3){if(!fe){++Je;break}if(--fe==0){Et=="("&&($e=!0);break}}else if(Yt>=3&&Yt<6)++fe;else if(p.test(Et))$e=!0;else if(/["'\/`]/.test(Et))for(;;--Je){if(Je==0)return;var Co=L.string.charAt(Je-1);if(Co==Et&&L.string.charAt(Je-2)!="\\"){Je--;break}}else if($e&&!fe){++Je;break}}$e&&!fe&&(N.fatArrowAt=Je)}var B={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function G(L,N,ie,W,fe,$e){this.indented=L,this.column=N,this.type=ie,this.prev=fe,this.info=$e,W!=null&&(this.align=W)}function ee(L,N){for(var ie=L.localVars;ie;ie=ie.next)if(ie.name==N)return!0;for(var W=L.context;W;W=W.prev)for(var ie=W.vars;ie;ie=ie.next)if(ie.name==N)return!0}function J(L,N,ie,W,fe){var $e=L.cc;for(O.state=L,O.stream=fe,O.marked=null,O.cc=$e,O.style=N,L.lexical.hasOwnProperty("align")||(L.lexical.align=!0);;){var Je=$e.length?$e.pop():d?re:Oe;if(Je(ie,W)){for(;$e.length&&$e[$e.length-1].lex;)$e.pop()();return O.marked?O.marked:ie=="variable"&&ee(L,W)?"variable-2":N}}}var O={state:null,column:null,marked:null,cc:null};function Z(){for(var L=arguments.length-1;L>=0;L--)O.cc.push(arguments[L])}function _(){return Z.apply(null,arguments),!0}function V(L,N){for(var ie=N;ie;ie=ie.next)if(ie.name==L)return!0;return!1}function j(L){var N=O.state;if(O.marked="def",N.context){if(N.lexical.info=="var"&&N.context&&N.context.block){var ie=Q(L,N.context);if(ie!=null){N.context=ie;return}}else if(!V(L,N.localVars)){N.localVars=new H(L,N.localVars);return}}i.globalVars&&!V(L,N.globalVars)&&(N.globalVars=new H(L,N.globalVars))}function Q(L,N){if(N)if(N.block){var ie=Q(L,N.prev);return ie?ie==N.prev?N:new I(ie,N.vars,!0):null}else return V(L,N.vars)?N:new I(N.prev,new H(L,N.vars),!1);else return null}function q(L){return L=="public"||L=="private"||L=="protected"||L=="abstract"||L=="readonly"}function I(L,N,ie){this.prev=L,this.vars=N,this.block=ie}function H(L,N){this.name=L,this.next=N}var se=new H("this",new H("arguments",null));function F(){O.state.context=new I(O.state.context,O.state.localVars,!1),O.state.localVars=se}function T(){O.state.context=new I(O.state.context,O.state.localVars,!0),O.state.localVars=null}function de(){O.state.localVars=O.state.context.vars,O.state.context=O.state.context.prev}de.lex=!0;function ce(L,N){var ie=function(){var W=O.state,fe=W.indented;if(W.lexical.type=="stat")fe=W.lexical.indented;else for(var $e=W.lexical;$e&&$e.type==")"&&$e.align;$e=$e.prev)fe=$e.indented;W.lexical=new G(fe,O.stream.column(),L,null,W.lexical,N)};return ie.lex=!0,ie}function oe(){var L=O.state;L.lexical.prev&&(L.lexical.type==")"&&(L.indented=L.lexical.indented),L.lexical=L.lexical.prev)}oe.lex=!0;function xe(L){function N(ie){return ie==L?_():L==";"||ie=="}"||ie==")"||ie=="]"?Z():_(N)}return N}function Oe(L,N){return L=="var"?_(ce("vardef",N),fr,xe(";"),oe):L=="keyword a"?_(ce("form"),De,Oe,oe):L=="keyword b"?_(ce("form"),Oe,oe):L=="keyword d"?O.stream.match(/^\s*$/,!1)?_():_(ce("stat"),rt,xe(";"),oe):L=="debugger"?_(xe(";")):L=="{"?_(ce("}"),T,hn,oe,de):L==";"?_():L=="if"?(O.state.lexical.info=="else"&&O.state.cc[O.state.cc.length-1]==oe&&O.state.cc.pop()(),_(ce("form"),De,Oe,oe,xo)):L=="function"?_(An):L=="for"?_(ce("form"),Fr,Oe,oe):L=="class"||h&&N=="interface"?(O.marked="keyword",_(ce("form",L=="class"?L:N),jn,oe)):L=="variable"?h&&N=="declare"?(O.marked="keyword",_(Oe)):h&&(N=="module"||N=="enum"||N=="type")&&O.stream.match(/^\s*\w/,!1)?(O.marked="keyword",N=="enum"?_(Tn):N=="type"?_(Mr,xe("operator"),Be,xe(";")):_(ce("form"),Bt,xe("{"),ce("}"),hn,oe,oe)):h&&N=="namespace"?(O.marked="keyword",_(ce("form"),re,Oe,oe)):h&&N=="abstract"?(O.marked="keyword",_(Oe)):_(ce("stat"),He):L=="switch"?_(ce("form"),De,xe("{"),ce("}","switch"),T,hn,oe,oe,de):L=="case"?_(re,xe(":")):L=="default"?_(xe(":")):L=="catch"?_(ce("form"),F,ye,Oe,oe,de):L=="export"?_(ce("stat"),yi,oe):L=="import"?_(ce("stat"),Qa,oe):L=="async"?_(Oe):N=="@"?_(re,Oe):Z(ce("stat"),re,xe(";"),oe)}function ye(L){if(L=="(")return _(Bn,xe(")"))}function re(L,N){return Pe(L,N,!1)}function we(L,N){return Pe(L,N,!0)}function De(L){return L!="("?Z():_(ce(")"),rt,xe(")"),oe)}function Pe(L,N,ie){if(O.state.fatArrowAt==O.stream.start){var W=ie?qe:Wt;if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,xe("=>"),W,de);if(L=="variable")return Z(F,Bt,xe("=>"),W,de)}var fe=ie?nt:Ce;return B.hasOwnProperty(L)?_(fe):L=="function"?_(An,fe):L=="class"||h&&N=="interface"?(O.marked="keyword",_(ce("form"),bi,oe)):L=="keyword c"||L=="async"?_(ie?we:re):L=="("?_(ce(")"),rt,xe(")"),oe,fe):L=="operator"||L=="spread"?_(ie?we:re):L=="["?_(ce("]"),_e,oe,fe):L=="{"?Ye(Ae,"}",null,fe):L=="quasi"?Z(mt,fe):L=="new"?_(X(ie)):L=="import"?_(re):_()}function rt(L){return L.match(/[;\}\)\],]/)?Z():Z(re)}function Ce(L,N){return L==","?_(rt):nt(L,N,!1)}function nt(L,N,ie){var W=ie==!1?Ce:nt,fe=ie==!1?re:we;if(L=="=>")return _(F,ie?qe:Wt,de);if(L=="operator")return/\+\+|--/.test(N)||h&&N=="!"?_(W):h&&N=="<"&&O.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?_(ce(">"),Ie(Be,">"),oe,W):N=="?"?_(re,xe(":"),fe):_(fe);if(L=="quasi")return Z(mt,W);if(L==";")return;if(L=="(")return Ye(we,")","call",W);if(L==".")return _(Ct,W);if(L=="[")return _(ce("]"),rt,xe("]"),oe,W);if(h&&N=="as")return O.marked="keyword",_(Be,W);if(L=="regexp")return O.state.lastType=O.marked="operator",O.stream.backUp(O.stream.pos-O.stream.start-1),_(fe)}function mt(L,N){return L!="quasi"?Z():N.slice(N.length-2)!="${"?_(mt):_(re,gt)}function gt(L){if(L=="}")return O.marked="string-2",O.state.tokenize=R,_(mt)}function Wt(L){return Y(O.stream,O.state),Z(L=="{"?Oe:re)}function qe(L){return Y(O.stream,O.state),Z(L=="{"?Oe:we)}function X(L){return function(N){return N=="."?_(L?te:le):N=="variable"&&h?_(Jn,L?nt:Ce):Z(L?we:re)}}function le(L,N){if(N=="target")return O.marked="keyword",_(Ce)}function te(L,N){if(N=="target")return O.marked="keyword",_(nt)}function He(L){return L==":"?_(oe,Oe):Z(Ce,xe(";"),oe)}function Ct(L){if(L=="variable")return O.marked="property",_()}function Ae(L,N){if(L=="async")return O.marked="property",_(Ae);if(L=="variable"||O.style=="keyword"){if(O.marked="property",N=="get"||N=="set")return _(Fe);var ie;return h&&O.state.fatArrowAt==O.stream.start&&(ie=O.stream.match(/^\s*:\s*/,!1))&&(O.state.fatArrowAt=O.stream.pos+ie[0].length),_(ke)}else{if(L=="number"||L=="string")return O.marked=c?"property":O.style+" property",_(ke);if(L=="jsonld-keyword")return _(ke);if(h&&q(N))return O.marked="keyword",_(Ae);if(L=="[")return _(re,Ot,xe("]"),ke);if(L=="spread")return _(we,ke);if(N=="*")return O.marked="keyword",_(Ae);if(L==":")return Z(ke)}}function Fe(L){return L!="variable"?Z(ke):(O.marked="property",_(An))}function ke(L){if(L==":")return _(we);if(L=="(")return Z(An)}function Ie(L,N,ie){function W(fe,$e){if(ie?ie.indexOf(fe)>-1:fe==","){var Je=O.state.lexical;return Je.info=="call"&&(Je.pos=(Je.pos||0)+1),_(function(Et,Yt){return Et==N||Yt==N?Z():Z(L)},W)}return fe==N||$e==N?_():ie&&ie.indexOf(";")>-1?Z(L):_(xe(N))}return function(fe,$e){return fe==N||$e==N?_():Z(L,W)}}function Ye(L,N,ie){for(var W=3;W"),Be)}function dt(L){if(L=="=>")return _(Be)}function st(L,N){if(L=="variable"||O.style=="keyword")return O.marked="property",_(st);if(N=="?"||L=="number"||L=="string")return _(st);if(L==":")return _(Be);if(L=="[")return _(xe("variable"),yo,xe("]"),st);if(L=="(")return Z(er,st)}function Lr(L,N){return L=="variable"&&O.stream.match(/^\s*[?:]/,!1)||N=="?"?_(Lr):L==":"?_(Be):L=="spread"?_(Lr):Z(Be)}function wt(L,N){if(N=="<")return _(ce(">"),Ie(Be,">"),oe,wt);if(N=="|"||L=="."||N=="&")return _(Be);if(L=="[")return _(Be,xe("]"),wt);if(N=="extends"||N=="implements")return O.marked="keyword",_(Be);if(N=="?")return _(Be,xe(":"),Be)}function Jn(L,N){if(N=="<")return _(ce(">"),Ie(Be,">"),oe,wt)}function St(){return Z(Be,wo)}function wo(L,N){if(N=="=")return _(Be)}function fr(L,N){return N=="enum"?(O.marked="keyword",_(Tn)):Z(Bt,Ot,En,vi)}function Bt(L,N){if(h&&q(N))return O.marked="keyword",_(Bt);if(L=="variable")return j(N),_();if(L=="spread")return _(Bt);if(L=="[")return Ye(ko,"]");if(L=="{")return Ye(Ir,"}")}function Ir(L,N){return L=="variable"&&!O.stream.match(/^\s*:/,!1)?(j(N),_(En)):(L=="variable"&&(O.marked="property"),L=="spread"?_(Bt):L=="}"?Z():L=="["?_(re,xe("]"),xe(":"),Ir):_(xe(":"),Bt,En))}function ko(){return Z(Bt,En)}function En(L,N){if(N=="=")return _(we)}function vi(L){if(L==",")return _(fr)}function xo(L,N){if(L=="keyword b"&&N=="else")return _(ce("form","else"),Oe,oe)}function Fr(L,N){if(N=="await")return _(Fr);if(L=="(")return _(ce(")"),Za,oe)}function Za(L){return L=="var"?_(fr,Dn):L=="variable"?_(Dn):Z(Dn)}function Dn(L,N){return L==")"?_():L==";"?_(Dn):N=="in"||N=="of"?(O.marked="keyword",_(re,Dn)):Z(re,Dn)}function An(L,N){if(N=="*")return O.marked="keyword",_(An);if(L=="variable")return j(N),_(An);if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,Te,Oe,de);if(h&&N=="<")return _(ce(">"),Ie(St,">"),oe,An)}function er(L,N){if(N=="*")return O.marked="keyword",_(er);if(L=="variable")return j(N),_(er);if(L=="(")return _(F,ce(")"),Ie(Bn,")"),oe,Te,de);if(h&&N=="<")return _(ce(">"),Ie(St,">"),oe,er)}function Mr(L,N){if(L=="keyword"||L=="variable")return O.marked="type",_(Mr);if(N=="<")return _(ce(">"),Ie(St,">"),oe)}function Bn(L,N){return N=="@"&&_(re,Bn),L=="spread"?_(Bn):h&&q(N)?(O.marked="keyword",_(Bn)):h&&L=="this"?_(Ot,En):Z(Bt,Ot,En)}function bi(L,N){return L=="variable"?jn(L,N):qr(L,N)}function jn(L,N){if(L=="variable")return j(N),_(qr)}function qr(L,N){if(N=="<")return _(ce(">"),Ie(St,">"),oe,qr);if(N=="extends"||N=="implements"||h&&L==",")return N=="implements"&&(O.marked="keyword"),_(h?Be:re,qr);if(L=="{")return _(ce("}"),bn,oe)}function bn(L,N){if(L=="async"||L=="variable"&&(N=="static"||N=="get"||N=="set"||h&&q(N))&&O.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return O.marked="keyword",_(bn);if(L=="variable"||O.style=="keyword")return O.marked="property",_(Hn,bn);if(L=="number"||L=="string")return _(Hn,bn);if(L=="[")return _(re,Ot,xe("]"),Hn,bn);if(N=="*")return O.marked="keyword",_(bn);if(h&&L=="(")return Z(er,bn);if(L==";"||L==",")return _(bn);if(L=="}")return _();if(N=="@")return _(re,bn)}function Hn(L,N){if(N=="?")return _(Hn);if(L==":")return _(Be,En);if(N=="=")return _(we);var ie=O.state.lexical.prev,W=ie&&ie.info=="interface";return Z(W?er:An)}function yi(L,N){return N=="*"?(O.marked="keyword",_(lt,xe(";"))):N=="default"?(O.marked="keyword",_(re,xe(";"))):L=="{"?_(Ie(Un,"}"),lt,xe(";")):Z(Oe)}function Un(L,N){if(N=="as")return O.marked="keyword",_(xe("variable"));if(L=="variable")return Z(we,Un)}function Qa(L){return L=="string"?_():L=="("?Z(re):Z(fn,zr,lt)}function fn(L,N){return L=="{"?Ye(fn,"}"):(L=="variable"&&j(N),N=="*"&&(O.marked="keyword"),_(_o))}function zr(L){if(L==",")return _(fn,zr)}function _o(L,N){if(N=="as")return O.marked="keyword",_(fn)}function lt(L,N){if(N=="from")return O.marked="keyword",_(re)}function _e(L){return L=="]"?_():Z(Ie(we,"]"))}function Tn(){return Z(ce("form"),Bt,xe("{"),ce("}"),Ie(wi,"}"),oe,oe)}function wi(){return Z(Bt,En)}function pn(L,N){return L.lastType=="operator"||L.lastType==","||y.test(N.charAt(0))||/[,.]/.test(N.charAt(0))}function Ve(L,N,ie){return N.tokenize==S&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(N.lastType)||N.lastType=="quasi"&&/\{\s*$/.test(L.string.slice(0,L.pos-(ie||0)))}return{startState:function(L){var N={tokenize:S,lastType:"sof",cc:[],lexical:new G((L||0)-s,0,"block",!1),localVars:i.localVars,context:i.localVars&&new I(null,null,!1),indented:L||0};return i.globalVars&&typeof i.globalVars=="object"&&(N.globalVars=i.globalVars),N},token:function(L,N){if(L.sol()&&(N.lexical.hasOwnProperty("align")||(N.lexical.align=!1),N.indented=L.indentation(),Y(L,N)),N.tokenize!=A&&L.eatSpace())return null;var ie=N.tokenize(L,N);return w=="comment"?ie:(N.lastType=w=="operator"&&(D=="++"||D=="--")?"incdec":w,J(N,ie,w,D,L))},indent:function(L,N){if(L.tokenize==A)return t.Pass;if(L.tokenize!=S)return 0;var ie=N&&N.charAt(0),W=L.lexical,fe;if(!/^\s*else\b/.test(N))for(var $e=L.cc.length-1;$e>=0;--$e){var Je=L.cc[$e];if(Je==oe)W=W.prev;else if(Je!=xo)break}for(;(W.type=="stat"||W.type=="form")&&(ie=="}"||(fe=L.cc[L.cc.length-1])&&(fe==Ce||fe==nt)&&!/^[,\.=+\-*:?[\(]/.test(N));)W=W.prev;u&&W.type==")"&&W.prev.type=="stat"&&(W=W.prev);var Et=W.type,Yt=ie==Et;return Et=="vardef"?W.indented+(L.lastType=="operator"||L.lastType==","?W.info.length+1:0):Et=="form"&&ie=="{"?W.indented:Et=="form"?W.indented+s:Et=="stat"?W.indented+(pn(L,N)?u||s:0):W.info=="switch"&&!Yt&&i.doubleIndentSwitch!=!1?W.indented+(/^(?:case|default)\b/.test(N)?s:2*s):W.align?W.column+(Yt?0:1):W.indented+(Yt?0:s)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:d?null:"/*",blockCommentEnd:d?null:"*/",blockCommentContinue:d?null:" * ",lineComment:d?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:d?"json":"javascript",jsonldMode:c,jsonMode:d,expressionAllowed:Ve,skipExpression:function(L){var N=L.cc[L.cc.length-1];(N==re||N==we)&&L.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})});var Zs=ue((yd,wd)=>{(function(t){typeof yd=="object"&&typeof wd=="object"?t(Ze(),ta(),Xs(),Vs()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)})(function(t){"use strict";var n={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function i(g,y,m){var b=g.current(),w=b.search(y);return w>-1?g.backUp(b.length-w):b.match(/<\/?$/)&&(g.backUp(b.length),g.match(y,!1)||g.match(b)),m}var s={};function u(g){var y=s[g];return y||(s[g]=new RegExp("\\s+"+g+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function c(g,y){var m=g.match(u(y));return m?/^\s*(.*?)\s*$/.exec(m[2])[1]:""}function d(g,y){return new RegExp((y?"^":"")+"","i")}function h(g,y){for(var m in g)for(var b=y[m]||(y[m]=[]),w=g[m],D=w.length-1;D>=0;D--)b.unshift(w[D])}function p(g,y){for(var m=0;m=0;E--)b.script.unshift(["type",D[E].matches,D[E].mode]);function S(z,A){var R=m.token(z,A.htmlState),U=/\btag\b/.test(R),Y;if(U&&!/[<>\s\/]/.test(z.current())&&(Y=A.htmlState.tagName&&A.htmlState.tagName.toLowerCase())&&b.hasOwnProperty(Y))A.inTag=Y+" ";else if(A.inTag&&U&&/>$/.test(z.current())){var B=/^([\S]+) (.*)/.exec(A.inTag);A.inTag=null;var G=z.current()==">"&&p(b[B[1]],B[2]),ee=t.getMode(g,G),J=d(B[1],!0),O=d(B[1],!1);A.token=function(Z,_){return Z.match(J,!1)?(_.token=S,_.localState=_.localMode=null,null):i(Z,O,_.localMode.token(Z,_.localState))},A.localMode=ee,A.localState=t.startState(ee,m.indent(A.htmlState,"",""))}else A.inTag&&(A.inTag+=z.current(),z.eol()&&(A.inTag+=" "));return R}return{startState:function(){var z=t.startState(m);return{token:S,inTag:null,localMode:null,localState:null,htmlState:z}},copyState:function(z){var A;return z.localState&&(A=t.copyState(z.localMode,z.localState)),{token:z.token,inTag:z.inTag,localMode:z.localMode,localState:A,htmlState:t.copyState(m,z.htmlState)}},token:function(z,A){return A.token(z,A)},indent:function(z,A,R){return!z.localMode||/^\s*<\//.test(A)?m.indent(z.htmlState,A,R):z.localMode.indent?z.localMode.indent(z.localState,A,R):t.Pass},innerMode:function(z){return{state:z.localState||z.htmlState,mode:z.localMode||m}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})});var _d=ue((kd,xd)=>{(function(t){typeof kd=="object"&&typeof xd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("julia",function(n,i){function s(I,H){return typeof H=="undefined"&&(H="\\b"),new RegExp("^(("+I.join(")|(")+"))"+H)}var u="\\\\[0-7]{1,3}",c="\\\\x[A-Fa-f0-9]{1,2}",d=`\\\\[abefnrtv0%?'"\\\\]`,h="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",p=i.operators||s(["[<>]:","[<>=]=","<<=?",">>>?=?","=>","->","\\/\\/","[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),g=i.delimiters||/^[;,()[\]{}]/,y=i.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,m=s([u,c,d,h],"'"),b=["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"],w=["end","else","elseif","catch","finally"],D=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],E=["true","false","nothing","NaN","Inf"];t.registerHelper("hintWords","julia",D.concat(E));var S=s(b),z=s(w),A=s(D),R=s(E),U=/^@[_A-Za-z][\w]*/,Y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,B=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function G(I){return I.nestedArrays>0}function ee(I){return I.nestedGenerators>0}function J(I,H){return typeof H=="undefined"&&(H=0),I.scopes.length<=H?null:I.scopes[I.scopes.length-(H+1)]}function O(I,H){if(I.match(/^#=/,!1))return H.tokenize=V,H.tokenize(I,H);var se=H.leavingExpr;if(I.sol()&&(se=!1),H.leavingExpr=!1,se&&I.match(/^'+/))return"operator";if(I.match(/\.{4,}/))return"error";if(I.match(/\.{1,3}/))return"operator";if(I.eatSpace())return null;var F=I.peek();if(F==="#")return I.skipToEnd(),"comment";if(F==="["&&(H.scopes.push("["),H.nestedArrays++),F==="("&&(H.scopes.push("("),H.nestedGenerators++),G(H)&&F==="]"){for(;H.scopes.length&&J(H)!=="[";)H.scopes.pop();H.scopes.pop(),H.nestedArrays--,H.leavingExpr=!0}if(ee(H)&&F===")"){for(;H.scopes.length&&J(H)!=="(";)H.scopes.pop();H.scopes.pop(),H.nestedGenerators--,H.leavingExpr=!0}if(G(H)){if(H.lastToken=="end"&&I.match(/^:/))return"operator";if(I.match(/^end/))return"number"}var T;if((T=I.match(S,!1))&&H.scopes.push(T[0]),I.match(z,!1)&&H.scopes.pop(),I.match(/^::(?![:\$])/))return H.tokenize=_,H.tokenize(I,H);if(!se&&I.match(Y)||I.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/))return"builtin";if(I.match(p))return"operator";if(I.match(/^\.?\d/,!1)){var de=RegExp(/^im\b/),ce=!1;if(I.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(ce=!0),I.match(/^0x[0-9a-f_]+/i)&&(ce=!0),I.match(/^0b[01_]+/i)&&(ce=!0),I.match(/^0o[0-7_]+/i)&&(ce=!0),I.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(ce=!0),I.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(ce=!0),ce)return I.match(de),H.leavingExpr=!0,"number"}if(I.match(/^'/))return H.tokenize=j,H.tokenize(I,H);if(I.match(B))return H.tokenize=Q(I.current()),H.tokenize(I,H);if(I.match(U))return"meta";if(I.match(g))return null;if(I.match(A))return"keyword";if(I.match(R))return"builtin";var oe=H.isDefinition||H.lastToken=="function"||H.lastToken=="macro"||H.lastToken=="type"||H.lastToken=="struct"||H.lastToken=="immutable";return I.match(y)?oe?I.peek()==="."?(H.isDefinition=!0,"variable"):(H.isDefinition=!1,"def"):I.match(/^({[^}]*})*\(/,!1)?(H.tokenize=Z,H.tokenize(I,H)):(H.leavingExpr=!0,"variable"):(I.next(),"error")}function Z(I,H){var se=I.match(/^(\(\s*)/);if(se&&(H.firstParenPos<0&&(H.firstParenPos=H.scopes.length),H.scopes.push("("),H.charsAdvanced+=se[1].length),J(H)=="("&&I.match(/^\)/)&&(H.scopes.pop(),H.charsAdvanced+=1,H.scopes.length<=H.firstParenPos)){var F=I.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);return I.backUp(H.charsAdvanced),H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=O,F?"def":"builtin"}if(I.match(/^$/g,!1)){for(I.backUp(H.charsAdvanced);H.scopes.length>H.firstParenPos;)H.scopes.pop();return H.firstParenPos=-1,H.charsAdvanced=0,H.tokenize=O,"builtin"}return H.charsAdvanced+=I.match(/^([^()]*)/)[1].length,H.tokenize(I,H)}function _(I,H){return I.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),I.match(/^{/)?H.nestedParameters++:I.match(/^}/)&&H.nestedParameters>0&&H.nestedParameters--,H.nestedParameters>0?I.match(/.*?(?={|})/)||I.next():H.nestedParameters==0&&(H.tokenize=O),"builtin"}function V(I,H){return I.match(/^#=/)&&H.nestedComments++,I.match(/.*?(?=(#=|=#))/)||I.skipToEnd(),I.match(/^=#/)&&(H.nestedComments--,H.nestedComments==0&&(H.tokenize=O)),"comment"}function j(I,H){var se=!1,F;if(I.match(m))se=!0;else if(F=I.match(/\\u([a-f0-9]{1,4})(?=')/i)){var T=parseInt(F[1],16);(T<=55295||T>=57344)&&(se=!0,I.next())}else if(F=I.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var T=parseInt(F[1],16);T<=1114111&&(se=!0,I.next())}return se?(H.leavingExpr=!0,H.tokenize=O,"string"):(I.match(/^[^']+(?=')/)||I.skipToEnd(),I.match(/^'/)&&(H.tokenize=O),"error")}function Q(I){I.substr(-3)==='"""'?I='"""':I.substr(-1)==='"'&&(I='"');function H(se,F){if(se.eat("\\"))se.next();else{if(se.match(I))return F.tokenize=O,F.leavingExpr=!0,"string";se.eat(/[`"]/)}return se.eatWhile(/[^\\`"]/),"string"}return H}var q={startState:function(){return{tokenize:O,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,charsAdvanced:0,firstParenPos:-1}},token:function(I,H){var se=H.tokenize(I,H),F=I.current();return F&&se&&(H.lastToken=F),se},indent:function(I,H){var se=0;return(H==="]"||H===")"||/^end\b/.test(H)||/^else/.test(H)||/^catch\b/.test(H)||/^elseif\b/.test(H)||/^finally/.test(H))&&(se=-1),(I.scopes.length+se)*n.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"};return q}),t.defineMIME("text/x-julia","julia")})});var Ed=ue((Cd,Sd)=>{(function(t){typeof Cd=="object"&&typeof Sd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("lua",function(n,i){var s=n.indentUnit;function u(S){return new RegExp("^(?:"+S.join("|")+")","i")}function c(S){return new RegExp("^(?:"+S.join("|")+")$","i")}var d=c(i.specials||[]),h=c(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),p=c(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),g=c(["function","if","repeat","do","\\(","{"]),y=c(["end","until","\\)","}"]),m=u(["end","until","\\)","}","else","elseif"]);function b(S){for(var z=0;S.eat("=");)++z;return S.eat("["),z}function w(S,z){var A=S.next();return A=="-"&&S.eat("-")?S.eat("[")&&S.eat("[")?(z.cur=D(b(S),"comment"))(S,z):(S.skipToEnd(),"comment"):A=='"'||A=="'"?(z.cur=E(A))(S,z):A=="["&&/[\[=]/.test(S.peek())?(z.cur=D(b(S),"string"))(S,z):/\d/.test(A)?(S.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(A)?(S.eatWhile(/[\w\\\-_.]/),"variable"):null}function D(S,z){return function(A,R){for(var U=null,Y;(Y=A.next())!=null;)if(U==null)Y=="]"&&(U=0);else if(Y=="=")++U;else if(Y=="]"&&U==S){R.cur=w;break}else U=null;return z}}function E(S){return function(z,A){for(var R=!1,U;(U=z.next())!=null&&!(U==S&&!R);)R=!R&&U=="\\";return R||(A.cur=w),"string"}}return{startState:function(S){return{basecol:S||0,indentDepth:0,cur:w}},token:function(S,z){if(S.eatSpace())return null;var A=z.cur(S,z),R=S.current();return A=="variable"&&(p.test(R)?A="keyword":h.test(R)?A="builtin":d.test(R)&&(A="variable-2")),A!="comment"&&A!="string"&&(g.test(R)?++z.indentDepth:y.test(R)&&--z.indentDepth),A},indent:function(S,z){var A=m.test(z);return S.basecol+s*(S.indentDepth-(A?1:0))},lineComment:"--",blockCommentStart:"--[[",blockCommentEnd:"]]"}}),t.defineMIME("text/x-lua","lua")})});var Td=ue((Dd,Ad)=>{(function(t){typeof Dd=="object"&&typeof Ad=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var n=0;n-1&&s.substring(d+1,s.length);if(h)return t.findModeByExtension(h)},t.findModeByName=function(s){s=s.toLowerCase();for(var u=0;u{(function(t){typeof Ld=="object"&&typeof Id=="object"?t(Ze(),ta(),Td()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("markdown",function(n,i){var s=t.getMode(n,"text/html"),u=s.name=="null";function c(F){if(t.findModeByName){var T=t.findModeByName(F);T&&(F=T.mime||T.mimes[0])}var de=t.getMode(n,F);return de.name=="null"?null:de}i.highlightFormatting===void 0&&(i.highlightFormatting=!1),i.maxBlockquoteDepth===void 0&&(i.maxBlockquoteDepth=0),i.taskLists===void 0&&(i.taskLists=!1),i.strikethrough===void 0&&(i.strikethrough=!1),i.emoji===void 0&&(i.emoji=!1),i.fencedCodeBlockHighlighting===void 0&&(i.fencedCodeBlockHighlighting=!0),i.fencedCodeBlockDefaultMode===void 0&&(i.fencedCodeBlockDefaultMode="text/plain"),i.xml===void 0&&(i.xml=!0),i.tokenTypeOverrides===void 0&&(i.tokenTypeOverrides={});var d={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var h in d)d.hasOwnProperty(h)&&i.tokenTypeOverrides[h]&&(d[h]=i.tokenTypeOverrides[h]);var p=/^([*\-_])(?:\s*\1){2,}\s*$/,g=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,m=i.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,b=/^ {0,3}(?:\={1,}|-{2,})\s*$/,w=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,E=/^\s*\[[^\]]+?\]:.*$/,S=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,z=" ";function A(F,T,de){return T.f=T.inline=de,de(F,T)}function R(F,T,de){return T.f=T.block=de,de(F,T)}function U(F){return!F||!/\S/.test(F.string)}function Y(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==G){var T=u;if(!T){var de=t.innerMode(s,F.htmlState);T=de.mode.name=="xml"&&de.state.tagStart===null&&!de.state.context&&de.state.tokenize.isInText}T&&(F.f=Z,F.block=B,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function B(F,T){var de=F.column()===T.indentation,ce=U(T.prevLine.stream),oe=T.indentedCode,xe=T.prevLine.hr,Oe=T.list!==!1,ye=(T.listStack[T.listStack.length-1]||0)+3;T.indentedCode=!1;var re=T.indentation;if(T.indentationDiff===null&&(T.indentationDiff=T.indentation,Oe)){for(T.list=null;re=4&&(oe||T.prevLine.fencedCodeEnd||T.prevLine.header||ce))return F.skipToEnd(),T.indentedCode=!0,d.code;if(F.eatSpace())return null;if(de&&T.indentation<=ye&&(Pe=F.match(m))&&Pe[1].length<=6)return T.quote=0,T.header=Pe[1].length,T.thisLine.header=!0,i.highlightFormatting&&(T.formatting="header"),T.f=T.inline,J(T);if(T.indentation<=ye&&F.eat(">"))return T.quote=de?1:T.quote+1,i.highlightFormatting&&(T.formatting="quote"),F.eatSpace(),J(T);if(!De&&!T.setext&&de&&T.indentation<=ye&&(Pe=F.match(g))){var rt=Pe[1]?"ol":"ul";return T.indentation=re+F.current().length,T.list=!0,T.quote=0,T.listStack.push(T.indentation),T.em=!1,T.strong=!1,T.code=!1,T.strikethrough=!1,i.taskLists&&F.match(y,!1)&&(T.taskList=!0),T.f=T.inline,i.highlightFormatting&&(T.formatting=["list","list-"+rt]),J(T)}else{if(de&&T.indentation<=ye&&(Pe=F.match(D,!0)))return T.quote=0,T.fencedEndRE=new RegExp(Pe[1]+"+ *$"),T.localMode=i.fencedCodeBlockHighlighting&&c(Pe[2]||i.fencedCodeBlockDefaultMode),T.localMode&&(T.localState=t.startState(T.localMode)),T.f=T.block=ee,i.highlightFormatting&&(T.formatting="code-block"),T.code=-1,J(T);if(T.setext||(!we||!Oe)&&!T.quote&&T.list===!1&&!T.code&&!De&&!E.test(F.string)&&(Pe=F.lookAhead(1))&&(Pe=Pe.match(b)))return T.setext?(T.header=T.setext,T.setext=0,F.skipToEnd(),i.highlightFormatting&&(T.formatting="header")):(T.header=Pe[0].charAt(0)=="="?1:2,T.setext=T.header),T.thisLine.header=!0,T.f=T.inline,J(T);if(De)return F.skipToEnd(),T.hr=!0,T.thisLine.hr=!0,d.hr;if(F.peek()==="[")return A(F,T,q)}return A(F,T,T.inline)}function G(F,T){var de=s.token(F,T.htmlState);if(!u){var ce=t.innerMode(s,T.htmlState);(ce.mode.name=="xml"&&ce.state.tagStart===null&&!ce.state.context&&ce.state.tokenize.isInText||T.md_inside&&F.current().indexOf(">")>-1)&&(T.f=Z,T.block=B,T.htmlState=null)}return de}function ee(F,T){var de=T.listStack[T.listStack.length-1]||0,ce=T.indentation=F.quote?T.push(d.formatting+"-"+F.formatting[de]+"-"+F.quote):T.push("error"))}if(F.taskOpen)return T.push("meta"),T.length?T.join(" "):null;if(F.taskClosed)return T.push("property"),T.length?T.join(" "):null;if(F.linkHref?T.push(d.linkHref,"url"):(F.strong&&T.push(d.strong),F.em&&T.push(d.em),F.strikethrough&&T.push(d.strikethrough),F.emoji&&T.push(d.emoji),F.linkText&&T.push(d.linkText),F.code&&T.push(d.code),F.image&&T.push(d.image),F.imageAltText&&T.push(d.imageAltText,"link"),F.imageMarker&&T.push(d.imageMarker)),F.header&&T.push(d.header,d.header+"-"+F.header),F.quote&&(T.push(d.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=F.quote?T.push(d.quote+"-"+F.quote):T.push(d.quote+"-"+i.maxBlockquoteDepth)),F.list!==!1){var ce=(F.listStack.length-1)%3;ce?ce===1?T.push(d.list2):T.push(d.list3):T.push(d.list1)}return F.trailingSpaceNewLine?T.push("trailing-space-new-line"):F.trailingSpace&&T.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),T.length?T.join(" "):null}function O(F,T){return F.match(w,!0)?J(T):void 0}function Z(F,T){var de=T.text(F,T);if(typeof de!="undefined")return de;if(T.list)return T.list=null,J(T);if(T.taskList){var ce=F.match(y,!0)[1]===" ";return ce?T.taskOpen=!0:T.taskClosed=!0,i.highlightFormatting&&(T.formatting="task"),T.taskList=!1,J(T)}if(T.taskOpen=!1,T.taskClosed=!1,T.header&&F.match(/^#+$/,!0))return i.highlightFormatting&&(T.formatting="header"),J(T);var oe=F.next();if(T.linkTitle){T.linkTitle=!1;var xe=oe;oe==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Oe="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(F.match(new RegExp(Oe),!0))return d.linkHref}if(oe==="`"){var ye=T.formatting;i.highlightFormatting&&(T.formatting="code"),F.eatWhile("`");var re=F.current().length;if(T.code==0&&(!T.quote||re==1))return T.code=re,J(T);if(re==T.code){var we=J(T);return T.code=0,we}else return T.formatting=ye,J(T)}else if(T.code)return J(T);if(oe==="\\"&&(F.next(),i.highlightFormatting)){var De=J(T),Pe=d.formatting+"-escape";return De?De+" "+Pe:Pe}if(oe==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return T.imageMarker=!0,T.image=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(oe==="["&&T.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return T.imageMarker=!1,T.imageAltText=!0,i.highlightFormatting&&(T.formatting="image"),J(T);if(oe==="]"&&T.imageAltText){i.highlightFormatting&&(T.formatting="image");var De=J(T);return T.imageAltText=!1,T.image=!1,T.inline=T.f=V,De}if(oe==="["&&!T.image)return T.linkText&&F.match(/^.*?\]/)||(T.linkText=!0,i.highlightFormatting&&(T.formatting="link")),J(T);if(oe==="]"&&T.linkText){i.highlightFormatting&&(T.formatting="link");var De=J(T);return T.linkText=!1,T.inline=T.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?V:Z,De}if(oe==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var De=J(T);return De?De+=" ":De="",De+d.linkInline}if(oe==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){T.f=T.inline=_,i.highlightFormatting&&(T.formatting="link");var De=J(T);return De?De+=" ":De="",De+d.linkEmail}if(i.xml&&oe==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var rt=F.string.indexOf(">",F.pos);if(rt!=-1){var Ce=F.string.substring(F.start,rt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Ce)&&(T.md_inside=!0)}return F.backUp(1),T.htmlState=t.startState(s),R(F,T,G)}if(i.xml&&oe==="<"&&F.match(/^\/\w*?>/))return T.md_inside=!1,"tag";if(oe==="*"||oe==="_"){for(var nt=1,mt=F.pos==1?" ":F.string.charAt(F.pos-2);nt<3&&F.eat(oe);)nt++;var gt=F.peek()||" ",Wt=!/\s/.test(gt)&&(!S.test(gt)||/\s/.test(mt)||S.test(mt)),qe=!/\s/.test(mt)&&(!S.test(mt)||/\s/.test(gt)||S.test(gt)),X=null,le=null;if(nt%2&&(!T.em&&Wt&&(oe==="*"||!qe||S.test(mt))?X=!0:T.em==oe&&qe&&(oe==="*"||!Wt||S.test(gt))&&(X=!1)),nt>1&&(!T.strong&&Wt&&(oe==="*"||!qe||S.test(mt))?le=!0:T.strong==oe&&qe&&(oe==="*"||!Wt||S.test(gt))&&(le=!1)),le!=null||X!=null){i.highlightFormatting&&(T.formatting=X==null?"strong":le==null?"em":"strong em"),X===!0&&(T.em=oe),le===!0&&(T.strong=oe);var we=J(T);return X===!1&&(T.em=!1),le===!1&&(T.strong=!1),we}}else if(oe===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return J(T);F.backUp(1)}if(i.strikethrough){if(oe==="~"&&F.eatWhile(oe)){if(T.strikethrough){i.highlightFormatting&&(T.formatting="strikethrough");var we=J(T);return T.strikethrough=!1,we}else if(F.match(/^[^\s]/,!1))return T.strikethrough=!0,i.highlightFormatting&&(T.formatting="strikethrough"),J(T)}else if(oe===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return J(T);F.backUp(2)}}if(i.emoji&&oe===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){T.emoji=!0,i.highlightFormatting&&(T.formatting="emoji");var te=J(T);return T.emoji=!1,te}return oe===" "&&(F.match(/^ +$/,!1)?T.trailingSpace++:T.trailingSpace&&(T.trailingSpaceNewLine=!0)),J(T)}function _(F,T){var de=F.next();if(de===">"){T.f=T.inline=Z,i.highlightFormatting&&(T.formatting="link");var ce=J(T);return ce?ce+=" ":ce="",ce+d.linkInline}return F.match(/^[^>]+/,!0),d.linkInline}function V(F,T){if(F.eatSpace())return null;var de=F.next();return de==="("||de==="["?(T.f=T.inline=Q(de==="("?")":"]"),i.highlightFormatting&&(T.formatting="link-string"),T.linkHref=!0,J(T)):"error"}var j={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Q(F){return function(T,de){var ce=T.next();if(ce===F){de.f=de.inline=Z,i.highlightFormatting&&(de.formatting="link-string");var oe=J(de);return de.linkHref=!1,oe}return T.match(j[F]),de.linkHref=!0,J(de)}}function q(F,T){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(T.f=I,F.next(),i.highlightFormatting&&(T.formatting="link"),T.linkText=!0,J(T)):A(F,T,Z)}function I(F,T){if(F.match(/^\]:/,!0)){T.f=T.inline=H,i.highlightFormatting&&(T.formatting="link");var de=J(T);return T.linkText=!1,de}return F.match(/^([^\]\\]|\\.)+/,!0),d.linkText}function H(F,T){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?T.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),T.f=T.inline=Z,d.linkHref+" url")}var se={startState:function(){return{f:B,prevLine:{stream:null},thisLine:{stream:null},block:B,htmlState:null,indentation:0,inline:Z,text:O,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&t.copyState(s,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?t.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,T){if(T.formatting=!1,F!=T.thisLine.stream){if(T.header=0,T.hr=!1,F.match(/^\s*$/,!0))return Y(T),null;if(T.prevLine=T.thisLine,T.thisLine={stream:F},T.taskList=!1,T.trailingSpace=0,T.trailingSpaceNewLine=!1,!T.localState&&(T.f=T.block,T.f!=G)){var de=F.match(/^\s*/,!0)[0].replace(/\t/g,z).length;if(T.indentation=de,T.indentationDiff=null,de>0)return null}}return T.f(F,T)},innerMode:function(F){return F.block==G?{state:F.htmlState,mode:s}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:se}},indent:function(F,T,de){return F.block==G&&s.indent?s.indent(F.htmlState,T,de):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,T,de):t.Pass},blankLine:Y,getType:J,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return se},"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")})});var zd=ue((Md,qd)=>{(function(t){typeof Md=="object"&&typeof qd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("mllike",function(n,i){var s={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},u=i.extraWords||{};for(var c in u)u.hasOwnProperty(c)&&(s[c]=i.extraWords[c]);var d=[];for(var h in s)d.push(h);t.registerHelper("hintWords","mllike",d);function p(b,w){var D=b.next();if(D==='"')return w.tokenize=g,w.tokenize(b,w);if(D==="{"&&b.eat("|"))return w.longString=!0,w.tokenize=m,w.tokenize(b,w);if(D==="("&&b.eat("*"))return w.commentLevel++,w.tokenize=y,w.tokenize(b,w);if(D==="~"||D==="?")return b.eatWhile(/\w/),"variable-2";if(D==="`")return b.eatWhile(/\w/),"quote";if(D==="/"&&i.slashComments&&b.eat("/"))return b.skipToEnd(),"comment";if(/\d/.test(D))return D==="0"&&b.eat(/[bB]/)&&b.eatWhile(/[01]/),D==="0"&&b.eat(/[xX]/)&&b.eatWhile(/[0-9a-fA-F]/),D==="0"&&b.eat(/[oO]/)?b.eatWhile(/[0-7]/):(b.eatWhile(/[\d_]/),b.eat(".")&&b.eatWhile(/[\d]/),b.eat(/[eE]/)&&b.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(D))return"operator";if(/[\w\xa1-\uffff]/.test(D)){b.eatWhile(/[\w\xa1-\uffff]/);var E=b.current();return s.hasOwnProperty(E)?s[E]:"variable"}return null}function g(b,w){for(var D,E=!1,S=!1;(D=b.next())!=null;){if(D==='"'&&!S){E=!0;break}S=!S&&D==="\\"}return E&&!S&&(w.tokenize=p),"string"}function y(b,w){for(var D,E;w.commentLevel>0&&(E=b.next())!=null;)D==="("&&E==="*"&&w.commentLevel++,D==="*"&&E===")"&&w.commentLevel--,D=E;return w.commentLevel<=0&&(w.tokenize=p),"comment"}function m(b,w){for(var D,E;w.longString&&(E=b.next())!=null;)D==="|"&&E==="}"&&(w.longString=!1),D=E;return w.longString||(w.tokenize=p),"string"}return{startState:function(){return{tokenize:p,commentLevel:0,longString:!1}},token:function(b,w){return b.eatSpace()?null:w.tokenize(b,w)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:i.slashComments?"//":null}}),t.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),t.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),t.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})});var Pd=ue((Od,Rd)=>{(function(t){typeof Od=="object"&&typeof Rd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("nginx",function(n){function i(w){for(var D={},E=w.split(" "),S=0;S*\/]/.test(S)?p(null,"select-op"):/[;{}:\[\]]/.test(S)?p(null,S):(w.eatWhile(/[\w\\\-]/),p("variable","variable"))}function y(w,D){for(var E=!1,S;(S=w.next())!=null;){if(E&&S=="/"){D.tokenize=g;break}E=S=="*"}return p("comment","comment")}function m(w,D){for(var E=0,S;(S=w.next())!=null;){if(E>=2&&S==">"){D.tokenize=g;break}E=S=="-"?E+1:0}return p("comment","comment")}function b(w){return function(D,E){for(var S=!1,z;(z=D.next())!=null&&!(z==w&&!S);)S=!S&&z=="\\";return S||(E.tokenize=g),p("string","string")}}return{startState:function(w){return{tokenize:g,baseIndent:w||0,stack:[]}},token:function(w,D){if(w.eatSpace())return null;h=null;var E=D.tokenize(w,D),S=D.stack[D.stack.length-1];return h=="hash"&&S=="rule"?E="atom":E=="variable"&&(S=="rule"?E="number":(!S||S=="@media{")&&(E="tag")),S=="rule"&&/^[\{\};]$/.test(h)&&D.stack.pop(),h=="{"?S=="@media"?D.stack[D.stack.length-1]="@media{":D.stack.push("{"):h=="}"?D.stack.pop():h=="@media"?D.stack.push("@media"):S=="{"&&h!="comment"&&D.stack.push("rule"),E},indent:function(w,D){var E=w.stack.length;return/^\}/.test(D)&&(E-=w.stack[w.stack.length-1]=="rule"?2:1),w.baseIndent+E*d},electricChars:"}"}}),t.defineMIME("text/x-nginx-conf","nginx")})});var jd=ue((Nd,Bd)=>{(function(t){typeof Nd=="object"&&typeof Bd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("perl",function(){var c={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},d="string-2",h=/[goseximacplud]/;function p(m,b,w,D,E){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(S,z){for(var A=!1,R,U=0;R=S.next();){if(R===w[U]&&!A)return w[++U]!==void 0?(z.chain=w[U],z.style=D,z.tail=E):E&&S.eatWhile(E),z.tokenize=y,D;A=!A&&R=="\\"}return D},b.tokenize(m,b)}function g(m,b,w){return b.tokenize=function(D,E){return D.string==w&&(E.tokenize=y),D.skipToEnd(),"string"},b.tokenize(m,b)}function y(m,b){if(m.eatSpace())return null;if(b.chain)return p(m,b,b.chain,b.style,b.tail);if(m.match(/^\-?[\d\.]/,!1)&&m.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(m.match(/^<<(?=\w)/))return m.eatWhile(/\w/),g(m,b,m.current().substr(2));if(m.sol()&&m.match(/^\=item(?!\w)/))return g(m,b,"=cut");var w=m.next();if(w=='"'||w=="'"){if(i(m,3)=="<<"+w){var D=m.pos;m.eatWhile(/\w/);var E=m.current().substr(1);if(E&&m.eat(w))return g(m,b,E);m.pos=D}return p(m,b,[w],"string")}if(w=="q"){var S=n(m,-2);if(!(S&&/\w/.test(S))){if(S=n(m,0),S=="x"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(S=="q"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"string");if(S=="[")return u(m,2),p(m,b,["]"],"string");if(S=="{")return u(m,2),p(m,b,["}"],"string");if(S=="<")return u(m,2),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"string")}else if(S=="w"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],"bracket");if(S=="[")return u(m,2),p(m,b,["]"],"bracket");if(S=="{")return u(m,2),p(m,b,["}"],"bracket");if(S=="<")return u(m,2),p(m,b,[">"],"bracket");if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],"bracket")}else if(S=="r"){if(S=n(m,1),S=="(")return u(m,2),p(m,b,[")"],d,h);if(S=="[")return u(m,2),p(m,b,["]"],d,h);if(S=="{")return u(m,2),p(m,b,["}"],d,h);if(S=="<")return u(m,2),p(m,b,[">"],d,h);if(/[\^'"!~\/]/.test(S))return u(m,1),p(m,b,[m.eat(S)],d,h)}else if(/[\^'"!~\/(\[{<]/.test(S)){if(S=="(")return u(m,1),p(m,b,[")"],"string");if(S=="[")return u(m,1),p(m,b,["]"],"string");if(S=="{")return u(m,1),p(m,b,["}"],"string");if(S=="<")return u(m,1),p(m,b,[">"],"string");if(/[\^'"!~\/]/.test(S))return p(m,b,[m.eat(S)],"string")}}}if(w=="m"){var S=n(m,-2);if(!(S&&/\w/.test(S))&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)){if(/[\^'"!~\/]/.test(S))return p(m,b,[S],d,h);if(S=="(")return p(m,b,[")"],d,h);if(S=="[")return p(m,b,["]"],d,h);if(S=="{")return p(m,b,["}"],d,h);if(S=="<")return p(m,b,[">"],d,h)}}if(w=="s"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="y"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="t"){var S=/[\/>\]})\w]/.test(n(m,-2));if(!S&&(S=m.eat("r"),S&&(S=m.eat(/[(\[{<\^'"!~\/]/),S)))return S=="["?p(m,b,["]","]"],d,h):S=="{"?p(m,b,["}","}"],d,h):S=="<"?p(m,b,[">",">"],d,h):S=="("?p(m,b,[")",")"],d,h):p(m,b,[S,S],d,h)}if(w=="`")return p(m,b,[w],"variable-2");if(w=="/")return/~\s*$/.test(i(m))?p(m,b,[w],d,h):"operator";if(w=="$"){var D=m.pos;if(m.eatWhile(/\d/)||m.eat("{")&&m.eatWhile(/\d/)&&m.eat("}"))return"variable-2";m.pos=D}if(/[$@%]/.test(w)){var D=m.pos;if(m.eat("^")&&m.eat(/[A-Z]/)||!/[@$%&]/.test(n(m,-2))&&m.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var S=m.current();if(c[S])return"variable-2"}m.pos=D}if(/[$@%&]/.test(w)&&(m.eatWhile(/[\w$\[\]]/)||m.eat("{")&&m.eatWhile(/[\w$\[\]]/)&&m.eat("}"))){var S=m.current();return c[S]?"variable-2":"variable"}if(w=="#"&&n(m,-2)!="$")return m.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(w)){var D=m.pos;if(m.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),c[m.current()])return"operator";m.pos=D}if(w=="_"&&m.pos==1){if(s(m,6)=="_END__")return p(m,b,["\0"],"comment");if(s(m,7)=="_DATA__")return p(m,b,["\0"],"variable-2");if(s(m,7)=="_C__")return p(m,b,["\0"],"string")}if(/\w/.test(w)){var D=m.pos;if(n(m,-2)=="{"&&(n(m,0)=="}"||m.eatWhile(/\w/)&&n(m,0)=="}"))return"string";m.pos=D}if(/[A-Z]/.test(w)){var z=n(m,-2),D=m.pos;if(m.eatWhile(/[A-Z_]/),/[\da-z]/.test(n(m,0)))m.pos=D;else{var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}}if(/[a-zA-Z_]/.test(w)){var z=n(m,-2);m.eatWhile(/\w/);var S=c[m.current()];return S?(S[1]&&(S=S[0]),z!=":"?S==1?"keyword":S==2?"def":S==3?"atom":S==4?"operator":S==5?"variable-2":"meta":"meta"):"meta"}return null}return{startState:function(){return{tokenize:y,chain:null,style:null,tail:null}},token:function(m,b){return(b.tokenize||y)(m,b)},lineComment:"#"}}),t.registerHelper("wordChars","perl",/[\w$]/),t.defineMIME("text/x-perl","perl");function n(c,d){return c.string.charAt(c.pos+(d||0))}function i(c,d){if(d){var h=c.pos-d;return c.string.substr(h>=0?h:0,d)}else return c.string.substr(0,c.pos-1)}function s(c,d){var h=c.string.length,p=h-c.pos+1;return c.string.substr(c.pos,d&&d=(p=c.string.length-1)?c.pos=p:c.pos=h}})});var Wd=ue((Hd,Ud)=>{(function(t){typeof Hd=="object"&&typeof Ud=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("pascal",function(){function n(g){for(var y={},m=g.split(" "),b=0;b!?|\/]/;function c(g,y){var m=g.next();if(m=="#"&&y.startOfLine)return g.skipToEnd(),"meta";if(m=='"'||m=="'")return y.tokenize=d(m),y.tokenize(g,y);if(m=="("&&g.eat("*"))return y.tokenize=h,h(g,y);if(m=="{")return y.tokenize=p,p(g,y);if(/[\[\]\(\),;\:\.]/.test(m))return null;if(/\d/.test(m))return g.eatWhile(/[\w\.]/),"number";if(m=="/"&&g.eat("/"))return g.skipToEnd(),"comment";if(u.test(m))return g.eatWhile(u),"operator";g.eatWhile(/[\w\$_]/);var b=g.current();return i.propertyIsEnumerable(b)?"keyword":s.propertyIsEnumerable(b)?"atom":"variable"}function d(g){return function(y,m){for(var b=!1,w,D=!1;(w=y.next())!=null;){if(w==g&&!b){D=!0;break}b=!b&&w=="\\"}return(D||!b)&&(m.tokenize=null),"string"}}function h(g,y){for(var m=!1,b;b=g.next();){if(b==")"&&m){y.tokenize=null;break}m=b=="*"}return"comment"}function p(g,y){for(var m;m=g.next();)if(m=="}"){y.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(g,y){if(g.eatSpace())return null;var m=(y.tokenize||c)(g,y);return m=="comment"||m=="meta",m},electricChars:"{}"}}),t.defineMIME("text/x-pascal","pascal")})});var Kd=ue(($d,Gd)=>{(function(t){typeof $d=="object"&&typeof Gd=="object"?t(Ze(),Zs(),Ys()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],t):t(CodeMirror)})(function(t){"use strict";function n(g){for(var y={},m=g.split(" "),b=0;b\w/,!1)&&(y.tokenize=i([[["->",null]],[[/[\w]+/,"variable"]]],m,b)),"variable-2";for(var w=!1;!g.eol()&&(w||b===!1||!g.match("{$",!1)&&!g.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!w&&g.match(m)){y.tokenize=null,y.tokStack.pop(),y.tokStack.pop();break}w=g.next()=="\\"&&!w}return"string"}var c="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",d="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",h="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";t.registerHelper("hintWords","php",[c,d,h].join(" ").split(" ")),t.registerHelper("wordChars","php",/[\w$]/);var p={name:"clike",helperType:"php",keywords:n(c),blockKeywords:n("catch do else elseif for foreach if switch try while finally"),defKeywords:n("class function interface namespace trait"),atoms:n(d),builtin:n(h),multiLineStrings:!0,hooks:{$:function(g){return g.eatWhile(/[\w\$_]/),"variable-2"},"<":function(g,y){var m;if(m=g.match(/<<\s*/)){var b=g.eat(/['"]/);g.eatWhile(/[\w\.]/);var w=g.current().slice(m[0].length+(b?2:1));if(b&&g.eat(b),w)return(y.tokStack||(y.tokStack=[])).push(w,0),y.tokenize=s(w,b!="'"),"string"}return!1},"#":function(g){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"},"/":function(g){if(g.eat("/")){for(;!g.eol()&&!g.match("?>",!1);)g.next();return"comment"}return!1},'"':function(g,y){return(y.tokStack||(y.tokStack=[])).push('"',0),y.tokenize=s('"'),"string"},"{":function(g,y){return y.tokStack&&y.tokStack.length&&y.tokStack[y.tokStack.length-1]++,!1},"}":function(g,y){return y.tokStack&&y.tokStack.length>0&&!--y.tokStack[y.tokStack.length-1]&&(y.tokenize=s(y.tokStack[y.tokStack.length-2])),!1}}};t.defineMode("php",function(g,y){var m=t.getMode(g,y&&y.htmlMode||"text/html"),b=t.getMode(g,p);function w(D,E){var S=E.curMode==b;if(D.sol()&&E.pending&&E.pending!='"'&&E.pending!="'"&&(E.pending=null),S)return S&&E.php.tokenize==null&&D.match("?>")?(E.curMode=m,E.curState=E.html,E.php.context.prev||(E.php=null),"meta"):b.token(D,E.curState);if(D.match(/^<\?\w*/))return E.curMode=b,E.php||(E.php=t.startState(b,m.indent(E.html,"",""))),E.curState=E.php,"meta";if(E.pending=='"'||E.pending=="'"){for(;!D.eol()&&D.next()!=E.pending;);var z="string"}else if(E.pending&&D.pos/.test(A)?E.pending=U[0]:E.pending={end:D.pos,style:z},D.backUp(A.length-R)),z}return{startState:function(){var D=t.startState(m),E=y.startOpen?t.startState(b):null;return{html:D,php:E,curMode:y.startOpen?b:m,curState:y.startOpen?E:D,pending:null}},copyState:function(D){var E=D.html,S=t.copyState(m,E),z=D.php,A=z&&t.copyState(b,z),R;return D.curMode==m?R=S:R=A,{html:S,php:A,curMode:D.curMode,curState:R,pending:D.pending}},token:w,indent:function(D,E,S){return D.curMode!=b&&/^\s*<\//.test(E)||D.curMode==b&&/^\?>/.test(E)?m.indent(D.html,E,S):D.curMode.indent(D.curState,E,S)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(D){return{state:D.curState,mode:D.curMode}}}},"htmlmixed","clike"),t.defineMIME("application/x-httpd-php","php"),t.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),t.defineMIME("text/x-php",p)})});var Xd=ue((Vd,Yd)=>{(function(t){"use strict";typeof Vd=="object"&&typeof Yd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(window.CodeMirror)})(function(t){"use strict";t.defineMode("powershell",function(){function n(_,V){V=V||{};for(var j=V.prefix!==void 0?V.prefix:"^",Q=V.suffix!==void 0?V.suffix:"\\b",q=0;q<_.length;q++)_[q]instanceof RegExp?_[q]=_[q].source:_[q]=_[q].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp(j+"("+_.join("|")+")"+Q,"i")}var i="(?=[^A-Za-z\\d\\-_]|$)",s=/[\w\-:]/,u=n([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:i}),c=/[\[\]{},;`\\\.]|@[({]/,d=n(["f",/b?not/,/[ic]?split/,"join",/is(not)?/,"as",/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:"-"}),h=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,p=n([d,h],{suffix:""}),g=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,y=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,m=/[A-Z]:|%|\?/i,b=n([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),w=n([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),D=n([m,b,w],{suffix:i}),E={keyword:u,number:g,operator:p,builtin:D,punctuation:c,identifier:y};function S(_,V){var j=V.returnStack[V.returnStack.length-1];if(j&&j.shouldReturnFrom(V))return V.tokenize=j.tokenize,V.returnStack.pop(),V.tokenize(_,V);if(_.eatSpace())return null;if(_.eat("("))return V.bracketNesting+=1,"punctuation";if(_.eat(")"))return V.bracketNesting-=1,"punctuation";for(var Q in E)if(_.match(E[Q]))return Q;var q=_.next();if(q==="'")return z(_,V);if(q==="$")return ee(_,V);if(q==='"')return A(_,V);if(q==="<"&&_.eat("#"))return V.tokenize=G,G(_,V);if(q==="#")return _.skipToEnd(),"comment";if(q==="@"){var I=_.eat(/["']/);if(I&&_.eol())return V.tokenize=O,V.startQuote=I[0],O(_,V);if(_.eol())return"error";if(_.peek().match(/[({]/))return"punctuation";if(_.peek().match(s))return ee(_,V)}return"error"}function z(_,V){for(var j;(j=_.peek())!=null;)if(_.next(),j==="'"&&!_.eat("'"))return V.tokenize=S,"string";return"error"}function A(_,V){for(var j;(j=_.peek())!=null;){if(j==="$")return V.tokenize=R,"string";if(_.next(),j==="`"){_.next();continue}if(j==='"'&&!_.eat('"'))return V.tokenize=S,"string"}return"error"}function R(_,V){return B(_,V,A)}function U(_,V){return V.tokenize=O,V.startQuote='"',O(_,V)}function Y(_,V){return B(_,V,U)}function B(_,V,j){if(_.match("$(")){var Q=V.bracketNesting;return V.returnStack.push({shouldReturnFrom:function(q){return q.bracketNesting===Q},tokenize:j}),V.tokenize=S,V.bracketNesting+=1,"punctuation"}else return _.next(),V.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:j}),V.tokenize=ee,V.tokenize(_,V)}function G(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(j&&Q==">"){V.tokenize=S;break}j=Q==="#"}return"comment"}function ee(_,V){var j=_.peek();return _.eat("{")?(V.tokenize=J,J(_,V)):j!=null&&j.match(s)?(_.eatWhile(s),V.tokenize=S,"variable-2"):(V.tokenize=S,"error")}function J(_,V){for(var j;(j=_.next())!=null;)if(j==="}"){V.tokenize=S;break}return"variable-2"}function O(_,V){var j=V.startQuote;if(_.sol()&&_.match(new RegExp(j+"@")))V.tokenize=S;else if(j==='"')for(;!_.eol();){var Q=_.peek();if(Q==="$")return V.tokenize=Y,"string";_.next(),Q==="`"&&_.next()}else _.skipToEnd();return"string"}var Z={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:S}},token:function(_,V){return V.tokenize(_,V)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"};return Z}),t.defineMIME("application/x-powershell","powershell")})});var Jd=ue((Zd,Qd)=>{(function(t){typeof Zd=="object"&&typeof Qd=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("properties",function(){return{token:function(n,i){var s=n.sol()||i.afterSection,u=n.eol();if(i.afterSection=!1,s&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),u&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),s)for(;n.eatSpace(););var c=n.next();return s&&(c==="#"||c==="!"||c===";")?(i.position="comment",n.skipToEnd(),"comment"):s&&c==="["?(i.afterSection=!0,n.skipTo("]"),n.eat("]"),"header"):c==="="||c===":"?(i.position="quote",null):(c==="\\"&&i.position==="quote"&&(n.eol()&&(i.nextMultiline=!0)),i.position)},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),t.defineMIME("text/x-properties","properties"),t.defineMIME("text/x-ini","properties")})});var nh=ue((eh,th)=>{(function(t){typeof eh=="object"&&typeof th=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(h){return new RegExp("^(("+h.join(")|(")+"))\\b")}var i=n(["and","or","not","is"]),s=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],u=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];t.registerHelper("hintWords","python",s.concat(u));function c(h){return h.scopes[h.scopes.length-1]}t.defineMode("python",function(h,p){for(var g="error",y=p.delimiters||p.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,m=[p.singleOperators,p.doubleOperators,p.doubleDelimiters,p.tripleDelimiters,p.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],b=0;bI?J(Q):H0&&Z(j,Q)&&(se+=" "+g),se}}return B(j,Q)}function B(j,Q,q){if(j.eatSpace())return null;if(!q&&j.match(/^#.*/))return"comment";if(j.match(/^[0-9\.]/,!1)){var I=!1;if(j.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(I=!0),j.match(/^[\d_]+\.\d*/)&&(I=!0),j.match(/^\.\d+/)&&(I=!0),I)return j.eat(/J/i),"number";var H=!1;if(j.match(/^0x[0-9a-f_]+/i)&&(H=!0),j.match(/^0b[01_]+/i)&&(H=!0),j.match(/^0o[0-7_]+/i)&&(H=!0),j.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(j.eat(/J/i),H=!0),j.match(/^0(?![\dx])/i)&&(H=!0),H)return j.eat(/L/i),"number"}if(j.match(A)){var se=j.current().toLowerCase().indexOf("f")!==-1;return se?(Q.tokenize=G(j.current(),Q.tokenize),Q.tokenize(j,Q)):(Q.tokenize=ee(j.current(),Q.tokenize),Q.tokenize(j,Q))}for(var F=0;F=0;)j=j.substr(1);var q=j.length==1,I="string";function H(F){return function(T,de){var ce=B(T,de,!0);return ce=="punctuation"&&(T.current()=="{"?de.tokenize=H(F+1):T.current()=="}"&&(F>1?de.tokenize=H(F-1):de.tokenize=se)),ce}}function se(F,T){for(;!F.eol();)if(F.eatWhile(/[^'"\{\}\\]/),F.eat("\\")){if(F.next(),q&&F.eol())return I}else{if(F.match(j))return T.tokenize=Q,I;if(F.match("{{"))return I;if(F.match("{",!1))return T.tokenize=H(0),F.current()?I:T.tokenize(F,T);if(F.match("}}"))return I;if(F.match("}"))return g;F.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;T.tokenize=Q}return I}return se.isString=!0,se}function ee(j,Q){for(;"rubf".indexOf(j.charAt(0).toLowerCase())>=0;)j=j.substr(1);var q=j.length==1,I="string";function H(se,F){for(;!se.eol();)if(se.eatWhile(/[^'"\\]/),se.eat("\\")){if(se.next(),q&&se.eol())return I}else{if(se.match(j))return F.tokenize=Q,I;se.eat(/['"]/)}if(q){if(p.singleLineStringErrors)return g;F.tokenize=Q}return I}return H.isString=!0,H}function J(j){for(;c(j).type!="py";)j.scopes.pop();j.scopes.push({offset:c(j).offset+h.indentUnit,type:"py",align:null})}function O(j,Q,q){var I=j.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:j.column()+1;Q.scopes.push({offset:Q.indent+w,type:q,align:I})}function Z(j,Q){for(var q=j.indentation();Q.scopes.length>1&&c(Q).offset>q;){if(c(Q).type!="py")return!0;Q.scopes.pop()}return c(Q).offset!=q}function _(j,Q){j.sol()&&(Q.beginningOfLine=!0);var q=Q.tokenize(j,Q),I=j.current();if(Q.beginningOfLine&&I=="@")return j.match(z,!1)?"meta":S?"operator":g;if(/\S/.test(I)&&(Q.beginningOfLine=!1),(q=="variable"||q=="builtin")&&Q.lastToken=="meta"&&(q="meta"),(I=="pass"||I=="return")&&(Q.dedent+=1),I=="lambda"&&(Q.lambda=!0),I==":"&&!Q.lambda&&c(Q).type=="py"&&J(Q),I.length==1&&!/string|comment/.test(q)){var H="[({".indexOf(I);if(H!=-1&&O(j,Q,"])}".slice(H,H+1)),H="])}".indexOf(I),H!=-1)if(c(Q).type==I)Q.indent=Q.scopes.pop().offset-w;else return g}return Q.dedent>0&&j.eol()&&c(Q).type=="py"&&(Q.scopes.length>1&&Q.scopes.pop(),Q.dedent-=1),q}var V={startState:function(j){return{tokenize:Y,scopes:[{offset:j||0,type:"py",align:null}],indent:j||0,lastToken:null,lambda:!1,dedent:0}},token:function(j,Q){var q=Q.errorToken;q&&(Q.errorToken=!1);var I=_(j,Q);return I&&I!="comment"&&(Q.lastToken=I=="keyword"||I=="punctuation"?j.current():I),I=="punctuation"&&(I=null),j.eol()&&Q.lambda&&(Q.lambda=!1),q?I+" "+g:I},indent:function(j,Q){if(j.tokenize!=Y)return j.tokenize.isString?t.Pass:0;var q=c(j),I=q.type==Q.charAt(0);return q.align!=null?q.align-(I?1:0):q.offset-(I?w:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:`'"`},lineComment:"#",fold:"indent"};return V}),t.defineMIME("text/x-python","python");var d=function(h){return h.split(" ")};t.defineMIME("text/x-cython",{name:"python",extra_keywords:d("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE")})})});var oh=ue((rh,ih)=>{(function(t){typeof rh=="object"&&typeof ih=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";function n(p){for(var g={},y=0,m=p.length;y]/)?(A.eat(/[\<\>]/),"atom"):A.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":A.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(A.eatWhile(/[\w$\xa1-\uffff]/),A.eat(/[\?\!\=]/),"atom"):"operator";if(U=="@"&&A.match(/^@?[a-zA-Z_\xa1-\uffff]/))return A.eat("@"),A.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if(U=="$")return A.eat(/[a-zA-Z_]/)?A.eatWhile(/[\w]/):A.eat(/\d/)?A.eat(/\d/):A.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(U))return A.eatWhile(/[\w\xa1-\uffff]/),A.eat(/[\?\!]/),A.eat(":")?"atom":"ident";if(U=="|"&&(R.varList||R.lastTok=="{"||R.lastTok=="do"))return g="|",null;if(/[\(\)\[\]{}\\;]/.test(U))return g=U,null;if(U=="-"&&A.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(U)){var J=A.eatWhile(/[=+\-\/*:\.^%<>~|]/);return U=="."&&!J&&(g="."),"operator"}else return null}}}function b(A){for(var R=A.pos,U=0,Y,B=!1,G=!1;(Y=A.next())!=null;)if(G)G=!1;else{if("[{(".indexOf(Y)>-1)U++;else if("]})".indexOf(Y)>-1){if(U--,U<0)break}else if(Y=="/"&&U==0){B=!0;break}G=Y=="\\"}return A.backUp(A.pos-R),B}function w(A){return A||(A=1),function(R,U){if(R.peek()=="}"){if(A==1)return U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U);U.tokenize[U.tokenize.length-1]=w(A-1)}else R.peek()=="{"&&(U.tokenize[U.tokenize.length-1]=w(A+1));return m(R,U)}}function D(){var A=!1;return function(R,U){return A?(U.tokenize.pop(),U.tokenize[U.tokenize.length-1](R,U)):(A=!0,m(R,U))}}function E(A,R,U,Y){return function(B,G){var ee=!1,J;for(G.context.type==="read-quoted-paused"&&(G.context=G.context.prev,B.eat("}"));(J=B.next())!=null;){if(J==A&&(Y||!ee)){G.tokenize.pop();break}if(U&&J=="#"&&!ee){if(B.eat("{")){A=="}"&&(G.context={prev:G.context,type:"read-quoted-paused"}),G.tokenize.push(w());break}else if(/[@\$]/.test(B.peek())){G.tokenize.push(D());break}}ee=!ee&&J=="\\"}return R}}function S(A,R){return function(U,Y){return R&&U.eatSpace(),U.match(A)?Y.tokenize.pop():U.skipToEnd(),"string"}}function z(A,R){return A.sol()&&A.match("=end")&&A.eol()&&R.tokenize.pop(),A.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[m],indented:0,context:{type:"top",indented:-p.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(A,R){g=null,A.sol()&&(R.indented=A.indentation());var U=R.tokenize[R.tokenize.length-1](A,R),Y,B=g;if(U=="ident"){var G=A.current();U=R.lastTok=="."?"property":s.propertyIsEnumerable(A.current())?"keyword":/^[A-Z]/.test(G)?"tag":R.lastTok=="def"||R.lastTok=="class"||R.varList?"def":"variable",U=="keyword"&&(B=G,u.propertyIsEnumerable(G)?Y="indent":c.propertyIsEnumerable(G)?Y="dedent":((G=="if"||G=="unless")&&A.column()==A.indentation()||G=="do"&&R.context.indented{(function(t){typeof ah=="object"&&typeof sh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode=function(y,m){t.defineMode(y,function(b){return t.simpleMode(b,m)})},t.simpleMode=function(y,m){n(m,"start");var b={},w=m.meta||{},D=!1;for(var E in m)if(E!=w&&m.hasOwnProperty(E))for(var S=b[E]=[],z=m[E],A=0;A2&&R.token&&typeof R.token!="string"){w.pending=[];for(var B=2;B-1)return t.Pass;var E=b.indent.length-1,S=y[b.state];e:for(;;){for(var z=0;z{(function(t){typeof uh=="object"&&typeof ch=="object"?t(Ze(),lh()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],t):t(CodeMirror)})(function(t){"use strict";t.defineSimpleMode("rust",{start:[{regex:/b?"/,token:"string",next:"string"},{regex:/b?r"/,token:"string",next:"string_raw"},{regex:/b?r#+"/,token:"string",next:"string_raw_hash"},{regex:/'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/,token:"string-2"},{regex:/b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/,token:"string-2"},{regex:/(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,token:"number"},{regex:/(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,token:"keyword"},{regex:/\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/,token:"atom"},{regex:/\b(?:true|false|Some|None|Ok|Err)\b/,token:"builtin"},{regex:/\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,token:["keyword",null,"def"]},{regex:/#!?\[.*\]/,token:"meta"},{regex:/\/\/.*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),t.defineMIME("text/x-rustsrc","rust"),t.defineMIME("text/rust","rust")})});var ph=ue((hh,fh)=>{(function(t){typeof hh=="object"&&typeof fh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("shell",function(){var n={};function i(m,b){for(var w=0;w1&&m.eat("$");var w=m.next();return/['"({]/.test(w)?(b.tokens[0]=h(w,w=="("?"quote":w=="{"?"def":"string"),y(m,b)):(/\d/.test(w)||m.eatWhile(/\w/),b.tokens.shift(),"def")};function y(m,b){return(b.tokens[0]||d)(m,b)}return{startState:function(){return{tokens:[]}},token:function(m,b){return y(m,b)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),t.defineMIME("text/x-sh","shell"),t.defineMIME("application/x-sh","shell")})});var vh=ue((mh,gh)=>{(function(t){typeof mh=="object"&&typeof gh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("sql",function(p,g){var y=g.client||{},m=g.atoms||{false:!0,true:!0,null:!0},b=g.builtin||d(h),w=g.keywords||d(c),D=g.operatorChars||/^[*+\-%<>!=&|~^\/]/,E=g.support||{},S=g.hooks||{},z=g.dateSQL||{date:!0,time:!0,timestamp:!0},A=g.backslashStringEscapes!==!1,R=g.brackets||/^[\{}\(\)\[\]]/,U=g.punctuation||/^[;.,:]/;function Y(O,Z){var _=O.next();if(S[_]){var V=S[_](O,Z);if(V!==!1)return V}if(E.hexNumber&&(_=="0"&&O.match(/^[xX][0-9a-fA-F]+/)||(_=="x"||_=="X")&&O.match(/^'[0-9a-fA-F]+'/)))return"number";if(E.binaryNumber&&((_=="b"||_=="B")&&O.match(/^'[01]+'/)||_=="0"&&O.match(/^b[01]+/)))return"number";if(_.charCodeAt(0)>47&&_.charCodeAt(0)<58)return O.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),E.decimallessFloat&&O.match(/^\.(?!\.)/),"number";if(_=="?"&&(O.eatSpace()||O.eol()||O.eat(";")))return"variable-3";if(_=="'"||_=='"'&&E.doubleQuote)return Z.tokenize=B(_),Z.tokenize(O,Z);if((E.nCharCast&&(_=="n"||_=="N")||E.charsetCast&&_=="_"&&O.match(/[a-z][a-z0-9]*/i))&&(O.peek()=="'"||O.peek()=='"'))return"keyword";if(E.escapeConstant&&(_=="e"||_=="E")&&(O.peek()=="'"||O.peek()=='"'&&E.doubleQuote))return Z.tokenize=function(Q,q){return(q.tokenize=B(Q.next(),!0))(Q,q)},"keyword";if(E.commentSlashSlash&&_=="/"&&O.eat("/"))return O.skipToEnd(),"comment";if(E.commentHash&&_=="#"||_=="-"&&O.eat("-")&&(!E.commentSpaceRequired||O.eat(" ")))return O.skipToEnd(),"comment";if(_=="/"&&O.eat("*"))return Z.tokenize=G(1),Z.tokenize(O,Z);if(_=="."){if(E.zerolessFloat&&O.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(O.match(/^\.+/))return null;if(E.ODBCdotTable&&O.match(/^[\w\d_$#]+/))return"variable-2"}else{if(D.test(_))return O.eatWhile(D),"operator";if(R.test(_))return"bracket";if(U.test(_))return O.eatWhile(U),"punctuation";if(_=="{"&&(O.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||O.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";O.eatWhile(/^[_\w\d]/);var j=O.current().toLowerCase();return z.hasOwnProperty(j)&&(O.match(/^( )+'[^']*'/)||O.match(/^( )+"[^"]*"/))?"number":m.hasOwnProperty(j)?"atom":b.hasOwnProperty(j)?"builtin":w.hasOwnProperty(j)?"keyword":y.hasOwnProperty(j)?"string-2":null}}function B(O,Z){return function(_,V){for(var j=!1,Q;(Q=_.next())!=null;){if(Q==O&&!j){V.tokenize=Y;break}j=(A||Z)&&!j&&Q=="\\"}return"string"}}function G(O){return function(Z,_){var V=Z.match(/^.*?(\/\*|\*\/)/);return V?V[1]=="/*"?_.tokenize=G(O+1):O>1?_.tokenize=G(O-1):_.tokenize=Y:Z.skipToEnd(),"comment"}}function ee(O,Z,_){Z.context={prev:Z.context,indent:O.indentation(),col:O.column(),type:_}}function J(O){O.indent=O.context.indent,O.context=O.context.prev}return{startState:function(){return{tokenize:Y,context:null}},token:function(O,Z){if(O.sol()&&(Z.context&&Z.context.align==null&&(Z.context.align=!1)),Z.tokenize==Y&&O.eatSpace())return null;var _=Z.tokenize(O,Z);if(_=="comment")return _;Z.context&&Z.context.align==null&&(Z.context.align=!0);var V=O.current();return V=="("?ee(O,Z,")"):V=="["?ee(O,Z,"]"):Z.context&&Z.context.type==V&&J(Z),_},indent:function(O,Z){var _=O.context;if(!_)return t.Pass;var V=Z.charAt(0)==_.type;return _.align?_.col+(V?0:1):_.indent+(V?0:p.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E.commentSlashSlash?"//":E.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}});function n(p){for(var g;(g=p.next())!=null;)if(g=="`"&&!p.eat("`"))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function i(p){for(var g;(g=p.next())!=null;)if(g=='"'&&!p.eat('"'))return"variable-2";return p.backUp(p.current().length-1),p.eatWhile(/\w/)?"variable-2":null}function s(p){return p.eat("@")&&(p.match(/^session\./),p.match(/^local\./),p.match(/^global\./)),p.eat("'")?(p.match(/^.*'/),"variable-2"):p.eat('"')?(p.match(/^.*"/),"variable-2"):p.eat("`")?(p.match(/^.*`/),"variable-2"):p.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function u(p){return p.eat("N")?"atom":p.match(/^[a-zA-Z.#!?]/)?"variable-2":null}var c="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function d(p){for(var g={},y=p.split(" "),m=0;m!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:d("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":s}}),t.defineMIME("text/x-mysql",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-mariadb",{name:"sql",client:d("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:d(c+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":s,"`":n,"\\":u}}),t.defineMIME("text/x-sqlite",{name:"sql",client:d("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:d(c+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:d("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:d("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:d("date time timestamp datetime"),support:d("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":s,":":s,"?":s,$:s,'"':i,"`":n}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:d("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:d("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:d("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:d("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:d("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:d("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:d("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:d("date time timestamp"),support:d("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:d("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:d("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:d("date timestamp"),support:d("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:d("source"),keywords:d(c+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),t.defineMIME("text/x-gql",{name:"sql",keywords:d("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:d("false true"),builtin:d("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),t.defineMIME("text/x-gpsql",{name:"sql",client:d("source"),keywords:d("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:d("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:d("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-sparksql",{name:"sql",keywords:d("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:d("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:d("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:d("date time timestamp"),support:d("ODBCdotTable doubleQuote zerolessFloat")}),t.defineMIME("text/x-esper",{name:"sql",client:d("source"),keywords:d("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:d("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:d("time"),support:d("decimallessFloat zerolessFloat binaryNumber hexNumber")})})});var wh=ue((bh,yh)=>{(function(t){typeof bh=="object"&&typeof yh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("toml",function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(n,i){if(!i.inString&&(n.peek()=='"'||n.peek()=="'")&&(i.stringType=n.peek(),n.next(),i.inString=!0),n.sol()&&i.inArray===0&&(i.lhs=!0),i.inString){for(;i.inString&&!n.eol();)n.peek()===i.stringType?(n.next(),i.inString=!1):n.peek()==="\\"?(n.next(),n.next()):n.match(/^.[^\\\"\']*/);return i.lhs?"property string":"string"}else{if(i.inArray&&n.peek()==="]")return n.next(),i.inArray--,"bracket";if(i.lhs&&n.peek()==="["&&n.skipTo("]"))return n.next(),n.peek()==="]"&&n.next(),"atom";if(n.peek()==="#")return n.skipToEnd(),"comment";if(n.eatSpace())return null;if(i.lhs&&n.eatWhile(function(s){return s!="="&&s!=" "}))return"property";if(i.lhs&&n.peek()==="=")return n.next(),i.lhs=!1,null;if(!i.lhs&&n.match(/^\d\d\d\d[\d\-\:\.T]*Z/))return"atom";if(!i.lhs&&(n.match("true")||n.match("false")))return"atom";if(!i.lhs&&n.peek()==="[")return i.inArray++,n.next(),"bracket";if(!i.lhs&&n.match(/^\-?\d+(?:\.\d+)?/))return"number";n.eatSpace()||n.next()}return null}}}),t.defineMIME("text/x-toml","toml")})});var _h=ue((kh,xh)=>{(function(t){typeof kh=="object"&&typeof xh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("vbscript",function(n,i){var s="error";function u(re){return new RegExp("^(("+re.join(")|(")+"))\\b","i")}var c=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),d=new RegExp("^((<>)|(<=)|(>=))"),h=new RegExp("^[\\.,]"),p=new RegExp("^[\\(\\)]"),g=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),y=["class","sub","select","while","if","function","property","with","for"],m=["else","elseif","case"],b=["next","loop","wend"],w=u(["and","or","not","xor","is","mod","eqv","imp"]),D=["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"],E=["true","false","nothing","empty","null"],S=["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"],z=["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"],A=["WScript","err","debug","RegExp"],R=["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"],U=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"],Y=["server","response","request","session","application"],B=["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"],G=["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],ee=U.concat(R);A=A.concat(z),n.isASP&&(A=A.concat(Y),ee=ee.concat(G,B));var J=u(D),O=u(E),Z=u(S),_=u(A),V=u(ee),j='"',Q=u(y),q=u(m),I=u(b),H=u(["end"]),se=u(["do"]),F=u(["on error resume next","exit"]),T=u(["rem"]);function de(re,we){we.currentIndent++}function ce(re,we){we.currentIndent--}function oe(re,we){if(re.eatSpace())return"space";var De=re.peek();if(De==="'")return re.skipToEnd(),"comment";if(re.match(T))return re.skipToEnd(),"comment";if(re.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!re.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var Pe=!1;if((re.match(/^\d*\.\d+/i)||(re.match(/^\d+\.\d*/)||re.match(/^\.\d+/)))&&(Pe=!0),Pe)return re.eat(/J/i),"number";var rt=!1;if(re.match(/^&H[0-9a-f]+/i)||re.match(/^&O[0-7]+/i)?rt=!0:re.match(/^[1-9]\d*F?/)?(re.eat(/J/i),rt=!0):re.match(/^0(?![\dx])/i)&&(rt=!0),rt)return re.eat(/L/i),"number"}return re.match(j)?(we.tokenize=xe(re.current()),we.tokenize(re,we)):re.match(d)||re.match(c)||re.match(w)?"operator":re.match(h)?null:re.match(p)?"bracket":re.match(F)?(we.doInCurrentLine=!0,"keyword"):re.match(se)?(de(re,we),we.doInCurrentLine=!0,"keyword"):re.match(Q)?(we.doInCurrentLine?we.doInCurrentLine=!1:de(re,we),"keyword"):re.match(q)?"keyword":re.match(H)?(ce(re,we),ce(re,we),"keyword"):re.match(I)?(we.doInCurrentLine?we.doInCurrentLine=!1:ce(re,we),"keyword"):re.match(J)?"keyword":re.match(O)?"atom":re.match(V)?"variable-2":re.match(Z)?"builtin":re.match(_)?"variable-2":re.match(g)?"variable":(re.next(),s)}function xe(re){var we=re.length==1,De="string";return function(Pe,rt){for(;!Pe.eol();){if(Pe.eatWhile(/[^'"]/),Pe.match(re))return rt.tokenize=oe,De;Pe.eat(/['"]/)}if(we){if(i.singleLineStringErrors)return s;rt.tokenize=oe}return De}}function Oe(re,we){var De=we.tokenize(re,we),Pe=re.current();return Pe==="."?(De=we.tokenize(re,we),Pe=re.current(),De&&(De.substr(0,8)==="variable"||De==="builtin"||De==="keyword")?((De==="builtin"||De==="keyword")&&(De="variable"),ee.indexOf(Pe.substr(1))>-1&&(De="variable-2"),De):s):De}var ye={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:oe,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(re,we){re.sol()&&(we.currentIndent+=we.nextLineIndent,we.nextLineIndent=0,we.doInCurrentLine=0);var De=Oe(re,we);return we.lastToken={style:De,content:re.current()},De==="space"&&(De=null),De},indent:function(re,we){var De=we.replace(/^\s+|\s+$/g,"");return De.match(I)||De.match(H)||De.match(q)?n.indentUnit*(re.currentIndent-1):re.currentIndent<0?0:re.currentIndent*n.indentUnit}};return ye}),t.defineMIME("text/vbscript","vbscript")})});var Eh=ue((Ch,Sh)=>{(function(t){typeof Ch=="object"&&typeof Sh=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("yaml",function(){var n=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+n.join(")|(")+"))$","i");return{token:function(s,u){var c=s.peek(),d=u.escaped;if(u.escaped=!1,c=="#"&&(s.pos==0||/\s/.test(s.string.charAt(s.pos-1))))return s.skipToEnd(),"comment";if(s.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(u.literal&&s.indentation()>u.keyCol)return s.skipToEnd(),"string";if(u.literal&&(u.literal=!1),s.sol()){if(u.keyCol=0,u.pair=!1,u.pairStart=!1,s.match(/---/))return"def";if(s.match(/\.\.\./))return"def";if(s.match(/\s*-\s+/))return"meta"}if(s.match(/^(\{|\}|\[|\])/))return c=="{"?u.inlinePairs++:c=="}"?u.inlinePairs--:c=="["?u.inlineList++:u.inlineList--,"meta";if(u.inlineList>0&&!d&&c==",")return s.next(),"meta";if(u.inlinePairs>0&&!d&&c==",")return u.keyCol=0,u.pair=!1,u.pairStart=!1,s.next(),"meta";if(u.pairStart){if(s.match(/^\s*(\||\>)\s*/))return u.literal=!0,"meta";if(s.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(u.inlinePairs==0&&s.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(u.inlinePairs>0&&s.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(s.match(i))return"keyword"}return!u.pair&&s.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(u.pair=!0,u.keyCol=s.indentation(),"atom"):u.pair&&s.match(/^:\s*/)?(u.pairStart=!0,"meta"):(u.pairStart=!1,u.escaped=c=="\\",s.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}}),t.defineMIME("text/x-yaml","yaml"),t.defineMIME("text/yaml","yaml")})});var Th=ue((Dh,Ah)=>{(function(t){typeof Dh=="object"&&typeof Ah=="object"?t(Ze()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineOption("scrollPastEnd",!1,function(s,u,c){c&&c!=t.Init&&(s.off("change",n),s.off("refresh",i),s.display.lineSpace.parentNode.style.paddingBottom="",s.state.scrollPastEndPadding=null),u&&(s.on("change",n),s.on("refresh",i),i(s))});function n(s,u){t.changeEnd(u).line==s.lastLine()&&i(s)}function i(s){var u="";if(s.lineCount()>1){var c=s.display.scroller.clientHeight-30,d=s.getLineHandle(s.lastLine()).height;u=c-d+"px"}s.state.scrollPastEndPadding!=u&&(s.state.scrollPastEndPadding=u,s.display.lineSpace.parentNode.style.paddingBottom=u,s.off("refresh",i),s.setSize(),s.on("refresh",i))}})});var zh=ue((l_,na)=>{"use strict";function ra(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ra=function(i){return typeof i}:ra=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ra(t)}function Wy(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&Qs(t,n)}function Qs(t,n){return Qs=Object.setPrototypeOf||function(s,u){return s.__proto__=u,s},Qs(t,n)}function Gy(t){var n=$y();return function(){var s=ia(t),u;if(n){var c=ia(this).constructor;u=Reflect.construct(s,arguments,c)}else u=s.apply(this,arguments);return Lh(this,u)}}function Lh(t,n){return n&&(ra(n)==="object"||typeof n=="function")?n:Yi(t)}function Yi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $y(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function ia(t){return ia=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ia(t)}function Ge(t,n){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=Ky(t))||n&&t&&typeof t.length=="number"){i&&(t=i);var s=0,u=function(){};return{s:u,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(g){throw g},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=t[Symbol.iterator]()},n:function(){var g=i.next();return c=g.done,g},e:function(g){d=!0,h=g},f:function(){try{!c&&i.return!=null&&i.return()}finally{if(d)throw h}}}}function Ky(t,n){if(!t)return;if(typeof t=="string")return Ih(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ih(t,n)}function Ih(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,s=new Array(n);i1?u-1:0),d=1;d
'),this.element.appendChild(c));var g=c.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(c,d,h,p){var g={srcX:0,srcY:0,srcWidth:c.width,srcHeight:c.height},y=c.width/c.height;d==null&&h==null?(d=g.srcWidth,h=g.srcHeight):d==null?d=h*y:h==null&&(h=d/y),d=Math.min(d,g.srcWidth),h=Math.min(h,g.srcHeight);var m=d/h;if(g.srcWidth>d||g.srcHeight>h)if(p==="crop")y>m?(g.srcHeight=c.height,g.srcWidth=g.srcHeight*m):(g.srcWidth=c.width,g.srcHeight=g.srcWidth/m);else if(p==="contain")y>m?h=d/y:d=h*y;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(c.width-g.srcWidth)/2,g.srcY=(c.height-g.srcHeight)/2,g.trgWidth=d,g.trgHeight=h,g},transformFile:function(c,d){return(this.options.resizeWidth||this.options.resizeHeight)&&c.type.match(/image.*/)?this.resizeImage(c,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,d):d(c)},previewTemplate:`
@@ -48,12 +48,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
-
`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=Ue(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(S){h.e(S)}finally{h.f()}var y=Ue(c.previewElement.querySelectorAll("[data-dz-size]")),m;try{for(y.s();!(m=y.n()).done;)g=m.value,g.innerHTML=this.filesize(c.size)}catch(S){y.e(S)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement(''.concat(this.options.dictRemoveFile,"")),c.previewElement.appendChild(c._removeLink));var b=function(z){return z.preventDefault(),z.stopPropagation(),c.status===i.UPLOADING?i.confirm(d.options.dictCancelUploadConfirmation,function(){return d.removeFile(c)}):d.options.dictRemoveFileConfirmation?i.confirm(d.options.dictRemoveFileConfirmation,function(){return d.removeFile(c)}):d.removeFile(c)},w=Ue(c.previewElement.querySelectorAll("[data-dz-remove]")),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;E.addEventListener("click",b)}}catch(S){w.e(S)}finally{w.f()}}},removedfile:function(c){return c.previewElement!=null&&c.previewElement.parentNode!=null&&c.previewElement.parentNode.removeChild(c.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(c,d){if(c.previewElement){c.previewElement.classList.remove("dz-file-preview");var h=Ue(c.previewElement.querySelectorAll("[data-dz-thumbnail]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.alt=c.name,g.src=d}}catch(y){h.e(y)}finally{h.f()}return setTimeout(function(){return c.previewElement.classList.add("dz-image-preview")},1)}},error:function(c,d){if(c.previewElement){c.previewElement.classList.add("dz-error"),typeof d!="string"&&d.error&&(d=d.error);var h=Ue(c.previewElement.querySelectorAll("[data-dz-errormessage]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=d}}catch(y){h.e(y)}finally{h.f()}}},errormultiple:function(){},processing:function(c){if(c.previewElement&&(c.previewElement.classList.add("dz-processing"),c._removeLink))return c._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(c,d,h){if(c.previewElement){var p=Ue(c.previewElement.querySelectorAll("[data-dz-uploadprogress]")),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.nodeName==="PROGRESS"?y.value=d:y.style.width="".concat(d,"%")}}catch(m){p.e(m)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(c){if(c.previewElement)return c.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(c){return this.emit("error",c,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(c){if(c._removeLink&&(c._removeLink.innerHTML=this.options.dictRemoveFile),c.previewElement)return c.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(u){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h"))),this.clickableElements.length){var c=function m(){return u.hiddenFileInput&&u.hiddenFileInput.parentNode.removeChild(u.hiddenFileInput),u.hiddenFileInput=document.createElement("input"),u.hiddenFileInput.setAttribute("type","file"),(u.options.maxFiles===null||u.options.maxFiles>1)&&u.hiddenFileInput.setAttribute("multiple","multiple"),u.hiddenFileInput.className="dz-hidden-input",u.options.acceptedFiles!==null&&u.hiddenFileInput.setAttribute("accept",u.options.acceptedFiles),u.options.capture!==null&&u.hiddenFileInput.setAttribute("capture",u.options.capture),u.hiddenFileInput.style.visibility="hidden",u.hiddenFileInput.style.position="absolute",u.hiddenFileInput.style.top="0",u.hiddenFileInput.style.left="0",u.hiddenFileInput.style.height="0",u.hiddenFileInput.style.width="0",i.getElement(u.options.hiddenInputContainer,"hiddenInputContainer").appendChild(u.hiddenFileInput),u.hiddenFileInput.addEventListener("change",function(){var b=u.hiddenFileInput.files;if(b.length){var w=Ue(b),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;u.addFile(E)}}catch(S){w.e(S)}finally{w.f()}}return u.emit("addedfiles",b),m()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;var d=Ue(this.events),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;this.on(p,this.options[p])}}catch(m){d.e(m)}finally{d.f()}this.on("uploadprogress",function(){return u.updateTotalUploadProgress()}),this.on("removedfile",function(){return u.updateTotalUploadProgress()}),this.on("canceled",function(m){return u.emit("complete",m)}),this.on("complete",function(m){if(u.getAddedFiles().length===0&&u.getUploadingFiles().length===0&&u.getQueuedFiles().length===0)return setTimeout(function(){return u.emit("queuecomplete")},0)});var g=function(b){if(b.dataTransfer.types){for(var w=0;w")),d+='');var h=i.createElement(d);return this.element.tagName!=="FORM"?(c=i.createElement('
')),c.appendChild(h)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),c!=null?c:h}},{key:"getExistingFallback",value:function(){for(var u=function(y){var m=Ue(y),b;try{for(m.s();!(b=m.n()).done;){var w=b.value;if(/(^| )fallback($| )/.test(w.className))return w}}catch(D){m.e(D)}finally{m.f()}},c=0,d=["div","form"];c0){for(var h=["tb","gb","mb","kb","b"],p=0;p=y){c=u/Math.pow(this.options.filesizeBase,4-p),d=g;break}}c=Math.round(10*c)/10}return"".concat(c," ").concat(this.options.dictFileSizeUnits[d])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(u){if(!u.dataTransfer)return;this.emit("drop",u);for(var c=[],d=0;d0){var b=Ue(m),w;try{for(b.s();!(w=b.n()).done;){var D=w.value;D.isFile?D.file(function(E){return d.options.ignoreHiddenFiles&&E.name.substring(0,1)==="."?void 0:(E.fullPath="".concat(c,"/").concat(E.name),d.addFile(E))}):D.isDirectory&&d._addFilesFromDirectory(D,"".concat(c,"/").concat(D.name))}}catch(E){b.e(E)}finally{b.f()}y()}return null},p)};return g()}},{key:"accept",value:function(u,c){this.options.maxFilesize&&u.size>this.options.maxFilesize*1024*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(u.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(u,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",u)):this.options.accept.call(this,u,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(u){var c=this;u.upload={uuid:i.uuidv4(),progress:0,total:u.size,bytesSent:0,filename:this._renameFile(u)},this.files.push(u),u.status=i.ADDED,this.emit("addedfile",u),this._enqueueThumbnail(u),this.accept(u,function(d){d?(u.accepted=!1,c._errorProcessing([u],d)):(u.accepted=!0,c.options.autoQueue&&c.enqueueFile(u)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(u){var c=Ue(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.enqueueFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"enqueueFile",value:function(u){var c=this;if(u.status===i.ADDED&&u.accepted===!0){if(u.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(u){var c=this;if(this.options.createImageThumbnails&&u.type.match(/image.*/)&&u.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(u),setTimeout(function(){return c._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var u=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(d){return u.emit("thumbnail",c,d),u._processingThumbnail=!1,u._processThumbnailQueue()})}},{key:"removeFile",value:function(u){if(u.status===i.UPLOADING&&this.cancelUpload(u),this.files=$y(this.files,u),this.emit("removedfile",u),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(u){u==null&&(u=!1);var c=Ue(this.files.slice()),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;(h.status!==i.UPLOADING||u)&&this.removeFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"resizeImage",value:function(u,c,d,h,p){var g=this;return this.createThumbnail(u,c,d,h,!0,function(y,m){if(m==null)return p(u);var b=g.options.resizeMimeType;b==null&&(b=u.type);var w=m.toDataURL(b,g.options.resizeQuality);return(b==="image/jpeg"||b==="image/jpg")&&(w=Ih.restore(u.dataURL,w)),p(i.dataURItoBlob(w))})}},{key:"createThumbnail",value:function(u,c,d,h,p,g){var y=this,m=new FileReader;m.onload=function(){if(u.dataURL=m.result,u.type==="image/svg+xml"){g!=null&&g(m.result);return}y.createThumbnailFromUrl(u,c,d,h,p,g)},m.readAsDataURL(u)}},{key:"displayExistingFile",value:function(u,c,d,h){var p=this,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",u),this.emit("complete",u),!g)this.emit("thumbnail",u,c),d&&d();else{var y=function(b){p.emit("thumbnail",u,b),d&&d()};u.dataURL=c,this.createThumbnailFromUrl(u,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,y,h)}}},{key:"createThumbnailFromUrl",value:function(u,c,d,h,p,g,y){var m=this,b=document.createElement("img");return y&&(b.crossOrigin=y),p=getComputedStyle(document.body).imageOrientation=="from-image"?!1:p,b.onload=function(){var w=function(E){return E(1)};return typeof EXIF!="undefined"&&EXIF!==null&&p&&(w=function(E){return EXIF.getData(b,function(){return E(EXIF.getTag(this,"Orientation"))})}),w(function(D){u.width=b.width,u.height=b.height;var E=m.options.resize.call(m,u,c,d,h),S=document.createElement("canvas"),z=S.getContext("2d");S.width=E.trgWidth,S.height=E.trgHeight,D>4&&(S.width=E.trgHeight,S.height=E.trgWidth);switch(D){case 2:z.translate(S.width,0),z.scale(-1,1);break;case 3:z.translate(S.width,S.height),z.rotate(Math.PI);break;case 4:z.translate(0,S.height),z.scale(1,-1);break;case 5:z.rotate(.5*Math.PI),z.scale(1,-1);break;case 6:z.rotate(.5*Math.PI),z.translate(0,-S.width);break;case 7:z.rotate(.5*Math.PI),z.translate(S.height,-S.width),z.scale(-1,1);break;case 8:z.rotate(-.5*Math.PI),z.translate(-S.height,0);break}Gy(z,b,E.srcX!=null?E.srcX:0,E.srcY!=null?E.srcY:0,E.srcWidth,E.srcHeight,E.trgX!=null?E.trgX:0,E.trgY!=null?E.trgY:0,E.trgWidth,E.trgHeight);var A=S.toDataURL("image/png");if(g!=null)return g(A,S)})},g!=null&&(b.onerror=g),b.src=u.dataURL}},{key:"processQueue",value:function(){var u=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=u)return;var h=this.getQueuedFiles();if(!(h.length>0))return;if(this.options.uploadMultiple)return this.processFiles(h.slice(0,u-c));for(;d1?c-1:0),h=1;hc.options.chunkSize),u[0].upload.totalChunkCount=Math.ceil(h.size/c.options.chunkSize)}if(u[0].upload.chunked){var p=u[0],g=d[0],y=0;p.upload.chunks=[];var m=function(){for(var S=0;p.upload.chunks[S]!==void 0;)S++;if(S>=p.upload.totalChunkCount)return;y++;var z=S*c.options.chunkSize,A=Math.min(z+c.options.chunkSize,g.size),R={name:c._getParamName(0),data:g.webkitSlice?g.webkitSlice(z,A):g.slice(z,A),filename:p.upload.filename,chunkIndex:S};p.upload.chunks[S]={file:p,index:S,dataBlock:R,status:i.UPLOADING,progress:0,retries:0},c._uploadData(u,[R])};if(p.upload.finishedChunkUpload=function(E){var S=!0;E.status=i.SUCCESS,E.dataBlock=null,E.xhr=null;for(var z=0;z=d;h?c++:c--)u[c]=n.charCodeAt(c);return new Blob([s],{type:i})};var $y=function(n,i){return n.filter(function(s){return s!==i}).map(function(s){return s})},Yy=function(n){return n.replace(/[\-_](\w)/g,function(i){return i.charAt(1).toUpperCase()})};Be.createElement=function(t){var n=document.createElement("div");return n.innerHTML=t,n.childNodes[0]};Be.elementInside=function(t,n){if(t===n)return!0;for(;t=t.parentNode;)if(t===n)return!0;return!1};Be.getElement=function(t,n){var i;if(typeof t=="string"?i=document.querySelector(t):t.nodeType!=null&&(i=t),i==null)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector or a plain HTML element."));return i};Be.getElements=function(t,n){var i,s;if(t instanceof Array){s=[];try{var u=Ue(t),c;try{for(u.s();!(c=u.n()).done;)i=c.value,s.push(this.getElement(i,n))}catch(p){u.e(p)}finally{u.f()}}catch(p){s=null}}else if(typeof t=="string"){s=[];var d=Ue(document.querySelectorAll(t)),h;try{for(d.s();!(h=d.n()).done;)i=h.value,s.push(i)}catch(p){d.e(p)}finally{d.f()}}else t.nodeType!=null&&(s=[t]);if(s==null||!s.length)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return s};Be.confirm=function(t,n,i){if(window.confirm(t))return n();if(i!=null)return i()};Be.isValidFile=function(t,n){if(!n)return!0;n=n.split(",");var i=t.type,s=i.replace(/\/.*$/,""),u=Ue(n),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;if(d=d.trim(),d.charAt(0)==="."){if(t.name.toLowerCase().indexOf(d.toLowerCase(),t.name.length-d.length)!==-1)return!0}else if(/\/\*$/.test(d)){if(s===d.replace(/\/.*$/,""))return!0}else if(i===d)return!0}}catch(h){u.e(h)}finally{u.f()}return!1};typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Be(this,t)})});typeof na!="undefined"&&na!==null?na.exports=Be:window.Dropzone=Be;Be.ADDED="added";Be.QUEUED="queued";Be.ACCEPTED=Be.QUEUED;Be.UPLOADING="uploading";Be.PROCESSING=Be.UPLOADING;Be.CANCELED="canceled";Be.ERROR="error";Be.SUCCESS="success";var Xy=function(n){var i=n.naturalWidth,s=n.naturalHeight,u=document.createElement("canvas");u.width=1,u.height=s;var c=u.getContext("2d");c.drawImage(n,0,0);for(var d=c.getImageData(1,0,1,s),h=d.data,p=0,g=s,y=s;y>p;){var m=h[(y-1)*4+3];m===0?g=y:p=y,y=g+p>>1}var b=y/s;return b===0?1:b},Gy=function(n,i,s,u,c,d,h,p,g,y){var m=Xy(i);return n.drawImage(i,s,u,c,d,h,p,g,y/m)},Ih=function(){function t(){Js(this,t)}return oa(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(i){for(var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0;!(u=i[m++],c=i[m++],d=i[m++],h=u>>2,p=(u&3)<<4|c>>4,g=(c&15)<<2|d>>6,y=d&63,isNaN(c)?g=y=64:isNaN(d)&&(y=64),s=s+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(p)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(y),u=c=d="",h=p=g=y="",!(mi.length)break}return u}},{key:"decode64",value:function(i){var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0,b=[],w=/[^A-Za-z0-9\+\/\=]/g;for(w.exec(i)&&console.warn(`There were invalid base64 characters in the input text. +`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=Ge(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(S){h.e(S)}finally{h.f()}var y=Ge(c.previewElement.querySelectorAll("[data-dz-size]")),m;try{for(y.s();!(m=y.n()).done;)g=m.value,g.innerHTML=this.filesize(c.size)}catch(S){y.e(S)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement(''.concat(this.options.dictRemoveFile,"")),c.previewElement.appendChild(c._removeLink));var b=function(z){return z.preventDefault(),z.stopPropagation(),c.status===i.UPLOADING?i.confirm(d.options.dictCancelUploadConfirmation,function(){return d.removeFile(c)}):d.options.dictRemoveFileConfirmation?i.confirm(d.options.dictRemoveFileConfirmation,function(){return d.removeFile(c)}):d.removeFile(c)},w=Ge(c.previewElement.querySelectorAll("[data-dz-remove]")),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;E.addEventListener("click",b)}}catch(S){w.e(S)}finally{w.f()}}},removedfile:function(c){return c.previewElement!=null&&c.previewElement.parentNode!=null&&c.previewElement.parentNode.removeChild(c.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(c,d){if(c.previewElement){c.previewElement.classList.remove("dz-file-preview");var h=Ge(c.previewElement.querySelectorAll("[data-dz-thumbnail]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.alt=c.name,g.src=d}}catch(y){h.e(y)}finally{h.f()}return setTimeout(function(){return c.previewElement.classList.add("dz-image-preview")},1)}},error:function(c,d){if(c.previewElement){c.previewElement.classList.add("dz-error"),typeof d!="string"&&d.error&&(d=d.error);var h=Ge(c.previewElement.querySelectorAll("[data-dz-errormessage]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=d}}catch(y){h.e(y)}finally{h.f()}}},errormultiple:function(){},processing:function(c){if(c.previewElement&&(c.previewElement.classList.add("dz-processing"),c._removeLink))return c._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(c,d,h){if(c.previewElement){var p=Ge(c.previewElement.querySelectorAll("[data-dz-uploadprogress]")),g;try{for(p.s();!(g=p.n()).done;){var y=g.value;y.nodeName==="PROGRESS"?y.value=d:y.style.width="".concat(d,"%")}}catch(m){p.e(m)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(c){if(c.previewElement)return c.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(c){return this.emit("error",c,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(c){if(c._removeLink&&(c._removeLink.innerHTML=this.options.dictRemoveFile),c.previewElement)return c.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(u){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h"))),this.clickableElements.length){var c=function m(){return u.hiddenFileInput&&u.hiddenFileInput.parentNode.removeChild(u.hiddenFileInput),u.hiddenFileInput=document.createElement("input"),u.hiddenFileInput.setAttribute("type","file"),(u.options.maxFiles===null||u.options.maxFiles>1)&&u.hiddenFileInput.setAttribute("multiple","multiple"),u.hiddenFileInput.className="dz-hidden-input",u.options.acceptedFiles!==null&&u.hiddenFileInput.setAttribute("accept",u.options.acceptedFiles),u.options.capture!==null&&u.hiddenFileInput.setAttribute("capture",u.options.capture),u.hiddenFileInput.style.visibility="hidden",u.hiddenFileInput.style.position="absolute",u.hiddenFileInput.style.top="0",u.hiddenFileInput.style.left="0",u.hiddenFileInput.style.height="0",u.hiddenFileInput.style.width="0",i.getElement(u.options.hiddenInputContainer,"hiddenInputContainer").appendChild(u.hiddenFileInput),u.hiddenFileInput.addEventListener("change",function(){var b=u.hiddenFileInput.files;if(b.length){var w=Ge(b),D;try{for(w.s();!(D=w.n()).done;){var E=D.value;u.addFile(E)}}catch(S){w.e(S)}finally{w.f()}}return u.emit("addedfiles",b),m()})};c()}this.URL=window.URL!==null?window.URL:window.webkitURL;var d=Ge(this.events),h;try{for(d.s();!(h=d.n()).done;){var p=h.value;this.on(p,this.options[p])}}catch(m){d.e(m)}finally{d.f()}this.on("uploadprogress",function(){return u.updateTotalUploadProgress()}),this.on("removedfile",function(){return u.updateTotalUploadProgress()}),this.on("canceled",function(m){return u.emit("complete",m)}),this.on("complete",function(m){if(u.getAddedFiles().length===0&&u.getUploadingFiles().length===0&&u.getQueuedFiles().length===0)return setTimeout(function(){return u.emit("queuecomplete")},0)});var g=function(b){if(b.dataTransfer.types){for(var w=0;w")),d+='');var h=i.createElement(d);return this.element.tagName!=="FORM"?(c=i.createElement('
')),c.appendChild(h)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),c!=null?c:h}},{key:"getExistingFallback",value:function(){for(var u=function(y){var m=Ge(y),b;try{for(m.s();!(b=m.n()).done;){var w=b.value;if(/(^| )fallback($| )/.test(w.className))return w}}catch(D){m.e(D)}finally{m.f()}},c=0,d=["div","form"];c0){for(var h=["tb","gb","mb","kb","b"],p=0;p=y){c=u/Math.pow(this.options.filesizeBase,4-p),d=g;break}}c=Math.round(10*c)/10}return"".concat(c," ").concat(this.options.dictFileSizeUnits[d])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(u){if(!u.dataTransfer)return;this.emit("drop",u);for(var c=[],d=0;d0){var b=Ge(m),w;try{for(b.s();!(w=b.n()).done;){var D=w.value;D.isFile?D.file(function(E){return d.options.ignoreHiddenFiles&&E.name.substring(0,1)==="."?void 0:(E.fullPath="".concat(c,"/").concat(E.name),d.addFile(E))}):D.isDirectory&&d._addFilesFromDirectory(D,"".concat(c,"/").concat(D.name))}}catch(E){b.e(E)}finally{b.f()}y()}return null},p)};return g()}},{key:"accept",value:function(u,c){this.options.maxFilesize&&u.size>this.options.maxFilesize*1024*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(u.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):i.isValidFile(u,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",u)):this.options.accept.call(this,u,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(u){var c=this;u.upload={uuid:i.uuidv4(),progress:0,total:u.size,bytesSent:0,filename:this._renameFile(u)},this.files.push(u),u.status=i.ADDED,this.emit("addedfile",u),this._enqueueThumbnail(u),this.accept(u,function(d){d?(u.accepted=!1,c._errorProcessing([u],d)):(u.accepted=!0,c.options.autoQueue&&c.enqueueFile(u)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(u){var c=Ge(u),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;this.enqueueFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"enqueueFile",value:function(u){var c=this;if(u.status===i.ADDED&&u.accepted===!0){if(u.status=i.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(u){var c=this;if(this.options.createImageThumbnails&&u.type.match(/image.*/)&&u.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(u),setTimeout(function(){return c._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var u=this;if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;var c=this._thumbnailQueue.shift();return this.createThumbnail(c,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(d){return u.emit("thumbnail",c,d),u._processingThumbnail=!1,u._processThumbnailQueue()})}},{key:"removeFile",value:function(u){if(u.status===i.UPLOADING&&this.cancelUpload(u),this.files=Vy(this.files,u),this.emit("removedfile",u),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(u){u==null&&(u=!1);var c=Ge(this.files.slice()),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;(h.status!==i.UPLOADING||u)&&this.removeFile(h)}}catch(p){c.e(p)}finally{c.f()}return null}},{key:"resizeImage",value:function(u,c,d,h,p){var g=this;return this.createThumbnail(u,c,d,h,!0,function(y,m){if(m==null)return p(u);var b=g.options.resizeMimeType;b==null&&(b=u.type);var w=m.toDataURL(b,g.options.resizeQuality);return(b==="image/jpeg"||b==="image/jpg")&&(w=qh.restore(u.dataURL,w)),p(i.dataURItoBlob(w))})}},{key:"createThumbnail",value:function(u,c,d,h,p,g){var y=this,m=new FileReader;m.onload=function(){if(u.dataURL=m.result,u.type==="image/svg+xml"){g!=null&&g(m.result);return}y.createThumbnailFromUrl(u,c,d,h,p,g)},m.readAsDataURL(u)}},{key:"displayExistingFile",value:function(u,c,d,h){var p=this,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",u),this.emit("complete",u),!g)this.emit("thumbnail",u,c),d&&d();else{var y=function(b){p.emit("thumbnail",u,b),d&&d()};u.dataURL=c,this.createThumbnailFromUrl(u,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.resizeMethod,this.options.fixOrientation,y,h)}}},{key:"createThumbnailFromUrl",value:function(u,c,d,h,p,g,y){var m=this,b=document.createElement("img");return y&&(b.crossOrigin=y),p=getComputedStyle(document.body).imageOrientation=="from-image"?!1:p,b.onload=function(){var w=function(E){return E(1)};return typeof EXIF!="undefined"&&EXIF!==null&&p&&(w=function(E){return EXIF.getData(b,function(){return E(EXIF.getTag(this,"Orientation"))})}),w(function(D){u.width=b.width,u.height=b.height;var E=m.options.resize.call(m,u,c,d,h),S=document.createElement("canvas"),z=S.getContext("2d");S.width=E.trgWidth,S.height=E.trgHeight,D>4&&(S.width=E.trgHeight,S.height=E.trgWidth);switch(D){case 2:z.translate(S.width,0),z.scale(-1,1);break;case 3:z.translate(S.width,S.height),z.rotate(Math.PI);break;case 4:z.translate(0,S.height),z.scale(1,-1);break;case 5:z.rotate(.5*Math.PI),z.scale(1,-1);break;case 6:z.rotate(.5*Math.PI),z.translate(0,-S.width);break;case 7:z.rotate(.5*Math.PI),z.translate(S.height,-S.width),z.scale(-1,1);break;case 8:z.rotate(-.5*Math.PI),z.translate(-S.height,0);break}Yy(z,b,E.srcX!=null?E.srcX:0,E.srcY!=null?E.srcY:0,E.srcWidth,E.srcHeight,E.trgX!=null?E.trgX:0,E.trgY!=null?E.trgY:0,E.trgWidth,E.trgHeight);var A=S.toDataURL("image/png");if(g!=null)return g(A,S)})},g!=null&&(b.onerror=g),b.src=u.dataURL}},{key:"processQueue",value:function(){var u=this.options.parallelUploads,c=this.getUploadingFiles().length,d=c;if(c>=u)return;var h=this.getQueuedFiles();if(!(h.length>0))return;if(this.options.uploadMultiple)return this.processFiles(h.slice(0,u-c));for(;d1?c-1:0),h=1;hc.options.chunkSize),u[0].upload.totalChunkCount=Math.ceil(h.size/c.options.chunkSize)}if(u[0].upload.chunked){var p=u[0],g=d[0],y=0;p.upload.chunks=[];var m=function(){for(var S=0;p.upload.chunks[S]!==void 0;)S++;if(S>=p.upload.totalChunkCount)return;y++;var z=S*c.options.chunkSize,A=Math.min(z+c.options.chunkSize,g.size),R={name:c._getParamName(0),data:g.webkitSlice?g.webkitSlice(z,A):g.slice(z,A),filename:p.upload.filename,chunkIndex:S};p.upload.chunks[S]={file:p,index:S,dataBlock:R,status:i.UPLOADING,progress:0,retries:0},c._uploadData(u,[R])};if(p.upload.finishedChunkUpload=function(E){var S=!0;E.status=i.SUCCESS,E.dataBlock=null,E.xhr=null;for(var z=0;z=d;h?c++:c--)u[c]=n.charCodeAt(c);return new Blob([s],{type:i})};var Vy=function(n,i){return n.filter(function(s){return s!==i}).map(function(s){return s})},Qy=function(n){return n.replace(/[\-_](\w)/g,function(i){return i.charAt(1).toUpperCase()})};Ue.createElement=function(t){var n=document.createElement("div");return n.innerHTML=t,n.childNodes[0]};Ue.elementInside=function(t,n){if(t===n)return!0;for(;t=t.parentNode;)if(t===n)return!0;return!1};Ue.getElement=function(t,n){var i;if(typeof t=="string"?i=document.querySelector(t):t.nodeType!=null&&(i=t),i==null)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector or a plain HTML element."));return i};Ue.getElements=function(t,n){var i,s;if(t instanceof Array){s=[];try{var u=Ge(t),c;try{for(u.s();!(c=u.n()).done;)i=c.value,s.push(this.getElement(i,n))}catch(p){u.e(p)}finally{u.f()}}catch(p){s=null}}else if(typeof t=="string"){s=[];var d=Ge(document.querySelectorAll(t)),h;try{for(d.s();!(h=d.n()).done;)i=h.value,s.push(i)}catch(p){d.e(p)}finally{d.f()}}else t.nodeType!=null&&(s=[t]);if(s==null||!s.length)throw new Error("Invalid `".concat(n,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return s};Ue.confirm=function(t,n,i){if(window.confirm(t))return n();if(i!=null)return i()};Ue.isValidFile=function(t,n){if(!n)return!0;n=n.split(",");var i=t.type,s=i.replace(/\/.*$/,""),u=Ge(n),c;try{for(u.s();!(c=u.n()).done;){var d=c.value;if(d=d.trim(),d.charAt(0)==="."){if(t.name.toLowerCase().indexOf(d.toLowerCase(),t.name.length-d.length)!==-1)return!0}else if(/\/\*$/.test(d)){if(s===d.replace(/\/.*$/,""))return!0}else if(i===d)return!0}}catch(h){u.e(h)}finally{u.f()}return!1};typeof jQuery!="undefined"&&jQuery!==null&&(jQuery.fn.dropzone=function(t){return this.each(function(){return new Ue(this,t)})});typeof na!="undefined"&&na!==null?na.exports=Ue:window.Dropzone=Ue;Ue.ADDED="added";Ue.QUEUED="queued";Ue.ACCEPTED=Ue.QUEUED;Ue.UPLOADING="uploading";Ue.PROCESSING=Ue.UPLOADING;Ue.CANCELED="canceled";Ue.ERROR="error";Ue.SUCCESS="success";var Jy=function(n){var i=n.naturalWidth,s=n.naturalHeight,u=document.createElement("canvas");u.width=1,u.height=s;var c=u.getContext("2d");c.drawImage(n,0,0);for(var d=c.getImageData(1,0,1,s),h=d.data,p=0,g=s,y=s;y>p;){var m=h[(y-1)*4+3];m===0?g=y:p=y,y=g+p>>1}var b=y/s;return b===0?1:b},Yy=function(n,i,s,u,c,d,h,p,g,y){var m=Jy(i);return n.drawImage(i,s,u,c,d,h,p,g,y/m)},qh=function(){function t(){Js(this,t)}return oa(t,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(i){for(var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0;!(u=i[m++],c=i[m++],d=i[m++],h=u>>2,p=(u&3)<<4|c>>4,g=(c&15)<<2|d>>6,y=d&63,isNaN(c)?g=y=64:isNaN(d)&&(y=64),s=s+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(p)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(y),u=c=d="",h=p=g=y="",!(mi.length)break}return u}},{key:"decode64",value:function(i){var s="",u=void 0,c=void 0,d="",h=void 0,p=void 0,g=void 0,y="",m=0,b=[],w=/[^A-Za-z0-9\+\/\=]/g;for(w.exec(i)&&console.warn(`There were invalid base64 characters in the input text. Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '=' -Expect errors in decoding.`),i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(h=this.KEY_STR.indexOf(i.charAt(m++)),p=this.KEY_STR.indexOf(i.charAt(m++)),g=this.KEY_STR.indexOf(i.charAt(m++)),y=this.KEY_STR.indexOf(i.charAt(m++)),u=h<<2|p>>4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,b.push(u),g!==64&&b.push(c),y!==64&&b.push(d),u=c=d="",h=p=g=y="",!(m{class Qy{constructor(t){this.elem=t,this.toggleButton=t.querySelector(".mobile-menu-toggle"),this.menu=t.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(t){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),t.stopPropagation()}onWindowClick(t){this.onToggle(t)}}Mh.exports=Qy});var Ph=le((s_,zh)=>{zh.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` -`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var el=le((l_,Rh)=>{"use strict";Rh.exports=Ph()});var aa=le((u_,Oh)=>{Oh.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 jh=le((c_,Nh)=>{"use strict";var Bh={};function Jy(t){var n,i,s=Bh[t];if(s)return s;for(s=Bh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),/^[0-9a-z]$/i.test(i)?s.push(i):s.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&c<=57343){if(c>=55296&&c<=56319&&s+1=56320&&d<=57343)){p+=encodeURIComponent(t[s]+t[s+1]),s++;continue}p+="%EF%BF%BD";continue}p+=encodeURIComponent(t[s])}return p}sa.defaultChars=";/?:@&=+$,-_.!~*'()#";sa.componentChars="-_.!~*'()";Nh.exports=sa});var Wh=le((d_,Hh)=>{"use strict";var Uh={};function ew(t){var n,i,s=Uh[t];if(s)return s;for(s=Uh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),s.push(i);for(n=0;n=55296&&y<=57343?m+="���":m+=String.fromCharCode(y),u+=6;continue}if((d&248)===240&&u+91114111?m+="����":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),u+=9;continue}m+="�"}return m})}la.defaultChars=";/?:@&=+$,#";la.componentChars="";Hh.exports=la});var Gh=le((h_,$h)=>{"use strict";$h.exports=function(n){var i="";return i+=n.protocol||"",i+=n.slashes?"//":"",i+=n.auth?n.auth+"@":"",n.hostname&&n.hostname.indexOf(":")!==-1?i+="["+n.hostname+"]":i+=n.hostname||"",i+=n.port?":"+n.port:"",i+=n.pathname||"",i+=n.search||"",i+=n.hash||"",i}});var Jh=le((f_,Kh)=>{"use strict";function ua(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var tw=/^([a-z0-9.+-]+:)/i,nw=/:[0-9]*$/,rw=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,iw=["<",">",'"',"`"," ","\r",` -`," "],ow=["{","}","|","\\","^","`"].concat(iw),aw=["'"].concat(ow),Vh=["%","/","?",";","#"].concat(aw),Yh=["/","?","#"],sw=255,Xh=/^[+a-z0-9A-Z_-]{0,63}$/,lw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Zh={javascript:!0,"javascript:":!0},Qh={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function uw(t,n){if(t&&t instanceof ua)return t;var i=new ua;return i.parse(t,n),i}ua.prototype.parse=function(t,n){var i,s,u,c,d,h=t;if(h=h.trim(),!n&&t.split("#").length===1){var p=rw.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=tw.exec(h);if(g&&(g=g[0],u=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(n||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&Zh[g])&&(h=h.substr(2),this.slashes=!0)),!Zh[g]&&(d||g&&!Qh[g])){var y=-1;for(i=0;i127?z+="x":z+=S[A];if(!z.match(Xh)){var U=E.slice(0,i),Y=E.slice(i+1),B=S.match(lw);B&&(U.push(B[1]),Y.unshift(B[2])),Y.length&&(h=Y.join(".")+h),this.hostname=U.join(".");break}}}}this.hostname.length>sw&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var G=h.indexOf("#");G!==-1&&(this.hash=h.substr(G),h=h.slice(0,G));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),Qh[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(t){var n=nw.exec(t);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};Kh.exports=uw});var tl=le((p_,Xi)=>{"use strict";Xi.exports.encode=jh();Xi.exports.decode=Wh();Xi.exports.format=Gh();Xi.exports.parse=Jh()});var nl=le((m_,ef)=>{ef.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=le((g_,tf)=>{tf.exports=/[\0-\x1F\x7F-\x9F]/});var rf=le((v_,nf)=>{nf.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var il=le((b_,of)=>{of.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var af=le(ti=>{"use strict";ti.Any=nl();ti.Cc=rl();ti.Cf=rf();ti.P=aa();ti.Z=il()});var Je=le(qt=>{"use strict";function cw(t){return Object.prototype.toString.call(t)}function dw(t){return cw(t)==="[object String]"}var hw=Object.prototype.hasOwnProperty;function sf(t,n){return hw.call(t,n)}function fw(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function pw(t,n,i){return[].concat(t.slice(0,n),i,t.slice(n+1))}function lf(t){return t>=55296&&t<=57343||(t>=64976&&t<=65007||((t&65535)===65535||(t&65535)===65534||(t>=0&&t<=8||(t===11||(t>=14&&t<=31||t>=127&&t<=159)))))?!1:!(t>1114111)}function uf(t){if(t>65535){t-=65536;var n=55296+(t>>10),i=56320+(t&1023);return String.fromCharCode(n,i)}return String.fromCharCode(t)}var cf=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,mw=/&([a-z#][a-z0-9]{1,31});/gi,gw=new RegExp(cf.source+"|"+mw.source,"gi"),vw=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,df=el();function bw(t,n){var i=0;return sf(df,n)?df[n]:n.charCodeAt(0)===35&&vw.test(n)&&(i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10),lf(i))?uf(i):t}function yw(t){return t.indexOf("\\")<0?t:t.replace(cf,"$1")}function ww(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(gw,function(n,i,s){return i||bw(n,s)})}var kw=/[&<>"]/,xw=/[&<>"]/g,_w={"&":"&","<":"<",">":">",'"':"""};function Cw(t){return _w[t]}function Sw(t){return kw.test(t)?t.replace(xw,Cw):t}var Ew=/[.?*+^$[\]\\(){}|-]/g;function Dw(t){return t.replace(Ew,"\\$&")}function Aw(t){switch(t){case 9:case 32:return!0}return!1}function Tw(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var Lw=aa();function Iw(t){return Lw.test(t)}function Fw(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Mw(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}qt.lib={};qt.lib.mdurl=tl();qt.lib.ucmicro=af();qt.assign=fw;qt.isString=dw;qt.has=sf;qt.unescapeMd=yw;qt.unescapeAll=ww;qt.isValidEntityCode=lf;qt.fromCodePoint=uf;qt.escapeHtml=Sw;qt.arrayReplaceAt=pw;qt.isSpace=Aw;qt.isWhiteSpace=Tw;qt.isMdAsciiPunct=Fw;qt.isPunctChar=Iw;qt.escapeRE=Dw;qt.normalizeReference=Mw});var ff=le((k_,hf)=>{"use strict";hf.exports=function(n,i,s){var u,c,d,h,p=-1,g=n.posMax,y=n.pos;for(n.pos=i+1,u=1;n.pos{"use strict";var mf=Je().unescapeAll;pf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(n.charCodeAt(i)===60){for(i++;i{"use strict";var qw=Je().unescapeAll;vf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(i>=s)return p;if(c=n.charCodeAt(i),c!==34&&c!==39&&c!==40)return p;for(i++,c===40&&(c=41);i{"use strict";ca.parseLinkLabel=ff();ca.parseLinkDestination=gf();ca.parseLinkTitle=bf()});var kf=le((S_,wf)=>{"use strict";var zw=Je().assign,Pw=Je().unescapeAll,Cr=Je().escapeHtml,zn={};zn.code_inline=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+""};zn.code_block=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+` -`};zn.fence=function(t,n,i,s,u){var c=t[n],d=c.info?Pw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Cr(c.content):p=Cr(c.content),p.indexOf(">4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,b.push(u),g!==64&&b.push(c),y!==64&&b.push(d),u=c=d="",h=p=g=y="",!(m{class tw{constructor(t){this.elem=t,this.toggleButton=t.querySelector(".mobile-menu-toggle"),this.menu=t.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(t){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),t.stopPropagation()}onWindowClick(t){this.onToggle(t)}}Oh.exports=tw});var Nh=ue((c_,Ph)=>{Ph.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}});var el=ue((d_,Bh)=>{"use strict";Bh.exports=Nh()});var aa=ue((h_,jh)=>{jh.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/});var Wh=ue((f_,Hh)=>{"use strict";var Uh={};function nw(t){var n,i,s=Uh[t];if(s)return s;for(s=Uh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),/^[0-9a-z]$/i.test(i)?s.push(i):s.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n=55296&&c<=57343){if(c>=55296&&c<=56319&&s+1=56320&&d<=57343)){p+=encodeURIComponent(t[s]+t[s+1]),s++;continue}p+="%EF%BF%BD";continue}p+=encodeURIComponent(t[s])}return p}sa.defaultChars=";/?:@&=+$,-_.!~*'()#";sa.componentChars="-_.!~*'()";Hh.exports=sa});var Kh=ue((p_,$h)=>{"use strict";var Gh={};function rw(t){var n,i,s=Gh[t];if(s)return s;for(s=Gh[t]=[],n=0;n<128;n++)i=String.fromCharCode(n),s.push(i);for(n=0;n=55296&&y<=57343?m+="���":m+=String.fromCharCode(y),u+=6;continue}if((d&248)===240&&u+91114111?m+="����":(y-=65536,m+=String.fromCharCode(55296+(y>>10),56320+(y&1023))),u+=9;continue}m+="�"}return m})}la.defaultChars=";/?:@&=+$,#";la.componentChars="";$h.exports=la});var Yh=ue((m_,Vh)=>{"use strict";Vh.exports=function(n){var i="";return i+=n.protocol||"",i+=n.slashes?"//":"",i+=n.auth?n.auth+"@":"",n.hostname&&n.hostname.indexOf(":")!==-1?i+="["+n.hostname+"]":i+=n.hostname||"",i+=n.port?":"+n.port:"",i+=n.pathname||"",i+=n.search||"",i+=n.hash||"",i}});var nf=ue((g_,Xh)=>{"use strict";function ua(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var iw=/^([a-z0-9.+-]+:)/i,ow=/:[0-9]*$/,aw=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,sw=["<",">",'"',"`"," ","\r",` +`," "],lw=["{","}","|","\\","^","`"].concat(sw),uw=["'"].concat(lw),Zh=["%","/","?",";","#"].concat(uw),Qh=["/","?","#"],cw=255,Jh=/^[+a-z0-9A-Z_-]{0,63}$/,dw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ef={javascript:!0,"javascript:":!0},tf={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function hw(t,n){if(t&&t instanceof ua)return t;var i=new ua;return i.parse(t,n),i}ua.prototype.parse=function(t,n){var i,s,u,c,d,h=t;if(h=h.trim(),!n&&t.split("#").length===1){var p=aw.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=iw.exec(h);if(g&&(g=g[0],u=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(n||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&ef[g])&&(h=h.substr(2),this.slashes=!0)),!ef[g]&&(d||g&&!tf[g])){var y=-1;for(i=0;i127?z+="x":z+=S[A];if(!z.match(Jh)){var U=E.slice(0,i),Y=E.slice(i+1),B=S.match(dw);B&&(U.push(B[1]),Y.unshift(B[2])),Y.length&&(h=Y.join(".")+h),this.hostname=U.join(".");break}}}}this.hostname.length>cw&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var G=h.indexOf("#");G!==-1&&(this.hash=h.substr(G),h=h.slice(0,G));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),tf[u]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(t){var n=ow.exec(t);n&&(n=n[0],n!==":"&&(this.port=n.substr(1)),t=t.substr(0,t.length-n.length)),t&&(this.hostname=t)};Xh.exports=hw});var tl=ue((v_,Xi)=>{"use strict";Xi.exports.encode=Wh();Xi.exports.decode=Kh();Xi.exports.format=Yh();Xi.exports.parse=nf()});var nl=ue((b_,rf)=>{rf.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=ue((y_,of)=>{of.exports=/[\0-\x1F\x7F-\x9F]/});var sf=ue((w_,af)=>{af.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/});var il=ue((k_,lf)=>{lf.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var uf=ue(ti=>{"use strict";ti.Any=nl();ti.Cc=rl();ti.Cf=sf();ti.P=aa();ti.Z=il()});var et=ue(qt=>{"use strict";function fw(t){return Object.prototype.toString.call(t)}function pw(t){return fw(t)==="[object String]"}var mw=Object.prototype.hasOwnProperty;function cf(t,n){return mw.call(t,n)}function gw(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function vw(t,n,i){return[].concat(t.slice(0,n),i,t.slice(n+1))}function df(t){return t>=55296&&t<=57343||(t>=64976&&t<=65007||((t&65535)===65535||(t&65535)===65534||(t>=0&&t<=8||(t===11||(t>=14&&t<=31||t>=127&&t<=159)))))?!1:!(t>1114111)}function hf(t){if(t>65535){t-=65536;var n=55296+(t>>10),i=56320+(t&1023);return String.fromCharCode(n,i)}return String.fromCharCode(t)}var ff=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,bw=/&([a-z#][a-z0-9]{1,31});/gi,yw=new RegExp(ff.source+"|"+bw.source,"gi"),ww=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,pf=el();function kw(t,n){var i=0;return cf(pf,n)?pf[n]:n.charCodeAt(0)===35&&ww.test(n)&&(i=n[1].toLowerCase()==="x"?parseInt(n.slice(2),16):parseInt(n.slice(1),10),df(i))?hf(i):t}function xw(t){return t.indexOf("\\")<0?t:t.replace(ff,"$1")}function _w(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(yw,function(n,i,s){return i||kw(n,s)})}var Cw=/[&<>"]/,Sw=/[&<>"]/g,Ew={"&":"&","<":"<",">":">",'"':"""};function Dw(t){return Ew[t]}function Aw(t){return Cw.test(t)?t.replace(Sw,Dw):t}var Tw=/[.?*+^$[\]\\(){}|-]/g;function Lw(t){return t.replace(Tw,"\\$&")}function Iw(t){switch(t){case 9:case 32:return!0}return!1}function Fw(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var Mw=aa();function qw(t){return Mw.test(t)}function zw(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Ow(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}qt.lib={};qt.lib.mdurl=tl();qt.lib.ucmicro=uf();qt.assign=gw;qt.isString=pw;qt.has=cf;qt.unescapeMd=xw;qt.unescapeAll=_w;qt.isValidEntityCode=df;qt.fromCodePoint=hf;qt.escapeHtml=Aw;qt.arrayReplaceAt=vw;qt.isSpace=Iw;qt.isWhiteSpace=Fw;qt.isMdAsciiPunct=zw;qt.isPunctChar=qw;qt.escapeRE=Lw;qt.normalizeReference=Ow});var gf=ue((C_,mf)=>{"use strict";mf.exports=function(n,i,s){var u,c,d,h,p=-1,g=n.posMax,y=n.pos;for(n.pos=i+1,u=1;n.pos{"use strict";var bf=et().unescapeAll;vf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(n.charCodeAt(i)===60){for(i++;i{"use strict";var Rw=et().unescapeAll;wf.exports=function(n,i,s){var u,c,d=0,h=i,p={ok:!1,pos:0,lines:0,str:""};if(i>=s)return p;if(c=n.charCodeAt(i),c!==34&&c!==39&&c!==40)return p;for(i++,c===40&&(c=41);i{"use strict";ca.parseLinkLabel=gf();ca.parseLinkDestination=yf();ca.parseLinkTitle=kf()});var Cf=ue((A_,_f)=>{"use strict";var Pw=et().assign,Nw=et().unescapeAll,Cr=et().escapeHtml,zn={};zn.code_inline=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+""};zn.code_block=function(t,n,i,s,u){var c=t[n];return""+Cr(t[n].content)+` +`};zn.fence=function(t,n,i,s,u){var c=t[n],d=c.info?Nw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Cr(c.content):p=Cr(c.content),p.indexOf(""+p+` `):"
"+p+`
`};zn.image=function(t,n,i,s,u){var c=t[n];return c.attrs[c.attrIndex("alt")][1]=u.renderInlineAsText(c.children,i,s),u.renderToken(t,n,i)};zn.hardbreak=function(t,n,i){return i.xhtmlOut?`
@@ -61,22 +61,22 @@ Expect errors in decoding.`),i=i.replace(/[^A-Za-z0-9\+\/\=]/g,"");!(h=this.KEY_ `};zn.softbreak=function(t,n,i){return i.breaks?i.xhtmlOut?`
`:`
`:` -`};zn.text=function(t,n){return Cr(t[n].content)};zn.html_block=function(t,n){return t[n].content};zn.html_inline=function(t,n){return t[n].content};function ni(){this.rules=zw({},zn)}ni.prototype.renderAttrs=function(n){var i,s,u;if(!n.attrs)return"";for(u="",i=0,s=n.attrs.length;i -`:">",c)};ni.prototype.renderInline=function(t,n,i){for(var s,u="",c=this.rules,d=0,h=t.length;d{"use strict";function xn(){this.__rules__=[],this.__cache__=null}xn.prototype.__find__=function(t){for(var n=0;n{"use strict";var Rw=/\r\n?|\n/g,Ow=/\0/g;_f.exports=function(n){var i;i=n.src.replace(Rw,` -`),i=i.replace(Ow,"�"),n.src=i}});var Ef=le((A_,Sf)=>{"use strict";Sf.exports=function(n){var i;n.inlineMode?(i=new n.Token("inline","",0),i.content=n.src,i.map=[0,1],i.children=[],n.tokens.push(i)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}});var Af=le((T_,Df)=>{"use strict";Df.exports=function(n){var i=n.tokens,s,u,c;for(u=0,c=i.length;u{"use strict";var Nw=Je().arrayReplaceAt;function Bw(t){return/^\s]/i.test(t)}function jw(t){return/^<\/a\s*>/i.test(t)}Tf.exports=function(n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A=n.tokens,R;if(!n.md.options.linkify)return;for(s=0,u=A.length;s=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Bw(h.content)&&D>0&&D--,jw(h.content)&&D++),D>0)continue;if(h.type==="text"&&n.md.linkify.test(h.content)){for(y=h.content,R=n.md.linkify.match(y),p=[],w=h.level,b=0,g=0;gb&&(d=new n.Token("text","",0),d.content=y.slice(b,m),d.level=w,p.push(d)),d=new n.Token("link_open","a",1),d.attrs=[["href",S]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new n.Token("text","",0),d.content=z,d.level=w,p.push(d),d=new n.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),b=R[g].lastIndex}b{"use strict";var Ff=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Hw=/\((c|tm|r|p)\)/i,Uw=/\((c|tm|r|p)\)/ig,Ww={c:"©",r:"®",p:"§",tm:"™"};function $w(t,n){return Ww[n.toLowerCase()]}function Gw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(i.content=i.content.replace(Uw,$w)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Kw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(Ff.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–"))),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}If.exports=function(n){var i;if(!n.md.options.typographer)return;for(i=n.tokens.length-1;i>=0;i--){if(n.tokens[i].type!=="inline")continue;Hw.test(n.tokens[i].content)&&Gw(n.tokens[i].children),Ff.test(n.tokens[i].content)&&Kw(n.tokens[i].children)}}});var Bf=le((F_,qf)=>{"use strict";var zf=Je().isWhiteSpace,Pf=Je().isPunctChar,Rf=Je().isMdAsciiPunct,Vw=/['"]/,Of=/['"]/g,Nf="’";function ha(t,n,i){return t.substr(0,n)+i+t.substr(n+1)}function Yw(t,n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B;for(U=[],i=0;i=0&&!(U[A].level<=p);A--);if(U.length=A+1,s.type!=="text")continue;u=s.content,d=0,h=u.length;e:for(;d=0)y=u.charCodeAt(c.index-1);else for(A=i-1;A>=0&&!(t[A].type==="softbreak"||t[A].type==="hardbreak");A--){if(!t[A].content)continue;y=t[A].content.charCodeAt(t[A].content.length-1);break}if(m=32,d=48&&y<=57&&(z=S=!1)),S&&z&&(S=b,z=w),!S&&!z){R&&(s.content=ha(s.content,c.index,Nf));continue}if(z){for(A=U.length-1;A>=0&&!(g=U[A],U[A].level=0;i--){if(n.tokens[i].type!=="inline"||!Vw.test(n.tokens[i].content))continue;Yw(n.tokens[i].children,n)}}});var fa=le((M_,jf)=>{"use strict";function ri(t,n,i){this.type=t,this.tag=n,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ri.prototype.attrIndex=function(n){var i,s,u;if(!this.attrs)return-1;for(i=this.attrs,s=0,u=i.length;s=0&&(s=this.attrs[i][1]),s};ri.prototype.attrJoin=function(n,i){var s=this.attrIndex(n);s<0?this.attrPush([n,i]):this.attrs[s][1]=this.attrs[s][1]+" "+i};jf.exports=ri});var Wf=le((q_,Hf)=>{"use strict";var Xw=fa();function Uf(t,n,i){this.src=t,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=n}Uf.prototype.Token=Xw;Hf.exports=Uf});var Gf=le((z_,$f)=>{"use strict";var Zw=da(),ol=[["normalize",Cf()],["block",Ef()],["inline",Af()],["linkify",Lf()],["replacements",Mf()],["smartquotes",Bf()]];function al(){this.ruler=new Zw;for(var t=0;t{"use strict";var Qw=Je().isSpace;function sl(t,n){var i=t.bMarks[n]+t.blkIndent,s=t.eMarks[n];return t.src.substr(i,s-i)}function Vf(t){var n=[],i=0,s=t.length,u,c=0,d=0,h=!1,p=0;for(u=t.charCodeAt(i);is)return!1;if(g=i+1,n.sCount[g]=4)return!1;if(h=n.bMarks[g]+n.tShift[g],h>=n.eMarks[g])return!1;if(c=n.src.charCodeAt(h++),c!==124&&c!==45&&c!==58)return!1;for(;h=4)return!1;if(y=Vf(d.replace(/^\||\|$/g,"")),m=y.length,m>w.length)return!1;if(u)return!0;for(b=n.push("table_open","table",1),b.map=E=[i,0],b=n.push("thead_open","thead",1),b.map=[i,i+1],b=n.push("tr_open","tr",1),b.map=[i,i+1],p=0;p=4)break;for(y=Vf(d.replace(/^\||\|$/g,"")),b=n.push("tr_open","tr",1),p=0;p{"use strict";Xf.exports=function(n,i,s){var u,c,d;if(n.sCount[i]-n.blkIndent<4)return!1;for(c=u=i+1;u=4){u++,c=u;continue}break}return n.line=c,d=n.push("code_block","code",0),d.content=n.getLines(i,c,4+n.blkIndent,!0),d.map=[i,n.line],!0}});var Jf=le((O_,Qf)=>{"use strict";Qf.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b=!1,w=n.bMarks[i]+n.tShift[i],D=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(w+3>D)return!1;if(c=n.src.charCodeAt(w),c!==126&&c!==96)return!1;if(g=w,w=n.skipChars(w,c),d=w-g,d<3)return!1;if(m=n.src.slice(g,w),h=n.src.slice(w,D),c===96&&h.indexOf(String.fromCharCode(c))>=0)return!1;if(u)return!0;for(p=i;!(p++,p>=s);){if(w=g=n.bMarks[p]+n.tShift[p],D=n.eMarks[p],w=4)continue;if(w=n.skipChars(w,c),w-g{"use strict";var tp=Je().isSpace;ep.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B,G,ee,J=n.lineMax,P=n.bMarks[i]+n.tShift[i],Z=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(P++)!==62)return!1;if(u)return!0;for(p=w=n.sCount[i]+1,n.src.charCodeAt(P)===32?(P++,p++,w++,c=!1,U=!0):n.src.charCodeAt(P)===9?(U=!0,(n.bsCount[i]+w)%4===3?(P++,p++,w++,c=!1):c=!0):U=!1,D=[n.bMarks[i]],n.bMarks[i]=P;P=Z,A=[n.sCount[i]],n.sCount[i]=w-p,R=[n.tShift[i]],n.tShift[i]=P-n.bMarks[i],B=n.md.block.ruler.getRules("blockquote"),z=n.parentType,n.parentType="blockquote",b=i+1;b=Z);b++){if(n.src.charCodeAt(P++)===62&&!ee){for(p=w=n.sCount[b]+1,n.src.charCodeAt(P)===32?(P++,p++,w++,c=!1,U=!0):n.src.charCodeAt(P)===9?(U=!0,(n.bsCount[b]+w)%4===3?(P++,p++,w++,c=!1):c=!0):U=!1,D.push(n.bMarks[b]),n.bMarks[b]=P;P=Z,E.push(n.bsCount[b]),n.bsCount[b]=n.sCount[b]+1+(U?1:0),A.push(n.sCount[b]),n.sCount[b]=w-p,R.push(n.tShift[b]),n.tShift[b]=P-n.bMarks[b];continue}if(y)break;for(Y=!1,h=0,g=B.length;h",G.map=m=[i,0],n.md.block.tokenize(n,i,b),G=n.push("blockquote_close","blockquote",-1),G.markup=">",n.lineMax=J,n.parentType=z,m[1]=n.line,h=0;h{"use strict";var Jw=Je().isSpace;rp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g++),c!==42&&c!==45&&c!==95)return!1;for(d=1;g{"use strict";var ap=Je().isSpace;function sp(t,n){var i,s,u,c;return s=t.bMarks[n]+t.tShift[n],u=t.eMarks[n],i=t.src.charCodeAt(s++),i!==42&&i!==45&&i!==43||s=c)return-1;if(i=t.src.charCodeAt(u++),i<48||i>57)return-1;for(;;){if(u>=c)return-1;if(i=t.src.charCodeAt(u++),i>=48&&i<=57){if(u-s>=10)return-1;continue}if(i===41||i===46)break;return-1}return u=4)return!1;if(n.listIndent>=0&&n.sCount[i]-n.listIndent>=4&&n.sCount[i]=n.blkIndent&&(I=!0)),(Z=lp(n,i))>=0){if(m=!0,V=n.bMarks[i]+n.tShift[i],z=Number(n.src.substr(V,Z-V-1)),I&&z!==1)return!1}else if((Z=sp(n,i))>=0)m=!1;else return!1;if(I&&n.skipSpaces(Z)>=n.eMarks[i])return!1;if(S=n.src.charCodeAt(Z-1),u)return!0;for(E=n.tokens.length,m?(q=n.push("ordered_list_open","ol",1),z!==1&&(q.attrs=[["start",z]])):q=n.push("bullet_list_open","ul",1),q.map=D=[i,0],q.markup=String.fromCharCode(S),R=i,_=!1,Q=n.md.block.ruler.getRules("list"),B=n.parentType,n.parentType="list";R=A?g=1:g=U-y,g>4&&(g=1),p=y+g,q=n.push("list_item_open","li",1),q.markup=String.fromCharCode(S),q.map=b=[i,0],J=n.tight,ee=n.tShift[i],G=n.sCount[i],Y=n.listIndent,n.listIndent=n.blkIndent,n.blkIndent=p,n.tight=!0,n.tShift[i]=d-n.bMarks[i],n.sCount[i]=U,d>=A&&n.isEmpty(i+1)?n.line=Math.min(n.line+2,s):n.md.block.tokenize(n,i,s,!0),(!n.tight||_)&&(H=!1),_=n.line-i>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=Y,n.tShift[i]=ee,n.sCount[i]=G,n.tight=J,q=n.push("list_item_close","li",-1),q.markup=String.fromCharCode(S),R=i=n.line,b[1]=R,d=n.bMarks[i],R>=s)break;if(n.sCount[R]=4)break;for(j=!1,h=0,w=Q.length;h{"use strict";var tk=Je().normalizeReference,pa=Je().isSpace;cp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y=0,B=n.bMarks[i]+n.tShift[i],G=n.eMarks[i],ee=i+1;if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(B)!==91)return!1;for(;++B3)continue;if(n.sCount[ee]<0)continue;for(A=!1,y=0,m=R.length;y{"use strict";var fp=Je().isSpace;hp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g),c!==35||g>=y)return!1;for(d=1,c=n.src.charCodeAt(++g);c===35&&g6||gg&&fp(n.src.charCodeAt(h-1))&&(y=h),n.line=i+1,p=n.push("heading_open","h"+String(d),1),p.markup="########".slice(0,d),p.map=[i,n.line],p=n.push("inline","",0),p.content=n.src.slice(g,y).trim(),p.map=[i,n.line],p.children=[],p=n.push("heading_close","h"+String(d),-1),p.markup="########".slice(0,d)),!0)}});var gp=le((W_,mp)=>{"use strict";mp.exports=function(n,i,s){var u,c,d,h,p,g,y,m,b,w=i+1,D,E=n.md.block.ruler.getRules("paragraph");if(n.sCount[i]-n.blkIndent>=4)return!1;for(D=n.parentType,n.parentType="paragraph";w3)continue;if(n.sCount[w]>=n.blkIndent&&(g=n.bMarks[w]+n.tShift[w],y=n.eMarks[w],g=y)))){m=b===61?1:2;break}if(n.sCount[w]<0)continue;for(c=!1,d=0,h=E.length;d{"use strict";vp.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ul=le((G_,ll)=>{"use strict";var nk="[a-zA-Z_:][a-zA-Z0-9:._-]*",rk="[^\"'=<>`\\x00-\\x20]+",ik="'[^']*'",ok='"[^"]*"',ak="(?:"+rk+"|"+ik+"|"+ok+")",sk="(?:\\s+"+nk+"(?:\\s*=\\s*"+ak+")?)",yp="<[A-Za-z][A-Za-z0-9\\-]*"+sk+"*\\s*\\/?>",wp="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",lk="|",uk="<[?].*?[?]>",ck="]*>",dk="",hk=new RegExp("^(?:"+yp+"|"+wp+"|"+lk+"|"+uk+"|"+ck+"|"+dk+")"),fk=new RegExp("^(?:"+yp+"|"+wp+")");ll.exports.HTML_TAG_RE=hk;ll.exports.HTML_OPEN_CLOSE_TAG_RE=fk});var xp=le((K_,kp)=>{"use strict";var pk=bp(),mk=ul().HTML_OPEN_CLOSE_TAG_RE,ii=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(mk.source+"\\s*$"),/^$/,!1]];kp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(!n.md.options.html)return!1;if(n.src.charCodeAt(g)!==60)return!1;for(p=n.src.slice(g,y),c=0;c{"use strict";_p.exports=function(n,i){var s,u,c,d,h,p,g=i+1,y=n.md.block.ruler.getRules("paragraph"),m=n.lineMax;for(p=n.parentType,n.parentType="paragraph";g3)continue;if(n.sCount[g]<0)continue;for(u=!1,c=0,d=y.length;c{"use strict";var Ep=fa(),ma=Je().isSpace;function Pn(t,n,i,s){var u,c,d,h,p,g,y,m;for(this.src=t,this.md=n,this.env=i,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",c=this.src,m=!1,d=h=g=y=0,p=c.length;h0&&this.level++,this.tokens.push(s),s};Pn.prototype.isEmpty=function(n){return this.bMarks[n]+this.tShift[n]>=this.eMarks[n]};Pn.prototype.skipEmptyLines=function(n){for(var i=this.lineMax;ni;)if(!ma(this.src.charCodeAt(--n)))return n+1;return n};Pn.prototype.skipChars=function(n,i){for(var s=this.src.length;ns;)if(i!==this.src.charCodeAt(--n))return n+1;return n};Pn.prototype.getLines=function(n,i,s,u){var c,d,h,p,g,y,m,b=n;if(n>=i)return"";for(y=new Array(i-n),c=0;bs?y[c]=new Array(d-s+1).join(" ")+this.src.slice(p,g):y[c]=this.src.slice(p,g)}return y.join("")};Pn.prototype.Token=Ep;Sp.exports=Pn});var Tp=le((X_,Ap)=>{"use strict";var gk=da(),ga=[["table",Yf(),["paragraph","reference"]],["code",Zf()],["fence",Jf(),["paragraph","reference","blockquote","list"]],["blockquote",np(),["paragraph","reference","blockquote","list"]],["hr",ip(),["paragraph","reference","blockquote","list"]],["list",up(),["paragraph","reference","blockquote"]],["reference",dp()],["heading",pp(),["paragraph","reference","blockquote"]],["lheading",gp()],["html_block",xp(),["paragraph","reference","blockquote"]],["paragraph",Cp()]];function va(){this.ruler=new gk;for(var t=0;t=i);){if(t.sCount[h]=g){t.line=i;break}for(u=0;u{"use strict";function vk(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Lp.exports=function(n,i){for(var s=n.pos;s{"use strict";var bk=Je().isSpace;Fp.exports=function(n,i){var s,u,c=n.pos;if(n.src.charCodeAt(c)!==10)return!1;for(s=n.pending.length-1,u=n.posMax,i||(s>=0&&n.pending.charCodeAt(s)===32?s>=1&&n.pending.charCodeAt(s-1)===32?(n.pending=n.pending.replace(/ +$/,""),n.push("hardbreak","br",0)):(n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0)):n.push("softbreak","br",0)),c++;c{"use strict";var yk=Je().isSpace,cl=[];for(var zp=0;zp<256;zp++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){cl[t.charCodeAt(0)]=1});qp.exports=function(n,i){var s,u=n.pos,c=n.posMax;if(n.src.charCodeAt(u)!==92)return!1;if(u++,u{"use strict";Rp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos,y=n.src.charCodeAt(g);if(y!==96)return!1;for(s=g,g++,u=n.posMax;g{"use strict";dl.exports.tokenize=function(n,i){var s,u,c,d,h,p=n.pos,g=n.src.charCodeAt(p);if(i)return!1;if(g!==126)return!1;if(u=n.scanDelims(n.pos,!0),d=u.length,h=String.fromCharCode(g),d<2)return!1;for(d%2&&(c=n.push("text","",0),c.content=h,d--),s=0;s{"use strict";fl.exports.tokenize=function(n,i){var s,u,c,d=n.pos,h=n.src.charCodeAt(d);if(i)return!1;if(h!==95&&h!==42)return!1;for(u=n.scanDelims(n.pos,h===42),s=0;s=0;i--){if(s=n[i],s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;u=n[s.end],h=i>0&&n[i-1].end===s.end+1&&n[i-1].token===s.token-1&&n[s.end+1].token===u.token+1&&n[i-1].marker===s.marker,d=String.fromCharCode(s.marker),c=t.tokens[s.token],c.type=h?"strong_open":"em_open",c.tag=h?"strong":"em",c.nesting=1,c.markup=h?d+d:d,c.content="",c=t.tokens[u.token],c.type=h?"strong_close":"em_close",c.tag=h?"strong":"em",c.nesting=-1,c.markup=h?d+d:d,c.content="",h&&(t.tokens[n[i-1].token].content="",t.tokens[n[s.end+1].token].content="",i--)}}fl.exports.postProcess=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(Bp(n,n.delimiters),i=0;i{"use strict";var wk=Je().normalizeReference,ml=Je().isSpace;jp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w="",D=n.pos,E=n.posMax,S=n.pos,z=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;if(h=n.pos+1,d=n.md.helpers.parseLinkLabel(n,n.pos,!0),d<0)return!1;if(p=d+1,p=E)return!1;for(S=p,g=n.md.helpers.parseLinkDestination(n.src,p,n.posMax),g.ok&&(w=n.md.normalizeLink(g.str),n.md.validateLink(w)?p=g.pos:w=""),S=p;p=E||n.src.charCodeAt(p)!==41)&&(z=!0),p++}if(z){if(typeof n.env.references=="undefined")return!1;if(p=0?c=n.src.slice(S,p++):p=d+1):p=d+1,c||(c=n.src.slice(h,d)),y=n.env.references[wk(c)],!y)return n.pos=D,!1;w=y.href,m=y.title}return i||(n.pos=h,n.posMax=d,b=n.push("link_open","a",1),b.attrs=s=[["href",w]],m&&s.push(["title",m]),n.md.inline.tokenize(n),b=n.push("link_close","a",-1)),n.pos=p,n.posMax=E,!0}});var Wp=le((i2,Up)=>{"use strict";var kk=Je().normalizeReference,gl=Je().isSpace;Up.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w,D,E,S="",z=n.pos,A=n.posMax;if(n.src.charCodeAt(n.pos)!==33)return!1;if(n.src.charCodeAt(n.pos+1)!==91)return!1;if(p=n.pos+2,h=n.md.helpers.parseLinkLabel(n,n.pos+1,!1),h<0)return!1;if(g=h+1,g=A)return!1;for(E=g,m=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),m.ok&&(S=n.md.normalizeLink(m.str),n.md.validateLink(S)?g=m.pos:S=""),E=g;g=A||n.src.charCodeAt(g)!==41)return n.pos=z,!1;g++}else{if(typeof n.env.references=="undefined")return!1;if(g=0?d=n.src.slice(E,g++):g=h+1):g=h+1,d||(d=n.src.slice(p,h)),y=n.env.references[kk(d)],!y)return n.pos=z,!1;S=y.href,b=y.title}return i||(c=n.src.slice(p,h),n.md.inline.parse(c,n.md,n.env,D=[]),w=n.push("image","img",0),w.attrs=s=[["src",S],["alt",""]],w.children=D,w.content=c,b&&s.push(["title",b])),n.pos=g,n.posMax=A,!0}});var Vp=le((o2,$p)=>{"use strict";var Gp=/^<([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])?)*)>/,Kp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;$p.exports=function(n,i){var s,u,c,d,h,p,g=n.pos;return n.src.charCodeAt(g)!==60?!1:(s=n.src.slice(g),s.indexOf(">")<0?!1:Kp.test(s)?(u=s.match(Kp),d=u[0].slice(1,-1),h=n.md.normalizeLink(d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=u[0].length,!0):!1):Gp.test(s)?(c=s.match(Gp),d=c[0].slice(1,-1),h=n.md.normalizeLink("mailto:"+d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=c[0].length,!0):!1):!1)}});var Xp=le((a2,Yp)=>{"use strict";var xk=ul().HTML_TAG_RE;function _k(t){var n=t|32;return n>=97&&n<=122}Yp.exports=function(n,i){var s,u,c,d,h=n.pos;return n.md.options.html?(c=n.posMax,n.src.charCodeAt(h)!==60||h+2>=c?!1:(s=n.src.charCodeAt(h+1),s!==33&&s!==63&&s!==47&&!_k(s)?!1:(u=n.src.slice(h).match(xk),u?(i||(d=n.push("html_inline","",0),d.content=n.src.slice(h,h+u[0].length)),n.pos+=u[0].length,!0):!1))):!1}});var em=le((s2,Zp)=>{"use strict";var Qp=el(),Ck=Je().has,Sk=Je().isValidEntityCode,Jp=Je().fromCodePoint,Ek=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Dk=/^&([a-z][a-z0-9]{1,31});/i;Zp.exports=function(n,i){var s,u,c,d=n.pos,h=n.posMax;if(n.src.charCodeAt(d)!==38)return!1;if(d+1{"use strict";function nm(t,n){var i,s,u,c,d,h,p,g,y={},m=n.length;for(i=0;id;s-=c.jump+1){if(c=n[s],c.marker!==u.marker)continue;if(h===-1&&(h=s),c.open&&c.end<0&&(p=!1,(c.close||u.open)&&((c.length+u.length)%3===0&&((c.length%3!==0||u.length%3!==0)&&(p=!0))),!p)){g=s>0&&!n[s-1].open?n[s-1].jump+1:0,u.jump=i-s+g,u.open=!1,c.end=i,c.jump=g,c.close=!1,h=-1;break}}h!==-1&&(y[u.marker][(u.length||0)%3]=h)}}tm.exports=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(nm(n,n.delimiters),i=0;i{"use strict";im.exports=function(n){var i,s,u=0,c=n.tokens,d=n.tokens.length;for(i=s=0;i0&&u++,c[i].type==="text"&&i+1{"use strict";var vl=fa(),sm=Je().isWhiteSpace,lm=Je().isPunctChar,um=Je().isMdAsciiPunct;function Zi(t,n,i,s){this.src=t,this.env=i,this.md=n,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Zi.prototype.pushPending=function(){var t=new vl("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};Zi.prototype.push=function(t,n,i){this.pending&&this.pushPending();var s=new vl(t,n,i),u=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],u={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(u),s};Zi.prototype.scanDelims=function(t,n){var i=t,s,u,c,d,h,p,g,y,m,b=!0,w=!0,D=this.posMax,E=this.src.charCodeAt(t);for(s=t>0?this.src.charCodeAt(t-1):32;i{"use strict";var hm=da(),bl=[["text",Ip()],["newline",Mp()],["escape",Pp()],["backticks",Op()],["strikethrough",hl().tokenize],["emphasis",pl().tokenize],["link",Hp()],["image",Wp()],["autolink",Vp()],["html_inline",Xp()],["entity",em()]],yl=[["balance_pairs",rm()],["strikethrough",hl().postProcess],["emphasis",pl().postProcess],["text_collapse",om()]];function Qi(){var t;for(this.ruler=new hm,t=0;t=c)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Qi.prototype.parse=function(t,n,i,s){var u,c,d,h=new this.State(t,n,i,s);for(this.tokenize(h),c=this.ruler2.getRules(""),d=c.length,u=0;u{"use strict";pm.exports=function(t){var n={};n.src_Any=nl().source,n.src_Cc=rl().source,n.src_Z=il().source,n.src_P=aa().source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|");var i="[><|]";return n.src_pseudo_letter="(?:(?!"+i+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+i+"|"+n.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+n.src_ZCc+").|\\!+(?!"+n.src_ZCc+"|[!]).|\\?(?!"+n.src_ZCc+"|[?]).)+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n}});var km=le((f2,gm)=>{"use strict";function wl(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function ba(t){return Object.prototype.toString.call(t)}function Ak(t){return ba(t)==="[object String]"}function Tk(t){return ba(t)==="[object Object]"}function Lk(t){return ba(t)==="[object RegExp]"}function vm(t){return ba(t)==="[object Function]"}function Ik(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var bm={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Fk(t){return Object.keys(t||{}).reduce(function(n,i){return n||bm.hasOwnProperty(i)},!1)}var Mk={"http:":{validate:function(t,n,i){var s=t.slice(n);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(s)?s.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,n,i){var s=t.slice(n);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(s)?n>=3&&t[n-3]===":"||n>=3&&t[n-3]==="/"?0:s.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(t,n,i){var s=t.slice(n);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(s)?s.match(i.re.mailto)[0].length:0}}},qk="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]",zk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Pk(t){t.__index__=-1,t.__text_cache__=""}function Rk(t){return function(n,i){var s=n.slice(i);return t.test(s)?s.match(t)[0].length:0}}function ym(){return function(t,n){n.normalize(t)}}function ya(t){var n=t.re=mm()(t.__opts__),i=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||i.push(qk),i.push(n.src_xn),n.src_tlds=i.join("|");function s(h){return h.replace("%TLDS%",n.src_tlds)}n.email_fuzzy=RegExp(s(n.tpl_email_fuzzy),"i"),n.link_fuzzy=RegExp(s(n.tpl_link_fuzzy),"i"),n.link_no_ip_fuzzy=RegExp(s(n.tpl_link_no_ip_fuzzy),"i"),n.host_fuzzy_test=RegExp(s(n.tpl_host_fuzzy_test),"i");var u=[];t.__compiled__={};function c(h,p){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+p)}Object.keys(t.__schemas__).forEach(function(h){var p=t.__schemas__[h];if(p===null)return;var g={validate:null,link:null};if(t.__compiled__[h]=g,Tk(p)){Lk(p.validate)?g.validate=Rk(p.validate):vm(p.validate)?g.validate=p.validate:c(h,p),vm(p.normalize)?g.normalize=p.normalize:p.normalize?c(h,p):g.normalize=ym();return}if(Ak(p)){u.push(h);return}c(h,p)}),u.forEach(function(h){if(!t.__compiled__[t.__schemas__[h]])return;t.__compiled__[h].validate=t.__compiled__[t.__schemas__[h]].validate,t.__compiled__[h].normalize=t.__compiled__[t.__schemas__[h]].normalize}),t.__compiled__[""]={validate:null,normalize:ym()};var d=Object.keys(t.__compiled__).filter(function(h){return h.length>0&&t.__compiled__[h]}).map(Ik).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Pk(t)}function Ok(t,n){var i=t.__index__,s=t.__last_index__,u=t.__text_cache__.slice(i,s);this.schema=t.__schema__.toLowerCase(),this.index=i+n,this.lastIndex=s+n,this.raw=u,this.text=u,this.url=u}function wm(t,n){var i=new Ok(t,n);return t.__compiled__[i.schema].normalize(i,t),i}function mn(t,n){if(!(this instanceof mn))return new mn(t,n);n||Fk(t)&&(n=t,t={}),this.__opts__=wl({},bm,n),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wl({},Mk,t),this.__compiled__={},this.__tlds__=zk,this.__tlds_replaced__=!1,this.re={},ya(this)}mn.prototype.add=function(n,i){return this.__schemas__[n]=i,ya(this),this};mn.prototype.set=function(n){return this.__opts__=wl(this.__opts__,n),this};mn.prototype.test=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return!1;var i,s,u,c,d,h,p,g,y;if(this.re.schema_test.test(n)){for(p=this.re.schema_search,p.lastIndex=0;(i=p.exec(n))!==null;)if(c=this.testSchemaAt(n,i[2],p.lastIndex),c){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(g=n.search(this.re.host_fuzzy_test),g>=0&&((this.__index__<0||g=0&&((u=n.match(this.re.email_fuzzy))!==null&&(d=u.index+u[1].length,h=u.index+u[0].length,(this.__index__<0||dthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=d,this.__last_index__=h)))),this.__index__>=0};mn.prototype.pretest=function(n){return this.re.pretest.test(n)};mn.prototype.testSchemaAt=function(n,i,s){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(n,s,this):0};mn.prototype.match=function(n){var i=0,s=[];this.__index__>=0&&this.__text_cache__===n&&(s.push(wm(this,i)),i=this.__last_index__);for(var u=i?n.slice(i):n;this.test(u);)s.push(wm(this,i)),u=u.slice(this.__last_index__),i+=this.__last_index__;return s.length?s:null};mn.prototype.tlds=function(n,i){return n=Array.isArray(n)?n:[n],i?(this.__tlds__=this.__tlds__.concat(n).sort().filter(function(s,u,c){return s!==c[u-1]}).reverse(),ya(this),this):(this.__tlds__=n.slice(),this.__tlds_replaced__=!0,ya(this),this)};mn.prototype.normalize=function(n){n.schema||(n.url="http://"+n.url),n.schema==="mailto:"&&!/^mailto:/i.test(n.url)&&(n.url="mailto:"+n.url)};mn.prototype.onCompile=function(){};gm.exports=mn});var Im=le(Nk=>{Ny(Nk,{decode:()=>Sl,default:()=>Yk,encode:()=>El,toASCII:()=>Lm,toUnicode:()=>Tm,ucs2decode:()=>Cl,ucs2encode:()=>Em});"use strict";const oi=2147483647,Rn=36,kl=1,Ji=26,Bk=38,jk=700,xm=72,_m=128,Cm="-",Hk=/^xn--/,Uk=/[^\0-\x7E]/,Wk=/[\x2E\u3002\uFF0E\uFF61]/g,$k={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xl=Rn-kl,On=Math.floor,_l=String.fromCharCode;function Sr(t){throw new RangeError($k[t])}function Gk(t,n){const i=[];let s=t.length;for(;s--;)i[s]=n(t[s]);return i}function Sm(t,n){const i=t.split("@");let s="";i.length>1&&(s=i[0]+"@",t=i[1]),t=t.replace(Wk,".");const u=t.split("."),c=Gk(u,n).join(".");return s+c}function Cl(t){const n=[];let i=0;const s=t.length;for(;i=55296&&u<=56319&&iString.fromCodePoint(...t),Kk=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:Rn},Dm=function(t,n){return t+22+75*(t<26)-((n!=0)<<5)},Am=function(t,n,i){let s=0;for(t=i?On(t/jk):t>>1,t+=On(t/n);t>xl*Ji>>1;s+=Rn)t=On(t/xl);return On(s+(xl+1)*t/(t+Bk))},Sl=function(t){const n=[],i=t.length;let s=0,u=_m,c=xm,d=t.lastIndexOf(Cm);d<0&&(d=0);for(let h=0;h=128&&Sr("not-basic"),n.push(t.charCodeAt(h));for(let h=d>0?d+1:0;h=i&&Sr("invalid-input");const b=Kk(t.charCodeAt(h++));(b>=Rn||b>On((oi-s)/y))&&Sr("overflow"),s+=b*y;const w=m<=c?kl:m>=c+Ji?Ji:m-c;if(bOn(oi/D)&&Sr("overflow"),y*=D}const g=n.length+1;c=Am(s-p,g,p==0),On(s/g)>oi-u&&Sr("overflow"),u+=On(s/g),s%=g,n.splice(s++,0,u)}return String.fromCodePoint(...n)},El=function(t){const n=[];t=Cl(t);let i=t.length,s=_m,u=0,c=xm;for(const p of t)p<128&&n.push(_l(p));let d=n.length,h=d;for(d&&n.push(Cm);h=s&&yOn((oi-u)/g)&&Sr("overflow"),u+=(p-s)*g,s=p;for(const y of t)if(yoi&&Sr("overflow"),y==s){let m=u;for(let b=Rn;;b+=Rn){const w=b<=c?kl:b>=c+Ji?Ji:b-c;if(m{"use strict";Fm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var zm=le((g2,qm)=>{"use strict";qm.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 Rm=le((v2,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 jm=le((b2,Om)=>{"use strict";var eo=Je(),Xk=yf(),Zk=kf(),Qk=Gf(),Jk=Tp(),e0=fm(),t0=km(),ai=tl(),Nm=Im(),n0={default:Mm(),zero:zm(),commonmark:Rm()},r0=/^(vbscript|javascript|file|data):/,i0=/^data:image\/(gif|png|jpeg|webp);/;function o0(t){var n=t.trim().toLowerCase();return r0.test(n)?!!i0.test(n):!0}var Bm=["http:","https:","mailto:"];function a0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Bm.indexOf(n.protocol)>=0))try{n.hostname=Nm.toASCII(n.hostname)}catch(i){}return ai.encode(ai.format(n))}function s0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Bm.indexOf(n.protocol)>=0))try{n.hostname=Nm.toUnicode(n.hostname)}catch(i){}return ai.decode(ai.format(n))}function gn(t,n){if(!(this instanceof gn))return new gn(t,n);n||(eo.isString(t)||(n=t||{},t="default")),this.inline=new e0,this.block=new Jk,this.core=new Qk,this.renderer=new Zk,this.linkify=new t0,this.validateLink=o0,this.normalizeLink=a0,this.normalizeLinkText=s0,this.utils=eo,this.helpers=eo.assign({},Xk),this.options={},this.configure(t),n&&this.set(n)}gn.prototype.set=function(t){return eo.assign(this.options,t),this};gn.prototype.configure=function(t){var n=this,i;if(eo.isString(t)&&(i=t,t=n0[i],!t))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach(function(s){t.components[s].rules&&n[s].ruler.enableOnly(t.components[s].rules),t.components[s].rules2&&n[s].ruler2.enableOnly(t.components[s].rules2)}),this};gn.prototype.enable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.enable(t,!0))},this),i=i.concat(this.inline.ruler2.enable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+s);return this};gn.prototype.disable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.disable(t,!0))},this),i=i.concat(this.inline.ruler2.disable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+s);return this};gn.prototype.use=function(t){var n=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,n),this};gn.prototype.parse=function(t,n){if(typeof t!="string")throw new Error("Input data should be a String");var i=new this.core.State(t,this,n);return this.core.process(i),i.tokens};gn.prototype.render=function(t,n){return n=n||{},this.renderer.render(this.parse(t,n),this.options,n)};gn.prototype.parseInline=function(t,n){var i=new this.core.State(t,this,n);return i.inlineMode=!0,this.core.process(i),i.tokens};gn.prototype.renderInline=function(t,n){return n=n||{},this.renderer.render(this.parseInline(t,n),this.options,n)};Om.exports=gn});var Um=le((y2,Hm)=>{"use strict";Hm.exports=jm()});var Vm=le((w2,Wm)=>{var Dl=!0,$m=!1,Gm=!1;Wm.exports=function(t,n){n&&(Dl=!n.enabled,$m=!!n.label,Gm=!!n.labelAfter),t.core.ruler.after("inline","github-task-lists",function(i){for(var s=i.tokens,u=2;u=0;s--)if(t[s].level===i)return s;return-1}function u0(t,n){return d0(t[n])&&h0(t[n-1])&&f0(t[n-2])&&p0(t[n])}function c0(t,n){if(t.children.unshift(m0(t,n)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),$m)if(Gm){t.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(b0(t.content,i,n))}else t.children.unshift(g0(n)),t.children.push(v0(n))}function m0(t,n){var i=new n("html_inline","",0),s=Dl?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?i.content='':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(i.content=''),i}function g0(t){var n=new t("html_inline","",0);return n.content="",n}function b0(t,n,i){var s=new i("html_inline","",0);return s.content='",s.attrs=[{for:n}],s}function d0(t){return t.type==="inline"}function h0(t){return t.type==="paragraph_open"}function f0(t){return t.type==="list_item_open"}function p0(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});const to={},y0=[];function wa(t,n){if(y0.push({name:t,data:n}),typeof to[t]=="undefined")return this;let i=to[t];for(let s=0;swa("success",t),error:t=>wa("error",t),showValidationErrors:x0};async function _0(t,n={}){return Xm(t,{method:"GET",params:n})}async function C0(t,n=null){return ka("POST",t,n)}async function S0(t,n=null){return ka("PUT",t,n)}async function E0(t,n=null){return ka("PATCH",t,n)}async function D0(t,n=null){return ka("DELETE",t,n)}async function ka(t,n,i=null){const s={method:t,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(s.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},s.body=JSON.stringify(i)),i instanceof FormData&&t!=="post"&&(i.append("_method",t),s.method="post"),Xm(n,s)}async function Xm(t,n={}){if(t.startsWith("http")||(t=window.baseUrl(t)),n.params){const d=new URL(t);for(let h of Object.keys(n.params)){const p=n.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}t=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");n=Object.assign({},n,{credentials:"same-origin"}),n.headers=Object.assign({},n.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(t,n),u=await A0(s),c={data:u,headers:s.headers,redirected:s.redirected,status:s.status,statusText:s.statusText,url:s.url,original:s};if(!s.ok)throw c;return c}async function A0(t){if(t.status===204)return null;const n=t.headers.get("Content-Type"),i=n.split("/").pop();return i==="javascript"||i==="json"?await t.json():await t.text()}var Zm={get:_0,post:C0,put:S0,patch:E0,delete:D0};class T0{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){const t=document.querySelectorAll('meta[name="translation"]');for(let n of t){const i=n.getAttribute("key"),s=n.getAttribute("value");this.store.set(i,s)}}get(t,n){const i=this.getTransText(t);return this.performReplacements(i,n)}getPlural(t,n,i){const s=this.getTransText(t);return this.parsePlural(s,n,i)}parsePlural(t,n,i){const s=t.split("|"),u=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(u);if(p!==null&&Number(p[1])===n){d=h.replace(u,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=n&&(g[2]==="*"||Number(g[2])>=n)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=n===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(t){const n=this.store.get(t);return n===void 0&&console.warn(`Translation with key "${t}" does not exist`),n}performReplacements(t,n){if(!n)return t;const i=t.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const u=s.substring(1);if(typeof n[u]=="undefined")return;t=t.replace(s,n[u])}),t}}var Qm=T0;function xa(t,n){const i=document.querySelectorAll(t);for(let s of i)n(s)}function _a(t,n,i){for(let s of n)t.addEventListener(s,i)}function it(t,n){Array.isArray(t)||(t=[t]);for(const i of t)i.addEventListener("click",n),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(s))})}function Ca(t,n){Array.isArray(t)||(t=[t]);const i=s=>{s.key==="Enter"&&n(s)};t.forEach(s=>s.addEventListener("keypress",i))}function zt(t,n,i,s){t.addEventListener(i,function(u){const c=u.target.closest(n);c&&s.call(c,u,c)})}function Jm(t,n){const i=document.querySelectorAll(t);n=n.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(n))return s;return null}function no(t){t.innerHTML='
'}function eg(t){const n=t.querySelectorAll(".loading-container");for(const i of n)i.remove()}function tg(t,n,i){let s;return function(){const u=this,c=arguments,d=function(){s=null,i||t.apply(u,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,n),h&&t.apply(u,c)}}function ro(t){if(!t)return;t.scrollIntoView({behavior:"smooth"});const n=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(t).getPropertyValue("background-color");t.style.backgroundColor=n,setTimeout(()=>{t.classList.add("selectFade"),t.style.backgroundColor=i},10),setTimeout(()=>{t.classList.remove("selectFade"),t.style.backgroundColor=""},3e3)}function ng(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function rg(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}class L0{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),zt(this.$el,this.removeSelector,"click",t=>{const n=t.target.closest(this.rowSelector);n.remove()})}add(){const t=this.modelRow.cloneNode(!0);t.classList.remove("hidden"),this.setClonedInputNames(t),this.modelRow.parentNode.insertBefore(t,this.modelRow),window.components.init(t)}setClonedInputNames(t){const n=rg(),i=t.querySelectorAll('[name*="randrowid"]');for(const s of i)s.name=s.name.split("randrowid").join(n)}}var ig=L0;class I0{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,it(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(t=>{typeof t.data=="object"&&t.data.message&&window.$events.emit("success",t.data.message),this.row.remove()}).catch(t=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var og=I0;class F0{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Ca(this.container,t=>{this.submitFakeForm(),t.preventDefault()}),this.submitButtons.forEach(t=>it(t,this.submitFakeForm.bind(this)))}submitFakeForm(){const t=new FormData,n=this.container.querySelectorAll("[name]");for(const i of n)t.append(i.getAttribute("name"),i.value);this.submit(t)}submitRealForm(t){t.preventDefault();const n=new FormData(this.container);this.submit(n)}async submit(t){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const n=await window.$http[this.method.toLowerCase()](this.url,t);this.$emit("success",{formData:t}),this.responseContainer.innerHTML=n.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(n){this.responseContainer.innerHTML=n.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var ag=F0;class M0{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){const t=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",t),this.container.addEventListener("ajax-form-success",t),this.container.addEventListener("sortable-list-sort",n=>{this.updateOrder(n.detail.ids)}),this.container.addEventListener("event-emit-select-edit",n=>{this.startEdit(n.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",n=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",n=>{const i=n.target.closest("[data-drag-content]").getAttribute("data-drag-content"),s=JSON.parse(i);window.$events.emit("editor::insert",{html:s["text/html"],markdown:s["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(t=>{this.list.innerHTML=t.data,window.components.init(this.list)})}updateOrder(t){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:t}).then(n=>{window.$events.emit("success",n.data.message)})}async startEdit(t){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),no(this.editContainer);const n=await window.$http.get(`/attachments/edit/${t}`);this.editContainer.innerHTML=n.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var sg=M0;const Al={};class q0{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",t=>{t.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),zt(this.list,"button","click",(t,n)=>{this.selectSuggestion(n.textContent)}),zt(this.list,"button","keydown",(t,n)=>{t.key==="Enter"&&this.selectSuggestion(n.textContent)})}selectSuggestion(t){this.input.value=t,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(t){if(t.key==="Enter"&&t.preventDefault(),this.list.classList.contains("hidden"))return;t.key==="ArrowDown"?(this.moveFocus(!0),t.preventDefault()):t.key==="ArrowUp"?(this.moveFocus(!1),t.preventDefault()):t.key==="Escape"&&(this.hideSuggestions(),t.preventDefault())}moveFocus(t=!0){const n=Array.from(this.container.querySelectorAll("input,button")),i=n.indexOf(document.activeElement),s=n[i+(t?1:-1)];s&&s.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const t=this.getNameFilterIfNeeded(),n=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(n,t);let s=i.slice(0,6);n.length>0&&(s=i.filter(u=>u.toLowerCase().includes(n)).slice(0,6)),this.displaySuggestions(s)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(t,n=null){const i={search:t,name:n},s=`${this.url}:${JSON.stringify(i)}`;if(Al[s])return Al[s];const u=await window.$http.get(this.url,i);return Al[s]=u.data,u.data}displaySuggestions(t){if(t.length===0)return this.hideSuggestions();this.list.innerHTML=t.map(n=>`
  • `).join(""),this.list.style.display="block";for(const n of this.list.querySelectorAll("button"))n.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(t){this.container.contains(t.relatedTarget)||this.hideSuggestions()}}var lg=q0;class z0{constructor(t){if(this.elem=t,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let t=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&t>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&t{this.elem.style.display="none"},500))}scrollToTop(){let t=this.targetElem.getBoundingClientRect().top,n=document.documentElement.scrollTop?document.documentElement:document.body,i=300,s=Date.now(),u=this.targetElem.getBoundingClientRect().top;function c(){let d=1-(Date.now()-s)/i,h=Math.abs(d*u);d>0?(n.scrollTop=h,requestAnimationFrame(c.bind(this))):n.scrollTop=t}requestAnimationFrame(c.bind(this))}}var ug=z0;function Yn(){return(Yn=Object.assign||function(t){for(var n=1;n"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(i){return!1}return!1}}function R0(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function _n(t,n,i,s){if(t){i=i||document;do{if(n!=null&&(n[0]===">"?t.parentNode===i&&Ea(t,n):Ea(t,n))||s&&t===i)return t;if(t===i)break}while(t=R0(t))}return null}var oo,fg=/\s+/g;function ht(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var s=(" "+t.className+" ").replace(fg," ").replace(" "+n+" "," ");t.className=(s+(i?" "+n:"")).replace(fg," ")}}function Ce(t,n,i){var s=t&&t.style;if(s){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),n===void 0?i:i[n];n in s||n.indexOf("webkit")!==-1||(n="-webkit-"+n),s[n]=i+(typeof i=="string"?"":"px")}}function Er(t,n){var i="";if(typeof t=="string")i=t;else do{var s=Ce(t,"transform");s&&s!=="none"&&(i=s+" "+i)}while(!n&&(t=t.parentNode));var u=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return u&&new u(i)}function pg(t,n,i){if(t){var s=t.getElementsByTagName(n),u=0,c=s.length;if(i)for(;u=c:u<=c))return s;if(s===Nn())break;s=cr(s,!1)}return!1}function Da(t,n,i){for(var s=0,u=0,c=t.children;u=0||(y[p]=d[p]);return y}(s,["evt"]);so.pluginEvent.bind(Ie)(t,n,Yn({dragEl:me,parentEl:Dt,ghostEl:Oe,rootEl:ft,nextEl:Dr,lastDownEl:Aa,cloneEl:xt,cloneHidden:dr,dragStarted:co,putSortable:Ut,activeSortable:Ie.active,originalEvent:u,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr,hideGhostForTarget:wg,unhideGhostForTarget:kg,cloneNowHidden:function(){dr=!0},cloneNowShown:function(){dr=!1},dispatchSortableEvent:function(d){tn({sortable:n,name:d,originalEvent:u})}},c))};function tn(t){lo(Yn({putSortable:Ut,cloneEl:xt,targetEl:me,rootEl:ft,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr},t))}var me,Dt,Oe,ft,Dr,Aa,xt,dr,si,ln,uo,hr,Ta,Ut,li,Cn,ql,zl,xg,_g,co,ui,ho,La,Vt,ci=!1,Ia=!1,Fa=[],fo=!1,Ma=!1,Pl=[],Rl=!1,qa=[],za=typeof document!="undefined",Pa=dg,Cg=io||Zn?"cssFloat":"float",O0=za&&!P0&&!dg&&"draggable"in document.createElement("div"),Sg=function(){if(za){if(Zn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Eg=function(t,n){var i=Ce(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),u=Da(t,0,n),c=Da(t,1,n),d=u&&Ce(u),h=c&&Ce(c),p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+vt(u).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+vt(c).width;return i.display==="flex"?i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal":i.display==="grid"?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":u&&d.float&&d.float!=="none"?!c||h.clear!=="both"&&h.clear!==(d.float==="left"?"left":"right")?"horizontal":"vertical":u&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||p>=s&&i[Cg]==="none"||c&&i[Cg]==="none"&&p+g>s)?"vertical":"horizontal"},Dg=function(t){function n(u,c){return function(d,h,p,g){if(u==null&&(c||d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name))return!0;if(u==null||u===!1)return!1;if(c&&u==="clone")return u;if(typeof u=="function")return n(u(d,h,p,g),c)(d,h,p,g);var y=(c?d:h).options.group.name;return u===!0||typeof u=="string"&&u===y||u.join&&u.indexOf(y)>-1}}var i={},s=t.group;s&&typeof s=="object"||(s={name:s}),i.name=s.name,i.checkPull=n(s.pull,!0),i.checkPut=n(s.put),i.revertClone=s.revertClone,t.group=i},wg=function(){!Sg&&Oe&&Ce(Oe,"display","none")},kg=function(){!Sg&&Oe&&Ce(Oe,"display","")};za&&document.addEventListener("click",function(t){if(Ia)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ia=!1,!1},!0);var vn,Ar=function(t){if(me){var n=(u=(t=t.touches?t.touches[0]:t).clientX,c=t.clientY,Fa.some(function(h){if(!Tl(h)){var p=vt(h),g=h[Kt].options.emptyInsertThreshold;return g&&u>=p.left-g&&u<=p.right+g&&c>=p.top-g&&c<=p.bottom+g?d=h:void 0}}),d);if(n){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Kt]._onDragOver(i)}}var u,c,d},N0=function(t){me&&me.parentNode[Kt]._isOutsideThisEl(t.target)};function Ie(t,n){if(!t||!t.nodeType||t.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=n=Object.assign({},n),t[Kt]=this;var i,s,u={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Eg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(h,p){h.setData("Text",p.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Ie.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};for(var c in so.initializePlugins(this,t,u),u)!(c in n)&&(n[c]=u[c]);for(var d in Dg(n),this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this));this.nativeDraggable=!n.forceFallback&&O0,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Xe(t,"pointerdown",this._onTapStart):(Xe(t,"mousedown",this._onTapStart),Xe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Xe(t,"dragover",this),Xe(t,"dragenter",this)),Fa.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Object.assign(this,(s=[],{captureAnimationState:function(){s=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(h){if(Ce(h,"display")!=="none"&&h!==void 0){s.push({target:h,rect:vt(h)});var p=Yn({},s[s.length-1].rect);if(h.thisAnimationDuration){var g=Er(h,!0);g&&(p.top-=g.f,p.left-=g.e)}h.fromRect=p}})},addAnimationState:function(h){s.push(h)},removeAnimationState:function(h){s.splice(function(p,g){for(var y in p)if(p.hasOwnProperty(y)){for(var m in g)if(g.hasOwnProperty(m)&&g[m]===p[y][m])return Number(y)}return-1}(s,{target:h}),1)},animateAll:function(h){var p=this;if(!this.options.animation)return clearTimeout(i),void(typeof h=="function"&&h());var g=!1,y=0;s.forEach(function(m){var b=0,w=m.target,D=w.fromRect,E=vt(w),S=w.prevFromRect,z=w.prevToRect,A=m.rect,R=Er(w,!0);R&&(E.top-=R.f,E.left-=R.e),w.toRect=E,w.thisAnimationDuration&&Ll(S,E)&&!Ll(D,E)&&(A.top-E.top)/(A.left-E.left)==(D.top-E.top)/(D.left-E.left)&&(b=function(U,Y,B,G){return Math.sqrt(Math.pow(Y.top-U.top,2)+Math.pow(Y.left-U.left,2))/Math.sqrt(Math.pow(Y.top-B.top,2)+Math.pow(Y.left-B.left,2))*G.animation}(A,S,z,p.options)),Ll(E,D)||(w.prevFromRect=D,w.prevToRect=E,b||(b=p.options.animation),p.animate(w,A,E,b)),b&&(g=!0,y=Math.max(y,b),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},b),w.thisAnimationDuration=b)}),clearTimeout(i),g?i=setTimeout(function(){typeof h=="function"&&h()},y):typeof h=="function"&&h(),s=[]},animate:function(h,p,g,y){if(y){Ce(h,"transition",""),Ce(h,"transform","");var m=Er(this.el),b=(p.left-g.left)/(m&&m.a||1),w=(p.top-g.top)/(m&&m.d||1);h.animatingX=!!b,h.animatingY=!!w,Ce(h,"transform","translate3d("+b+"px,"+w+"px,0)"),this.forRepaintDummy=function(D){return D.offsetWidth}(h),Ce(h,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Ce(h,"transform","translate3d(0,0,0)"),typeof h.animated=="number"&&clearTimeout(h.animated),h.animated=setTimeout(function(){Ce(h,"transition",""),Ce(h,"transform",""),h.animated=!1,h.animatingX=!1,h.animatingY=!1},y)}}}))}function Ol(t,n,i,s,u,c,d,h){var p,g,y=t[Kt],m=y.options.onMove;return!window.CustomEvent||Zn||io?(p=document.createEvent("Event")).initEvent("move",!0,!0):p=new CustomEvent("move",{bubbles:!0,cancelable:!0}),p.to=n,p.from=t,p.dragged=i,p.draggedRect=s,p.related=u||n,p.relatedRect=c||vt(n),p.willInsertAfter=h,p.originalEvent=d,t.dispatchEvent(p),m&&(g=m.call(y,p,d)),g}function Nl(t){t.draggable=!1}function B0(){Rl=!1}function j0(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,s=0;i--;)s+=n.charCodeAt(i);return s.toString(36)}function Ra(t){return setTimeout(t,0)}function Bl(t){return clearTimeout(t)}Ie.prototype={constructor:Ie,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ui=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,me):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,s=this.options,u=s.preventOnFilter,c=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,h=(d||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||h,g=s.filter;if(function(y){qa.length=0;for(var m=y.getElementsByTagName("input"),b=m.length;b--;){var w=m[b];w.checked&&qa.push(w)}}(i),!me&&!(/mousedown|pointerdown/.test(c)&&t.button!==0||s.disabled)&&!p.isContentEditable&&(this.nativeDraggable||!Sa||!h||h.tagName.toUpperCase()!=="SELECT")&&!((h=_n(h,s.draggable,i,!1))&&h.animated||Aa===h)){if(si=bt(h),uo=bt(h,s.draggable),typeof g=="function"){if(g.call(this,t,h,this))return tn({sortable:n,rootEl:p,name:"filter",targetEl:h,toEl:i,fromEl:i}),on("filter",n,{evt:t}),void(u&&t.cancelable&&t.preventDefault())}else if(g&&(g=g.split(",").some(function(y){if(y=_n(p,y.trim(),i,!1))return tn({sortable:n,rootEl:y,name:"filter",targetEl:h,fromEl:i,toEl:i}),on("filter",n,{evt:t}),!0})))return void(u&&t.cancelable&&t.preventDefault());s.handle&&!_n(p,s.handle,i,!1)||this._prepareDragStart(t,d,h)}}},_prepareDragStart:function(t,n,i){var s,u=this,c=u.el,d=u.options,h=c.ownerDocument;if(i&&!me&&i.parentNode===c){var p=vt(i);if(ft=c,Dt=(me=i).parentNode,Dr=me.nextSibling,Aa=i,Ta=d.group,Ie.dragged=me,xg=(li={target:me,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-p.left,_g=li.clientY-p.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,me.style["will-change"]="all",s=function(){on("delayEnded",u,{evt:t}),Ie.eventCanceled?u._onDrop():(u._disableDelayedDragEvents(),!cg&&u.nativeDraggable&&(me.draggable=!0),u._triggerDragStart(t,n),tn({sortable:u,name:"choose",originalEvent:t}),ht(me,d.chosenClass,!0))},d.ignore.split(",").forEach(function(g){pg(me,g.trim(),Nl)}),Xe(h,"dragover",Ar),Xe(h,"mousemove",Ar),Xe(h,"touchmove",Ar),Xe(h,"mouseup",u._onDrop),Xe(h,"touchend",u._onDrop),Xe(h,"touchcancel",u._onDrop),cg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,me.draggable=!0),on("delayStart",this,{evt:t}),!d.delay||d.delayOnTouchOnly&&!n||this.nativeDraggable&&(io||Zn))s();else{if(Ie.eventCanceled)return void this._onDrop();Xe(h,"mouseup",u._disableDelayedDrag),Xe(h,"touchend",u._disableDelayedDrag),Xe(h,"touchcancel",u._disableDelayedDrag),Xe(h,"mousemove",u._delayedDragTouchMoveHandler),Xe(h,"touchmove",u._delayedDragTouchMoveHandler),d.supportPointer&&Xe(h,"pointermove",u._delayedDragTouchMoveHandler),u._dragStartTimer=setTimeout(s,d.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){me&&Nl(me),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;je(t,"mouseup",this._disableDelayedDrag),je(t,"touchend",this._disableDelayedDrag),je(t,"touchcancel",this._disableDelayedDrag),je(t,"mousemove",this._delayedDragTouchMoveHandler),je(t,"touchmove",this._delayedDragTouchMoveHandler),je(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?Xe(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(Xe(me,"dragend",this),Xe(ft,"dragstart",this._onDragStart));try{document.selection?Ra(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(t,n){if(ci=!1,ft&&me){on("dragStarted",this,{evt:n}),this.nativeDraggable&&Xe(document,"dragover",N0);var i=this.options;!t&&ht(me,i.dragClass,!1),ht(me,i.ghostClass,!0),Ie.active=this,t&&this._appendGhost(),tn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cn){this._lastX=Cn.clientX,this._lastY=Cn.clientY,wg();for(var t=document.elementFromPoint(Cn.clientX,Cn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cn.clientX,Cn.clientY))!==n;)n=t;if(me.parentNode[Kt]._isOutsideThisEl(t),n)do{if(n[Kt]&&n[Kt]._onDragOver({clientX:Cn.clientX,clientY:Cn.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=n.parentNode);kg()}},_onTouchMove:function(t){if(li){var n=this.options,i=n.fallbackTolerance,s=n.fallbackOffset,u=t.touches?t.touches[0]:t,c=Oe&&Er(Oe,!0),d=Oe&&c&&c.a,h=Oe&&c&&c.d,p=Pa&&Vt&&gg(Vt),g=(u.clientX-li.clientX+s.x)/(d||1)+(p?p[0]-Pl[0]:0)/(d||1),y=(u.clientY-li.clientY+s.y)/(h||1)+(p?p[1]-Pl[1]:0)/(h||1);if(!Ie.active&&!ci){if(i&&Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))ae.right+10||q.clientX<=ae.right&&q.clientY>ae.bottom&&q.clientX>=ae.left:q.clientX>ae.right&&q.clientY>ae.top||q.clientX<=ae.right&&q.clientY>ae.bottom+10}(t,u,this)&&!E.animated){if(E===me)return j(!1);if(E&&c===t.target&&(d=E),d&&(i=vt(d)),Ol(ft,c,me,n,d,i,t,!!d)!==!1)return V(),c.appendChild(me),Dt=c,Q(),j(!0)}else if(d.parentNode===c){i=vt(d);var S,z,A,R=me.parentNode!==c,U=!function(q,I,H){var ae=H?q.left:q.top,F=H?I.left:I.top;return ae===F||(H?q.right:q.bottom)===(H?I.right:I.bottom)||ae+(H?q.width:q.height)/2===F+(H?I.width:I.height)/2}(me.animated&&me.toRect||n,d.animated&&d.toRect||i,u),Y=u?"top":"left",B=mg(d,"top","top")||mg(me,"top","top"),G=B?B.scrollTop:void 0;if(ui!==d&&(z=i[Y],fo=!1,Ma=!U&&h.invertSwap||R),(S=function(q,I,H,ae,F,T,ce,de){var ie=ae?q.clientY:q.clientX,_e=ae?H.height:H.width,ze=ae?H.top:H.left,be=ae?H.bottom:H.right,we=!1;if(!ce){if(de&&La<_e*F){if(!fo&&(ho===1?ie>ze+_e*T/2:iebe-La)return-ho}else if(ie>ze+_e*(1-F)/2&&iebe-_e*T/2)?ie>ze+_e/2?1:-1:0}(t,d,i,u,U?1:h.swapThreshold,h.invertedSwapThreshold==null?h.swapThreshold:h.invertedSwapThreshold,Ma,ui===d))!==0){var ee=bt(me);do A=Dt.children[ee-=S];while(A&&(Ce(A,"display")==="none"||A===Oe))}if(S===0||A===d)return j(!1);ui=d,ho=S;var J=d.nextElementSibling,P=!1,Z=Ol(ft,c,me,n,d,i,t,P=S===1);if(Z!==!1)return Z!==1&&Z!==-1||(P=Z===1),Rl=!0,setTimeout(B0,30),V(),P&&!J?c.appendChild(me):d.parentNode.insertBefore(me,P?J:d),B&&bg(B,0,G-B.scrollTop),Dt=me.parentNode,z===void 0||Ma||(La=Math.abs(z-vt(d)[Y])),Q(),j(!0)}if(c.contains(me))return j(!1)}return!1}function _(q,I){on(q,w,Yn({evt:t,isOwner:y,axis:u?"vertical":"horizontal",revert:s,dragRect:n,targetRect:i,canSort:m,fromSortable:b,target:d,completed:j,onMove:function(H,ae){return Ol(ft,c,me,n,H,vt(H),t,ae)},changed:Q},I))}function V(){_("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function j(q){return _("dragOverCompleted",{insertion:q}),q&&(y?g._hideClone():g._showClone(w),w!==b&&(ht(me,Ut?Ut.options.ghostClass:g.options.ghostClass,!1),ht(me,h.ghostClass,!0)),Ut!==w&&w!==Ie.active?Ut=w:w===Ie.active&&Ut&&(Ut=null),b===w&&(w._ignoreWhileAnimating=d),w.animateAll(function(){_("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(d===me&&!me.animated||d===c&&!d.animated)&&(ui=null),h.dragoverBubble||t.rootEl||d===document||(me.parentNode[Kt]._isOutsideThisEl(t.target),!q&&Ar(t)),!h.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),D=!0}function Q(){ln=bt(me),hr=bt(me,h.draggable),tn({sortable:w,name:"change",toEl:c,newIndex:ln,newDraggableIndex:hr,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){je(document,"mousemove",this._onTouchMove),je(document,"touchmove",this._onTouchMove),je(document,"pointermove",this._onTouchMove),je(document,"dragover",Ar),je(document,"mousemove",Ar),je(document,"touchmove",Ar)},_offUpEvents:function(){var t=this.el.ownerDocument;je(t,"mouseup",this._onDrop),je(t,"touchend",this._onDrop),je(t,"pointerup",this._onDrop),je(t,"touchcancel",this._onDrop),je(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;ln=bt(me),hr=bt(me,i.draggable),on("drop",this,{evt:t}),Dt=me&&me.parentNode,ln=bt(me),hr=bt(me,i.draggable),Ie.eventCanceled||(ci=!1,Ma=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bl(this.cloneId),Bl(this._dragStartId),this.nativeDraggable&&(je(document,"drop",this),je(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sa&&Ce(document.body,"user-select",""),Ce(me,"transform",""),t&&(co&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),Oe&&Oe.parentNode&&Oe.parentNode.removeChild(Oe),(ft===Dt||Ut&&Ut.lastPutMode!=="clone")&&xt&&xt.parentNode&&xt.parentNode.removeChild(xt),me&&(this.nativeDraggable&&je(me,"dragend",this),Nl(me),me.style["will-change"]="",co&&!ci&&ht(me,Ut?Ut.options.ghostClass:this.options.ghostClass,!1),ht(me,this.options.chosenClass,!1),tn({sortable:this,name:"unchoose",toEl:Dt,newIndex:null,newDraggableIndex:null,originalEvent:t}),ft!==Dt?(ln>=0&&(tn({rootEl:Dt,name:"add",toEl:Dt,fromEl:ft,originalEvent:t}),tn({sortable:this,name:"remove",toEl:Dt,originalEvent:t}),tn({rootEl:Dt,name:"sort",toEl:Dt,fromEl:ft,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t})),Ut&&Ut.save()):ln!==si&&ln>=0&&(tn({sortable:this,name:"update",toEl:Dt,originalEvent:t}),tn({sortable:this,name:"sort",toEl:Dt,originalEvent:t})),Ie.active&&(ln!=null&&ln!==-1||(ln=si,hr=uo),tn({sortable:this,name:"end",toEl:Dt,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){on("nulling",this),ft=me=Dt=Oe=Dr=xt=Aa=dr=li=Cn=co=ln=hr=si=uo=ui=ho=Ut=Ta=Ie.dragged=Ie.ghost=Ie.clone=Ie.active=null,qa.forEach(function(t){t.checked=!0}),qa.length=ql=zl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":me&&(this._onDragOver(t),function(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,s=0,u=i.length,c=this.options;s1&&(qe.forEach(function(d){u.addAnimationState({target:d,rect:cn?vt(d):c}),Fl(d),d.fromRect=c,i.removeAnimationState(d)}),cn=!1,function(d,h){qe.forEach(function(p,g){var y=h.children[p.sortableIndex+(d?Number(g):0)];y?h.insertBefore(p,y):h.appendChild(p)})}(!this.options.removeCloneOnHide,s))},dragOverCompleted:function(n){var i=n.sortable,s=n.isOwner,u=n.activeSortable,c=n.parentEl,d=n.putSortable,h=this.options;if(n.insertion){if(s&&u._hideClone(),go=!1,h.animation&&qe.length>1&&(cn||!s&&!u.options.sort&&!d)){var p=vt(ot,!1,!0,!0);qe.forEach(function(y){y!==ot&&(yg(y,p),c.appendChild(y))}),cn=!0}if(!s)if(cn||Na(),qe.length>1){var g=Oa;u._showClone(i),u.options.animation&&!Oa&&g&&un.forEach(function(y){u.addAnimationState({target:y,rect:mo}),y.fromRect=mo,y.thisAnimationDuration=null})}else u._showClone(i)}},dragOverAnimationCapture:function(n){var i=n.dragRect,s=n.isOwner,u=n.activeSortable;if(qe.forEach(function(d){d.thisAnimationDuration=null}),u.options.animation&&!s&&u.multiDrag.isMultiDrag){mo=Object.assign({},i);var c=Er(ot,!0);mo.top-=c.f,mo.left-=c.e}},dragOverAnimationComplete:function(){cn&&(cn=!1,Na())},drop:function(n){var i=n.originalEvent,s=n.rootEl,u=n.parentEl,c=n.sortable,d=n.dispatchSortableEvent,h=n.oldIndex,p=n.putSortable,g=p||this.sortable;if(i){var y=this.options,m=u.children;if(!di)if(y.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ht(ot,y.selectedClass,!~qe.indexOf(ot)),~qe.indexOf(ot))qe.splice(qe.indexOf(ot),1),po=null,lo({sortable:c,rootEl:s,name:"deselect",targetEl:ot,originalEvt:i});else{if(qe.push(ot),lo({sortable:c,rootEl:s,name:"select",targetEl:ot,originalEvt:i}),i.shiftKey&&po&&c.el.contains(po)){var b,w,D=bt(po),E=bt(ot);if(~D&&~E&&D!==E)for(E>D?(w=D,b=E):(w=E,b=D+1);w1){var S=vt(ot),z=bt(ot,":not(."+this.options.selectedClass+")");if(!go&&y.animation&&(ot.thisAnimationDuration=null),g.captureAnimationState(),!go&&(y.animation&&(ot.fromRect=S,qe.forEach(function(R){if(R.thisAnimationDuration=null,R!==ot){var U=cn?vt(R):S;R.fromRect=U,g.addAnimationState({target:R,rect:U})}})),Na(),qe.forEach(function(R){m[z]?u.insertBefore(R,m[z]):u.appendChild(R),z++}),h===bt(ot))){var A=!1;qe.forEach(function(R){R.sortableIndex===bt(R)||(A=!0)}),A&&d("update")}qe.forEach(function(R){Fl(R)}),g.animateAll()}Sn=g}(s===u||p&&p.lastPutMode!=="clone")&&un.forEach(function(R){R.parentNode&&R.parentNode.removeChild(R)})}},nullingGlobal:function(){this.isMultiDrag=di=!1,un.length=0},destroyGlobal:function(){this._deselectMultiDrag(),je(document,"pointerup",this._deselectMultiDrag),je(document,"mouseup",this._deselectMultiDrag),je(document,"touchend",this._deselectMultiDrag),je(document,"keydown",this._checkKeyDown),je(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(di!==void 0&&di||Sn!==this.sortable||n&&_n(n.target,this.options.draggable,this.sortable.el,!1)||n&&n.button!==0))for(;qe.length;){var i=qe[0];ht(i,this.options.selectedClass,!1),qe.shift(),lo({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(t,{pluginName:"multiDrag",utils:{select:function(n){var i=n.parentNode[Kt];i&&i.options.multiDrag&&!~qe.indexOf(n)&&(Sn&&Sn!==i&&(Sn.multiDrag._deselectMultiDrag(),Sn=i),ht(n,i.options.selectedClass,!0),qe.push(n))},deselect:function(n){var i=n.parentNode[Kt],s=qe.indexOf(n);i&&i.options.multiDrag&&~s&&(ht(n,i.options.selectedClass,!1),qe.splice(s,1))}},eventProperties:function(){var n=this,i=[],s=[];return qe.forEach(function(u){var c;i.push({multiDragElement:u,index:u.sortableIndex}),c=cn&&u!==ot?-1:cn?bt(u,":not(."+n.options.selectedClass+")"):bt(u),s.push({multiDragElement:u,index:c})}),{items:[].concat(qe),clones:[].concat(un),oldIndicies:i,newIndicies:s}},optionListeners:{multiDragKey:function(n){return(n=n.toLowerCase())==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})});var hi=Ie;const Ig={name:function(t,n){const i=t.getAttribute("data-name").trim().toLowerCase(),s=n.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(s)},created:function(t,n){const i=Number(t.getAttribute("data-created")),s=Number(n.getAttribute("data-created"));return s-i},updated:function(t,n){const i=Number(t.getAttribute("data-updated")),s=Number(n.getAttribute("data-updated"));return s-i},chaptersFirst:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?-1:1},chaptersLast:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?1:-1}};class H0{constructor(t){this.elem=t,this.sortContainer=t.querySelector("[book-sort-boxes]"),this.input=t.querySelector("[book-sort-input]");const n=t.querySelector(".sort-box");this.setupBookSortable(n),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let t="",n=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",s=>{const u=s.target.closest(".sort-box-options [data-sort]");if(!u)return;s.preventDefault();const c=u.closest(".sort-box").querySelectorAll("ul"),d=u.getAttribute("data-sort");n=t===d?!n:!1;let h=Ig[d];n&&i.includes(d)&&(h=function(p,g){return 0-Ig[d](p,g)});for(let p of c){const g=Array.from(p.children).filter(y=>y.matches("li"));g.sort(h).forEach(y=>{p.appendChild(y)})}t=d,this.updateMapInput()})}bookSelect(t){const n=this.elem.querySelector(`[data-type="book"][data-id="${t.id}"]`)!==null;if(n)return;const i=t.link+"/sort-item";window.$http.get(i).then(s=>{const u=document.createElement("div");u.innerHTML=s.data;const c=u.children[0];this.sortContainer.append(c),this.setupBookSortable(c)})}setupBookSortable(t){const n=[t.querySelector(".sort-list")];n.push(...t.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},s={name:"chapter",pull:["book","chapter"],put:function(u,c,d){return d.getAttribute("data-type")==="page"}};for(let u of n)new hi(u,{group:u.classList.contains("sort-list")?i:s,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){const t=this.buildEntityMap();this.input.value=JSON.stringify(t)}buildEntityMap(){const t=[],n=this.elem.querySelectorAll(".sort-list");for(let i of n){const s=i.closest('[data-type="book"]').getAttribute("data-id"),u=Array.from(i.children).filter(c=>c.matches('[data-type="page"], [data-type="chapter"]'));for(let c=0;c{this.entityListElem.innerHTML=n.data}).catch(n=>{console.error(n)}).then(()=>{this.toggleLoading(!1),this.onSearch()})}toggleLoading(t=!1){this.loadingElem.style.display=t?"block":"none"}}var Mg=U0;const Ua=new WeakMap;function qg(t,n=400,i=null){$a(t),t.style.display="block",Wa(t,{opacity:["0","1"]},n,()=>{i&&i()})}function Ga(t,n=400,i=null){$a(t),Wa(t,{opacity:["1","0"]},n,()=>{t.style.display="none",i&&i()})}function fi(t,n=400){$a(t);const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[u,"0px"],paddingBottom:[c,"0px"]};Wa(t,d,n,()=>{t.style.display="none"})}function pi(t,n=400){$a(t),t.style.display="block";const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",u],paddingBottom:["0px",c]};Wa(t,d,n)}function Wa(t,n,i=400,s=null){const u=Object.keys(n);for(let d of u)t.style[d]=n[d][0];const c=()=>{for(let d of u)t.style[d]=null;t.style.transition=null,t.removeEventListener("transitionend",c),Ua.delete(t),s&&s()};setTimeout(()=>{t.style.transition=`all ease-in-out ${i}ms`;for(let d of u)t.style[d]=n[d][1];t.addEventListener("transitionend",c),Ua.set(t,c)},15)}function $a(t){if(Ua.has(t)){const n=Ua.get(t);n()}}class W0{constructor(t){this.elem=t,this.isOpen=t.classList.contains("open"),t.addEventListener("click",this.click.bind(this))}open(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),pi(t,240)}close(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),fi(t,240)}click(t){t.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var zg=W0;const Tr=$e(Qe()),Pg=$e(Ks()),K2=$e(Vs()),V2=$e(Ys()),Y2=$e(od()),X2=$e(ld()),Z2=$e(dd()),Q2=$e(pd()),J2=$e(Zs()),e1=$e(Xs()),t1=$e(_d()),n1=$e(Ed()),r1=$e(Fd()),i1=$e(zd()),o1=$e(Od()),a1=$e(jd()),s1=$e(Wd()),l1=$e(Kd()),u1=$e(Xd()),c1=$e(Jd()),d1=$e(nh()),h1=$e(oh()),f1=$e(dh()),p1=$e(ph()),m1=$e(vh()),g1=$e(wh()),v1=$e(ta()),b1=$e(_h()),y1=$e(Eh()),Vl={css:"css",c:"text/x-csrc",java:"text/x-java",scala:"text/x-scala",kotlin:"text/x-kotlin","c++":"text/x-c++src","c#":"text/x-csharp",csharp:"text/x-csharp",diff:"diff",for:"fortran",fortran:"fortran",go:"go",haskell:"haskell",hs:"haskell",html:"htmlmixed",ini:"properties",javascript:"javascript",json:{name:"javascript",json:!0},js:"javascript",jl:"julia",julia:"julia",lua:"lua",md:"markdown",mdown:"markdown",markdown:"markdown",ml:"mllike",nginx:"nginx",perl:"perl",pl:"perl",powershell:"powershell",properties:"properties",ocaml:"mllike",pascal:"text/x-pascal",pas:"text/x-pascal",php:t=>t.includes("/gi,` -`);const i=t.textContent.trimEnd();let s="";if(n!==null){const c=n.className.replace("language-","");s=Ka(c,i)}const u=Tr.default(function(c){t.parentNode.replaceChild(c,t)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});K0(u)}function K0(t){const n='',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=n,t.display.wrapper.appendChild(i);const s=new Pg.default(i,{text:function(u){return t.getValue()}});s.on("success",u=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(t,n){t=t.trim().replace(/^\./g,"").toLowerCase();const i=typeof Vl[t];return i==="undefined"?"":i==="function"?Vl[t](n):Vl[t]}function Va(){const t=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(t?"darcula":"default")}function V0(t){const n=t.ownerDocument,i=t.querySelector("code");let s=(t.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),t.innerHTML=t.innerHTML.replace(//gi,` -`);const u=t.textContent,c=n.createElement("div"),d=n.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",t.parentNode.replaceChild(c,t),c.appendChild(d),c.contentEditable=!1,d.textContent=u;let h=Tr.default(function(p){c.appendChild(p)},{value:u,mode:Ka(s,u),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function Y0(t,n){const i=t.textContent;return Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},{value:i,mode:Ka(n,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function X0(t,n,i){t.setOption("mode",Ka(n,i))}function Z0(t,n){t.setValue(n),setTimeout(()=>{Og(t)},10)}function Og(t){t.refresh()}function Q0(t){const n=t.textContent,i={value:n,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(t,"editor-markdown-cm::pre-init",{config:i}),Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},i)}function J0(){let t=Tr.default.keyMap.default==Tr.default.keyMap.macDefault;return t?"Cmd":"Ctrl"}var Nt={highlight:$0,highlightWithin:G0,wysiwygView:V0,popupEditor:Y0,setMode:X0,setContent:Z0,updateLayout:Og,markdownEditor:Q0,getMetaKey:J0};class ex{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),it(this.languageLinks,t=>{const n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),Ca(this.languageInput,t=>this.save()),it(this.saveButton,t=>this.save()),zt(this.historyList,"button","click",(t,n)=>{t.preventDefault();const i=n.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,i){this.languageInput.value=n,this.callback=i,this.show(),this.updateEditorMode(n),Nt.setContent(this.editor,t)}show(){this.editor||(this.editor=Nt.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{Nt.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){Nt.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{const i=new Date(parseInt(n)).toLocaleTimeString();return`
  • `}).join("")}addHistory(){if(!this.editor)return;const t=this.editor.getValue();if(!t)return;const n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Ng=ex;class tx{constructor(t){Nt.highlightWithin(t)}}var Bg=tx;class nx{constructor(t){if(this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),pi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),fi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const t=this.content.querySelector(".text-neg.text-small");t&&this.open()}}var jg=nx;class rx{constructor(t){this.elem=t,this.checkbox=t.querySelector("input[type=checkbox]"),this.display=t.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(t){const n=t.keyCode===32||t.keyCode===13;n&&(t.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const t=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",t)}}var Hg=rx;class ix{constructor(t){this.elem=t,this.dealtWith=!1,t.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;Nt.highlightWithin(this.elem),this.dealtWith=!0}}var Ug=ix;class ox{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners()}show(t=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",s=>{this.menu.contains(s.target)||this.hide()});const n=this.menu.querySelector("input");n!==null&&n.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),t&&t.stopPropagation()}hideAll(){for(let t of window.components.dropdown)t.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n+1;i>=t.length&&(i=0),t[i].focus()}focusPrevious(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n-1;i<0&&(i=t.length-1),t[i].focus()}setupListeners(){this.container.addEventListener("click",n=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(n.target)&&this.hide()}),it(this.toggle,n=>{n.stopPropagation(),this.show(n),n instanceof KeyboardEvent&&this.focusNext()});const t=n=>{n.key==="ArrowDown"||n.key==="ArrowRight"?(this.focusNext(),n.preventDefault()):n.key==="ArrowUp"||n.key==="ArrowLeft"?(this.focusPrevious(),n.preventDefault()):n.key==="Escape"&&(this.hide(),this.toggle.focus(),n.stopPropagation())};this.container.addEventListener("keydown",t),this.moveMenu&&this.menu.addEventListener("keydown",t),this.menu.addEventListener("keydown ",n=>{n.key==="Enter"&&(n.preventDefault(),n.stopPropagation(),this.hide())})}}var Wg=ox;const $g=$e(Fh());class ax{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;const t=this;this.dz=new $g.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:Number(window.uploadLimit)||256,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",t.onSending.bind(t)),this.dz.on("success",t.onSuccess.bind(t)),this.dz.on("error",t.onError.bind(t))}})}onSending(t,n,i){const s=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",s),n.ontimeout=u=>{this.dz.emit("complete",t),this.dz.emit("error",t,this.timeoutMessage)}}onSuccess(t,n){this.$emit("success",{file:t,data:n}),this.successMessage&&window.$events.emit("success",this.successMessage),Ga(t.previewElement,800,()=>{this.dz.removeFile(t)})}onError(t,n,i){this.$emit("error",{file:t,errorMessage:n,xhr:i});const s=u=>{const c=t.previewElement.querySelector("[data-dz-errormessage]");c.textContent=u};i&&i.status===413?s(this.uploadLimitMessage):n.file&&s(n.file)}removeAll(){this.dz.removeAllFiles(!0)}}var Gg=ax;class sx{constructor(t){this.elem=t,this.buttons=t.querySelectorAll("[toolbox-tab-button]"),this.contentElements=t.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=t.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",n=>{let i=n.target.closest("[toolbox-tab-button]");if(i===null)return;let s=i.getAttribute("toolbox-tab-button");this.setActiveTab(s,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const t=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",t)}setActiveTab(t,n=!1){for(let i=0,s=this.buttons.length;i{t.preventDefault(),this.runSearch()}),it(this.clearButton,this.clearSearch.bind(this))}runSearch(){const t=this.searchInput.value.trim();if(t.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const n=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(n,{term:t}).then(i=>{this.searchResults.innerHTML=i.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}}var Yg=ux;class cx{constructor(t){this.elem=t,this.search="",this.lastClick=0,this.selectedItemData=null;const n=t.hasAttribute("entity-types")?t.getAttribute("entity-types"):"page,book,chapter",i=t.hasAttribute("entity-permission")?t.getAttribute("entity-permission"):"view";this.searchUrl=window.baseUrl(`/ajax/search/entities?types=${encodeURIComponent(n)}&permission=${encodeURIComponent(i)}`),this.input=t.querySelector("[entity-selector-input]"),this.searchInput=t.querySelector("[entity-selector-search]"),this.loading=t.querySelector("[entity-selector-loading]"),this.resultsContainer=t.querySelector("[entity-selector-results]"),this.addButton=t.querySelector("[entity-selector-add-button]"),this.elem.addEventListener("click",this.onClick.bind(this));let s=0;this.searchInput.addEventListener("input",u=>{s=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-s<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",u=>{u.keyCode===13&&u.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",u=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),this.showLoading(),this.initialLoad()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl).then(t=>{this.resultsContainer.innerHTML=t.data,this.hideLoading()})}searchEntities(t){this.input.value="";let n=`${this.searchUrl}&term=${encodeURIComponent(t)}`;window.$http.get(n).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){let t=Date.now(),n=t-this.lastClick<300;return this.lastClick=t,n}onClick(t){const n=t.target.closest("[data-entity-type]");n&&(t.preventDefault(),t.stopPropagation(),this.selectItem(n))}selectItem(t){const n=this.isDoubleClick(),i=t.getAttribute("data-entity-type"),s=t.getAttribute("data-entity-id"),u=!t.classList.contains("selected")||n;this.unselectAll(),this.input.value=u?`${i}:${s}`:"";const c=t.getAttribute("href"),d=t.querySelector(".entity-list-item-name").textContent,h={id:Number(s),name:d,link:c};if(u?(t.classList.add("selected"),this.selectedItemData=h):window.$events.emit("entity-select-change",null),!n&&!u)return;n&&this.confirmSelection(h),u&&window.$events.emit("entity-select-change",h)}confirmSelection(t){window.$events.emit("entity-select-confirm",t)}unselectAll(){let t=this.elem.querySelectorAll(".selected");for(let n of t)n.classList.remove("selected","primary-background");this.selectedItemData=null}}var Xg=cx;class dx{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(t){this.callback=t,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(t){this.hide(),this.callback&&t&&this.callback(t)}onSelectionChange(t){this.selection=t,t===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var Zg=dx;class hx{setup(){this.container=this.$el,this.name=this.$opts.name,it(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var Qg=hx;class fx{constructor(t){this.elem=t,this.isOpen=t.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=t.getAttribute("expand-toggle-update-endpoint"),this.selector=t.getAttribute("expand-toggle"),t.addEventListener("click",this.click.bind(this))}open(t){pi(t,200)}close(t){fi(t,200)}click(t){t.preventDefault();const n=document.querySelectorAll(this.selector);for(let i of n)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(t){window.$http.patch(this.updateEndpoint,{expand:t?"true":"false"})}}var Jg=fx;class px{constructor(t){this.elem=t,this.typeControl=t.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=t.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const t=this.typeControl.value==="page";this.pagePickerContainer.style.display=t?"block":"none"}}var ev=px;class mx{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(){it(this.filterTabs,t=>{this.resetAll(),this.filter=t.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",t=>{this.resetListView(),this.loadGallery(),t.preventDefault()}),it(this.cancelSearch,t=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",t=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),zt(this.listContainer,".load-more","click",async t=>{no(t.target),this.page++,await this.loadGallery(),t.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),it(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),zt(this.formContainer,"#image-manager-delete","click",t=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(t,n="gallery"){this.resetAll(),this.callback=t,this.type=n,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",n!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const t={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:n}=await window.$http.get(`images/${this.type}`,t);this.addReturnedHtmlElementsToList(n),eg(this.listContainer)}addReturnedHtmlElementsToList(t){const n=document.createElement("div");n.innerHTML=t,window.components.init(n);for(const i of[...n.children])this.listContainer.appendChild(i)}setActiveFilterTab(t){this.filterTabs.forEach(i=>i.classList.remove("selected"));const n=this.filterTabs.find(i=>i.dataset.filter===t);n&&n.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){no(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(t){const n=JSON.parse(t.detail.data),i=n&&n.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,s=t.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(u=>{u.classList.remove("selected")}),s?this.resetEditForm():(t.target.classList.add("selected"),this.loadImageEditForm(n.id)),this.selectButton.classList.toggle("hidden",s),i&&this.callback&&(this.callback(n),this.hide()),this.lastSelected=n,this.lastSelectedTime=Date.now()}async loadImageEditForm(t,n=!1){n||(this.formContainer.innerHTML="");const i=n?{delete:!0}:{},{data:s}=await window.$http.get(`/images/edit/${t}`,i);this.formContainer.innerHTML=s,window.components.init(this.formContainer)}}var tv=mx;class gx{constructor(t){this.elem=t,this.imageElem=t.querySelector("img"),this.imageInput=t.querySelector("input[type=file]"),this.resetInput=t.querySelector("input[data-reset-input]"),this.removeInput=t.querySelector("input[data-remove-input]"),this.defaultImage=t.getAttribute("data-default-image");const n=t.querySelector('button[data-action="reset-image"]');n.addEventListener("click",this.reset.bind(this));const i=t.querySelector('button[data-action="remove-image"]');i&&i.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let t of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(t);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}}var nv=gx;class vx{constructor(t){this.elem=t,this.menu=t.querySelector("ul"),this.sortInput=t.querySelector('[name="sort"]'),this.orderInput=t.querySelector('[name="order"]'),this.form=t.querySelector("form"),this.menu.addEventListener("click",n=>{n.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(n)}),this.elem.addEventListener("click",n=>{n.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(n)})}sortOptionClick(t){const n=t.target.closest("[data-sort-value]");this.sortInput.value=n.getAttribute("data-sort-value"),t.preventDefault(),this.form.submit()}sortDirectionClick(t){const n=this.orderInput.value,i=n==="asc"?"desc":"asc";this.orderInput.value=i,t.preventDefault(),this.form.submit()}}var rv=vx;class bx{constructor(t){this.data=t}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const t=this.data.getData("text/rtf");return t&&t.includes("\\trowd")}getImages(){const t=this.data.types,n=this.data.files,i=[];for(const s of t)if(s.includes("image")){const u=this.data.getData(s);i.push(u.getAsFile())}for(const s of n)s.type.includes("image")&&i.push(s);return i}}var bo=bx;let Qn=null,Yl,Xl;function yx(t,n,i){Yl=n,Xl=i,Qn=document.createElement("iframe"),Qn.setAttribute("frameborder","0"),window.addEventListener("message",iv),Qn.setAttribute("src",t),Qn.setAttribute("class","fullscreen"),Qn.style.backgroundColor="#FFFFFF",document.body.appendChild(Qn)}function wx(){ov()}function iv(t){if(!t.data||t.data.length<1)return;let n=JSON.parse(t.data);n.event==="init"?_x():n.event==="exit"?ov():n.event==="save"?xx(n):n.event==="export"&&kx(n)}function kx(t){Xl&&Xl(t.data)}function xx(t){av({action:"export",format:"xmlpng",xml:t.xml,spin:"Updating drawing"})}function _x(){if(!Yl)return;Yl().then(t=>{av({action:"load",autosave:1,xml:t})})}function ov(){window.removeEventListener("message",iv),Qn&&document.body.removeChild(Qn)}function av(t){Qn.contentWindow.postMessage(JSON.stringify(t),"*")}async function Cx(t,n){let i={image:t,uploaded_to:n};const s=await window.$http.post(window.baseUrl("/images/drawio"),i);return s.data}async function Sx(t){const n=await window.$http.get(window.baseUrl(`/images/drawio/base64/${t}`));return`data:image/png;base64,${n.data.content}`}var dn={show:yx,close:wx,upload:Cx,load:Sx};const sv=$e(Um()),lv=$e(Vm());class Ex{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.markdown=new sv.default({html:!0}),this.markdown.use(lv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.htmlInput=this.elem.querySelector("input[name=html]"),this.cm=Nt.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const t=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?t():this.display.addEventListener("load",t.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let t=0;this.displayDoc.addEventListener("click",s=>{let u=Date.now()-t<300,c=s.target.closest("a");if(c!==null){s.preventDefault(),window.open(c.getAttribute("href"));return}let d=s.target.closest("[drawio-diagram]");if(d!==null&&u){this.actionEditDrawing(d);return}t=Date.now()}),this.elem.addEventListener("click",s=>{let u=s.target.closest("button[data-action]");if(u===null)return;let c=u.getAttribute("data-action");if(c==="insertImage"&&this.actionInsertImage(),c==="insertLink"&&this.actionShowLinkSelector(),c==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}c==="insertDrawing"&&this.actionStartDrawing(),c==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{const u=s.target.closest(".editor-toolbar-label");if(!u)return;const c=this.elem.querySelectorAll(".markdown-editor-wrap");for(let d of c)d.classList.remove("active");u.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",s=>{this.cm.setValue(s),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const n=new URL(window.location).searchParams,i=n.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const t=this.cm.getValue();this.input.value=t;const n=this.markdown.render(t);window.$events.emit("editor-html-change",n),window.$events.emit("editor-markdown-change",t),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=n,this.htmlInput.value=n,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";const t=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let n of t){const i=n.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(t){const n=this.displayDoc.body.children;if(n.length<=t)return;const i=t===-1?n[n.length-1]:n[t];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const t=this.cm,n=this;t.setOption("direction","ltr");let i=Nt.getMetaKey();const s={};s[`${i}-Alt-I`]=function(m){let b=m.getSelection(),w=`![${b}](http://)`,D=m.getCursor("from");m.replaceSelection(w),m.setCursor(D.line,D.ch+w.length-1)},s[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},s[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},s[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},s[`${i}-K`]=m=>{y()},s[`${i}-1`]=m=>{d("##")},s[`${i}-2`]=m=>{d("###")},s[`${i}-3`]=m=>{d("####")},s[`${i}-4`]=m=>{d("#####")},s[`${i}-5`]=m=>{d("")},s[`${i}-d`]=m=>{d("")},s[`${i}-6`]=m=>{d(">")},s[`${i}-q`]=m=>{d(">")},s[`${i}-7`]=m=>{p("\n```\n","\n```")},s[`${i}-8`]=m=>{p("`","`")},s[`Shift-${i}-E`]=m=>{p("`","`")},s[`${i}-9`]=m=>{p('

    ',"

    ")},t.setOption("extraKeys",s),t.on("change",(m,b)=>{this.updateAndRender()});const u=tg(m=>{let b=m.getScrollInfo(),w=b.top+b.clientHeight===b.height;if(w){this.onMarkdownScroll(-1);return}let D=m.lineAtHeight(b.top,"local"),E=m.getRange({line:0,ch:null},{line:D,ch:null}),S=new DOMParser,z=S.parseFromString(this.markdown.render(E),"text/html"),A=z.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(A.length)},100);t.on("scroll",m=>{u(m)}),t.on("paste",(m,b)=>{const w=new bo(b.clipboardData||b.dataTransfer);if(!w.hasItems()||w.containsTabularData())return;const D=w.getImages();for(const E of D)g(E)}),t.on("drop",(m,b)=>{const w=b.dataTransfer.getData("bookstack/template");if(w){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.preventDefault(),window.$http.get(`/templates/${w}`).then(S=>{const z=S.data.markdown||S.data.html;m.replaceSelection(z)})}const D=new bo(b.dataTransfer);if(D.hasItems()&&D.getImages().length>0){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.stopPropagation(),b.preventDefault();const S=D.getImages();for(const z of S)g(z)}});function c(m,b){let w=t.getValue(),D=t.listSelections();t.setValue(w.replace(m,b)),t.setSelections(D)}function d(m){let b=t.getCursor(),w=t.getLine(b.line),D=w.length,E=w.split(" ")[0];if(E===m){w=w.replace(`${m} `,""),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch-(m.length+1)});return}let S=/^[#>`]/.test(E),z=0;S?(z=m.length-E.length,w=w.replace(E,m).trim()):m!==""&&(z=m.length+1,w=m+" "+w),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch+z})}function h(m,b){let w=t.getCursor(),D=t.getLine(w.line),E=D.length,S=D;D.indexOf(m)===0&&D.slice(-b.length)===b?S=D.slice(m.length,D.length-b.length):S=`${m}${D}${b}`,t.replaceRange(S,{line:w.line,ch:0},{line:w.line,ch:E}),t.setCursor({line:w.line,ch:w.ch+m.length})}function p(m,b){let w=t.getSelection();if(w==="")return h(m,b);let D=w,E=0,S=0;w.indexOf(m)===0&&w.slice(-b.length)===b?(D=w.slice(m.length,w.length-b.length),S=-(b.length+m.length)):(D=`${m}${w}${b}`,S=m.length+b.length);let z=t.listSelections()[0];t.replaceSelection(D);let A=z.head.ch<=z.anchor.ch;z.head.ch+=A?E:S,z.anchor.ch+=A?S:E,t.setSelections([z])}function g(m){if(m===null||m.type.indexOf("image")!==0)return;let b="png";if(m.name){let U=m.name.match(/\.(.+)$/);U.length>1&&(b=U[1])}const w="image-"+Math.random().toString(16).slice(2),D=window.baseUrl(`/loading.gif#upload${w}`),E=t.getSelection(),S=`![${E}](${D})`,z=t.getCursor();t.replaceSelection(S),t.setCursor({line:z.line,ch:z.ch+E.length+3});const A="image-"+Date.now()+"."+b,R=new FormData;R.append("file",m,A),R.append("uploaded_to",n.pageId),window.$http.post("/images/gallery",R).then(U=>{const Y=`[![${E}](${U.data.thumbs.display})](${U.data.url})`;c(S,Y)}).catch(U=>{window.$events.emit("error",trans("errors.image_upload_error")),c(S,E),console.log(U)})}function y(){let m=t.getCursor("from"),b=t.getSelection()||"",w=`[${b}]()`;t.focus(),t.replaceSelection(w);let D=b===""?-3:-1;t.setCursor(m.line,m.ch+w.length+D)}this.updateAndRender()}actionInsertImage(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{let i=this.cm.getSelection(),s="[!["+(i||n.name)+"]("+n.thumbs.display+")]("+n.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)},"gallery")}actionShowImageManager(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{this.insertDrawing(n,t)},"drawio")}actionShowLinkSelector(){const t=this.cm.getCursor("from");window.EntitySelectorPopup.show(n=>{let i=this.cm.getSelection()||n.name,s=`[${i}](${n.link})`;this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)})}getDrawioUrl(){const t=document.querySelector("[drawio-url]");return t?t.getAttribute("drawio-url"):!1}actionStartDrawing(){const t=this.getDrawioUrl();if(!t)return;const n=this.cm.getCursor("from");dn.show(t,()=>Promise.resolve(""),i=>{const s={image:i,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),s).then(u=>{this.insertDrawing(u.data,n),dn.close()}).catch(u=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(u)})})}insertDrawing(t,n){const i=`
    `;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(n.line,n.ch+i.length)}actionEditDrawing(t){const n=this.getDrawioUrl();if(!n)return;const i=this.cm.getCursor("from"),s=t.getAttribute("drawio-diagram");dn.show(n,()=>dn.load(s),u=>{let c={image:u,uploaded_to:Number(document.getElementById("page-editor").getAttribute("page-id"))};window.$http.post(window.baseUrl("/images/drawio"),c).then(d=>{let h=`
    `,p=this.cm.getValue().split(` +`:">",c)};ni.prototype.renderInline=function(t,n,i){for(var s,u="",c=this.rules,d=0,h=t.length;d{"use strict";function xn(){this.__rules__=[],this.__cache__=null}xn.prototype.__find__=function(t){for(var n=0;n{"use strict";var Bw=/\r\n?|\n/g,jw=/\0/g;Ef.exports=function(n){var i;i=n.src.replace(Bw,` +`),i=i.replace(jw,"�"),n.src=i}});var Tf=ue((I_,Af)=>{"use strict";Af.exports=function(n){var i;n.inlineMode?(i=new n.Token("inline","",0),i.content=n.src,i.map=[0,1],i.children=[],n.tokens.push(i)):n.md.block.parse(n.src,n.md,n.env,n.tokens)}});var If=ue((F_,Lf)=>{"use strict";Lf.exports=function(n){var i=n.tokens,s,u,c;for(u=0,c=i.length;u{"use strict";var Hw=et().arrayReplaceAt;function Uw(t){return/^\s]/i.test(t)}function Ww(t){return/^<\/a\s*>/i.test(t)}Ff.exports=function(n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A=n.tokens,R;if(!n.md.options.linkify)return;for(s=0,u=A.length;s=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Uw(h.content)&&D>0&&D--,Ww(h.content)&&D++),D>0)continue;if(h.type==="text"&&n.md.linkify.test(h.content)){for(y=h.content,R=n.md.linkify.match(y),p=[],w=h.level,b=0,g=0;gb&&(d=new n.Token("text","",0),d.content=y.slice(b,m),d.level=w,p.push(d)),d=new n.Token("link_open","a",1),d.attrs=[["href",S]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new n.Token("text","",0),d.content=z,d.level=w,p.push(d),d=new n.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),b=R[g].lastIndex}b{"use strict";var zf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$w=/\((c|tm|r|p)\)/i,Gw=/\((c|tm|r|p)\)/ig,Kw={c:"©",r:"®",p:"§",tm:"™"};function Vw(t,n){return Kw[n.toLowerCase()]}function Yw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(i.content=i.content.replace(Gw,Vw)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Xw(t){var n,i,s=0;for(n=t.length-1;n>=0;n--)i=t[n],i.type==="text"&&!s&&(zf.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–"))),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}qf.exports=function(n){var i;if(!n.md.options.typographer)return;for(i=n.tokens.length-1;i>=0;i--){if(n.tokens[i].type!=="inline")continue;$w.test(n.tokens[i].content)&&Yw(n.tokens[i].children),zf.test(n.tokens[i].content)&&Xw(n.tokens[i].children)}}});var Uf=ue((z_,Rf)=>{"use strict";var Pf=et().isWhiteSpace,Nf=et().isPunctChar,Bf=et().isMdAsciiPunct,Zw=/['"]/,jf=/['"]/g,Hf="’";function ha(t,n,i){return t.substr(0,n)+i+t.substr(n+1)}function Qw(t,n){var i,s,u,c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B;for(U=[],i=0;i=0&&!(U[A].level<=p);A--);if(U.length=A+1,s.type!=="text")continue;u=s.content,d=0,h=u.length;e:for(;d=0)y=u.charCodeAt(c.index-1);else for(A=i-1;A>=0&&!(t[A].type==="softbreak"||t[A].type==="hardbreak");A--){if(!t[A].content)continue;y=t[A].content.charCodeAt(t[A].content.length-1);break}if(m=32,d=48&&y<=57&&(z=S=!1)),S&&z&&(S=b,z=w),!S&&!z){R&&(s.content=ha(s.content,c.index,Hf));continue}if(z){for(A=U.length-1;A>=0&&!(g=U[A],U[A].level=0;i--){if(n.tokens[i].type!=="inline"||!Zw.test(n.tokens[i].content))continue;Qw(n.tokens[i].children,n)}}});var fa=ue((O_,Wf)=>{"use strict";function ri(t,n,i){this.type=t,this.tag=n,this.attrs=null,this.map=null,this.nesting=i,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}ri.prototype.attrIndex=function(n){var i,s,u;if(!this.attrs)return-1;for(i=this.attrs,s=0,u=i.length;s=0&&(s=this.attrs[i][1]),s};ri.prototype.attrJoin=function(n,i){var s=this.attrIndex(n);s<0?this.attrPush([n,i]):this.attrs[s][1]=this.attrs[s][1]+" "+i};Wf.exports=ri});var Kf=ue((R_,$f)=>{"use strict";var Jw=fa();function Gf(t,n,i){this.src=t,this.env=i,this.tokens=[],this.inlineMode=!1,this.md=n}Gf.prototype.Token=Jw;$f.exports=Gf});var Yf=ue((P_,Vf)=>{"use strict";var ek=da(),ol=[["normalize",Df()],["block",Tf()],["inline",If()],["linkify",Mf()],["replacements",Of()],["smartquotes",Uf()]];function al(){this.ruler=new ek;for(var t=0;t{"use strict";var tk=et().isSpace;function sl(t,n){var i=t.bMarks[n]+t.blkIndent,s=t.eMarks[n];return t.src.substr(i,s-i)}function Zf(t){var n=[],i=0,s=t.length,u,c=0,d=0,h=!1,p=0;for(u=t.charCodeAt(i);is)return!1;if(g=i+1,n.sCount[g]=4)return!1;if(h=n.bMarks[g]+n.tShift[g],h>=n.eMarks[g])return!1;if(c=n.src.charCodeAt(h++),c!==124&&c!==45&&c!==58)return!1;for(;h=4)return!1;if(y=Zf(d.replace(/^\||\|$/g,"")),m=y.length,m>w.length)return!1;if(u)return!0;for(b=n.push("table_open","table",1),b.map=E=[i,0],b=n.push("thead_open","thead",1),b.map=[i,i+1],b=n.push("tr_open","tr",1),b.map=[i,i+1],p=0;p=4)break;for(y=Zf(d.replace(/^\||\|$/g,"")),b=n.push("tr_open","tr",1),p=0;p{"use strict";Jf.exports=function(n,i,s){var u,c,d;if(n.sCount[i]-n.blkIndent<4)return!1;for(c=u=i+1;u=4){u++,c=u;continue}break}return n.line=c,d=n.push("code_block","code",0),d.content=n.getLines(i,c,4+n.blkIndent,!0),d.map=[i,n.line],!0}});var np=ue((j_,tp)=>{"use strict";tp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b=!1,w=n.bMarks[i]+n.tShift[i],D=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(w+3>D)return!1;if(c=n.src.charCodeAt(w),c!==126&&c!==96)return!1;if(g=w,w=n.skipChars(w,c),d=w-g,d<3)return!1;if(m=n.src.slice(g,w),h=n.src.slice(w,D),c===96&&h.indexOf(String.fromCharCode(c))>=0)return!1;if(u)return!0;for(p=i;!(p++,p>=s);){if(w=g=n.bMarks[p]+n.tShift[p],D=n.eMarks[p],w=4)continue;if(w=n.skipChars(w,c),w-g{"use strict";var ip=et().isSpace;rp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y,B,G,ee,J=n.lineMax,O=n.bMarks[i]+n.tShift[i],Z=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(O++)!==62)return!1;if(u)return!0;for(p=w=n.sCount[i]+1,n.src.charCodeAt(O)===32?(O++,p++,w++,c=!1,U=!0):n.src.charCodeAt(O)===9?(U=!0,(n.bsCount[i]+w)%4===3?(O++,p++,w++,c=!1):c=!0):U=!1,D=[n.bMarks[i]],n.bMarks[i]=O;O=Z,A=[n.sCount[i]],n.sCount[i]=w-p,R=[n.tShift[i]],n.tShift[i]=O-n.bMarks[i],B=n.md.block.ruler.getRules("blockquote"),z=n.parentType,n.parentType="blockquote",b=i+1;b=Z);b++){if(n.src.charCodeAt(O++)===62&&!ee){for(p=w=n.sCount[b]+1,n.src.charCodeAt(O)===32?(O++,p++,w++,c=!1,U=!0):n.src.charCodeAt(O)===9?(U=!0,(n.bsCount[b]+w)%4===3?(O++,p++,w++,c=!1):c=!0):U=!1,D.push(n.bMarks[b]),n.bMarks[b]=O;O=Z,E.push(n.bsCount[b]),n.bsCount[b]=n.sCount[b]+1+(U?1:0),A.push(n.sCount[b]),n.sCount[b]=w-p,R.push(n.tShift[b]),n.tShift[b]=O-n.bMarks[b];continue}if(y)break;for(Y=!1,h=0,g=B.length;h",G.map=m=[i,0],n.md.block.tokenize(n,i,b),G=n.push("blockquote_close","blockquote",-1),G.markup=">",n.lineMax=J,n.parentType=z,m[1]=n.line,h=0;h{"use strict";var nk=et().isSpace;ap.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g++),c!==42&&c!==45&&c!==95)return!1;for(d=1;g{"use strict";var up=et().isSpace;function cp(t,n){var i,s,u,c;return s=t.bMarks[n]+t.tShift[n],u=t.eMarks[n],i=t.src.charCodeAt(s++),i!==42&&i!==45&&i!==43||s=c)return-1;if(i=t.src.charCodeAt(u++),i<48||i>57)return-1;for(;;){if(u>=c)return-1;if(i=t.src.charCodeAt(u++),i>=48&&i<=57){if(u-s>=10)return-1;continue}if(i===41||i===46)break;return-1}return u=4)return!1;if(n.listIndent>=0&&n.sCount[i]-n.listIndent>=4&&n.sCount[i]=n.blkIndent&&(I=!0)),(Z=dp(n,i))>=0){if(m=!0,V=n.bMarks[i]+n.tShift[i],z=Number(n.src.substr(V,Z-V-1)),I&&z!==1)return!1}else if((Z=cp(n,i))>=0)m=!1;else return!1;if(I&&n.skipSpaces(Z)>=n.eMarks[i])return!1;if(S=n.src.charCodeAt(Z-1),u)return!0;for(E=n.tokens.length,m?(q=n.push("ordered_list_open","ol",1),z!==1&&(q.attrs=[["start",z]])):q=n.push("bullet_list_open","ul",1),q.map=D=[i,0],q.markup=String.fromCharCode(S),R=i,_=!1,Q=n.md.block.ruler.getRules("list"),B=n.parentType,n.parentType="list";R=A?g=1:g=U-y,g>4&&(g=1),p=y+g,q=n.push("list_item_open","li",1),q.markup=String.fromCharCode(S),q.map=b=[i,0],J=n.tight,ee=n.tShift[i],G=n.sCount[i],Y=n.listIndent,n.listIndent=n.blkIndent,n.blkIndent=p,n.tight=!0,n.tShift[i]=d-n.bMarks[i],n.sCount[i]=U,d>=A&&n.isEmpty(i+1)?n.line=Math.min(n.line+2,s):n.md.block.tokenize(n,i,s,!0),(!n.tight||_)&&(H=!1),_=n.line-i>1&&n.isEmpty(n.line-1),n.blkIndent=n.listIndent,n.listIndent=Y,n.tShift[i]=ee,n.sCount[i]=G,n.tight=J,q=n.push("list_item_close","li",-1),q.markup=String.fromCharCode(S),R=i=n.line,b[1]=R,d=n.bMarks[i],R>=s)break;if(n.sCount[R]=4)break;for(j=!1,h=0,w=Q.length;h{"use strict";var ik=et().normalizeReference,pa=et().isSpace;fp.exports=function(n,i,s,u){var c,d,h,p,g,y,m,b,w,D,E,S,z,A,R,U,Y=0,B=n.bMarks[i]+n.tShift[i],G=n.eMarks[i],ee=i+1;if(n.sCount[i]-n.blkIndent>=4)return!1;if(n.src.charCodeAt(B)!==91)return!1;for(;++B3)continue;if(n.sCount[ee]<0)continue;for(A=!1,y=0,m=R.length;y{"use strict";var gp=et().isSpace;mp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(c=n.src.charCodeAt(g),c!==35||g>=y)return!1;for(d=1,c=n.src.charCodeAt(++g);c===35&&g6||gg&&gp(n.src.charCodeAt(h-1))&&(y=h),n.line=i+1,p=n.push("heading_open","h"+String(d),1),p.markup="########".slice(0,d),p.map=[i,n.line],p=n.push("inline","",0),p.content=n.src.slice(g,y).trim(),p.map=[i,n.line],p.children=[],p=n.push("heading_close","h"+String(d),-1),p.markup="########".slice(0,d)),!0)}});var yp=ue((K_,bp)=>{"use strict";bp.exports=function(n,i,s){var u,c,d,h,p,g,y,m,b,w=i+1,D,E=n.md.block.ruler.getRules("paragraph");if(n.sCount[i]-n.blkIndent>=4)return!1;for(D=n.parentType,n.parentType="paragraph";w3)continue;if(n.sCount[w]>=n.blkIndent&&(g=n.bMarks[w]+n.tShift[w],y=n.eMarks[w],g=y)))){m=b===61?1:2;break}if(n.sCount[w]<0)continue;for(c=!1,d=0,h=E.length;d{"use strict";wp.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","meta","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ul=ue((Y_,ll)=>{"use strict";var ok="[a-zA-Z_:][a-zA-Z0-9:._-]*",ak="[^\"'=<>`\\x00-\\x20]+",sk="'[^']*'",lk='"[^"]*"',uk="(?:"+ak+"|"+sk+"|"+lk+")",ck="(?:\\s+"+ok+"(?:\\s*=\\s*"+uk+")?)",xp="<[A-Za-z][A-Za-z0-9\\-]*"+ck+"*\\s*\\/?>",_p="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",dk="|",hk="<[?].*?[?]>",fk="]*>",pk="",mk=new RegExp("^(?:"+xp+"|"+_p+"|"+dk+"|"+hk+"|"+fk+"|"+pk+")"),gk=new RegExp("^(?:"+xp+"|"+_p+")");ll.exports.HTML_TAG_RE=mk;ll.exports.HTML_OPEN_CLOSE_TAG_RE=gk});var Sp=ue((X_,Cp)=>{"use strict";var vk=kp(),bk=ul().HTML_OPEN_CLOSE_TAG_RE,ii=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(bk.source+"\\s*$"),/^$/,!1]];Cp.exports=function(n,i,s,u){var c,d,h,p,g=n.bMarks[i]+n.tShift[i],y=n.eMarks[i];if(n.sCount[i]-n.blkIndent>=4)return!1;if(!n.md.options.html)return!1;if(n.src.charCodeAt(g)!==60)return!1;for(p=n.src.slice(g,y),c=0;c{"use strict";Ep.exports=function(n,i){var s,u,c,d,h,p,g=i+1,y=n.md.block.ruler.getRules("paragraph"),m=n.lineMax;for(p=n.parentType,n.parentType="paragraph";g3)continue;if(n.sCount[g]<0)continue;for(u=!1,c=0,d=y.length;c{"use strict";var Tp=fa(),ma=et().isSpace;function On(t,n,i,s){var u,c,d,h,p,g,y,m;for(this.src=t,this.md=n,this.env=i,this.tokens=s,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",c=this.src,m=!1,d=h=g=y=0,p=c.length;h0&&this.level++,this.tokens.push(s),s};On.prototype.isEmpty=function(n){return this.bMarks[n]+this.tShift[n]>=this.eMarks[n]};On.prototype.skipEmptyLines=function(n){for(var i=this.lineMax;ni;)if(!ma(this.src.charCodeAt(--n)))return n+1;return n};On.prototype.skipChars=function(n,i){for(var s=this.src.length;ns;)if(i!==this.src.charCodeAt(--n))return n+1;return n};On.prototype.getLines=function(n,i,s,u){var c,d,h,p,g,y,m,b=n;if(n>=i)return"";for(y=new Array(i-n),c=0;bs?y[c]=new Array(d-s+1).join(" ")+this.src.slice(p,g):y[c]=this.src.slice(p,g)}return y.join("")};On.prototype.Token=Tp;Ap.exports=On});var Fp=ue((J_,Ip)=>{"use strict";var yk=da(),ga=[["table",Qf(),["paragraph","reference"]],["code",ep()],["fence",np(),["paragraph","reference","blockquote","list"]],["blockquote",op(),["paragraph","reference","blockquote","list"]],["hr",sp(),["paragraph","reference","blockquote","list"]],["list",hp(),["paragraph","reference","blockquote"]],["reference",pp()],["heading",vp(),["paragraph","reference","blockquote"]],["lheading",yp()],["html_block",Sp(),["paragraph","reference","blockquote"]],["paragraph",Dp()]];function va(){this.ruler=new yk;for(var t=0;t=i);){if(t.sCount[h]=g){t.line=i;break}for(u=0;u{"use strict";function wk(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}Mp.exports=function(n,i){for(var s=n.pos;s{"use strict";var kk=et().isSpace;zp.exports=function(n,i){var s,u,c=n.pos;if(n.src.charCodeAt(c)!==10)return!1;for(s=n.pending.length-1,u=n.posMax,i||(s>=0&&n.pending.charCodeAt(s)===32?s>=1&&n.pending.charCodeAt(s-1)===32?(n.pending=n.pending.replace(/ +$/,""),n.push("hardbreak","br",0)):(n.pending=n.pending.slice(0,-1),n.push("softbreak","br",0)):n.push("softbreak","br",0)),c++;c{"use strict";var xk=et().isSpace,cl=[];for(var Pp=0;Pp<256;Pp++)cl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){cl[t.charCodeAt(0)]=1});Rp.exports=function(n,i){var s,u=n.pos,c=n.posMax;if(n.src.charCodeAt(u)!==92)return!1;if(u++,u{"use strict";Bp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos,y=n.src.charCodeAt(g);if(y!==96)return!1;for(s=g,g++,u=n.posMax;g{"use strict";dl.exports.tokenize=function(n,i){var s,u,c,d,h,p=n.pos,g=n.src.charCodeAt(p);if(i)return!1;if(g!==126)return!1;if(u=n.scanDelims(n.pos,!0),d=u.length,h=String.fromCharCode(g),d<2)return!1;for(d%2&&(c=n.push("text","",0),c.content=h,d--),s=0;s{"use strict";fl.exports.tokenize=function(n,i){var s,u,c,d=n.pos,h=n.src.charCodeAt(d);if(i)return!1;if(h!==95&&h!==42)return!1;for(u=n.scanDelims(n.pos,h===42),s=0;s=0;i--){if(s=n[i],s.marker!==95&&s.marker!==42)continue;if(s.end===-1)continue;u=n[s.end],h=i>0&&n[i-1].end===s.end+1&&n[i-1].token===s.token-1&&n[s.end+1].token===u.token+1&&n[i-1].marker===s.marker,d=String.fromCharCode(s.marker),c=t.tokens[s.token],c.type=h?"strong_open":"em_open",c.tag=h?"strong":"em",c.nesting=1,c.markup=h?d+d:d,c.content="",c=t.tokens[u.token],c.type=h?"strong_close":"em_close",c.tag=h?"strong":"em",c.nesting=-1,c.markup=h?d+d:d,c.content="",h&&(t.tokens[n[i-1].token].content="",t.tokens[n[s.end+1].token].content="",i--)}}fl.exports.postProcess=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(Up(n,n.delimiters),i=0;i{"use strict";var _k=et().normalizeReference,ml=et().isSpace;Wp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w="",D=n.pos,E=n.posMax,S=n.pos,z=!0;if(n.src.charCodeAt(n.pos)!==91)return!1;if(h=n.pos+1,d=n.md.helpers.parseLinkLabel(n,n.pos,!0),d<0)return!1;if(p=d+1,p=E)return!1;for(S=p,g=n.md.helpers.parseLinkDestination(n.src,p,n.posMax),g.ok&&(w=n.md.normalizeLink(g.str),n.md.validateLink(w)?p=g.pos:w=""),S=p;p=E||n.src.charCodeAt(p)!==41)&&(z=!0),p++}if(z){if(typeof n.env.references=="undefined")return!1;if(p=0?c=n.src.slice(S,p++):p=d+1):p=d+1,c||(c=n.src.slice(h,d)),y=n.env.references[_k(c)],!y)return n.pos=D,!1;w=y.href,m=y.title}return i||(n.pos=h,n.posMax=d,b=n.push("link_open","a",1),b.attrs=s=[["href",w]],m&&s.push(["title",m]),n.md.inline.tokenize(n),b=n.push("link_close","a",-1)),n.pos=p,n.posMax=E,!0}});var Kp=ue((s2,Gp)=>{"use strict";var Ck=et().normalizeReference,gl=et().isSpace;Gp.exports=function(n,i){var s,u,c,d,h,p,g,y,m,b,w,D,E,S="",z=n.pos,A=n.posMax;if(n.src.charCodeAt(n.pos)!==33)return!1;if(n.src.charCodeAt(n.pos+1)!==91)return!1;if(p=n.pos+2,h=n.md.helpers.parseLinkLabel(n,n.pos+1,!1),h<0)return!1;if(g=h+1,g=A)return!1;for(E=g,m=n.md.helpers.parseLinkDestination(n.src,g,n.posMax),m.ok&&(S=n.md.normalizeLink(m.str),n.md.validateLink(S)?g=m.pos:S=""),E=g;g=A||n.src.charCodeAt(g)!==41)return n.pos=z,!1;g++}else{if(typeof n.env.references=="undefined")return!1;if(g=0?d=n.src.slice(E,g++):g=h+1):g=h+1,d||(d=n.src.slice(p,h)),y=n.env.references[Ck(d)],!y)return n.pos=z,!1;S=y.href,b=y.title}return i||(c=n.src.slice(p,h),n.md.inline.parse(c,n.md,n.env,D=[]),w=n.push("image","img",0),w.attrs=s=[["src",S],["alt",""]],w.children=D,w.content=c,b&&s.push(["title",b])),n.pos=g,n.posMax=A,!0}});var Zp=ue((l2,Vp)=>{"use strict";var Yp=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,Xp=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;Vp.exports=function(n,i){var s,u,c,d,h,p,g=n.pos;return n.src.charCodeAt(g)!==60?!1:(s=n.src.slice(g),s.indexOf(">")<0?!1:Xp.test(s)?(u=s.match(Xp),d=u[0].slice(1,-1),h=n.md.normalizeLink(d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=u[0].length,!0):!1):Yp.test(s)?(c=s.match(Yp),d=c[0].slice(1,-1),h=n.md.normalizeLink("mailto:"+d),n.md.validateLink(h)?(i||(p=n.push("link_open","a",1),p.attrs=[["href",h]],p.markup="autolink",p.info="auto",p=n.push("text","",0),p.content=n.md.normalizeLinkText(d),p=n.push("link_close","a",-1),p.markup="autolink",p.info="auto"),n.pos+=c[0].length,!0):!1):!1)}});var Jp=ue((u2,Qp)=>{"use strict";var Sk=ul().HTML_TAG_RE;function Ek(t){var n=t|32;return n>=97&&n<=122}Qp.exports=function(n,i){var s,u,c,d,h=n.pos;return n.md.options.html?(c=n.posMax,n.src.charCodeAt(h)!==60||h+2>=c?!1:(s=n.src.charCodeAt(h+1),s!==33&&s!==63&&s!==47&&!Ek(s)?!1:(u=n.src.slice(h).match(Sk),u?(i||(d=n.push("html_inline","",0),d.content=n.src.slice(h,h+u[0].length)),n.pos+=u[0].length,!0):!1))):!1}});var rm=ue((c2,em)=>{"use strict";var tm=el(),Dk=et().has,Ak=et().isValidEntityCode,nm=et().fromCodePoint,Tk=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Lk=/^&([a-z][a-z0-9]{1,31});/i;em.exports=function(n,i){var s,u,c,d=n.pos,h=n.posMax;if(n.src.charCodeAt(d)!==38)return!1;if(d+1{"use strict";function om(t,n){var i,s,u,c,d,h,p,g,y={},m=n.length;for(i=0;id;s-=c.jump+1){if(c=n[s],c.marker!==u.marker)continue;if(h===-1&&(h=s),c.open&&c.end<0&&(p=!1,(c.close||u.open)&&((c.length+u.length)%3===0&&((c.length%3!==0||u.length%3!==0)&&(p=!0))),!p)){g=s>0&&!n[s-1].open?n[s-1].jump+1:0,u.jump=i-s+g,u.open=!1,c.end=i,c.jump=g,c.close=!1,h=-1;break}}h!==-1&&(y[u.marker][(u.length||0)%3]=h)}}im.exports=function(n){var i,s=n.tokens_meta,u=n.tokens_meta.length;for(om(n,n.delimiters),i=0;i{"use strict";sm.exports=function(n){var i,s,u=0,c=n.tokens,d=n.tokens.length;for(i=s=0;i0&&u++,c[i].type==="text"&&i+1{"use strict";var vl=fa(),cm=et().isWhiteSpace,dm=et().isPunctChar,hm=et().isMdAsciiPunct;function Zi(t,n,i,s){this.src=t,this.env=i,this.md=n,this.tokens=s,this.tokens_meta=Array(s.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}Zi.prototype.pushPending=function(){var t=new vl("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};Zi.prototype.push=function(t,n,i){this.pending&&this.pushPending();var s=new vl(t,n,i),u=null;return i<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),s.level=this.level,i>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],u={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(s),this.tokens_meta.push(u),s};Zi.prototype.scanDelims=function(t,n){var i=t,s,u,c,d,h,p,g,y,m,b=!0,w=!0,D=this.posMax,E=this.src.charCodeAt(t);for(s=t>0?this.src.charCodeAt(t-1):32;i{"use strict";var mm=da(),bl=[["text",qp()],["newline",Op()],["escape",Np()],["backticks",jp()],["strikethrough",hl().tokenize],["emphasis",pl().tokenize],["link",$p()],["image",Kp()],["autolink",Zp()],["html_inline",Jp()],["entity",rm()]],yl=[["balance_pairs",am()],["strikethrough",hl().postProcess],["emphasis",pl().postProcess],["text_collapse",lm()]];function Qi(){var t;for(this.ruler=new mm,t=0;t=c)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};Qi.prototype.parse=function(t,n,i,s){var u,c,d,h=new this.State(t,n,i,s);for(this.tokenize(h),c=this.ruler2.getRules(""),d=c.length,u=0;u{"use strict";vm.exports=function(t){var n={};n.src_Any=nl().source,n.src_Cc=rl().source,n.src_Z=il().source,n.src_P=aa().source,n.src_ZPCc=[n.src_Z,n.src_P,n.src_Cc].join("|"),n.src_ZCc=[n.src_Z,n.src_Cc].join("|");var i="[><|]";return n.src_pseudo_letter="(?:(?!"+i+"|"+n.src_ZPCc+")"+n.src_Any+")",n.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",n.src_auth="(?:(?:(?!"+n.src_ZCc+"|[@/\\[\\]()]).)+@)?",n.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",n.src_host_terminator="(?=$|"+i+"|"+n.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+n.src_ZPCc+"))",n.src_path="(?:[/?#](?:(?!"+n.src_ZCc+"|"+i+`|[()[\\]{}.,"'?!\\-]).|\\[(?:(?!`+n.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+n.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+n.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+n.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+n.src_ZCc+"|[']).)+\\'|\\'(?="+n.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+n.src_ZCc+"|[.]).|"+(t&&t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+n.src_ZCc+").|\\!+(?!"+n.src_ZCc+"|[!]).|\\?(?!"+n.src_ZCc+"|[?]).)+|\\/)?",n.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',n.src_xn="xn--[a-z0-9\\-]{1,59}",n.src_domain_root="(?:"+n.src_xn+"|"+n.src_pseudo_letter+"{1,63})",n.src_domain="(?:"+n.src_xn+"|(?:"+n.src_pseudo_letter+")|(?:"+n.src_pseudo_letter+"(?:-|"+n.src_pseudo_letter+"){0,61}"+n.src_pseudo_letter+"))",n.src_host="(?:(?:(?:(?:"+n.src_domain+")\\.)*"+n.src_domain+"))",n.tpl_host_fuzzy="(?:"+n.src_ip4+"|(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%)))",n.tpl_host_no_ip_fuzzy="(?:(?:(?:"+n.src_domain+")\\.)+(?:%TLDS%))",n.src_host_strict=n.src_host+n.src_host_terminator,n.tpl_host_fuzzy_strict=n.tpl_host_fuzzy+n.src_host_terminator,n.src_host_port_strict=n.src_host+n.src_port+n.src_host_terminator,n.tpl_host_port_fuzzy_strict=n.tpl_host_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_port_no_ip_fuzzy_strict=n.tpl_host_no_ip_fuzzy+n.src_port+n.src_host_terminator,n.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+n.src_ZPCc+"|>|$))",n.tpl_email_fuzzy="(^|"+i+'|"|\\(|'+n.src_ZCc+")("+n.src_email_name+"@"+n.tpl_host_fuzzy_strict+")",n.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_fuzzy_strict+n.src_path+")",n.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+n.src_ZPCc+"))((?![$+<=>^`||])"+n.tpl_host_port_no_ip_fuzzy_strict+n.src_path+")",n}});var Cm=ue((g2,ym)=>{"use strict";function wl(t){var n=Array.prototype.slice.call(arguments,1);return n.forEach(function(i){if(!i)return;Object.keys(i).forEach(function(s){t[s]=i[s]})}),t}function ba(t){return Object.prototype.toString.call(t)}function Ik(t){return ba(t)==="[object String]"}function Fk(t){return ba(t)==="[object Object]"}function Mk(t){return ba(t)==="[object RegExp]"}function wm(t){return ba(t)==="[object Function]"}function qk(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var km={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function zk(t){return Object.keys(t||{}).reduce(function(n,i){return n||km.hasOwnProperty(i)},!1)}var Ok={"http:":{validate:function(t,n,i){var s=t.slice(n);return i.re.http||(i.re.http=new RegExp("^\\/\\/"+i.re.src_auth+i.re.src_host_port_strict+i.re.src_path,"i")),i.re.http.test(s)?s.match(i.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,n,i){var s=t.slice(n);return i.re.no_http||(i.re.no_http=new RegExp("^"+i.re.src_auth+"(?:localhost|(?:(?:"+i.re.src_domain+")\\.)+"+i.re.src_domain_root+")"+i.re.src_port+i.re.src_host_terminator+i.re.src_path,"i")),i.re.no_http.test(s)?n>=3&&t[n-3]===":"||n>=3&&t[n-3]==="/"?0:s.match(i.re.no_http)[0].length:0}},"mailto:":{validate:function(t,n,i){var s=t.slice(n);return i.re.mailto||(i.re.mailto=new RegExp("^"+i.re.src_email_name+"@"+i.re.src_host_strict,"i")),i.re.mailto.test(s)?s.match(i.re.mailto)[0].length:0}}},Rk="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Pk="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function Nk(t){t.__index__=-1,t.__text_cache__=""}function Bk(t){return function(n,i){var s=n.slice(i);return t.test(s)?s.match(t)[0].length:0}}function xm(){return function(t,n){n.normalize(t)}}function ya(t){var n=t.re=bm()(t.__opts__),i=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||i.push(Rk),i.push(n.src_xn),n.src_tlds=i.join("|");function s(h){return h.replace("%TLDS%",n.src_tlds)}n.email_fuzzy=RegExp(s(n.tpl_email_fuzzy),"i"),n.link_fuzzy=RegExp(s(n.tpl_link_fuzzy),"i"),n.link_no_ip_fuzzy=RegExp(s(n.tpl_link_no_ip_fuzzy),"i"),n.host_fuzzy_test=RegExp(s(n.tpl_host_fuzzy_test),"i");var u=[];t.__compiled__={};function c(h,p){throw new Error('(LinkifyIt) Invalid schema "'+h+'": '+p)}Object.keys(t.__schemas__).forEach(function(h){var p=t.__schemas__[h];if(p===null)return;var g={validate:null,link:null};if(t.__compiled__[h]=g,Fk(p)){Mk(p.validate)?g.validate=Bk(p.validate):wm(p.validate)?g.validate=p.validate:c(h,p),wm(p.normalize)?g.normalize=p.normalize:p.normalize?c(h,p):g.normalize=xm();return}if(Ik(p)){u.push(h);return}c(h,p)}),u.forEach(function(h){if(!t.__compiled__[t.__schemas__[h]])return;t.__compiled__[h].validate=t.__compiled__[t.__schemas__[h]].validate,t.__compiled__[h].normalize=t.__compiled__[t.__schemas__[h]].normalize}),t.__compiled__[""]={validate:null,normalize:xm()};var d=Object.keys(t.__compiled__).filter(function(h){return h.length>0&&t.__compiled__[h]}).map(qk).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+n.src_ZPCc+"))("+d+")","ig"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),Nk(t)}function jk(t,n){var i=t.__index__,s=t.__last_index__,u=t.__text_cache__.slice(i,s);this.schema=t.__schema__.toLowerCase(),this.index=i+n,this.lastIndex=s+n,this.raw=u,this.text=u,this.url=u}function _m(t,n){var i=new jk(t,n);return t.__compiled__[i.schema].normalize(i,t),i}function mn(t,n){if(!(this instanceof mn))return new mn(t,n);n||zk(t)&&(n=t,t={}),this.__opts__=wl({},km,n),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wl({},Ok,t),this.__compiled__={},this.__tlds__=Pk,this.__tlds_replaced__=!1,this.re={},ya(this)}mn.prototype.add=function(n,i){return this.__schemas__[n]=i,ya(this),this};mn.prototype.set=function(n){return this.__opts__=wl(this.__opts__,n),this};mn.prototype.test=function(n){if(this.__text_cache__=n,this.__index__=-1,!n.length)return!1;var i,s,u,c,d,h,p,g,y;if(this.re.schema_test.test(n)){for(p=this.re.schema_search,p.lastIndex=0;(i=p.exec(n))!==null;)if(c=this.testSchemaAt(n,i[2],p.lastIndex),c){this.__schema__=i[2],this.__index__=i.index+i[1].length,this.__last_index__=i.index+i[0].length+c;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(g=n.search(this.re.host_fuzzy_test),g>=0&&((this.__index__<0||g=0&&((u=n.match(this.re.email_fuzzy))!==null&&(d=u.index+u[1].length,h=u.index+u[0].length,(this.__index__<0||dthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=d,this.__last_index__=h)))),this.__index__>=0};mn.prototype.pretest=function(n){return this.re.pretest.test(n)};mn.prototype.testSchemaAt=function(n,i,s){return this.__compiled__[i.toLowerCase()]?this.__compiled__[i.toLowerCase()].validate(n,s,this):0};mn.prototype.match=function(n){var i=0,s=[];this.__index__>=0&&this.__text_cache__===n&&(s.push(_m(this,i)),i=this.__last_index__);for(var u=i?n.slice(i):n;this.test(u);)s.push(_m(this,i)),u=u.slice(this.__last_index__),i+=this.__last_index__;return s.length?s:null};mn.prototype.tlds=function(n,i){return n=Array.isArray(n)?n:[n],i?(this.__tlds__=this.__tlds__.concat(n).sort().filter(function(s,u,c){return s!==c[u-1]}).reverse(),ya(this),this):(this.__tlds__=n.slice(),this.__tlds_replaced__=!0,ya(this),this)};mn.prototype.normalize=function(n){n.schema||(n.url="http://"+n.url),n.schema==="mailto:"&&!/^mailto:/i.test(n.url)&&(n.url="mailto:"+n.url)};mn.prototype.onCompile=function(){};ym.exports=mn});var qm=ue(Hk=>{Hy(Hk,{decode:()=>Sl,default:()=>Qk,encode:()=>El,toASCII:()=>Mm,toUnicode:()=>Fm,ucs2decode:()=>Cl,ucs2encode:()=>Tm});"use strict";const oi=2147483647,Rn=36,kl=1,Ji=26,Uk=38,Wk=700,Sm=72,Em=128,Dm="-",$k=/^xn--/,Gk=/[^\0-\x7E]/,Kk=/[\x2E\u3002\uFF0E\uFF61]/g,Vk={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},xl=Rn-kl,Pn=Math.floor,_l=String.fromCharCode;function Sr(t){throw new RangeError(Vk[t])}function Yk(t,n){const i=[];let s=t.length;for(;s--;)i[s]=n(t[s]);return i}function Am(t,n){const i=t.split("@");let s="";i.length>1&&(s=i[0]+"@",t=i[1]),t=t.replace(Kk,".");const u=t.split("."),c=Yk(u,n).join(".");return s+c}function Cl(t){const n=[];let i=0;const s=t.length;for(;i=55296&&u<=56319&&iString.fromCodePoint(...t),Xk=function(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:Rn},Lm=function(t,n){return t+22+75*(t<26)-((n!=0)<<5)},Im=function(t,n,i){let s=0;for(t=i?Pn(t/Wk):t>>1,t+=Pn(t/n);t>xl*Ji>>1;s+=Rn)t=Pn(t/xl);return Pn(s+(xl+1)*t/(t+Uk))},Sl=function(t){const n=[],i=t.length;let s=0,u=Em,c=Sm,d=t.lastIndexOf(Dm);d<0&&(d=0);for(let h=0;h=128&&Sr("not-basic"),n.push(t.charCodeAt(h));for(let h=d>0?d+1:0;h=i&&Sr("invalid-input");const b=Xk(t.charCodeAt(h++));(b>=Rn||b>Pn((oi-s)/y))&&Sr("overflow"),s+=b*y;const w=m<=c?kl:m>=c+Ji?Ji:m-c;if(bPn(oi/D)&&Sr("overflow"),y*=D}const g=n.length+1;c=Im(s-p,g,p==0),Pn(s/g)>oi-u&&Sr("overflow"),u+=Pn(s/g),s%=g,n.splice(s++,0,u)}return String.fromCodePoint(...n)},El=function(t){const n=[];t=Cl(t);let i=t.length,s=Em,u=0,c=Sm;for(const p of t)p<128&&n.push(_l(p));let d=n.length,h=d;for(d&&n.push(Dm);h=s&&yPn((oi-u)/g)&&Sr("overflow"),u+=(p-s)*g,s=p;for(const y of t)if(yoi&&Sr("overflow"),y==s){let m=u;for(let b=Rn;;b+=Rn){const w=b<=c?kl:b>=c+Ji?Ji:b-c;if(m{"use strict";zm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var Pm=ue((y2,Rm)=>{"use strict";Rm.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var Bm=ue((w2,Nm)=>{"use strict";Nm.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}});var Wm=ue((k2,jm)=>{"use strict";var eo=et(),Jk=xf(),e0=Cf(),t0=Yf(),n0=Fp(),r0=gm(),i0=Cm(),ai=tl(),Hm=qm(),o0={default:Om(),zero:Pm(),commonmark:Bm()},a0=/^(vbscript|javascript|file|data):/,s0=/^data:image\/(gif|png|jpeg|webp);/;function l0(t){var n=t.trim().toLowerCase();return a0.test(n)?!!s0.test(n):!0}var Um=["http:","https:","mailto:"];function u0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Um.indexOf(n.protocol)>=0))try{n.hostname=Hm.toASCII(n.hostname)}catch(i){}return ai.encode(ai.format(n))}function c0(t){var n=ai.parse(t,!0);if(n.hostname&&(!n.protocol||Um.indexOf(n.protocol)>=0))try{n.hostname=Hm.toUnicode(n.hostname)}catch(i){}return ai.decode(ai.format(n))}function gn(t,n){if(!(this instanceof gn))return new gn(t,n);n||(eo.isString(t)||(n=t||{},t="default")),this.inline=new r0,this.block=new n0,this.core=new t0,this.renderer=new e0,this.linkify=new i0,this.validateLink=l0,this.normalizeLink=u0,this.normalizeLinkText=c0,this.utils=eo,this.helpers=eo.assign({},Jk),this.options={},this.configure(t),n&&this.set(n)}gn.prototype.set=function(t){return eo.assign(this.options,t),this};gn.prototype.configure=function(t){var n=this,i;if(eo.isString(t)&&(i=t,t=o0[i],!t))throw new Error('Wrong `markdown-it` preset "'+i+'", check name');if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&n.set(t.options),t.components&&Object.keys(t.components).forEach(function(s){t.components[s].rules&&n[s].ruler.enableOnly(t.components[s].rules),t.components[s].rules2&&n[s].ruler2.enableOnly(t.components[s].rules2)}),this};gn.prototype.enable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.enable(t,!0))},this),i=i.concat(this.inline.ruler2.enable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+s);return this};gn.prototype.disable=function(t,n){var i=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(u){i=i.concat(this[u].ruler.disable(t,!0))},this),i=i.concat(this.inline.ruler2.disable(t,!0));var s=t.filter(function(u){return i.indexOf(u)<0});if(s.length&&!n)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+s);return this};gn.prototype.use=function(t){var n=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,n),this};gn.prototype.parse=function(t,n){if(typeof t!="string")throw new Error("Input data should be a String");var i=new this.core.State(t,this,n);return this.core.process(i),i.tokens};gn.prototype.render=function(t,n){return n=n||{},this.renderer.render(this.parse(t,n),this.options,n)};gn.prototype.parseInline=function(t,n){var i=new this.core.State(t,this,n);return i.inlineMode=!0,this.core.process(i),i.tokens};gn.prototype.renderInline=function(t,n){return n=n||{},this.renderer.render(this.parseInline(t,n),this.options,n)};jm.exports=gn});var Gm=ue((x2,$m)=>{"use strict";$m.exports=Wm()});var Zm=ue((_2,Km)=>{var Dl=!0,Vm=!1,Ym=!1;Km.exports=function(t,n){n&&(Dl=!n.enabled,Vm=!!n.label,Ym=!!n.labelAfter),t.core.ruler.after("inline","github-task-lists",function(i){for(var s=i.tokens,u=2;u=0;s--)if(t[s].level===i)return s;return-1}function h0(t,n){return p0(t[n])&&m0(t[n-1])&&g0(t[n-2])&&v0(t[n])}function f0(t,n){if(t.children.unshift(b0(t,n)),t.children[1].content=t.children[1].content.slice(3),t.content=t.content.slice(3),Vm)if(Ym){t.children.pop();var i="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);t.children[0].content=t.children[0].content.slice(0,-1)+' id="'+i+'">',t.children.push(k0(t.content,i,n))}else t.children.unshift(y0(n)),t.children.push(w0(n))}function b0(t,n){var i=new n("html_inline","",0),s=Dl?' disabled="" ':"";return t.content.indexOf("[ ] ")===0?i.content='':(t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0)&&(i.content=''),i}function y0(t){var n=new t("html_inline","",0);return n.content="",n}function k0(t,n,i){var s=new i("html_inline","",0);return s.content='",s.attrs=[{for:n}],s}function p0(t){return t.type==="inline"}function m0(t){return t.type==="paragraph_open"}function g0(t){return t.type==="list_item_open"}function v0(t){return t.content.indexOf("[ ] ")===0||t.content.indexOf("[x] ")===0||t.content.indexOf("[X] ")===0}});const to={},x0=[];function wa(t,n){if(x0.push({name:t,data:n}),typeof to[t]=="undefined")return this;let i=to[t];for(let s=0;swa("success",t),error:t=>wa("error",t),showValidationErrors:S0};async function E0(t,n={}){return Jm(t,{method:"GET",params:n})}async function D0(t,n=null){return ka("POST",t,n)}async function A0(t,n=null){return ka("PUT",t,n)}async function T0(t,n=null){return ka("PATCH",t,n)}async function L0(t,n=null){return ka("DELETE",t,n)}async function ka(t,n,i=null){const s={method:t,body:i};return typeof i=="object"&&!(i instanceof FormData)&&(s.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},s.body=JSON.stringify(i)),i instanceof FormData&&t!=="post"&&(i.append("_method",t),s.method="post"),Jm(n,s)}async function Jm(t,n={}){if(t.startsWith("http")||(t=window.baseUrl(t)),n.params){const d=new URL(t);for(let h of Object.keys(n.params)){const p=n.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}t=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");n=Object.assign({},n,{credentials:"same-origin"}),n.headers=Object.assign({},n.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(t,n),u=await I0(s),c={data:u,headers:s.headers,redirected:s.redirected,status:s.status,statusText:s.statusText,url:s.url,original:s};if(!s.ok)throw c;return c}async function I0(t){if(t.status===204)return null;const n=t.headers.get("Content-Type"),i=n.split("/").pop();return i==="javascript"||i==="json"?await t.json():await t.text()}var eg={get:E0,post:D0,put:A0,patch:T0,delete:L0};class F0{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){const t=document.querySelectorAll('meta[name="translation"]');for(let n of t){const i=n.getAttribute("key"),s=n.getAttribute("value");this.store.set(i,s)}}get(t,n){const i=this.getTransText(t);return this.performReplacements(i,n)}getPlural(t,n,i){const s=this.getTransText(t);return this.parsePlural(s,n,i)}parsePlural(t,n,i){const s=t.split("|"),u=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(u);if(p!==null&&Number(p[1])===n){d=h.replace(u,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=n&&(g[2]==="*"||Number(g[2])>=n)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=n===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(t){const n=this.store.get(t);return n===void 0&&console.warn(`Translation with key "${t}" does not exist`),n}performReplacements(t,n){if(!n)return t;const i=t.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const u=s.substring(1);if(typeof n[u]=="undefined")return;t=t.replace(s,n[u])}),t}}var tg=F0;function xa(t,n){const i=document.querySelectorAll(t);for(let s of i)n(s)}function _a(t,n,i){for(let s of n)t.addEventListener(s,i)}function ot(t,n){Array.isArray(t)||(t=[t]);for(const i of t)i.addEventListener("click",n),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n(s))})}function Ca(t,n){Array.isArray(t)||(t=[t]);const i=s=>{s.key==="Enter"&&n(s)};t.forEach(s=>s.addEventListener("keypress",i))}function zt(t,n,i,s){t.addEventListener(i,function(u){const c=u.target.closest(n);c&&s.call(c,u,c)})}function ng(t,n){const i=document.querySelectorAll(t);n=n.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(n))return s;return null}function no(t){t.innerHTML='
    '}function rg(t){const n=t.querySelectorAll(".loading-container");for(const i of n)i.remove()}function ig(t,n,i){let s;return function(){const u=this,c=arguments,d=function(){s=null,i||t.apply(u,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,n),h&&t.apply(u,c)}}function ro(t){if(!t)return;t.scrollIntoView({behavior:"smooth"});const n=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(t).getPropertyValue("background-color");t.style.backgroundColor=n,setTimeout(()=>{t.classList.add("selectFade"),t.style.backgroundColor=i},10),setTimeout(()=>{t.classList.remove("selectFade"),t.style.backgroundColor=""},3e3)}function og(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function ag(){const t=()=>((1+Math.random())*65536|0).toString(16).substring(1);return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}class M0{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),zt(this.$el,this.removeSelector,"click",t=>{const n=t.target.closest(this.rowSelector);n.remove()})}add(){const t=this.modelRow.cloneNode(!0);t.classList.remove("hidden"),this.setClonedInputNames(t),this.modelRow.parentNode.insertBefore(t,this.modelRow),window.components.init(t)}setClonedInputNames(t){const n=ag(),i=t.querySelectorAll('[name*="randrowid"]');for(const s of i)s.name=s.name.split("randrowid").join(n)}}var sg=M0;class q0{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,ot(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(t=>{typeof t.data=="object"&&t.data.message&&window.$events.emit("success",t.data.message),this.row.remove()}).catch(t=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}}var lg=q0;class z0{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Ca(this.container,t=>{this.submitFakeForm(),t.preventDefault()}),this.submitButtons.forEach(t=>ot(t,this.submitFakeForm.bind(this)))}submitFakeForm(){const t=new FormData,n=this.container.querySelectorAll("[name]");for(const i of n)t.append(i.getAttribute("name"),i.value);this.submit(t)}submitRealForm(t){t.preventDefault();const n=new FormData(this.container);this.submit(n)}async submit(t){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{const n=await window.$http[this.method.toLowerCase()](this.url,t);this.$emit("success",{formData:t}),this.responseContainer.innerHTML=n.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(n){this.responseContainer.innerHTML=n.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}}var ug=z0;class O0{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){const t=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",t),this.container.addEventListener("ajax-form-success",t),this.container.addEventListener("sortable-list-sort",n=>{this.updateOrder(n.detail.ids)}),this.container.addEventListener("event-emit-select-edit",n=>{this.startEdit(n.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",n=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",n=>{const i=n.target.closest("[data-drag-content]").getAttribute("data-drag-content"),s=JSON.parse(i);window.$events.emit("editor::insert",{html:s["text/html"],markdown:s["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(t=>{this.list.innerHTML=t.data,window.components.init(this.list)})}updateOrder(t){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:t}).then(n=>{window.$events.emit("success",n.data.message)})}async startEdit(t){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),no(this.editContainer);const n=await window.$http.get(`/attachments/edit/${t}`);this.editContainer.innerHTML=n.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}}var cg=O0;const Al={};class R0{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",t=>{t.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),zt(this.list,"button","click",(t,n)=>{this.selectSuggestion(n.textContent)}),zt(this.list,"button","keydown",(t,n)=>{t.key==="Enter"&&this.selectSuggestion(n.textContent)})}selectSuggestion(t){this.input.value=t,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(t){if(t.key==="Enter"&&t.preventDefault(),this.list.classList.contains("hidden"))return;t.key==="ArrowDown"?(this.moveFocus(!0),t.preventDefault()):t.key==="ArrowUp"?(this.moveFocus(!1),t.preventDefault()):t.key==="Escape"&&(this.hideSuggestions(),t.preventDefault())}moveFocus(t=!0){const n=Array.from(this.container.querySelectorAll("input,button")),i=n.indexOf(document.activeElement),s=n[i+(t?1:-1)];s&&s.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;const t=this.getNameFilterIfNeeded(),n=this.input.value.slice(0,3).toLowerCase(),i=await this.loadSuggestions(n,t);let s=i.slice(0,6);n.length>0&&(s=i.filter(u=>u.toLowerCase().includes(n)).slice(0,6)),this.displaySuggestions(s)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(t,n=null){const i={search:t,name:n},s=`${this.url}:${JSON.stringify(i)}`;if(Al[s])return Al[s];const u=await window.$http.get(this.url,i);return Al[s]=u.data,u.data}displaySuggestions(t){if(t.length===0)return this.hideSuggestions();this.list.innerHTML=t.map(n=>`
  • `).join(""),this.list.style.display="block";for(const n of this.list.querySelectorAll("button"))n.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(t){this.container.contains(t.relatedTarget)||this.hideSuggestions()}}var dg=R0;class P0{constructor(t){if(this.elem=t,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let t=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&t>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&t{this.elem.style.display="none"},500))}scrollToTop(){let t=this.targetElem.getBoundingClientRect().top,n=document.documentElement.scrollTop?document.documentElement:document.body,i=300,s=Date.now(),u=this.targetElem.getBoundingClientRect().top;function c(){let d=1-(Date.now()-s)/i,h=Math.abs(d*u);d>0?(n.scrollTop=h,requestAnimationFrame(c.bind(this))):n.scrollTop=t}requestAnimationFrame(c.bind(this))}}var hg=P0;function Yn(){return(Yn=Object.assign||function(t){for(var n=1;n"&&(n=n.substring(1)),t)try{if(t.matches)return t.matches(n);if(t.msMatchesSelector)return t.msMatchesSelector(n);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(n)}catch(i){return!1}return!1}}function B0(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function _n(t,n,i,s){if(t){i=i||document;do{if(n!=null&&(n[0]===">"?t.parentNode===i&&Ea(t,n):Ea(t,n))||s&&t===i)return t;if(t===i)break}while(t=B0(t))}return null}var oo,gg=/\s+/g;function ft(t,n,i){if(t&&n)if(t.classList)t.classList[i?"add":"remove"](n);else{var s=(" "+t.className+" ").replace(gg," ").replace(" "+n+" "," ");t.className=(s+(i?" "+n:"")).replace(gg," ")}}function Se(t,n,i){var s=t&&t.style;if(s){if(i===void 0)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(i=t.currentStyle),n===void 0?i:i[n];n in s||n.indexOf("webkit")!==-1||(n="-webkit-"+n),s[n]=i+(typeof i=="string"?"":"px")}}function Er(t,n){var i="";if(typeof t=="string")i=t;else do{var s=Se(t,"transform");s&&s!=="none"&&(i=s+" "+i)}while(!n&&(t=t.parentNode));var u=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return u&&new u(i)}function vg(t,n,i){if(t){var s=t.getElementsByTagName(n),u=0,c=s.length;if(i)for(;u=c:u<=c))return s;if(s===Nn())break;s=cr(s,!1)}return!1}function Da(t,n,i){for(var s=0,u=0,c=t.children;u=0||(y[p]=d[p]);return y}(s,["evt"]);so.pluginEvent.bind(Me)(t,n,Yn({dragEl:ge,parentEl:At,ghostEl:je,rootEl:pt,nextEl:Dr,lastDownEl:Aa,cloneEl:_t,cloneHidden:dr,dragStarted:co,putSortable:Ut,activeSortable:Me.active,originalEvent:u,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr,hideGhostForTarget:_g,unhideGhostForTarget:Cg,cloneNowHidden:function(){dr=!0},cloneNowShown:function(){dr=!1},dispatchSortableEvent:function(d){tn({sortable:n,name:d,originalEvent:u})}},c))};function tn(t){lo(Yn({putSortable:Ut,cloneEl:_t,targetEl:ge,rootEl:pt,oldIndex:si,oldDraggableIndex:uo,newIndex:ln,newDraggableIndex:hr},t))}var ge,At,je,pt,Dr,Aa,_t,dr,si,ln,uo,hr,Ta,Ut,li,Cn,ql,zl,Sg,Eg,co,ui,ho,La,Vt,ci=!1,Ia=!1,Fa=[],fo=!1,Ma=!1,Ol=[],Rl=!1,qa=[],za=typeof document!="undefined",Oa=pg,Dg=io||Zn?"cssFloat":"float",j0=za&&!N0&&!pg&&"draggable"in document.createElement("div"),Ag=function(){if(za){if(Zn)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Tg=function(t,n){var i=Se(t),s=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),u=Da(t,0,n),c=Da(t,1,n),d=u&&Se(u),h=c&&Se(c),p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+bt(u).width,g=h&&parseInt(h.marginLeft)+parseInt(h.marginRight)+bt(c).width;return i.display==="flex"?i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal":i.display==="grid"?i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":u&&d.float&&d.float!=="none"?!c||h.clear!=="both"&&h.clear!==(d.float==="left"?"left":"right")?"horizontal":"vertical":u&&(d.display==="block"||d.display==="flex"||d.display==="table"||d.display==="grid"||p>=s&&i[Dg]==="none"||c&&i[Dg]==="none"&&p+g>s)?"vertical":"horizontal"},Lg=function(t){function n(u,c){return function(d,h,p,g){if(u==null&&(c||d.options.group.name&&h.options.group.name&&d.options.group.name===h.options.group.name))return!0;if(u==null||u===!1)return!1;if(c&&u==="clone")return u;if(typeof u=="function")return n(u(d,h,p,g),c)(d,h,p,g);var y=(c?d:h).options.group.name;return u===!0||typeof u=="string"&&u===y||u.join&&u.indexOf(y)>-1}}var i={},s=t.group;s&&typeof s=="object"||(s={name:s}),i.name=s.name,i.checkPull=n(s.pull,!0),i.checkPut=n(s.put),i.revertClone=s.revertClone,t.group=i},_g=function(){!Ag&&je&&Se(je,"display","none")},Cg=function(){!Ag&&je&&Se(je,"display","")};za&&document.addEventListener("click",function(t){if(Ia)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ia=!1,!1},!0);var vn,Ar=function(t){if(ge){var n=(u=(t=t.touches?t.touches[0]:t).clientX,c=t.clientY,Fa.some(function(h){if(!Tl(h)){var p=bt(h),g=h[Kt].options.emptyInsertThreshold;return g&&u>=p.left-g&&u<=p.right+g&&c>=p.top-g&&c<=p.bottom+g?d=h:void 0}}),d);if(n){var i={};for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[Kt]._onDragOver(i)}}var u,c,d},H0=function(t){ge&&ge.parentNode[Kt]._isOutsideThisEl(t.target)};function Me(t,n){if(!t||!t.nodeType||t.nodeType!==1)throw"Sortable: `el` must be an HTMLElement, not "+{}.toString.call(t);this.el=t,this.options=n=Object.assign({},n),t[Kt]=this;var i,s,u={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Tg(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(h,p){h.setData("Text",p.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Me.supportPointer!==!1&&"PointerEvent"in window,emptyInsertThreshold:5};for(var c in so.initializePlugins(this,t,u),u)!(c in n)&&(n[c]=u[c]);for(var d in Lg(n),this)d.charAt(0)==="_"&&typeof this[d]=="function"&&(this[d]=this[d].bind(this));this.nativeDraggable=!n.forceFallback&&j0,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?Qe(t,"pointerdown",this._onTapStart):(Qe(t,"mousedown",this._onTapStart),Qe(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Qe(t,"dragover",this),Qe(t,"dragenter",this)),Fa.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Object.assign(this,(s=[],{captureAnimationState:function(){s=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(h){if(Se(h,"display")!=="none"&&h!==void 0){s.push({target:h,rect:bt(h)});var p=Yn({},s[s.length-1].rect);if(h.thisAnimationDuration){var g=Er(h,!0);g&&(p.top-=g.f,p.left-=g.e)}h.fromRect=p}})},addAnimationState:function(h){s.push(h)},removeAnimationState:function(h){s.splice(function(p,g){for(var y in p)if(p.hasOwnProperty(y)){for(var m in g)if(g.hasOwnProperty(m)&&g[m]===p[y][m])return Number(y)}return-1}(s,{target:h}),1)},animateAll:function(h){var p=this;if(!this.options.animation)return clearTimeout(i),void(typeof h=="function"&&h());var g=!1,y=0;s.forEach(function(m){var b=0,w=m.target,D=w.fromRect,E=bt(w),S=w.prevFromRect,z=w.prevToRect,A=m.rect,R=Er(w,!0);R&&(E.top-=R.f,E.left-=R.e),w.toRect=E,w.thisAnimationDuration&&Ll(S,E)&&!Ll(D,E)&&(A.top-E.top)/(A.left-E.left)==(D.top-E.top)/(D.left-E.left)&&(b=function(U,Y,B,G){return Math.sqrt(Math.pow(Y.top-U.top,2)+Math.pow(Y.left-U.left,2))/Math.sqrt(Math.pow(Y.top-B.top,2)+Math.pow(Y.left-B.left,2))*G.animation}(A,S,z,p.options)),Ll(E,D)||(w.prevFromRect=D,w.prevToRect=E,b||(b=p.options.animation),p.animate(w,A,E,b)),b&&(g=!0,y=Math.max(y,b),clearTimeout(w.animationResetTimer),w.animationResetTimer=setTimeout(function(){w.animationTime=0,w.prevFromRect=null,w.fromRect=null,w.prevToRect=null,w.thisAnimationDuration=null},b),w.thisAnimationDuration=b)}),clearTimeout(i),g?i=setTimeout(function(){typeof h=="function"&&h()},y):typeof h=="function"&&h(),s=[]},animate:function(h,p,g,y){if(y){Se(h,"transition",""),Se(h,"transform","");var m=Er(this.el),b=(p.left-g.left)/(m&&m.a||1),w=(p.top-g.top)/(m&&m.d||1);h.animatingX=!!b,h.animatingY=!!w,Se(h,"transform","translate3d("+b+"px,"+w+"px,0)"),this.forRepaintDummy=function(D){return D.offsetWidth}(h),Se(h,"transition","transform "+y+"ms"+(this.options.easing?" "+this.options.easing:"")),Se(h,"transform","translate3d(0,0,0)"),typeof h.animated=="number"&&clearTimeout(h.animated),h.animated=setTimeout(function(){Se(h,"transition",""),Se(h,"transform",""),h.animated=!1,h.animatingX=!1,h.animatingY=!1},y)}}}))}function Pl(t,n,i,s,u,c,d,h){var p,g,y=t[Kt],m=y.options.onMove;return!window.CustomEvent||Zn||io?(p=document.createEvent("Event")).initEvent("move",!0,!0):p=new CustomEvent("move",{bubbles:!0,cancelable:!0}),p.to=n,p.from=t,p.dragged=i,p.draggedRect=s,p.related=u||n,p.relatedRect=c||bt(n),p.willInsertAfter=h,p.originalEvent=d,t.dispatchEvent(p),m&&(g=m.call(y,p,d)),g}function Nl(t){t.draggable=!1}function U0(){Rl=!1}function W0(t){for(var n=t.tagName+t.className+t.src+t.href+t.textContent,i=n.length,s=0;i--;)s+=n.charCodeAt(i);return s.toString(36)}function Ra(t){return setTimeout(t,0)}function Bl(t){return clearTimeout(t)}Me.prototype={constructor:Me,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ui=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,ge):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,s=this.options,u=s.preventOnFilter,c=t.type,d=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,h=(d||t).target,p=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||h,g=s.filter;if(function(y){qa.length=0;for(var m=y.getElementsByTagName("input"),b=m.length;b--;){var w=m[b];w.checked&&qa.push(w)}}(i),!ge&&!(/mousedown|pointerdown/.test(c)&&t.button!==0||s.disabled)&&!p.isContentEditable&&(this.nativeDraggable||!Sa||!h||h.tagName.toUpperCase()!=="SELECT")&&!((h=_n(h,s.draggable,i,!1))&&h.animated||Aa===h)){if(si=yt(h),uo=yt(h,s.draggable),typeof g=="function"){if(g.call(this,t,h,this))return tn({sortable:n,rootEl:p,name:"filter",targetEl:h,toEl:i,fromEl:i}),on("filter",n,{evt:t}),void(u&&t.cancelable&&t.preventDefault())}else if(g&&(g=g.split(",").some(function(y){if(y=_n(p,y.trim(),i,!1))return tn({sortable:n,rootEl:y,name:"filter",targetEl:h,fromEl:i,toEl:i}),on("filter",n,{evt:t}),!0})))return void(u&&t.cancelable&&t.preventDefault());s.handle&&!_n(p,s.handle,i,!1)||this._prepareDragStart(t,d,h)}}},_prepareDragStart:function(t,n,i){var s,u=this,c=u.el,d=u.options,h=c.ownerDocument;if(i&&!ge&&i.parentNode===c){var p=bt(i);if(pt=c,At=(ge=i).parentNode,Dr=ge.nextSibling,Aa=i,Ta=d.group,Me.dragged=ge,Sg=(li={target:ge,clientX:(n||t).clientX,clientY:(n||t).clientY}).clientX-p.left,Eg=li.clientY-p.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,ge.style["will-change"]="all",s=function(){on("delayEnded",u,{evt:t}),Me.eventCanceled?u._onDrop():(u._disableDelayedDragEvents(),!fg&&u.nativeDraggable&&(ge.draggable=!0),u._triggerDragStart(t,n),tn({sortable:u,name:"choose",originalEvent:t}),ft(ge,d.chosenClass,!0))},d.ignore.split(",").forEach(function(g){vg(ge,g.trim(),Nl)}),Qe(h,"dragover",Ar),Qe(h,"mousemove",Ar),Qe(h,"touchmove",Ar),Qe(h,"mouseup",u._onDrop),Qe(h,"touchend",u._onDrop),Qe(h,"touchcancel",u._onDrop),fg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ge.draggable=!0),on("delayStart",this,{evt:t}),!d.delay||d.delayOnTouchOnly&&!n||this.nativeDraggable&&(io||Zn))s();else{if(Me.eventCanceled)return void this._onDrop();Qe(h,"mouseup",u._disableDelayedDrag),Qe(h,"touchend",u._disableDelayedDrag),Qe(h,"touchcancel",u._disableDelayedDrag),Qe(h,"mousemove",u._delayedDragTouchMoveHandler),Qe(h,"touchmove",u._delayedDragTouchMoveHandler),d.supportPointer&&Qe(h,"pointermove",u._delayedDragTouchMoveHandler),u._dragStartTimer=setTimeout(s,d.delay)}}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ge&&Nl(ge),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;We(t,"mouseup",this._disableDelayedDrag),We(t,"touchend",this._disableDelayedDrag),We(t,"touchcancel",this._disableDelayedDrag),We(t,"mousemove",this._delayedDragTouchMoveHandler),We(t,"touchmove",this._delayedDragTouchMoveHandler),We(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?Qe(document,this.options.supportPointer?"pointermove":n?"touchmove":"mousemove",this._onTouchMove):(Qe(ge,"dragend",this),Qe(pt,"dragstart",this._onDragStart));try{document.selection?Ra(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(i){}},_dragStarted:function(t,n){if(ci=!1,pt&&ge){on("dragStarted",this,{evt:n}),this.nativeDraggable&&Qe(document,"dragover",H0);var i=this.options;!t&&ft(ge,i.dragClass,!1),ft(ge,i.ghostClass,!0),Me.active=this,t&&this._appendGhost(),tn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cn){this._lastX=Cn.clientX,this._lastY=Cn.clientY,_g();for(var t=document.elementFromPoint(Cn.clientX,Cn.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cn.clientX,Cn.clientY))!==n;)n=t;if(ge.parentNode[Kt]._isOutsideThisEl(t),n)do{if(n[Kt]&&n[Kt]._onDragOver({clientX:Cn.clientX,clientY:Cn.clientY,target:t,rootEl:n})&&!this.options.dragoverBubble)break;t=n}while(n=n.parentNode);Cg()}},_onTouchMove:function(t){if(li){var n=this.options,i=n.fallbackTolerance,s=n.fallbackOffset,u=t.touches?t.touches[0]:t,c=je&&Er(je,!0),d=je&&c&&c.a,h=je&&c&&c.d,p=Oa&&Vt&&yg(Vt),g=(u.clientX-li.clientX+s.x)/(d||1)+(p?p[0]-Ol[0]:0)/(d||1),y=(u.clientY-li.clientY+s.y)/(h||1)+(p?p[1]-Ol[1]:0)/(h||1);if(!Me.active&&!ci){if(i&&Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))se.right+10||q.clientX<=se.right&&q.clientY>se.bottom&&q.clientX>=se.left:q.clientX>se.right&&q.clientY>se.top||q.clientX<=se.right&&q.clientY>se.bottom+10}(t,u,this)&&!E.animated){if(E===ge)return j(!1);if(E&&c===t.target&&(d=E),d&&(i=bt(d)),Pl(pt,c,ge,n,d,i,t,!!d)!==!1)return V(),c.appendChild(ge),At=c,Q(),j(!0)}else if(d.parentNode===c){i=bt(d);var S,z,A,R=ge.parentNode!==c,U=!function(q,I,H){var se=H?q.left:q.top,F=H?I.left:I.top;return se===F||(H?q.right:q.bottom)===(H?I.right:I.bottom)||se+(H?q.width:q.height)/2===F+(H?I.width:I.height)/2}(ge.animated&&ge.toRect||n,d.animated&&d.toRect||i,u),Y=u?"top":"left",B=bg(d,"top","top")||bg(ge,"top","top"),G=B?B.scrollTop:void 0;if(ui!==d&&(z=i[Y],fo=!1,Ma=!U&&h.invertSwap||R),(S=function(q,I,H,se,F,T,de,ce){var oe=se?q.clientY:q.clientX,xe=se?H.height:H.width,Oe=se?H.top:H.left,ye=se?H.bottom:H.right,re=!1;if(!de){if(ce&&LaOe+xe*T/2:oeye-La)return-ho}else if(oe>Oe+xe*(1-F)/2&&oeye-xe*T/2)?oe>Oe+xe/2?1:-1:0}(t,d,i,u,U?1:h.swapThreshold,h.invertedSwapThreshold==null?h.swapThreshold:h.invertedSwapThreshold,Ma,ui===d))!==0){var ee=yt(ge);do A=At.children[ee-=S];while(A&&(Se(A,"display")==="none"||A===je))}if(S===0||A===d)return j(!1);ui=d,ho=S;var J=d.nextElementSibling,O=!1,Z=Pl(pt,c,ge,n,d,i,t,O=S===1);if(Z!==!1)return Z!==1&&Z!==-1||(O=Z===1),Rl=!0,setTimeout(U0,30),V(),O&&!J?c.appendChild(ge):d.parentNode.insertBefore(ge,O?J:d),B&&kg(B,0,G-B.scrollTop),At=ge.parentNode,z===void 0||Ma||(La=Math.abs(z-bt(d)[Y])),Q(),j(!0)}if(c.contains(ge))return j(!1)}return!1}function _(q,I){on(q,w,Yn({evt:t,isOwner:y,axis:u?"vertical":"horizontal",revert:s,dragRect:n,targetRect:i,canSort:m,fromSortable:b,target:d,completed:j,onMove:function(H,se){return Pl(pt,c,ge,n,H,bt(H),t,se)},changed:Q},I))}function V(){_("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function j(q){return _("dragOverCompleted",{insertion:q}),q&&(y?g._hideClone():g._showClone(w),w!==b&&(ft(ge,Ut?Ut.options.ghostClass:g.options.ghostClass,!1),ft(ge,h.ghostClass,!0)),Ut!==w&&w!==Me.active?Ut=w:w===Me.active&&Ut&&(Ut=null),b===w&&(w._ignoreWhileAnimating=d),w.animateAll(function(){_("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(d===ge&&!ge.animated||d===c&&!d.animated)&&(ui=null),h.dragoverBubble||t.rootEl||d===document||(ge.parentNode[Kt]._isOutsideThisEl(t.target),!q&&Ar(t)),!h.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),D=!0}function Q(){ln=yt(ge),hr=yt(ge,h.draggable),tn({sortable:w,name:"change",toEl:c,newIndex:ln,newDraggableIndex:hr,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){We(document,"mousemove",this._onTouchMove),We(document,"touchmove",this._onTouchMove),We(document,"pointermove",this._onTouchMove),We(document,"dragover",Ar),We(document,"mousemove",Ar),We(document,"touchmove",Ar)},_offUpEvents:function(){var t=this.el.ownerDocument;We(t,"mouseup",this._onDrop),We(t,"touchend",this._onDrop),We(t,"pointerup",this._onDrop),We(t,"touchcancel",this._onDrop),We(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;ln=yt(ge),hr=yt(ge,i.draggable),on("drop",this,{evt:t}),At=ge&&ge.parentNode,ln=yt(ge),hr=yt(ge,i.draggable),Me.eventCanceled||(ci=!1,Ma=!1,fo=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bl(this.cloneId),Bl(this._dragStartId),this.nativeDraggable&&(We(document,"drop",this),We(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Sa&&Se(document.body,"user-select",""),Se(ge,"transform",""),t&&(co&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),je&&je.parentNode&&je.parentNode.removeChild(je),(pt===At||Ut&&Ut.lastPutMode!=="clone")&&_t&&_t.parentNode&&_t.parentNode.removeChild(_t),ge&&(this.nativeDraggable&&We(ge,"dragend",this),Nl(ge),ge.style["will-change"]="",co&&!ci&&ft(ge,Ut?Ut.options.ghostClass:this.options.ghostClass,!1),ft(ge,this.options.chosenClass,!1),tn({sortable:this,name:"unchoose",toEl:At,newIndex:null,newDraggableIndex:null,originalEvent:t}),pt!==At?(ln>=0&&(tn({rootEl:At,name:"add",toEl:At,fromEl:pt,originalEvent:t}),tn({sortable:this,name:"remove",toEl:At,originalEvent:t}),tn({rootEl:At,name:"sort",toEl:At,fromEl:pt,originalEvent:t}),tn({sortable:this,name:"sort",toEl:At,originalEvent:t})),Ut&&Ut.save()):ln!==si&&ln>=0&&(tn({sortable:this,name:"update",toEl:At,originalEvent:t}),tn({sortable:this,name:"sort",toEl:At,originalEvent:t})),Me.active&&(ln!=null&&ln!==-1||(ln=si,hr=uo),tn({sortable:this,name:"end",toEl:At,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){on("nulling",this),pt=ge=At=je=Dr=_t=Aa=dr=li=Cn=co=ln=hr=si=uo=ui=ho=Ut=Ta=Me.dragged=Me.ghost=Me.clone=Me.active=null,qa.forEach(function(t){t.checked=!0}),qa.length=ql=zl=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":ge&&(this._onDragOver(t),function(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,n=[],i=this.el.children,s=0,u=i.length,c=this.options;s1&&(Re.forEach(function(d){u.addAnimationState({target:d,rect:cn?bt(d):c}),Fl(d),d.fromRect=c,i.removeAnimationState(d)}),cn=!1,function(d,h){Re.forEach(function(p,g){var y=h.children[p.sortableIndex+(d?Number(g):0)];y?h.insertBefore(p,y):h.appendChild(p)})}(!this.options.removeCloneOnHide,s))},dragOverCompleted:function(n){var i=n.sortable,s=n.isOwner,u=n.activeSortable,c=n.parentEl,d=n.putSortable,h=this.options;if(n.insertion){if(s&&u._hideClone(),go=!1,h.animation&&Re.length>1&&(cn||!s&&!u.options.sort&&!d)){var p=bt(at,!1,!0,!0);Re.forEach(function(y){y!==at&&(xg(y,p),c.appendChild(y))}),cn=!0}if(!s)if(cn||Na(),Re.length>1){var g=Pa;u._showClone(i),u.options.animation&&!Pa&&g&&un.forEach(function(y){u.addAnimationState({target:y,rect:mo}),y.fromRect=mo,y.thisAnimationDuration=null})}else u._showClone(i)}},dragOverAnimationCapture:function(n){var i=n.dragRect,s=n.isOwner,u=n.activeSortable;if(Re.forEach(function(d){d.thisAnimationDuration=null}),u.options.animation&&!s&&u.multiDrag.isMultiDrag){mo=Object.assign({},i);var c=Er(at,!0);mo.top-=c.f,mo.left-=c.e}},dragOverAnimationComplete:function(){cn&&(cn=!1,Na())},drop:function(n){var i=n.originalEvent,s=n.rootEl,u=n.parentEl,c=n.sortable,d=n.dispatchSortableEvent,h=n.oldIndex,p=n.putSortable,g=p||this.sortable;if(i){var y=this.options,m=u.children;if(!di)if(y.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),ft(at,y.selectedClass,!~Re.indexOf(at)),~Re.indexOf(at))Re.splice(Re.indexOf(at),1),po=null,lo({sortable:c,rootEl:s,name:"deselect",targetEl:at,originalEvt:i});else{if(Re.push(at),lo({sortable:c,rootEl:s,name:"select",targetEl:at,originalEvt:i}),i.shiftKey&&po&&c.el.contains(po)){var b,w,D=yt(po),E=yt(at);if(~D&&~E&&D!==E)for(E>D?(w=D,b=E):(w=E,b=D+1);w1){var S=bt(at),z=yt(at,":not(."+this.options.selectedClass+")");if(!go&&y.animation&&(at.thisAnimationDuration=null),g.captureAnimationState(),!go&&(y.animation&&(at.fromRect=S,Re.forEach(function(R){if(R.thisAnimationDuration=null,R!==at){var U=cn?bt(R):S;R.fromRect=U,g.addAnimationState({target:R,rect:U})}})),Na(),Re.forEach(function(R){m[z]?u.insertBefore(R,m[z]):u.appendChild(R),z++}),h===yt(at))){var A=!1;Re.forEach(function(R){R.sortableIndex===yt(R)||(A=!0)}),A&&d("update")}Re.forEach(function(R){Fl(R)}),g.animateAll()}Sn=g}(s===u||p&&p.lastPutMode!=="clone")&&un.forEach(function(R){R.parentNode&&R.parentNode.removeChild(R)})}},nullingGlobal:function(){this.isMultiDrag=di=!1,un.length=0},destroyGlobal:function(){this._deselectMultiDrag(),We(document,"pointerup",this._deselectMultiDrag),We(document,"mouseup",this._deselectMultiDrag),We(document,"touchend",this._deselectMultiDrag),We(document,"keydown",this._checkKeyDown),We(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(di!==void 0&&di||Sn!==this.sortable||n&&_n(n.target,this.options.draggable,this.sortable.el,!1)||n&&n.button!==0))for(;Re.length;){var i=Re[0];ft(i,this.options.selectedClass,!1),Re.shift(),lo({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:n})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},Object.assign(t,{pluginName:"multiDrag",utils:{select:function(n){var i=n.parentNode[Kt];i&&i.options.multiDrag&&!~Re.indexOf(n)&&(Sn&&Sn!==i&&(Sn.multiDrag._deselectMultiDrag(),Sn=i),ft(n,i.options.selectedClass,!0),Re.push(n))},deselect:function(n){var i=n.parentNode[Kt],s=Re.indexOf(n);i&&i.options.multiDrag&&~s&&(ft(n,i.options.selectedClass,!1),Re.splice(s,1))}},eventProperties:function(){var n=this,i=[],s=[];return Re.forEach(function(u){var c;i.push({multiDragElement:u,index:u.sortableIndex}),c=cn&&u!==at?-1:cn?yt(u,":not(."+n.options.selectedClass+")"):yt(u),s.push({multiDragElement:u,index:c})}),{items:[].concat(Re),clones:[].concat(un),oldIndicies:i,newIndicies:s}},optionListeners:{multiDragKey:function(n){return(n=n.toLowerCase())==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})});var hi=Me;const qg={name:function(t,n){const i=t.getAttribute("data-name").trim().toLowerCase(),s=n.getAttribute("data-name").trim().toLowerCase();return i.localeCompare(s)},created:function(t,n){const i=Number(t.getAttribute("data-created")),s=Number(n.getAttribute("data-created"));return s-i},updated:function(t,n){const i=Number(t.getAttribute("data-updated")),s=Number(n.getAttribute("data-updated"));return s-i},chaptersFirst:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?-1:1},chaptersLast:function(t,n){const i=t.getAttribute("data-type"),s=n.getAttribute("data-type");return i===s?0:i==="chapter"?1:-1}};class $0{constructor(t){this.elem=t,this.sortContainer=t.querySelector("[book-sort-boxes]"),this.input=t.querySelector("[book-sort-input]");const n=t.querySelector(".sort-box");this.setupBookSortable(n),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let t="",n=!1;const i=["name","created","updated"];this.sortContainer.addEventListener("click",s=>{const u=s.target.closest(".sort-box-options [data-sort]");if(!u)return;s.preventDefault();const c=u.closest(".sort-box").querySelectorAll("ul"),d=u.getAttribute("data-sort");n=t===d?!n:!1;let h=qg[d];n&&i.includes(d)&&(h=function(p,g){return 0-qg[d](p,g)});for(let p of c){const g=Array.from(p.children).filter(y=>y.matches("li"));g.sort(h).forEach(y=>{p.appendChild(y)})}t=d,this.updateMapInput()})}bookSelect(t){const n=this.elem.querySelector(`[data-type="book"][data-id="${t.id}"]`)!==null;if(n)return;const i=t.link+"/sort-item";window.$http.get(i).then(s=>{const u=document.createElement("div");u.innerHTML=s.data;const c=u.children[0];this.sortContainer.append(c),this.setupBookSortable(c)})}setupBookSortable(t){const n=[t.querySelector(".sort-list")];n.push(...t.querySelectorAll(".entity-list-item + ul"));const i={name:"book",pull:["book","chapter"],put:["book","chapter"]},s={name:"chapter",pull:["book","chapter"],put:function(u,c,d){return d.getAttribute("data-type")==="page"}};for(let u of n)new hi(u,{group:u.classList.contains("sort-list")?i:s,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){const t=this.buildEntityMap();this.input.value=JSON.stringify(t)}buildEntityMap(){const t=[],n=this.elem.querySelectorAll(".sort-list");for(let i of n){const s=i.closest('[data-type="book"]').getAttribute("data-id"),u=Array.from(i.children).filter(c=>c.matches('[data-type="page"], [data-type="chapter"]'));for(let c=0;c{this.entityListElem.innerHTML=n.data}).catch(n=>{console.error(n)}).then(()=>{this.toggleLoading(!1),this.onSearch()})}toggleLoading(t=!1){this.loadingElem.style.display=t?"block":"none"}}var Og=G0;const Ua=new WeakMap;function Rg(t,n=400,i=null){$a(t),t.style.display="block",Wa(t,{opacity:["0","1"]},n,()=>{i&&i()})}function Ga(t,n=400,i=null){$a(t),Wa(t,{opacity:["1","0"]},n,()=>{t.style.display="none",i&&i()})}function fi(t,n=400){$a(t);const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:[`${i}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[u,"0px"],paddingBottom:[c,"0px"]};Wa(t,d,n,()=>{t.style.display="none"})}function pi(t,n=400){$a(t),t.style.display="block";const i=t.getBoundingClientRect().height,s=getComputedStyle(t),u=s.getPropertyValue("padding-top"),c=s.getPropertyValue("padding-bottom"),d={height:["0px",`${i}px`],overflow:["hidden","hidden"],paddingTop:["0px",u],paddingBottom:["0px",c]};Wa(t,d,n)}function Wa(t,n,i=400,s=null){const u=Object.keys(n);for(let d of u)t.style[d]=n[d][0];const c=()=>{for(let d of u)t.style[d]=null;t.style.transition=null,t.removeEventListener("transitionend",c),Ua.delete(t),s&&s()};setTimeout(()=>{t.style.transition=`all ease-in-out ${i}ms`;for(let d of u)t.style[d]=n[d][1];t.addEventListener("transitionend",c),Ua.set(t,c)},15)}function $a(t){if(Ua.has(t)){const n=Ua.get(t);n()}}class K0{constructor(t){this.elem=t,this.isOpen=t.classList.contains("open"),t.addEventListener("click",this.click.bind(this))}open(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),pi(t,240)}close(){const t=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),fi(t,240)}click(t){t.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}}var Pg=K0;const Tr=Ke(Ze()),Ng=Ke(Ks()),X2=Ke(Vs()),Z2=Ke(Ys()),Q2=Ke(od()),J2=Ke(ld()),e1=Ke(dd()),t1=Ke(pd()),n1=Ke(Zs()),r1=Ke(Xs()),i1=Ke(_d()),o1=Ke(Ed()),a1=Ke(Fd()),s1=Ke(zd()),l1=Ke(Pd()),u1=Ke(jd()),c1=Ke(Wd()),d1=Ke(Kd()),h1=Ke(Xd()),f1=Ke(Jd()),p1=Ke(nh()),m1=Ke(oh()),g1=Ke(dh()),v1=Ke(ph()),b1=Ke(vh()),y1=Ke(wh()),w1=Ke(_h()),k1=Ke(ta()),x1=Ke(Eh()),_1=Ke(Th()),Vl={css:"css",c:"text/x-csrc",java:"text/x-java",scala:"text/x-scala",kotlin:"text/x-kotlin","c++":"text/x-c++src","c#":"text/x-csharp",csharp:"text/x-csharp",diff:"diff",for:"fortran",fortran:"fortran",go:"go",haskell:"haskell",hs:"haskell",html:"htmlmixed",ini:"properties",javascript:"javascript",json:{name:"javascript",json:!0},js:"javascript",jl:"julia",julia:"julia",lua:"lua",md:"markdown",mdown:"markdown",markdown:"markdown",ml:"mllike",nginx:"nginx",perl:"perl",pl:"perl",powershell:"powershell",properties:"properties",ocaml:"mllike",pascal:"text/x-pascal",pas:"text/x-pascal",php:t=>t.includes("/gi,` +`);const i=t.textContent.trimEnd();let s="";if(n!==null){const c=n.className.replace("language-","");s=Ka(c,i)}const u=Tr.default(function(c){t.parentNode.replaceChild(c,t)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});X0(u)}function X0(t){const n='',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=n,t.display.wrapper.appendChild(i);const s=new Ng.default(i,{text:function(u){return t.getValue()}});s.on("success",u=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(t,n){t=t.trim().replace(/^\./g,"").toLowerCase();const i=typeof Vl[t];return i==="undefined"?"":i==="function"?Vl[t](n):Vl[t]}function Va(){const t=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(t?"darcula":"default")}function Z0(t){const n=t.ownerDocument,i=t.querySelector("code");let s=(t.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),t.innerHTML=t.innerHTML.replace(//gi,` +`);const u=t.textContent,c=n.createElement("div"),d=n.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",t.parentNode.replaceChild(c,t),c.appendChild(d),c.contentEditable=!1,d.textContent=u;let h=Tr.default(function(p){c.appendChild(p)},{value:u,mode:Ka(s,u),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function Q0(t,n){const i=t.textContent;return Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},{value:i,mode:Ka(n,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function J0(t,n,i){t.setOption("mode",Ka(n,i))}function ex(t,n){t.setValue(n),setTimeout(()=>{jg(t)},10)}function jg(t){t.refresh()}function tx(t){const n=t.textContent,i={value:n,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(t,"editor-markdown-cm::pre-init",{config:i}),Tr.default(function(s){t.parentNode.insertBefore(s,t),t.style.display="none"},i)}function nx(){let t=Tr.default.keyMap.default==Tr.default.keyMap.macDefault;return t?"Cmd":"Ctrl"}var Nt={highlight:V0,highlightWithin:Y0,wysiwygView:Z0,popupEditor:Q0,setMode:J0,setContent:ex,updateLayout:jg,markdownEditor:tx,getMetaKey:nx};class rx{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),ot(this.languageLinks,t=>{const n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),Ca(this.languageInput,t=>this.save()),ot(this.saveButton,t=>this.save()),zt(this.historyList,"button","click",(t,n)=>{t.preventDefault();const i=n.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,i){this.languageInput.value=n,this.callback=i,this.show(),this.updateEditorMode(n),Nt.setContent(this.editor,t)}show(){this.editor||(this.editor=Nt.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{Nt.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){Nt.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{const i=new Date(parseInt(n)).toLocaleTimeString();return`
  • `}).join("")}addHistory(){if(!this.editor)return;const t=this.editor.getValue();if(!t)return;const n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Hg=rx;class ix{constructor(t){Nt.highlightWithin(t)}}var Ug=ix;class ox{constructor(t){if(this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),pi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),fi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const t=this.content.querySelector(".text-neg.text-small");t&&this.open()}}var Wg=ox;class ax{constructor(t){this.elem=t,this.checkbox=t.querySelector("input[type=checkbox]"),this.display=t.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(t){const n=t.keyCode===32||t.keyCode===13;n&&(t.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){const t=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",t)}}var $g=ax;class sx{constructor(t){this.elem=t,this.dealtWith=!1,t.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){if(this.dealtWith)return;Nt.highlightWithin(this.elem),this.dealtWith=!0}}var Gg=sx;class lx{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners()}show(t=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",s=>{this.menu.contains(s.target)||this.hide()});const n=this.menu.querySelector("input");n!==null&&n.focus(),this.showing=!0;const i=new Event("show");this.container.dispatchEvent(i),t&&t.stopPropagation()}hideAll(){for(let t of window.components.dropdown)t.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n+1;i>=t.length&&(i=0),t[i].focus()}focusPrevious(){const t=this.getFocusable(),n=t.indexOf(document.activeElement);let i=n-1;i<0&&(i=t.length-1),t[i].focus()}setupListeners(){this.container.addEventListener("click",n=>{const i=Array.from(this.menu.querySelectorAll("a"));i.includes(n.target)&&this.hide()}),ot(this.toggle,n=>{n.stopPropagation(),this.show(n),n instanceof KeyboardEvent&&this.focusNext()});const t=n=>{n.key==="ArrowDown"||n.key==="ArrowRight"?(this.focusNext(),n.preventDefault()):n.key==="ArrowUp"||n.key==="ArrowLeft"?(this.focusPrevious(),n.preventDefault()):n.key==="Escape"&&(this.hide(),this.toggle.focus(),n.stopPropagation())};this.container.addEventListener("keydown",t),this.moveMenu&&this.menu.addEventListener("keydown",t),this.menu.addEventListener("keydown ",n=>{n.key==="Enter"&&(n.preventDefault(),n.stopPropagation(),this.hide())})}}var Kg=lx;const Vg=Ke(zh());class ux{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;const t=this;this.dz=new Vg.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:Number(window.uploadLimit)||256,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",t.onSending.bind(t)),this.dz.on("success",t.onSuccess.bind(t)),this.dz.on("error",t.onError.bind(t))}})}onSending(t,n,i){const s=window.document.querySelector("meta[name=token]").getAttribute("content");i.append("_token",s),n.ontimeout=u=>{this.dz.emit("complete",t),this.dz.emit("error",t,this.timeoutMessage)}}onSuccess(t,n){this.$emit("success",{file:t,data:n}),this.successMessage&&window.$events.emit("success",this.successMessage),Ga(t.previewElement,800,()=>{this.dz.removeFile(t)})}onError(t,n,i){this.$emit("error",{file:t,errorMessage:n,xhr:i});const s=u=>{const c=t.previewElement.querySelector("[data-dz-errormessage]");c.textContent=u};i&&i.status===413?s(this.uploadLimitMessage):n.file&&s(n.file)}removeAll(){this.dz.removeAllFiles(!0)}}var Yg=ux;class cx{constructor(t){this.elem=t,this.buttons=t.querySelectorAll("[toolbox-tab-button]"),this.contentElements=t.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=t.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",n=>{let i=n.target.closest("[toolbox-tab-button]");if(i===null)return;let s=i.getAttribute("toolbox-tab-button");this.setActiveTab(s,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");const t=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",t)}setActiveTab(t,n=!1){for(let i=0,s=this.buttons.length;i{t.preventDefault(),this.runSearch()}),ot(this.clearButton,this.clearSearch.bind(this))}runSearch(){const t=this.searchInput.value.trim();if(t.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");const n=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(n,{term:t}).then(i=>{this.searchResults.innerHTML=i.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}}var Qg=hx;class fx{constructor(t){this.elem=t,this.search="",this.lastClick=0,this.selectedItemData=null;const n=t.hasAttribute("entity-types")?t.getAttribute("entity-types"):"page,book,chapter",i=t.hasAttribute("entity-permission")?t.getAttribute("entity-permission"):"view";this.searchUrl=window.baseUrl(`/ajax/search/entities?types=${encodeURIComponent(n)}&permission=${encodeURIComponent(i)}`),this.input=t.querySelector("[entity-selector-input]"),this.searchInput=t.querySelector("[entity-selector-search]"),this.loading=t.querySelector("[entity-selector-loading]"),this.resultsContainer=t.querySelector("[entity-selector-results]"),this.addButton=t.querySelector("[entity-selector-add-button]"),this.elem.addEventListener("click",this.onClick.bind(this));let s=0;this.searchInput.addEventListener("input",u=>{s=Date.now(),this.showLoading(),setTimeout(()=>{if(Date.now()-s<199)return;this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",u=>{u.keyCode===13&&u.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",u=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),this.showLoading(),this.initialLoad()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl).then(t=>{this.resultsContainer.innerHTML=t.data,this.hideLoading()})}searchEntities(t){this.input.value="";let n=`${this.searchUrl}&term=${encodeURIComponent(t)}`;window.$http.get(n).then(i=>{this.resultsContainer.innerHTML=i.data,this.hideLoading()})}isDoubleClick(){let t=Date.now(),n=t-this.lastClick<300;return this.lastClick=t,n}onClick(t){const n=t.target.closest("[data-entity-type]");n&&(t.preventDefault(),t.stopPropagation(),this.selectItem(n))}selectItem(t){const n=this.isDoubleClick(),i=t.getAttribute("data-entity-type"),s=t.getAttribute("data-entity-id"),u=!t.classList.contains("selected")||n;this.unselectAll(),this.input.value=u?`${i}:${s}`:"";const c=t.getAttribute("href"),d=t.querySelector(".entity-list-item-name").textContent,h={id:Number(s),name:d,link:c};if(u?(t.classList.add("selected"),this.selectedItemData=h):window.$events.emit("entity-select-change",null),!n&&!u)return;n&&this.confirmSelection(h),u&&window.$events.emit("entity-select-change",h)}confirmSelection(t){window.$events.emit("entity-select-confirm",t)}unselectAll(){let t=this.elem.querySelectorAll(".selected");for(let n of t)n.classList.remove("selected","primary-background");this.selectedItemData=null}}var Jg=fx;class px{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(t){this.callback=t,this.elem.components.popup.show()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(t){this.hide(),this.callback&&t&&this.callback(t)}onSelectionChange(t){this.selection=t,t===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}}var ev=px;class mx{setup(){this.container=this.$el,this.name=this.$opts.name,ot(this.$el,()=>{this.$emit(this.name,this.$opts)})}}var tv=mx;class gx{constructor(t){this.elem=t,this.isOpen=t.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=t.getAttribute("expand-toggle-update-endpoint"),this.selector=t.getAttribute("expand-toggle"),t.addEventListener("click",this.click.bind(this))}open(t){pi(t,200)}close(t){fi(t,200)}click(t){t.preventDefault();const n=document.querySelectorAll(this.selector);for(let i of n)this.isOpen?this.close(i):this.open(i);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(t){window.$http.patch(this.updateEndpoint,{expand:t?"true":"false"})}}var nv=gx;class vx{constructor(t){this.elem=t,this.typeControl=t.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=t.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){const t=this.typeControl.value==="page";this.pagePickerContainer.style.display=t?"block":"none"}}var rv=vx;class bx{setup(){this.uploadedTo=this.$opts.uploadedTo,this.container=this.$el,this.popupEl=this.$refs.popup,this.searchForm=this.$refs.searchForm,this.searchInput=this.$refs.searchInput,this.cancelSearch=this.$refs.cancelSearch,this.listContainer=this.$refs.listContainer,this.filterTabs=this.$manyRefs.filterTabs,this.selectButton=this.$refs.selectButton,this.formContainer=this.$refs.formContainer,this.dropzoneContainer=this.$refs.dropzoneContainer,this.type="gallery",this.lastSelected={},this.lastSelectedTime=0,this.callback=null,this.resetState=()=>{this.hasData=!1,this.page=1,this.filter="all"},this.resetState(),this.setupListeners(),window.ImageManager=this}setupListeners(){ot(this.filterTabs,t=>{this.resetAll(),this.filter=t.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",t=>{this.resetListView(),this.loadGallery(),t.preventDefault()}),ot(this.cancelSearch,t=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",t=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),zt(this.listContainer,".load-more","click",async t=>{no(t.target),this.page++,await this.loadGallery(),t.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),ot(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),zt(this.formContainer,"#image-manager-delete","click",t=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(t,n="gallery"){this.resetAll(),this.callback=t,this.type=n,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",n!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){const t={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:n}=await window.$http.get(`images/${this.type}`,t);this.addReturnedHtmlElementsToList(n),rg(this.listContainer)}addReturnedHtmlElementsToList(t){const n=document.createElement("div");n.innerHTML=t,window.components.init(n);for(const i of[...n.children])this.listContainer.appendChild(i)}setActiveFilterTab(t){this.filterTabs.forEach(i=>i.classList.remove("selected"));const n=this.filterTabs.find(i=>i.dataset.filter===t);n&&n.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){no(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(t){const n=JSON.parse(t.detail.data),i=n&&n.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,s=t.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(u=>{u.classList.remove("selected")}),s?this.resetEditForm():(t.target.classList.add("selected"),this.loadImageEditForm(n.id)),this.selectButton.classList.toggle("hidden",s),i&&this.callback&&(this.callback(n),this.hide()),this.lastSelected=n,this.lastSelectedTime=Date.now()}async loadImageEditForm(t,n=!1){n||(this.formContainer.innerHTML="");const i=n?{delete:!0}:{},{data:s}=await window.$http.get(`/images/edit/${t}`,i);this.formContainer.innerHTML=s,window.components.init(this.formContainer)}}var iv=bx;class yx{constructor(t){this.elem=t,this.imageElem=t.querySelector("img"),this.imageInput=t.querySelector("input[type=file]"),this.resetInput=t.querySelector("input[data-reset-input]"),this.removeInput=t.querySelector("input[data-remove-input]"),this.defaultImage=t.getAttribute("data-default-image");const n=t.querySelector('button[data-action="reset-image"]');n.addEventListener("click",this.reset.bind(this));const i=t.querySelector('button[data-action="remove-image"]');i&&i.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let t of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(t);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}}var ov=yx;class wx{constructor(t){this.elem=t,this.menu=t.querySelector("ul"),this.sortInput=t.querySelector('[name="sort"]'),this.orderInput=t.querySelector('[name="order"]'),this.form=t.querySelector("form"),this.menu.addEventListener("click",n=>{n.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(n)}),this.elem.addEventListener("click",n=>{n.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(n)})}sortOptionClick(t){const n=t.target.closest("[data-sort-value]");this.sortInput.value=n.getAttribute("data-sort-value"),t.preventDefault(),this.form.submit()}sortDirectionClick(t){const n=this.orderInput.value,i=n==="asc"?"desc":"asc";this.orderInput.value=i,t.preventDefault(),this.form.submit()}}var av=wx;class kx{constructor(t){this.data=t}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){const t=this.data.getData("text/rtf");return t&&t.includes("\\trowd")}getImages(){const t=this.data.types,n=this.data.files,i=[];for(const s of t)if(s.includes("image")){const u=this.data.getData(s);i.push(u.getAsFile())}for(const s of n)s.type.includes("image")&&i.push(s);return i}}var bo=kx;let Qn=null,Yl,Xl;function xx(t,n,i){Yl=n,Xl=i,Qn=document.createElement("iframe"),Qn.setAttribute("frameborder","0"),window.addEventListener("message",sv),Qn.setAttribute("src",t),Qn.setAttribute("class","fullscreen"),Qn.style.backgroundColor="#FFFFFF",document.body.appendChild(Qn)}function _x(){lv()}function sv(t){if(!t.data||t.data.length<1)return;let n=JSON.parse(t.data);n.event==="init"?Ex():n.event==="exit"?lv():n.event==="save"?Sx(n):n.event==="export"&&Cx(n)}function Cx(t){Xl&&Xl(t.data)}function Sx(t){uv({action:"export",format:"xmlpng",xml:t.xml,spin:"Updating drawing"})}function Ex(){if(!Yl)return;Yl().then(t=>{uv({action:"load",autosave:1,xml:t})})}function lv(){window.removeEventListener("message",sv),Qn&&document.body.removeChild(Qn)}function uv(t){Qn.contentWindow.postMessage(JSON.stringify(t),"*")}async function Dx(t,n){let i={image:t,uploaded_to:n};const s=await window.$http.post(window.baseUrl("/images/drawio"),i);return s.data}async function Ax(t){const n=await window.$http.get(window.baseUrl(`/images/drawio/base64/${t}`));return`data:image/png;base64,${n.data.content}`}var dn={show:xx,close:_x,upload:Dx,load:Ax};const cv=Ke(Gm()),dv=Ke(Zm());class Tx{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.markdown=new cv.default({html:!0}),this.markdown.use(dv.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.htmlInput=this.elem.querySelector("input[name=html]"),this.cm=Nt.markdownEditor(this.input),this.onMarkdownScroll=this.onMarkdownScroll.bind(this);const t=()=>{this.displayDoc=this.display.contentDocument,this.init()};this.display.contentDocument.readyState==="complete"?t():this.display.addEventListener("load",t.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(){let t=0;this.displayDoc.addEventListener("click",s=>{let u=Date.now()-t<300,c=s.target.closest("a");if(c!==null){s.preventDefault(),window.open(c.getAttribute("href"));return}let d=s.target.closest("[drawio-diagram]");if(d!==null&&u){this.actionEditDrawing(d);return}t=Date.now()}),this.elem.addEventListener("click",s=>{let u=s.target.closest("button[data-action]");if(u===null)return;let c=u.getAttribute("data-action");if(c==="insertImage"&&this.actionInsertImage(),c==="insertLink"&&this.actionShowLinkSelector(),c==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}c==="insertDrawing"&&this.actionStartDrawing(),c==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{const u=s.target.closest(".editor-toolbar-label");if(!u)return;const c=this.elem.querySelectorAll(".markdown-editor-wrap");for(let d of c)d.classList.remove("active");u.closest(".markdown-editor-wrap").classList.add("active")}),window.$events.listen("editor-markdown-update",s=>{this.cm.setValue(s),this.updateAndRender()}),this.codeMirrorSetup(),this.listenForBookStackEditorEvents();const n=new URL(window.location).searchParams,i=n.get("content-text");i&&this.scrollToText(i)}updateAndRender(){const t=this.cm.getValue();this.input.value=t;const n=this.markdown.render(t);window.$events.emit("editor-html-change",n),window.$events.emit("editor-markdown-change",t),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=n,this.htmlInput.value=n,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";const t=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let n of t){const i=n.cloneNode(!0);this.displayDoc.head.appendChild(i)}this.displayStylesLoaded=!0}onMarkdownScroll(t){const n=this.displayDoc.body.children;if(n.length<=t)return;const i=t===-1?n[n.length-1]:n[t];i.scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(){const t=this.cm,n=this;t.setOption("direction","ltr");let i=Nt.getMetaKey();const s={};s[`${i}-Alt-I`]=function(m){let b=m.getSelection(),w=`![${b}](http://)`,D=m.getCursor("from");m.replaceSelection(w),m.setCursor(D.line,D.ch+w.length-1)},s[`${i}-S`]=m=>{window.$events.emit("editor-save-draft")},s[`${i}-Enter`]=m=>{window.$events.emit("editor-save-page")},s[`Shift-${i}-K`]=m=>{this.actionShowLinkSelector()},s[`${i}-K`]=m=>{y()},s[`${i}-1`]=m=>{d("##")},s[`${i}-2`]=m=>{d("###")},s[`${i}-3`]=m=>{d("####")},s[`${i}-4`]=m=>{d("#####")},s[`${i}-5`]=m=>{d("")},s[`${i}-d`]=m=>{d("")},s[`${i}-6`]=m=>{d(">")},s[`${i}-q`]=m=>{d(">")},s[`${i}-7`]=m=>{p("\n```\n","\n```")},s[`${i}-8`]=m=>{p("`","`")},s[`Shift-${i}-E`]=m=>{p("`","`")},s[`${i}-9`]=m=>{p('

    ',"

    ")},t.setOption("extraKeys",s),t.on("change",(m,b)=>{this.updateAndRender()});const u=ig(m=>{let b=m.getScrollInfo(),w=b.top+b.clientHeight===b.height;if(w){this.onMarkdownScroll(-1);return}let D=m.lineAtHeight(b.top,"local"),E=m.getRange({line:0,ch:null},{line:D,ch:null}),S=new DOMParser,z=S.parseFromString(this.markdown.render(E),"text/html"),A=z.documentElement.querySelectorAll("body > *");this.onMarkdownScroll(A.length)},100);t.on("scroll",m=>{u(m)}),t.on("paste",(m,b)=>{const w=new bo(b.clipboardData||b.dataTransfer);if(!w.hasItems()||w.containsTabularData())return;const D=w.getImages();for(const E of D)g(E)}),t.on("drop",(m,b)=>{const w=b.dataTransfer.getData("bookstack/template");if(w){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.preventDefault(),window.$http.get(`/templates/${w}`).then(S=>{const z=S.data.markdown||S.data.html;m.replaceSelection(z)})}const D=new bo(b.dataTransfer);if(D.hasItems()&&D.getImages().length>0){const E=m.coordsChar({left:b.pageX,top:b.pageY});m.setCursor(E),b.stopPropagation(),b.preventDefault();const S=D.getImages();for(const z of S)g(z)}});function c(m,b){let w=t.getValue(),D=t.listSelections();t.setValue(w.replace(m,b)),t.setSelections(D)}function d(m){let b=t.getCursor(),w=t.getLine(b.line),D=w.length,E=w.split(" ")[0];if(E===m){w=w.replace(`${m} `,""),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch-(m.length+1)});return}let S=/^[#>`]/.test(E),z=0;S?(z=m.length-E.length,w=w.replace(E,m).trim()):m!==""&&(z=m.length+1,w=m+" "+w),t.replaceRange(w,{line:b.line,ch:0},{line:b.line,ch:D}),t.setCursor({line:b.line,ch:b.ch+z})}function h(m,b){let w=t.getCursor(),D=t.getLine(w.line),E=D.length,S=D;D.indexOf(m)===0&&D.slice(-b.length)===b?S=D.slice(m.length,D.length-b.length):S=`${m}${D}${b}`,t.replaceRange(S,{line:w.line,ch:0},{line:w.line,ch:E}),t.setCursor({line:w.line,ch:w.ch+m.length})}function p(m,b){let w=t.getSelection();if(w==="")return h(m,b);let D=w,E=0,S=0;w.indexOf(m)===0&&w.slice(-b.length)===b?(D=w.slice(m.length,w.length-b.length),S=-(b.length+m.length)):(D=`${m}${w}${b}`,S=m.length+b.length);let z=t.listSelections()[0];t.replaceSelection(D);let A=z.head.ch<=z.anchor.ch;z.head.ch+=A?E:S,z.anchor.ch+=A?S:E,t.setSelections([z])}function g(m){if(m===null||m.type.indexOf("image")!==0)return;let b="png";if(m.name){let U=m.name.match(/\.(.+)$/);U.length>1&&(b=U[1])}const w="image-"+Math.random().toString(16).slice(2),D=window.baseUrl(`/loading.gif#upload${w}`),E=t.getSelection(),S=`![${E}](${D})`,z=t.getCursor();t.replaceSelection(S),t.setCursor({line:z.line,ch:z.ch+E.length+3});const A="image-"+Date.now()+"."+b,R=new FormData;R.append("file",m,A),R.append("uploaded_to",n.pageId),window.$http.post("/images/gallery",R).then(U=>{const Y=`[![${E}](${U.data.thumbs.display})](${U.data.url})`;c(S,Y)}).catch(U=>{window.$events.emit("error",trans("errors.image_upload_error")),c(S,E),console.log(U)})}function y(){let m=t.getCursor("from"),b=t.getSelection()||"",w=`[${b}]()`;t.focus(),t.replaceSelection(w);let D=b===""?-3:-1;t.setCursor(m.line,m.ch+w.length+D)}this.updateAndRender()}actionInsertImage(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{let i=this.cm.getSelection(),s="[!["+(i||n.name)+"]("+n.thumbs.display+")]("+n.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)},"gallery")}actionShowImageManager(){const t=this.cm.getCursor("from");window.ImageManager.show(n=>{this.insertDrawing(n,t)},"drawio")}actionShowLinkSelector(){const t=this.cm.getCursor("from");window.EntitySelectorPopup.show(n=>{let i=this.cm.getSelection()||n.name,s=`[${i}](${n.link})`;this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(t.line,t.ch+s.length)})}getDrawioUrl(){const t=document.querySelector("[drawio-url]");return t?t.getAttribute("drawio-url"):!1}actionStartDrawing(){const t=this.getDrawioUrl();if(!t)return;const n=this.cm.getCursor("from");dn.show(t,()=>Promise.resolve(""),i=>{const s={image:i,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",s).then(u=>{this.insertDrawing(u.data,n),dn.close()}).catch(u=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(u)})})}insertDrawing(t,n){const i=`
    `;this.cm.focus(),this.cm.replaceSelection(i),this.cm.setCursor(n.line,n.ch+i.length)}actionEditDrawing(t){const n=this.getDrawioUrl();if(!n)return;const i=this.cm.getCursor("from"),s=t.getAttribute("drawio-diagram");dn.show(n,()=>dn.load(s),u=>{let c={image:u,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",c).then(d=>{let h=`
    `,p=this.cm.getValue().split(` `).map(g=>g.indexOf(`drawio-diagram="${s}"`)!==-1?h:g).join(` `);this.cm.setValue(p),this.cm.setCursor(i),this.cm.focus(),dn.close()}).catch(d=>{window.$events.emit("error",trans("errors.image_upload_error")),console.log(d)})})}actionFullScreen(){const t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;const n=this.cm.getValue(),i=n.split(/\r?\n/);let s=i.findIndex(u=>u&&u.indexOf(t)!==-1);if(s===-1)return;this.cm.scrollIntoView({line:s},200),this.cm.focus(),this.cm.setCursor({line:s,char:i[s].length})}listenForBookStackEditorEvents(){function t({html:n,markdown:i}){return i||n}window.$events.listen("editor::replace",n=>{const i=t(n);this.cm.setValue(i)}),window.$events.listen("editor::append",n=>{const i=this.cm.getCursor("from"),s=t(n),u=this.cm.getValue()+` `+s;this.cm.setValue(u),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",n=>{const i=this.cm.getCursor("from"),s=t(n),u=s+` `+this.cm.getValue();this.cm.setValue(u);const c=s.split(` -`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",n=>{const i=t(n);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var uv=Ex;class Dx{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(const s of n)s.disabled=t;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=t?"none":"block")}}var cv=Dx;class Ax{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const n=t.split(" ").length,i=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var dv=Ax;class Tx{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){it(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),it(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var hv=Tx;class Lx{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){const u=t.target.href.split("#")[1];ro(document.querySelector("#"+u))}if(n===null)return;t.preventDefault();const i=n.getAttribute("action"),s=n.closest("[comment]");i==="edit"&&this.editComment(s),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(s),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(s),i==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){if(!this.editingComment)return;this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none"}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),i=n.value.split(` -`).length;n.style.height=i*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let i=n.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(n);let u=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${u}`,s).then(c=>{let d=document.createElement("div");d.innerHTML=c.data,this.editingComment.innerHTML=d.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window.$http.delete(`/comment/${n}`).then(i=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let n=this.formInput.value,i={text:n,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let u=document.createElement("div");u.innerHTML=s.data;let c=u.children[0];this.container.appendChild(c),window.components.init(c),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(s=>{window.$events.showValidationErrors(s),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";const n=this.replyToRow.querySelector("a");n.textContent=`#${this.parentId}`,n.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="block";t.querySelector(".form-group.loading").style.display="none"}}var fv=Lx;const pv=$e(Ks());class Ix{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),Nt.highlight(),this.setupPointer(),this.setupNavHighlighting(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const n=document.querySelector(".sidebar-page-nav");n&&zt(n,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const u=s.getAttribute("href").substr(1);this.goToText(u),window.history.pushState(null,null,"#"+u)})}goToText(t){const n=document.getElementById(t);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),n!==null)ro(n);else{const i=Jm(".page-content > div > *",t);i&&ro(i)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);const n=t.querySelector("div.pointer");let i=!1,s=!1,u=!0,c="";zt(t,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(t,["click","focus"],h=>{h.stopPropagation()}),zt(t,"span.icon","click",(h,p)=>{h.stopPropagation(),u=!u,p.querySelector('[data-icon="include"]').style.display=u?"none":"inline",p.querySelector('[data-icon="link"]').style.display=u?"inline":"none",d()}),new pv.default(t.querySelector("button")),_a(document.body,["click","focus"],h=>{if(!i||s)return;t=t.parentElement.removeChild(t),i=!1});let d=h=>{let p=u?window.baseUrl(`/link/${this.pageId}#${c}`):`{{@${this.pageId}#${c}}}`;u&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),t.querySelector("input").value=p;const g=t.querySelector("#pointer-edit");if(g&&h){const y=g.dataset.editHref,m=h.id,b=h.textContent&&h.textContent.substring(0,50);g.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(b)}`}};xa('.page-content [id^="bkmrk"]',h=>{_a(h,["mouseup","keyup"],p=>{p.stopPropagation();let g=window.getSelection();if(g.toString().length===0)return;c=h.id,d(h),h.parentNode.insertBefore(t,h),t.style.display="block",i=!0,s=!0,requestAnimationFrame(()=>{const y=h.getBoundingClientRect();let m=p.pageX-y.left-164;m<0&&(m=0);const b=m/y.width*100;n.style.left=b+"%",setTimeout(()=>{s=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let t=document.querySelector(".sidebar-page-nav"),n=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");n.length>0&&t!==null&&i(n);function i(c){let d={rootMargin:"0px 0px 0px 0px",threshold:1},h=new IntersectionObserver(s,d);for(let p of c)h.observe(p)}function s(c,d){for(let h of c){let p=h.intersectionRatio===1;u(h.target.id,p)}}function u(c,d){xa('a[href="#'+c+'"]',h=>{h.closest("li").classList.toggle("current-heading",d)})}}}var mv=Ix;function gv(t){let n=new Date(t*1e3),i=n.getHours(),s=n.getMinutes();return`${(i>9?"":"0")+i}:${(s>9?"":"0")+s}`}class Fx{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.isDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",t=>{this.editorHTML=t}),window.$events.listen("editor-markdown-change",t=>{this.editorMarkdown=t}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),it(this.saveDraftButton,this.saveDraft.bind(this)),it(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let t=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let n=Date.now()-this.autoSave.last{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let t;try{t=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(n){return console.error(n)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",t.data.html||""),window.$events.emit("editor-markdown-update",t.data.markdown||t.data.html),this.titleElem.value=t.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let t=this.changelogInput.value.trim();t.length===0?t=this.setChangelogText:t.length>16&&(t=t.slice(0,16)+"..."),this.changelogDisplay.innerText=t}toggleDiscardDraftVisibility(t){this.discardDraftWrap.classList.toggle("hidden",!t)}}var vv=Fx;class Mx{constructor(t){this.elem=t,this.input=t.querySelector("input"),this.resetButton=t.querySelector("[page-picker-reset]"),this.selectButton=t.querySelector("[page-picker-select]"),this.display=t.querySelector("[page-picker-display]"),this.defaultDisplay=t.querySelector("[page-picker-default]"),this.buttonSep=t.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",t=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(t=>{this.setValue(t.id,t.name)})}setValue(t,n){this.value=t,this.input.value=t,this.controlView(n)}controlView(t){let n=this.value&&this.value!==0;if(Ya(this.resetButton,n),Ya(this.buttonSep,n),Ya(this.defaultDisplay,!n),Ya(this.display,n),n){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${t}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Ya(t,n){let i=t.tagName==="BUTTON"||t.tagName==="SPAN"?"inline-block":"block";t.style.display=n?i:"none"}var bv=Mx;class qx{constructor(t){this.container=t;const n=t.querySelector("[permissions-table-toggle-all]");n.addEventListener("click",this.toggleAllClick.bind(this));const i=t.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let u of i)u.addEventListener("click",this.toggleRowClick.bind(this));const s=t.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let u of s)u.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(t){t.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(t){t.preventDefault(),this.toggleAllInElement(t.target.closest("tr"))}toggleColumnClick(t){t.preventDefault();const n=t.target.closest("th,td"),i=Array.from(n.parentElement.children).indexOf(n),s=n.closest("table").querySelectorAll("tr"),u=[];for(let c of s){const d=c.children[i];d&&u.push(...d.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(u)}toggleAllInElement(t){const n=t.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(n)}toggleAllInputs(t){const n=t.length>0?t[0].checked:!1;for(let i of t)i.checked=!n,i.dispatchEvent(new Event("change"))}}var yv=qx;class zx{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let t=null;this.container.addEventListener("mousedown",n=>{t=n.target}),this.container.addEventListener("click",n=>{if(n.target===this.container&&t===this.container)return this.hide()}),it(this.hideButtons,n=>this.hide())}hide(t=null){Ga(this.container,240,t),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(t=null,n=null){qg(this.container,240,t),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=n}}var wv=zx;class Px{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.lightColorInput=t.querySelector('input[name="setting-app-color-light"]'),this.resetButton=t.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const t=this.colorInput.value,n=this.hexToRgb(t),i="rgba("+[n.r,n.g,n.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const s=document.getElementById("custom-styles"),u=s.getAttribute("data-color"),c=s.getAttribute("data-color-light");s.innerHTML=s.innerHTML.split(u).join(t),s.innerHTML=s.innerHTML.split(c).join(i),s.setAttribute("data-color",t),s.setAttribute("data-color-light",i)}hexToRgb(t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return{r:n?parseInt(n[1],16):0,g:n?parseInt(n[2],16):0,b:n?parseInt(n[3],16):0}}}var kv=Px;class Rx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.resetButton=t.querySelector("[setting-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default})}}var xv=Rx;class Ox{constructor(t){this.elem=t,this.input=document.getElementById("books-input"),this.shelfBooksList=t.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const t=this.elem.querySelectorAll(".scroll-box");for(let n of t)new hi(n,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",t=>{const n=t.target.closest(".scroll-box-item:not(.instruction)");n&&(t.preventDefault(),this.sortItemClick(n))})}sortItemClick(t){const n=this.elem.querySelectorAll(".scroll-box"),i=Array.from(n).filter(s=>t.parentElement!==s);i.length>0&&i[0].appendChild(t),this.onChange()}onChange(){const t=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=t.map(n=>n.getAttribute("data-id")).join(",")}}var _v=Ox;class Nx{constructor(t){this.elem=t,this.toggleElem=t.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(t=!0){this.elem.classList.toggle("open")}}var Cv=Nx;class Bx{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const t=new hi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:t.toArray()})},setData(n,i){const s=i.getAttribute("data-drag-content");if(s){const u=JSON.parse(s);for(const[c,d]of Object.entries(u))n.setData(c,d)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var Sv=Bx;class jx{setup(){this.$el.addEventListener("change",()=>{const t=this.$el.closest("form");t&&t.submit()})}}var Ev=jx;class Hx{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[t,n]of Object.entries(this.$manyRefs||{})){if(t.startsWith("toggle")){const i=t.replace("toggle","").toLowerCase();it(n,s=>this.show(i)),this.allButtons.push(...n),this.tabButtonsByName[i]=n}if(t.startsWith("content")){const i=t.replace("content","").toLowerCase();this.tabContentsByName[i]=n,this.allContents.push(...n)}}}show(t){this.allContents.forEach(s=>{s.classList.add("hidden"),s.classList.remove("selected")}),this.allButtons.forEach(s=>s.classList.remove("selected"));const n=this.tabContentsByName[t]||[],i=this.tabButtonsByName[t]||[];n.length>0&&(n.forEach(s=>{s.classList.remove("hidden"),s.classList.add("selected")}),i.forEach(s=>s.classList.add("selected")))}}var Dv=Hx;class Ux{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",t=>{const n=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||n.add()})}hasEmptyRows(){const t=this.container.querySelectorAll(this.rowSelector),n=[...t].find(i=>[...i.querySelectorAll("input")].filter(s=>s.value).length===0);return n!==void 0}}var Av=Ux;class Wx{constructor(t){this.elem=t,this.list=t.querySelector("[template-manager-list]"),this.searching=!1,zt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),zt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),zt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),zt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(t,n){const i=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(t,n){const i=n.closest("[template-id]").getAttribute("template-id");t.dataTransfer.setData("bookstack/template",i),t.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(t,n){t.stopPropagation();const i=n.getAttribute("template-action"),s=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(s,i)}async insertTemplate(t,n="replace"){const i=await window.$http.get(`/templates/${t}`),s="editor::"+n;window.$events.emit(s,i.data)}async handlePaginationClick(t,n){t.preventDefault();const i=n.getAttribute("href"),s=await window.$http.get(i);this.list.innerHTML=s.data}setupSearchBox(){const t=this.elem.querySelector(".search-box");if(!t)return;const n=t.querySelector("input"),i=t.querySelector("button"),s=t.querySelector("button.search-box-cancel");async function u(){const c=n.value,d=await window.$http.get("/templates",{search:c});s.style.display=c?"block":"none",this.list.innerHTML=d.data}u=u.bind(this),t.addEventListener("keypress",c=>{c.key==="Enter"&&(c.preventDefault(),u())}),i.addEventListener("click",c=>{u()}),s.addEventListener("click",c=>{n.value="",u()})}}var Tv=Wx;class $x{constructor(t){this.elem=t,this.input=t.querySelector("input[type=hidden]"),this.checkbox=t.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const t=new Event("change");this.input.dispatchEvent(t)}}var Lv=$x;class Gx{constructor(t){this.elem=t,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",n=>{this.updateLayout()},{passive:!0})}updateLayout(){let t="tablet";if(window.innerWidth<=1e3&&(t="mobile"),window.innerWidth>=1400&&(t="desktop"),t===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),t==="desktop"?this.setupDesktop():t==="mobile"&&this.setupMobile(),this.lastLayoutType=t}setupMobile(){const t=document.querySelectorAll("[tri-layout-mobile-tab]");for(let n of t)n.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let n of t)n.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(t){const n=t.target.getAttribute("tri-layout-mobile-tab");this.showTab(n)}showContent(){this.showTab("content",!1)}showTab(t,n=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;const i=document.querySelectorAll(".tri-layout-mobile-tab");for(let u of i){const c=u.getAttribute("tri-layout-mobile-tab")===t;u.classList.toggle("active",c)}const s=t==="info";if(this.elem.classList.toggle("show-info",s),n){const u=document.querySelector("header"),c=u.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[t]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[t]||c},50)}this.lastTabShown=t}}var Iv=Gx;function Fv(t,n,i){const s=new bo(t.clipboardData||t.dataTransfer);if(!s.hasItems()||s.containsTabularData())return;const u=s.getImages();for(const c of u){const d="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");t.preventDefault(),setTimeout(()=>{n.insertContent(`

    `),Kx(c,i).then(p=>{const g=p.name.replace(/"/g,""),y=`${g}`,m=n.dom.create("a",{target:"_blank",href:p.url},y);n.dom.replace(m,d)}).catch(p=>{n.dom.remove(d),window.$events.emit("error",trans("errors.image_upload_error")),console.log(p)})},10)}}async function Kx(t,n){if(t===null||t.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(t.name){let d=t.name.match(/\.(.+)$/);d.length>1&&(i=d[1])}const s="image-"+Date.now()+"."+i,u=new FormData;u.append("file",t,s),u.append("uploaded_to",n.pageId);const c=await window.$http.post(window.baseUrl("/images/gallery"),u);return c.data}function Vx(t){for(let n=1;n<5;n++)t.shortcuts.add("meta+"+n,"",["FormatBlock",!1,"h"+(n+1)]);t.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),t.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),t.shortcuts.add("meta+9","",function(){const n=t.selection.getNode(),i=n?n.closest(".callout"):null,s=["info","success","warning","danger"],u=s.findIndex(h=>i&&i.classList.contains(h)),c=(u+1)%s.length,d=s[c];t.formatter.apply("callout"+d)})}function Yx(t){window.$http.get(window.baseUrl("/custom-head-content")).then(n=>{if(!n.data)return;let i=t.getDoc().querySelector("head");i.innerHTML+=n.data})}function Xx(){function t(s){return s.className==="CodeMirrorContainer"}function n(s){const u=s.selection.getNode();if(!t(u)){const h=s.selection.getNode().textContent;window.components.first("code-editor").open(h,"",(p,g)=>{const y=document.createElement("div");y.innerHTML=`
    `,y.querySelector("code").innerText=p,s.formatter.toggle("pre");const m=s.selection.getNode();s.dom.setHTML(m,y.querySelector("pre").innerHTML),s.fire("SetContent"),s.focus()});return}let c=u.hasAttribute("data-lang")?u.getAttribute("data-lang"):"",d=u.querySelector("textarea").textContent;window.components.first("code-editor").open(d,c,(h,p)=>{const g=u.querySelector(".CodeMirror"),y=g.CodeMirror;y&&(Nt.setContent(y,h),Nt.setMode(y,p,h));const m=u.querySelector("textarea");m&&(m.textContent=h),u.setAttribute("data-lang",p),s.focus()})}function i(s){const u=s.querySelector("textarea"),c=u.textContent,d=s.getAttribute("data-lang");s.removeAttribute("contentEditable");const h=document.createElement("pre"),p=document.createElement("code");p.classList.add(`language-${d}`),p.textContent=c,h.appendChild(p),s.parentElement.replaceChild(h,s)}window.tinymce.PluginManager.add("codeeditor",function(s,u){const c=s.$;s.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),s.addCommand("codeeditor",()=>{n(s)}),s.on("PreProcess",function(d){c("div.CodeMirrorContainer",d.node).each((h,p)=>{i(p)})}),s.on("dblclick",d=>{let h=s.selection.getNode();if(!t(h))return;n(s)}),s.on("SetContent",function(){c(".CodeMirrorContainer").filter((h,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((h,p)=>{i(p)});const d=c("body > pre").filter((h,p)=>p.contentEditable!=="false");if(!d.length)return;s.undoManager.transact(function(){d.each((h,p)=>{Nt.wysiwygView(p)})})})})}function Zx(t,n,i){let s=null,u=null;function c(y){return y.hasAttribute("drawio-diagram")}function d(y,m=null){s=y,u=m,window.ImageManager.show(function(b){if(m){let w=m.querySelector("img");s.dom.setAttrib(w,"src",b.url),s.dom.setAttrib(m,"drawio-diagram",b.id)}else{let w=`
    `;s.insertContent(w)}},"drawio")}function h(y,m=null){s=y,u=m,dn.show(t,g,p)}async function p(y){const m="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif");if(u){dn.close();let w=u.querySelector("img");try{const D=await dn.upload(y,i);s.dom.setAttrib(w,"src",D.url),s.dom.setAttrib(u,"drawio-diagram",D.id)}catch(D){window.$events.emit("error",trans("errors.image_upload_error")),console.log(D)}return}setTimeout(async()=>{s.insertContent(`
    `),dn.close();try{const w=await dn.upload(y,i);s.dom.setAttrib(m,"src",w.url),s.dom.get(m).parentNode.setAttribute("drawio-diagram",w.id)}catch(w){s.dom.remove(m),window.$events.emit("error",trans("errors.image_upload_error")),console.log(w)}},5)}function g(){if(!u)return Promise.resolve("");let y=u.getAttribute("drawio-diagram");return dn.load(y)}window.tinymce.PluginManager.add("drawio",function(y,m){y.addCommand("drawio",()=>{const b=y.selection.getNode();h(y,c(b)?b:null)}),y.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(` +`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",n=>{const i=t(n);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var hv=Tx;class Lx{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(const s of n)s.disabled=t;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=t?"none":"block")}}var fv=Lx;class Ix{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const n=t.split(" ").length,i=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var pv=Ix;class Fx{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){ot(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),ot(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}}var mv=Fx;class Mx{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){const u=t.target.href.split("#")[1];ro(document.querySelector("#"+u))}if(n===null)return;t.preventDefault();const i=n.getAttribute("action"),s=n.closest("[comment]");i==="edit"&&this.editComment(s),i==="closeUpdateForm"&&this.closeUpdateForm(),i==="delete"&&this.deleteComment(s),i==="addComment"&&this.showForm(),i==="hideForm"&&this.hideForm(),i==="reply"&&this.setReply(s),i==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){if(!this.editingComment)return;this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none"}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),i=n.value.split(` +`).length;n.style.height=i*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let i=n.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(n);let u=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${u}`,s).then(c=>{let d=document.createElement("div");d.innerHTML=c.data,this.editingComment.innerHTML=d.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window.$http.delete(`/comment/${n}`).then(i=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let n=this.formInput.value,i={text:n,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let u=document.createElement("div");u.innerHTML=s.data;let c=u.children[0];this.container.appendChild(c),window.components.init(c),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(s=>{window.$events.showValidationErrors(s),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";const n=this.replyToRow.querySelector("a");n.textContent=`#${this.parentId}`,n.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){const n=t.querySelectorAll(".form-group");for(let i of n)i.style.display="block";t.querySelector(".form-group.loading").style.display="none"}}var gv=Mx;const vv=Ke(Ks());class qx{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),Nt.highlight(),this.setupPointer(),this.setupNavHighlighting(),window.location.hash){let i=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(i)}const n=document.querySelector(".sidebar-page-nav");n&&zt(n,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const u=s.getAttribute("href").substr(1);this.goToText(u),window.history.pushState(null,null,"#"+u)})}goToText(t){const n=document.getElementById(t);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),n!==null)ro(n);else{const i=ng(".page-content > div > *",t);i&&ro(i)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);const n=t.querySelector("div.pointer");let i=!1,s=!1,u=!0,c="";zt(t,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(t,["click","focus"],h=>{h.stopPropagation()}),zt(t,"span.icon","click",(h,p)=>{h.stopPropagation(),u=!u,p.querySelector('[data-icon="include"]').style.display=u?"none":"inline",p.querySelector('[data-icon="link"]').style.display=u?"inline":"none",d()}),new vv.default(t.querySelector("button")),_a(document.body,["click","focus"],h=>{if(!i||s)return;t=t.parentElement.removeChild(t),i=!1});let d=h=>{let p=u?window.baseUrl(`/link/${this.pageId}#${c}`):`{{@${this.pageId}#${c}}}`;u&&!p.startsWith("http")&&(p=window.location.protocol+"//"+window.location.host+p),t.querySelector("input").value=p;const g=t.querySelector("#pointer-edit");if(g&&h){const y=g.dataset.editHref,m=h.id,b=h.textContent&&h.textContent.substring(0,50);g.href=`${y}?content-id=${m}&content-text=${encodeURIComponent(b)}`}};xa('.page-content [id^="bkmrk"]',h=>{_a(h,["mouseup","keyup"],p=>{p.stopPropagation();let g=window.getSelection();if(g.toString().length===0)return;c=h.id,d(h),h.parentNode.insertBefore(t,h),t.style.display="block",i=!0,s=!0,requestAnimationFrame(()=>{const y=h.getBoundingClientRect();let m=p.pageX-y.left-164;m<0&&(m=0);const b=m/y.width*100;n.style.left=b+"%",setTimeout(()=>{s=!1},100)})})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;let t=document.querySelector(".sidebar-page-nav"),n=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");n.length>0&&t!==null&&i(n);function i(c){let d={rootMargin:"0px 0px 0px 0px",threshold:1},h=new IntersectionObserver(s,d);for(let p of c)h.observe(p)}function s(c,d){for(let h of c){let p=h.intersectionRatio===1;u(h.target.id,p)}}function u(c,d){xa('a[href="#'+c+'"]',h=>{h.closest("li").classList.toggle("current-heading",d)})}}}var bv=qx;function yv(t){let n=new Date(t*1e3),i=n.getHours(),s=n.getMinutes();return`${(i>9?"":"0")+i}:${(s>9?"":"0")+s}`}class zx{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.isDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",t=>{this.editorHTML=t}),window.$events.listen("editor-markdown-change",t=>{this.editorMarkdown=t}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),ot(this.saveDraftButton,this.saveDraft.bind(this)),ot(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let t=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{let n=Date.now()-this.autoSave.last{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let t;try{t=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(n){return console.error(n)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor-html-update",t.data.html||""),window.$events.emit("editor-markdown-update",t.data.markdown||t.data.html),this.titleElem.value=t.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let t=this.changelogInput.value.trim();t.length===0?t=this.setChangelogText:t.length>16&&(t=t.slice(0,16)+"..."),this.changelogDisplay.innerText=t}toggleDiscardDraftVisibility(t){this.discardDraftWrap.classList.toggle("hidden",!t)}}var wv=zx;class Ox{constructor(t){this.elem=t,this.input=t.querySelector("input"),this.resetButton=t.querySelector("[page-picker-reset]"),this.selectButton=t.querySelector("[page-picker-select]"),this.display=t.querySelector("[page-picker-display]"),this.defaultDisplay=t.querySelector("[page-picker-default]"),this.buttonSep=t.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",t=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(t=>{this.setValue(t.id,t.name)})}setValue(t,n){this.value=t,this.input.value=t,this.controlView(n)}controlView(t){let n=this.value&&this.value!==0;if(Ya(this.resetButton,n),Ya(this.buttonSep,n),Ya(this.defaultDisplay,!n),Ya(this.display,n),n){let i=this.getAssetIdFromVal();this.display.textContent=`#${i}, ${t}`,this.display.href=window.baseUrl(`/link/${i}`)}}getAssetIdFromVal(){return Number(this.value)}}function Ya(t,n){let i=t.tagName==="BUTTON"||t.tagName==="SPAN"?"inline-block":"block";t.style.display=n?i:"none"}var kv=Ox;class Rx{constructor(t){this.container=t;const n=t.querySelector("[permissions-table-toggle-all]");n.addEventListener("click",this.toggleAllClick.bind(this));const i=t.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let u of i)u.addEventListener("click",this.toggleRowClick.bind(this));const s=t.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let u of s)u.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(t){t.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(t){t.preventDefault(),this.toggleAllInElement(t.target.closest("tr"))}toggleColumnClick(t){t.preventDefault();const n=t.target.closest("th,td"),i=Array.from(n.parentElement.children).indexOf(n),s=n.closest("table").querySelectorAll("tr"),u=[];for(let c of s){const d=c.children[i];d&&u.push(...d.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(u)}toggleAllInElement(t){const n=t.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(n)}toggleAllInputs(t){const n=t.length>0?t[0].checked:!1;for(let i of t)i.checked=!n,i.dispatchEvent(new Event("change"))}}var xv=Rx;class Px{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let t=null;this.container.addEventListener("mousedown",n=>{t=n.target}),this.container.addEventListener("click",n=>{if(n.target===this.container&&t===this.container)return this.hide()}),ot(this.hideButtons,n=>this.hide())}hide(t=null){Ga(this.container,240,t),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(t=null,n=null){Rg(this.container,240,t),this.onkeyup=i=>{i.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=n}}var _v=Px;class Nx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.lightColorInput=t.querySelector('input[name="setting-app-color-light"]'),this.resetButton=t.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){const t=this.colorInput.value,n=this.hexToRgb(t),i="rgba("+[n.r,n.g,n.b,"0.15"].join(",")+")";this.lightColorInput.value=i;const s=document.getElementById("custom-styles"),u=s.getAttribute("data-color"),c=s.getAttribute("data-color-light");s.innerHTML=s.innerHTML.split(u).join(t),s.innerHTML=s.innerHTML.split(c).join(i),s.setAttribute("data-color",t),s.setAttribute("data-color-light",i)}hexToRgb(t){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return{r:n?parseInt(n[1],16):0,g:n?parseInt(n[2],16):0,b:n?parseInt(n[3],16):0}}}var Cv=Nx;class Bx{constructor(t){this.elem=t,this.colorInput=t.querySelector("input[type=color]"),this.resetButton=t.querySelector("[setting-color-picker-reset]"),this.defaultButton=t.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",n=>{this.colorInput.value=this.colorInput.dataset.default})}}var Sv=Bx;class jx{constructor(t){this.elem=t,this.input=document.getElementById("books-input"),this.shelfBooksList=t.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){const t=this.elem.querySelectorAll(".scroll-box");for(let n of t)new hi(n,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",t=>{const n=t.target.closest(".scroll-box-item:not(.instruction)");n&&(t.preventDefault(),this.sortItemClick(n))})}sortItemClick(t){const n=this.elem.querySelectorAll(".scroll-box"),i=Array.from(n).filter(s=>t.parentElement!==s);i.length>0&&i[0].appendChild(t),this.onChange()}onChange(){const t=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=t.map(n=>n.getAttribute("data-id")).join(",")}}var Ev=jx;class Hx{constructor(t){this.elem=t,this.toggleElem=t.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(t=!0){this.elem.classList.toggle("open")}}var Dv=Hx;class Ux{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;const t=new hi(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:t.toArray()})},setData(n,i){const s=i.getAttribute("data-drag-content");if(s){const u=JSON.parse(s);for(const[c,d]of Object.entries(u))n.setData(c,d)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}}var Av=Ux;class Wx{setup(){this.$el.addEventListener("change",()=>{const t=this.$el.closest("form");t&&t.submit()})}}var Tv=Wx;class $x{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(const[t,n]of Object.entries(this.$manyRefs||{})){if(t.startsWith("toggle")){const i=t.replace("toggle","").toLowerCase();ot(n,s=>this.show(i)),this.allButtons.push(...n),this.tabButtonsByName[i]=n}if(t.startsWith("content")){const i=t.replace("content","").toLowerCase();this.tabContentsByName[i]=n,this.allContents.push(...n)}}}show(t){this.allContents.forEach(s=>{s.classList.add("hidden"),s.classList.remove("selected")}),this.allButtons.forEach(s=>s.classList.remove("selected"));const n=this.tabContentsByName[t]||[],i=this.tabButtonsByName[t]||[];n.length>0&&(n.forEach(s=>{s.classList.remove("hidden"),s.classList.add("selected")}),i.forEach(s=>s.classList.add("selected")))}}var Lv=$x;class Gx{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",t=>{const n=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||n.add()})}hasEmptyRows(){const t=this.container.querySelectorAll(this.rowSelector),n=[...t].find(i=>[...i.querySelectorAll("input")].filter(s=>s.value).length===0);return n!==void 0}}var Iv=Gx;class Kx{constructor(t){this.elem=t,this.list=t.querySelector("[template-manager-list]"),this.searching=!1,zt(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),zt(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),zt(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),zt(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(t,n){const i=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(i,"replace")}handleTemplateItemDragStart(t,n){const i=n.closest("[template-id]").getAttribute("template-id");t.dataTransfer.setData("bookstack/template",i),t.dataTransfer.setData("text/plain",i)}handleTemplateActionClick(t,n){t.stopPropagation();const i=n.getAttribute("template-action"),s=n.closest("[template-id]").getAttribute("template-id");this.insertTemplate(s,i)}async insertTemplate(t,n="replace"){const i=await window.$http.get(`/templates/${t}`),s="editor::"+n;window.$events.emit(s,i.data)}async handlePaginationClick(t,n){t.preventDefault();const i=n.getAttribute("href"),s=await window.$http.get(i);this.list.innerHTML=s.data}setupSearchBox(){const t=this.elem.querySelector(".search-box");if(!t)return;const n=t.querySelector("input"),i=t.querySelector("button"),s=t.querySelector("button.search-box-cancel");async function u(){const c=n.value,d=await window.$http.get("/templates",{search:c});s.style.display=c?"block":"none",this.list.innerHTML=d.data}u=u.bind(this),t.addEventListener("keypress",c=>{c.key==="Enter"&&(c.preventDefault(),u())}),i.addEventListener("click",c=>{u()}),s.addEventListener("click",c=>{n.value="",u()})}}var Fv=Kx;class Vx{constructor(t){this.elem=t,this.input=t.querySelector("input[type=hidden]"),this.checkbox=t.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";const t=new Event("change");this.input.dispatchEvent(t)}}var Mv=Vx;class Yx{constructor(t){this.elem=t,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",n=>{this.updateLayout()},{passive:!0})}updateLayout(){let t="tablet";if(window.innerWidth<=1e3&&(t="mobile"),window.innerWidth>=1400&&(t="desktop"),t===this.lastLayoutType)return;this.onDestroy&&(this.onDestroy(),this.onDestroy=null),t==="desktop"?this.setupDesktop():t==="mobile"&&this.setupMobile(),this.lastLayoutType=t}setupMobile(){const t=document.querySelectorAll("[tri-layout-mobile-tab]");for(let n of t)n.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let n of t)n.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(t){const n=t.target.getAttribute("tri-layout-mobile-tab");this.showTab(n)}showContent(){this.showTab("content",!1)}showTab(t,n=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;const i=document.querySelectorAll(".tri-layout-mobile-tab");for(let u of i){const c=u.getAttribute("tri-layout-mobile-tab")===t;u.classList.toggle("active",c)}const s=t==="info";if(this.elem.classList.toggle("show-info",s),n){const u=document.querySelector("header"),c=u.getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[t]||c,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[t]||c},50)}this.lastTabShown=t}}var qv=Yx;function zv(t,n,i){const s=new bo(t.clipboardData||t.dataTransfer);if(!s.hasItems()||s.containsTabularData())return;const u=s.getImages();for(const c of u){const d="image-"+Math.random().toString(16).slice(2),h=window.baseUrl("/loading.gif");t.preventDefault(),setTimeout(()=>{n.insertContent(`

    `),Xx(c,i).then(p=>{const g=p.name.replace(/"/g,""),y=`${g}`,m=n.dom.create("a",{target:"_blank",href:p.url},y);n.dom.replace(m,d)}).catch(p=>{n.dom.remove(d),window.$events.emit("error",trans("errors.image_upload_error")),console.log(p)})},10)}}async function Xx(t,n){if(t===null||t.type.indexOf("image")!==0)throw new Error("Not an image file");let i="png";if(t.name){let d=t.name.match(/\.(.+)$/);d.length>1&&(i=d[1])}const s="image-"+Date.now()+"."+i,u=new FormData;u.append("file",t,s),u.append("uploaded_to",n.pageId);const c=await window.$http.post(window.baseUrl("/images/gallery"),u);return c.data}function Zx(t){for(let n=1;n<5;n++)t.shortcuts.add("meta+"+n,"",["FormatBlock",!1,"h"+(n+1)]);t.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),t.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),t.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),t.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),t.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),t.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),t.shortcuts.add("meta+9","",function(){const n=t.selection.getNode(),i=n?n.closest(".callout"):null,s=["info","success","warning","danger"],u=s.findIndex(h=>i&&i.classList.contains(h)),c=(u+1)%s.length,d=s[c];t.formatter.apply("callout"+d)})}function Qx(t){window.$http.get(window.baseUrl("/custom-head-content")).then(n=>{if(!n.data)return;let i=t.getDoc().querySelector("head");i.innerHTML+=n.data})}function Jx(){function t(s){return s.className==="CodeMirrorContainer"}function n(s){const u=s.selection.getNode();if(!t(u)){const h=s.selection.getNode().textContent;window.components.first("code-editor").open(h,"",(p,g)=>{const y=document.createElement("div");y.innerHTML=`
    `,y.querySelector("code").innerText=p,s.formatter.toggle("pre");const m=s.selection.getNode();s.dom.setHTML(m,y.querySelector("pre").innerHTML),s.fire("SetContent"),s.focus()});return}let c=u.hasAttribute("data-lang")?u.getAttribute("data-lang"):"",d=u.querySelector("textarea").textContent;window.components.first("code-editor").open(d,c,(h,p)=>{const g=u.querySelector(".CodeMirror"),y=g.CodeMirror;y&&(Nt.setContent(y,h),Nt.setMode(y,p,h));const m=u.querySelector("textarea");m&&(m.textContent=h),u.setAttribute("data-lang",p),s.focus()})}function i(s){const u=s.querySelector("textarea"),c=u.textContent,d=s.getAttribute("data-lang");s.removeAttribute("contentEditable");const h=document.createElement("pre"),p=document.createElement("code");p.classList.add(`language-${d}`),p.textContent=c,h.appendChild(p),s.parentElement.replaceChild(h,s)}window.tinymce.PluginManager.add("codeeditor",function(s,u){const c=s.$;s.addButton("codeeditor",{text:"Code block",icon:!1,cmd:"codeeditor"}),s.addCommand("codeeditor",()=>{n(s)}),s.on("PreProcess",function(d){c("div.CodeMirrorContainer",d.node).each((h,p)=>{i(p)})}),s.on("dblclick",d=>{let h=s.selection.getNode();if(!t(h))return;n(s)}),s.on("SetContent",function(){c(".CodeMirrorContainer").filter((h,p)=>typeof p.querySelector(".CodeMirror").CodeMirror=="undefined").each((h,p)=>{i(p)});const d=c("body > pre").filter((h,p)=>p.contentEditable!=="false");if(!d.length)return;s.undoManager.transact(function(){d.each((h,p)=>{Nt.wysiwygView(p)})})})})}function e_(t,n,i){let s=null,u=null;function c(y){return y.hasAttribute("drawio-diagram")}function d(y,m=null){s=y,u=m,window.ImageManager.show(function(b){if(m){let w=m.querySelector("img");s.dom.setAttrib(w,"src",b.url),s.dom.setAttrib(m,"drawio-diagram",b.id)}else{let w=`
    `;s.insertContent(w)}},"drawio")}function h(y,m=null){s=y,u=m,dn.show(t,g,p)}async function p(y){const m="image-"+Math.random().toString(16).slice(2),b=window.baseUrl("/loading.gif");if(u){dn.close();let w=u.querySelector("img");try{const D=await dn.upload(y,i);s.dom.setAttrib(w,"src",D.url),s.dom.setAttrib(u,"drawio-diagram",D.id)}catch(D){window.$events.emit("error",trans("errors.image_upload_error")),console.log(D)}return}setTimeout(async()=>{s.insertContent(`
    `),dn.close();try{const w=await dn.upload(y,i);s.dom.setAttrib(m,"src",w.url),s.dom.get(m).parentNode.setAttribute("drawio-diagram",w.id)}catch(w){s.dom.remove(m),window.$events.emit("error",trans("errors.image_upload_error")),console.log(w)}},5)}function g(){if(!u)return Promise.resolve("");let y=u.getAttribute("drawio-diagram");return dn.load(y)}window.tinymce.PluginManager.add("drawio",function(y,m){y.addCommand("drawio",()=>{const b=y.selection.getNode();h(y,c(b)?b:null)}),y.addButton("drawio",{type:"splitbutton",tooltip:"Drawing",image:`data:image/svg+xml;base64,${btoa(` -`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=y.selection.getNode();d(y,c(b)?b:null)}}]}),y.on("dblclick",b=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const b=y.$("body > div[drawio-diagram]");if(!b.length)return;y.undoManager.transact(function(){b.each((w,D)=>{D.setAttribute("contenteditable","false")})})})})}function Qx(){window.tinymce.PluginManager.add("customhr",function(t){t.addCommand("InsertHorizontalRule",function(){let n=document.createElement("hr"),i=t.selection.getNode(),s=i.parentNode;s.insertBefore(n,i)}),t.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),t.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function Jx(t){window.$events.listen("editor::replace",({html:n})=>{t.setContent(n)}),window.$events.listen("editor::append",({html:n})=>{const i=t.getContent()+n;t.setContent(i)}),window.$events.listen("editor::prepend",({html:n})=>{const i=n+t.getContent();t.setContent(i)}),window.$events.listen("editor::insert",({html:n})=>{t.insertContent(n)}),window.$events.listen("editor::focus",()=>{t.focus()})}class e_{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){Xx(),Qx();const t=document.querySelector("[drawio-url]");if(t){const n=t.getAttribute("drawio-url");Zx(n,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const t=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${t} fullscreen`}getTinyMceConfig(){const t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}},file_browser_callback:function(n,i,s,u){s==="file"&&window.EntitySelectorPopup.show(function(c){const d=u.document.getElementById(n);d.value=c.link;const h=d.closest(".mce-form"),p=h.querySelectorAll("input");p[1].value||(p[1].value=c.name),p[2].value=c.name}),s==="image"&&window.ImageManager.show(function(c){if(u.document.getElementById(n).value=c.url,"createEvent"in document){let h=document.createEvent("HTMLEvents");h.initEvent("change",!1,!0),u.document.getElementById(n).dispatchEvent(h)}else u.document.getElementById(n).fireEvent("onchange");let d=``;d+=`${c.name}`,d+="",u.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,d)},"gallery")},paste_preprocess:function(n,i){let s=i.content;s.indexOf('{i();const h=new URL(window.location).searchParams,p=h.get("content-id");p&&s(p);const g=n.getContainer(),y=g.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",b=>{b.stopPropagation()});window.editor=n});function i(){const h=n.getContent();t.isDarkMode&&n.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",h)}function s(h){const p=n.dom.get(encodeURIComponent(h).replace(/!/g,"%21"));if(!p)return;p.scrollIntoView(),n.selection.select(p,!0),n.selection.collapse(!1),n.focus()}Jx(n),window.$events.listen("editor-html-update",h=>{n.setContent(h),n.selection.select(n.getBody(),!0),n.selection.collapse(!1),i(h)}),Vx(n);let u,c;function d(h){return h&&!!(h.textContent||h.innerText)}n.on("dragstart",function(){let h=n.selection.getNode();h.nodeName==="IMG"&&(u=n.dom.getParent(h,".mceTemp"),!u&&h.parentNode.nodeName==="A"&&!d(h.parentNode)&&(u=h.parentNode)),h.hasAttribute("contenteditable")&&h.getAttribute("contenteditable")==="false"&&(c=h)}),n.on("drop",function(h){let p=n.dom,g=tinymce.dom.RangeUtils.getCaretRangeFromPoint(h.clientX,h.clientY,n.getDoc());const y=h.dataTransfer&&h.dataTransfer.getData("bookstack/template");y&&(h.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{n.selection.setRng(g),n.undoManager.transact(function(){n.execCommand("mceInsertContent",!1,m.data.html)})})),p.getParent(g.startContainer,".mceTemp")?h.preventDefault():u&&(h.preventDefault(),n.undoManager.transact(function(){n.selection.setRng(g),n.selection.setNode(u),p.remove(u)})),!h.isDefaultPrevented()&&c&&(h.preventDefault(),n.undoManager.transact(function(){const m=n.selection.getNode(),b=n.selection.getRng(),w=m.closest("body > *");b.startOffset>b.startContainer.length/2?n.$(w).after(c):n.$(w).before(c)})),h.isDefaultPrevented()||Fv(h,n,t),u=null}),n.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(h){let p=``;p+=`${h.name}`,p+="",n.execCommand("mceInsertContent",!1,p)},"gallery")}}),n.on("paste",h=>Fv(h,n,t)),window.$events.emitPublic(t.elem,"editor-tinymce::setup",{editor:n})}}}}var Mv=e_;const qv=$e(qh()),zv={"add-remove-rows":ig,"ajax-delete-row":og,"ajax-form":ag,attachments:sg,"auto-suggest":lg,"back-to-top":ug,"book-sort":Fg,"breadcrumb-listing":Mg,"chapter-toggle":zg,"code-editor":Ng,"code-highlighter":Bg,collapsible:jg,"custom-checkbox":Hg,"details-highlighter":Ug,dropdown:Wg,dropzone:Gg,"editor-toolbox":Kg,"entity-permissions-editor":Vg,"entity-search":Yg,"entity-selector":Xg,"entity-selector-popup":Zg,"event-emit-select":Qg,"expand-toggle":Jg,"header-mobile-toggle":qv.default,"homepage-control":ev,"image-manager":tv,"image-picker":nv,index:Xa,"list-sort-control":rv,"markdown-editor":uv,"new-user-password":cv,notification:dv,"optional-input":hv,"page-comments":fv,"page-display":mv,"page-editor":vv,"page-picker":bv,"permissions-table":yv,popup:wv,"setting-app-color-picker":kv,"setting-color-picker":xv,"shelf-sort":_v,sidebar:Cv,"sortable-list":Sv,"submit-on-change":Ev,tabs:Dv,"tag-manager":Av,"template-manager":Tv,"toggle-switch":Lv,"tri-layout":Iv,"wysiwyg-editor":Mv};window.components={};function t_(t,n){const i=n.querySelectorAll(`[${t}]`);for(let s=0,u=i.length;s{d.from=s;const h=new CustomEvent(`${t}-${c}`,{bubbles:!0,detail:d});s.$el.dispatchEvent(h)},typeof s.setup=="function"&&s.setup()}catch(u){console.error("Failed to create component",u,t,n)}typeof window.components[t]=="undefined"&&(window.components[t]=[]),window.components[t].push(s),typeof n.components=="undefined"&&(n.components={}),n.components[t]=s}function n_(t,n){const i={},s={},u=`${t}@`,c=`[refs*="${u}"]`,d=[...n.querySelectorAll(c)];n.matches(c)&&d.push(n);for(const h of d){const p=h.getAttribute("refs").split(" ").filter(g=>g.startsWith(u)).map(g=>g.replace(u,"")).map(Rv);for(const g of p)i[g]=h,typeof s[g]=="undefined"&&(s[g]=[]),s[g].push(h)}return{refs:i,manyRefs:s}}function r_(t,n){const i={},s=`option:${t}:`;for(const{name:u,value:c}of n.attributes)if(u.startsWith(s)){const d=u.replace(s,"");i[Rv(d)]=c||""}return i}function Rv(t){const n=s=>s.slice(0,1).toUpperCase()+s.slice(1),i=t.split("-");return i[0]+i.slice(1).map(n).join("")}function Ov(t){typeof t=="undefined"&&(t=document);for(const i of Object.keys(zv))t_(i,t);const n=t.querySelectorAll("[component],[components]");for(const i of n){const s=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const u of s)Pv(u,i)}}window.components.init=Ov;window.components.first=t=>(window.components[t]||[null])[0];var Xa=Ov;window.baseUrl=function(t){let n=document.querySelector('meta[name="base-url"]').getAttribute("content");return n[n.length-1]==="/"&&(n=n.slice(0,n.length-1)),t[0]==="/"&&(t=t.slice(1)),n+"/"+t};window.$http=Zm;window.$events=Ym;const mi=new Qm;window.trans=mi.get.bind(mi);window.trans_choice=mi.getPlural.bind(mi);window.trans_plural=mi.parsePlural.bind(mi);Xa();})(); +`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=y.selection.getNode();d(y,c(b)?b:null)}}]}),y.on("dblclick",b=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const b=y.$("body > div[drawio-diagram]");if(!b.length)return;y.undoManager.transact(function(){b.each((w,D)=>{D.setAttribute("contenteditable","false")})})})})}function t_(){window.tinymce.PluginManager.add("customhr",function(t){t.addCommand("InsertHorizontalRule",function(){let n=document.createElement("hr"),i=t.selection.getNode(),s=i.parentNode;s.insertBefore(n,i)}),t.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),t.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function n_(t){window.$events.listen("editor::replace",({html:n})=>{t.setContent(n)}),window.$events.listen("editor::append",({html:n})=>{const i=t.getContent()+n;t.setContent(i)}),window.$events.listen("editor::prepend",({html:n})=>{const i=n+t.getContent();t.setContent(i)}),window.$events.listen("editor::insert",({html:n})=>{t.insertContent(n)}),window.$events.listen("editor::focus",()=>{t.focus()})}class r_{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){Jx(),t_();const t=document.querySelector("[drawio-url]");if(t){const n=t.getAttribute("drawio-url");e_(n,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const t=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${t} fullscreen`}getTinyMceConfig(){const t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}},file_browser_callback:function(n,i,s,u){s==="file"&&window.EntitySelectorPopup.show(function(c){const d=u.document.getElementById(n);d.value=c.link;const h=d.closest(".mce-form"),p=h.querySelectorAll("input");p[1].value||(p[1].value=c.name),p[2].value=c.name}),s==="image"&&window.ImageManager.show(function(c){if(u.document.getElementById(n).value=c.url,"createEvent"in document){let h=document.createEvent("HTMLEvents");h.initEvent("change",!1,!0),u.document.getElementById(n).dispatchEvent(h)}else u.document.getElementById(n).fireEvent("onchange");let d=``;d+=`${c.name}`,d+="",u.tinyMCE.activeEditor.execCommand("mceInsertContent",!1,d)},"gallery")},paste_preprocess:function(n,i){let s=i.content;s.indexOf('{i();const h=new URL(window.location).searchParams,p=h.get("content-id");p&&s(p);const g=n.getContainer(),y=g.querySelectorAll(".mce-btn");for(let m of y)m.addEventListener("touchstart",b=>{b.stopPropagation()});window.editor=n});function i(){const h=n.getContent();t.isDarkMode&&n.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",h)}function s(h){const p=n.dom.get(encodeURIComponent(h).replace(/!/g,"%21"));if(!p)return;p.scrollIntoView(),n.selection.select(p,!0),n.selection.collapse(!1),n.focus()}n_(n),window.$events.listen("editor-html-update",h=>{n.setContent(h),n.selection.select(n.getBody(),!0),n.selection.collapse(!1),i(h)}),Zx(n);let u,c;function d(h){return h&&!!(h.textContent||h.innerText)}n.on("dragstart",function(){let h=n.selection.getNode();h.nodeName==="IMG"&&(u=n.dom.getParent(h,".mceTemp"),!u&&h.parentNode.nodeName==="A"&&!d(h.parentNode)&&(u=h.parentNode)),h.hasAttribute("contenteditable")&&h.getAttribute("contenteditable")==="false"&&(c=h)}),n.on("drop",function(h){let p=n.dom,g=tinymce.dom.RangeUtils.getCaretRangeFromPoint(h.clientX,h.clientY,n.getDoc());const y=h.dataTransfer&&h.dataTransfer.getData("bookstack/template");y&&(h.preventDefault(),window.$http.get(`/templates/${y}`).then(m=>{n.selection.setRng(g),n.undoManager.transact(function(){n.execCommand("mceInsertContent",!1,m.data.html)})})),p.getParent(g.startContainer,".mceTemp")?h.preventDefault():u&&(h.preventDefault(),n.undoManager.transact(function(){n.selection.setRng(g),n.selection.setNode(u),p.remove(u)})),!h.isDefaultPrevented()&&c&&(h.preventDefault(),n.undoManager.transact(function(){const m=n.selection.getNode(),b=n.selection.getRng(),w=m.closest("body > *");b.startOffset>b.startContainer.length/2?n.$(w).after(c):n.$(w).before(c)})),h.isDefaultPrevented()||zv(h,n,t),u=null}),n.addButton("image-insert",{title:"My title",icon:"image",tooltip:"Insert an image",onclick:function(){window.ImageManager.show(function(h){let p=``;p+=`${h.name}`,p+="",n.execCommand("mceInsertContent",!1,p)},"gallery")}}),n.on("paste",h=>zv(h,n,t)),window.$events.emitPublic(t.elem,"editor-tinymce::setup",{editor:n})}}}}var Ov=r_;const Rv=Ke(Rh()),Pv={"add-remove-rows":sg,"ajax-delete-row":lg,"ajax-form":ug,attachments:cg,"auto-suggest":dg,"back-to-top":hg,"book-sort":zg,"breadcrumb-listing":Og,"chapter-toggle":Pg,"code-editor":Hg,"code-highlighter":Ug,collapsible:Wg,"custom-checkbox":$g,"details-highlighter":Gg,dropdown:Kg,dropzone:Yg,"editor-toolbox":Xg,"entity-permissions-editor":Zg,"entity-search":Qg,"entity-selector":Jg,"entity-selector-popup":ev,"event-emit-select":tv,"expand-toggle":nv,"header-mobile-toggle":Rv.default,"homepage-control":rv,"image-manager":iv,"image-picker":ov,index:Xa,"list-sort-control":av,"markdown-editor":hv,"new-user-password":fv,notification:pv,"optional-input":mv,"page-comments":gv,"page-display":bv,"page-editor":wv,"page-picker":kv,"permissions-table":xv,popup:_v,"setting-app-color-picker":Cv,"setting-color-picker":Sv,"shelf-sort":Ev,sidebar:Dv,"sortable-list":Av,"submit-on-change":Tv,tabs:Lv,"tag-manager":Iv,"template-manager":Fv,"toggle-switch":Mv,"tri-layout":qv,"wysiwyg-editor":Ov};window.components={};function i_(t,n){const i=n.querySelectorAll(`[${t}]`);for(let s=0,u=i.length;s{d.from=s;const h=new CustomEvent(`${t}-${c}`,{bubbles:!0,detail:d});s.$el.dispatchEvent(h)},typeof s.setup=="function"&&s.setup()}catch(u){console.error("Failed to create component",u,t,n)}typeof window.components[t]=="undefined"&&(window.components[t]=[]),window.components[t].push(s),typeof n.components=="undefined"&&(n.components={}),n.components[t]=s}function o_(t,n){const i={},s={},u=`${t}@`,c=`[refs*="${u}"]`,d=[...n.querySelectorAll(c)];n.matches(c)&&d.push(n);for(const h of d){const p=h.getAttribute("refs").split(" ").filter(g=>g.startsWith(u)).map(g=>g.replace(u,"")).map(Bv);for(const g of p)i[g]=h,typeof s[g]=="undefined"&&(s[g]=[]),s[g].push(h)}return{refs:i,manyRefs:s}}function a_(t,n){const i={},s=`option:${t}:`;for(const{name:u,value:c}of n.attributes)if(u.startsWith(s)){const d=u.replace(s,"");i[Bv(d)]=c||""}return i}function Bv(t){const n=s=>s.slice(0,1).toUpperCase()+s.slice(1),i=t.split("-");return i[0]+i.slice(1).map(n).join("")}function jv(t){typeof t=="undefined"&&(t=document);for(const i of Object.keys(Pv))i_(i,t);const n=t.querySelectorAll("[component],[components]");for(const i of n){const s=`${i.getAttribute("component")||""} ${i.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(const u of s)Nv(u,i)}}window.components.init=jv;window.components.first=t=>(window.components[t]||[null])[0];var Xa=jv;window.baseUrl=function(t){let n=document.querySelector('meta[name="base-url"]').getAttribute("content");return n[n.length-1]==="/"&&(n=n.slice(0,n.length-1)),t[0]==="/"&&(t=t.slice(1)),n+"/"+t};window.$http=eg;window.$events=Qm;const mi=new tg;window.trans=mi.get.bind(mi);window.trans_choice=mi.getPlural.bind(mi);window.trans_plural=mi.parsePlural.bind(mi);Xa();})(); /*! * clipboard.js v2.0.6 * https://clipboardjs.com/ diff --git a/version b/version index d1b3cf04c..43bd44397 100644 --- a/version +++ b/version @@ -1 +1 @@ -v0.30.2 +v0.30.3