2024-04-05 10:20:08 -04:00
var Nu = Object . create ; var Se = Object . defineProperty ; var zu = Object . getOwnPropertyDescriptor ; var Hu = Object . getOwnPropertyNames ; var Uu = Object . getPrototypeOf , ju = Object . prototype . hasOwnProperty ; var Vu = ( i , t , e ) => t in i ? Se ( i , t , { enumerable : ! 0 , configurable : ! 0 , writable : ! 0 , value : e } ) : i [ t ] = e ; var Wu = ( i , t ) => ( ) => ( i && ( t = i ( i = 0 ) ) , t ) ; var _ = ( i , t ) => ( ) => ( t || i ( ( t = { exports : { } } ) . exports , t ) , t . exports ) , Ae = ( i , t ) => { for ( var e in t ) Se ( i , e , { get : t [ e ] , enumerable : ! 0 } ) } , Ko = ( i , t , e , n ) => { if ( t && typeof t == "object" || typeof t == "function" ) for ( let r of Hu ( t ) ) ! ju . call ( i , r ) && r !== e && Se ( i , r , { get : ( ) => t [ r ] , enumerable : ! ( n = zu ( t , r ) ) || n . enumerable } ) ; return i } ; var Zo = ( i , t , e ) => ( e = i != null ? Nu ( Uu ( i ) ) : { } , Ko ( t || ! i || ! i . _ _esModule ? Se ( e , "default" , { value : i , enumerable : ! 0 } ) : e , i ) ) , Gu = i => Ko ( Se ( { } , "__esModule" , { value : ! 0 } ) , i ) ; var at = ( i , t , e ) => ( Vu ( i , typeof t != "symbol" ? t + "" : t , e ) , e ) , Ku = ( i , t , e ) => { if ( ! t . has ( i ) ) throw TypeError ( "Cannot " + e ) } ; var ot = ( i , t , e ) => { if ( t . has ( i ) ) throw TypeError ( "Cannot add the same private member more than once" ) ; t instanceof WeakSet ? t . add ( i ) : t . set ( i , e ) } ; var L = ( i , t , e ) => ( Ku ( i , t , "access private method" ) , e ) ; var Bs = _ ( ( Ob , Vh ) => { Vh . 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 : "\u255B" , boxUl : "\u255C" , boxUL : "\u255D" , boxur : "\u2514" , boxuR : "\u2558" , boxUr : "\u2559" , boxUR : "\u255A" , boxv : "\u2502" , boxV : "\u2551" , boxvh : "\u253C" , boxvH : "\u256A" , boxVh : "\u256B" , boxVH : "\u256C" , boxvl : "\u2524" , boxvL : "\u2561" , boxVl : "\u2562" , boxVL : "\u2563" , boxvr : "\u251C" , boxvR : "\u255E" , boxVr : "\u255F" , boxVR : "\u2560" , bprime : "\u2035" , breve : "\u02D8" , Breve : "\u02D8" , brvb
` ,nexist:" \u 2204",nexists:" \u 2204",Nfr:" \u {1D511}",nfr:" \u {1D52B}",ngE:" \u 2267 \u 0338",nge:" \u 2271",ngeq:" \u 2271",ngeqq:" \u 2267 \u 0338",ngeqslant:" \u 2A7E \u 0338",nges:" \u 2A7E \u 0338",nGg:" \u 22D9 \u 0338",ngsim:" \u 2275",nGt:" \u 226B \u 20D2",ngt:" \u 226F",ngtr:" \u 226F",nGtv:" \u 226B \u 0338",nharr:" \u 21AE",nhArr:" \u 21CE",nhpar:" \u 2AF2",ni:" \u 220B",nis:" \u 22FC",nisd:" \u 22FA",niv:" \u 220B",NJcy:" \u 040A",njcy:" \u 045A",nlarr:" \u 219A",nlArr:" \u 21CD",nldr:" \u 2025",nlE:" \u 2266 \u 0338",nle:" \u 2270",nleftarrow:" \u 219A",nLeftarrow:" \u 21CD",nleftrightarrow:" \u 21AE",nLeftrightarrow:" \u 21CE",nleq:" \u 2270",nleqq:" \u 2266 \u 0338",nleqslant:" \u 2A7D \u 0338",nles:" \u 2A7D \u 0338",nless:" \u 226E",nLl:" \u 22D8 \u 0338",nlsim:" \u 2274",nLt:" \u 226A \u 20D2",nlt:" \u 226E",nltri:" \u 22EA",nltrie:" \u 22EC",nLtv:" \u 226A \u 0338",nmid:" \u 2224",NoBreak:" \u 2060",NonBreakingSpace:" \x A0",nopf:" \u {1D55F}",Nopf:" \u 2115",Not:" \u 2AEC",not:" \x AC",NotCongruent:" \u 2262",NotCupCap:" \u 226D",NotDoubleVerticalBar:" \u 2226",NotElement:" \u 2209",NotEqual:" \u 2260",NotEqualTilde:" \u 2242 \u 0338",NotExists:" \u 2204",NotGreater:" \u 226F",NotGreaterEqual:" \u 2271",NotGreaterFullEqual:" \u 2267 \u 0338",NotGreaterGreater:" \u 226B \u 0338",NotGreaterLess:" \u 2279",NotGreaterSlantEqual:" \u 2A7E \u 0338",NotGreaterTilde:" \u 2275",NotHumpDownHump:" \u 224E \u 0338",NotHumpEqual:" \u 224F \u 0338",notin:" \u 2209",notindot:" \u 22F5 \u 0338",notinE:" \u 22F9 \u 0338",notinva:" \u 2209",notinvb:" \u 22F7",notinvc:" \u 22F6",NotLeftTriangleBar:" \u 29CF \u 0338",NotLeftTriangle:" \u 22EA",NotLeftTriangleEqual:" \u 22EC",NotLess:" \u 226E",NotLessEqual:" \u 2270",NotLessGreater:" \u 2278",NotLessLess:" \u 226A \u 0338",NotLessSlantEqual:" \u 2A7D \u 0338",NotLessTilde:" \u 2274",NotNestedGreaterGreater:" \u 2AA2 \u 0338",NotNestedLessLess:" \u 2AA1 \u 0338",notni:" \u 220C",notniva:" \u 220C",notnivb:" \u 22FE",notnivc:" \u 22FD",NotPrecedes:" \u 2280",NotPrecedesEqual:" \u 2AAF \u 0338",NotPrecedesSlantEqual:" \u 22E0",NotReverseElement:" \u 220C",NotRightTriangleBar:" \u 29D0 \u 0338",NotRightTriangle:" \u 22EB",NotRightTriangleEqual:" \u 22ED",NotSquareSubset:" \u 228F \u 0338",NotSquareSubsetEqual:" \u 22E2",NotSquareSuperset:" \u 2290 \u 0338",NotSquareSupersetEqual:" \u 22E3",NotSubset:" \u 2282 \u 20D2",NotSubsetEqual:" \u 2288",NotSucceeds:" \u 2281",NotSucceedsEqual:" \u 2AB0 \u 0338",NotSucceedsSlantEqual:" \u 22E1",NotSucceedsTilde:" \u 227F \u 0338",NotSuperset:" \u 2283 \u 20D2",NotSupersetEqual:" \u 2289",NotTilde:" \u 2241",NotTildeEqual:" \u 2244",NotTildeFullEqual:" \u 2247",NotTildeTilde:" \u 2249",NotVerticalBar:" \u 2224",nparallel:" \u 2226",npar:" \u 2226",nparsl:" \u 2AFD \u 20E5",npart:" \u 2202 \u 0338",npolint:" \u 2A14",npr:" \u 2280",nprcue:" \u 22E0",nprec:" \u 2280",npreceq:" \u 2AAF \u 0338",npre:" \u 2AAF \u 0338",nrarrc:" \u 2933 \u 0338",nrarr:" \u 219B",nrArr:" \u 21CF",nrarrw:" \u 219D \u 0338",nrightarrow:" \u 219B",nRightarrow:" \u 21CF",nrtri:" \u 22EB",nrtrie:" \u 22ED",nsc:" \u 2281",nsccue:" \u 22E1",nsce:" \u 2AB0 \u 0338",Nscr:" \u {1D4A9}",nscr:" \u {1D4C3}",nshortmid:" \u 2224",nshortparallel:" \u 2226",nsim:" \u 2241",nsime:" \u 2244",nsimeq:" \u 2244",nsmid:" \u 2224",nspar:" \u 2226",nsqsube:" \u 22E2",nsqsupe:" \u 22E3",nsub:" \u 2284",nsubE:" \u 2AC5 \u 0338",nsube:" \u 2288",nsubset:" \u 2282 \u 20D2",nsubseteq:" \u 2288",nsubseteqq:" \u 2AC5 \u 0338",nsucc:" \u 2281",nsucceq:" \u 2AB0 \u 0338",nsup:" \u 2285",nsupE:" \u 2AC6 \u 0338",nsupe:" \u 2289",nsupset:" \u 2283 \u 20D2",nsupseteq:" \u 2289",nsupseteqq:" \u 2AC6 \u 0338",ntgl:" \u 2279",Ntilde:" \x D1",ntilde:" \x F1",ntlg:" \u 2278",ntriangleleft:" \u 22EA",ntrianglelefteq:" \u 22EC",ntriangleright:" \u 22EB",ntrianglerighteq:" \u 22ED",Nu:" \u 039D",nu:" \u 03BD",num:"#",numero:" \u 2116",numsp:" \u 2007",nvap:" \u 224D \u 20D2",nvdash:" \u 22AC",nvDash:" \u 22AD",nVdash:" \u 22AE",nVDash:" \u 22AF",nvge:" \u 2265 \u 20D2",nvgt:"> \u 20D2",nvHarr:" \u 2904",nvinfin:" \u 29DE",nvlArr:" \u 2902",nvle:" \u 2264 \u 20D2",nvlt:"< \u 20D2",nvltrie:" \u 22B4 \u 20D2",nvrArr:" \u 2903",nvrtrie:" \u 22B5 \u 20D2",nvsim:" \u 223C \u 20D2",nwarhk:" \u 2923",nwarr:" \u 2196",nwArr:" \u 21D6",nwarrow:" \u 2196",nwnear:" \u 2927",Oacute:" \x D3",oacute:" \x F3",oast:" \u 229B",Ocirc:" \x D4",ocirc:" \x F4",ocir:" \u 229A",Ocy:" \u 041E",ocy:" \u 043E",odash:" \u 229D",Odblac:" \u 0150",odblac:" \u 0151",odiv:" \u 2A38",odot:" \u 2299",odsold:" \u 29BC",OElig:" \u 0152",oelig:" \u 01
` ," "],Jh=["{","}","|"," \\ ","^"," ` "].concat(Yh),Qh=[" '"].concat(Jh),Gs=["%","/","?",";","#"].concat(Qh),Ks=["/","?","#"],td=255,Zs=/^[+a-z0-9A-Z_-]{0,63}$/,ed=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Xs={javascript:!0,"javascript:":!0},Ys={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function id(i,t){if(i&&i instanceof cn)return i;var e=new cn;return e.parse(i,t),e}cn.prototype.parse=function(i,t){var e,n,r,o,s,a=i;if(a=a.trim(),!t&&i.split("#").length===1){var l=Xh.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Kh.exec(a);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(t||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s=a.substr(0,2)==="//",s&&!(c&&Xs[c])&&(a=a.substr(2),this.slashes=!0)),!Xs[c]&&(s||c&&!Ys[c])){var u=-1;for(e=0;e<Ks.length;e++)o=a.indexOf(Ks[e]),o!==-1&&(u===-1||o<u)&&(u=o);var h,d;for(u===-1?d=a.lastIndexOf("@"):d=a.lastIndexOf("@",u),d!==-1&&(h=a.slice(0,d),a=a.slice(d+1),this.auth=h),u=-1,e=0;e<Gs.length;e++)o=a.indexOf(Gs[e]),o!==-1&&(u===-1||o<u)&&(u=o);u===-1&&(u=a.length),a[u-1]===":"&&u--;var f=a.slice(0,u);a=a.slice(u),this.parseHost(f),this.hostname=this.hostname||"";var p=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!p){var m=this.hostname.split(/\./);for(e=0,n=m.length;e<n;e++){var w=m[e];if(w&&!w.match(Zs)){for(var v="",b=0,k=w.length;b<k;b++)w.charCodeAt(b)>127?v+="x":v+=w[b];if(!v.match(Zs)){var x=m.slice(0,e),E=m.slice(e+1),y=w.match(ed);y&&(x.push(y[1]),E.unshift(y[2])),E.length&&(a=E.join(".")+a),this.hostname=x.join(".");break}}}}this.hostname.length>td&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var S=a.indexOf("#");S!==-1&&(this.hash=a.substr(S),a=a.slice(0,S));var D=a.indexOf("?");return D!==-1&&(this.search=a.substr(D),a=a.slice(0,D)),a&&(this.pathname=a),Ys[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this};cn.prototype.parseHost=function(i){var t=Zh.exec(i);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),i=i.substr(0,i.length-t.length)),i&&(this.hostname=i)};Js.exports=id});var Xr=_((Vb,Ze)=>{"use strict";Ze.exports.encode=zs();Ze.exports.decode=js();Ze.exports.format=Ws();Ze.exports.parse=Qs()});var Yr=_((Wb,ta)=>{ta.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var Jr=_((Gb,ea)=>{ea.exports=/[\0-\x1F\x7F-\x9F]/});var na=_((Kb,ia)=>{ia.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 Qr=_((Zb,ra)=>{ra.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var oa=_(ge=>{"use strict";ge.Any=Yr();ge.Cc=Jr();ge.Cf=na();ge.P=sn();ge.Z=Qr()});var N=_(Q=>{"use strict";function nd(i){return Object.prototype.toString.call(i)}function rd(i){return nd(i)==="[object String]"}var od=Object.prototype.hasOwnProperty;function aa(i,t){return od.call(i,t)}function sd(i){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(e){if(e){if(typeof e!="object")throw new TypeError(e+"must be object");Object.keys(e).forEach(function(n){i[n]=e[n]})}}),i}function ad(i,t,e){return[].concat(i.slice(0,t),e,i.slice(t+1))}function la(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 ca(i){if(i>65535){i-=65536;var t=55296+(i>>10),e=56320+(i&1023);return String.fromCharCode(t,e)}return String.fromCharCode(i)}var ua=/\\([!"#$%&' ( ) * + , \ - . \ / : ; <= > ? @ [ \ \ \ ] ^ _ ` {|}~])/g,ld=/&([a-z#][a-z0-9]{1,31});/gi,cd=new RegExp(ua.source+"|"+ld.source,"gi"),ud=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8})) $ /i,sa=Zr();function hd(i,t){var e;return aa(sa,t)?sa[t]:t.charCodeAt(0)===35&&ud.test(t)&&(e=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10),la(e))?ca(e):i}function dd(i){return i.indexOf(" \\ ")<0?i:i.replace(ua," $ 1")}function pd(i){return i.indexOf(" \\ "
` };Dt.fence=function(i,t,e,n,r){var o=i[t],s=o.info?Ld(o.info).trim():"",a="",l="",c,u,h,d,f;return s&&(h=s.split(/( \s +)/g),a=h[0],l=h.slice(2).join("")),e.highlight?c=e.highlight(o.content,a,l)||Jt(o.content):c=Jt(o.content),c.indexOf("<pre")===0?c+ `
2023-10-30 08:14:53 -04:00
` :s?(u=o.attrIndex("class"),d=o.attrs?o.attrs.slice():[],u<0?d.push(["class",e.langPrefix+a]):(d[u]=d[u].slice(),d[u][1]+=" "+e.langPrefix+a),f={attrs:d},"<pre><code"+r.renderAttrs(f)+">"+c+ ` < / c o d e > < / p r e >
2023-05-03 06:05:33 -04:00
` ):"<pre><code"+r.renderAttrs(o)+">"+c+ ` < / c o d e > < / p r e >
2024-04-05 10:20:08 -04:00
` };Dt.image=function(i,t,e,n,r){var o=i[t];return o.attrs[o.attrIndex("alt")][1]=r.renderInlineAsText(o.children,e,n),r.renderToken(i,t,e)};Dt.hardbreak=function(i,t,e){return e.xhtmlOut? ` < br / >
2020-09-20 05:33:18 -04:00
` : ` < br >
2024-04-05 10:20:08 -04:00
` };Dt.softbreak=function(i,t,e){return e.breaks?e.xhtmlOut? ` < br / >
2020-09-20 05:33:18 -04:00
` : ` < br >
` : `
2024-04-05 10:20:08 -04:00
` };Dt.text=function(i,t){return Jt(i[t].content)};Dt.html_block=function(i,t){return i[t].content};Dt.html_inline=function(i,t){return i[t].content};function be(){this.rules=Dd({},Dt)}be.prototype.renderAttrs=function(t){var e,n,r;if(!t.attrs)return"";for(r="",e=0,n=t.attrs.length;e<n;e++)r+=" "+Jt(t.attrs[e][0])+'="'+Jt(t.attrs[e][1])+'"';return r};be.prototype.renderToken=function(t,e,n){var r,o="",s=!1,a=t[e];return a.hidden?"":(a.block&&a.nesting!==-1&&e&&t[e-1].hidden&&(o+= `
` ),o+=(a.nesting===-1?"</":"<")+a.tag,o+=this.renderAttrs(a),a.nesting===0&&n.xhtmlOut&&(o+=" /"),a.block&&(s=!0,a.nesting===1&&e+1<t.length&&(r=t[e+1],(r.type==="inline"||r.hidden||r.nesting===-1&&r.tag===a.tag)&&(s=!1))),o+=s? ` >
` :">",o)};be.prototype.renderInline=function(i,t,e){for(var n,r="",o=this.rules,s=0,a=i.length;s<a;s++)n=i[s].type,typeof o[n]<"u"?r+=o[n](i,s,t,e,this):r+=this.renderToken(i,s,t);return r};be.prototype.renderInlineAsText=function(i,t,e){for(var n="",r=0,o=i.length;r<o;r++)i[r].type==="text"?n+=i[r].content:i[r].type==="image"?n+=this.renderInlineAsText(i[r].children,t,e):i[r].type==="softbreak"&&(n+= `
` );return n};be.prototype.render=function(i,t,e){var n,r,o,s="",a=this.rules;for(n=0,r=i.length;n<r;n++)o=i[n].type,o==="inline"?s+=this.renderInline(i[n].children,t,e):typeof a[o]<"u"?s+=a[o](i,n,t,e,this):s+=this.renderToken(i,n,t,e);return s};wa.exports=be});var hn=_((nv,xa)=>{"use strict";function Ct(){this.__rules__=[],this.__cache__=null}Ct.prototype.__find__=function(i){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===i)return t;return-1};Ct.prototype.__compile__=function(){var i=this,t=[""];i.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),i.__cache__={},t.forEach(function(e){i.__cache__[e]=[],i.__rules__.forEach(function(n){n.enabled&&(e&&n.alt.indexOf(e)<0||i.__cache__[e].push(n.fn))})})};Ct.prototype.at=function(i,t,e){var n=this.__find__(i),r=e||{};if(n===-1)throw new Error("Parser rule not found: "+i);this.__rules__[n].fn=t,this.__rules__[n].alt=r.alt||[],this.__cache__=null};Ct.prototype.before=function(i,t,e,n){var r=this.__find__(i),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:e,alt:o.alt||[]}),this.__cache__=null};Ct.prototype.after=function(i,t,e,n){var r=this.__find__(i),o=n||{};if(r===-1)throw new Error("Parser rule not found: "+i);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:e,alt:o.alt||[]}),this.__cache__=null};Ct.prototype.push=function(i,t,e){var n=e||{};this.__rules__.push({name:i,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null};Ct.prototype.enable=function(i,t){Array.isArray(i)||(i=[i]);var e=[];return i.forEach(function(n){var r=this.__find__(n);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!0,e.push(n)},this),this.__cache__=null,e};Ct.prototype.enableOnly=function(i,t){Array.isArray(i)||(i=[i]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(i,t)};Ct.prototype.disable=function(i,t){Array.isArray(i)||(i=[i]);var e=[];return i.forEach(function(n){var r=this.__find__(n);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[r].enabled=!1,e.push(n)},this),this.__cache__=null,e};Ct.prototype.getRules=function(i){return this.__cache__===null&&this.__compile__(),this.__cache__[i]||[]};xa.exports=Ct});var Ca=_((rv,ka)=>{"use strict";var Td=/ \r \n ?| \n /g, $ d=/ \0 /g;ka.exports=function(t){var e;e=t.src.replace(Td, `
` ),e=e.replace( $ d," \u FFFD"),t.src=e}});var _a=_((ov,Ea)=>{"use strict";Ea.exports=function(t){var e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}});var Aa=_((sv,Sa)=>{"use strict";Sa.exports=function(t){var e=t.tokens,n,r,o;for(r=0,o=e.length;r<o;r++)n=e[r],n.type==="inline"&&t.md.inline.parse(n.content,t.md,t.env,n.children)}});var La=_((av,Da)=>{"use strict";var Id=N().arrayReplaceAt;function Md(i){return/^<a[> \s ]/i.test(i)}function Fd(i){return/^< \/ a \s *>/i.test(i)}Da.exports=function(t){var e,n,r,o,s,a,l,c,u,h,d,f,p,m,w,v,b=t.tokens,k;if(t.md.options.linkify){for(n=0,r=b.length;n<r;n++)if(!(b[n].type!=="inline"||!t.md.linkify.pretest(b[n].content)))for(o=b[n].children,p=0,e=o.length-1;e>=0;e--){if(a=o[e],a.type==="link_close"){for(e--;o[e].level!==a.level&&o[e].type!=="link_open";)e--;continue}if(a.type==="html_inline"&&(Md(a.content)&&p>0&&p--,Fd(a.content)&&p++),!(p>0)&&a.type==="text"&&t.md.linkify.test(a.content)){for(u=a.content,k=t.md.linkify.match(u),l=[],f=a.level,d=0,k.length>0&&k[0].index===0&&e>0&&o[e-1].type==="text_special"&&(k=k.slice(1)),c=0;c<k.length;c++)m=k[c].url,w=t.md.normalizeLink(m),t.md.validateLink(w)&&(v=k[c].text,k[c].schema?k[c].schema==="mailto:"&&!/^mailto:/i.test(v)?v=t.md.normalizeLinkText("mailto:"+v).replace(/^mailto:/,""):v=t.md.normalizeLinkText(v):v=t.md.normalizeLinkText("http://"+v).replace(/^http: \/ \/ /,""),h=k[c].index,h>d&&(s=new t.Token("text","",0),s.content=u.slice(d,h),s.level=f,l.push(s)),s=new t.Token("link_open","a",1),s.attrs=[["href",w]],s.level=f++,s.markup="linkify",s.info="auto",l.push(s),s=new t.Token("text","",0),s.content=v,s.level=f,l.push(s),s=new t.Token("link_close","a",-1),s.level=--f,s.markup="linkify",s.info="auto",l.push(s),d=k[c].lastIndex);d<u.length&&(s=new t.Token("text","",0),s.content=u.slice(d),s.level=f,l.push(s)),b[n].children=o=Id(o,e,l)}}}}});var Ia=_((lv, $ a)=>{"use strict";var Ta=/ \+ -| \. \. | \? \? \? \? |!!!!|,,|--/,qd=/ \( (c|tm|r) \) /i,Bd=/ \( (c|tm|r) \) /ig,Pd={c:" \x A9",r:" \x AE",tm:" \u 2122"};function Od(i,t){return Pd[t.toLowerCase()]}function Rd(i){var t,e,n=0;for(t=i.length-1;t>=0;t--)e=i[t],e.type==="text"&&!n&&(e.content=e.content.replace(Bd,Od)),e.type==="link_open"&&e.info==="auto"&&n--,e.type==="link_close"&&e.info==="auto"&&n++}function Nd(i){var t,e,n=0;for(t=i.length-1;t>=0;t--)e=i[t],e.type==="text"&&!n&&Ta.test(e.content)&&(e.content=e.content.replace(/ \+ -/g," \x B1").replace(/ \. {2,}/g," \u 2026").replace(/([?!])…/g," $ 1..").replace(/([?!]){4,}/g," $ 1 $ 1 $ 1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]| $ )/mg," $ 1 \u 2014").replace(/(^| \s )--(?= \s | $ )/mg," $ 1 \u 2013").replace(/(^|[^- \s ])--(?=[^- \s ]| $ )/mg," $ 1 \u 2013")),e.type==="link_open"&&e.info==="auto"&&n--,e.type==="link_close"&&e.info==="auto"&&n++} $ a.exports=function(t){var e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(qd.test(t.tokens[e].content)&&Rd(t.tokens[e].children),Ta.test(t.tokens[e].content)&&Nd(t.tokens[e].children))}});var Ra=_((cv,Oa)=>{"use strict";var Ma=N().isWhiteSpace,Fa=N().isPunctChar,qa=N().isMdAsciiPunct,zd=/['"]/,Ba=/['"]/g,Pa=" \u 2019";function dn(i,t,e){return i.slice(0,t)+e+i.slice(t+1)}function Hd(i,t){var e,n,r,o,s,a,l,c,u,h,d,f,p,m,w,v,b,k,x,E,y;for(x=[],e=0;e<i.length;e++){for(n=i[e],l=i[e].level,b=x.length-1;b>=0&&!(x[b].level<=l);b--);if(x.length=b+1,n.type==="text"){r=n.content,s=0,a=r.length;t:for(;s<a&&(Ba.lastIndex=s,o=Ba.exec(r),!!o);){if(w=v=!0,s=o.index+1,k=o[0]==="'",u=32,o.index-1>=0)u=r.charCodeAt(o.index-1);else for(b=e-1;b>=0&&!(i[b].type==="softbreak"||i[b].type==="hardbreak");b--)if(i[b].content){u=i[b].content.charCodeAt(i[b].content.length-1);break}if(h=32,s<a)h=r.charCodeAt(s);else for(b=e+1;b<i.length&&!(i[b].type==="softbreak"||i[b].type==="hardbreak");b++)if(i[b].content){h=i[b].content.charCodeAt(0);break}if(d=qa(u)||Fa(String.fromCharCode(u)),f=qa(h)||Fa(String.fromCharCode(h)),p=Ma(u),m=Ma(h),m?w=!1:f&&(p||d||(w=!1)),p?v=!1:d&&(m||f||(v=!1)),h===34&&o[0]==='"'&&u>=48&&u<=57&&(v=w=!1),w&&v&&(w=
` ,s.map=[e,t.line],!0}});var tl=_((gv,Qa)=>{"use strict";Qa.exports=function(t,e,n,r){var o,s,a,l,c,u,h,d=!1,f=t.bMarks[e]+t.tShift[e],p=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||f+3>p||(o=t.src.charCodeAt(f),o!==126&&o!==96)||(c=f,f=t.skipChars(f,o),s=f-c,s<3)||(h=t.src.slice(c,f),a=t.src.slice(f,p),o===96&&a.indexOf(String.fromCharCode(o))>=0))return!1;if(r)return!0;for(l=e;l++,!(l>=n||(f=c=t.bMarks[l]+t.tShift[l],p=t.eMarks[l],f<p&&t.sCount[l]<t.blkIndent));)if(t.src.charCodeAt(f)===o&&!(t.sCount[l]-t.blkIndent>=4)&&(f=t.skipChars(f,o),!(f-c<s)&&(f=t.skipSpaces(f),!(f<p)))){d=!0;break}return s=t.sCount[e],t.line=l+(d?1:0),u=t.push("fence","code",0),u.info=a,u.content=t.getLines(e+1,l,s,!0),u.markup=h,u.map=[e,t.line],!0}});var il=_((bv,el)=>{"use strict";var Vd=N().isSpace;el.exports=function(t,e,n,r){var o,s,a,l,c,u,h,d,f,p,m,w,v,b,k,x,E,y,S,D,M=t.lineMax,T=t.bMarks[e]+t.tShift[e],P=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(T)!==62)return!1;if(r)return!0;for(p=[],m=[],b=[],k=[],y=t.md.block.ruler.getRules("blockquote"),v=t.parentType,t.parentType="blockquote",d=e;d<n&&(D=t.sCount[d]<t.blkIndent,T=t.bMarks[d]+t.tShift[d],P=t.eMarks[d],!(T>=P));d++){if(t.src.charCodeAt(T++)===62&&!D){for(l=t.sCount[d]+1,t.src.charCodeAt(T)===32?(T++,l++,o=!1,x=!0):t.src.charCodeAt(T)===9?(x=!0,(t.bsCount[d]+l)%4===3?(T++,l++,o=!1):o=!0):x=!1,f=l,p.push(t.bMarks[d]),t.bMarks[d]=T;T<P&&(s=t.src.charCodeAt(T),Vd(s));){s===9?f+=4-(f+t.bsCount[d]+(o?1:0))%4:f++;T++}u=T>=P,m.push(t.bsCount[d]),t.bsCount[d]=t.sCount[d]+1+(x?1:0),b.push(t.sCount[d]),t.sCount[d]=f-l,k.push(t.tShift[d]),t.tShift[d]=T-t.bMarks[d];continue}if(u)break;for(E=!1,a=0,c=y.length;a<c;a++)if(y[a](t,d,n,!0)){E=!0;break}if(E){t.lineMax=d,t.blkIndent!==0&&(p.push(t.bMarks[d]),m.push(t.bsCount[d]),k.push(t.tShift[d]),b.push(t.sCount[d]),t.sCount[d]-=t.blkIndent);break}p.push(t.bMarks[d]),m.push(t.bsCount[d]),k.push(t.tShift[d]),b.push(t.sCount[d]),t.sCount[d]=-1}for(w=t.blkIndent,t.blkIndent=0,S=t.push("blockquote_open","blockquote",1),S.markup=">",S.map=h=[e,0],t.md.block.tokenize(t,e,d),S=t.push("blockquote_close","blockquote",-1),S.markup=">",t.lineMax=M,t.parentType=v,h[1]=t.line,a=0;a<k.length;a++)t.bMarks[a+e]=p[a],t.tShift[a+e]=k[a],t.sCount[a+e]=b[a],t.bsCount[a+e]=m[a];return t.blkIndent=w,!0}});var rl=_((vv,nl)=>{"use strict";var Wd=N().isSpace;nl.exports=function(t,e,n,r){var o,s,a,l,c=t.bMarks[e]+t.tShift[e],u=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||(o=t.src.charCodeAt(c++),o!==42&&o!==45&&o!==95))return!1;for(s=1;c<u;){if(a=t.src.charCodeAt(c++),a!==o&&!Wd(a))return!1;a===o&&s++}return s<3?!1:(r||(t.line=e+1,l=t.push("hr","hr",0),l.map=[e,t.line],l.markup=Array(s+1).join(String.fromCharCode(o))),!0)}});var cl=_((wv,ll)=>{"use strict";var al=N().isSpace;function ol(i,t){var e,n,r,o;return n=i.bMarks[t]+i.tShift[t],r=i.eMarks[t],e=i.src.charCodeAt(n++),e!==42&&e!==45&&e!==43||n<r&&(o=i.src.charCodeAt(n),!al(o))?-1:n}function sl(i,t){var e,n=i.bMarks[t]+i.tShift[t],r=n,o=i.eMarks[t];if(r+1>=o||(e=i.src.charCodeAt(r++),e<48||e>57))return-1;for(;;){if(r>=o)return-1;if(e=i.src.charCodeAt(r++),e>=48&&e<=57){if(r-n>=10)return-1;continue}if(e===41||e===46)break;return-1}return r<o&&(e=i.src.charCodeAt(r),!al(e))?-1:r}function Gd(i,t){var e,n,r=i.level+2;for(e=t+2,n=i.tokens.length-2;e<n;e++)i.tokens[e].level===r&&i.tokens[e].type==="paragraph_open"&&(i.tokens[e+2].hidden=!0,i.tokens[e].hidden=!0,e+=2)}ll.exports=function(t,e,n,r){var o,s,a,l,c,u,h,d,f,p,m,w,v,b,k,x,E,y,S,D,M,T,P,H,U,et,W, $ =e,Ot=!1,Rt=!0;if(t.sCount[ $ ]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[ $ ]-t.listIndent>=4&&t.sCount[ $ ]<t.blkIndent)return!1;if(r&&t.parentType==="paragraph"&&t.sCount[ $ ]>=t.blkIndent&&(Ot=!0),(T=sl(t, $ ))>=0){if(h=!0,H=t.bMarks[ $ ]+t.tShift[ $ ],v=Number(t.src.slice(H,T-1)),Ot&&v!==1)return!1}else if((T=ol(t, $ ))>=0)h=!1;else return!1;if(Ot&&t.skipSpaces(T)>=t.eMarks[ $ ])return!1;if(r)return!0;for(w=t.src.charCodeAt(T-1),m=t.tokens.length,h?(W=t.push("ordered_list_open","ol",1),v!==1&&(W.attrs=[["start",v]])):W=t.push("bullet_list_open","ul",1),W.map=p=[ $ ,0],W.markup=S
` );fr(t)}}function th(i){i.status&&i.status>=400&&i.data&&i.data.message&&fr(i.data.message)}var gr={};Ae(gr,{HttpError:()=>si,createXMLHttpRequest:()=>ih,delete:()=>ah,get:()=>nh,patch:()=>sh,post:()=>rh,put:()=>oh});async function eh(i){if(i.status===204)return null;let e=(i.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return e==="javascript"||e==="json"?i.json():i.text()}var si=class extends Error{constructor(t,e){super(t.statusText),this.data=e,this.headers=t.headers,this.redirected=t.redirected,this.status=t.status,this.statusText=t.statusText,this.url=t.url,this.original=t}};function ih(i,t,e={}){let n=document.querySelector("meta[name=token]").getAttribute("content"),r=new XMLHttpRequest;for(let[o,s]of Object.entries(e))r.addEventListener(o,s.bind(r));return r.open(i,t),r.withCredentials=!0,r.setRequestHeader("X-CSRF-TOKEN",n),r}async function Xo(i,t={}){let e=i;if(e.startsWith("http")||(e=window.baseUrl(e)),t.params){let l=new URL(e);for(let c of Object.keys(t.params)){let u=t.params[c];typeof u<"u"&&u!==null&&l.searchParams.set(c,u)}e=l.toString()}let n=document.querySelector("meta[name=token]").getAttribute("content"),r={...t,credentials:"same-origin"};r.headers={...r.headers||{},baseURL:window.baseUrl(""),"X-CSRF-TOKEN":n};let o=await fetch(e,r),s=await eh(o),a={data:s,headers:o.headers,redirected:o.redirected,status:o.status,statusText:o.statusText,url:o.url,original:o};if(!o.ok)throw new si(o,s);return a}async function ai(i,t,e=null){let n={method:i,body:e};return typeof e=="object"&&!(e instanceof FormData)&&(n.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},n.body=JSON.stringify(e)),e instanceof FormData&&i!=="post"&&(e.append("_method",i),n.method="post"),Xo(t,n)}async function nh(i,t={}){return Xo(i,{method:"GET",params:t})}async function rh(i,t=null){return ai("POST",i,t)}async function oh(i,t=null){return ai("PUT",i,t)}async function sh(i,t=null){return ai("PATCH",i,t)}async function ah(i,t=null){return ai("DELETE",i,t)}var br=class{constructor(){this.store=new Map,this.parseTranslations()}parseTranslations(){let t=document.querySelectorAll('meta[name="translation"]');for(let e of t){let n=e.getAttribute("key"),r=e.getAttribute("value");this.store.set(n,r)}}get(t,e){let n=this.getTransText(t);return this.performReplacements(n,e)}getPlural(t,e,n){let r=this.getTransText(t);return this.parsePlural(r,e,n)}parsePlural(t,e,n){let r=t.split("|"),o=/^{([0-9]+)}/,s=/^ \[ ([0-9]+),([0-9*]+)]/,a=null;for(let l of r){let c=l.match(o);if(c!==null&&Number(c[1])===e){a=l.replace(o,"").trim();break}let u=l.match(s);if(u!==null&&Number(u[1])<=e&&(u[2]==="*"||Number(u[2])>=e)){a=l.replace(s,"").trim();break}}return a===null&&r.length>1&&(a=e===1?r[0]:r[1]),a===null&&(a=r[0]),this.performReplacements(a,n)}getTransText(t){let e=this.store.get(t);return e===void 0&&console.warn( ` Translation with key "${t}" does not exist ` ),e}performReplacements(t,e){if(!e)return t;let n=t.match(/:( \S +)/g);if(n===null)return t;let r=t;return n.forEach(o=>{let s=o.substring(1);typeof e[s]>"u"||(r=r.replace(o,e[s]))}),r}},Yo=br;var kr={};Ae(kr,{first:()=>hh,firstOnElement:()=>ph,get:()=>dh,init:()=>yr,register:()=>xr});function vr(i){let t=n=>n.slice(0,1).toUpperCase()+n.slice(1),e=i.split("-");return e[0]+e.slice(1).map(t).join("")}function Jo(i){return i.replace(/[A-Z]/g,(t,e)=>(e>0?"-":"")+t.toLowerCase())}var De={},Qo={},wr=new WeakMap;function lh(i,t){let e={},n={},r= ` $ { i } @ ` ,o= ` [ refs *= "${r}" ] ` ,s=[...t.querySelectorAll(o)];t.matches(o)&&s.push(t);for(let a of s){let l=a.getAttribute("refs").split(" ").filter(c=>c.startsWith(r)).map(c=>c.replace(r,"")).map(vr);for(let c of l)e[c]=a,typeof n[c]>"u"&&(n[c]=[]),n[c].push(a)}return{refs:e,manyRefs:n}}function ch(i,t){let e={},n= ` option : $ { i } : ` ;for(let{name:r,value:o}of t.attributes)if(r.startsWith(n)){let s=r.replace(n,"");e[vr(s)]=o||""}return e}function uh(i,t){let e=Qo[i];if(e===void 0)return;let n;try{n=new e,n. $ name=i,n. $ el=t;let o=lh(i,t);n. $ refs=o.refs,n. $ manyRefs=o.manyRefs,n. $ opts=ch(i,t),n.setup()}catch(o){console.error("Failed to cre
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}var kh="1.15.2";function It(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Mt=It(/(?:Trident.*rv[ :]?11 \. |msie|iemobile|Windows Phone)/i),Ve=It(/Edge/i),as=It(/firefox/i),Ne=It(/safari/i)&&!It(/chrome/i)&&!It(/android/i),bs=It(/iP(ad|od|hone)/i),vs=It(/chrome/i)&&It(/android/i),ws={capture:!1,passive:!1};function O(i,t,e){i.addEventListener(t,e,!Mt&&ws)}function B(i,t,e){i.removeEventListener(t,e,!Mt&&ws)}function Di(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function Ch(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function bt(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&Di(i,t):Di(i,t))||n&&i===e)return i;if(i===e)break}while(i=Ch(i))}return null}var ls=/ \s +/g;function Y(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(ls," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(ls," ")}}function A(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function Xt(i,t){var e="";if(typeof i=="string")e=i;else do{var n=A(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function ys(i,t,e){if(i){var n=i.getElementsByTagName(t),r=0,o=n.length;if(e)for(;r<o;r++)e(n[r],r);return n}return[]}function St(){var i=document.scrollingElement;return i||document.documentElement}function j(i,t,e,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,s,a,l,c,u,h;if(i!==window&&i.parentNode&&i!==St()?(o=i.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,c=o.right,u=o.height,h=o.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,h=window.innerWidth),(t||e)&&i!==window&&(r=r||i.parentNode,!Mt))do if(r&&r.getBoundingClientRect&&(A(r,"transform")!=="none"||e&&A(r,"position")!=="static")){var d=r.getBoundingClientRect();s-=d.top+parseInt(A(r,"border-top-width")),a-=d.left+parseInt(A(r,"border-left-width")),l=s+o.height,c=a+o.width;break}while(r=r.parentNode);if(n&&i!==window){var f=Xt(r||i),p=f&&f.a,m=f&&f.d;f&&(s/=m,a/=p,h/=p,u/=m,l=s+u,c=a+h)}return{top:s,left:a,bottom:l,right:c,width:h,height:u}}}function cs(i,t,e){for(var n=jt(i,!0),r=j(i)[t];n;){var o=j(n)[e],s=void 0;if(e==="top"||e==="left"?s=r>=o:s=r<=o,!s)return n;if(n===St())break;n=jt(n,!1)}return!1}function pe(i,t,e,n){for(var r=0,o=0,s=i.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==I.ghost&&(n||s[o]!==I.dragged)&&bt(s[o],e.draggable,i,!1)){if(r===t)return s[o];r++}o++}return null}function jr(i,t){for(var e=i.lastElementChild;e&&(e===I.ghost||A(e,"display")==="none"||t&&!Di(e,t));)e=e.previousElementSibling;return e||null}function J(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==I.clone&&(!t||Di(i,t))&&e++;return e}function us(i){var t=0,e=0,n=St();if(i)do{var r=Xt(i),o=r.a,s=r.d;t+=i.scrollLeft*o,e+=i.scrollTop*s}while(i!==n&&(i=i.parentNode));return[t,e]}function Eh(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function jt(i,t){if(!i||!i.getBoundingClientRect)return St();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=A(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return St();if(n||t)return e;n=!0}}while(e=e.parentNode);re
2023-05-03 06:05:33 -04:00
` ).map(u=>u.indexOf( ` drawio - diagram = "${r}" ` )!==-1?l:u).join( `
2024-04-05 10:20:08 -04:00
` );L(this,ke,Ln).call(this,c,n),ee()}catch(a){throw this.handleDrawingUploadError(a),new Error( ` Failed to save image with error : $ { a } ` )}})}handleDrawingUploadError(t){t.status===413?window. $ events.emit("error",this.editor.config.text.serverUploadLimit):window. $ events.emit("error",this.editor.config.text.imageUploadError),console.error(t)}fullScreen(){let{container:t}=this.editor.config,e=t.classList.contains("fullscreen");t.classList.toggle("fullscreen",!e),document.body.classList.toggle("markdown-fullscreen",!e)}scrollToText(t){if(!t)return;let e=this.editor.cm.state.doc,n=1,r=-1;for(let s of e.iterLines()){if(s.includes(t)){r=n;break}n+=1}if(r===-1)return;let o=e.line(r);L(this,In,eu).call(this,o.from,o.to,!0),this.focus()}focus(){this.editor.cm.hasFocus||this.editor.cm.focus()}insertContent(t){L(this,Pt,ie).call(this,t,t.length)}prependContent(t){t=L(this,ni,Ho).call(this,t);let n=L(this,rt,ht).call(this).from+t.length+1;L(this,dt,wt).call(this,0,0, ` $ { t }
` ,n),this.focus()}appendContent(t){t=L(this,ni,Ho).call(this,t),L(this,dt,wt).call(this,this.editor.cm.state.doc.length, `
$ { t } ` ),this.focus()}replaceContent(t){L(this,ke,Ln).call(this,t)}replaceLineStart(t){let e=L(this,rt,ht).call(this),n=this.editor.cm.state.doc.lineAt(e.from),r=n.text,o=r.split(" ")[0];if(o===t){let c=r.replace( ` $ { t } ` ,""),u=e.from+(c.length-r.length);L(this,dt,wt).call(this,n.from,n.to,c,u);return}let s=r;/^[#> ` ] / . test ( o ) ? s = r . replace ( o , t ) . trim ( ) : t !== "" && ( s = ` ${ t } ${ r } ` ) ; let l = e . from + ( s . length - r . length ) ; L ( this , dt , wt ) . call ( this , n . from , n . to , s , l ) } wrapSelection ( t , e ) { let n = L ( this , rt , ht ) . call ( this ) , r = L ( this , Wt , ye ) . call ( this , n ) ; if ( ! r ) { L ( this , Ce , Tn ) . call ( this , t , e ) ; return } let o = r , s ; r . startsWith ( t ) && r . endsWith ( e ) ? ( o = r . slice ( t . length , r . length - e . length ) , s = n . extend ( n . from , n . to - ( t . length + e . length ) ) ) : ( o = ` ${ t } ${ r } ${ e } ` , s = n . extend ( n . from , n . to + ( t . length + e . length ) ) ) , L ( this , dt , wt ) . call ( this , n . from , n . to , o , s . anchor , s . head ) } replaceLineStartForOrderedList ( ) { let t = L ( this , rt , ht ) . call ( this ) , e = this . editor . cm . state . doc . lineAt ( t . from ) , r = this . editor . cm . state . doc . line ( e . number - 1 ) . text . match ( /^(\s*)(\d)([).])\s/ ) || [ ] , o = ( Number ( r [ 2 ] ) || 0 ) + 1 , s = r [ 1 ] || "" , a = r [ 3 ] || "." , l = ` ${ s } ${ o } ${ a } ` ; return this . replaceLineStart ( l ) } cycleCalloutTypeAtSelection ( ) { let t = L ( this , rt , ht ) . call ( this ) , e = this . editor . cm . state . doc . lineAt ( t . from ) , n = [ "info" , "success" , "warning" , "danger" ] , r = n . join ( "|" ) , s = new RegExp ( ` class="(( ${ r } ) \\ s+callout|callout \\ s+( ${ r } ))" ` , "i" ) . exec ( e . text ) , a = ( s ? s [ 2 ] || s [ 3 ] : "" ) . toLowerCase ( ) ; if ( a === n [ n . length - 1 ] ) L ( this , Ce , Tn ) . call ( this , ` <p class="callout ${ n [ n . length - 1 ] } "> ` , "</p>" ) ; else if ( a === "" ) L ( this , Ce , Tn ) . call ( this , '<p class="callout info">' , "</p>" ) ; else { let l = n . indexOf ( a ) + 1 , c = n [ l ] , u = e . text . replace ( s [ 0 ] , s [ 0 ] . replace ( a , c ) ) , h = u . length - e . text . length ; L ( this , dt , wt ) . call ( this , e . from , e . to , u , t . anchor + h , t . head + h ) } } syncDisplayPosition ( t ) { let e = t . target ; if ( Math . abs ( e . scrollHeight - e . clientHeight - e . scrollTop ) < 1 ) { this . editor . display . scrollToIndex ( - 1 ) ; return } let r = this . editor . cm . lineBlockAtHeight ( e . scrollTop ) , o = this . editor . cm . state . sliceDoc ( 0 , r . from ) , l = new DOMParser ( ) . parseFromString ( this . editor . markdown . render ( o ) , "text/html" ) . documentElement . querySelectorAll ( "body > *" ) ; this . editor . display . scrollToIndex ( l . length ) } async insertTemplate ( t , e , n ) { let r = this . editor . cm . posAtCoords ( { x : e , y : n } , ! 1 ) , { data : o } = await window . $http . get ( ` /templates/ ${ t } ` ) , s = o . markdown || o . html ; L ( this , dt , wt ) . call ( this , r , r , s , r ) } insertClipboardImages ( t , e , n ) { let r = this . editor . cm . posAtCoords ( { x : e , y : n } , ! 1 ) ; for ( let o of t ) this . uploadImage ( o , r ) } async uploadImage ( t , e = null ) { if ( t === null || t . type . indexOf ( "image" ) !== 0 ) return ; let n = "png" ; if ( e === null && ( e = L ( this , rt , ht ) . call ( this ) . from ) , t . name ) { let c = t . name . match ( /\.(.+)$/ ) ; c . length > 1 && ( n = c [ 1 ] ) } let r = ` image- ${ Math . random ( ) . toString ( 16 ) . slice ( 2 ) } ` , s = ` ![]( ${ window . baseUrl ( ` /loading.gif#upload ${ r } ` ) } ) ` ; L ( this , dt , wt ) . call ( this , e , e , s , e ) ; let a = ` image- ${ Date . now ( ) } . ${ n } ` , l = new FormData ; l . append ( "file" , t , a ) , l . append ( "uploaded_to" , this . editor . config . pageId ) ; try { let { data : c } = await window . $http . post ( "/images/gallery" , l ) , u = ` [![]( ${ c . thumbs . display } )]( ${ c . url } ) ` ; L ( this , ri , Uo ) . call ( this , s , u ) } catch ( c ) { window . $events . error ( c ? . data ? . message || this . editor . config . text . imageUploadError ) , L ( this , ri , Uo ) . call ( this , s , "" ) , console . error ( c ) } } } ; ii = new WeakSet , zo = function ( t , e ) { let n = ` <div drawio-diagram=" ${ t . id } "><img src=" ${ t . url } "></div> ` ; L ( this , Pt , ie ) . call ( this , n , n . length , e ) } , xe = new WeakSet , Dn = function ( ) { return this . editor . cm . state . doc . toString ( ) } , ke = new WeakSet , Ln = function ( t , e = null ) { e = e || L ( this , rt , ht ) . call ( this ) ; let n = this . editor . cm . state . toText ( t ) , r = Math . min ( e . from , n . length ) ; L ( this , dt , wt ) . call ( this , 0 , this . editor . cm . state . doc . length , t , r ) , this . focus ( ) } , Pt = new WeakSet , ie = function ( t , e = 0 , n = null ) { n = n || this . editor . cm . state . selection . main ; let r = n . from + e ; L ( this , dt , wt ) . call ( this , n . from , n . to , t , r ) , this . focus ( ) } , Wt = new WeakSet , ye = function ( t = null ) { return t = t || L ( this , rt , ht ) . call ( this ) , this . editor . cm . state . sliceDoc ( t . from , t . to ) } , rt = new WeakSet , ht = function ( ) { return this . editor . cm . state . selection . main } , ni = new WeakSet , Ho = function ( t ) { return t . replace ( /\r\n|\r/g , `
` )},ri=new WeakSet,Uo=function(t,e){let n=L(this,xe,Dn).call(this).replace(t,e);L(this,ke,Ln).call(this,n)},Ce=new WeakSet,Tn=function(t,e){let n=L(this,rt,ht).call(this),r=this.editor.cm.state.doc.lineAt(n.from),o=r.text,s,a=0;o.startsWith(t)&&o.endsWith(e)?(s=o.slice(t.length,o.length-e.length),a=-t.length):(s= ` $ { t } $ { o } $ { e } ` ,a=t.length),L(this,dt,wt).call(this,r.from,r.to,s,n.from+a)},dt=new WeakSet,wt=function(t,e=null,n=null,r=null,o=null){let s={changes:{from:t,to:e,insert:n}};r&&(s.selection={anchor:r},o&&(s.selection.head=o)),this.editor.cm.dispatch(s)},In=new WeakSet,eu=function(t,e,n=!1){this.editor.cm.dispatch({selection:{anchor:t,head:e},scrollIntoView:n})};var Mn=class{constructor(t){this.settingMap={scrollSync:!0,showPreview:!0,editorWidth:50},this.changeListeners={},this.loadFromLocalStorage(),this.applyToInputs(t),this.listenToInputChanges(t)}applyToInputs(t){for(let e of t){let n=e.getAttribute("name").replace("md-","");e.checked=this.settingMap[n]}}listenToInputChanges(t){for(let e of t)e.addEventListener("change",()=>{let n=e.getAttribute("name").replace("md-","");this.set(n,e.checked)})}loadFromLocalStorage(){let t=window.localStorage.getItem("md-editor-settings");if(!t)return;let e=JSON.parse(t);for(let[n,r]of Object.entries(e))r!==null&&this.settingMap[n]!==void 0&&(this.settingMap[n]=r)}set(t,e){this.settingMap[t]=e,window.localStorage.setItem("md-editor-settings",JSON.stringify(this.settingMap));for(let n of this.changeListeners[t]||[])n(e)}get(t){return this.settingMap[t]||null}onChange(t,e){let n=this.changeListeners[t]||[];n.push(e),this.changeListeners[t]=n}};function Fn({html:i,markdown:t}){return t||i}function iu(i){window. $ events.listen("editor::replace",t=>{let e=Fn(t);i.actions.replaceContent(e)}),window. $ events.listen("editor::append",t=>{let e=Fn(t);i.actions.appendContent(e)}),window. $ events.listen("editor::prepend",t=>{let e=Fn(t);i.actions.prependContent(e)}),window. $ events.listen("editor::insert",t=>{let e=Fn(t);i.actions.insertContent(e)}),window. $ events.listen("editor::focus",()=>{i.actions.focus()})}function Gf(i){let t={};return t["Shift-Mod-i"]=()=>i.actions.insertImage(),t["Mod-s"]=()=>window. $ events.emit("editor-save-draft"),t["Mod-Enter"]=()=>window. $ events.emit("editor-save-page"),t["Shift-Mod-k"]=()=>i.actions.showLinkSelector(),t["Mod-k"]=()=>i.actions.insertLink(),t["Mod-1"]=()=>i.actions.replaceLineStart("##"),t["Mod-2"]=()=>i.actions.replaceLineStart("###"),t["Mod-3"]=()=>i.actions.replaceLineStart("####"),t["Mod-4"]=()=>i.actions.replaceLineStart("#####"),t["Mod-5"]=()=>i.actions.replaceLineStart(""),t["Mod-d"]=()=>i.actions.replaceLineStart(""),t["Mod-6"]=()=>i.actions.replaceLineStart(">"),t["Mod-q"]=()=>i.actions.replaceLineStart(">"),t["Mod-7"]=()=>i.actions.wrapSelection(" \n ` ` ` \ n "," \ n ` ` ` "),t["Mod-8"]=()=>i.actions.wrapSelection(" ` "," ` "),t["Shift-Mod-e"]=()=>i.actions.wrapSelection(" ` "," ` "),t["Mod-9"]=()=>i.actions.cycleCalloutTypeAtSelection(),t["Mod-p"]=()=>i.actions.replaceLineStart("-"),t["Mod-o"]=()=>i.actions.replaceLineStartForOrderedList(),t}function nu(i){let t=Gf(i),e=[],n=r=>()=>(r(),!0);for(let[r,o]of Object.entries(t))e.push({key:r,run:n(o),preventDefault:!0});return e}async function ru(i){let t=await window.importVersioned("code");function e(a){a.docChanged&&i.actions.updateAndRender()}let n=Nt(i.actions.syncDisplayPosition.bind(i.actions),100,!1),r=i.settings.get("scrollSync");i.settings.onChange("scrollSync",a=>{r=a});let o={scroll:a=>r&&n(a),drop:a=>{let l=a.dataTransfer.getData("bookstack/template");l&&(a.preventDefault(),i.actions.insertTemplate(l,a.pageX,a.pageY));let u=new Ft(a.dataTransfer).getImages();u.length>0&&(a.stopPropagation(),a.preventDefault(),i.actions.insertClipboardImages(u,a.pageX,a.pageY))},paste:a=>{let l=new Ft(a.clipboardData||a.dataTransfer);if(!l.hasItems()||l.containsTabularData())return;let c=l.getImages();for(let u of c)i.actions.uploadImage(u)}},s=t.markdownEditor(i.config.inputEl,e,o,nu(i));return window.mdEditorView=s,s}async function ou(i){let t={config:i,markdown:new yn,settings:new Mn(i.settingInputs)};return t.ac
` ,e.replace(n)}})}function rm(i){i.parser.addNodeFilter("div",t=>{for(let e of t){let n=e.attr("id")||"",r=e.attr("class")||"";(n==="pointer"||r.includes("pointer"))&&e.remove()}})}function fu(i){nm(i),rm(i)}function mu(i){return i.tagName.toLowerCase()==="code-block"}function bu(i,t,e,n){let r=window. $ components.first("code-editor"),o=i.selection.getBookmark();r.open(t,e,(s,a)=>{n(s,a),i.focus(),i.selection.moveToBookmark(o)},()=>{i.focus(),i.selection.moveToBookmark(o)})}function gu(i,t){bu(i,t.getContent(),t.getLanguage(),(e,n)=>{t.setContent(e,n)})}function om(i){let t=i.getDoc(),e=t.defaultView;class n extends e.HTMLElement{constructor(){super();at(this,"editor",null);this.attachShadow({mode:"open"});let s=document.head.querySelectorAll('link[rel="stylesheet"]:not([media="print"]),style'),a=Array.from(s).map(c=>c.cloneNode(!0)),l=document.createElement("div");l.style.pointerEvents="none",l.contentEditable="false",l.classList.add("CodeMirrorContainer"),l.classList.toggle("dark-mode",document.documentElement.classList.contains("dark-mode")),this.shadowRoot.append(...a,l)}getLanguage(){let s=c=>(c.split(" ").filter(h=>h.startsWith("language-"))[0]||"").replace("language-",""),a=this.querySelector("code"),l=this.querySelector("pre");return s(l.className)||a&&s(a.className)||""}setContent(s,a){this.editor&&(this.editor.setContent(s),this.editor.setMode(a,s));let l=this.querySelector("pre");l||(l=t.createElement("pre"),this.append(l)),l.innerHTML="";let c=t.createElement("code");l.append(c),c.innerText=s,c.className= ` language - $ { a } ` }getContent(){let s=this.querySelector("code")||this.querySelector("pre"),a=document.createElement("pre");a.innerHTML=s.innerHTML.replace(/ \u feff/g,"");let l=a.querySelectorAll("br");for(let c of l)c.replaceWith( `
2023-05-03 06:05:33 -04:00
` );return a.textContent}connectedCallback(){let s=Date.now();if(this.editor)return;this.cleanChildContent();let a=this.getContent(),c=a.split( `
2024-04-05 10:20:08 -04:00
` ).length*19.2+18+24;this.style.height= ` $ { c } px ` ;let u=this.shadowRoot.querySelector(".CodeMirrorContainer"),h=d=>{this.editor=d.wysiwygView(u,this.shadowRoot,a,this.getLanguage()),setTimeout(()=>{this.style.height=null},12)};window.importVersioned("code").then(d=>{let f=Date.now()-s<20?20:0;setTimeout(()=>h(d),f)})}cleanChildContent(){let s=this.querySelector("pre");if(s)for(let a of s.childNodes)a.nodeName==="#text"&&a.textContent===" \u FEFF"&&a.remove()}}e.customElements.define("code-block",n)}function sm(i){i.ui.registry.addIcon("codeblock",'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5Z"/><path d="M11.103 15.423c.277.277.277.738 0 .922a.692.692 0 0 1-1.106 0l-4.057-3.78a.738.738 0 0 1 0-1.107l4.057-3.872c.276-.277.83-.277 1.106 0a.724.724 0 0 1 0 1.014L7.6 12.012ZM12.897 8.577c-.245-.312-.2-.675.08-.955.28-.281.727-.27 1.027.033l4.057 3.78a.738.738 0 0 1 0 1.107l-4.057 3.872c-.277.277-.83.277-1.107 0a.724.724 0 0 1 0-1.014l3.504-3.412z"/></svg>'),i.ui.registry.addButton("codeeditor",{tooltip:"Insert code block",icon:"codeblock",onAction(){i.execCommand("codeeditor")}}),i.ui.registry.addButton("editcodeeditor",{tooltip:"Edit code block",icon:"edit-block",onAction(){i.execCommand("codeeditor")}}),i.addCommand("codeeditor",()=>{let t=i.selection.getNode(),e=t.ownerDocument;if(mu(t))gu(i,t);else{let n=i.selection.getContent({format:"text"});bu(i,n,"",(r,o)=>{let s=e.createElement("pre"),a=e.createElement("code");a.classList.add( ` language - $ { o } ` ),a.innerText=r,s.append(a),i.insertContent(s.outerHTML)})}}),i.on("dblclick",()=>{let t=i.selection.getNode();mu(t)&&gu(i,t)}),i.on("PreInit",()=>{i.parser.addNodeFilter("pre",t=>{for(let e of t){let n=window.tinymce.html.Node.create("code-block",{contenteditable:"false"}),r=e.attr("dir");r&&n.attr("dir",r);let o=e.getAll("span");for(let s of o)s.unwrap();e.attr("style",null),e.wrap(n)}}),i.parser.addNodeFilter("code-block",t=>{for(let e of t)e.attr("contenteditable","false")}),i.serializer.addNodeFilter("code-block",t=>{for(let e of t){let n=e.attr("dir");n&&e.firstChild?e.firstChild.attr("dir",n):e.firstChild&&e.firstChild.attr("dir",null),e.unwrap()}})}),i.ui.registry.addContextToolbar("codeeditor",{predicate(t){return t.nodeName.toLowerCase()==="code-block"},items:"editcodeeditor",position:"node",scope:"node"}),i.on("PreInit",()=>{om(i)})}function vu(){return sm}var pt=null,oe=null,re={};function jo(i){return i.hasAttribute("drawio-diagram")}function am(i,t=null){pt=i,oe=t,window. $ components.first("image-manager").show(n=>{if(t){let r=t.querySelector("img");pt.undoManager.transact(()=>{pt.dom.setAttrib(r,"src",n.url),pt.dom.setAttrib(t,"drawio-diagram",n.id)})}else{let r= ` < div drawio - diagram = "${n.id}" contenteditable = "false" > < img src = "${n.url}" > < / d i v > ` ; p t . i n s e r t C o n t e n t ( r ) } } , " d r a w i o " ) } a s y n c f u n c t i o n l m ( i ) { l e t t = w i n d o w . b a s e U r l ( " / l o a d i n g . g i f " ) , e = o = > { o . s t a t u s = = = 4 1 3 ? w i n d o w . $ e v e n t s . e m i t ( " e r r o r " , r e . t r a n s l a t i o n s . s e r v e r U p l o a d L i m i t T e x t ) : w i n d o w . $ e v e n t s . e m i t ( " e r r o r " , r e . t r a n s l a t i o n s . i m a g e U p l o a d E r r o r T e x t ) , c o n s o l e . e r r o r ( o ) } ; i f ( o e ) { e e ( ) ; l e t o = o e . q u e r y S e l e c t o r ( " i m g " ) ; t r y { l e t s = a w a i t N o ( i , r e . p a g e I d ) ; p t . u n d o M a n a g e r . t r a n s a c t ( ( ) = > { p t . d o m . s e t A t t r i b ( o , " s r c " , s . u r l ) , p t . d o m . s e t A t t r i b ( o e , " d r a w i o - d i a g r a m " , s . i d ) } ) } c a t c h ( s ) { t h r o w e ( s ) , n e w E r r o r ( ` F a i l e d t o s a v e i m a g e w i t h e r r o r : $ { s } ` ) } r e t u r n } a w a i t o s ( 5 ) ; l e t n = ` d r a w i n g - $ { M a t h . r a n d o m ( ) . t o S t r i n g ( 1 6 ) . s l i c e ( 2 ) } ` , r = ` d r a w i n g - w r a p - $ { M a t h . r a n d o m ( ) . t o S t r i n g ( 1 6 ) . s l i c e ( 2 ) } ` ; p t . i n s e r t C o n t e n t ( ` < d i v d r a w i o - d i a g r a m c o n t e n t e d i t a b l e = " f a l s e " i d = " $ { r } " > < i m g s r c = " $ { t } " i d = " $ { n } " > < / d i v > ` ) , e e ( ) ; t r y { l e t o = a w a i t N o ( i , r e . p a g e I d ) ; p t . u n d o M a n a g e r . t r a n s a c t ( ( ) = > { p t . d o m . s e t A t t r i b ( n , " s r c " , o . u r l ) , p t . d o m . s e t A t t r i b ( r , " d r a w i o - d i a g r a m " , o . i d ) } ) } c a t c h ( o ) { t h r o w p t . d o m . r e m o v e ( r ) , e ( o ) , n e w E r r o r ( ` F a i l e d t o s a v e i m a g e w i t h e r r o r : $ { o } ` ) } } f u n c t i o n c m ( ) { i f ( ! o e ) r e t u r n P r o m i s e . r e s o l v e ( " " ) ; l e t i = o e . g e t A t t r i b u t e ( " d r a w i o - d i a g r a m " ) ; r e t u r n A n ( i ) } f u n c t i o n w u ( i , t = n u l l ) { p t = i , o e = t , e i ( r e . d r a w i o U r l , c m , l m ) } f u n c t i o n u m ( i ) { i . a d d C o m m a n d ( " d r a w i o " , ( ) = > { l e t t = i . s e l e c t i o n . g e t N o d e ( ) ; w u ( i , j o ( t ) ? t : n u l l ) } ) , i . u i . r e g i s t r y . a d d I c o n ( " d i a g r a m " , ` < s v g w i d t h = " 2 4 "
` ),e=t.findIndex(s=>s.trim()==="<!-- Start: custom user content -->"),n=t.findIndex(s=>s.trim()==="<!-- End: custom user content -->");if(e===-1||n===-1)return;let r=t.slice(e+1,n).join( `
` ),o=i.createElement("div");o.innerHTML=r,i.head.append(...o.children)}function $ m(i){return function(e){function n(){i.darkMode&&e.contentDocument.documentElement.classList.add("dark-mode"),window. $ events.emit("editor-html-change","")}e.on("ExecCommand change input NodeChange ObjectResized",n),au(e),uu(e,i),e.on("init",()=>{n(),lu(e),window.editor=e,su(e)}),e.on("PreInit",()=>{fu(e)}),Lu(e), $ u(e),Iu(e),window. $ events.emitPublic(i.containerElement,"editor-tinymce::setup",{editor:e}),e.ui.registry.addButton("inlinecode",{tooltip:"Inline code",icon:"sourcecode",onAction(){e.execCommand("mceToggleFormat",!1,"code")}})}}function qu(i){return `
2022-02-26 07:01:44 -05:00
html , body , html . dark - mode {
2024-04-05 10:20:08 -04:00
background : $ { i . darkMode ? "#222" : "#fff" } ;
2022-02-26 07:01:44 -05:00
}
body {
padding - left : 15 px ! important ;
padding - right : 15 px ! important ;
height : initial ! important ;
margin : 0 ! important ;
margin - left : auto ! important ;
margin - right : auto ! important ;
overflow - y : hidden ! important ;
} ` .trim().replace( `
2024-04-05 10:20:08 -04:00
` ,"")}function Bu(i){return window.tinymce.addI18n(i.language,i.translationMap),{width:"100%",height:"100%",selector:"#html-editor",cache_suffix: ` ? version = $ { document . querySelector ( 'script[src*="/dist/app.js"]' ) . getAttribute ( "src" ) . split ( "?version=" ) [ 1 ] } ` ,content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:i.darkMode?"tinymce-5-dark":"tinymce-5",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,language:i.language,directionality:i.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,remove_trailing_brs:!1,statusbar:!1,menubar:!1,paste_data_images:!1,extended_valid_elements:"pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked|style]",automatic_uploads:!1,custom_elements:"doc-root,code-block",valid_children:["-div[p|h1|h2|h3|h4|h5|h6|blockquote|code-block]","+div[pre|img]","-doc-root[doc-root|#text]","-li[details]","+code-block[pre]","+doc-root[p|h1|h2|h3|h4|h5|h6|blockquote|code-block|div|hr]"].join(","),plugins:Tm(i),contextmenu:!1,toolbar:hu(i),content_style:qu(i),style_formats:Am,style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:Dm,table_style_by_css:!0,table_use_colgroups:!0,file_picker_types:"file image",color_map:Lm,file_picker_callback:Mu,paste_preprocess(e,n){let{content:r}=n;r.indexOf('<img src="file://')!==-1&&(n.content="")},init_instance_callback(e){Fu(e.getDoc())},setup(e){pu(e),du(e), $ m(i)(e)}}}function Ee(i){window.tinymce.addI18n(i.language,i.translationMap);let t=document.querySelector('script[src*="/dist/app.js"]').getAttribute("src").split("?version=")[1];return{width:"100%",height:"185px",target:i.containerElement,cache_suffix: ` ? version = $ { t } ` ,content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:i.darkMode?"tinymce-5-dark":"tinymce-5",body_class:"wysiwyg-input",browser_spellcheck:!0,relative_urls:!1,language:i.language,directionality:i.textDirection,remove_script_host:!1,document_base_url:window.baseUrl("/"),end_container_on_empty_block:!0,remove_trailing_brs:!1,statusbar:!1,menubar:!1,plugins:"link autolink lists",contextmenu:!1,toolbar:"bold italic link bullist numlist",content_style:qu(i),file_picker_types:"file",valid_elements:"p,a[href|title|target],ol,ul,li,strong,em,br",file_picker_callback:Mu,init_instance_callback(e){Fu(e.getDoc()),e.contentDocument.documentElement.classList.toggle("dark-mode",i.darkMode)}}}var zn=class extends g{setup(){this.commentId=this. $ opts.commentId,this.commentLocalId=this. $ opts.commentLocalId,this.commentParentId=this. $ opts.commentParentId,this.deletedText=this. $ opts.deletedText,this.updatedText=this. $ opts.updatedText,this.wysiwygEditor=null,this.wysiwygLanguage=this. $ opts.wysiwygLanguage,this.wysiwygTextDirection=this. $ opts.wysiwygTextDirection,this.container=this. $ el,this.contentContainer=this. $ refs.contentContainer,this.form=this. $ refs.form,this.formCancel=this. $ refs.formCancel,this.editButton=this. $ refs.editButton,this.deleteButton=this. $ refs.deleteButton,this.replyButton=this. $ refs.replyButton,this.input=this. $ refs.input,this.setupListeners()}setupListeners(){this.replyButton&&this.replyButton.addEventListener("click",()=>this. $ emit("reply",{id:this.commentLocalId,element:this.container})),this.editButton&&(this.editButton.addEventListener("click",this.startEdit.bind(this)),this.form.addEventListener("submit",this.update.bind(this)),this.formCancel.addEventListener("click",()=>this.toggleEditMode(!1))),this.deleteButton&&this.deleteButton.addEventListener("click",this.delete.bind(this))}toggleEditMode(t){this.contentContainer.toggleAttribute("hidden",t),this.form.toggleAttribute("hidden",!t)}startEdit(){if(this.toggleEditMode(!0),this.wysiwygEditor){this.wysiwygEditor.focus();return}let t=Ee({language:this.wysiwygLanguage,containerElement:this.input,darkMode:document.documentElement.classList.contains("dark-mode"),textDirection:this.wysiwygTextDirection,translations:{},translationMap:window.editor_translations});window.tinymce.init(t).then(e=>{this.wysiwygEditor=e[0],setTimeout(()=>this.wysiwygEditor.focus(),50)})}async update
2023-01-31 06:59:51 -05:00
/ * ! B u n d l e d l i c e n s e i n f o r m a t i o n :
sortablejs / modular / sortable . esm . js :
( * * !
2024-04-05 10:20:08 -04:00
* Sortable 1.15 . 2
2023-01-31 06:59:51 -05:00
* @ author RubaXa < trash @ rubaxa . org >
* @ author owenm < owen23355 @ gmail . com >
* @ license MIT
* )
* /
2020-09-20 05:33:18 -04:00
//# sourceMappingURL=app.js.map