BookStack/public/dist/app.js

70 lines
408 KiB
JavaScript
Raw Normal View History

var Td=Object.create;var $r=Object.defineProperty;var Id=Object.getOwnPropertyDescriptor;var Dd=Object.getOwnPropertyNames;var Ld=Object.getPrototypeOf,Fd=Object.prototype.hasOwnProperty;var Rd=(r,e,t)=>e in r?$r(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Od=(r,e)=>()=>(r&&(e=r(r=0)),e);var ne=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),bo=(r,e)=>{for(var t in e)$r(r,t,{get:e[t],enumerable:!0})},Vs=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Dd(e))!Fd.call(r,o)&&o!==t&&$r(r,o,{get:()=>e[o],enumerable:!(n=Id(e,o))||n.enumerable});return r};var gn=(r,e,t)=>(t=r!=null?Td(Ld(r)):{},Vs(e||!r||!r.__esModule?$r(t,"default",{value:r,enumerable:!0}):t,r)),Pd=r=>Vs($r({},"__esModule",{value:!0}),r);var xr=(r,e,t)=>(Rd(r,typeof e!="symbol"?e+"":e,t),t),Md=(r,e,t)=>{if(!e.has(r))throw TypeError("Cannot "+t)};var xo=(r,e,t)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,t)};var _r=(r,e,t)=>(Md(r,e,"access private method"),t);var Da=ne((oi,Zo)=>{(function(e,t){if(typeof oi=="object"&&typeof Zo=="object")Zo.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var n=t();for(var o in n)(typeof oi=="object"?oi:e)[o]=n[o]}})(self,function(){return function(){var r={3099:function(o){o.exports=function(s){if(typeof s!="function")throw TypeError(String(s)+" is not a function");return s}},6077:function(o,s,i){var a=i(111);o.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},1223:function(o,s,i){var a=i(5112),l=i(30),c=i(3070),u=a("unscopables"),d=Array.prototype;d[u]==null&&c.f(d,u,{configurable:!0,value:l(null)}),o.exports=function(h){d[u][h]=!0}},1530:function(o,s,i){"use strict";var a=i(8710).charAt;o.exports=function(l,c,u){return c+(u?a(l,c).length:1)}},5787:function(o){o.exports=function(s,i,a){if(!(s instanceof i))throw TypeError("Incorrect "+(a?a+" ":"")+"invocation");return s}},9670:function(o,s,i){var a=i(111);o.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}},4019:function(o){o.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"},260:function(o,s,i){"use strict";var a=i(4019),l=i(9781),c=i(7854),u=i(111),d=i(6656),h=i(648),f=i(8880),p=i(1320),v=i(3070).f,y=i(9518),b=i(7674),x=i(5112),T=i(9711),C=c.Int8Array,M=C&&C.prototype,S=c.Uint8ClampedArray,O=S&&S.prototype,A=C&&y(C),D=M&&y(M),I=Object.prototype,P=I.isPrototypeOf,_=x("toStringTag"),B=T("TYPED_ARRAY_TAG"),H=a&&!!b&&h(c.opera)!=="Opera",Q=!1,Y,re={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ie={BigInt64Array:8,BigUint64Array:8},xe=function(Ae){if(!u(Ae))return!1;var Le=h(Ae);return Le==="DataView"||d(re,Le)||d(ie,Le)},Ie=function(me){if(!u(me))return!1;var Ae=h(me);return d(re,Ae)||d(ie,Ae)},Ce=function(me){if(Ie(me))return me;throw TypeError("Target is not a typed array")},Pe=function(me){if(b){if(P.call(A,me))return me}else for(var Ae in re)if(d(re,Y)){var Le=c[Ae];if(Le&&(me===Le||P.call(Le,me)))return me}throw TypeError("Target is not a typed array constructor")},Me=function(me,Ae,Le){if(l){if(Le)for(var Re in re){var $e=c[Re];$e&&d($e.prototype,me)&&delete $e.prototype[me]}(!D[me]||Le)&&p(D,me,Le?Ae:H&&M[me]||Ae)}},Ne=function(me,Ae,Le){var Re,$e;if(l){if(b){if(Le)for(Re in re)$e=c[Re],$e&&d($e,me)&&delete $e[me];if(!A[me]||Le)try{return p(A,me,Le?Ae:H&&C[me]||Ae)}catch{}else return}for(Re in re)$e=c[Re],$e&&(!$e[me]||Le)&&p($e,me,Ae)}};for(Y in re)c[Y]||(H=!1);if((!H||typeof A!="function"||A===Function.prototype)&&(A=function(){throw TypeError("Incorrect invocation")},H))for(Y in re)c[Y]&&b(c[Y],A);if((!H||!D||D===I)&&(D=A.prototype,H))for(Y in re)c[Y]&&b(c[Y].prototype,D);if(H&&y(O)!==D&&b(O,D),l&&!d(D,_)){Q=!0,v(D,_,{get:function(){return u(this)?this[B]:void 0}});for(Y in re)c[Y]&&f(c[Y],B,Y)}o.exports={NATIVE_ARRAY_BUFFER_VIEWS:H,TYPED_ARRAY_TAG:Q&&B,aTypedArray:Ce,aTypedArrayConstructor:Pe,exportTypedArrayMethod:Me,exportTypedArray
`)&&(D="(?: "+D+")",P=" "+P,I++),C=new RegExp("^(?:"+D+")",A)),p&&(C=new RegExp("^"+D+"$(?!\\s)",A)),h&&(T=x.lastIndex),M=c.call(O?C:x,P),O?M?(M.input=M.input.slice(I),M[0]=M[0].slice(I),M.index=x.lastIndex,x.lastIndex+=M[0].length):x.lastIndex=0:h&&M&&(x.lastIndex=x.global?M.index+M[0].length:T),p&&M&&M.length>1&&u.call(M[0],C,function(){for(S=1;S<arguments.length-2;S++)arguments[S]===void 0&&(M[S]=void 0)}),M}),o.exports=d},7066:function(o,s,i){"use strict";var a=i(9670);o.exports=function(){var l=a(this),c="";return l.global&&(c+="g"),l.ignoreCase&&(c+="i"),l.multiline&&(c+="m"),l.dotAll&&(c+="s"),l.unicode&&(c+="u"),l.sticky&&(c+="y"),c}},2999:function(o,s,i){"use strict";var a=i(7293);function l(c,u){return RegExp(c,u)}s.UNSUPPORTED_Y=a(function(){var c=l("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),s.BROKEN_CARET=a(function(){var c=l("^r","gy");return c.lastIndex=2,c.exec("str")!=null})},4488:function(o){o.exports=function(s){if(s==null)throw TypeError("Can't call method on "+s);return s}},3505:function(o,s,i){var a=i(7854),l=i(8880);o.exports=function(c,u){try{l(a,c,u)}catch{a[c]=u}return u}},6340:function(o,s,i){"use strict";var a=i(5005),l=i(3070),c=i(5112),u=i(9781),d=c("species");o.exports=function(h){var f=a(h),p=l.f;u&&f&&!f[d]&&p(f,d,{configurable:!0,get:function(){return this}})}},8003:function(o,s,i){var a=i(3070).f,l=i(6656),c=i(5112),u=c("toStringTag");o.exports=function(d,h,f){d&&!l(d=f?d:d.prototype,u)&&a(d,u,{configurable:!0,value:h})}},6200:function(o,s,i){var a=i(2309),l=i(9711),c=a("keys");o.exports=function(u){return c[u]||(c[u]=l(u))}},5465:function(o,s,i){var a=i(7854),l=i(3505),c="__core-js_shared__",u=a[c]||l(c,{});o.exports=u},2309:function(o,s,i){var a=i(1913),l=i(5465);(o.exports=function(c,u){return l[c]||(l[c]=u!==void 0?u:{})})("versions",[]).push({version:"3.9.0",mode:a?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(o,s,i){var a=i(9670),l=i(3099),c=i(5112),u=c("species");o.exports=function(d,h){var f=a(d).constructor,p;return f===void 0||(p=a(f)[u])==null?h:l(p)}},8710:function(o,s,i){var a=i(9958),l=i(4488),c=function(u){return function(d,h){var f=String(l(d)),p=a(h),v=f.length,y,b;return p<0||p>=v?u?"":void 0:(y=f.charCodeAt(p),y<55296||y>56319||p+1===v||(b=f.charCodeAt(p+1))<56320||b>57343?u?f.charAt(p):y:u?f.slice(p,p+2):(y-55296<<10)+(b-56320)+65536)}};o.exports={codeAt:c(!1),charAt:c(!0)}},3197:function(o){"use strict";var s=2147483647,i=36,a=1,l=26,c=38,u=700,d=72,h=128,f="-",p=/[^\0-\u007E]/,v=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",b=i-a,x=Math.floor,T=String.fromCharCode,C=function(A){for(var D=[],I=0,P=A.length;I<P;){var _=A.charCodeAt(I++);if(_>=55296&&_<=56319&&I<P){var B=A.charCodeAt(I++);(B&64512)==56320?D.push(((_&1023)<<10)+(B&1023)+65536):(D.push(_),I--)}else D.push(_)}return D},M=function(A){return A+22+75*(A<26)},S=function(A,D,I){var P=0;for(A=I?x(A/u):A>>1,A+=x(A/D);A>b*l>>1;P+=i)A=x(A/b);return x(P+(b+1)*A/(A+c))},O=function(A){var D=[];A=C(A);var I=A.length,P=h,_=0,B=d,H,Q;for(H=0;H<A.length;H++)Q=A[H],Q<128&&D.push(T(Q));var Y=D.length,re=Y;for(Y&&D.push(f);re<I;){var ie=s;for(H=0;H<A.length;H++)Q=A[H],Q>=P&&Q<ie&&(ie=Q);var xe=re+1;if(ie-P>x((s-_)/xe))throw RangeError(y);for(_+=(ie-P)*xe,P=ie,H=0;H<A.length;H++){if(Q=A[H],Q<P&&++_>s)throw RangeError(y);if(Q==P){for(var Ie=_,Ce=i;;Ce+=i){var Pe=Ce<=B?a:Ce>=B+l?l:Ce-B;if(Ie<Pe)break;var Me=Ie-Pe,Ne=i-Pe;D.push(T(M(Pe+Me%Ne))),Ie=x(Me/Ne)}D.push(T(M(Ie))),B=S(_,xe,re==Y),_=0,++re}}++_,++P}return D.join("")};o.exports=function(A){var D=[],I=A.toLowerCase().replace(v,".").split("."),P,_;for(P=0;P<I.length;P++)_=I[P],D.push(p.test(_)?"xn--"+O(_):_);return D.join(".")}},6091:function(o,s,i){var a=i(7293),l=i(1361),c="\u200B\x85\u180E";o.exports=function(u){return a(function(){return!!l[u]()||c[u]()!=c||l[u].name!==u})}},3111:function(o,s,i){var a=i(4488),l=i(1361),c="["+l+"]",u=RegExp("^"+c+c+"*"),d=RegExp(c+c+"*$"),h=function(f){return function(p){var v=String(a(p));return f&1&&(v=v.replace(u,"")),f&2&&(v=v.replace(d,"")),v}};o.expor
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},8264:function(o,s,i){"use strict";var a=i(2109),l=i(7854),c=i(3331),u=i(6340),d="ArrayBuffer",h=c[d],f=l[d];a({global:!0,forced:f!==h},{ArrayBuffer:h}),u(d)},2222:function(o,s,i){"use strict";var a=i(2109),l=i(7293),c=i(3157),u=i(111),d=i(7908),h=i(7466),f=i(6135),p=i(5417),v=i(1194),y=i(5112),b=i(7392),x=y("isConcatSpreadable"),T=9007199254740991,C="Maximum allowed index exceeded",M=b>=51||!l(function(){var D=[];return D[x]=!1,D.concat()[0]!==D}),S=v("concat"),O=function(D){if(!u(D))return!1;var I=D[x];return I!==void 0?!!I:c(D)},A=!M||!S;a({target:"Array",proto:!0,forced:A},{concat:function(I){var P=d(this),_=p(P,0),B=0,H,Q,Y,re,ie;for(H=-1,Y=arguments.length;H<Y;H++)if(ie=H===-1?P:arguments[H],O(ie)){if(re=h(ie.length),B+re>T)throw TypeError(C);for(Q=0;Q<re;Q++,B++)Q in ie&&f(_,B,ie[Q])}else{if(B>=T)throw TypeError(C);f(_,B++,ie)}return _.length=B,_}})},7327:function(o,s,i){"use strict";var a=i(2109),l=i(2092).filter,c=i(1194),u=c("filter");a({target:"Array",proto:!0,forced:!u},{filter:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}})},2772:function(o,s,i){"use strict";var a=i(2109),l=i(1318).indexOf,c=i(9341),u=[].indexOf,d=!!u&&1/[1].indexOf(1,-0)<0,h=c("indexOf");a({target:"Array",proto:!0,forced:d||!h},{indexOf:function(p){return d?u.apply(this,arguments)||0:l(this,p,arguments.length>1?arguments[1]:void 0)}})},6992:function(o,s,i){"use strict";var a=i(5656),l=i(1223),c=i(7497),u=i(9909),d=i(654),h="Array Iterator",f=u.set,p=u.getterFor(h);o.exports=d(Array,"Array",function(v,y){f(this,{type:h,target:a(v),index:0,kind:y})},function(){var v=p(this),y=v.target,b=v.kind,x=v.index++;return!y||x>=y.length?(v.target=void 0,{value:void 0,done:!0}):b=="keys"?{value:x,done:!1}:b=="values"?{value:y[x],done:!1}:{value:[x,y[x]],done:!1}},"values"),c.Arguments=c.Array,l("keys"),l("values"),l("entries")},1249:function(o,s,i){"use strict";var a=i(2109),l=i(2092).map,c=i(1194),u=c("map");a({target:"Array",proto:!0,forced:!u},{map:function(h){return l(this,h,arguments.length>1?arguments[1]:void 0)}})},7042:function(o,s,i){"use strict";var a=i(2109),l=i(111),c=i(3157),u=i(1400),d=i(7466),h=i(5656),f=i(6135),p=i(5112),v=i(1194),y=v("slice"),b=p("species"),x=[].slice,T=Math.max;a({target:"Array",proto:!0,forced:!y},{slice:function(M,S){var O=h(this),A=d(O.length),D=u(M,A),I=u(S===void 0?A:S,A),P,_,B;if(c(O)&&(P=O.constructor,typeof P=="function"&&(P===Array||c(P.prototype))?P=void 0:l(P)&&(P=P[b],P===null&&(P=void 0)),P===Array||P===void 0))return x.call(O,D,I);for(_=new(P===void 0?Array:P)(T(I-D,0)),B=0;D<I;D++,B++)D in O&&f(_,B,O[D]);return _.length=B,_}})},561:function(o,s,i){"use strict";var a=i(2109),l=i(1400),c=i(9958),u=i(7466),d=i(7908),h=i(5417),f=i(6135),p=i(1194),v=p("splice"),y=Math.max,b=Math.min,x=9007199254740991,T="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!v},{splice:function(M,S){var O=d(this),A=u(O.length),D=l(M,A),I=arguments.length,P,_,B,H,Q,Y;if(I===0?P=_=0:I===1?(P=0,_=A-D):(P=I-2,_=b(y(c(S),0),A-D)),A+P-_>x)throw TypeError(T);for(B=h(O,_),H=0;H<_;H++)Q=D+H,Q in O&&f(B,H,O[Q]);if(B.length=_,P<_){for(H=D;H<A-_;H++)Q=H+_,Y=H+P,Q in O?O[Y]=O[Q]:delete O[Y];for(H=A;H>A-_+P;H--)delete O[H-1]}else if(P>_)for(H=A-_;H>D;H--)Q=H+_-1,Y=H+P-1,Q in O?O[Y]=O[Q]:delete O[Y];for(H=0;H<P;H++)O[H+D]=arguments[H+2];return O.length=A-_+P,B}})},8309:function(o,s,i){var a=i(9781),l=i(3070).f,c=Function.prototype,u=c.toString,d=/^\s*function ([^ (]*)/,h="name";a&&!(h in c)&&l(c,h,{configurable:!0,get:function(){try{return u.call(this).match(d)[1]}catch{return""}}})},489:function(o,s,i){var a=i(2109),l=i(7293),c=i(7908),u=i(9518),d=i(8544),h=l(function(){u(1)});a({target:"Object",stat:!0,forced:h,sham:!d},{getPrototypeOf:function(p){return u(c(p))}})},1539:function(o,s,i){var a=i(1694),l=i(1320),c=i(288);a||l(Object.prototype,"toString",c,{unsafe:!0})},4916:function(o,s,i){"use strict";var a=i(2109),l=i(2261);a({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})},
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,k=!1,$;return{s:function(){E=F[Symbol.iterator]()},n:function(){var z=E.next();return g=z.done,z},e:function(z){k=!0,$=z},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(k)throw $}}}}function se(F,R){if(F){if(typeof F=="string")return de(F,R);var E=Object.prototype.toString.call(F).slice(8,-1);if(E==="Object"&&F.constructor&&(E=F.constructor.name),E==="Map"||E==="Set")return Array.from(F);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return de(F,R)}}function de(F,R){(R==null||R>F.length)&&(R=F.length);for(var E=0,L=new Array(R);E<R;E++)L[E]=F[E];return L}function pe(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}function ce(F,R){for(var E=0;E<R.length;E++){var L=R[E];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(F,L.key,L)}}function ge(F,R,E){return R&&ce(F.prototype,R),E&&ce(F,E),F}var ee=function(){function F(){pe(this,F)}return ge(F,[{key:"on",value:function(E,L){return this._callbacks=this._callbacks||{},this._callbacks[E]||(this._callbacks[E]=[]),this._callbacks[E].push(L),this}},{key:"emit",value:function(E){this._callbacks=this._callbacks||{};for(var L=this._callbacks[E],m=arguments.length,g=new Array(m>1?m-1:0),k=1;k<m;k++)g[k-1]=arguments[k];if(L){var $=ve(L,!0),U;try{for($.s();!(U=$.n()).done;){var z=U.value;z.apply(this,g)}}catch(K){$.e(K)}finally{$.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+E,{args:g})),this}},{key:"makeEvent",value:function(E,L){var m={bubbles:!0,cancelable:!0,detail:L};if(typeof window.CustomEvent=="function")return new CustomEvent(E,m);var g=document.createEvent("CustomEvent");return g.initCustomEvent(E,m.bubbles,m.cancelable,m.detail),g}},{key:"off",value:function(E,L){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var m=this._callbacks[E];if(!m)return this;if(arguments.length===1)return delete this._callbacks[E],this;for(var g=0;g<m.length;g++){var k=m[g];if(k===L){m.splice(g,1);break}}return this}}]),F}(),G='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,k=!1,$;return{s:function(){E=F[Symbol.iterator]()},n:function(){var z=E.next();return g=z.done,z},e:function(z){k=!0,$=z},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(k)throw $}}}}function Ue(F,R){if(F){if(typeof F=="string")return Xe(F,R);var E=Object.prototype.toString.call(F).slice(8,-1);if(E==="Object"&&F.constructor&&(E=F.constructor.name),E==="Map"||E==="Set")return Array.from(F);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Xe(F,R)}}function Xe(F,R){(R==null||R>F.length)&&(R=F.length);for(var E=0,L=new Array(R);E<R;E++)L[E]=F[E];return L}var dt={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(R,E,L){if(L)return{dzuuid:L.file.upload.uuid,dzchunkindex:L.index,dztotalfilesize:L.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:L.file.upload.totalChunkCount,dzchunkbyteoffset:L.index*this.options.chunkSize}},accept:function(R,E){return E()},chunksUploaded:function(R,E){E()},fallback:function(){var R;this.element.className="".concat(this.element.className," dz-browser-not-supported");var E=he(this.element.getElementsByTagName("div"),!0),L;try{for(E.s();!(L=E.n()).done;){var m=L.value;if(/(^| )dz-message($| )/.test(m.className)){R=m,m.className="dz-message";break}}}catch(k){E.e(k)}finally{E.f()}R||(R=fe.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(R));var g=R.getElementsByTagName("span")[0];return g&&(g.textContent!=null?g.textContent=this.options.dictFallbackMessage:g.innerText!=null&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(R,E,L,m){var g={srcX:0,srcY:0,srcWidth:R.width,srcHeight:R.height},k=R.width/R.height;E==null&&L==null?(E=g.srcWidth,L=g.srcHeight):E==null?E=L*k:L==null&&(L=E/k),E=Math.min(E,g.srcWidth),L=Math.min(L,g.srcHeight);var $=E/L;if(g.srcWidth>E||g.srcHeight>L)if(m==="crop")k>$?(g.srcHeight=R.height,g.srcWidth=g.srcHeight*$):(g.srcWidth=R.width,g.srcHeight=g.srcWidth/$);else if(m==="contain")k>$?L=E/k:E=L*k;else throw new Error("Unknown resizeMethod '".concat(m,"'"));return g.srcX=(R.width-g.srcWidth)/2,g.srcY=(R.height-g.srcHeight)/2,g.trgWidth=E,g.trgHeight=L,g},transformFile:function(R,E){return(this.options.resizeWidth||this.options.resizeHeight)&&R.type.match(/image.*/)?this.resizeImage(R,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,E):E(R)},previewTemplate:oe,drop:function(R){return this.element.classList.remove("dz-drag-hover")},dragstart:function(R){},
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,k=!1,$;return{s:function(){E=F[Symbol.iterator]()},n:function(){var z=E.next();return g=z.done,z},e:function(z){k=!0,$=z},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(k)throw $}}}}function qt(F,R){if(F){if(typeof F=="string")return vt(F,R);var E=Object.prototype.toString.call(F).slice(8,-1);if(E==="Object"&&F.constructor&&(E=F.constructor.name),E==="Map"||E==="Set")return Array.from(F);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return vt(F,R)}}function vt(F,R){(R==null||R>F.length)&&(R=F.length);for(var E=0,L=new Array(R);E<R;E++)L[E]=F[E];return L}function ar(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}function lr(F,R){for(var E=0;E<R.length;E++){var L=R[E];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(F,L.key,L)}}function Ze(F,R,E){return R&&lr(F.prototype,R),E&&lr(F,E),F}function _e(F,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(R&&R.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),R&&Ge(F,R)}function Ge(F,R){return Ge=Object.setPrototypeOf||function(L,m){return L.__proto__=m,L},Ge(F,R)}function mt(F){var R=_t();return function(){var L=lt(F),m;if(R){var g=lt(this).constructor;m=Reflect.construct(L,arguments,g)}else m=L.apply(this,arguments);return $t(this,m)}}function $t(F,R){return R&&(Fe(R)==="object"||typeof R=="function")?R:yt(F)}function yt(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function _t(){if(typeof Reflect>"u"||!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 lt(F){return lt=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},lt(F)}var fe=function(F){_e(E,F);var R=mt(E);function E(L,m){var g;ar(this,E),g=R.call(this);var k,$;if(g.element=L,g.version=E.version,g.clickableElements=[],g.listeners=[],g.files=[],typeof g.element=="string"&&(g.element=document.querySelector(g.element)),!g.element||g.element.nodeType==null)throw new Error("Invalid dropzone element.");if(g.element.dropzone)throw new Error("Dropzone already attached.");E.instances.push(yt(g)),g.element.dropzone=yt(g);var U=($=E.optionsForElement(g.element))!=null?$:{};if(g.options=E.extend({},st,U,m??{}),g.options.previewTemplate=g.options.previewTemplate.replace(/\n*/g,""),g.options.forceFallback||!E.isBrowserSupported())return $t(g,g.options.fallback.call(yt(g)));if(g.options.url==null&&(g.options.url=g.element.getAttribute("action")),!g.options.url)throw new Error("No URL provided.");if(g.options.acceptedFiles&&g.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(g.options.uploadMultiple&&g.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return g.options.acceptedMimeTypes&&(g.options.acceptedFiles=g.options.acceptedMimeTypes,delete g.options.acceptedMimeTypes),g.options.renameFilename!=null&&(g.options.renameFile=function(z){return g.options.renameFilename.call(yt(g),z.name,z)}),typeof g.options.method=="string"&&(g.options.method=g.options.method.toUpperCase()),(k=g.getExistingFallback())&&k.parentNode&&k.parentNode.removeChild(k),g.options.previewsContainer!==!1&&(g.options.previewsContainer?g.previewsContainer=E.getElement(g.options.previewsContainer,"previewsContainer"):g.previewsContainer=g.element),g.options.clickable&&(g.options.clickable===!0?g.clickableElements=[g.element]:g.clickableElements=E.getElements(g.options.clickable,"clickable")),g.init(),g}return Ze(E,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(m){return m.accepted}).map(function(m){return m})}},{key:"getRejectedFiles",v
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");$=this.KEY_STR.indexOf(E.charAt(J++)),U=this.KEY_STR.indexOf(E.charAt(J++)),z=this.KEY_STR.indexOf(E.charAt(J++)),K=this.KEY_STR.indexOf(E.charAt(J++)),m=$<<2|U>>4,g=(U&15)<<4|z>>2,k=(z&3)<<6|K,W.push(m),z!==64&&W.push(g),K!==64&&W.push(k),m=g=k="",$=U=z=K="",J<E.length;);return W}}]),F}();Mr.initClass();var Gt=function(R,E){var L=!1,m=!0,g=R.document,k=g.documentElement,$=g.addEventListener?"addEventListener":"attachEvent",U=g.addEventListener?"removeEventListener":"detachEvent",z=g.addEventListener?"":"on",K=function W(ae){if(!(ae.type==="readystatechange"&&g.readyState!=="complete")&&((ae.type==="load"?R:g)[U](z+ae.type,W,!1),!L&&(L=!0)))return E.call(R,ae.type||ae)},J=function W(){try{k.doScroll("left")}catch{setTimeout(W,50);return}return K("poll")};if(g.readyState!=="complete"){if(g.createEventObject&&k.doScroll){try{m=!R.frameElement}catch{}m&&J()}return g[$](z+"DOMContentLoaded",K,!1),g[$](z+"readystatechange",K,!1),R[$](z+"load",K,!1)}};fe._autoDiscoverFunction=function(){if(fe.autoDiscover)return fe.discover()},Gt(window,fe._autoDiscoverFunction);function Lt(F,R){return typeof F<"u"&&F!==null?R(F):void 0}function It(F,R,E){if(typeof F<"u"&&F!==null&&typeof F[R]=="function")return E(F,R)}window.Dropzone=fe;var Wt=fe}(),n}()})});var Fa=ne((my,Lh)=>{Lh.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:"\u25
`,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
`," "],_h=["{","}","|","\\","^","`"].concat($h),Bh=["'"].concat(_h),ja=["%","/","?",";","#"].concat(Bh),Ha=["/","?","#"],Nh=255,Va=/^[+a-z0-9A-Z_-]{0,63}$/,Uh=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,qa={javascript:!0,"javascript:":!0},Ga={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function zh(r,e){if(r&&r instanceof Ci)return r;var t=new Ci;return t.parse(r,e),t}Ci.prototype.parse=function(r,e){var t,n,o,s,i,a=r;if(a=a.trim(),!e&&r.split("#").length===1){var l=Mh.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var c=Oh.exec(a);if(c&&(c=c[0],o=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(e||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(c&&qa[c])&&(a=a.substr(2),this.slashes=!0)),!qa[c]&&(i||c&&!Ga[c])){var u=-1;for(t=0;t<Ha.length;t++)s=a.indexOf(Ha[t]),s!==-1&&(u===-1||s<u)&&(u=s);var d,h;for(u===-1?h=a.lastIndexOf("@"):h=a.lastIndexOf("@",u),h!==-1&&(d=a.slice(0,h),a=a.slice(h+1),this.auth=d),u=-1,t=0;t<ja.length;t++)s=a.indexOf(ja[t]),s!==-1&&(u===-1||s<u)&&(u=s);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 v=this.hostname.split(/\./);for(t=0,n=v.length;t<n;t++){var y=v[t];if(y&&!y.match(Va)){for(var b="",x=0,T=y.length;x<T;x++)y.charCodeAt(x)>127?b+="x":b+=y[x];if(!b.match(Va)){var C=v.slice(0,t),M=v.slice(t+1),S=y.match(Uh);S&&(C.push(S[1]),M.unshift(S[2])),M.length&&(a=M.join(".")+a),this.hostname=C.join(".");break}}}}this.hostname.length>Nh&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var O=a.indexOf("#");O!==-1&&(this.hash=a.substr(O),a=a.slice(0,O));var A=a.indexOf("?");return A!==-1&&(this.search=a.substr(A),a=a.slice(0,A)),a&&(this.pathname=a),Ga[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ci.prototype.parseHost=function(r){var e=Ph.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};Wa.exports=zh});var Jo=ne((Cy,ln)=>{"use strict";ln.exports.encode=$a();ln.exports.decode=Na();ln.exports.format=za();ln.exports.parse=Ya()});var es=ne((Ey,Ka)=>{Ka.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var ts=ne((Sy,Xa)=>{Xa.exports=/[\0-\x1F\x7F-\x9F]/});var Qa=ne((Ay,Za)=>{Za.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 rs=ne((ky,Ja)=>{Ja.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var el=ne(Dr=>{"use strict";Dr.Any=es();Dr.Cc=ts();Dr.Cf=Qa();Dr.P=bi();Dr.Z=rs()});var Be=ne(at=>{"use strict";function jh(r){return Object.prototype.toString.call(r)}function Hh(r){return jh(r)==="[object String]"}var Vh=Object.prototype.hasOwnProperty;function rl(r,e){return Vh.call(r,e)}function qh(r){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){if(t){if(typeof t!="object")throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){r[n]=t[n]})}}),r}function Gh(r,e,t){return[].concat(r.slice(0,e),t,r.slice(e+1))}function nl(r){return!(r>=55296&&r<=57343||r>=64976&&r<=65007||(r&65535)===65535||(r&65535)===65534||r>=0&&r<=8||r===11||r>=14&&r<=31||r>=127&&r<=159||r>1114111)}function il(r){if(r>65535){r-=65536;var e=55296+(r>>10),t=56320+(r&1023);return String.fromCharCode(e,t)}return String.fromCharCode(r)}var ol=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,Wh=/&([a-z#][a-z0-9]{1,31});/gi,Yh=new RegExp(ol.source+"|"+Wh.source,"gi"),Kh=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,tl=Qo();function Xh(r,e){var t=0;return rl(tl,e)?tl[e]:e.charCodeAt(0)===35&&Kh.test(e)&&(t=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),nl(t))?il(t):r}function Zh(r){return r.indexOf("\\")<0?r:r.replace(ol,"$1")}function Qh(r){return r.in
`};zt.fence=function(r,e,t,n,o){var s=r[e],i=s.info?mf(s.info).trim():"",a="",l="",c,u,d,h,f;return i&&(d=i.split(/(\s+)/g),a=d[0],l=d.slice(2).join("")),t.highlight?c=t.highlight(s.content,a,l)||pr(s.content):c=pr(s.content),c.indexOf("<pre")===0?c+`
`:i?(u=s.attrIndex("class"),h=s.attrs?s.attrs.slice():[],u<0?h.push(["class",t.langPrefix+a]):(h[u]=h[u].slice(),h[u][1]+=" "+t.langPrefix+a),f={attrs:h},"<pre><code"+o.renderAttrs(f)+">"+c+`</code></pre>
`):"<pre><code"+o.renderAttrs(s)+">"+c+`</code></pre>
`};zt.image=function(r,e,t,n,o){var s=r[e];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,t,n),o.renderToken(r,e,t)};zt.hardbreak=function(r,e,t){return t.xhtmlOut?`<br />
`:`<br>
`};zt.softbreak=function(r,e,t){return t.breaks?t.xhtmlOut?`<br />
`:`<br>
`:`
`};zt.text=function(r,e){return pr(r[e].content)};zt.html_block=function(r,e){return r[e].content};zt.html_inline=function(r,e){return r[e].content};function Lr(){this.rules=pf({},zt)}Lr.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return"";for(o="",t=0,n=e.attrs.length;t<n;t++)o+=" "+pr(e.attrs[t][0])+'="'+pr(e.attrs[t][1])+'"';return o};Lr.prototype.renderToken=function(e,t,n){var o,s="",i=!1,a=e[t];return a.hidden?"":(a.block&&a.nesting!==-1&&t&&e[t-1].hidden&&(s+=`
`),s+=(a.nesting===-1?"</":"<")+a.tag,s+=this.renderAttrs(a),a.nesting===0&&n.xhtmlOut&&(s+=" /"),a.block&&(i=!0,a.nesting===1&&t+1<e.length&&(o=e[t+1],(o.type==="inline"||o.hidden||o.nesting===-1&&o.tag===a.tag)&&(i=!1))),s+=i?`>
`:">",s)};Lr.prototype.renderInline=function(r,e,t){for(var n,o="",s=this.rules,i=0,a=r.length;i<a;i++)n=r[i].type,typeof s[n]<"u"?o+=s[n](r,i,e,t,this):o+=this.renderToken(r,i,e);return o};Lr.prototype.renderInlineAsText=function(r,e,t){for(var n="",o=0,s=r.length;o<s;o++)r[o].type==="text"?n+=r[o].content:r[o].type==="image"?n+=this.renderInlineAsText(r[o].children,e,t):r[o].type==="softbreak"&&(n+=`
`);return n};Lr.prototype.render=function(r,e,t){var n,o,s,i="",a=this.rules;for(n=0,o=r.length;n<o;n++)s=r[n].type,s==="inline"?i+=this.renderInline(r[n].children,e,t):typeof a[s]<"u"?i+=a[r[n].type](r,n,e,t,this):i+=this.renderToken(r,n,e,t);return i};pl.exports=Lr});var Si=ne((Py,gl)=>{"use strict";function Mt(){this.__rules__=[],this.__cache__=null}Mt.prototype.__find__=function(r){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===r)return e;return-1};Mt.prototype.__compile__=function(){var r=this,e=[""];r.__rules__.forEach(function(t){t.enabled&&t.alt.forEach(function(n){e.indexOf(n)<0&&e.push(n)})}),r.__cache__={},e.forEach(function(t){r.__cache__[t]=[],r.__rules__.forEach(function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||r.__cache__[t].push(n.fn))})})};Mt.prototype.at=function(r,e,t){var n=this.__find__(r),o=t||{};if(n===-1)throw new Error("Parser rule not found: "+r);this.__rules__[n].fn=e,this.__rules__[n].alt=o.alt||[],this.__cache__=null};Mt.prototype.before=function(r,e,t,n){var o=this.__find__(r),s=n||{};if(o===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(o,0,{name:e,enabled:!0,fn:t,alt:s.alt||[]}),this.__cache__=null};Mt.prototype.after=function(r,e,t,n){var o=this.__find__(r),s=n||{};if(o===-1)throw new Error("Parser rule not found: "+r);this.__rules__.splice(o+1,0,{name:e,enabled:!0,fn:t,alt:s.alt||[]}),this.__cache__=null};Mt.prototype.push=function(r,e,t){var n=t||{};this.__rules__.push({name:r,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null};Mt.prototype.enable=function(r,e){Array.isArray(r)||(r=[r]);var t=[];return r.forEach(function(n){var o=this.__find__(n);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[o].enabled=!0,t.push(n)},this),this.__cache__=null,t};Mt.prototype.enableOnly=function(r,e){Array.isArray(r)||(r=[r]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(r,e)};Mt.prototype.disable=function(r,e){Array.isArray(r)||(r=[r]);var t=[];return r.forEach(function(n){var o=this.__find__(n);if(o<0){if(e)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[o].enabled=!1,t.push(n)},this),this.__cache__=null,t};Mt.prototype.getRules=function(r){return this.__cache__===null&&this.__compile__(),this.__cache__[r]||[]};gl.exports=Mt});var yl=ne((My,vl)=>{"use strict";var gf=/\r\n?|\n/g,vf=/\0/g;vl.exports=function(e){var t;t=e.src.replace(gf,`
`),t=t.replace(vf,"\uFFFD"),e.src=t}});var xl=ne(($y,bl)=>{"use strict";bl.exports=function(e){var t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}});var Cl=ne((_y,wl)=>{"use strict";wl.exports=function(e){var t=e.tokens,n,o,s;for(o=0,s=t.length;o<s;o++)n=t[o],n.type==="inline"&&e.md.inline.parse(n.content,e.md,e.env,n.children)}});var Sl=ne((By,El)=>{"use strict";var yf=Be().arrayReplaceAt;function bf(r){return/^<a[>\s]/i.test(r)}function xf(r){return/^<\/a\s*>/i.test(r)}El.exports=function(e){var t,n,o,s,i,a,l,c,u,d,h,f,p,v,y,b,x=e.tokens,T;if(e.md.options.linkify){for(n=0,o=x.length;n<o;n++)if(!(x[n].type!=="inline"||!e.md.linkify.pretest(x[n].content)))for(s=x[n].children,p=0,t=s.length-1;t>=0;t--){if(a=s[t],a.type==="link_close"){for(t--;s[t].level!==a.level&&s[t].type!=="link_open";)t--;continue}if(a.type==="html_inline"&&(bf(a.content)&&p>0&&p--,xf(a.content)&&p++),!(p>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(u=a.content,T=e.md.linkify.match(u),l=[],f=a.level,h=0,T.length>0&&T[0].index===0&&t>0&&s[t-1].type==="text_special"&&(T=T.slice(1)),c=0;c<T.length;c++)v=T[c].url,y=e.md.normalizeLink(v),e.md.validateLink(y)&&(b=T[c].text,T[c].schema?T[c].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,""),d=T[c].index,d>h&&(i=new e.Token("text","",0),i.content=u.slice(h,d),i.level=f,l.push(i)),i=new e.Token("link_open","a",1),i.attrs=[["href",y]],i.level=f++,i.markup="linkify",i.info="auto",l.push(i),i=new e.Token("text","",0),i.content=b,i.level=f,l.push(i),i=new e.Token("link_close","a",-1),i.level=--f,i.markup="linkify",i.info="auto",l.push(i),h=T[c].lastIndex);h<u.length&&(i=new e.Token("text","",0),i.content=u.slice(h),i.level=f,l.push(i)),x[n].children=s=yf(s,t,l)}}}}});var Tl=ne((Ny,kl)=>{"use strict";var Al=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,wf=/\((c|tm|r)\)/i,Cf=/\((c|tm|r)\)/ig,Ef={c:"\xA9",r:"\xAE",tm:"\u2122"};function Sf(r,e){return Ef[e.toLowerCase()]}function Af(r){var e,t,n=0;for(e=r.length-1;e>=0;e--)t=r[e],t.type==="text"&&!n&&(t.content=t.content.replace(Cf,Sf)),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}function kf(r){var e,t,n=0;for(e=r.length-1;e>=0;e--)t=r[e],t.type==="text"&&!n&&Al.test(t.content)&&(t.content=t.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")),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}kl.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(wf.test(e.tokens[t].content)&&Af(e.tokens[t].children),Al.test(e.tokens[t].content)&&kf(e.tokens[t].children))}});var Pl=ne((Uy,Ol)=>{"use strict";var Il=Be().isWhiteSpace,Dl=Be().isPunctChar,Ll=Be().isMdAsciiPunct,Tf=/['"]/,Fl=/['"]/g,Rl="\u2019";function Ai(r,e,t){return r.slice(0,e)+t+r.slice(e+1)}function If(r,e){var t,n,o,s,i,a,l,c,u,d,h,f,p,v,y,b,x,T,C,M,S;for(C=[],t=0;t<r.length;t++){for(n=r[t],l=r[t].level,x=C.length-1;x>=0&&!(C[x].level<=l);x--);if(C.length=x+1,n.type!=="text")continue;o=n.content,i=0,a=o.length;e:for(;i<a&&(Fl.lastIndex=i,s=Fl.exec(o),!!s);){if(y=b=!0,i=s.index+1,T=s[0]==="'",u=32,s.index-1>=0)u=o.charCodeAt(s.index-1);else for(x=t-1;x>=0&&!(r[x].type==="softbreak"||r[x].type==="hardbreak");x--)if(r[x].content){u=r[x].content.charCodeAt(r[x].content.length-1);break}if(d=32,i<a)d=o.charCodeAt(i);else for(x=t+1;x<r.length&&!(r[x].type==="softbreak"||r[x].type==="hardbreak");x++)if(r[x].content){d=r[x].content.charCodeAt(0);break}if(h=Ll(u)||Dl(String.fromCharCode(u)),f=Ll(d)||Dl(String.fromCharCode(d)),p=Il(u),v=Il(d),v?y=!1:f&&(p||h||(y=!1)),p?b=!1:h&&(v||f||(b=!1)),d===34&&s[0]==='"'&&u>=48&&u<=57&&(
`,i.map=[t,e.line],!0}});var Kl=ne((Wy,Yl)=>{"use strict";Yl.exports=function(e,t,n,o){var s,i,a,l,c,u,d,h=!1,f=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||f+3>p||(s=e.src.charCodeAt(f),s!==126&&s!==96)||(c=f,f=e.skipChars(f,s),i=f-c,i<3)||(d=e.src.slice(c,f),a=e.src.slice(f,p),s===96&&a.indexOf(String.fromCharCode(s))>=0))return!1;if(o)return!0;for(l=t;l++,!(l>=n||(f=c=e.bMarks[l]+e.tShift[l],p=e.eMarks[l],f<p&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(f)===s&&!(e.sCount[l]-e.blkIndent>=4)&&(f=e.skipChars(f,s),!(f-c<i)&&(f=e.skipSpaces(f),!(f<p)))){h=!0;break}return i=e.sCount[t],e.line=l+(h?1:0),u=e.push("fence","code",0),u.info=a,u.content=e.getLines(t+1,l,i,!0),u.markup=d,u.map=[t,e.line],!0}});var Ql=ne((Yy,Zl)=>{"use strict";var Xl=Be().isSpace;Zl.exports=function(e,t,n,o){var s,i,a,l,c,u,d,h,f,p,v,y,b,x,T,C,M,S,O,A,D=e.lineMax,I=e.bMarks[t]+e.tShift[t],P=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(I++)!==62)return!1;if(o)return!0;for(l=f=e.sCount[t]+1,e.src.charCodeAt(I)===32?(I++,l++,f++,s=!1,C=!0):e.src.charCodeAt(I)===9?(C=!0,(e.bsCount[t]+f)%4===3?(I++,l++,f++,s=!1):s=!0):C=!1,p=[e.bMarks[t]],e.bMarks[t]=I;I<P&&(i=e.src.charCodeAt(I),Xl(i));){i===9?f+=4-(f+e.bsCount[t]+(s?1:0))%4:f++;I++}for(v=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(C?1:0),u=I>=P,x=[e.sCount[t]],e.sCount[t]=f-l,T=[e.tShift[t]],e.tShift[t]=I-e.bMarks[t],S=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",h=t+1;h<n&&(A=e.sCount[h]<e.blkIndent,I=e.bMarks[h]+e.tShift[h],P=e.eMarks[h],!(I>=P));h++){if(e.src.charCodeAt(I++)===62&&!A){for(l=f=e.sCount[h]+1,e.src.charCodeAt(I)===32?(I++,l++,f++,s=!1,C=!0):e.src.charCodeAt(I)===9?(C=!0,(e.bsCount[h]+f)%4===3?(I++,l++,f++,s=!1):s=!0):C=!1,p.push(e.bMarks[h]),e.bMarks[h]=I;I<P&&(i=e.src.charCodeAt(I),Xl(i));){i===9?f+=4-(f+e.bsCount[h]+(s?1:0))%4:f++;I++}u=I>=P,v.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(C?1:0),x.push(e.sCount[h]),e.sCount[h]=f-l,T.push(e.tShift[h]),e.tShift[h]=I-e.bMarks[h];continue}if(u)break;for(M=!1,a=0,c=S.length;a<c;a++)if(S[a](e,h,n,!0)){M=!0;break}if(M){e.lineMax=h,e.blkIndent!==0&&(p.push(e.bMarks[h]),v.push(e.bsCount[h]),T.push(e.tShift[h]),x.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}p.push(e.bMarks[h]),v.push(e.bsCount[h]),T.push(e.tShift[h]),x.push(e.sCount[h]),e.sCount[h]=-1}for(y=e.blkIndent,e.blkIndent=0,O=e.push("blockquote_open","blockquote",1),O.markup=">",O.map=d=[t,0],e.md.block.tokenize(e,t,h),O=e.push("blockquote_close","blockquote",-1),O.markup=">",e.lineMax=D,e.parentType=b,d[1]=e.line,a=0;a<T.length;a++)e.bMarks[a+t]=p[a],e.tShift[a+t]=T[a],e.sCount[a+t]=x[a],e.bsCount[a+t]=v[a];return e.blkIndent=y,!0}});var ec=ne((Ky,Jl)=>{"use strict";var Ff=Be().isSpace;Jl.exports=function(e,t,n,o){var s,i,a,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||(s=e.src.charCodeAt(c++),s!==42&&s!==45&&s!==95))return!1;for(i=1;c<u;){if(a=e.src.charCodeAt(c++),a!==s&&!Ff(a))return!1;a===s&&i++}return i<3?!1:(o||(e.line=t+1,l=e.push("hr","hr",0),l.map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(s))),!0)}});var oc=ne((Xy,ic)=>{"use strict";var nc=Be().isSpace;function tc(r,e){var t,n,o,s;return n=r.bMarks[e]+r.tShift[e],o=r.eMarks[e],t=r.src.charCodeAt(n++),t!==42&&t!==45&&t!==43||n<o&&(s=r.src.charCodeAt(n),!nc(s))?-1:n}function rc(r,e){var t,n=r.bMarks[e]+r.tShift[e],o=n,s=r.eMarks[e];if(o+1>=s||(t=r.src.charCodeAt(o++),t<48||t>57))return-1;for(;;){if(o>=s)return-1;if(t=r.src.charCodeAt(o++),t>=48&&t<=57){if(o-n>=10)return-1;continue}if(t===41||t===46)break;return-1}return o<s&&(t=r.src.charCodeAt(o),!nc(t))?-1:o}function Rf(r,e){var t,n,o=r.level+2;for(t=e+2,n=r.tokens.length-2;t<n;t++)r.tokens[t].level===o&&r.tokens[t].type==="paragraph_open"&&(r.tokens[t+2].hidden=!0,r.tokens[t].hidden=!0,t+=2)}ic.exports=function(e,t,n,o){var s,i,a,l,c,u,d,h,f,p,v,y,b,x,T,C,M,S,O,A,D,I,P,_,B,H,Q,Y,re=!1,ie=!0;if(e.sCount[t]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(o&&e.parentType==="paragraph"&&e.sCount[t]>=e.bl
`);Nr("error",e)}}function Ud(r){r.status&&r.status>=400&&r.data&&r.data.message&&Nr("error",r.data.message)}var qs={emit:Nr,emitPublic:Bd,listen:_d,success:r=>Nr("success",r),error:r=>Nr("error",r),showValidationErrors:Nd,showResponseError:Ud};async function zd(r,e={}){return Gs(r,{method:"GET",params:e})}async function jd(r,e=null){return yn("POST",r,e)}async function Hd(r,e=null){return yn("PUT",r,e)}async function Vd(r,e=null){return yn("PATCH",r,e)}async function qd(r,e=null){return yn("DELETE",r,e)}async function yn(r,e,t=null){let n={method:r,body:t};return typeof t=="object"&&!(t instanceof FormData)&&(n.headers={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},n.body=JSON.stringify(t)),t instanceof FormData&&r!=="post"&&(t.append("_method",r),n.method="post"),Gs(e,n)}async function Gs(r,e={}){if(r.startsWith("http")||(r=window.baseUrl(r)),e.params){let i=new URL(r);for(let a of Object.keys(e.params)){let l=e.params[a];typeof l<"u"&&l!==null&&i.searchParams.set(a,l)}r=i.toString()}let t=document.querySelector("meta[name=token]").getAttribute("content");e=Object.assign({},e,{credentials:"same-origin"}),e.headers=Object.assign({},e.headers||{},{baseURL:window.baseUrl(""),"X-CSRF-TOKEN":t});let n=await fetch(r,e),o=await Gd(n),s={data:o,headers:n.headers,redirected:n.redirected,status:n.status,statusText:n.statusText,url:n.url,original:n};if(!n.ok)throw new vn(n,o);return s}async function Gd(r){if(r.status===204)return null;let t=(r.headers.get("Content-Type")||"").split(";")[0].split("/").pop();return t==="javascript"||t==="json"?await r.json():await r.text()}var vn=class extends Error{constructor(e,t){super(e.statusText),this.data=t,this.headers=e.headers,this.redirected=e.redirected,this.status=e.status,this.statusText=e.statusText,this.url=e.url,this.original=e}},Ws={get:zd,post:jd,put:Hd,patch:Vd,delete:qd,HttpError:vn};var wo=class{constructor(e){this.store=new Map,this.parseTranslations()}parseTranslations(){let e=document.querySelectorAll('meta[name="translation"]');for(let t of e){let n=t.getAttribute("key"),o=t.getAttribute("value");this.store.set(n,o)}}get(e,t){let n=this.getTransText(e);return this.performReplacements(n,t)}getPlural(e,t,n){let o=this.getTransText(e);return this.parsePlural(o,t,n)}parsePlural(e,t,n){let o=e.split("|"),s=/^{([0-9]+)}/,i=/^\[([0-9]+),([0-9*]+)]/,a=null;for(let l of o){let c=l.match(s);if(c!==null&&Number(c[1])===t){a=l.replace(s,"").trim();break}let u=l.match(i);if(u!==null&&Number(u[1])<=t&&(u[2]==="*"||Number(u[2])>=t)){a=l.replace(i,"").trim();break}}return a===null&&o.length>1&&(a=t===1?o[0]:o[1]),a===null&&(a=o[0]),this.performReplacements(a,n)}getTransText(e){let t=this.store.get(e);return t===void 0&&console.warn(`Translation with key "${e}" does not exist`),t}performReplacements(e,t){if(!t)return e;let n=e.match(/:([\S]+)/g);return n===null||n.forEach(o=>{let s=o.substring(1);typeof t[s]>"u"||(e=e.replace(o,t[s]))}),e}},Ys=wo;var ko={};bo(ko,{first:()=>Xd,firstOnElement:()=>Qd,get:()=>Zd,init:()=>So,register:()=>Ao});function Co(r){let e=n=>n.slice(0,1).toUpperCase()+n.slice(1),t=r.split("-");return t[0]+t.slice(1).map(e).join("")}function Ks(r){return r.replace(/[A-Z]/g,(e,t)=>(t>0?"-":"")+e.toLowerCase())}var Ur={},Xs={},Eo=new WeakMap;function Wd(r,e){let t=Xs[r];if(t===void 0)return;let n;try{n=new t,n.$name=r,n.$el=e;let s=Yd(r,e);n.$refs=s.refs,n.$manyRefs=s.manyRefs,n.$opts=Kd(r,e),n.setup()}catch(s){console.error("Failed to create component",s,r,e)}typeof Ur[r]>"u"&&(Ur[r]=[]),Ur[r].push(n);let o=Eo.get(e)||{};o[r]=n,Eo.set(e,o)}function Yd(r,e){let t={},n={},o=`${r}@`,s=`[refs*="${o}"]`,i=[...e.querySelectorAll(s)];e.matches(s)&&i.push(e);for(let a of i){let l=a.getAttribute("refs").split(" ").filter(c=>c.startsWith(o)).map(c=>c.replace(o,"")).map(Co);for(let c of l)t[c]=a,typeof n[c]>"u"&&(n[c]=[]),n[c].push(a)}return{refs:t,manyRefs:n}}function Kd(r,e){let t={},n=`option:${r}:`;for(let{name:o,value:s}of e.attributes)if(o.startsWith(n)){let i=o.replace(n,"");t[Co(i)]=s||""}return t}function So(r=document){let e=r.querySelectorAll("[c
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ah="1.15.0";function Kt(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Xt=Kt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),nn=Kt(/Edge/i),ra=Kt(/firefox/i),Qr=Kt(/safari/i)&&!Kt(/chrome/i)&&!Kt(/android/i),ha=Kt(/iP(ad|od|hone)/i),fa=Kt(/chrome/i)&&Kt(/android/i),pa={capture:!1,passive:!1};function De(r,e,t){r.addEventListener(e,t,!Xt&&pa)}function Te(r,e,t){r.removeEventListener(e,t,!Xt&&pa)}function Un(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function lh(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Ot(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&Un(r,e):Un(r,e))||n&&r===t)return r;if(r===t)break}while(r=lh(r))}return null}var na=/\s+/g;function it(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(na," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(na," ")}}function ue(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function hr(r,e){var t="";if(typeof r=="string")t=r;else do{var n=ue(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function ma(r,e,t){if(r){var n=r.getElementsByTagName(e),o=0,s=n.length;if(t)for(;o<s;o++)t(n[o],o);return n}return[]}function Nt(){var r=document.scrollingElement;return r||document.documentElement}function Ke(r,e,t,n,o){if(!(!r.getBoundingClientRect&&r!==window)){var s,i,a,l,c,u,d;if(r!==window&&r.parentNode&&r!==Nt()?(s=r.getBoundingClientRect(),i=s.top,a=s.left,l=s.bottom,c=s.right,u=s.height,d=s.width):(i=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||t)&&r!==window&&(o=o||r.parentNode,!Xt))do if(o&&o.getBoundingClientRect&&(ue(o,"transform")!=="none"||t&&ue(o,"position")!=="static")){var h=o.getBoundingClientRect();i-=h.top+parseInt(ue(o,"border-top-width")),a-=h.left+parseInt(ue(o,"border-left-width")),l=i+s.height,c=a+s.width;break}while(o=o.parentNode);if(n&&r!==window){var f=hr(o||r),p=f&&f.a,v=f&&f.d;f&&(i/=v,a/=p,d/=p,u/=v,l=i+u,c=a+d)}return{top:i,left:a,bottom:l,right:c,width:d,height:u}}}function ia(r,e,t){for(var n=or(r,!0),o=Ke(r)[e];n;){var s=Ke(n)[t],i=void 0;if(t==="top"||t==="left"?i=o>=s:i=o<=s,!i)return n;if(n===Nt())break;n=or(n,!1)}return!1}function kr(r,e,t,n){for(var o=0,s=0,i=r.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==ye.ghost&&(n||i[s]!==ye.dragged)&&Ot(i[s],t.draggable,r,!1)){if(o===e)return i[s];o++}s++}return null}function Wo(r,e){for(var t=r.lastElementChild;t&&(t===ye.ghost||ue(t,"display")==="none"||e&&!Un(t,e));)t=t.previousElementSibling;return t||null}function ot(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==ye.clone&&(!e||Un(r,e))&&t++;return t}function oa(r){var e=0,t=0,n=Nt();if(r)do{var o=hr(r),s=o.a,i=o.d;e+=r.scrollLeft*s,t+=r.scrollTop*i}while(r!==n&&(r=r.parentNode));return[e,t]}function ch(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function or(r,e){if(!r||!r.getBoundingClientRect)return Nt();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=ue(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Nt();if(n||e)return t;n=!0}}while
`).map(u=>u.indexOf(`drawio-diagram="${o}"`)!==-1?l:u).join(`
`);this.editor.cm.setValue(c),this.editor.cm.setCursor(n),this.editor.cm.focus(),kt.close()}).catch(a=>{this.handleDrawingUploadError(a)})})}handleDrawingUploadError(e){e.status===413?window.$events.emit("error",this.editor.config.text.serverUploadLimit):window.$events.emit("error",this.editor.config.text.imageUploadError),console.log(e)}fullScreen(){let e=this.editor.config.container,t=e.classList.contains("fullscreen");e.classList.toggle("fullscreen",!t),document.body.classList.toggle("markdown-fullscreen",!t)}scrollToText(e){if(!e)return;let n=this.editor.cm.getValue().split(/\r?\n/),o=n.findIndex(s=>s&&s.indexOf(e)!==-1);o!==-1&&(this.editor.cm.scrollIntoView({line:o},200),this.editor.cm.focus(),this.editor.cm.setCursor({line:o,char:n[o].length}))}focus(){this.editor.cm.focus()}insertContent(e){this.editor.cm.replaceSelection(e)}prependContent(e){let t=this.editor.cm.getCursor("from"),n=e+`
`+this.editor.cm.getValue();this.editor.cm.setValue(n);let o=e.split(`
`).length;this.editor.cm.setCursor(t.line+o,t.ch)}appendContent(e){let t=this.editor.cm.getCursor("from"),n=this.editor.cm.getValue()+`
`+e;this.editor.cm.setValue(n),this.editor.cm.setCursor(t.line,t.ch)}replaceContent(e){this.editor.cm.setValue(e)}findAndReplaceContent(e,t){let n=this.editor.cm.getValue(),o=this.editor.cm.listSelections();this.editor.cm.setValue(n.replace(e,t)),this.editor.cm.setSelections(o)}replaceLineStart(e){let t=this.editor.cm.getCursor(),n=this.editor.cm.getLine(t.line),o=n.length,s=n.split(" ")[0];if(s===e){n=n.replace(`${e} `,""),this.editor.cm.replaceRange(n,{line:t.line,ch:0},{line:t.line,ch:o}),this.editor.cm.setCursor({line:t.line,ch:t.ch-(e.length+1)});return}let i=/^[#>`]/.test(s),a=0;i?(a=e.length-s.length,n=n.replace(s,e).trim()):e!==""&&(a=e.length+1,n=e+" "+n),this.editor.cm.replaceRange(n,{line:t.line,ch:0},{line:t.line,ch:o}),this.editor.cm.setCursor({line:t.line,ch:t.ch+a})}wrapLine(e,t){let n=this.editor.cm.getCursor(),o=this.editor.cm.getLine(n.line),s=o.length,i=o;o.indexOf(e)===0&&o.slice(-t.length)===t?i=o.slice(e.length,o.length-t.length):i=`${e}${o}${t}`,this.editor.cm.replaceRange(i,{line:n.line,ch:0},{line:n.line,ch:s}),this.editor.cm.setCursor({line:n.line,ch:n.ch+e.length})}wrapSelection(e,t){let n=this.editor.cm.getSelection();if(n==="")return this.wrapLine(e,t);let o=n,s=0,i;n.indexOf(e)===0&&n.slice(-t.length)===t?(o=n.slice(e.length,n.length-t.length),i=-(t.length+e.length)):(o=`${e}${n}${t}`,i=e.length+t.length);let a=this.editor.cm.listSelections()[0];this.editor.cm.replaceSelection(o);let l=a.head.ch<=a.anchor.ch;a.head.ch+=l?s:i,a.anchor.ch+=l?i:s,this.editor.cm.setSelections([a])}replaceLineStartForOrderedList(){let e=this.editor.cm.getCursor(),n=(this.editor.cm.getLine(e.line-1)||"").match(/^(\s*)(\d)([).])\s/)||[],o=(Number(n[2])||0)+1,s=n[1]||"",i=n[3]||".",a=`${s}${o}${i}`;return this.replaceLineStart(a)}cycleCalloutTypeAtSelection(){let e=this.editor.cm.listSelections()[0],t=this.editor.cm.getLine(e.anchor.line),n=t.length,o={anchor:{line:e.anchor.line,ch:0},head:{line:e.anchor.line,ch:n}},s=["info","success","warning","danger"],i=s.join("|"),l=new RegExp(`class="((${i})\\s+callout|callout\\s+(${i}))"`,"i").exec(t),c=(l?l[2]||l[3]:"").toLowerCase();if(c===s[s.length-1])this.wrapLine(`<p class="callout ${s[s.length-1]}">`,"</p>");else if(c==="")this.wrapLine('<p class="callout info">',"</p>");else{let u=s.indexOf(c)+1,d=s[u],h=t.replace(l[0],l[0].replace(c,d));this.editor.cm.replaceRange(h,o.anchor,o.head);let f=h.length-t.length;e.anchor.ch+=f,e.anchor!==e.head&&(e.head.ch+=f),this.editor.cm.setSelection(e.anchor,e.head)}}uploadImage(e){if(e===null||e.type.indexOf("image")!==0)return;let t="png";if(e.name){let u=e.name.match(/\.(.+)$/);u.length>1&&(t=u[1])}let n="image-"+Math.random().toString(16).slice(2),o=window.baseUrl(`/loading.gif#upload${n}`),s=this.editor.cm.getSelection(),i=`![${s}](${o})`,a=this.editor.cm.getCursor();this.editor.cm.replaceSelection(i),this.editor.cm.setCursor({line:a.line,ch:a.ch+s.length+3});let l="image-"+Date.now()+"."+t,c=new FormData;c.append("file",e,l),c.append("uploaded_to",this.editor.config.pageId),window.$http.post("/images/gallery",c).then(u=>{let d=`[![${s}](${u.data.thumbs.display})](${u.data.url})`;this.findAndReplaceContent(i,d)}).catch(u=>{window.$events.emit("error",this.editor.config.text.imageUploadError),this.findAndReplaceContent(i,s),console.log(u)})}syncDisplayPosition(){let e=this.editor.cm.getScrollInfo();if(e.top+e.clientHeight===e.height){this.editor.display.scrollToIndex(-1);return}let n=this.editor.cm.lineAtHeight(e.top,"local"),o=this.editor.cm.getRange({line:0,ch:null},{line:n,ch:null}),a=new DOMParser().parseFromString(this.editor.markdown.render(o),"text/html").documentElement.querySelectorAll("body > *");this.editor.display.scrollToIndex(a.length)}insertTemplate(e,t,n){let o=this.editor.cm.coordsChar({left:t,top:n});this.editor.cm.setCursor(o),window.$http.get(`/templates/${e}`).then(s=>{let i=s.data.markdown||s.data.html;this.editor.cm.replaceSelection(i)})}insertClipboardImages(e){let t=this.editor.cm.coordsChar({left:event.pageX,top:event.pageY});this.editor.cm.setCursor(t);for(let n of e)this.uploadImage(n)}};var Bi=class{c
`).length;t.style.height=n*20+40+"px",this.editingComment=e}updateComment(e){let t=e.target;e.preventDefault();let o={text:t.querySelector("textarea").value,parent_id:this.parentId||null};this.showLoading(t);let s=this.editingComment.getAttribute("comment");window.$http.put(`/comment/${s}`,o).then(i=>{let a=document.createElement("div");a.innerHTML=i.data,this.editingComment.innerHTML=a.children[0].innerHTML,window.$events.success(this.updatedText),window.$components.init(this.editingComment),this.closeUpdateForm(),this.editingComment=null}).catch(window.$events.showValidationErrors).then(()=>{this.hideLoading(t)})}deleteComment(e){let t=e.getAttribute("comment");this.showLoading(e.querySelector("[comment-content]")),window.$http.delete(`/comment/${t}`).then(n=>{e.parentNode.removeChild(e),window.$events.success(this.deletedText),this.updateCount(),this.hideForm()})}saveComment(e){e.preventDefault(),e.stopPropagation();let n={text:this.formInput.value,parent_id:this.parentId||null};this.showLoading(this.form),window.$http.post(`/comment/${this.pageId}`,n).then(o=>{let s=tr(o.data);this.container.appendChild(s),window.$components.init(s),window.$events.success(this.createdText),this.resetForm(),this.updateCount()}).catch(o=>{window.$events.showValidationErrors(o),this.hideLoading(this.form)})}updateCount(){let e=this.container.children.length;this.elem.querySelector("[comments-title]").textContent=window.trans_plural(this.countText,e,{count:e})}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(e){this.showForm(),this.parentId=Number(e.getAttribute("local-id")),this.replyToRow.style.display="block";let t=this.replyToRow.querySelector("a");t.textContent=`#${this.parentId}`,t.href=`#comment${this.parentId}`}removeReplyTo(){this.parentId=null,this.replyToRow.style.display="none"}showLoading(e){let t=e.querySelectorAll(".form-group");for(let n of t)n.style.display="none";e.querySelector(".form-group.loading").style.display="block"}hideLoading(e){let t=e.querySelectorAll(".form-group");for(let n of t)n.style.display="block";e.querySelector(".form-group.loading").style.display="none"}};var qi=class extends V{setup(){if(this.container=this.$el,this.pageId=this.$opts.pageId,window.importVersioned("code").then(t=>t.highlight()),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let t=window.location.hash.replace(/%20/g," ").substring(1);this.goToText(t)}let e=document.querySelector(".sidebar-page-nav");e&&We(e,"a","click",(t,n)=>{t.preventDefault(),window.$components.first("tri-layout").showContent();let o=n.getAttribute("href").substr(1);this.goToText(o),window.history.pushState(null,null,"#"+o)})}goToText(e){let t=document.getElementById(e);if(To(".page-content [data-highlighted]",n=>{n.removeAttribute("data-highlighted"),n.style.backgroundColor=null}),t!==null)jr(t);else{let n=Zs(".page-content > div > *",e);n&&jr(n)}}setupNavHighlighting(){let e=document.querySelector(".sidebar-page-nav"),t=document.querySelector(".page-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.length>0&&e!==null&&n(t);function n(i){let a={rootMargin:"0px 0px 0px 0px",threshold:1},l=new IntersectionObserver(o,a);for(let c of i)l.observe(c)}function o(i,a){for(let l of i){let c=l.intersectionRatio===1;s(l.target.id,c)}}function s(i,a){To('a[href="#'+i+'"]',l=>{l.closest("li").classList.toggle("current-heading",a)})}}setupDetailsCodeBlockRef
`);return i.textContent}connectedCallback(){let s=Date.now();if(this.cm)return;this.cleanChildContent();let i=this.getContent(),l=i.split(`
`).length*19.2+18+24;this.style.height=`${l}px`;let c=this.shadowRoot.querySelector(".CodeMirrorContainer"),u=d=>{this.cm=d.wysiwygView(c,i,this.getLanguage()),setTimeout(()=>d.updateLayout(this.cm),10),setTimeout(()=>this.style.height=null,12)};window.importVersioned("code").then(d=>{let h=Date.now()-s<20?20:0;setTimeout(()=>u(d),h)})}cleanChildContent(){let s=this.querySelector("pre");if(s)for(let i of s.childNodes)i.nodeName==="#text"&&i.textContent==="\uFEFF"&&i.remove()}}t.customElements.define("code-block",n)}function Vm(r,e){r.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>'),r.ui.registry.addButton("codeeditor",{tooltip:"Insert code block",icon:"codeblock",onAction(){r.execCommand("codeeditor")}}),r.ui.registry.addButton("editcodeeditor",{tooltip:"Edit code block",icon:"edit-block",onAction(){r.execCommand("codeeditor")}}),r.addCommand("codeeditor",()=>{let t=r.selection.getNode(),n=t.ownerDocument;if(fd(t))pd(r,t);else{let o=r.selection.getContent({format:"text"});md(r,o,"",(s,i)=>{let a=n.createElement("pre"),l=n.createElement("code");l.classList.add(`language-${i}`),l.innerText=s,a.append(l),r.insertContent(a.outerHTML)})}}),r.on("dblclick",t=>{let n=r.selection.getNode();fd(n)&&pd(r,n)}),r.on("PreInit",()=>{r.parser.addNodeFilter("pre",function(t){for(let n of t){let o=tinymce.html.Node.create("code-block",{contenteditable:"false"}),s=n.getAll("span");for(let i of s)i.unwrap();n.attr("style",null),n.wrap(o)}}),r.parser.addNodeFilter("code-block",function(t){for(let n of t)n.attr("contenteditable","false")}),r.serializer.addNodeFilter("code-block",function(t){for(let n of t)n.unwrap()})}),r.ui.registry.addContextToolbar("codeeditor",{predicate:function(t){return t.nodeName.toLowerCase()==="code-block"},items:"editcodeeditor",position:"node",scope:"node"}),r.on("PreInit",()=>{Hm(r)})}function gd(r){return Vm}var Ct=null,br=null,yr={};function Ns(r){return r.hasAttribute("drawio-diagram")}function qm(r,e=null){Ct=r,br=e,window.$components.first("image-manager").show(function(n){if(e){let o=e.querySelector("img");Ct.undoManager.transact(function(){Ct.dom.setAttrib(o,"src",n.url),Ct.dom.setAttrib(e,"drawio-diagram",n.id)})}else{let o=`<div drawio-diagram="${n.id}" contenteditable="false"><img src="${n.url}"></div>`;Ct.insertContent(o)}},"drawio")}function vd(r,e=null){Ct=r,br=e,kt.show(yr.drawioUrl,Wm,Gm)}async function Gm(r){let e="image-"+Math.random().toString(16).slice(2),t=window.baseUrl("/loading.gif"),n=o=>{o.status===413?window.$events.emit("error",yr.translations.serverUploadLimitText):window.$events.emit("error",yr.translations.imageUploadErrorText),console.log(o)};if(br){kt.close();let o=br.querySelector("img");try{let s=await kt.upload(r,yr.pageId);Ct.undoManager.transact(function(){Ct.dom.setAttrib(o,"src",s.url),Ct.dom.setAttrib(br,"drawio-diagram",s.id)})}catch(s){n(s)}return}setTimeout(async()=>{Ct.insertContent(`<div drawio-diagram contenteditable="false"><img src="${t}" id="${e}"></div>`),kt.close();try{let o=await kt.upload(r,yr.pageId);Ct.undoManager.transact(function(){Ct.dom.setAttrib(e,"src",o.url),Ct.dom.get(e).parentNode.setAttribute("drawio-diagram",o.id)})}catch(o){Ct.dom.remove(e),n(o)}},5)}function Wm(){if(!br)return Promise.resolve("");let r=br.getAttribute("drawio-diagram");return kt.load(r)}function yd(r){return yr=r,function(e,t){e.addCommand("drawio",()=>{let n=e.selection.getNode();vd(e,Ns(n)?n:null)}),e.ui.registry.addIcon("diagram",`<svg width="24" height="24" fill="${yr.darkMode?"#BBB":"#000000"}" xmlns="http://www.w3.org/2000/svg"><path d="M20.716 7.639V2.845h-4.794v1.598h-7.99V2.845H3.138v4.794h1.598v7.99H3.138v
`),e=r.findIndex(n=>n.trim()==="<!-- Start: custom user content -->"),t=r.findIndex(n=>n.trim()==="<!-- End: custom user content -->");return e===-1||t===-1?"":r.slice(e+1,t).join(`
`)}function mg(r){r.serializer.addNodeFilter("br",function(e){for(let t of e)if(t.parent&&t.parent.name==="code"){let n=tinymce.html.Node.create("#text");n.value=`
`,t.replace(n)}})}function gg(r){return function(e){e.on("ExecCommand change input NodeChange ObjectResized",t),sd(e),cd(e,r),e.on("init",()=>{t(),ad(e),window.editor=e,od(e)}),e.on("PreInit",()=>{mg(e)});function t(){r.darkMode&&e.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change","")}window.$events.emitPublic(r.containerElement,"editor-tinymce::setup",{editor:e}),e.ui.registry.addButton("inlinecode",{tooltip:"Inline code",icon:"sourcecode",onAction(){e.execCommand("mceToggleFormat",!1,"code")}})}}function vg(r){return`
html, body, html.dark-mode {
background: ${r.darkMode?"#222":"#fff"};
}
body {
padding-left: 15px !important;
padding-right: 15px !important;
height: initial !important;
margin:0!important;
margin-left: auto! important;
margin-right: auto !important;
overflow-y: hidden !important;
}`.trim().replace(`
`,"")}function kd(r){return window.tinymce.addI18n(r.language,r.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:r.darkMode?"tinymce-5-dark":"tinymce-5",body_class:"page-content",browser_spellcheck:!0,relative_urls:!1,language:r.language,directionality:r.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]"].join(","),plugins:fg(r),contextmenu:!1,toolbar:ud(r),content_style:vg(r),style_formats:cg,style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:ug,table_style_by_css:!0,table_use_colgroups:!0,file_picker_types:"file image",color_map:dg,file_picker_callback:hg,paste_preprocess(t,n){n.content.indexOf('<img src="file://')!==-1&&(n.content="")},init_instance_callback(t){let n=t.getDoc().querySelector("head");n.innerHTML+=pg()},setup(t){hd(t),dd(t,r),gg(r)(t)}}}var go=class extends V{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.isDarkMode=document.documentElement.classList.contains("dark-mode"),this.tinyMceConfig=kd({language:this.$opts.language,containerElement:this.elem,darkMode:this.isDarkMode,textDirection:this.textDirection,drawioUrl:this.getDrawIoUrl(),pageId:Number(this.pageId),translations:{imageUploadErrorText:this.$opts.imageUploadErrorText,serverUploadLimitText:this.$opts.serverUploadLimitText},translationMap:window.editor_translations}),window.$events.emitPublic(this.elem,"editor-tinymce::pre-init",{config:this.tinyMceConfig}),window.tinymce.init(this.tinyMceConfig).then(e=>{this.editor=e[0]})}getDrawIoUrl(){let e=document.querySelector("[drawio-url]");return e?e.getAttribute("drawio-url"):""}getContent(){return{html:this.editor.getContent()}}};window.baseUrl=function(r){let e=document.querySelector('meta[name="base-url"]').getAttribute("content");return e[e.length-1]==="/"&&(e=e.slice(0,e.length-1)),r[0]==="/"&&(r=r.slice(1)),e+"/"+r};window.importVersioned=function(r){let e=document.querySelector('link[href*="/dist/styles.css?version="]').href.split("?version=").pop();return import(window.baseUrl(`dist/${r}.js?version=${e}`))};window.$http=Ws;window.$events=qs;var Or=new Ys;window.trans=Or.get.bind(Or);window.trans_choice=Or.getPlural.bind(Or);window.trans_plural=Or.parsePlural.bind(Or);Ao(zs);window.$components=ko;So();
/*! Bundled license information:
clipboard/dist/clipboard.min.js:
(*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*)
sortablejs/modular/sortable.esm.js:
(**!
* Sortable 1.15.0
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*)
*/
//# sourceMappingURL=app.js.map