bookstack/public/dist/app.js

93 lines
690 KiB
JavaScript
Raw Normal View History

(()=>{var ea=Object.defineProperty,By=Object.prototype.hasOwnProperty,se=(n,t)=>()=>(t||(t={exports:{}},n(t.exports,t)),t.exports),Jc=n=>ea(n,"__esModule",{value:!0}),Hy=(n,t)=>{Jc(n);for(var i in t)ea(n,i,{get:t[i],enumerable:!0})},Uy=(n,t)=>{if(Jc(n),typeof t=="object"||typeof t=="function")for(let i in t)!By.call(n,i)&&i!=="default"&&ea(n,i,{get:()=>t[i],enumerable:!0});return n},$e=n=>n&&n.__esModule?n:Uy(ea({},"default",{value:n,enumerable:!0}),n);var Qe=se((js,$s)=>{(function(n,t){typeof js=="object"&&typeof $s!="undefined"?$s.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.CodeMirror=t())})(js,function(){"use strict";var n=navigator.userAgent,t=navigator.platform,i=/gecko\/\d/i.test(n),s=/MSIE \d/.test(n),l=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(n),c=/Edge\/(\d+)/.exec(n),d=s||l||c,h=d&&(s?document.documentMode||6:+(c||l)[1]),p=!c&&/WebKit\//.test(n),g=p&&/Qt\/\d+\.\d+/.test(n),y=!c&&/Chrome\//.test(n),m=/Opera\//.test(n),v=/Apple Computer/.test(navigator.vendor),w=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(n),E=/PhantomJS/.test(n),D=!c&&/AppleWebKit/.test(n)&&/Mobile\/\w+/.test(n),C=/Android/.test(n),L=D||C||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(n),I=D||/Mac/.test(t),O=/\bCrOS\b/.test(n),W=/win/i.test(t),Y=m&&n.match(/Version\/(\d*\.\d*)/);Y&&(Y=Number(Y[1])),Y&&Y>=15&&(m=!1,p=!0);var B=I&&(g||m&&(Y==null||Y<12.11)),V=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 u=a.slice(o.index+o[0].length);e.className=a.slice(0,o.index)+(u?o[1]+u:"")}};function z(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function Q(e,r){return z(e).appendChild(r)}function _(e,r,a,o){var u=document.createElement(e);if(a&&(u.className=a),o&&(u.style.cssText=o),typeof r=="string")u.appendChild(document.createTextNode(r));else if(r)for(var f=0;f<r.length;++f)u.appendChild(r[f]);return u}function K(e,r,a,o){var u=_(e,r,a,o);return u.setAttribute("role","presentation"),u}var H;document.createRange?H=function(e,r,a,o){var u=document.createRange();return u.setEnd(o||e,a),u.setStart(e,r),u}:H=function(e,r,a){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch(u){return o}return o.collapse(!0),o.moveEnd("character",a),o.moveStart("character",r),o};function Z(e,r){if(r.nodeType==3&&(r=r.parentNode),e.contains)return e.contains(r);do if(r.nodeType==11&&(r=r.host),r==e)return!0;while(r=r.parentNode)}function P(){var e;try{e=document.activeElement}catch(r){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function F(e,r){var a=e.className;ee(r).test(a)||(e.className+=(a?" ":"")+r)}function U(e,r){for(var a=e.split(" "),o=0;o<a.length;o++)a[o]&&!ee(a[o]).test(r)&&(r+=" "+a[o]);return r}var he=function(e){e.select()};D?he=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:d&&(he=function(e){try{e.select()}catch(r){}});function M(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function A(e,r,a){r||(r={});for(var o in e)e.hasOwnProperty(o)&&(a!==!1||!r.hasOwnProperty(o))&&(r[o]=e[o]);return r}function ce(e,r,a,o,u){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var f=o||0,b=u||0;;){var k=e.indexOf(" ",f);if(k<0||k>=r)return b+(r-f);b+=k-f,b+=a-b%a,f=k+1}}var ue=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};ue.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date()?e.f():setTimeout(e.handler,e.time-+new Date())},ue.prototype.set=function(e,r){this.f=r;var a=+new Date()+e;(!this.id||a<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=a)};function ae(e,r){for(var a=0;a<e.length;++a)if(e[a]==r)return a;return-1}var Te=50,Ue={toString:function(){return"CodeMirror.Pass"}},we={scroll:!1},Se={origin:"*mouse"},Ve={origin:"+move"};function Ge(e,r,a){for(var o=0,u=0;;){var f=e.indexOf(" ",o);f==-1&&(f=e.length);var b=f-o;if(f==e.length||u+b>=r)return o+Math.min(b,r-u);if(u+=f-o,
b`.split(/\n/).length!=3?function(e){for(var r=0,a=[],o=e.length;r<=o;){var u=e.indexOf(`
`,r);u==-1&&(u=e.length);var f=e.slice(r,e.charAt(u-1)=="\r"?u-1:u),b=f.indexOf("\r");b!=-1?(a.push(f.slice(0,b)),r+=b+1):(a.push(f),r=u+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},Jn=function(){var e=_("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),qr=null;function Bn(e){if(qr!=null)return qr;var r=Q(e,_("span","x")),a=r.getBoundingClientRect(),o=H(r,0,1).getBoundingClientRect();return qr=Math.abs(a.left-o.left)>1}var gi={},Hn={};function zr(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),gi[e]=r}function vn(e,r){Hn[e]=r}function Un(e){if(typeof e=="string"&&Hn.hasOwnProperty(e))e=Hn[e];else if(e&&typeof e.name=="string"&&Hn.hasOwnProperty(e.name)){var r=Hn[e.name];typeof r=="string"&&(r={name:r}),e=jt(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Un("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Un("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function vi(e,r){r=Un(r);var a=gi[r.name];if(!a)return vi(e,"text/plain");var o=a(e,r);if(Wn.hasOwnProperty(r.name)){var u=Wn[r.name];for(var f in u){if(!u.hasOwnProperty(f))continue;o.hasOwnProperty(f)&&(o["_"+f]=o[f]),o[f]=u[f]}}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var b in r.modeProps)o[b]=r.modeProps[b];return o}var Wn={};function Qa(e,r){var a=Wn.hasOwnProperty(e)?Wn[e]:Wn[e]={};A(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 u=r[o];u instanceof Array&&(u=u.concat([])),a[o]=u}return a}function Or(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.pos<this.string.length)return this.string.charAt(this.pos++)},st.prototype.eat=function(e){var r=this.string.charAt(this.pos),a;if(typeof e=="string"?a=r==e:a=r&&(e.test?e.test(r):e(r)),a)return++this.pos,r},st.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},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.lastColumnPos<this.start&&(this.lastColumnValue=ce(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},st.prototype.indentation=function(){return ce(this.string,null,this.tabSize)-(this.lineStart?ce(this.string,this.lineStart,this.tabSize):0)},st.prototype.match=function(e,r,a){if(typeof e=="string"){var o=function(b){return a?b.toLowerCase():b},u=this.string.substr(this.pos,e.length);if(o(u)==o(e))return r!==!1&&(this.pos+=e.length),!0}else{var f=this.string.slice(this.pos).match(e);return f&&f.index>0?null:(f&&r!==!1&&(this.pos+=f[0].length),f)}},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.loo
`?(ie=q.appendChild(_("span",G[0]=="\r"?"␍":"␤","cm-invalidchar")),ie.setAttribute("cm-text",G[0]),e.col+=1):(ie=e.cm.options.specialCharPlaceholder(G[0]),ie.setAttribute("cm-text",G[0]),d&&h<9?q.appendChild(_("span",[ie])):q.appendChild(ie),e.col+=1);e.map.push(e.pos,e.pos+1,ie),e.pos++}}if(e.trailingSpace=k.charCodeAt(r.length-1)==32,a||o||u||S||f){var ge=a||"";o&&(ge+=o),u&&(ge+=u);var pe=_("span",[q],ge,f);if(b)for(var ve in b)b.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&pe.setAttribute(ve,b[ve]);return e.content.appendChild(pe)}e.content.appendChild(q)}function ab(e,r){if(e.length>1&&!/ /.test(e))return e;for(var a=r,o="",u=0;u<e.length;u++){var f=e.charAt(u);f==" "&&a&&(u==e.length-1||e.charCodeAt(u+1)==32)&&(f=" "),o+=f,a=f==" "}return o}function sb(e,r){return function(a,o,u,f,b,k,x){u=u?u+" cm-force-border":"cm-force-border";for(var S=a.pos,q=S+o.length;;){for(var R=void 0,G=0;G<r.length&&!(R=r[G],R.to>S&&R.from<=S);G++);if(R.to>=q)return e(a,o,u,f,b,k,x);e(a,o.slice(0,R.to-S),u,f,null,k,x),f=null,o=o.slice(R.to-S),S=R.to}}}function gu(e,r,a,o){var u=!o&&a.widgetNode;u&&e.map.push(e.pos,e.pos+r,u),!o&&e.cm.display.input.needsContentAttribute&&(u||(u=e.content.appendChild(document.createElement("span"))),u.setAttribute("cm-marker",a.id)),u&&(e.cm.display.input.setUneditable(u),e.content.appendChild(u)),e.pos+=r,e.trailingSpace=!1}function lb(e,r,a){var o=e.markedSpans,u=e.text,f=0;if(!o){for(var b=1;b<a.length;b+=2)r.addToken(r,u.slice(f,f=a[b]),pu(a[b+1],r.cm.options));return}for(var k=u.length,x=0,S=1,q="",R,G,$=0,ne,ie,le,fe,ge;;){if($==x){ne=ie=le=G="",ge=null,fe=null,$=Infinity;for(var pe=[],ve=void 0,De=0;De<o.length;++De){var _e=o[De],ze=_e.marker;if(ze.type=="bookmark"&&_e.from==x&&ze.widgetNode)pe.push(ze);else if(_e.from<=x&&(_e.to==null||_e.to>x||ze.collapsed&&_e.to==x&&_e.from==x)){if(_e.to!=null&&_e.to!=x&&$>_e.to&&($=_e.to,ie=""),ze.className&&(ne+=" "+ze.className),ze.css&&(G=(G?G+";":"")+ze.css),ze.startStyle&&_e.from==x&&(le+=" "+ze.startStyle),ze.endStyle&&_e.to==$&&(ve||(ve=[])).push(ze.endStyle,_e.to),ze.title&&((ge||(ge={})).title=ze.title),ze.attributes)for(var rt in ze.attributes)(ge||(ge={}))[rt]=ze.attributes[rt];ze.collapsed&&(!fe||ns(fe.marker,ze)<0)&&(fe=_e)}else _e.from>x&&$>_e.from&&($=_e.from)}if(ve)for(var Ft=0;Ft<ve.length;Ft+=2)ve[Ft+1]==$&&(ie+=" "+ve[Ft]);if(!fe||fe.from==x)for(var ut=0;ut<pe.length;++ut)gu(r,0,pe[ut]);if(fe&&(fe.from||0)==x){if(gu(r,(fe.to==null?k+1:fe.to)-x,fe.marker,fe.from==null),fe.to==null)return;fe.to==x&&(fe=!1)}}if(x>=k)break;for(var rn=Math.min(k,$);;){if(q){var Qt=x+q.length;if(!fe){var yt=Qt>rn?q.slice(0,rn-x):q;r.addToken(r,yt,R?R+ne:ne,le,x+yt.length==$?ie:"",G,ge)}if(Qt>=rn){q=q.slice(rn-x),x=rn;break}x=Qt,le=""}q=u.slice(f,f=a[S++]),R=pu(a[S++],r.cm.options)}}}function vu(e,r,a){this.line=r,this.rest=Jv(r),this.size=this.rest?Ke(ke(this.rest))-a+1:1,this.node=this.text=null,this.hidden=er(e,r)}function Io(e,r,a){for(var o=[],u,f=r;f<a;f=u){var b=new vu(e.doc,ye(e.doc,f),f);u=f+b.size,o.push(b)}return o}var Rr=null;function ub(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function cb(e){var r=e.delayedCallbacks,a=0;do{for(;a<r.length;a++)r[a].call(null);for(var o=0;o<e.ops.length;o++){var u=e.ops[o];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(a<r.length)}function db(e,r){var a=e.ownsGroup;if(!a)return;try{cb(a)}finally{Rr=null,r(a)}}var ki=null;function Pt(e,r){var a=pi(e,r);if(!a.length)return;var o=Array.prototype.slice.call(arguments,2),u;Rr?u=Rr.delayedCallbacks:ki?u=ki:(u=ki=[],setTimeout(hb,0));for(var f=function(k){u.push(function(){return a[k].apply(null,o)})},b=0;b<a.length;++b)f(b)}function hb(){var e=ki;ki=null;for(var r=0;r<e.length;++r)e[r]()}function bu(e,r,a,o){for(var u=0;u<r.changes.length;u++){var f=r.changes[u];f=="text"?pb(e,r):f=="gutter"?wu(e,r,a,o):f=="class"?as(e,r):f=="widget"&&mb(e,r,o)}r.changes=null}function xi(e){return e.node==e.text&&(e.node=_("div",null,null,"position:
top: `+ve+"px; width: "+(De??x-pe)+`px;
height: `+(_e-ve)+"px"))}function R(pe,ve,De){var _e=ye(u,pe),ze=_e.text.length,rt,Ft;function ut(yt,Jt){return ds(e,j(pe,yt),"div",_e,Jt)}function rn(yt,Jt,Rt){var St=zu(e,_e,null,yt),wt=Jt=="ltr"==(Rt=="after")?"left":"right",dt=Rt=="after"?St.begin:St.end-(/\s/.test(_e.text.charAt(St.end-1))?2:1);return ut(dt,wt)[wt]}var Qt=Ot(_e,u.direction);return be(Qt,ve||0,De??ze,function(yt,Jt,Rt,St){var wt=Rt=="ltr",dt=ut(yt,wt?"left":"right"),en=ut(Jt-1,wt?"right":"left"),Jr=ve==null&&yt==0,lr=De==null&&Jt==ze,Ut=St==0,qn=!Qt||St==Qt.length-1;if(en.top-dt.top<=3){var Mt=(S?Jr:lr)&&Ut,Us=(S?lr:Jr)&&qn,Vn=Mt?k:(wt?dt:en).left,xr=Us?x:(wt?en:dt).right;q(Vn,dt.top,xr-Vn,dt.bottom)}else{var _r,Gt,ei,Ws;wt?(_r=S&&Jr&&Ut?k:dt.left,Gt=S?x:rn(yt,Rt,"before"),ei=S?k:rn(Jt,Rt,"after"),Ws=S&&lr&&qn?x:en.right):(_r=S?rn(yt,Rt,"before"):k,Gt=!S&&Jr&&Ut?x:dt.right,ei=!S&&lr&&qn?k:en.left,Ws=S?rn(Jt,Rt,"after"):x),q(_r,dt.top,Gt-_r,dt.bottom),dt.bottom<en.top&&q(k,dt.bottom,null,en.top),q(ei,en.top,Ws-ei,en.bottom)}(!rt||zo(dt,rt)<0)&&(rt=dt),zo(en,rt)<0&&(rt=en),(!Ft||zo(dt,Ft)<0)&&(Ft=dt),zo(en,Ft)<0&&(Ft=en)}),{start:rt,end:Ft}}var G=r.from(),$=r.to();if(G.line==$.line)R(G.line,G.ch,$.ch);else{var ne=ye(u,G.line),ie=ye(u,$.line),le=In(ne)==In(ie),fe=R(G.line,G.ch,le?ne.text.length+1:null).end,ge=R($.line,le?0:null,$.ch).start;le&&(fe.top<ge.top-2?(q(fe.right,fe.top,null,fe.bottom),q(k,ge.top,ge.left,ge.bottom)):q(fe.right,fe.top,ge.left-fe.right,fe.bottom)),fe.bottom<ge.top&&q(k,fe.bottom,null,ge.top)}a.appendChild(f)}function bs(e){if(!e.state.focused)return;var r=e.display;clearInterval(r.blinker);var a=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){return r.cursorDiv.style.visibility=(a=!a)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}function Bu(e){e.state.focused||(e.display.input.focus(),ys(e))}function Hu(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Ei(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,F(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 Ei(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 Oo(e){for(var r=e.display,a=r.lineDiv.offsetTop,o=0;o<r.view.length;o++){var u=r.view[o],f=e.options.lineWrapping,b=void 0,k=0;if(u.hidden)continue;if(d&&h<8){var x=u.node.offsetTop+u.node.offsetHeight;b=x-a,a=x}else{var S=u.node.getBoundingClientRect();b=S.bottom-S.top,!f&&u.text.firstChild&&(k=u.text.firstChild.getBoundingClientRect().right-S.left-1)}var q=u.line.height-b;if((q>.005||q<-.005)&&(pn(u.line,b),Uu(u.line),u.rest))for(var R=0;R<u.rest.length;R++)Uu(u.rest[R]);if(k>e.display.sizerWidth){var G=Math.ceil(k/Hr(e.display));G>e.display.maxLineLength&&(e.display.maxLineLength=G,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}function Uu(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var a=e.widgets[r],o=a.node.parentNode;o&&(a.height=o.offsetHeight)}}function Po(e,r,a){var o=a&&a.top!=null?Math.max(0,a.top):e.scroller.scrollTop;o=Math.floor(o-Fo(e));var u=a&&a.bottom!=null?a.bottom:o+e.wrapper.clientHeight,f=T(r,o),b=T(r,u);if(a&&a.ensure){var k=a.ensure.from.line,x=a.ensure.to.line;k<f?(f=k,b=T(r,$n(ye(r,k))+e.wrapper.clientHeight)):Math.min(x,r.lastLine())>=b&&(f=T(r,$n(ye(r,x))-e.wrapper.clientHeight),b=x)}return{from:f,to:Math.max(b,f+1)}}function Ab(e,r){if(at(e,"scrollCursorIntoView"))return;var a=e.display,o=a.sizer.getBoundingClientRect(),u=null;if(r.top+o.top<0?u=!0:r.bottom+o.top>(window.innerHeight||doc
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(u),e.display.lineSpace.removeChild(f)}}function Tb(e,r,a,o){o==null&&(o=0);var u;!e.options.lineWrapping&&r==a&&(r=r.ch?j(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r,a=r.sticky=="before"?j(r.line,r.ch+1,"before"):r);for(var f=0;f<5;f++){var b=!1,k=bn(e,r),x=!a||a==r?k:bn(e,a);u={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 S=ws(e,u),q=e.doc.scrollTop,R=e.doc.scrollLeft;if(S.scrollTop!=null&&(Ai(e,S.scrollTop),Math.abs(e.doc.scrollTop-q)>1&&(b=!0)),S.scrollLeft!=null&&(br(e,S.scrollLeft),Math.abs(e.doc.scrollLeft-R)>1&&(b=!0)),!b)break}return u}function Lb(e,r){var a=ws(e,r);a.scrollTop!=null&&Ai(e,a.scrollTop),a.scrollLeft!=null&&br(e,a.scrollLeft)}function ws(e,r){var a=e.display,o=Br(e.display);r.top<0&&(r.top=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:a.scroller.scrollTop,f=ls(e),b={};r.bottom-r.top>f&&(r.bottom=r.top+f);var k=e.doc.height+ss(a),x=r.top<o,S=r.bottom>k-o;if(r.top<u)b.scrollTop=x?0:r.top;else if(r.bottom>u+f){var q=Math.min(r.top,(S?k:r.bottom)-f);q!=u&&(b.scrollTop=q)}var R=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:a.scroller.scrollLeft,G=pr(e)-(e.options.fixedGutter?a.gutters.offsetWidth:0),$=r.right-r.left>G;return $&&(r.right=r.left+G),r.left<10?b.scrollLeft=0:r.left<R?b.scrollLeft=Math.max(0,r.left-($?0:10)):r.right>G+R-3&&(b.scrollLeft=r.right+($?0:10)-G),b}function ks(e,r){if(r==null)return;Ro(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r}function Ur(e){Ro(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Di(e,r,a){(r!=null||a!=null)&&Ro(e),r!=null&&(e.curOp.scrollLeft=r),a!=null&&(e.curOp.scrollTop=a)}function Ib(e,r){Ro(e),e.curOp.scrollToPos=r}function Ro(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var a=Mu(e,r.from),o=Mu(e,r.to);Wu(e,a,o,r.margin)}}function Wu(e,r,a,o){var u=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});Di(e,u.scrollLeft,u.scrollTop)}function Ai(e,r){if(Math.abs(e.doc.scrollTop-r)<2)return;i||_s(e,{top:r}),ju(e,r,!0),i&&_s(e),Ii(e,100)}function ju(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,Yu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r)}function Ti(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"),u=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=u.tabIndex=-1,e(o),e(u),Ee(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),Ee(u,"scroll",function(){u.clientWidth&&r(u.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 u=e.viewHeight-(r?o:0);this.vert.firstChild.style.height
`},setDirection:It(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Kb(this.cm)})}),Zt.prototype.eachLine=Zt.prototype.iter;var Ec=0;function ay(e){var r=this;if(Dc(r),at(r,e)||Gn(r.display,e))return;xt(e),d&&(Ec=+new Date());var a=gr(r,e,!0),o=e.dataTransfer.files;if(!a||r.isReadOnly())return;if(o&&o.length&&window.FileReader&&window.File)for(var u=o.length,f=Array(u),b=0,k=function(){++b==u&&Lt(r,function(){a=Me(r.doc,a);var $={from:a,to:a,text:r.doc.splitLines(f.filter(function(ne){return ne!=null}).join(r.doc.lineSeparator())),origin:"paste"};Gr(r.doc,$),dc(r.doc,rr(Me(r.doc,a),Me(r.doc,ir($))))})()},x=function($,ne){if(r.options.allowDropFileTypes&&ae(r.options.allowDropFileTypes,$.type)==-1){k();return}var ie=new FileReader();ie.onerror=function(){return k()},ie.onload=function(){var le=ie.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(le)){k();return}f[ne]=le,k()},ie.readAsText($)},S=0;S<o.length;S++)x(o[S],S);else{if(r.state.draggingText&&r.doc.sel.contains(a)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var q=e.dataTransfer.getData("Text");if(q){var R;if(r.state.draggingText&&!r.state.draggingText.copy&&(R=r.listSelections()),jo(r.doc,rr(a,a)),R)for(var G=0;G<R.length;++G)Kr(r.doc,"",R[G].anchor,R[G].head,"drag");r.replaceSelection(q,"around","paste"),r.display.input.focus()}}catch($){}}}function sy(e,r){if(d&&(!e.state.draggingText||+new Date()-Ec<100)){Bt(r);return}if(at(e,r)||Gn(e.display,r))return;if(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!v){var a=_("img",null,null,"position: fixed; left: 0; top: 0;");a.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",m&&(a.width=a.height=1,e.display.wrapper.appendChild(a),a._top=a.offsetTop),r.dataTransfer.setDragImage(a,0,0),m&&a.parentNode.removeChild(a)}}function ly(e,r){var a=gr(e,r);if(!a)return;var o=document.createDocumentFragment();Nu(e,a,o),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Q(e.display.dragCursor,o)}function Dc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ac(e){if(!document.getElementsByClassName)return;for(var r=document.getElementsByClassName("CodeMirror"),a=[],o=0;o<r.length;o++){var u=r[o].CodeMirror;u&&a.push(u)}a.length&&a[0].operation(function(){for(var f=0;f<a.length;f++)e(a[f])})}var Tc=!1;function uy(){if(Tc)return;cy(),Tc=!0}function cy(){var e;Ee(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ac(dy)},100))}),Ee(window,"blur",function(){return Ac(Ei)})}function dy(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var sr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bi=0;Bi<10;Bi++)sr[Bi+48]=sr[Bi+96]=String(Bi);for(var Ko=65;Ko<=90;Ko++)sr[Ko]=String.fromCharCode(Ko);for(var Hi=1;Hi<=12;Hi++)sr[Hi+111]=sr[Hi+63235]="F"+Hi;var Kn={};Kn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Kn.pcDefaul
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Mc(e,r){var a=ye(e.doc,r),o=In(a);return o!=a&&(r=Ke(o)),zs(!0,e,o,r,1)}function my(e,r){var a=ye(e.doc,r),o=Qv(a);return o!=a&&(r=Ke(o)),zs(!0,e,a,r,-1)}function qc(e,r){var a=Mc(e,r.line),o=ye(e.doc,a.line),u=Ot(o,e.doc.direction);if(!u||u[0].level==0){var f=Math.max(a.ch,o.text.search(/\S/)),b=r.line==a.line&&r.ch<=f&&r.ch;return j(a.line,b?0:f,a.sticky)}return a}function Yo(e,r,a){if(typeof r=="string"&&(r=Ui[r],!r))return!1;e.display.input.ensurePolled();var o=e.display.shift,u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a&&(e.display.shift=!1),u=r(e)!=Ue}finally{e.display.shift=o,e.state.suppressEdits=!1}return u}function gy(e,r,a){for(var o=0;o<e.state.keyMaps.length;o++){var u=Yr(r,e.state.keyMaps[o],a,e);if(u)return u}return e.options.extraKeys&&Yr(r,e.options.extraKeys,a,e)||Yr(r,e.options.keyMap,a,e)}var vy=new ue();function Wi(e,r,a,o){var u=e.state.keySeq;if(u){if(Lc(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:vy.set(50,function(){e.state.keySeq==u&&(e.state.keySeq=null,e.display.input.reset())}),zc(e,u+" "+r,a,o))return!0}return zc(e,r,a,o)}function zc(e,r,a,o){var u=gy(e,r,o);return u=="multi"&&(e.state.keySeq=r),u=="handled"&&Pt(e,"keyHandled",e,r,a),(u=="handled"||u=="multi")&&(xt(a),bs(e)),!!u}function Oc(e,r){var a=Fc(r,!0);return a?r.shiftKey&&!e.state.keySeq?Wi(e,"Shift-"+a,r,function(o){return Yo(e,o,!0)})||Wi(e,a,r,function(o){if(typeof o=="string"?/^go[A-Z]/.test(o):o.motion)return Yo(e,o)}):Wi(e,a,r,function(o){return Yo(e,o)}):!1}function by(e,r,a){return Wi(e,"'"+a+"'",r,function(o){return Yo(e,o,!0)})}var Os=null;function Pc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(r.curOp.focus=P(),at(r,e))return;d&&h<11&&e.keyCode==27&&(e.returnValue=!1);var a=e.keyCode;r.display.shift=a==16||e.shiftKey;var o=Oc(r,e);m&&(Os=o?a:null,!o&&a==88&&!Jn&&(I?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),i&&!I&&!o&&a==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),a==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&yy(r)}function yy(e){var r=e.display.lineDiv;F(r,"CodeMirror-crosshair");function a(o){(o.keyCode==18||!o.altKey)&&(J(r,"CodeMirror-crosshair"),Pe(document,"keyup",a),Pe(document,"mouseover",a))}Ee(document,"keyup",a),Ee(document,"mouseover",a)}function Rc(e){e.keyCode==16&&(this.doc.sel.shift=!1),at(this,e)}function Nc(e){var r=this;if(e.target&&e.target!=r.display.input.getField())return;if(Gn(r.display,e)||at(r,e)||e.ctrlKey&&!e.altKey||I&&e.metaKey)return;var a=e.keyCode,o=e.charCode;if(m&&a==Os){Os=null,xt(e);return}if(m&&(!e.which||e.which<10)&&Oc(r,e))return;var u=String.fromCharCode(o??a);if(u=="\b")return;if(by(r,e,u))return;r.display.input.onKeyPress(e)}var wy=400,Ps=function(e,r,a){this.time=e,this.pos=r,this.button=a};Ps.prototype.compare=function(e,r,a){return this.time+wy>e&&de(r,this.pos)==0&&a==this.button};var ji,$i;function ky(e,r){var a=+new Date();return $i&&$i.compare(a,e,r)?(ji=$i=null,"triple"):ji&&ji.compare(a,e,r)?($i=new Ps(a,e,r),ji=null,"double"):(ji=new Ps(a,e,r),$i=null,"single")}function Bc(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(Rs(r,e))return;var o=gr(r,e),u=ko(e),f=o?ky(o,u):"single";if(window.focus(),u==1&&r.state.selectingText&&r.state.selectingText(e),o&&xy(r,u,o,f,e))return;u==1?o?Sy(r,o,f,e):Fr(e)==a.scroller&&xt(e):u==2?(o&&Wo(r.doc,o),setTimeout(function(){return a.input.focus()},20)):u==3&&(V?r.display.input.onContextMenu(e):Hu(r))}function xy(e,r,a,o,u){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,Ic(f,u),u,function(b){if(typeof b=="string"&&(b=Ui[b]),!b)return!1;var k=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),k=b(e,a)!=Ue}finally{e.state.suppressEdits=!1}return k})}function _y(e,r,a){var o=e.getOption("
`)==r){if(o.ranges.length%wn.text.length==0){S=[];for(var q=0;q<wn.text.length;q++)S.push(f.splitLines(wn.text[q]))}}else x.length==o.ranges.length&&e.options.pasteLinesPerSelection&&(S=tt(x,function(fe){return[fe]}));for(var R=e.curOp.updateInput,G=o.ranges.length-1;G>=0;G--){var $=o.ranges[G],ne=$.from(),ie=$.to();$.empty()&&(a&&a>0?ne=j(ne.line,ne.ch-a):e.state.overwrite&&!k?ie=j(ie.line,Math.min(ye(f,ie.line).text.length,ie.ch+ke(x).length)):k&&wn&&wn.lineWise&&wn.text.join(`
`)==x.join(`
`)&&(ne=ie=j(ne.line,0)));var le={from:ne,to:ie,text:S?S[G%S.length]:x,origin:u||(k?"paste":e.state.cutIncoming>b?"cut":"+input")};Gr(e.doc,le),Pt(e,"inputRead",e,le)}r&&!k&&Kc(e,r),Ur(e),e.curOp.updateInput<2&&(e.curOp.updateInput=R),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Gc(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 Kc(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 u=a.ranges[o];if(u.head.ch>100||o&&a.ranges[o-1].head.line==u.head.line)continue;var f=e.getModeAt(u.head),b=!1;if(f.electricChars){for(var k=0;k<f.electricChars.length;k++)if(r.indexOf(f.electricChars.charAt(k))>-1){b=Gi(e,u.head.line,"smart");break}}else f.electricInput&&(f.electricInput.test(ye(e.doc,u.head.line).text.slice(0,u.head.ch))&&(b=Gi(e,u.head.line,"smart")));b&&Pt(e,"electricInput",e,u.head.line)}}function Vc(e){for(var r=[],a=[],o=0;o<e.doc.sel.ranges.length;o++){var u=e.doc.sel.ranges[o].head.line,f={anchor:j(u,0),head:j(u+1,0)};a.push(f),r.push(e.getRange(f.anchor,f.head))}return{text:r,ranges:a}}function Yc(e,r,a,o){e.setAttribute("autocorrect",a?"":"off"),e.setAttribute("autocapitalize",o?"":"off"),e.setAttribute("spellcheck",!!r)}function Xc(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),r=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return p?e.style.width="1000px":e.setAttribute("wrap","off"),D&&(e.style.border="1px solid black"),Yc(e),r}function My(e){var r=e.optionHandlers,a=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(o,u){var f=this.options,b=f[o];if(f[o]==u&&o!="mode")return;f[o]=u,r.hasOwnProperty(o)&&Lt(this,r[o])(this,u,b),ct(this,"optionChange",this,o)},getOption:function(o){return this.options[o]},getDoc:function(){return this.doc},addKeyMap:function(o,u){this.state.keyMaps[u?"push":"unshift"](Vo(o))},removeKeyMap:function(o){for(var u=this.state.keyMaps,f=0;f<u.length;++f)if(u[f]==o||u[f].name==o)return u.splice(f,1),!0},addOverlay:$t(function(o,u){var f=o.token?o:e.getMode(this.options,o);if(f.startState)throw new Error("Overlays may not be stateful.");ft(this.state.overlays,{mode:f,modeSpec:o,opaque:u&&u.opaque,priority:u&&u.priority||0},function(b){return b.priority}),this.state.modeGen++,Xt(this)}),removeOverlay:$t(function(o){for(var u=this.state.overlays,f=0;f<u.length;++f){var b=u[f].modeSpec;if(b==o||typeof o=="string"&&b.name==o){u.splice(f,1),this.state.modeGen++,Xt(this);return}}}),indentLine:$t(function(o,u,f){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),N(this.doc,o)&&Gi(this,o,u,f)}),indentSelection:$t(function(o){for(var u=this.doc.sel.ranges,f=-1,b=0;b<u.length;b++){var k=u[b];if(k.empty())k.head.line>f&&(Gi(this,k.head.line,o,!0),f=k.head.line,b==this.doc.sel.primIndex&&Ur(this));else{var x=k.from(),S=k.to(),q=Math.max(f,x.line);f=Math.min(this.lastLine(),S.line-(S.ch?0:1))+1;for(var R=q;R<f;++R)Gi(this,R,o);var G=this.doc.sel.ranges;x.ch==0&&u.length==G.length&&G[b].from().ch>0&&Fs(this.doc,b,new Xe(x,G[b].to()),we)}}}),getTokenAt:function(o,u){return ru(this,o,u)},getLineTokens:function(o,u){return ru(this,j(o),u,!0)},getTokenTypeAt:function(o){o=Me(this.doc,o);var u=eu(this,ye(this.doc,o.line)),f=0,b=(u.length-1)/2,k=o.ch,x;if(k==0)x=u[2];else for(;;){var S=f+b>>1;if((S?u[S*2-1]:0)>=k)b=S;else if(u[S*2+1]<k)f=S+1;else{x=u[S*2+2];break}}var q=x?x.indexOf("overlay "):-1;return q<0?x:q==0?null:x.slice(0,q-1)},getModeAt:function(o){var u=this.doc.mode;return u.innerMode?e.innerMode(u,this.getTokenAt(o).state).mode:u},getHelper:function(o,u){return this.getHelpers(o,u)[0]},getHelpers:function(o,u){var f=[];if(!a.hasOwnProperty(u))return f;var b=a[u],k=this.getModeAt(o);if(typeof k[u]=="string")b[k[u]]&&f.push(b[k[u
`,le=oe(ie,$)?"w":G&&ie==`
`?"n":!G||/\s/.test(ie)?null:"p";if(G&&!ne&&!le&&(le="s"),R&&R!=le){a<0&&(a=1,q(),r.sticky="after");break}if(le&&(R=le),a>0&&!q(!ne))break}var fe=$o(e,r,f,b,!0);return He(f,fe)&&(fe.hitSide=!0),fe}function Zc(e,r,a,o){var u=e.doc,f=r.left,b;if(o=="page"){var k=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),x=Math.max(k-.5*Br(e.display),3);b=(a>0?r.bottom:r.top)+a*x}else o=="line"&&(b=a>0?r.bottom+3:r.top-3);for(var S;!(S=fs(e,f,b),!S.outside);){if(a<0?b<=0:b>=u.height){S.hitSide=!0;break}b+=a*5}return S}var et=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ue(),this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};et.prototype.init=function(e){var r=this,a=this,o=a.cm,u=a.div=e.lineDiv;Yc(u,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function f(k){for(var x=k.target;x;x=x.parentNode){if(x==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(x.className))break}return!1}Ee(u,"paste",function(k){if(!f(k)||at(o,k)||Gc(k,o))return;h<=11&&setTimeout(Lt(o,function(){return r.updateFromDOM()}),20)}),Ee(u,"compositionstart",function(k){r.composing={data:k.data,done:!1}}),Ee(u,"compositionupdate",function(k){r.composing||(r.composing={data:k.data,done:!1})}),Ee(u,"compositionend",function(k){r.composing&&(k.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Ee(u,"touchstart",function(){return a.forceCompositionEnd()}),Ee(u,"input",function(){r.composing||r.readFromDOMSoon()});function b(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=Vc(o);Zo({lineWise:!0,text:x.text}),k.type=="cut"&&o.operation(function(){o.setSelections(x.ranges,0,we),o.replaceSelection("",null,"cut")})}else return;if(k.clipboardData){k.clipboardData.clearData();var S=wn.text.join(`
`);if(k.clipboardData.setData("Text",S),k.clipboardData.getData("Text")==S){k.preventDefault();return}}var q=Xc(),R=q.firstChild;o.display.lineSpace.insertBefore(q,o.display.lineSpace.firstChild),R.value=wn.text.join(`
`);var G=document.activeElement;he(R),setTimeout(function(){o.display.lineSpace.removeChild(q),G.focus(),G==u&&a.showPrimarySelection()},50)}Ee(u,"copy",b),Ee(u,"cut",b)},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(),u=a.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||u.line<r.display.viewFrom){e.removeAllRanges();return}var f=Qo(r,e.anchorNode,e.anchorOffset),b=Qo(r,e.focusNode,e.focusOffset);if(f&&!f.bad&&b&&!b.bad&&de(Yt(f,b),o)==0&&de(_t(f,b),u)==0)return;var k=r.display.view,x=o.line>=r.display.viewFrom&&Qc(r,o)||{node:k[0].measure.map[2],offset:0},S=u.line<r.display.viewTo&&Qc(r,u);if(!S){var q=k[k.length-1].measure,R=q.maps?q.maps[q.maps.length-1]:q.map;S={node:R[R.length-1],offset:R[R.length-2]-R[R.length-3]}}if(!x||!S){e.removeAllRanges();return}var G=e.rangeCount&&e.getRangeAt(0),$;try{$=H(x.node,x.offset,S.offset,S.node)}catch(ne){}$&&(!i&&r.state.focused?(e.collapse(x.node,x.offset),$.collapsed||(e.removeAllRanges(),e.addRange($))):(e.removeAllRanges(),e.addRange($)),G&&e.anchorNode==null?e.addRange(G):i&&this.startGracePeriod()),this.rememberSelection()},et.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},et.prototype.showMultipleSelections=function(e){Q(this.cm.display.cursorDiv,e.cursors),Q(this.cm.display.selectionDiv,e.selection)},et.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},et.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return Z(this.div,r)},et.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},et.prototype.blur=function(){this.div.blur()},et.prototype.getField=function(){return this.div},et.prototype.supportsTouch=function(){return!0},et.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():nn(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function r(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,r))}this.polling.set(this.cm.options.pollInterval,r)},et.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},et.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),r=this.cm;if(C&&y&&this.cm.display.gutterSpecs.length&&qy(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var a=Qo(r,e.anchorNode,e.anchorOffset),o=Qo(r,e.focusNode,e.focusOffset);a&&o&&nn(r,function(){Ht(r.doc,rr(a,o),we),(a.bad||o.bad)&&(r.curOp.selectionChanged=!0)})},et.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,a=e.doc.sel.primary(),o=a.from(),u=a.to();if(o.ch==0&&o.line>e.firstLine()&&(o=j(o.line-1,ye(e.doc,o.line-1).length)),u.ch==ye(e.doc,
`),he(u))}else return;b.type=="cut"&&(o.state.cutIncoming=+new Date())}Ee(u,"cut",f),Ee(u,"copy",f),Ee(e.scroller,"paste",function(b){if(Gn(e,b)||at(o,b))return;if(!u.dispatchEvent){o.state.pasteIncoming=+new Date(),a.focus();return}var k=new Event("paste");k.clipboardData=b.clipboardData,u.dispatchEvent(k)}),Ee(e.lineSpace,"selectstart",function(b){Gn(e,b)||xt(b)}),Ee(u,"compositionstart",function(){var b=o.getCursor("from");a.composing&&a.composing.range.clear(),a.composing={start:b,range:o.markText(b,o.getCursor("to"),{className:"CodeMirror-composing"})}}),Ee(u,"compositionend",function(){a.composing&&(a.poll(),a.composing.range.clear(),a.composing=null)})},mt.prototype.createField=function(e){this.wrapper=Xc(),this.textarea=this.wrapper.firstChild},mt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},mt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,a=e.doc,o=Ru(e);if(e.options.moveInputWithCursor){var u=bn(e,a.sel.primary().head,"div"),f=r.wrapper.getBoundingClientRect(),b=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,u.top+b.top-f.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,u.left+b.left-f.left))}return o},mt.prototype.showSelection=function(e){var r=this.cm,a=r.display;Q(a.cursorDiv,e.cursors),Q(a.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},mt.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&&he(this.textarea),d&&h>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",d&&h>=9&&(this.hasSelection=null))},mt.prototype.getField=function(){return this.textarea},mt.prototype.supportsTouch=function(){return!1},mt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},mt.prototype.blur=function(){this.textarea.blur()},mt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},mt.prototype.receivedFocus=function(){this.slowPoll()},mt.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()})},mt.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)},mt.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 u=a.value;if(u==o&&!r.somethingSelected())return!1;if(d&&h>=9&&this.hasSelection===u||I&&/[\uf700-\uf7ff]/.test(u))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var f=u.charCodeAt(0);if(f==8203&&!o&&(o=""),f==8666)return this.reset(),this.cm.execCommand("undo")}for(var b=0,k=Math.min(o.length,u.length);b<k&&o.charCodeAt(b)==u.charCodeAt(b);)++b;return nn(r,function(){Bs(r,u.slice(b),o.length-b,null,e.composing?"*compose":null),u.length>1e3||u.indexOf(`
`)>-1?a.value=e.prevInput="":e.prevInput=u,e.composing&&(e.composing.range.clear(),e.composing.range=r.markText(e.composing.start,r.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},mt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},mt.prototype.onKeyPress=function(){d&&h>=9&&(this.hasSelection=null),this.fastPoll()},mt.prototype.onContextMenu=function(e){var r=this,a=r.cm,o=a.display,u=r.textarea;r.contextMenuPending&&r.contextMenuPending();var f=gr(a,e),b=o.scroller.scrollTop;if(!f||m)return;var k=a.options.resetSelectionOnContextMenu;k&&a.doc.sel.contains(f)==-1&&Lt(a,Ht)(a.doc,rr(f),we);var x=u.style.cssText,S=r.wrapper.style.cssText,q=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-q.top-5)+"px; left: "+(e.clientX-q.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 R;p&&(R=window.scrollY),o.input.focus(),p&&window.scrollTo(null,R),o.input.reset(),a.somethingSelected()||(u.value=r.prevInput=" "),r.contextMenuPending=$,o.selForContextMenu=a.doc.sel,clearTimeout(o.detectingSelectAll);function G(){if(u.selectionStart!=null){var ie=a.somethingSelected(),le=""+(ie?u.value:"");u.value="⇚",u.value=le,r.prevInput=ie?"":"",u.selectionStart=1,u.selectionEnd=le.length,o.selForContextMenu=a.doc.sel}}function $(){if(r.contextMenuPending!=$)return;if(r.contextMenuPending=!1,r.wrapper.style.cssText=S,u.style.cssText=x,d&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=b),u.selectionStart!=null){(!d||d&&h<9)&&G();var ie=0,le=function(){o.selForContextMenu==a.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&r.prevInput==""?Lt(a,gc)(a):ie++<10?o.detectingSelectAll=setTimeout(le,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(le,200)}}if(d&&h>=9&&G(),V){Bt(e);var ne=function(){Pe(window,"mouseup",ne),setTimeout($,20)};Ee(window,"mouseup",ne)}else setTimeout($,50)},mt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor"},mt.prototype.setUneditable=function(){},mt.prototype.needsContentAttribute=!1;function Py(e,r){if(r=r?A(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=P();r.autofocus=a==e||e.getAttribute("autofocus")!=null&&a==document.body}function o(){e.value=k.getValue()}var u;if(e.form&&(Ee(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var f=e.form;u=f.submit;try{var b=f.submit=function(){o(),f.submit=u,f.submit(),f.submit=b}}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&&(Pe(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=u))}},e.style.display="none";var k=lt(function(x){return e.parentNode.insertBefore(x,e.nextSibling)},r);return k}function Ry(e){e.off=Pe,e.on=Ee,e.wheelEventPixels=$b,e.Doc=Zt,e.splitLines=Dn,e.countColumn=ce,e.findColumn=Ge,e.isWordChar=X,e.Pass=Ue,e.signal=ct,e.Line=Pr,e.changeEnd=ir,e.scrollbarModel=Gu,e.Pos=j,e.cmpPos=de,e.modes=gi,e.mimeModes=Hn,e.resolveMode=Un,e.getMode=vi,e.modeExtensions=Wn,e.extendMode=Qa,e.copyState=fn,e.startState=_o,e.innerMode=Or,e.commands=Ui,e.keyMap=Kn,e.keyName=Fc,e.isModifierKey=Lc,e.lookupKey=Yr,e.normalizeKeyMap=fy,e.StringStream=st,e.SharedTextMarker=Ni,e.TextMarker=ar,e.LineWidget=Ri,e.e_preventDefault=xt,e.e_stopPropagation=wo,e.e_stop=Bt,e.addClass=F,e.contains=Z,e.rmClass=J,e.keyNames=sr}Ty(lt),My(lt);var Ny="iter insert remove copy getEditor constructor".split(" ");for(var Jo in Zt.prototype)Zt.prototype.hasOwnProperty(Jo)&&ae(Ny,Jo)<0&&(lt.prototype[Jo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Zt.prototype[Jo]));return Qn(Zt),lt.inputStyles={textarea:mt,contenteditable:et},lt.defineMode=function(e){!lt.defaults.mode&&e!="null"&&(lt.defaults.mode=e),zr.apply(this,arguments)},lt.defineMIME=vn,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=Py,Ry(lt),lt.version="5.57.0",lt})});var Ks=se((Ki,Gs)=>{!function(n,t){typeof Ki=="object"&&typeof Gs=="object"?Gs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof Ki=="object"?Ki.ClipboardJS=t():n.ClipboardJS=t()}(Ki,function(){return i={},n.m=t=[function(s,l){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
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c=!0,d=!1,h;return{s:function(){i=n[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 Gy(n,t){if(!n)return;if(typeof n=="string")return Th(n,t);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Th(n,t)}function Th(n,t){(t==null||t>n.length)&&(t=n.length);for(var i=0,s=new Array(t);i<t;i++)s[i]=n[i];return s}function Js(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function Lh(n,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(n,s.key,s)}}function oa(n,t,i){return t&&Lh(n.prototype,t),i&&Lh(n,i),n}var Ih=function(){function n(){Js(this,n)}return oa(n,[{key:"on",value:function(i,s){return this._callbacks=this._callbacks||{},this._callbacks[i]||(this._callbacks[i]=[]),this._callbacks[i].push(s),this}},{key:"emit",value:function(i){this._callbacks=this._callbacks||{};var s=this._callbacks[i];if(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];var h=We(s),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.apply(this,c)}}catch(y){h.e(y)}finally{h.f()}}return this}},{key:"off",value:function(i,s){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var l=this._callbacks[i];if(!l)return this;if(arguments.length===1)return delete this._callbacks[i],this;for(var c=0;c<l.length;c++){var d=l[c];if(d===s){l.splice(c,1);break}}return this}}]),n}(),Ne=function(n){Wy(i,n);var t=$y(i);oa(i,null,[{key:"initClass",value:function(){this.prototype.Emitter=Ih,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype.defaultOptions={url:null,method:"post",withCredentials:!1,timeout:3e4,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(c,d,h){if(h)return{dzuuid:h.file.upload.uuid,dzchunkindex:h.index,dztotalfilesize:h.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:h.file.upload.totalChunkCount,dzchunkbyteoffset:h.index*this.opt
<div class="dz-image"><img data-dz-thumbnail /></div>
<div class="dz-details">
<div class="dz-size"><span data-dz-size></span></div>
<div class="dz-filename"><span data-dz-name></span></div>
</div>
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
<div class="dz-success-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Check</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path>
</g>
</svg>
</div>
<div class="dz-error-mark">
<svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Error</title>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475">
<path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path>
</g>
</g>
</svg>
</div>
</div>`,drop:function(c){return this.element.classList.remove("dz-drag-hover")},dragstart:function(c){},dragend:function(c){return this.element.classList.remove("dz-drag-hover")},dragenter:function(c){return this.element.classList.add("dz-drag-hover")},dragover:function(c){return this.element.classList.add("dz-drag-hover")},dragleave:function(c){return this.element.classList.remove("dz-drag-hover")},paste:function(c){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(c){var d=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){c.previewElement=i.createElement(this.options.previewTemplate.trim()),c.previewTemplate=c.previewElement,this.previewsContainer.appendChild(c.previewElement);var h=We(c.previewElement.querySelectorAll("[data-dz-name]")),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;g.textContent=c.name}}catch(C){h.e(C)}finally{h.f()}var y=We(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(C){y.e(C)}finally{y.f()}this.options.addRemoveLinks&&(c._removeLink=i.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),c.previewElement.appendChild(c._removeLink));var v=function(L){return L.preventDefault(),L.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=We(c.previewElement.querySelectorAll("[data-dz-remove]")),E;try{for(w.s();!(E=w.n()).done;){var D=E.value;D.addEventListener("click",v)}}catch(C){w.e(C)}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=We(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=We(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=We(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(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),h=1;h<c;h++)d[h-1]=arguments[h];for(var p=0,g=d;p<g.length;p++){var y=g[p];for(var m in y){var v=y[m];l[m]=v}}return l}}]);function i(s,l){var c;Js(this,i),c=t.ca
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++)),l=h<<2|p>>4,c=(p&15)<<4|g>>2,d=(g&3)<<6|y,v.push(l),g!==64&&v.push(c),y!==64&&v.push(d),l=c=d="",h=p=g=y="",!(m<i.length)););return v}}]),n}();Fh.initClass();var Jy=function(t,i){var s=!1,l=!0,c=t.document,d=c.documentElement,h=c.addEventListener?"addEventListener":"attachEvent",p=c.addEventListener?"removeEventListener":"detachEvent",g=c.addEventListener?"":"on",y=function v(w){if(w.type==="readystatechange"&&c.readyState!=="complete")return;if((w.type==="load"?t:c)[p](g+w.type,v,!1),!s&&(s=!0))return i.call(t,w.type||w)},m=function v(){try{d.doScroll("left")}catch(w){setTimeout(v,50);return}return y("poll")};if(c.readyState!=="complete"){if(c.createEventObject&&d.doScroll){try{l=!t.frameElement}catch(v){}l&&m()}return c[h](g+"DOMContentLoaded",y,!1),c[h](g+"readystatechange",y,!1),t[h](g+"load",y,!1)}};Ne._autoDiscoverFunction=function(){if(Ne.autoDiscover)return Ne.discover()};Jy(window,Ne._autoDiscoverFunction);function Yy(n,t){return typeof n!="undefined"&&n!==null?t(n):void 0}function Xy(n,t,i){return typeof n!="undefined"&&n!==null&&typeof n[t]=="function"?i(n,t):void 0}});var zh=se((I_,qh)=>{class ew{constructor(n){this.elem=n,this.toggleButton=n.querySelector(".mobile-menu-toggle"),this.menu=n.querySelector(".header-links"),this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this)}onToggle(n){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.open?window.addEventListener("click",this.onWindowClick):window.removeEventListener("click",this.onWindowClick),n.stopPropagation()}onWindowClick(n){this.onToggle(n)}}qh.exports=ew});var Ph=se((F_,Oh)=>{Oh.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:"
`,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:"п"
`," "],sw=["{","}","|","\\","^","`"].concat(aw),lw=["'"].concat(sw),Yh=["%","/","?",";","#"].concat(lw),Xh=["/","?","#"],uw=255,Zh=/^[+a-z0-9A-Z_-]{0,63}$/,cw=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Qh={javascript:!0,"javascript:":!0},Jh={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function dw(n,t){if(n&&n instanceof ua)return n;var i=new ua();return i.parse(n,t),i}ua.prototype.parse=function(n,t){var i,s,l,c,d,h=n;if(h=h.trim(),!t&&n.split("#").length===1){var p=ow.exec(h);if(p)return this.pathname=p[1],p[2]&&(this.search=p[2]),this}var g=rw.exec(h);if(g&&(g=g[0],l=g.toLowerCase(),this.protocol=g,h=h.substr(g.length)),(t||g||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(d=h.substr(0,2)==="//",d&&!(g&&Qh[g])&&(h=h.substr(2),this.slashes=!0)),!Qh[g]&&(d||g&&!Jh[g])){var y=-1;for(i=0;i<Xh.length;i++)c=h.indexOf(Xh[i]),c!==-1&&(y===-1||c<y)&&(y=c);var m,v;for(y===-1?v=h.lastIndexOf("@"):v=h.lastIndexOf("@",y),v!==-1&&(m=h.slice(0,v),h=h.slice(v+1),this.auth=m),y=-1,i=0;i<Yh.length;i++)c=h.indexOf(Yh[i]),c!==-1&&(y===-1||c<y)&&(y=c);y===-1&&(y=h.length),h[y-1]===":"&&y--;var w=h.slice(0,y);h=h.slice(y),this.parseHost(w),this.hostname=this.hostname||"";var E=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!E){var D=this.hostname.split(/\./);for(i=0,s=D.length;i<s;i++){var C=D[i];if(!C)continue;if(!C.match(Zh)){for(var L="",I=0,O=C.length;I<O;I++)C.charCodeAt(I)>127?L+="x":L+=C[I];if(!L.match(Zh)){var W=D.slice(0,i),Y=D.slice(i+1),B=C.match(cw);B&&(W.push(B[1]),Y.unshift(B[2])),Y.length&&(h=Y.join(".")+h),this.hostname=W.join(".");break}}}}this.hostname.length>uw&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var V=h.indexOf("#");V!==-1&&(this.hash=h.substr(V),h=h.slice(0,V));var ee=h.indexOf("?");return ee!==-1&&(this.search=h.substr(ee),h=h.slice(0,ee)),h&&(this.pathname=h),Jh[l]&&this.hostname&&!this.pathname&&(this.pathname=""),this};ua.prototype.parseHost=function(n){var t=iw.exec(n);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),n=n.substr(0,n.length-t.length)),n&&(this.hostname=n)};Vh.exports=dw});var tl=se((N_,Yi)=>{"use strict";Yi.exports.encode=Uh();Yi.exports.decode=$h();Yi.exports.format=Kh();Yi.exports.parse=ef()});var nl=se((B_,tf)=>{tf.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var rl=se((H_,nf)=>{nf.exports=/[\0-\x1F\x7F-\x9F]/});var of=se((U_,rf)=>{rf.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=se((W_,af)=>{af.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var sf=se(ti=>{"use strict";ti.Any=nl();ti.Cc=rl();ti.Cf=of();ti.P=aa();ti.Z=il()});var Je=se(qt=>{"use strict";function hw(n){return Object.prototype.toString.call(n)}function fw(n){return hw(n)==="[object String]"}var pw=Object.prototype.hasOwnProperty;function lf(n,t){return pw.call(n,t)}function mw(n){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(i){if(!i)return;if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(s){n[s]=i[s]})}),n}function gw(n,t,i){return[].concat(n.slice(0,t),i,n.slice(t+1))}function uf(n){return n>=55296&&n<=57343||(n>=64976&&n<=65007||((n&65535)===65535||(n&65535)===65534||(n>=0&&n<=8||(n===11||(n>=14&&n<=31||n>=127&&n<=159)))))?!1:!(n>1114111)}function cf(n){if(n>65535){n-=65536;var t=55296+(n>>10),i=56320+(n&1023);return String.fromCharCode(t,i)}return String.fromCharCode(n)}var df=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,vw=/&([a-z#][a-z0-9]{1,31});/gi,bw=new RegExp(df.source+"|"+vw.source,"gi"),yw=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,hf=el();function ww(n,t){var i=0;return lf(hf,t)?hf[t]:t.charCodeAt(0)===35&&yw.test(t)&&(i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),uf(i))?cf(i):n}function kw(n){return n.indexOf("\\")<0?n:n.replac
`};zn.fence=function(n,t,i,s,l){var c=n[t],d=c.info?Rw(c.info).trim():"",h="",p,g,y,m;return d&&(h=d.split(/\s+/g)[0]),i.highlight?p=i.highlight(c.content,h)||Sr(c.content):p=Sr(c.content),p.indexOf("<pre")===0?p+`
`:d?(g=c.attrIndex("class"),y=c.attrs?c.attrs.slice():[],g<0?y.push(["class",i.langPrefix+h]):y[g][1]+=" "+i.langPrefix+h,m={attrs:y},"<pre><code"+l.renderAttrs(m)+">"+p+`</code></pre>
`):"<pre><code"+l.renderAttrs(c)+">"+p+`</code></pre>
`};zn.image=function(n,t,i,s,l){var c=n[t];return c.attrs[c.attrIndex("alt")][1]=l.renderInlineAsText(c.children,i,s),l.renderToken(n,t,i)};zn.hardbreak=function(n,t,i){return i.xhtmlOut?`<br />
`:`<br>
`};zn.softbreak=function(n,t,i){return i.breaks?i.xhtmlOut?`<br />
`:`<br>
`:`
`};zn.text=function(n,t){return Sr(n[t].content)};zn.html_block=function(n,t){return n[t].content};zn.html_inline=function(n,t){return n[t].content};function ni(){this.rules=Pw({},zn)}ni.prototype.renderAttrs=function(t){var i,s,l;if(!t.attrs)return"";for(l="",i=0,s=t.attrs.length;i<s;i++)l+=" "+Sr(t.attrs[i][0])+'="'+Sr(t.attrs[i][1])+'"';return l};ni.prototype.renderToken=function(t,i,s){var l,c="",d=!1,h=t[i];return h.hidden?"":(h.block&&h.nesting!==-1&&i&&t[i-1].hidden&&(c+=`
`),c+=(h.nesting===-1?"</":"<")+h.tag,c+=this.renderAttrs(h),h.nesting===0&&s.xhtmlOut&&(c+=" /"),h.block&&(d=!0,h.nesting===1&&(i+1<t.length&&(l=t[i+1],(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===h.tag)&&(d=!1)))),c+=d?`>
`:">",c)};ni.prototype.renderInline=function(n,t,i){for(var s,l="",c=this.rules,d=0,h=n.length;d<h;d++)s=n[d].type,typeof c[s]!="undefined"?l+=c[s](n,d,t,i,this):l+=this.renderToken(n,d,t);return l};ni.prototype.renderInlineAsText=function(n,t,i){for(var s="",l=0,c=n.length;l<c;l++)n[l].type==="text"?s+=n[l].content:n[l].type==="image"&&(s+=this.renderInlineAsText(n[l].children,t,i));return s};ni.prototype.render=function(n,t,i){var s,l,c,d="",h=this.rules;for(s=0,l=n.length;s<l;s++)c=n[s].type,c==="inline"?d+=this.renderInline(n[s].children,t,i):typeof h[c]!="undefined"?d+=h[n[s].type](n,s,t,i,this):d+=this.renderToken(n,s,t,i);return d};kf.exports=ni});var da=se((Z_,_f)=>{"use strict";function kn(){this.__rules__=[],this.__cache__=null}kn.prototype.__find__=function(n){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===n)return t;return-1};kn.prototype.__compile__=function(){var n=this,t=[""];n.__rules__.forEach(function(i){if(!i.enabled)return;i.alt.forEach(function(s){t.indexOf(s)<0&&t.push(s)})}),n.__cache__={},t.forEach(function(i){n.__cache__[i]=[],n.__rules__.forEach(function(s){if(!s.enabled)return;if(i&&s.alt.indexOf(i)<0)return;n.__cache__[i].push(s.fn)})})};kn.prototype.at=function(n,t,i){var s=this.__find__(n),l=i||{};if(s===-1)throw new Error("Parser rule not found: "+n);this.__rules__[s].fn=t,this.__rules__[s].alt=l.alt||[],this.__cache__=null};kn.prototype.before=function(n,t,i,s){var l=this.__find__(n),c=s||{};if(l===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(l,0,{name:t,enabled:!0,fn:i,alt:c.alt||[]}),this.__cache__=null};kn.prototype.after=function(n,t,i,s){var l=this.__find__(n),c=s||{};if(l===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(l+1,0,{name:t,enabled:!0,fn:i,alt:c.alt||[]}),this.__cache__=null};kn.prototype.push=function(n,t,i){var s=i||{};this.__rules__.push({name:n,enabled:!0,fn:t,alt:s.alt||[]}),this.__cache__=null};kn.prototype.enable=function(n,t){Array.isArray(n)||(n=[n]);var i=[];return n.forEach(function(s){var l=this.__find__(s);if(l<0){if(t)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[l].enabled=!0,i.push(s)},this),this.__cache__=null,i};kn.prototype.enableOnly=function(n,t){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(i){i.enabled=!1}),this.enable(n,t)};kn.prototype.disable=function(n,t){Array.isArray(n)||(n=[n]);var i=[];return n.forEach(function(s){var l=this.__find__(s);if(l<0){if(t)return;throw new Error("Rules manager: invalid rule name "+s)}this.__rules__[l].enabled=!1,i.push(s)},this),this.__cache__=null,i};kn.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};_f.exports=kn});var Cf=se((Q_,Sf)=>{"use strict";var Nw=/\r\n?|\n/g,Bw=/\0/g;Sf.exports=function(t){var i;i=t.src.replace(Nw,`
`),i=i.replace(Bw,"<22>"),t.src=i}});var Df=se((J_,Ef)=>{"use strict";Ef.exports=function(t){var i;t.inlineMode?(i=new t.Token("inline","",0),i.content=t.src,i.map=[0,1],i.children=[],t.tokens.push(i)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var Tf=se((e2,Af)=>{"use strict";Af.exports=function(t){var i=t.tokens,s,l,c;for(l=0,c=i.length;l<c;l++)s=i[l],s.type==="inline"&&t.md.inline.parse(s.content,t.md,t.env,s.children)}});var If=se((t2,Lf)=>{"use strict";var Hw=Je().arrayReplaceAt;function Uw(n){return/^<a[>\s]/i.test(n)}function Ww(n){return/^<\/a\s*>/i.test(n)}Lf.exports=function(t){var i,s,l,c,d,h,p,g,y,m,v,w,E,D,C,L,I=t.tokens,O;if(!t.md.options.linkify)return;for(s=0,l=I.length;s<l;s++){if(I[s].type!=="inline"||!t.md.linkify.pretest(I[s].content))continue;for(c=I[s].children,E=0,i=c.length-1;i>=0;i--){if(h=c[i],h.type==="link_close"){for(i--;c[i].level!==h.level&&c[i].type!=="link_open";)i--;continue}if(h.type==="html_inline"&&(Uw(h.content)&&E>0&&E--,Ww(h.content)&&E++),E>0)continue;if(h.type==="text"&&t.md.linkify.test(h.content)){for(y=h.content,O=t.md.linkify.match(y),p=[],w=h.level,v=0,g=0;g<O.length;g++){if(D=O[g].url,C=t.md.normalizeLink(D),!t.md.validateLink(C))continue;L=O[g].text,O[g].schema?O[g].schema==="mailto:"&&!/^mailto:/i.test(L)?L=t.md.normalizeLinkText("mailto:"+L).replace(/^mailto:/,""):L=t.md.normalizeLinkText(L):L=t.md.normalizeLinkText("http://"+L).replace(/^http:\/\//,""),m=O[g].index,m>v&&(d=new t.Token("text","",0),d.content=y.slice(v,m),d.level=w,p.push(d)),d=new t.Token("link_open","a",1),d.attrs=[["href",C]],d.level=w++,d.markup="linkify",d.info="auto",p.push(d),d=new t.Token("text","",0),d.content=L,d.level=w,p.push(d),d=new t.Token("link_close","a",-1),d.level=--w,d.markup="linkify",d.info="auto",p.push(d),v=O[g].lastIndex}v<y.length&&(d=new t.Token("text","",0),d.content=y.slice(v),d.level=w,p.push(d)),I[s].children=c=Hw(c,i,p)}}}}});var qf=se((n2,Ff)=>{"use strict";var Mf=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,jw=/\((c|tm|r|p)\)/i,$w=/\((c|tm|r|p)\)/ig,Gw={c:"©",r:"®",p:"§",tm:"™"};function Kw(n,t){return Gw[t.toLowerCase()]}function Vw(n){var t,i,s=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!s&&(i.content=i.content.replace($w,Kw)),i.type==="link_open"&&i.info==="auto"&&s--,i.type==="link_close"&&i.info==="auto"&&s++}function Yw(n){var t,i,s=0;for(t=n.length-1;t>=0;t--)i=n[t],i.type==="text"&&!s&&(Mf.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++}Ff.exports=function(t){var i;if(!t.md.options.typographer)return;for(i=t.tokens.length-1;i>=0;i--){if(t.tokens[i].type!=="inline")continue;jw.test(t.tokens[i].content)&&Vw(t.tokens[i].children),Mf.test(t.tokens[i].content)&&Yw(t.tokens[i].children)}}});var Hf=se((r2,zf)=>{"use strict";var Of=Je().isWhiteSpace,Pf=Je().isPunctChar,Rf=Je().isMdAsciiPunct,Xw=/['"]/,Nf=/['"]/g,Bf="";function ha(n,t,i){return n.substr(0,t)+i+n.substr(t+1)}function Zw(n,t){var i,s,l,c,d,h,p,g,y,m,v,w,E,D,C,L,I,O,W,Y,B;for(W=[],i=0;i<n.length;i++){for(s=n[i],p=n[i].level,I=W.length-1;I>=0&&!(W[I].level<=p);I--);if(W.length=I+1,s.type!=="text")continue;l=s.content,d=0,h=l.length;e:for(;d<h&&!(Nf.lastIndex=d,c=Nf.exec(l),!c);){if(C=L=!0,d=c.index+1,O=c[0]==="'",y=32,c.index-1>=0)y=l.charCodeAt(c.index-1);else for(I=i-1;I>=0&&!(n[I].type==="softbreak"||n[I].type==="hardbreak");I--){if(n[I].type!=="text")continue;y=n[I].content.charCodeAt(n[I].content.length-1);break}if(m=32,d<h)m=l.charCodeAt(d);else for(I=i+1;I<n.length&&!(n[I].type==="softbreak"||n[I].type==="hardbreak");I++){if(n[I].type!=="text")continue;m=n[I].content.charCodeAt(0);break}if(v=Rf(y)||Pf(String.fromCharCode(y)),w=Rf(m)||Pf(String.fromCharCode(m)),E=Of(y),D=Of(m),D?C=!1:w&&(E||v||(C=!1)),E?L=!1:v&&(D||w||(L=!1)),m===34&&c[0]==='"'&&(y>=48&&y<=57&&(L=C=!1)
`);wa("error",t)}}var Xm={emit:wa,emitPublic:_0,listen:x0,success:n=>wa("success",n),error:n=>wa("error",n),showValidationErrors:S0};async function C0(n,t={}){return Zm(n,{method:"GET",params:t})}async function E0(n,t=null){return ka("POST",n,t)}async function D0(n,t=null){return ka("PUT",n,t)}async function A0(n,t=null){return ka("PATCH",n,t)}async function T0(n,t=null){return ka("DELETE",n,t)}async function ka(n,t,i=null){const s={method:n,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&&n!=="post"&&(i.append("_method",n),s.method="post"),Zm(t,s)}async function Zm(n,t={}){if(n.startsWith("http")||(n=window.baseUrl(n)),t.params){const d=new URL(n);for(let h of Object.keys(t.params)){const p=t.params[h];typeof p!="undefined"&&p!==null&&d.searchParams.set(h,p)}n=d.toString()}const i=document.querySelector("meta[name=token]").getAttribute("content");t=Object.assign({},t,{credentials:"same-origin"}),t.headers=Object.assign({},t.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":i});const s=await fetch(n,t),l=await L0(s),c={data:l,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 L0(n){const t=n.headers.get("Content-Type"),i=t.split("/").pop();return i==="javascript"||i==="json"?await n.json():await n.text()}var Qm={get:C0,post:E0,put:D0,patch:A0,delete:T0};class I0{constructor(n){this.store=new Map(),this.parseTranslations()}parseTranslations(){const n=document.querySelectorAll('meta[name="translation"]');for(let t of n){const i=t.getAttribute("key"),s=t.getAttribute("value");this.store.set(i,s)}}get(n,t){const i=this.getTransText(n);return this.performReplacements(i,t)}getPlural(n,t,i){const s=this.getTransText(n);return this.parsePlural(s,t,i)}parsePlural(n,t,i){const s=n.split("|"),l=/^{([0-9]+)}/,c=/^\[([0-9]+),([0-9*]+)]/;let d=null;for(let h of s){const p=h.match(l);if(p!==null&&Number(p[1])===t){d=h.replace(l,"").trim();break}const g=h.match(c);if(g!==null){const y=Number(g[1]);if(y<=t&&(g[2]==="*"||Number(g[2])>=t)){d=h.replace(c,"").trim();break}}}return d===null&&s.length>1&&(d=t===1?s[0]:s[1]),d===null&&(d=s[0]),this.performReplacements(d,i)}getTransText(n){const t=this.store.get(n);return t===void 0&&console.warn(`Translation with key "${n}" does not exist`),t}performReplacements(n,t){if(!t)return n;const i=n.match(/:([\S]+)/g);return i===null||i.forEach(s=>{const l=s.substring(1);if(typeof t[l]=="undefined")return;n=n.replace(s,t[l])}),n}}var Jm=I0;function xa(n,t){const i=document.querySelectorAll(n);for(let s of i)t(s)}function _a(n,t,i){for(let s of t)n.addEventListener(s,i)}function it(n,t){Array.isArray(n)||(n=[n]);for(const i of n)i.addEventListener("click",t),i.addEventListener("keydown",s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t(s))})}function Sa(n,t){Array.isArray(n)||(n=[n]);const i=s=>{s.key==="Enter"&&t(s)};n.forEach(s=>s.addEventListener("keypress",i))}function zt(n,t,i,s){n.addEventListener(i,function(l){const c=l.target.closest(t);c&&s.call(c,l,c)})}function eg(n,t){const i=document.querySelectorAll(n);t=t.toLowerCase();for(let s of i)if(s.textContent.toLowerCase().includes(t))return s;return null}function to(n){n.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function tg(n){const t=n.querySelectorAll(".loading-container");for(const i of t)i.remove()}function ng(n,t,i){let s;return function(){const l=this,c=arguments,d=function(){s=null,i||n.apply(l,c)},h=i&&!s;clearTimeout(s),s=setTimeout(d,t),h&&n.apply(l,c)}}function no(n){if(!n)return;n.scrollIntoView({behavior:"smooth"});const t=document.getElementById("custom-styles").getAttribute("data-color-light"),i=window.getComputedStyle(n).getPropertyValue("background-color");n.style.backgroundColor=t,setTimeout(()=>{n.classList.add("selectFade"),n.style.backgroundColor=i},10),setTimeout(()=>{n.classList.remove("selectFade"),n.style.backgroundColor=""},3e3)}func
`);const i=n.textContent.trimEnd();let s="";if(t!==null){const c=t.className.replace("language-","");s=Ka(c,i)}const l=Lr.default(function(c){n.parentNode.replaceChild(c,n)},{value:i,mode:s,lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});bx(l)}function bx(n){const t='<svg viewBox="0 0 24 24" width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>',i=document.createElement("div");i.classList.add("CodeMirror-copy"),i.innerHTML=t,n.display.wrapper.appendChild(i);const s=new Rg.default(i,{text:function(l){return n.getValue()}});s.on("success",l=>{i.classList.add("success"),setTimeout(()=>{i.classList.remove("success")},240)})}function Ka(n,t){n=n.trim().replace(/^\./g,"").toLowerCase();const i=typeof Yl[n];return i==="undefined"?"":i==="function"?Yl[n](t):Yl[n]}function Va(){const n=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(n?"darcula":"default")}function yx(n){const t=n.ownerDocument,i=n.querySelector("code");let s=(n.className||"").replace("language-","");s===""&&i&&(s=(i.className||"").replace("language-","")),n.innerHTML=n.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);const l=n.textContent,c=t.createElement("div"),d=t.createElement("textarea");c.className="CodeMirrorContainer",c.setAttribute("data-lang",s),c.setAttribute("dir","ltr"),d.style.display="none",n.parentNode.replaceChild(c,n),c.appendChild(d),c.contentEditable=!1,d.textContent=l;let h=Lr.default(function(p){c.appendChild(p)},{value:l,mode:Ka(s,l),lineNumbers:!0,lineWrapping:!1,theme:Va(),readOnly:!0});return setTimeout(()=>{h.refresh()},300),{wrap:c,editor:h}}function wx(n,t){const i=n.textContent;return Lr.default(function(s){n.parentNode.insertBefore(s,n),n.style.display="none"},{value:i,mode:Ka(t,i),lineNumbers:!0,lineWrapping:!1,theme:Va()})}function kx(n,t,i){n.setOption("mode",Ka(t,i))}function xx(n,t){n.setValue(t),setTimeout(()=>{Bg(n)},10)}function Bg(n){n.refresh()}function _x(n){const t=n.textContent,i={value:t,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:Va(),scrollPastEnd:!0};return window.$events.emitPublic(n,"editor-markdown-cm::pre-init",{config:i}),Lr.default(function(s){n.parentNode.insertBefore(s,n),n.style.display="none"},i)}function Sx(){let n=Lr.default.keyMap.default==Lr.default.keyMap.macDefault;return n?"Cmd":"Ctrl"}var Nt={highlight:gx,highlightWithin:vx,wysiwygView:yx,popupEditor:wx,setMode:kx,setContent:xx,updateLayout:Bg,markdownEditor:_x,getMetaKey:Sx};class Cx{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",n=>{n.ctrlKey&&n.key==="Enter"&&this.save()}),it(this.languageLinks,n=>{const t=n.target.dataset.lang;this.languageInput.value=t,this.updateEditorMode(t)}),Sa(this.languageInput,n=>this.save()),it(this.saveButton,n=>this.save()),zt(this.historyList,"button","click",(n,t)=>{n.preventDefault();const i=t.dataset.time;this.editor&&this.editor.setValue(this.history[i])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(n,t,i){this.languageInput.value=t,this.callback=i,this.show(),this.updateEditorMode(t),Nt.setContent(this.editor,n)}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(n){Nt.setMode(this.editor,n,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");const n=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",n.length===0),this.historyList.innerHTML=n.map(t=>{const i=new Date(parseInt(t)).toLocaleTimeString();return`<li><button type="button" data-time="${t}">${i}</button></li>`}).join("")}addHistory(){if(!this.editor)return;const n=this.editor.getValue();if(!n)return;const t=Object.keys(this.history).pop();if(this.history[t]===n)return;this.history[String(Date.now())]=n;const i=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,i)}}var Hg=Cx;class Ex{constructor(n){Nt.highlightWithin(n)}}var Ug=Ex;class Dx{constructor(n){if(this.elem=n,this.trigger=n.querySelector("[collapsible-trigger]"),this.content=n.querySelector("[collapsible-content]"),!this.trigger)return;this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError()}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),hi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),di(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){const n=this.content.querySelector(".text-neg.text-small");n&&this.open()}}
`).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 n=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!n),document.body.classList.toggle("markdown-fullscreen",!n)}scrollToText(n){if(!n)return;const t=this.cm.getValue(),i=t.split(/\r?\n/);let s=i.findIndex(l=>l&&l.indexOf(n)!==-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 n({html:t,markdown:i}){return i||t}window.$events.listen("editor::replace",t=>{const i=n(t);this.cm.setValue(i)}),window.$events.listen("editor::append",t=>{const i=this.cm.getCursor("from"),s=n(t),l=this.cm.getValue()+`
`+s;this.cm.setValue(l),this.cm.setCursor(i.line,i.ch)}),window.$events.listen("editor::prepend",t=>{const i=this.cm.getCursor("from"),s=n(t),l=s+`
`+this.cm.getValue();this.cm.setValue(l);const c=s.split(`
`).length;this.cm.setCursor(i.line+c,i.ch)}),window.$events.listen("editor::insert",t=>{const i=n(t);this.cm.replaceSelection(i)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}}var dv=Zx;class Qx{constructor(n){this.elem=n,this.inviteOption=n.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){const n=this.inviteOption.value==="true",t=this.elem.querySelectorAll("input[type=password]");for(const s of t)s.disabled=n;const i=this.elem.querySelector("#password-input-container");i&&(i.style.display=n?"none":"block")}}var hv=Qx;class Jx{constructor(n){this.elem=n,this.type=n.getAttribute("notification"),this.textElem=n.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,t=>{this.show(t)}),n.addEventListener("click",this.hide.bind(this)),n.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(n=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=n,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){const t=n.split(" ").length,i=Math.max(2e3,1e3+250*t);setTimeout(this.hide.bind(this),i)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}}var fv=Jx;class e_{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 pv=e_;class t_{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(n){let t=n.target.closest("[action]");if(n.target.matches('a[href^="#"]')){const l=n.target.href.split("#")[1];no(document.querySelector("#"+l))}if(t===null)return;n.preventDefault();const i=t.getAttribute("action"),s=t.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(n){this.hideForm(),this.editingComment&&this.closeUpdateForm(),n.querySelector("[comment-content]").style.display="none",n.querySelector("[comment-edit-container]").style.display="block";let t=n.querySelector("[comment-edit-container] textarea"),i=t.value.split(`
`).length;t.style.height=i*20+40+"px",this.editingComment=n}updateComment(n){let t=n.target;n.preventDefault();let i=t.querySelector("textarea").value,s={text:i,parent_id:this.parentId||null};this.showLoading(t);let l=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${l}`,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(t)})}deleteComment(n){let t=n.getAttribute("comment");this.showLoading(n.querySelector("[comment-content]")),window.$http.delete(`/comment/${t}`).then(i=>{n.parentNode.removeChild(n),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(n){n.preventDefault(),n.stopPropagation();let t=this.formInput.value,i={text:t,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,i).then(s=>{let l=document.createElement("div");l.innerHTML=s.data;let c=l.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 n=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,n,{count:n})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(n){this.showForm(),this.parentId=Number(n.getAttribute("local-id")),this.replyToRow.style.display="block";const t=this.replyToRow.querySelector("a");t.textContent=`#${this.parentId}`,t.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="none";n.querySelector(".form-group.loading").style.display="block"}hideLoading(n){const t=n.querySelectorAll(".form-group");for(let i of t)i.style.display="block";n.querySelector(".form-group.loading").style.display="none"}}var mv=t_;const gv=$e(Ks());class n_{constructor(n){if(this.elem=n,this.pageId=n.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 t=document.querySelector(".sidebar-page-nav");t&&zt(t,"a","click",(i,s)=>{i.preventDefault(),window.components["tri-layout"][0].showContent();const l=s.getAttribute("href").substr(1);this.goToText(l),window.history.pushState(null,null,"#"+l)})}goToText(n){const t=document.getElementById(n);if(xa(".page-content [data-highlighted]",i=>{i.removeAttribute("data-highlighted"),i.style.backgroundColor=null}),t!==null)no(t);else{const i=eg(".page-content > div > *",n);i&&no(i)}}setupPointer(){let n=document.getElementById("pointer");if(!n)return;n=n.parentNode.removeChild(n);const t=n.querySelector("div.pointer");let i=!1,s=!1,l=!0,c="";zt(n,"input","click",(h,p)=>{p.select(),h.stopPropagation()}),_a(n,["click","focus"],h=>{h.stopPropagation()}),zt(n,"span.icon","click",(h,p)=>{h.stopPropagation(),l=!l,p.querySelector('[data-icon="include"]').style.display=l?"none":"inline",p.querySelector('[data-icon="link"]').style.display=l?"inline":"none"
<path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let v=y.selection.getNode();d(y,c(v)?v:null)}}]}),y.on("dblclick",v=>{let w=y.selection.getNode();if(!c(w))return;h(y,w)}),y.on("SetContent",function(){const v=y.$("body > div[drawio-diagram]");if(!v.length)return;y.undoManager.transact(function(){v.each((w,E)=>{E.setAttribute("contenteditable","false")})})})})}function __(){window.tinymce.PluginManager.add("customhr",function(n){n.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),i=n.selection.getNode(),s=i.parentNode;s.insertBefore(t,i)}),n.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),n.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function S_(n){window.$events.listen("editor::replace",({html:t})=>{n.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{const i=n.getContent()+t;n.setContent(i)}),window.$events.listen("editor::prepend",({html:t})=>{const i=t+n.getContent();n.setContent(i)}),window.$events.listen("editor::insert",({html:t})=>{n.insertContent(t)}),window.$events.listen("editor::focus",()=>{n.focus()})}class C_{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(){k_(),__();const n=document.querySelector("[drawio-url]");if(n){const t=n.getAttribute("drawio-url");x_(t,this.isDarkMode,this.pageId),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){const n=this.textDirection==="rtl"?"ltr rtl":"";return`undo redo | styleselect | bold italic underline strikethrough superscript subscript | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | table image-insert link hr drawio media | removeformat code ${n} fullscreen`}getTinyMceConfig(){const n=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p
2019-08-31 21:16:14 +08:00
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
2019-08-31 21:16:14 +08:00
*
* Licensed MIT © Zeno Rocha
*/
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
2019-08-31 21:16:14 +08:00
*/
//# sourceMappingURL=app.js.map