bookstack/public/dist/app.js

73 lines
777 KiB
JavaScript
Raw Normal View History

(()=>{var kx=Object.create;var Xo=Object.defineProperty;var _x=Object.getOwnPropertyDescriptor;var Sx=Object.getOwnPropertyNames;var Ex=Object.getPrototypeOf,Cx=Object.prototype.hasOwnProperty;var zc=i=>Xo(i,"__esModule",{value:!0});var Tx=(i,t)=>()=>(i&&(t=i(i=0)),t);var Me=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Ax=(i,t)=>{zc(i);for(var n in t)Xo(i,n,{get:t[n],enumerable:!0})},Lx=(i,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Sx(t))!Cx.call(i,l)&&l!=="default"&&Xo(i,l,{get:()=>t[l],enumerable:!(n=_x(t,l))||n.enumerable});return i},_t=i=>Lx(zc(Xo(i!=null?kx(Ex(i)):{},"default",i&&i.__esModule&&"default"in i?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);var Tt=Me((Ys,Xs)=>{(function(i,t){typeof Ys=="object"&&typeof Xs!="undefined"?Xs.exports=t():typeof define=="function"&&define.amd?define(t):(i=i||self,i.CodeMirror=t())})(Ys,function(){"use strict";var i=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(i),l=/MSIE \d/.test(i),c=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(i),d=/Edge\/(\d+)/.exec(i),a=l||c||d,h=a&&(l?document.documentMode||6:+(d||c)[1]),f=!d&&/WebKit\//.test(i),p=f&&/Qt\/\d+\.\d+/.test(i),y=!d&&/Chrome\//.test(i),g=/Opera\//.test(i),v=/Apple Computer/.test(navigator.vendor),b=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(i),k=/PhantomJS/.test(i),E=v&&(/Mobile\/\w+/.test(i)||navigator.maxTouchPoints>2),w=/Android/.test(i),I=E||w||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(i),S=E||/Mac/.test(t),P=/\bCrOS\b/.test(i),F=/win/i.test(t),H=g&&i.match(/Version\/(\d*\.\d*)/);H&&(H=Number(H[1])),H&&H>=15&&(g=!1,f=!0);var $=S&&(p||g&&(H==null||H<12.11)),J=n||a&&h>=9;function K(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Y=function(e,r){var s=e.className,o=K(r).exec(s);if(o){var u=s.slice(o.index+o[0].length);e.className=s.slice(0,o.index)+(u?o[1]+u:"")}};function G(e){for(var r=e.childNodes.length;r>0;--r)e.removeChild(e.firstChild);return e}function j(e,r){return G(e).appendChild(r)}function z(e,r,s,o){var u=document.createElement(e);if(s&&(u.className=s),o&&(u.style.cssText=o),typeof r=="string")u.appendChild(document.createTextNode(r));else if(r)for(var m=0;m<r.length;++m)u.appendChild(r[m]);return u}function C(e,r,s,o){var u=z(e,r,s,o);return u.setAttribute("role","presentation"),u}var U;document.createRange?U=function(e,r,s,o){var u=document.createRange();return u.setEnd(o||e,s),u.setStart(e,r),u}:U=function(e,r,s){var o=document.body.createTextRange();try{o.moveToElementText(e.parentNode)}catch{return o}return o.collapse(!0),o.moveEnd("character",s),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 R(){var e;try{e=document.activeElement}catch{e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function N(e,r){var s=e.className;K(r).test(s)||(e.className+=(s?" ":"")+r)}function ne(e,r){for(var s=e.split(" "),o=0;o<s.length;o++)s[o]&&!K(s[o]).test(r)&&(r+=" "+s[o]);return r}var ae=function(e){e.select()};E?ae=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(ae=function(e){try{e.select()}catch{}});function M(e){var r=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,r)}}function A(e,r,s){r||(r={});for(var o in e)e.hasOwnProperty(o)&&(s!==!1||!r.hasOwnProperty(o))&&(r[o]=e[o]);return r}function be(e,r,s,o,u){r==null&&(r=e.search(/[^\s\u00a0]/),r==-1&&(r=e.length));for(var m=o||0,x=u||0;;){var _=e.indexOf(" ",m);if(_<0||_>=r)return x+(r-m);x+=_-m,x+=s-x%s,m=_+1}}var Fe=function(){this.id=null,this.f=null,this.time=0,this.handler=M(this.onTimeout,this)};Fe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Fe.prototype.set=function(e,r){this.f=r;var s=+new Date+e;(!this.id||s<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=s)};function xe(e,r){for(var s=0;s<e.length;++s)if(e[s]==r)return s;return-1}var _e=50,ze={to
b`.split(/\n/).length!=3?function(e){for(var r=0,s=[],o=e.length;r<=o;){var u=e.indexOf(`
`,r);u==-1&&(u=e.length);var m=e.slice(r,e.charAt(u-1)=="\r"?u-1:u),x=m.indexOf("\r");x!=-1?(s.push(m.slice(0,x)),r+=x+1):(s.push(m),r=u+1)}return s}:function(e){return e.split(/\r\n?|\n/)},oe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var r;try{r=e.ownerDocument.selection.createRange()}catch{}return!r||r.parentElement()!=e?!1:r.compareEndPoints("StartToEnd",r)!=0},Q=function(){var e=z("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),re=null;function O(e){if(re!=null)return re;var r=j(e,z("span","x")),s=r.getBoundingClientRect(),o=U(r,0,1).getBoundingClientRect();return re=Math.abs(s.left-o.left)>1}var B={},te={};function ce(e,r){arguments.length>2&&(r.dependencies=Array.prototype.slice.call(arguments,2)),B[e]=r}function me(e,r){te[e]=r}function ve(e){if(typeof e=="string"&&te.hasOwnProperty(e))e=te[e];else if(e&&typeof e.name=="string"&&te.hasOwnProperty(e.name)){var r=te[e.name];typeof r=="string"&&(r={name:r}),e=He(r,e),e.name=r.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ve("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ve("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Le(e,r){r=ve(r);var s=B[r.name];if(!s)return Le(e,"text/plain");var o=s(e,r);if(Oe.hasOwnProperty(r.name)){var u=Oe[r.name];for(var m in u)!u.hasOwnProperty(m)||(o.hasOwnProperty(m)&&(o["_"+m]=o[m]),o[m]=u[m])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var x in r.modeProps)o[x]=r.modeProps[x];return o}var Oe={};function Ce(e,r){var s=Oe.hasOwnProperty(e)?Oe[e]:Oe[e]={};A(r,s)}function Ve(e,r){if(r===!0)return r;if(e.copyState)return e.copyState(r);var s={};for(var o in r){var u=r[o];u instanceof Array&&(u=u.concat([])),s[o]=u}return s}function St(e,r){for(var s;e.innerMode&&(s=e.innerMode(r),!(!s||s.mode==e));)r=s.state,e=s.mode;return s||{mode:e,state:r}}function mt(e,r,s){return e.startState?e.startState(r,s):!0}var W=function(e,r,s){this.pos=this.start=0,this.string=e,this.tabSize=r||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=s};W.prototype.eol=function(){return this.pos>=this.string.length},W.prototype.sol=function(){return this.pos==this.lineStart},W.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},W.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},W.prototype.eat=function(e){var r=this.string.charAt(this.pos),s;if(typeof e=="string"?s=r==e:s=r&&(e.test?e.test(r):e(r)),s)return++this.pos,r},W.prototype.eatWhile=function(e){for(var r=this.pos;this.eat(e););return this.pos>r},W.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},W.prototype.skipToEnd=function(){this.pos=this.string.length},W.prototype.skipTo=function(e){var r=this.string.indexOf(e,this.pos);if(r>-1)return this.pos=r,!0},W.prototype.backUp=function(e){this.pos-=e},W.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=be(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},W.prototype.indentation=function(){return be(this.string,null,this.tabSize)-(this.lineStart?be(this.string,this.lineStart,this.tabSize):0)},W.prototype.match=function(e,r,s){if(typeof e=="string"){var o=function(x){return s?x.toLowerCase():x},u=this.string.substr(this.pos,e.length);if(o(u)==o(e))return r!==!1&&(this.pos+=e.length),!0}else{var m=this.string.slice(this.pos).match(e);return m&&m.index>0?null:(m&&r!==!1&&(this.pos+=m[0].length),m)}},W.prototype.current=function(){return this.string.slice(this.start,this.pos)},W.prototype.hideFirstChars=function(e,r){this.lineStart+=e;try{return r()}finally{this.lineStart-=e}},W.prototype.lookAhead=function(e){var r=this.lineOracle;return r&&r.lookAhead(e)},W.prototype.baseToken=func
`?(Ee=V.appendChild(z("span",fe[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ee.setAttribute("cm-text",fe[0]),e.col+=1):(Ee=e.cm.options.specialCharPlaceholder(fe[0]),Ee.setAttribute("cm-text",fe[0]),a&&h<9?V.appendChild(z("span",[Ee])):V.appendChild(Ee),e.col+=1);e.map.push(e.pos,e.pos+1,Ee),e.pos++}}if(e.trailingSpace=_.charCodeAt(r.length-1)==32,s||o||u||L||m||x){var Qe=s||"";o&&(Qe+=o),u&&(Qe+=u);var $e=z("span",[V],Qe,m);if(x)for(var nt in x)x.hasOwnProperty(nt)&&nt!="style"&&nt!="class"&&$e.setAttribute(nt,x[nt]);return e.content.appendChild($e)}e.content.appendChild(V)}}function $y(e,r){if(e.length>1&&!/ /.test(e))return e;for(var s=r,o="",u=0;u<e.length;u++){var m=e.charAt(u);m==" "&&s&&(u==e.length-1||e.charCodeAt(u+1)==32)&&(m="\xA0"),o+=m,s=m==" "}return o}function Uy(e,r){return function(s,o,u,m,x,_,T){u=u?u+" cm-force-border":"cm-force-border";for(var L=s.pos,V=L+o.length;;){for(var ee=void 0,fe=0;fe<r.length&&(ee=r[fe],!(ee.to>L&&ee.from<=L));fe++);if(ee.to>=V)return e(s,o,u,m,x,_,T);e(s,o.slice(0,ee.to-L),u,m,null,_,T),m=null,o=o.slice(ee.to-L),L=ee.to}}}function tu(e,r,s,o){var u=!o&&s.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",s.id)),u&&(e.cm.display.input.setUneditable(u),e.content.appendChild(u)),e.pos+=r,e.trailingSpace=!1}function Hy(e,r,s){var o=e.markedSpans,u=e.text,m=0;if(!o){for(var x=1;x<s.length;x+=2)r.addToken(r,u.slice(m,m=s[x]),Jl(s[x+1],r.cm.options));return}for(var _=u.length,T=0,L=1,V="",ee,fe,le=0,ye,Ee,Pe,je,Qe;;){if(le==T){ye=Ee=Pe=fe="",Qe=null,je=null,le=1/0;for(var $e=[],nt=void 0,ct=0;ct<o.length;++ct){var ut=o[ct],vt=ut.marker;if(vt.type=="bookmark"&&ut.from==T&&vt.widgetNode)$e.push(vt);else if(ut.from<=T&&(ut.to==null||ut.to>T||vt.collapsed&&ut.to==T&&ut.from==T)){if(ut.to!=null&&ut.to!=T&&le>ut.to&&(le=ut.to,Ee=""),vt.className&&(ye+=" "+vt.className),vt.css&&(fe=(fe?fe+";":"")+vt.css),vt.startStyle&&ut.from==T&&(Pe+=" "+vt.startStyle),vt.endStyle&&ut.to==le&&(nt||(nt=[])).push(vt.endStyle,ut.to),vt.title&&((Qe||(Qe={})).title=vt.title),vt.attributes)for(var Pt in vt.attributes)(Qe||(Qe={}))[Pt]=vt.attributes[Pt];vt.collapsed&&(!je||Ha(je.marker,vt)<0)&&(je=ut)}else ut.from>T&&le>ut.from&&(le=ut.from)}if(nt)for(var ir=0;ir<nt.length;ir+=2)nt[ir+1]==le&&(Ee+=" "+nt[ir]);if(!je||je.from==T)for(var Bt=0;Bt<$e.length;++Bt)tu(r,0,$e[Bt]);if(je&&(je.from||0)==T){if(tu(r,(je.to==null?_+1:je.to)-T,je.marker,je.from==null),je.to==null)return;je.to==T&&(je=!1)}}if(T>=_)break;for(var Lr=Math.min(_,le);;){if(V){var Sr=T+V.length;if(!je){var Xt=Sr>Lr?V.slice(0,Lr-T):V;r.addToken(r,Xt,ee?ee+ye:ye,Pe,T+Xt.length==le?Ee:"",fe,Qe)}if(Sr>=Lr){V=V.slice(Lr-T),T=Lr;break}T=Sr,Pe=""}V=u.slice(m,m=s[L++]),ee=Jl(s[L++],r.cm.options)}}}function ru(e,r,s){this.line=r,this.rest=Py(r),this.size=this.rest?Ye(Re(this.rest))-s+1:1,this.node=this.text=null,this.hidden=gn(e,r)}function Co(e,r,s){for(var o=[],u,m=r;m<s;m=u){var x=new ru(e.doc,se(e.doc,m),m);u=m+x.size,o.push(x)}return o}var Kn=null;function Wy(e){Kn?Kn.ops.push(e):e.ownsGroup=Kn={ops:[e],delayedCallbacks:[]}}function Gy(e){var r=e.delayedCallbacks,s=0;do{for(;s<r.length;s++)r[s].call(null);for(var o=0;o<e.ops.length;o++){var u=e.ops[o];if(u.cursorActivityHandlers)for(;u.cursorActivityCalled<u.cursorActivityHandlers.length;)u.cursorActivityHandlers[u.cursorActivityCalled++].call(null,u.cm)}}while(s<r.length)}function Ky(e,r){var s=e.ownsGroup;if(!!s)try{Gy(s)}finally{Kn=null,r(s)}}var Ai=null;function tr(e,r){var s=Mt(e,r);if(!!s.length){var o=Array.prototype.slice.call(arguments,2),u;Kn?u=Kn.delayedCallbacks:Ai?u=Ai:(u=Ai=[],setTimeout(Vy,0));for(var m=function(_){u.push(function(){return s[_].apply(null,o)})},x=0;x<s.length;++x)m(x)}}function Vy(){var e=Ai;Ai=null;for(var r=0;r<e.length;++r)e[r]()}function nu(e,r,s,o){for(var u=0;u<r.changes.length;u++){var m=r.changes[u];m=="text"?Xy(e,r):m=="gutter"?ou(e,r,s,o):m=="class"?Va(e,r):m=="widget"&&Zy(e,r,o)}r.changes=null}function Li(e){return e.node==e.text&&
top: `+nt+"px; width: "+(ct==null?T-$e:ct)+`px;
height: `+(ut-nt)+"px"))}function ee($e,nt,ct){var ut=se(u,$e),vt=ut.text.length,Pt,ir;function Bt(Xt,Er){return Lo(e,we($e,Xt),"div",ut,Er)}function Lr(Xt,Er,cr){var Jt=xu(e,ut,null,Xt),Zt=Er=="ltr"==(cr=="after")?"left":"right",$t=cr=="after"?Jt.begin:Jt.end-(/\s/.test(ut.text.charAt(Jt.end-1))?2:1);return Bt($t,Zt)[Zt]}var Sr=Lt(ut,u.direction);return Xe(Sr,nt||0,ct==null?vt:ct,function(Xt,Er,cr,Jt){var Zt=cr=="ltr",$t=Bt(Xt,Zt?"left":"right"),Cr=Bt(Er-1,Zt?"right":"left"),ui=nt==null&&Xt==0,Sn=ct==null&&Er==vt,gr=Jt==0,Zr=!Sr||Jt==Sr.length-1;if(Cr.top-$t.top<=3){var or=(L?ui:Sn)&&gr,Ds=(L?Sn:ui)&&Zr,fn=or?_:(Zt?$t:Cr).left,Rn=Ds?T:(Zt?Cr:$t).right;V(fn,$t.top,Rn-fn,$t.bottom)}else{var zn,xr,ci,Is;Zt?(zn=L&&ui&&gr?_:$t.left,xr=L?T:Lr(Xt,cr,"before"),ci=L?_:Lr(Er,cr,"after"),Is=L&&Sn&&Zr?T:Cr.right):(zn=L?Lr(Xt,cr,"before"):_,xr=!L&&ui&&gr?T:$t.right,ci=!L&&Sn&&Zr?_:Cr.left,Is=L?Lr(Er,cr,"after"):T),V(zn,$t.top,xr-zn,$t.bottom),$t.bottom<Cr.top&&V(_,$t.bottom,null,Cr.top),V(ci,Cr.top,Is-ci,Cr.bottom)}(!Pt||Io($t,Pt)<0)&&(Pt=$t),Io(Cr,Pt)<0&&(Pt=Cr),(!ir||Io($t,ir)<0)&&(ir=$t),Io(Cr,ir)<0&&(ir=Cr)}),{start:Pt,end:ir}}var fe=r.from(),le=r.to();if(fe.line==le.line)ee(fe.line,fe.ch,le.ch);else{var ye=se(u,fe.line),Ee=se(u,le.line),Pe=Vr(ye)==Vr(Ee),je=ee(fe.line,fe.ch,Pe?ye.text.length+1:null).end,Qe=ee(le.line,Pe?0:null,le.ch).start;Pe&&(je.top<Qe.top-2?(V(je.right,je.top,null,je.bottom),V(_,Qe.top,Qe.left,Qe.bottom)):V(je.right,je.top,Qe.left-je.right,je.bottom)),je.bottom<Qe.top&&V(_,je.bottom,null,Qe.top)}s.appendChild(m)}function os(e){if(!!e.state.focused){var r=e.display;clearInterval(r.blinker);var s=!0;r.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?r.blinker=setInterval(function(){e.hasFocus()||Zn(e),r.cursorDiv.style.visibility=(s=!s)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(r.cursorDiv.style.visibility="hidden")}}function Eu(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||ss(e))}function as(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Zn(e))},100)}function ss(e,r){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(rt(e,"focus",e,r),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),f&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),os(e))}function Zn(e,r){e.state.delayingBlurEvent||(e.state.focused&&(rt(e,"blur",e,r),e.state.focused=!1,Y(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Fo(e){for(var r=e.display,s=r.lineDiv.offsetTop,o=Math.max(0,r.scroller.getBoundingClientRect().top),u=r.lineDiv.getBoundingClientRect().top,m=0,x=0;x<r.view.length;x++){var _=r.view[x],T=e.options.lineWrapping,L=void 0,V=0;if(!_.hidden){if(u+=_.line.height,a&&h<8){var ee=_.node.offsetTop+_.node.offsetHeight;L=ee-s,s=ee}else{var fe=_.node.getBoundingClientRect();L=fe.bottom-fe.top,!T&&_.text.firstChild&&(V=_.text.firstChild.getBoundingClientRect().right-fe.left-1)}var le=_.line.height-L;if((le>.005||le<-.005)&&(u<o&&(m-=le),Ae(_.line,L),Cu(_.line),_.rest))for(var ye=0;ye<_.rest.length;ye++)Cu(_.rest[ye]);if(V>e.display.sizerWidth){var Ee=Math.ceil(V/Xn(e.display));Ee>e.display.maxLineLength&&(e.display.maxLineLength=Ee,e.display.maxLine=_.line,e.display.maxLineChanged=!0)}}}Math.abs(m)>2&&(r.scroller.scrollTop+=m)}function Cu(e){if(e.widgets)for(var r=0;r<e.widgets.length;++r){var s=e.widgets[r],o=s.node.parentNode;o&&(s.height=o.offsetHeight)}}function Mo(e,r,s){var o=s&&s.top!=null?Math.max(0,s.top):e.scroller.scrollTop;o=Math.floor(o-To(e));var u=s&&s.bottom!=null?s.bottom:o+e.wrapper.clientHeight,m=tt(r,o),x=tt(r,u);if(s&&s.ensure){var _=s.ensure.from.line,T=s.ensure.to.line;_<m?(m=_,x=tt(r,sn(se(r,_))+e.wrapper.clientHeight)):Math.min(T,r.lastLine())>=x&&
top: `+(r.top-s.viewOffset-To(e.display))+`px;
height: `+(r.bottom-r.top+Yr(e)+s.barHeight)+`px;
left: `+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(m),m.scrollIntoView(u),e.display.lineSpace.removeChild(m)}}}function fb(e,r,s,o){o==null&&(o=0);var u;!e.options.lineWrapping&&r==s&&(s=r.sticky=="before"?we(r.line,r.ch+1,"before"):r,r=r.ch?we(r.line,r.sticky=="before"?r.ch-1:r.ch,"after"):r);for(var m=0;m<5;m++){var x=!1,_=$r(e,r),T=!s||s==r?_:$r(e,s);u={left:Math.min(_.left,T.left),top:Math.min(_.top,T.top)-o,right:Math.max(_.left,T.left),bottom:Math.max(_.bottom,T.bottom)+o};var L=ls(e,u),V=e.doc.scrollTop,ee=e.doc.scrollLeft;if(L.scrollTop!=null&&(Oi(e,L.scrollTop),Math.abs(e.doc.scrollTop-V)>1&&(x=!0)),L.scrollLeft!=null&&(Fn(e,L.scrollLeft),Math.abs(e.doc.scrollLeft-ee)>1&&(x=!0)),!x)break}return u}function db(e,r){var s=ls(e,r);s.scrollTop!=null&&Oi(e,s.scrollTop),s.scrollLeft!=null&&Fn(e,s.scrollLeft)}function ls(e,r){var s=e.display,o=Yn(e.display);r.top<0&&(r.top=0);var u=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:s.scroller.scrollTop,m=Xa(e),x={};r.bottom-r.top>m&&(r.bottom=r.top+m);var _=e.doc.height+Ya(s),T=r.top<o,L=r.bottom>_-o;if(r.top<u)x.scrollTop=T?0:r.top;else if(r.bottom>u+m){var V=Math.min(r.top,(L?_:r.bottom)-m);V!=u&&(x.scrollTop=V)}var ee=e.options.fixedGutter?0:s.gutters.offsetWidth,fe=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:s.scroller.scrollLeft-ee,le=An(e)-s.gutters.offsetWidth,ye=r.right-r.left>le;return ye&&(r.right=r.left+le),r.left<10?x.scrollLeft=0:r.left<fe?x.scrollLeft=Math.max(0,r.left+ee-(ye?0:10)):r.right>le+fe-3&&(x.scrollLeft=r.right+(ye?0:10)-le),x}function us(e,r){r!=null&&(Oo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Qn(e){Oo(e);var r=e.getCursor();e.curOp.scrollToPos={from:r,to:r,margin:e.options.cursorScrollMargin}}function Mi(e,r,s){(r!=null||s!=null)&&Oo(e),r!=null&&(e.curOp.scrollLeft=r),s!=null&&(e.curOp.scrollTop=s)}function hb(e,r){Oo(e),e.curOp.scrollToPos=r}function Oo(e){var r=e.curOp.scrollToPos;if(r){e.curOp.scrollToPos=null;var s=yu(e,r.from),o=yu(e,r.to);Tu(e,s,o,r.margin)}}function Tu(e,r,s,o){var u=ls(e,{left:Math.min(r.left,s.left),top:Math.min(r.top,s.top)-o,right:Math.max(r.right,s.right),bottom:Math.max(r.bottom,s.bottom)+o});Mi(e,u.scrollLeft,u.scrollTop)}function Oi(e,r){Math.abs(e.doc.scrollTop-r)<2||(n||fs(e,{top:r}),Au(e,r,!0),n&&fs(e),zi(e,100))}function Au(e,r,s){r=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,r)),!(e.display.scroller.scrollTop==r&&!s)&&(e.doc.scrollTop=r,e.display.scrollbars.setScrollTop(r),e.display.scroller.scrollTop!=r&&(e.display.scroller.scrollTop=r))}function Fn(e,r,s,o){r=Math.max(0,Math.min(r,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((s?r==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-r)<2)&&!o)&&(e.doc.scrollLeft=r,Mu(e),e.display.scroller.scrollLeft!=r&&(e.display.scroller.scrollLeft=r),e.display.scrollbars.setScrollLeft(r))}function Pi(e){var r=e.display,s=r.gutters.offsetWidth,o=Math.round(e.doc.height+Ya(e.display));return{clientHeight:r.scroller.clientHeight,viewHeight:r.wrapper.clientHeight,scrollWidth:r.scroller.scrollWidth,clientWidth:r.scroller.clientWidth,viewWidth:r.wrapper.clientWidth,barLeft:e.options.fixedGutter?s:0,docHeight:o,scrollHeight:o+Yr(e)+r.barHeight,nativeBarWidth:r.nativeBarWidth,gutterWidth:s}}var Mn=function(e,r,s){this.cm=s;var o=this.vert=z("div",[z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),u=this.horiz=z("div",[z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=u.tabIndex=-1,e(o),e(u),lt(o,"scroll",function(){o.clientHeight&&r(o.scrollTop,"vertical")}),lt(u,"scroll",function(){u.clientWidth&&r(u.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&h<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Mn.prototype.update=function(e){var r=e.scrollWidth>e.clientWidth+1,s=e.scrollHeight>e.clientHeight+1,o=e.nativeBarWidth;if(s){this.vert.style.display="block",this.vert.style.bottom=r?o+"px":"0";var u=e.viewHeight-(r?o:0);this.vert
`},setDirection:nr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(r){return r.order=null}),this.cm&&Lb(this.cm))})}),_r.prototype.eachLine=_r.prototype.iter;var cc=0;function $b(e){var r=this;if(fc(r),!(wt(r,e)||ln(r.display,e))){kt(e),a&&(cc=+new Date);var s=Dn(r,e,!0),o=e.dataTransfer.files;if(!(!s||r.isReadOnly()))if(o&&o.length&&window.FileReader&&window.File)for(var u=o.length,m=Array(u),x=0,_=function(){++x==u&&rr(r,function(){s=Ze(r.doc,s);var le={from:s,to:s,text:r.doc.splitLines(m.filter(function(ye){return ye!=null}).join(r.doc.lineSeparator())),origin:"paste"};ri(r.doc,le),Yu(r.doc,bn(Ze(r.doc,s),Ze(r.doc,xn(le))))})()},T=function(le,ye){if(r.options.allowDropFileTypes&&xe(r.options.allowDropFileTypes,le.type)==-1){_();return}var Ee=new FileReader;Ee.onerror=function(){return _()},Ee.onload=function(){var Pe=Ee.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Pe)){_();return}m[ye]=Pe,_()},Ee.readAsText(le)},L=0;L<o.length;L++)T(o[L],L);else{if(r.state.draggingText&&r.doc.sel.contains(s)>-1){r.state.draggingText(e),setTimeout(function(){return r.display.input.focus()},20);return}try{var V=e.dataTransfer.getData("Text");if(V){var ee;if(r.state.draggingText&&!r.state.draggingText.copy&&(ee=r.listSelections()),qo(r.doc,bn(s,s)),ee)for(var fe=0;fe<ee.length;++fe)ni(r.doc,"",ee[fe].anchor,ee[fe].head,"drag");r.replaceSelection(V,"around","paste"),r.display.input.focus()}}catch{}}}}function Ub(e,r){if(a&&(!e.state.draggingText||+new Date-cc<100)){Ir(r);return}if(!(wt(e,r)||ln(e.display,r))&&(r.dataTransfer.setData("Text",e.getSelection()),r.dataTransfer.effectAllowed="copyMove",r.dataTransfer.setDragImage&&!v)){var s=z("img",null,null,"position: fixed; left: 0; top: 0;");s.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g&&(s.width=s.height=1,e.display.wrapper.appendChild(s),s._top=s.offsetTop),r.dataTransfer.setDragImage(s,0,0),g&&s.parentNode.removeChild(s)}}function Hb(e,r){var s=Dn(e,r);if(!!s){var o=document.createDocumentFragment();Su(e,s,o),e.display.dragCursor||(e.display.dragCursor=z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,o)}}function fc(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function dc(e){if(!!document.getElementsByClassName){for(var r=document.getElementsByClassName("CodeMirror"),s=[],o=0;o<r.length;o++){var u=r[o].CodeMirror;u&&s.push(u)}s.length&&s[0].operation(function(){for(var m=0;m<s.length;m++)e(s[m])})}}var hc=!1;function Wb(){hc||(Gb(),hc=!0)}function Gb(){var e;lt(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,dc(Kb)},100))}),lt(window,"blur",function(){return dc(Zn)})}function Kb(e){var r=e.display;r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.scrollbarsClipped=!1,e.setSize()}for(var _n={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"},Gi=0;Gi<10;Gi++)_n[Gi+48]=_n[Gi+96]=String(Gi);for(var Uo=65;Uo<=90;Uo++)_n[Uo]=String.fromCharCode(Uo);for(var Ki=1;Ki<=12;Ki++)_n[Ki+111]=_n[Ki+63235]="F"+Ki;var cn={};cn.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"},cn.pcDefault={"Ctrl-A":"selectAll",
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function vc(e,r){var s=se(e.doc,r),o=Vr(s);return o!=s&&(r=Ye(o)),_s(!0,e,o,r,1)}function Zb(e,r){var s=se(e.doc,r),o=Oy(s);return o!=s&&(r=Ye(o)),_s(!0,e,s,r,-1)}function yc(e,r){var s=vc(e,r.line),o=se(e.doc,s.line),u=Lt(o,e.doc.direction);if(!u||u[0].level==0){var m=Math.max(s.ch,o.text.search(/\S/)),x=r.line==s.line&&r.ch<=m&&r.ch;return we(s.line,x?0:m,s.sticky)}return s}function Wo(e,r,s){if(typeof r=="string"&&(r=Vi[r],!r))return!1;e.display.input.ensurePolled();var o=e.display.shift,u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s&&(e.display.shift=!1),u=r(e)!=ze}finally{e.display.shift=o,e.state.suppressEdits=!1}return u}function Qb(e,r,s){for(var o=0;o<e.state.keyMaps.length;o++){var u=oi(r,e.state.keyMaps[o],s,e);if(u)return u}return e.options.extraKeys&&oi(r,e.options.extraKeys,s,e)||oi(r,e.options.keyMap,s,e)}var Jb=new Fe;function Yi(e,r,s,o){var u=e.state.keySeq;if(u){if(pc(r))return"handled";if(/\'$/.test(r)?e.state.keySeq=null:Jb.set(50,function(){e.state.keySeq==u&&(e.state.keySeq=null,e.display.input.reset())}),bc(e,u+" "+r,s,o))return!0}return bc(e,r,s,o)}function bc(e,r,s,o){var u=Qb(e,r,o);return u=="multi"&&(e.state.keySeq=r),u=="handled"&&tr(e,"keyHandled",e,r,s),(u=="handled"||u=="multi")&&(kt(s),os(e)),!!u}function xc(e,r){var s=gc(r,!0);return s?r.shiftKey&&!e.state.keySeq?Yi(e,"Shift-"+s,r,function(o){return Wo(e,o,!0)})||Yi(e,s,r,function(o){if(typeof o=="string"?/^go[A-Z]/.test(o):o.motion)return Wo(e,o)}):Yi(e,s,r,function(o){return Wo(e,o)}):!1}function ex(e,r,s){return Yi(e,"'"+s+"'",r,function(o){return Wo(e,o,!0)})}var Ss=null;function wc(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&(r.curOp.focus=R(),!wt(r,e))){a&&h<11&&e.keyCode==27&&(e.returnValue=!1);var s=e.keyCode;r.display.shift=s==16||e.shiftKey;var o=xc(r,e);g&&(Ss=o?s:null,!o&&s==88&&!Q&&(S?e.metaKey:e.ctrlKey)&&r.replaceSelection("",null,"cut")),n&&!S&&!o&&s==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),s==18&&!/\bCodeMirror-crosshair\b/.test(r.display.lineDiv.className)&&tx(r)}}function tx(e){var r=e.display.lineDiv;N(r,"CodeMirror-crosshair");function s(o){(o.keyCode==18||!o.altKey)&&(Y(r,"CodeMirror-crosshair"),pt(document,"keyup",s),pt(document,"mouseover",s))}lt(document,"keyup",s),lt(document,"mouseover",s)}function kc(e){e.keyCode==16&&(this.doc.sel.shift=!1),wt(this,e)}function _c(e){var r=this;if(!(e.target&&e.target!=r.display.input.getField())&&!(ln(r.display,e)||wt(r,e)||e.ctrlKey&&!e.altKey||S&&e.metaKey)){var s=e.keyCode,o=e.charCode;if(g&&s==Ss){Ss=null,kt(e);return}if(!(g&&(!e.which||e.which<10)&&xc(r,e))){var u=String.fromCharCode(o==null?s:o);u!="\b"&&(ex(r,e,u)||r.display.input.onKeyPress(e))}}}var rx=400,Es=function(e,r,s){this.time=e,this.pos=r,this.button=s};Es.prototype.compare=function(e,r,s){return this.time+rx>e&&D(r,this.pos)==0&&s==this.button};var Xi,Zi;function nx(e,r){var s=+new Date;return Zi&&Zi.compare(s,e,r)?(Xi=Zi=null,"triple"):Xi&&Xi.compare(s,e,r)?(Zi=new Es(s,e,r),Xi=null,"double"):(Xi=new Es(s,e,r),Zi=null,"single")}function Sc(e){var r=this,s=r.display;if(!(wt(r,e)||s.activeTouch&&s.input.supportsTouch())){if(s.input.ensurePolled(),s.shift=e.shiftKey,ln(s,e)){f||(s.scroller.draggable=!1,setTimeout(function(){return s.scroller.draggable=!0},100));return}if(!Cs(r,e)){var o=Dn(r,e),u=pr(e),m=o?nx(o,u):"single";window.focus(),u==1&&r.state.selectingText&&r.state.selectingText(e),!(o&&ix(r,u,o,m,e))&&(u==1?o?ax(r,o,m,e):hr(e)==s.scroller&&kt(e):u==2?(o&&Bo(r.doc,o),setTimeout(function(){return s.input.focus()},20)):u==3&&(J?r.display.input.onContextMenu(e):as(r)))}}}function ix(e,r,s,o,u){var m="Click";return o=="double"?m="Double"+m:o=="triple"&&(m="Triple"+m),m=(r==1?"Left":r==2?"Middle":"Right")+m,Yi(e,mc(m,u),u,function(x){if(typeof x=="string"&&(x=Vi[x]),!x)return!1;var _=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),_=x(e,s)!=ze}finally{e.state.suppressEdits=!1}return _})}function ox(e,r,s){var o=e.getOption("configureMouse"),u=o?o(e,r,s):{};if(u.unit
`)==r){if(o.ranges.length%Hr.text.length==0){L=[];for(var V=0;V<Hr.text.length;V++)L.push(m.splitLines(Hr.text[V]))}}else T.length==o.ranges.length&&e.options.pasteLinesPerSelection&&(L=Ie(T,function(je){return[je]}));for(var ee=e.curOp.updateInput,fe=o.ranges.length-1;fe>=0;fe--){var le=o.ranges[fe],ye=le.from(),Ee=le.to();le.empty()&&(s&&s>0?ye=we(ye.line,ye.ch-s):e.state.overwrite&&!_?Ee=we(Ee.line,Math.min(se(m,Ee.line).text.length,Ee.ch+Re(T).length)):_&&Hr&&Hr.lineWise&&Hr.text.join(`
`)==T.join(`
`)&&(ye=Ee=we(ye.line,0)));var Pe={from:ye,to:Ee,text:L?L[fe%L.length]:T,origin:u||(_?"paste":e.state.cutIncoming>x?"cut":"+input")};ri(e.doc,Pe),tr(e,"inputRead",e,Pe)}r&&!_&&Ic(e,r),Qn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=ee),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Dc(e,r){var s=e.clipboardData&&e.clipboardData.getData("Text");if(s)return e.preventDefault(),!r.isReadOnly()&&!r.options.disableInput&&Ar(r,function(){return As(r,s,0,null,"paste")}),!0}function Ic(e,r){if(!(!e.options.electricChars||!e.options.smartIndent))for(var s=e.doc.sel,o=s.ranges.length-1;o>=0;o--){var u=s.ranges[o];if(!(u.head.ch>100||o&&s.ranges[o-1].head.line==u.head.line)){var m=e.getModeAt(u.head),x=!1;if(m.electricChars){for(var _=0;_<m.electricChars.length;_++)if(r.indexOf(m.electricChars.charAt(_))>-1){x=Qi(e,u.head.line,"smart");break}}else m.electricInput&&m.electricInput.test(se(e.doc,u.head.line).text.slice(0,u.head.ch))&&(x=Qi(e,u.head.line,"smart"));x&&tr(e,"electricInput",e,u.head.line)}}}function Fc(e){for(var r=[],s=[],o=0;o<e.doc.sel.ranges.length;o++){var u=e.doc.sel.ranges[o].head.line,m={anchor:we(u,0),head:we(u+1,0)};s.push(m),r.push(e.getRange(m.anchor,m.head))}return{text:r,ranges:s}}function Mc(e,r,s,o){e.setAttribute("autocorrect",s?"":"off"),e.setAttribute("autocapitalize",o?"":"off"),e.setAttribute("spellcheck",!!r)}function Oc(){var e=z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),r=z("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return f?e.style.width="1000px":e.setAttribute("wrap","off"),E&&(e.style.border="1px solid black"),Mc(e),r}function mx(e){var r=e.optionHandlers,s=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(o,u){var m=this.options,x=m[o];m[o]==u&&o!="mode"||(m[o]=u,r.hasOwnProperty(o)&&rr(this,r[o])(this,u,x),rt(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"](Ho(o))},removeKeyMap:function(o){for(var u=this.state.keyMaps,m=0;m<u.length;++m)if(u[m]==o||u[m].name==o)return u.splice(m,1),!0},addOverlay:br(function(o,u){var m=o.token?o:e.getMode(this.options,o);if(m.startState)throw new Error("Overlays may not be stateful.");Be(this.state.overlays,{mode:m,modeSpec:o,opaque:u&&u.opaque,priority:u&&u.priority||0},function(x){return x.priority}),this.state.modeGen++,kr(this)}),removeOverlay:br(function(o){for(var u=this.state.overlays,m=0;m<u.length;++m){var x=u[m].modeSpec;if(x==o||typeof o=="string"&&x.name==o){u.splice(m,1),this.state.modeGen++,kr(this);return}}}),indentLine:br(function(o,u,m){typeof u!="string"&&typeof u!="number"&&(u==null?u=this.options.smartIndent?"smart":"prev":u=u?"add":"subtract"),bt(this.doc,o)&&Qi(this,o,u,m)}),indentSelection:br(function(o){for(var u=this.doc.sel.ranges,m=-1,x=0;x<u.length;x++){var _=u[x];if(_.empty())_.head.line>m&&(Qi(this,_.head.line,o,!0),m=_.head.line,x==this.doc.sel.primIndex&&Qn(this));else{var T=_.from(),L=_.to(),V=Math.max(m,T.line);m=Math.min(this.lastLine(),L.line-(L.ch?0:1))+1;for(var ee=V;ee<m;++ee)Qi(this,ee,o);var fe=this.doc.sel.ranges;T.ch==0&&u.length==fe.length&&fe[x].from().ch>0&&xs(this.doc,x,new At(T,fe[x].to()),qe)}}}),getTokenAt:function(o,u){return $l(this,o,u)},getLineTokens:function(o,u){return $l(this,we(o),u,!0)},getTokenTypeAt:function(o){o=Ze(this.doc,o);var u=Bl(this,se(this.doc,o.line)),m=0,x=(u.length-1)/2,_=o.ch,T;if(_==0)T=u[2];else for(;;){var L=m+x>>1;if((L?u[L*2-1]:0)>=_)x=L;else if(u[L*2+1]<_)m=L+1;else{T=u[L*2+2];break}}var V=T?T.indexOf("overlay "):-1;return V<0?T:V==0?null:T.slice(0,V-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 m=[];if(!s.hasOwnProperty(u))return m;var x=s[u],_=this.getModeAt(o);if(typeof _[u]=="string")x[_[u]
`,Pe=X(Ee,le)?"w":fe&&Ee==`
`?"n":!fe||/\s/.test(Ee)?null:"p";if(fe&&!ye&&!Pe&&(Pe="s"),ee&&ee!=Pe){s<0&&(s=1,V(),r.sticky="after");break}if(Pe&&(ee=Pe),s>0&&!V(!ye))break}var je=jo(e,r,m,x,!0);return q(m,je)&&(je.hitSide=!0),je}function Pc(e,r,s,o){var u=e.doc,m=r.left,x;if(o=="page"){var _=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),T=Math.max(_-.5*Yn(e.display),3);x=(s>0?r.bottom:r.top)+s*T}else o=="line"&&(x=s>0?r.bottom+3:r.top-3);for(var L;L=es(e,m,x),!!L.outside;){if(s<0?x<=0:x>=u.height){L.hitSide=!0;break}x+=s*5}return L}var Ot=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Fe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ot.prototype.init=function(e){var r=this,s=this,o=s.cm,u=s.div=e.lineDiv;u.contentEditable=!0,Mc(u,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize);function m(_){for(var T=_.target;T;T=T.parentNode){if(T==u)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(T.className))break}return!1}lt(u,"paste",function(_){!m(_)||wt(o,_)||Dc(_,o)||h<=11&&setTimeout(rr(o,function(){return r.updateFromDOM()}),20)}),lt(u,"compositionstart",function(_){r.composing={data:_.data,done:!1}}),lt(u,"compositionupdate",function(_){r.composing||(r.composing={data:_.data,done:!1})}),lt(u,"compositionend",function(_){r.composing&&(_.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),lt(u,"touchstart",function(){return s.forceCompositionEnd()}),lt(u,"input",function(){r.composing||r.readFromDOMSoon()});function x(_){if(!(!m(_)||wt(o,_))){if(o.somethingSelected())Ko({lineWise:!1,text:o.getSelections()}),_.type=="cut"&&o.replaceSelection("",null,"cut");else if(o.options.lineWiseCopyCut){var T=Fc(o);Ko({lineWise:!0,text:T.text}),_.type=="cut"&&o.operation(function(){o.setSelections(T.ranges,0,qe),o.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var L=Hr.text.join(`
`);if(_.clipboardData.setData("Text",L),_.clipboardData.getData("Text")==L){_.preventDefault();return}}var V=Oc(),ee=V.firstChild;o.display.lineSpace.insertBefore(V,o.display.lineSpace.firstChild),ee.value=Hr.text.join(`
`);var fe=R();ae(ee),setTimeout(function(){o.display.lineSpace.removeChild(V),fe.focus(),fe==u&&s.showPrimarySelection()},50)}}lt(u,"copy",x),lt(u,"cut",x)},Ot.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ot.prototype.prepareSelection=function(){var e=_u(this.cm,!1);return e.focus=R()==this.div,e},Ot.prototype.showSelection=function(e,r){!e||!this.cm.display.view.length||((e.focus||r)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ot.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ot.prototype.showPrimarySelection=function(){var e=this.getSelection(),r=this.cm,s=r.doc.sel.primary(),o=s.from(),u=s.to();if(r.display.viewTo==r.display.viewFrom||o.line>=r.display.viewTo||u.line<r.display.viewFrom){e.removeAllRanges();return}var m=Vo(r,e.anchorNode,e.anchorOffset),x=Vo(r,e.focusNode,e.focusOffset);if(!(m&&!m.bad&&x&&!x.bad&&D(ft(m,x),o)==0&&D(De(m,x),u)==0)){var _=r.display.view,T=o.line>=r.display.viewFrom&&Rc(r,o)||{node:_[0].measure.map[2],offset:0},L=u.line<r.display.viewTo&&Rc(r,u);if(!L){var V=_[_.length-1].measure,ee=V.maps?V.maps[V.maps.length-1]:V.map;L={node:ee[ee.length-1],offset:ee[ee.length-2]-ee[ee.length-3]}}if(!T||!L){e.removeAllRanges();return}var fe=e.rangeCount&&e.getRangeAt(0),le;try{le=U(T.node,T.offset,L.offset,L.node)}catch{}le&&(!n&&r.state.focused?(e.collapse(T.node,T.offset),le.collapsed||(e.removeAllRanges(),e.addRange(le))):(e.removeAllRanges(),e.addRange(le)),fe&&e.anchorNode==null?e.addRange(fe):n&&this.startGracePeriod()),this.rememberSelection()}},Ot.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)},Ot.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},Ot.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ot.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var r=e.getRangeAt(0).commonAncestorContainer;return Z(this.div,r)},Ot.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||R()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ot.prototype.blur=function(){this.div.blur()},Ot.prototype.getField=function(){return this.div},Ot.prototype.supportsTouch=function(){return!0},Ot.prototype.receivedFocus=function(){var e=this,r=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ar(this.cm,function(){return r.cm.curOp.selectionChanged=!0});function s(){r.cm.state.focused&&(r.pollSelection(),r.polling.set(r.cm.options.pollInterval,s))}this.polling.set(this.cm.options.pollInterval,s)},Ot.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ot.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),r=this.cm;if(w&&y&&this.cm.display.gutterSpecs.length&&gx(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var s=Vo(r,e.anchorNode,e.anchorOffset),o=Vo(r,e.focusNode,e.focusOffset);s&&o&&Ar(r,function(){mr(r.doc,bn(s,o),qe),(s.bad||o.bad)&&(r.curOp.selectionChanged=!0)})}}},Ot.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,r=e.display,s=e.doc.sel.primary(),o=s.from(),u=s.to();if(o.ch==0&&o.line>e.firstLine()&&(o=we(o.line-1,se(e.doc,o.line-1).length)),u.ch==se(e.doc,u.line).text.lengt
`),ae(u))}else return;x.type=="cut"&&(o.state.cutIncoming=+new Date)}}lt(u,"cut",m),lt(u,"copy",m),lt(e.scroller,"paste",function(x){if(!(ln(e,x)||wt(o,x))){if(!u.dispatchEvent){o.state.pasteIncoming=+new Date,s.focus();return}var _=new Event("paste");_.clipboardData=x.clipboardData,u.dispatchEvent(_)}}),lt(e.lineSpace,"selectstart",function(x){ln(e,x)||kt(x)}),lt(u,"compositionstart",function(){var x=o.getCursor("from");s.composing&&s.composing.range.clear(),s.composing={start:x,range:o.markText(x,o.getCursor("to"),{className:"CodeMirror-composing"})}}),lt(u,"compositionend",function(){s.composing&&(s.poll(),s.composing.range.clear(),s.composing=null)})},Wt.prototype.createField=function(e){this.wrapper=Oc(),this.textarea=this.wrapper.firstChild},Wt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Wt.prototype.prepareSelection=function(){var e=this.cm,r=e.display,s=e.doc,o=_u(e);if(e.options.moveInputWithCursor){var u=$r(e,s.sel.primary().head,"div"),m=r.wrapper.getBoundingClientRect(),x=r.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(r.wrapper.clientHeight-10,u.top+x.top-m.top)),o.teLeft=Math.max(0,Math.min(r.wrapper.clientWidth-10,u.left+x.left-m.left))}return o},Wt.prototype.showSelection=function(e){var r=this.cm,s=r.display;j(s.cursorDiv,e.cursors),j(s.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Wt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var r=this.cm;if(r.somethingSelected()){this.prevInput="";var s=r.getSelection();this.textarea.value=s,r.state.focused&&ae(this.textarea),a&&h>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",a&&h>=9&&(this.hasSelection=null))}},Wt.prototype.getField=function(){return this.textarea},Wt.prototype.supportsTouch=function(){return!1},Wt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!I||R()!=this.textarea))try{this.textarea.focus()}catch{}},Wt.prototype.blur=function(){this.textarea.blur()},Wt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Wt.prototype.receivedFocus=function(){this.slowPoll()},Wt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Wt.prototype.fastPoll=function(){var e=!1,r=this;r.pollingFast=!0;function s(){var o=r.poll();!o&&!e?(e=!0,r.polling.set(60,s)):(r.pollingFast=!1,r.slowPoll())}r.polling.set(20,s)},Wt.prototype.poll=function(){var e=this,r=this.cm,s=this.textarea,o=this.prevInput;if(this.contextMenuPending||!r.state.focused||oe(s)&&!o&&!this.composing||r.isReadOnly()||r.options.disableInput||r.state.keySeq)return!1;var u=s.value;if(u==o&&!r.somethingSelected())return!1;if(a&&h>=9&&this.hasSelection===u||S&&/[\uf700-\uf7ff]/.test(u))return r.display.input.reset(),!1;if(r.doc.sel==r.display.selForContextMenu){var m=u.charCodeAt(0);if(m==8203&&!o&&(o="\u200B"),m==8666)return this.reset(),this.cm.execCommand("undo")}for(var x=0,_=Math.min(o.length,u.length);x<_&&o.charCodeAt(x)==u.charCodeAt(x);)++x;return Ar(r,function(){As(r,u.slice(x),o.length-x,null,e.composing?"*compose":null),u.length>1e3||u.indexOf(`
`)>-1?s.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},Wt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Wt.prototype.onKeyPress=function(){a&&h>=9&&(this.hasSelection=null),this.fastPoll()},Wt.prototype.onContextMenu=function(e){var r=this,s=r.cm,o=s.display,u=r.textarea;r.contextMenuPending&&r.contextMenuPending();var m=Dn(s,e),x=o.scroller.scrollTop;if(!m||g)return;var _=s.options.resetSelectionOnContextMenu;_&&s.doc.sel.contains(m)==-1&&rr(s,mr)(s.doc,bn(m),qe);var T=u.style.cssText,L=r.wrapper.style.cssText,V=r.wrapper.offsetParent.getBoundingClientRect();r.wrapper.style.cssText="position: static",u.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-V.top-5)+"px; left: "+(e.clientX-V.left-5)+`px;
z-index: 1000; background: `+(a?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var ee;f&&(ee=window.scrollY),o.input.focus(),f&&window.scrollTo(null,ee),o.input.reset(),s.somethingSelected()||(u.value=r.prevInput=" "),r.contextMenuPending=le,o.selForContextMenu=s.doc.sel,clearTimeout(o.detectingSelectAll);function fe(){if(u.selectionStart!=null){var Ee=s.somethingSelected(),Pe="\u200B"+(Ee?u.value:"");u.value="\u21DA",u.value=Pe,r.prevInput=Ee?"":"\u200B",u.selectionStart=1,u.selectionEnd=Pe.length,o.selForContextMenu=s.doc.sel}}function le(){if(r.contextMenuPending==le&&(r.contextMenuPending=!1,r.wrapper.style.cssText=L,u.style.cssText=T,a&&h<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=x),u.selectionStart!=null)){(!a||a&&h<9)&&fe();var Ee=0,Pe=function(){o.selForContextMenu==s.doc.sel&&u.selectionStart==0&&u.selectionEnd>0&&r.prevInput=="\u200B"?rr(s,ec)(s):Ee++<10?o.detectingSelectAll=setTimeout(Pe,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(Pe,200)}}if(a&&h>=9&&fe(),J){Ir(e);var ye=function(){pt(window,"mouseup",ye),setTimeout(le,20)};lt(window,"mouseup",ye)}else setTimeout(le,50)},Wt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Wt.prototype.setUneditable=function(){},Wt.prototype.needsContentAttribute=!1;function bx(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 s=R();r.autofocus=s==e||e.getAttribute("autofocus")!=null&&s==document.body}function o(){e.value=_.getValue()}var u;if(e.form&&(lt(e.form,"submit",o),!r.leaveSubmitMethodAlone)){var m=e.form;u=m.submit;try{var x=m.submit=function(){o(),m.submit=u,m.submit(),m.submit=x}}catch{}}r.finishInit=function(T){T.save=o,T.getTextArea=function(){return e},T.toTextArea=function(){T.toTextArea=isNaN,o(),e.parentNode.removeChild(T.getWrapperElement()),e.style.display="",e.form&&(pt(e.form,"submit",o),!r.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=u))}},e.style.display="none";var _=Nt(function(T){return e.parentNode.insertBefore(T,e.nextSibling)},r);return _}function xx(e){e.off=pt,e.on=lt,e.wheelEventPixels=Tb,e.Doc=_r,e.splitLines=ie,e.countColumn=be,e.findColumn=Ue,e.isWordChar=Se,e.Pass=ze,e.signal=rt,e.Line=Gn,e.changeEnd=xn,e.scrollbarModel=Du,e.Pos=we,e.cmpPos=D,e.modes=B,e.mimeModes=te,e.resolveMode=ve,e.getMode=Le,e.modeExtensions=Oe,e.extendMode=Ce,e.copyState=Ve,e.startState=mt,e.innerMode=St,e.commands=Vi,e.keyMap=cn,e.keyName=gc,e.isModifierKey=pc,e.lookupKey=oi,e.normalizeKeyMap=Yb,e.StringStream=W,e.SharedTextMarker=Wi,e.TextMarker=kn,e.LineWidget=Hi,e.e_preventDefault=kt,e.e_stopPropagation=st,e.e_stop=Ir,e.addClass=N,e.contains=Z,e.rmClass=Y,e.keyNames=_n}fx(Nt),mx(Nt);var wx="iter insert remove copy getEditor constructor".split(" ");for(var Yo in _r.prototype)_r.prototype.hasOwnProperty(Yo)&&xe(wx,Yo)<0&&(Nt.prototype[Yo]=function(e){return function(){return e.apply(this.doc,arguments)}}(_r.prototype[Yo]));return Vt(_r),Nt.inputStyles={textarea:Wt,contenteditable:Ot},Nt.defineMode=function(e){!Nt.defaults.mode&&e!="null"&&(Nt.defaults.mode=e),ce.apply(this,arguments)},Nt.defineMIME=me,Nt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Nt.defineMIME("text/plain","null"),Nt.defineExtension=function(e,r){Nt.prototype[e]=r},Nt.defineDocExtension=function(e,r){_r.prototype[e]=r},Nt.fromTextArea=bx,xx(Nt),Nt.version="5.63.3",Nt})});var Qs=Me((po,Zs)=>{(function(i,t){typeof po=="object"&&typeof Zs=="object"?Zs.exports=t():typeof define=="function"&&define.amd?define([],t):typeof po=="object"?po.ClipboardJS=t():i.ClipboardJS=t()})(po,function(){return t={134:function(l,c,d){"use strict";d.d(c,{default:function(){return S}});var c=d(279),a=d.n(c),c=d(370),h=d.n(c),c=d(817),f=d.n(c);function p(P){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"
`)&&(Y="(?: "+Y+")",j=" "+j,G++),F=new RegExp("^(?:"+Y+")",K)),k&&(F=new RegExp("^"+Y+"$(?!\\s)",K)),v&&(P=S.lastIndex),H=p.call(J?F:S,j),J?H?(H.input=H.input.slice(G),H[0]=H[0].slice(G),H.index=S.lastIndex,S.lastIndex+=H[0].length):S.lastIndex=0:v&&H&&(S.lastIndex=S.global?H.index+H[0].length:P),k&&H&&H.length>1&&y.call(H[0],F,function(){for($=1;$<arguments.length-2;$++)arguments[$]===void 0&&(H[$]=void 0)}),H}),c.exports=g},7066:function(c,d,a){"use strict";var h=a(9670);c.exports=function(){var f=h(this),p="";return f.global&&(p+="g"),f.ignoreCase&&(p+="i"),f.multiline&&(p+="m"),f.dotAll&&(p+="s"),f.unicode&&(p+="u"),f.sticky&&(p+="y"),p}},2999:function(c,d,a){"use strict";var h=a(7293);function f(p,y){return RegExp(p,y)}d.UNSUPPORTED_Y=h(function(){var p=f("a","y");return p.lastIndex=2,p.exec("abcd")!=null}),d.BROKEN_CARET=h(function(){var p=f("^r","gy");return p.lastIndex=2,p.exec("str")!=null})},4488:function(c){c.exports=function(d){if(d==null)throw TypeError("Can't call method on "+d);return d}},3505:function(c,d,a){var h=a(7854),f=a(8880);c.exports=function(p,y){try{f(h,p,y)}catch{h[p]=y}return y}},6340:function(c,d,a){"use strict";var h=a(5005),f=a(3070),p=a(5112),y=a(9781),g=p("species");c.exports=function(v){var b=h(v),k=f.f;y&&b&&!b[g]&&k(b,g,{configurable:!0,get:function(){return this}})}},8003:function(c,d,a){var h=a(3070).f,f=a(6656),p=a(5112),y=p("toStringTag");c.exports=function(g,v,b){g&&!f(g=b?g:g.prototype,y)&&h(g,y,{configurable:!0,value:v})}},6200:function(c,d,a){var h=a(2309),f=a(9711),p=h("keys");c.exports=function(y){return p[y]||(p[y]=f(y))}},5465:function(c,d,a){var h=a(7854),f=a(3505),p="__core-js_shared__",y=h[p]||f(p,{});c.exports=y},2309:function(c,d,a){var h=a(1913),f=a(5465);(c.exports=function(p,y){return f[p]||(f[p]=y!==void 0?y:{})})("versions",[]).push({version:"3.9.0",mode:h?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(c,d,a){var h=a(9670),f=a(3099),p=a(5112),y=p("species");c.exports=function(g,v){var b=h(g).constructor,k;return b===void 0||(k=h(b)[y])==null?v:f(k)}},8710:function(c,d,a){var h=a(9958),f=a(4488),p=function(y){return function(g,v){var b=String(f(g)),k=h(v),E=b.length,w,I;return k<0||k>=E?y?"":void 0:(w=b.charCodeAt(k),w<55296||w>56319||k+1===E||(I=b.charCodeAt(k+1))<56320||I>57343?y?b.charAt(k):w:y?b.slice(k,k+2):(w-55296<<10)+(I-56320)+65536)}};c.exports={codeAt:p(!1),charAt:p(!0)}},3197:function(c){"use strict";var d=2147483647,a=36,h=1,f=26,p=38,y=700,g=72,v=128,b="-",k=/[^\0-\u007E]/,E=/[.\u3002\uFF0E\uFF61]/g,w="Overflow: input needs wider integers to process",I=a-h,S=Math.floor,P=String.fromCharCode,F=function(K){for(var Y=[],G=0,j=K.length;G<j;){var z=K.charCodeAt(G++);if(z>=55296&&z<=56319&&G<j){var C=K.charCodeAt(G++);(C&64512)==56320?Y.push(((z&1023)<<10)+(C&1023)+65536):(Y.push(z),G--)}else Y.push(z)}return Y},H=function(K){return K+22+75*(K<26)},$=function(K,Y,G){var j=0;for(K=G?S(K/y):K>>1,K+=S(K/Y);K>I*f>>1;j+=a)K=S(K/I);return S(j+(I+1)*K/(K+p))},J=function(K){var Y=[];K=F(K);var G=K.length,j=v,z=0,C=g,U,Z;for(U=0;U<K.length;U++)Z=K[U],Z<128&&Y.push(P(Z));var R=Y.length,N=R;for(R&&Y.push(b);N<G;){var ne=d;for(U=0;U<K.length;U++)Z=K[U],Z>=j&&Z<ne&&(ne=Z);var ae=N+1;if(ne-j>S((d-z)/ae))throw RangeError(w);for(z+=(ne-j)*ae,j=ne,U=0;U<K.length;U++){if(Z=K[U],Z<j&&++z>d)throw RangeError(w);if(Z==j){for(var M=z,A=a;;A+=a){var be=A<=C?h:A>=C+f?f:A-C;if(M<be)break;var Fe=M-be,xe=a-be;Y.push(P(H(be+Fe%xe))),M=S(Fe/xe)}Y.push(P(H(M))),C=$(z,ae,N==R),z=0,++N}}++z,++j}return Y.join("")};c.exports=function(K){var Y=[],G=K.toLowerCase().replace(E,".").split("."),j,z;for(j=0;j<G.length;j++)z=G[j],Y.push(k.test(z)?"xn--"+J(z):z);return Y.join(".")}},6091:function(c,d,a){var h=a(7293),f=a(1361),p="\u200B\x85\u180E";c.exports=function(y){return h(function(){return!!f[y]()||p[y]()!=p||f[y].name!==y})}},3111:function(c,d,a){var h=a(4488),f=a(1361),p="["+f+"]",y=RegExp("^"+p+p+"*"),g=RegExp(p+p+"*$"),v=function(b){return function(k){var E=String(h(k));return b&1&&(E=E.replace(y,"")),b&2&&(E=E.replace(g,"")),E}};c.exports={start:v(1),
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},8264:function(c,d,a){"use strict";var h=a(2109),f=a(7854),p=a(3331),y=a(6340),g="ArrayBuffer",v=p[g],b=f[g];h({global:!0,forced:b!==v},{ArrayBuffer:v}),y(g)},2222:function(c,d,a){"use strict";var h=a(2109),f=a(7293),p=a(3157),y=a(111),g=a(7908),v=a(7466),b=a(6135),k=a(5417),E=a(1194),w=a(5112),I=a(7392),S=w("isConcatSpreadable"),P=9007199254740991,F="Maximum allowed index exceeded",H=I>=51||!f(function(){var Y=[];return Y[S]=!1,Y.concat()[0]!==Y}),$=E("concat"),J=function(Y){if(!y(Y))return!1;var G=Y[S];return G!==void 0?!!G:p(Y)},K=!H||!$;h({target:"Array",proto:!0,forced:K},{concat:function(G){var j=g(this),z=k(j,0),C=0,U,Z,R,N,ne;for(U=-1,R=arguments.length;U<R;U++)if(ne=U===-1?j:arguments[U],J(ne)){if(N=v(ne.length),C+N>P)throw TypeError(F);for(Z=0;Z<N;Z++,C++)Z in ne&&b(z,C,ne[Z])}else{if(C>=P)throw TypeError(F);b(z,C++,ne)}return z.length=C,z}})},7327:function(c,d,a){"use strict";var h=a(2109),f=a(2092).filter,p=a(1194),y=p("filter");h({target:"Array",proto:!0,forced:!y},{filter:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},2772:function(c,d,a){"use strict";var h=a(2109),f=a(1318).indexOf,p=a(9341),y=[].indexOf,g=!!y&&1/[1].indexOf(1,-0)<0,v=p("indexOf");h({target:"Array",proto:!0,forced:g||!v},{indexOf:function(k){return g?y.apply(this,arguments)||0:f(this,k,arguments.length>1?arguments[1]:void 0)}})},6992:function(c,d,a){"use strict";var h=a(5656),f=a(1223),p=a(7497),y=a(9909),g=a(654),v="Array Iterator",b=y.set,k=y.getterFor(v);c.exports=g(Array,"Array",function(E,w){b(this,{type:v,target:h(E),index:0,kind:w})},function(){var E=k(this),w=E.target,I=E.kind,S=E.index++;return!w||S>=w.length?(E.target=void 0,{value:void 0,done:!0}):I=="keys"?{value:S,done:!1}:I=="values"?{value:w[S],done:!1}:{value:[S,w[S]],done:!1}},"values"),p.Arguments=p.Array,f("keys"),f("values"),f("entries")},1249:function(c,d,a){"use strict";var h=a(2109),f=a(2092).map,p=a(1194),y=p("map");h({target:"Array",proto:!0,forced:!y},{map:function(v){return f(this,v,arguments.length>1?arguments[1]:void 0)}})},7042:function(c,d,a){"use strict";var h=a(2109),f=a(111),p=a(3157),y=a(1400),g=a(7466),v=a(5656),b=a(6135),k=a(5112),E=a(1194),w=E("slice"),I=k("species"),S=[].slice,P=Math.max;h({target:"Array",proto:!0,forced:!w},{slice:function(H,$){var J=v(this),K=g(J.length),Y=y(H,K),G=y($===void 0?K:$,K),j,z,C;if(p(J)&&(j=J.constructor,typeof j=="function"&&(j===Array||p(j.prototype))?j=void 0:f(j)&&(j=j[I],j===null&&(j=void 0)),j===Array||j===void 0))return S.call(J,Y,G);for(z=new(j===void 0?Array:j)(P(G-Y,0)),C=0;Y<G;Y++,C++)Y in J&&b(z,C,J[Y]);return z.length=C,z}})},561:function(c,d,a){"use strict";var h=a(2109),f=a(1400),p=a(9958),y=a(7466),g=a(7908),v=a(5417),b=a(6135),k=a(1194),E=k("splice"),w=Math.max,I=Math.min,S=9007199254740991,P="Maximum allowed length exceeded";h({target:"Array",proto:!0,forced:!E},{splice:function(H,$){var J=g(this),K=y(J.length),Y=f(H,K),G=arguments.length,j,z,C,U,Z,R;if(G===0?j=z=0:G===1?(j=0,z=K-Y):(j=G-2,z=I(w(p($),0),K-Y)),K+j-z>S)throw TypeError(P);for(C=v(J,z),U=0;U<z;U++)Z=Y+U,Z in J&&b(C,U,J[Z]);if(C.length=z,j<z){for(U=Y;U<K-z;U++)Z=U+z,R=U+j,Z in J?J[R]=J[Z]:delete J[R];for(U=K;U>K-z+j;U--)delete J[U-1]}else if(j>z)for(U=K-z;U>Y;U--)Z=U+z-1,R=U+j-1,Z in J?J[R]=J[Z]:delete J[R];for(U=0;U<j;U++)J[U+Y]=arguments[U+2];return J.length=K-z+j,C}})},8309:function(c,d,a){var h=a(9781),f=a(3070).f,p=Function.prototype,y=p.toString,g=/^\s*function ([^ (]*)/,v="name";h&&!(v in p)&&f(p,v,{configurable:!0,get:function(){try{return y.call(this).match(g)[1]}catch{return""}}})},489:function(c,d,a){var h=a(2109),f=a(7293),p=a(7908),y=a(9518),g=a(8544),v=f(function(){y(1)});h({target:"Object",stat:!0,forced:v,sham:!g},{getPrototypeOf:function(k){return y(p(k))}})},1539:function(c,d,a){var h=a(1694),f=a(1320),p=a(288);h||f(Object.prototype,"toString",p,{unsafe:!0})},4916:function(c,d,a){"use strict";var h=a(2109),f=a(2261);h({target:"RegExp",proto:!0,forced:/./.exec!==f},{exec:f})},9714
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function Ie(ie,oe){if(!!ie){if(typeof ie=="string")return Be(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Be(ie,oe)}}function Be(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function Ke(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function He(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Je(ie,oe,Q){return oe&&He(ie.prototype,oe),Q&&He(ie,Q),ie}var Se=function(){function ie(){Ke(this,ie)}return Je(ie,[{key:"on",value:function(Q,re){return this._callbacks=this._callbacks||{},this._callbacks[Q]||(this._callbacks[Q]=[]),this._callbacks[Q].push(re),this}},{key:"emit",value:function(Q){this._callbacks=this._callbacks||{};for(var re=this._callbacks[Q],O=arguments.length,B=new Array(O>1?O-1:0),te=1;te<O;te++)B[te-1]=arguments[te];if(re){var ce=Re(re,!0),me;try{for(ce.s();!(me=ce.n()).done;){var ve=me.value;ve.apply(this,B)}}catch(Le){ce.e(Le)}finally{ce.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+Q,{args:B})),this}},{key:"makeEvent",value:function(Q,re){var O={bubbles:!0,cancelable:!0,detail:re};if(typeof window.CustomEvent=="function")return new CustomEvent(Q,O);var B=document.createEvent("CustomEvent");return B.initCustomEvent(Q,O.bubbles,O.cancelable,O.detail),B}},{key:"off",value:function(Q,re){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var O=this._callbacks[Q];if(!O)return this;if(arguments.length===1)return delete this._callbacks[Q],this;for(var B=0;B<O.length;B++){var te=O[B];if(te===re){O.splice(B,1);break}}return this}}]),ie}(),X='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.877102
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function it(ie,oe){if(!!ie){if(typeof ie=="string")return Ne(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Ne(ie,oe)}}function Ne(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}var ot={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(oe,Q,re){if(re)return{dzuuid:re.file.upload.uuid,dzchunkindex:re.index,dztotalfilesize:re.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:re.file.upload.totalChunkCount,dzchunkbyteoffset:re.index*this.options.chunkSize}},accept:function(oe,Q){return Q()},chunksUploaded:function(oe,Q){Q()},fallback:function(){var oe;this.element.className="".concat(this.element.className," dz-browser-not-supported");var Q=ue(this.element.getElementsByTagName("div"),!0),re;try{for(Q.s();!(re=Q.n()).done;){var O=re.value;if(/(^| )dz-message($| )/.test(O.className)){oe=O,O.className="dz-message";break}}}catch(te){Q.e(te)}finally{Q.f()}oe||(oe=st.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(oe));var B=oe.getElementsByTagName("span")[0];return B&&(B.textContent!=null?B.textContent=this.options.dictFallbackMessage:B.innerText!=null&&(B.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(oe,Q,re,O){var B={srcX:0,srcY:0,srcWidth:oe.width,srcHeight:oe.height},te=oe.width/oe.height;Q==null&&re==null?(Q=B.srcWidth,re=B.srcHeight):Q==null?Q=re*te:re==null&&(re=Q/te),Q=Math.min(Q,B.srcWidth),re=Math.min(re,B.srcHeight);var ce=Q/re;if(B.srcWidth>Q||B.srcHeight>re)if(O==="crop")te>ce?(B.srcHeight=oe.height,B.srcWidth=B.srcHeight*ce):(B.srcWidth=oe.width,B.srcHeight=B.srcWidth/ce);else if(O==="contain")te>ce?re=Q/te:Q=re*te;else throw new Error("Unknown resizeMethod '".concat(O,"'"));return B.srcX=(oe.width-B.srcWidth)/2,B.srcY=(oe.height-B.srcHeight)/2,B.trgWidth=Q,B.trgHeight=re,B},transformFile:function(oe,Q){return(this.options.resizeWidth||this.options.resizeHeight)&&oe.type.match(/image.*/)?this.resizeImage(oe,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,Q):Q(oe)},previewTemplate:d
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var B=!0,te=!1,ce;return{s:function(){Q=ie[Symbol.iterator]()},n:function(){var ve=Q.next();return B=ve.done,ve},e:function(ve){te=!0,ce=ve},f:function(){try{!B&&Q.return!=null&&Q.return()}finally{if(te)throw ce}}}}function jt(ie,oe){if(!!ie){if(typeof ie=="string")return Lt(ie,oe);var Q=Object.prototype.toString.call(ie).slice(8,-1);if(Q==="Object"&&ie.constructor&&(Q=ie.constructor.name),Q==="Map"||Q==="Set")return Array.from(ie);if(Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q))return Lt(ie,oe)}}function Lt(ie,oe){(oe==null||oe>ie.length)&&(oe=ie.length);for(var Q=0,re=new Array(oe);Q<oe;Q++)re[Q]=ie[Q];return re}function fr(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function lt(ie,oe){for(var Q=0;Q<oe.length;Q++){var re=oe[Q];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ie,re.key,re)}}function Mt(ie,oe,Q){return oe&&lt(ie.prototype,oe),Q&&lt(ie,Q),ie}function pt(ie,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(oe&&oe.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),oe&&rt(ie,oe)}function rt(ie,oe){return rt=Object.setPrototypeOf||function(re,O){return re.__proto__=O,re},rt(ie,oe)}function wt(ie){var oe=Vt();return function(){var re=kt(ie),O;if(oe){var B=kt(this).constructor;O=Reflect.construct(re,arguments,B)}else O=re.apply(this,arguments);return dr(this,O)}}function dr(ie,oe){return oe&&(et(oe)==="object"||typeof oe=="function")?oe:Et(ie)}function Et(ie){if(ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}function Vt(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function kt(ie){return kt=Object.setPrototypeOf?Object.getPrototypeOf:function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},kt(ie)}var st=function(ie){pt(Q,ie);var oe=wt(Q);function Q(re,O){var B;fr(this,Q),B=oe.call(this);var te,ce;if(B.element=re,B.version=Q.version,B.clickableElements=[],B.listeners=[],B.files=[],typeof B.element=="string"&&(B.element=document.querySelector(B.element)),!B.element||B.element.nodeType==null)throw new Error("Invalid dropzone element.");if(B.element.dropzone)throw new Error("Dropzone already attached.");Q.instances.push(Et(B)),B.element.dropzone=Et(B);var me=(ce=Q.optionsForElement(B.element))!=null?ce:{};if(B.options=Q.extend({},Xe,me,O!=null?O:{}),B.options.previewTemplate=B.options.previewTemplate.replace(/\n*/g,""),B.options.forceFallback||!Q.isBrowserSupported())return dr(B,B.options.fallback.call(Et(B)));if(B.options.url==null&&(B.options.url=B.element.getAttribute("action")),!B.options.url)throw new Error("No URL provided.");if(B.options.acceptedFiles&&B.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(B.options.uploadMultiple&&B.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return B.options.acceptedMimeTypes&&(B.options.acceptedFiles=B.options.acceptedMimeTypes,delete B.options.acceptedMimeTypes),B.options.renameFilename!=null&&(B.options.renameFile=function(ve){return B.options.renameFilename.call(Et(B),ve.name,ve)}),typeof B.options.method=="string"&&(B.options.method=B.options.method.toUpperCase()),(te=B.getExistingFallback())&&te.parentNode&&te.parentNode.removeChild(te),B.options.previewsContainer!==!1&&(B.options.previewsContainer?B.previewsContainer=Q.getElement(B.options.previewsContainer,"previewsContainer"):B.previewsContainer=B.element),B.options.clickable&&(B.options.clickable===!0?B.clickableElements=[B.element]:B.clickableElements=Q.getElements(B.options.clickable,"clickable")),B.init(),B}return Mt(Q,[{key:"getAccepted
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
Expect errors in decoding.`),Q=Q.replace(/[^A-Za-z0-9\+\/\=]/g,"");ce=this.KEY_STR.indexOf(Q.charAt(Oe++)),me=this.KEY_STR.indexOf(Q.charAt(Oe++)),ve=this.KEY_STR.indexOf(Q.charAt(Oe++)),Le=this.KEY_STR.indexOf(Q.charAt(Oe++)),O=ce<<2|me>>4,B=(me&15)<<4|ve>>2,te=(ve&3)<<6|Le,Ce.push(O),ve!==64&&Ce.push(B),Le!==64&&Ce.push(te),O=B=te="",ce=me=ve=Le="",Oe<Q.length;);return Ce}}]),ie}();jr.initClass();var zt=function(oe,Q){var re=!1,O=!0,B=oe.document,te=B.documentElement,ce=B.addEventListener?"addEventListener":"attachEvent",me=B.addEventListener?"removeEventListener":"detachEvent",ve=B.addEventListener?"":"on",Le=function Ce(Ve){if(!(Ve.type==="readystatechange"&&B.readyState!=="complete")&&((Ve.type==="load"?oe:B)[me](ve+Ve.type,Ce,!1),!re&&(re=!0)))return Q.call(oe,Ve.type||Ve)},Oe=function Ce(){try{te.doScroll("left")}catch{setTimeout(Ce,50);return}return Le("poll")};if(B.readyState!=="complete"){if(B.createEventObject&&te.doScroll){try{O=!oe.frameElement}catch{}O&&Oe()}return B[ce](ve+"DOMContentLoaded",Le,!1),B[ce](ve+"readystatechange",Le,!1),oe[ce](ve+"load",Le,!1)}};st._autoDiscoverFunction=function(){if(st.autoDiscover)return st.discover()},zt(window,st._autoDiscoverFunction);function yr(ie,oe){return typeof ie!="undefined"&&ie!==null?oe(ie):void 0}function ur(ie,oe,Q){if(typeof ie!="undefined"&&ie!==null&&typeof ie[oe]=="function")return Q(ie,oe)}window.Dropzone=st;var Qt=st}(),l}()})});var sp=Me((jS,k0)=>{k0.exports={Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",amp:"&",AMP:"&",andand:"\u2A55",And:"\u2A53",and:"\u2227",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angmsd:"\u2221",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",apacir:"\u2A6F",ap:"\u2248",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",barwed:"\u2305",Barwed:"\u2306",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",because:"\u2235",Because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxdl:"\u2510",boxdL:"\u2555",boxDl:"\u2556",boxDL:"\u2557",boxdr:"\u250C",boxdR:"\u2552",boxDr:"\u2553",boxDR:"\u2554",boxh:"\u2500",boxH:"\u2550",boxhd:"\u252C",boxHd:"\u2564",boxhD:"\u2565",boxHD:"\u2566",boxhu:"\u2534",boxHu:"\u2567",boxhU:"\u2568",boxHU:"\u2569",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxul:"\u2518",boxuL:
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u01
`," "],L0=["{","}","|","\\","^","`"].concat(A0),D0=["'"].concat(L0),yp=["%","/","?",";","#"].concat(D0),bp=["/","?","#"],I0=255,xp=/^[+a-z0-9A-Z_-]{0,63}$/,F0=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,wp={javascript:!0,"javascript:":!0},kp={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function M0(i,t){if(i&&i instanceof Aa)return i;var n=new Aa;return n.parse(i,t),n}Aa.prototype.parse=function(i,t){var n,l,c,d,a,h=i;if(h=h.trim(),!t&&i.split("#").length===1){var f=T0.exec(h);if(f)return this.pathname=f[1],f[2]&&(this.search=f[2]),this}var p=E0.exec(h);if(p&&(p=p[0],c=p.toLowerCase(),this.protocol=p,h=h.substr(p.length)),(t||p||h.match(/^\/\/[^@\/]+@[^@\/]+/))&&(a=h.substr(0,2)==="//",a&&!(p&&wp[p])&&(h=h.substr(2),this.slashes=!0)),!wp[p]&&(a||p&&!kp[p])){var y=-1;for(n=0;n<bp.length;n++)d=h.indexOf(bp[n]),d!==-1&&(y===-1||d<y)&&(y=d);var g,v;for(y===-1?v=h.lastIndexOf("@"):v=h.lastIndexOf("@",y),v!==-1&&(g=h.slice(0,v),h=h.slice(v+1),this.auth=g),y=-1,n=0;n<yp.length;n++)d=h.indexOf(yp[n]),d!==-1&&(y===-1||d<y)&&(y=d);y===-1&&(y=h.length),h[y-1]===":"&&y--;var b=h.slice(0,y);h=h.slice(y),this.parseHost(b),this.hostname=this.hostname||"";var k=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!k){var E=this.hostname.split(/\./);for(n=0,l=E.length;n<l;n++){var w=E[n];if(!!w&&!w.match(xp)){for(var I="",S=0,P=w.length;S<P;S++)w.charCodeAt(S)>127?I+="x":I+=w[S];if(!I.match(xp)){var F=E.slice(0,n),H=E.slice(n+1),$=w.match(F0);$&&(F.push($[1]),H.unshift($[2])),H.length&&(h=H.join(".")+h),this.hostname=F.join(".");break}}}}this.hostname.length>I0&&(this.hostname=""),k&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var J=h.indexOf("#");J!==-1&&(this.hash=h.substr(J),h=h.slice(0,J));var K=h.indexOf("?");return K!==-1&&(this.search=h.substr(K),h=h.slice(0,K)),h&&(this.pathname=h),kp[c]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Aa.prototype.parseHost=function(i){var t=C0.exec(i);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),i=i.substr(0,i.length-t.length)),i&&(this.hostname=i)};_p.exports=M0});var al=Me((VS,mo)=>{"use strict";mo.exports.encode=dp();mo.exports.decode=mp();mo.exports.format=vp();mo.exports.parse=Sp()});var sl=Me((YS,Ep)=>{Ep.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var ll=Me((XS,Cp)=>{Cp.exports=/[\0-\x1F\x7F-\x9F]/});var Ap=Me((ZS,Tp)=>{Tp.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 ul=Me((QS,Lp)=>{Lp.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var Dp=Me(xi=>{"use strict";xi.Any=sl();xi.Cc=ll();xi.Cf=Ap();xi.P=Ea();xi.Z=ul()});var Ft=Me(lr=>{"use strict";function O0(i){return Object.prototype.toString.call(i)}function P0(i){return O0(i)==="[object String]"}var R0=Object.prototype.hasOwnProperty;function Ip(i,t){return R0.call(i,t)}function z0(i){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(n){if(!!n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(l){i[l]=n[l]})}}),i}function N0(i,t,n){return[].concat(i.slice(0,t),n,i.slice(t+1))}function Fp(i){return!(i>=55296&&i<=57343||i>=64976&&i<=65007||(i&65535)==65535||(i&65535)==65534||i>=0&&i<=8||i===11||i>=14&&i<=31||i>=127&&i<=159||i>1114111)}function Mp(i){if(i>65535){i-=65536;var t=55296+(i>>10),n=56320+(i&1023);return String.fromCharCode(t,n)}return String.fromCharCode(i)}var Op=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,B0=/&([a-z#][a-z0-9]{1,31});/gi,q0=new RegExp(Op.source+"|"+B0.source,"gi"),j0=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,Pp=ol();function $0(i,t){var n=0;return Ip(Pp,t)?Pp[t]:t.charCodeAt(0)===35&&j0.test(t)&&(n=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Fp(n))?Mp(n):i}function U0(i){return i.indexOf("\\")<0?i:i.replace(Op,"$1")}function H0(i){return i.
`};tn.fence=function(i,t,n,l,c){var d=i[t],a=d.info?aw(d.info).trim():"",h="",f="",p,y,g,v,b;return a&&(g=a.split(/(\s+)/g),h=g[0],f=g.slice(2).join("")),n.highlight?p=n.highlight(d.content,h,f)||$n(d.content):p=$n(d.content),p.indexOf("<pre")===0?p+`
`:a?(y=d.attrIndex("class"),v=d.attrs?d.attrs.slice():[],y<0?v.push(["class",n.langPrefix+h]):(v[y]=v[y].slice(),v[y][1]+=" "+n.langPrefix+h),b={attrs:v},"<pre><code"+c.renderAttrs(b)+">"+p+`</code></pre>
`):"<pre><code"+c.renderAttrs(d)+">"+p+`</code></pre>
`};tn.image=function(i,t,n,l,c){var d=i[t];return d.attrs[d.attrIndex("alt")][1]=c.renderInlineAsText(d.children,n,l),c.renderToken(i,t,n)};tn.hardbreak=function(i,t,n){return n.xhtmlOut?`<br />
`:`<br>
`};tn.softbreak=function(i,t,n){return n.breaks?n.xhtmlOut?`<br />
`:`<br>
`:`
`};tn.text=function(i,t){return $n(i[t].content)};tn.html_block=function(i,t){return i[t].content};tn.html_inline=function(i,t){return i[t].content};function wi(){this.rules=ow({},tn)}wi.prototype.renderAttrs=function(t){var n,l,c;if(!t.attrs)return"";for(c="",n=0,l=t.attrs.length;n<l;n++)c+=" "+$n(t.attrs[n][0])+'="'+$n(t.attrs[n][1])+'"';return c};wi.prototype.renderToken=function(t,n,l){var c,d="",a=!1,h=t[n];return h.hidden?"":(h.block&&h.nesting!==-1&&n&&t[n-1].hidden&&(d+=`
`),d+=(h.nesting===-1?"</":"<")+h.tag,d+=this.renderAttrs(h),h.nesting===0&&l.xhtmlOut&&(d+=" /"),h.block&&(a=!0,h.nesting===1&&n+1<t.length&&(c=t[n+1],(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===h.tag)&&(a=!1))),d+=a?`>
`:">",d)};wi.prototype.renderInline=function(i,t,n){for(var l,c="",d=this.rules,a=0,h=i.length;a<h;a++)l=i[a].type,typeof d[l]!="undefined"?c+=d[l](i,a,t,n,this):c+=this.renderToken(i,a,t);return c};wi.prototype.renderInlineAsText=function(i,t,n){for(var l="",c=0,d=i.length;c<d;c++)i[c].type==="text"?l+=i[c].content:i[c].type==="image"?l+=this.renderInlineAsText(i[c].children,t,n):i[c].type==="softbreak"&&(l+=`
`);return l};wi.prototype.render=function(i,t,n){var l,c,d,a="",h=this.rules;for(l=0,c=i.length;l<c;l++)d=i[l].type,d==="inline"?a+=this.renderInline(i[l].children,t,n):typeof h[d]!="undefined"?a+=h[i[l].type](i,l,t,n,this):a+=this.renderToken(i,l,t,n);return a};Hp.exports=wi});var Da=Me((a1,Gp)=>{"use strict";function Gr(){this.__rules__=[],this.__cache__=null}Gr.prototype.__find__=function(i){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===i)return t;return-1};Gr.prototype.__compile__=function(){var i=this,t=[""];i.__rules__.forEach(function(n){!n.enabled||n.alt.forEach(function(l){t.indexOf(l)<0&&t.push(l)})}),i.__cache__={},t.forEach(function(n){i.__cache__[n]=[],i.__rules__.forEach(function(l){!l.enabled||n&&l.alt.indexOf(n)<0||i.__cache__[n].push(l.fn)})})};Gr.prototype.at=function(i,t,n){var l=this.__find__(i),c=n||{};if(l===-1)throw new Error("Parser rule not found: "+i);this.__rules__[l].fn=t,this.__rules__[l].alt=c.alt||[],this.__cache__=null};Gr.prototype.before=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Gr.prototype.after=function(i,t,n,l){var c=this.__find__(i),d=l||{};if(c===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(c+1,0,{name:t,enabled:!0,fn:n,alt:d.alt||[]}),this.__cache__=null};Gr.prototype.push=function(i,t,n){var l=n||{};this.__rules__.push({name:i,enabled:!0,fn:t,alt:l.alt||[]}),this.__cache__=null};Gr.prototype.enable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!0,n.push(l)},this),this.__cache__=null,n};Gr.prototype.enableOnly=function(i,t){Array.isArray(i)||(i=[i]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(i,t)};Gr.prototype.disable=function(i,t){Array.isArray(i)||(i=[i]);var n=[];return i.forEach(function(l){var c=this.__find__(l);if(c<0){if(t)return;throw new Error("Rules manager: invalid rule name "+l)}this.__rules__[c].enabled=!1,n.push(l)},this),this.__cache__=null,n};Gr.prototype.getRules=function(i){return this.__cache__===null&&this.__compile__(),this.__cache__[i]||[]};Gp.exports=Gr});var Vp=Me((s1,Kp)=>{"use strict";var sw=/\r\n?|\n/g,lw=/\0/g;Kp.exports=function(t){var n;n=t.src.replace(sw,`
`),n=n.replace(lw,"\uFFFD"),t.src=n}});var Xp=Me((l1,Yp)=>{"use strict";Yp.exports=function(t){var n;t.inlineMode?(n=new t.Token("inline","",0),n.content=t.src,n.map=[0,1],n.children=[],t.tokens.push(n)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var Qp=Me((u1,Zp)=>{"use strict";Zp.exports=function(t){var n=t.tokens,l,c,d;for(c=0,d=n.length;c<d;c++)l=n[c],l.type==="inline"&&t.md.inline.parse(l.content,t.md,t.env,l.children)}});var em=Me((c1,Jp)=>{"use strict";var uw=Ft().arrayReplaceAt;function cw(i){return/^<a[>\s]/i.test(i)}function fw(i){return/^<\/a\s*>/i.test(i)}Jp.exports=function(t){var n,l,c,d,a,h,f,p,y,g,v,b,k,E,w,I,S=t.tokens,P;if(!!t.md.options.linkify){for(l=0,c=S.length;l<c;l++)if(!(S[l].type!=="inline"||!t.md.linkify.pretest(S[l].content)))for(d=S[l].children,k=0,n=d.length-1;n>=0;n--){if(h=d[n],h.type==="link_close"){for(n--;d[n].level!==h.level&&d[n].type!=="link_open";)n--;continue}if(h.type==="html_inline"&&(cw(h.content)&&k>0&&k--,fw(h.content)&&k++),!(k>0)&&h.type==="text"&&t.md.linkify.test(h.content)){for(y=h.content,P=t.md.linkify.match(y),f=[],b=h.level,v=0,p=0;p<P.length;p++)E=P[p].url,w=t.md.normalizeLink(E),!!t.md.validateLink(w)&&(I=P[p].text,P[p].schema?P[p].schema==="mailto:"&&!/^mailto:/i.test(I)?I=t.md.normalizeLinkText("mailto:"+I).replace(/^mailto:/,""):I=t.md.normalizeLinkText(I):I=t.md.normalizeLinkText("http://"+I).replace(/^http:\/\//,""),g=P[p].index,g>v&&(a=new t.Token("text","",0),a.content=y.slice(v,g),a.level=b,f.push(a)),a=new t.Token("link_open","a",1),a.attrs=[["href",w]],a.level=b++,a.markup="linkify",a.info="auto",f.push(a),a=new t.Token("text","",0),a.content=I,a.level=b,f.push(a),a=new t.Token("link_close","a",-1),a.level=--b,a.markup="linkify",a.info="auto",f.push(a),v=P[p].lastIndex);v<y.length&&(a=new t.Token("text","",0),a.content=y.slice(v),a.level=b,f.push(a)),S[l].children=d=uw(d,n,f)}}}}});var nm=Me((f1,rm)=>{"use strict";var tm=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,dw=/\((c|tm|r|p)\)/i,hw=/\((c|tm|r|p)\)/ig,pw={c:"\xA9",r:"\xAE",p:"\xA7",tm:"\u2122"};function mw(i,t){return pw[t.toLowerCase()]}function gw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&(n.content=n.content.replace(hw,mw)),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}function vw(i){var t,n,l=0;for(t=i.length-1;t>=0;t--)n=i[t],n.type==="text"&&!l&&tm.test(n.content)&&(n.content=n.content.replace(/\+-/g,"\xB1").replace(/\.{2,}/g,"\u2026").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1\u2014").replace(/(^|\s)--(?=\s|$)/mg,"$1\u2013").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1\u2013")),n.type==="link_open"&&n.info==="auto"&&l--,n.type==="link_close"&&n.info==="auto"&&l++}rm.exports=function(t){var n;if(!!t.md.options.typographer)for(n=t.tokens.length-1;n>=0;n--)t.tokens[n].type==="inline"&&(dw.test(t.tokens[n].content)&&gw(t.tokens[n].children),tm.test(t.tokens[n].content)&&vw(t.tokens[n].children))}});var cm=Me((d1,um)=>{"use strict";var im=Ft().isWhiteSpace,om=Ft().isPunctChar,am=Ft().isMdAsciiPunct,yw=/['"]/,sm=/['"]/g,lm="\u2019";function Ia(i,t,n){return i.substr(0,t)+n+i.substr(t+1)}function bw(i,t){var n,l,c,d,a,h,f,p,y,g,v,b,k,E,w,I,S,P,F,H,$;for(F=[],n=0;n<i.length;n++){for(l=i[n],f=i[n].level,S=F.length-1;S>=0&&!(F[S].level<=f);S--);if(F.length=S+1,l.type!=="text")continue;c=l.content,a=0,h=c.length;e:for(;a<h&&(sm.lastIndex=a,d=sm.exec(c),!!d);){if(w=I=!0,a=d.index+1,P=d[0]==="'",y=32,d.index-1>=0)y=c.charCodeAt(d.index-1);else for(S=n-1;S>=0&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S--)if(!!i[S].content){y=i[S].content.charCodeAt(i[S].content.length-1);break}if(g=32,a<h)g=c.charCodeAt(a);else for(S=n+1;S<i.length&&!(i[S].type==="softbreak"||i[S].type==="hardbreak");S++)if(!!i[S].content){g=i[S].content.charCodeAt(0);break}if(v=am(y)||om(String.fromCharCode(y)),b=am(g)||om(String.fromCharCode(g)),k=im(y),E=im(g),E?w=!1:b&&(k||v||(w=!1)),k?I=!1:v&&(E||b||(I=!1)),g===34&&d[0]==='"'&&y>=48&&y<=57&&(I=w=!1),w&&I&&(w=v,I=b),!w&&!I){P&&(l.content=Ia(l.co
`,a.map=[n,t.line],!0}});var _m=Me((y1,km)=>{"use strict";km.exports=function(t,n,l,c){var d,a,h,f,p,y,g,v=!1,b=t.bMarks[n]+t.tShift[n],k=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||b+3>k||(d=t.src.charCodeAt(b),d!==126&&d!==96)||(p=b,b=t.skipChars(b,d),a=b-p,a<3)||(g=t.src.slice(p,b),h=t.src.slice(b,k),d===96&&h.indexOf(String.fromCharCode(d))>=0))return!1;if(c)return!0;for(f=n;f++,!(f>=l||(b=p=t.bMarks[f]+t.tShift[f],k=t.eMarks[f],b<k&&t.sCount[f]<t.blkIndent));)if(t.src.charCodeAt(b)===d&&!(t.sCount[f]-t.blkIndent>=4)&&(b=t.skipChars(b,d),!(b-p<a)&&(b=t.skipSpaces(b),!(b<k)))){v=!0;break}return a=t.sCount[n],t.line=f+(v?1:0),y=t.push("fence","code",0),y.info=h,y.content=t.getLines(n+1,f,a,!0),y.markup=g,y.map=[n,t.line],!0}});var Cm=Me((b1,Em)=>{"use strict";var Sm=Ft().isSpace;Em.exports=function(t,n,l,c){var d,a,h,f,p,y,g,v,b,k,E,w,I,S,P,F,H,$,J,K,Y=t.lineMax,G=t.bMarks[n]+t.tShift[n],j=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||t.src.charCodeAt(G++)!==62)return!1;if(c)return!0;for(f=b=t.sCount[n]+1,t.src.charCodeAt(G)===32?(G++,f++,b++,d=!1,F=!0):t.src.charCodeAt(G)===9?(F=!0,(t.bsCount[n]+b)%4==3?(G++,f++,b++,d=!1):d=!0):F=!1,k=[t.bMarks[n]],t.bMarks[n]=G;G<j&&(a=t.src.charCodeAt(G),Sm(a));){a===9?b+=4-(b+t.bsCount[n]+(d?1:0))%4:b++;G++}for(E=[t.bsCount[n]],t.bsCount[n]=t.sCount[n]+1+(F?1:0),y=G>=j,S=[t.sCount[n]],t.sCount[n]=b-f,P=[t.tShift[n]],t.tShift[n]=G-t.bMarks[n],$=t.md.block.ruler.getRules("blockquote"),I=t.parentType,t.parentType="blockquote",v=n+1;v<l&&(K=t.sCount[v]<t.blkIndent,G=t.bMarks[v]+t.tShift[v],j=t.eMarks[v],!(G>=j));v++){if(t.src.charCodeAt(G++)===62&&!K){for(f=b=t.sCount[v]+1,t.src.charCodeAt(G)===32?(G++,f++,b++,d=!1,F=!0):t.src.charCodeAt(G)===9?(F=!0,(t.bsCount[v]+b)%4==3?(G++,f++,b++,d=!1):d=!0):F=!1,k.push(t.bMarks[v]),t.bMarks[v]=G;G<j&&(a=t.src.charCodeAt(G),Sm(a));){a===9?b+=4-(b+t.bsCount[v]+(d?1:0))%4:b++;G++}y=G>=j,E.push(t.bsCount[v]),t.bsCount[v]=t.sCount[v]+1+(F?1:0),S.push(t.sCount[v]),t.sCount[v]=b-f,P.push(t.tShift[v]),t.tShift[v]=G-t.bMarks[v];continue}if(y)break;for(H=!1,h=0,p=$.length;h<p;h++)if($[h](t,v,l,!0)){H=!0;break}if(H){t.lineMax=v,t.blkIndent!==0&&(k.push(t.bMarks[v]),E.push(t.bsCount[v]),P.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]-=t.blkIndent);break}k.push(t.bMarks[v]),E.push(t.bsCount[v]),P.push(t.tShift[v]),S.push(t.sCount[v]),t.sCount[v]=-1}for(w=t.blkIndent,t.blkIndent=0,J=t.push("blockquote_open","blockquote",1),J.markup=">",J.map=g=[n,0],t.md.block.tokenize(t,n,v),J=t.push("blockquote_close","blockquote",-1),J.markup=">",t.lineMax=Y,t.parentType=I,g[1]=t.line,h=0;h<P.length;h++)t.bMarks[h+n]=k[h],t.tShift[h+n]=P[h],t.sCount[h+n]=S[h],t.bsCount[h+n]=E[h];return t.blkIndent=w,!0}});var Am=Me((x1,Tm)=>{"use strict";var kw=Ft().isSpace;Tm.exports=function(t,n,l,c){var d,a,h,f,p=t.bMarks[n]+t.tShift[n],y=t.eMarks[n];if(t.sCount[n]-t.blkIndent>=4||(d=t.src.charCodeAt(p++),d!==42&&d!==45&&d!==95))return!1;for(a=1;p<y;){if(h=t.src.charCodeAt(p++),h!==d&&!kw(h))return!1;h===d&&a++}return a<3?!1:(c||(t.line=n+1,f=t.push("hr","hr",0),f.map=[n,t.line],f.markup=Array(a+1).join(String.fromCharCode(d))),!0)}});var Mm=Me((w1,Fm)=>{"use strict";var Lm=Ft().isSpace;function Dm(i,t){var n,l,c,d;return l=i.bMarks[t]+i.tShift[t],c=i.eMarks[t],n=i.src.charCodeAt(l++),n!==42&&n!==45&&n!==43||l<c&&(d=i.src.charCodeAt(l),!Lm(d))?-1:l}function Im(i,t){var n,l=i.bMarks[t]+i.tShift[t],c=l,d=i.eMarks[t];if(c+1>=d||(n=i.src.charCodeAt(c++),n<48||n>57))return-1;for(;;){if(c>=d)return-1;if(n=i.src.charCodeAt(c++),n>=48&&n<=57){if(c-l>=10)return-1;continue}if(n===41||n===46)break;return-1}return c<d&&(n=i.src.charCodeAt(c),!Lm(n))?-1:c}function _w(i,t){var n,l,c=i.level+2;for(n=t+2,l=i.tokens.length-2;n<l;n++)i.tokens[n].level===c&&i.tokens[n].type==="paragraph_open"&&(i.tokens[n+2].hidden=!0,i.tokens[n].hidden=!0,n+=2)}Fm.exports=function(t,n,l,c){var d,a,h,f,p,y,g,v,b,k,E,w,I,S,P,F,H,$,J,K,Y,G,j,z,C,U,Z,R,N=!1,ne=!0;if(t.sCount[n]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[n]-t.listIndent>=4&&t.sCount[n]<t.blkIndent)return!1;if(c&&t.parentType==="paragraph"&&t.tShift[n]>=t.blkIn
`);Zo("error",t)}}var Nc={emit:Zo,emitPublic:Fx,listen:Ix,success:i=>Zo("success",i),error:i=>Zo("error",i),showValidationErrors:Mx};async function Ox(i,t={}){return Bc(i,{method:"GET",params:t})}async function Px(i,t=null){return Qo("POST",i,t)}async function Rx(i,t=null){return Qo("PUT",i,t)}async function zx(i,t=null){return Qo("PATCH",i,t)}async function Nx(i,t=null){return Qo("DELETE",i,t)}async function Qo(i,t,n=null){let l={method:i,body:n};return typeof n=="object"&&!(n instanceof FormData)&&(l.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},l.body=JSON.stringify(n)),n instanceof FormData&&i!=="post"&&(n.append("_method",i),l.method="post"),Bc(t,l)}async function Bc(i,t={}){if(i.startsWith("http")||(i=window.baseUrl(i)),t.params){let a=new URL(i);for(let h of Object.keys(t.params)){let f=t.params[h];typeof f!="undefined"&&f!==null&&a.searchParams.set(h,f)}i=a.toString()}let n=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":n});let l=await fetch(i,t),d={data:await Bx(l),headers:l.headers,redirected:l.redirected,status:l.status,statusText:l.statusText,url:l.url,original:l};if(!l.ok)throw d;return d}async function Bx(i){if(i.status===204)return null;let n=(i.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return n==="javascript"||n==="json"?await i.json():await i.text()}var qc={get:Ox,post:Px,put:Rx,patch:zx,delete:Nx};var jc=class{constructor(t){this.store=new Map,this.parseTranslations()}parseTranslations(){let t=document.querySelectorAll('meta[name="translation"]');for(let n of t){let l=n.getAttribute("key"),c=n.getAttribute("value");this.store.set(l,c)}}get(t,n){let l=this.getTransText(t);return this.performReplacements(l,n)}getPlural(t,n,l){let c=this.getTransText(t);return this.parsePlural(c,n,l)}parsePlural(t,n,l){let c=t.split("|"),d=/^{([0-9]+)}/,a=/^\[([0-9]+),([0-9*]+)]/,h=null;for(let f of c){let p=f.match(d);if(p!==null&&Number(p[1])===n){h=f.replace(d,"").trim();break}let y=f.match(a);if(y!==null&&Number(y[1])<=n&&(y[2]==="*"||Number(y[2])>=n)){h=f.replace(a,"").trim();break}}return h===null&&c.length>1&&(h=n===1?c[0]:c[1]),h===null&&(h=c[0]),this.performReplacements(h,l)}getTransText(t){let n=this.store.get(t);return n===void 0&&console.warn(`Translation with key "${t}" does not exist`),n}performReplacements(t,n){if(!n)return t;let l=t.match(/:([\S]+)/g);return l===null||l.forEach(c=>{let d=c.substring(1);typeof n[d]!="undefined"&&(t=t.replace(c,n[d]))}),t}},$c=jc;function Jo(i,t){let n=document.querySelectorAll(i);for(let l of n)t(l)}function ea(i,t,n){for(let l of t)i.addEventListener(l,n)}function Rt(i,t){Array.isArray(i)||(i=[i]);for(let n of i)n.addEventListener("click",t),n.addEventListener("keydown",l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),t(l))})}function ta(i,t){Array.isArray(i)||(i=[i]);let n=l=>{l.key==="Enter"&&t(l)};i.forEach(l=>l.addEventListener("keypress",n))}function Ut(i,t,n,l){i.addEventListener(n,function(c){let d=c.target.closest(t);d&&l.call(d,c,d)})}function Uc(i,t){let n=document.querySelectorAll(i);t=t.toLowerCase();for(let l of n)if(l.textContent.toLowerCase().includes(t))return l;return null}function eo(i){i.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function Hc(i){let t=i.querySelectorAll(".loading-container");for(let n of t)n.remove()}function to(i,t,n){let l;return function(){let c=this,d=arguments,a=function(){l=null,n||i.apply(c,d)},h=n&&!l;clearTimeout(l),l=setTimeout(a,t),h&&i.apply(c,d)}}function ro(i){if(!i)return;i.scrollIntoView({behavior:"smooth"});let t=document.getElementById("custom-styles").getAttribute("data-color-light"),n=window.getComputedStyle(i).getPropertyValue("background-color");i.style.backgroundColor=t,setTimeout(()=>{i.classList.add("selectFade"),i.style.backgroundColor=n},10),setTimeout(()=>{i.classList.remove("selectFade"),i.style.backgroundColor=""},3e3)}function Wc(i){return i.replace(/&/g,"
`);let n=i.textContent.trimEnd(),l="";if(t!==null){let d=t.className.replace("language-","");l=ka(d,n)}let c=(0,jn.default)(function(d){i.parentNode.replaceChild(d,i)},{value:n,mode:l,lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});m0(c)}function m0(i){let 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>',n=document.createElement("div");n.classList.add("CodeMirror-copy"),n.innerHTML=t,i.display.wrapper.appendChild(n),new mh.default(n,{text:function(c){return i.getValue()}}).on("success",c=>{n.classList.add("success"),setTimeout(()=>{n.classList.remove("success")},240)})}function ka(i,t){i=i.trim().replace(/^\./g,"").toLowerCase();let n=typeof nl[i];return n==="undefined"?"":n==="function"?nl[i](t):nl[i]}function _a(){let i=document.documentElement.classList.contains("dark-mode");return window.codeTheme||(i?"darcula":"default")}function g0(i){let t=i.ownerDocument,n=i.querySelector("code"),l=vh(i.className||"");!l&&n&&(l=vh(n.className||"")),i.innerHTML=i.innerHTML.replace(/<br\s*[\/]?>/gi,`
`);let c=i.textContent,d=t.createElement("div"),a=t.createElement("textarea");d.className="CodeMirrorContainer",d.setAttribute("data-lang",l),d.setAttribute("dir","ltr"),a.style.display="none",i.parentNode.replaceChild(d,i),d.appendChild(a),d.contentEditable="false",a.textContent=c;let h=(0,jn.default)(function(f){d.appendChild(f)},{value:c,mode:ka(l,c),lineNumbers:!0,lineWrapping:!1,theme:_a(),readOnly:!0});return{wrap:d,editor:h}}function vh(i){return(i.split(" ").filter(n=>n.startsWith("language-"))[0]||"").replace("language-","")}function v0(i,t){let n=i.textContent;return(0,jn.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},{value:n,mode:ka(t,n),lineNumbers:!0,lineWrapping:!1,theme:_a()})}function y0(i,t,n){i.setOption("mode",ka(t,n))}function b0(i,t){i.setValue(t),setTimeout(()=>{yh(i)},10)}function yh(i){i.refresh()}function x0(i){let n={value:i.textContent,mode:"markdown",lineNumbers:!0,lineWrapping:!0,theme:_a(),scrollPastEnd:!0};return window.$events.emitPublic(i,"editor-markdown-cm::pre-init",{config:n}),(0,jn.default)(function(l){i.parentNode.insertBefore(l,i),i.style.display="none"},n)}function w0(){return jn.default.keyMap.default==jn.default.keyMap.macDefault?"Cmd":"Ctrl"}var sr={highlight:h0,highlightWithin:p0,wysiwygView:g0,popupEditor:v0,setMode:y0,setContent:b0,updateLayout:yh,markdownEditor:x0,getMetaKey:w0};var bh=class{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",t=>{t.ctrlKey&&t.key==="Enter"&&this.save()}),Rt(this.languageLinks,t=>{let n=t.target.dataset.lang;this.languageInput.value=n,this.updateEditorMode(n)}),ta(this.languageInput,t=>this.save()),Rt(this.saveButton,t=>this.save()),Ut(this.historyList,"button","click",(t,n)=>{t.preventDefault();let l=n.dataset.time;this.editor&&this.editor.setValue(this.history[l])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(t,n,l){this.languageInput.value=n,this.callback=l,this.show(),this.updateEditorMode(n),sr.setContent(this.editor,t)}show(){this.editor||(this.editor=sr.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{sr.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}updateEditorMode(t){sr.setMode(this.editor,t,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");let t=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",t.length===0),this.historyList.innerHTML=t.map(n=>{let l=new Date(parseInt(n)).toLocaleTimeString();return`<li><button type="button" data-time="${n}">${l}</button></li>`}).join("")}addHistory(){if(!this.editor)return;let t=this.editor.getValue();if(!t)return;let n=Object.keys(this.history).pop();if(this.history[n]===t)return;this.history[String(Date.now())]=t;let l=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,l)}},xh=bh;var wh=class{constructor(t){sr.highlightWithin(t)}},kh=wh;var _h=class{constructor(t){this.elem=t,this.trigger=t.querySelector("[collapsible-trigger]"),this.content=t.querySelector("[collapsible-content]"),!!this.trigger&&(this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError())}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),bi(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),yi(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){this.content.querySele
`).map(y=>y.indexOf(`drawio-diagram="${c}"`)!==-1?f:y).join(`
`);this.cm.setValue(p),this.cm.setCursor(l),this.cm.focus(),zr.close()}).catch(h=>{this.handleDrawingUploadError(h)})})}handleDrawingUploadError(t){t.status===413?window.$events.emit("error",this.serverUploadLimitText):window.$events.emit("error",this.imageUploadErrorText),console.log(t)}actionFullScreen(){let t=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(t){if(!t)return;let l=this.cm.getValue().split(/\r?\n/),c=l.findIndex(d=>d&&d.indexOf(t)!==-1);c!==-1&&(this.cm.scrollIntoView({line:c},200),this.cm.focus(),this.cm.setCursor({line:c,char:l[c].length}))}listenForBookStackEditorEvents(){function t({html:n,markdown:l}){return l||n}window.$events.listen("editor::replace",n=>{let l=t(n);this.cm.setValue(l)}),window.$events.listen("editor::append",n=>{let l=this.cm.getCursor("from"),c=t(n),d=this.cm.getValue()+`
`+c;this.cm.setValue(d),this.cm.setCursor(l.line,l.ch)}),window.$events.listen("editor::prepend",n=>{let l=this.cm.getCursor("from"),c=t(n),d=c+`
`+this.cm.getValue();this.cm.setValue(d);let a=c.split(`
`).length;this.cm.setCursor(l.line+a,l.ch)}),window.$events.listen("editor::insert",n=>{let l=t(n);this.cm.replaceSelection(l)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}},Sv=_v;var Ev=class{constructor(t){this.elem=t,this.inviteOption=t.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){let t=this.inviteOption.value==="true",n=this.elem.querySelectorAll("input[type=password]");for(let c of n)c.disabled=t;let l=this.elem.querySelector("#password-input-container");l&&(l.style.display=t?"none":"block")}},Cv=Ev;var Tv=class{constructor(t){this.elem=t,this.type=t.getAttribute("notification"),this.textElem=t.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,n=>{this.show(n)}),t.addEventListener("click",this.hide.bind(this)),t.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(t=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=t,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){let n=t.split(" ").length,l=Math.max(2e3,1e3+250*n);setTimeout(this.hide.bind(this),l)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}},Av=Tv;var Lv=class{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){Rt(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),Rt(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}},Dv=Lv;var Iv=class{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(t){let n=t.target.closest("[action]");if(t.target.matches('a[href^="#"]')){let d=t.target.href.split("#")[1];ro(document.querySelector("#"+d))}if(n===null)return;t.preventDefault();let l=n.getAttribute("action"),c=n.closest("[comment]");l==="edit"&&this.editComment(c),l==="closeUpdateForm"&&this.closeUpdateForm(),l==="delete"&&this.deleteComment(c),l==="addComment"&&this.showForm(),l==="hideForm"&&this.hideForm(),l==="reply"&&this.setReply(c),l==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){!this.editingComment||(this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none")}editComment(t){this.hideForm(),this.editingComment&&this.closeUpdateForm(),t.querySelector("[comment-content]").style.display="none",t.querySelector("[comment-edit-container]").style.display="block";let n=t.querySelector("[comment-edit-container] textarea"),l=n.value.split(`
`).length;n.style.height=l*20+40+"px",this.editingComment=t}updateComment(t){let n=t.target;t.preventDefault();let c={text:n.querySelector("textarea").value,parent_id:this.parentId||null};this.showLoading(n);let d=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${d}`,c).then(a=>{let h=document.createElement("div");h.innerHTML=a.data,this.editingComment.innerHTML=h.children[0].innerHTML,window.$events.success(this.updatedText),window.components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(n)})}deleteComment(t){let n=t.getAttribute("comment");this.showLoading(t.querySelector("[comment-content]")),window.$http.delete(`/comment/${n}`).then(l=>{t.parentNode.removeChild(t),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(t){t.preventDefault(),t.stopPropagation();let l={text:this.formInput.value,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,l).then(c=>{let d=document.createElement("div");d.innerHTML=c.data;let a=d.children[0];this.container.appendChild(a),window.components.init(a),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(c=>{window.$events.showValidationErrors(c),this.hideLoading(this.form)})}updateCount(){let t=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,t,{count:t})}resetForm(){this.formInput.value="",this.formContainer.appendChild(this.form),this.hideForm(),this.removeReplyTo(),this.hideLoading(this.form)}showForm(){this.formContainer.style.display="block",this.formContainer.parentNode.style.display="block",this.addButtonContainer.style.display="none",this.formInput.focus(),this.formInput.scrollIntoView({behavior:"smooth"})}hideForm(){this.formContainer.style.display="none",this.formContainer.parentNode.style.display="none",this.getCommentCount()>0?this.elem.appendChild(this.addButtonContainer):this.commentCountBar.appendChild(this.addButtonContainer),this.addButtonContainer.style.display="block"}getCommentCount(){return this.elem.querySelectorAll(".comment-box[comment]").length}setReply(t){this.showForm(),this.parentId=Number(t.getAttribute("local-id")),this.replyToRow.style.display="block";let n=this.replyToRow.querySelector("a");n.textContent=`#${this.parentId}`,n.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(t){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="none";t.querySelector(".form-group.loading").style.display="block"}hideLoading(t){let n=t.querySelectorAll(".form-group");for(let l of n)l.style.display="block";t.querySelector(".form-group.loading").style.display="none"}},Fv=Iv;var Mv=_t(Qs());var Ov=class{constructor(t){if(this.elem=t,this.pageId=t.getAttribute("page-display"),sr.highlight(),this.setupPointer(),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let l=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(l)}let n=document.querySelector(".sidebar-page-nav");n&&Ut(n,"a","click",(l,c)=>{l.preventDefault(),window.components["tri-layout"][0].showContent();let d=c.getAttribute("href").substr(1);this.goToText(d),window.history.pushState(null,null,"#"+d)})}goToText(t){let n=document.getElementById(t);if(Jo(".page-content [data-highlighted]",l=>{l.removeAttribute("data-highlighted"),l.style.backgroundColor=null}),n!==null)ro(n);else{let l=Uc(".page-content > div > *",t);l&&ro(l)}}setupPointer(){let t=document.getElementById("pointer");if(!t)return;t=t.parentNode.removeChild(t);let n=t.querySelector("div.pointer"),l=!1,c=!1,d=!0,a="";Ut(t,"input","click",(f,p)=>{p.select(),f.stopPropagation()}),ea(t,["click","focus"],f=>{f.stopPropagation()}),Ut(t,"span.icon","click",(f,p)=>{f.stopPropagation(),d=!d,p.querySelector('[data-icon="include"]').style.display=d?"none":"inline",p.querySelector('[data-icon="link"]').style.display=d?"inline"
<path d="M23 7V1h-6v2H7V1H1v6h2v10H1v6h6v-2h10v2h6v-6h-2V7h2zM3 3h2v2H3V3zm2 18H3v-2h2v2zm12-2H7v-2H5V7h2V5h10v2h2v10h-2v2zm4 2h-2v-2h2v2zM19 5V3h2v2h-2zm-5.27 9h-3.49l-.73 2H7.89l3.4-9h1.4l3.41 9h-1.63l-.74-2zm-3.04-1.26h2.61L12 8.91l-1.31 3.83z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>`)}`,cmd:"drawio",menu:[{text:"Drawing Manager",onclick(){let b=g.selection.getNode();h(g,a(b)?b:null)}}]}),g.on("dblclick",b=>{let k=g.selection.getNode();!a(k)||f(g,k)}),g.on("SetContent",function(){let b=g.$("body > div[drawio-diagram]");!b.length||g.undoManager.transact(function(){b.each((k,E)=>{E.setAttribute("contenteditable","false")})})})})}function t_(){window.tinymce.PluginManager.add("customhr",function(i){i.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),n=i.selection.getNode();n.parentNode.insertBefore(t,n)}),i.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),i.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})})}function r_(i){window.$events.listen("editor::replace",({html:t})=>{i.setContent(t)}),window.$events.listen("editor::append",({html:t})=>{let n=i.getContent()+t;i.setContent(n)}),window.$events.listen("editor::prepend",({html:t})=>{let n=t+i.getContent();i.setContent(n)}),window.$events.listen("editor::insert",({html:t})=>{i.insertContent(t)}),window.$events.listen("editor::focus",()=>{i.focus()})}var yy=class{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.serverUploadLimitText=this.$opts.serverUploadLimitText,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.plugins="image imagetools table textcolor paste link autolink fullscreen code customhr autosave lists codeeditor media",this.loadPlugins(),this.tinyMceConfig=this.getTinyMceConfig(),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig)}loadPlugins(){Jk(),t_();let t=document.querySelector("[drawio-url]");if(t){let n=t.getAttribute("drawio-url");e_(n,this.isDarkMode,this.pageId,this),this.plugins+=" drawio"}this.textDirection==="rtl"&&(this.plugins+=" directionality")}getToolBar(){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 ${this.textDirection==="rtl"?"ltr rtl":""} fullscreen`}getTinyMceConfig(){let t=this;return{selector:"#html-editor",content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:this.isDarkMode?"dark":"lightgray",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,directionality:this.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram]",automatic_uploads:!1,valid_children:"-div[p|h1|h2|h3|h4|h5|h6|blockquote],+div[pre],+div[img]",plugins:this.plugins,imagetools_toolbar:"imageoptions",toolbar:this.getToolBar(),content_style:`html, body, html.dark-mode {background: ${this.isDarkMode?"#222":"#fff"};} body {padding-left: 15px !important; padding-right: 15px !important; margin:0!important; margin-left:auto!important;margin-right:auto!important;}`,style_formats:[{title:"Header Large",format:"h2"},{title:"Header Medium",format:"h3"},{title:"Header Small",format:"h4"},{title:"Header Tiny",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Code Block",icon:"code",cmd:"codeeditor",format:"codeeditor"},{title:"Inline Code",icon:"code",inline:"code"},{title:"Callouts",items:[{title:"Info",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:{codeeditor:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div"},alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h
2019-08-31 21:16:14 +08:00
/*!
* clipboard.js v2.0.8
* https://clipboardjs.com/
*
2019-08-31 21:16:14 +08:00
* Licensed MIT © Zeno Rocha
*/
/**!
* Sortable 1.14.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
//# sourceMappingURL=app.js.map