mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
61 lines
363 KiB
JavaScript
61 lines
363 KiB
JavaScript
var rd=Object.create;var zr=Object.defineProperty;var nd=Object.getOwnPropertyDescriptor;var id=Object.getOwnPropertyNames;var od=Object.getPrototypeOf,sd=Object.prototype.hasOwnProperty;var Ni=r=>zr(r,"__esModule",{value:!0});var ad=(r,e)=>()=>(r&&(e=r(r=0)),e);var ie=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ld=(r,e)=>{for(var t in e)zr(r,t,{get:e[t],enumerable:!0})},_i=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of id(e))!sd.call(r,o)&&(t||o!=="default")&&zr(r,o,{get:()=>e[o],enumerable:!(n=nd(e,o))||n.enumerable});return r},jr=(r,e)=>_i(Ni(zr(r!=null?rd(od(r)):{},"default",!e&&r&&r.__esModule?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r),ud=(r=>(e,t)=>r&&r.get(e)||(t=_i(Ni({}),e,1),r&&r.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var Xo=ie((pn,Qn)=>{(function(e,t){if(typeof pn=="object"&&typeof Qn=="object")Qn.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var n=t();for(var o in n)(typeof pn=="object"?pn: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),u=i(3070),c=a("unscopables"),f=Array.prototype;f[c]==null&&u.f(f,c,{configurable:!0,value:l(null)}),o.exports=function(d){f[c][d]=!0}},1530:function(o,s,i){"use strict";var a=i(8710).charAt;o.exports=function(l,u,c){return u+(c?a(l,u).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),u=i(7854),c=i(111),f=i(6656),d=i(648),h=i(8880),m=i(1320),v=i(3070).f,y=i(9518),w=i(7674),x=i(5112),D=i(9711),I=u.Int8Array,N=I&&I.prototype,S=u.Uint8ClampedArray,M=S&&S.prototype,L=I&&y(I),R=N&&y(N),O=Object.prototype,F=O.isPrototypeOf,_=x("toStringTag"),j=D("TYPED_ARRAY_TAG"),H=a&&!!w&&d(u.opera)!=="Opera",te=!1,W,J={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},re={BigInt64Array:8,BigUint64Array:8},be=function(Se){if(!c(Se))return!1;var ke=d(Se);return ke==="DataView"||f(J,ke)||f(re,ke)},Ae=function(he){if(!c(he))return!1;var Se=d(he);return f(J,Se)||f(re,Se)},xe=function(he){if(Ae(he))return he;throw TypeError("Target is not a typed array")},Fe=function(he){if(w){if(F.call(L,he))return he}else for(var Se in J)if(f(J,W)){var ke=u[Se];if(ke&&(he===ke||F.call(ke,he)))return he}throw TypeError("Target is not a typed array constructor")},Re=function(he,Se,ke){if(!!l){if(ke)for(var Ie in J){var Oe=u[Ie];Oe&&f(Oe.prototype,he)&&delete Oe.prototype[he]}(!R[he]||ke)&&m(R,he,ke?Se:H&&N[he]||Se)}},_e=function(he,Se,ke){var Ie,Oe;if(!!l){if(w){if(ke)for(Ie in J)Oe=u[Ie],Oe&&f(Oe,he)&&delete Oe[he];if(!L[he]||ke)try{return m(L,he,ke?Se:H&&I[he]||Se)}catch{}else return}for(Ie in J)Oe=u[Ie],Oe&&(!Oe[he]||ke)&&m(Oe,he,Se)}};for(W in J)u[W]||(H=!1);if((!H||typeof L!="function"||L===Function.prototype)&&(L=function(){throw TypeError("Incorrect invocation")},H))for(W in J)u[W]&&w(u[W],L);if((!H||!R||R===O)&&(R=L.prototype,H))for(W in J)u[W]&&w(u[W].prototype,R);if(H&&y(M)!==R&&w(M,R),l&&!f(R,_)){te=!0,v(R,_,{get:function(){return c(this)?this[j]:void 0}});for(W in J)u[W]&&h(u[W],j,W)}o.exports={NATIVE_ARRAY_BUFFER_VIEWS:H,TYPED_ARRAY_TAG:te&&j,aTypedArray:xe,aTypedArrayConstructor:Fe,exportTypedArrayMethod:Re,exportTypedArrayStaticMethod:_e,isView:be,isTypedArray:Ae,TypedArray:L,TypedArrayPrototype:R}},3331:function(o,s,i){"use strict";var a=i(7854),l=i(9781),u=i(4019),c=i(8880),f=i(2248),d=i(7293),h=i(5787),m=i(9958),v=i(7466),y=i(7067),w=i(1179),x=i(9518),D=i(7674),I=i(8006).f,N=i(3070).f,S=i(1285),M=i(8003),L=i(9909),R=L.get,O=L.set,F="ArrayBuffer",_="DataView",j="prototype",H="Wrong length",te="Wrong index",W=a[F],J=W,re=a[_],be=re&&re[j],Ae=Object.prototype,xe=a.RangeError,Fe=w.pack,Re=w.unpack,_e=function(Q){return[Q&255]},he=function(Q){return[Q&255,Q>>8&255]},Se=function(Q){return[Q&255,Q>>8&255,Q>>16&255,Q>>24&255]},ke=function(Q){return Q[3]<<24|Q[2]<<16|Q[1]<<8|Q[0]},Ie=function(Q){return Fe(Q,23,4)},Oe=function(Q){return Fe(Q,52,8)},ot=function(Q,V){N(Q[j],V,{get:function(){return R(this)[V]}})},Ye=function(Q,V,ne,ce){var Be=y(ne),Ve=R(Q);if(Be+V>Ve.byteLength)throw xe(te);var st=R(Ve.buffer).bytes,et=Be+Ve.byteOffset,Te=st.slice(et,et+V);return ce?Te:Te.reverse()},Qe=function(Q,V,ne,ce,Be,Ve){var st=y(ne),et=R(Q);if(st+V>et.byteLength)throw xe(te);for(var Te=R(et.buffer).bytes,Ce=st+et.byteOffset,Mt=ce(+Be),dt=0;dt<V;dt++)Te[Ce+dt]=Mt[Ve?dt:V-dt-1]};if(!u)J=function(V){h(this,J,F);var ne=y(V);O(this,{bytes:S.call(new Array(ne),0),byteLength:ne}),l||(this.byteLength=ne)},re=function(V,ne,ce){h(this,re,_),h(V,J,_);var Be=R(V).byteLength,Ve=m(ne);if(Ve<0||Ve>Be)throw xe("Wrong offset");if(ce=ce===void 0?Be-Ve:v(ce),Ve+ce>Be)throw xe(H);O(this,{buffer:V,byteLength:ce,byteOffset:Ve}),l||(this.buffer=V,this.byteLength=ce,this.byteOffset=Ve)},l&&(ot(J,"byteLength"),ot(re,"buffer"),ot(re,"byteLength"),ot(re,"byteOffset")),f(re[j],{getInt8:function(V){return Ye(this,1,V)[0]<<24>>24},getUint8:function(V){return Ye(this,1,V)[0]},getInt16:function(V){var ne=Ye(this,2,V,arguments.length>1?arguments[1]:void 0);return(ne[1]<<8|ne[0])<<16>>16},getUint16:function(V){var ne=Ye(this,2,V,arguments.length>1?arguments[1]:void 0);return ne[1]<<8|ne[0]},getInt32:function(V){return ke(Ye(this,4,V,arguments.length>1?arguments[1]:void 0))},getUint32:function(V){return ke(Ye(this,4,V,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(V){return Re(Ye(this,4,V,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(V){return Re(Ye(this,8,V,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(V,ne){Qe(this,1,V,_e,ne)},setUint8:function(V,ne){Qe(this,1,V,_e,ne)},setInt16:function(V,ne){Qe(this,2,V,he,ne,arguments.length>2?arguments[2]:void 0)},setUint16:function(V,ne){Qe(this,2,V,he,ne,arguments.length>2?arguments[2]:void 0)},setInt32:function(V,ne){Qe(this,4,V,Se,ne,arguments.length>2?arguments[2]:void 0)},setUint32:function(V,ne){Qe(this,4,V,Se,ne,arguments.length>2?arguments[2]:void 0)},setFloat32:function(V,ne){Qe(this,4,V,Ie,ne,arguments.length>2?arguments[2]:void 0)},setFloat64:function(V,ne){Qe(this,8,V,Oe,ne,arguments.length>2?arguments[2]:void 0)}});else{if(!d(function(){W(1)})||!d(function(){new W(-1)})||d(function(){return new W,new W(1.5),new W(NaN),W.name!=F})){J=function(V){return h(this,J),new W(y(V))};for(var me=J[j]=W[j],oe=I(W),ue=0,fe;oe.length>ue;)(fe=oe[ue++])in J||c(J,fe,W[fe]);me.constructor=J}D&&x(be)!==Ae&&D(be,Ae);var le=new re(new J(2)),pe=be.setInt8;le.setInt8(0,2147483648),le.setInt8(1,2147483649),(le.getInt8(0)||!le.getInt8(1))&&f(be,{setInt8:function(V,ne){pe.call(this,V,ne<<24>>24)},setUint8:function(V,ne){pe.call(this,V,ne<<24>>24)}},{unsafe:!0})}M(J,F),M(re,_),o.exports={ArrayBuffer:J,DataView:re}},1048:function(o,s,i){"use strict";var a=i(7908),l=i(1400),u=i(7466),c=Math.min;o.exports=[].copyWithin||function(d,h){var m=a(this),v=u(m.length),y=l(d,v),w=l(h,v),x=arguments.length>2?arguments[2]:void 0,D=c((x===void 0?v:l(x,v))-w,v-y),I=1;for(w<y&&y<w+D&&(I=-1,w+=D-1,y+=D-1);D-- >0;)w in m?m[y]=m[w]:delete m[y],y+=I,w+=I;return m}},1285:function(o,s,i){"use strict";var a=i(7908),l=i(1400),u=i(7466);o.exports=function(f){for(var d=a(this),h=u(d.length),m=arguments.length,v=l(m>1?arguments[1]:void 0,h),y=m>2?arguments[2]:void 0,w=y===void 0?h:l(y,h);w>v;)d[v++]=f;return d}},8533:function(o,s,i){"use strict";var a=i(2092).forEach,l=i(9341),u=l("forEach");o.exports=u?[].forEach:function(f){return a(this,f,arguments.length>1?arguments[1]:void 0)}},8457:function(o,s,i){"use strict";var a=i(9974),l=i(7908),u=i(3411),c=i(7659),f=i(7466),d=i(6135),h=i(1246);o.exports=function(v){var y=l(v),w=typeof this=="function"?this:Array,x=arguments.length,D=x>1?arguments[1]:void 0,I=D!==void 0,N=h(y),S=0,M,L,R,O,F,_;if(I&&(D=a(D,x>2?arguments[2]:void 0,2)),N!=null&&!(w==Array&&c(N)))for(O=N.call(y),F=O.next,L=new w;!(R=F.call(O)).done;S++)_=I?u(O,D,[R.value,S],!0):R.value,d(L,S,_);else for(M=f(y.length),L=new w(M);M>S;S++)_=I?D(y[S],S):y[S],d(L,S,_);return L.length=S,L}},1318:function(o,s,i){var a=i(5656),l=i(7466),u=i(1400),c=function(f){return function(d,h,m){var v=a(d),y=l(v.length),w=u(m,y),x;if(f&&h!=h){for(;y>w;)if(x=v[w++],x!=x)return!0}else for(;y>w;w++)if((f||w in v)&&v[w]===h)return f||w||0;return!f&&-1}};o.exports={includes:c(!0),indexOf:c(!1)}},2092:function(o,s,i){var a=i(9974),l=i(8361),u=i(7908),c=i(7466),f=i(5417),d=[].push,h=function(m){var v=m==1,y=m==2,w=m==3,x=m==4,D=m==6,I=m==7,N=m==5||D;return function(S,M,L,R){for(var O=u(S),F=l(O),_=a(M,L,3),j=c(F.length),H=0,te=R||f,W=v?te(S,j):y||I?te(S,0):void 0,J,re;j>H;H++)if((N||H in F)&&(J=F[H],re=_(J,H,O),m))if(v)W[H]=re;else if(re)switch(m){case 3:return!0;case 5:return J;case 6:return H;case 2:d.call(W,J)}else switch(m){case 4:return!1;case 7:d.call(W,J)}return D?-1:w||x?x:W}};o.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterOut:h(7)}},6583:function(o,s,i){"use strict";var a=i(5656),l=i(9958),u=i(7466),c=i(9341),f=Math.min,d=[].lastIndexOf,h=!!d&&1/[1].lastIndexOf(1,-0)<0,m=c("lastIndexOf"),v=h||!m;o.exports=v?function(w){if(h)return d.apply(this,arguments)||0;var x=a(this),D=u(x.length),I=D-1;for(arguments.length>1&&(I=f(I,l(arguments[1]))),I<0&&(I=D+I);I>=0;I--)if(I in x&&x[I]===w)return I||0;return-1}:d},1194:function(o,s,i){var a=i(7293),l=i(5112),u=i(7392),c=l("species");o.exports=function(f){return u>=51||!a(function(){var d=[],h=d.constructor={};return h[c]=function(){return{foo:1}},d[f](Boolean).foo!==1})}},9341:function(o,s,i){"use strict";var a=i(7293);o.exports=function(l,u){var c=[][l];return!!c&&a(function(){c.call(null,u||function(){throw 1},1)})}},3671:function(o,s,i){var a=i(3099),l=i(7908),u=i(8361),c=i(7466),f=function(d){return function(h,m,v,y){a(m);var w=l(h),x=u(w),D=c(w.length),I=d?D-1:0,N=d?-1:1;if(v<2)for(;;){if(I in x){y=x[I],I+=N;break}if(I+=N,d?I<0:D<=I)throw TypeError("Reduce of empty array with no initial value")}for(;d?I>=0:D>I;I+=N)I in x&&(y=m(y,x[I],I,w));return y}};o.exports={left:f(!1),right:f(!0)}},5417:function(o,s,i){var a=i(111),l=i(3157),u=i(5112),c=u("species");o.exports=function(f,d){var h;return l(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||l(h.prototype))?h=void 0:a(h)&&(h=h[c],h===null&&(h=void 0))),new(h===void 0?Array:h)(d===0?0:d)}},3411:function(o,s,i){var a=i(9670),l=i(9212);o.exports=function(u,c,f,d){try{return d?c(a(f)[0],f[1]):c(f)}catch(h){throw l(u),h}}},7072:function(o,s,i){var a=i(5112),l=a("iterator"),u=!1;try{var c=0,f={next:function(){return{done:!!c++}},return:function(){u=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}o.exports=function(d,h){if(!h&&!u)return!1;var m=!1;try{var v={};v[l]=function(){return{next:function(){return{done:m=!0}}}},d(v)}catch{}return m}},4326:function(o){var s={}.toString;o.exports=function(i){return s.call(i).slice(8,-1)}},648:function(o,s,i){var a=i(1694),l=i(4326),u=i(5112),c=u("toStringTag"),f=l(function(){return arguments}())=="Arguments",d=function(h,m){try{return h[m]}catch{}};o.exports=a?l:function(h){var m,v,y;return h===void 0?"Undefined":h===null?"Null":typeof(v=d(m=Object(h),c))=="string"?v:f?l(m):(y=l(m))=="Object"&&typeof m.callee=="function"?"Arguments":y}},9920:function(o,s,i){var a=i(6656),l=i(3887),u=i(1236),c=i(3070);o.exports=function(f,d){for(var h=l(d),m=c.f,v=u.f,y=0;y<h.length;y++){var w=h[y];a(f,w)||m(f,w,v(d,w))}}},8544:function(o,s,i){var a=i(7293);o.exports=!a(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})},4994:function(o,s,i){"use strict";var a=i(3383).IteratorPrototype,l=i(30),u=i(9114),c=i(8003),f=i(7497),d=function(){return this};o.exports=function(h,m,v){var y=m+" Iterator";return h.prototype=l(a,{next:u(1,v)}),c(h,y,!1,!0),f[y]=d,h}},8880:function(o,s,i){var a=i(9781),l=i(3070),u=i(9114);o.exports=a?function(c,f,d){return l.f(c,f,u(1,d))}:function(c,f,d){return c[f]=d,c}},9114:function(o){o.exports=function(s,i){return{enumerable:!(s&1),configurable:!(s&2),writable:!(s&4),value:i}}},6135:function(o,s,i){"use strict";var a=i(7593),l=i(3070),u=i(9114);o.exports=function(c,f,d){var h=a(f);h in c?l.f(c,h,u(0,d)):c[h]=d}},654:function(o,s,i){"use strict";var a=i(2109),l=i(4994),u=i(9518),c=i(7674),f=i(8003),d=i(8880),h=i(1320),m=i(5112),v=i(1913),y=i(7497),w=i(3383),x=w.IteratorPrototype,D=w.BUGGY_SAFARI_ITERATORS,I=m("iterator"),N="keys",S="values",M="entries",L=function(){return this};o.exports=function(R,O,F,_,j,H,te){l(F,O,_);var W=function(Se){if(Se===j&&xe)return xe;if(!D&&Se in be)return be[Se];switch(Se){case N:return function(){return new F(this,Se)};case S:return function(){return new F(this,Se)};case M:return function(){return new F(this,Se)}}return function(){return new F(this)}},J=O+" Iterator",re=!1,be=R.prototype,Ae=be[I]||be["@@iterator"]||j&&be[j],xe=!D&&Ae||W(j),Fe=O=="Array"&&be.entries||Ae,Re,_e,he;if(Fe&&(Re=u(Fe.call(new R)),x!==Object.prototype&&Re.next&&(!v&&u(Re)!==x&&(c?c(Re,x):typeof Re[I]!="function"&&d(Re,I,L)),f(Re,J,!0,!0),v&&(y[J]=L))),j==S&&Ae&&Ae.name!==S&&(re=!0,xe=function(){return Ae.call(this)}),(!v||te)&&be[I]!==xe&&d(be,I,xe),y[O]=xe,j)if(_e={values:W(S),keys:H?xe:W(N),entries:W(M)},te)for(he in _e)(D||re||!(he in be))&&h(be,he,_e[he]);else a({target:O,proto:!0,forced:D||re},_e);return _e}},9781:function(o,s,i){var a=i(7293);o.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},317:function(o,s,i){var a=i(7854),l=i(111),u=a.document,c=l(u)&&l(u.createElement);o.exports=function(f){return c?u.createElement(f):{}}},8324:function(o){o.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8113:function(o,s,i){var a=i(5005);o.exports=a("navigator","userAgent")||""},7392:function(o,s,i){var a=i(7854),l=i(8113),u=a.process,c=u&&u.versions,f=c&&c.v8,d,h;f?(d=f.split("."),h=d[0]+d[1]):l&&(d=l.match(/Edge\/(\d+)/),(!d||d[1]>=74)&&(d=l.match(/Chrome\/(\d+)/),d&&(h=d[1]))),o.exports=h&&+h},748:function(o){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(o,s,i){var a=i(7854),l=i(1236).f,u=i(8880),c=i(1320),f=i(3505),d=i(9920),h=i(4705);o.exports=function(m,v){var y=m.target,w=m.global,x=m.stat,D,I,N,S,M,L;if(w?I=a:x?I=a[y]||f(y,{}):I=(a[y]||{}).prototype,I)for(N in v){if(M=v[N],m.noTargetGet?(L=l(I,N),S=L&&L.value):S=I[N],D=h(w?N:y+(x?".":"#")+N,m.forced),!D&&S!==void 0){if(typeof M==typeof S)continue;d(M,S)}(m.sham||S&&S.sham)&&u(M,"sham",!0),c(I,N,M,m)}}},7293:function(o){o.exports=function(s){try{return!!s()}catch{return!0}}},7007:function(o,s,i){"use strict";i(4916);var a=i(1320),l=i(7293),u=i(5112),c=i(2261),f=i(8880),d=u("species"),h=!l(function(){var x=/./;return x.exec=function(){var D=[];return D.groups={a:"7"},D},"".replace(x,"$<a>")!=="7"}),m=function(){return"a".replace(/./,"$0")==="$0"}(),v=u("replace"),y=function(){return/./[v]?/./[v]("a","$0")==="":!1}(),w=!l(function(){var x=/(?:)/,D=x.exec;x.exec=function(){return D.apply(this,arguments)};var I="ab".split(x);return I.length!==2||I[0]!=="a"||I[1]!=="b"});o.exports=function(x,D,I,N){var S=u(x),M=!l(function(){var j={};return j[S]=function(){return 7},""[x](j)!=7}),L=M&&!l(function(){var j=!1,H=/a/;return x==="split"&&(H={},H.constructor={},H.constructor[d]=function(){return H},H.flags="",H[S]=/./[S]),H.exec=function(){return j=!0,null},H[S](""),!j});if(!M||!L||x==="replace"&&!(h&&m&&!y)||x==="split"&&!w){var R=/./[S],O=I(S,""[x],function(j,H,te,W,J){return H.exec===c?M&&!J?{done:!0,value:R.call(H,te,W)}:{done:!0,value:j.call(te,H,W)}:{done:!1}},{REPLACE_KEEPS_$0:m,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:y}),F=O[0],_=O[1];a(String.prototype,x,F),a(RegExp.prototype,S,D==2?function(j,H){return _.call(j,this,H)}:function(j){return _.call(j,this)})}N&&f(RegExp.prototype[S],"sham",!0)}},9974:function(o,s,i){var a=i(3099);o.exports=function(l,u,c){if(a(l),u===void 0)return l;switch(c){case 0:return function(){return l.call(u)};case 1:return function(f){return l.call(u,f)};case 2:return function(f,d){return l.call(u,f,d)};case 3:return function(f,d,h){return l.call(u,f,d,h)}}return function(){return l.apply(u,arguments)}}},5005:function(o,s,i){var a=i(857),l=i(7854),u=function(c){return typeof c=="function"?c:void 0};o.exports=function(c,f){return arguments.length<2?u(a[c])||u(l[c]):a[c]&&a[c][f]||l[c]&&l[c][f]}},1246:function(o,s,i){var a=i(648),l=i(7497),u=i(5112),c=u("iterator");o.exports=function(f){if(f!=null)return f[c]||f["@@iterator"]||l[a(f)]}},8554:function(o,s,i){var a=i(9670),l=i(1246);o.exports=function(u){var c=l(u);if(typeof c!="function")throw TypeError(String(u)+" is not iterable");return a(c.call(u))}},647:function(o,s,i){var a=i(7908),l=Math.floor,u="".replace,c=/\$([$&'`]|\d\d?|<[^>]*>)/g,f=/\$([$&'`]|\d\d?)/g;o.exports=function(d,h,m,v,y,w){var x=m+d.length,D=v.length,I=f;return y!==void 0&&(y=a(y),I=c),u.call(w,I,function(N,S){var M;switch(S.charAt(0)){case"$":return"$";case"&":return d;case"`":return h.slice(0,m);case"'":return h.slice(x);case"<":M=y[S.slice(1,-1)];break;default:var L=+S;if(L===0)return N;if(L>D){var R=l(L/10);return R===0?N:R<=D?v[R-1]===void 0?S.charAt(1):v[R-1]+S.charAt(1):N}M=v[L-1]}return M===void 0?"":M})}},7854:function(o,s,i){var a=function(l){return l&&l.Math==Math&&l};o.exports=a(typeof globalThis=="object"&&globalThis)||a(typeof window=="object"&&window)||a(typeof self=="object"&&self)||a(typeof i.g=="object"&&i.g)||function(){return this}()||Function("return this")()},6656:function(o){var s={}.hasOwnProperty;o.exports=function(i,a){return s.call(i,a)}},3501:function(o){o.exports={}},490:function(o,s,i){var a=i(5005);o.exports=a("document","documentElement")},4664:function(o,s,i){var a=i(9781),l=i(7293),u=i(317);o.exports=!a&&!l(function(){return Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a!=7})},1179:function(o){var s=Math.abs,i=Math.pow,a=Math.floor,l=Math.log,u=Math.LN2,c=function(d,h,m){var v=new Array(m),y=m*8-h-1,w=(1<<y)-1,x=w>>1,D=h===23?i(2,-24)-i(2,-77):0,I=d<0||d===0&&1/d<0?1:0,N=0,S,M,L;for(d=s(d),d!=d||d===1/0?(M=d!=d?1:0,S=w):(S=a(l(d)/u),d*(L=i(2,-S))<1&&(S--,L*=2),S+x>=1?d+=D/L:d+=D*i(2,1-x),d*L>=2&&(S++,L/=2),S+x>=w?(M=0,S=w):S+x>=1?(M=(d*L-1)*i(2,h),S=S+x):(M=d*i(2,x-1)*i(2,h),S=0));h>=8;v[N++]=M&255,M/=256,h-=8);for(S=S<<h|M,y+=h;y>0;v[N++]=S&255,S/=256,y-=8);return v[--N]|=I*128,v},f=function(d,h){var m=d.length,v=m*8-h-1,y=(1<<v)-1,w=y>>1,x=v-7,D=m-1,I=d[D--],N=I&127,S;for(I>>=7;x>0;N=N*256+d[D],D--,x-=8);for(S=N&(1<<-x)-1,N>>=-x,x+=h;x>0;S=S*256+d[D],D--,x-=8);if(N===0)N=1-w;else{if(N===y)return S?NaN:I?-1/0:1/0;S=S+i(2,h),N=N-w}return(I?-1:1)*S*i(2,N-h)};o.exports={pack:c,unpack:f}},8361:function(o,s,i){var a=i(7293),l=i(4326),u="".split;o.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(c){return l(c)=="String"?u.call(c,""):Object(c)}:Object},9587:function(o,s,i){var a=i(111),l=i(7674);o.exports=function(u,c,f){var d,h;return l&&typeof(d=c.constructor)=="function"&&d!==f&&a(h=d.prototype)&&h!==f.prototype&&l(u,h),u}},2788:function(o,s,i){var a=i(5465),l=Function.toString;typeof a.inspectSource!="function"&&(a.inspectSource=function(u){return l.call(u)}),o.exports=a.inspectSource},9909:function(o,s,i){var a=i(8536),l=i(7854),u=i(111),c=i(8880),f=i(6656),d=i(5465),h=i(6200),m=i(3501),v=l.WeakMap,y,w,x,D=function(O){return x(O)?w(O):y(O,{})},I=function(O){return function(F){var _;if(!u(F)||(_=w(F)).type!==O)throw TypeError("Incompatible receiver, "+O+" required");return _}};if(a){var N=d.state||(d.state=new v),S=N.get,M=N.has,L=N.set;y=function(O,F){return F.facade=O,L.call(N,O,F),F},w=function(O){return S.call(N,O)||{}},x=function(O){return M.call(N,O)}}else{var R=h("state");m[R]=!0,y=function(O,F){return F.facade=O,c(O,R,F),F},w=function(O){return f(O,R)?O[R]:{}},x=function(O){return f(O,R)}}o.exports={set:y,get:w,has:x,enforce:D,getterFor:I}},7659:function(o,s,i){var a=i(5112),l=i(7497),u=a("iterator"),c=Array.prototype;o.exports=function(f){return f!==void 0&&(l.Array===f||c[u]===f)}},3157:function(o,s,i){var a=i(4326);o.exports=Array.isArray||function(u){return a(u)=="Array"}},4705:function(o,s,i){var a=i(7293),l=/#|\.prototype\./,u=function(m,v){var y=f[c(m)];return y==h?!0:y==d?!1:typeof v=="function"?a(v):!!v},c=u.normalize=function(m){return String(m).replace(l,".").toLowerCase()},f=u.data={},d=u.NATIVE="N",h=u.POLYFILL="P";o.exports=u},111:function(o){o.exports=function(s){return typeof s=="object"?s!==null:typeof s=="function"}},1913:function(o){o.exports=!1},7850:function(o,s,i){var a=i(111),l=i(4326),u=i(5112),c=u("match");o.exports=function(f){var d;return a(f)&&((d=f[c])!==void 0?!!d:l(f)=="RegExp")}},9212:function(o,s,i){var a=i(9670);o.exports=function(l){var u=l.return;if(u!==void 0)return a(u.call(l)).value}},3383:function(o,s,i){"use strict";var a=i(7293),l=i(9518),u=i(8880),c=i(6656),f=i(5112),d=i(1913),h=f("iterator"),m=!1,v=function(){return this},y,w,x;[].keys&&(x=[].keys(),"next"in x?(w=l(l(x)),w!==Object.prototype&&(y=w)):m=!0);var D=y==null||a(function(){var I={};return y[h].call(I)!==I});D&&(y={}),(!d||D)&&!c(y,h)&&u(y,h,v),o.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:m}},7497:function(o){o.exports={}},133:function(o,s,i){var a=i(7293);o.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})},590:function(o,s,i){var a=i(7293),l=i(5112),u=i(1913),c=l("iterator");o.exports=!a(function(){var f=new URL("b?a=1&b=2&c=3","http://a"),d=f.searchParams,h="";return f.pathname="c%20d",d.forEach(function(m,v){d.delete("b"),h+=v+m}),u&&!f.toJSON||!d.sort||f.href!=="http://a/c%20d?a=1&c=3"||d.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!d[c]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("http://a#\u0431").hash!=="#%D0%B1"||h!=="a1c3"||new URL("http://x",void 0).host!=="x"})},8536:function(o,s,i){var a=i(7854),l=i(2788),u=a.WeakMap;o.exports=typeof u=="function"&&/native code/.test(l(u))},1574:function(o,s,i){"use strict";var a=i(9781),l=i(7293),u=i(1956),c=i(5181),f=i(5296),d=i(7908),h=i(8361),m=Object.assign,v=Object.defineProperty;o.exports=!m||l(function(){if(a&&m({b:1},m(v({},"a",{enumerable:!0,get:function(){v(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var y={},w={},x=Symbol(),D="abcdefghijklmnopqrst";return y[x]=7,D.split("").forEach(function(I){w[I]=I}),m({},y)[x]!=7||u(m({},w)).join("")!=D})?function(w,x){for(var D=d(w),I=arguments.length,N=1,S=c.f,M=f.f;I>N;)for(var L=h(arguments[N++]),R=S?u(L).concat(S(L)):u(L),O=R.length,F=0,_;O>F;)_=R[F++],(!a||M.call(L,_))&&(D[_]=L[_]);return D}:m},30:function(o,s,i){var a=i(9670),l=i(6048),u=i(748),c=i(3501),f=i(490),d=i(317),h=i(6200),m=">",v="<",y="prototype",w="script",x=h("IE_PROTO"),D=function(){},I=function(R){return v+w+m+R+v+"/"+w+m},N=function(R){R.write(I("")),R.close();var O=R.parentWindow.Object;return R=null,O},S=function(){var R=d("iframe"),O="java"+w+":",F;return R.style.display="none",f.appendChild(R),R.src=String(O),F=R.contentWindow.document,F.open(),F.write(I("document.F=Object")),F.close(),F.F},M,L=function(){try{M=document.domain&&new ActiveXObject("htmlfile")}catch{}L=M?N(M):S();for(var R=u.length;R--;)delete L[y][u[R]];return L()};c[x]=!0,o.exports=Object.create||function(O,F){var _;return O!==null?(D[y]=a(O),_=new D,D[y]=null,_[x]=O):_=L(),F===void 0?_:l(_,F)}},6048:function(o,s,i){var a=i(9781),l=i(3070),u=i(9670),c=i(1956);o.exports=a?Object.defineProperties:function(d,h){u(d);for(var m=c(h),v=m.length,y=0,w;v>y;)l.f(d,w=m[y++],h[w]);return d}},3070:function(o,s,i){var a=i(9781),l=i(4664),u=i(9670),c=i(7593),f=Object.defineProperty;s.f=a?f:function(h,m,v){if(u(h),m=c(m,!0),u(v),l)try{return f(h,m,v)}catch{}if("get"in v||"set"in v)throw TypeError("Accessors not supported");return"value"in v&&(h[m]=v.value),h}},1236:function(o,s,i){var a=i(9781),l=i(5296),u=i(9114),c=i(5656),f=i(7593),d=i(6656),h=i(4664),m=Object.getOwnPropertyDescriptor;s.f=a?m:function(y,w){if(y=c(y),w=f(w,!0),h)try{return m(y,w)}catch{}if(d(y,w))return u(!l.f.call(y,w),y[w])}},8006:function(o,s,i){var a=i(6324),l=i(748),u=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(f){return a(f,u)}},5181:function(o,s){s.f=Object.getOwnPropertySymbols},9518:function(o,s,i){var a=i(6656),l=i(7908),u=i(6200),c=i(8544),f=u("IE_PROTO"),d=Object.prototype;o.exports=c?Object.getPrototypeOf:function(h){return h=l(h),a(h,f)?h[f]:typeof h.constructor=="function"&&h instanceof h.constructor?h.constructor.prototype:h instanceof Object?d:null}},6324:function(o,s,i){var a=i(6656),l=i(5656),u=i(1318).indexOf,c=i(3501);o.exports=function(f,d){var h=l(f),m=0,v=[],y;for(y in h)!a(c,y)&&a(h,y)&&v.push(y);for(;d.length>m;)a(h,y=d[m++])&&(~u(v,y)||v.push(y));return v}},1956:function(o,s,i){var a=i(6324),l=i(748);o.exports=Object.keys||function(c){return a(c,l)}},5296:function(o,s){"use strict";var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,l=a&&!i.call({1:2},1);s.f=l?function(c){var f=a(this,c);return!!f&&f.enumerable}:i},7674:function(o,s,i){var a=i(9670),l=i(6077);o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,c={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(c,[]),u=c instanceof Array}catch{}return function(h,m){return a(h),l(m),u?f.call(h,m):h.__proto__=m,h}}():void 0)},288:function(o,s,i){"use strict";var a=i(1694),l=i(648);o.exports=a?{}.toString:function(){return"[object "+l(this)+"]"}},3887:function(o,s,i){var a=i(5005),l=i(8006),u=i(5181),c=i(9670);o.exports=a("Reflect","ownKeys")||function(d){var h=l.f(c(d)),m=u.f;return m?h.concat(m(d)):h}},857:function(o,s,i){var a=i(7854);o.exports=a},2248:function(o,s,i){var a=i(1320);o.exports=function(l,u,c){for(var f in u)a(l,f,u[f],c);return l}},1320:function(o,s,i){var a=i(7854),l=i(8880),u=i(6656),c=i(3505),f=i(2788),d=i(9909),h=d.get,m=d.enforce,v=String(String).split("String");(o.exports=function(y,w,x,D){var I=D?!!D.unsafe:!1,N=D?!!D.enumerable:!1,S=D?!!D.noTargetGet:!1,M;if(typeof x=="function"&&(typeof w=="string"&&!u(x,"name")&&l(x,"name",w),M=m(x),M.source||(M.source=v.join(typeof w=="string"?w:""))),y===a){N?y[w]=x:c(w,x);return}else I?!S&&y[w]&&(N=!0):delete y[w];N?y[w]=x:l(y,w,x)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})},7651:function(o,s,i){var a=i(4326),l=i(2261);o.exports=function(u,c){var f=u.exec;if(typeof f=="function"){var d=f.call(u,c);if(typeof d!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return d}if(a(u)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(u,c)}},2261:function(o,s,i){"use strict";var a=i(7066),l=i(2999),u=RegExp.prototype.exec,c=String.prototype.replace,f=u,d=function(){var y=/a/,w=/b*/g;return u.call(y,"a"),u.call(w,"a"),y.lastIndex!==0||w.lastIndex!==0}(),h=l.UNSUPPORTED_Y||l.BROKEN_CARET,m=/()??/.exec("")[1]!==void 0,v=d||m||h;v&&(f=function(w){var x=this,D,I,N,S,M=h&&x.sticky,L=a.call(x),R=x.source,O=0,F=w;return M&&(L=L.replace("y",""),L.indexOf("g")===-1&&(L+="g"),F=String(w).slice(x.lastIndex),x.lastIndex>0&&(!x.multiline||x.multiline&&w[x.lastIndex-1]!==`
|
|
`)&&(R="(?: "+R+")",F=" "+F,O++),I=new RegExp("^(?:"+R+")",L)),m&&(I=new RegExp("^"+R+"$(?!\\s)",L)),d&&(D=x.lastIndex),N=u.call(M?I:x,F),M?N?(N.input=N.input.slice(O),N[0]=N[0].slice(O),N.index=x.lastIndex,x.lastIndex+=N[0].length):x.lastIndex=0:d&&N&&(x.lastIndex=x.global?N.index+N[0].length:D),m&&N&&N.length>1&&c.call(N[0],I,function(){for(S=1;S<arguments.length-2;S++)arguments[S]===void 0&&(N[S]=void 0)}),N}),o.exports=f},7066:function(o,s,i){"use strict";var a=i(9670);o.exports=function(){var l=a(this),u="";return l.global&&(u+="g"),l.ignoreCase&&(u+="i"),l.multiline&&(u+="m"),l.dotAll&&(u+="s"),l.unicode&&(u+="u"),l.sticky&&(u+="y"),u}},2999:function(o,s,i){"use strict";var a=i(7293);function l(u,c){return RegExp(u,c)}s.UNSUPPORTED_Y=a(function(){var u=l("a","y");return u.lastIndex=2,u.exec("abcd")!=null}),s.BROKEN_CARET=a(function(){var u=l("^r","gy");return u.lastIndex=2,u.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(u,c){try{l(a,u,c)}catch{a[u]=c}return c}},6340:function(o,s,i){"use strict";var a=i(5005),l=i(3070),u=i(5112),c=i(9781),f=u("species");o.exports=function(d){var h=a(d),m=l.f;c&&h&&!h[f]&&m(h,f,{configurable:!0,get:function(){return this}})}},8003:function(o,s,i){var a=i(3070).f,l=i(6656),u=i(5112),c=u("toStringTag");o.exports=function(f,d,h){f&&!l(f=h?f:f.prototype,c)&&a(f,c,{configurable:!0,value:d})}},6200:function(o,s,i){var a=i(2309),l=i(9711),u=a("keys");o.exports=function(c){return u[c]||(u[c]=l(c))}},5465:function(o,s,i){var a=i(7854),l=i(3505),u="__core-js_shared__",c=a[u]||l(u,{});o.exports=c},2309:function(o,s,i){var a=i(1913),l=i(5465);(o.exports=function(u,c){return l[u]||(l[u]=c!==void 0?c:{})})("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),u=i(5112),c=u("species");o.exports=function(f,d){var h=a(f).constructor,m;return h===void 0||(m=a(h)[c])==null?d:l(m)}},8710:function(o,s,i){var a=i(9958),l=i(4488),u=function(c){return function(f,d){var h=String(l(f)),m=a(d),v=h.length,y,w;return m<0||m>=v?c?"":void 0:(y=h.charCodeAt(m),y<55296||y>56319||m+1===v||(w=h.charCodeAt(m+1))<56320||w>57343?c?h.charAt(m):y:c?h.slice(m,m+2):(y-55296<<10)+(w-56320)+65536)}};o.exports={codeAt:u(!1),charAt:u(!0)}},3197:function(o){"use strict";var s=2147483647,i=36,a=1,l=26,u=38,c=700,f=72,d=128,h="-",m=/[^\0-\u007E]/,v=/[.\u3002\uFF0E\uFF61]/g,y="Overflow: input needs wider integers to process",w=i-a,x=Math.floor,D=String.fromCharCode,I=function(L){for(var R=[],O=0,F=L.length;O<F;){var _=L.charCodeAt(O++);if(_>=55296&&_<=56319&&O<F){var j=L.charCodeAt(O++);(j&64512)==56320?R.push(((_&1023)<<10)+(j&1023)+65536):(R.push(_),O--)}else R.push(_)}return R},N=function(L){return L+22+75*(L<26)},S=function(L,R,O){var F=0;for(L=O?x(L/c):L>>1,L+=x(L/R);L>w*l>>1;F+=i)L=x(L/w);return x(F+(w+1)*L/(L+u))},M=function(L){var R=[];L=I(L);var O=L.length,F=d,_=0,j=f,H,te;for(H=0;H<L.length;H++)te=L[H],te<128&&R.push(D(te));var W=R.length,J=W;for(W&&R.push(h);J<O;){var re=s;for(H=0;H<L.length;H++)te=L[H],te>=F&&te<re&&(re=te);var be=J+1;if(re-F>x((s-_)/be))throw RangeError(y);for(_+=(re-F)*be,F=re,H=0;H<L.length;H++){if(te=L[H],te<F&&++_>s)throw RangeError(y);if(te==F){for(var Ae=_,xe=i;;xe+=i){var Fe=xe<=j?a:xe>=j+l?l:xe-j;if(Ae<Fe)break;var Re=Ae-Fe,_e=i-Fe;R.push(D(N(Fe+Re%_e))),Ae=x(Re/_e)}R.push(D(N(Ae))),j=S(_,be,J==W),_=0,++J}}++_,++F}return R.join("")};o.exports=function(L){var R=[],O=L.toLowerCase().replace(v,".").split("."),F,_;for(F=0;F<O.length;F++)_=O[F],R.push(m.test(_)?"xn--"+M(_):_);return R.join(".")}},6091:function(o,s,i){var a=i(7293),l=i(1361),u="\u200B\x85\u180E";o.exports=function(c){return a(function(){return!!l[c]()||u[c]()!=u||l[c].name!==c})}},3111:function(o,s,i){var a=i(4488),l=i(1361),u="["+l+"]",c=RegExp("^"+u+u+"*"),f=RegExp(u+u+"*$"),d=function(h){return function(m){var v=String(a(m));return h&1&&(v=v.replace(c,"")),h&2&&(v=v.replace(f,"")),v}};o.exports={start:d(1),end:d(2),trim:d(3)}},1400:function(o,s,i){var a=i(9958),l=Math.max,u=Math.min;o.exports=function(c,f){var d=a(c);return d<0?l(d+f,0):u(d,f)}},7067:function(o,s,i){var a=i(9958),l=i(7466);o.exports=function(u){if(u===void 0)return 0;var c=a(u),f=l(c);if(c!==f)throw RangeError("Wrong length or index");return f}},5656:function(o,s,i){var a=i(8361),l=i(4488);o.exports=function(u){return a(l(u))}},9958:function(o){var s=Math.ceil,i=Math.floor;o.exports=function(a){return isNaN(a=+a)?0:(a>0?i:s)(a)}},7466:function(o,s,i){var a=i(9958),l=Math.min;o.exports=function(u){return u>0?l(a(u),9007199254740991):0}},7908:function(o,s,i){var a=i(4488);o.exports=function(l){return Object(a(l))}},4590:function(o,s,i){var a=i(3002);o.exports=function(l,u){var c=a(l);if(c%u)throw RangeError("Wrong offset");return c}},3002:function(o,s,i){var a=i(9958);o.exports=function(l){var u=a(l);if(u<0)throw RangeError("The argument can't be less than 0");return u}},7593:function(o,s,i){var a=i(111);o.exports=function(l,u){if(!a(l))return l;var c,f;if(u&&typeof(c=l.toString)=="function"&&!a(f=c.call(l))||typeof(c=l.valueOf)=="function"&&!a(f=c.call(l))||!u&&typeof(c=l.toString)=="function"&&!a(f=c.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},1694:function(o,s,i){var a=i(5112),l=a("toStringTag"),u={};u[l]="z",o.exports=String(u)==="[object z]"},9843:function(o,s,i){"use strict";var a=i(2109),l=i(7854),u=i(9781),c=i(3832),f=i(260),d=i(3331),h=i(5787),m=i(9114),v=i(8880),y=i(7466),w=i(7067),x=i(4590),D=i(7593),I=i(6656),N=i(648),S=i(111),M=i(30),L=i(7674),R=i(8006).f,O=i(7321),F=i(2092).forEach,_=i(6340),j=i(3070),H=i(1236),te=i(9909),W=i(9587),J=te.get,re=te.set,be=j.f,Ae=H.f,xe=Math.round,Fe=l.RangeError,Re=d.ArrayBuffer,_e=d.DataView,he=f.NATIVE_ARRAY_BUFFER_VIEWS,Se=f.TYPED_ARRAY_TAG,ke=f.TypedArray,Ie=f.TypedArrayPrototype,Oe=f.aTypedArrayConstructor,ot=f.isTypedArray,Ye="BYTES_PER_ELEMENT",Qe="Wrong length",me=function(Q,V){for(var ne=0,ce=V.length,Be=new(Oe(Q))(ce);ce>ne;)Be[ne]=V[ne++];return Be},oe=function(Q,V){be(Q,V,{get:function(){return J(this)[V]}})},ue=function(Q){var V;return Q instanceof Re||(V=N(Q))=="ArrayBuffer"||V=="SharedArrayBuffer"},fe=function(Q,V){return ot(Q)&&typeof V!="symbol"&&V in Q&&String(+V)==String(V)},le=function(V,ne){return fe(V,ne=D(ne,!0))?m(2,V[ne]):Ae(V,ne)},pe=function(V,ne,ce){return fe(V,ne=D(ne,!0))&&S(ce)&&I(ce,"value")&&!I(ce,"get")&&!I(ce,"set")&&!ce.configurable&&(!I(ce,"writable")||ce.writable)&&(!I(ce,"enumerable")||ce.enumerable)?(V[ne]=ce.value,V):be(V,ne,ce)};u?(he||(H.f=le,j.f=pe,oe(Ie,"buffer"),oe(Ie,"byteOffset"),oe(Ie,"byteLength"),oe(Ie,"length")),a({target:"Object",stat:!0,forced:!he},{getOwnPropertyDescriptor:le,defineProperty:pe}),o.exports=function(Q,V,ne){var ce=Q.match(/\d+$/)[0]/8,Be=Q+(ne?"Clamped":"")+"Array",Ve="get"+Q,st="set"+Q,et=l[Be],Te=et,Ce=Te&&Te.prototype,Mt={},dt=function(Ge,Pe){var He=J(Ge);return He.view[Ve](Pe*ce+He.byteOffset,!0)},Yt=function(Ge,Pe,He){var ut=J(Ge);ne&&(He=(He=xe(He))<0?0:He>255?255:He&255),ut.view[st](Pe*ce+ut.byteOffset,He,!0)},Kt=function(Ge,Pe){be(Ge,Pe,{get:function(){return dt(this,Pe)},set:function(He){return Yt(this,Pe,He)},enumerable:!0})};he?c&&(Te=V(function(Ge,Pe,He,ut){return h(Ge,Te,Be),W(function(){return S(Pe)?ue(Pe)?ut!==void 0?new et(Pe,x(He,ce),ut):He!==void 0?new et(Pe,x(He,ce)):new et(Pe):ot(Pe)?me(Te,Pe):O.call(Te,Pe):new et(w(Pe))}(),Ge,Te)}),L&&L(Te,ke),F(R(et),function(Ge){Ge in Te||v(Te,Ge,et[Ge])}),Te.prototype=Ce):(Te=V(function(Ge,Pe,He,ut){h(Ge,Te,Be);var Tt=0,ft=0,It,nt,de;if(!S(Pe))de=w(Pe),nt=de*ce,It=new Re(nt);else if(ue(Pe)){It=Pe,ft=x(He,ce);var Ht=Pe.byteLength;if(ut===void 0){if(Ht%ce||(nt=Ht-ft,nt<0))throw Fe(Qe)}else if(nt=y(ut)*ce,nt+ft>Ht)throw Fe(Qe);de=nt/ce}else return ot(Pe)?me(Te,Pe):O.call(Te,Pe);for(re(Ge,{buffer:It,byteOffset:ft,byteLength:nt,length:de,view:new _e(It)});Tt<de;)Kt(Ge,Tt++)}),L&&L(Te,ke),Ce=Te.prototype=M(Ie)),Ce.constructor!==Te&&v(Ce,"constructor",Te),Se&&v(Ce,Se,Be),Mt[Be]=Te,a({global:!0,forced:Te!=et,sham:!he},Mt),Ye in Te||v(Te,Ye,ce),Ye in Ce||v(Ce,Ye,ce),_(Be)}):o.exports=function(){}},3832:function(o,s,i){var a=i(7854),l=i(7293),u=i(7072),c=i(260).NATIVE_ARRAY_BUFFER_VIEWS,f=a.ArrayBuffer,d=a.Int8Array;o.exports=!c||!l(function(){d(1)})||!l(function(){new d(-1)})||!u(function(h){new d,new d(null),new d(1.5),new d(h)},!0)||l(function(){return new d(new f(2),1,void 0).length!==1})},3074:function(o,s,i){var a=i(260).aTypedArrayConstructor,l=i(6707);o.exports=function(u,c){for(var f=l(u,u.constructor),d=0,h=c.length,m=new(a(f))(h);h>d;)m[d]=c[d++];return m}},7321:function(o,s,i){var a=i(7908),l=i(7466),u=i(1246),c=i(7659),f=i(9974),d=i(260).aTypedArrayConstructor;o.exports=function(m){var v=a(m),y=arguments.length,w=y>1?arguments[1]:void 0,x=w!==void 0,D=u(v),I,N,S,M,L,R;if(D!=null&&!c(D))for(L=D.call(v),R=L.next,v=[];!(M=R.call(L)).done;)v.push(M.value);for(x&&y>2&&(w=f(w,arguments[2],2)),N=l(v.length),S=new(d(this))(N),I=0;N>I;I++)S[I]=x?w(v[I],I):v[I];return S}},9711:function(o){var s=0,i=Math.random();o.exports=function(a){return"Symbol("+String(a===void 0?"":a)+")_"+(++s+i).toString(36)}},3307:function(o,s,i){var a=i(133);o.exports=a&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},5112:function(o,s,i){var a=i(7854),l=i(2309),u=i(6656),c=i(9711),f=i(133),d=i(3307),h=l("wks"),m=a.Symbol,v=d?m:m&&m.withoutSetter||c;o.exports=function(y){return u(h,y)||(f&&u(m,y)?h[y]=m[y]:h[y]=v("Symbol."+y)),h[y]}},1361:function(o){o.exports=`
|
|
\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),u=i(3331),c=i(6340),f="ArrayBuffer",d=u[f],h=l[f];a({global:!0,forced:h!==d},{ArrayBuffer:d}),c(f)},2222:function(o,s,i){"use strict";var a=i(2109),l=i(7293),u=i(3157),c=i(111),f=i(7908),d=i(7466),h=i(6135),m=i(5417),v=i(1194),y=i(5112),w=i(7392),x=y("isConcatSpreadable"),D=9007199254740991,I="Maximum allowed index exceeded",N=w>=51||!l(function(){var R=[];return R[x]=!1,R.concat()[0]!==R}),S=v("concat"),M=function(R){if(!c(R))return!1;var O=R[x];return O!==void 0?!!O:u(R)},L=!N||!S;a({target:"Array",proto:!0,forced:L},{concat:function(O){var F=f(this),_=m(F,0),j=0,H,te,W,J,re;for(H=-1,W=arguments.length;H<W;H++)if(re=H===-1?F:arguments[H],M(re)){if(J=d(re.length),j+J>D)throw TypeError(I);for(te=0;te<J;te++,j++)te in re&&h(_,j,re[te])}else{if(j>=D)throw TypeError(I);h(_,j++,re)}return _.length=j,_}})},7327:function(o,s,i){"use strict";var a=i(2109),l=i(2092).filter,u=i(1194),c=u("filter");a({target:"Array",proto:!0,forced:!c},{filter:function(d){return l(this,d,arguments.length>1?arguments[1]:void 0)}})},2772:function(o,s,i){"use strict";var a=i(2109),l=i(1318).indexOf,u=i(9341),c=[].indexOf,f=!!c&&1/[1].indexOf(1,-0)<0,d=u("indexOf");a({target:"Array",proto:!0,forced:f||!d},{indexOf:function(m){return f?c.apply(this,arguments)||0:l(this,m,arguments.length>1?arguments[1]:void 0)}})},6992:function(o,s,i){"use strict";var a=i(5656),l=i(1223),u=i(7497),c=i(9909),f=i(654),d="Array Iterator",h=c.set,m=c.getterFor(d);o.exports=f(Array,"Array",function(v,y){h(this,{type:d,target:a(v),index:0,kind:y})},function(){var v=m(this),y=v.target,w=v.kind,x=v.index++;return!y||x>=y.length?(v.target=void 0,{value:void 0,done:!0}):w=="keys"?{value:x,done:!1}:w=="values"?{value:y[x],done:!1}:{value:[x,y[x]],done:!1}},"values"),u.Arguments=u.Array,l("keys"),l("values"),l("entries")},1249:function(o,s,i){"use strict";var a=i(2109),l=i(2092).map,u=i(1194),c=u("map");a({target:"Array",proto:!0,forced:!c},{map:function(d){return l(this,d,arguments.length>1?arguments[1]:void 0)}})},7042:function(o,s,i){"use strict";var a=i(2109),l=i(111),u=i(3157),c=i(1400),f=i(7466),d=i(5656),h=i(6135),m=i(5112),v=i(1194),y=v("slice"),w=m("species"),x=[].slice,D=Math.max;a({target:"Array",proto:!0,forced:!y},{slice:function(N,S){var M=d(this),L=f(M.length),R=c(N,L),O=c(S===void 0?L:S,L),F,_,j;if(u(M)&&(F=M.constructor,typeof F=="function"&&(F===Array||u(F.prototype))?F=void 0:l(F)&&(F=F[w],F===null&&(F=void 0)),F===Array||F===void 0))return x.call(M,R,O);for(_=new(F===void 0?Array:F)(D(O-R,0)),j=0;R<O;R++,j++)R in M&&h(_,j,M[R]);return _.length=j,_}})},561:function(o,s,i){"use strict";var a=i(2109),l=i(1400),u=i(9958),c=i(7466),f=i(7908),d=i(5417),h=i(6135),m=i(1194),v=m("splice"),y=Math.max,w=Math.min,x=9007199254740991,D="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!v},{splice:function(N,S){var M=f(this),L=c(M.length),R=l(N,L),O=arguments.length,F,_,j,H,te,W;if(O===0?F=_=0:O===1?(F=0,_=L-R):(F=O-2,_=w(y(u(S),0),L-R)),L+F-_>x)throw TypeError(D);for(j=d(M,_),H=0;H<_;H++)te=R+H,te in M&&h(j,H,M[te]);if(j.length=_,F<_){for(H=R;H<L-_;H++)te=H+_,W=H+F,te in M?M[W]=M[te]:delete M[W];for(H=L;H>L-_+F;H--)delete M[H-1]}else if(F>_)for(H=L-_;H>R;H--)te=H+_-1,W=H+F-1,te in M?M[W]=M[te]:delete M[W];for(H=0;H<F;H++)M[H+R]=arguments[H+2];return M.length=L-_+F,j}})},8309:function(o,s,i){var a=i(9781),l=i(3070).f,u=Function.prototype,c=u.toString,f=/^\s*function ([^ (]*)/,d="name";a&&!(d in u)&&l(u,d,{configurable:!0,get:function(){try{return c.call(this).match(f)[1]}catch{return""}}})},489:function(o,s,i){var a=i(2109),l=i(7293),u=i(7908),c=i(9518),f=i(8544),d=l(function(){c(1)});a({target:"Object",stat:!0,forced:d,sham:!f},{getPrototypeOf:function(m){return c(u(m))}})},1539:function(o,s,i){var a=i(1694),l=i(1320),u=i(288);a||l(Object.prototype,"toString",u,{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})},9714:function(o,s,i){"use strict";var a=i(1320),l=i(9670),u=i(7293),c=i(7066),f="toString",d=RegExp.prototype,h=d[f],m=u(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),v=h.name!=f;(m||v)&&a(RegExp.prototype,f,function(){var w=l(this),x=String(w.source),D=w.flags,I=String(D===void 0&&w instanceof RegExp&&!("flags"in d)?c.call(w):D);return"/"+x+"/"+I},{unsafe:!0})},8783:function(o,s,i){"use strict";var a=i(8710).charAt,l=i(9909),u=i(654),c="String Iterator",f=l.set,d=l.getterFor(c);u(String,"String",function(h){f(this,{type:c,string:String(h),index:0})},function(){var m=d(this),v=m.string,y=m.index,w;return y>=v.length?{value:void 0,done:!0}:(w=a(v,y),m.index+=w.length,{value:w,done:!1})})},4723:function(o,s,i){"use strict";var a=i(7007),l=i(9670),u=i(7466),c=i(4488),f=i(1530),d=i(7651);a("match",1,function(h,m,v){return[function(w){var x=c(this),D=w==null?void 0:w[h];return D!==void 0?D.call(w,x):new RegExp(w)[h](String(x))},function(y){var w=v(m,y,this);if(w.done)return w.value;var x=l(y),D=String(this);if(!x.global)return d(x,D);var I=x.unicode;x.lastIndex=0;for(var N=[],S=0,M;(M=d(x,D))!==null;){var L=String(M[0]);N[S]=L,L===""&&(x.lastIndex=f(D,u(x.lastIndex),I)),S++}return S===0?null:N}]})},5306:function(o,s,i){"use strict";var a=i(7007),l=i(9670),u=i(7466),c=i(9958),f=i(4488),d=i(1530),h=i(647),m=i(7651),v=Math.max,y=Math.min,w=function(x){return x===void 0?x:String(x)};a("replace",2,function(x,D,I,N){var S=N.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,M=N.REPLACE_KEEPS_$0,L=S?"$":"$0";return[function(O,F){var _=f(this),j=O==null?void 0:O[x];return j!==void 0?j.call(O,_,F):D.call(String(_),O,F)},function(R,O){if(!S&&M||typeof O=="string"&&O.indexOf(L)===-1){var F=I(D,R,this,O);if(F.done)return F.value}var _=l(R),j=String(this),H=typeof O=="function";H||(O=String(O));var te=_.global;if(te){var W=_.unicode;_.lastIndex=0}for(var J=[];;){var re=m(_,j);if(re===null||(J.push(re),!te))break;var be=String(re[0]);be===""&&(_.lastIndex=d(j,u(_.lastIndex),W))}for(var Ae="",xe=0,Fe=0;Fe<J.length;Fe++){re=J[Fe];for(var Re=String(re[0]),_e=v(y(c(re.index),j.length),0),he=[],Se=1;Se<re.length;Se++)he.push(w(re[Se]));var ke=re.groups;if(H){var Ie=[Re].concat(he,_e,j);ke!==void 0&&Ie.push(ke);var Oe=String(O.apply(void 0,Ie))}else Oe=h(Re,j,_e,he,ke,O);_e>=xe&&(Ae+=j.slice(xe,_e)+Oe,xe=_e+Re.length)}return Ae+j.slice(xe)}]})},3123:function(o,s,i){"use strict";var a=i(7007),l=i(7850),u=i(9670),c=i(4488),f=i(6707),d=i(1530),h=i(7466),m=i(7651),v=i(2261),y=i(7293),w=[].push,x=Math.min,D=4294967295,I=!y(function(){return!RegExp(D,"y")});a("split",2,function(N,S,M){var L;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?L=function(R,O){var F=String(c(this)),_=O===void 0?D:O>>>0;if(_===0)return[];if(R===void 0)return[F];if(!l(R))return S.call(F,R,_);for(var j=[],H=(R.ignoreCase?"i":"")+(R.multiline?"m":"")+(R.unicode?"u":"")+(R.sticky?"y":""),te=0,W=new RegExp(R.source,H+"g"),J,re,be;(J=v.call(W,F))&&(re=W.lastIndex,!(re>te&&(j.push(F.slice(te,J.index)),J.length>1&&J.index<F.length&&w.apply(j,J.slice(1)),be=J[0].length,te=re,j.length>=_)));)W.lastIndex===J.index&&W.lastIndex++;return te===F.length?(be||!W.test(""))&&j.push(""):j.push(F.slice(te)),j.length>_?j.slice(0,_):j}:"0".split(void 0,0).length?L=function(R,O){return R===void 0&&O===0?[]:S.call(this,R,O)}:L=S,[function(O,F){var _=c(this),j=O==null?void 0:O[N];return j!==void 0?j.call(O,_,F):L.call(String(_),O,F)},function(R,O){var F=M(L,R,this,O,L!==S);if(F.done)return F.value;var _=u(R),j=String(this),H=f(_,RegExp),te=_.unicode,W=(_.ignoreCase?"i":"")+(_.multiline?"m":"")+(_.unicode?"u":"")+(I?"y":"g"),J=new H(I?_:"^(?:"+_.source+")",W),re=O===void 0?D:O>>>0;if(re===0)return[];if(j.length===0)return m(J,j)===null?[j]:[];for(var be=0,Ae=0,xe=[];Ae<j.length;){J.lastIndex=I?Ae:0;var Fe=m(J,I?j:j.slice(Ae)),Re;if(Fe===null||(Re=x(h(J.lastIndex+(I?0:Ae)),j.length))===be)Ae=d(j,Ae,te);else{if(xe.push(j.slice(be,Ae)),xe.length===re)return xe;for(var _e=1;_e<=Fe.length-1;_e++)if(xe.push(Fe[_e]),xe.length===re)return xe;Ae=be=Re}}return xe.push(j.slice(be)),xe}]},!I)},3210:function(o,s,i){"use strict";var a=i(2109),l=i(3111).trim,u=i(6091);a({target:"String",proto:!0,forced:u("trim")},{trim:function(){return l(this)}})},2990:function(o,s,i){"use strict";var a=i(260),l=i(1048),u=a.aTypedArray,c=a.exportTypedArrayMethod;c("copyWithin",function(d,h){return l.call(u(this),d,h,arguments.length>2?arguments[2]:void 0)})},8927:function(o,s,i){"use strict";var a=i(260),l=i(2092).every,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("every",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},3105:function(o,s,i){"use strict";var a=i(260),l=i(1285),u=a.aTypedArray,c=a.exportTypedArrayMethod;c("fill",function(d){return l.apply(u(this),arguments)})},5035:function(o,s,i){"use strict";var a=i(260),l=i(2092).filter,u=i(3074),c=a.aTypedArray,f=a.exportTypedArrayMethod;f("filter",function(h){var m=l(c(this),h,arguments.length>1?arguments[1]:void 0);return u(this,m)})},7174:function(o,s,i){"use strict";var a=i(260),l=i(2092).findIndex,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("findIndex",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},4345:function(o,s,i){"use strict";var a=i(260),l=i(2092).find,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("find",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},2846:function(o,s,i){"use strict";var a=i(260),l=i(2092).forEach,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("forEach",function(d){l(u(this),d,arguments.length>1?arguments[1]:void 0)})},4731:function(o,s,i){"use strict";var a=i(260),l=i(1318).includes,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("includes",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},7209:function(o,s,i){"use strict";var a=i(260),l=i(1318).indexOf,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("indexOf",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},6319:function(o,s,i){"use strict";var a=i(7854),l=i(260),u=i(6992),c=i(5112),f=c("iterator"),d=a.Uint8Array,h=u.values,m=u.keys,v=u.entries,y=l.aTypedArray,w=l.exportTypedArrayMethod,x=d&&d.prototype[f],D=!!x&&(x.name=="values"||x.name==null),I=function(){return h.call(y(this))};w("entries",function(){return v.call(y(this))}),w("keys",function(){return m.call(y(this))}),w("values",I,!D),w(f,I,!D)},8867:function(o,s,i){"use strict";var a=i(260),l=a.aTypedArray,u=a.exportTypedArrayMethod,c=[].join;u("join",function(d){return c.apply(l(this),arguments)})},7789:function(o,s,i){"use strict";var a=i(260),l=i(6583),u=a.aTypedArray,c=a.exportTypedArrayMethod;c("lastIndexOf",function(d){return l.apply(u(this),arguments)})},3739:function(o,s,i){"use strict";var a=i(260),l=i(2092).map,u=i(6707),c=a.aTypedArray,f=a.aTypedArrayConstructor,d=a.exportTypedArrayMethod;d("map",function(m){return l(c(this),m,arguments.length>1?arguments[1]:void 0,function(v,y){return new(f(u(v,v.constructor)))(y)})})},4483:function(o,s,i){"use strict";var a=i(260),l=i(3671).right,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("reduceRight",function(d){return l(u(this),d,arguments.length,arguments.length>1?arguments[1]:void 0)})},9368:function(o,s,i){"use strict";var a=i(260),l=i(3671).left,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("reduce",function(d){return l(u(this),d,arguments.length,arguments.length>1?arguments[1]:void 0)})},2056:function(o,s,i){"use strict";var a=i(260),l=a.aTypedArray,u=a.exportTypedArrayMethod,c=Math.floor;u("reverse",function(){for(var d=this,h=l(d).length,m=c(h/2),v=0,y;v<m;)y=d[v],d[v++]=d[--h],d[h]=y;return d})},3462:function(o,s,i){"use strict";var a=i(260),l=i(7466),u=i(4590),c=i(7908),f=i(7293),d=a.aTypedArray,h=a.exportTypedArrayMethod,m=f(function(){new Int8Array(1).set({})});h("set",function(y){d(this);var w=u(arguments.length>1?arguments[1]:void 0,1),x=this.length,D=c(y),I=l(D.length),N=0;if(I+w>x)throw RangeError("Wrong length");for(;N<I;)this[w+N]=D[N++]},m)},678:function(o,s,i){"use strict";var a=i(260),l=i(6707),u=i(7293),c=a.aTypedArray,f=a.aTypedArrayConstructor,d=a.exportTypedArrayMethod,h=[].slice,m=u(function(){new Int8Array(1).slice()});d("slice",function(y,w){for(var x=h.call(c(this),y,w),D=l(this,this.constructor),I=0,N=x.length,S=new(f(D))(N);N>I;)S[I]=x[I++];return S},m)},7462:function(o,s,i){"use strict";var a=i(260),l=i(2092).some,u=a.aTypedArray,c=a.exportTypedArrayMethod;c("some",function(d){return l(u(this),d,arguments.length>1?arguments[1]:void 0)})},3824:function(o,s,i){"use strict";var a=i(260),l=a.aTypedArray,u=a.exportTypedArrayMethod,c=[].sort;u("sort",function(d){return c.call(l(this),d)})},5021:function(o,s,i){"use strict";var a=i(260),l=i(7466),u=i(1400),c=i(6707),f=a.aTypedArray,d=a.exportTypedArrayMethod;d("subarray",function(m,v){var y=f(this),w=y.length,x=u(m,w);return new(c(y,y.constructor))(y.buffer,y.byteOffset+x*y.BYTES_PER_ELEMENT,l((v===void 0?w:u(v,w))-x))})},2974:function(o,s,i){"use strict";var a=i(7854),l=i(260),u=i(7293),c=a.Int8Array,f=l.aTypedArray,d=l.exportTypedArrayMethod,h=[].toLocaleString,m=[].slice,v=!!c&&u(function(){h.call(new c(1))}),y=u(function(){return[1,2].toLocaleString()!=new c([1,2]).toLocaleString()})||!u(function(){c.prototype.toLocaleString.call([1,2])});d("toLocaleString",function(){return h.apply(v?m.call(f(this)):f(this),arguments)},y)},5016:function(o,s,i){"use strict";var a=i(260).exportTypedArrayMethod,l=i(7293),u=i(7854),c=u.Uint8Array,f=c&&c.prototype||{},d=[].toString,h=[].join;l(function(){d.call({})})&&(d=function(){return h.call(this)});var m=f.toString!=d;a("toString",d,m)},2472:function(o,s,i){var a=i(9843);a("Uint8",function(l){return function(c,f,d){return l(this,c,f,d)}})},4747:function(o,s,i){var a=i(7854),l=i(8324),u=i(8533),c=i(8880);for(var f in l){var d=a[f],h=d&&d.prototype;if(h&&h.forEach!==u)try{c(h,"forEach",u)}catch{h.forEach=u}}},3948:function(o,s,i){var a=i(7854),l=i(8324),u=i(6992),c=i(8880),f=i(5112),d=f("iterator"),h=f("toStringTag"),m=u.values;for(var v in l){var y=a[v],w=y&&y.prototype;if(w){if(w[d]!==m)try{c(w,d,m)}catch{w[d]=m}if(w[h]||c(w,h,v),l[v]){for(var x in u)if(w[x]!==u[x])try{c(w,x,u[x])}catch{w[x]=u[x]}}}}},1637:function(o,s,i){"use strict";i(6992);var a=i(2109),l=i(5005),u=i(590),c=i(1320),f=i(2248),d=i(8003),h=i(4994),m=i(9909),v=i(5787),y=i(6656),w=i(9974),x=i(648),D=i(9670),I=i(111),N=i(30),S=i(9114),M=i(8554),L=i(1246),R=i(5112),O=l("fetch"),F=l("Headers"),_=R("iterator"),j="URLSearchParams",H=j+"Iterator",te=m.set,W=m.getterFor(j),J=m.getterFor(H),re=/\+/g,be=Array(4),Ae=function(me){return be[me-1]||(be[me-1]=RegExp("((?:%[\\da-f]{2}){"+me+"})","gi"))},xe=function(me){try{return decodeURIComponent(me)}catch{return me}},Fe=function(me){var oe=me.replace(re," "),ue=4;try{return decodeURIComponent(oe)}catch{for(;ue;)oe=oe.replace(Ae(ue--),xe);return oe}},Re=/[!'()~]|%20/g,_e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},he=function(me){return _e[me]},Se=function(me){return encodeURIComponent(me).replace(Re,he)},ke=function(me,oe){if(oe)for(var ue=oe.split("&"),fe=0,le,pe;fe<ue.length;)le=ue[fe++],le.length&&(pe=le.split("="),me.push({key:Fe(pe.shift()),value:Fe(pe.join("="))}))},Ie=function(me){this.entries.length=0,ke(this.entries,me)},Oe=function(me,oe){if(me<oe)throw TypeError("Not enough arguments")},ot=h(function(oe,ue){te(this,{type:H,iterator:M(W(oe).entries),kind:ue})},"Iterator",function(){var oe=J(this),ue=oe.kind,fe=oe.iterator.next(),le=fe.value;return fe.done||(fe.value=ue==="keys"?le.key:ue==="values"?le.value:[le.key,le.value]),fe}),Ye=function(){v(this,Ye,j);var oe=arguments.length>0?arguments[0]:void 0,ue=this,fe=[],le,pe,Q,V,ne,ce,Be,Ve,st;if(te(ue,{type:j,entries:fe,updateURL:function(){},updateSearchParams:Ie}),oe!==void 0)if(I(oe))if(le=L(oe),typeof le=="function")for(pe=le.call(oe),Q=pe.next;!(V=Q.call(pe)).done;){if(ne=M(D(V.value)),ce=ne.next,(Be=ce.call(ne)).done||(Ve=ce.call(ne)).done||!ce.call(ne).done)throw TypeError("Expected sequence with length 2");fe.push({key:Be.value+"",value:Ve.value+""})}else for(st in oe)y(oe,st)&&fe.push({key:st,value:oe[st]+""});else ke(fe,typeof oe=="string"?oe.charAt(0)==="?"?oe.slice(1):oe:oe+"")},Qe=Ye.prototype;f(Qe,{append:function(oe,ue){Oe(arguments.length,2);var fe=W(this);fe.entries.push({key:oe+"",value:ue+""}),fe.updateURL()},delete:function(me){Oe(arguments.length,1);for(var oe=W(this),ue=oe.entries,fe=me+"",le=0;le<ue.length;)ue[le].key===fe?ue.splice(le,1):le++;oe.updateURL()},get:function(oe){Oe(arguments.length,1);for(var ue=W(this).entries,fe=oe+"",le=0;le<ue.length;le++)if(ue[le].key===fe)return ue[le].value;return null},getAll:function(oe){Oe(arguments.length,1);for(var ue=W(this).entries,fe=oe+"",le=[],pe=0;pe<ue.length;pe++)ue[pe].key===fe&&le.push(ue[pe].value);return le},has:function(oe){Oe(arguments.length,1);for(var ue=W(this).entries,fe=oe+"",le=0;le<ue.length;)if(ue[le++].key===fe)return!0;return!1},set:function(oe,ue){Oe(arguments.length,1);for(var fe=W(this),le=fe.entries,pe=!1,Q=oe+"",V=ue+"",ne=0,ce;ne<le.length;ne++)ce=le[ne],ce.key===Q&&(pe?le.splice(ne--,1):(pe=!0,ce.value=V));pe||le.push({key:Q,value:V}),fe.updateURL()},sort:function(){var oe=W(this),ue=oe.entries,fe=ue.slice(),le,pe,Q;for(ue.length=0,Q=0;Q<fe.length;Q++){for(le=fe[Q],pe=0;pe<Q;pe++)if(ue[pe].key>le.key){ue.splice(pe,0,le);break}pe===Q&&ue.push(le)}oe.updateURL()},forEach:function(oe){for(var ue=W(this).entries,fe=w(oe,arguments.length>1?arguments[1]:void 0,3),le=0,pe;le<ue.length;)pe=ue[le++],fe(pe.value,pe.key,this)},keys:function(){return new ot(this,"keys")},values:function(){return new ot(this,"values")},entries:function(){return new ot(this,"entries")}},{enumerable:!0}),c(Qe,_,Qe.entries),c(Qe,"toString",function(){for(var oe=W(this).entries,ue=[],fe=0,le;fe<oe.length;)le=oe[fe++],ue.push(Se(le.key)+"="+Se(le.value));return ue.join("&")},{enumerable:!0}),d(Ye,j),a({global:!0,forced:!u},{URLSearchParams:Ye}),!u&&typeof O=="function"&&typeof F=="function"&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(oe){var ue=[oe],fe,le,pe;return arguments.length>1&&(fe=arguments[1],I(fe)&&(le=fe.body,x(le)===j&&(pe=fe.headers?new F(fe.headers):new F,pe.has("content-type")||pe.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),fe=N(fe,{body:S(0,String(le)),headers:S(0,pe)}))),ue.push(fe)),O.apply(this,ue)}}),o.exports={URLSearchParams:Ye,getState:W}},285:function(o,s,i){"use strict";i(8783);var a=i(2109),l=i(9781),u=i(590),c=i(7854),f=i(6048),d=i(1320),h=i(5787),m=i(6656),v=i(1574),y=i(8457),w=i(8710).codeAt,x=i(3197),D=i(8003),I=i(1637),N=i(9909),S=c.URL,M=I.URLSearchParams,L=I.getState,R=N.set,O=N.getterFor("URL"),F=Math.floor,_=Math.pow,j="Invalid authority",H="Invalid scheme",te="Invalid host",W="Invalid port",J=/[A-Za-z]/,re=/[\d+-.A-Za-z]/,be=/\d/,Ae=/^(0x|0X)/,xe=/^[0-7]+$/,Fe=/^\d+$/,Re=/^[\dA-Fa-f]+$/,_e=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,he=/[\u0000\t\u000A\u000D #/:?@[\\]]/,Se=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,ke=/[\t\u000A\u000D]/g,Ie,Oe=function(b,B){var z,q,X;if(B.charAt(0)=="["){if(B.charAt(B.length-1)!="]"||(z=Ye(B.slice(1,-1)),!z))return te;b.host=z}else if(V(b)){if(B=x(B),_e.test(B)||(z=ot(B),z===null))return te;b.host=z}else{if(he.test(B))return te;for(z="",q=y(B),X=0;X<q.length;X++)z+=pe(q[X],oe);b.host=z}},ot=function(b){var B=b.split("."),z,q,X,ye,ae,De,je;if(B.length&&B[B.length-1]==""&&B.pop(),z=B.length,z>4)return b;for(q=[],X=0;X<z;X++){if(ye=B[X],ye=="")return b;if(ae=10,ye.length>1&&ye.charAt(0)=="0"&&(ae=Ae.test(ye)?16:8,ye=ye.slice(ae==8?1:2)),ye==="")De=0;else{if(!(ae==10?Fe:ae==8?xe:Re).test(ye))return b;De=parseInt(ye,ae)}q.push(De)}for(X=0;X<z;X++)if(De=q[X],X==z-1){if(De>=_(256,5-z))return null}else if(De>255)return null;for(je=q.pop(),X=0;X<q.length;X++)je+=q[X]*_(256,3-X);return je},Ye=function(b){var B=[0,0,0,0,0,0,0,0],z=0,q=null,X=0,ye,ae,De,je,Ke,at,K,ze=function(){return b.charAt(X)};if(ze()==":"){if(b.charAt(1)!=":")return;X+=2,z++,q=z}for(;ze();){if(z==8)return;if(ze()==":"){if(q!==null)return;X++,z++,q=z;continue}for(ye=ae=0;ae<4&&Re.test(ze());)ye=ye*16+parseInt(ze(),16),X++,ae++;if(ze()=="."){if(ae==0||(X-=ae,z>6))return;for(De=0;ze();){if(je=null,De>0)if(ze()=="."&&De<4)X++;else return;if(!be.test(ze()))return;for(;be.test(ze());){if(Ke=parseInt(ze(),10),je===null)je=Ke;else{if(je==0)return;je=je*10+Ke}if(je>255)return;X++}B[z]=B[z]*256+je,De++,(De==2||De==4)&&z++}if(De!=4)return;break}else if(ze()==":"){if(X++,!ze())return}else if(ze())return;B[z++]=ye}if(q!==null)for(at=z-q,z=7;z!=0&&at>0;)K=B[z],B[z--]=B[q+at-1],B[q+--at]=K;else if(z!=8)return;return B},Qe=function(b){for(var B=null,z=1,q=null,X=0,ye=0;ye<8;ye++)b[ye]!==0?(X>z&&(B=q,z=X),q=null,X=0):(q===null&&(q=ye),++X);return X>z&&(B=q,z=X),B},me=function(b){var B,z,q,X;if(typeof b=="number"){for(B=[],z=0;z<4;z++)B.unshift(b%256),b=F(b/256);return B.join(".")}else if(typeof b=="object"){for(B="",q=Qe(b),z=0;z<8;z++)X&&b[z]===0||(X&&(X=!1),q===z?(B+=z?":":"::",X=!0):(B+=b[z].toString(16),z<7&&(B+=":")));return"["+B+"]"}return b},oe={},ue=v({},oe,{" ":1,'"':1,"<":1,">":1,"`":1}),fe=v({},ue,{"#":1,"?":1,"{":1,"}":1}),le=v({},fe,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),pe=function(b,B){var z=w(b,0);return z>32&&z<127&&!m(B,b)?b:encodeURIComponent(b)},Q={ftp:21,file:null,http:80,https:443,ws:80,wss:443},V=function(b){return m(Q,b.scheme)},ne=function(b){return b.username!=""||b.password!=""},ce=function(b){return!b.host||b.cannotBeABaseURL||b.scheme=="file"},Be=function(b,B){var z;return b.length==2&&J.test(b.charAt(0))&&((z=b.charAt(1))==":"||!B&&z=="|")},Ve=function(b){var B;return b.length>1&&Be(b.slice(0,2))&&(b.length==2||(B=b.charAt(2))==="/"||B==="\\"||B==="?"||B==="#")},st=function(b){var B=b.path,z=B.length;z&&(b.scheme!="file"||z!=1||!Be(B[0],!0))&&B.pop()},et=function(b){return b==="."||b.toLowerCase()==="%2e"},Te=function(b){return b=b.toLowerCase(),b===".."||b==="%2e."||b===".%2e"||b==="%2e%2e"},Ce={},Mt={},dt={},Yt={},Kt={},Ge={},Pe={},He={},ut={},Tt={},ft={},It={},nt={},de={},Ht={},br={},qt={},yt={},xr={},Nt={},St={},bt=function(b,B,z,q){var X=z||Ce,ye=0,ae="",De=!1,je=!1,Ke=!1,at,K,ze,Bt;for(z||(b.scheme="",b.username="",b.password="",b.host=null,b.port=null,b.path=[],b.query=null,b.fragment=null,b.cannotBeABaseURL=!1,B=B.replace(Se,"")),B=B.replace(ke,""),at=y(B);ye<=at.length;){switch(K=at[ye],X){case Ce:if(K&&J.test(K))ae+=K.toLowerCase(),X=Mt;else{if(z)return H;X=dt;continue}break;case Mt:if(K&&(re.test(K)||K=="+"||K=="-"||K=="."))ae+=K.toLowerCase();else if(K==":"){if(z&&(V(b)!=m(Q,ae)||ae=="file"&&(ne(b)||b.port!==null)||b.scheme=="file"&&!b.host))return;if(b.scheme=ae,z){V(b)&&Q[b.scheme]==b.port&&(b.port=null);return}ae="",b.scheme=="file"?X=de:V(b)&&q&&q.scheme==b.scheme?X=Yt:V(b)?X=He:at[ye+1]=="/"?(X=Kt,ye++):(b.cannotBeABaseURL=!0,b.path.push(""),X=xr)}else{if(z)return H;ae="",X=dt,ye=0;continue}break;case dt:if(!q||q.cannotBeABaseURL&&K!="#")return H;if(q.cannotBeABaseURL&&K=="#"){b.scheme=q.scheme,b.path=q.path.slice(),b.query=q.query,b.fragment="",b.cannotBeABaseURL=!0,X=St;break}X=q.scheme=="file"?de:Ge;continue;case Yt:if(K=="/"&&at[ye+1]=="/")X=ut,ye++;else{X=Ge;continue}break;case Kt:if(K=="/"){X=Tt;break}else{X=yt;continue}case Ge:if(b.scheme=q.scheme,K==Ie)b.username=q.username,b.password=q.password,b.host=q.host,b.port=q.port,b.path=q.path.slice(),b.query=q.query;else if(K=="/"||K=="\\"&&V(b))X=Pe;else if(K=="?")b.username=q.username,b.password=q.password,b.host=q.host,b.port=q.port,b.path=q.path.slice(),b.query="",X=Nt;else if(K=="#")b.username=q.username,b.password=q.password,b.host=q.host,b.port=q.port,b.path=q.path.slice(),b.query=q.query,b.fragment="",X=St;else{b.username=q.username,b.password=q.password,b.host=q.host,b.port=q.port,b.path=q.path.slice(),b.path.pop(),X=yt;continue}break;case Pe:if(V(b)&&(K=="/"||K=="\\"))X=ut;else if(K=="/")X=Tt;else{b.username=q.username,b.password=q.password,b.host=q.host,b.port=q.port,X=yt;continue}break;case He:if(X=ut,K!="/"||ae.charAt(ye+1)!="/")continue;ye++;break;case ut:if(K!="/"&&K!="\\"){X=Tt;continue}break;case Tt:if(K=="@"){De&&(ae="%40"+ae),De=!0,ze=y(ae);for(var On=0;On<ze.length;On++){var Pi=ze[On];if(Pi==":"&&!Ke){Ke=!0;continue}var Mi=pe(Pi,le);Ke?b.password+=Mi:b.username+=Mi}ae=""}else if(K==Ie||K=="/"||K=="?"||K=="#"||K=="\\"&&V(b)){if(De&&ae=="")return j;ye-=y(ae).length+1,ae="",X=ft}else ae+=K;break;case ft:case It:if(z&&b.scheme=="file"){X=br;continue}else if(K==":"&&!je){if(ae=="")return te;if(Bt=Oe(b,ae),Bt)return Bt;if(ae="",X=nt,z==It)return}else if(K==Ie||K=="/"||K=="?"||K=="#"||K=="\\"&&V(b)){if(V(b)&&ae=="")return te;if(z&&ae==""&&(ne(b)||b.port!==null))return;if(Bt=Oe(b,ae),Bt)return Bt;if(ae="",X=qt,z)return;continue}else K=="["?je=!0:K=="]"&&(je=!1),ae+=K;break;case nt:if(be.test(K))ae+=K;else if(K==Ie||K=="/"||K=="?"||K=="#"||K=="\\"&&V(b)||z){if(ae!=""){var Pn=parseInt(ae,10);if(Pn>65535)return W;b.port=V(b)&&Pn===Q[b.scheme]?null:Pn,ae=""}if(z)return;X=qt;continue}else return W;break;case de:if(b.scheme="file",K=="/"||K=="\\")X=Ht;else if(q&&q.scheme=="file")if(K==Ie)b.host=q.host,b.path=q.path.slice(),b.query=q.query;else if(K=="?")b.host=q.host,b.path=q.path.slice(),b.query="",X=Nt;else if(K=="#")b.host=q.host,b.path=q.path.slice(),b.query=q.query,b.fragment="",X=St;else{Ve(at.slice(ye).join(""))||(b.host=q.host,b.path=q.path.slice(),st(b)),X=yt;continue}else{X=yt;continue}break;case Ht:if(K=="/"||K=="\\"){X=br;break}q&&q.scheme=="file"&&!Ve(at.slice(ye).join(""))&&(Be(q.path[0],!0)?b.path.push(q.path[0]):b.host=q.host),X=yt;continue;case br:if(K==Ie||K=="/"||K=="\\"||K=="?"||K=="#"){if(!z&&Be(ae))X=yt;else if(ae==""){if(b.host="",z)return;X=qt}else{if(Bt=Oe(b,ae),Bt)return Bt;if(b.host=="localhost"&&(b.host=""),z)return;ae="",X=qt}continue}else ae+=K;break;case qt:if(V(b)){if(X=yt,K!="/"&&K!="\\")continue}else if(!z&&K=="?")b.query="",X=Nt;else if(!z&&K=="#")b.fragment="",X=St;else if(K!=Ie&&(X=yt,K!="/"))continue;break;case yt:if(K==Ie||K=="/"||K=="\\"&&V(b)||!z&&(K=="?"||K=="#")){if(Te(ae)?(st(b),K!="/"&&!(K=="\\"&&V(b))&&b.path.push("")):et(ae)?K!="/"&&!(K=="\\"&&V(b))&&b.path.push(""):(b.scheme=="file"&&!b.path.length&&Be(ae)&&(b.host&&(b.host=""),ae=ae.charAt(0)+":"),b.path.push(ae)),ae="",b.scheme=="file"&&(K==Ie||K=="?"||K=="#"))for(;b.path.length>1&&b.path[0]==="";)b.path.shift();K=="?"?(b.query="",X=Nt):K=="#"&&(b.fragment="",X=St)}else ae+=pe(K,fe);break;case xr:K=="?"?(b.query="",X=Nt):K=="#"?(b.fragment="",X=St):K!=Ie&&(b.path[0]+=pe(K,oe));break;case Nt:!z&&K=="#"?(b.fragment="",X=St):K!=Ie&&(K=="'"&&V(b)?b.query+="%27":K=="#"?b.query+="%23":b.query+=pe(K,oe));break;case St:K!=Ie&&(b.fragment+=pe(K,ue));break}ye++}},_t=function(B){var z=h(this,_t,"URL"),q=arguments.length>1?arguments[1]:void 0,X=String(B),ye=R(z,{type:"URL"}),ae,De;if(q!==void 0){if(q instanceof _t)ae=O(q);else if(De=bt(ae={},String(q)),De)throw TypeError(De)}if(De=bt(ye,X,null,ae),De)throw TypeError(De);var je=ye.searchParams=new M,Ke=L(je);Ke.updateSearchParams(ye.query),Ke.updateURL=function(){ye.query=String(je)||null},l||(z.href=T.call(z),z.origin=E.call(z),z.protocol=A.call(z),z.username=p.call(z),z.password=g.call(z),z.host=C.call(z),z.hostname=P.call(z),z.port=$.call(z),z.pathname=U.call(z),z.search=Y.call(z),z.searchParams=Z.call(z),z.hash=G.call(z))},k=_t.prototype,T=function(){var b=O(this),B=b.scheme,z=b.username,q=b.password,X=b.host,ye=b.port,ae=b.path,De=b.query,je=b.fragment,Ke=B+":";return X!==null?(Ke+="//",ne(b)&&(Ke+=z+(q?":"+q:"")+"@"),Ke+=me(X),ye!==null&&(Ke+=":"+ye)):B=="file"&&(Ke+="//"),Ke+=b.cannotBeABaseURL?ae[0]:ae.length?"/"+ae.join("/"):"",De!==null&&(Ke+="?"+De),je!==null&&(Ke+="#"+je),Ke},E=function(){var b=O(this),B=b.scheme,z=b.port;if(B=="blob")try{return new URL(B.path[0]).origin}catch{return"null"}return B=="file"||!V(b)?"null":B+"://"+me(b.host)+(z!==null?":"+z:"")},A=function(){return O(this).scheme+":"},p=function(){return O(this).username},g=function(){return O(this).password},C=function(){var b=O(this),B=b.host,z=b.port;return B===null?"":z===null?me(B):me(B)+":"+z},P=function(){var b=O(this).host;return b===null?"":me(b)},$=function(){var b=O(this).port;return b===null?"":String(b)},U=function(){var b=O(this),B=b.path;return b.cannotBeABaseURL?B[0]:B.length?"/"+B.join("/"):""},Y=function(){var b=O(this).query;return b?"?"+b:""},Z=function(){return O(this).searchParams},G=function(){var b=O(this).fragment;return b?"#"+b:""},se=function(b,B){return{get:b,set:B,configurable:!0,enumerable:!0}};if(l&&f(k,{href:se(T,function(b){var B=O(this),z=String(b),q=bt(B,z);if(q)throw TypeError(q);L(B.searchParams).updateSearchParams(B.query)}),origin:se(E),protocol:se(A,function(b){var B=O(this);bt(B,String(b)+":",Ce)}),username:se(p,function(b){var B=O(this),z=y(String(b));if(!ce(B)){B.username="";for(var q=0;q<z.length;q++)B.username+=pe(z[q],le)}}),password:se(g,function(b){var B=O(this),z=y(String(b));if(!ce(B)){B.password="";for(var q=0;q<z.length;q++)B.password+=pe(z[q],le)}}),host:se(C,function(b){var B=O(this);B.cannotBeABaseURL||bt(B,String(b),ft)}),hostname:se(P,function(b){var B=O(this);B.cannotBeABaseURL||bt(B,String(b),It)}),port:se($,function(b){var B=O(this);ce(B)||(b=String(b),b==""?B.port=null:bt(B,b,nt))}),pathname:se(U,function(b){var B=O(this);B.cannotBeABaseURL||(B.path=[],bt(B,b+"",qt))}),search:se(Y,function(b){var B=O(this);b=String(b),b==""?B.query=null:(b.charAt(0)=="?"&&(b=b.slice(1)),B.query="",bt(B,b,Nt)),L(B.searchParams).updateSearchParams(B.query)}),searchParams:se(Z),hash:se(G,function(b){var B=O(this);if(b=String(b),b==""){B.fragment=null;return}b.charAt(0)=="#"&&(b=b.slice(1)),B.fragment="",bt(B,b,St)})}),d(k,"toJSON",function(){return T.call(this)},{enumerable:!0}),d(k,"toString",function(){return T.call(this)},{enumerable:!0}),S){var $e=S.createObjectURL,Ee=S.revokeObjectURL;$e&&d(_t,"createObjectURL",function(B){return $e.apply(S,arguments)}),Ee&&d(_t,"revokeObjectURL",function(B){return Ee.apply(S,arguments)})}D(_t,"URL"),a({global:!0,forced:!u,sham:!l},{URL:_t})}},e={};function t(o){if(e[o])return e[o].exports;var s=e[o]={exports:{}};return r[o](s,s.exports,t),s.exports}(function(){t.d=function(o,s){for(var i in s)t.o(s,i)&&!t.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:s[i]})}})(),function(){t.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){t.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)}}(),function(){t.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}}();var n={};return function(){"use strict";t.r(n),t.d(n,{Dropzone:function(){return de},default:function(){return _t}});var o=t(2222),s=t(7327),i=t(2772),a=t(6992),l=t(1249),u=t(7042),c=t(561),f=t(8264),d=t(8309),h=t(489),m=t(1539),v=t(4916),y=t(9714),w=t(8783),x=t(4723),D=t(5306),I=t(3123),N=t(3210),S=t(2472),M=t(2990),L=t(8927),R=t(3105),O=t(5035),F=t(4345),_=t(7174),j=t(2846),H=t(4731),te=t(7209),W=t(6319),J=t(8867),re=t(7789),be=t(3739),Ae=t(9368),xe=t(4483),Fe=t(2056),Re=t(3462),_e=t(678),he=t(7462),Se=t(3824),ke=t(5021),Ie=t(2974),Oe=t(5016),ot=t(4747),Ye=t(3948),Qe=t(285);function me(k,T){var E;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(E=oe(k))||T&&k&&typeof k.length=="number"){E&&(k=E);var A=0,p=function(){};return{s:p,n:function(){return A>=k.length?{done:!0}:{done:!1,value:k[A++]}},e:function(U){throw U},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,C=!1,P;return{s:function(){E=k[Symbol.iterator]()},n:function(){var U=E.next();return g=U.done,U},e:function(U){C=!0,P=U},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(C)throw P}}}}function oe(k,T){if(!!k){if(typeof k=="string")return ue(k,T);var E=Object.prototype.toString.call(k).slice(8,-1);if(E==="Object"&&k.constructor&&(E=k.constructor.name),E==="Map"||E==="Set")return Array.from(k);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return ue(k,T)}}function ue(k,T){(T==null||T>k.length)&&(T=k.length);for(var E=0,A=new Array(T);E<T;E++)A[E]=k[E];return A}function fe(k,T){if(!(k instanceof T))throw new TypeError("Cannot call a class as a function")}function le(k,T){for(var E=0;E<T.length;E++){var A=T[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(k,A.key,A)}}function pe(k,T,E){return T&&le(k.prototype,T),E&&le(k,E),k}var Q=function(){function k(){fe(this,k)}return pe(k,[{key:"on",value:function(E,A){return this._callbacks=this._callbacks||{},this._callbacks[E]||(this._callbacks[E]=[]),this._callbacks[E].push(A),this}},{key:"emit",value:function(E){this._callbacks=this._callbacks||{};for(var A=this._callbacks[E],p=arguments.length,g=new Array(p>1?p-1:0),C=1;C<p;C++)g[C-1]=arguments[C];if(A){var P=me(A,!0),$;try{for(P.s();!($=P.n()).done;){var U=$.value;U.apply(this,g)}}catch(Y){P.e(Y)}finally{P.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+E,{args:g})),this}},{key:"makeEvent",value:function(E,A){var p={bubbles:!0,cancelable:!0,detail:A};if(typeof window.CustomEvent=="function")return new CustomEvent(E,p);var g=document.createEvent("CustomEvent");return g.initCustomEvent(E,p.bubbles,p.cancelable,p.detail),g}},{key:"off",value:function(E,A){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var p=this._callbacks[E];if(!p)return this;if(arguments.length===1)return delete this._callbacks[E],this;for(var g=0;g<p.length;g++){var C=p[g];if(C===A){p.splice(g,1);break}}return this}}]),k}(),V='<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.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',ne=V;function ce(k,T){var E;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(E=Be(k))||T&&k&&typeof k.length=="number"){E&&(k=E);var A=0,p=function(){};return{s:p,n:function(){return A>=k.length?{done:!0}:{done:!1,value:k[A++]}},e:function(U){throw U},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,C=!1,P;return{s:function(){E=k[Symbol.iterator]()},n:function(){var U=E.next();return g=U.done,U},e:function(U){C=!0,P=U},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(C)throw P}}}}function Be(k,T){if(!!k){if(typeof k=="string")return Ve(k,T);var E=Object.prototype.toString.call(k).slice(8,-1);if(E==="Object"&&k.constructor&&(E=k.constructor.name),E==="Map"||E==="Set")return Array.from(k);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Ve(k,T)}}function Ve(k,T){(T==null||T>k.length)&&(T=k.length);for(var E=0,A=new Array(T);E<T;E++)A[E]=k[E];return A}var st={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(T,E,A){if(A)return{dzuuid:A.file.upload.uuid,dzchunkindex:A.index,dztotalfilesize:A.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:A.file.upload.totalChunkCount,dzchunkbyteoffset:A.index*this.options.chunkSize}},accept:function(T,E){return E()},chunksUploaded:function(T,E){E()},fallback:function(){var T;this.element.className="".concat(this.element.className," dz-browser-not-supported");var E=ce(this.element.getElementsByTagName("div"),!0),A;try{for(E.s();!(A=E.n()).done;){var p=A.value;if(/(^| )dz-message($| )/.test(p.className)){T=p,p.className="dz-message";break}}}catch(C){E.e(C)}finally{E.f()}T||(T=de.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(T));var g=T.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(T,E,A,p){var g={srcX:0,srcY:0,srcWidth:T.width,srcHeight:T.height},C=T.width/T.height;E==null&&A==null?(E=g.srcWidth,A=g.srcHeight):E==null?E=A*C:A==null&&(A=E/C),E=Math.min(E,g.srcWidth),A=Math.min(A,g.srcHeight);var P=E/A;if(g.srcWidth>E||g.srcHeight>A)if(p==="crop")C>P?(g.srcHeight=T.height,g.srcWidth=g.srcHeight*P):(g.srcWidth=T.width,g.srcHeight=g.srcWidth/P);else if(p==="contain")C>P?A=E/C:E=A*C;else throw new Error("Unknown resizeMethod '".concat(p,"'"));return g.srcX=(T.width-g.srcWidth)/2,g.srcY=(T.height-g.srcHeight)/2,g.trgWidth=E,g.trgHeight=A,g},transformFile:function(T,E){return(this.options.resizeWidth||this.options.resizeHeight)&&T.type.match(/image.*/)?this.resizeImage(T,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,E):E(T)},previewTemplate:ne,drop:function(T){return this.element.classList.remove("dz-drag-hover")},dragstart:function(T){},dragend:function(T){return this.element.classList.remove("dz-drag-hover")},dragenter:function(T){return this.element.classList.add("dz-drag-hover")},dragover:function(T){return this.element.classList.add("dz-drag-hover")},dragleave:function(T){return this.element.classList.remove("dz-drag-hover")},paste:function(T){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(T){var E=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){T.previewElement=de.createElement(this.options.previewTemplate.trim()),T.previewTemplate=T.previewElement,this.previewsContainer.appendChild(T.previewElement);var A=ce(T.previewElement.querySelectorAll("[data-dz-name]"),!0),p;try{for(A.s();!(p=A.n()).done;){var g=p.value;g.textContent=T.name}}catch(G){A.e(G)}finally{A.f()}var C=ce(T.previewElement.querySelectorAll("[data-dz-size]"),!0),P;try{for(C.s();!(P=C.n()).done;)g=P.value,g.innerHTML=this.filesize(T.size)}catch(G){C.e(G)}finally{C.f()}this.options.addRemoveLinks&&(T._removeLink=de.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),T.previewElement.appendChild(T._removeLink));var $=function(se){return se.preventDefault(),se.stopPropagation(),T.status===de.UPLOADING?de.confirm(E.options.dictCancelUploadConfirmation,function(){return E.removeFile(T)}):E.options.dictRemoveFileConfirmation?de.confirm(E.options.dictRemoveFileConfirmation,function(){return E.removeFile(T)}):E.removeFile(T)},U=ce(T.previewElement.querySelectorAll("[data-dz-remove]"),!0),Y;try{for(U.s();!(Y=U.n()).done;){var Z=Y.value;Z.addEventListener("click",$)}}catch(G){U.e(G)}finally{U.f()}}},removedfile:function(T){return T.previewElement!=null&&T.previewElement.parentNode!=null&&T.previewElement.parentNode.removeChild(T.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(T,E){if(T.previewElement){T.previewElement.classList.remove("dz-file-preview");var A=ce(T.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),p;try{for(A.s();!(p=A.n()).done;){var g=p.value;g.alt=T.name,g.src=E}}catch(C){A.e(C)}finally{A.f()}return setTimeout(function(){return T.previewElement.classList.add("dz-image-preview")},1)}},error:function(T,E){if(T.previewElement){T.previewElement.classList.add("dz-error"),typeof E!="string"&&E.error&&(E=E.error);var A=ce(T.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),p;try{for(A.s();!(p=A.n()).done;){var g=p.value;g.textContent=E}}catch(C){A.e(C)}finally{A.f()}}},errormultiple:function(){},processing:function(T){if(T.previewElement&&(T.previewElement.classList.add("dz-processing"),T._removeLink))return T._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(T,E,A){if(T.previewElement){var p=ce(T.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),g;try{for(p.s();!(g=p.n()).done;){var C=g.value;C.nodeName==="PROGRESS"?C.value=E:C.style.width="".concat(E,"%")}}catch(P){p.e(P)}finally{p.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(T){if(T.previewElement)return T.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(T){return this.emit("error",T,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(T){if(T._removeLink&&(T._removeLink.innerHTML=this.options.dictRemoveFile),T.previewElement)return T.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},et=st;function Te(k){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(E){return typeof E}:Te=function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},Te(k)}function Ce(k,T){var E;if(typeof Symbol>"u"||k[Symbol.iterator]==null){if(Array.isArray(k)||(E=Mt(k))||T&&k&&typeof k.length=="number"){E&&(k=E);var A=0,p=function(){};return{s:p,n:function(){return A>=k.length?{done:!0}:{done:!1,value:k[A++]}},e:function(U){throw U},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g=!0,C=!1,P;return{s:function(){E=k[Symbol.iterator]()},n:function(){var U=E.next();return g=U.done,U},e:function(U){C=!0,P=U},f:function(){try{!g&&E.return!=null&&E.return()}finally{if(C)throw P}}}}function Mt(k,T){if(!!k){if(typeof k=="string")return dt(k,T);var E=Object.prototype.toString.call(k).slice(8,-1);if(E==="Object"&&k.constructor&&(E=k.constructor.name),E==="Map"||E==="Set")return Array.from(k);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return dt(k,T)}}function dt(k,T){(T==null||T>k.length)&&(T=k.length);for(var E=0,A=new Array(T);E<T;E++)A[E]=k[E];return A}function Yt(k,T){if(!(k instanceof T))throw new TypeError("Cannot call a class as a function")}function Kt(k,T){for(var E=0;E<T.length;E++){var A=T[E];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(k,A.key,A)}}function Ge(k,T,E){return T&&Kt(k.prototype,T),E&&Kt(k,E),k}function Pe(k,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");k.prototype=Object.create(T&&T.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),T&&He(k,T)}function He(k,T){return He=Object.setPrototypeOf||function(A,p){return A.__proto__=p,A},He(k,T)}function ut(k){var T=It();return function(){var A=nt(k),p;if(T){var g=nt(this).constructor;p=Reflect.construct(A,arguments,g)}else p=A.apply(this,arguments);return Tt(this,p)}}function Tt(k,T){return T&&(Te(T)==="object"||typeof T=="function")?T:ft(k)}function ft(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function It(){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 nt(k){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},nt(k)}var de=function(k){Pe(E,k);var T=ut(E);function E(A,p){var g;Yt(this,E),g=T.call(this);var C,P;if(g.element=A,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(ft(g)),g.element.dropzone=ft(g);var $=(P=E.optionsForElement(g.element))!=null?P:{};if(g.options=E.extend({},et,$,p??{}),g.options.previewTemplate=g.options.previewTemplate.replace(/\n*/g,""),g.options.forceFallback||!E.isBrowserSupported())return Tt(g,g.options.fallback.call(ft(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(U){return g.options.renameFilename.call(ft(g),U.name,U)}),typeof g.options.method=="string"&&(g.options.method=g.options.method.toUpperCase()),(C=g.getExistingFallback())&&C.parentNode&&C.parentNode.removeChild(C),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 Ge(E,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(p){return p.accepted}).map(function(p){return p})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(p){return!p.accepted}).map(function(p){return p})}},{key:"getFilesWithStatus",value:function(p){return this.files.filter(function(g){return g.status===p}).map(function(g){return g})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(E.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(E.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(E.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(p){return p.status===E.UPLOADING||p.status===E.QUEUED}).map(function(p){return p})}},{key:"init",value:function(){var p=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(E.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var g=function Z(){p.hiddenFileInput&&p.hiddenFileInput.parentNode.removeChild(p.hiddenFileInput),p.hiddenFileInput=document.createElement("input"),p.hiddenFileInput.setAttribute("type","file"),(p.options.maxFiles===null||p.options.maxFiles>1)&&p.hiddenFileInput.setAttribute("multiple","multiple"),p.hiddenFileInput.className="dz-hidden-input",p.options.acceptedFiles!==null&&p.hiddenFileInput.setAttribute("accept",p.options.acceptedFiles),p.options.capture!==null&&p.hiddenFileInput.setAttribute("capture",p.options.capture),p.hiddenFileInput.setAttribute("tabindex","-1"),p.hiddenFileInput.style.visibility="hidden",p.hiddenFileInput.style.position="absolute",p.hiddenFileInput.style.top="0",p.hiddenFileInput.style.left="0",p.hiddenFileInput.style.height="0",p.hiddenFileInput.style.width="0",E.getElement(p.options.hiddenInputContainer,"hiddenInputContainer").appendChild(p.hiddenFileInput),p.hiddenFileInput.addEventListener("change",function(){var G=p.hiddenFileInput.files;if(G.length){var se=Ce(G,!0),$e;try{for(se.s();!($e=se.n()).done;){var Ee=$e.value;p.addFile(Ee)}}catch(b){se.e(b)}finally{se.f()}}p.emit("addedfiles",G),Z()})};g()}this.URL=window.URL!==null?window.URL:window.webkitURL;var C=Ce(this.events,!0),P;try{for(C.s();!(P=C.n()).done;){var $=P.value;this.on($,this.options[$])}}catch(Z){C.e(Z)}finally{C.f()}this.on("uploadprogress",function(){return p.updateTotalUploadProgress()}),this.on("removedfile",function(){return p.updateTotalUploadProgress()}),this.on("canceled",function(Z){return p.emit("complete",Z)}),this.on("complete",function(Z){if(p.getAddedFiles().length===0&&p.getUploadingFiles().length===0&&p.getQueuedFiles().length===0)return setTimeout(function(){return p.emit("queuecomplete")},0)});var U=function(G){if(G.dataTransfer.types){for(var se=0;se<G.dataTransfer.types.length;se++)if(G.dataTransfer.types[se]==="Files")return!0}return!1},Y=function(G){if(!!U(G))return G.stopPropagation(),G.preventDefault?G.preventDefault():G.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(G){return p.emit("dragstart",G)},dragenter:function(G){return Y(G),p.emit("dragenter",G)},dragover:function(G){var se;try{se=G.dataTransfer.effectAllowed}catch{}return G.dataTransfer.dropEffect=se==="move"||se==="linkMove"?"move":"copy",Y(G),p.emit("dragover",G)},dragleave:function(G){return p.emit("dragleave",G)},drop:function(G){return Y(G),p.drop(G)},dragend:function(G){return p.emit("dragend",G)}}}],this.clickableElements.forEach(function(Z){return p.listeners.push({element:Z,events:{click:function(se){return(Z!==p.element||se.target===p.element||E.elementInside(se.target,p.element.querySelector(".dz-message")))&&p.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(this.hiddenFileInput!=null?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,E.instances.splice(E.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var p,g=0,C=0,P=this.getActiveFiles();if(P.length){var $=Ce(this.getActiveFiles(),!0),U;try{for($.s();!(U=$.n()).done;){var Y=U.value;g+=Y.upload.bytesSent,C+=Y.upload.total}}catch(Z){$.e(Z)}finally{$.f()}p=100*g/C}else p=100;return this.emit("totaluploadprogress",p,C,g)}},{key:"_getParamName",value:function(p){return typeof this.options.paramName=="function"?this.options.paramName(p):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(p,"]"):"")}},{key:"_renameFile",value:function(p){return typeof this.options.renameFile!="function"?p.name:this.options.renameFile(p)}},{key:"getFallbackForm",value:function(){var p,g;if(p=this.getExistingFallback())return p;var C='<div class="dz-fallback">';this.options.dictFallbackText&&(C+="<p>".concat(this.options.dictFallbackText,"</p>")),C+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var P=E.createElement(C);return this.element.tagName!=="FORM"?(g=E.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),g.appendChild(P)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),g??P}},{key:"getExistingFallback",value:function(){for(var p=function(Y){var Z=Ce(Y,!0),G;try{for(Z.s();!(G=Z.n()).done;){var se=G.value;if(/(^| )fallback($| )/.test(se.className))return se}}catch($e){Z.e($e)}finally{Z.f()}},g=0,C=["div","form"];g<C.length;g++){var P=C[g],$;if($=p(this.element.getElementsByTagName(P)))return $}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(p){return function(){var g=[];for(var C in p.events){var P=p.events[C];g.push(p.element.addEventListener(C,P,!1))}return g}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(p){return function(){var g=[];for(var C in p.events){var P=p.events[C];g.push(p.element.removeEventListener(C,P,!1))}return g}()})}},{key:"disable",value:function(){var p=this;return this.clickableElements.forEach(function(g){return g.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(g){return p.cancelUpload(g)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(p){return p.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(p){var g=0,C="b";if(p>0){for(var P=["tb","gb","mb","kb","b"],$=0;$<P.length;$++){var U=P[$],Y=Math.pow(this.options.filesizeBase,4-$)/10;if(p>=Y){g=p/Math.pow(this.options.filesizeBase,4-$),C=U;break}}g=Math.round(10*g)/10}return"<strong>".concat(g,"</strong> ").concat(this.options.dictFileSizeUnits[C])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(p){if(!!p.dataTransfer){this.emit("drop",p);for(var g=[],C=0;C<p.dataTransfer.files.length;C++)g[C]=p.dataTransfer.files[C];if(g.length){var P=p.dataTransfer.items;P&&P.length&&P[0].webkitGetAsEntry!=null?this._addFilesFromItems(P):this.handleFiles(g)}this.emit("addedfiles",g)}}},{key:"paste",value:function(p){if(St(p!=null?p.clipboardData:void 0,function(C){return C.items})!=null){this.emit("paste",p);var g=p.clipboardData.items;if(g.length)return this._addFilesFromItems(g)}}},{key:"handleFiles",value:function(p){var g=Ce(p,!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value;this.addFile(P)}}catch($){g.e($)}finally{g.f()}}},{key:"_addFilesFromItems",value:function(p){var g=this;return function(){var C=[],P=Ce(p,!0),$;try{for(P.s();!($=P.n()).done;){var U=$.value,Y;U.webkitGetAsEntry!=null&&(Y=U.webkitGetAsEntry())?Y.isFile?C.push(g.addFile(U.getAsFile())):Y.isDirectory?C.push(g._addFilesFromDirectory(Y,Y.name)):C.push(void 0):U.getAsFile!=null&&(U.kind==null||U.kind==="file")?C.push(g.addFile(U.getAsFile())):C.push(void 0)}}catch(Z){P.e(Z)}finally{P.f()}return C}()}},{key:"_addFilesFromDirectory",value:function(p,g){var C=this,P=p.createReader(),$=function(Z){return bt(console,"log",function(G){return G.log(Z)})},U=function Y(){return P.readEntries(function(Z){if(Z.length>0){var G=Ce(Z,!0),se;try{for(G.s();!(se=G.n()).done;){var $e=se.value;$e.isFile?$e.file(function(Ee){if(!(C.options.ignoreHiddenFiles&&Ee.name.substring(0,1)==="."))return Ee.fullPath="".concat(g,"/").concat(Ee.name),C.addFile(Ee)}):$e.isDirectory&&C._addFilesFromDirectory($e,"".concat(g,"/").concat($e.name))}}catch(Ee){G.e(Ee)}finally{G.f()}Y()}return null},$)};return U()}},{key:"accept",value:function(p,g){this.options.maxFilesize&&p.size>this.options.maxFilesize*1024*1024?g(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(p.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):E.isValidFile(p,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(g(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",p)):this.options.accept.call(this,p,g):g(this.options.dictInvalidFileType)}},{key:"addFile",value:function(p){var g=this;p.upload={uuid:E.uuidv4(),progress:0,total:p.size,bytesSent:0,filename:this._renameFile(p)},this.files.push(p),p.status=E.ADDED,this.emit("addedfile",p),this._enqueueThumbnail(p),this.accept(p,function(C){C?(p.accepted=!1,g._errorProcessing([p],C)):(p.accepted=!0,g.options.autoQueue&&g.enqueueFile(p)),g._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(p){var g=Ce(p,!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value;this.enqueueFile(P)}}catch($){g.e($)}finally{g.f()}return null}},{key:"enqueueFile",value:function(p){var g=this;if(p.status===E.ADDED&&p.accepted===!0){if(p.status=E.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return g.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(p){var g=this;if(this.options.createImageThumbnails&&p.type.match(/image.*/)&&p.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(p),setTimeout(function(){return g._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var p=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var g=this._thumbnailQueue.shift();return this.createThumbnail(g,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(C){return p.emit("thumbnail",g,C),p._processingThumbnail=!1,p._processThumbnailQueue()})}}},{key:"removeFile",value:function(p){if(p.status===E.UPLOADING&&this.cancelUpload(p),this.files=Ht(this.files,p),this.emit("removedfile",p),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(p){p==null&&(p=!1);var g=Ce(this.files.slice(),!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value;(P.status!==E.UPLOADING||p)&&this.removeFile(P)}}catch($){g.e($)}finally{g.f()}return null}},{key:"resizeImage",value:function(p,g,C,P,$){var U=this;return this.createThumbnail(p,g,C,P,!0,function(Y,Z){if(Z==null)return $(p);var G=U.options.resizeMimeType;G==null&&(G=p.type);var se=Z.toDataURL(G,U.options.resizeQuality);return(G==="image/jpeg"||G==="image/jpg")&&(se=xr.restore(p.dataURL,se)),$(E.dataURItoBlob(se))})}},{key:"createThumbnail",value:function(p,g,C,P,$,U){var Y=this,Z=new FileReader;Z.onload=function(){if(p.dataURL=Z.result,p.type==="image/svg+xml"){U!=null&&U(Z.result);return}Y.createThumbnailFromUrl(p,g,C,P,$,U)},Z.readAsDataURL(p)}},{key:"displayExistingFile",value:function(p,g,C,P){var $=this,U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",p),this.emit("complete",p),!U)this.emit("thumbnail",p,g),C&&C();else{var Y=function(G){$.emit("thumbnail",p,G),C&&C()};p.dataURL=g,this.createThumbnailFromUrl(p,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,Y,P)}}},{key:"createThumbnailFromUrl",value:function(p,g,C,P,$,U,Y){var Z=this,G=document.createElement("img");return Y&&(G.crossOrigin=Y),$=getComputedStyle(document.body).imageOrientation=="from-image"?!1:$,G.onload=function(){var se=function(Ee){return Ee(1)};return typeof EXIF<"u"&&EXIF!==null&&$&&(se=function(Ee){return EXIF.getData(G,function(){return Ee(EXIF.getTag(this,"Orientation"))})}),se(function($e){p.width=G.width,p.height=G.height;var Ee=Z.options.resize.call(Z,p,g,C,P),b=document.createElement("canvas"),B=b.getContext("2d");switch(b.width=Ee.trgWidth,b.height=Ee.trgHeight,$e>4&&(b.width=Ee.trgHeight,b.height=Ee.trgWidth),$e){case 2:B.translate(b.width,0),B.scale(-1,1);break;case 3:B.translate(b.width,b.height),B.rotate(Math.PI);break;case 4:B.translate(0,b.height),B.scale(1,-1);break;case 5:B.rotate(.5*Math.PI),B.scale(1,-1);break;case 6:B.rotate(.5*Math.PI),B.translate(0,-b.width);break;case 7:B.rotate(.5*Math.PI),B.translate(b.height,-b.width),B.scale(-1,1);break;case 8:B.rotate(-.5*Math.PI),B.translate(-b.height,0);break}yt(B,G,Ee.srcX!=null?Ee.srcX:0,Ee.srcY!=null?Ee.srcY:0,Ee.srcWidth,Ee.srcHeight,Ee.trgX!=null?Ee.trgX:0,Ee.trgY!=null?Ee.trgY:0,Ee.trgWidth,Ee.trgHeight);var z=b.toDataURL("image/png");if(U!=null)return U(z,b)})},U!=null&&(G.onerror=U),G.src=p.dataURL}},{key:"processQueue",value:function(){var p=this.options.parallelUploads,g=this.getUploadingFiles().length,C=g;if(!(g>=p)){var P=this.getQueuedFiles();if(P.length>0){if(this.options.uploadMultiple)return this.processFiles(P.slice(0,p-g));for(;C<p;){if(!P.length)return;this.processFile(P.shift()),C++}}}}},{key:"processFile",value:function(p){return this.processFiles([p])}},{key:"processFiles",value:function(p){var g=Ce(p,!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value;P.processing=!0,P.status=E.UPLOADING,this.emit("processing",P)}}catch($){g.e($)}finally{g.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",p),this.uploadFiles(p)}},{key:"_getFilesWithXhr",value:function(p){var g;return g=this.files.filter(function(C){return C.xhr===p}).map(function(C){return C})}},{key:"cancelUpload",value:function(p){if(p.status===E.UPLOADING){var g=this._getFilesWithXhr(p.xhr),C=Ce(g,!0),P;try{for(C.s();!(P=C.n()).done;){var $=P.value;$.status=E.CANCELED}}catch(G){C.e(G)}finally{C.f()}typeof p.xhr<"u"&&p.xhr.abort();var U=Ce(g,!0),Y;try{for(U.s();!(Y=U.n()).done;){var Z=Y.value;this.emit("canceled",Z)}}catch(G){U.e(G)}finally{U.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",g)}else(p.status===E.ADDED||p.status===E.QUEUED)&&(p.status=E.CANCELED,this.emit("canceled",p),this.options.uploadMultiple&&this.emit("canceledmultiple",[p]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(p){if(typeof p=="function"){for(var g=arguments.length,C=new Array(g>1?g-1:0),P=1;P<g;P++)C[P-1]=arguments[P];return p.apply(this,C)}return p}},{key:"uploadFile",value:function(p){return this.uploadFiles([p])}},{key:"uploadFiles",value:function(p){var g=this;this._transformFiles(p,function(C){if(g.options.chunking){var P=C[0];p[0].upload.chunked=g.options.chunking&&(g.options.forceChunking||P.size>g.options.chunkSize),p[0].upload.totalChunkCount=Math.ceil(P.size/g.options.chunkSize)}if(p[0].upload.chunked){var $=p[0],U=C[0],Y=0;$.upload.chunks=[];var Z=function(){for(var b=0;$.upload.chunks[b]!==void 0;)b++;if(!(b>=$.upload.totalChunkCount)){Y++;var B=b*g.options.chunkSize,z=Math.min(B+g.options.chunkSize,U.size),q={name:g._getParamName(0),data:U.webkitSlice?U.webkitSlice(B,z):U.slice(B,z),filename:$.upload.filename,chunkIndex:b};$.upload.chunks[b]={file:$,index:b,dataBlock:q,status:E.UPLOADING,progress:0,retries:0},g._uploadData(p,[q])}};if($.upload.finishedChunkUpload=function(Ee,b){var B=!0;Ee.status=E.SUCCESS,Ee.dataBlock=null,Ee.xhr=null;for(var z=0;z<$.upload.totalChunkCount;z++){if($.upload.chunks[z]===void 0)return Z();$.upload.chunks[z].status!==E.SUCCESS&&(B=!1)}B&&g.options.chunksUploaded($,function(){g._finished(p,b,null)})},g.options.parallelChunkUploads)for(var G=0;G<$.upload.totalChunkCount;G++)Z();else Z()}else{for(var se=[],$e=0;$e<p.length;$e++)se[$e]={name:g._getParamName($e),data:C[$e],filename:p[$e].upload.filename};g._uploadData(p,se)}})}},{key:"_getChunk",value:function(p,g){for(var C=0;C<p.upload.totalChunkCount;C++)if(p.upload.chunks[C]!==void 0&&p.upload.chunks[C].xhr===g)return p.upload.chunks[C]}},{key:"_uploadData",value:function(p,g){var C=this,P=new XMLHttpRequest,$=Ce(p,!0),U;try{for($.s();!(U=$.n()).done;){var Y=U.value;Y.xhr=P}}catch(ze){$.e(ze)}finally{$.f()}p[0].upload.chunked&&(p[0].upload.chunks[g[0].chunkIndex].xhr=P);var Z=this.resolveOption(this.options.method,p),G=this.resolveOption(this.options.url,p);P.open(Z,G,!0);var se=this.resolveOption(this.options.timeout,p);se&&(P.timeout=this.resolveOption(this.options.timeout,p)),P.withCredentials=!!this.options.withCredentials,P.onload=function(ze){C._finishedUploading(p,P,ze)},P.ontimeout=function(){C._handleUploadError(p,P,"Request timedout after ".concat(C.options.timeout/1e3," seconds"))},P.onerror=function(){C._handleUploadError(p,P)};var $e=P.upload!=null?P.upload:P;$e.onprogress=function(ze){return C._updateFilesUploadProgress(p,P,ze)};var Ee={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&E.extend(Ee,this.options.headers);for(var b in Ee){var B=Ee[b];B&&P.setRequestHeader(b,B)}var z=new FormData;if(this.options.params){var q=this.options.params;typeof q=="function"&&(q=q.call(this,p,P,p[0].upload.chunked?this._getChunk(p[0],P):null));for(var X in q){var ye=q[X];if(Array.isArray(ye))for(var ae=0;ae<ye.length;ae++)z.append(X,ye[ae]);else z.append(X,ye)}}var De=Ce(p,!0),je;try{for(De.s();!(je=De.n()).done;){var Ke=je.value;this.emit("sending",Ke,P,z)}}catch(ze){De.e(ze)}finally{De.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",p,P,z),this._addFormElementData(z);for(var at=0;at<g.length;at++){var K=g[at];z.append(K.name,K.data,K.filename)}this.submitRequest(P,z,p)}},{key:"_transformFiles",value:function(p,g){for(var C=this,P=[],$=0,U=function(G){C.options.transformFile.call(C,p[G],function(se){P[G]=se,++$===p.length&&g(P)})},Y=0;Y<p.length;Y++)U(Y)}},{key:"_addFormElementData",value:function(p){if(this.element.tagName==="FORM"){var g=Ce(this.element.querySelectorAll("input, textarea, select, button"),!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value,$=P.getAttribute("name"),U=P.getAttribute("type");if(U&&(U=U.toLowerCase()),!(typeof $>"u"||$===null))if(P.tagName==="SELECT"&&P.hasAttribute("multiple")){var Y=Ce(P.options,!0),Z;try{for(Y.s();!(Z=Y.n()).done;){var G=Z.value;G.selected&&p.append($,G.value)}}catch(se){Y.e(se)}finally{Y.f()}}else(!U||U!=="checkbox"&&U!=="radio"||P.checked)&&p.append($,P.value)}}catch(se){g.e(se)}finally{g.f()}}}},{key:"_updateFilesUploadProgress",value:function(p,g,C){if(p[0].upload.chunked){var Y=p[0],Z=this._getChunk(Y,g);C?(Z.progress=100*C.loaded/C.total,Z.total=C.total,Z.bytesSent=C.loaded):(Z.progress=100,Z.bytesSent=Z.total),Y.upload.progress=0,Y.upload.total=0,Y.upload.bytesSent=0;for(var G=0;G<Y.upload.totalChunkCount;G++)Y.upload.chunks[G]&&typeof Y.upload.chunks[G].progress<"u"&&(Y.upload.progress+=Y.upload.chunks[G].progress,Y.upload.total+=Y.upload.chunks[G].total,Y.upload.bytesSent+=Y.upload.chunks[G].bytesSent);Y.upload.progress=Y.upload.progress/Y.upload.totalChunkCount,this.emit("uploadprogress",Y,Y.upload.progress,Y.upload.bytesSent)}else{var P=Ce(p,!0),$;try{for(P.s();!($=P.n()).done;){var U=$.value;U.upload.total&&U.upload.bytesSent&&U.upload.bytesSent==U.upload.total||(C?(U.upload.progress=100*C.loaded/C.total,U.upload.total=C.total,U.upload.bytesSent=C.loaded):(U.upload.progress=100,U.upload.bytesSent=U.upload.total),this.emit("uploadprogress",U,U.upload.progress,U.upload.bytesSent))}}catch(se){P.e(se)}finally{P.f()}}}},{key:"_finishedUploading",value:function(p,g,C){var P;if(p[0].status!==E.CANCELED&&g.readyState===4){if(g.responseType!=="arraybuffer"&&g.responseType!=="blob"&&(P=g.responseText,g.getResponseHeader("content-type")&&~g.getResponseHeader("content-type").indexOf("application/json")))try{P=JSON.parse(P)}catch($){C=$,P="Invalid JSON response from server."}this._updateFilesUploadProgress(p,g),200<=g.status&&g.status<300?p[0].upload.chunked?p[0].upload.finishedChunkUpload(this._getChunk(p[0],g),P):this._finished(p,P,C):this._handleUploadError(p,g,P)}}},{key:"_handleUploadError",value:function(p,g,C){if(p[0].status!==E.CANCELED){if(p[0].upload.chunked&&this.options.retryChunks){var P=this._getChunk(p[0],g);if(P.retries++<this.options.retryChunksLimit){this._uploadData(p,[P.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(p,C||this.options.dictResponseError.replace("{{statusCode}}",g.status),g)}}},{key:"submitRequest",value:function(p,g,C){if(p.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}p.send(g)}},{key:"_finished",value:function(p,g,C){var P=Ce(p,!0),$;try{for(P.s();!($=P.n()).done;){var U=$.value;U.status=E.SUCCESS,this.emit("success",U,g,C),this.emit("complete",U)}}catch(Y){P.e(Y)}finally{P.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",p,g,C),this.emit("completemultiple",p)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(p,g,C){var P=Ce(p,!0),$;try{for(P.s();!($=P.n()).done;){var U=$.value;U.status=E.ERROR,this.emit("error",U,g,C),this.emit("complete",U)}}catch(Y){P.e(Y)}finally{P.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",p,g,C),this.emit("completemultiple",p)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=Q,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(p){for(var g=arguments.length,C=new Array(g>1?g-1:0),P=1;P<g;P++)C[P-1]=arguments[P];for(var $=0,U=C;$<U.length;$++){var Y=U[$];for(var Z in Y){var G=Y[Z];p[Z]=G}}return p}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(p){var g=Math.random()*16|0,C=p==="x"?g:g&3|8;return C.toString(16)})}}]),E}(Q);de.initClass(),de.version="5.9.3",de.options={},de.optionsForElement=function(k){if(k.getAttribute("id"))return de.options[br(k.getAttribute("id"))]},de.instances=[],de.forElement=function(k){if(typeof k=="string"&&(k=document.querySelector(k)),(k!=null?k.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return k.dropzone},de.autoDiscover=!0,de.discover=function(){var k;if(document.querySelectorAll)k=document.querySelectorAll(".dropzone");else{k=[];var T=function(A){return function(){var p=[],g=Ce(A,!0),C;try{for(g.s();!(C=g.n()).done;){var P=C.value;/(^| )dropzone($| )/.test(P.className)?p.push(k.push(P)):p.push(void 0)}}catch($){g.e($)}finally{g.f()}return p}()};T(document.getElementsByTagName("div")),T(document.getElementsByTagName("form"))}return function(){var E=[],A=Ce(k,!0),p;try{for(A.s();!(p=A.n()).done;){var g=p.value;de.optionsForElement(g)!==!1?E.push(new de(g)):E.push(void 0)}}catch(C){A.e(C)}finally{A.f()}return E}()},de.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],de.isBrowserSupported=function(){var k=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))k=!1;else{de.blacklistedBrowsers!==void 0&&(de.blockedBrowsers=de.blacklistedBrowsers);var T=Ce(de.blockedBrowsers,!0),E;try{for(T.s();!(E=T.n()).done;){var A=E.value;if(A.test(navigator.userAgent)){k=!1;continue}}}catch(p){T.e(p)}finally{T.f()}}else k=!1;return k},de.dataURItoBlob=function(k){for(var T=atob(k.split(",")[1]),E=k.split(",")[0].split(":")[1].split(";")[0],A=new ArrayBuffer(T.length),p=new Uint8Array(A),g=0,C=T.length,P=0<=C;P?g<=C:g>=C;P?g++:g--)p[g]=T.charCodeAt(g);return new Blob([A],{type:E})};var Ht=function(T,E){return T.filter(function(A){return A!==E}).map(function(A){return A})},br=function(T){return T.replace(/[\-_](\w)/g,function(E){return E.charAt(1).toUpperCase()})};de.createElement=function(k){var T=document.createElement("div");return T.innerHTML=k,T.childNodes[0]},de.elementInside=function(k,T){if(k===T)return!0;for(;k=k.parentNode;)if(k===T)return!0;return!1},de.getElement=function(k,T){var E;if(typeof k=="string"?E=document.querySelector(k):k.nodeType!=null&&(E=k),E==null)throw new Error("Invalid `".concat(T,"` option provided. Please provide a CSS selector or a plain HTML element."));return E},de.getElements=function(k,T){var E,A;if(k instanceof Array){A=[];try{var p=Ce(k,!0),g;try{for(p.s();!(g=p.n()).done;)E=g.value,A.push(this.getElement(E,T))}catch($){p.e($)}finally{p.f()}}catch{A=null}}else if(typeof k=="string"){A=[];var C=Ce(document.querySelectorAll(k),!0),P;try{for(C.s();!(P=C.n()).done;)E=P.value,A.push(E)}catch($){C.e($)}finally{C.f()}}else k.nodeType!=null&&(A=[k]);if(A==null||!A.length)throw new Error("Invalid `".concat(T,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return A},de.confirm=function(k,T,E){if(window.confirm(k))return T();if(E!=null)return E()},de.isValidFile=function(k,T){if(!T)return!0;T=T.split(",");var E=k.type,A=E.replace(/\/.*$/,""),p=Ce(T,!0),g;try{for(p.s();!(g=p.n()).done;){var C=g.value;if(C=C.trim(),C.charAt(0)==="."){if(k.name.toLowerCase().indexOf(C.toLowerCase(),k.name.length-C.length)!==-1)return!0}else if(/\/\*$/.test(C)){if(A===C.replace(/\/.*$/,""))return!0}else if(E===C)return!0}}catch(P){p.e(P)}finally{p.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(k){return this.each(function(){return new de(this,k)})}),de.ADDED="added",de.QUEUED="queued",de.ACCEPTED=de.QUEUED,de.UPLOADING="uploading",de.PROCESSING=de.UPLOADING,de.CANCELED="canceled",de.ERROR="error",de.SUCCESS="success";var qt=function(T){var E=T.naturalWidth,A=T.naturalHeight,p=document.createElement("canvas");p.width=1,p.height=A;var g=p.getContext("2d");g.drawImage(T,0,0);for(var C=g.getImageData(1,0,1,A),P=C.data,$=0,U=A,Y=A;Y>$;){var Z=P[(Y-1)*4+3];Z===0?U=Y:$=Y,Y=U+$>>1}var G=Y/A;return G===0?1:G},yt=function(T,E,A,p,g,C,P,$,U,Y){var Z=qt(E);return T.drawImage(E,A,p,g,C,P,$,U,Y/Z)},xr=function(){function k(){Yt(this,k)}return Ge(k,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(E){for(var A="",p=void 0,g=void 0,C="",P=void 0,$=void 0,U=void 0,Y="",Z=0;p=E[Z++],g=E[Z++],C=E[Z++],P=p>>2,$=(p&3)<<4|g>>4,U=(g&15)<<2|C>>6,Y=C&63,isNaN(g)?U=Y=64:isNaN(C)&&(Y=64),A=A+this.KEY_STR.charAt(P)+this.KEY_STR.charAt($)+this.KEY_STR.charAt(U)+this.KEY_STR.charAt(Y),p=g=C="",P=$=U=Y="",Z<E.length;);return A}},{key:"restore",value:function(E,A){if(!E.match("data:image/jpeg;base64,"))return A;var p=this.decode64(E.replace("data:image/jpeg;base64,","")),g=this.slice2Segments(p),C=this.exifManipulation(A,g);return"data:image/jpeg;base64,".concat(this.encode64(C))}},{key:"exifManipulation",value:function(E,A){var p=this.getExifArray(A),g=this.insertExif(E,p),C=new Uint8Array(g);return C}},{key:"getExifArray",value:function(E){for(var A=void 0,p=0;p<E.length;){if(A=E[p],A[0]===255&A[1]===225)return A;p++}return[]}},{key:"insertExif",value:function(E,A){var p=E.replace("data:image/jpeg;base64,",""),g=this.decode64(p),C=g.indexOf(255,3),P=g.slice(0,C),$=g.slice(C),U=P;return U=U.concat(A),U=U.concat($),U}},{key:"slice2Segments",value:function(E){for(var A=0,p=[];;){var g;if(E[A]===255&E[A+1]===218)break;if(E[A]===255&E[A+1]===216)A+=2;else{g=E[A+2]*256+E[A+3];var C=A+g+2,P=E.slice(A,C);p.push(P),A=C}if(A>E.length)break}return p}},{key:"decode64",value:function(E){var A="",p=void 0,g=void 0,C="",P=void 0,$=void 0,U=void 0,Y="",Z=0,G=[],se=/[^A-Za-z0-9\+\/\=]/g;for(se.exec(E)&&console.warn(`There were invalid base64 characters in the input text.
|
|
Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
|
|
Expect errors in decoding.`),E=E.replace(/[^A-Za-z0-9\+\/\=]/g,"");P=this.KEY_STR.indexOf(E.charAt(Z++)),$=this.KEY_STR.indexOf(E.charAt(Z++)),U=this.KEY_STR.indexOf(E.charAt(Z++)),Y=this.KEY_STR.indexOf(E.charAt(Z++)),p=P<<2|$>>4,g=($&15)<<4|U>>2,C=(U&3)<<6|Y,G.push(p),U!==64&&G.push(g),Y!==64&&G.push(C),p=g=C="",P=$=U=Y="",Z<E.length;);return G}}]),k}();xr.initClass();var Nt=function(T,E){var A=!1,p=!0,g=T.document,C=g.documentElement,P=g.addEventListener?"addEventListener":"attachEvent",$=g.addEventListener?"removeEventListener":"detachEvent",U=g.addEventListener?"":"on",Y=function G(se){if(!(se.type==="readystatechange"&&g.readyState!=="complete")&&((se.type==="load"?T:g)[$](U+se.type,G,!1),!A&&(A=!0)))return E.call(T,se.type||se)},Z=function G(){try{C.doScroll("left")}catch{setTimeout(G,50);return}return Y("poll")};if(g.readyState!=="complete"){if(g.createEventObject&&C.doScroll){try{p=!T.frameElement}catch{}p&&Z()}return g[P](U+"DOMContentLoaded",Y,!1),g[P](U+"readystatechange",Y,!1),T[P](U+"load",Y,!1)}};de._autoDiscoverFunction=function(){if(de.autoDiscover)return de.discover()},Nt(window,de._autoDiscoverFunction);function St(k,T){return typeof k<"u"&&k!==null?T(k):void 0}function bt(k,T,E){if(typeof k<"u"&&k!==null&&typeof k[T]=="function")return E(k,T)}window.Dropzone=de;var _t=de}(),n}()})});var Cs=ie((Jm,Wd)=>{Wd.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",brvbar:"\xA6",bscr:"\u{1D4B7}",Bscr:"\u212C",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsolb:"\u29C5",bsol:"\\",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",cap:"\u2229",Cap:"\u22D2",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",centerdot:"\xB7",CenterDot:"\xB7",cfr:"\u{1D520}",Cfr:"\u212D",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cir:"\u25CB",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",colon:":",Colon:"\u2237",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",conint:"\u222E",Conint:"\u222F",ContourIntegral:"\u222E",copf:"\u{1D554}",Copf:"\u2102",coprod:"\u2210",Coproduct:"\u2210",copy:"\xA9",COPY:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",cross:"\u2717",Cross:"\u2A2F",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",cupbrcap:"\u2A48",cupcap:"\u2A46",CupCap:"\u224D",cup:"\u222A",Cup:"\u22D3",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",dagger:"\u2020",Dagger:"\u2021",daleth:"\u2138",darr:"\u2193",Darr:"\u21A1",dArr:"\u21D3",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",ddagger:"\u2021",ddarr:"\u21CA",DD:"\u2145",dd:"\u2146",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",diamond:"\u22C4",Diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrowBar:"\u2913",downarrow:"\u2193",DownArrow:"\u2193",Downarrow:"\u21D3",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVectorBar:"\u2956",DownLeftVector:"\u21BD",DownRightTeeVector:"\u295F",DownRightVectorBar:"\u2957",DownRightVector:"\u21C1",DownTeeArrow:"\u21A7",DownTee:"\u22A4",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",Ecirc:"\xCA",ecirc:"\xEA",ecir:"\u2256",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",edot:"\u0117",eDot:"\u2251",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp13:"\u2004",emsp14:"\u2005",emsp:"\u2003",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",escr:"\u212F",Escr:"\u2130",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",exponentiale:"\u2147",ExponentialE:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",forall:"\u2200",ForAll:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",fscr:"\u{1D4BB}",Fscr:"\u2131",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",ge:"\u2265",gE:"\u2267",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",gescc:"\u2AA9",ges:"\u2A7E",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",gg:"\u226B",Gg:"\u22D9",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gla:"\u2AA5",gl:"\u2277",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gne:"\u2A88",gnE:"\u2269",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",gtcc:"\u2AA7",gtcir:"\u2A7A",gt:">",GT:">",Gt:"\u226B",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",harrcir:"\u2948",harr:"\u2194",hArr:"\u21D4",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",hfr:"\u{1D525}",Hfr:"\u210C",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",hopf:"\u{1D559}",Hopf:"\u210D",horbar:"\u2015",HorizontalLine:"\u2500",hscr:"\u{1D4BD}",Hscr:"\u210B",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",ifr:"\u{1D526}",Ifr:"\u2111",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",Im:"\u2111",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",incare:"\u2105",in:"\u2208",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",intcal:"\u22BA",int:"\u222B",Int:"\u222C",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",iscr:"\u{1D4BE}",Iscr:"\u2110",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",lang:"\u27E8",Lang:"\u27EA",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",larrb:"\u21E4",larrbfs:"\u291F",larr:"\u2190",Larr:"\u219E",lArr:"\u21D0",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",latail:"\u2919",lAtail:"\u291B",lat:"\u2AAB",late:"\u2AAD",lates:"\u2AAD\uFE00",lbarr:"\u290C",lBarr:"\u290E",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",le:"\u2264",lE:"\u2266",LeftAngleBracket:"\u27E8",LeftArrowBar:"\u21E4",leftarrow:"\u2190",LeftArrow:"\u2190",Leftarrow:"\u21D0",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVectorBar:"\u2959",LeftDownVector:"\u21C3",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",leftrightarrow:"\u2194",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTeeArrow:"\u21A4",LeftTee:"\u22A3",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangleBar:"\u29CF",LeftTriangle:"\u22B2",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVectorBar:"\u2958",LeftUpVector:"\u21BF",LeftVectorBar:"\u2952",LeftVector:"\u21BC",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",lescc:"\u2AA8",les:"\u2A7D",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",llarr:"\u21C7",ll:"\u226A",Ll:"\u22D8",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoustache:"\u23B0",lmoust:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lne:"\u2A87",lnE:"\u2268",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",longleftarrow:"\u27F5",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftrightarrow:"\u27F7",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longmapsto:"\u27FC",longrightarrow:"\u27F6",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",lscr:"\u{1D4C1}",Lscr:"\u2112",lsh:"\u21B0",Lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",ltcc:"\u2AA6",ltcir:"\u2A79",lt:"<",LT:"<",Lt:"\u226A",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",midast:"*",midcir:"\u2AF0",mid:"\u2223",middot:"\xB7",minusb:"\u229F",minus:"\u2212",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",mscr:"\u{1D4C2}",Mscr:"\u2133",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natural:"\u266E",naturals:"\u2115",natur:"\u266E",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",nearhk:"\u2924",nearr:"\u2197",neArr:"\u21D7",nearrow:"\u2197",ne:"\u2260",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
|
|
`,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:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",para:"\xB6",parallel:"\u2225",par:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plus:"+",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",popf:"\u{1D561}",Popf:"\u2119",pound:"\xA3",prap:"\u2AB7",Pr:"\u2ABB",pr:"\u227A",prcue:"\u227C",precapprox:"\u2AB7",prec:"\u227A",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",pre:"\u2AAF",prE:"\u2AB3",precsim:"\u227E",prime:"\u2032",Prime:"\u2033",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportional:"\u221D",Proportion:"\u2237",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",qopf:"\u{1D562}",Qopf:"\u211A",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",quot:'"',QUOT:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",rang:"\u27E9",Rang:"\u27EB",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarr:"\u2192",Rarr:"\u21A0",rArr:"\u21D2",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",ratail:"\u291A",rAtail:"\u291C",ratio:"\u2236",rationals:"\u211A",rbarr:"\u290D",rBarr:"\u290F",RBarr:"\u2910",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",Re:"\u211C",rect:"\u25AD",reg:"\xAE",REG:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",rfr:"\u{1D52F}",Rfr:"\u211C",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrowBar:"\u21E5",rightarrow:"\u2192",RightArrow:"\u2192",Rightarrow:"\u21D2",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVectorBar:"\u2955",RightDownVector:"\u21C2",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTeeArrow:"\u21A6",RightTee:"\u22A2",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangleBar:"\u29D0",RightTriangle:"\u22B3",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVectorBar:"\u2954",RightUpVector:"\u21BE",RightVectorBar:"\u2953",RightVector:"\u21C0",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoustache:"\u23B1",rmoust:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",ropf:"\u{1D563}",Ropf:"\u211D",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",rscr:"\u{1D4C7}",Rscr:"\u211B",rsh:"\u21B1",Rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",Sc:"\u2ABC",sc:"\u227B",sccue:"\u227D",sce:"\u2AB0",scE:"\u2AB4",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdotb:"\u22A1",sdot:"\u22C5",sdote:"\u2A66",searhk:"\u2925",searr:"\u2198",seArr:"\u21D8",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",solbar:"\u233F",solb:"\u29C4",sol:"/",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",square:"\u25A1",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squ:"\u25A1",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",sub:"\u2282",Sub:"\u22D0",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",subset:"\u2282",Subset:"\u22D0",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succapprox:"\u2AB8",succ:"\u227B",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",sum:"\u2211",Sum:"\u2211",sung:"\u266A",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",sup:"\u2283",Sup:"\u22D1",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",supset:"\u2283",Supset:"\u22D1",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swarr:"\u2199",swArr:"\u21D9",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",therefore:"\u2234",Therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",ThinSpace:"\u2009",thinsp:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",tilde:"\u02DC",Tilde:"\u223C",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",timesbar:"\u2A31",timesb:"\u22A0",times:"\xD7",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",topbot:"\u2336",topcir:"\u2AF1",top:"\u22A4",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",trade:"\u2122",TRADE:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",uarr:"\u2191",Uarr:"\u219F",uArr:"\u21D1",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrowBar:"\u2912",uparrow:"\u2191",UpArrow:"\u2191",Uparrow:"\u21D1",UpArrowDownArrow:"\u21C5",updownarrow:"\u2195",UpDownArrow:"\u2195",Updownarrow:"\u21D5",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",upsi:"\u03C5",Upsi:"\u03D2",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTeeArrow:"\u21A5",UpTee:"\u22A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",varr:"\u2195",vArr:"\u21D5",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",vBar:"\u2AE8",Vbar:"\u2AEB",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",vdash:"\u22A2",vDash:"\u22A8",Vdash:"\u22A9",VDash:"\u22AB",Vdashl:"\u2AE6",veebar:"\u22BB",vee:"\u2228",Vee:"\u22C1",veeeq:"\u225A",vellip:"\u22EE",verbar:"|",Verbar:"\u2016",vert:"|",Vert:"\u2016",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",wedge:"\u2227",Wedge:"\u22C0",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xharr:"\u27F7",xhArr:"\u27FA",Xi:"\u039E",xi:"\u03BE",xlarr:"\u27F5",xlArr:"\u27F8",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrarr:"\u27F6",xrArr:"\u27F9",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",yuml:"\xFF",Yuml:"\u0178",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",zfr:"\u{1D537}",Zfr:"\u2128",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",zopf:"\u{1D56B}",Zopf:"\u2124",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"}});var Jn=ie((eg,As)=>{"use strict";As.exports=Cs()});var mn=ie((tg,ks)=>{ks.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/});var Ds=ie((rg,Is)=>{"use strict";var Ts={};function Yd(r){var e,t,n=Ts[r];if(n)return n;for(n=Ts[r]=[],e=0;e<128;e++)t=String.fromCharCode(e),/^[0-9a-z]$/i.test(t)?n.push(t):n.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2));for(e=0;e<r.length;e++)n[r.charCodeAt(e)]=r[e];return n}function gn(r,e,t){var n,o,s,i,a,l="";for(typeof e!="string"&&(t=e,e=gn.defaultChars),typeof t>"u"&&(t=!0),a=Yd(e),n=0,o=r.length;n<o;n++){if(s=r.charCodeAt(n),t&&s===37&&n+2<o&&/^[0-9a-f]{2}$/i.test(r.slice(n+1,n+3))){l+=r.slice(n,n+3),n+=2;continue}if(s<128){l+=a[s];continue}if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&n+1<o&&(i=r.charCodeAt(n+1),i>=56320&&i<=57343)){l+=encodeURIComponent(r[n]+r[n+1]),n++;continue}l+="%EF%BF%BD";continue}l+=encodeURIComponent(r[n])}return l}gn.defaultChars=";/?:@&=+$,-_.!~*'()#";gn.componentChars="-_.!~*'()";Is.exports=gn});var Rs=ie((ng,Fs)=>{"use strict";var Ls={};function Kd(r){var e,t,n=Ls[r];if(n)return n;for(n=Ls[r]=[],e=0;e<128;e++)t=String.fromCharCode(e),n.push(t);for(e=0;e<r.length;e++)t=r.charCodeAt(e),n[t]="%"+("0"+t.toString(16).toUpperCase()).slice(-2);return n}function vn(r,e){var t;return typeof e!="string"&&(e=vn.defaultChars),t=Kd(e),r.replace(/(%[a-f0-9]{2})+/gi,function(n){var o,s,i,a,l,u,c,f="";for(o=0,s=n.length;o<s;o+=3){if(i=parseInt(n.slice(o+1,o+3),16),i<128){f+=t[i];continue}if((i&224)===192&&o+3<s&&(a=parseInt(n.slice(o+4,o+6),16),(a&192)===128)){c=i<<6&1984|a&63,c<128?f+="\uFFFD\uFFFD":f+=String.fromCharCode(c),o+=3;continue}if((i&240)===224&&o+6<s&&(a=parseInt(n.slice(o+4,o+6),16),l=parseInt(n.slice(o+7,o+9),16),(a&192)===128&&(l&192)===128)){c=i<<12&61440|a<<6&4032|l&63,c<2048||c>=55296&&c<=57343?f+="\uFFFD\uFFFD\uFFFD":f+=String.fromCharCode(c),o+=6;continue}if((i&248)===240&&o+9<s&&(a=parseInt(n.slice(o+4,o+6),16),l=parseInt(n.slice(o+7,o+9),16),u=parseInt(n.slice(o+10,o+12),16),(a&192)===128&&(l&192)===128&&(u&192)===128)){c=i<<18&1835008|a<<12&258048|l<<6&4032|u&63,c<65536||c>1114111?f+="\uFFFD\uFFFD\uFFFD\uFFFD":(c-=65536,f+=String.fromCharCode(55296+(c>>10),56320+(c&1023))),o+=9;continue}f+="\uFFFD"}return f})}vn.defaultChars=";/?:@&=+$,#";vn.componentChars="";Fs.exports=vn});var Ps=ie((ig,Os)=>{"use strict";Os.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}});var zs=ie((og,Us)=>{"use strict";function yn(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var Xd=/^([a-z0-9.+-]+:)/i,Zd=/:[0-9]*$/,Qd=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Jd=["<",">",'"',"`"," ","\r",`
|
|
`," "],ef=["{","}","|","\\","^","`"].concat(Jd),tf=["'"].concat(ef),Ms=["%","/","?",";","#"].concat(tf),Ns=["/","?","#"],rf=255,_s=/^[+a-z0-9A-Z_-]{0,63}$/,nf=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bs={javascript:!0,"javascript:":!0},$s={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function of(r,e){if(r&&r instanceof yn)return r;var t=new yn;return t.parse(r,e),t}yn.prototype.parse=function(r,e){var t,n,o,s,i,a=r;if(a=a.trim(),!e&&r.split("#").length===1){var l=Qd.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var u=Xd.exec(a);if(u&&(u=u[0],o=u.toLowerCase(),this.protocol=u,a=a.substr(u.length)),(e||u||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(u&&Bs[u])&&(a=a.substr(2),this.slashes=!0)),!Bs[u]&&(i||u&&!$s[u])){var c=-1;for(t=0;t<Ns.length;t++)s=a.indexOf(Ns[t]),s!==-1&&(c===-1||s<c)&&(c=s);var f,d;for(c===-1?d=a.lastIndexOf("@"):d=a.lastIndexOf("@",c),d!==-1&&(f=a.slice(0,d),a=a.slice(d+1),this.auth=f),c=-1,t=0;t<Ms.length;t++)s=a.indexOf(Ms[t]),s!==-1&&(c===-1||s<c)&&(c=s);c===-1&&(c=a.length),a[c-1]===":"&&c--;var h=a.slice(0,c);a=a.slice(c),this.parseHost(h),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){var v=this.hostname.split(/\./);for(t=0,n=v.length;t<n;t++){var y=v[t];if(!!y&&!y.match(_s)){for(var w="",x=0,D=y.length;x<D;x++)y.charCodeAt(x)>127?w+="x":w+=y[x];if(!w.match(_s)){var I=v.slice(0,t),N=v.slice(t+1),S=y.match(nf);S&&(I.push(S[1]),N.unshift(S[2])),N.length&&(a=N.join(".")+a),this.hostname=I.join(".");break}}}}this.hostname.length>rf&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var M=a.indexOf("#");M!==-1&&(this.hash=a.substr(M),a=a.slice(0,M));var L=a.indexOf("?");return L!==-1&&(this.search=a.substr(L),a=a.slice(0,L)),a&&(this.pathname=a),$s[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this};yn.prototype.parseHost=function(r){var e=Zd.exec(r);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),r=r.substr(0,r.length-e.length)),r&&(this.hostname=r)};Us.exports=of});var ei=ie((sg,Mr)=>{"use strict";Mr.exports.encode=Ds();Mr.exports.decode=Rs();Mr.exports.format=Ps();Mr.exports.parse=zs()});var ti=ie((ag,js)=>{js.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/});var ri=ie((lg,Hs)=>{Hs.exports=/[\0-\x1F\x7F-\x9F]/});var Vs=ie((ug,qs)=>{qs.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 ni=ie((cg,Gs)=>{Gs.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/});var Ws=ie(pr=>{"use strict";pr.Any=ti();pr.Cc=ri();pr.Cf=Vs();pr.P=mn();pr.Z=ni()});var Ne=ie(rt=>{"use strict";function sf(r){return Object.prototype.toString.call(r)}function af(r){return sf(r)==="[object String]"}var lf=Object.prototype.hasOwnProperty;function Ks(r,e){return lf.call(r,e)}function uf(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 cf(r,e,t){return[].concat(r.slice(0,e),t,r.slice(e+1))}function Xs(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 Zs(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 Qs=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,df=/&([a-z#][a-z0-9]{1,31});/gi,ff=new RegExp(Qs.source+"|"+df.source,"gi"),hf=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,Ys=Jn();function pf(r,e){var t=0;return Ks(Ys,e)?Ys[e]:e.charCodeAt(0)===35&&hf.test(e)&&(t=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Xs(t))?Zs(t):r}function mf(r){return r.indexOf("\\")<0?r:r.replace(Qs,"$1")}function gf(r){return r.indexOf("\\")<0&&r.indexOf("&")<0?r:r.replace(ff,function(e,t,n){return t||pf(e,n)})}var vf=/[&<>"]/,yf=/[&<>"]/g,bf={"&":"&","<":"<",">":">",'"':"""};function xf(r){return bf[r]}function wf(r){return vf.test(r)?r.replace(yf,xf):r}var Ef=/[.?*+^$[\]\\(){}|-]/g;function Sf(r){return r.replace(Ef,"\\$&")}function Cf(r){switch(r){case 9:case 32:return!0}return!1}function Af(r){if(r>=8192&&r<=8202)return!0;switch(r){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var kf=mn();function Tf(r){return kf.test(r)}function If(r){switch(r){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Df(r){return r=r.trim().replace(/\s+/g," "),"\u1E9E".toLowerCase()==="\u1E7E"&&(r=r.replace(/ẞ/g,"\xDF")),r.toLowerCase().toUpperCase()}rt.lib={};rt.lib.mdurl=ei();rt.lib.ucmicro=Ws();rt.assign=uf;rt.isString=af;rt.has=Ks;rt.unescapeMd=mf;rt.unescapeAll=gf;rt.isValidEntityCode=Xs;rt.fromCodePoint=Zs;rt.escapeHtml=wf;rt.arrayReplaceAt=cf;rt.isSpace=Cf;rt.isWhiteSpace=Af;rt.isMdAsciiPunct=If;rt.isPunctChar=Tf;rt.escapeRE=Sf;rt.normalizeReference=Df});var ea=ie((hg,Js)=>{"use strict";Js.exports=function(e,t,n){var o,s,i,a,l=-1,u=e.posMax,c=e.pos;for(e.pos=t+1,o=1;e.pos<u;){if(i=e.src.charCodeAt(e.pos),i===93&&(o--,o===0)){s=!0;break}if(a=e.pos,e.md.inline.skipToken(e),i===91){if(a===e.pos-1)o++;else if(n)return e.pos=c,-1}}return s&&(l=e.pos),e.pos=c,l}});var na=ie((pg,ra)=>{"use strict";var ta=Ne().unescapeAll;ra.exports=function(e,t,n){var o,s,i=0,a=t,l={ok:!1,pos:0,lines:0,str:""};if(e.charCodeAt(t)===60){for(t++;t<n;){if(o=e.charCodeAt(t),o===10||o===60)return l;if(o===62)return l.pos=t+1,l.str=ta(e.slice(a+1,t)),l.ok=!0,l;if(o===92&&t+1<n){t+=2;continue}t++}return l}for(s=0;t<n&&(o=e.charCodeAt(t),!(o===32||o<32||o===127));){if(o===92&&t+1<n){if(e.charCodeAt(t+1)===32)break;t+=2;continue}if(o===40&&(s++,s>32))return l;if(o===41){if(s===0)break;s--}t++}return a===t||s!==0||(l.str=ta(e.slice(a,t)),l.lines=i,l.pos=t,l.ok=!0),l}});var oa=ie((mg,ia)=>{"use strict";var Lf=Ne().unescapeAll;ia.exports=function(e,t,n){var o,s,i=0,a=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n||(s=e.charCodeAt(t),s!==34&&s!==39&&s!==40))return l;for(t++,s===40&&(s=41);t<n;){if(o=e.charCodeAt(t),o===s)return l.pos=t+1,l.lines=i,l.str=Lf(e.slice(a+1,t)),l.ok=!0,l;if(o===40&&s===41)return l;o===10?i++:o===92&&t+1<n&&(t++,e.charCodeAt(t)===10&&i++),t++}return l}});var sa=ie(bn=>{"use strict";bn.parseLinkLabel=ea();bn.parseLinkDestination=na();bn.parseLinkTitle=oa()});var la=ie((vg,aa)=>{"use strict";var Ff=Ne().assign,Rf=Ne().unescapeAll,Jt=Ne().escapeHtml,Rt={};Rt.code_inline=function(r,e,t,n,o){var s=r[e];return"<code"+o.renderAttrs(s)+">"+Jt(r[e].content)+"</code>"};Rt.code_block=function(r,e,t,n,o){var s=r[e];return"<pre"+o.renderAttrs(s)+"><code>"+Jt(r[e].content)+`</code></pre>
|
|
`};Rt.fence=function(r,e,t,n,o){var s=r[e],i=s.info?Rf(s.info).trim():"",a="",l="",u,c,f,d,h;return i&&(f=i.split(/(\s+)/g),a=f[0],l=f.slice(2).join("")),t.highlight?u=t.highlight(s.content,a,l)||Jt(s.content):u=Jt(s.content),u.indexOf("<pre")===0?u+`
|
|
`:i?(c=s.attrIndex("class"),d=s.attrs?s.attrs.slice():[],c<0?d.push(["class",t.langPrefix+a]):(d[c]=d[c].slice(),d[c][1]+=" "+t.langPrefix+a),h={attrs:d},"<pre><code"+o.renderAttrs(h)+">"+u+`</code></pre>
|
|
`):"<pre><code"+o.renderAttrs(s)+">"+u+`</code></pre>
|
|
`};Rt.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)};Rt.hardbreak=function(r,e,t){return t.xhtmlOut?`<br />
|
|
`:`<br>
|
|
`};Rt.softbreak=function(r,e,t){return t.breaks?t.xhtmlOut?`<br />
|
|
`:`<br>
|
|
`:`
|
|
`};Rt.text=function(r,e){return Jt(r[e].content)};Rt.html_block=function(r,e){return r[e].content};Rt.html_inline=function(r,e){return r[e].content};function mr(){this.rules=Ff({},Rt)}mr.prototype.renderAttrs=function(e){var t,n,o;if(!e.attrs)return"";for(o="",t=0,n=e.attrs.length;t<n;t++)o+=" "+Jt(e.attrs[t][0])+'="'+Jt(e.attrs[t][1])+'"';return o};mr.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)};mr.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};mr.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};mr.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};aa.exports=mr});var xn=ie((yg,ua)=>{"use strict";function At(){this.__rules__=[],this.__cache__=null}At.prototype.__find__=function(r){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===r)return e;return-1};At.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)})})};At.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};At.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};At.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};At.prototype.push=function(r,e,t){var n=t||{};this.__rules__.push({name:r,enabled:!0,fn:e,alt:n.alt||[]}),this.__cache__=null};At.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};At.prototype.enableOnly=function(r,e){Array.isArray(r)||(r=[r]),this.__rules__.forEach(function(t){t.enabled=!1}),this.enable(r,e)};At.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};At.prototype.getRules=function(r){return this.__cache__===null&&this.__compile__(),this.__cache__[r]||[]};ua.exports=At});var da=ie((bg,ca)=>{"use strict";var Of=/\r\n?|\n/g,Pf=/\0/g;ca.exports=function(e){var t;t=e.src.replace(Of,`
|
|
`),t=t.replace(Pf,"\uFFFD"),e.src=t}});var ha=ie((xg,fa)=>{"use strict";fa.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 ma=ie((wg,pa)=>{"use strict";pa.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 va=ie((Eg,ga)=>{"use strict";var Mf=Ne().arrayReplaceAt;function Nf(r){return/^<a[>\s]/i.test(r)}function _f(r){return/^<\/a\s*>/i.test(r)}ga.exports=function(e){var t,n,o,s,i,a,l,u,c,f,d,h,m,v,y,w,x=e.tokens,D;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,m=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"&&(Nf(a.content)&&m>0&&m--,_f(a.content)&&m++),!(m>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(c=a.content,D=e.md.linkify.match(c),l=[],h=a.level,d=0,u=0;u<D.length;u++)v=D[u].url,y=e.md.normalizeLink(v),!!e.md.validateLink(y)&&(w=D[u].text,D[u].schema?D[u].schema==="mailto:"&&!/^mailto:/i.test(w)?w=e.md.normalizeLinkText("mailto:"+w).replace(/^mailto:/,""):w=e.md.normalizeLinkText(w):w=e.md.normalizeLinkText("http://"+w).replace(/^http:\/\//,""),f=D[u].index,f>d&&(i=new e.Token("text","",0),i.content=c.slice(d,f),i.level=h,l.push(i)),i=new e.Token("link_open","a",1),i.attrs=[["href",y]],i.level=h++,i.markup="linkify",i.info="auto",l.push(i),i=new e.Token("text","",0),i.content=w,i.level=h,l.push(i),i=new e.Token("link_close","a",-1),i.level=--h,i.markup="linkify",i.info="auto",l.push(i),d=D[u].lastIndex);d<c.length&&(i=new e.Token("text","",0),i.content=c.slice(d),i.level=h,l.push(i)),x[n].children=s=Mf(s,t,l)}}}}});var xa=ie((Sg,ba)=>{"use strict";var ya=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Bf=/\((c|tm|r|p)\)/i,$f=/\((c|tm|r|p)\)/ig,Uf={c:"\xA9",r:"\xAE",p:"\xA7",tm:"\u2122"};function zf(r,e){return Uf[e.toLowerCase()]}function jf(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($f,zf)),t.type==="link_open"&&t.info==="auto"&&n--,t.type==="link_close"&&t.info==="auto"&&n++}function Hf(r){var e,t,n=0;for(e=r.length-1;e>=0;e--)t=r[e],t.type==="text"&&!n&&ya.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++}ba.exports=function(e){var t;if(!!e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Bf.test(e.tokens[t].content)&&jf(e.tokens[t].children),ya.test(e.tokens[t].content)&&Hf(e.tokens[t].children))}});var Ta=ie((Cg,ka)=>{"use strict";var wa=Ne().isWhiteSpace,Ea=Ne().isPunctChar,Sa=Ne().isMdAsciiPunct,qf=/['"]/,Ca=/['"]/g,Aa="\u2019";function wn(r,e,t){return r.substr(0,e)+t+r.substr(e+1)}function Vf(r,e){var t,n,o,s,i,a,l,u,c,f,d,h,m,v,y,w,x,D,I,N,S;for(I=[],t=0;t<r.length;t++){for(n=r[t],l=r[t].level,x=I.length-1;x>=0&&!(I[x].level<=l);x--);if(I.length=x+1,n.type!=="text")continue;o=n.content,i=0,a=o.length;e:for(;i<a&&(Ca.lastIndex=i,s=Ca.exec(o),!!s);){if(y=w=!0,i=s.index+1,D=s[0]==="'",c=32,s.index-1>=0)c=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){c=r[x].content.charCodeAt(r[x].content.length-1);break}if(f=32,i<a)f=o.charCodeAt(i);else for(x=t+1;x<r.length&&!(r[x].type==="softbreak"||r[x].type==="hardbreak");x++)if(!!r[x].content){f=r[x].content.charCodeAt(0);break}if(d=Sa(c)||Ea(String.fromCharCode(c)),h=Sa(f)||Ea(String.fromCharCode(f)),m=wa(c),v=wa(f),v?y=!1:h&&(m||d||(y=!1)),m?w=!1:d&&(v||h||(w=!1)),f===34&&s[0]==='"'&&c>=48&&c<=57&&(w=y=!1),y&&w&&(y=d,w=h),!y&&!w){D&&(n.content=wn(n.content,s.index,Aa));continue}if(w){for(x=I.length-1;x>=0&&(u=I[x],!(I[x].level<l));x--)if(u.single===D&&I[x].level===l){u=I[x],D?(N=e.md.options.quotes[2],S=e.md.options.quotes[3]):(N=e.md.options.quotes[0],S=e.md.options.quotes[1]),n.content=wn(n.content,s.index,S),r[u.token].content=wn(r[u.token].content,u.pos,N),i+=S.length-1,u.token===t&&(i+=N.length-1),o=n.content,a=o.length,I.length=x;continue e}}y?I.push({token:t,pos:s.index,single:D,level:l}):w&&D&&(n.content=wn(n.content,s.index,Aa))}}}ka.exports=function(e){var t;if(!!e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!qf.test(e.tokens[t].content)||Vf(e.tokens[t].children,e)}});var En=ie((Ag,Ia)=>{"use strict";function gr(r,e,t){this.type=r,this.tag=e,this.attrs=null,this.map=null,this.nesting=t,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}gr.prototype.attrIndex=function(e){var t,n,o;if(!this.attrs)return-1;for(t=this.attrs,n=0,o=t.length;n<o;n++)if(t[n][0]===e)return n;return-1};gr.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};gr.prototype.attrSet=function(e,t){var n=this.attrIndex(e),o=[e,t];n<0?this.attrPush(o):this.attrs[n]=o};gr.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n};gr.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t};Ia.exports=gr});var Fa=ie((kg,La)=>{"use strict";var Gf=En();function Da(r,e,t){this.src=r,this.env=t,this.tokens=[],this.inlineMode=!1,this.md=e}Da.prototype.Token=Gf;La.exports=Da});var Oa=ie((Tg,Ra)=>{"use strict";var Wf=xn(),ii=[["normalize",da()],["block",ha()],["inline",ma()],["linkify",va()],["replacements",xa()],["smartquotes",Ta()]];function oi(){this.ruler=new Wf;for(var r=0;r<ii.length;r++)this.ruler.push(ii[r][0],ii[r][1])}oi.prototype.process=function(r){var e,t,n;for(n=this.ruler.getRules(""),e=0,t=n.length;e<t;e++)n[e](r)};oi.prototype.State=Fa();Ra.exports=oi});var Na=ie((Ig,Ma)=>{"use strict";var si=Ne().isSpace;function ai(r,e){var t=r.bMarks[e]+r.tShift[e],n=r.eMarks[e];return r.src.substr(t,n-t)}function Pa(r){var e=[],t=0,n=r.length,o,s=!1,i=0,a="";for(o=r.charCodeAt(t);t<n;)o===124&&(s?(a+=r.substring(i,t-1),i=t):(e.push(a+r.substring(i,t)),a="",i=t+1)),s=o===92,t++,o=r.charCodeAt(t);return e.push(a+r.substring(i)),e}Ma.exports=function(e,t,n,o){var s,i,a,l,u,c,f,d,h,m,v,y,w,x,D,I,N,S;if(t+2>n||(c=t+1,e.sCount[c]<e.blkIndent)||e.sCount[c]-e.blkIndent>=4||(a=e.bMarks[c]+e.tShift[c],a>=e.eMarks[c])||(N=e.src.charCodeAt(a++),N!==124&&N!==45&&N!==58)||a>=e.eMarks[c]||(S=e.src.charCodeAt(a++),S!==124&&S!==45&&S!==58&&!si(S))||N===45&&si(S))return!1;for(;a<e.eMarks[c];){if(s=e.src.charCodeAt(a),s!==124&&s!==45&&s!==58&&!si(s))return!1;a++}for(i=ai(e,t+1),f=i.split("|"),m=[],l=0;l<f.length;l++){if(v=f[l].trim(),!v){if(l===0||l===f.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;v.charCodeAt(v.length-1)===58?m.push(v.charCodeAt(0)===58?"center":"right"):v.charCodeAt(0)===58?m.push("left"):m.push("")}if(i=ai(e,t).trim(),i.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4||(f=Pa(i),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),d=f.length,d===0||d!==m.length))return!1;if(o)return!0;for(x=e.parentType,e.parentType="table",I=e.md.block.ruler.getRules("blockquote"),h=e.push("table_open","table",1),h.map=y=[t,0],h=e.push("thead_open","thead",1),h.map=[t,t+1],h=e.push("tr_open","tr",1),h.map=[t,t+1],l=0;l<f.length;l++)h=e.push("th_open","th",1),m[l]&&(h.attrs=[["style","text-align:"+m[l]]]),h=e.push("inline","",0),h.content=f[l].trim(),h.children=[],h=e.push("th_close","th",-1);for(h=e.push("tr_close","tr",-1),h=e.push("thead_close","thead",-1),c=t+2;c<n&&!(e.sCount[c]<e.blkIndent);c++){for(D=!1,l=0,u=I.length;l<u;l++)if(I[l](e,c,n,!0)){D=!0;break}if(D||(i=ai(e,c).trim(),!i)||e.sCount[c]-e.blkIndent>=4)break;for(f=Pa(i),f.length&&f[0]===""&&f.shift(),f.length&&f[f.length-1]===""&&f.pop(),c===t+2&&(h=e.push("tbody_open","tbody",1),h.map=w=[t+2,0]),h=e.push("tr_open","tr",1),h.map=[c,c+1],l=0;l<d;l++)h=e.push("td_open","td",1),m[l]&&(h.attrs=[["style","text-align:"+m[l]]]),h=e.push("inline","",0),h.content=f[l]?f[l].trim():"",h.children=[],h=e.push("td_close","td",-1);h=e.push("tr_close","tr",-1)}return w&&(h=e.push("tbody_close","tbody",-1),w[1]=c),h=e.push("table_close","table",-1),y[1]=c,e.parentType=x,e.line=c,!0}});var Ba=ie((Dg,_a)=>{"use strict";_a.exports=function(e,t,n){var o,s,i;if(e.sCount[t]-e.blkIndent<4)return!1;for(s=o=t+1;o<n;){if(e.isEmpty(o)){o++;continue}if(e.sCount[o]-e.blkIndent>=4){o++,s=o;continue}break}return e.line=s,i=e.push("code_block","code",0),i.content=e.getLines(t,s,4+e.blkIndent,!1)+`
|
|
`,i.map=[t,e.line],!0}});var Ua=ie((Lg,$a)=>{"use strict";$a.exports=function(e,t,n,o){var s,i,a,l,u,c,f,d=!1,h=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||h+3>m||(s=e.src.charCodeAt(h),s!==126&&s!==96)||(u=h,h=e.skipChars(h,s),i=h-u,i<3)||(f=e.src.slice(u,h),a=e.src.slice(h,m),s===96&&a.indexOf(String.fromCharCode(s))>=0))return!1;if(o)return!0;for(l=t;l++,!(l>=n||(h=u=e.bMarks[l]+e.tShift[l],m=e.eMarks[l],h<m&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(h)===s&&!(e.sCount[l]-e.blkIndent>=4)&&(h=e.skipChars(h,s),!(h-u<i)&&(h=e.skipSpaces(h),!(h<m)))){d=!0;break}return i=e.sCount[t],e.line=l+(d?1:0),c=e.push("fence","code",0),c.info=a,c.content=e.getLines(t+1,l,i,!0),c.markup=f,c.map=[t,e.line],!0}});var Ha=ie((Fg,ja)=>{"use strict";var za=Ne().isSpace;ja.exports=function(e,t,n,o){var s,i,a,l,u,c,f,d,h,m,v,y,w,x,D,I,N,S,M,L,R=e.lineMax,O=e.bMarks[t]+e.tShift[t],F=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(O++)!==62)return!1;if(o)return!0;for(l=h=e.sCount[t]+1,e.src.charCodeAt(O)===32?(O++,l++,h++,s=!1,I=!0):e.src.charCodeAt(O)===9?(I=!0,(e.bsCount[t]+h)%4===3?(O++,l++,h++,s=!1):s=!0):I=!1,m=[e.bMarks[t]],e.bMarks[t]=O;O<F&&(i=e.src.charCodeAt(O),za(i));){i===9?h+=4-(h+e.bsCount[t]+(s?1:0))%4:h++;O++}for(v=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(I?1:0),c=O>=F,x=[e.sCount[t]],e.sCount[t]=h-l,D=[e.tShift[t]],e.tShift[t]=O-e.bMarks[t],S=e.md.block.ruler.getRules("blockquote"),w=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(L=e.sCount[d]<e.blkIndent,O=e.bMarks[d]+e.tShift[d],F=e.eMarks[d],!(O>=F));d++){if(e.src.charCodeAt(O++)===62&&!L){for(l=h=e.sCount[d]+1,e.src.charCodeAt(O)===32?(O++,l++,h++,s=!1,I=!0):e.src.charCodeAt(O)===9?(I=!0,(e.bsCount[d]+h)%4===3?(O++,l++,h++,s=!1):s=!0):I=!1,m.push(e.bMarks[d]),e.bMarks[d]=O;O<F&&(i=e.src.charCodeAt(O),za(i));){i===9?h+=4-(h+e.bsCount[d]+(s?1:0))%4:h++;O++}c=O>=F,v.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(I?1:0),x.push(e.sCount[d]),e.sCount[d]=h-l,D.push(e.tShift[d]),e.tShift[d]=O-e.bMarks[d];continue}if(c)break;for(N=!1,a=0,u=S.length;a<u;a++)if(S[a](e,d,n,!0)){N=!0;break}if(N){e.lineMax=d,e.blkIndent!==0&&(m.push(e.bMarks[d]),v.push(e.bsCount[d]),D.push(e.tShift[d]),x.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}m.push(e.bMarks[d]),v.push(e.bsCount[d]),D.push(e.tShift[d]),x.push(e.sCount[d]),e.sCount[d]=-1}for(y=e.blkIndent,e.blkIndent=0,M=e.push("blockquote_open","blockquote",1),M.markup=">",M.map=f=[t,0],e.md.block.tokenize(e,t,d),M=e.push("blockquote_close","blockquote",-1),M.markup=">",e.lineMax=R,e.parentType=w,f[1]=e.line,a=0;a<D.length;a++)e.bMarks[a+t]=m[a],e.tShift[a+t]=D[a],e.sCount[a+t]=x[a],e.bsCount[a+t]=v[a];return e.blkIndent=y,!0}});var Va=ie((Rg,qa)=>{"use strict";var Yf=Ne().isSpace;qa.exports=function(e,t,n,o){var s,i,a,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||(s=e.src.charCodeAt(u++),s!==42&&s!==45&&s!==95))return!1;for(i=1;u<c;){if(a=e.src.charCodeAt(u++),a!==s&&!Yf(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 Xa=ie((Og,Ka)=>{"use strict";var Ya=Ne().isSpace;function Ga(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),!Ya(s))?-1:n}function Wa(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),!Ya(t))?-1:o}function Kf(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)}Ka.exports=function(e,t,n,o){var s,i,a,l,u,c,f,d,h,m,v,y,w,x,D,I,N,S,M,L,R,O,F,_,j,H,te,W,J=!1,re=!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.blkIndent&&(J=!0),(F=Wa(e,t))>=0){if(f=!0,j=e.bMarks[t]+e.tShift[t],w=Number(e.src.slice(j,F-1)),J&&w!==1)return!1}else if((F=Ga(e,t))>=0)f=!1;else return!1;if(J&&e.skipSpaces(F)>=e.eMarks[t])return!1;if(y=e.src.charCodeAt(F-1),o)return!0;for(v=e.tokens.length,f?(W=e.push("ordered_list_open","ol",1),w!==1&&(W.attrs=[["start",w]])):W=e.push("bullet_list_open","ul",1),W.map=m=[t,0],W.markup=String.fromCharCode(y),D=t,_=!1,te=e.md.block.ruler.getRules("list"),S=e.parentType,e.parentType="list";D<n;){for(O=F,x=e.eMarks[D],c=I=e.sCount[D]+F-(e.bMarks[t]+e.tShift[t]);O<x;){if(s=e.src.charCodeAt(O),s===9)I+=4-(I+e.bsCount[D])%4;else if(s===32)I++;else break;O++}if(i=O,i>=x?u=1:u=I-c,u>4&&(u=1),l=c+u,W=e.push("list_item_open","li",1),W.markup=String.fromCharCode(y),W.map=d=[t,0],f&&(W.info=e.src.slice(j,F-1)),R=e.tight,L=e.tShift[t],M=e.sCount[t],N=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=l,e.tight=!0,e.tShift[t]=i-e.bMarks[t],e.sCount[t]=I,i>=x&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),(!e.tight||_)&&(re=!1),_=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=N,e.tShift[t]=L,e.sCount[t]=M,e.tight=R,W=e.push("list_item_close","li",-1),W.markup=String.fromCharCode(y),D=t=e.line,d[1]=D,i=e.bMarks[t],D>=n||e.sCount[D]<e.blkIndent||e.sCount[t]-e.blkIndent>=4)break;for(H=!1,a=0,h=te.length;a<h;a++)if(te[a](e,D,n,!0)){H=!0;break}if(H)break;if(f){if(F=Wa(e,D),F<0)break;j=e.bMarks[D]+e.tShift[D]}else if(F=Ga(e,D),F<0)break;if(y!==e.src.charCodeAt(F-1))break}return f?W=e.push("ordered_list_close","ol",-1):W=e.push("bullet_list_close","ul",-1),W.markup=String.fromCharCode(y),m[1]=D,e.line=D,e.parentType=S,re&&Kf(e,v),!0}});var Qa=ie((Pg,Za)=>{"use strict";var Xf=Ne().normalizeReference,Sn=Ne().isSpace;Za.exports=function(e,t,n,o){var s,i,a,l,u,c,f,d,h,m,v,y,w,x,D,I,N=0,S=e.bMarks[t]+e.tShift[t],M=e.eMarks[t],L=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(S)!==91)return!1;for(;++S<M;)if(e.src.charCodeAt(S)===93&&e.src.charCodeAt(S-1)!==92){if(S+1===M||e.src.charCodeAt(S+1)!==58)return!1;break}for(l=e.lineMax,D=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";L<l&&!e.isEmpty(L);L++)if(!(e.sCount[L]-e.blkIndent>3)&&!(e.sCount[L]<0)){for(x=!1,c=0,f=D.length;c<f;c++)if(D[c](e,L,l,!0)){x=!0;break}if(x)break}for(w=e.getLines(t,L,e.blkIndent,!1).trim(),M=w.length,S=1;S<M;S++){if(s=w.charCodeAt(S),s===91)return!1;if(s===93){h=S;break}else s===10?N++:s===92&&(S++,S<M&&w.charCodeAt(S)===10&&N++)}if(h<0||w.charCodeAt(h+1)!==58)return!1;for(S=h+2;S<M;S++)if(s=w.charCodeAt(S),s===10)N++;else if(!Sn(s))break;if(v=e.md.helpers.parseLinkDestination(w,S,M),!v.ok||(u=e.md.normalizeLink(v.str),!e.md.validateLink(u)))return!1;for(S=v.pos,N+=v.lines,i=S,a=N,y=S;S<M;S++)if(s=w.charCodeAt(S),s===10)N++;else if(!Sn(s))break;for(v=e.md.helpers.parseLinkTitle(w,S,M),S<M&&y!==S&&v.ok?(I=v.str,S=v.pos,N+=v.lines):(I="",S=i,N=a);S<M&&(s=w.charCodeAt(S),!!Sn(s));)S++;if(S<M&&w.charCodeAt(S)!==10&&I)for(I="",S=i,N=a;S<M&&(s=w.charCodeAt(S),!!Sn(s));)S++;return S<M&&w.charCodeAt(S)!==10||(d=Xf(w.slice(1,h)),!d)?!1:(o||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[d]>"u"&&(e.env.references[d]={title:I,href:u}),e.parentType=m,e.line=t+N+1),!0)}});var el=ie((Mg,Ja)=>{"use strict";Ja.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]});var ui=ie((Ng,li)=>{"use strict";var Zf="[a-zA-Z_:][a-zA-Z0-9:._-]*",Qf="[^\"'=<>`\\x00-\\x20]+",Jf="'[^']*'",eh='"[^"]*"',th="(?:"+Qf+"|"+Jf+"|"+eh+")",rh="(?:\\s+"+Zf+"(?:\\s*=\\s*"+th+")?)",tl="<[A-Za-z][A-Za-z0-9\\-]*"+rh+"*\\s*\\/?>",rl="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",nh="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",ih="<[?][\\s\\S]*?[?]>",oh="<![A-Z]+\\s+[^>]*>",sh="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",ah=new RegExp("^(?:"+tl+"|"+rl+"|"+nh+"|"+ih+"|"+oh+"|"+sh+")"),lh=new RegExp("^(?:"+tl+"|"+rl+")");li.exports.HTML_TAG_RE=ah;li.exports.HTML_OPEN_CLOSE_TAG_RE=lh});var il=ie((_g,nl)=>{"use strict";var uh=el(),ch=ui().HTML_OPEN_CLOSE_TAG_RE,vr=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+uh.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ch.source+"\\s*$"),/^$/,!1]];nl.exports=function(e,t,n,o){var s,i,a,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(u)!==60)return!1;for(l=e.src.slice(u,c),s=0;s<vr.length&&!vr[s][0].test(l);s++);if(s===vr.length)return!1;if(o)return vr[s][2];if(i=t+1,!vr[s][1].test(l)){for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(u=e.bMarks[i]+e.tShift[i],c=e.eMarks[i],l=e.src.slice(u,c),vr[s][1].test(l)){l.length!==0&&i++;break}}return e.line=i,a=e.push("html_block","",0),a.map=[t,i],a.content=e.getLines(t,i,e.blkIndent,!0),!0}});var al=ie((Bg,sl)=>{"use strict";var ol=Ne().isSpace;sl.exports=function(e,t,n,o){var s,i,a,l,u=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||(s=e.src.charCodeAt(u),s!==35||u>=c))return!1;for(i=1,s=e.src.charCodeAt(++u);s===35&&u<c&&i<=6;)i++,s=e.src.charCodeAt(++u);return i>6||u<c&&!ol(s)?!1:(o||(c=e.skipSpacesBack(c,u),a=e.skipCharsBack(c,35,u),a>u&&ol(e.src.charCodeAt(a-1))&&(c=a),e.line=t+1,l=e.push("heading_open","h"+String(i),1),l.markup="########".slice(0,i),l.map=[t,e.line],l=e.push("inline","",0),l.content=e.src.slice(u,c).trim(),l.map=[t,e.line],l.children=[],l=e.push("heading_close","h"+String(i),-1),l.markup="########".slice(0,i)),!0)}});var ul=ie(($g,ll)=>{"use strict";ll.exports=function(e,t,n){var o,s,i,a,l,u,c,f,d,h=t+1,m,v=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(m=e.parentType,e.parentType="paragraph";h<n&&!e.isEmpty(h);h++)if(!(e.sCount[h]-e.blkIndent>3)){if(e.sCount[h]>=e.blkIndent&&(u=e.bMarks[h]+e.tShift[h],c=e.eMarks[h],u<c&&(d=e.src.charCodeAt(u),(d===45||d===61)&&(u=e.skipChars(u,d),u=e.skipSpaces(u),u>=c)))){f=d===61?1:2;break}if(!(e.sCount[h]<0)){for(s=!1,i=0,a=v.length;i<a;i++)if(v[i](e,h,n,!0)){s=!0;break}if(s)break}}return f?(o=e.getLines(t,h,e.blkIndent,!1).trim(),e.line=h+1,l=e.push("heading_open","h"+String(f),1),l.markup=String.fromCharCode(d),l.map=[t,e.line],l=e.push("inline","",0),l.content=o,l.map=[t,e.line-1],l.children=[],l=e.push("heading_close","h"+String(f),-1),l.markup=String.fromCharCode(d),e.parentType=m,!0):!1}});var dl=ie((Ug,cl)=>{"use strict";cl.exports=function(e,t){var n,o,s,i,a,l,u=t+1,c=e.md.block.ruler.getRules("paragraph"),f=e.lineMax;for(l=e.parentType,e.parentType="paragraph";u<f&&!e.isEmpty(u);u++)if(!(e.sCount[u]-e.blkIndent>3)&&!(e.sCount[u]<0)){for(o=!1,s=0,i=c.length;s<i;s++)if(c[s](e,u,f,!0)){o=!0;break}if(o)break}return n=e.getLines(t,u,e.blkIndent,!1).trim(),e.line=u,a=e.push("paragraph_open","p",1),a.map=[t,e.line],a=e.push("inline","",0),a.content=n,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),e.parentType=l,!0}});var pl=ie((zg,hl)=>{"use strict";var fl=En(),Cn=Ne().isSpace;function Ot(r,e,t,n){var o,s,i,a,l,u,c,f;for(this.src=r,this.md=e,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",s=this.src,f=!1,i=a=u=c=0,l=s.length;a<l;a++){if(o=s.charCodeAt(a),!f)if(Cn(o)){u++,o===9?c+=4-c%4:c++;continue}else f=!0;(o===10||a===l-1)&&(o!==10&&a++,this.bMarks.push(i),this.eMarks.push(a),this.tShift.push(u),this.sCount.push(c),this.bsCount.push(0),f=!1,u=0,c=0,i=a+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Ot.prototype.push=function(r,e,t){var n=new fl(r,e,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n};Ot.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Ot.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};Ot.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),!!Cn(t));e++);return e};Ot.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!Cn(this.src.charCodeAt(--e)))return e+1;return e};Ot.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e};Ot.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e};Ot.prototype.getLines=function(e,t,n,o){var s,i,a,l,u,c,f,d=e;if(e>=t)return"";for(c=new Array(t-e),s=0;d<t;d++,s++){for(i=0,f=l=this.bMarks[d],d+1<t||o?u=this.eMarks[d]+1:u=this.eMarks[d];l<u&&i<n;){if(a=this.src.charCodeAt(l),Cn(a))a===9?i+=4-(i+this.bsCount[d])%4:i++;else if(l-f<this.tShift[d])i++;else break;l++}i>n?c[s]=new Array(i-n+1).join(" ")+this.src.slice(l,u):c[s]=this.src.slice(l,u)}return c.join("")};Ot.prototype.Token=fl;hl.exports=Ot});var gl=ie((jg,ml)=>{"use strict";var dh=xn(),An=[["table",Na(),["paragraph","reference"]],["code",Ba()],["fence",Ua(),["paragraph","reference","blockquote","list"]],["blockquote",Ha(),["paragraph","reference","blockquote","list"]],["hr",Va(),["paragraph","reference","blockquote","list"]],["list",Xa(),["paragraph","reference","blockquote"]],["reference",Qa()],["html_block",il(),["paragraph","reference","blockquote"]],["heading",al(),["paragraph","reference","blockquote"]],["lheading",ul()],["paragraph",dl()]];function kn(){this.ruler=new dh;for(var r=0;r<An.length;r++)this.ruler.push(An[r][0],An[r][1],{alt:(An[r][2]||[]).slice()})}kn.prototype.tokenize=function(r,e,t){for(var n,o,s=this.ruler.getRules(""),i=s.length,a=e,l=!1,u=r.md.options.maxNesting;a<t&&(r.line=a=r.skipEmptyLines(a),!(a>=t||r.sCount[a]<r.blkIndent));){if(r.level>=u){r.line=t;break}for(o=0;o<i&&(n=s[o](r,a,t,!1),!n);o++);r.tight=!l,r.isEmpty(r.line-1)&&(l=!0),a=r.line,a<t&&r.isEmpty(a)&&(l=!0,a++,r.line=a)}};kn.prototype.parse=function(r,e,t,n){var o;!r||(o=new this.State(r,e,t,n),this.tokenize(o,o.line,o.lineMax))};kn.prototype.State=pl();ml.exports=kn});var yl=ie((Hg,vl)=>{"use strict";function fh(r){switch(r){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}vl.exports=function(e,t){for(var n=e.pos;n<e.posMax&&!fh(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}});var xl=ie((qg,bl)=>{"use strict";var hh=Ne().isSpace;bl.exports=function(e,t){var n,o,s,i=e.pos;if(e.src.charCodeAt(i)!==10)return!1;if(n=e.pending.length-1,o=e.posMax,!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){for(s=n-1;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<o&&hh(e.src.charCodeAt(i));)i++;return e.pos=i,!0}});var El=ie((Vg,wl)=>{"use strict";var ph=Ne().isSpace,di=[];for(ci=0;ci<256;ci++)di.push(0);var ci;"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(r){di[r.charCodeAt(0)]=1});wl.exports=function(e,t){var n,o=e.pos,s=e.posMax;if(e.src.charCodeAt(o)!==92)return!1;if(o++,o<s){if(n=e.src.charCodeAt(o),n<256&&di[n]!==0)return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(n===10){for(t||e.push("hardbreak","br",0),o++;o<s&&(n=e.src.charCodeAt(o),!!ph(n));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}});var Cl=ie((Gg,Sl)=>{"use strict";Sl.exports=function(e,t){var n,o,s,i,a,l,u,c,f=e.pos,d=e.src.charCodeAt(f);if(d!==96)return!1;for(n=f,f++,o=e.posMax;f<o&&e.src.charCodeAt(f)===96;)f++;if(s=e.src.slice(n,f),u=s.length,e.backticksScanned&&(e.backticks[u]||0)<=n)return t||(e.pending+=s),e.pos+=u,!0;for(a=l=f;(a=e.src.indexOf("`",l))!==-1;){for(l=a+1;l<o&&e.src.charCodeAt(l)===96;)l++;if(c=l-a,c===u)return t||(i=e.push("code_inline","code",0),i.markup=s,i.content=e.src.slice(f,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=l,!0;e.backticks[c]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=u,!0}});var hi=ie((Wg,fi)=>{"use strict";fi.exports.tokenize=function(e,t){var n,o,s,i,a,l=e.pos,u=e.src.charCodeAt(l);if(t||u!==126||(o=e.scanDelims(e.pos,!0),i=o.length,a=String.fromCharCode(u),i<2))return!1;for(i%2&&(s=e.push("text","",0),s.content=a,i--),n=0;n<i;n+=2)s=e.push("text","",0),s.content=a+a,e.delimiters.push({marker:u,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function Al(r,e){var t,n,o,s,i,a=[],l=e.length;for(t=0;t<l;t++)o=e[t],o.marker===126&&o.end!==-1&&(s=e[o.end],i=r.tokens[o.token],i.type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",i=r.tokens[s.token],i.type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="",r.tokens[s.token-1].type==="text"&&r.tokens[s.token-1].content==="~"&&a.push(s.token-1));for(;a.length;){for(t=a.pop(),n=t+1;n<r.tokens.length&&r.tokens[n].type==="s_close";)n++;n--,t!==n&&(i=r.tokens[n],r.tokens[n]=r.tokens[t],r.tokens[t]=i)}}fi.exports.postProcess=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for(Al(e,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&Al(e,n[t].delimiters)}});var mi=ie((Yg,pi)=>{"use strict";pi.exports.tokenize=function(e,t){var n,o,s,i=e.pos,a=e.src.charCodeAt(i);if(t||a!==95&&a!==42)return!1;for(o=e.scanDelims(e.pos,a===42),n=0;n<o.length;n++)s=e.push("text","",0),s.content=String.fromCharCode(a),e.delimiters.push({marker:a,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0};function kl(r,e){var t,n,o,s,i,a,l=e.length;for(t=l-1;t>=0;t--)n=e[t],!(n.marker!==95&&n.marker!==42)&&n.end!==-1&&(o=e[n.end],a=t>0&&e[t-1].end===n.end+1&&e[t-1].marker===n.marker&&e[t-1].token===n.token-1&&e[n.end+1].token===o.token+1,i=String.fromCharCode(n.marker),s=r.tokens[n.token],s.type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?i+i:i,s.content="",s=r.tokens[o.token],s.type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?i+i:i,s.content="",a&&(r.tokens[e[t-1].token].content="",r.tokens[e[n.end+1].token].content="",t--))}pi.exports.postProcess=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for(kl(e,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&kl(e,n[t].delimiters)}});var Il=ie((Kg,Tl)=>{"use strict";var mh=Ne().normalizeReference,gi=Ne().isSpace;Tl.exports=function(e,t){var n,o,s,i,a,l,u,c,f,d="",h="",m=e.pos,v=e.posMax,y=e.pos,w=!0;if(e.src.charCodeAt(e.pos)!==91||(a=e.pos+1,i=e.md.helpers.parseLinkLabel(e,e.pos,!0),i<0))return!1;if(l=i+1,l<v&&e.src.charCodeAt(l)===40){for(w=!1,l++;l<v&&(o=e.src.charCodeAt(l),!(!gi(o)&&o!==10));l++);if(l>=v)return!1;if(y=l,u=e.md.helpers.parseLinkDestination(e.src,l,e.posMax),u.ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?l=u.pos:d="",y=l;l<v&&(o=e.src.charCodeAt(l),!(!gi(o)&&o!==10));l++);if(u=e.md.helpers.parseLinkTitle(e.src,l,e.posMax),l<v&&y!==l&&u.ok)for(h=u.str,l=u.pos;l<v&&(o=e.src.charCodeAt(l),!(!gi(o)&&o!==10));l++);}(l>=v||e.src.charCodeAt(l)!==41)&&(w=!0),l++}if(w){if(typeof e.env.references>"u")return!1;if(l<v&&e.src.charCodeAt(l)===91?(y=l+1,l=e.md.helpers.parseLinkLabel(e,l),l>=0?s=e.src.slice(y,l++):l=i+1):l=i+1,s||(s=e.src.slice(a,i)),c=e.env.references[mh(s)],!c)return e.pos=m,!1;d=c.href,h=c.title}return t||(e.pos=a,e.posMax=i,f=e.push("link_open","a",1),f.attrs=n=[["href",d]],h&&n.push(["title",h]),e.md.inline.tokenize(e),f=e.push("link_close","a",-1)),e.pos=l,e.posMax=v,!0}});var Ll=ie((Xg,Dl)=>{"use strict";var gh=Ne().normalizeReference,vi=Ne().isSpace;Dl.exports=function(e,t){var n,o,s,i,a,l,u,c,f,d,h,m,v,y="",w=e.pos,x=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(l=e.pos+2,a=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),a<0))return!1;if(u=a+1,u<x&&e.src.charCodeAt(u)===40){for(u++;u<x&&(o=e.src.charCodeAt(u),!(!vi(o)&&o!==10));u++);if(u>=x)return!1;for(v=u,f=e.md.helpers.parseLinkDestination(e.src,u,e.posMax),f.ok&&(y=e.md.normalizeLink(f.str),e.md.validateLink(y)?u=f.pos:y=""),v=u;u<x&&(o=e.src.charCodeAt(u),!(!vi(o)&&o!==10));u++);if(f=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<x&&v!==u&&f.ok)for(d=f.str,u=f.pos;u<x&&(o=e.src.charCodeAt(u),!(!vi(o)&&o!==10));u++);else d="";if(u>=x||e.src.charCodeAt(u)!==41)return e.pos=w,!1;u++}else{if(typeof e.env.references>"u")return!1;if(u<x&&e.src.charCodeAt(u)===91?(v=u+1,u=e.md.helpers.parseLinkLabel(e,u),u>=0?i=e.src.slice(v,u++):u=a+1):u=a+1,i||(i=e.src.slice(l,a)),c=e.env.references[gh(i)],!c)return e.pos=w,!1;y=c.href,d=c.title}return t||(s=e.src.slice(l,a),e.md.inline.parse(s,e.md,e.env,m=[]),h=e.push("image","img",0),h.attrs=n=[["src",y],["alt",""]],h.children=m,h.content=s,d&&n.push(["title",d])),e.pos=u,e.posMax=x,!0}});var Rl=ie((Zg,Fl)=>{"use strict";var vh=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,yh=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;Fl.exports=function(e,t){var n,o,s,i,a,l,u=e.pos;if(e.src.charCodeAt(u)!==60)return!1;for(a=e.pos,l=e.posMax;;){if(++u>=l||(i=e.src.charCodeAt(u),i===60))return!1;if(i===62)break}return n=e.src.slice(a+1,u),yh.test(n)?(o=e.md.normalizeLink(n),e.md.validateLink(o)?(t||(s=e.push("link_open","a",1),s.attrs=[["href",o]],s.markup="autolink",s.info="auto",s=e.push("text","",0),s.content=e.md.normalizeLinkText(n),s=e.push("link_close","a",-1),s.markup="autolink",s.info="auto"),e.pos+=n.length+2,!0):!1):vh.test(n)?(o=e.md.normalizeLink("mailto:"+n),e.md.validateLink(o)?(t||(s=e.push("link_open","a",1),s.attrs=[["href",o]],s.markup="autolink",s.info="auto",s=e.push("text","",0),s.content=e.md.normalizeLinkText(n),s=e.push("link_close","a",-1),s.markup="autolink",s.info="auto"),e.pos+=n.length+2,!0):!1):!1}});var Pl=ie((Qg,Ol)=>{"use strict";var bh=ui().HTML_TAG_RE;function xh(r){var e=r|32;return e>=97&&e<=122}Ol.exports=function(e,t){var n,o,s,i,a=e.pos;return!e.md.options.html||(s=e.posMax,e.src.charCodeAt(a)!==60||a+2>=s)||(n=e.src.charCodeAt(a+1),n!==33&&n!==63&&n!==47&&!xh(n))||(o=e.src.slice(a).match(bh),!o)?!1:(t||(i=e.push("html_inline","",0),i.content=e.src.slice(a,a+o[0].length)),e.pos+=o[0].length,!0)}});var Bl=ie((Jg,_l)=>{"use strict";var Ml=Jn(),wh=Ne().has,Eh=Ne().isValidEntityCode,Nl=Ne().fromCodePoint,Sh=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ch=/^&([a-z][a-z0-9]{1,31});/i;_l.exports=function(e,t){var n,o,s,i=e.pos,a=e.posMax;if(e.src.charCodeAt(i)!==38)return!1;if(i+1<a){if(n=e.src.charCodeAt(i+1),n===35){if(s=e.src.slice(i).match(Sh),s)return t||(o=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),e.pending+=Eh(o)?Nl(o):Nl(65533)),e.pos+=s[0].length,!0}else if(s=e.src.slice(i).match(Ch),s&&wh(Ml,s[1]))return t||(e.pending+=Ml[s[1]]),e.pos+=s[0].length,!0}return t||(e.pending+="&"),e.pos++,!0}});var zl=ie((ev,Ul)=>{"use strict";function $l(r,e){var t,n,o,s,i,a,l,u,c={},f=e.length;if(!!f){var d=0,h=-2,m=[];for(t=0;t<f;t++)if(o=e[t],m.push(0),(e[d].marker!==o.marker||h!==o.token-1)&&(d=t),h=o.token,o.length=o.length||0,!!o.close){for(c.hasOwnProperty(o.marker)||(c[o.marker]=[-1,-1,-1,-1,-1,-1]),i=c[o.marker][(o.open?3:0)+o.length%3],n=d-m[d]-1,a=n;n>i;n-=m[n]+1)if(s=e[n],s.marker===o.marker&&s.open&&s.end<0&&(l=!1,(s.close||o.open)&&(s.length+o.length)%3===0&&(s.length%3!==0||o.length%3!==0)&&(l=!0),!l)){u=n>0&&!e[n-1].open?m[n-1]+1:0,m[t]=t-n+u,m[n]=u,o.open=!1,s.end=t,s.close=!1,a=-1,h=-2;break}a!==-1&&(c[o.marker][(o.open?3:0)+(o.length||0)%3]=a)}}}Ul.exports=function(e){var t,n=e.tokens_meta,o=e.tokens_meta.length;for($l(e,e.delimiters),t=0;t<o;t++)n[t]&&n[t].delimiters&&$l(e,n[t].delimiters)}});var Hl=ie((tv,jl)=>{"use strict";jl.exports=function(e){var t,n,o=0,s=e.tokens,i=e.tokens.length;for(t=n=0;t<i;t++)s[t].nesting<0&&o--,s[t].level=o,s[t].nesting>0&&o++,s[t].type==="text"&&t+1<i&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}});var Yl=ie((rv,Wl)=>{"use strict";var yi=En(),ql=Ne().isWhiteSpace,Vl=Ne().isPunctChar,Gl=Ne().isMdAsciiPunct;function Nr(r,e,t,n){this.src=r,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}Nr.prototype.pushPending=function(){var r=new yi("text","",0);return r.content=this.pending,r.level=this.pendingLevel,this.tokens.push(r),this.pending="",r};Nr.prototype.push=function(r,e,t){this.pending&&this.pushPending();var n=new yi(r,e,t),o=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(o),n};Nr.prototype.scanDelims=function(r,e){var t=r,n,o,s,i,a,l,u,c,f,d=!0,h=!0,m=this.posMax,v=this.src.charCodeAt(r);for(n=r>0?this.src.charCodeAt(r-1):32;t<m&&this.src.charCodeAt(t)===v;)t++;return s=t-r,o=t<m?this.src.charCodeAt(t):32,u=Gl(n)||Vl(String.fromCharCode(n)),f=Gl(o)||Vl(String.fromCharCode(o)),l=ql(n),c=ql(o),c?d=!1:f&&(l||u||(d=!1)),l?h=!1:u&&(c||f||(h=!1)),e?(i=d,a=h):(i=d&&(!h||u),a=h&&(!d||f)),{can_open:i,can_close:a,length:s}};Nr.prototype.Token=yi;Wl.exports=Nr});var Zl=ie((nv,Xl)=>{"use strict";var Kl=xn(),bi=[["text",yl()],["newline",xl()],["escape",El()],["backticks",Cl()],["strikethrough",hi().tokenize],["emphasis",mi().tokenize],["link",Il()],["image",Ll()],["autolink",Rl()],["html_inline",Pl()],["entity",Bl()]],xi=[["balance_pairs",zl()],["strikethrough",hi().postProcess],["emphasis",mi().postProcess],["text_collapse",Hl()]];function _r(){var r;for(this.ruler=new Kl,r=0;r<bi.length;r++)this.ruler.push(bi[r][0],bi[r][1]);for(this.ruler2=new Kl,r=0;r<xi.length;r++)this.ruler2.push(xi[r][0],xi[r][1])}_r.prototype.skipToken=function(r){var e,t,n=r.pos,o=this.ruler.getRules(""),s=o.length,i=r.md.options.maxNesting,a=r.cache;if(typeof a[n]<"u"){r.pos=a[n];return}if(r.level<i)for(t=0;t<s&&(r.level++,e=o[t](r,!0),r.level--,!e);t++);else r.pos=r.posMax;e||r.pos++,a[n]=r.pos};_r.prototype.tokenize=function(r){for(var e,t,n=this.ruler.getRules(""),o=n.length,s=r.posMax,i=r.md.options.maxNesting;r.pos<s;){if(r.level<i)for(t=0;t<o&&(e=n[t](r,!1),!e);t++);if(e){if(r.pos>=s)break;continue}r.pending+=r.src[r.pos++]}r.pending&&r.pushPending()};_r.prototype.parse=function(r,e,t,n){var o,s,i,a=new this.State(r,e,t,n);for(this.tokenize(a),s=this.ruler2.getRules(""),i=s.length,o=0;o<i;o++)s[o](a)};_r.prototype.State=Yl();Xl.exports=_r});var Jl=ie((iv,Ql)=>{"use strict";Ql.exports=function(r){var e={};e.src_Any=ti().source,e.src_Cc=ri().source,e.src_Z=ni().source,e.src_P=mn().source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");var t="[><\uFF5C]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]).|"+(r&&r["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+").|;(?!"+e.src_ZCc+").|\\!+(?!"+e.src_ZCc+"|[!]).|\\?(?!"+e.src_ZCc+"|[?]).)+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|\uFF5C]|"+e.src_ZPCc+"))((?![$+<=>^`|\uFF5C])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}});var ou=ie((ov,iu)=>{"use strict";function wi(r){var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(t){!t||Object.keys(t).forEach(function(n){r[n]=t[n]})}),r}function In(r){return Object.prototype.toString.call(r)}function Ah(r){return In(r)==="[object String]"}function kh(r){return In(r)==="[object Object]"}function Th(r){return In(r)==="[object RegExp]"}function eu(r){return In(r)==="[object Function]"}function Ih(r){return r.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var nu={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Dh(r){return Object.keys(r||{}).reduce(function(e,t){return e||nu.hasOwnProperty(t)},!1)}var Lh={"http:":{validate:function(r,e,t){var n=r.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(r,e,t){var n=r.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&r[e-3]===":"||e>=3&&r[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(r,e,t){var n=r.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},Fh="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Rh="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|\u0440\u0444".split("|");function Oh(r){r.__index__=-1,r.__text_cache__=""}function Ph(r){return function(e,t){var n=e.slice(t);return r.test(n)?n.match(r)[0].length:0}}function tu(){return function(r,e){e.normalize(r)}}function Tn(r){var e=r.re=Jl()(r.__opts__),t=r.__tlds__.slice();r.onCompile(),r.__tlds_replaced__||t.push(Fh),t.push(e.src_xn),e.src_tlds=t.join("|");function n(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");var o=[];r.__compiled__={};function s(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(r.__schemas__).forEach(function(a){var l=r.__schemas__[a];if(l!==null){var u={validate:null,link:null};if(r.__compiled__[a]=u,kh(l)){Th(l.validate)?u.validate=Ph(l.validate):eu(l.validate)?u.validate=l.validate:s(a,l),eu(l.normalize)?u.normalize=l.normalize:l.normalize?s(a,l):u.normalize=tu();return}if(Ah(l)){o.push(a);return}s(a,l)}}),o.forEach(function(a){!r.__compiled__[r.__schemas__[a]]||(r.__compiled__[a].validate=r.__compiled__[r.__schemas__[a]].validate,r.__compiled__[a].normalize=r.__compiled__[r.__schemas__[a]].normalize)}),r.__compiled__[""]={validate:null,normalize:tu()};var i=Object.keys(r.__compiled__).filter(function(a){return a.length>0&&r.__compiled__[a]}).map(Ih).join("|");r.re.schema_test=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","i"),r.re.schema_search=RegExp("(^|(?!_)(?:[><\uFF5C]|"+e.src_ZPCc+"))("+i+")","ig"),r.re.pretest=RegExp("("+r.re.schema_test.source+")|("+r.re.host_fuzzy_test.source+")|@","i"),Oh(r)}function Mh(r,e){var t=r.__index__,n=r.__last_index__,o=r.__text_cache__.slice(t,n);this.schema=r.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=o,this.text=o,this.url=o}function ru(r,e){var t=new Mh(r,e);return r.__compiled__[t.schema].normalize(t,r),t}function wt(r,e){if(!(this instanceof wt))return new wt(r,e);e||Dh(r)&&(e=r,r={}),this.__opts__=wi({},nu,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=wi({},Lh,r),this.__compiled__={},this.__tlds__=Rh,this.__tlds_replaced__=!1,this.re={},Tn(this)}wt.prototype.add=function(e,t){return this.__schemas__[e]=t,Tn(this),this};wt.prototype.set=function(e){return this.__opts__=wi(this.__opts__,e),this};wt.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,s,i,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(t=l.exec(e))!==null;)if(s=this.testSchemaAt(e,t[2],l.lastIndex),s){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&(o=e.match(this.re.email_fuzzy))!==null&&(i=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a))),this.__index__>=0};wt.prototype.pretest=function(e){return this.re.pretest.test(e)};wt.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0};wt.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(ru(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(ru(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null};wt.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,o,s){return n!==s[o-1]}).reverse(),Tn(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Tn(this),this)};wt.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};wt.prototype.onCompile=function(){};iu.exports=wt});var hu={};ld(hu,{decode:()=>Ai,default:()=>Hh,encode:()=>ki,toASCII:()=>fu,toUnicode:()=>du,ucs2decode:()=>Ci,ucs2encode:()=>uu});function er(r){throw new RangeError($h[r])}function Uh(r,e){let t=[],n=r.length;for(;n--;)t[n]=e(r[n]);return t}function lu(r,e){let t=r.split("@"),n="";t.length>1&&(n=t[0]+"@",r=t[1]),r=r.replace(Bh,".");let o=r.split("."),s=Uh(o,e).join(".");return n+s}function Ci(r){let e=[],t=0,n=r.length;for(;t<n;){let o=r.charCodeAt(t++);if(o>=55296&&o<=56319&&t<n){let s=r.charCodeAt(t++);(s&64512)==56320?e.push(((o&1023)<<10)+(s&1023)+65536):(e.push(o),t--)}else e.push(o)}return e}var au,Nh,_h,Bh,$h,Ei,Pt,Si,uu,zh,su,cu,Ai,ki,du,fu,jh,Hh,pu=ad(()=>{"use strict";au="-",Nh=/^xn--/,_h=/[^\0-\x7E]/,Bh=/[\x2E\u3002\uFF0E\uFF61]/g,$h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ei=36-1,Pt=Math.floor,Si=String.fromCharCode;uu=r=>String.fromCodePoint(...r),zh=function(r){return r-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36},su=function(r,e){return r+22+75*(r<26)-((e!=0)<<5)},cu=function(r,e,t){let n=0;for(r=t?Pt(r/700):r>>1,r+=Pt(r/e);r>Ei*26>>1;n+=36)r=Pt(r/Ei);return Pt(n+(Ei+1)*r/(r+38))},Ai=function(r){let e=[],t=r.length,n=0,o=128,s=72,i=r.lastIndexOf(au);i<0&&(i=0);for(let a=0;a<i;++a)r.charCodeAt(a)>=128&&er("not-basic"),e.push(r.charCodeAt(a));for(let a=i>0?i+1:0;a<t;){let l=n;for(let c=1,f=36;;f+=36){a>=t&&er("invalid-input");let d=zh(r.charCodeAt(a++));(d>=36||d>Pt((2147483647-n)/c))&&er("overflow"),n+=d*c;let h=f<=s?1:f>=s+26?26:f-s;if(d<h)break;let m=36-h;c>Pt(2147483647/m)&&er("overflow"),c*=m}let u=e.length+1;s=cu(n-l,u,l==0),Pt(n/u)>2147483647-o&&er("overflow"),o+=Pt(n/u),n%=u,e.splice(n++,0,o)}return String.fromCodePoint(...e)},ki=function(r){let e=[];r=Ci(r);let t=r.length,n=128,o=0,s=72;for(let l of r)l<128&&e.push(Si(l));let i=e.length,a=i;for(i&&e.push(au);a<t;){let l=2147483647;for(let c of r)c>=n&&c<l&&(l=c);let u=a+1;l-n>Pt((2147483647-o)/u)&&er("overflow"),o+=(l-n)*u,n=l;for(let c of r)if(c<n&&++o>2147483647&&er("overflow"),c==n){let f=o;for(let d=36;;d+=36){let h=d<=s?1:d>=s+26?26:d-s;if(f<h)break;let m=f-h,v=36-h;e.push(Si(su(h+m%v,0))),f=Pt(m/v)}e.push(Si(su(f,0))),s=cu(o,u,a==i),o=0,++a}++o,++n}return e.join("")},du=function(r){return lu(r,function(e){return Nh.test(e)?Ai(e.slice(4).toLowerCase()):e})},fu=function(r){return lu(r,function(e){return _h.test(e)?"xn--"+ki(e):e})},jh={version:"2.1.0",ucs2:{decode:Ci,encode:uu},decode:Ai,encode:ki,toASCII:fu,toUnicode:du},Hh=jh});var gu=ie((sv,mu)=>{"use strict";mu.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}});var yu=ie((av,vu)=>{"use strict";vu.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}});var xu=ie((lv,bu)=>{"use strict";bu.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"\u201C\u201D\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}});var Cu=ie((uv,Su)=>{"use strict";var Br=Ne(),qh=sa(),Vh=la(),Gh=Oa(),Wh=gl(),Yh=Zl(),Kh=ou(),tr=ei(),wu=(pu(),ud(hu)),Xh={default:gu(),zero:yu(),commonmark:xu()},Zh=/^(vbscript|javascript|file|data):/,Qh=/^data:image\/(gif|png|jpeg|webp);/;function Jh(r){var e=r.trim().toLowerCase();return Zh.test(e)?!!Qh.test(e):!0}var Eu=["http:","https:","mailto:"];function ep(r){var e=tr.parse(r,!0);if(e.hostname&&(!e.protocol||Eu.indexOf(e.protocol)>=0))try{e.hostname=wu.toASCII(e.hostname)}catch{}return tr.encode(tr.format(e))}function tp(r){var e=tr.parse(r,!0);if(e.hostname&&(!e.protocol||Eu.indexOf(e.protocol)>=0))try{e.hostname=wu.toUnicode(e.hostname)}catch{}return tr.decode(tr.format(e),tr.decode.defaultChars+"%")}function Et(r,e){if(!(this instanceof Et))return new Et(r,e);e||Br.isString(r)||(e=r||{},r="default"),this.inline=new Yh,this.block=new Wh,this.core=new Gh,this.renderer=new Vh,this.linkify=new Kh,this.validateLink=Jh,this.normalizeLink=ep,this.normalizeLinkText=tp,this.utils=Br,this.helpers=Br.assign({},qh),this.options={},this.configure(r),e&&this.set(e)}Et.prototype.set=function(r){return Br.assign(this.options,r),this};Et.prototype.configure=function(r){var e=this,t;if(Br.isString(r)&&(t=r,r=Xh[t],!r))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!r)throw new Error("Wrong `markdown-it` preset, can't be empty");return r.options&&e.set(r.options),r.components&&Object.keys(r.components).forEach(function(n){r.components[n].rules&&e[n].ruler.enableOnly(r.components[n].rules),r.components[n].rules2&&e[n].ruler2.enableOnly(r.components[n].rules2)}),this};Et.prototype.enable=function(r,e){var t=[];Array.isArray(r)||(r=[r]),["core","block","inline"].forEach(function(o){t=t.concat(this[o].ruler.enable(r,!0))},this),t=t.concat(this.inline.ruler2.enable(r,!0));var n=r.filter(function(o){return t.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this};Et.prototype.disable=function(r,e){var t=[];Array.isArray(r)||(r=[r]),["core","block","inline"].forEach(function(o){t=t.concat(this[o].ruler.disable(r,!0))},this),t=t.concat(this.inline.ruler2.disable(r,!0));var n=r.filter(function(o){return t.indexOf(o)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this};Et.prototype.use=function(r){var e=[this].concat(Array.prototype.slice.call(arguments,1));return r.apply(r,e),this};Et.prototype.parse=function(r,e){if(typeof r!="string")throw new Error("Input data should be a String");var t=new this.core.State(r,this,e);return this.core.process(t),t.tokens};Et.prototype.render=function(r,e){return e=e||{},this.renderer.render(this.parse(r,e),this.options,e)};Et.prototype.parseInline=function(r,e){var t=new this.core.State(r,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens};Et.prototype.renderInline=function(r,e){return e=e||{},this.renderer.render(this.parseInline(r,e),this.options,e)};Su.exports=Et});var ku=ie((cv,Au)=>{"use strict";Au.exports=Cu()});var Fu=ie((dv,Lu)=>{var Ti=!0,Iu=!1,Du=!1;Lu.exports=function(r,e){e&&(Ti=!e.enabled,Iu=!!e.label,Du=!!e.labelAfter),r.core.ruler.after("inline","github-task-lists",function(t){for(var n=t.tokens,o=2;o<n.length;o++)np(n,o)&&(ip(n[o],t.Token),Tu(n[o-2],"class","task-list-item"+(Ti?"":" enabled")),Tu(n[rp(n,o-2)],"class","contains-task-list"))})};function Tu(r,e,t){var n=r.attrIndex(e),o=[e,t];n<0?r.attrPush(o):r.attrs[n]=o}function rp(r,e){for(var t=r[e].level-1,n=e-1;n>=0;n--)if(r[n].level===t)return n;return-1}function np(r,e){return up(r[e])&&cp(r[e-1])&&dp(r[e-2])&&fp(r[e])}function ip(r,e){if(r.children.unshift(op(r,e)),r.children[1].content=r.children[1].content.slice(3),r.content=r.content.slice(3),Iu)if(Du){r.children.pop();var t="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);r.children[0].content=r.children[0].content.slice(0,-1)+' id="'+t+'">',r.children.push(lp(r.content,t,e))}else r.children.unshift(sp(e)),r.children.push(ap(e))}function op(r,e){var t=new e("html_inline","",0),n=Ti?' disabled="" ':"";return r.content.indexOf("[ ] ")===0?t.content='<input class="task-list-item-checkbox"'+n+'type="checkbox">':(r.content.indexOf("[x] ")===0||r.content.indexOf("[X] ")===0)&&(t.content='<input class="task-list-item-checkbox" checked=""'+n+'type="checkbox">'),t}function sp(r){var e=new r("html_inline","",0);return e.content="<label>",e}function ap(r){var e=new r("html_inline","",0);return e.content="</label>",e}function lp(r,e,t){var n=new t("html_inline","",0);return n.content='<label class="task-list-item-label" for="'+e+'">'+r+"</label>",n.attrs=[{for:e}],n}function up(r){return r.type==="inline"}function cp(r){return r.type==="paragraph_open"}function dp(r){return r.type==="list_item_open"}function fp(r){return r.content.indexOf("[ ] ")===0||r.content.indexOf("[x] ")===0||r.content.indexOf("[X] ")===0}});var Yu=ie((Ur,Fi)=>{(function(r,e){typeof Ur=="object"&&typeof Fi=="object"?Fi.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Ur=="object"?Ur.ClipboardJS=e():r.ClipboardJS=e()})(Ur,function(){return e={686:function(n,l,s){"use strict";s.d(l,{default:function(){return N}});var l=s(279),i=s.n(l),l=s(370),a=s.n(l),l=s(817),u=s.n(l);function c(S){try{return document.execCommand(S)}catch{return}}var f=function(S){return S=u()(S),c("cut"),S},d=function(S){var M,L,R,O=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{container:document.body},F="";return typeof S=="string"?(M=S,L=document.documentElement.getAttribute("dir")==="rtl",(R=document.createElement("textarea")).style.fontSize="12pt",R.style.border="0",R.style.padding="0",R.style.margin="0",R.style.position="absolute",R.style[L?"right":"left"]="-9999px",L=window.pageYOffset||document.documentElement.scrollTop,R.style.top="".concat(L,"px"),R.setAttribute("readonly",""),R.value=M,R=R,O.container.appendChild(R),F=u()(R),c("copy"),R.remove()):(F=u()(S),c("copy")),F};function h(S){return(h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M})(S)}var m=function(){var R=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},L=R.action,S=L===void 0?"copy":L,M=R.container,L=R.target,R=R.text;if(S!=="copy"&&S!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(L!==void 0){if(!L||h(L)!=="object"||L.nodeType!==1)throw new Error('Invalid "target" value, use a valid Element');if(S==="copy"&&L.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(S==="cut"&&(L.hasAttribute("readonly")||L.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}return R?d(R,{container:M}):L?S==="cut"?f(L):d(L,{container:M}):void 0};function v(S){return(v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M})(S)}function y(S,M){for(var L=0;L<M.length;L++){var R=M[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(S,R.key,R)}}function w(S,M){return(w=Object.setPrototypeOf||function(L,R){return L.__proto__=R,L})(S,M)}function x(S){var M=function(){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}}();return function(){var L,R=D(S);return L=M?(L=D(this).constructor,Reflect.construct(R,arguments,L)):R.apply(this,arguments),R=this,!(L=L)||v(L)!=="object"&&typeof L!="function"?function(O){if(O!==void 0)return O;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(R):L}}function D(S){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(M){return M.__proto__||Object.getPrototypeOf(M)})(S)}function I(S,M){if(S="data-clipboard-".concat(S),M.hasAttribute(S))return M.getAttribute(S)}var N=function(){(function(F,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(_&&_.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),_&&w(F,_)})(O,i());var S,M,L,R=x(O);function O(F,_){var j;return function(H){if(!(H instanceof O))throw new TypeError("Cannot call a class as a function")}(this),(j=R.call(this)).resolveOptions(_),j.listenClick(F),j}return S=O,L=[{key:"copy",value:function(F){var _=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{container:document.body};return d(F,_)}},{key:"cut",value:function(F){return f(F)}},{key:"isSupported",value:function(){var F=0<arguments.length&&arguments[0]!==void 0?arguments[0]:["copy","cut"],F=typeof F=="string"?[F]:F,_=!!document.queryCommandSupported;return F.forEach(function(j){_=_&&!!document.queryCommandSupported(j)}),_}}],(M=[{key:"resolveOptions",value:function(){var F=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof F.action=="function"?F.action:this.defaultAction,this.target=typeof F.target=="function"?F.target:this.defaultTarget,this.text=typeof F.text=="function"?F.text:this.defaultText,this.container=v(F.container)==="object"?F.container:document.body}},{key:"listenClick",value:function(F){var _=this;this.listener=a()(F,"click",function(j){return _.onClick(j)})}},{key:"onClick",value:function(H){var _=H.delegateTarget||H.currentTarget,j=this.action(_)||"copy",H=m({action:j,container:this.container,target:this.target(_),text:this.text(_)});this.emit(H?"success":"error",{action:j,text:H,trigger:_,clearSelection:function(){_&&_.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(F){return I("action",F)}},{key:"defaultTarget",value:function(F){if(F=I("target",F),F)return document.querySelector(F)}},{key:"defaultText",value:function(F){return I("text",F)}},{key:"destroy",value:function(){this.listener.destroy()}}])&&y(S.prototype,M),L&&y(S,L),O}()},828:function(n){var o;typeof Element>"u"||Element.prototype.matches||((o=Element.prototype).matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector),n.exports=function(s,i){for(;s&&s.nodeType!==9;){if(typeof s.matches=="function"&&s.matches(i))return s;s=s.parentNode}}},438:function(n,o,s){var i=s(828);function a(l,u,c,f,d){var h=function(m,v,y,w){return function(x){x.delegateTarget=i(x.target,v),x.delegateTarget&&w.call(m,x)}}.apply(this,arguments);return l.addEventListener(c,h,d),{destroy:function(){l.removeEventListener(c,h,d)}}}n.exports=function(l,u,c,f,d){return typeof l.addEventListener=="function"?a.apply(null,arguments):typeof c=="function"?a.bind(null,document).apply(null,arguments):(typeof l=="string"&&(l=document.querySelectorAll(l)),Array.prototype.map.call(l,function(h){return a(h,u,c,f,d)}))}},879:function(n,o){o.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},o.nodeList=function(s){var i=Object.prototype.toString.call(s);return s!==void 0&&(i==="[object NodeList]"||i==="[object HTMLCollection]")&&"length"in s&&(s.length===0||o.node(s[0]))},o.string=function(s){return typeof s=="string"||s instanceof String},o.fn=function(s){return Object.prototype.toString.call(s)==="[object Function]"}},370:function(n,o,s){var i=s(879),a=s(438);n.exports=function(l,u,c){if(!l&&!u&&!c)throw new Error("Missing required arguments");if(!i.string(u))throw new TypeError("Second argument must be a String");if(!i.fn(c))throw new TypeError("Third argument must be a Function");if(i.node(l))return v=u,y=c,(m=l).addEventListener(v,y),{destroy:function(){m.removeEventListener(v,y)}};if(i.nodeList(l))return f=l,d=u,h=c,Array.prototype.forEach.call(f,function(w){w.addEventListener(d,h)}),{destroy:function(){Array.prototype.forEach.call(f,function(w){w.removeEventListener(d,h)})}};if(i.string(l))return l=l,u=u,c=c,a(document.body,l,u,c);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var f,d,h,m,v,y}},817:function(n){n.exports=function(o){var s,i=o.nodeName==="SELECT"?(o.focus(),o.value):o.nodeName==="INPUT"||o.nodeName==="TEXTAREA"?((s=o.hasAttribute("readonly"))||o.setAttribute("readonly",""),o.select(),o.setSelectionRange(0,o.value.length),s||o.removeAttribute("readonly"),o.value):(o.hasAttribute("contenteditable")&&o.focus(),i=window.getSelection(),(s=document.createRange()).selectNodeContents(o),i.removeAllRanges(),i.addRange(s),i.toString());return i}},279:function(n){function o(){}o.prototype={on:function(s,i,a){var l=this.e||(this.e={});return(l[s]||(l[s]=[])).push({fn:i,ctx:a}),this},once:function(s,i,a){var l=this;function u(){l.off(s,u),i.apply(a,arguments)}return u._=i,this.on(s,u,a)},emit:function(s){for(var i=[].slice.call(arguments,1),a=((this.e||(this.e={}))[s]||[]).slice(),l=0,u=a.length;l<u;l++)a[l].fn.apply(a[l].ctx,i);return this},off:function(s,i){var a=this.e||(this.e={}),l=a[s],u=[];if(l&&i)for(var c=0,f=l.length;c<f;c++)l[c].fn!==i&&l[c].fn._!==i&&u.push(l[c]);return u.length?a[s]=u:delete a[s],this}},n.exports=o,n.exports.TinyEmitter=o}},t={},r.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(o,{a:o}),o},r.d=function(n,o){for(var s in o)r.o(o,s)&&!r.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:o[s]})},r.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},r(686).default;function r(n){if(t[n])return t[n].exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}var e,t})});var wr={},cd=[];function Hr(r,e){if(cd.push({name:r,data:e}),typeof wr[r]>"u")return this;let t=wr[r];for(let n=0;n<t.length;n++)t[n](e)}function dd(r,e){typeof wr[r]>"u"&&(wr[r]=[]),wr[r].push(e)}function fd(r,e,t){let n=new CustomEvent(e,{detail:t,bubbles:!0});r.dispatchEvent(n)}function hd(r){if(!!r.status&&r.status===422&&r.data){let e=Object.values(r.data).flat().join(`
|
|
`);Hr("error",e)}}var Bi={emit:Hr,emitPublic:fd,listen:dd,success:r=>Hr("success",r),error:r=>Hr("error",r),showValidationErrors:hd};async function pd(r,e={}){return $i(r,{method:"GET",params:e})}async function md(r,e=null){return qr("POST",r,e)}async function gd(r,e=null){return qr("PUT",r,e)}async function vd(r,e=null){return qr("PATCH",r,e)}async function yd(r,e=null){return qr("DELETE",r,e)}async function qr(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"),$i(e,n)}async function $i(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),s={data:await bd(n),headers:n.headers,redirected:n.redirected,status:n.status,statusText:n.statusText,url:n.url,original:n};if(!n.ok)throw s;return s}async function bd(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 Ui={get:pd,post:md,put:gd,patch:vd,delete:yd};var zi=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 u=l.match(s);if(u!==null&&Number(u[1])===t){a=l.replace(s,"").trim();break}let c=l.match(i);if(c!==null&&Number(c[1])<=t&&(c[2]==="*"||Number(c[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}},ji=zi;function Vr(r,e){let t=document.querySelectorAll(r);for(let n of t)e(n)}function Gr(r,e,t){for(let n of e)r.addEventListener(n,t)}function Ue(r,e){Array.isArray(r)||(r=[r]);for(let t of r)t.addEventListener("click",e),t.addEventListener("keydown",n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),e(n))})}function Wr(r,e){Array.isArray(r)||(r=[r]);let t=n=>{n.key==="Enter"&&e(n)};r.forEach(n=>n.addEventListener("keypress",t))}function We(r,e,t,n){r.addEventListener(t,function(o){let s=o.target.closest(e);s&&n.call(s,o,s)})}function Hi(r,e){let t=document.querySelectorAll(r);e=e.toLowerCase();for(let n of t)if(n.textContent.toLowerCase().includes(e))return n;return null}function Er(r){r.innerHTML='<div class="loading-container"><div></div><div></div><div></div></div>'}function qi(r){let e=r.querySelectorAll(".loading-container");for(let t of e)t.remove()}function Sr(r,e,t){let n;return function(){let o=this,s=arguments,i=function(){n=null,t||r.apply(o,s)},a=t&&!n;clearTimeout(n),n=setTimeout(i,e),a&&r.apply(o,s)}}function Cr(r){if(!r)return;r.scrollIntoView({behavior:"smooth"});let e=document.getElementById("custom-styles").getAttribute("data-color-light"),t=window.getComputedStyle(r).getPropertyValue("background-color");r.style.backgroundColor=e,setTimeout(()=>{r.classList.add("selectFade"),r.style.backgroundColor=t},10),setTimeout(()=>{r.classList.remove("selectFade"),r.style.backgroundColor=""},3e3)}function Gi(r){return r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Wi(){let r=()=>((1+Math.random())*65536|0).toString(16).substring(1);return r()+r()+"-"+r()+"-"+r()+"-"+r()+"-"+r()+r()+r()}var Yi=class{setup(){this.modelRow=this.$refs.model,this.addButton=this.$refs.add,this.removeSelector=this.$opts.removeSelector,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.addButton.addEventListener("click",this.add.bind(this)),We(this.$el,this.removeSelector,"click",e=>{e.target.closest(this.rowSelector).remove()})}add(){let e=this.modelRow.cloneNode(!0);e.classList.remove("hidden"),this.setClonedInputNames(e),this.modelRow.parentNode.insertBefore(e,this.modelRow),window.components.init(e)}setClonedInputNames(e){let t=Wi(),n=e.querySelectorAll('[name*="randrowid"]');for(let o of n)o.name=o.name.split("randrowid").join(t)}},Ki=Yi;var Xi=class{setup(){this.row=this.$el,this.url=this.$opts.url,this.deleteButtons=this.$manyRefs.delete,Ue(this.deleteButtons,this.runDelete.bind(this))}runDelete(){this.row.style.opacity="0.7",this.row.style.pointerEvents="none",window.$http.delete(this.url).then(e=>{typeof e.data=="object"&&e.data.message&&window.$events.emit("success",e.data.message),this.row.remove()}).catch(e=>{this.row.style.opacity=null,this.row.style.pointerEvents=null})}},Zi=Xi;var Qi=class{setup(){this.container=this.$el,this.responseContainer=this.container,this.url=this.$opts.url,this.method=this.$opts.method||"post",this.successMessage=this.$opts.successMessage,this.submitButtons=this.$manyRefs.submit||[],this.$opts.responseContainer&&(this.responseContainer=this.container.closest(this.$opts.responseContainer)),this.setupListeners()}setupListeners(){if(this.container.tagName==="FORM"){this.container.addEventListener("submit",this.submitRealForm.bind(this));return}Wr(this.container,e=>{this.submitFakeForm(),e.preventDefault()}),this.submitButtons.forEach(e=>Ue(e,this.submitFakeForm.bind(this)))}submitFakeForm(){let e=new FormData,t=this.container.querySelectorAll("[name]");for(let n of t)e.append(n.getAttribute("name"),n.value);this.submit(e)}submitRealForm(e){e.preventDefault();let t=new FormData(this.container);this.submit(t)}async submit(e){this.responseContainer.style.opacity="0.7",this.responseContainer.style.pointerEvents="none";try{let t=await window.$http[this.method.toLowerCase()](this.url,e);this.$emit("success",{formData:e}),this.responseContainer.innerHTML=t.data,this.successMessage&&window.$events.emit("success",this.successMessage)}catch(t){this.responseContainer.innerHTML=t.data}window.components.init(this.responseContainer),this.responseContainer.style.opacity=null,this.responseContainer.style.pointerEvents=null}},Ji=Qi;var eo=class{setup(){this.container=this.$el,this.pageId=this.$opts.pageId,this.editContainer=this.$refs.editContainer,this.listContainer=this.$refs.listContainer,this.mainTabs=this.$refs.mainTabs,this.list=this.$refs.list,this.setupListeners()}setupListeners(){let e=this.reloadList.bind(this);this.container.addEventListener("dropzone-success",e),this.container.addEventListener("ajax-form-success",e),this.container.addEventListener("sortable-list-sort",t=>{this.updateOrder(t.detail.ids)}),this.container.addEventListener("event-emit-select-edit",t=>{this.startEdit(t.detail.id)}),this.container.addEventListener("event-emit-select-edit-back",t=>{this.stopEdit()}),this.container.addEventListener("event-emit-select-insert",t=>{let n=t.target.closest("[data-drag-content]").getAttribute("data-drag-content"),o=JSON.parse(n);window.$events.emit("editor::insert",{html:o["text/html"],markdown:o["text/plain"]})})}reloadList(){this.stopEdit(),this.mainTabs.components.tabs.show("items"),window.$http.get(`/attachments/get/page/${this.pageId}`).then(e=>{this.list.innerHTML=e.data,window.components.init(this.list)})}updateOrder(e){window.$http.put(`/attachments/sort/page/${this.pageId}`,{order:e}).then(t=>{window.$events.emit("success",t.data.message)})}async startEdit(e){this.editContainer.classList.remove("hidden"),this.listContainer.classList.add("hidden"),Er(this.editContainer);let t=await window.$http.get(`/attachments/edit/${e}`);this.editContainer.innerHTML=t.data,window.components.init(this.editContainer)}stopEdit(){this.editContainer.classList.add("hidden"),this.listContainer.classList.remove("hidden")}},to=eo;var ro=class{setup(){this.container=this.$el,this.setupListeners()}setupListeners(){let e=t=>t.key==="Control"||t.key==="Meta";window.addEventListener("keydown",t=>{e(t)&&this.addOpenQueryToLinks()},{passive:!0}),window.addEventListener("keyup",t=>{e(t)&&this.removeOpenQueryFromLinks()},{passive:!0})}addOpenQueryToLinks(){let e=this.container.querySelectorAll("a.attachment-file");for(let t of e)t.href.split("?")[1]!=="open=true"&&(t.href=t.href+"?open=true",t.setAttribute("target","_blank"))}removeOpenQueryFromLinks(){let e=this.container.querySelectorAll("a.attachment-file");for(let t of e)t.href=t.href.split("?")[0],t.removeAttribute("target")}},no=ro;var Mn={},io=class{setup(){this.parent=this.$el.parentElement,this.container=this.$el,this.type=this.$opts.type,this.url=this.$opts.url,this.input=this.$refs.input,this.list=this.$refs.list,this.lastPopulated=0,this.setupListeners()}setupListeners(){this.input.addEventListener("input",this.requestSuggestions.bind(this)),this.input.addEventListener("focus",this.requestSuggestions.bind(this)),this.input.addEventListener("keydown",e=>{e.key==="Tab"&&this.hideSuggestions()}),this.input.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this)),this.container.addEventListener("keydown",this.containerKeyDown.bind(this)),We(this.list,"button","click",(e,t)=>{this.selectSuggestion(t.textContent)}),We(this.list,"button","keydown",(e,t)=>{e.key==="Enter"&&this.selectSuggestion(t.textContent)})}selectSuggestion(e){this.input.value=e,this.lastPopulated=Date.now(),this.input.focus(),this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hideSuggestions()}containerKeyDown(e){e.key==="Enter"&&e.preventDefault(),!this.list.classList.contains("hidden")&&(e.key==="ArrowDown"?(this.moveFocus(!0),e.preventDefault()):e.key==="ArrowUp"?(this.moveFocus(!1),e.preventDefault()):e.key==="Escape"&&(this.hideSuggestions(),e.preventDefault()))}moveFocus(e=!0){let t=Array.from(this.container.querySelectorAll("input,button")),n=t.indexOf(document.activeElement),o=t[n+(e?1:-1)];o&&o.focus()}async requestSuggestions(){if(Date.now()-this.lastPopulated<50)return;let e=this.getNameFilterIfNeeded(),t=this.input.value.slice(0,3).toLowerCase(),n=await this.loadSuggestions(t,e),o=n.slice(0,6);t.length>0&&(o=n.filter(s=>s.toLowerCase().includes(t)).slice(0,6)),this.displaySuggestions(o)}getNameFilterIfNeeded(){return this.type!=="value"?null:this.parent.querySelector("input").value}async loadSuggestions(e,t=null){let n={search:e,name:t},o=`${this.url}:${JSON.stringify(n)}`;if(Mn[o])return Mn[o];let s=await window.$http.get(this.url,n);return Mn[o]=s.data,s.data}displaySuggestions(e){if(e.length===0)return this.hideSuggestions();this.list.innerHTML=e.map(t=>`<li><button type="button">${Gi(t)}</button></li>`).join(""),this.list.style.display="block";for(let t of this.list.querySelectorAll("button"))t.addEventListener("blur",this.hideSuggestionsIfFocusedLost.bind(this))}hideSuggestions(){this.list.style.display="none"}hideSuggestionsIfFocusedLost(e){this.container.contains(e.relatedTarget)||this.hideSuggestions()}},oo=io;var so=class{constructor(e){if(this.elem=e,this.targetElem=document.getElementById("header"),this.showing=!1,this.breakPoint=1200,document.body.classList.contains("flexbox")){this.elem.style.display="none";return}this.elem.addEventListener("click",this.scrollToTop.bind(this)),window.addEventListener("scroll",this.onPageScroll.bind(this))}onPageScroll(){let e=document.documentElement.scrollTop||document.body.scrollTop||0;!this.showing&&e>this.breakPoint?(this.elem.style.display="block",this.showing=!0,setTimeout(()=>{this.elem.style.opacity=.4},1)):this.showing&&e<this.breakPoint&&(this.elem.style.opacity=0,this.showing=!1,setTimeout(()=>{this.elem.style.display="none"},500))}scrollToTop(){let e=this.targetElem.getBoundingClientRect().top,t=document.documentElement.scrollTop?document.documentElement:document.body,n=300,o=Date.now(),s=this.targetElem.getBoundingClientRect().top;function i(){let a=1-(Date.now()-o)/n,l=Math.abs(a*s);a>0?(t.scrollTop=l,requestAnimationFrame(i.bind(this))):t.scrollTop=e}requestAnimationFrame(i.bind(this))}},ao=so;function lo(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(r,o).enumerable})),t.push.apply(t,n)}return t}function Ft(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lo(Object(t),!0).forEach(function(n){xd(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lo(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Qr(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Qr=function(e){return typeof e}:Qr=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qr(r)}function xd(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ut(){return Ut=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ut.apply(this,arguments)}function wd(r,e){if(r==null)return{};var t={},n=Object.keys(r),o,s;for(s=0;s<n.length;s++)o=n[s],!(e.indexOf(o)>=0)&&(t[o]=r[o]);return t}function Ed(r,e){if(r==null)return{};var t=wd(r,e),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(o=0;o<s.length;o++)n=s[o],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}var Sd="1.14.0";function $t(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var zt=$t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Or=$t(/Edge/i),uo=$t(/firefox/i),Ir=$t(/safari/i)&&!$t(/chrome/i)&&!$t(/android/i),yo=$t(/iP(ad|od|hone)/i),Cd=$t(/chrome/i)&&$t(/android/i),bo={capture:!1,passive:!1};function Me(r,e,t){r.addEventListener(e,t,!zt&&bo)}function Le(r,e,t){r.removeEventListener(e,t,!zt&&bo)}function nn(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 Ad(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function Dt(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&nn(r,e):nn(r,e))||n&&r===t)return r;if(r===t)break}while(r=Ad(r))}return null}var co=/\s+/g;function pt(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(co," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(co," ")}}function ge(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 ur(r,e){var t="";if(typeof r=="string")t=r;else do{var n=ge(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 xo(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 Lt(){var r=document.scrollingElement;return r||document.documentElement}function tt(r,e,t,n,o){if(!(!r.getBoundingClientRect&&r!==window)){var s,i,a,l,u,c,f;if(r!==window&&r.parentNode&&r!==Lt()?(s=r.getBoundingClientRect(),i=s.top,a=s.left,l=s.bottom,u=s.right,c=s.height,f=s.width):(i=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||t)&&r!==window&&(o=o||r.parentNode,!zt))do if(o&&o.getBoundingClientRect&&(ge(o,"transform")!=="none"||t&&ge(o,"position")!=="static")){var d=o.getBoundingClientRect();i-=d.top+parseInt(ge(o,"border-top-width")),a-=d.left+parseInt(ge(o,"border-left-width")),l=i+s.height,u=a+s.width;break}while(o=o.parentNode);if(n&&r!==window){var h=ur(o||r),m=h&&h.a,v=h&&h.d;h&&(i/=v,a/=m,f/=m,c/=v,l=i+c,u=a+f)}return{top:i,left:a,bottom:l,right:u,width:f,height:c}}}function fo(r,e,t){for(var n=Wt(r,!0),o=tt(r)[e];n;){var s=tt(n)[t],i=void 0;if(t==="top"||t==="left"?i=o>=s:i=o<=s,!i)return n;if(n===Lt())break;n=Wt(n,!1)}return!1}function cr(r,e,t,n){for(var o=0,s=0,i=r.children;s<i.length;){if(i[s].style.display!=="none"&&i[s]!==ve.ghost&&(n||i[s]!==ve.dragged)&&Dt(i[s],t.draggable,r,!1)){if(o===e)return i[s];o++}s++}return null}function Kn(r,e){for(var t=r.lastElementChild;t&&(t===ve.ghost||ge(t,"display")==="none"||e&&!nn(t,e));)t=t.previousElementSibling;return t||null}function xt(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==ve.clone&&(!e||nn(r,e))&&t++;return t}function ho(r){var e=0,t=0,n=Lt();if(r)do{var o=ur(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 kd(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 Wt(r,e){if(!r||!r.getBoundingClientRect)return Lt();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=ge(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 Lt();if(n||e)return t;n=!0}}while(t=t.parentNode);return Lt()}function Td(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function Nn(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var Dr;function wo(r,e){return function(){if(!Dr){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),Dr=setTimeout(function(){Dr=void 0},e)}}}function Id(){clearTimeout(Dr),Dr=void 0}function Eo(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function So(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}var gt="Sortable"+new Date().getTime();function Dd(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(ge(o,"display")==="none"||o===ve.ghost)){r.push({target:o,rect:tt(o)});var s=Ft({},r[r.length-1].rect);if(o.thisAnimationDuration){var i=ur(o,!0);i&&(s.top-=i.f,s.left-=i.e)}o.fromRect=s}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(kd(r,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var s=!1,i=0;r.forEach(function(a){var l=0,u=a.target,c=u.fromRect,f=tt(u),d=u.prevFromRect,h=u.prevToRect,m=a.rect,v=ur(u,!0);v&&(f.top-=v.f,f.left-=v.e),u.toRect=f,u.thisAnimationDuration&&Nn(d,f)&&!Nn(c,f)&&(m.top-f.top)/(m.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(l=Fd(m,d,h,o.options)),Nn(f,c)||(u.prevFromRect=c,u.prevToRect=f,l||(l=o.options.animation),o.animate(u,m,f,l)),l&&(s=!0,i=Math.max(i,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(e),s?e=setTimeout(function(){typeof n=="function"&&n()},i):typeof n=="function"&&n(),r=[]},animate:function(n,o,s,i){if(i){ge(n,"transition",""),ge(n,"transform","");var a=ur(this.el),l=a&&a.a,u=a&&a.d,c=(o.left-s.left)/(l||1),f=(o.top-s.top)/(u||1);n.animatingX=!!c,n.animatingY=!!f,ge(n,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=Ld(n),ge(n,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),ge(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){ge(n,"transition",""),ge(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},i)}}}}function Ld(r){return r.offsetWidth}function Fd(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var or=[],_n={initializeByDefault:!0},Pr={mount:function(e){for(var t in _n)_n.hasOwnProperty(t)&&!(t in e)&&(e[t]=_n[t]);or.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),or.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var s=e+"Global";or.forEach(function(i){!t[i.pluginName]||(t[i.pluginName][s]&&t[i.pluginName][s](Ft({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](Ft({sortable:t},n)))})},initializePlugins:function(e,t,n,o){or.forEach(function(a){var l=a.pluginName;if(!(!e.options[l]&&!a.initializeByDefault)){var u=new a(e,t,e.options);u.sortable=e,u.options=e.options,e[l]=u,Ut(n,u.defaults)}});for(var s in e.options)if(!!e.options.hasOwnProperty(s)){var i=this.modifyOption(e,s,e.options[s]);typeof i<"u"&&(e.options[s]=i)}},getEventProperties:function(e,t){var n={};return or.forEach(function(o){typeof o.eventProperties=="function"&&Ut(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return or.forEach(function(s){!e[s.pluginName]||s.optionListeners&&typeof s.optionListeners[t]=="function"&&(o=s.optionListeners[t].call(e[s.pluginName],n))}),o}};function Rd(r){var e=r.sortable,t=r.rootEl,n=r.name,o=r.targetEl,s=r.cloneEl,i=r.toEl,a=r.fromEl,l=r.oldIndex,u=r.newIndex,c=r.oldDraggableIndex,f=r.newDraggableIndex,d=r.originalEvent,h=r.putSortable,m=r.extraEventProperties;if(e=e||t&&t[gt],!!e){var v,y=e.options,w="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!zt&&!Or?v=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(n,!0,!0)),v.to=i||t,v.from=a||t,v.item=o||t,v.clone=s,v.oldIndex=l,v.newIndex=u,v.oldDraggableIndex=c,v.newDraggableIndex=f,v.originalEvent=d,v.pullMode=h?h.lastPutMode:void 0;var x=Ft(Ft({},m),Pr.getEventProperties(n,e));for(var D in x)v[D]=x[D];t&&t.dispatchEvent(v),y[w]&&y[w].call(e,v)}}var Od=["evt"],ht=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,s=Ed(n,Od);Pr.pluginEvent.bind(ve)(e,t,Ft({dragEl:ee,parentEl:Xe,ghostEl:we,rootEl:qe,nextEl:Qt,lastDownEl:Jr,cloneEl:Ze,cloneHidden:Gt,dragStarted:Ar,putSortable:it,activeSortable:ve.active,originalEvent:o,oldIndex:lr,oldDraggableIndex:Lr,newIndex:mt,newDraggableIndex:Vt,hideGhostForTarget:To,unhideGhostForTarget:Io,cloneNowHidden:function(){Gt=!0},cloneNowShown:function(){Gt=!1},dispatchSortableEvent:function(a){ct({sortable:t,name:a,originalEvent:o})}},s))};function ct(r){Rd(Ft({putSortable:it,cloneEl:Ze,targetEl:ee,rootEl:qe,oldIndex:lr,oldDraggableIndex:Lr,newIndex:mt,newDraggableIndex:Vt},r))}var ee,Xe,we,qe,Qt,Jr,Ze,Gt,lr,mt,Lr,Vt,Yr,it,ar=!1,on=!1,sn=[],Xt,Ct,Bn,$n,po,mo,Ar,sr,Fr,Rr=!1,Kr=!1,en,lt,Un=[],Vn=!1,an=[],un=typeof document<"u",Xr=yo,go=Or||zt?"cssFloat":"float",Pd=un&&!Cd&&!yo&&"draggable"in document.createElement("div"),Co=function(){if(!!un){if(zt)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Ao=function(e,t){var n=ge(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),s=cr(e,0,t),i=cr(e,1,t),a=s&&ge(s),l=i&&ge(i),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+tt(s).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+tt(i).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var f=a.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&n[go]==="none"||i&&n[go]==="none"&&u+c>o)?"vertical":"horizontal"},Md=function(e,t,n){var o=n?e.left:e.top,s=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,u=n?t.width:t.height;return o===a||s===l||o+i/2===a+u/2},Nd=function(e,t){var n;return sn.some(function(o){var s=o[gt].options.emptyInsertThreshold;if(!(!s||Kn(o))){var i=tt(o),a=e>=i.left-s&&e<=i.right+s,l=t>=i.top-s&&t<=i.bottom+s;if(a&&l)return n=o}}),n},ko=function(e){function t(s,i){return function(a,l,u,c){var f=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(i||f))return!0;if(s==null||s===!1)return!1;if(i&&s==="clone")return s;if(typeof s=="function")return t(s(a,l,u,c),i)(a,l,u,c);var d=(i?a:l).options.group.name;return s===!0||typeof s=="string"&&s===d||s.join&&s.indexOf(d)>-1}}var n={},o=e.group;(!o||Qr(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},To=function(){!Co&&we&&ge(we,"display","none")},Io=function(){!Co&&we&&ge(we,"display","")};un&&document.addEventListener("click",function(r){if(on)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),on=!1,!1},!0);var Zt=function(e){if(ee){e=e.touches?e.touches[0]:e;var t=Nd(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[gt]._onDragOver(n)}}},_d=function(e){ee&&ee.parentNode[gt]._isOutsideThisEl(e.target)};function ve(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Ut({},e),r[gt]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ao(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,a){i.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ve.supportPointer!==!1&&"PointerEvent"in window&&!Ir,emptyInsertThreshold:5};Pr.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);ko(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:Pd,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Me(r,"pointerdown",this._onTapStart):(Me(r,"mousedown",this._onTapStart),Me(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Me(r,"dragover",this),Me(r,"dragenter",this)),sn.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Ut(this,Dd())}ve.prototype={constructor:ve,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(sr=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,ee):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var t=this,n=this.el,o=this.options,s=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(Vd(n),!ee&&!(/mousedown|pointerdown/.test(i)&&e.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Ir&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Dt(l,o.draggable,n,!1),!(l&&l.animated)&&Jr!==l)){if(lr=xt(l),Lr=xt(l,o.draggable),typeof c=="function"){if(c.call(this,e,l,this)){ct({sortable:t,rootEl:u,name:"filter",targetEl:l,toEl:n,fromEl:n}),ht("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=Dt(u,f.trim(),n,!1),f)return ct({sortable:t,rootEl:f,name:"filter",targetEl:l,fromEl:n,toEl:n}),ht("filter",t,{evt:e}),!0}),c)){s&&e.cancelable&&e.preventDefault();return}o.handle&&!Dt(u,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o=this,s=o.el,i=o.options,a=s.ownerDocument,l;if(n&&!ee&&n.parentNode===s){var u=tt(n);if(qe=s,ee=n,Xe=ee.parentNode,Qt=ee.nextSibling,Jr=n,Yr=i.group,ve.dragged=ee,Xt={target:ee,clientX:(t||e).clientX,clientY:(t||e).clientY},po=Xt.clientX-u.left,mo=Xt.clientY-u.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,ee.style["will-change"]="all",l=function(){if(ht("delayEnded",o,{evt:e}),ve.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!uo&&o.nativeDraggable&&(ee.draggable=!0),o._triggerDragStart(e,t),ct({sortable:o,name:"choose",originalEvent:e}),pt(ee,i.chosenClass,!0)},i.ignore.split(",").forEach(function(c){xo(ee,c.trim(),zn)}),Me(a,"dragover",Zt),Me(a,"mousemove",Zt),Me(a,"touchmove",Zt),Me(a,"mouseup",o._onDrop),Me(a,"touchend",o._onDrop),Me(a,"touchcancel",o._onDrop),uo&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ee.draggable=!0),ht("delayStart",this,{evt:e}),i.delay&&(!i.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Or||zt))){if(ve.eventCanceled){this._onDrop();return}Me(a,"mouseup",o._disableDelayedDrag),Me(a,"touchend",o._disableDelayedDrag),Me(a,"touchcancel",o._disableDelayedDrag),Me(a,"mousemove",o._delayedDragTouchMoveHandler),Me(a,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&Me(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ee&&zn(ee),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;Le(e,"mouseup",this._disableDelayedDrag),Le(e,"touchend",this._disableDelayedDrag),Le(e,"touchcancel",this._disableDelayedDrag),Le(e,"mousemove",this._delayedDragTouchMoveHandler),Le(e,"touchmove",this._delayedDragTouchMoveHandler),Le(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Me(document,"pointermove",this._onTouchMove):t?Me(document,"touchmove",this._onTouchMove):Me(document,"mousemove",this._onTouchMove):(Me(ee,"dragend",this),Me(qe,"dragstart",this._onDragStart));try{document.selection?tn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(ar=!1,qe&&ee){ht("dragStarted",this,{evt:t}),this.nativeDraggable&&Me(document,"dragover",_d);var n=this.options;!e&&pt(ee,n.dragClass,!1),pt(ee,n.ghostClass,!0),ve.active=this,e&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ct){this._lastX=Ct.clientX,this._lastY=Ct.clientY,To();for(var e=document.elementFromPoint(Ct.clientX,Ct.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ct.clientX,Ct.clientY),e!==t);)t=e;if(ee.parentNode[gt]._isOutsideThisEl(e),t)do{if(t[gt]){var n=void 0;if(n=t[gt]._onDragOver({clientX:Ct.clientX,clientY:Ct.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Io()}},_onTouchMove:function(e){if(Xt){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,s=e.touches?e.touches[0]:e,i=we&&ur(we,!0),a=we&&i&&i.a,l=we&&i&&i.d,u=Xr&<&&ho(lt),c=(s.clientX-Xt.clientX+o.x)/(a||1)+(u?u[0]-Un[0]:0)/(a||1),f=(s.clientY-Xt.clientY+o.y)/(l||1)+(u?u[1]-Un[1]:0)/(l||1);if(!ve.active&&!ar){if(n&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(we){i?(i.e+=c-(Bn||0),i.f+=f-($n||0)):i={a:1,b:0,c:0,d:1,e:c,f};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");ge(we,"webkitTransform",d),ge(we,"mozTransform",d),ge(we,"msTransform",d),ge(we,"transform",d),Bn=c,$n=f,Ct=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!we){var e=this.options.fallbackOnBody?document.body:qe,t=tt(ee,!0,Xr,!0,e),n=this.options;if(Xr){for(lt=e;ge(lt,"position")==="static"&&ge(lt,"transform")==="none"&<!==document;)lt=lt.parentNode;lt!==document.body&<!==document.documentElement?(lt===document&&(lt=Lt()),t.top+=lt.scrollTop,t.left+=lt.scrollLeft):lt=Lt(),Un=ho(lt)}we=ee.cloneNode(!0),pt(we,n.ghostClass,!1),pt(we,n.fallbackClass,!0),pt(we,n.dragClass,!0),ge(we,"transition",""),ge(we,"transform",""),ge(we,"box-sizing","border-box"),ge(we,"margin",0),ge(we,"top",t.top),ge(we,"left",t.left),ge(we,"width",t.width),ge(we,"height",t.height),ge(we,"opacity","0.8"),ge(we,"position",Xr?"absolute":"fixed"),ge(we,"zIndex","100000"),ge(we,"pointerEvents","none"),ve.ghost=we,e.appendChild(we),ge(we,"transform-origin",po/parseInt(we.style.width)*100+"% "+mo/parseInt(we.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,s=n.options;if(ht("dragStart",this,{evt:e}),ve.eventCanceled){this._onDrop();return}ht("setupClone",this),ve.eventCanceled||(Ze=So(ee),Ze.draggable=!1,Ze.style["will-change"]="",this._hideClone(),pt(Ze,this.options.chosenClass,!1),ve.clone=Ze),n.cloneId=tn(function(){ht("clone",n),!ve.eventCanceled&&(n.options.removeCloneOnHide||qe.insertBefore(Ze,ee),n._hideClone(),ct({sortable:n,name:"clone"}))}),!t&&pt(ee,s.dragClass,!0),t?(on=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Le(document,"mouseup",n._onDrop),Le(document,"touchend",n._onDrop),Le(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(n,o,ee)),Me(document,"drop",n),ge(ee,"transform","translateZ(0)")),ar=!0,n._dragStartId=tn(n._dragStarted.bind(n,t,e)),Me(document,"selectstart",n),Ar=!0,Ir&&ge(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,o,s,i,a=this.options,l=a.group,u=ve.active,c=Yr===l,f=a.sort,d=it||u,h,m=this,v=!1;if(Vn)return;function y(re,be){ht(re,m,Ft({evt:e,isOwner:c,axis:h?"vertical":"horizontal",revert:i,dragRect:o,targetRect:s,canSort:f,fromSortable:d,target:n,completed:x,onMove:function(xe,Fe){return Zr(qe,t,ee,o,xe,tt(xe),e,Fe)},changed:D},be))}function w(){y("dragOverAnimationCapture"),m.captureAnimationState(),m!==d&&d.captureAnimationState()}function x(re){return y("dragOverCompleted",{insertion:re}),re&&(c?u._hideClone():u._showClone(m),m!==d&&(pt(ee,it?it.options.ghostClass:u.options.ghostClass,!1),pt(ee,a.ghostClass,!0)),it!==m&&m!==ve.active?it=m:m===ve.active&&it&&(it=null),d===m&&(m._ignoreWhileAnimating=n),m.animateAll(function(){y("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(n===ee&&!ee.animated||n===t&&!n.animated)&&(sr=null),!a.dragoverBubble&&!e.rootEl&&n!==document&&(ee.parentNode[gt]._isOutsideThisEl(e.target),!re&&Zt(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),v=!0}function D(){mt=xt(ee),Vt=xt(ee,a.draggable),ct({sortable:m,name:"change",toEl:t,newIndex:mt,newDraggableIndex:Vt,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=Dt(n,a.draggable,t,!0),y("dragOver"),ve.eventCanceled)return v;if(ee.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||m._ignoreWhileAnimating===n)return x(!1);if(on=!1,u&&!a.disabled&&(c?f||(i=Xe!==qe):it===this||(this.lastPutMode=Yr.checkPull(this,u,ee,e))&&l.checkPut(this,u,ee,e))){if(h=this._getDirection(e,n)==="vertical",o=tt(ee),y("dragOverValid"),ve.eventCanceled)return v;if(i)return Xe=qe,w(),this._hideClone(),y("revert"),ve.eventCanceled||(Qt?qe.insertBefore(ee,Qt):qe.appendChild(ee)),x(!0);var I=Kn(t,a.draggable);if(!I||zd(e,h,this)&&!I.animated){if(I===ee)return x(!1);if(I&&t===e.target&&(n=I),n&&(s=tt(n)),Zr(qe,t,ee,o,n,s,e,!!n)!==!1)return w(),t.appendChild(ee),Xe=t,D(),x(!0)}else if(I&&Ud(e,h,this)){var N=cr(t,0,a,!0);if(N===ee)return x(!1);if(n=N,s=tt(n),Zr(qe,t,ee,o,n,s,e,!1)!==!1)return w(),t.insertBefore(ee,N),Xe=t,D(),x(!0)}else if(n.parentNode===t){s=tt(n);var S=0,M,L=ee.parentNode!==t,R=!Md(ee.animated&&ee.toRect||o,n.animated&&n.toRect||s,h),O=h?"top":"left",F=fo(n,"top","top")||fo(ee,"top","top"),_=F?F.scrollTop:void 0;sr!==n&&(M=s[O],Rr=!1,Kr=!R&&a.invertSwap||L),S=jd(e,n,s,h,R?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Kr,sr===n);var j;if(S!==0){var H=xt(ee);do H-=S,j=Xe.children[H];while(j&&(ge(j,"display")==="none"||j===we))}if(S===0||j===n)return x(!1);sr=n,Fr=S;var te=n.nextElementSibling,W=!1;W=S===1;var J=Zr(qe,t,ee,o,n,s,e,W);if(J!==!1)return(J===1||J===-1)&&(W=J===1),Vn=!0,setTimeout($d,30),w(),W&&!te?t.appendChild(ee):n.parentNode.insertBefore(ee,W?te:n),F&&Eo(F,0,_-F.scrollTop),Xe=ee.parentNode,M!==void 0&&!Kr&&(en=Math.abs(M-tt(n)[O])),D(),x(!0)}if(t.contains(ee))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Le(document,"mousemove",this._onTouchMove),Le(document,"touchmove",this._onTouchMove),Le(document,"pointermove",this._onTouchMove),Le(document,"dragover",Zt),Le(document,"mousemove",Zt),Le(document,"touchmove",Zt)},_offUpEvents:function(){var e=this.el.ownerDocument;Le(e,"mouseup",this._onDrop),Le(e,"touchend",this._onDrop),Le(e,"pointerup",this._onDrop),Le(e,"touchcancel",this._onDrop),Le(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(mt=xt(ee),Vt=xt(ee,n.draggable),ht("drop",this,{evt:e}),Xe=ee&&ee.parentNode,mt=xt(ee),Vt=xt(ee,n.draggable),ve.eventCanceled){this._nulling();return}ar=!1,Kr=!1,Rr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Gn(this.cloneId),Gn(this._dragStartId),this.nativeDraggable&&(Le(document,"drop",this),Le(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ir&&ge(document.body,"user-select",""),ge(ee,"transform",""),e&&(Ar&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),we&&we.parentNode&&we.parentNode.removeChild(we),(qe===Xe||it&&it.lastPutMode!=="clone")&&Ze&&Ze.parentNode&&Ze.parentNode.removeChild(Ze),ee&&(this.nativeDraggable&&Le(ee,"dragend",this),zn(ee),ee.style["will-change"]="",Ar&&!ar&&pt(ee,it?it.options.ghostClass:this.options.ghostClass,!1),pt(ee,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:Xe,newIndex:null,newDraggableIndex:null,originalEvent:e}),qe!==Xe?(mt>=0&&(ct({rootEl:Xe,name:"add",toEl:Xe,fromEl:qe,originalEvent:e}),ct({sortable:this,name:"remove",toEl:Xe,originalEvent:e}),ct({rootEl:Xe,name:"sort",toEl:Xe,fromEl:qe,originalEvent:e}),ct({sortable:this,name:"sort",toEl:Xe,originalEvent:e})),it&&it.save()):mt!==lr&&mt>=0&&(ct({sortable:this,name:"update",toEl:Xe,originalEvent:e}),ct({sortable:this,name:"sort",toEl:Xe,originalEvent:e})),ve.active&&((mt==null||mt===-1)&&(mt=lr,Vt=Lr),ct({sortable:this,name:"end",toEl:Xe,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){ht("nulling",this),qe=ee=Xe=we=Qt=Ze=Jr=Gt=Xt=Ct=Ar=mt=Vt=lr=Lr=sr=Fr=it=Yr=ve.dragged=ve.ghost=ve.clone=ve.active=null,an.forEach(function(e){e.checked=!0}),an.length=Bn=$n=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ee&&(this._onDragOver(e),Bd(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,o=0,s=n.length,i=this.options;o<s;o++)t=n[o],Dt(t,i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||qd(t));return e},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(s,i){var a=o.children[i];Dt(a,this.options.draggable,o,!1)&&(n[s]=a)},this),t&&this.captureAnimationState(),e.forEach(function(s){n[s]&&(o.removeChild(n[s]),o.appendChild(n[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Dt(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=Pr.modifyOption(this,e,t);typeof o<"u"?n[e]=o:n[e]=t,e==="group"&&ko(n)},destroy:function(){ht("destroy",this);var e=this.el;e[gt]=null,Le(e,"mousedown",this._onTapStart),Le(e,"touchstart",this._onTapStart),Le(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(Le(e,"dragover",this),Le(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sn.splice(sn.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Gt){if(ht("hideClone",this),ve.eventCanceled)return;ge(Ze,"display","none"),this.options.removeCloneOnHide&&Ze.parentNode&&Ze.parentNode.removeChild(Ze),Gt=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Gt){if(ht("showClone",this),ve.eventCanceled)return;ee.parentNode==qe&&!this.options.group.revertClone?qe.insertBefore(Ze,ee):Qt?qe.insertBefore(Ze,Qt):qe.appendChild(Ze),this.options.group.revertClone&&this.animate(ee,Ze),ge(Ze,"display",""),Gt=!1}}};function Bd(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function Zr(r,e,t,n,o,s,i,a){var l,u=r[gt],c=u.options.onMove,f;return window.CustomEvent&&!zt&&!Or?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=r,l.dragged=t,l.draggedRect=n,l.related=o||e,l.relatedRect=s||tt(e),l.willInsertAfter=a,l.originalEvent=i,r.dispatchEvent(l),c&&(f=c.call(u,l,i)),f}function zn(r){r.draggable=!1}function $d(){Vn=!1}function Ud(r,e,t){var n=tt(cr(t.el,0,t.options,!0)),o=10;return e?r.clientX<n.left-o||r.clientY<n.top&&r.clientX<n.right:r.clientY<n.top-o||r.clientY<n.bottom&&r.clientX<n.left}function zd(r,e,t){var n=tt(Kn(t.el,t.options.draggable)),o=10;return e?r.clientX>n.right+o||r.clientX<=n.right&&r.clientY>n.bottom&&r.clientX>=n.left:r.clientX>n.right&&r.clientY>n.top||r.clientX<=n.right&&r.clientY>n.bottom+o}function jd(r,e,t,n,o,s,i,a){var l=n?r.clientY:r.clientX,u=n?t.height:t.width,c=n?t.top:t.left,f=n?t.bottom:t.right,d=!1;if(!i){if(a&&en<u*o){if(!Rr&&(Fr===1?l>c+u*s/2:l<f-u*s/2)&&(Rr=!0),Rr)d=!0;else if(Fr===1?l<c+en:l>f-en)return-Fr}else if(l>c+u*(1-o)/2&&l<f-u*(1-o)/2)return Hd(e)}return d=d||i,d&&(l<c+u*s/2||l>f-u*s/2)?l>c+u/2?1:-1:0}function Hd(r){return xt(ee)<xt(r)?1:-1}function qd(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function Vd(r){an.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&an.push(n)}}function tn(r){return setTimeout(r,0)}function Gn(r){return clearTimeout(r)}un&&Me(document,"touchmove",function(r){(ve.active||ar)&&r.cancelable&&r.preventDefault()});ve.utils={on:Me,off:Le,css:ge,find:xo,is:function(e,t){return!!Dt(e,t,e,!1)},extend:Td,throttle:wo,closest:Dt,toggleClass:pt,clone:So,index:xt,nextTick:tn,cancelNextTick:Gn,detectDirection:Ao,getChild:cr};ve.get=function(r){return r[gt]};ve.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(ve.utils=Ft(Ft({},ve.utils),n.utils)),Pr.mount(n)})};ve.create=function(r,e){return new ve(r,e)};ve.version=Sd;var Je=[],kr,Wn,Yn=!1,jn,Hn,ln,Tr;function Gd(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Me(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Me(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Me(document,"touchmove",this._handleFallbackAutoScroll):Me(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?Le(document,"dragover",this._handleAutoScroll):(Le(document,"pointermove",this._handleFallbackAutoScroll),Le(document,"touchmove",this._handleFallbackAutoScroll),Le(document,"mousemove",this._handleFallbackAutoScroll)),vo(),rn(),Id()},nulling:function(){ln=Wn=kr=Yn=Tr=jn=Hn=null,Je.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var o=this,s=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,a=document.elementFromPoint(s,i);if(ln=t,n||this.options.forceAutoScrollFallback||Or||zt||Ir){qn(t,this.options,a,n);var l=Wt(a,!0);Yn&&(!Tr||s!==jn||i!==Hn)&&(Tr&&vo(),Tr=setInterval(function(){var u=Wt(document.elementFromPoint(s,i),!0);u!==l&&(l=u,rn()),qn(t,o.options,u,n)},10),jn=s,Hn=i)}else{if(!this.options.bubbleScroll||Wt(a,!0)===Lt()){rn();return}qn(t,this.options,Wt(a,!1),!1)}}},Ut(r,{pluginName:"scroll",initializeByDefault:!0})}function rn(){Je.forEach(function(r){clearInterval(r.pid)}),Je=[]}function vo(){clearInterval(Tr)}var qn=wo(function(r,e,t,n){if(!!e.scroll){var o=(r.touches?r.touches[0]:r).clientX,s=(r.touches?r.touches[0]:r).clientY,i=e.scrollSensitivity,a=e.scrollSpeed,l=Lt(),u=!1,c;Wn!==t&&(Wn=t,rn(),kr=e.scroll,c=e.scrollFn,kr===!0&&(kr=Wt(t,!0)));var f=0,d=kr;do{var h=d,m=tt(h),v=m.top,y=m.bottom,w=m.left,x=m.right,D=m.width,I=m.height,N=void 0,S=void 0,M=h.scrollWidth,L=h.scrollHeight,R=ge(h),O=h.scrollLeft,F=h.scrollTop;h===l?(N=D<M&&(R.overflowX==="auto"||R.overflowX==="scroll"||R.overflowX==="visible"),S=I<L&&(R.overflowY==="auto"||R.overflowY==="scroll"||R.overflowY==="visible")):(N=D<M&&(R.overflowX==="auto"||R.overflowX==="scroll"),S=I<L&&(R.overflowY==="auto"||R.overflowY==="scroll"));var _=N&&(Math.abs(x-o)<=i&&O+D<M)-(Math.abs(w-o)<=i&&!!O),j=S&&(Math.abs(y-s)<=i&&F+I<L)-(Math.abs(v-s)<=i&&!!F);if(!Je[f])for(var H=0;H<=f;H++)Je[H]||(Je[H]={});(Je[f].vx!=_||Je[f].vy!=j||Je[f].el!==h)&&(Je[f].el=h,Je[f].vx=_,Je[f].vy=j,clearInterval(Je[f].pid),(_!=0||j!=0)&&(u=!0,Je[f].pid=setInterval(function(){n&&this.layer===0&&ve.active._onTouchMove(ln);var te=Je[this.layer].vy?Je[this.layer].vy*a:0,W=Je[this.layer].vx?Je[this.layer].vx*a:0;typeof c=="function"&&c.call(ve.dragged.parentNode[gt],W,te,r,ln,Je[this.layer].el)!=="continue"||Eo(Je[this.layer].el,W,te)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==l&&(d=Wt(d,!1)));Yn=u}},30),Do=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,s=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(!!t){var u=n||s;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(f)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function Xn(){}Xn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=cr(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Do};Ut(Xn,{pluginName:"revertOnSpill"});function Zn(){}Zn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,o=n||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:Do};Ut(Zn,{pluginName:"removeOnSpill"});ve.mount(new Gd);ve.mount(Zn,Xn);var dr=ve;var Lo={name:function(r,e){let t=r.getAttribute("data-name").trim().toLowerCase(),n=e.getAttribute("data-name").trim().toLowerCase();return t.localeCompare(n)},created:function(r,e){let t=Number(r.getAttribute("data-created"));return Number(e.getAttribute("data-created"))-t},updated:function(r,e){let t=Number(r.getAttribute("data-updated"));return Number(e.getAttribute("data-updated"))-t},chaptersFirst:function(r,e){let t=r.getAttribute("data-type"),n=e.getAttribute("data-type");return t===n?0:t==="chapter"?-1:1},chaptersLast:function(r,e){let t=r.getAttribute("data-type"),n=e.getAttribute("data-type");return t===n?0:t==="chapter"?1:-1}},Fo=class{constructor(e){this.elem=e,this.sortContainer=e.querySelector("[book-sort-boxes]"),this.input=e.querySelector("[book-sort-input]");let t=e.querySelector(".sort-box");this.setupBookSortable(t),this.setupSortPresets(),window.$events.listen("entity-select-confirm",this.bookSelect.bind(this))}setupSortPresets(){let e="",t=!1,n=["name","created","updated"];this.sortContainer.addEventListener("click",o=>{let s=o.target.closest(".sort-box-options [data-sort]");if(!s)return;o.preventDefault();let i=s.closest(".sort-box").querySelectorAll("ul"),a=s.getAttribute("data-sort");t=e===a?!t:!1;let l=Lo[a];t&&n.includes(a)&&(l=function(u,c){return 0-Lo[a](u,c)});for(let u of i)Array.from(u.children).filter(f=>f.matches("li")).sort(l).forEach(f=>{u.appendChild(f)});e=a,this.updateMapInput()})}bookSelect(e){if(this.elem.querySelector(`[data-type="book"][data-id="${e.id}"]`)!==null)return;let n=e.link+"/sort-item";window.$http.get(n).then(o=>{let s=document.createElement("div");s.innerHTML=o.data;let i=s.children[0];this.sortContainer.append(i),this.setupBookSortable(i)})}setupBookSortable(e){let t=[e.querySelector(".sort-list")];t.push(...e.querySelectorAll(".entity-list-item + ul"));let n={name:"book",pull:["book","chapter"],put:["book","chapter"]},o={name:"chapter",pull:["book","chapter"],put:function(s,i,a){return a.getAttribute("data-type")==="page"}};for(let s of t)new dr(s,{group:s.classList.contains("sort-list")?n:o,animation:150,fallbackOnBody:!0,swapThreshold:.65,onSort:this.updateMapInput.bind(this),dragClass:"bg-white",ghostClass:"primary-background-light",multiDrag:!0,multiDragKey:"CTRL",selectedClass:"sortable-selected"})}updateMapInput(){let e=this.buildEntityMap();this.input.value=JSON.stringify(e)}buildEntityMap(){let e=[],t=this.elem.querySelectorAll(".sort-list");for(let n of t){let o=n.closest('[data-type="book"]').getAttribute("data-id"),s=Array.from(n.children).filter(i=>i.matches('[data-type="page"], [data-type="chapter"]'));for(let i=0;i<s.length;i++)this.addBookChildToMap(s[i],i,o,e)}return e}addBookChildToMap(e,t,n,o){let s=e.getAttribute("data-type"),i=!1,a=e.getAttribute("data-id");o.push({id:a,sort:t,parentChapter:i,type:s,book:n});let l=e.querySelectorAll('[data-type="page"]');for(let u=0;u<l.length;u++)o.push({id:l[u].getAttribute("data-id"),sort:u,parentChapter:a,type:"page",book:n})}},Ro=Fo;var cn=new WeakMap;function Oo(r,e=400,t=null){hn(r),r.style.display="block",fn(r,{opacity:["0","1"]},e,()=>{t&&t()})}function dn(r,e=400,t=null){hn(r),fn(r,{opacity:["1","0"]},e,()=>{r.style.display="none",t&&t()})}function fr(r,e=400){hn(r);let t=r.getBoundingClientRect().height,n=getComputedStyle(r),o=n.getPropertyValue("padding-top"),s=n.getPropertyValue("padding-bottom"),i={height:[`${t}px`,"0px"],overflow:["hidden","hidden"],paddingTop:[o,"0px"],paddingBottom:[s,"0px"]};fn(r,i,e,()=>{r.style.display="none"})}function hr(r,e=400){hn(r),r.style.display="block";let t=r.getBoundingClientRect().height,n=getComputedStyle(r),o=n.getPropertyValue("padding-top"),s=n.getPropertyValue("padding-bottom"),i={height:["0px",`${t}px`],overflow:["hidden","hidden"],paddingTop:["0px",o],paddingBottom:["0px",s]};fn(r,i,e)}function fn(r,e,t=400,n=null){let o=Object.keys(e);for(let i of o)r.style[i]=e[i][0];let s=()=>{for(let i of o)r.style[i]=null;r.style.transition=null,r.removeEventListener("transitionend",s),cn.delete(r),n&&n()};setTimeout(()=>{r.style.transition=`all ease-in-out ${t}ms`;for(let i of o)r.style[i]=e[i][1];r.addEventListener("transitionend",s),cn.set(r,s)},15)}function hn(r){cn.has(r)&&cn.get(r)()}var Po=class{constructor(e){this.elem=e,this.isOpen=e.classList.contains("open"),e.addEventListener("click",this.click.bind(this))}open(){let e=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.add("open"),this.elem.setAttribute("aria-expanded","true"),hr(e,240)}close(){let e=this.elem.parentNode.querySelector(".inset-list");this.elem.classList.remove("open"),this.elem.setAttribute("aria-expanded","false"),fr(e,240)}click(e){e.preventDefault(),this.isOpen?this.close():this.open(),this.isOpen=!this.isOpen}},Mo=Po;var No=class{setup(){this.container=this.$refs.container,this.popup=this.$el,this.editorInput=this.$refs.editor,this.languageLinks=this.$manyRefs.languageLink,this.saveButton=this.$refs.saveButton,this.languageInput=this.$refs.languageInput,this.historyDropDown=this.$refs.historyDropDown,this.historyList=this.$refs.historyList,this.callback=null,this.editor=null,this.history={},this.historyKey="code_history",this.setupListeners()}setupListeners(){this.container.addEventListener("keydown",e=>{e.ctrlKey&&e.key==="Enter"&&this.save()}),Ue(this.languageLinks,e=>{let t=e.target.dataset.lang;this.languageInput.value=t,this.updateEditorMode(t)}),Wr(this.languageInput,e=>this.save()),Ue(this.saveButton,e=>this.save()),We(this.historyList,"button","click",(e,t)=>{e.preventDefault();let n=t.dataset.time;this.editor&&this.editor.setValue(this.history[n])})}save(){this.callback&&this.callback(this.editor.getValue(),this.languageInput.value),this.hide()}open(e,t,n){this.languageInput.value=t,this.callback=n,this.show().then(()=>this.updateEditorMode(t)).then(()=>window.importVersioned("code")).then(o=>o.setContent(this.editor,e))}async show(){let e=await window.importVersioned("code");this.editor||(this.editor=e.popupEditor(this.editorInput,this.languageInput.value)),this.loadHistory(),this.popup.components.popup.show(()=>{e.updateLayout(this.editor),this.editor.focus()},()=>{this.addHistory()})}hide(){this.popup.components.popup.hide(),this.addHistory()}async updateEditorMode(e){(await window.importVersioned("code")).setMode(this.editor,e,this.editor.getValue())}loadHistory(){this.history=JSON.parse(window.sessionStorage.getItem(this.historyKey)||"{}");let e=Object.keys(this.history).reverse();this.historyDropDown.classList.toggle("hidden",e.length===0),this.historyList.innerHTML=e.map(t=>{let n=new Date(parseInt(t)).toLocaleTimeString();return`<li><button type="button" data-time="${t}">${n}</button></li>`}).join("")}addHistory(){if(!this.editor)return;let e=this.editor.getValue();if(!e)return;let t=Object.keys(this.history).pop();if(this.history[t]===e)return;this.history[String(Date.now())]=e;let n=JSON.stringify(this.history);window.sessionStorage.setItem(this.historyKey,n)}},_o=No;var Bo=class{constructor(e){e.querySelectorAll("pre").length>0&&window.importVersioned("code").then(n=>{n.highlightWithin(e)})}},$o=Bo;var Uo=class{constructor(e){this.elem=e,this.trigger=e.querySelector("[collapsible-trigger]"),this.content=e.querySelector("[collapsible-content]"),!!this.trigger&&(this.trigger.addEventListener("click",this.toggle.bind(this)),this.openIfContainsError())}open(){this.elem.classList.add("open"),this.trigger.setAttribute("aria-expanded","true"),hr(this.content,300)}close(){this.elem.classList.remove("open"),this.trigger.setAttribute("aria-expanded","false"),fr(this.content,300)}toggle(){this.elem.classList.contains("open")?this.close():this.open()}openIfContainsError(){this.content.querySelector(".text-neg.text-small")&&this.open()}},zo=Uo;var jo=class{constructor(e){this.elem=e,this.checkbox=e.querySelector("input[type=checkbox]"),this.display=e.querySelector('[role="checkbox"]'),this.checkbox.addEventListener("change",this.stateChange.bind(this)),this.elem.addEventListener("keydown",this.onKeyDown.bind(this))}onKeyDown(e){(e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),this.toggle())}toggle(){this.checkbox.checked=!this.checkbox.checked,this.checkbox.dispatchEvent(new Event("change")),this.stateChange()}stateChange(){let e=this.checkbox.checked?"true":"false";this.display.setAttribute("aria-checked",e)}},Ho=jo;var qo=class{constructor(e){this.elem=e,this.dealtWith=!1,e.addEventListener("toggle",this.onToggle.bind(this))}onToggle(){this.dealtWith||(this.elem.querySelector("pre")&&window.importVersioned("code").then(e=>{e.highlightWithin(this.elem)}),this.dealtWith=!0)}},Vo=qo;var Go=class{setup(){this.container=this.$el,this.menu=this.$refs.menu,this.toggle=this.$refs.toggle,this.moveMenu=this.$opts.moveMenu,this.bubbleEscapes=this.$opts.bubbleEscapes==="true",this.direction=document.dir==="rtl"?"right":"left",this.body=document.body,this.showing=!1,this.setupListeners(),this.hide=this.hide.bind(this)}show(e=null){this.hideAll(),this.menu.style.display="block",this.menu.classList.add("anim","menuIn"),this.toggle.setAttribute("aria-expanded","true"),this.moveMenu&&(this.rect=this.menu.getBoundingClientRect(),this.body.appendChild(this.menu),this.menu.style.position="fixed",this.direction==="right"?this.menu.style.right=`${this.rect.right-this.rect.width}px`:this.menu.style.left=`${this.rect.left}px`,this.menu.style.top=`${this.rect.top}px`,this.menu.style.width=`${this.rect.width}px`),this.menu.addEventListener("mouseleave",this.hide.bind(this)),window.addEventListener("click",o=>{this.menu.contains(o.target)||this.hide()});let t=this.menu.querySelector("input");t!==null&&t.focus(),this.showing=!0;let n=new Event("show");this.container.dispatchEvent(n),e&&e.stopPropagation()}hideAll(){for(let e of window.components.dropdown)e.hide()}hide(){this.menu.style.display="none",this.menu.classList.remove("anim","menuIn"),this.toggle.setAttribute("aria-expanded","false"),this.moveMenu&&(this.menu.style.position="",this.menu.style[this.direction]="",this.menu.style.top="",this.menu.style.width="",this.container.appendChild(this.menu)),this.showing=!1}getFocusable(){return Array.from(this.menu.querySelectorAll("[tabindex],[href],button,input:not([type=hidden])"))}focusNext(){let e=this.getFocusable(),n=e.indexOf(document.activeElement)+1;n>=e.length&&(n=0),e[n].focus()}focusPrevious(){let e=this.getFocusable(),n=e.indexOf(document.activeElement)-1;n<0&&(n=e.length-1),e[n].focus()}setupListeners(){this.container.addEventListener("click",t=>{Array.from(this.menu.querySelectorAll("a")).includes(t.target)&&this.hide()}),Ue(this.toggle,t=>{t.stopPropagation(),this.show(t),t instanceof KeyboardEvent&&this.focusNext()});let e=t=>{t.key==="ArrowDown"||t.key==="ArrowRight"?(this.focusNext(),t.preventDefault()):t.key==="ArrowUp"||t.key==="ArrowLeft"?(this.focusPrevious(),t.preventDefault()):t.key==="Escape"&&(this.hide(),this.toggle.focus(),this.bubbleEscapes||t.stopPropagation())};this.container.addEventListener("keydown",e),this.moveMenu&&this.menu.addEventListener("keydown",e),this.menu.addEventListener("keydown ",t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),this.hide())})}},Wo=Go;var Yo=class{setup(){this.elem=this.$el,this.searchInput=this.$refs.searchInput,this.loadingElem=this.$refs.loading,this.listContainerElem=this.$refs.listContainer,this.localSearchSelector=this.$opts.localSearchSelector,this.url=this.$opts.url,this.elem.addEventListener("show",this.onShow.bind(this)),this.searchInput.addEventListener("input",this.onSearch.bind(this)),this.runAjaxSearch=Sr(this.runAjaxSearch,300,!1)}onShow(){this.loadList()}onSearch(){let e=this.searchInput.value.toLowerCase().trim();this.localSearchSelector?this.runLocalSearch(e):(this.toggleLoading(!0),this.listContainerElem.innerHTML="",this.runAjaxSearch(e))}runAjaxSearch(e){this.loadList(e)}runLocalSearch(e){let t=this.listContainerElem.querySelectorAll(this.localSearchSelector);for(let n of t){let o=!e||n.textContent.toLowerCase().includes(e);n.style.display=o?"flex":"none",n.classList.toggle("hidden",!o)}}async loadList(e=""){this.listContainerElem.innerHTML="",this.toggleLoading(!0);try{let t=await window.$http.get(this.getAjaxUrl(e));this.listContainerElem.innerHTML=t.data}catch(t){console.error(t)}this.toggleLoading(!1),this.localSearchSelector&&this.onSearch()}getAjaxUrl(e=null){if(!e)return this.url;let t=this.url.includes("?")?"&":"?";return`${this.url}${t}search=${encodeURIComponent(e)}`}toggleLoading(e=!1){this.loadingElem.style.display=e?"block":"none"}},Ko=Yo;var Zo=jr(Xo());var Qo=class{setup(){this.container=this.$el,this.url=this.$opts.url,this.successMessage=this.$opts.successMessage,this.removeMessage=this.$opts.removeMessage,this.uploadLimit=Number(this.$opts.uploadLimit),this.uploadLimitMessage=this.$opts.uploadLimitMessage,this.timeoutMessage=this.$opts.timeoutMessage;let e=this;this.dz=new Zo.default(this.container,{addRemoveLinks:!0,dictRemoveFile:this.removeMessage,timeout:Number(window.uploadTimeout)||6e4,maxFilesize:this.uploadLimit,url:this.url,withCredentials:!0,init(){this.dz=this,this.dz.on("sending",e.onSending.bind(e)),this.dz.on("success",e.onSuccess.bind(e)),this.dz.on("error",e.onError.bind(e))}})}onSending(e,t,n){let o=window.document.querySelector("meta[name=token]").getAttribute("content");n.append("_token",o),t.ontimeout=s=>{this.dz.emit("complete",e),this.dz.emit("error",e,this.timeoutMessage)}}onSuccess(e,t){this.$emit("success",{file:e,data:t}),this.successMessage&&window.$events.emit("success",this.successMessage),dn(e.previewElement,800,()=>{this.dz.removeFile(e)})}onError(e,t,n){this.$emit("error",{file:e,errorMessage:t,xhr:n});let o=s=>{let i=e.previewElement.querySelector("[data-dz-errormessage]");i.textContent=s};n&&n.status===413?o(this.uploadLimitMessage):t.file&&o(t.file)}removeAll(){this.dz.removeAllFiles(!0)}},Jo=Qo;var es=class{constructor(e){this.elem=e,this.buttons=e.querySelectorAll("[toolbox-tab-button]"),this.contentElements=e.querySelectorAll("[toolbox-tab-content]"),this.toggleButton=e.querySelector("[toolbox-toggle]"),this.toggleButton.addEventListener("click",this.toggle.bind(this)),this.elem.addEventListener("click",t=>{let n=t.target.closest("[toolbox-tab-button]");if(n===null)return;let o=n.getAttribute("toolbox-tab-button");this.setActiveTab(o,!0)}),this.setActiveTab(this.contentElements[0].getAttribute("toolbox-tab-content"))}toggle(){this.elem.classList.toggle("open");let e=this.elem.classList.contains("open")?"true":"false";this.toggleButton.setAttribute("aria-expanded",e)}setActiveTab(e,t=!1){for(let n=0,o=this.buttons.length;n<o;n++)this.buttons[n].classList.remove("active"),this.buttons[n].getAttribute("toolbox-tab-button")===e&&this.buttons[n].classList.add("active");for(let n=0,o=this.contentElements.length;n<o;n++)this.contentElements[n].style.display="none",this.contentElements[n].getAttribute("toolbox-tab-content")===e&&(this.contentElements[n].style.display="block");t&&!this.elem.classList.contains("open")&&this.toggle()}},ts=es;var rs=class{constructor(e){this.permissionsTable=e.querySelector("[permissions-table]"),this.restrictedCheckbox=e.querySelector("[name=restricted]"),this.restrictedCheckbox.addEventListener("change",this.updateTableVisibility.bind(this))}updateTableVisibility(){this.permissionsTable.style.display=this.restrictedCheckbox.checked?null:"none"}},ns=rs;var is=class{setup(){this.entityId=this.$opts.entityId,this.entityType=this.$opts.entityType,this.contentView=this.$refs.contentView,this.searchView=this.$refs.searchView,this.searchResults=this.$refs.searchResults,this.searchInput=this.$refs.searchInput,this.searchForm=this.$refs.searchForm,this.clearButton=this.$refs.clearButton,this.loadingBlock=this.$refs.loadingBlock,this.setupListeners()}setupListeners(){this.searchInput.addEventListener("change",this.runSearch.bind(this)),this.searchForm.addEventListener("submit",e=>{e.preventDefault(),this.runSearch()}),Ue(this.clearButton,this.clearSearch.bind(this))}runSearch(){let e=this.searchInput.value.trim();if(e.length===0)return this.clearSearch();this.searchView.classList.remove("hidden"),this.contentView.classList.add("hidden"),this.loadingBlock.classList.remove("hidden");let t=window.baseUrl(`/search/${this.entityType}/${this.entityId}`);window.$http.get(t,{term:e}).then(n=>{this.searchResults.innerHTML=n.data}).catch(console.error).then(()=>{this.loadingBlock.classList.add("hidden")})}clearSearch(){this.searchView.classList.add("hidden"),this.contentView.classList.remove("hidden"),this.loadingBlock.classList.add("hidden"),this.searchInput.value=""}},os=is;var ss=class{setup(){this.elem=this.$el,this.entityTypes=this.$opts.entityTypes||"page,book,chapter",this.entityPermission=this.$opts.entityPermission||"view",this.input=this.$refs.input,this.searchInput=this.$refs.search,this.loading=this.$refs.loading,this.resultsContainer=this.$refs.results,this.addButton=this.$refs.add,this.search="",this.lastClick=0,this.selectedItemData=null,this.setupListeners(),this.showLoading(),this.initialLoad()}setupListeners(){this.elem.addEventListener("click",this.onClick.bind(this));let e=0;this.searchInput.addEventListener("input",t=>{e=Date.now(),this.showLoading(),setTimeout(()=>{Date.now()-e<199||this.searchEntities(this.searchInput.value)},200)}),this.searchInput.addEventListener("keydown",t=>{t.keyCode===13&&t.preventDefault()}),this.addButton&&this.addButton.addEventListener("click",t=>{this.selectedItemData&&(this.confirmSelection(this.selectedItemData),this.unselectAll())}),We(this.$el,"[data-entity-type]","keydown",(t,n)=>{if(t.ctrlKey&&t.code==="Enter"){let o=this.$el.closest("form");if(o){o.submit(),t.preventDefault();return}}t.code==="ArrowDown"&&this.focusAdjacent(!0),t.code==="ArrowUp"&&this.focusAdjacent(!1)}),this.searchInput.addEventListener("keydown",t=>{t.code==="ArrowDown"&&this.focusAdjacent(!0)})}focusAdjacent(e=!0){let t=Array.from(this.resultsContainer.querySelectorAll("[data-entity-type]")),n=t.indexOf(document.activeElement),o=t[n+(e?1:-1)]||t[0];o&&o.focus()}showLoading(){this.loading.style.display="block",this.resultsContainer.style.display="none"}hideLoading(){this.loading.style.display="none",this.resultsContainer.style.display="block"}initialLoad(){window.$http.get(this.searchUrl()).then(e=>{this.resultsContainer.innerHTML=e.data,this.hideLoading()})}searchUrl(){return`/ajax/search/entities?types=${encodeURIComponent(this.entityTypes)}&permission=${encodeURIComponent(this.entityPermission)}`}searchEntities(e){this.input.value="";let t=`${this.searchUrl()}&term=${encodeURIComponent(e)}`;window.$http.get(t).then(n=>{this.resultsContainer.innerHTML=n.data,this.hideLoading()})}isDoubleClick(){let e=Date.now(),t=e-this.lastClick<300;return this.lastClick=e,t}onClick(e){let t=e.target.closest("[data-entity-type]");t&&(e.preventDefault(),e.stopPropagation(),this.selectItem(t))}selectItem(e){let t=this.isDoubleClick(),n=e.getAttribute("data-entity-type"),o=e.getAttribute("data-entity-id"),s=!e.classList.contains("selected")||t;this.unselectAll(),this.input.value=s?`${n}:${o}`:"";let i=e.getAttribute("href"),a=e.querySelector(".entity-list-item-name").textContent,l={id:Number(o),name:a,link:i};s?(e.classList.add("selected"),this.selectedItemData=l):window.$events.emit("entity-select-change",null),!(!t&&!s)&&(t&&this.confirmSelection(l),s&&window.$events.emit("entity-select-change",l))}confirmSelection(e){window.$events.emit("entity-select-confirm",e)}unselectAll(){let e=this.elem.querySelectorAll(".selected");for(let t of e)t.classList.remove("selected","primary-background");this.selectedItemData=null}},as=ss;var ls=class{setup(){this.elem=this.$el,this.selectButton=this.$refs.select,this.searchInput=this.$refs.searchInput,window.EntitySelectorPopup=this,this.callback=null,this.selection=null,this.selectButton.addEventListener("click",this.onSelectButtonClick.bind(this)),window.$events.listen("entity-select-change",this.onSelectionChange.bind(this)),window.$events.listen("entity-select-confirm",this.onSelectionConfirm.bind(this))}show(e){this.callback=e,this.elem.components.popup.show(),this.searchInput.focus()}hide(){this.elem.components.popup.hide()}onSelectButtonClick(){this.hide(),this.selection!==null&&this.callback&&this.callback(this.selection)}onSelectionConfirm(e){this.hide(),this.callback&&e&&this.callback(e)}onSelectionChange(e){this.selection=e,e===null?this.selectButton.setAttribute("disabled","true"):this.selectButton.removeAttribute("disabled")}},us=ls;var cs=class{setup(){this.container=this.$el,this.name=this.$opts.name,Ue(this.$el,()=>{this.$emit(this.name,this.$opts)})}},ds=cs;var fs=class{constructor(e){this.elem=e,this.isOpen=e.getAttribute("expand-toggle-is-open")==="yes",this.updateEndpoint=e.getAttribute("expand-toggle-update-endpoint"),this.selector=e.getAttribute("expand-toggle"),e.addEventListener("click",this.click.bind(this))}open(e){hr(e,200)}close(e){fr(e,200)}click(e){e.preventDefault();let t=document.querySelectorAll(this.selector);for(let n of t)this.isOpen?this.close(n):this.open(n);this.isOpen=!this.isOpen,this.updateSystemAjax(this.isOpen)}updateSystemAjax(e){window.$http.patch(this.updateEndpoint,{expand:e?"true":"false"})}},hs=fs;var ps=class{setup(){this.elem=this.$el,this.toggleButton=this.$refs.toggle,this.menu=this.$refs.menu,this.open=!1,this.toggleButton.addEventListener("click",this.onToggle.bind(this)),this.onWindowClick=this.onWindowClick.bind(this),this.onKeyDown=this.onKeyDown.bind(this)}onToggle(e){this.open=!this.open,this.menu.classList.toggle("show",this.open),this.toggleButton.setAttribute("aria-expanded",this.open?"true":"false"),this.open?(this.elem.addEventListener("keydown",this.onKeyDown),window.addEventListener("click",this.onWindowClick)):(this.elem.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("click",this.onWindowClick)),e.stopPropagation()}onKeyDown(e){e.code==="Escape"&&this.onToggle(e)}onWindowClick(e){this.onToggle(e)}},ms=ps;var gs=class{constructor(e){this.elem=e,this.typeControl=e.querySelector('[name="setting-app-homepage-type"]'),this.pagePickerContainer=e.querySelector("[page-picker-container]"),this.typeControl.addEventListener("change",this.controlPagePickerVisibility.bind(this)),this.controlPagePickerVisibility()}controlPagePickerVisibility(){let e=this.typeControl.value==="page";this.pagePickerContainer.style.display=e?"block":"none"}},vs=gs;var ys=class{setup(){this.uploadedTo=this.$opts.uploadedTo,this.container=this.$el,this.popupEl=this.$refs.popup,this.searchForm=this.$refs.searchForm,this.searchInput=this.$refs.searchInput,this.cancelSearch=this.$refs.cancelSearch,this.listContainer=this.$refs.listContainer,this.filterTabs=this.$manyRefs.filterTabs,this.selectButton=this.$refs.selectButton,this.formContainer=this.$refs.formContainer,this.dropzoneContainer=this.$refs.dropzoneContainer,this.type="gallery",this.lastSelected={},this.lastSelectedTime=0,this.callback=null,this.resetState=()=>{this.hasData=!1,this.page=1,this.filter="all"},this.resetState(),this.setupListeners(),window.ImageManager=this}setupListeners(){Ue(this.filterTabs,e=>{this.resetAll(),this.filter=e.target.dataset.filter,this.setActiveFilterTab(this.filter),this.loadGallery()}),this.searchForm.addEventListener("submit",e=>{this.resetListView(),this.loadGallery(),e.preventDefault()}),Ue(this.cancelSearch,e=>{this.resetListView(),this.resetSearchView(),this.loadGallery(),this.cancelSearch.classList.remove("active")}),this.searchInput.addEventListener("input",e=>{this.cancelSearch.classList.toggle("active",this.searchInput.value.trim())}),We(this.listContainer,".load-more","click",async e=>{Er(e.target),this.page++,await this.loadGallery(),e.target.remove()}),this.listContainer.addEventListener("event-emit-select-image",this.onImageSelectEvent.bind(this)),this.listContainer.addEventListener("error",e=>{e.target.src=baseUrl("loading_error.png")},!0),Ue(this.selectButton,()=>{this.callback&&this.callback(this.lastSelected),this.hide()}),We(this.formContainer,"#image-manager-delete","click",e=>{this.lastSelected&&this.loadImageEditForm(this.lastSelected.id,!0)}),this.formContainer.addEventListener("ajax-form-success",this.refreshGallery.bind(this)),this.container.addEventListener("dropzone-success",this.refreshGallery.bind(this))}show(e,t="gallery"){this.resetAll(),this.callback=e,this.type=t,this.popupEl.components.popup.show(),this.dropzoneContainer.classList.toggle("hidden",t!=="gallery"),this.hasData||(this.loadGallery(),this.hasData=!0)}hide(){this.popupEl.components.popup.hide()}async loadGallery(){let e={page:this.page,search:this.searchInput.value||null,uploaded_to:this.uploadedTo,filter_type:this.filter==="all"?null:this.filter},{data:t}=await window.$http.get(`images/${this.type}`,e);e.page===1&&(this.listContainer.innerHTML=""),this.addReturnedHtmlElementsToList(t),qi(this.listContainer)}addReturnedHtmlElementsToList(e){let t=document.createElement("div");t.innerHTML=e,window.components.init(t);for(let n of[...t.children])this.listContainer.appendChild(n)}setActiveFilterTab(e){this.filterTabs.forEach(n=>n.classList.remove("selected"));let t=this.filterTabs.find(n=>n.dataset.filter===e);t&&t.classList.add("selected")}resetAll(){this.resetState(),this.resetListView(),this.resetSearchView(),this.resetEditForm(),this.setActiveFilterTab("all"),this.selectButton.classList.add("hidden")}resetSearchView(){this.searchInput.value=""}resetEditForm(){this.formContainer.innerHTML=""}resetListView(){Er(this.listContainer),this.page=1}refreshGallery(){this.resetListView(),this.loadGallery()}onImageSelectEvent(e){let t=JSON.parse(e.detail.data),n=t&&t.id===this.lastSelected.id&&Date.now()-this.lastSelectedTime<400,o=e.target.classList.contains("selected");[...this.listContainer.querySelectorAll(".selected")].forEach(s=>{s.classList.remove("selected")}),o?this.resetEditForm():(e.target.classList.add("selected"),this.loadImageEditForm(t.id)),this.selectButton.classList.toggle("hidden",o),n&&this.callback&&(this.callback(t),this.hide()),this.lastSelected=t,this.lastSelectedTime=Date.now()}async loadImageEditForm(e,t=!1){t||(this.formContainer.innerHTML="");let n=t?{delete:!0}:{},{data:o}=await window.$http.get(`/images/edit/${e}`,n);this.formContainer.innerHTML=o,window.components.init(this.formContainer)}},bs=ys;var xs=class{constructor(e){this.elem=e,this.imageElem=e.querySelector("img"),this.imageInput=e.querySelector("input[type=file]"),this.resetInput=e.querySelector("input[data-reset-input]"),this.removeInput=e.querySelector("input[data-remove-input]"),this.defaultImage=e.getAttribute("data-default-image"),e.querySelector('button[data-action="reset-image"]').addEventListener("click",this.reset.bind(this));let n=e.querySelector('button[data-action="remove-image"]');n&&n.addEventListener("click",this.removeImage.bind(this)),this.imageInput.addEventListener("change",this.fileInputChange.bind(this))}fileInputChange(){this.resetInput.setAttribute("disabled","disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled");for(let e of this.imageInput.files)this.imageElem.src=window.URL.createObjectURL(e);this.imageElem.classList.remove("none")}reset(){this.imageInput.value="",this.imageElem.src=this.defaultImage,this.resetInput.removeAttribute("disabled"),this.removeInput&&this.removeInput.setAttribute("disabled","disabled"),this.imageElem.classList.remove("none")}removeImage(){this.imageInput.value="",this.imageElem.classList.add("none"),this.removeInput.removeAttribute("disabled"),this.resetInput.setAttribute("disabled","disabled")}},ws=xs;var Es=class{constructor(e){this.elem=e,this.menu=e.querySelector("ul"),this.sortInput=e.querySelector('[name="sort"]'),this.orderInput=e.querySelector('[name="order"]'),this.form=e.querySelector("form"),this.menu.addEventListener("click",t=>{t.target.closest("[data-sort-value]")!==null&&this.sortOptionClick(t)}),this.elem.addEventListener("click",t=>{t.target.closest("[data-sort-dir]")!==null&&this.sortDirectionClick(t)})}sortOptionClick(e){let t=e.target.closest("[data-sort-value]");this.sortInput.value=t.getAttribute("data-sort-value"),e.preventDefault(),this.form.submit()}sortDirectionClick(e){let n=this.orderInput.value==="asc"?"desc":"asc";this.orderInput.value=n,e.preventDefault(),this.form.submit()}},Ss=Es;var Nu=jr(ku()),_u=jr(Fu());var Ru=class{constructor(e){this.data=e}hasItems(){return Boolean(this.data)&&Boolean(this.data.types)&&this.data.types.length>0}containsTabularData(){let e=this.data.getData("text/rtf");return e&&e.includes("\\trowd")}getImages(){let e=this.data.types,t=this.data.files,n=[];for(let o of e)if(o.includes("image")){let s=this.data.getData(o);n.push(s.getAsFile())}for(let o of t)o.type.includes("image")&&n.push(o);return n}},$r=Ru;var jt=null,Li,Ii,Di;function hp(r,e,t){Ii=e,Di=t,jt=document.createElement("iframe"),jt.setAttribute("frameborder","0"),window.addEventListener("message",Ou),jt.setAttribute("src",r),jt.setAttribute("class","fullscreen"),jt.style.backgroundColor="#FFFFFF",document.body.appendChild(jt),Li=new URL(r).origin}function pp(){Pu()}function Ou(r){if(!r.data||r.data.length<1||r.origin!==Li)return;let e=JSON.parse(r.data);e.event==="init"?vp():e.event==="exit"?Pu():e.event==="save"?gp(e):e.event==="export"&&mp(e)}function mp(r){Di&&Di(r.data)}function gp(r){Mu({action:"export",format:"xmlpng",xml:r.xml,spin:"Updating drawing"})}function vp(){!Ii||Ii().then(r=>{Mu({action:"load",autosave:1,xml:r})})}function Pu(){window.removeEventListener("message",Ou),jt&&document.body.removeChild(jt)}function Mu(r){jt.contentWindow.postMessage(JSON.stringify(r),Li)}async function yp(r,e){let t={image:r,uploaded_to:e};return(await window.$http.post(window.baseUrl("/images/drawio"),t)).data}async function bp(r){return`data:image/png;base64,${(await window.$http.get(window.baseUrl(`/images/drawio/base64/${r}`))).data.content}`}var vt={show:hp,close:pp,upload:yp,load:bp};var Bu=class{setup(){this.elem=this.$el,this.pageId=this.$opts.pageId,this.textDirection=this.$opts.textDirection,this.imageUploadErrorText=this.$opts.imageUploadErrorText,this.serverUploadLimitText=this.$opts.serverUploadLimitText,this.markdown=new Nu.default({html:!0}),this.markdown.use(_u.default,{label:!0}),this.display=this.elem.querySelector(".markdown-display"),this.displayStylesLoaded=!1,this.input=this.elem.querySelector("textarea"),this.cm=null,this.Code=null;let e=window.importVersioned("code").then(n=>(this.cm=n.markdownEditor(this.input),this.Code=n,this.cm));this.onMarkdownScroll=this.onMarkdownScroll.bind(this);let t=()=>{this.displayDoc=this.display.contentDocument,this.init(e)};this.display.contentDocument.readyState==="complete"?t():this.display.addEventListener("load",t.bind(this)),window.$events.emitPublic(this.elem,"editor-markdown::setup",{markdownIt:this.markdown,displayEl:this.display,codeMirrorInstance:this.cm})}init(e){let t=0;this.displayDoc.addEventListener("click",s=>{let i=Date.now()-t<300,a=s.target.closest("a");if(a!==null){s.preventDefault(),window.open(a.getAttribute("href"));return}let l=s.target.closest("[drawio-diagram]");if(l!==null&&i){this.actionEditDrawing(l);return}t=Date.now()}),this.elem.addEventListener("click",s=>{let i=s.target.closest("button[data-action]");if(i===null)return;let a=i.getAttribute("data-action");if(a==="insertImage"&&this.actionInsertImage(),a==="insertLink"&&this.actionShowLinkSelector(),a==="insertDrawing"&&(s.ctrlKey||s.metaKey)){this.actionShowImageManager();return}a==="insertDrawing"&&this.actionStartDrawing(),a==="fullscreen"&&this.actionFullScreen()}),this.elem.addEventListener("click",s=>{let i=s.target.closest(".editor-toolbar-label");if(!i)return;let a=this.elem.querySelectorAll(".markdown-editor-wrap");for(let l of a)l.classList.remove("active");i.closest(".markdown-editor-wrap").classList.add("active")}),e.then(s=>{this.codeMirrorSetup(s);let i=Sr(()=>this.Code.updateLayout(s),100,!1);new ResizeObserver(i).observe(this.elem)}),this.listenForBookStackEditorEvents();let o=new URL(window.location).searchParams.get("content-text");o&&this.scrollToText(o)}updateAndRender(){let e=this.cm.getValue();this.input.value=e;let t=this.markdown.render(e);window.$events.emit("editor-html-change",t),window.$events.emit("editor-markdown-change",e),this.displayDoc.body.className="page-content",this.displayDoc.body.innerHTML=t,this.loadStylesIntoDisplay()}loadStylesIntoDisplay(){if(this.displayStylesLoaded)return;this.displayDoc.documentElement.classList.add("markdown-editor-display"),document.documentElement.classList.contains("dark-mode")&&(this.displayDoc.documentElement.style.backgroundColor="#222",this.displayDoc.documentElement.classList.add("dark-mode")),this.displayDoc.head.innerHTML="";let e=document.head.querySelectorAll("style,link[rel=stylesheet]");for(let t of e){let n=t.cloneNode(!0);this.displayDoc.head.appendChild(n)}this.displayStylesLoaded=!0}onMarkdownScroll(e){let t=this.displayDoc.body.children;if(t.length<=e)return;(e===-1?t[t.length-1]:t[e]).scrollIntoView({block:"start",inline:"nearest",behavior:"smooth"})}codeMirrorSetup(e){let t=this;e.setOption("direction","ltr");let n=this.Code.getMetaKey(),o={};o[`${n}-Alt-I`]=function(d){let m=`![${d.getSelection()}](http://)`,v=d.getCursor("from");d.replaceSelection(m),d.setCursor(v.line,v.ch+m.length-1)},o[`${n}-S`]=d=>{window.$events.emit("editor-save-draft")},o[`${n}-Enter`]=d=>{window.$events.emit("editor-save-page")},o[`Shift-${n}-K`]=d=>{this.actionShowLinkSelector()},o[`${n}-K`]=d=>{f()},o[`${n}-1`]=d=>{a("##")},o[`${n}-2`]=d=>{a("###")},o[`${n}-3`]=d=>{a("####")},o[`${n}-4`]=d=>{a("#####")},o[`${n}-5`]=d=>{a("")},o[`${n}-d`]=d=>{a("")},o[`${n}-6`]=d=>{a(">")},o[`${n}-q`]=d=>{a(">")},o[`${n}-7`]=d=>{u("\n```\n","\n```")},o[`${n}-8`]=d=>{u("`","`")},o[`Shift-${n}-E`]=d=>{u("`","`")},o[`${n}-9`]=d=>{u('<p class="callout info">',"</p>")},e.setOption("extraKeys",o),e.on("change",(d,h)=>{this.updateAndRender()});let s=Sr(d=>{let h=d.getScrollInfo();if(h.top+h.clientHeight===h.height){this.onMarkdownScroll(-1);return}let v=d.lineAtHeight(h.top,"local"),y=d.getRange({line:0,ch:null},{line:v,ch:null}),D=new DOMParser().parseFromString(this.markdown.render(y),"text/html").documentElement.querySelectorAll("body > *");this.onMarkdownScroll(D.length)},100);e.on("scroll",d=>{s(d)}),e.on("paste",(d,h)=>{let m=new $r(h.clipboardData||h.dataTransfer);if(!m.hasItems()||m.containsTabularData())return;let v=m.getImages();for(let y of v)c(y)}),e.on("drop",(d,h)=>{let m=h.dataTransfer.getData("bookstack/template");if(m){let y=d.coordsChar({left:h.pageX,top:h.pageY});d.setCursor(y),h.preventDefault(),window.$http.get(`/templates/${m}`).then(w=>{let x=w.data.markdown||w.data.html;d.replaceSelection(x)})}let v=new $r(h.dataTransfer);if(v.hasItems()&&v.getImages().length>0){let y=d.coordsChar({left:h.pageX,top:h.pageY});d.setCursor(y),h.stopPropagation(),h.preventDefault();let w=v.getImages();for(let x of w)c(x)}});function i(d,h){let m=e.getValue(),v=e.listSelections();e.setValue(m.replace(d,h)),e.setSelections(v)}function a(d){let h=e.getCursor(),m=e.getLine(h.line),v=m.length,y=m.split(" ")[0];if(y===d){m=m.replace(`${d} `,""),e.replaceRange(m,{line:h.line,ch:0},{line:h.line,ch:v}),e.setCursor({line:h.line,ch:h.ch-(d.length+1)});return}let w=/^[#>`]/.test(y),x=0;w?(x=d.length-y.length,m=m.replace(y,d).trim()):d!==""&&(x=d.length+1,m=d+" "+m),e.replaceRange(m,{line:h.line,ch:0},{line:h.line,ch:v}),e.setCursor({line:h.line,ch:h.ch+x})}function l(d,h){let m=e.getCursor(),v=e.getLine(m.line),y=v.length,w=v;v.indexOf(d)===0&&v.slice(-h.length)===h?w=v.slice(d.length,v.length-h.length):w=`${d}${v}${h}`,e.replaceRange(w,{line:m.line,ch:0},{line:m.line,ch:y}),e.setCursor({line:m.line,ch:m.ch+d.length})}function u(d,h){let m=e.getSelection();if(m==="")return l(d,h);let v=m,y=0,w=0;m.indexOf(d)===0&&m.slice(-h.length)===h?(v=m.slice(d.length,m.length-h.length),w=-(h.length+d.length)):(v=`${d}${m}${h}`,w=d.length+h.length);let x=e.listSelections()[0];e.replaceSelection(v);let D=x.head.ch<=x.anchor.ch;x.head.ch+=D?y:w,x.anchor.ch+=D?w:y,e.setSelections([x])}function c(d){if(d===null||d.type.indexOf("image")!==0)return;let h="png";if(d.name){let N=d.name.match(/\.(.+)$/);N.length>1&&(h=N[1])}let m="image-"+Math.random().toString(16).slice(2),v=window.baseUrl(`/loading.gif#upload${m}`),y=e.getSelection(),w=`![${y}](${v})`,x=e.getCursor();e.replaceSelection(w),e.setCursor({line:x.line,ch:x.ch+y.length+3});let D="image-"+Date.now()+"."+h,I=new FormData;I.append("file",d,D),I.append("uploaded_to",t.pageId),window.$http.post("/images/gallery",I).then(N=>{let S=`[![${y}](${N.data.thumbs.display})](${N.data.url})`;i(w,S)}).catch(N=>{window.$events.emit("error",t.imageUploadErrorText),i(w,y),console.log(N)})}function f(){let d=e.getCursor("from"),h=e.getSelection()||"",m=`[${h}]()`;e.focus(),e.replaceSelection(m);let v=h===""?-3:-1;e.setCursor(d.line,d.ch+m.length+v)}this.updateAndRender()}actionInsertImage(){let e=this.cm.getCursor("from");window.ImageManager.show(t=>{let n=t.thumbs.display||t.url,o=this.cm.getSelection(),s="[!["+(o||t.name)+"]("+n+")]("+t.url+")";this.cm.focus(),this.cm.replaceSelection(s),this.cm.setCursor(e.line,e.ch+s.length)},"gallery")}actionShowImageManager(){let e=this.cm.getCursor("from");window.ImageManager.show(t=>{this.insertDrawing(t,e)},"drawio")}actionShowLinkSelector(){let e=this.cm.getCursor("from");window.EntitySelectorPopup.show(t=>{let o=`[${this.cm.getSelection()||t.name}](${t.link})`;this.cm.focus(),this.cm.replaceSelection(o),this.cm.setCursor(e.line,e.ch+o.length)})}getDrawioUrl(){let e=document.querySelector("[drawio-url]");return e?e.getAttribute("drawio-url"):!1}actionStartDrawing(){let e=this.getDrawioUrl();if(!e)return;let t=this.cm.getCursor("from");vt.show(e,()=>Promise.resolve(""),n=>{let o={image:n,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",o).then(s=>{this.insertDrawing(s.data,t),vt.close()}).catch(s=>{this.handleDrawingUploadError(s)})})}insertDrawing(e,t){let n=`<div drawio-diagram="${e.id}"><img src="${e.url}"></div>`;this.cm.focus(),this.cm.replaceSelection(n),this.cm.setCursor(t.line,t.ch+n.length)}actionEditDrawing(e){let t=this.getDrawioUrl();if(!t)return;let n=this.cm.getCursor("from"),o=e.getAttribute("drawio-diagram");vt.show(t,()=>vt.load(o),s=>{let i={image:s,uploaded_to:Number(this.pageId)};window.$http.post("/images/drawio",i).then(a=>{let l=`<div drawio-diagram="${a.data.id}"><img src="${a.data.url}"></div>`,u=this.cm.getValue().split(`
|
|
`).map(c=>c.indexOf(`drawio-diagram="${o}"`)!==-1?l:c).join(`
|
|
`);this.cm.setValue(u),this.cm.setCursor(n),this.cm.focus(),vt.close()}).catch(a=>{this.handleDrawingUploadError(a)})})}handleDrawingUploadError(e){e.status===413?window.$events.emit("error",this.serverUploadLimitText):window.$events.emit("error",this.imageUploadErrorText),console.log(e)}actionFullScreen(){let e=this.elem.classList.contains("fullscreen");this.elem.classList.toggle("fullscreen",!e),document.body.classList.toggle("markdown-fullscreen",!e)}scrollToText(e){if(!e)return;let n=this.cm.getValue().split(/\r?\n/),o=n.findIndex(s=>s&&s.indexOf(e)!==-1);o!==-1&&(this.cm.scrollIntoView({line:o},200),this.cm.focus(),this.cm.setCursor({line:o,char:n[o].length}))}listenForBookStackEditorEvents(){function e({html:t,markdown:n}){return n||t}window.$events.listen("editor::replace",t=>{let n=e(t);this.cm.setValue(n)}),window.$events.listen("editor::append",t=>{let n=this.cm.getCursor("from"),o=e(t),s=this.cm.getValue()+`
|
|
`+o;this.cm.setValue(s),this.cm.setCursor(n.line,n.ch)}),window.$events.listen("editor::prepend",t=>{let n=this.cm.getCursor("from"),o=e(t),s=o+`
|
|
`+this.cm.getValue();this.cm.setValue(s);let i=o.split(`
|
|
`).length;this.cm.setCursor(n.line+i,n.ch)}),window.$events.listen("editor::insert",t=>{let n=e(t);this.cm.replaceSelection(n)}),window.$events.listen("editor::focus",()=>{this.cm.focus()})}},$u=Bu;var Uu=class{constructor(e){this.elem=e,this.inviteOption=e.querySelector("input[name=send_invite]"),this.inviteOption&&(this.inviteOption.addEventListener("change",this.inviteOptionChange.bind(this)),this.inviteOptionChange())}inviteOptionChange(){let e=this.inviteOption.value==="true",t=this.elem.querySelectorAll("input[type=password]");for(let o of t)o.disabled=e;let n=this.elem.querySelector("#password-input-container");n&&(n.style.display=e?"none":"block")}},zu=Uu;var ju=class{constructor(e){this.elem=e,this.type=e.getAttribute("notification"),this.textElem=e.querySelector("span"),this.autohide=this.elem.hasAttribute("data-autohide"),this.elem.style.display="grid",window.$events.listen(this.type,t=>{this.show(t)}),e.addEventListener("click",this.hide.bind(this)),e.hasAttribute("data-show")&&setTimeout(()=>this.show(this.textElem.textContent),100),this.hideCleanup=this.hideCleanup.bind(this)}show(e=""){if(this.elem.removeEventListener("transitionend",this.hideCleanup),this.textElem.textContent=e,this.elem.style.display="grid",setTimeout(()=>{this.elem.classList.add("showing")},1),this.autohide){let t=e.split(" ").length,n=Math.max(2e3,1e3+250*t);setTimeout(this.hide.bind(this),n)}}hide(){this.elem.classList.remove("showing"),this.elem.addEventListener("transitionend",this.hideCleanup)}hideCleanup(){this.elem.style.display="none",this.elem.removeEventListener("transitionend",this.hideCleanup)}},Hu=ju;var qu=class{setup(){this.removeButton=this.$refs.remove,this.showButton=this.$refs.show,this.input=this.$refs.input,this.setupListeners()}setupListeners(){Ue(this.removeButton,()=>{this.input.value="",this.input.classList.add("hidden"),this.removeButton.classList.add("hidden"),this.showButton.classList.remove("hidden")}),Ue(this.showButton,()=>{this.input.classList.remove("hidden"),this.removeButton.classList.remove("hidden"),this.showButton.classList.add("hidden")})}},Vu=qu;var Gu=class{setup(){this.elem=this.$el,this.pageId=Number(this.$opts.pageId),this.container=this.$refs.commentContainer,this.formContainer=this.$refs.formContainer,this.commentCountBar=this.$refs.commentCountBar,this.addButtonContainer=this.$refs.addButtonContainer,this.replyToRow=this.$refs.replyToRow,this.updatedText=this.$opts.updatedText,this.deletedText=this.$opts.deletedText,this.createdText=this.$opts.createdText,this.countText=this.$opts.countText,this.editingComment=null,this.parentId=null,this.formContainer&&(this.form=this.formContainer.querySelector("form"),this.formInput=this.form.querySelector("textarea"),this.form.addEventListener("submit",this.saveComment.bind(this))),this.elem.addEventListener("click",this.handleAction.bind(this)),this.elem.addEventListener("submit",this.updateComment.bind(this))}handleAction(e){let t=e.target.closest("[action]");if(e.target.matches('a[href^="#"]')){let s=e.target.href.split("#")[1];Cr(document.querySelector("#"+s))}if(t===null)return;e.preventDefault();let n=t.getAttribute("action"),o=t.closest("[comment]");n==="edit"&&this.editComment(o),n==="closeUpdateForm"&&this.closeUpdateForm(),n==="delete"&&this.deleteComment(o),n==="addComment"&&this.showForm(),n==="hideForm"&&this.hideForm(),n==="reply"&&this.setReply(o),n==="remove-reply-to"&&this.removeReplyTo()}closeUpdateForm(){!this.editingComment||(this.editingComment.querySelector("[comment-content]").style.display="block",this.editingComment.querySelector("[comment-edit-container]").style.display="none")}editComment(e){this.hideForm(),this.editingComment&&this.closeUpdateForm(),e.querySelector("[comment-content]").style.display="none",e.querySelector("[comment-edit-container]").style.display="block";let t=e.querySelector("[comment-edit-container] textarea"),n=t.value.split(`
|
|
`).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=document.createElement("div");s.innerHTML=o.data;let i=s.children[0];this.container.appendChild(i),window.components.init(i),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"}},Wu=Gu;var Ku=jr(Yu());var Xu=class{constructor(e){if(this.elem=e,this.pageId=e.getAttribute("page-display"),window.importVersioned("code").then(n=>n.highlight()),this.setupPointer(),this.setupNavHighlighting(),this.setupDetailsCodeBlockRefresh(),window.location.hash){let n=window.location.hash.replace(/\%20/g," ").substr(1);this.goToText(n)}let t=document.querySelector(".sidebar-page-nav");t&&We(t,"a","click",(n,o)=>{n.preventDefault(),window.components["tri-layout"][0].showContent();let s=o.getAttribute("href").substr(1);this.goToText(s),window.history.pushState(null,null,"#"+s)})}goToText(e){let t=document.getElementById(e);if(Vr(".page-content [data-highlighted]",n=>{n.removeAttribute("data-highlighted"),n.style.backgroundColor=null}),t!==null)Cr(t);else{let n=Hi(".page-content > div > *",e);n&&Cr(n)}}setupPointer(){let e=document.getElementById("pointer");if(!e)return;e=e.parentNode.removeChild(e);let t=e.querySelector("div.pointer"),n=!1,o=!1,s=!0,i="";We(e,"input","click",(l,u)=>{u.select(),l.stopPropagation()}),Gr(e,["click","focus"],l=>{l.stopPropagation()}),We(e,"span.icon","click",(l,u)=>{l.stopPropagation(),s=!s,u.querySelector('[data-icon="include"]').style.display=s?"none":"inline",u.querySelector('[data-icon="link"]').style.display=s?"inline":"none",a()}),new Ku.default(e.querySelector("button")),Gr(document.body,["click","focus"],l=>{!n||o||(e=e.parentElement.removeChild(e),n=!1)});let a=l=>{let u=s?window.baseUrl(`/link/${this.pageId}#${i}`):`{{@${this.pageId}#${i}}}`;s&&!u.startsWith("http")&&(u=window.location.protocol+"//"+window.location.host+u),e.querySelector("input").value=u;let c=e.querySelector("#pointer-edit");if(c&&l){let f=c.dataset.editHref,d=l.id,h=l.textContent&&l.textContent.substring(0,50);c.href=`${f}?content-id=${d}&content-text=${encodeURIComponent(h)}`}};Vr('.page-content [id^="bkmrk"]',l=>{Gr(l,["mouseup","keyup"],u=>{u.stopPropagation(),window.getSelection().toString().length!==0&&(i=l.id,a(l),l.parentNode.insertBefore(e,l),e.style.display="block",n=!0,o=!0,requestAnimationFrame(()=>{let f=l.getBoundingClientRect(),d=u.pageX-f.left-164;d<0&&(d=0);let h=d/f.width*100;t.style.left=h+"%",setTimeout(()=>{o=!1},100)}))})})}setupNavHighlighting(){if(!("IntersectionObserver"in window)||!("IntersectionObserverEntry"in window)||!("intersectionRatio"in window.IntersectionObserverEntry.prototype))return;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 u of i)l.observe(u)}function o(i,a){for(let l of i){let u=l.intersectionRatio===1;s(l.target.id,u)}}function s(i,a){Vr('a[href="#'+i+'"]',l=>{l.closest("li").classList.toggle("current-heading",a)})}}setupDetailsCodeBlockRefresh(){let e=n=>{[...n.target.querySelectorAll(".CodeMirror")].forEach(s=>s.CodeMirror&&s.CodeMirror.refresh())};[...this.elem.querySelectorAll("details")].forEach(n=>n.addEventListener("toggle",e))}},Zu=Xu;function Qu(r){let e=new Date(r*1e3),t=e.getHours(),n=e.getMinutes();return`${(t>9?"":"0")+t}:${(n>9?"":"0")+n}`}var Ju=class{setup(){this.draftsEnabled=this.$opts.draftsEnabled==="true",this.editorType=this.$opts.editorType,this.pageId=Number(this.$opts.pageId),this.isNewDraft=this.$opts.pageNewDraft==="true",this.hasDefaultTitle=this.$opts.hasDefaultTitle||!1,this.container=this.$el,this.titleElem=this.$refs.titleContainer.querySelector("input"),this.saveDraftButton=this.$refs.saveDraft,this.discardDraftButton=this.$refs.discardDraft,this.discardDraftWrap=this.$refs.discardDraftWrap,this.draftDisplay=this.$refs.draftDisplay,this.draftDisplayIcon=this.$refs.draftDisplayIcon,this.changelogInput=this.$refs.changelogInput,this.changelogDisplay=this.$refs.changelogDisplay,this.draftText=this.$opts.draftText,this.autosaveFailText=this.$opts.autosaveFailText,this.editingPageText=this.$opts.editingPageText,this.draftDiscardedText=this.$opts.draftDiscardedText,this.setChangelogText=this.$opts.setChangelogText,this.editorHTML="",this.editorMarkdown="",this.autoSave={interval:null,frequency:3e4,last:0},this.shownWarningsCache=new Set,this.pageId!==0&&this.draftsEnabled&&window.setTimeout(()=>{this.startAutoSave()},1e3),this.draftDisplay.innerHTML=this.draftText,this.setupListeners(),this.setInitialFocus()}setupListeners(){window.$events.listen("editor-save-draft",this.saveDraft.bind(this)),window.$events.listen("editor-save-page",this.savePage.bind(this)),window.$events.listen("editor-html-change",e=>{this.editorHTML=e}),window.$events.listen("editor-markdown-change",e=>{this.editorMarkdown=e}),this.changelogInput.addEventListener("change",this.updateChangelogDisplay.bind(this)),Ue(this.saveDraftButton,this.saveDraft.bind(this)),Ue(this.discardDraftButton,this.discardDraft.bind(this))}setInitialFocus(){if(this.hasDefaultTitle)return this.titleElem.select();window.setTimeout(()=>{window.$events.emit("editor::focus","")},500)}startAutoSave(){let e=this.titleElem.value.trim()+"::"+this.editorHTML;this.autoSaveInterval=window.setInterval(()=>{if(Date.now()-this.autoSave.last<this.autoSave.frequency/2)return;let n=this.titleElem.value.trim()+"::"+this.editorHTML;n!==e&&(e=n,this.saveDraft())},this.autoSave.frequency)}savePage(){this.container.closest("form").submit()}async saveDraft(){let e={name:this.titleElem.value.trim(),html:this.editorHTML};this.editorType==="markdown"&&(e.markdown=this.editorMarkdown);try{let t=await window.$http.put(`/ajax/page/${this.pageId}/save-draft`,e);this.isNewDraft||this.toggleDiscardDraftVisibility(!0),this.draftNotifyChange(`${t.data.message} ${Qu(t.data.timestamp)}`),this.autoSave.last=Date.now(),t.data.warning&&!this.shownWarningsCache.has(t.data.warning)&&(window.$events.emit("warning",t.data.warning),this.shownWarningsCache.add(t.data.warning))}catch{try{let n=`draft-save-fail-${new Date().toISOString()}`;window.localStorage.setItem(n,JSON.stringify(e))}catch{}window.$events.emit("error",this.autosaveFailText)}}draftNotifyChange(e){this.draftDisplay.innerText=e,this.draftDisplayIcon.classList.add("visible"),window.setTimeout(()=>{this.draftDisplayIcon.classList.remove("visible")},2e3)}async discardDraft(){let e;try{e=await window.$http.get(`/ajax/page/${this.pageId}`)}catch(t){return console.error(t)}this.autoSave.interval&&window.clearInterval(this.autoSave.interval),this.draftDisplay.innerText=this.editingPageText,this.toggleDiscardDraftVisibility(!1),window.$events.emit("editor::replace",{html:e.data.html,markdown:e.data.markdown}),this.titleElem.value=e.data.name,window.setTimeout(()=>{this.startAutoSave()},1e3),window.$events.emit("success",this.draftDiscardedText)}updateChangelogDisplay(){let e=this.changelogInput.value.trim();e.length===0?e=this.setChangelogText:e.length>16&&(e=e.slice(0,16)+"..."),this.changelogDisplay.innerText=e}toggleDiscardDraftVisibility(e){this.discardDraftWrap.classList.toggle("hidden",!e)}},ec=Ju;var tc=class{constructor(e){this.elem=e,this.input=e.querySelector("input"),this.resetButton=e.querySelector("[page-picker-reset]"),this.selectButton=e.querySelector("[page-picker-select]"),this.display=e.querySelector("[page-picker-display]"),this.defaultDisplay=e.querySelector("[page-picker-default]"),this.buttonSep=e.querySelector("span.sep"),this.value=this.input.value,this.setupListeners()}setupListeners(){this.selectButton.addEventListener("click",this.showPopup.bind(this)),this.display.parentElement.addEventListener("click",this.showPopup.bind(this)),this.resetButton.addEventListener("click",e=>{this.setValue("","")})}showPopup(){window.EntitySelectorPopup.show(e=>{this.setValue(e.id,e.name)})}setValue(e,t){this.value=e,this.input.value=e,this.controlView(t)}controlView(e){let t=this.value&&this.value!==0;if(Dn(this.resetButton,t),Dn(this.buttonSep,t),Dn(this.defaultDisplay,!t),Dn(this.display,t),t){let n=this.getAssetIdFromVal();this.display.textContent=`#${n}, ${e}`,this.display.href=window.baseUrl(`/link/${n}`)}}getAssetIdFromVal(){return Number(this.value)}};function Dn(r,e){let t=r.tagName==="BUTTON"||r.tagName==="SPAN"?"inline-block":"block";r.style.display=e?t:"none"}var rc=tc;var nc=class{constructor(e){this.container=e,e.querySelector("[permissions-table-toggle-all]").addEventListener("click",this.toggleAllClick.bind(this));let n=e.querySelectorAll("[permissions-table-toggle-all-in-row]");for(let s of n)s.addEventListener("click",this.toggleRowClick.bind(this));let o=e.querySelectorAll("[permissions-table-toggle-all-in-column]");for(let s of o)s.addEventListener("click",this.toggleColumnClick.bind(this))}toggleAllClick(e){e.preventDefault(),this.toggleAllInElement(this.container)}toggleRowClick(e){e.preventDefault(),this.toggleAllInElement(e.target.closest("tr"))}toggleColumnClick(e){e.preventDefault();let t=e.target.closest("th,td"),n=Array.from(t.parentElement.children).indexOf(t),o=t.closest("table").querySelectorAll("tr"),s=[];for(let i of o){let a=i.children[n];a&&s.push(...a.querySelectorAll("input[type=checkbox]"))}this.toggleAllInputs(s)}toggleAllInElement(e){let t=e.querySelectorAll("input[type=checkbox]");this.toggleAllInputs(t)}toggleAllInputs(e){let t=e.length>0?e[0].checked:!1;for(let n of e)n.checked=!t,n.dispatchEvent(new Event("change"))}},ic=nc;var oc=class{setup(){this.container=this.$el,this.hideButtons=this.$manyRefs.hide||[],this.onkeyup=null,this.onHide=null,this.setupListeners()}setupListeners(){let e=null;this.container.addEventListener("mousedown",t=>{e=t.target}),this.container.addEventListener("click",t=>{if(t.target===this.container&&e===this.container)return this.hide()}),Ue(this.hideButtons,t=>this.hide())}hide(e=null){dn(this.container,240,e),this.onkeyup&&(window.removeEventListener("keyup",this.onkeyup),this.onkeyup=null),this.onHide&&this.onHide()}show(e=null,t=null){Oo(this.container,240,e),this.onkeyup=n=>{n.key==="Escape"&&this.hide()},window.addEventListener("keyup",this.onkeyup),this.onHide=t}},sc=oc;var ac=class{constructor(e){this.elem=e,this.colorInput=e.querySelector("input[type=color]"),this.lightColorInput=e.querySelector('input[name="setting-app-color-light"]'),this.resetButton=e.querySelector("[setting-app-color-picker-reset]"),this.defaultButton=e.querySelector("[setting-app-color-picker-default]"),this.colorInput.addEventListener("change",this.updateColor.bind(this)),this.colorInput.addEventListener("input",this.updateColor.bind(this)),this.resetButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.current,this.updateColor()}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default,this.updateColor()})}updateColor(){let e=this.colorInput.value,t=this.hexToRgb(e),n="rgba("+[t.r,t.g,t.b,"0.15"].join(",")+")";this.lightColorInput.value=n;let o=document.getElementById("custom-styles"),s=o.getAttribute("data-color"),i=o.getAttribute("data-color-light");o.innerHTML=o.innerHTML.split(s).join(e),o.innerHTML=o.innerHTML.split(i).join(n),o.setAttribute("data-color",e),o.setAttribute("data-color-light",n)}hexToRgb(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return{r:t?parseInt(t[1],16):0,g:t?parseInt(t[2],16):0,b:t?parseInt(t[3],16):0}}},lc=ac;var uc=class{constructor(e){this.elem=e,this.colorInput=e.querySelector("input[type=color]"),this.resetButton=e.querySelector("[setting-color-picker-reset]"),this.defaultButton=e.querySelector("[setting-color-picker-default]"),this.resetButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.current}),this.defaultButton.addEventListener("click",t=>{this.colorInput.value=this.colorInput.dataset.default})}},cc=uc;var dc=class{constructor(e){this.elem=e,this.input=document.getElementById("books-input"),this.shelfBooksList=e.querySelector("[shelf-sort-assigned-books]"),this.initSortable(),this.setupListeners()}initSortable(){let e=this.elem.querySelectorAll(".scroll-box");for(let t of e)new dr(t,{group:"shelf-books",ghostClass:"primary-background-light",animation:150,onSort:this.onChange.bind(this)})}setupListeners(){this.elem.addEventListener("click",e=>{let t=e.target.closest(".scroll-box-item:not(.instruction)");t&&(e.preventDefault(),this.sortItemClick(t))})}sortItemClick(e){let t=this.elem.querySelectorAll(".scroll-box"),n=Array.from(t).filter(o=>e.parentElement!==o);n.length>0&&n[0].appendChild(e),this.onChange()}onChange(){let e=Array.from(this.shelfBooksList.querySelectorAll("[data-id]"));this.input.value=e.map(t=>t.getAttribute("data-id")).join(",")}},fc=dc;var hc=class{constructor(e){this.elem=e,this.toggleElem=e.querySelector(".sidebar-toggle"),this.toggleElem.addEventListener("click",this.toggle.bind(this))}toggle(e=!0){this.elem.classList.toggle("open")}},pc=hc;var mc=class{setup(){this.container=this.$el,this.handleSelector=this.$opts.handleSelector;let e=new dr(this.container,{handle:this.handleSelector,animation:150,onSort:()=>{this.$emit("sort",{ids:e.toArray()})},setData(t,n){let o=n.getAttribute("data-drag-content");if(o){let s=JSON.parse(o);for(let[i,a]of Object.entries(s))t.setData(i,a)}},revertOnSpill:!0,dropBubble:!0,dragoverBubble:!1})}},gc=mc;var vc=class{setup(){this.filter=this.$opts.filter,this.$el.addEventListener("change",e=>{if(this.filter&&!e.target.matches(this.filter))return;let t=this.$el.closest("form");t&&t.submit()})}},yc=vc;var bc=class{setup(){this.tabContentsByName={},this.tabButtonsByName={},this.allContents=[],this.allButtons=[];for(let[e,t]of Object.entries(this.$manyRefs||{})){if(e.startsWith("toggle")){let n=e.replace("toggle","").toLowerCase();Ue(t,o=>this.show(n)),this.allButtons.push(...t),this.tabButtonsByName[n]=t}if(e.startsWith("content")){let n=e.replace("content","").toLowerCase();this.tabContentsByName[n]=t,this.allContents.push(...t)}}}show(e){this.allContents.forEach(o=>{o.classList.add("hidden"),o.classList.remove("selected")}),this.allButtons.forEach(o=>o.classList.remove("selected"));let t=this.tabContentsByName[e]||[],n=this.tabButtonsByName[e]||[];t.length>0&&(t.forEach(o=>{o.classList.remove("hidden"),o.classList.add("selected")}),n.forEach(o=>o.classList.add("selected")))}},xc=bc;var wc=class{setup(){this.addRemoveComponentEl=this.$refs.addRemove,this.container=this.$el,this.rowSelector=this.$opts.rowSelector,this.setupListeners()}setupListeners(){this.container.addEventListener("change",e=>{let t=this.addRemoveComponentEl.components["add-remove-rows"];this.hasEmptyRows()||t.add()})}hasEmptyRows(){return[...this.container.querySelectorAll(this.rowSelector)].find(n=>[...n.querySelectorAll("input")].filter(o=>o.value).length===0)!==void 0}},Ec=wc;var Sc=class{constructor(e){this.elem=e,this.list=e.querySelector("[template-manager-list]"),this.searching=!1,We(this.elem,"[template-action]","click",this.handleTemplateActionClick.bind(this)),We(this.elem,".pagination a","click",this.handlePaginationClick.bind(this)),We(this.elem,".template-item-content","click",this.handleTemplateItemClick.bind(this)),We(this.elem,".template-item","dragstart",this.handleTemplateItemDragStart.bind(this)),this.setupSearchBox()}handleTemplateItemClick(e,t){let n=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(n,"replace")}handleTemplateItemDragStart(e,t){let n=t.closest("[template-id]").getAttribute("template-id");e.dataTransfer.setData("bookstack/template",n),e.dataTransfer.setData("text/plain",n)}handleTemplateActionClick(e,t){e.stopPropagation();let n=t.getAttribute("template-action"),o=t.closest("[template-id]").getAttribute("template-id");this.insertTemplate(o,n)}async insertTemplate(e,t="replace"){let n=await window.$http.get(`/templates/${e}`),o="editor::"+t;window.$events.emit(o,n.data)}async handlePaginationClick(e,t){e.preventDefault();let n=t.getAttribute("href"),o=await window.$http.get(n);this.list.innerHTML=o.data}setupSearchBox(){let e=this.elem.querySelector(".search-box");if(!e)return;let t=e.querySelector("input"),n=e.querySelector("button"),o=e.querySelector("button.search-box-cancel");async function s(){let i=t.value,a=await window.$http.get("/templates",{search:i});o.style.display=i?"block":"none",this.list.innerHTML=a.data}s=s.bind(this),e.addEventListener("keypress",i=>{i.key==="Enter"&&(i.preventDefault(),s())}),n.addEventListener("click",i=>{s()}),o.addEventListener("click",i=>{t.value="",s()})}},Cc=Sc;var Ac=class{constructor(e){this.elem=e,this.input=e.querySelector("input[type=hidden]"),this.checkbox=e.querySelector("input[type=checkbox]"),this.checkbox.addEventListener("change",this.stateChange.bind(this))}stateChange(){this.input.value=this.checkbox.checked?"true":"false";let e=new Event("change");this.input.dispatchEvent(e)}},kc=Ac;var Tc=class{setup(){this.container=this.$refs.container,this.tabs=this.$manyRefs.tab,this.lastLayoutType="none",this.onDestroy=null,this.scrollCache={content:0,info:0},this.lastTabShown="content",this.mobileTabClick=this.mobileTabClick.bind(this),this.updateLayout(),window.addEventListener("resize",e=>{this.updateLayout()},{passive:!0})}updateLayout(){let e="tablet";window.innerWidth<=1e3&&(e="mobile"),window.innerWidth>=1400&&(e="desktop"),e!==this.lastLayoutType&&(this.onDestroy&&(this.onDestroy(),this.onDestroy=null),e==="desktop"?this.setupDesktop():e==="mobile"&&this.setupMobile(),this.lastLayoutType=e)}setupMobile(){for(let e of this.tabs)e.addEventListener("click",this.mobileTabClick);this.onDestroy=()=>{for(let e of this.tabs)e.removeEventListener("click",this.mobileTabClick)}}setupDesktop(){}mobileTabClick(e){let t=e.target.dataset.tab;this.showTab(t)}showContent(){this.showTab("content",!1)}showTab(e,t=!0){this.scrollCache[this.lastTabShown]=document.documentElement.scrollTop;for(let o of this.tabs){let s=o.dataset.tab===e;o.setAttribute("aria-selected",s?"true":"false")}let n=e==="info";if(this.container.classList.toggle("show-info",n),t){let s=document.querySelector("header").getBoundingClientRect().bottom;document.documentElement.scrollTop=this.scrollCache[e]||s,setTimeout(()=>{document.documentElement.scrollTop=this.scrollCache[e]||s},50)}this.lastTabShown=e}},Ic=Tc;var Dc=class{setup(){this.input=this.$refs.input,this.userInfoContainer=this.$refs.userInfo,this.hide=this.$el.components.dropdown.hide,We(this.$el,"a.dropdown-search-item","click",this.selectUser.bind(this))}selectUser(e,t){e.preventDefault();let n=t.getAttribute("data-id");this.input.value=n,this.userInfoContainer.innerHTML=t.innerHTML,this.input.dispatchEvent(new Event("change",{bubbles:!0})),this.hide()}},Lc=Dc;var Fc=class{setup(){this.checkboxes=this.$el.querySelectorAll('input[type="checkbox"]'),this.allCheckbox=this.$el.querySelector('input[type="checkbox"][value="all"]'),this.$el.addEventListener("change",e=>{e.target.checked&&e.target===this.allCheckbox?this.deselectIndividualEvents():e.target.checked&&(this.allCheckbox.checked=!1)})}deselectIndividualEvents(){for(let e of this.checkboxes)e!==this.allCheckbox&&(e.checked=!1)}},Rc=Fc;function Oc(r){for(let e=1;e<5;e++)r.shortcuts.add("meta+"+e,"",["FormatBlock",!1,"h"+(e+1)]);r.shortcuts.add("meta+5","",["FormatBlock",!1,"p"]),r.shortcuts.add("meta+d","",["FormatBlock",!1,"p"]),r.shortcuts.add("meta+6","",["FormatBlock",!1,"blockquote"]),r.shortcuts.add("meta+q","",["FormatBlock",!1,"blockquote"]),r.shortcuts.add("meta+7","",["codeeditor",!1,"pre"]),r.shortcuts.add("meta+e","",["codeeditor",!1,"pre"]),r.shortcuts.add("meta+8","",["FormatBlock",!1,"code"]),r.shortcuts.add("meta+shift+E","",["FormatBlock",!1,"code"]),r.shortcuts.add("meta+S","",()=>{window.$events.emit("editor-save-draft")}),r.shortcuts.add("meta+13","",()=>{window.$events.emit("editor-save-page")}),r.shortcuts.add("meta+9","",function(){let e=r.selection.getNode(),t=e?e.closest(".callout"):null,n=["info","success","warning","danger"],s=(n.findIndex(a=>t&&t.classList.contains(a))+1)%n.length,i=n[s];r.formatter.apply("callout"+i)})}function Pc(r){window.$events.listen("editor::replace",({html:e})=>{r.setContent(e)}),window.$events.listen("editor::append",({html:e})=>{let t=r.getContent()+e;r.setContent(t)}),window.$events.listen("editor::prepend",({html:e})=>{let t=e+r.getContent();r.setContent(t)}),window.$events.listen("editor::insert",({html:e})=>{r.insertContent(e)}),window.$events.listen("editor::focus",()=>{r.initialized&&r.focus()})}function Mc(r){let t=new URL(window.location).searchParams.get("content-id");t&&wp(r,t)}function wp(r,e){let t=r.dom.get(encodeURIComponent(e).replace(/!/g,"%21"));!t||(t.scrollIntoView(),r.selection.select(t,!0),r.selection.collapse(!1),r.focus())}var rr,Ln;function Ep(r){return r&&!!(r.textContent||r.innerText)}function Nc(r,e,t){let n=new $r(t.clipboardData||t.dataTransfer);if(!n.hasItems()||n.containsTabularData())return;let o=n.getImages();for(let s of o){let i="image-"+Math.random().toString(16).slice(2),a=window.baseUrl("/loading.gif");t.preventDefault(),setTimeout(()=>{r.insertContent(`<p><img src="${a}" id="${i}"></p>`),Sp(s,e.pageId).then(l=>{let u=l.name.replace(/"/g,""),c=`<img src="${l.thumbs.display}" alt="${u}" />`,f=r.dom.create("a",{target:"_blank",href:l.url},c);r.dom.replace(f,i)}).catch(l=>{r.dom.remove(i),window.$events.emit("error",e.translations.imageUploadErrorText),console.log(l)})},10)}}async function Sp(r,e){if(r===null||r.type.indexOf("image")!==0)throw new Error("Not an image file");let t="png";if(r.name){let i=r.name.match(/\.(.+)$/);i.length>1&&(t=i[1])}let n="image-"+Date.now()+"."+t,o=new FormData;return o.append("file",r,n),o.append("uploaded_to",e),(await window.$http.post(window.baseUrl("/images/gallery"),o)).data}function Cp(r,e){let t=r.selection.getNode();t.nodeName==="IMG"&&(rr=r.dom.getParent(t,".mceTemp"),!rr&&t.parentNode.nodeName==="A"&&!Ep(t.parentNode)&&(rr=t.parentNode)),t.hasAttribute("contenteditable")&&t.getAttribute("contenteditable")==="false"&&(Ln=t)}function Ap(r,e,t){let n=r.dom,o=tinymce.dom.RangeUtils.getCaretRangeFromPoint(t.clientX,t.clientY,r.getDoc()),s=t.dataTransfer&&t.dataTransfer.getData("bookstack/template");s&&(t.preventDefault(),window.$http.get(`/templates/${s}`).then(i=>{r.selection.setRng(o),r.undoManager.transact(function(){r.execCommand("mceInsertContent",!1,i.data.html)})})),n.getParent(o.startContainer,".mceTemp")?t.preventDefault():rr&&(t.preventDefault(),r.undoManager.transact(function(){r.selection.setRng(o),r.selection.setNode(rr),n.remove(rr)})),!t.isDefaultPrevented()&&Ln&&(t.preventDefault(),r.undoManager.transact(function(){let i=r.selection.getNode(),a=r.selection.getRng(),l=i.closest("body > *");a.startOffset>a.startContainer.length/2?r.$(l).after(Ln):r.$(l).before(Ln)})),t.isDefaultPrevented()||Nc(r,e,t),rr=null}function _c(r,e){r.on("dragstart",()=>Cp(r,e)),r.on("drop",t=>Ap(r,e,t)),r.on("paste",t=>Nc(r,e,t))}function Bc(r){return r.tagName.toLowerCase()==="code-block"}function Uc(r,e,t,n){window.components.first("code-editor").open(e,t,(o,s)=>{n(o,s),r.focus()})}function $c(r,e){Uc(r,e.getContent(),e.getLanguage(),(t,n)=>{e.setContent(t,n)})}function kp(r){let e=r.getDoc(),t=e.defaultView;class n extends t.HTMLElement{constructor(){super();this.attachShadow({mode:"open"});let s=document.createElement("link");s.setAttribute("rel","stylesheet"),s.setAttribute("href",window.baseUrl("/dist/styles.css"));let i=document.createElement("div");i.style.pointerEvents="none",i.contentEditable="false",i.classList.add("CodeMirrorContainer"),this.shadowRoot.append(s,i)}getLanguage(){let s=l=>(l.split(" ").filter(c=>c.startsWith("language-"))[0]||"").replace("language-",""),i=this.querySelector("code"),a=this.querySelector("pre");return s(a.className)||i&&s(i.className)||""}setContent(s,i){this.cm&&importVersioned("code").then(u=>{u.setContent(this.cm,s),u.setMode(this.cm,i,s)});let a=this.querySelector("pre");a||(a=e.createElement("pre"),this.append(a)),a.innerHTML="";let l=e.createElement("code");a.append(l),l.innerText=s,l.className=`language-${i}`}getContent(){let s=this.querySelector("code")||this.querySelector("pre"),i=document.createElement("pre");return i.innerHTML=s.innerHTML.replace().replace(/<br\s*[\/]?>/gi,`
|
|
`).replace(/\ufeff/g,""),i.textContent}connectedCallback(){let s=Date.now();if(this.cm)return;this.cleanChildContent();let i=this.shadowRoot.querySelector(".CodeMirrorContainer"),a=l=>{this.cm=l.wysiwygView(i,this.getContent(),this.getLanguage()),l.updateLayout(this.cm)};window.importVersioned("code").then(l=>{let u=Date.now()-s<20?20:0;setTimeout(()=>a(l),u)})}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 Tp(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.addCommand("codeeditor",()=>{let t=r.selection.getNode(),n=t.ownerDocument;if(Bc(t))$c(r,t);else{let o=r.selection.getContent({format:"text"});Uc(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();Bc(n)&&$c(r,n)}),r.on("PreInit",()=>{r.parser.addNodeFilter("pre",function(t){for(let n of t){let o=new 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.on("PreInit",()=>{kp(r)})}function zc(r){return Tp}var kt=null,ir=null,nr={};function Ri(r){return r.hasAttribute("drawio-diagram")}function Ip(r,e=null){kt=r,ir=e,window.ImageManager.show(function(t){if(e){let n=e.querySelector("img");kt.dom.setAttrib(n,"src",t.url),kt.dom.setAttrib(e,"drawio-diagram",t.id)}else{let n=`<div drawio-diagram="${t.id}" contenteditable="false"><img src="${t.url}"></div>`;kt.insertContent(n)}},"drawio")}function jc(r,e=null){kt=r,ir=e,vt.show(nr.drawioUrl,Lp,Dp)}async function Dp(r){let e="image-"+Math.random().toString(16).slice(2),t=window.baseUrl("/loading.gif"),n=o=>{o.status===413?window.$events.emit("error",nr.translations.serverUploadLimitText):window.$events.emit("error",nr.translations.imageUploadErrorText),console.log(o)};if(ir){vt.close();let o=ir.querySelector("img");try{let s=await vt.upload(r,nr.pageId);kt.dom.setAttrib(o,"src",s.url),kt.dom.setAttrib(ir,"drawio-diagram",s.id)}catch(s){n(s)}return}setTimeout(async()=>{kt.insertContent(`<div drawio-diagram contenteditable="false"><img src="${t}" id="${e}"></div>`),vt.close();try{let o=await vt.upload(r,nr.pageId);kt.dom.setAttrib(e,"src",o.url),kt.dom.get(e).parentNode.setAttribute("drawio-diagram",o.id)}catch(o){kt.dom.remove(e),n(o)}},5)}function Lp(){if(!ir)return Promise.resolve("");let r=ir.getAttribute("drawio-diagram");return vt.load(r)}function Hc(r){return nr=r,function(e,t){e.addCommand("drawio",()=>{let n=e.selection.getNode();jc(e,Ri(n)?n:null)}),e.ui.registry.addIcon("diagram",`<svg width="24" height="24" fill="${nr.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.138v4.794h4.794v-1.598h7.99v1.598h4.794v-4.794h-1.598v-7.99zM4.736 4.443h1.598V6.04H4.736zm1.598 14.382H4.736v-1.598h1.598zm9.588-1.598h-7.99v-1.598H6.334v-7.99h1.598V6.04h7.99v1.598h1.598v7.99h-1.598zm3.196 1.598H17.52v-1.598h1.598zM17.52 6.04V4.443h1.598V6.04zm-4.21 7.19h-2.79l-.582 1.599H8.643l2.717-7.191h1.119l2.724 7.19h-1.302zm-2.43-1.006h2.086l-1.039-3.06z"/></svg>`),e.ui.registry.addSplitButton("drawio",{tooltip:"Insert/edit drawing",icon:"diagram",onAction(){e.execCommand("drawio")},fetch(n){n([{type:"choiceitem",text:"Drawing manager",value:"drawing-manager"}])},onItemAction(n,o){if(o==="drawing-manager"){let s=e.selection.getNode();Ip(e,Ri(s)?s:null)}}}),e.on("dblclick",n=>{let o=e.selection.getNode();!Ri(o)||jc(e,o)}),e.on("SetContent",function(){let n=e.$("body > div[drawio-diagram]");!n.length||e.undoManager.transact(function(){n.each((o,s)=>{s.setAttribute("contenteditable","false")})})})}}function Fp(r,e){r.addCommand("InsertHorizontalRule",function(){let t=document.createElement("hr"),n=r.selection.getNode();n.parentNode.insertBefore(t,n)}),r.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Insert horizontal line",onAction(){r.execCommand("InsertHorizontalRule")}})}function qc(r){return Fp}function Rp(r,e){r.ui.registry.addButton("imagemanager-insert",{title:"Insert image",icon:"image",tooltip:"Insert image",onAction(){window.ImageManager.show(function(t){let n=t.thumbs.display||t.url,o=`<a href="${t.url}" target="_blank">`;o+=`<img src="${n}" alt="${t.name}">`,o+="</a>",r.execCommand("mceInsertContent",!1,o)},"gallery")}})}function Vc(r){return Rp}function Op(r,e){let t={title:"About the WYSIWYG Editor",url:window.baseUrl("/help/wysiwyg")};r.ui.registry.addButton("about",{icon:"help",tooltip:"About the editor",onAction(){tinymce.activeEditor.windowManager.openUrl(t)}})}function Gc(r){return Op}function Pp(r,e){r.ui.registry.addIcon("details",'<svg width="24" height="24"><path d="M8.2 9a.5.5 0 0 0-.4.8l4 5.6a.5.5 0 0 0 .8 0l4-5.6a.5.5 0 0 0-.4-.8ZM20.122 18.151h-16c-.964 0-.934 2.7 0 2.7h16c1.139 0 1.173-2.7 0-2.7zM20.122 3.042h-16c-.964 0-.934 2.7 0 2.7h16c1.139 0 1.173-2.7 0-2.7z"/></svg>'),r.ui.registry.addIcon("togglefold",'<svg height="24" width="24"><path d="M8.12 19.3c.39.39 1.02.39 1.41 0L12 16.83l2.47 2.47c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41l-3.17-3.17c-.39-.39-1.02-.39-1.41 0l-3.17 3.17c-.4.38-.4 1.02-.01 1.41zm7.76-14.6c-.39-.39-1.02-.39-1.41 0L12 7.17 9.53 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.03 0 1.42l3.17 3.17c.39.39 1.02.39 1.41 0l3.17-3.17c.4-.39.4-1.03.01-1.42z"/></svg>'),r.ui.registry.addIcon("togglelabel",'<svg height="18" width="18" viewBox="0 0 24 24"><path d="M21.41,11.41l-8.83-8.83C12.21,2.21,11.7,2,11.17,2H4C2.9,2,2,2.9,2,4v7.17c0,0.53,0.21,1.04,0.59,1.41l8.83,8.83 c0.78,0.78,2.05,0.78,2.83,0l7.17-7.17C22.2,13.46,22.2,12.2,21.41,11.41z M6.5,8C5.67,8,5,7.33,5,6.5S5.67,5,6.5,5S8,5.67,8,6.5 S7.33,8,6.5,8z"/></svg>'),r.ui.registry.addButton("details",{icon:"details",tooltip:"Insert collapsible block",onAction(){r.execCommand("InsertDetailsBlock")}}),r.ui.registry.addButton("removedetails",{icon:"table-delete-table",tooltip:"Unwrap",onAction(){Bp(r)}}),r.ui.registry.addButton("editdetials",{icon:"togglelabel",tooltip:"Edit label",onAction(){Wc(r)}}),r.on("dblclick",t=>{!Fn(r)||t.target.closest("doc-root")||Wc(r)}),r.ui.registry.addButton("toggledetails",{icon:"togglefold",tooltip:"Toggle open/closed",onAction(){Fn(r).toggleAttribute("open"),r.focus()}}),r.addCommand("InsertDetailsBlock",function(){let t=r.selection.getContent({format:"html"}),n=document.createElement("details"),o=document.createElement("summary"),s="details-"+Date.now();n.setAttribute("data-id",s),n.appendChild(o),t||(t="<p><br></p>"),n.innerHTML+=t,r.insertContent(n.outerHTML),r.focus();let i=r.dom.$(`[data-id="${s}"]`);if(i){let a=i.find("doc-root > *");a&&a[0].focus(),i.removeAttr("data-id")}}),r.ui.registry.addContextToolbar("details",{predicate:function(t){return t.nodeName.toLowerCase()==="details"},items:"editdetials toggledetails removedetails",position:"node",scope:"node"}),r.on("PreInit",()=>{$p(r)})}function Wc(r){let e=Fn(r);r.windowManager.open(Np(r)).setData({summary:Mp(e)})}function Fn(r){return r.selection.getNode().closest("details")}function Mp(r){let e=r.querySelector("summary");return e?e.textContent:""}function Np(r){return{title:"Edit collapsible block",body:{type:"panel",items:[{type:"input",name:"summary",label:"Toggle label"}]},buttons:[{type:"cancel",text:"Cancel"},{type:"submit",text:"Save",primary:!0}],onSubmit(e){let{summary:t}=e.getData();_p(r,t),e.close()}}}function _p(r,e){let t=Fn(r);!t||r.undoManager.transact(()=>{let n=t.querySelector("summary");n||(n=document.createElement("summary"),t.prepend(n)),n.textContent=e})}function Bp(r){let e=r.selection.getNode().closest("details"),t=r.selection.getBookmark();if(e){let n=e.querySelectorAll("details > *:not(summary, doc-root), doc-root > *");r.undoManager.transact(()=>{for(let o of n)e.parentNode.insertBefore(o,e);e.remove()})}r.focus(),r.selection.moveToBookmark(t)}function $p(r){r.parser.addNodeFilter("details",function(e){for(let t of e)Up(t)}),r.serializer.addNodeFilter("details",function(e){for(let t of e)Oi(t),t.attr("open",null)}),r.serializer.addNodeFilter("doc-root",function(e){for(let t of e)t.unwrap()})}function Up(r){Oi(r),r.attr("contenteditable","false");let e=tinymce.html.Node.create("doc-root",{contenteditable:"true"});for(let t of r.children())t.name!=="summary"&&e.append(t);r.append(e)}function Oi(r){r.attr("contenteditable",null);let e=!1;for(let t of r.children())t.name==="doc-root"&&(t.unwrap(),e=!0);e&&Oi(r)}function Yc(r){return Pp}var zp=[{title:"Large Header",format:"h2",preview:"color: blue;"},{title:"Medium Header",format:"h3"},{title:"Small Header",format:"h4"},{title:"Tiny Header",format:"h5"},{title:"Paragraph",format:"p",exact:!0,classes:""},{title:"Blockquote",format:"blockquote"},{title:"Callouts",items:[{title:"Information",format:"calloutinfo"},{title:"Success",format:"calloutsuccess"},{title:"Warning",format:"calloutwarning"},{title:"Danger",format:"calloutdanger"}]}],jp={alignleft:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-left"},aligncenter:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-center"},alignright:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",classes:"align-right"},calloutsuccess:{block:"p",exact:!0,attributes:{class:"callout success"}},calloutinfo:{block:"p",exact:!0,attributes:{class:"callout info"}},calloutwarning:{block:"p",exact:!0,attributes:{class:"callout warning"}},calloutdanger:{block:"p",exact:!0,attributes:{class:"callout danger"}}};function Hp(r,e,t){t.filetype==="file"&&window.EntitySelectorPopup.show(n=>{r(n.link,{text:n.name,title:n.name})}),t.filetype==="image"&&window.ImageManager.show(function(n){r(n.url,{alt:n.name})},"gallery")}function qp(r){let e=r.textDirection==="rtl"?"ltr rtl":"",t={formatoverflow:{icon:"more-drawer",tooltip:"More",items:"strikethrough superscript subscript inlinecode removeformat"},listoverflow:{icon:"more-drawer",tooltip:"More",items:"outdent indent"},insertoverflow:{icon:"more-drawer",tooltip:"More",items:"hr codeeditor drawio media details"}};return{toolbar:["undo redo","styleselect","bold italic underline forecolor backcolor formatoverflow","alignleft aligncenter alignright alignjustify","bullist numlist listoverflow",e,"link table imagemanager-insert insertoverflow","code about fullscreen"].filter(o=>Boolean(o)).join(" | "),groupButtons:t}}function Vp(r){let e=["image","imagetools","table","paste","link","autolink","fullscreen","code","customhr","autosave","lists","codeeditor","media","imagemanager","about","details",r.textDirection==="rtl"?"directionality":""];return window.tinymce.PluginManager.add("codeeditor",zc(r)),window.tinymce.PluginManager.add("customhr",qc(r)),window.tinymce.PluginManager.add("imagemanager",Vc(r)),window.tinymce.PluginManager.add("about",Gc(r)),window.tinymce.PluginManager.add("details",Yc(r)),r.drawioUrl&&(window.tinymce.PluginManager.add("drawio",Hc(r)),e.push("drawio")),e.filter(t=>Boolean(t)).join(" ")}function Gp(){let r=document.head.innerHTML.split(`
|
|
`),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 Wp(r){return function(e){e.on("ExecCommand change input NodeChange ObjectResized",t),Pc(e),Oc(e),_c(e,r),e.on("init",()=>{t(),Mc(e),window.editor=e});function t(){let n=e.getContent();r.darkMode&&e.contentDocument.documentElement.classList.add("dark-mode"),window.$events.emit("editor-html-change",n)}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 Yp(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 Kc(r){window.tinymce.addI18n(r.language,r.translationMap);let{toolbar:e,groupButtons:t}=qp(r),n=document.querySelector('script[src*="/dist/app.js"]').getAttribute("src").split("?version=")[1];return{width:"100%",height:"100%",selector:"#html-editor",cache_suffix:"?version="+n,content_css:[window.baseUrl("/dist/styles.css")],branding:!1,skin:r.darkMode?"oxide-dark":"oxide",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[*]",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[code-block]"].join(","),plugins:Vp(r),imagetools_toolbar:"imageoptions",contextmenu:!1,toolbar:e,content_style:Yp(r),style_formats:zp,style_formats_merge:!1,media_alt_source:!1,media_poster:!1,formats:jp,file_picker_types:"file image",file_picker_callback:Hp,paste_preprocess(o,s){s.content.indexOf('<img src="file://')!==-1&&(s.content="")},init_instance_callback(o){let s=o.getDoc().querySelector("head");s.innerHTML+=Gp()},setup(o){for(let[s,i]of Object.entries(t))o.ui.registry.addGroupToolbarButton(s,i);Wp(r)(o)}}}var Xc=class{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=Kc({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)}getDrawIoUrl(){let e=document.querySelector("[drawio-url]");return e?e.getAttribute("drawio-url"):""}},Zc=Xc;var Qc={"add-remove-rows":Ki,"ajax-delete-row":Zi,"ajax-form":Ji,attachments:to,"attachments-list":no,"auto-suggest":oo,"back-to-top":ao,"book-sort":Ro,"chapter-toggle":Mo,"code-editor":_o,"code-highlighter":$o,collapsible:zo,"custom-checkbox":Ho,"details-highlighter":Vo,dropdown:Wo,"dropdown-search":Ko,dropzone:Jo,"editor-toolbox":ts,"entity-permissions-editor":ns,"entity-search":os,"entity-selector":as,"entity-selector-popup":us,"event-emit-select":ds,"expand-toggle":hs,"header-mobile-toggle":ms,"homepage-control":vs,"image-manager":bs,"image-picker":ws,index:Rn,"list-sort-control":Ss,"markdown-editor":$u,"new-user-password":zu,notification:Hu,"optional-input":Vu,"page-comments":Wu,"page-display":Zu,"page-editor":ec,"page-picker":rc,"permissions-table":ic,popup:sc,"setting-app-color-picker":lc,"setting-color-picker":cc,"shelf-sort":fc,sidebar:pc,"sortable-list":gc,"submit-on-change":yc,tabs:xc,"tag-manager":Ec,"template-manager":Cc,"toggle-switch":kc,"tri-layout":Ic,"user-select":Lc,"webhook-events":Rc,"wysiwyg-editor":Zc};window.components={};function Kp(r,e){let t=e.querySelectorAll(`[${r}]`);for(let n=0,o=t.length;n<o;n++)Jc(r,t[n])}function Jc(r,e){let t=Qc[r];if(t===void 0)return;let n;try{n=new t(e),n.$el=e;let o=Xp(r,e);n.$refs=o.refs,n.$manyRefs=o.manyRefs,n.$opts=Zp(r,e),n.$emit=(s,i={})=>{i.from=n;let a=new CustomEvent(`${r}-${s}`,{bubbles:!0,detail:i});n.$el.dispatchEvent(a)},typeof n.setup=="function"&&n.setup()}catch(o){console.error("Failed to create component",o,r,e)}typeof window.components[r]>"u"&&(window.components[r]=[]),window.components[r].push(n),typeof e.components>"u"&&(e.components={}),e.components[r]=n}function Xp(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(u=>u.startsWith(o)).map(u=>u.replace(o,"")).map(ed);for(let u of l)t[u]=a,typeof n[u]>"u"&&(n[u]=[]),n[u].push(a)}return{refs:t,manyRefs:n}}function Zp(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[ed(i)]=s||""}return t}function ed(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 td(r){typeof r>"u"&&(r=document);for(let t of Object.keys(Qc))Kp(t,r);let e=r.querySelectorAll("[component],[components]");for(let t of e){let n=`${t.getAttribute("component")||""} ${t.getAttribute("components")}`.toLowerCase().split(" ").filter(Boolean);for(let o of n)Jc(o,t)}}window.components.init=td;window.components.first=r=>(window.components[r]||[null])[0];var Rn=td;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=Ui;window.$events=Bi;var yr=new ji;window.trans=yr.get.bind(yr);window.trans_choice=yr.getPlural.bind(yr);window.trans_plural=yr.parsePlural.bind(yr);Rn();
|
|
/*!
|
|
* clipboard.js v2.0.10
|
|
* https://clipboardjs.com/
|
|
*
|
|
* Licensed MIT © Zeno Rocha
|
|
*/
|
|
/**!
|
|
* Sortable 1.14.0
|
|
* @author RubaXa <trash@rubaxa.org>
|
|
* @author owenm <owen23355@gmail.com>
|
|
* @license MIT
|
|
*/
|
|
//# sourceMappingURL=app.js.map
|