!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Cherry={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function r(t,e){return t(e={exports:{}},e.exports),e.exports}function i(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var a,o,s=function(t){return t&&t.Math===Math&&t},l=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof e&&e)||s("object"==typeof e&&e)||function(){return this}()||Function("return this")(),u=function(t){try{return!!t()}catch(t){return!0}},h=!u((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=h,d=Function.prototype,A=d.apply,g=d.call,p="object"==typeof Reflect&&Reflect.apply||(f?g.bind(A):function(){return g.apply(A,arguments)}),m=Function.prototype,b=m.call,v=f&&m.bind.bind(b,b),y=f?v:function(t){return function(){return b.apply(t,arguments)}},w=y,k=w({}.toString),C=w("".slice),x=function(t){return C(k(t),8,-1)},E="object"==typeof document&&document.all,T=void 0===E&&void 0!==E?function(t){return"function"==typeof t||t===E}:function(t){return"function"==typeof t},B=!u((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),_=Function.prototype.call,S=f?_.bind(_):function(){return _.apply(_,arguments)},L={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,M=I&&!L.call({1:2},1)?function(t){var e=I(this,t);return!!e&&e.enumerable}:L,O={f:M},D=Object,F=w("".split),N=u((function(){return!D("z").propertyIsEnumerable(0)}))?function(t){return"String"===x(t)?F(t,""):D(t)}:D,P=function(t){return null==t},R=TypeError,Q=N,U=function(t){if(P(t))throw new R("Can't call method on "+t);return t},$=T,H={},j=l,K=function(t){return $(t)?t:void 0},z=w({}.isPrototypeOf),G="undefined"!=typeof navigator&&String(navigator.userAgent)||"",X=j.process,V=j.Deno,W=X&&X.versions||V&&V.version,q=W&&W.v8;q&&(o=(a=q.split("."))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!o&&G&&(!(a=G.match(/Edge\/(\d+)/))||a[1]>=74)&&(a=G.match(/Chrome\/(\d+)/))&&(o=+a[1]);var Y=o,J=j.String,Z=!!Object.getOwnPropertySymbols&&!u((function(){var t=Symbol("symbol detection");return!J(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),tt=Z,et=tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,nt=function(t,e){return arguments.length<2?K(H[t])||K(j[t]):H[t]&&H[t][e]||j[t]&&j[t][e]},rt=z,it=et,at=Object,ot=it?function(t){return"symbol"==typeof t}:function(t){var e=nt("Symbol");return $(e)&&rt(e.prototype,at(t))},st=String,ct=function(t){try{return st(t)}catch(t){return"Object"}},lt=TypeError,ut=function(t){if($(t))return t;throw new lt(ct(t)+" is not a function")},ht=S,ft=function(t){return"object"==typeof t?null!==t:$(t)},dt=TypeError,At=Object.defineProperty,gt=!0,pt=function(t,e){try{At(j,t,{value:e,configurable:!0,writable:!0})}catch(n){j[t]=e}return e},mt=r((function(t){var e="__core-js_shared__",n=t.exports=j[e]||pt(e,{});(n.versions||(n.versions=[])).push({version:"3.37.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),bt=mt,vt=Object,yt=function(t){return vt(U(t))},wt=w({}.hasOwnProperty),kt=Object.hasOwn||function(t,e){return wt(yt(t),e)},Ct=0,xt=Math.random(),Et=w(1..toString),Tt=function(t,e){return bt[t]||(bt[t]=e||{})},Bt=kt,_t=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Et(++Ct+xt,36)},St=j.Symbol,Lt=Tt("wks"),It=it?St.for||St:St&&St.withoutSetter||_t,Mt=ot,Ot=function(t,e){var n=t[e];return P(n)?void 0:ut(n)},Dt=function(t,e){var n,r;if("string"===e&&$(n=t.toString)&&!ft(r=ht(n,t)))return r;if($(n=t.valueOf)&&!ft(r=ht(n,t)))return r;if("string"!==e&&$(n=t.toString)&&!ft(r=ht(n,t)))return r;throw new dt("Can't convert object to primitive value")},Ft=function(t){return Bt(Lt,t)||(Lt[t]=tt&&Bt(St,t)?St[t]:It("Symbol."+t)),Lt[t]},Nt=TypeError,Pt=Ft("toPrimitive"),Rt=function(t,e){if(!ft(t)||Mt(t))return t;var n,r=Ot(t,Pt);if(r){if(void 0===e&&(e="default"),n=ht(r,t,e),!ft(n)||Mt(n))return n;throw new Nt("Can't convert object to primitive value")}return void 0===e&&(e="number"),Dt(t,e)},Qt=j.document,Ut=ft(Qt)&&ft(Qt.createElement),$t=B,Ht=function(t){return Ut?Qt.createElement(t):{}},jt=!$t&&!u((function(){return 7!==Object.defineProperty(Ht("div"),"a",{get:function(){return 7}}).a})),Kt=O,zt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Gt=function(t){return Q(U(t))},Xt=function(t){var e=Rt(t,"string");return Mt(e)?e:e+""},Vt=jt,Wt=Object.getOwnPropertyDescriptor,qt={f:$t?Wt:function(t,e){if(t=Gt(t),e=Xt(e),Vt)try{return Wt(t,e)}catch(t){}if(Bt(t,e))return zt(!ht(Kt.f,t,e),t[e])}},Yt=/#|\.prototype\./,Jt=function(t,e){var n=te[Zt(t)];return n===ne||n!==ee&&($(e)?u(e):!!e)},Zt=Jt.normalize=function(t){return String(t).replace(Yt,".").toLowerCase()},te=Jt.data={},ee=Jt.NATIVE="N",ne=Jt.POLYFILL="P",re=Jt,ie=function(t){if("Function"===x(t))return w(t)},ae=ie(ie.bind),oe=$t&&u((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),se=String,ce=TypeError,le=oe,ue=function(t){if(ft(t))return t;throw new ce(se(t)+" is not an object")},he=TypeError,fe=Object.defineProperty,de=Object.getOwnPropertyDescriptor,Ae="enumerable",ge="configurable",pe="writable",me={f:$t?le?function(t,e,n){if(ue(t),e=Xt(e),ue(n),"function"==typeof t&&"prototype"===e&&"value"in n&&pe in n&&!n[pe]){var r=de(t,e);r&&r[pe]&&(t[e]=n.value,n={configurable:ge in n?n[ge]:r[ge],enumerable:Ae in n?n[Ae]:r[Ae],writable:!1})}return fe(t,e,n)}:fe:function(t,e,n){if(ue(t),e=Xt(e),ue(n),Vt)try{return fe(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new he("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},be=$t?function(t,e,n){return me.f(t,e,zt(1,n))}:function(t,e,n){return t[e]=n,t},ve=p,ye=qt,we=re,ke=function(t,e){return ut(t),void 0===e?t:f?ae(t,e):function(){return t.apply(e,arguments)}},Ce=be,xe=ye.f,Ee=function(t){var e=function(n,r,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,r)}return new t(n,r,i)}return ve(t,this,arguments)};return e.prototype=t.prototype,e},Te=w([].slice),Be=Function,_e=w([].concat),Se=w([].join),Le={},Ie=f?Be.bind:function(t){var e=ut(this),n=e.prototype,r=Te(arguments,1),i=function(){var n=_e(r,Te(arguments));return this instanceof i?function(t,e,n){if(!Bt(Le,e)){for(var r=[],i=0;i0?tn:Ze)(e)},nn=en,rn=function(t){var e=+t;return e!=e||0===e?0:nn(e)},an=Math.max,on=Math.min,sn=Math.min,cn=function(t){var e=rn(t);return e>0?sn(e,9007199254740991):0},ln=function(t,e){var n=rn(t);return n<0?an(n+e,0):on(n,e)},un=function(t){return cn(t.length)},hn=function(t){return function(e,n,r){var i=Gt(e),a=un(i);if(0===a)return!t&&-1;var o,s=ln(r,a);if(t&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((t||s in i)&&i[s]===n)return t||s||0;return!t&&-1}},fn={includes:hn(!0),indexOf:hn(!1)},dn={},An=fn.indexOf,gn=w([].push),pn=function(t,e){var n,r=Gt(t),i=0,a=[];for(n in r)!Bt(dn,n)&&Bt(r,n)&&gn(a,n);for(;e.length>i;)Bt(r,n=e[i++])&&(~An(a,n)||gn(a,n));return a},mn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bn=Object.keys||function(t){return pn(t,mn)},vn=$t&&!le?Object.defineProperties:function(t,e){ue(t);for(var n,r=Gt(e),i=bn(e),a=i.length,o=0;a>o;)me.f(t,n=i[o++],r[n]);return t},yn={f:vn},wn=nt("document","documentElement"),kn=Tt("keys"),Cn=yn,xn=wn,En=function(t){return kn[t]||(kn[t]=_t(t))},Tn="prototype",Bn="script",_n=En("IE_PROTO"),Sn=function(){},Ln=function(t){return"<"+Bn+">"+t+""},In=function(t){t.write(Ln("")),t.close();var e=t.parentWindow.Object;return t=null,e},Mn=function(){try{We=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Mn="undefined"!=typeof document?document.domain&&We?In(We):(e=Ht("iframe"),n="java"+Bn+":",e.style.display="none",xn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Ln("document.F=Object")),t.close(),t.F):In(We);for(var r=mn.length;r--;)delete Mn[Tn][mn[r]];return Mn()};dn[_n]=!0;var On=Object.create||function(t,e){var n;return null!==t?(Sn[Tn]=ue(t),n=new Sn,Sn[Tn]=null,n[_n]=t):n=Mn(),void 0===e?n:Cn.f(n,e)},Dn=function(t,e){var n,r,i,a,o,s,c,l,u,h=t.target,f=t.global,d=t.stat,A=t.proto,g=f?j:d?j[h]:j[h]&&j[h].prototype,p=f?H:H[h]||Ce(H,h,{})[h],m=p.prototype;for(a in e)r=!(n=we(f?a:h+(d?".":"#")+a,t.forced))&&g&&Bt(g,a),s=p[a],r&&(c=t.dontCallGetSet?(u=xe(g,a))&&u.value:g[a]),o=r&&c?c:e[a],(n||A||typeof s!=typeof o)&&(l=t.bind&&r?ke(o,j):t.wrap&&r?Ee(o):A&&$(o)?ie(o):o,(t.sham||o&&o.sham||s&&s.sham)&&Ce(l,"sham",!0),Ce(p,a,l),A&&(Bt(H,i=h+"Prototype")||Ce(H,i,{}),Ce(H[i],a,o),t.real&&m&&(n||!m[a])&&Ce(m,a,o)))},Fn=Ie,Nn=function(t){if(Ye(t))return t;throw new Je(ct(t)+" is not a constructor")},Pn=On,Rn=nt("Reflect","construct"),Qn=Object.prototype,Un=[].push,$n=u((function(){function t(){}return!(Rn((function(){}),[],t)instanceof t)})),Hn=!u((function(){Rn((function(){}))})),jn=$n||Hn;Dn({target:"Reflect",stat:!0,forced:jn,sham:jn},{construct:function(t,e){Nn(t),ue(e);var n=arguments.length<3?t:Nn(arguments[2]);if(Hn&&!$n)return Rn(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return ve(Un,r,e),new(ve(Fn,t,r))}var i=n.prototype,a=Pn(ft(i)?i:Qn),o=ve(t,a,e);return ft(o)?o:a}});var Kn,zn,Gn,Xn=H.Reflect.construct,Vn=Xn,Wn=String,qn=mn.concat("length","prototype"),Yn={f:Object.getOwnPropertyNames||function(t){return pn(t,qn)}},Jn=Yn.f,Zn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tr={f:function(t){return Zn&&"Window"===x(t)?function(t){try{return Jn(t)}catch(t){return Te(Zn)}}(t):Jn(Gt(t))}},er={f:Object.getOwnPropertySymbols},nr={f:Ft},rr=me.f,ir=function(t,e,n,r){return r&&r.enumerable?t[e]=n:Ce(t,e,n),t},ar=Oe?{}.toString:function(){return"[object "+Ue(this)+"]"},or=me.f,sr=Ft("toStringTag"),cr=j.WeakMap,lr=$(cr)&&/native code/.test(String(cr)),ur="Object already initialized",hr=j.TypeError,fr=j.WeakMap;if(lr||bt.state){var dr=bt.state||(bt.state=new fr);dr.get=dr.get,dr.has=dr.has,dr.set=dr.set,Kn=function(t,e){if(dr.has(t))throw new hr(ur);return e.facade=t,dr.set(t,e),e},zn=function(t){return dr.get(t)||{}},Gn=function(t){return dr.has(t)}}else{var Ar=En("state");dn[Ar]=!0,Kn=function(t,e){if(Bt(t,Ar))throw new hr(ur);return e.facade=t,Ce(t,Ar,e),e},zn=function(t){return Bt(t,Ar)?t[Ar]:{}},Gn=function(t){return Bt(t,Ar)}}var gr={set:Kn,get:zn,has:Gn,enforce:function(t){return Gn(t)?zn(t):Kn(t,{})},getterFor:function(t){return function(e){var n;if(!ft(e)||(n=zn(e)).type!==t)throw new hr("Incompatible receiver, "+t+" required");return n}}},pr=Array.isArray||function(t){return"Array"===x(t)},mr=Ft("species"),br=Array,vr=function(t){var e;return pr(t)&&(e=t.constructor,(Ye(e)&&(e===br||pr(e.prototype))||ft(e)&&null===(e=e[mr]))&&(e=void 0)),void 0===e?br:e},yr=function(t,e){return new(vr(t))(0===e?0:e)},wr=w([].push),kr=function(t){var e=1===t,n=2===t,r=3===t,i=4===t,a=6===t,o=7===t,s=5===t||a;return function(c,l,u,h){for(var f,d,A=yt(c),g=Q(A),p=un(g),m=ke(l,u),b=0,v=h||yr,y=e?v(c,p):n||o?v(c,0):void 0;p>b;b++)if((s||b in g)&&(d=m(f=g[b],b,A),t))if(e)y[b]=d;else if(d)switch(t){case 3:return!0;case 5:return f;case 6:return b;case 2:wr(y,f)}else switch(t){case 4:return!1;case 7:wr(y,f)}return a?-1:r||i?i:y}},Cr={forEach:kr(0),map:kr(1),filter:kr(2),some:kr(3),every:kr(4),find:kr(5),findIndex:kr(6),filterReject:kr(7)},xr=function(t){if("Symbol"===Ue(t))throw new TypeError("Cannot convert a Symbol value to a string");return Wn(t)},Er=tr,Tr=er,Br=function(t,e,n){return me.f(t,e,n)},_r=function(t){var e=H.Symbol||(H.Symbol={});Bt(e,t)||rr(e,t,{value:nr.f(t)})},Sr=function(){var t=nt("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,r=Ft("toPrimitive");e&&!e[r]&&ir(e,r,(function(t){return ht(n,this)}),{arity:1})},Lr=function(t,e,n,r){var i=n?t:t&&t.prototype;i&&(Bt(i,sr)||or(i,sr,{configurable:!0,value:e}),r&&!Oe&&Ce(i,"toString",ar))},Ir=gr,Mr=Cr,Or=Mr.forEach,Dr=En("hidden"),Fr="Symbol",Nr="prototype",Pr=Ir.set,Rr=Ir.getterFor(Fr),Qr=Object[Nr],Ur=j.Symbol,$r=Ur&&Ur[Nr],Hr=j.RangeError,jr=j.TypeError,Kr=j.QObject,zr=ye.f,Gr=me.f,Xr=Er.f,Vr=Kt.f,Wr=w([].push),qr=Tt("symbols"),Yr=Tt("op-symbols"),Jr=Tt("wks"),Zr=!Kr||!Kr[Nr]||!Kr[Nr].findChild,ti=function(t,e,n){var r=zr(Qr,e);r&&delete Qr[e],Gr(t,e,n),r&&t!==Qr&&Gr(Qr,e,r)},ei=$t&&u((function(){return 7!==Pn(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?ti:Gr,ni=function(t,e){var n=qr[t]=Pn($r);return Pr(n,{type:Fr,tag:t,description:e}),$t||(n.description=e),n},ri=function(t,e,n){t===Qr&&ri(Yr,e,n),ue(t);var r=Xt(e);return ue(n),Bt(qr,r)?(n.enumerable?(Bt(t,Dr)&&t[Dr][r]&&(t[Dr][r]=!1),n=Pn(n,{enumerable:zt(0,!1)})):(Bt(t,Dr)||Gr(t,Dr,zt(1,Pn(null))),t[Dr][r]=!0),ei(t,r,n)):Gr(t,r,n)},ii=function(t,e){ue(t);var n=Gt(e),r=bn(n).concat(ci(n));return Or(r,(function(e){$t&&!ht(ai,n,e)||ri(t,e,n[e])})),t},ai=function(t){var e=Xt(t),n=ht(Vr,this,e);return!(this===Qr&&Bt(qr,e)&&!Bt(Yr,e))&&(!(n||!Bt(this,e)||!Bt(qr,e)||Bt(this,Dr)&&this[Dr][e])||n)},oi=function(t,e){var n=Gt(t),r=Xt(e);if(n!==Qr||!Bt(qr,r)||Bt(Yr,r)){var i=zr(n,r);return!i||!Bt(qr,r)||Bt(n,Dr)&&n[Dr][r]||(i.enumerable=!0),i}},si=function(t){var e=Xr(Gt(t)),n=[];return Or(e,(function(t){Bt(qr,t)||Bt(dn,t)||Wr(n,t)})),n},ci=function(t){var e=t===Qr,n=Xr(e?Yr:Gt(t)),r=[];return Or(n,(function(t){!Bt(qr,t)||e&&!Bt(Qr,t)||Wr(r,qr[t])})),r};tt||(Ur=function(){if(rt($r,this))throw new jr("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?xr(arguments[0]):void 0,e=_t(t),n=function(t){var r=void 0===this?j:this;r===Qr&&ht(n,Yr,t),Bt(r,Dr)&&Bt(r[Dr],e)&&(r[Dr][e]=!1);var i=zt(1,t);try{ei(r,e,i)}catch(t){if(!(t instanceof Hr))throw t;ti(r,e,i)}};return $t&&Zr&&ei(Qr,e,{configurable:!0,set:n}),ni(e,t)},$r=Ur[Nr],ir($r,"toString",(function(){return Rr(this).tag})),ir(Ur,"withoutSetter",(function(t){return ni(_t(t),t)})),Kt.f=ai,me.f=ri,Cn.f=ii,ye.f=oi,Yn.f=Er.f=si,Tr.f=ci,nr.f=function(t){return ni(Ft(t),t)},$t&&Br($r,"description",{configurable:!0,get:function(){return Rr(this).description}})),Dn({global:!0,constructor:!0,wrap:!0,forced:!tt,sham:!tt},{Symbol:Ur}),Or(bn(Jr),(function(t){_r(t)})),Dn({target:Fr,stat:!0,forced:!tt},{useSetter:function(){Zr=!0},useSimple:function(){Zr=!1}}),Dn({target:"Object",stat:!0,forced:!tt,sham:!$t},{create:function(t,e){return void 0===e?Pn(t):ii(Pn(t),e)},defineProperty:ri,defineProperties:ii,getOwnPropertyDescriptor:oi}),Dn({target:"Object",stat:!0,forced:!tt},{getOwnPropertyNames:si}),Sr(),Lr(Ur,Fr),dn[Dr]=!0;var li=tt&&!!Symbol.for&&!!Symbol.keyFor,ui=Tt("string-to-symbol-registry"),hi=Tt("symbol-to-string-registry");Dn({target:"Symbol",stat:!0,forced:!li},{for:function(t){var e=xr(t);if(Bt(ui,e))return ui[e];var n=nt("Symbol")(e);return ui[e]=n,hi[n]=e,n}});var fi=Tt("symbol-to-string-registry");Dn({target:"Symbol",stat:!0,forced:!li},{keyFor:function(t){if(!Mt(t))throw new TypeError(ct(t)+" is not a symbol");if(Bt(fi,t))return fi[t]}});var di=w([].push),Ai=function(t){if($(t))return t;if(pr(t)){for(var e=t.length,n=[],r=0;r=51||!u((function(){var e=[];return(e.constructor={})[Mi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Di=Mr.filter,Fi=Oi("filter");Dn({target:"Array",proto:!0,forced:!Fi},{filter:function(t){return Di(this,t,arguments.length>1?arguments[1]:void 0)}});var Ni=function(t,e){var n=H[t+"Prototype"],r=n&&n[e];if(r)return r;var i=j[t],a=i&&i.prototype;return a&&a[e]},Pi=Ni("Array","filter"),Ri=Array.prototype,Qi=function(t){var e=t.filter;return t===Ri||rt(Ri,t)&&e===Ri.filter?Pi:e},Ui=ye.f,$i=!$t||u((function(){Ui(1)}));Dn({target:"Object",stat:!0,forced:$i,sham:!$t},{getOwnPropertyDescriptor:function(t,e){return Ui(Gt(t),e)}});var Hi=r((function(t){var e=H.Object,n=t.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};e.getOwnPropertyDescriptor.sham&&(n.sham=!0)})),ji=Hi,Ki=ji,zi=w([].concat),Gi=nt("Reflect","ownKeys")||function(t){var e=Yn.f(ue(t)),n=Tr.f;return n?zi(e,n(t)):e},Xi=Gi,Vi=function(t,e,n){$t?me.f(t,e,zt(0,n)):t[e]=n};Dn({target:"Object",stat:!0,sham:!$t},{getOwnPropertyDescriptors:function(t){for(var e,n,r=Gt(t),i=ye.f,a=Xi(r),o={},s=0;a.length>s;)void 0!==(n=i(r,e=a[s++]))&&Vi(o,e,n);return o}});var Wi=H.Object.getOwnPropertyDescriptors,qi=Cn.f;Dn({target:"Object",stat:!0,forced:Object.defineProperties!==qi,sham:!$t},{defineProperties:qi});var Yi=r((function(t){var e=H.Object,n=t.exports=function(t,n){return e.defineProperties(t,n)};e.defineProperties.sham&&(n.sham=!0)})),Ji=Yi,Zi=Ji,ta=me.f;Dn({target:"Object",stat:!0,forced:Object.defineProperty!==ta,sham:!$t},{defineProperty:ta});var ea=r((function(t){var e=H.Object,n=t.exports=function(t,n,r){return e.defineProperty(t,n,r)};e.defineProperty.sham&&(n.sham=!0)})),na=ea;function ra(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ia=ea,aa=ia,oa=TypeError,sa=function(t){if(t>9007199254740991)throw oa("Maximum allowed index exceeded");return t},ca=Ft("isConcatSpreadable"),la=Y>=51||!u((function(){var t=[];return t[ca]=!1,t.concat()[0]!==t})),ua=function(t){if(!ft(t))return!1;var e=t[ca];return void 0!==e?!!e:pr(t)},ha=!la||!Oi("concat");Dn({target:"Array",proto:!0,arity:1,forced:ha},{concat:function(t){var e,n,r,i,a,o=yt(this),s=yr(o,0),c=0;for(e=-1,r=arguments.length;e=e.length)return t.target=void 0,Ya(void 0,!0);switch(t.kind){case"keys":return Ya(n,!1);case"values":return Ya(e[n],!1)}return Ya([n,e[n]],!1)}),"values");La.Arguments=La.Array;Wa(),Wa(),Wa();var eo={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};for(var no in eo)Lr(j[no],no),La[no]=La.Array;var ro=ga,io=me.f,ao=Ft("metadata"),oo=Function.prototype;void 0===oo[ao]&&io(oo,ao,{value:null}),_r("asyncDispose"),_r("dispose"),_r("metadata");var so=ro,co=so,lo=nt("Symbol"),uo=lo.keyFor,ho=w(lo.prototype.valueOf),fo=lo.isRegisteredSymbol||function(t){try{return void 0!==uo(ho(t))}catch(t){return!1}};Dn({target:"Symbol",stat:!0},{isRegisteredSymbol:fo});for(var Ao=nt("Symbol"),go=Ao.isWellKnownSymbol,po=nt("Object","getOwnPropertyNames"),mo=w(Ao.prototype.valueOf),bo=Tt("wks"),vo=0,yo=po(Ao),wo=yo.length;vo=s?t?"":void 0:(r=Bo(a,o))<55296||r>56319||o+1===s||(i=Bo(a,o+1))<56320||i>57343?t?To(a,o):r:t?_o(a,o,o+2):i-56320+(r-55296<<10)+65536}},Lo={codeAt:So(!1),charAt:So(!0)},Io=Lo.charAt,Mo="String Iterator",Oo=Ir.set,Do=Ir.getterFor(Mo);qa(String,"String",(function(t){Oo(this,{type:Mo,string:xr(t),index:0})}),(function(){var t,e=Do(this),n=e.string,r=e.index;return r>=n.length?Ya(void 0,!0):(t=Io(n,r),e.index+=t.length,Ya(t,!1))}));var Fo=nr.f("iterator"),No=Fo,Po=No;function Ro(t){return Ro="function"==typeof Eo&&"symbol"==typeof Po?function(t){return typeof t}:function(t){return t&&"function"==typeof Eo&&t.constructor===Eo&&t!==Eo.prototype?"symbol":typeof t},Ro(t)}var Qo=nr.f("toPrimitive");function Uo(t){var e=function(t,e){if("object"!=Ro(t)||!t)return t;var n=t[Qo];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ro(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ro(e)?e:e+""}function $o(t,e){for(var n=0;nn,o=$(r)?r:ms(r),s=a?Te(arguments,n):[],c=a?function(){ve(o,this,s)}:o;return e?t(c,i):t(c)}:t},ys=vs(j.setInterval,!0);Dn({global:!0,bind:!0,forced:j.setInterval!==ys},{setInterval:ys});var ws=vs(j.setTimeout,!0);Dn({global:!0,bind:!0,forced:j.setTimeout!==ws},{setTimeout:ws});var ks=H.setTimeout,Cs=Object.assign,xs=Object.defineProperty,Es=w([].concat),Ts=!Cs||u((function(){if($t&&1!==Cs({b:1},Cs(xs({},"a",{enumerable:!0,get:function(){xs(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!==Cs({},t)[n]||bn(Cs({},e)).join("")!==r}))?function(t,e){for(var n=yt(t),r=arguments.length,i=1,a=Tr.f,o=Kt.f;r>i;)for(var s,c=Q(arguments[i++]),l=a?Es(bn(c),a(c)):bn(c),u=l.length,h=0;u>h;)s=l[h++],$t&&!ht(o,c,s)||(n[s]=c[s]);return n}:Cs,Bs=Ts;Dn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Bs},{assign:Bs});var _s=H.Object.assign,Ss=_s,Ls=u((function(){bn(1)}));Dn({target:"Object",stat:!0,forced:Ls},{keys:function(t){return bn(yt(t))}});var Is=H.Object.keys,Ms=function(t,e){var n=[][t];return!!n&&u((function(){n.call(null,e||function(){return 1},1)}))},Os=Mr.forEach,Ds=Ms("forEach")?[].forEach:function(t){return Os(this,t,arguments.length>1?arguments[1]:void 0)};Dn({target:"Array",proto:!0,forced:[].forEach!==Ds},{forEach:Ds});var Fs=Ni("Array","forEach"),Ns=Array.prototype,Ps={DOMTokenList:!0,NodeList:!0},Rs=function(t){var e=t.forEach;return t===Ns||rt(Ns,t)&&e===Ns.forEach||Bt(Ps,Ue(t))?Fs:e},Qs=Rs;var Us=function(){this.__data__=[],this.size=0};var $s=function(t,e){return t===e||t!=t&&e!=e};var Hs=function(t,e){for(var n=t.length;n--;)if($s(t[n][0],e))return n;return-1},js=Array.prototype.splice;var Ks=function(t){var e=this.__data__,n=Hs(e,t);return!(n<0)&&(n==e.length-1?e.pop():js.call(e,n,1),--this.size,!0)};var zs=function(t){var e=this.__data__,n=Hs(e,t);return n<0?void 0:e[n][1]};var Gs=function(t){return Hs(this.__data__,t)>-1};var Xs=function(t,e){var n=this.__data__,r=Hs(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Vs(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t<=9007199254740991};var Tl=function(t){return null!=t&&El(t.length)&&!Ac(t)};var Bl=function(t){return ml(t)&&Tl(t)};var _l=function(){return!1},Sl=r((function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,i=r&&r.exports===n?nc.Buffer:void 0,a=(i?i.isBuffer:void 0)||_l;t.exports=a})),Ll=Function.prototype,Il=Object.prototype,Ml=Ll.toString,Ol=Il.hasOwnProperty,Dl=Ml.call(Object);var Fl=function(t){if(!ml(t)||"[object Object]"!=fc(t))return!1;var e=dl(t);if(null===e)return!0;var n=Ol.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ml.call(n)==Dl},Nl={};Nl["[object Float32Array]"]=Nl["[object Float64Array]"]=Nl["[object Int8Array]"]=Nl["[object Int16Array]"]=Nl["[object Int32Array]"]=Nl["[object Uint8Array]"]=Nl["[object Uint8ClampedArray]"]=Nl["[object Uint16Array]"]=Nl["[object Uint32Array]"]=!0,Nl["[object Arguments]"]=Nl["[object Array]"]=Nl["[object ArrayBuffer]"]=Nl["[object Boolean]"]=Nl["[object DataView]"]=Nl["[object Date]"]=Nl["[object Error]"]=Nl["[object Function]"]=Nl["[object Map]"]=Nl["[object Number]"]=Nl["[object Object]"]=Nl["[object RegExp]"]=Nl["[object Set]"]=Nl["[object String]"]=Nl["[object WeakMap]"]=!1;var Pl=function(t){return ml(t)&&El(t.length)&&!!Nl[fc(t)]};var Rl=function(t){return function(e){return t(e)}},Ql=r((function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,i=r&&r.exports===n&&tc.process,a=function(){try{var t=r&&r.require&&r.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=a})),Ul=Ql&&Ql.isTypedArray,$l=Ul?Rl(Ul):Pl;var Hl=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},jl=Object.prototype.hasOwnProperty;var Kl=function(t,e,n){var r=t[e];jl.call(t,e)&&$s(r,n)&&(void 0!==n||e in t)||tl(t,e,n)};var zl=function(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},du=fu(uu);var Au=function(t,e){return du(su(t,e,iu),t+"")};var gu=function(t,e,n){if(!dc(n))return!1;var r=typeof e;return!!("number"==r?Tl(n)&&Vl(e,n.length):"string"==r&&e in n)&&$s(n[e],t)};var pu=function(t){return Au((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&gu(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r1?arguments[1]:void 0;return ku?wu(this,t,e)||0:yu(this,t,e)}});var xu=Ni("Array","indexOf"),Eu=Array.prototype,Tu=function(t){var e=t.indexOf;return t===Eu||rt(Eu,t)&&e===Eu.indexOf?xu:e},Bu=Tu;function _u(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(Bu(e).call(e,r)>=0)continue;n[r]=t[r]}return n}(t,e);if(vu){var a=vu(t);for(r=0;r=0||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var Su=RangeError,Lu=function(t){var e=xr(U(this)),n="",r=rn(t);if(r<0||r===1/0)throw new Su("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n},Iu=w(Lu),Mu=w("".slice),Ou=Math.ceil,Du=function(t){return function(e,n,r){var i,a,o=xr(U(e)),s=cn(n),c=o.length,l=void 0===r?" ":xr(r);return s<=c||""===l?o:((a=Iu(l,Ou((i=s-c)/l.length))).length>i&&(a=Mu(a,0,i)),t?o+a:a+o)}},Fu={start:Du(!1),end:Du(!0)}.start,Nu=RangeError,Pu=isFinite,Ru=Math.abs,Qu=Date.prototype,Uu=Qu.toISOString,$u=w(Qu.getTime),Hu=w(Qu.getUTCDate),ju=w(Qu.getUTCFullYear),Ku=w(Qu.getUTCHours),zu=w(Qu.getUTCMilliseconds),Gu=w(Qu.getUTCMinutes),Xu=w(Qu.getUTCMonth),Vu=w(Qu.getUTCSeconds),Wu=u((function(){return"0385-07-25T07:06:39.999Z"!==Uu.call(new Date(-50000000000001))}))||!u((function(){Uu.call(new Date(NaN))}))?function(){if(!Pu($u(this)))throw new Nu("Invalid time value");var t=this,e=ju(t),n=zu(t),r=e<0?"-":e>9999?"+":"";return r+Fu(Ru(e),r?6:4,0)+"-"+Fu(Xu(t)+1,2,0)+"-"+Fu(Hu(t),2,0)+"T"+Fu(Ku(t),2,0)+":"+Fu(Gu(t),2,0)+":"+Fu(Vu(t),2,0)+"."+Fu(n,3,0)+"Z"}:Uu,qu=Wu,Yu=u((function(){return null!==new Date(NaN).toJSON()||1!==ht(Date.prototype.toJSON,{toISOString:function(){return 1}})}));Dn({target:"Date",proto:!0,forced:Yu},{toJSON:function(t){var e=yt(this),n=Rt(e,"number");return"number"!=typeof n||isFinite(n)?"toISOString"in e||"Date"!==x(e)?e.toISOString():ht(qu,e):null}}),H.JSON||(H.JSON={stringify:JSON.stringify});var Ju=function(t,e,n){return ve(H.JSON.stringify,null,arguments)},Zu=Ju,th=Mr.find,eh="find",nh=!0;eh in[]&&Array(1)[eh]((function(){nh=!1})),Dn({target:"Array",proto:!0,forced:nh},{find:function(t){return th(this,t,arguments.length>1?arguments[1]:void 0)}}),Wa();var rh=Ni("Array","find"),ih=Array.prototype,ah=function(t){var e=t.find;return t===ih||rt(ih,t)&&e===ih.find?rh:e},oh="\t\n\v\f\r                 \u2028\u2029\ufeff",sh=w("".replace),ch=RegExp("^["+oh+"]+"),lh=RegExp("(^|[^"+oh+"])["+oh+"]+$"),uh=function(t){return function(e){var n=xr(U(e));return 1&t&&(n=sh(n,ch,"")),2&t&&(n=sh(n,lh,"$1")),n}},hh={start:uh(1),end:uh(2),trim:uh(3)},fh=Qa.PROPER,dh=hh,Ah=dh.trim;Dn({target:"String",proto:!0,forced:function(t){return u((function(){return!!oh[t]()||"​…᠎"!=="​…᠎"[t]()||fh&&oh[t].name!==t}))}("trim")},{trim:function(){return Ah(this)}});var gh=Ni("String","trim"),ph=String.prototype,mh=function(t){var e=t.trim;return"string"==typeof t||t===ph||rt(ph,t)&&e===ph.trim?gh:e},bh=function(t,e,n){var r,i;ue(t);try{if(!(r=Ot(t,"return"))){if("throw"===e)throw n;return n}r=ht(r,t)}catch(t){i=!0,r=t}if("throw"===e)throw n;if(i)throw r;return ue(r),n},vh=Ft("iterator"),yh=Array.prototype,wh=Ft("iterator"),kh=function(t){if(!P(t))return Ot(t,wh)||Ot(t,"@@iterator")||La[Ue(t)]},Ch=TypeError,xh=function(t,e,n,r){try{return r?e(ue(n)[0],n[1]):e(n)}catch(e){bh(t,"throw",e)}},Eh=function(t){return void 0!==t&&(La.Array===t||yh[vh]===t)},Th=function(t,e){var n=arguments.length<2?kh(t):e;if(ut(n))return ue(ht(n,t));throw new Ch(ct(t)+" is not iterable")},Bh=Array,_h=Ft("iterator"),Sh=!1;try{var Lh=0,Ih={next:function(){return{done:!!Lh++}},return:function(){Sh=!0}};Ih[_h]=function(){return this},Array.from(Ih,(function(){throw 2}))}catch(t){}var Mh=function(t){var e=yt(t),n=Ye(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=void 0!==i;a&&(i=ke(i,r>2?arguments[2]:void 0));var o,s,c,l,u,h,f=kh(e),d=0;if(!f||this===Bh&&Eh(f))for(o=un(e),s=n?new this(o):Bh(o);o>d;d++)h=a?i(e[d],d):e[d],Vi(s,d,h);else for(s=n?new this:[],u=(l=Th(e,f)).next;!(c=ht(u,l)).done;d++)h=a?xh(l,i,[c.value,d],!0):c.value,Vi(s,d,h);return s.length=d,s},Oh=function(t,e){try{if(!e&&!Sh)return!1}catch(t){return!1}var n=!1;try{var r={};r[_h]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Dh=!Oh((function(t){Array.from(t)}));Dn({target:"Array",stat:!0,forced:Dh},{from:Mh});var Fh=H.Array.from,Nh=Fh,Ph=Ft("match"),Rh=function(t){var e;return ft(t)&&(void 0!==(e=t[Ph])?!!e:"RegExp"===x(t))},Qh=TypeError,Uh=Ft("match"),$h=function(t){if(Rh(t))throw new Qh("The method doesn't accept regular expressions");return t},Hh=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[Uh]=!1,"/./"[t](e)}catch(t){}}return!1},jh=(ye.f,ie("".slice)),Kh=Math.min,zh=Hh("startsWith");Dn({target:"String",proto:!0,forced:!zh},{startsWith:function(t){var e=xr(U(this));$h(t);var n=cn(Kh(arguments.length>1?arguments[1]:void 0,e.length)),r=xr(t);return jh(e,n,n+r.length)===r}});var Gh=Ni("String","startsWith"),Xh=String.prototype,Vh=function(t){var e=t.startsWith;return"string"==typeof t||t===Xh||rt(Xh,t)&&e===Xh.startsWith?Gh:e},Wh=r((function(t,e){t.exports=function(){var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),r=/MSIE \d/.test(t),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),a=/Edge\/(\d+)/.exec(t),o=r||i||a,s=o&&(r?document.documentMode||6:+(a||i)[1]),c=!a&&/WebKit\//.test(t),l=c&&/Qt\/\d+\.\d+/.test(t),u=!a&&/Chrome\//.test(t),h=/Opera\//.test(t),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),A=/PhantomJS/.test(t),g=!a&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),p=/Android/.test(t),m=g||p||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=g||/Mac/.test(e),v=/\bCrOS\b/.test(t),y=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,c=!0);var k=b&&(l||h&&(null==w||w<12.11)),C=n||o&&s>=9;function x(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,T=function(t,e){var n=t.className,r=x(e).exec(n);if(r){var i=n.slice(r.index+r[0].length);t.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function B(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function _(t,e){return B(t).appendChild(e)}function S(t,e,n,r){var i=document.createElement(t);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var a=0;a=e)return o+(e-a);o+=s-a,o+=n-o%n,a=s+1}}g?F=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:o&&(F=function(t){try{t.select()}catch(t){}});var Q=function(){this.id=null,this.f=null,this.time=0,this.handler=N(this.onTimeout,this)};function U(t,e){for(var n=0;n=e)return r+Math.min(o,e-i);if(i+=a-r,r=a+1,(i+=n-i%n)>=e)return r}}var X=[""];function V(t){for(;X.length<=t;)X.push(W(X)+" ");return X[t]}function W(t){return t[t.length-1]}function q(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||tt.test(t))}function nt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&et(t))||e.test(t):et(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function at(t){return t.charCodeAt(0)>=768&&it.test(t)}function ot(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var i=(e+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==e)return t(a)?e:n;t(a)?n=a:e=a+r}}function ct(t,e,n,r){if(!t)return r(e,n,"ltr",0);for(var i=!1,a=0;ae||e==n&&o.to==e)&&(r(Math.max(o.from,e),Math.min(o.to,n),1==o.level?"rtl":"ltr",a),i=!0)}i||r(e,n,"ltr")}var lt=null;function ut(t,e,n){var r;lt=null;for(var i=0;ie)return i;a.to==e&&(a.from!=a.to&&"before"==n?r=i:lt=i),a.from==e&&(a.from!=a.to&&"before"!=n?r=i:lt=i)}return null!=r?r:lt}var ht=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function c(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var l="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!r.test(t))return!1;for(var u=t.length,h=[],f=0;f-1&&(r[e]=i.slice(0,a).concat(i.slice(a+1)))}}}function mt(t,e){var n=gt(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function wt(t){t.prototype.on=function(t,e){At(this,t,e)},t.prototype.off=function(t,e){pt(this,t,e)}}function kt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Ct(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function xt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){kt(t),Ct(t)}function Tt(t){return t.target||t.srcElement}function Bt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var _t,St,Lt=function(){if(o&&s<9)return!1;var t=S("div");return"draggable"in t||"dragDrop"in t}();function It(t){if(null==_t){var e=S("span","​");_(t,S("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(_t=e.offsetWidth<=1&&e.offsetHeight>2&&!(o&&s<8))}var n=_t?S("span","​"):S("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Mt(t){if(null!=St)return St;var e=_(t,document.createTextNode("AخA")),n=E(e,0,1).getBoundingClientRect(),r=E(e,1,2).getBoundingClientRect();return B(t),!(!n||n.left==n.right)&&(St=r.right-n.right<3)}var Ot,Dt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],r=t.length;e<=r;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var a=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),o=a.indexOf("\r");-1!=o?(n.push(a.slice(0,o)),e+=o+1):(n.push(a),e=i+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Ft=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Nt="oncopy"in(Ot=S("div"))||(Ot.setAttribute("oncopy","return;"),"function"==typeof Ot.oncopy),Pt=null;function Rt(t){if(null!=Pt)return Pt;var e=_(t,S("span","x")),n=e.getBoundingClientRect(),r=E(e,0,1).getBoundingClientRect();return Pt=Math.abs(n.left-r.left)>1}var Qt={},Ut={};function $t(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Qt[t]=e}function Ht(t,e){Ut[t]=e}function jt(t){if("string"==typeof t&&Ut.hasOwnProperty(t))t=Ut[t];else if(t&&"string"==typeof t.name&&Ut.hasOwnProperty(t.name)){var e=Ut[t.name];"string"==typeof e&&(e={name:e}),(t=Z(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return jt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return jt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Kt(t,e){e=jt(e);var n=Qt[e.name];if(!n)return Kt(t,"text/plain");var r=n(t,e);if(zt.hasOwnProperty(e.name)){var i=zt[e.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var o in e.modeProps)r[o]=e.modeProps[o];return r}var zt={};function Gt(t,e){P(e,zt.hasOwnProperty(t)?zt[t]:zt[t]={})}function Xt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var i=e[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Vt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Wt(t,e,n){return!t.startState||t.startState(e,n)}var qt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Yt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(e=t.first&&en?ae(n,Yt(t,n).text.length):de(e,Yt(t,e.line).text.length)}function de(t,e){var n=t.ch;return null==n||n>e?ae(t.line,e):n<0?ae(t.line,0):t}function Ae(t,e){for(var n=[],r=0;r=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pose},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var i=function(t){return n?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ge=function(t,e){this.state=t,this.lookAhead=e},pe=function(t,e,n,r){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function me(t,e,n,r){var i=[t.state.modeGen],a={};Te(t,e.text,t.doc.mode,n,(function(t,e){return i.push(t,e)}),a,r);for(var o=n.state,s=function(r){n.baseTokens=i;var s=t.state.overlays[r],c=1,l=0;n.state=!0,Te(t,e.text,s.mode,n,(function(t,e){for(var n=c;lt&&i.splice(c,1,t,i[c+1],r),c+=2,l=Math.min(t,r)}if(e)if(s.opaque)i.splice(n,c-n,t,"overlay "+e),c=n+2;else for(;nt.options.maxHighlightLength&&Xt(t.doc.mode,r.state),a=me(t,e,r);i&&(r.state=i),e.stateAfter=r.save(!i),e.styles=a.styles,a.classes?e.styleClasses=a.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function ve(t,e,n){var r=t.doc,i=t.display;if(!r.mode.startState)return new pe(r,!0,e);var a=Be(t,e,n),o=a>r.first&&Yt(r,a-1).stateAfter,s=o?pe.fromSaved(r,o,a):new pe(r,Wt(r.mode),a);return r.iter(a,e,(function(n){ye(t,n.text,s);var r=s.line;n.stateAfter=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}pe.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},pe.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},pe.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pe.fromSaved=function(t,e,n){return e instanceof ge?new pe(t,Xt(t.mode,e.state),n,e.lookAhead):new pe(t,Xt(t.mode,e),n)},pe.prototype.save=function(t){var e=!1!==t?Xt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ge(e,this.maxLookAhead):e};var Ce=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function xe(t,e,n,r){var i,a,o=t.doc,s=o.mode,c=Yt(o,(e=fe(o,e)).line),l=ve(t,e.line,n),u=new qt(c.text,t.options.tabSize,l);for(r&&(a=[]);(r||u.post.options.maxHighlightLength?(s=!1,o&&ye(t,e,r,h.pos),h.pos=e.length,c=null):c=Ee(ke(n,h,r.state,f),a),f){var d=f[0].name;d&&(c="m-"+(c?d+" "+c:d))}if(!s||u!=c){for(;lo;--s){if(s<=a.first)return a.first;var c=Yt(a,s-1),l=c.stateAfter;if(l&&(!n||s+(l instanceof ge?l.lookAhead:0)<=a.modeFrontier))return s;var u=R(c.text,null,t.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function _e(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;r--){var i=Yt(t,r).stateAfter;if(i&&(!(i instanceof ge)||r+i.lookAhead=e:a.to>e);(r||(r=[])).push(new Oe(o,a.from,s?null:a.to))}}return r}function Re(t,e,n){var r;if(t)for(var i=0;i=e:a.to>e)||a.from==e&&"bookmark"==o.type&&(!n||a.marker.insertLeft)){var s=null==a.from||(o.inclusiveLeft?a.from<=e:a.from0&&s)for(var v=0;v0)){var u=[c,1],h=oe(l.from,s.from),f=oe(l.to,s.to);(h<0||!o.inclusiveLeft&&!h)&&u.push({from:l.from,to:s.from}),(f>0||!o.inclusiveRight&&!f)&&u.push({from:s.to,to:l.to}),i.splice.apply(i,u),c+=u.length-3}}return i}function He(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||Ge(n,a.marker)<0)&&(n=a.marker)}return n}function Ye(t,e,n,r,i){var a=Yt(t,e),o=Le&&a.markedSpans;if(o)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?oe(l.to,n)>=0:oe(l.to,n)>0)||u>=0&&(c.marker.inclusiveRight&&i.inclusiveLeft?oe(l.from,r)<=0:oe(l.from,r)<0)))return!0}}}function Je(t){for(var e;e=Ve(t);)t=e.find(-1,!0).line;return t}function Ze(t){for(var e;e=We(t);)t=e.find(1,!0).line;return t}function tn(t){for(var e,n;e=We(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function en(t,e){var n=Yt(t,e),r=Je(n);return n==r?e:ee(r)}function nn(t,e){if(e>t.lastLine())return e;var n,r=Yt(t,e);if(!rn(t,r))return e;for(;n=We(r);)r=n.find(1,!0).line;return ee(r)+1}function rn(t,e){var n=Le&&e.markedSpans;if(n)for(var r=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var ln=function(t,e,n){this.text=t,je(this,e),this.height=n?n(this):1};function un(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),He(t),je(t,n);var i=r?r(t):1;i!=t.height&&te(t,i)}function hn(t){t.parent=null,He(t)}ln.prototype.lineNo=function(){return ee(this)},wt(ln);var fn={},dn={};function An(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?dn:fn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function gn(t,e){var n=L("span",null,null,c?"padding-right: .1px":null),r={pre:L("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var a=i?e.rest[i-1]:e.line,o=void 0;r.pos=0,r.addToken=mn,Mt(t.display.measure)&&(o=ft(a,t.doc.direction))&&(r.addToken=vn(r.addToken,o)),r.map=[],wn(a,r,be(t,a,e!=t.display.externalMeasured&&ee(a))),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=D(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=D(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(It(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(c){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return mt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function pn(t){var e=S("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function mn(t,e,n,r,i,a,c){if(e){var l,u=t.splitSpaces?bn(e,t.trailingSpace):e,h=t.cm.state.specialChars,f=!1;if(h.test(e)){l=document.createDocumentFragment();for(var d=0;;){h.lastIndex=d;var A=h.exec(e),g=A?A.index-d:e.length-d;if(g){var p=document.createTextNode(u.slice(d,d+g));o&&s<9?l.appendChild(S("span",[p])):l.appendChild(p),t.map.push(t.pos,t.pos+g,p),t.col+=g,t.pos+=g}if(!A)break;d+=g+1;var m=void 0;if("\t"==A[0]){var b=t.cm.options.tabSize,v=b-t.col%b;(m=l.appendChild(S("span",V(v),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),t.col+=v}else"\r"==A[0]||"\n"==A[0]?((m=l.appendChild(S("span","\r"==A[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",A[0]),t.col+=1):((m=t.cm.options.specialCharPlaceholder(A[0])).setAttribute("cm-text",A[0]),o&&s<9?l.appendChild(S("span",[m])):l.appendChild(m),t.col+=1);t.map.push(t.pos,t.pos+1,m),t.pos++}}else t.col+=e.length,l=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,l),o&&s<9&&(f=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||r||i||f||a||c){var y=n||"";r&&(y+=r),i&&(y+=i);var w=S("span",[l],y,a);if(c)for(var k in c)c.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,c[k]);return t.content.appendChild(w)}t.content.appendChild(l)}}function bn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",i=0;il&&h.from<=l);f++);if(h.to>=u)return t(n,r,i,a,o,s,c);t(n,r.slice(0,h.to-l),i,a,null,s,c),a=null,r=r.slice(h.to-l),l=h.to}}}function yn(t,e,n,r){var i=!r&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!r&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function wn(t,e,n){var r=t.markedSpans,i=t.text,a=0;if(r)for(var o,s,c,l,u,h,f,d=i.length,A=0,g=1,p="",m=0;;){if(m==A){c=l=u=s="",f=null,h=null,m=1/0;for(var b=[],v=void 0,y=0;yA||k.collapsed&&w.to==A&&w.from==A)){if(null!=w.to&&w.to!=A&&m>w.to&&(m=w.to,l=""),k.className&&(c+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==A&&(u+=" "+k.startStyle),k.endStyle&&w.to==m&&(v||(v=[])).push(k.endStyle,w.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var C in k.attributes)(f||(f={}))[C]=k.attributes[C];k.collapsed&&(!h||Ge(h.marker,k)<0)&&(h=w)}else w.from>A&&m>w.from&&(m=w.from)}if(v)for(var x=0;x=d)break;for(var T=Math.min(d,m);;){if(p){var B=A+p.length;if(!h){var _=B>T?p.slice(0,T-A):p;e.addToken(e,_,o?o+c:c,u,A+_.length==m?l:"",s,f)}if(B>=T){p=p.slice(T-A),A=T;break}A=B,u=""}p=i.slice(a,a=n[g++]),o=An(n[g++],e.cm.options)}}else for(var S=1;S2&&a.push((c.bottom+l.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Jn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;rn)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Zn(t,e){var n=ee(e=Je(e)),r=t.display.externalMeasured=new kn(t.doc,e,n);r.lineN=n;var i=r.built=gn(t,r);return r.text=i.pre,_(t.display.lineMeasure,i.pre),r}function tr(t,e,n,r){return rr(t,nr(t,e),n,r)}function er(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(i=(a=c-s)-1,e>=c&&(o="right")),null!=i){if(r=t[l+2],s==c&&n==(r.insertLeft?"left":"right")&&(o=n),"left"==n&&0==i)for(;l&&t[l-2]==t[l-3]&&t[l-1].insertLeft;)r=t[2+(l-=3)],o="left";if("right"==n&&i==c-s)for(;l=0&&(n=t[i]).left==n.right;i--);return n}function cr(t,e,n,r){var i,a=or(e.map,n,r),c=a.node,l=a.start,u=a.end,h=a.collapse;if(3==c.nodeType){for(var f=0;f<4;f++){for(;l&&at(e.line.text.charAt(a.coverStart+l));)--l;for(;a.coverStart+u0&&(h=r="right"),i=t.options.lineWrapping&&(d=c.getClientRects()).length>1?d["right"==r?d.length-1:0]:c.getBoundingClientRect()}if(o&&s<9&&!l&&(!i||!i.left&&!i.right)){var A=c.parentNode.getClientRects()[0];i=A?{left:A.left,right:A.left+Lr(t.display),top:A.top,bottom:A.bottom}:ar}for(var g=i.top-e.rect.top,p=i.bottom-e.rect.top,m=(g+p)/2,b=e.view.measure.heights,v=0;v=r.text.length?(c=r.text.length,l="before"):c<=0&&(c=0,l="after"),!s)return o("before"==l?c-1:c,"before"==l);function u(t,e,n){return o(n?t-1:t,1==s[e].level!=n)}var h=ut(s,c,l),f=lt,d=u(c,h,"before"==l);return null!=f&&(d.other=u(c,f,"before"!=l)),d}function yr(t,e){var n=0;e=fe(t.doc,e),t.options.lineWrapping||(n=Lr(t.display)*e.ch);var r=Yt(t.doc,e.line),i=on(r)+zn(t.display);return{left:n,right:n,top:i,bottom:i+r.height}}function wr(t,e,n,r,i){var a=ae(t,e,n);return a.xRel=i,r&&(a.outside=r),a}function kr(t,e,n){var r=t.doc;if((n+=t.display.viewOffset)<0)return wr(r.first,0,null,-1,-1);var i=ne(r,n),a=r.first+r.size-1;if(i>a)return wr(r.first+r.size-1,Yt(r,a).text.length,null,1,1);e<0&&(e=0);for(var o=Yt(r,i);;){var s=Tr(t,o,i,e,n),c=qe(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!c)return s;var l=c.find(1);if(l.line==i)return l;o=Yt(r,i=l.line)}}function Cr(t,e,n,r){r-=gr(e);var i=e.text.length,a=st((function(e){return rr(t,n,e-1).bottom<=r}),i,0);return{begin:a,end:i=st((function(e){return rr(t,n,e).top>r}),a,i)}}function xr(t,e,n,r){return n||(n=nr(t,e)),Cr(t,e,n,pr(t,e,rr(t,n,r),"line").top)}function Er(t,e,n,r){return!(t.bottom<=n)&&(t.top>n||(r?t.left:t.right)>e)}function Tr(t,e,n,r,i){i-=on(e);var a=nr(t,e),o=gr(e),s=0,c=e.text.length,l=!0,u=ft(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?_r:Br)(t,e,n,a,u,r,i);s=(l=1!=h.level)?h.from:h.to-1,c=l?h.to:h.from-1}var f,d,A=null,g=null,p=st((function(e){var n=rr(t,a,e);return n.top+=o,n.bottom+=o,!!Er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(A=e,g=n),!0)}),s,c),m=!1;if(g){var b=r-g.left=y.bottom?1:0}return wr(n,p=ot(e.text,p,1),d,m,r-f)}function Br(t,e,n,r,i,a,o){var s=st((function(s){var c=i[s],l=1!=c.level;return Er(vr(t,ae(n,l?c.to:c.from,l?"before":"after"),"line",e,r),a,o,!0)}),0,i.length-1),c=i[s];if(s>0){var l=1!=c.level,u=vr(t,ae(n,l?c.from:c.to,l?"after":"before"),"line",e,r);Er(u,a,o,!0)&&u.top>o&&(c=i[s-1])}return c}function _r(t,e,n,r,i,a,o){var s=Cr(t,e,r,o),c=s.begin,l=s.end;/\s/.test(e.text.charAt(l-1))&&l--;for(var u=null,h=null,f=0;f=l||d.to<=c)){var A=rr(t,r,1!=d.level?Math.min(l,d.to)-1:Math.max(c,d.from)).right,g=Ag)&&(u=d,h=g)}}return u||(u=i[i.length-1]),u.froml&&(u={from:u.from,to:l,level:u.level}),u}function Sr(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ir){ir=S("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ir.appendChild(document.createTextNode("x")),ir.appendChild(S("br"));ir.appendChild(document.createTextNode("x"))}_(t.measure,ir);var n=ir.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),B(t.measure),n||1}function Lr(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=S("span","xxxxxxxxxx"),n=S("pre",[e],"CodeMirror-line-like");_(t.measure,n);var r=e.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function Ir(t){for(var e=t.display,n={},r={},i=e.gutters.clientLeft,a=e.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=t.display.gutterSpecs[o].className;n[s]=a.offsetLeft+a.clientLeft+i,r[s]=a.clientWidth}return{fixedPos:Mr(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function Mr(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Or(t){var e=Sr(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/Lr(t.display)-3);return function(i){if(rn(t.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o0&&(c=Yt(t.doc,l.line).text).length==l.ch){var u=R(c,c.length,t.options.tabSize)-c.length;l=ae(l.line,Math.max(0,Math.round((a-Xn(t.display).left)/Lr(t.display))-u))}return l}function Nr(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,r=0;re)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)Le&&en(t.doc,e)i.viewFrom?Qr(t):(i.viewFrom+=r,i.viewTo+=r);else if(e<=i.viewFrom&&n>=i.viewTo)Qr(t);else if(e<=i.viewFrom){var a=Ur(t,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):Qr(t)}else if(n>=i.viewTo){var o=Ur(t,e,e,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Qr(t)}else{var s=Ur(t,e,e,-1),c=Ur(t,n,n+r,1);s&&c?(i.view=i.view.slice(0,s.index).concat(Cn(t,s.lineN,c.lineN)).concat(i.view.slice(c.index)),i.viewTo+=r):Qr(t)}var l=i.externalMeasured;l&&(n=i.lineN&&e=r.viewTo)){var a=r.view[Nr(t,e)];if(null!=a.node){var o=a.changes||(a.changes=[]);-1==U(o,n)&&o.push(n)}}}function Qr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Ur(t,e,n,r){var i,a=Nr(t,e),o=t.display.view;if(!Le||n==t.doc.first+t.doc.size)return{index:a,lineN:n};for(var s=t.display.viewFrom,c=0;c0){if(a==o.length-1)return null;i=s+o[a].size-e,a++}else i=s-e;e+=i,n+=i}for(;en(t.doc,n)!=n;){if(a==(r<0?0:o.length-1))return null;n+=r*o[a-(r<0?1:0)].size,a+=r}return{index:a,lineN:n}}function $r(t,e,n){var r=t.display;0==r.view.length||e>=r.viewTo||n<=r.viewFrom?(r.view=Cn(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=Cn(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Nr(t,n)))),r.viewTo=n}function Hr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo||s.to().line0?e.blinker=setInterval((function(){t.hasFocus()||Jr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Wr(t){t.state.focused||(t.display.input.focus(),Yr(t))}function qr(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Jr(t))}),100)}function Yr(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(mt(t,"focus",t,e),t.state.focused=!0,O(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),c&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Vr(t))}function Jr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(mt(t,"blur",t,e),t.state.focused=!1,T(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function Zr(t){for(var e=t.display,n=e.lineDiv.offsetTop,r=0;r.005||f<-.005)&&(te(i.line,c),ti(i.line),i.rest))for(var d=0;dt.display.sizerWidth){var A=Math.ceil(l/Lr(t.display));A>t.display.maxLineLength&&(t.display.maxLineLength=A,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function ti(t){if(t.widgets)for(var e=0;e=o&&(a=ne(e,on(Yt(e,c))-t.wrapper.clientHeight),o=c)}return{from:a,to:Math.max(o,a+1)}}function ni(t,e){if(!bt(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),i=null;if(e.top+r.top<0?i=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!A){var a=S("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-zn(t.display))+"px;\n height: "+(e.bottom-e.top+Vn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(a),a.scrollIntoView(i),t.display.lineSpace.removeChild(a)}}}function ri(t,e,n,r){var i;null==r&&(r=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?ae(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?ae(e.line,e.ch+1,"before"):e);for(var a=0;a<5;a++){var o=!1,s=vr(t,e),c=n&&n!=e?vr(t,n):s,l=ai(t,i={left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-r,right:Math.max(s.left,c.left),bottom:Math.max(s.bottom,c.bottom)+r}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=l.scrollTop&&(fi(t,l.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(Ai(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(o=!0)),!o)break}return i}function ii(t,e){var n=ai(t,e);null!=n.scrollTop&&fi(t,n.scrollTop),null!=n.scrollLeft&&Ai(t,n.scrollLeft)}function ai(t,e){var n=t.display,r=Sr(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,a=qn(t),o={};e.bottom-e.top>a&&(e.bottom=e.top+a);var s=t.doc.height+Gn(n),c=e.tops-r;if(e.topi+a){var u=Math.min(e.top,(l?s:e.bottom)-a);u!=i&&(o.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,d=Wn(t)-n.gutters.offsetWidth,A=e.right-e.left>d;return A&&(e.right=e.left+d),e.left<10?o.scrollLeft=0:e.leftd+f-3&&(o.scrollLeft=e.right+(A?0:10)-d),o}function oi(t,e){null!=e&&(ui(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function si(t){ui(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function ci(t,e,n){null==e&&null==n||ui(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function li(t,e){ui(t),t.curOp.scrollToPos=e}function ui(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,hi(t,yr(t,e.from),yr(t,e.to),e.margin))}function hi(t,e,n,r){var i=ai(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-r,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+r});ci(t,i.scrollLeft,i.scrollTop)}function fi(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||ji(t,{top:e}),di(t,e,!0),n&&ji(t),Fi(t,100))}function di(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Ai(t,e,n,r){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!r||(t.doc.scrollLeft=e,Xi(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function gi(t){var e=t.display,n=e.gutters.offsetWidth,r=Math.round(t.doc.height+Gn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Vn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var pi=function(t,e,n){this.cm=n;var r=this.vert=S("div",[S("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=S("div",[S("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,t(r),t(i),At(r,"scroll",(function(){r.clientHeight&&e(r.scrollTop,"vertical")})),At(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,o&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};pi.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var i=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var a=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},pi.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},pi.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},pi.prototype.zeroWidthHack=function(){var t=b&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Q,this.disableVert=new Q},pi.prototype.enableZeroWidthBar=function(t,e,n){function r(){var i=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,r)}t.style.pointerEvents="auto",e.set(1e3,r)},pi.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var mi=function(){};function bi(t,e){e||(e=gi(t));var n=t.display.barWidth,r=t.display.barHeight;vi(t,e);for(var i=0;i<4&&n!=t.display.barWidth||r!=t.display.barHeight;i++)n!=t.display.barWidth&&t.options.lineWrapping&&Zr(t),vi(t,gi(t)),n=t.display.barWidth,r=t.display.barHeight}function vi(t,e){var n=t.display,r=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}mi.prototype.update=function(){return{bottom:0,right:0}},mi.prototype.setScrollLeft=function(){},mi.prototype.setScrollTop=function(){},mi.prototype.clear=function(){};var yi={native:pi,null:mi};function wi(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&T(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new yi[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),At(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?Ai(t,e):fi(t,e)}),t),t.display.scrollbars.addClass&&O(t.display.wrapper,t.display.scrollbars.addClass)}var ki=0;function Ci(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ki},En(t.curOp)}function xi(t){var e=t.curOp;e&&Bn(e,(function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Pi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Bi(t){t.updatedDisplay=t.mustUpdate&&$i(t.cm,t.update)}function _i(t){var e=t.cm,n=e.display;t.updatedDisplay&&Zr(e),t.barMeasure=gi(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=tr(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Vn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Wn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Si(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var n=+new Date+t.options.workTime,r=ve(t,e.highlightFrontier),i=[];e.iter(r.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(a){if(r.line>=t.display.viewFrom){var o=a.styles,s=a.text.length>t.options.maxHighlightLength?Xt(e.mode,r.state):null,c=me(t,a,r,!0);s&&(r.state=s),a.styles=c.styles;var l=a.styleClasses,u=c.classes;u?a.styleClasses=u:l&&(a.styleClasses=null);for(var h=!o||o.length!=a.styles.length||l!=u&&(!l||!u||l.bgClass!=u.bgClass||l.textClass!=u.textClass),f=0;!h&&fn)return Fi(t,t.options.workDelay),!0})),e.highlightFrontier=r.line,e.modeFrontier=Math.max(e.modeFrontier,r.line),i.length&&Ii(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hr(t))return!1;Vi(t)&&(Qr(t),e.dims=Ir(t));var i=r.first+r.size,a=Math.max(e.visible.from-t.options.viewportMargin,r.first),o=Math.min(i,e.visible.to+t.options.viewportMargin);n.viewFromo&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),Le&&(a=en(t.doc,a),o=nn(t.doc,o));var s=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;$r(t,a,o),n.viewOffset=on(Yt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var c=Hr(t);if(!s&&0==c&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=Qi(t);return c>4&&(n.lineDiv.style.display="none"),Ki(t,n.updateLineNumbers,e.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Ui(l),B(n.cursorDiv),B(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Fi(t,400)),n.updateLineNumbers=null,!0}function Hi(t,e){for(var n=e.viewport,r=!0;;r=!1){if(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Wn(t))r&&(e.visible=ei(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Gn(t.display)-qn(t),n.top)}),e.visible=ei(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!$i(t,e))break;Zr(t);var i=gi(t);jr(t),bi(t,i),Gi(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ji(t,e){var n=new Pi(t,e);if($i(t,n)){Zr(t),Hi(t,n);var r=gi(t);jr(t),bi(t,r),Gi(t,r),n.finish()}}function Ki(t,e,n){var r=t.display,i=t.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function s(e){var n=e.nextSibling;return c&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var l=r.view,u=r.viewFrom,h=0;h-1&&(d=!1),In(t,f,u,n)),d&&(B(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ie(t.options,u)))),o=f.node.nextSibling}else{var A=Qn(t,f,u,n);a.insertBefore(A,o)}u+=f.size}for(;o;)o=s(o)}function zi(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Gi(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Vn(t)+"px"}function Xi(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=Mr(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,a=r+"px",o=0;os.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&l||a&&u){if(a&&b&&c)t:for(var f=e.target,d=o.view;f!=s;f=f.parentNode)for(var A=0;A=0&&oe(t,r.to())<=0)return n}return-1};var aa=function(t,e){this.anchor=t,this.head=e};function oa(t,e,n){var r=t&&t.options.selectionsMayTouch,i=e[n];e.sort((function(t,e){return oe(t.from(),e.from())})),n=U(e,i);for(var a=1;a0:c>=0){var l=ue(s.from(),o.from()),u=le(s.to(),o.to()),h=s.empty()?o.from()==o.head:s.from()==s.head;a<=n&&--n,e.splice(--a,2,new aa(h?u:l,h?l:u))}}return new ia(e,n)}function sa(t,e){return new ia([new aa(t,e||t)],0)}function ca(t){return t.text?ae(t.from.line+t.text.length-1,W(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function la(t,e){if(oe(t,e.from)<0)return t;if(oe(t,e.to)<=0)return ca(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=ca(e).ch-e.to.ch),ae(n,r)}function ua(t,e){for(var n=[],r=0;r1&&t.remove(s.line+1,A-1),t.insert(s.line+1,m)}Sn(t,"change",t,e)}function ma(t,e,n){function r(t,i,a){if(t.linked)for(var o=0;o1&&!t.done[t.done.length-2].ranges?(t.done.pop(),W(t.done)):void 0}function Ea(t,e,n,r){var i=t.history;i.undone.length=0;var a,o,s=+new Date;if((i.lastOp==r||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&i.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(a=xa(i,i.lastOp==r)))o=W(a.changes),0==oe(e.from,e.to)&&0==oe(e.from,o.to)?o.to=ca(e):a.changes.push(ka(t,e));else{var c=W(i.done);for(c&&c.ranges||_a(t.sel,i.done),a={changes:[ka(t,e)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=e.origin,o||mt(t,"historyAdded")}function Ta(t,e,n,r){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Ba(t,e,n,r){var i=t.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||Ta(t,a,W(i.done),e))?i.done[i.done.length-1]=e:_a(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&!1!==r.clearRedo&&Ca(i.undone)}function _a(t,e){var n=W(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Sa(t,e,n,r){var i=e["spans_"+t.id],a=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),(function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[a]=n.markedSpans),++a}))}function La(t){if(!t)return null;for(var e,n=0;n-1&&(W(s)[h]=l[h],delete l[h])}}}return r}function Da(t,e,n,r){if(r){var i=t.anchor;if(n){var a=oe(e,i)<0;a!=oe(n,i)<0?(i=e,e=n):a!=oe(e,n)<0&&(e=n)}return new aa(i,e)}return new aa(n||e,e)}function Fa(t,e,n,r,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),$a(t,new ia([Da(t.sel.primary(),e,n,i)],0),r)}function Na(t,e,n){for(var r=[],i=t.cm&&(t.cm.display.shift||t.extend),a=0;a=e.ch:s.to>e.ch))){if(i&&(mt(c,"beforeCursorEnter"),c.explicitlyCleared)){if(a.markedSpans){--o;continue}break}if(!c.atomic)continue;if(n){var h=c.find(r<0?1:-1),f=void 0;if((r<0?u:l)&&(h=Va(t,h,-r,h&&h.line==e.line?a:null)),h&&h.line==e.line&&(f=oe(h,n))&&(r<0?f<0:f>0))return Ga(t,h,e,r,i)}var d=c.find(r<0?-1:1);return(r<0?l:u)&&(d=Va(t,d,r,d.line==e.line?a:null)),d?Ga(t,d,e,r,i):null}}return e}function Xa(t,e,n,r,i){var a=r||1,o=Ga(t,e,n,a,i)||!i&&Ga(t,e,n,a,!0)||Ga(t,e,n,-a,i)||!i&&Ga(t,e,n,-a,!0);return o||(t.cantEdit=!0,ae(t.first,0))}function Va(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?fe(t,ae(e.line-1)):null:n>0&&e.ch==(r||Yt(t,e.line)).text.length?e.line=0;--i)Ja(t,{from:r[i].from,to:r[i].to,text:i?[""]:e.text,origin:e.origin});else Ja(t,e)}}function Ja(t,e){if(1!=e.text.length||""!=e.text[0]||0!=oe(e.from,e.to)){var n=ua(t,e);Ea(t,e,n,t.cm?t.cm.curOp.id:NaN),eo(t,e,n,Qe(t,e));var r=[];ma(t,(function(t,n){n||-1!=U(r,t.history)||(oo(t.history,e),r.push(t.history)),eo(t,e,null,Qe(t,e))}))}}function Za(t,e,n){var r=t.cm&&t.cm.state.suppressEdits;if(!r||n){for(var i,a=t.history,o=t.sel,s="undo"==e?a.done:a.undone,c="undo"==e?a.undone:a.done,l=0;l=0;--d){var A=f(d);if(A)return A.v}}}}function to(t,e){if(0!=e&&(t.first+=e,t.sel=new ia(q(t.sel.ranges,(function(t){return new aa(ae(t.anchor.line+e,t.anchor.ch),ae(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Pr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.linea&&(e={from:e.from,to:ae(a,Yt(t,a).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Jt(t,e.from,e.to),n||(n=ua(t,e)),t.cm?no(t.cm,e,r):pa(t,e,r),Ha(t,n,j),t.cantEdit&&Xa(t,ae(t.firstLine(),0))&&(t.cantEdit=!1)}}function no(t,e,n){var r=t.doc,i=t.display,a=e.from,o=e.to,s=!1,c=a.line;t.options.lineWrapping||(c=ee(Je(Yt(r,a.line))),r.iter(c,o.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),r.sel.contains(e.from,e.to)>-1&&vt(t),pa(r,e,n,Or(t)),t.options.lineWrapping||(r.iter(c,a.line+e.text.length,(function(t){var e=sn(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),_e(r,a.line),Fi(t,400);var l=e.text.length-(o.line-a.line)-1;e.full?Pr(t):a.line!=o.line||1!=e.text.length||ga(t.doc,e)?Pr(t,a.line,o.line+1,l):Rr(t,a.line,"text");var u=yt(t,"changes"),h=yt(t,"change");if(h||u){var f={from:a,to:o,text:e.text,removed:e.removed,origin:e.origin};h&&Sn(t,"change",t,f),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(f)}t.display.selForContextMenu=null}function ro(t,e,n,r,i){var a;r||(r=n),oe(r,n)<0&&(n=(a=[r,n])[0],r=a[1]),"string"==typeof e&&(e=t.splitLines(e)),Ya(t,{from:n,to:r,text:e,origin:i})}function io(t,e,n,r){n1||!(this.children[0]instanceof co))){var s=[];this.collapse(s),this.children=[new co(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var o=i.lines.length%25+25,s=o;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=0;r0||0==o&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=L("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Ye(t,e.line,e,n,a)||e.line!=n.line&&Ye(t,n.line,e,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Me()}a.addToHistory&&Ea(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,c=e.line,l=t.cm;if(t.iter(c,n.line+1,(function(t){l&&a.collapsed&&!l.options.lineWrapping&&Je(t)==l.display.maxLine&&(s=!0),a.collapsed&&c!=e.line&&te(t,0),Ne(t,new Oe(a,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c})),a.collapsed&&t.iter(e.line,n.line+1,(function(e){rn(t,e)&&te(e,0)})),a.clearOnEnter&&At(a,"beforeCursorEnter",(function(){return a.clear()})),a.readOnly&&(Ie(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++Ao,a.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),a.collapsed)Pr(l,e.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var u=e.line;u<=n.line;u++)Rr(l,u,"text");a.atomic&&Ka(l.doc),Sn(l,"markerAdded",l,a)}return a}go.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Ci(t),yt(this,"clear")){var n=this.find();n&&Sn(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;at.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&Pr(t,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ka(t.doc)),t&&Sn(t,"markerCleared",t,this,r,i),e&&xi(t),this.parent&&this.parent.clear()}},go.prototype.find=function(t,e){var n,r;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;c--)Ya(this,r[c]);s?Ua(this,s):this.cm&&si(this.cm)})),undo:Di((function(){Za(this,"undo")})),redo:Di((function(){Za(this,"redo")})),undoSelection:Di((function(){Za(this,"undo",!0)})),redoSelection:Di((function(){Za(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=fe(this,t),e=fe(this,e);var r=[],i=t.line;return this.iter(t.line,e.line+1,(function(a){var o=a.markedSpans;if(o)for(var s=0;s=c.to||null==c.from&&i!=t.line||null!=c.from&&i==e.line&&c.from>=e.ch||n&&!n(c.marker)||r.push(c.marker.parent||c.marker)}++i})),r},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var r=0;rt)return e=t,!0;t-=a,++n})),fe(this,ae(n,e))},indexFromPos:function(t){var e=(t=fe(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var f;if(e.state.draggingText&&!e.state.draggingText.copy&&(f=e.listSelections()),Ha(e.doc,sa(n,n)),f)for(var d=0;d=0;e--)ro(t.doc,"",r[e].from,r[e].to,"+delete");si(t)}))}function Xo(t,e,n){var r=ot(t.text,e+n,n);return r<0||r>t.text.length?null:r}function Vo(t,e,n){var r=Xo(t,e.ch,n);return null==r?null:new ae(e.line,r,n<0?"after":"before")}function Wo(t,e,n,r,i){if(t){"rtl"==e.doc.direction&&(i=-i);var a=ft(n,e.doc.direction);if(a){var o,s=i<0?W(a):a[0],c=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var l=nr(e,n);o=i<0?n.text.length-1:0;var u=rr(e,l,o).top;o=st((function(t){return rr(e,l,t).top==u}),i<0==(1==s.level)?s.from:s.to-1,o),"before"==c&&(o=Xo(n,o,1))}else o=i<0?s.to:s.from;return new ae(r,o,c)}}return new ae(r,i<0?n.text.length:0,i<0?"before":"after")}function qo(t,e,n,r){var i=ft(e,t.doc.direction);if(!i)return Vo(e,n,r);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=ut(i,n.ch,n.sticky),o=i[a];if("ltr"==t.doc.direction&&o.level%2==0&&(r>0?o.to>n.ch:o.from=o.from&&f>=u.begin)){var d=h?"before":"after";return new ae(n.line,f,d)}}var A=function(t,e,r){for(var a=function(t,e){return e?new ae(n.line,c(t,1),"before"):new ae(n.line,t,"after")};t>=0&&t0==(1!=o.level),l=s?r.begin:c(r.end,-1);if(o.from<=l&&l0?u.end:c(u.begin,-1);return null==p||r>0&&p==e.text.length||!(g=A(r>0?0:i.length-1,r,l(p)))?null:g}Ro.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ro.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ro.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ro.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ro.default=b?Ro.macDefault:Ro.pcDefault;var Yo={selectAll:Wa,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),j)},killLine:function(t){return Go(t,(function(e){if(e.empty()){var n=Yt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)i=new ae(i.line,i.ch+1),t.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),ae(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var o=Yt(t.doc,i.line-1).text;o&&(i=new ae(i.line,1),t.replaceRange(a.charAt(0)+t.doc.lineSeparator()+o.charAt(o.length-1),ae(i.line-1,o.length-1),i,"+transpose"))}n.push(new aa(i,i))}t.setSelections(n)}))},newlineAndIndent:function(t){return Ii(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;r-1&&(oe((i=s.ranges[i]).from(),e)<0||e.xRel>0)&&(oe(i.to(),e)>0||e.xRel<0)?ks(t,r,e,a):xs(t,r,e,a)}function ks(t,e,n,r){var i=t.display,a=!1,l=Mi(t,(function(e){c&&(i.scroller.draggable=!1),t.state.draggingText=!1,pt(i.wrapper.ownerDocument,"mouseup",l),pt(i.wrapper.ownerDocument,"mousemove",u),pt(i.scroller,"dragstart",h),pt(i.scroller,"drop",l),a||(kt(e),r.addNew||Fa(t.doc,n,null,null,r.extend),c&&!f||o&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(t){a=a||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return a=!0};c&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),At(i.wrapper.ownerDocument,"mouseup",l),At(i.wrapper.ownerDocument,"mousemove",u),At(i.scroller,"dragstart",h),At(i.scroller,"drop",l),qr(t),setTimeout((function(){return i.input.focus()}),20)}function Cs(t,e,n){if("char"==n)return new aa(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new aa(ae(e.line,0),fe(t.doc,ae(e.line+1,0)));var r=n(t,e);return new aa(r.from,r.to)}function xs(t,e,n,r){var i=t.display,a=t.doc;kt(e);var o,s,c=a.sel,l=c.ranges;if(r.addNew&&!r.extend?(s=a.sel.contains(n),o=s>-1?l[s]:new aa(n,n)):(o=a.sel.primary(),s=a.sel.primIndex),"rectangle"==r.unit)r.addNew||(o=new aa(n,n)),n=Fr(t,e,!0,!0),s=-1;else{var u=Cs(t,n,r.unit);o=r.extend?Da(o,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=l.length,$a(a,oa(t,l.concat([o]),s),{scroll:!1,origin:"*mouse"})):l.length>1&&l[s].empty()&&"char"==r.unit&&!r.extend?($a(a,oa(t,l.slice(0,s).concat(l.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),c=a.sel):Pa(a,s,o,K):(s=0,$a(a,new ia([o],0),K),c=a.sel);var h=n;function f(e){if(0!=oe(h,e))if(h=e,"rectangle"==r.unit){for(var i=[],l=t.options.tabSize,u=R(Yt(a,n.line).text,n.ch,l),f=R(Yt(a,e.line).text,e.ch,l),d=Math.min(u,f),A=Math.max(u,f),g=Math.min(n.line,e.line),p=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=p;g++){var m=Yt(a,g).text,b=G(m,d,l);d==A?i.push(new aa(ae(g,b),ae(g,b))):m.length>b&&i.push(new aa(ae(g,b),ae(g,G(m,A,l))))}i.length||i.push(new aa(n,n)),$a(a,oa(t,c.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var v,y=o,w=Cs(t,e,r.unit),k=y.anchor;oe(w.anchor,k)>0?(v=w.head,k=ue(y.from(),w.anchor)):(v=w.anchor,k=le(y.to(),w.head));var C=c.ranges.slice(0);C[s]=Es(t,new aa(fe(a,k),v)),$a(a,oa(t,C,s),K)}}var d=i.wrapper.getBoundingClientRect(),A=0;function g(e){var n=++A,o=Fr(t,e,!0,"rectangle"==r.unit);if(o)if(0!=oe(o,h)){t.curOp.focus=M(),f(o);var s=ei(i,a);(o.line>=s.to||o.lined.bottom?20:0;c&&setTimeout(Mi(t,(function(){A==n&&(i.scroller.scrollTop+=c,g(e))})),50)}}function p(e){t.state.selectingText=!1,A=1/0,e&&(kt(e),i.input.focus()),pt(i.wrapper.ownerDocument,"mousemove",m),pt(i.wrapper.ownerDocument,"mouseup",b),a.history.lastSelOrigin=null}var m=Mi(t,(function(t){0!==t.buttons&&Bt(t)?g(t):p(t)})),b=Mi(t,p);t.state.selectingText=b,At(i.wrapper.ownerDocument,"mousemove",m),At(i.wrapper.ownerDocument,"mouseup",b)}function Es(t,e){var n=e.anchor,r=e.head,i=Yt(t.doc,n.line);if(0==oe(n,r)&&n.sticky==r.sticky)return e;var a=ft(i);if(!a)return e;var o=ut(a,n.ch,n.sticky),s=a[o];if(s.from!=n.ch&&s.to!=n.ch)return e;var c,l=o+(s.from==n.ch==(1!=s.level)?0:1);if(0==l||l==a.length)return e;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=ut(a,r.ch,r.sticky),h=u-o||(r.ch-n.ch)*(1==s.level?-1:1);c=u==l-1||u==l?h<0:h>0}var f=a[l+(c?-1:0)],d=c==(1==f.level),A=d?f.from:f.to,g=d?"after":"before";return n.ch==A&&n.sticky==g?e:new aa(new ae(n.line,A,g),r)}function Ts(t,e,n,r){var i,a;if(e.touches)i=e.touches[0].clientX,a=e.touches[0].clientY;else try{i=e.clientX,a=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&kt(e);var o=t.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!yt(t,n))return xt(e);a-=s.top-o.viewOffset;for(var c=0;c=i)return mt(t,n,t,ne(t.doc,a),t.display.gutterSpecs[c].className,e),xt(e)}}function Bs(t,e){return Ts(t,e,"gutterClick",!0)}function _s(t,e){Kn(t.display,e)||Ss(t,e)||bt(t,e,"contextmenu")||C||t.display.input.onContextMenu(e)}function Ss(t,e){return!!yt(t,"gutterContextMenu")&&Ts(t,e,"gutterContextMenu",!1)}function Ls(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),fr(t)}ps.prototype.compare=function(t,e,n){return this.time+gs>t&&0==oe(e,this.pos)&&n==this.button};var Is={toString:function(){return"CodeMirror.Init"}},Ms={},Os={};function Ds(t){var e=t.optionHandlers;function n(n,r,i,a){t.defaults[n]=r,i&&(e[n]=a?function(t,e,n){n!=Is&&i(t,e,n)}:i)}t.defineOption=n,t.Init=Is,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,da(t)}),!0),n("indentUnit",2,da,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){Aa(t),fr(t),Pr(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var a=t.text.indexOf(e,i);if(-1==a)break;i=a+e.length,n.push(ae(r,a))}r++}));for(var i=n.length-1;i>=0;i--)ro(t.doc,e,n[i],ae(n[i].line,n[i].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Is&&t.refresh()})),n("specialCharPlaceholder",pn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!y),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ls(t),Yi(t)}),!0),n("keyMap","default",(function(t,e,n){var r=zo(e),i=n!=Is&&zo(n);i&&i.detach&&i.detach(t,r),r.attach&&r.attach(t,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ns,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=Wi(e,t.options.lineNumbers),Yi(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Mr(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return bi(t)}),!0),n("scrollbarStyle","native",(function(t){wi(t),bi(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Wi(t.options.gutters,e),Yi(t)}),!0),n("firstLineNumber",1,Yi,!0),n("lineNumberFormatter",(function(t){return t}),Yi,!0),n("showCursorWhenSelecting",!1,jr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Jr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Fs),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,jr,!0),n("singleCursorHeightPerLine",!0,jr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Aa,!0),n("addModeClass",!1,Aa,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,Aa,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}function Fs(t,e,n){if(!e!=!(n&&n!=Is)){var r=t.display.dragFunctions,i=e?At:pt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function Ns(t){t.options.lineWrapping?(O(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(T(t.display.wrapper,"CodeMirror-wrap"),cn(t)),Dr(t),Pr(t),fr(t),setTimeout((function(){return bi(t)}),100)}function Ps(t,e){var n=this;if(!(this instanceof Ps))return new Ps(t,e);this.options=e=e?P(e):{},P(Ms,e,!1);var r=e.value;"string"==typeof r?r=new Co(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new Ps.inputStyles[e.inputStyle](this),a=this.display=new Ji(t,r,i,e);for(var l in a.wrapper.CodeMirror=this,Ls(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Q,keySeq:null,specialChars:null},e.autofocus&&!m&&a.input.focus(),o&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Rs(this),Io(),Ci(this),this.curOp.forceUpdate=!0,ba(this,r),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Yr(n)}),20):Jr(this),Os)Os.hasOwnProperty(l)&&Os[l](this,e[l],Is);Vi(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}At(e.scroller,"touchstart",(function(i){if(!bt(t,i)&&!a(i)&&!Bs(t,i)){e.input.ensurePolled(),clearTimeout(n);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),At(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),At(e.scroller,"touchend",(function(n){var r=e.activeTouch;if(r&&!Kn(e,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,o=t.coordsChar(e.activeTouch,"page");a=!r.prev||c(r,r.prev)?new aa(o,o):!r.prev.prev||c(r,r.prev.prev)?t.findWordAt(o):new aa(ae(o.line,0),fe(t.doc,ae(o.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),kt(n)}i()})),At(e.scroller,"touchcancel",i),At(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(fi(t,e.scroller.scrollTop),Ai(t,e.scroller.scrollLeft,!0),mt(t,"scroll",t))})),At(e.scroller,"mousewheel",(function(e){return ra(t,e)})),At(e.scroller,"DOMMouseScroll",(function(e){return ra(t,e)})),At(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){bt(t,e)||Et(e)},over:function(e){bt(t,e)||(Bo(t,e),Et(e))},start:function(e){return To(t,e)},drop:Mi(t,Eo),leave:function(e){bt(t,e)||_o(t)}};var l=e.input.getField();At(l,"keyup",(function(e){return hs.call(t,e)})),At(l,"keydown",Mi(t,ls)),At(l,"keypress",Mi(t,fs)),At(l,"focus",(function(e){return Yr(t,e)})),At(l,"blur",(function(e){return Jr(t,e)}))}Ps.defaults=Ms,Ps.optionHandlers=Os;var Qs=[];function Us(t,e,n,r){var i,a=t.doc;null==n&&(n="add"),"smart"==n&&(a.mode.indent?i=ve(t,e).state:n="prev");var o=t.options.tabSize,s=Yt(a,e),c=R(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var l,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((l=a.mode.indent(i,s.text.slice(u.length),s.text))==H||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=e>a.first?R(Yt(a,e-1).text,null,o):0:"add"==n?l=c+t.options.indentUnit:"subtract"==n?l=c-t.options.indentUnit:"number"==typeof n&&(l=c+n),l=Math.max(0,l);var h="",f=0;if(t.options.indentWithTabs)for(var d=Math.floor(l/o);d;--d)f+=o,h+="\t";if(fo,c=Dt(e),l=null;if(s&&r.ranges.length>1)if($s&&$s.text.join("\n")==e){if(r.ranges.length%$s.text.length==0){l=[];for(var u=0;u<$s.text.length;u++)l.push(a.splitLines($s.text[u]))}}else c.length==r.ranges.length&&t.options.pasteLinesPerSelection&&(l=q(c,(function(t){return[t]})));for(var h=t.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var d=r.ranges[f],A=d.from(),g=d.to();d.empty()&&(n&&n>0?A=ae(A.line,A.ch-n):t.state.overwrite&&!s?g=ae(g.line,Math.min(Yt(a,g.line).text.length,g.ch+W(c).length)):s&&$s&&$s.lineWise&&$s.text.join("\n")==c.join("\n")&&(A=g=ae(A.line,0)));var p={from:A,to:g,text:l?l[f%l.length]:c,origin:i||(s?"paste":t.state.cutIncoming>o?"cut":"+input")};Ya(t.doc,p),Sn(t,"inputRead",t,p)}e&&!s&&zs(t,e),si(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Ks(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Ii(e,(function(){return js(e,n,0,null,"paste")})),!0}function zs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=t.getModeAt(i.head),o=!1;if(a.electricChars){for(var s=0;s-1){o=Us(t,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Yt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Us(t,i.head.line,"smart"));o&&Sn(t,"electricInput",t,i.head.line)}}}function Gs(t){for(var e=[],n=[],r=0;rn&&(Us(this,i.head.line,t,!0),n=i.head.line,r==this.doc.sel.primIndex&&si(this));else{var a=i.from(),o=i.to(),s=Math.max(n,a.line);n=Math.min(this.lastLine(),o.line-(o.ch?0:1))+1;for(var c=s;c0&&Pa(this.doc,r,new aa(a,l[r].to()),j)}}})),getTokenAt:function(t,e){return xe(this,t,e)},getLineTokens:function(t,e){return xe(this,ae(t),e,!0)},getTokenTypeAt:function(t){t=fe(this.doc,t);var e,n=be(this,Yt(this.doc,t.line)),r=0,i=(n.length-1)/2,a=t.ch;if(0==a)e=n[2];else for(;;){var o=r+i>>1;if((o?n[2*o-1]:0)>=a)i=o;else{if(!(n[2*o+1]a&&(t=a,i=!0),r=Yt(this.doc,t)}else r=t;return pr(this,r,{top:0,left:0},e||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return Sr(this.display)},defaultCharWidth:function(){return Lr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,i){var a=this.display,o=(t=vr(this,fe(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==r)o=t.top;else if("above"==r||"near"==r){var c=Math.max(a.wrapper.clientHeight,this.doc.height),l=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>c)&&t.top>e.offsetHeight?o=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=c&&(o=t.bottom),s+e.offsetWidth>l&&(s=l-e.offsetWidth)}e.style.top=o+"px",e.style.left=e.style.right="","right"==i?(s=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&ii(this,{left:s,top:o,right:s+e.offsetWidth,bottom:o+e.offsetHeight})},triggerOnKeyDown:Oi(ls),triggerOnKeyPress:Oi(fs),triggerOnKeyUp:hs,triggerOnMouseDown:Oi(bs),execCommand:function(t){if(Yo.hasOwnProperty(t))return Yo[t].call(null,this)},triggerElectric:Oi((function(t){zs(this,t)})),findPosH:function(t,e,n,r){var i=1;e<0&&(i=-1,e=-e);for(var a=fe(this.doc,t),o=0;o0&&o(e.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&Dr(this),mt(this,"refresh",this)})),swapDoc:Oi((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),ba(this,t),fr(this),this.display.input.reset(),ci(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Sn(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},wt(t),t.registerHelper=function(e,r,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=i},t.registerGlobalHelper=function(e,r,i,a){t.registerHelper(e,r,a),n[e]._global.push({pred:i,val:a})}}function qs(t,e,n,r,i){var a=e,o=n,s=Yt(t,e.line),c=i&&"rtl"==t.direction?-n:n;function l(){var n=e.line+c;return!(n=t.first+t.size)&&(e=new ae(n,e.ch,e.sticky),s=Yt(t,n))}function u(a){var o;if("codepoint"==r){var u=s.text.charCodeAt(e.ch+(r>0?0:-1));o=isNaN(u)?null:new ae(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else o=i?qo(t.cm,s,e,n):Vo(s,e,n);if(null==o){if(a||!l())return!1;e=Wo(i,t.cm,s,e.line,c)}else e=o;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var h=null,f="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),A=!0;!(n<0)||u(!A);A=!1){var g=s.text.charAt(e.ch)||"\n",p=nt(g,d)?"w":f&&"\n"==g?"n":!f||/\s/.test(g)?null:"p";if(!f||A||p||(p="s"),h&&h!=p){n<0&&(n=1,u(),e.sticky="after");break}if(p&&(h=p),n>0&&!u(!A))break}var m=Xa(t,e,a,o,!0);return se(a,m)&&(m.hitSide=!0),m}function Ys(t,e,n,r){var i,a,o=t.doc,s=e.left;if("page"==r){var c=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(c-.5*Sr(t.display),3);i=(n>0?e.bottom:e.top)+n*l}else"line"==r&&(i=n>0?e.bottom+3:e.top-3);for(;(a=kr(t,s,i)).outside;){if(n<0?i<=0:i>=o.height){a.hitSide=!0;break}i+=5*n}return a}var Js=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Q,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Zs(t,e){var n=er(t,e.line);if(!n||n.hidden)return null;var r=Yt(t.doc,e.line),i=Jn(n,r,e.line),a=ft(r,t.doc.direction),o="left";a&&(o=ut(a,e.ch)%2?"right":"left");var s=or(i.map,e.ch,o);return s.offset="right"==s.collapse?s.end:s.start,s}function tc(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function ec(t,e){return e&&(t.bad=!0),t}function nc(t,e,n,r,i){var a="",o=!1,s=t.doc.lineSeparator(),c=!1;function l(t){return function(e){return e.id==t}}function u(){o&&(a+=s,c&&(a+=s),o=c=!1)}function h(t){t&&(u(),a+=t)}function f(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void h(n);var a,d=e.getAttribute("cm-marker");if(d){var A=t.findMarks(ae(r,0),ae(i+1,0),l(+d));return void(A.length&&(a=A[0].find(0))&&h(Jt(t.doc,a.from,a.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&u();for(var p=0;p=e.display.viewTo||a.line=e.display.viewFrom&&Zs(e,i)||{node:c[0].measure.map[2],offset:0},u=a.liner.firstLine()&&(o=ae(o.line-1,Yt(r.doc,o.line-1).length)),s.ch==Yt(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;o.line==i.viewFrom||0==(t=Nr(r,o.line))?(e=ee(i.view[0].line),n=i.view[0].node):(e=ee(i.view[t].line),n=i.view[t-1].node.nextSibling);var c,l,u=Nr(r,s.line);if(u==i.view.length-1?(c=i.viewTo-1,l=i.lineDiv.lastChild):(c=ee(i.view[u+1].line)-1,l=i.view[u+1].node.previousSibling),!n)return!1;for(var h=r.doc.splitLines(nc(r,n,l,e,c)),f=Jt(r.doc,ae(e,0),ae(c,Yt(r.doc,c).text.length));h.length>1&&f.length>1;)if(W(h)==W(f))h.pop(),f.pop(),c--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),e++}for(var d=0,A=0,g=h[0],p=f[0],m=Math.min(g.length,p.length);do.ch&&b.charCodeAt(b.length-A-1)==v.charCodeAt(v.length-A-1);)d--,A++;h[h.length-1]=b.slice(0,b.length-A).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var w=ae(e,d),k=ae(c,f.length?W(f).length-A:0);return h.length>1||h[0]||oe(w,k)?(ro(r.doc,h,w,k,"+input"),!0):void 0},Js.prototype.ensurePolled=function(){this.forceCompositionEnd()},Js.prototype.reset=function(){this.forceCompositionEnd()},Js.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Js.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Js.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Ii(this.cm,(function(){return Pr(t.cm)}))},Js.prototype.setUneditable=function(t){t.contentEditable="false"},Js.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Mi(this.cm,js)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Js.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Js.prototype.onContextMenu=function(){},Js.prototype.resetPosition=function(){},Js.prototype.needsContentAttribute=!0;var ac=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new Q,this.hasSelection=!1,this.composing=null};function oc(t,e){if((e=e?P(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=M();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function r(){t.value=s.getValue()}var i;if(t.form&&(At(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var a=t.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(t){}}e.finishInit=function(n){n.save=r,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,r(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(pt(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ps((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s}function sc(t){t.off=pt,t.on=At,t.wheelEventPixels=na,t.Doc=Co,t.splitLines=Dt,t.countColumn=R,t.findColumn=G,t.isWordChar=et,t.Pass=H,t.signal=mt,t.Line=ln,t.changeEnd=ca,t.scrollbarModel=yi,t.Pos=ae,t.cmpPos=oe,t.modes=Qt,t.mimeModes=Ut,t.resolveMode=jt,t.getMode=Kt,t.modeExtensions=zt,t.extendMode=Gt,t.copyState=Xt,t.startState=Wt,t.innerMode=Vt,t.commands=Yo,t.keyMap=Ro,t.keyName=Ko,t.isModifierKey=Ho,t.lookupKey=$o,t.normalizeKeyMap=Uo,t.StringStream=qt,t.SharedTextMarker=mo,t.TextMarker=go,t.LineWidget=uo,t.e_preventDefault=kt,t.e_stopPropagation=Ct,t.e_stop=Et,t.addClass=O,t.contains=I,t.rmClass=T,t.keyNames=Do}ac.prototype.init=function(t){var e=this,n=this,r=this.cm;this.createField(t);var i=this.textarea;function a(t){if(!bt(r,t)){if(r.somethingSelected())Hs({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var e=Gs(r);Hs({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,j):(n.prevInput="",i.value=e.text.join("\n"),F(i))}"cut"==t.type&&(r.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),g&&(i.style.width="0px"),At(i,"input",(function(){o&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),At(i,"paste",(function(t){bt(r,t)||Ks(t,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),At(i,"cut",a),At(i,"copy",a),At(t.scroller,"paste",(function(e){if(!Kn(t,e)&&!bt(r,e)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var a=new Event("paste");a.clipboardData=e.clipboardData,i.dispatchEvent(a)}})),At(t.lineSpace,"selectstart",(function(e){Kn(t,e)||kt(e)})),At(i,"compositionstart",(function(){var t=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}})),At(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ac.prototype.createField=function(t){this.wrapper=Vs(),this.textarea=this.wrapper.firstChild},ac.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},ac.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,r=Kr(t);if(t.options.moveInputWithCursor){var i=vr(t,n.sel.primary().head,"div"),a=e.wrapper.getBoundingClientRect(),o=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},ac.prototype.showSelection=function(t){var e=this.cm.display;_(e.cursorDiv,t.cursors),_(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},ac.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&F(this.textarea),o&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",o&&s>=9&&(this.hasSelection=null))}},ac.prototype.getField=function(){return this.textarea},ac.prototype.supportsTouch=function(){return!1},ac.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||M()!=this.textarea))try{this.textarea.focus()}catch(t){}},ac.prototype.blur=function(){this.textarea.blur()},ac.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ac.prototype.receivedFocus=function(){this.slowPoll()},ac.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},ac.prototype.fastPoll=function(){var t=!1,e=this;function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},ac.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||Ft(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==r&&!e.somethingSelected())return!1;if(o&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var a=i.charCodeAt(0);if(8203!=a||r||(r="​"),8666==a)return this.reset(),this.cm.execCommand("undo")}for(var c=0,l=Math.min(r.length,i.length);c1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ac.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ac.prototype.onKeyPress=function(){o&&s>=9&&(this.hasSelection=null),this.fastPoll()},ac.prototype.onContextMenu=function(t){var e=this,n=e.cm,r=n.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var a=Fr(n,t),l=r.scroller.scrollTop;if(a&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(a)&&Mi(n,$a)(n.doc,sa(a),j);var u,f=i.style.cssText,d=e.wrapper.style.cssText,A=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-A.top-5)+"px; left: "+(t.clientX-A.left-5)+"px;\n z-index: 1000; background: "+(o?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",c&&(u=window.scrollY),r.input.focus(),c&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),o&&s>=9&&p(),C){Et(t);var g=function(){pt(window,"mouseup",g),setTimeout(m,20)};At(window,"mouseup",g)}else setTimeout(m,50)}function p(){if(null!=i.selectionStart){var t=n.somethingSelected(),a="​"+(t?i.value:"");i.value="⇚",i.value=a,e.prevInput=t?"":"​",i.selectionStart=1,i.selectionEnd=a.length,r.selForContextMenu=n.doc.sel}}function m(){if(e.contextMenuPending==m&&(e.contextMenuPending=!1,e.wrapper.style.cssText=d,i.style.cssText=f,o&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),null!=i.selectionStart)){(!o||o&&s<9)&&p();var t=0,a=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==e.prevInput?Mi(n,Wa)(n):t++<10?r.detectingSelectAll=setTimeout(a,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(a,200)}}},ac.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},ac.prototype.setUneditable=function(){},ac.prototype.needsContentAttribute=!1,Ds(Ps),Ws(Ps);var cc="iter insert remove copy getEditor constructor".split(" ");for(var lc in Co.prototype)Co.prototype.hasOwnProperty(lc)&&U(cc,lc)<0&&(Ps.prototype[lc]=function(t){return function(){return t.apply(this.doc,arguments)}}(Co.prototype[lc]));return wt(Co),Ps.inputStyles={textarea:ac,contenteditable:Js},Ps.defineMode=function(t){Ps.defaults.mode||"null"==t||(Ps.defaults.mode=t),$t.apply(this,arguments)},Ps.defineMIME=Ht,Ps.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Ps.defineMIME("text/plain","null"),Ps.defineExtension=function(t,e){Ps.prototype[t]=e},Ps.defineDocExtension=function(t,e){Co.prototype[t]=e},Ps.fromTextArea=oc,sc(Ps),Ps.version="5.58.2",Ps}()}));r((function(t,e){var n,r,i;r={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},i={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1},(n=Wh).defineMode("xml",(function(t,e){var a,o,s=t.indentUnit,c={},l=e.htmlMode?r:i;for(var u in l)c[u]=l[u];for(var u in e)c[u]=e[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(A("atom","]]>")):null:t.match("--")?n(A("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(g(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=A("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,a=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return a="equals",null;if("<"==n){e.tokenize=h,e.state=v,e.tagName=e.tagStart=null;var r=e.tokenize(t,e);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=d(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=f;break}return"string"};return e.isInAttribute=!0,e}function A(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=h;break}n.next()}return t}}function g(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=g(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=h;break}return n.tokenize=g(t-1),n.tokenize(e,n)}}return"meta"}}function p(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(c.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function b(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!c.contextGrabbers.hasOwnProperty(n)||!c.contextGrabbers[n].hasOwnProperty(e))return;m(t)}}function v(t,e,n){return"openTag"==t?(n.tagStart=e.column(),y):"closeTag"==t?w:v}function y(t,e,n){return"word"==t?(n.tagName=e.current(),o="tag",x):c.allowMissingTagName&&"endTag"==t?(o="tag bracket",x(t,e,n)):(o="error",y)}function w(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&c.implicitlyClosed.hasOwnProperty(n.context.tagName)&&m(n),n.context&&n.context.tagName==r||!1===c.matchClosing?(o="tag",k):(o="tag error",C)}return c.allowMissingTagName&&"endTag"==t?(o="tag bracket",k(t,e,n)):(o="error",C)}function k(t,e,n){return"endTag"!=t?(o="error",k):(m(n),v)}function C(t,e,n){return o="error",k(t,e,n)}function x(t,e,n){if("word"==t)return o="attribute",E;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||c.autoSelfClosers.hasOwnProperty(r)?b(n,r):(b(n,r),n.context=new p(n,r,i==n.indented)),v}return o="error",x}function E(t,e,n){return"equals"==t?T:(c.allowMissing||(o="error"),x(t,e,n))}function T(t,e,n){return"string"==t?B:"word"==t&&c.allowUnquoted?(o="string",x):(o="error",x(t,e,n))}function B(t,e,n){return"string"==t?B:x(t,e,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;a=null;var n=e.tokenize(t,e);return(n||a)&&"comment"!=n&&(o=null,e.state=e.state(a||n,t,e),o&&(n="error"==o?n+" error":o)),n},indent:function(t,e,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return n.Pass;if(t.tokenize!=f&&t.tokenize!=h)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==c.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(c.multilineTagIndentFactor||1);if(c.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:c.htmlMode?"html":"xml",helperType:c.htmlMode?"html":"xml",skipAttribute:function(t){t.state==T&&(t.state=x)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),n.defineMIME("text/xml","xml"),n.defineMIME("application/xml","xml"),n.mimeModes.hasOwnProperty("text/html")||n.defineMIME("text/html",{name:"xml",htmlMode:!0})})),r((function(t,e){!function(t){t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e-1&&e.substring(i+1,e.length);if(a)return t.findModeByExtension(a)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n` "'(~:]+/,A=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,g=/^\s*\[[^\]]+?\]:.*$/,p=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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\u0AF0\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-\u2E42\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]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,m=" ";function b(t,e,n){return e.f=e.inline=n,n(t,e)}function v(t,e,n){return e.f=e.block=n,n(t,e)}function y(t){return!t||!/\S/.test(t.string)}function w(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==C){var e=i;if(!e){var a=n.innerMode(r,t.htmlState);e="xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText}e&&(t.f=B,t.block=k,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function k(t,r){var i=t.column()===r.indentation,s=y(r.prevLine.stream),d=r.indentedCode,p=r.prevLine.hr,m=!1!==r.list,v=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var w=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,m)){for(r.list=null;w=4&&(d||r.prevLine.fencedCodeEnd||r.prevLine.header||s))return t.skipToEnd(),r.indentedCode=!0,o.code;if(t.eatSpace())return null;if(i&&r.indentation<=v&&(T=t.match(h))&&T[1].length<=6)return r.quote=0,r.header=T[1].length,r.thisLine.header=!0,e.highlightFormatting&&(r.formatting="header"),r.f=r.inline,E(r);if(r.indentation<=v&&t.eat(">"))return r.quote=i?1:r.quote+1,e.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),E(r);if(!C&&!r.setext&&i&&r.indentation<=v&&(T=t.match(l))){var B=T[1]?"ol":"ul";return r.indentation=w+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,e.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,e.highlightFormatting&&(r.formatting=["list","list-"+B]),E(r)}return i&&r.indentation<=v&&(T=t.match(A,!0))?(r.quote=0,r.fencedEndRE=new RegExp(T[1]+"+ *$"),r.localMode=e.fencedCodeBlockHighlighting&&a(T[2]||e.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=n.startState(r.localMode)),r.f=r.block=x,e.highlightFormatting&&(r.formatting="code-block"),r.code=-1,E(r)):r.setext||!(k&&m||r.quote||!1!==r.list||r.code||C||g.test(t.string))&&(T=t.lookAhead(1))&&(T=T.match(f))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),e.highlightFormatting&&(r.formatting="header")):(r.header="="==T[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,E(r)):C?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr):"["===t.peek()?b(t,r,M):b(t,r,r.inline)}function C(t,e){var a=r.token(t,e.htmlState);if(!i){var o=n.innerMode(r,e.htmlState);("xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText||e.md_inside&&t.current().indexOf(">")>-1)&&(e.f=B,e.block=k,e.htmlState=null)}return a}function x(t,n){var r,i=n.listStack[n.listStack.length-1]||0,a=n.indentation=t.quote?n.push(o.formatting+"-"+t.formatting[r]+"-"+t.quote):n.push("error"))}if(t.taskOpen)return n.push("meta"),n.length?n.join(" "):null;if(t.taskClosed)return n.push("property"),n.length?n.join(" "):null;if(t.linkHref?n.push(o.linkHref,"url"):(t.strong&&n.push(o.strong),t.em&&n.push(o.em),t.strikethrough&&n.push(o.strikethrough),t.emoji&&n.push(o.emoji),t.linkText&&n.push(o.linkText),t.code&&n.push(o.code),t.image&&n.push(o.image),t.imageAltText&&n.push(o.imageAltText,"link"),t.imageMarker&&n.push(o.imageMarker)),t.header&&n.push(o.header,o.header+"-"+t.header),t.quote&&(n.push(o.quote),!e.maxBlockquoteDepth||e.maxBlockquoteDepth>=t.quote?n.push(o.quote+"-"+t.quote):n.push(o.quote+"-"+e.maxBlockquoteDepth)),!1!==t.list){var i=(t.listStack.length-1)%3;i?1===i?n.push(o.list2):n.push(o.list3):n.push(o.list1)}return t.trailingSpaceNewLine?n.push("trailing-space-new-line"):t.trailingSpace&&n.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),n.length?n.join(" "):null}function T(t,e){if(t.match(d,!0))return E(e)}function B(t,i){var a=i.text(t,i);if(void 0!==a)return a;if(i.list)return i.list=null,E(i);if(i.taskList)return" "===t.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,e.highlightFormatting&&(i.formatting="task"),i.taskList=!1,E(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return e.highlightFormatting&&(i.formatting="header"),E(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;"("===s&&(c=")");var l="^\\s*(?:[^"+(c=(c+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+c;if(t.match(new RegExp(l),!0))return o.linkHref}if("`"===s){var h=i.formatting;e.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var f=t.current().length;if(0!=i.code||i.quote&&1!=f){if(f==i.code){var d=E(i);return i.code=0,d}return i.formatting=h,E(i)}return i.code=f,E(i)}if(i.code)return E(i);if("\\"===s&&(t.next(),e.highlightFormatting)){var A=E(i),g=o.formatting+"-escape";return A?A+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,e.highlightFormatting&&(i.formatting="image"),E(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,e.highlightFormatting&&(i.formatting="image"),E(i);if("]"===s&&i.imageAltText){e.highlightFormatting&&(i.formatting="image");var A=E(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=S,A}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,e.highlightFormatting&&(i.formatting="link")),E(i);if("]"===s&&i.linkText){e.highlightFormatting&&(i.formatting="link");var A=E(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?S:B,A}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=_,e.highlightFormatting&&(i.formatting="link"),(A=E(i))?A+=" ":A="",A+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=_,e.highlightFormatting&&(i.formatting="link"),(A=E(i))?A+=" ":A="",A+o.linkEmail;if(e.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var m=t.string.indexOf(">",t.pos);if(-1!=m){var b=t.string.substring(t.start,m);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=n.startState(r),v(t,i,C)}if(e.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var y=1,w=1==t.pos?" ":t.string.charAt(t.pos-2);y<3&&t.eat(s);)y++;var k=t.peek()||" ",x=!/\s/.test(k)&&(!p.test(k)||/\s/.test(w)||p.test(w)),T=!/\s/.test(w)&&(!p.test(w)||/\s/.test(k)||p.test(k)),L=null,I=null;if(y%2&&(i.em||!x||"*"!==s&&T&&!p.test(w)?i.em!=s||!T||"*"!==s&&x&&!p.test(k)||(L=!1):L=!0),y>1&&(i.strong||!x||"*"!==s&&T&&!p.test(w)?i.strong!=s||!T||"*"!==s&&x&&!p.test(k)||(I=!1):I=!0),null!=I||null!=L)return e.highlightFormatting&&(i.formatting=null==L?"strong":null==I?"em":"strong em"),!0===L&&(i.em=s),!0===I&&(i.strong=s),d=E(i),!1===L&&(i.em=!1),!1===I&&(i.strong=!1),d}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return E(i);t.backUp(1)}if(e.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return e.highlightFormatting&&(i.formatting="strikethrough"),d=E(i),i.strikethrough=!1,d;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,e.highlightFormatting&&(i.formatting="strikethrough"),E(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return E(i);t.backUp(2)}if(e.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,e.highlightFormatting&&(i.formatting="emoji");var M=E(i);return i.emoji=!1,M}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),E(i)}function _(t,n){if(">"===t.next()){n.f=n.inline=B,e.highlightFormatting&&(n.formatting="link");var r=E(n);return r?r+=" ":r="",r+o.linkInline}return t.match(/^[^>]+/,!0),o.linkInline}function S(t,n){if(t.eatSpace())return null;var r=t.next();return"("===r||"["===r?(n.f=n.inline=I("("===r?")":"]"),e.highlightFormatting&&(n.formatting="link-string"),n.linkHref=!0,E(n)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(t){return function(n,r){if(n.next()===t){r.f=r.inline=B,e.highlightFormatting&&(r.formatting="link-string");var i=E(r);return r.linkHref=!1,i}return n.match(L[t]),r.linkHref=!0,E(r)}}function M(t,n){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(n.f=O,t.next(),e.highlightFormatting&&(n.formatting="link"),n.linkText=!0,E(n)):b(t,n,B)}function O(t,n){if(t.match(/^\]:/,!0)){n.f=n.inline=D,e.highlightFormatting&&(n.formatting="link");var r=E(n);return n.linkText=!1,r}return t.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function D(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=B,o.linkHref+" url")}var F={startState:function(){return{f:k,prevLine:{stream:null},thisLine:{stream:null},block:k,htmlState:null,indentation:0,inline:B,text:T,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&n.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?n.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return w(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=C)){var n=t.match(/^\s*/,!0)[0].replace(/\t/g,m).length;if(e.indentation=n,e.indentationDiff=null,n>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==C?{state:t.htmlState,mode:r}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:F}},indent:function(t,e,i){return t.block==C&&r.indent?r.indent(t.htmlState,e,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,e,i):n.Pass},blankLine:w,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return F}),"xml"),n.defineMIME("text/markdown","markdown"),n.defineMIME("text/x-markdown","markdown")})),r((function(t,e){var n;(n=Wh).overlayMode=function(t,e,r){return{startState:function(){return{base:n.startState(t),overlay:n.startState(e),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:n.copyState(t,r.base),overlay:n.copyState(e,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(n,i){return(n!=i.streamSeen||Math.min(i.basePos,i.overlayPos)]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i,(n=Wh).defineMode("gfm",(function(t,e){var i=0;function a(t){return t.code=!1,null}var o={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(t){return{code:t.code,codeBlock:t.codeBlock,ateSpace:t.ateSpace}},token:function(t,n){if(n.combineTokens=null,n.codeBlock)return t.match(/^```+/)?(n.codeBlock=!1,null):(t.skipToEnd(),null);if(t.sol()&&(n.code=!1),t.sol()&&t.match(/^```+/))return t.skipToEnd(),n.codeBlock=!0,null;if("`"===t.peek()){t.next();var a=t.pos;t.eatWhile("`");var o=1+t.pos-a;return n.code?o===i&&(n.code=!1):(i=o,n.code=!0),null}if(n.code)return t.next(),null;if(t.eatSpace())return n.ateSpace=!0,null;if((t.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==e.gitHubSpice)){if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(t.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return t.match(r)&&"]("!=t.string.slice(t.start-2,t.start)&&(0==t.start||/\W/.test(t.string.charAt(t.start-1)))?(n.combineTokens=!0,"link"):(t.next(),null)},blankLine:a},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var c in e)s[c]=e[c];return s.name="markdown",n.overlayMode(n.getMode(t,s),o)}),"markdown"),n.defineMIME("text/x-gfm","gfm")}));r((function(t,e){var n;(n=Wh).defineMode("yaml",(function(){var t=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(e,n){var r=e.peek(),i=n.escaped;if(n.escaped=!1,"#"==r&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(n.literal&&e.indentation()>n.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return e.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),n.defineMIME("text/x-yaml","yaml"),n.defineMIME("text/yaml","yaml")}));r((function(t,e){var n,r,i,a;r=0,i=1,a=2,(n=Wh).defineMode("yaml-frontmatter",(function(t,e){var o=n.getMode(t,"yaml"),s=n.getMode(t,e&&e.base||"gfm");function c(t){return t.state==a?s:o}return{startState:function(){return{state:r,inner:n.startState(o)}},copyState:function(t){return{state:t.state,inner:n.copyState(c(t),t.inner)}},token:function(t,e){if(e.state==r)return t.match(/---/,!1)?(e.state=i,o.token(t,e.inner)):(e.state=a,e.inner=n.startState(s),s.token(t,e.inner));if(e.state==i){var c=t.sol()&&t.match(/(---|\.\.\.)/,!1),l=o.token(t,e.inner);return c&&(e.state=a,e.inner=n.startState(s)),l}return s.token(t,e.inner)},innerMode:function(t){return{mode:c(t),state:t.inner}},blankLine:function(t){var e=c(t);if(e.blankLine)return e.blankLine(t.inner)}}}))})),r((function(t,e){!function(t){var e=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(t,n){var r=n.line,i=0,a=0,o=e.exec(t.getLine(r)),s=o[1];do{var c=r+(i+=1),l=t.getLine(c),u=e.exec(l);if(u){var h=u[1],f=parseInt(o[3],10)+i-a,d=parseInt(u[3],10),A=d;if(s!==h||isNaN(d)){if(s.length>h.length)return;if(s.lengthd&&(A=f+1),t.replaceRange(l.replace(e,h+A+u[4]+u[5]),{line:c,ch:0},{line:c,ch:l.length})}}while(u)}t.commands.newlineAndIndentContinueMarkdownList=function(a){if(a.getOption("disableInput"))return t.Pass;for(var o=a.listSelections(),s=[],c=0;c\s*$/.test(A),b=!/>\s*$/.test(A);(m||b)&&a.replaceRange("",{line:l.line,ch:0},{line:l.line,ch:l.ch+1}),s[c]="\n"}else{var v=g[1],y=g[5],w=!(r.test(g[2])||g[2].indexOf(">")>=0),k=w?parseInt(g[3],10)+1+g[4]:g[2].replace("x"," ");s[c]="\n"+v+k+y,w&&i(a,l)}}a.replaceSelections(s)}}(Wh)}));r((function(t,e){!function(t){var e=t.Pos;function n(t,e){return t.line-e.line||t.ch-e.ch}var r="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function a(t,e,n,r){this.line=e,this.ch=n,this.cm=t,this.text=t.getLine(e),this.min=r?Math.max(r.from,t.firstLine()):t.firstLine(),this.max=r?Math.min(r.to-1,t.lastLine()):t.lastLine()}function o(t,n){var r=t.cm.getTokenTypeAt(e(t.line,n));return r&&/\btag\b/.test(r)}function s(t){if(!(t.line>=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function c(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function l(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(s(t))continue;return}if(o(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(c(t))continue;return}if(o(t,e+1)){i.lastIndex=e,t.ch=e;var n=i.exec(t.text);if(n&&n.index==e)return n}else t.ch=e}}function h(t){for(;;){i.lastIndex=t.ch;var e=i.exec(t.text);if(!e){if(s(t))continue;return}if(o(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function f(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(c(t))continue;return}if(o(t,e+1)){var n=t.text.lastIndexOf("/",e),r=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,r?"selfClose":"regular"}t.ch=e}}function d(t,n){for(var r=[];;){var i,a=h(t),o=t.line,s=t.ch-(a?a[0].length:0);if(!a||!(i=l(t)))return;if("selfClose"!=i)if(a[1]){for(var c=r.length-1;c>=0;--c)if(r[c]==a[2]){r.length=c;break}if(c<0&&(!n||n==a[2]))return{tag:a[2],from:e(o,s),to:e(t.line,t.ch)}}else r.push(a[2])}}function A(t,n){for(var r=[];;){var i=f(t);if(!i)return;if("selfClose"!=i){var a=t.line,o=t.ch,s=u(t);if(!s)return;if(s[1])r.push(s[2]);else{for(var c=r.length-1;c>=0;--c)if(r[c]==s[2]){r.length=c;break}if(c<0&&(!n||n==s[2]))return{tag:s[2],from:e(t.line,t.ch),to:e(a,o)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,r){for(var i=new a(t,r.line,0);;){var o=h(i);if(!o||i.line!=r.line)return;var s=l(i);if(!s)return;if(!o[1]&&"selfClose"!=s){var c=e(i.line,i.ch),u=d(i,o[2]);return u&&n(u.from,c)>0?{from:c,to:u.from}:null}}})),t.findMatchingTag=function(t,r,i){var o=new a(t,r.line,r.ch,i);if(-1!=o.text.indexOf(">")||-1!=o.text.indexOf("<")){var s=l(o),c=s&&e(o.line,o.ch),h=s&&u(o);if(s&&h&&!(n(o,r)>0)){var f={from:e(o.line,o.ch),to:c,tag:h[2]};return"selfClose"==s?{open:f,close:null,at:"open"}:h[1]?{open:A(o,h[2]),close:f,at:"close"}:{open:f,close:d(o=new a(t,c.line,c.ch,i),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,n,r){for(var i=new a(t,e.line,e.ch,n);;){var o=A(i,r);if(!o)break;var s=d(new a(t,e.line,e.ch,n),o.tag);if(s)return{open:o,close:s}}},t.scanForClosingTag=function(t,e,n,r){return d(new a(t,e.line,e.ch,r?{from:0,to:r}:null),n)}}(Wh)}));r((function(t,e){!function(t){t.defineOption("autoCloseTags",!1,(function(e,n,i){if(i!=t.Init&&i&&e.removeKeyMap("autoCloseTags"),n){var o={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(o["'/'"]=function(t){return a(t)}),"object"==typeof n&&!1===n.whenOpening||(o["'>'"]=function(t){return r(t)}),e.addKeyMap(o)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(r){if(r.getOption("disableInput"))return t.Pass;for(var i=r.listSelections(),a=[],c=r.getOption("autoCloseTags"),l=0;lu.ch&&(g=g.slice(0,g.length-h.end+u.ch));var v=g.toLowerCase();if(!g||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&A.close||h.string.indexOf("/")==u.ch-h.start-1||m&&o(m,v)>-1||s(r,f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(d)||[],g,u,!0))return t.Pass;var y="object"==typeof c&&c.emptyTags;if(y&&o(y,g)>-1)a[l]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var w=b&&o(b,v)>-1;a[l]={indent:w,text:">"+(w?"\n\n":"")+"",newPos:w?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var k="object"==typeof c&&c.dontIndentOnAutoClose;for(l=i.length-1;l>=0;l--){var C=a[l];r.replaceRange(C.text,i[l].head,i[l].anchor,"+insert");var x=r.listSelections().slice(0);x[l]={head:C.newPos,anchor:C.newPos},r.setSelections(x),!k&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.newPos.line+1,null,!0))}}function i(e,n){for(var r=e.listSelections(),i=[],a=n?"/":""!=e.getLine(u.line).charAt(h.end)&&(A+=">"),i[l]=A}if(e.replaceSelections(i),r=e.listSelections(),!c)for(l=0;l=0&&n[l]==r;l--)++c;for(i=s.to,l=1;lu);h++){var f=t.getLine(l++);i=null==i?f:i+"\n"+f}c*=2,e.lastIndex=n.ch;var d=e.exec(i);if(d){var A=i.slice(0,d.index).split("\n"),g=d[0].split("\n"),p=n.line+A.length-1,m=A[A.length-1].length;return{from:r(p,m),to:r(p+g.length-1,1==g.length?m+g[0].length:g[g.length-1].length),match:d}}}}function l(t,e,n){for(var r,i=0;i<=t.length;){e.lastIndex=i;var a=e.exec(t);if(!a)break;var o=a.index+a[0].length;if(o>t.length-n)break;(!r||o>r.index+r[0].length)&&(r=a),i=a.index+1}return r}function u(t,e,n){e=a(e,"g");for(var i=n.line,o=n.ch,s=t.firstLine();i>=s;i--,o=-1){var c=t.getLine(i),u=l(c,e,o<0?0:c.length-o);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function h(t,e,n){if(!o(e))return u(t,e,n);e=a(e,"gm");for(var i,s=1,c=t.getLine(n.line).length-n.ch,h=n.line,f=t.firstLine();h>=f;){for(var d=0;d=f;d++){var A=t.getLine(h--);i=null==i?A:A+"\n"+i}s*=2;var g=l(i,e,c);if(g){var p=i.slice(0,g.index).split("\n"),m=g[0].split("\n"),b=h+p.length,v=p[p.length-1].length;return{from:r(b,v),to:r(b+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:g}}}}function f(t,e,n,r){if(t.length==e.length)return n;for(var i=0,a=n+Math.max(0,t.length-e.length);;){if(i==a)return i;var o=i+a>>1,s=r(t.slice(0,o)).length;if(s==n)return o;s>n?a=o:i=o+1}}function d(t,i,a,o){if(!i.length)return null;var s=o?e:n,c=s(i).split(/\r|\n\r?/);t:for(var l=a.line,u=a.ch,h=t.lastLine()+1-c.length;l<=h;l++,u=0){var d=t.getLine(l).slice(u),A=s(d);if(1==c.length){var g=A.indexOf(c[0]);if(-1==g)continue t;return a=f(d,A,g,s)+u,{from:r(l,f(d,A,g,s)+u),to:r(l,f(d,A,g+c[0].length,s)+u)}}var p=A.length-c[0].length;if(A.slice(p)==c[0]){for(var m=1;m=h;l--,u=-1){var d=t.getLine(l);u>-1&&(d=d.slice(0,u));var A=s(d);if(1==c.length){var g=A.lastIndexOf(c[0]);if(-1==g)continue t;return{from:r(l,f(d,A,g,s)),to:r(l,f(d,A,g+c[0].length,s))}}var p=c[c.length-1];if(A.slice(0,p.length)==p){var m=1;for(a=l-c.length+1;m0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))}(Wh)})),r((function(t,e){!function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(t){return t&&t.bracketRegex||/[(){}[\]]/}function a(t,e,a){var s=t.getLineHandle(e.line),c=e.ch-1,l=a&&a.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var u=i(a),h=!l&&c>=0&&u.test(s.text.charAt(c))&&r[s.text.charAt(c)]||u.test(s.text.charAt(c+1))&&r[s.text.charAt(++c)];if(!h)return null;var f=">"==h.charAt(1)?1:-1;if(a&&a.strict&&f>0!=(c==e.ch))return null;var d=t.getTokenTypeAt(n(e.line,c+1)),A=o(t,n(e.line,c+(f>0?1:0)),f,d||null,a);return null==A?null:{from:n(e.line,c),to:A&&A.pos,match:A&&A.ch==h.charAt(0),forward:f>0}}function o(t,e,a,o,s){for(var c=s&&s.maxScanLineLength||1e4,l=s&&s.maxScanLines||1e3,u=[],h=i(s),f=a>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),d=e.line;d!=f;d+=a){var A=t.getLine(d);if(A){var g=a>0?0:A.length-1,p=a>0?A.length:-1;if(!(A.length>c))for(d==e.line&&(g=e.ch-(a<0?1:0));g!=p;g+=a){var m=A.charAt(g);if(h.test(m)&&(void 0===o||t.getTokenTypeAt(n(d,g+1))==o)){var b=r[m];if(b&&">"==b.charAt(1)==a>0)u.push(m);else{if(!u.length)return{pos:n(d,g),ch:m};u.pop()}}}}}return d-a!=(a>0?t.lastLine():t.firstLine())&&null}function s(t,r,i){for(var o=t.state.matchBrackets.maxHighlightLineLength||1e3,s=[],c=t.listSelections(),l=0;l0&&r.ch>=a.length)return e.clipPos(n(r.line+1,0));for(var o,s="start",c=r.ch,l=c,u=i<0?0:a.length,h=0;l!=u;l+=i,h++){var f=a.charAt(i<0?l-1:l),d="_"!=f&&t.isWordChar(f)?"w":"o";if("w"==d&&f.toUpperCase()==f&&(d="W"),"start"==s)"o"!=d?(s="in",o=d):c=l+i;else if("in"==s&&o!=d){if("w"==o&&"W"==d&&i<0&&l--,"W"==o&&"w"==d&&i>0){if(l==c+1){o="w";continue}l--}break}}return n(r.line,l)}function i(t,e){t.extendSelectionsBy((function(n){return t.display.shift||t.doc.extend||n.empty()?r(t.doc,n.head,e):e<0?n.from():n.to()}))}function a(e,r){if(e.isReadOnly())return t.Pass;e.operation((function(){for(var t=e.listSelections().length,i=[],a=-1,o=0;o=n&&t.execCommand("goLineUp")}t.scrollTo(null,e.top-t.defaultTextHeight())},e.scrollLineDown=function(t){var e=t.getScrollInfo();if(!t.somethingSelected()){var n=t.lineAtHeight(e.top,"local")+1;t.getCursor().line<=n&&t.execCommand("goLineDown")}t.scrollTo(null,e.top+t.defaultTextHeight())},e.splitSelectionByLine=function(t){for(var e=t.listSelections(),r=[],i=0;ia.line&&s==o.line&&0==o.ch||r.push({anchor:s==a.line?a:n(s,0),head:s==o.line?o:n(s)});t.setSelections(r,0)},e.singleSelectionTop=function(t){var e=t.listSelections()[0];t.setSelection(e.anchor,e.head,{scroll:!1})},e.selectLine=function(t){for(var e=t.listSelections(),r=[],i=0;i=0;s--){var l=r[i[s]];if(!(c&&t.cmpPos(l.head,c)>0)){var u=o(e,l.head);c=u.from,e.replaceRange(n(u.word),u.from,u.to)}}}))}function A(e){var n=e.getCursor("from"),r=e.getCursor("to");if(0==t.cmpPos(n,r)){var i=o(e,n);if(!i.word)return;n=i.from,r=i.to}return{from:n,to:r,query:e.getRange(n,r),word:i}}function g(t,e){var r=A(t);if(r){var i=r.query,a=t.getSearchCursor(i,e?r.to:r.from);(e?a.findNext():a.findPrevious())?t.setSelection(a.from(),a.to()):(a=t.getSearchCursor(i,e?n(t.firstLine(),0):t.clipPos(n(t.lastLine()))),(e?a.findNext():a.findPrevious())?t.setSelection(a.from(),a.to()):r.word&&t.setSelection(r.from,r.to))}}e.selectScope=function(t){u(t)||t.execCommand("selectAll")},e.selectBetweenBrackets=function(e){if(!u(e))return t.Pass},e.goToBracket=function(e){e.extendSelectionsBy((function(r){var i=e.scanForBracket(r.head,1,h(e.getTokenTypeAt(r.head)));if(i&&0!=t.cmpPos(i.pos,r.head))return i.pos;var a=e.scanForBracket(r.head,-1,h(e.getTokenTypeAt(n(r.head.line,r.head.ch+1))));return a&&n(a.pos.line,a.pos.ch+1)||r.head}))},e.swapLineUp=function(e){if(e.isReadOnly())return t.Pass;for(var r=e.listSelections(),i=[],a=e.firstLine()-1,o=[],s=0;sa?i.push(l,u):i.length&&(i[i.length-1]=u),a=u}e.operation((function(){for(var t=0;te.lastLine()?e.replaceRange("\n"+s,n(e.lastLine()),null,"+swapLine"):e.replaceRange(s+"\n",n(a,0),null,"+swapLine")}e.setSelections(o),e.scrollIntoView()}))},e.swapLineDown=function(e){if(e.isReadOnly())return t.Pass;for(var r=e.listSelections(),i=[],a=e.lastLine()+1,o=r.length-1;o>=0;o--){var s=r[o],c=s.to().line+1,l=s.from().line;0!=s.to().ch||s.empty()||c--,c=0;t-=2){var r=i[t],a=i[t+1],o=e.getLine(r);r==e.lastLine()?e.replaceRange("",n(r-1),n(r),"+swapLine"):e.replaceRange("",n(r,0),n(r+1,0),"+swapLine"),e.replaceRange(o+"\n",n(a,0),null,"+swapLine")}e.scrollIntoView()}))},e.toggleCommentIndented=function(t){t.toggleComment({indent:!0})},e.joinLines=function(t){for(var e=t.listSelections(),r=[],i=0;i=0;a--){var o=r[a].head,s=e.getRange({line:o.line,ch:0},o),c=t.countColumn(s,null,e.getOption("tabSize")),l=e.findPosH(o,-1,"char",!1);if(s&&!/\S/.test(s)&&c%i==0){var u=new n(o.line,t.findColumn(s,c-i,i));u.ch!=o.ch&&(l=u)}e.replaceRange("",l,o,"+delete")}}))},e.delLineRight=function(t){t.operation((function(){for(var e=t.listSelections(),r=e.length-1;r>=0;r--)t.replaceRange("",e[r].anchor,n(e[r].to().line),"+delete");t.scrollIntoView()}))},e.upcaseAtCursor=function(t){d(t,(function(t){return t.toUpperCase()}))},e.downcaseAtCursor=function(t){d(t,(function(t){return t.toLowerCase()}))},e.setSublimeMark=function(t){t.state.sublimeMark&&t.state.sublimeMark.clear(),t.state.sublimeMark=t.setBookmark(t.getCursor())},e.selectToSublimeMark=function(t){var e=t.state.sublimeMark&&t.state.sublimeMark.find();e&&t.setSelection(t.getCursor(),e)},e.deleteToSublimeMark=function(e){var n=e.state.sublimeMark&&e.state.sublimeMark.find();if(n){var r=e.getCursor(),i=n;if(t.cmpPos(r,i)>0){var a=i;i=r,r=a}e.state.sublimeKilled=e.getRange(r,i),e.replaceRange("",r,i)}},e.swapWithSublimeMark=function(t){var e=t.state.sublimeMark&&t.state.sublimeMark.find();e&&(t.state.sublimeMark.clear(),t.state.sublimeMark=t.setBookmark(t.getCursor()),t.setCursor(e))},e.sublimeYank=function(t){null!=t.state.sublimeKilled&&t.replaceSelection(t.state.sublimeKilled,null,"paste")},e.showInCenter=function(t){var e=t.cursorCoords(null,"local");t.scrollTo(null,(e.top+e.bottom)/2-t.getScrollInfo().clientHeight/2)},e.findUnder=function(t){g(t,!0)},e.findUnderPrevious=function(t){g(t,!1)},e.findAllUnder=function(t){var e=A(t);if(e){for(var n=t.getSearchCursor(e.query),r=[],i=-1;n.findNext();)r.push({anchor:n.from(),head:n.to()}),n.from().line<=e.from.line&&n.from().ch<=e.from.ch&&i++;t.setSelections(r,i)}};var p=t.keyMap;p.macSublime={"Cmd-Left":"goLineStartSmart","Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-Left":"goSubwordLeft","Ctrl-Right":"goSubwordRight","Ctrl-Alt-Up":"scrollLineUp","Ctrl-Alt-Down":"scrollLineDown","Cmd-L":"selectLine","Shift-Cmd-L":"splitSelectionByLine",Esc:"singleSelectionTop","Cmd-Enter":"insertLineAfter","Shift-Cmd-Enter":"insertLineBefore","Cmd-D":"selectNextOccurrence","Shift-Cmd-Space":"selectScope","Shift-Cmd-M":"selectBetweenBrackets","Cmd-M":"goToBracket","Cmd-Ctrl-Up":"swapLineUp","Cmd-Ctrl-Down":"swapLineDown","Cmd-/":"toggleCommentIndented","Cmd-J":"joinLines","Shift-Cmd-D":"duplicateLine",F5:"sortLines","Cmd-F5":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Cmd-F2":"toggleBookmark","Shift-Cmd-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Cmd-K Cmd-D":"skipAndSelectNextOccurrence","Cmd-K Cmd-K":"delLineRight","Cmd-K Cmd-U":"upcaseAtCursor","Cmd-K Cmd-L":"downcaseAtCursor","Cmd-K Cmd-Space":"setSublimeMark","Cmd-K Cmd-A":"selectToSublimeMark","Cmd-K Cmd-W":"deleteToSublimeMark","Cmd-K Cmd-X":"swapWithSublimeMark","Cmd-K Cmd-Y":"sublimeYank","Cmd-K Cmd-C":"showInCenter","Cmd-K Cmd-G":"clearBookmarks","Cmd-K Cmd-Backspace":"delLineLeft","Cmd-K Cmd-1":"foldAll","Cmd-K Cmd-0":"unfoldAll","Cmd-K Cmd-J":"unfoldAll","Ctrl-Shift-Up":"addCursorToPrevLine","Ctrl-Shift-Down":"addCursorToNextLine","Cmd-F3":"findUnder","Shift-Cmd-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Cmd-[":"fold","Shift-Cmd-]":"unfold","Cmd-I":"findIncremental","Shift-Cmd-I":"findIncrementalReverse","Cmd-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"macDefault"},t.normalizeKeyMap(p.macSublime),p.pcSublime={"Shift-Tab":"indentLess","Shift-Ctrl-K":"deleteLine","Alt-Q":"wrapLines","Ctrl-T":"transposeChars","Alt-Left":"goSubwordLeft","Alt-Right":"goSubwordRight","Ctrl-Up":"scrollLineUp","Ctrl-Down":"scrollLineDown","Ctrl-L":"selectLine","Shift-Ctrl-L":"splitSelectionByLine",Esc:"singleSelectionTop","Ctrl-Enter":"insertLineAfter","Shift-Ctrl-Enter":"insertLineBefore","Ctrl-D":"selectNextOccurrence","Shift-Ctrl-Space":"selectScope","Shift-Ctrl-M":"selectBetweenBrackets","Ctrl-M":"goToBracket","Shift-Ctrl-Up":"swapLineUp","Shift-Ctrl-Down":"swapLineDown","Ctrl-/":"toggleCommentIndented","Ctrl-J":"joinLines","Shift-Ctrl-D":"duplicateLine",F9:"sortLines","Ctrl-F9":"sortLinesInsensitive",F2:"nextBookmark","Shift-F2":"prevBookmark","Ctrl-F2":"toggleBookmark","Shift-Ctrl-F2":"clearBookmarks","Alt-F2":"selectBookmarks",Backspace:"smartBackspace","Ctrl-K Ctrl-D":"skipAndSelectNextOccurrence","Ctrl-K Ctrl-K":"delLineRight","Ctrl-K Ctrl-U":"upcaseAtCursor","Ctrl-K Ctrl-L":"downcaseAtCursor","Ctrl-K Ctrl-Space":"setSublimeMark","Ctrl-K Ctrl-A":"selectToSublimeMark","Ctrl-K Ctrl-W":"deleteToSublimeMark","Ctrl-K Ctrl-X":"swapWithSublimeMark","Ctrl-K Ctrl-Y":"sublimeYank","Ctrl-K Ctrl-C":"showInCenter","Ctrl-K Ctrl-G":"clearBookmarks","Ctrl-K Ctrl-Backspace":"delLineLeft","Ctrl-K Ctrl-1":"foldAll","Ctrl-K Ctrl-0":"unfoldAll","Ctrl-K Ctrl-J":"unfoldAll","Ctrl-Alt-Up":"addCursorToPrevLine","Ctrl-Alt-Down":"addCursorToNextLine","Ctrl-F3":"findUnder","Shift-Ctrl-F3":"findUnderPrevious","Alt-F3":"findAllUnder","Shift-Ctrl-[":"fold","Shift-Ctrl-]":"unfold","Ctrl-I":"findIncremental","Shift-Ctrl-I":"findIncrementalReverse","Ctrl-H":"replace",F3:"findNext","Shift-F3":"findPrev",fallthrough:"pcDefault"},t.normalizeKeyMap(p.pcSublime);var m=p.default==p.macDefault;p.sublime=m?p.macSublime:p.pcSublime}(Wh)}));r((function(t,e){!function(t){function e(e,n,r){var i,a=e.getWrapperElement();return(i=a.appendChild(document.createElement("div"))).className=r?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),t.addClass(a,"dialog-opened"),i}function n(t,e){t.state.currentNotificationClose&&t.state.currentNotificationClose(),t.state.currentNotificationClose=e}t.defineExtension("openDialog",(function(r,i,a){a||(a={}),n(this,null);var o=e(this,r,a.bottom),s=!1,c=this;function l(e){if("string"==typeof e)h.value=e;else{if(s)return;s=!0,t.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),c.focus(),a.onClose&&a.onClose(o)}}var u,h=o.getElementsByTagName("input")[0];return h?(h.focus(),a.value&&(h.value=a.value,!1!==a.selectValueOnOpen&&h.select()),a.onInput&&t.on(h,"input",(function(t){a.onInput(t,h.value,l)})),a.onKeyUp&&t.on(h,"keyup",(function(t){a.onKeyUp(t,h.value,l)})),t.on(h,"keydown",(function(e){a&&a.onKeyDown&&a.onKeyDown(e,h.value,l)||((27==e.keyCode||!1!==a.closeOnEnter&&13==e.keyCode)&&(h.blur(),t.e_stop(e),l()),13==e.keyCode&&i(h.value,e))})),!1!==a.closeOnBlur&&t.on(o,"focusout",(function(t){null!==t.relatedTarget&&l()}))):(u=o.getElementsByTagName("button")[0])&&(t.on(u,"click",(function(){l(),c.focus()})),!1!==a.closeOnBlur&&t.on(u,"blur",l),u.focus()),l})),t.defineExtension("openConfirm",(function(r,i,a){n(this,null);var o=e(this,r,a&&a.bottom),s=o.getElementsByTagName("button"),c=!1,l=this,u=1;function h(){c||(c=!0,t.rmClass(o.parentNode,"dialog-opened"),o.parentNode.removeChild(o),l.focus())}s[0].focus();for(var f=0;f",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}]).length,a=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],o=(n=Wh).Pos,s=function(){function t(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),n.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",He),K(t),n.on(t.getInputField(),"paste",m(t))}function e(t){t.setOption("disableInput",!1),t.off("cursorActivity",He),n.off(t.getInputField(),"paste",m(t)),t.state.vim=null}function s(t,r){this==n.keyMap.vim&&(n.rmClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(f(t),t.getInputField().style.caretColor="")),r&&r.attach==c||e(t)}function c(e,r){this==n.keyMap.vim&&(n.addClass(e.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==e.getOption("inputStyle")&&null!=document.body.style.caretColor&&(h(e),e.getInputField().style.caretColor="transparent")),r&&r.attach==c||t(e)}function l(t){if(t.state.fatCursorMarks){u(t);for(var e=t.listSelections(),n=[],r=0;r")}function m(t){var e=t.state.vim;return e.onPasteFn||(e.onPasteFn=function(){e.insertMode||(t.setCursor(lt(t.getCursor(),0,1)),at.enterInsertMode(t,{},e))}),e.onPasteFn}var b=/[\d]/,v=[n.isWordChar,function(t){return t&&!n.isWordChar(t)&&!/\s/.test(t)}],y=[function(t){return/\S/.test(t)}];function w(t,e){for(var n=[],r=t;r"]),T=[].concat(k,C,x,["-",'"',".",":","_","/"]);function B(t,e){return e>=t.firstLine()&&e<=t.lastLine()}function _(t){return/^[a-z]$/.test(t)}function S(t){return-1!="()[]{}".indexOf(t)}function L(t){return b.test(t)}function I(t){return/^[A-Z]$/.test(t)}function M(t){return/^\s*$/.test(t)}function O(t){return-1!=".?!".indexOf(t)}function D(t,e){for(var n=0;nn?e=n:e0?1:-1,u=a.getCursor();do{if((s=i[(t+(e+=l))%t])&&(c=s.find())&&!gt(u,c))break}while(er)}return s}function s(t,n){var r=e,i=o(t,n);return e=r,i&&i.find()}return{cachedCursor:void 0,add:a,find:s,move:o}},H=function(t){return t?{changes:t.changes,expectCursorActivityForChange:t.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function j(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=H()}function K(t){return t.state.vim||(t.state.vim={inputState:new X,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),t.state.vim}function z(){for(var t in Q={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:$(),macroModeState:new j,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new Y({}),searchHistoryController:new J,exCommandHistoryController:new J},F){var e=F[t];e.value=e.defaultValue}}j.prototype={exitMacroRecordMode:function(){var t=Q.macroModeState;t.onRecordingDone&&t.onRecordingDone(),t.onRecordingDone=void 0,t.isRecording=!1},enterMacroRecordMode:function(t,e){var n=Q.registerController.getRegister(e);n&&(n.clear(),this.latestRegister=e,t.openDialog&&(this.onRecordingDone=t.openDialog("(recording)["+e+"]",null,{bottom:!0})),this.isRecording=!0)}};var G={buildKeyMap:function(){},getRegisterController:function(){return Q.registerController},resetVimGlobalState_:z,getVimGlobalState_:function(){return Q},maybeInitVimState_:K,suppressErrorLogging:!1,InsertModeKey:Ge,map:function(t,e,n){Me.map(t,e,n)},unmap:function(t,e){Me.unmap(t,e)},noremap:function(t,e,n){function a(t){return t?[t]:["normal","insert","visual"]}for(var o=a(n),s=r.length,c=s-i;c=0;o--){var s=a[o];if(t!==s.context)if(s.context)this._mapCommand(s);else{var c=["normal","insert","visual"];for(var l in c)if(c[l]!==t){var u={};for(var h in s)u[h]=s[h];u.context=c[l],this._mapCommand(u)}}}},setOption:P,getOption:R,defineOption:N,defineEx:function(t,e,n){if(e){if(0!==t.indexOf(e))throw new Error('(Vim.defineEx) "'+e+'" is not a prefix of "'+t+'", command not registered')}else e=t;Ie[t]=n,Me.commandMap_[e]={name:t,shortName:e,type:"api"}},handleKey:function(t,e,n){var r=this.findKey(t,e,n);if("function"==typeof r)return r()},findKey:function(t,e,i){var a,o=K(t);function s(){var n=Q.macroModeState;if(n.isRecording){if("q"==e)return n.exitMacroRecordMode(),V(t),!0;"mapping"!=i&&Re(n,e)}}function c(){if(""==e)return V(t),o.visualMode?Ot(t):o.insertMode&&De(t),!0}function l(r){for(var i;r;)i=/<\w+-.+?>|<\w+>|./.exec(r),e=i[0],r=r.substring(i.index+e.length),n.Vim.handleKey(t,e,"mapping")}function u(){if(c())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+e,i=1==e.length,a=Z.matchCommand(n,r,o.inputState,"insert");n.length>1&&"full"!=a.type;){n=o.inputState.keyBuffer=n.slice(1);var s=Z.matchCommand(n,r,o.inputState,"insert");"none"!=s.type&&(a=s)}if("none"==a.type)return V(t),!1;if("partial"==a.type)return U&&window.clearTimeout(U),U=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&V(t)}),R("insertModeEscKeysTimeout")),!i;if(U&&window.clearTimeout(U),i){for(var l=t.listSelections(),u=0;u0||this.motionRepeat.length>0)&&(t=1,this.prefixRepeat.length>0&&(t*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(t*=parseInt(this.motionRepeat.join(""),10))),t},W.prototype={setText:function(t,e,n){this.keyBuffer=[t||""],this.linewise=!!e,this.blockwise=!!n},pushText:function(t,e){e&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(t)},pushInsertModeChanges:function(t){this.insertModeChanges.push(H(t))},pushSearchQuery:function(t){this.searchQueries.push(t)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},Y.prototype={pushText:function(t,e,n,r,i){if("_"!==t){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var a=this.isValidRegister(t)?this.getRegister(t):null;if(a)I(t)?a.pushText(n,r):a.setText(n,r,i),this.unnamedRegister.setText(a.toString(),r);else{switch(e){case"yank":this.registers[0]=new W(n,r,i);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new W(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new W(n,r))}this.unnamedRegister.setText(n,r,i)}}},getRegister:function(t){return this.isValidRegister(t)?(t=t.toLowerCase(),this.registers[t]||(this.registers[t]=new W),this.registers[t]):this.unnamedRegister},isValidRegister:function(t){return t&&D(t,T)},shiftNumericRegisters_:function(){for(var t=9;t>=2;t--)this.registers[t]=this.getRegister(""+(t-1))}},J.prototype={nextMatch:function(t,e){var n=this.historyBuffer,r=e?-1:1;null===this.initialPrefix&&(this.initialPrefix=t);for(var i=this.iterator+r;e?i>=0:i=n.length?(this.iterator=n.length,this.initialPrefix):i<0?t:void 0},pushInput:function(t){var e=this.historyBuffer.indexOf(t);e>-1&&this.historyBuffer.splice(e,1),t.length&&this.historyBuffer.push(t)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var Z={matchCommand:function(t,e,n,r){var i,a=ut(t,e,r,n);if(!a.full&&!a.partial)return{type:"none"};if(!a.full&&a.partial)return{type:"partial"};for(var o=0;o"==i.keys.slice(-11)){var c=ft(t);if(!c)return{type:"none"};n.selectedCharacter=c}return{type:"full",command:i}},processCommand:function(t,e,n){switch(e.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(t,e,n);break;case"operator":this.processOperator(t,e,n);break;case"operatorMotion":this.processOperatorMotion(t,e,n);break;case"action":this.processAction(t,e,n);break;case"search":this.processSearch(t,e,n);break;case"ex":case"keyToEx":this.processEx(t,e,n)}},processMotion:function(t,e,n){e.inputState.motion=n.motion,e.inputState.motionArgs=ct(n.motionArgs),this.evalInput(t,e)},processOperator:function(t,e,n){var r=e.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(t,e);V(t)}r.operator=n.operator,r.operatorArgs=ct(n.operatorArgs),n.exitVisualBlock&&(e.visualBlock=!1,Lt(t)),e.visualMode&&this.evalInput(t,e)},processOperatorMotion:function(t,e,n){var r=e.visualMode,i=ct(n.operatorMotionArgs);i&&r&&i.visualLine&&(e.visualLine=!0),this.processOperator(t,e,n),r||this.processMotion(t,e,n)},processAction:function(t,e,n){var r=e.inputState,i=r.getRepeat(),a=!!i,o=ct(n.actionArgs)||{};r.selectedCharacter&&(o.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(t,e,n),n.motion&&this.processMotion(t,e,n),(n.motion||n.operator)&&this.evalInput(t,e),o.repeat=i||1,o.repeatIsExplicit=a,o.registerName=r.registerName,V(t),e.lastMotion=null,n.isEdit&&this.recordLastEdit(e,r,n),at[n.action](t,o,e)},processSearch:function(t,e,r){if(t.getSearchCursor){var i=r.searchArgs.forward,a=r.searchArgs.wholeWordOnly;ne(t).setReversed(!i);var o=i?"/":"?",s=ne(t).getQuery(),c=t.getScrollInfo();switch(r.searchArgs.querySrc){case"prompt":var l=Q.macroModeState;l.isPlaying?d(f=l.replaySearchQueries.shift(),!0,!1):me(t,{onClose:A,prefix:o,desc:pe,onKeyUp:g,onKeyDown:p});break;case"wordUnderCursor":var u=Pt(t,!1,!0,!1,!0),h=!0;if(u||(u=Pt(t,!1,!0,!1,!1),h=!1),!u)return;var f=t.getLine(u.start.line).substring(u.start.ch,u.end.ch);f=h&&a?"\\b"+f+"\\b":kt(f),Q.jumpList.cachedCursor=t.getCursor(),t.setCursor(u.start),d(f,!0,!1)}}function d(n,i,a){Q.searchHistoryController.pushInput(n),Q.searchHistoryController.reset();try{ve(t,n,i,a)}catch(e){return Ae(t,"Invalid regex: "+n),void V(t)}Z.processMotion(t,e,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:r.searchArgs.toJumplist}})}function A(e){t.scrollTo(c.left,c.top),d(e,!0,!0);var n=Q.macroModeState;n.isRecording&&Ue(n,e)}function g(e,r,a){var o,s,l,u=n.keyName(e);"Up"==u||"Down"==u?(o="Up"==u,s=e.target?e.target.selectionEnd:0,a(r=Q.searchHistoryController.nextMatch(r,o)||""),s&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(s,e.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&Q.searchHistoryController.reset();try{l=ve(t,r,!0,!0)}catch(e){}l?t.scrollIntoView(Ce(t,!i,l),30):(Ee(t),t.scrollTo(c.left,c.top))}function p(e,r,i){var a=n.keyName(e);"Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==r?(Q.searchHistoryController.pushInput(r),Q.searchHistoryController.reset(),ve(t,s),Ee(t),t.scrollTo(c.left,c.top),n.e_stop(e),V(t),i(),t.focus()):"Up"==a||"Down"==a?n.e_stop(e):"Ctrl-U"==a&&(n.e_stop(e),i(""))}},processEx:function(t,e,r){function i(e){Q.exCommandHistoryController.pushInput(e),Q.exCommandHistoryController.reset(),Me.processCommand(t,e)}function a(e,r,i){var a,o,s=n.keyName(e);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==r)&&(Q.exCommandHistoryController.pushInput(r),Q.exCommandHistoryController.reset(),n.e_stop(e),V(t),i(),t.focus()),"Up"==s||"Down"==s?(n.e_stop(e),a="Up"==s,o=e.target?e.target.selectionEnd:0,i(r=Q.exCommandHistoryController.nextMatch(r,a)||""),o&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(o,e.target.value.length))):"Ctrl-U"==s?(n.e_stop(e),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&Q.exCommandHistoryController.reset()}"keyToEx"==r.type?Me.processCommand(t,r.exArgs.input):e.visualMode?me(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:a,selectValueOnOpen:!1}):me(t,{onClose:i,prefix:":",onKeyDown:a})},evalInput:function(t,e){var n,r,i,a=e.inputState,s=a.motion,c=a.motionArgs||{},l=a.operator,u=a.operatorArgs||{},h=a.registerName,f=e.sel,d=At(e.visualMode?st(t,f.head):t.getCursor("head")),A=At(e.visualMode?st(t,f.anchor):t.getCursor("anchor")),g=At(d),p=At(A);if(l&&this.recordLastEdit(e,a),(i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&c.explicitRepeat?c.repeatIsExplicit=!0:(c.noRepeat||!c.explicitRepeat&&0===i)&&(i=1,c.repeatIsExplicit=!1),a.selectedCharacter&&(c.selectedCharacter=u.selectedCharacter=a.selectedCharacter),c.repeat=i,V(t),s){var m=tt[s](t,d,c,e,a);if(e.lastMotion=tt[s],!m)return;if(c.toJumplist){var b=Q.jumpList,v=b.cachedCursor;v?(Qt(t,v,m),delete b.cachedCursor):Qt(t,d,m)}m instanceof Array?(r=m[0],n=m[1]):n=m,n||(n=At(d)),e.visualMode?(e.visualBlock&&n.ch===1/0||(n=st(t,n)),r&&(r=st(t,r)),r=r||p,f.anchor=r,f.head=n,Lt(t),Wt(t,e,"<",pt(r,n)?r:n),Wt(t,e,">",pt(r,n)?n:r)):l||(n=st(t,n),t.setCursor(n.line,n.ch))}if(l){if(u.lastSel){r=p;var y=u.lastSel,w=Math.abs(y.head.line-y.anchor.line),k=Math.abs(y.head.ch-y.anchor.ch);n=y.visualLine?o(p.line+w,p.ch):y.visualBlock?o(p.line+w,p.ch+k):y.head.line==y.anchor.line?o(p.line,p.ch+k):o(p.line+w,p.ch),e.visualMode=!0,e.visualLine=y.visualLine,e.visualBlock=y.visualBlock,f=e.sel={anchor:r,head:n},Lt(t)}else e.visualMode&&(u.lastSel={anchor:At(f.anchor),head:At(f.head),visualBlock:e.visualBlock,visualLine:e.visualLine});var C,x,E,T,B;if(e.visualMode){if(C=mt(f.head,f.anchor),x=bt(f.head,f.anchor),E=e.visualLine||u.linewise,B=It(t,{anchor:C,head:x},T=e.visualBlock?"block":E?"line":"char"),E){var _=B.ranges;if("block"==T)for(var S=0;S<_.length;S++)_[S].head.ch=yt(t,_[S].head.line);else"line"==T&&(_[0].head=o(_[0].head.line+1,0))}}else{if(C=At(r||p),pt(x=At(n||g),C)){var L=C;C=x,x=L}(E=c.linewise||u.linewise)?Ft(t,C,x):c.forward&&Dt(t,C,x),B=It(t,{anchor:C,head:x},T="char",!c.inclusive||E)}t.setSelections(B.ranges,B.primary),e.lastMotion=null,u.repeat=i,u.registerName=h,u.linewise=E;var I=rt[l](t,u,B.ranges,p,n);e.visualMode&&Ot(t,null!=I),I&&t.setCursor(I)}},recordLastEdit:function(t,e,n){var r=Q.macroModeState;r.isPlaying||(t.lastEditInputState=e,t.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=t.visualBlock?t.sel.head.line-t.sel.anchor.line:0)}},tt={moveToTopLine:function(t,e,n){var r=Be(t).top+n.repeat-1;return o(r,Nt(t.getLine(r)))},moveToMiddleLine:function(t){var e=Be(t),n=Math.floor(.5*(e.top+e.bottom));return o(n,Nt(t.getLine(n)))},moveToBottomLine:function(t,e,n){var r=Be(t).bottom-n.repeat+1;return o(r,Nt(t.getLine(r)))},expandToLine:function(t,e,n){return o(e.line+n.repeat-1,1/0)},findNext:function(t,e,n){var r=ne(t),i=r.getQuery();if(i){var a=!n.forward;return a=r.isReversed()?!a:a,ke(t,i),Ce(t,a,i,n.repeat)}},findAndSelectNextInclusive:function(t,e,r,i,a){var s=ne(t),c=s.getQuery();if(c){var l=!r.forward,u=xe(t,l=s.isReversed()?!l:l,c,r.repeat,i);if(u){if(a.operator)return u;var h=u[0],f=o(u[1].line,u[1].ch-1);if(i.visualMode){(i.visualLine||i.visualBlock)&&(i.visualLine=!1,i.visualBlock=!1,n.signal(t,"vim-mode-change",{mode:"visual",subMode:""}));var d=i.sel.anchor;if(d)return s.isReversed()?r.forward?[d,h]:[d,f]:r.forward?[d,f]:[d,h]}else i.visualMode=!0,i.visualLine=!1,i.visualBlock=!1,n.signal(t,"vim-mode-change",{mode:"visual",subMode:""});return l?[f,h]:[h,f]}}},goToMark:function(t,e,n,r){var i=_e(t,r,n.selectedCharacter);return i?n.linewise?{line:i.line,ch:Nt(t.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(t,e,n,r){if(r.visualBlock&&n.sameLine){var i=r.sel;return[st(t,o(i.anchor.line,i.head.ch)),st(t,o(i.head.line,i.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(t,e,n,r){for(var i=e,a=0;ac:h.lineu&&i.line==u?Gt(t,e,n,r,!0):(n.toFirstChar&&(a=Nt(t.getLine(c)),r.lastHPos=a),r.lastHSPos=t.charCoords(o(c,a),"div").left,o(c,a))},moveByDisplayLines:function(t,e,n,r){var i=e;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=t.charCoords(i,"div").left}var a=n.repeat;if((c=t.findPosV(i,n.forward?a:-a,"line",r.lastHSPos)).hitSide)if(n.forward)var s={top:t.charCoords(c,"div").top+8,left:r.lastHSPos},c=t.coordsChar(s,"div");else{var l=t.charCoords(o(t.firstLine(),0),"div");l.left=r.lastHSPos,c=t.coordsChar(l,"div")}return r.lastHPos=c.ch,c},moveByPage:function(t,e,n){var r=e,i=n.repeat;return t.findPosV(r,n.forward?i:-i,"page")},moveByParagraph:function(t,e,n){var r=n.forward?1:-1;return Yt(t,e,n.repeat,r)},moveBySentence:function(t,e,n){var r=n.forward?1:-1;return Jt(t,e,n.repeat,r)},moveByScroll:function(t,e,n,r){var i=t.getScrollInfo(),a=null,o=n.repeat;o||(o=i.clientHeight/(2*t.defaultTextHeight()));var s=t.charCoords(e,"local");if(n.repeat=o,!(a=tt.moveByDisplayLines(t,e,n,r)))return null;var c=t.charCoords(a,"local");return t.scrollTo(null,i.top+c.top-s.top),a},moveByWords:function(t,e,n){return zt(t,e,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(t,e,n){var r=Xt(t,n.repeat,n.forward,n.selectedCharacter),i=n.forward?-1:1;return Ut(i,n),r?(r.ch+=i,r):null},moveToCharacter:function(t,e,n){var r=n.repeat;return Ut(0,n),Xt(t,r,n.forward,n.selectedCharacter)||e},moveToSymbol:function(t,e,n){return jt(t,n.repeat,n.forward,n.selectedCharacter)||e},moveToColumn:function(t,e,n,r){var i=n.repeat;return r.lastHPos=i-1,r.lastHSPos=t.charCoords(e,"div").left,Vt(t,i)},moveToEol:function(t,e,n,r){return Gt(t,e,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(t,e){var n=e;return o(n.line,Nt(t.getLine(n.line)))},moveToMatchedSymbol:function(t,e){for(var n,r=e,i=r.line,a=r.ch,s=t.getLine(i);a"===a?/[(){}[\]<>]/:/[(){}[\]]/;return t.findMatchingBracket(o(i,a),{bracketRegex:l}).to}return r},moveToStartOfLine:function(t,e){return o(e.line,0)},moveToLineOrEdgeOfDocument:function(t,e,n){var r=n.forward?t.lastLine():t.firstLine();return n.repeatIsExplicit&&(r=n.repeat-t.getOption("firstLineNumber")),o(r,Nt(t.getLine(r)))},textObjectManipulation:function(t,e,n,r){var i={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},a={"'":!0,'"':!0,"`":!0},o=n.selectedCharacter;"b"==o?o="(":"B"==o&&(o="{");var s,c=!n.textObjectInner;if(i[o])s=Zt(t,e,o,c);else if(a[o])s=te(t,e,o,c);else if("W"===o)s=Pt(t,c,!0,!0);else if("w"===o)s=Pt(t,c,!0,!1);else if("p"===o)if(s=Yt(t,e,n.repeat,0,c),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var l=r.inputState.operatorArgs;l&&(l.linewise=!0),s.end.line--}else{if("t"!==o)return null;s=Rt(t,e,c)}return t.state.vim.visualMode?St(t,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(t,e,n){var r=Q.lastCharacterSearch,i=n.repeat,a=n.forward===r.forward,o=(r.increment?1:0)*(a?-1:1);t.moveH(-o,"char"),n.inclusive=!!a;var s=Xt(t,i,a,r.selectedCharacter);return s?(s.ch+=o,s):(t.moveH(o,"char"),e)}};function et(t,e){tt[t]=e}function nt(t,e){for(var n=[],r=0;rt.lastLine()&&e.linewise&&!A?t.replaceRange("",d,l):t.replaceRange("",c,l),e.linewise&&(A||(t.setCursor(d),n.commands.newlineAndIndent(t)),c.ch=Number.MAX_VALUE),i=c}Q.registerController.pushText(e.registerName,"change",a,e.linewise,r.length>1),at.enterInsertMode(t,{head:i},t.state.vim)},delete:function(t,e,n){var r,i,a=t.state.vim;if(a.visualBlock){i=t.getSelection();var s=nt("",n.length);t.replaceSelections(s),r=n[0].anchor}else{var c=n[0].anchor,l=n[0].head;e.linewise&&l.line!=t.firstLine()&&c.line==t.lastLine()&&c.line==l.line-1&&(c.line==t.firstLine()?c.ch=0:c=o(c.line-1,yt(t,c.line-1))),i=t.getRange(c,l),t.replaceRange("",c,l),r=c,e.linewise&&(r=tt.moveToFirstNonWhiteSpaceCharacter(t,c))}return Q.registerController.pushText(e.registerName,"delete",i,e.linewise,a.visualBlock),st(t,r)},indent:function(t,e,n){var r=t.state.vim,i=n[0].anchor.line,a=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,o=r.visualMode?e.repeat:1;e.linewise&&a--;for(var s=i;s<=a;s++)for(var c=0;cl.top?(c.line+=(s-l.top)/i,c.line=Math.ceil(c.line),t.setCursor(c),l=t.charCoords(c,"local"),t.scrollTo(null,l.top)):t.scrollTo(null,s);else{var u=s+t.getScrollInfo().clientHeight;u=a.anchor.line?lt(a.head,0,1):o(a.anchor.line,0)}else if("inplace"==i){if(r.visualMode)return}else"lastEdit"==i&&(s=Se(t)||s);t.setOption("disableInput",!1),e&&e.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),n.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),n.signal(t,"vim-mode-change",{mode:"insert"})),Q.macroModeState.isPlaying||(t.on("change",$e),n.on(t.getInputField(),"keydown",Xe)),r.visualMode&&Ot(t),Et(t,s,c)}},toggleVisualMode:function(t,e,r){var i,a=e.repeat,s=t.getCursor();r.visualMode?r.visualLine^e.linewise||r.visualBlock^e.blockwise?(r.visualLine=!!e.linewise,r.visualBlock=!!e.blockwise,n.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),Lt(t)):Ot(t):(r.visualMode=!0,r.visualLine=!!e.linewise,r.visualBlock=!!e.blockwise,i=st(t,o(s.line,s.ch+a-1)),r.sel={anchor:s,head:i},n.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""}),Lt(t),Wt(t,r,"<",mt(s,i)),Wt(t,r,">",bt(s,i)))},reselectLastSelection:function(t,e,r){var i=r.lastSelection;if(r.visualMode&&_t(t,r),i){var a=i.anchorMark.find(),o=i.headMark.find();if(!a||!o)return;r.sel={anchor:a,head:o},r.visualMode=!0,r.visualLine=i.visualLine,r.visualBlock=i.visualBlock,Lt(t),Wt(t,r,"<",mt(a,o)),Wt(t,r,">",bt(a,o)),n.signal(t,"vim-mode-change",{mode:"visual",subMode:r.visualLine?"linewise":r.visualBlock?"blockwise":""})}},joinLines:function(t,e,n){var r,i;if(n.visualMode){if(r=t.getCursor("anchor"),pt(i=t.getCursor("head"),r)){var a=i;i=r,r=a}i.ch=yt(t,i.line)-1}else{var s=Math.max(e.repeat,2);r=t.getCursor(),i=st(t,o(r.line+s-1,1/0))}for(var c=0,l=r.line;l1&&(d=Array(e.repeat+1).join(d));var A,g,p=i.linewise,m=i.blockwise;if(m){d=d.split("\n"),p&&d.pop();for(var b=0;bt.lastLine()&&t.replaceRange("\n",o(T,0)),yt(t,T)u.length&&(i=u.length),a=o(c.line,i)}if("\n"==s)r.visualMode||t.replaceRange("",c,a),(n.commands.newlineAndIndentContinueComment||n.commands.newlineAndIndent)(t);else{var h=t.getRange(c,a);if(h=h.replace(/[^\n]/g,s),r.visualBlock){var f=new Array(t.getOption("tabSize")+1).join(" ");h=(h=t.getSelection()).replace(/\t/g,f).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(h)}else t.replaceRange(h,c,a);r.visualMode?(c=pt(l[0].anchor,l[0].head)?l[0].anchor:l[0].head,t.setCursor(c),Ot(t,!1)):t.setCursor(lt(a,0,-1))}},incrementNumberToken:function(t,e){for(var n,r,i,a,s=t.getCursor(),c=t.getLine(s.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=l.exec(c))&&(i=(r=n.index)+n[0].length,!(s.ch"==e.slice(-11)){var n=e.length-11,r=t.slice(0,n),i=e.slice(0,n);return r==i&&t.length>n?"full":0==i.indexOf(r)&&"partial"}return t==e?"full":0==e.indexOf(t)&&"partial"}function ft(t){var e=/^.*(<[^>]+>)$/.exec(t),n=e?e[1]:t.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}function dt(t,e,n){return function(){for(var r=0;r2&&(e=mt.apply(void 0,Array.prototype.slice.call(arguments,1))),pt(t,e)?t:e}function bt(t,e){return arguments.length>2&&(e=bt.apply(void 0,Array.prototype.slice.call(arguments,1))),pt(t,e)?e:t}function vt(t,e,n){var r=pt(t,e),i=pt(e,n);return r&&i}function yt(t,e){return t.getLine(e).length}function wt(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function kt(t){return t.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function Ct(t,e,n){var r=yt(t,e),i=new Array(n-r+1).join(" ");t.setCursor(o(e,r)),t.replaceRange(i,t.getCursor())}function xt(t,e){var n=[],r=t.listSelections(),i=At(t.clipPos(e)),a=!gt(e,i),s=Tt(r,t.getCursor("head")),c=gt(r[s].head,r[s].anchor),l=r.length-1,u=l-s>s?l:0,h=r[u].anchor,f=Math.min(h.line,i.line),d=Math.max(h.line,i.line),A=h.ch,g=i.ch,p=r[u].head.ch-A,m=g-A;p>0&&m<=0?(A++,a||g--):p<0&&m>=0?(A--,c||g++):p<0&&-1==m&&(A--,g++);for(var b=f;b<=d;b++){var v={anchor:new o(b,A),head:new o(b,g)};n.push(v)}return t.setSelections(n),e.ch=g,h.ch=A,h}function Et(t,e,n){for(var r=[],i=0;il&&(i.line=l),i.ch=yt(t,i.line)}return{ranges:[{anchor:a,head:i}],primary:0}}if("block"==n){for(var u=Math.min(a.line,i.line),h=Math.min(a.ch,i.ch),f=Math.max(a.line,i.line),d=Math.max(a.ch,i.ch)+1,A=f-u+1,g=i.line==u?0:A-1,p=[],m=0;m0&&a&&M(a);a=i.pop())n.line--,n.ch=0;a?(n.line--,n.ch=yt(t,n.line)):n.ch=0}}function Ft(t,e,n){e.ch=0,n.ch=0,n.line++}function Nt(t){if(!t)return 0;var e=t.search(/\S/);return-1==e?t.length:e}function Pt(t,e,n,r,i){for(var a=Mt(t),s=t.getLine(a.line),c=a.ch,l=i?v[0]:y[0];!l(s.charAt(c));)if(++c>=s.length)return null;r?l=y[0]:(l=v[0])(s.charAt(c))||(l=v[1]);for(var u=c,h=c;l(s.charAt(u))&&u=0;)h--;if(h++,e){for(var f=u;/\s/.test(s.charAt(u))&&u0;)h--;h||(h=d)}}return{start:o(a.line,h),end:o(a.line,u)}}function Rt(t,e,r){var i=e;if(!n.findMatchingTag||!n.findEnclosingTag)return{start:i,end:i};var a=n.findMatchingTag(t,e)||n.findEnclosingTag(t,e);return a&&a.open&&a.close?r?{start:a.open.from,end:a.close.to}:{start:a.open.to,end:a.close.from}:{start:i,end:i}}function Qt(t,e,n){gt(e,n)||Q.jumpList.add(t,e,n)}function Ut(t,e){Q.lastCharacterSearch.increment=t,Q.lastCharacterSearch.forward=e.forward,Q.lastCharacterSearch.selectedCharacter=e.selectedCharacter}var $t={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},Ht={bracket:{isComplete:function(t){if(t.nextCh===t.symb){if(t.depth++,t.depth>=1)return!0}else t.nextCh===t.reverseSymb&&t.depth--;return!1}},section:{init:function(t){t.curMoveThrough=!0,t.symb=(t.forward?"]":"[")===t.symb?"{":"}"},isComplete:function(t){return 0===t.index&&t.nextCh===t.symb}},comment:{isComplete:function(t){var e="*"===t.lastCh&&"/"===t.nextCh;return t.lastCh=t.nextCh,e}},method:{init:function(t){t.symb="m"===t.symb?"{":"}",t.reverseSymb="{"===t.symb?"}":"{"},isComplete:function(t){return t.nextCh===t.symb}},preprocess:{init:function(t){t.index=0},isComplete:function(t){if("#"===t.nextCh){var e=t.lineText.match(/#(\w+)/)[1];if("endif"===e){if(t.forward&&0===t.depth)return!0;t.depth++}else if("if"===e){if(!t.forward&&0===t.depth)return!0;t.depth--}if("else"===e&&0===t.depth)return!0}return!1}}};function jt(t,e,n,r){var i=At(t.getCursor()),a=n?1:-1,s=n?t.lineCount():-1,c=i.ch,l=i.line,u=t.getLine(l),h={lineText:u,nextCh:u.charAt(c),lastCh:null,index:c,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},f=$t[r];if(!f)return i;var d=Ht[f].init,A=Ht[f].isComplete;for(d&&d(h);l!==s&&e;){if(h.index+=a,h.nextCh=h.lineText.charAt(h.index),!h.nextCh){if(l+=a,h.lineText=t.getLine(l)||"",a>0)h.index=0;else{var g=h.lineText.length;h.index=g>0?g-1:0}h.nextCh=h.lineText.charAt(h.index)}A(h)&&(i.line=l,i.ch=h.index,e--)}return h.nextCh||h.curMoveThrough?o(l,h.index):i}function Kt(t,e,n,r,i){var a=e.line,o=e.ch,s=t.getLine(a),c=n?1:-1,l=r?y:v;if(i&&""==s){if(a+=c,s=t.getLine(a),!B(t,a))return null;o=n?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:a};for(var u=c>0?s.length:-1,h=u,f=u;o!=u;){for(var d=!1,A=0;A0?0:s.length}}function zt(t,e,n,r,i,a){var s=At(e),c=[];(r&&!i||!r&&i)&&n++;for(var l=!(r&&i),u=0;u0;)f(u,r)&&n--,u+=r;return new o(u,0)}var d=t.state.vim;if(d.visualLine&&f(s,1,!0)){var A=d.sel.anchor;f(A.line,-1,!0)&&(i&&A.line==s||(s+=1))}var g=h(s);for(u=s;u<=l&&n;u++)f(u,1,!0)&&(i&&h(u)==g||n--);for(a=new o(u,0),u>l&&!g?g=!0:i=!1,u=s;u>c&&(i&&h(u)!=g&&u!=s||!f(u,-1,!0));u--);return{start:new o(u,0),end:a}}function Jt(t,e,n,r){function i(t,e){if(e.pos+e.dir<0||e.pos+e.dir>=e.line.length){if(e.ln+=e.dir,!B(t,e.ln))return e.line=null,e.ln=null,void(e.pos=null);e.line=t.getLine(e.ln),e.pos=e.dir>0?0:e.line.length-1}else e.pos+=e.dir}function a(t,e,n,r){var a=""===(l=t.getLine(e)),o={line:l,ln:e,pos:n,dir:r},s={ln:o.ln,pos:o.pos},c=""===o.line;for(i(t,o);null!==o.line;){if(s.ln=o.ln,s.pos=o.pos,""===o.line&&!c)return{ln:o.ln,pos:o.pos};if(a&&""!==o.line&&!M(o.line[o.pos]))return{ln:o.ln,pos:o.pos};!O(o.line[o.pos])||a||o.pos!==o.line.length-1&&!M(o.line[o.pos+1])||(a=!0),i(t,o)}var l=t.getLine(s.ln);s.pos=0;for(var u=l.length-1;u>=0;--u)if(!M(l[u])){s.pos=u;break}return s}function s(t,e,n,r){var a={line:c=t.getLine(e),ln:e,pos:n,dir:r},o={ln:a.ln,pos:null},s=""===a.line;for(i(t,a);null!==a.line;){if(""===a.line&&!s)return null!==o.pos?o:{ln:a.ln,pos:a.pos};if(O(a.line[a.pos])&&null!==o.pos&&(a.ln!==o.ln||a.pos+1!==o.pos))return o;""===a.line||M(a.line[a.pos])||(s=!1,o={ln:a.ln,pos:a.pos}),i(t,a)}var c=t.getLine(o.ln);o.pos=0;for(var l=0;l0;)c=r<0?s(t,c.ln,c.pos,r):a(t,c.ln,c.pos,r),n--;return o(c.ln,c.pos)}function Zt(t,e,n,r){var i,a,s=e,c={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],u=t.getLine(s.line).charAt(s.ch)===l?1:0;if(i=t.scanForBracket(o(s.line,s.ch+u),-1,void 0,{bracketRegex:c}),a=t.scanForBracket(o(s.line,s.ch+u),1,void 0,{bracketRegex:c}),!i||!a)return{start:s,end:s};if(i=i.pos,a=a.pos,i.line==a.line&&i.ch>a.ch||i.line>a.line){var h=i;i=a,a=h}return r?a.ch+=1:i.ch+=1,{start:i,end:a}}function te(t,e,n,r){var i,a,s,c,l=At(e),u=t.getLine(l.line).split(""),h=u.indexOf(n);if(l.ch-1&&!i;s--)u[s]==n&&(i=s+1);else i=l.ch+1;if(i&&!a)for(s=i,c=u.length;s'+e+"",{bottom:!0,duration:5e3}):alert(e)}function ge(t,e){var n=''+(t||"")+'';return e&&(n+=' '+e+""),n}var pe="(Javascript regexp)";function me(t,e){var n=(e.prefix||"")+" "+(e.desc||"");re(t,ge(e.prefix,e.desc),n,e.onClose,e)}function be(t,e){if(t instanceof RegExp&&e instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r=e&&t<=n:t==e}function Be(t){var e=t.getScrollInfo(),n=6,r=10,i=t.coordsChar({left:0,top:n+e.top},"local"),a=e.clientHeight-r+e.top,o=t.coordsChar({left:0,top:a},"local");return{top:i.line,bottom:o.line}}function _e(t,e,n){if("'"==n||"`"==n)return Q.jumpList.find(t,-1)||o(0,0);if("."==n)return Se(t);var r=e.marks[n];return r&&r.find()}function Se(t){for(var e=t.doc.history.done,n=e.length;n--;)if(e[n].changes)return At(e[n].changes[0].to)}var Le=function(){this.buildCommandMap_()};Le.prototype={processCommand:function(t,e,n){var r=this;t.operation((function(){t.curOp.isVimOp=!0,r._processCommand(t,e,n)}))},_processCommand:function(t,e,r){var i=t.state.vim,a=Q.registerController.getRegister(":"),o=a.toString();i.visualMode&&Ot(t);var s=new n.StringStream(e);a.setText(e);var c,l,u=r||{};u.input=e;try{this.parseInput_(t,s,u)}catch(e){throw Ae(t,e),e}if(u.commandName){if(c=this.matchCommand_(u.commandName)){if(l=c.name,c.excludeFromCommandHistory&&a.setText(o),this.parseCommandArgs_(s,u,c),"exToKey"==c.type){for(var h=0;h@~])/);return n.commandName=r?r[1]:e.match(/.*/)[0],n},parseLineSpec_:function(t,e){var n=e.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(e.next()){case".":return this.parseLineSpecOffset_(e,t.getCursor().line);case"$":return this.parseLineSpecOffset_(e,t.lastLine());case"'":var r=e.next(),i=_e(t,t.state.vim,r);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(e,i.line);case"-":case"+":return e.backUp(1),this.parseLineSpecOffset_(e,t.getCursor().line);default:return void e.backUp(1)}},parseLineSpecOffset_:function(t,e){var n=t.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?e-=r:e+=r}return e},parseCommandArgs_:function(t,e,n){if(!t.eol()){e.argString=t.match(/.*/)[0];var r=n.argDelimiter||/\s+/,i=wt(e.argString).split(r);i.length&&i[0]&&(e.args=i)}},matchCommand_:function(t){for(var e=t.length;e>0;e--){var n=t.substring(0,e);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(t))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var t=0;t
";if(n){n=n.join("");for(var a=0;a")}else for(var o in r){var s=r[o].toString();s.length&&(i+='"'+o+" "+s+"
")}Ae(t,i)},sort:function(t,e){var r,i,a,s,c;function l(){if(e.argString){var t=new n.StringStream(e.argString);if(t.eat("!")&&(r=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var o=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!o&&!t.eol())return"Invalid arguments";if(o[1]){i=-1!=o[1].indexOf("i"),a=-1!=o[1].indexOf("u");var l=-1!=o[1].indexOf("d")||-1!=o[1].indexOf("n")&&1,u=-1!=o[1].indexOf("x")&&1,h=-1!=o[1].indexOf("o")&&1;if(l+u+h>1)return"Invalid arguments";s=(l?"decimal":u&&"hex")||h&&"octal"}o[2]&&(c=new RegExp(o[2].substr(1,o[2].length-2),i?"i":""))}}var u=l();if(u)Ae(t,u+": "+e.argString);else{var h=e.line||t.firstLine(),f=e.lineEnd||e.line||t.lastLine();if(h!=f){var d=o(h,0),A=o(f,yt(t,f)),g=t.getRange(d,A).split("\n"),p=c||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),m="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,b=[],v=[];if(s||c)for(var y=0;y");if(r){var f=0,d=function(){if(f=u)return void Ae(t,"Invalid argument: "+e.argString.substring(a));for(var h=0;h<=u-l;h++){var f=String.fromCharCode(l+h);delete r.marks[f]}}else delete r.marks[o]}else Ae(t,"Argument required")}},Me=new Le;function Oe(t,e,r,i,a,o,s,c,l){t.state.vim.exMode=!0;var u=!1,h=o.from();function f(){t.operation((function(){for(;!u;)d(),A();g()}))}function d(){var e=t.getRange(o.from(),o.to()).replace(s,c);o.replace(e)}function A(){for(;o.findNext()&&Te(o.from(),i,a);)if(r||!h||o.from().line!=h.line)return t.scrollIntoView(o.from(),30),t.setSelection(o.from(),o.to()),h=o.from(),void(u=!1);u=!0}function g(e){if(e&&e(),t.focus(),h){t.setCursor(h);var n=t.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=h.ch}l&&l()}function p(e,r,i){switch(n.e_stop(e),n.keyName(e)){case"Y":d(),A();break;case"N":A();break;case"A":var a=l;l=void 0,t.operation(f),l=a;break;case"L":d();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":g(i)}return u&&g(i),!0}if(A(),!u)return e?void me(t,{prefix:"replace with "+c+" (y/n/a/q/l)",onKeyDown:p}):(f(),void(l&&l()));Ae(t,"No matches for "+s.source)}function De(t){var e=t.state.vim,r=Q.macroModeState,i=Q.registerController.getRegister("."),a=r.isPlaying,o=r.lastInsertModeChanges;a||(t.off("change",$e),n.off(t.getInputField(),"keydown",Xe)),!a&&e.insertModeRepeat>1&&(Ve(t,e,e.insertModeRepeat-1,!0),e.lastEditInputState.repeatOverride=e.insertModeRepeat),delete e.insertModeRepeat,e.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(o.changes.join("")),n.signal(t,"vim-mode-change",{mode:"normal"}),r.isRecording&&Qe(r)}function Fe(t){r.unshift(t)}function Ne(t,e,n,r,i){var a={keys:t,type:e};for(var o in a[e]=n,a[e+"Args"]=r,i)a[o]=i[o];Fe(a)}function Pe(t,e,r,i){var a=Q.registerController.getRegister(i);if(":"==i)return a.keyBuffer[0]&&Me.processCommand(t,a.keyBuffer[0]),void(r.isPlaying=!1);var o=a.keyBuffer,s=0;r.isPlaying=!0,r.replaySearchQueries=a.searchQueries.slice(0);for(var c=0;c|<\w+>|./.exec(h))[0],h=h.substring(l.index+u.length),n.Vim.handleKey(t,u,"macro"),e.insertMode){var f=a.insertModeChanges[s++].changes;Q.macroModeState.lastInsertModeChanges.changes=f,We(t,f,1),De(t)}r.isPlaying=!1}function Re(t,e){if(!t.isPlaying){var n=t.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushText(e)}}function Qe(t){if(!t.isPlaying){var e=t.latestRegister,n=Q.registerController.getRegister(e);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(t.lastInsertModeChanges)}}function Ue(t,e){if(!t.isPlaying){var n=t.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(e)}}function $e(t,e){var n=Q.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;e;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==e.origin||"paste"==e.origin||void 0===e.origin){var i=t.listSelections().length;i>1&&(r.ignoreCount=i);var a=e.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),a&&(t.state.overwrite&&!/\n/.test(a)?r.changes.push([a]):r.changes.push(a))}e=e.next}}function He(t){var e=t.state.vim;if(e.insertMode){var n=Q.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else t.curOp.isVimOp||ze(t,e);e.visualMode&&je(t)}function je(t){var e="cm-animate-fat-cursor",n=t.state.vim,r=st(t,At(n.sel.head)),i=lt(r,0,1);if(Ke(n),r.ch==t.getLine(r.line).length){var a=document.createElement("span");a.textContent=" ",a.className=e,n.fakeCursorBookmark=t.setBookmark(r,{widget:a})}else n.fakeCursor=t.markText(r,i,{className:e})}function Ke(t){t.fakeCursor&&(t.fakeCursor.clear(),t.fakeCursor=null),t.fakeCursorBookmark&&(t.fakeCursorBookmark.clear(),t.fakeCursorBookmark=null)}function ze(t,e){var r=t.getCursor("anchor"),i=t.getCursor("head");if(e.visualMode&&!t.somethingSelected()?Ot(t,!1):e.visualMode||e.insertMode||!t.somethingSelected()||(e.visualMode=!0,e.visualLine=!1,n.signal(t,"vim-mode-change",{mode:"visual"})),e.visualMode){var a=pt(i,r)?0:-1,o=pt(i,r)?-1:0;i=lt(i,0,a),r=lt(r,0,o),e.sel={anchor:r,head:i},Wt(t,e,"<",mt(i,r)),Wt(t,e,">",bt(i,r))}else e.insertMode||(e.lastHPos=t.getCursor().ch)}function Ge(t){this.keyName=t}function Xe(t){var e=Q.macroModeState.lastInsertModeChanges,r=n.keyName(t);function i(){return e.maybeReset&&(e.changes=[],e.maybeReset=!1),e.changes.push(new Ge(r)),!0}r&&(-1==r.indexOf("Delete")&&-1==r.indexOf("Backspace")||n.lookupKey(r,"vim-insert",i))}function Ve(t,e,n,r){var i=Q.macroModeState;i.isPlaying=!0;var a=!!e.lastEditActionCommand,o=e.inputState;function s(){a?Z.processAction(t,e,e.lastEditActionCommand):Z.evalInput(t,e)}function c(n){if(i.lastInsertModeChanges.changes.length>0){n=e.lastEditActionCommand?n:1;var r=i.lastInsertModeChanges;We(t,r.changes,n)}}if(e.inputState=e.lastEditInputState,a&&e.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;lo?e.charCoords(t,"local")[n?"top":"bottom"]:e.heightAtLine(c,"local")+(n?0:c.height)}var u=e.lastLine();if(e.display.barWidth)for(var h,f=0;fu)){for(var A=h||l(d.from,!0)*n,g=l(d.to,!1)*n;fu)&&!((h=l(i[f+1].from,!0)*n)>g+.9);)g=l((d=i[++f]).to,!1)*n;if(g!=A){var p=Math.max(g-A,3),m=r.appendChild(document.createElement("div"));m.style.cssText="position: absolute; right: 0px; width: "+Math.max(e.display.barWidth-1,2)+"px; top: "+(A+this.buttonHeight)+"px; height: "+p+"px",m.className=this.options.className,d.id&&m.setAttribute("annotation-id",d.id)}}}this.div.textContent="",this.div.appendChild(r)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}}(Wh)}));r((function(t,e){!function(t){function e(t,e,n,r){this.cm=t,this.options=r;var i={listenForChanges:!1};for(var a in r)i[a]=r[a];i.className||(i.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(i),this.query=e,this.caseFold=n,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var o=this;t.on("change",this.changeHandler=function(t,e){o.onChange(e)})}t.defineExtension("showMatchesOnScrollbar",(function(t,n,r){return"string"==typeof r&&(r={className:r}),r||(r={}),new e(this,t,n,r)}));var n=1e3;function r(t,e,n){return t<=e?t:Math.max(e,t+n)}e.prototype.findMatches=function(){if(this.gap){for(var e=0;e=this.gap.to);e++)a.to.line>=this.gap.from&&this.matches.splice(e--,1);for(var r=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),i=this.options&&this.options.maxMatches||n;r.findNext();){var a;if((a={from:r.from(),to:r.to()}).from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>i)break}this.gap=null}},e.prototype.onChange=function(e){var n=e.from.line,i=t.changeEnd(e).line,a=i-e.to.line;if(this.gap?(this.gap.from=Math.min(r(this.gap.from,n,a),e.from.line),this.gap.to=Math.max(r(this.gap.to,n,a),e.from.line)):this.gap={from:e.from.line,to:i+1},a)for(var o=0;ot.length)&&(e=t.length);for(var n=0,r=Array(e);n>>0||(Of(Mf,n)?16:10))}:Sf;Dn({global:!0,forced:parseInt!==Df},{parseInt:Df});var Ff=H.parseInt;Dn({target:"String",proto:!0},{repeat:Lu});var Nf=Ni("String","repeat"),Pf=String.prototype,Rf=function(t){var e=t.repeat;return"string"==typeof t||t===Pf||rt(Pf,t)&&e===Pf.repeat?Nf:e},Qf={run:function(t){var e,n="
".concat(t,"
");this.tagParser.formatEngine=this.mdFormatEngine,n=n.replace(//g,"");var r=this.htmlParser.parseHtml(n);return r=this.paragraphStyleClear(r),mh(e=this.$dealHtml(r).replace(/\n{3,}/g,"\n\n\n").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")).call(e,"\n")},$dealHtml:function(t){for(var e="",n=0;n0&&(e+=r.content.replace(/ /g," ").replace(/[\n]+/g,"\n").replace(/^[ \t\n]+\n\s*$/,"\n"))}return e},$handleTagObject:function(t,e){var n,r=e;t.attrs.class&&/(ch-icon-square|ch-icon-check)/.test(t.attrs.class)?Ef(n=t.attrs.class).call(n,"ch-icon-check")>=0?r+="[x]":r+="[ ]":t.attrs.class&&/cherry-code-preview-lang-select/.test(t.attrs.class)?r+="":r+=this.$dealTag(t);return r},$dealTag:function(t){var e=this,n="";return t.children&&(n=e.$dealHtml(t.children)),/(style|meta|link|script)/.test(t.name)?"":"code"===t.name||"pre"===t.name?e.tagParser.codeParser(t,e.$dealCodeTag(t),"pre"===t.name):"function"==typeof e.tagParser["".concat(t.name,"Parser")]?e.tagParser["".concat(t.name,"Parser")](t,n):n},$dealCodeTag:function(t){if(t.children.length<0)return"";for(var e="",n=0;n])+>/g,empty:Tf?Tf(null):{},parseTags:function(t){var e,n=this,r=0,i={type:"tag",name:"",voidElement:!1,attrs:{},children:[]};return t.replace(this.attrRE,(function(a){r%2?e=a:0===r?((n.lookup[a]||"/"===t.charAt(t.length-2))&&(i.voidElement=!0),i.name=a):i.attrs[e]=a.replace(/['"]/g,""),r+=1})),i},parseHtml:function(t,e){var n=this,r=e||{};r.components||(r.components=this.empty);var i,a=[],o=-1,s=[],c={},l=!1;return t.replace(this.tagRE,(function(e,u){if(l){if(e!==""))return;l=!1}var h,f="/"!==e.charAt(1),d=u+e.length,A=t.charAt(d);f&&(o+=1,"tag"===(i=n.parseTags(e)).type&&r.components[i.name]&&(i.type="component",l=!0),i.voidElement||l||!A||"<"===A||i.children.push({type:"text",content:Bf(t).call(t,d,Ef(t).call(t,"<",d))}),c[i.tagName]=i,0===o&&a.push(i),(h=s[o-1])&&h.children.push(i),s[o]=i),f&&!i.voidElement||(o-=1,!l&&"<"!==A&&A&&s[o]&&s[o].children.push({type:"text",content:Bf(t).call(t,d,Ef(t).call(t,"<",d))}))})),a}},tagParser:{formatEngine:{},pParser:function(t,e){var n=e;return/\n$/.test(n)?n:"".concat(n,"\n")},divParser:function(t,e){var n=e;return/\n$/.test(n)?n:"".concat(n,"\n")},spanParser:function(t,e){var n=e.replace(/\t/g,"").replace(/\n/g," ");return t.attrs&&t.attrs.style,n},codeParser:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.formatEngine.convertCode(e,n)},brParser:function(t,e){return this.formatEngine.convertBr(e,"\n")},imgParser:function(t,e){return t.attrs&&"tapd-graph"===t.attrs["data-control"]?this.formatEngine.convertGraph(t.attrs.title,t.attrs.src,t.attrs["data-origin-xml"],t):t.attrs&&t.attrs.src?this.formatEngine.convertImg(t.attrs.alt,t.attrs.src):void 0},videoParser:function(t,e){if(t.attrs&&t.attrs.src)return this.formatEngine.convertVideo(e,t.attrs.src,t.attrs.poster,t.attrs.title)},bParser:function(t,e){for(var n=e.split("\n"),r=[],i=0;i0?r:""}return""},bgColorAttrParser:function(t){var e=t.match(/background-color:\s*([^;]+?);/);if(e&&e[1]){var n="";if(/rgb\([ 0-9]+,[ 0-9]+,[ 0-9]+\)/.test(e[1])){var r,i,a,o,s,c=e[1].match(/rgb\(([ 0-9]+),([ 0-9]+),([ 0-9]+)\)/);if(c[1]&&c[2]&&c[3])c[1]=Ff(mh(r=c[1]).call(r),10),c[2]=Ff(mh(i=c[2]).call(i),10),c[3]=Ff(mh(a=c[3]).call(a),10),n=hs(o=hs(s="#".concat(c[1].toString(16))).call(s,c[2].toString(16))).call(o,c[3].toString(16))}else{n=xf(e,2)[1]}return n}return""}}},mdFormatEngine:{convertColor:function(t,e){var n,r=mh(t).call(t);return!r||/\n/.test(r)?r:e?hs(n="!!".concat(e," ")).call(n,r,"!!"):r},convertSize:function(t,e){var n,r=mh(t).call(t);return!r||/\n/.test(r)?r:e?hs(n="!".concat(e," ")).call(n,r,"!"):r},convertBgColor:function(t,e){var n,r=mh(t).call(t);return!r||/\n/.test(r)?r:e?hs(n="!!!".concat(e," ")).call(n,r,"!!!"):r},convertBr:function(t,e){return t+e},convertCode:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return/\n/.test(t)||e?"```\n".concat(t.replace(/\n+$/,""),"\n```"):"`".concat(t.replace(/`/g,"\\`"),"`")},convertB:function(t){return/^\s*$/.test(t)?"":"**".concat(t,"**")},convertI:function(t){return/^\s*$/.test(t)?"":"*".concat(t,"*")},convertU:function(t){return/^\s*$/.test(t)?"":" /".concat(t,"/ ")},convertImg:function(t,e){var n,r=t&&t.length>0?t:"image";return hs(n="![".concat(r,"](")).call(n,e,")")},convertGraph:function(t,e,n,r){var i,a,o,s=t&&t.length>0?t:"graph",c="";if(r)try{var l,u=r.attrs;Qs(l=Is(u)).call(l,(function(t){var e;Object.prototype.hasOwnProperty.call(u,t)&&(Ef(t).call(t,"data-graph-")>=0&&u[t]&&(c+=hs(e=" ".concat(t,"=")).call(e,u[t])))}))}catch(t){}return hs(i=hs(a=hs(o="![".concat(s,"](")).call(o,e,"){data-control=tapd-graph data-origin-xml=")).call(a,n)).call(i,c,"}")},convertVideo:function(t,e,n,r){var i,a,o=r&&r.length>0?r:"video";return hs(i=hs(a="!video[".concat(o,"](")).call(a,e,"){poster=")).call(i,n,"}")},convertA:function(t,e){var n;if(t===e)return"".concat(t," ");var r=mh(t).call(t);return r?hs(n="[".concat(r,"](")).call(n,e,")"):r},convertSup:function(t){return"^".concat(mh(t).call(t).replace(/\^/g,"\\^"),"^")},convertSub:function(t){return"^^".concat(mh(t).call(t).replace(/\^\^/g,"\\^\\^"),"^^")},convertTd:function(t){return"~|".concat(mh(t).call(t).replace(/\n{1,}/g,"
").replace(/ /g,"~s~")," ~|")},convertTh:function(t){return/^\s*$/.test(t)?"":"~|".concat(mh(t).call(t).replace(/\n{1,}/g,"
")," ~|")},convertTr:function(t){return/^\s*$/.test(t)?"":"".concat(mh(t).call(t).replace(/\n/g,""),"\n")},convertThead:function(t){var e,n="".concat(t.replace(/[ \t]+/g,"").replace(/~\|~\|/g,"~|").replace(/~\|/g,"|"),"\n"),r=n.match(/\|/g).length-1;return hs(e="".concat(n,"|")).call(e,Rf(":-:|").call(":-:|",r),"\n")},convertTable:function(t){var e="\n".concat(t.replace(/[ \t]+/g,"").replace(/~\|~\|/g,"~|").replace(/~\|/g,"|"),"\n").replace(/\n{2,}/g,"\n").replace(/\n[ \t]+\n/g,"\n").replace(/~s~/g," ");if(!/\|:-:\|/.test(e)){var n,r,i=e.match(/^\n[^\n]+\n/)[0].match(/\|/g).length-1;e=hs(n=hs(r="\n|".concat(Rf(" |").call(" |",i),"\n|")).call(r,Rf(":-:|").call(":-:|",i))).call(n,e)}return e},convertLi:function(t){return"- ".concat(t.replace(/^\n/,"").replace(/\n+$/,"").replace(/\n+/g,"\n\t"),"\n")},convertUl:function(t){return"".concat(t,"\n")},convertOl:function(t){for(var e=t.split("\n"),n=1,r=0;r".concat(mh(t).call(t),"\n\n")},convertAddress:function(t){return">".concat(mh(t).call(t),"\n\n")}},paragraphStyleClear:function(t){for(var e=0;e1)for(var o=0;o=0?n:n>=0?n+r:Math.min(n,r)}function Yf(t){var e=t.previousElementSibling,n=t.nextElementSibling;if(!e){var r=getComputedStyle(t),i=t.getBoundingClientRect();if(!n)return{height:Math.max(Wf(r.marginTop)+i.height+Wf(r.marginBottom),0),offsetTop:t.offsetTop-Math.abs(Wf(r.marginTop))};var a=getComputedStyle(n),o=qf(r.marginBottom,a.marginTop);return{height:Math.max(Wf(r.marginTop)+i.height+o,0),offsetTop:t.offsetTop-Math.abs(Wf(r.marginTop))}}var s=getComputedStyle(t),c=t.getBoundingClientRect(),l=function(t,e){var n=Wf(t),r=Wf(e);return r<0?0:n>=0?Math.max(r-n,0):r}(getComputedStyle(e).marginBottom,s.marginTop);if(!n)return{height:Math.max(l+c.height+Wf(s.marginBottom),0),offsetTop:t.offsetTop-Math.abs(Wf(s.marginTop))};var u=getComputedStyle(n),h=qf(s.marginBottom,u.marginTop);return{height:Math.max(l+c.height+h,0),offsetTop:t.offsetTop-Math.abs(l)}}function Jf(t,e){if(!t||!t.tagName)return"";var n,r,i=document.createElement("div");return i.appendChild(t.cloneNode(!1)),n=i.innerHTML,e&&(r=Ef(n).call(n,">")+1,n=n.substring(0,r)+t.innerHTML+n.substring(r)),i=null,n}function Zf(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(t);(i.className=n,void 0!==r)&&Qs(e=Is(r)).call(e,(function(t){var e=r[t];if(Vh(t).call(t,"data-")){var n=t.replace(/^data-/,"");i.dataset[n]=e}else i.setAttribute(t,e)}));return i}var td={showSwitchBtnAfterPasteHtml:function(t,e,n,r,i){mh(r).call(r)!==mh(i).call(i)&&(this.init(t,e,n,r,i),this.setSelection(),this.bindListener(),this.initBubble(),this.showBubble(),"text"===this.getTypeFromLocalStorage()&&this.switchTextClick())},init:function(t,e,n,r,i){this.$cherry=t,this.html=r,this.md=i,this.codemirror=n,this.currentCursor=e,this.locale=t.locale},getTypeFromLocalStorage:function(){return"undefined"==typeof localStorage?"md":localStorage.getItem("cherry-paste-type")||"md"},setTypeToLocalStorage:function(t){"undefined"!=typeof localStorage&&localStorage.setItem("cherry-paste-type",t)},setSelection:function(){var t=this.codemirror.getCursor(),e=Hf({},(function(t){if(null==t)throw new TypeError("Cannot destructure "+t)}(t),t)),n=this.currentCursor;this.codemirror.setSelection(n,e)},bindListener:function(){var t=this;if(this.hasBindListener)return!0;this.hasBindListener=!0,this.codemirror.on("beforeSelectionChange",(function(e,n){t.hideBubble()})),this.codemirror.on("beforeChange",(function(e,n){t.hideBubble()})),this.codemirror.on("scroll",(function(e){t.updatePositionWhenScroll()}))},isHidden:function(){return"none"===this.bubbleDom.style.display},toggleBubbleDisplay:function(){this.isHidden()?this.bubbleDom.style.display="":this.bubbleDom.style.display="none"},hideBubble:function(){if(this.noHide)return!0;this.isHidden()||this.toggleBubbleDisplay()},updatePositionWhenScroll:function(){if(!this.isHidden()){var t=this.bubbleDom.dataset.scrollTop-this.getScrollTop();this.bubbleDom.style.marginTop="".concat(t,"px")}},getScrollTop:function(){return this.codemirror.getScrollInfo().top},showBubble:function(){var t=this.getLastSelectedPosition().top;this.isHidden()&&(this.toggleBubbleDisplay(),this.bubbleDom.style.marginTop="0",this.bubbleDom.dataset.scrollTop=this.getScrollTop()),t>this.codemirror.getWrapperElement().clientHeight-this.bubbleDom.getBoundingClientRect().height-15?(this.bubbleDom.style.top="",this.bubbleDom.style.bottom="".concat(15,"px")):(this.bubbleDom.style.top="".concat(t,"px"),this.bubbleDom.style.bottom="")},initBubble:function(){var t,e;if(this.bubbleDom)return this.bubbleDom.setAttribute("data-type","md"),!0;var n=Zf("div","cherry-bubble cherry-bubble--centered cherry-switch-paste");n.style.display="none";var r=Zf("span","cherry-toolbar-button cherry-text-btn",{title:this.locale.pastePlain});r.innerText="TEXT";var i=Zf("span","cherry-toolbar-button cherry-md-btn",{title:this.locale.pasteMarkdown});i.innerText="Markdown";var a=Zf("span","switch-btn--bg");this.bubbleDom=n,this.switchText=r,this.switchMd=i,this.switchBG=a,this.bubbleDom.appendChild(r),this.bubbleDom.appendChild(i),this.bubbleDom.appendChild(a),this.bubbleDom.setAttribute("data-type","md"),this.codemirror.getWrapperElement().appendChild(this.bubbleDom),this.switchMd.addEventListener("click",fs(t=this.switchMDClick).call(t,this)),this.switchText.addEventListener("click",fs(e=this.switchTextClick).call(e,this))},switchMDClick:function(t){this.setTypeToLocalStorage("md"),"md"!==this.bubbleDom.getAttribute("data-type")&&(this.noHide=!0,this.bubbleDom.setAttribute("data-type","md"),this.codemirror.doc.replaceSelection(this.md),this.setSelection(),this.showBubble(),this.noHide=!1)},switchTextClick:function(t){this.setTypeToLocalStorage("text"),"text"!==this.bubbleDom.getAttribute("data-type")&&(this.noHide=!0,this.bubbleDom.setAttribute("data-type","text"),this.codemirror.doc.replaceSelection(this.html),this.setSelection(),this.showBubble(),this.noHide=!1)},getLastSelectedPosition:function(){var t=Nh(this.codemirror.getWrapperElement().getElementsByClassName("CodeMirror-selected")),e=0,n=0;if(t.length<=0)return this.hideBubble(),{};for(var r=0;rn&&a>=e&&(n=o),a>e&&(e=a)}return{top:n}}},ed=td;function nd(t,e,n,r){return t.addEventListener?(t.addEventListener(e,n,r),!0):t.attachEvent?t.attachEvent("on".concat(e),n):void(t["on".concat(e)]=n)}function rd(t,e,n,r){if(t.removeEventListener)t.removeEventListener(e,n,r);else{if(t.detachEvent)return t.detachEvent("on".concat(e),n);t["on".concat(e)]=null}}var id=new Proxy({},{get:function(t,e,n){return function(){}}}),ad=so,od=Zh,sd=qh;function cd(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return ld(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ld(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ld(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:"image",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"*",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=document.createElement("input"),a=t.$cherry.options.multipleFileSelection||!1;i.type="file",i.id="fileUpload",i.value="",i.style.display="none",i.accept=n,i.multiple=a,i.addEventListener("change",(function(n){var i=n.target.files;t.$cherry.options.callback.fileUploadMulti(i,(function(n){if(0!==n.length){if(r)return r(n);var a,o="",s=cd(i);try{for(s.s();!(a=s.n()).done;){var c=a.value,l=c.url;o+="".concat(fd(e,c,l),"/n")}}catch(t){s.e(t)}finally{s.f()}t.editor.doc.replaceSelection(o)}}))})),i.click()}function hd(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"*",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=document.createElement("input");i.type="file",i.id="fileUpload",i.value="",i.style.display="none",i.accept=n,i.addEventListener("change",(function(n){var i=xf(n.target.files,1)[0];t.$cherry.options.callback.fileUpload(i,(function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof n&&n){if(r)return r(i.name,n,a);var o;o=fd(e,i,n),t.editor.doc.replaceSelection(o)}}))})),i.click()}var fd=function(t,e,n){var r,i,a,o;return"image"===t?hs(i="![".concat(e.name,"](")).call(i,n,")"):"video"===t?hs(a="!video[".concat(e.name,"](")).call(a,n,")"):"audio"===t?hs(o="!audio[".concat(e.name,"](")).call(o,n,")"):hs(r="[".concat(e.name,"](")).call(r,n,")")};function dd(t){var e=[];return null!=t&&t.isBorder&&e.push("#B"),null!=t&&t.isShadow&&e.push("#S"),null!=t&&t.isRadius&&e.push("#R"),null!=t&&t.width&&e.push("#".concat(t.width)),null!=t&&t.height&&(t.width||e.push("#auto"),e.push("#".concat(t.height))),e.join(" ")}function Ad(t,e,n){var r,i,a,o,s,c=null!==(r=null==e?void 0:e.name)&&void 0!==r?r:n.name,l="",u="";/video/i.test(n.type)&&(l="!video",u=null!=e&&e.poster?"{poster=".concat(e.poster,"}"):""),/audio/i.test(n.type)&&(l="!audio"),/image/i.test(n.type)&&(l="!");var h=l?dd(e):"";return hs(i=hs(a=hs(o=hs(s="".concat(l,"[")).call(s,c)).call(o,h,"](")).call(a,t,")")).call(i,u)}function gd(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function pd(t){for(var e=1;e\\x00-\\x1f"\\(\\)]*)?'),Td=new RegExp("(?:\\/\\/)".concat(Ed.source)),Bd=new RegExp("^".concat(Ed.source,"$")),_d=new RegExp("^".concat(Td.source,"$")),Sd=/^([ \t]*)([*+-][ ](\[[ x]\])?|[0-9一二三四五六七八九十零]+\.|[a-z]\.|\b(?:M{0,3}(?:CM|CD|D?C{0,3})(?:XC|XL|L?X{0,3})(?:IX|IV|V?I{0,3}))\b\.)([^\r\n]*)/;function Ld(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n={begin:"(?:^|\\n)(\\n*)",content:["(\\h*\\|[^\\n]+\\|?\\h*)","\\n","(?:(?:\\h*\\|\\h*:?[-]{1,}:?\\h*)+\\|?\\h*)","((\\n\\h*\\|[^\\n]+\\|?\\h*)*)"].join(""),end:"(?=$|\\n)"};n.reg=md(n,"g",!0);var r={begin:"(?:^|\\n)(\\n*)",content:["(\\|?[^\\n|]+(\\|[^\\n|]+)+\\|?)","\\n","(?:\\|?\\h*:?[-]{1,}:?[\\h]*(?:\\|[\\h]*:?[-]{1,}:?\\h*)+\\|?)","((\\n\\|?([^\\n|]+(\\|[^\\n|]*)+)\\|?)*)"].join(""),end:"(?=$|\\n)"};return r.reg=md(r,"g",!0),!1===e?{strict:n,loose:r}:md({begin:"",content:hs(t="(?:".concat(n.begin+n.content+n.end,"|")).call(t,r.begin+r.content+r.end,")"),end:""},"g",!0)}function Id(){var t={begin:/(?:^|\n)(\n*((?:>[\t ]*)*)(?:[^\S\n]*))(`{3,})([^`]*?)\n/,content:/([\w\W]*?)/,end:/[^\S\n]*\3[ \t]*(?=$|\n+)/,reg:new RegExp("")};return t.reg=new RegExp(t.begin.source+t.content.source+t.end.source,"g"),pd(pd({},t),{},{begin:t.begin.source,content:t.content.source,end:t.end.source})}function Md(t,e){var n=t||"Item 1\n Item 1.1\nItem 2";n=n.replace(/^\n+/,"").replace(/\n+$/,"");var r="1.";switch(e){case"ol":r="1.";break;case"ul":r="-";break;case"checklist":r="- [x]"}if(n=n.replace(/^(\s*)([0-9a-zA-Z]+\.|- \[x\]|- \[ \]|-) /gm,"$1"),"1."===r){var i={};n=n.replace(/^(\s*)(\S[\s\S]*?)$/gm,(function(t,e,n){var r,a,o,s=(null===(r=e.match(/[ \t]/g))||void 0===r?void 0:r.length)||0;return i[s]=i[s]?i[s]+1:1,hs(a=hs(o="".concat(e)).call(o,i[s],". ")).call(a,n)}))}else n=n.replace(/^(\s*)(\S[\s\S]*?)$/gm,"$1".concat(r," $2"));return n}function Od(){var t={begin:/(?:^|\n)(\n*(?:[^\S\n]*)):::([^:][^\n]+?)\s*\n/,content:/([\w\W]*?)/,end:/\n[ \t]*:::[ \t]*(?=$|\n+)/};return t.reg=new RegExp(t.begin.source+t.content.source+t.end.source,"g"),t}function Dd(){var t={begin:/(?:^|\n)(\n*(?:[^\S\n]*))\+\+\+([-]{0,1})\s+([^\n]+)\n/,content:/([\w\W]+?)/,end:/\n[ \t]*\+\+\+[ \t]*(?=$|\n+)/};return t.reg=new RegExp(t.begin.source+t.content.source+t.end.source,"g"),t}var Fd=/(\[[^\n]*?\]\(data:image\/[a-z]{1,10};base64,)([^)]+)\)/g,Nd=/(!\[[^\n]*?\]\([^)]+\)\{[^}]* data-xml=)([^}]+)\}/g,Pd=/(!\[[^\n]*?\]\(data:image\/[a-z]{1,10};base64,[^)]+\)\{data-type=drawio data-xml=[^}]+\})/g,Rd=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(Id().reg,(function(t){return t.replace(/^.*$/gm,"/n")})).replace(/(`+)(.+?(?:\n.+?)*?)\1/g,(function(t){return t.replace(/[![\]()]/g,".")}))};function Qd(t){(function(t){var e=/^(\s*)([I一二三四五六七八九十]+)\.(\s+)/,n=/^(\s*)([I一二三四五六七八九十]+)\.(\s+)$/;if(t.getOption("disableInput"))return!1;for(var r=t.listSelections(),i=[],a=0;a0&&void 0!==arguments[0])||arguments[0]?n.editor.setOption("keyMap","default"):n.editor.setOption("keyMap",n.options.keyMap)})),cs(this,"dealSpecialWords",(function(){n.noChange?n.noChange=!1:"hide"!==n.$cherry.status.editor&&(n.formatFullWidthMark(),n.formatBigData2Mark(Fd,"cm-url base64"),n.formatBigData2Mark(Nd,"cm-url drawio"))})),cs(this,"formatBigData2Mark",(function(t,e){for(var r=n.editor,i=r.getSearchCursor(t),a=i.findNext();!1!==a;a=i.findNext()){var o,s,c=i.from();if(c){var l=null!==(o=a[2])&&void 0!==o?o:"",u=c.ch+(null===(s=a[1])||void 0===s?void 0:s.length),h=u+l.length,f=c.line,d={line:f,ch:u},A={line:f,ch:h};if(!(r.findMarks(d,A).length>0)){var g=Zf("span","cm-string ".concat(e),{title:l});g.textContent=l,n.noChange=!0,r.markText(d,A,{replacedWith:g,atomic:!0})}}}})),cs(this,"onKeyup",(function(t,e){var r=e.getCursor().line;n.previewer.highlightLine(r+1)})),cs(this,"onScroll",(function(t){if(n.$cherry.$event.emit("cleanAllSubMenus"),n.disableScrollListener)n.disableScrollListener=!1;else{var e=t.getScrollerElement();if(e.scrollTop<=0)n.previewer.scrollToLineNum(0);else if(e.scrollTop+e.clientHeight>=e.scrollHeight-20)n.previewer.scrollToLineNum(null);else{var r=t.getScrollInfo().top,i=t.lineAtHeight(r,"local"),a=t.charCoords({line:i,ch:0},"local"),o=t.getLineHandle(i).height,s=100*(r-(a.bottom-o))/o/100;n.previewer.scrollToLineNum(i+1,s)}}})),cs(this,"onMouseDown",(function(t,e){n.$cherry.$event.emit("cleanAllSubMenus");var r=t.getCursor().line,i=Math.abs(e.y-t.getWrapperElement().getBoundingClientRect().y);n.previewer.scrollToLineNumWithOffset(r+1,i),n.toHalfWidth(t,e)})),cs(this,"onCursorActivity",(function(){n.refreshWritingStatus()})),this.options={id:"code",name:"code",autoSave2Textarea:!1,editorDom:document.createElement("div"),wrapperDom:null,autoScrollByCursor:!0,convertWhenPaste:!0,keyMap:"sublime",showFullWidthMark:!0,showSuggestList:!0,codemirror:{lineNumbers:!1,cursorHeight:.85,indentUnit:4,tabSize:4,mode:{name:"yaml-frontmatter",gitHubSpice:!1},lineWrapping:!0,indentWithTabs:!0,autofocus:!0,theme:"default",autoCloseTags:!0,extraKeys:{Enter:Qd},matchTags:{bothTags:!0},placeholder:"",keyMap:"sublime"},toolbars:{},onKeydown:function(){},onChange:function(){},onFocus:function(){},onBlur:function(){},onPaste:this.onPaste,onScroll:this.onScroll},this.animation={},this.selectAll=!1;var r=e.codemirror,i=_u(e,Ud);r&&Ss(this.options.codemirror,r),Ss(this.options,i),this.options.codemirror.keyMap=this.options.keyMap,this.$cherry=this.options.$cherry,this.instanceId=this.$cherry.getInstanceId()}),[{key:"formatFullWidthMark",value:function(){var t;if(this.options.showFullWidthMark){var e=this.editor,n=/[·¥、:“”【】()《》]/,r=e.getSearchCursor(n),i=r.findNext();for(Qs(t=e.getAllMarks()).call(t,(function(t){if("cm-fullWidth"===t.className){var r=JSON.parse(Zu(ah(t).call(t))),i=e.getRange(r.from,r.to);n.test(i)||t.clear()}}));!1!==i;i=r.findNext()){var a,o=r.from();if(o){var s={line:o.line,ch:o.ch},c={line:o.line,ch:o.ch+1};0===Qi(a=e.findMarks(s,c)).call(a,(function(t){return"cm-fullWidth"===t.className})).length&&e.markText(s,c,{className:"cm-fullWidth",title:"按住Ctrl/Cmd点击切换成半角(Hold down Ctrl/Cmd and click to switch to half-width)"})}}}}},{key:"toHalfWidth",value:function(t,e){var n=e.target;if(n instanceof HTMLElement&&n.classList.contains("cm-fullWidth")&&(e.ctrlKey||e.metaKey)&&1===e.buttons){var r=n.getBoundingClientRect(),i=t.coordsChar({left:r.left,top:r.top}),a={line:i.line,ch:i.ch+1};t.setSelection(i,a),t.replaceSelection(n.innerText.replace("·","`").replace("¥","$").replace("、","/").replace(":",":").replace("“",'"').replace("”",'"').replace("【","[").replace("】","]").replace("(","(").replace(")",")").replace("《","<").replace("》",">"))}}},{key:"onPaste",value:function(t,e){var n=t.clipboardData;n?this.handlePaste(t,n,e):(n=window.clipboardData,this.handlePaste(t,n,e))}},{key:"handlePaste",value:function(t,e,n){var r,i,a=this,o=this.$cherry.options.callback.onPaste(e,this.$cherry);if(!1!==o&&"string"==typeof o)return t.preventDefault(),void n.replaceSelection(o);var s=e.getData("Text/Html"),c=e.items;s=s.replace(//,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(t){"entity"===t.type&&(t.attributes.title=t.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,e){var n={};n["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var i={};i[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return t})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(t,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var n=t.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",i=RegExp(r+"-"+r),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]||&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(t){var e={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},n=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})$[\s\S]*?^\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:e,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:e.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:e,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function r(t){for(var e={},r=0,i=(t=t.split(" ")).length;r>/g,(function(t,n){return"(?:"+e[+n]+")"}))}function n(t,n,r){return RegExp(e(t,n),r||"")}function r(t,e){for(var n=0;n>/g,(function(){return"(?:"+t+")"}));return t.replace(/<>/g,"[^\\s\\S]")}var i="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",a="class enum interface record struct",o="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function c(t){return"\\b(?:"+t.trim().replace(/ /g,"|")+")\\b"}var l=c(a),u=RegExp(c(i+" "+a+" "+o+" "+s)),h=c(a+" "+o+" "+s),f=c(i+" "+a+" "+s),d=r(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),A=r(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,p=e(/<<0>>(?:\s*<<1>>)?/.source,[g,d]),m=e(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[h,p]),b=/\[\s*(?:,\s*)*\]/.source,v=e(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,b]),y=e(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[d,A,b]),w=e(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),k=e(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,m,b]),C={keyword:u,punctuation:/[<>()?,.:[\]]/},x=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,E=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[E]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:C},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,k]),lookbehind:!0,inside:C},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,p]),lookbehind:!0,inside:C},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:C},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:C},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[k,f,g]),inside:C}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[A]),lookbehind:!0,alias:"class-name",inside:C},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[k,m]),inside:C,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[k]),lookbehind:!0,inside:C,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,d]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(d),alias:"class-name",inside:C}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,p,g,k,u.source,A,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[p,A]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:u,"class-name":{pattern:RegExp(k),greedy:!0,inside:C},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var B=E+"|"+x,_=e(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[B]),S=r(e(/[^"'/()]|<<0>>|\(<>*\)/.source,[_]),2),L=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,I=e(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,S]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[L,I]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[L]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[S]),inside:t.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var M=/:[^}\r\n]+/.source,O=r(e(/[^"'/()]|<<0>>|\(<>*\)/.source,[_]),2),D=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[O,M]),F=r(e(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[B]),2),N=e(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[F,M]);function P(e,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[e]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,M]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[D]),lookbehind:!0,greedy:!0,inside:P(D,O)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[N]),lookbehind:!0,greedy:!0,inside:P(N,F)}],char:{pattern:RegExp(x),greedy:!0}}),t.languages.dotnet=t.languages.cs=t.languages.csharp}(Prism),Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:Prism.languages.csharp||{}}}),Prism.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/},Prism.languages.awk={hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},regex:{pattern:/((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,lookbehind:!0,greedy:!0},variable:/\$\w+/,keyword:/\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,operator:/--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,punctuation:/[()[\]{},;]/},Prism.languages.gawk=Prism.languages.awk,function(t){var e="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+e),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+e),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+e),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+e),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=t.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:r,parameter:n,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:e,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return e.source}));t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return e.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])}(Prism),Prism.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/},function(t){var e,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;t.languages.css.selector={pattern:t.languages.css.selector.pattern,lookbehind:!0,inside:e={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=e,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism),Prism.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/},function(t){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],n=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};t.languages.dart=t.languages.extend("clike",{"class-name":[r,{pattern:RegExp(n+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:r.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),t.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.dart}}},string:/[\s\S]+/}},string:void 0}),t.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),t.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism),function(t){function e(t,e){return"___"+t.toUpperCase()+e+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,a){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(i,(function(t){if("function"==typeof a&&!a(t))return t;for(var i,s=o.length;-1!==n.code.indexOf(i=e(r,s));)++s;return o[s]=t,i})),n.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=t.languages[r];var i=0,a=Object.keys(n.tokenStack);!function o(s){for(var c=0;c=a.length);c++){var l=s[c];if("string"==typeof l||l.content&&"string"==typeof l.content){var u=a[i],h=n.tokenStack[u],f="string"==typeof l?l:l.content,d=e(r,u),A=f.indexOf(d);if(A>-1){++i;var g=f.substring(0,A),p=new t.Token(r,t.tokenize(h,n.grammar),"language-"+r,h),m=f.substring(A+d.length),b=[];g&&b.push.apply(b,o([g])),b.push(p),m&&b.push.apply(b,o([m])),"string"==typeof l?s.splice.apply(s,[c,1].concat(b)):l.content=b}}else l.content&&o(l.content)}return s}(n.tokens)}}}})}(Prism),function(t){t.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var e=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,n=t.languages["markup-templating"];t.hooks.add("before-tokenize",(function(t){n.buildPlaceholders(t,"django",e)})),t.hooks.add("after-tokenize",(function(t){n.tokenizePlaceholders(t,"django")})),t.languages.jinja2=t.languages.django,t.hooks.add("before-tokenize",(function(t){n.buildPlaceholders(t,"jinja2",e)})),t.hooks.add("after-tokenize",(function(t){n.tokenizePlaceholders(t,"jinja2")}))}(Prism),Prism.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},Prism.languages["dns-zone"]=Prism.languages["dns-zone-file"],function(t){var e=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,n=/(?:[ \t]+(?![ \t])(?:)?|)/.source.replace(//g,(function(){return e})),r=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,i=/--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g,(function(){return r})),a={pattern:RegExp(r),greedy:!0},o={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function s(t,e){return t=t.replace(//g,(function(){return i})).replace(//g,(function(){return n})),RegExp(t,e)}t.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:s(/(^(?:ONBUILD)?\w+)(?:)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[a,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:s(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:s(/(^ONBUILD)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:o,string:a,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:o},t.languages.dockerfile=t.languages.docker}(Prism),function(t){for(var e=/[^<()"']|\((?:)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,n=0;n<2;n++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,/[^\s\S]/.source);var r={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:))*\})*\1/.source.replace(//g,(function(){return e}))),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:))*\}/.source.replace(//g,(function(){return e}))),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};r.string[1].inside.interpolation.inside.rest=r,t.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:r}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:r}}}},t.hooks.add("before-tokenize",(function(n){var r=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:)*?>|\$\{(?:)*?\}/.source.replace(//g,(function(){return e})),"gi");t.languages["markup-templating"].buildPlaceholders(n,"ftl",r)})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"ftl")}))}(Prism),Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},Prism.languages["linker-script"]={comment:{pattern:/(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,lookbehind:!0,greedy:!0},identifier:{pattern:/"[^"\r\n]*"/,greedy:!0},"location-counter":{pattern:/\B\.\B/,alias:"important"},section:{pattern:/(^|[^\w*])\.\w+\b/,lookbehind:!0,alias:"keyword"},function:/\b[A-Z][A-Z_]*(?=\s*\()/,number:/\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,operator:/>>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,punctuation:/[(){},;]/},Prism.languages.ld=Prism.languages["linker-script"],Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"],Prism.languages["go-mod"]=Prism.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/},Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,Prism.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+"(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")"+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},Prism.languages.url=Prism.languages.uri,function(t){function e(t){return RegExp("(^(?:"+t+"):[ \t]*(?![ \t]))[^]+","i")}t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:e(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:t.languages.csp},{pattern:e(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:t.languages.hpkp},{pattern:e(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:t.languages.hsts},{pattern:e(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var n,r=t.languages,i={"application/javascript":r.javascript,"application/json":r.json||r.javascript,"application/xml":r.xml,"text/xml":r.xml,"text/html":r.html,"text/css":r.css,"text/plain":r.plain},a={"application/json":!0,"application/xml":!0};function o(t){var e=t.replace(/^[a-z]+\//,"");return"(?:"+t+"|"+("\\w+/(?:[\\w.-]+\\+)+"+e+"(?![+\\w.-])")+")"}for(var s in i)if(i[s]){n=n||{};var c=a[s]?o(s):s;n[s.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+c+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:i[s]}}n&&t.languages.insertBefore("http","header",n)}(Prism),Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/},function(t){var e=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:e,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return e.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(t){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,i=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,a=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:i,punctuation:a};var o={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:o}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:o}}];t.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:i,punctuation:a}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",(function(e){if(/<\?/.test(e.code)){t.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}})),t.hooks.add("after-tokenize",(function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"php")}))}(Prism),function(t){var e=t.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(e,n){"string"==typeof e&&(e=[e]),e.forEach((function(e){!function(e,n){var r="doc-comment",i=t.languages[e];if(i){var a=i[r];if(!a){var o={};o[r]={pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"},a=(i=t.languages.insertBefore(e,"comment",o))[r]}if(a instanceof RegExp&&(a=i[r]={pattern:a}),Array.isArray(a))for(var s=0,c=a.length;s|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),Prism.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:Prism.languages.scala}}},string:/[\s\S]+/}}}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function,delete Prism.languages.scala.constant,function(t){var e=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,n=/#\s*\w+(?:\s*\([^()]*\))?/.source,r=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*)?|/.source.replace(//g,(function(){return n}));t.languages.javadoc=t.languages.extend("javadoclike",{}),t.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+r+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:t.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:t.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:t.languages.markup.tag,entity:t.languages.markup.entity,code:{pattern:/.+/,inside:t.languages.java,alias:"language-java"}}}}}],tag:t.languages.markup.tag,entity:t.languages.markup.entity}),t.languages.javadoclike.addSupport("java",t.languages.javadoc)}(Prism),Prism.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}},function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+e.source+")?|"+e.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function o(t,e){e=(e||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return t}));return RegExp(n,e)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:o(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:o(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:o(a),lookbehind:!0,greedy:!0},number:{pattern:o(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml}(Prism),function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(t){return t=t.replace(//g,(function(){return e})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+t+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(e){["url","bold","italic","strike","code-snippet"].forEach((function(n){e!==n&&(t.languages.markdown[e].inside.content.inside[n]=t.languages.markdown[n])}))})),t.hooks.add("after-tokenize",(function(t){"markdown"!==t.language&&"md"!==t.language||function t(e){if(e&&"string"!=typeof e)for(var n=0,r=e.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown}(Prism),Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(t){if("graphql"===t.language)for(var e=t.tokens.filter((function(t){return"string"!=typeof t&&"comment"!==t.type&&"scalar"!==t.type})),n=0;n0)){var s=f(/^\{$/,/^\}$/);if(-1===s)continue;for(var c=n;c=0&&d(l,"variable-input")}}}}function u(t){return e[n+t]}function h(t,e){e=e||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(t){var e=t.languages.javascript["template-string"],n=e.pattern.source,r=e.inside.interpolation,i=r.inside["interpolation-punctuation"],a=r.pattern.source;function o(e,r){if(t.languages[e])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:e}}}}function s(t,e){return"___"+e.toUpperCase()+"_"+t+"___"}function c(e,n,r){var i={code:e,grammar:n,language:r};return t.hooks.run("before-tokenize",i),i.tokens=t.tokenize(i.code,i.grammar),t.hooks.run("after-tokenize",i),i.tokens}function l(e){var n={};n["interpolation-punctuation"]=i;var a=t.tokenize(e,n);if(3===a.length){var o=[1,1];o.push.apply(o,c(a[1],t.languages.javascript,"javascript")),a.splice.apply(a,o)}return new t.Token("interpolation",a,r.alias,e)}function u(e,n,r){var i=t.tokenize(e,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),o=0,u={},h=i.map((function(t){if("string"==typeof t)return t;for(var n,i=t.content;-1!==e.indexOf(n=s(o++,r)););return u[n]=i,n})).join(""),f=c(h,n,r),d=Object.keys(u);return o=0,function t(e){for(var n=0;n=d.length)return;var r=e[n];if("string"==typeof r||"string"==typeof r.content){var i=d[o],a="string"==typeof r?r:r.content,s=a.indexOf(i);if(-1!==s){++o;var c=a.substring(0,s),h=l(u[i]),f=a.substring(s+i.length),A=[];if(c&&A.push(c),A.push(h),f){var g=[f];t(g),A.push.apply(A,g)}"string"==typeof r?(e.splice.apply(e,[n,1].concat(A)),n+=A.length-1):r.content=A}}else{var p=r.content;Array.isArray(p)?t(p):t([p])}}}(f),new t.Token(r,f,"language-"+r,e)}t.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:markdown|md)/.source),o("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),o("sql",/\bsql/.source),e].filter(Boolean);var h={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(t){return"string"==typeof t?t:Array.isArray(t)?t.map(f).join(""):f(t.content)}t.hooks.add("after-tokenize",(function(e){e.language in h&&function e(n){for(var r=0,i=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript}(Prism),function(t){var e=t.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";t.languages.jsdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:e,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:e.string,number:e.number,boolean:e.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)}(Prism),function(t){function e(t,e){return RegExp(t.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),e)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),t.languages.insertBefore("javascript","keyword",{imports:{pattern:e(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:e(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r|.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}},function(t){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};t.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},t.languages.tex=t.languages.latex,t.languages.context=t.languages.latex}(Prism),Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/},Prism.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/},function(t){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],n="(?:"+(e=e.map((function(t){return t.replace("$","\\$")}))).join("|")+")\\b";t.languages.mongodb=t.languages.extend("javascript",{}),t.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+n+"(?:\\1)?$")}}}),t.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},t.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism),Prism.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/},function(t){var e=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;t.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:e}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:e}},punctuation:/[{};]/}}(Prism),Prism.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}},Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,function(t){var e=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;t.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,e].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,e+/\s*/.source+e].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism),function(t){var e=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;t.languages.phpdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),t.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),t.languages.javadoclike.addSupport("php",t.languages.phpdoc)}(Prism),Prism.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}}),function(t){var e=/\$\w+|%[a-z]+%/,n=/\[[^[\]]*\]/.source,r=/(?:[drlu]|do|down|le|left|ri|right|up)/.source,i="(?:-+"+r+"-+|\\.+"+r+"\\.+|-+(?:"+n+"-*)?|"+n+"-+|\\.+(?:"+n+"\\.*)?|"+n+"\\.+)",a=/(?:>{1,2}|\/{1,2}|\\{1,2}|\|>|[#*^+{xo])/.source,o=/[[?]?[ox]?/.source+"(?:"+i+a+"|"+/(?:<{1,2}|\/{1,2}|\\{1,2}|<\||[#*^+}xo])/.source+i+"(?:"+a+")?)"+/[ox]?[\]?]?/.source;t.languages["plant-uml"]={comment:{pattern:/(^[ \t]*)(?:'.*|\/'[\s\S]*?'\/)/m,lookbehind:!0,greedy:!0},preprocessor:{pattern:/(^[ \t]*)!.*/m,lookbehind:!0,greedy:!0,alias:"property",inside:{variable:e}},delimiter:{pattern:/(^[ \t]*)@(?:end|start)uml\b/m,lookbehind:!0,greedy:!0,alias:"punctuation"},arrow:{pattern:RegExp(/(^|[^-.<>?|\\[\]ox])/.source+o+/(?![-.<>?|\\\]ox])/.source),lookbehind:!0,greedy:!0,alias:"operator",inside:{expression:{pattern:/(\[)[^[\]]+(?=\])/,lookbehind:!0,inside:null},punctuation:/\[(?=$|\])|^\]/}},string:{pattern:/"[^"]*"/,greedy:!0},text:{pattern:/(\[[ \t]*[\r\n]+(?![\r\n]))[^\]]*(?=\])/,lookbehind:!0,greedy:!0,alias:"string"},keyword:[{pattern:/^([ \t]*)(?:abstract\s+class|end\s+(?:box|fork|group|merge|note|ref|split|title)|(?:fork|split)(?:\s+again)?|activate|actor|agent|alt|annotation|artifact|autoactivate|autonumber|backward|binary|boundary|box|break|caption|card|case|circle|class|clock|cloud|collections|component|concise|control|create|critical|database|deactivate|destroy|detach|diamond|else|elseif|end|end[hr]note|endif|endswitch|endwhile|entity|enum|file|folder|footer|frame|group|[hr]?note|header|hexagon|hide|if|interface|label|legend|loop|map|namespace|network|newpage|node|nwdiag|object|opt|package|page|par|participant|person|queue|rectangle|ref|remove|repeat|restore|return|robust|scale|set|show|skinparam|stack|start|state|stop|storage|switch|title|together|usecase|usecase\/|while)(?=\s|$)/m,lookbehind:!0,greedy:!0},/\b(?:elseif|equals|not|while)(?=\s*\()/,/\b(?:as|is|then)\b/],divider:{pattern:/^==.+==$/m,greedy:!0,alias:"important"},time:{pattern:/@(?:\d+(?:[:/]\d+){2}|[+-]?\d+|:[a-z]\w*(?:[+-]\d+)?)\b/i,greedy:!0,alias:"number"},color:{pattern:/#(?:[a-z_]+|[a-fA-F0-9]+)\b/,alias:"symbol"},variable:e,punctuation:/[:,;()[\]{}]|\.{3}/},t.languages["plant-uml"].arrow.inside.expression.inside=t.languages["plant-uml"],t.languages.plantuml=t.languages["plant-uml"]}(Prism),Prism.languages.plsql=Prism.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),Prism.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}}),function(t){var e=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};e.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:e},boolean:e.boolean,variable:e.variable}}(Prism),Prism.languages.properties={comment:/^[ \t]*[#!].*$/m,value:{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0,alias:"attr-value"},key:{pattern:/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,alias:"attr-name"},punctuation:/[=:]/},Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/},function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,i=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function a(t,e){return t=t.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return i})),RegExp(t,e)}i=a(i).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:a(//.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},s=function(e){for(var n=[],r=0;r0&&n[n.length-1].tagName===o(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:o(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var c=o(i);r0&&("string"==typeof e[r-1]||"plain-text"===e[r-1].type)&&(c=o(e[r-1])+c,e.splice(r-1,1),r--),e[r]=new t.Token("plain-text",c,null,c)}i.content&&"string"!=typeof i.content&&s(i.content)}};t.hooks.add("after-tokenize",(function(t){"jsx"!==t.language&&"tsx"!==t.language||s(t.tokens)}))}(Prism),function(t){var e=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var n=t.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(Prism),function(t){t.languages.ruby=t.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var e={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete t.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;t.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:e,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),t.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:e,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:e,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete t.languages.ruby.string,t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),t.languages.rb=t.languages.ruby}(Prism),function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)e=e.replace(//g,(function(){return e}));e=e.replace(//g,(function(){return/[^\s\S]/.source})),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(t){var e=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,n=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,r={pattern:RegExp(e+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},a={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},o={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],c={pattern:RegExp(e),greedy:!0},l=/[$%@.(){}\[\];,\\]/,u={pattern:/%?\b\w+(?=\()/,alias:"keyword"},h={function:u,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:n,"numeric-constant":r,punctuation:l,string:c},f={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},d={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},A={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},p=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,m={pattern:RegExp(/(^|\s)(?:action\s+)?(?:)\.[a-z]+\b[^;]+/.source.replace(//g,(function(){return p})),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:)\.[a-z]+\b/.source.replace(//g,(function(){return p})),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:s,function:u,"arg-value":h["arg-value"],operator:h.operator,argument:h.arg,number:n,"numeric-constant":r,punctuation:l,string:c}},b={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};t.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g,(function(){return e})),"im"),alias:"language-sql",inside:t.languages.sql},"global-statements":A,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:n,"numeric-constant":r,punctuation:l,string:c}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,alias:"language-groovy",inside:t.languages.groovy},keyword:b,"submit-statement":g,"global-statements":A,number:n,"numeric-constant":r,punctuation:l,string:c}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,alias:"language-lua",inside:t.languages.lua},keyword:b,"submit-statement":g,"global-statements":A,number:n,"numeric-constant":r,punctuation:l,string:c}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:h}},"cas-actions":m,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:h},step:o,keyword:b,function:u,format:f,altformat:d,"global-statements":A,number:n,"numeric-constant":r,punctuation:l,string:c}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g,(function(){return e})),"im"),lookbehind:!0,inside:h},"macro-keyword":a,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":a,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:l}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:n,"numeric-constant":r}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:h},"cas-actions":m,comment:s,function:u,format:f,altformat:d,"numeric-constant":r,datetime:{pattern:RegExp(e+"(?:dt?|t)"),alias:"number"},string:c,step:o,keyword:b,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:n,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:l}}(Prism),function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete t.languages.sass.atrule;var e=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:e,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:e,operator:n,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism),Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,function(t){t.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(t){for(var e in t)t[e]=t[e].replace(/<[\w\s]+>/g,(function(e){return"(?:"+t[e].trim()+")"}));return t[e]}({"":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"":/[+-]?|[+-](?:inf|nan)\.0/.source,"":/[+-](?:|(?:inf|nan)\.0)?i/.source,"":/(?:@|)?|/.source,"":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?/.source,"":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"":/[+-]?|[+-](?:inf|nan)\.0/.source,"":/[+-](?:|(?:inf|nan)\.0)?i/.source,"":/(?:@|)?|/.source,"":/#[box](?:#[ei])?|(?:#[ei])?#[box]/.source,"":/(^|[()\[\]\s])(?:|)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}}(Prism),function(t){var e=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|");t.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<>)+/.source.replace(/<>/g,(function(){return e})),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:t.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},t.languages["sh-session"]=t.languages.shellsession=t.languages["shell-session"]}(Prism),Prism.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/},Prism.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/},Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(t){t.inside.interpolation.inside=Prism.languages.swift})),function(t){var e={pattern:/^[;#].*/m,greedy:!0},n=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;t.languages.systemd={comment:e,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+n+'|(?=[^"\r\n]))(?:'+/[^\s\\]/.source+'|[ \t]+(?:(?![ \t"])|'+n+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:e,quoted:{pattern:RegExp(/(^|\s)/.source+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}(Prism),function(t){var e=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,n=/\)|\((?![^|()\n]+\))/.source;function r(t,r){return RegExp(t.replace(//g,(function(){return"(?:"+e+")"})).replace(//g,(function(){return"(?:"+n+")"})),r||"")}var i={css:{pattern:/\{[^{}]+\}/,inside:{rest:t.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},a=t.languages.textile=t.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:r(/^[a-z]\w*(?:||[<>=])*\./.source),inside:{modifier:{pattern:r(/(^[a-z]\w*)(?:||[<>=])+(?=\.)/.source),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:r(/^[*#]+*\s+\S.*/.source,"m"),inside:{modifier:{pattern:r(/(^[*#]+)+/.source),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:r(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.|(?!(?:||[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:r(/(^|\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:r(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:r(/(^(\*\*?)*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:r(/(^(__?)*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:r(/(^\?\?*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:r(/(^@*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:r(/(^\+*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:r(/(^-*).+?(?=-)/.source),lookbehind:!0},span:{pattern:r(/(^%*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:r(/(^\*\*|__|\?\?|[*_%@+\-^~])+/.source),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:r(/"*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:r(/(^"*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:r(/(^")+/.source),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:r(/!(?:||[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:r(/(^!(?:||[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:r(/(^!)(?:||[<>=])+/.source),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),o=a.phrase.inside,s={inline:o.inline,link:o.link,image:o.image,footnote:o.footnote,acronym:o.acronym,mark:o.mark};a.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var c=o.inline.inside;c.bold.inside=s,c.italic.inside=s,c.inserted.inside=s,c.deleted.inside=s,c.span.inside=s;var l=o.table.inside;l.inline=s.inline,l.link=s.link,l.image=s.image,l.footnote=s.footnote,l.acronym=s.acronym,l.mark=s.mark}(Prism),Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/},Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}),Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/},Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},Prism.languages.wiki=Prism.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:Prism.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),Prism.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:Prism.languages.markup.tag.inside}}}}),function(t){function e(e,n){t.languages[e]&&t.languages.insertBefore(e,"comment",{"doc-comment":n})}var n=t.languages.markup.tag,r={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:n}},i={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:n}};e("csharp",r),e("fsharp",r),e("vbnet",i)}(Prism),function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var e={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(e).forEach((function(n){var r=e[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),t.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(t.languages.diff,"PREFIXES",{value:e})}(Prism),Prism.languages.glsl=Prism.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/}),function(t){t.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:t.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:t.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:t.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:t.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:t.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:t.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:t.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var e=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=e.length;r]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.pascal.asm.inside=Prism.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),Prism.languages.objectpascal=Prism.languages.pascal,function(t){var e=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;t.languages.protobuf=t.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),t.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:e}},builtin:e,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(Prism),Xp.manual=!0;var Yp={figure:"figure"},Jp=function(t){function e(t){var n;t.externals;var r,i=t.config;(ra(this,e),n=Wp(this,e,[{needCache:!0}]),e.inlineCodeCache={},n.codeCache={},n.customLang=[],n.customParser={},n.lineNumber=i.lineNumber,n.copyCode=i.copyCode,n.expandCode=i.expandCode,n.editCode=i.editCode,n.changeLang=i.changeLang,n.selfClosing=i.selfClosing,n.mermaid=i.mermaid,n.indentedCodeBlock=void 0===i.indentedCodeBlock||i.indentedCodeBlock,n.INLINE_CODE_REGEX=/(`+)(.+?(?:\n.+?)*?)\1/g,i&&i.customRenderer)&&(n.customLang=lA(r=Is(i.customRenderer)).call(r,(function(t){return t.toLowerCase()})),n.customParser=function(t){for(var e=1;e40&&(this.codeCache.length=0),!1)}},{key:"parseCustomLanguage",value:function(t,e,n){var r,i,a,o,s,c=this.customParser[t];if(!c||"function"!=typeof c.render)return!1;var l=c.render(e,n.sign,this.$engine,this.mermaid);if(!l)return!1;var u=Yp[c.constructor.TYPE]||"div";return hs(r=hs(i=hs(a=hs(o=hs(s="<".concat(u,' data-sign="')).call(s,n.sign,'" data-type="')).call(o,t,'" data-lines="')).call(a,n.lines,'">')).call(i,l,"")}},{key:"fillTag",value:function(t){var e=[];return lA(t).call(t,(function(t){if(!t)return"";for(var n=t;e.length;){var r,i=e.pop();n=hs(r="".concat(i)).call(r,n)}var a=n.match(/|<\/span>/g),o=0;if(!a)return n;for(;a.length;){var s=a.pop();/<\/span>/.test(s)?o+=1:o?o-=1:e.unshift(s.match(//)[0])}for(var c=0;c");return n}))}},{key:"renderLineNumber",value:function(t){if(!this.lineNumber)return t;var e=t.split("\n");return e.pop(),e=this.fillTag(e),''.concat(e.join('\n'),"")}},{key:"isInternalCustomLangCovered",value:function(t){var e;return-1!==Ef(e=this.customLang).call(e,t)}},{key:"computeLines",value:function(t,e,n){var r=e,i=this.getLineCount(t,r);return{sign:this.$engine.md5(t.replace(/^\n+/,"")+i),lines:i}}},{key:"appendMermaid",value:function(t,e){var n=t,r=e;if(/^flow([ ](TD|LR))?$/i.test(r)&&!this.isInternalCustomLangCovered(r)){var i,a=r.match(/^flow(?:[ ](TD|LR))?$/i)||[];n=hs(i="graph ".concat(a[1]||"TD","\n")).call(i,n),r="mermaid"}return/^seq$/i.test(r)&&!this.isInternalCustomLangCovered(r)&&(n="sequenceDiagram\n".concat(n),r="mermaid"),"mermaid"===r&&(n=n.replace(/(^[\s]*)stateDiagram-v2\n/,"$1stateDiagram\n")),[n,r]}},{key:"wrapCode",value:function(t,e){var n;return hs(n='')).call(n,t,"")}},{key:"renderCodeBlock",value:function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,A=t,g=e.toLowerCase();this.customHighlighter?A=this.customHighlighter(A,g):(g&&Xp.languages[g]||(g="javascript"),A=Xp.highlight(A,Xp.languages[g],g),A=this.renderLineNumber(A));var p=this.expandCode&&(null===(i=t.match(/\n/g))||void 0===i?void 0:i.length)>10;return A=hs(a=hs(o=hs(s=hs(c=hs(l=hs(u=hs(h=hs(f=hs(d='\n
')).call(a,this.wrapCode(A,g),"
\n "),p&&(A+='
\n
\n \n
\n
'),A+=""}},{key:"$getIndentedCodeReg",value:function(){return new RegExp("(?:^|\\n\\s*\\n)(?: {4}|\\t)"+"([\\s\\S]+?)"+"(?=$|\\n( {0,3}[^ \\t\\n]|\\n[^ \\t\\n]))","g")}},{key:"$getIndentCodeBlock",value:function(t){var e=this;return this.indentedCodeBlock?this.$recoverCodeInIndent(t).replace(this.$getIndentedCodeReg(),(function(t,n){var r,i,a=(t.match(/\n/g)||[]).length,o=e.$engine.md5(t),s=hs(r=hs(i='
')).call(r,UA(n.replace(/\n( {4}|\t)/g,"\n")),"
");return uA(t,e.pushCache(s,o,a))})):t}},{key:"$replaceCodeInIndent",value:function(t){return this.indentedCodeBlock?t.replace(this.$getIndentedCodeReg(),(function(t){return t.replace(/`/g,"~~~IndentCode")})):t}},{key:"$recoverCodeInIndent",value:function(t){return this.indentedCodeBlock?t.replace(this.$getIndentedCodeReg(),(function(t){return t.replace(/~~~IndentCode/g,"`")})):t}},{key:"$dealUnclosingCode",value:function(t){var e=t.match(/(?:^|\n)(\n*((?:>[\t ]*)*)(?:[^\S\n]*))(`{3,})([^`]*?)(?=$|\n)/g);if(!e||e.length<=0)return t;var n=!1,r=Qi(e).call(e,(function(t){return!1===n?(n=!0,!0):!/```[^`\s]+/.test(t)&&(n=!1,!0)}));if(r.length%2==1){var i,a=r[r.length-1].replace(/(`)[^`]+$/,"$1").replace(/\n+/,""),o=t.replace(/\n+$/,"").replace(/\n`{1,2}$/,"");return hs(i="".concat(o,"\n")).call(i,a,"\n")}return t}},{key:"beforeMakeHtml",value:function(t,e,n){var r=this,i=t;return(this.selfClosing||this.$engine.$cherry.options.engine.global.flowSessionContext)&&(i=this.$dealUnclosingCode(i)),i=(i=this.$replaceCodeInIndent(i)).replace(this.RULE.reg,(function(t,e,n,i,a,o){var s,c,l;function u(t){if(n){var e=new RegExp("^\n*",""),r=t.match(e)[0];t=r+n+t.replace(e,(function(t){return""}))}return t}var h=o,f=r.computeLines(t,e,o),d=f.sign,A=f.lines,g=r.$codeCache(d);if(g&&""!==g)return u(r.getCacheWithSpace(r.pushCache(g,d,A),t));h=(h=(h=r.$recoverCodeInIndent(h)).replace(/~D/g,"$")).replace(/~T/g,"~");var p=null!==(s=null==e||null===(c=e.match(/[ ]/g))||void 0===c?void 0:c.length)&&void 0!==s?s:0;if(p>0){var m=new RegExp("(^|\\n)[ ]{1,".concat(p,"}"),"g");h=h.replace(m,"$1")}if(n){var b=new RegExp("(^|\\n)".concat(n),"g");h=h.replace(b,"$1")}var v=mh(a).call(a);if(/^(math|katex|latex)$/i.test(v)&&!r.isInternalCustomLangCovered(v)){var y,w=t.match(/^\s*/g);return hs(y="".concat(w,"~D~D\n")).call(y,h,"~D~D")}var k=xf(r.appendMermaid(h,v),2);return h=k[0],v=k[1],-1!==Ef(l=r.customLang).call(l,v.toLowerCase())&&(g=r.parseCustomLanguage(v,h,{lines:A,sign:d}))&&""!==g?(r.$codeCache(d,g),r.getCacheWithSpace(r.pushCache(g,d,A),t)):(h=h.replace(/~X/g,"\\`"),g=(g=r.renderCodeBlock(h,v,d,A)).replace(/\\/g,"\\\\"),g=r.$codeCache(d,g),u(r.getCacheWithSpace(r.pushCache(g,d,A),t)))})),i=i.replace(Ld(!0),(function(t){var e;return lA(e=t.split("|")).call(e,(function(t){return r.makeInlineCode(t)})).join("|").replace(/`/g,"\\`")})),i=this.makeInlineCode(i),i=this.$getIndentCodeBlock(i)}},{key:"makeInlineCode",value:function(t){var n=this,r=t;return this.INLINE_CODE_REGEX.test(r)&&(r=(r=r.replace(/\\`/g,"~~not~inlineCode")).replace(this.INLINE_CODE_REGEX,(function(t,r,i){if("`"===mh(i).call(i))return t;var a=i.replace(/~~not~inlineCode/g,"\\`");a=(a=n.$replaceSpecialChar(a)).replace(/\\/g,"\\\\");var o="".concat(UA(a),""),s=n.$engine.md5(o);return e.inlineCodeCache[s]=o,"~~CODE".concat(s,"$")})),r=r.replace(/~~not~inlineCode/g,"\\`")),r}},{key:"makeHtml",value:function(t){return t}},{key:"$replaceSpecialChar",value:function(t){var e=t.replace(/~Q/g,"\\~");return e=(e=(e=(e=e.replace(/~Y/g,"\\!")).replace(/~Z/g,"\\#")).replace(/~&/g,"\\&")).replace(/~K/g,"\\/")}},{key:"rule",value:function(){return Id()}},{key:"mounted",value:function(t){}}])}(VA);function Zp(t,e,n){return e=es(e),Ko(t,tm()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function tm(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(tm=function(){return!!t})()}cs(Jp,"HOOK_NAME","codeBlock"),cs(Jp,"inlineCodeCache",{});var em=function(t){function e(){return ra(this,e),Zp(this,e,arguments)}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t){return t}},{key:"afterMakeHtml",value:function(t){var e=t;return Is(Jp.inlineCodeCache).length>0&&(e=e.replace(/~~CODE([0-9a-zA-Z]+)\$/g,(function(t,e){return Jp.inlineCodeCache[e]}))),e}},{key:"$cleanCache",value:function(){Jp.inlineCodeCache={}}},{key:"rule",value:function(){var t={begin:"(`+)[ ]*",end:"[ ]*\\1",content:"(.+?(?:\\n.+?)*?)"};return t.reg=md(t,"g"),t}}])}(VA);cs(em,"HOOK_NAME","inlineCode");var nm=r((function(t){!function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],n=0,r=0;n>>5]|=t[n]<<24-r%32;return e},wordsToBytes:function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},bytesToHex:function(t){for(var e=[],n=0;n>>4).toString(16)),e.push((15&t[n]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}};t.exports=n}()})),rm={utf8:{stringToBytes:function(t){return rm.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(rm.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],n=0;n>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[c>>>5]|=128<>>9<<4)]=c;var A=a._ff,g=a._gg,p=a._hh,m=a._ii;for(d=0;d>>0,u=u+v>>>0,h=h+y>>>0,f=f+w>>>0}return e.endian([l,u,h,f])};a._ff=function(t,e,n,r,i,a,o){var s=t+(e&n|~e&r)+(i>>>0)+o;return(s<>>32-a)+e},a._gg=function(t,e,n,r,i,a,o){var s=t+(e&r|n&~r)+(i>>>0)+o;return(s<>>32-a)+e},a._hh=function(t,e,n,r,i,a,o){var s=t+(e^n^r)+(i>>>0)+o;return(s<>>32-a)+e},a._ii=function(t,e,n,r,i,a,o){var s=t+(n^(e|~r))+(i>>>0)+o;return(s<>>32-a)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,n){if(null==t)throw new Error("Illegal argument "+t);var r=e.wordsToBytes(a(t,n));return n&&n.asBytes?r:n&&n.asString?i.bytesToString(r):e.bytesToHex(r)}}()})),cm={},lm=/^cherry-inner:\/\/([0-9a-f]+)$/i;function um(t){return function(e,n){if(hm.isInnerLink(e)){var r=t(hm.get(e),n);return hm.replace(e,r)}return t(e,n)}}var hm=function(){function t(){ra(this,t)}return Ho(t,null,[{key:"isInnerLink",value:function(t){return lm.test(t)}},{key:"set",value:function(t){var e=sm(t);return cm[e]=t,"cherry-inner://".concat(e)}},{key:"get",value:function(t){var e,n=xf(null!==(e=t.match(lm))&&void 0!==e?e:[],2)[1];if(n)return cm[n]}},{key:"replace",value:function(t,e){var n,r=xf(null!==(n=t.match(lm))&&void 0!==n?n:[],2)[1];if(r)return cm[r]=e,t}},{key:"restoreAll",value:function(e){var n=e.replace(/cherry-inner:\/\/([0-9a-f]+)/gi,(function(e){return t.get(e)||e}));return n}},{key:"clear",value:function(){cm={}}}])}();function fm(t,e,n){return e=es(e),Ko(t,dm()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function dm(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(dm=function(){return!!t})()}var Am=function(t){function e(t){var n,r=t.config;return t.globalConfig,ra(this,e),(n=fm(this,e,[{config:r}])).target=r.target?'target="'.concat(r.target,'"'):r.openNewPage?'target="_blank"':"",n.rel=r.rel?'rel="'.concat(r.rel,'"'):"",n}return ss(e,t),Ho(e,[{key:"checkBrackets",value:function(t){for(var e=[],n="[".concat(t,"]"),r=function(t){return 1&Bf(n).call(n,0,t).match(/\\*$/)[0].length},i=n.length-1;n[i]&&(i!==n.length-1||!r(i));i--)if("]"!==n[i]||r(i)||e.push("]"),"["===n[i]&&!r(i)&&(e.pop(),!e.length))return{isValid:!0,coreText:Bf(n).call(n,i+1,n.length-1),extraLeadingChar:Bf(n).call(n,0,i)};return{isValid:!1,coreText:t,extraLeadingChar:""}}},{key:"toHtml",value:function(t,e,n,r,i,a,o){var s=void 0===r?"ref":"url",c="";if("ref"===s)return t;if("url"===s){var l,u=this.checkBrackets(n),h=u.isValid,f=u.coreText,d=u.extraLeadingChar;if(!h)return t;c=i&&""!==mh(i).call(i)?' title="'.concat(UA(i.replace(/["']/g,"")),'"'):"",o?c+=' target="'.concat(o.replace(/{target\s*=\s*(.*?)}/,"$1"),'"'):this.target&&(c+=" ".concat(this.target));var A,g,p,m,b=mh(r).call(r).replace(/~1D/g,"~D"),v=f.replace(/~1D/g,"~D");return jA(b)?(b=KA(b=this.$engine.$cherry.options.callback.urlProcessor(b,"link")),hs(A=hs(g=hs(p=hs(m="".concat(e+d,'")).call(A,v,"")):hs(l="".concat(e+d,"")).call(l,n,"")}return t}},{key:"toStdMarkdown",value:function(t){return t}},{key:"makeHtml",value:function(t){var e,n,r=t.replace(this.RULE.reg,(function(t){return t.replace(/~D/g,"~1D")}));bd()?r=r.replace(this.RULE.reg,fs(e=this.toHtml).call(e,this)):r=Tp(r,this.RULE.reg,fs(n=this.toHtml).call(n,this),!0,1);return r=r.replace(this.RULE.reg,(function(t){return t.replace(/~1D/g,"~D")})),r}},{key:"rule",value:function(){var t,e={begin:bd()?"((?0&&void 0!==arguments[0]?arguments[0]:{config:void 0}).config;return ra(this,e),t=gm(this,e,[{config:n}]),n?(t.allowWhitespace=!!n.allowWhitespace,t):Ko(t)}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t,e){var n=function(t,n,r,i){var a,o,s,c=r.length%2==1?"em":"strong",l=Math.floor(r.length/2),u=Rf("").call("",l),h=Rf("").call("",l);return"em"===c&&(u+="",h="".concat(h)),hs(a=hs(o=hs(s="".concat(n)).call(s,u)).call(o,e(i).html.replace(/_/g,"~U"))).call(a,h)},r=t;return r=(r=this.allowWhitespace?(r=(r=r.replace(/(^|\n[\s]*)(\*)([^\s*](?:.*?)(?:(?:\n.*?)*?))\*/g,n)).replace(/(^|\n[\s]*)(\*{2,})((?:.*?)(?:(?:\n.*?)*?))\2/g,n)).replace(/([^\n*\\\s][ ]*)(\*+)((?:.*?)(?:(?:\n.*?)*?))\2/g,n):r.replace(this.RULE.asterisk.reg,n)).replace(this.RULE.underscore.reg,(function(t,n,r,i,a,o){var s,c,l;if(""===mh(i).call(i))return t;var u=r.length%2==1?"em":"strong",h=Math.floor(r.length/2),f=Rf("").call("",h),d=Rf("").call("",h),A=e(i).html;return"em"===u&&(f+="",d="".concat(d)),hs(s=hs(c=hs(l="".concat(n)).call(l,f)).call(c,A)).call(s,d)})),r.replace(/~U/g,"_")}},{key:"test",value:function(t,e){return this.RULE[e].reg&&this.RULE[e].reg.test(t)}},{key:"rule",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0}).config,e=!!t&&!!t.allowWhitespace,n=function(t,e){var n,r,i,a="[^".concat(e,"\\s]");return t?"(?:.*?)(?:(?:\\n.*?)*?)":hs(n=hs(r=hs(i="(".concat(a,"|")).call(i,a,"(.*?(\n")).call(r,a,".*)*)")).call(n,a,")")},r={begin:"(^|[^\\\\])([*]+)",content:"(".concat(n(e,"*"),")"),end:"\\2"},i={begin:"(^|".concat(kd,")(_+)"),content:"(".concat(n(e,"_"),")"),end:"\\2(?=".concat(kd,"|$)")};return r.reg=md(r,"g"),i.reg=md(i,"g"),{asterisk:r,underscore:i}}}])}(iA);function bm(t,e,n){return e=es(e),Ko(t,vm()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function vm(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(vm=function(){return!!t})()}cs(mm,"HOOK_NAME","fontEmphasis");var ym=function(t){function e(t){var n;return ra(this,e),(n=bm(this,e)).initBrReg(t.globalConfig.classicBr),n}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t,e){var n=this;return this.test(t)?t.replace(this.RULE.reg,(function(t,r,i){var a;if(n.isContainsCache(t,!0))return t;var o,s=function(t){var r,i,a,o,s,c;if(""===mh(t).call(t))return"";var l=e(t),u=l.sign,h=l.html,f="p";new RegExp("<(".concat(PA,")[^>]*>"),"i").test(h)&&(f="div");var d=n.getLineCount(t,t);return hs(r=hs(i=hs(a=hs(o=hs(s=hs(c="<".concat(f,' data-sign="')).call(c,u)).call(s,d,'" data-type="')).call(o,f,'" data-lines="')).call(a,d,'">')).call(i,n.$cleanParagraph(h),"")};return n.isContainsCache(i)?n.makeExcludingCached(hs(o="".concat(r)).call(o,i),s):s(hs(a="".concat(r)).call(a,i))})):t}},{key:"rule",value:function(){var t={begin:"(?:^|\\n)(\\n*)",end:"(?=\\s*$|\\n\\n)",content:"([\\s\\S]+?)"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),t}}])}(VA);cs(ym,"HOOK_NAME","normalParagraph");var wm=function(t){return void 0!==t&&(Bt(t,"value")||Bt(t,"writable"))};Dn({target:"Reflect",stat:!0},{get:function t(e,n){var r,i,a=arguments.length<3?e:arguments[2];return ue(e)===a?e[n]:(r=ye.f(e,n))?wm(r)?r.value:void 0===r.get?void 0:ht(r.get,a):ft(i=Ea(e))?t(i,n,a):void 0}});var km=H.Reflect.get,Cm=ji;function xm(){var t;return xm="undefined"!=typeof Reflect&&km?qo(t=km).call(t):function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=es(t)););return t}(t,e);if(r){var i=Cm(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},xm.apply(null,arguments)}function Em(t,e,n){return e=es(e),Ko(t,Tm()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Tm(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Tm=function(){return!!t})()}var Bm="atx",_m="setext",Sm=/[\s\-_]/,Lm=/[A-Za-z]/,Im=/[0-9]/,Mm=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0,externals:void 0};n.externals;var r=n.config;return ra(this,e),(t=Em(this,e,[{needCache:!0}])).strict=!r||!!r.strict,t.RULE=t.rule(),t.headerIDCache=[],t.headerIDCounter={},t.config=r||{},t}return ss(e,t),Ho(e,[{key:"$parseTitleText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"string"!=typeof t?"":t.replace(/<.*?>/g,"").replace(/</g,"<").replace(/>/g,">")}},{key:"$generateId",value:function(t){for(var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.length,r="",i=0;i255)try{r+=encodeURIComponent(a)}catch(t){}}return r}},{key:"generateIDNoDup",value:function(t){var e,n=t.replace(/</g,"<").replace(/>/g,">"),r=this.$generateId(n,!0),i=Ef(e=this.headerIDCache).call(e,r);if(-1!==i)this.headerIDCounter[i]+=1,r+="-".concat(this.headerIDCounter[i]+1);else{var a=this.headerIDCache.push(r);this.headerIDCounter[a-1]=1}return r}},{key:"$wrapHeader",value:function(t,e,n,r){var i,a,o,s,c,l,u,h=r(mh(t).call(t)),f=h.html,d=f.match(/\s+\{#([A-Za-z0-9-]+)\}$/);null!==d&&(f=f.substring(0,d.index),u=xf(d,2)[1]);var A=this.$parseTitleText(f);if(!u){u=this.generateIDNoDup(A.replace(/~fn#([0-9]+)#/g,""))}var g="safe_".concat(u),p=this.$engine.md5(hs(i=hs(a=hs(o="".concat(e,"-")).call(o,h.sign,"-")).call(a,u,"-")).call(i,n));return{html:[hs(s=hs(c=hs(l="'),this.$getAnchor(u),"".concat(f),"")].join(""),sign:"".concat(p)}}},{key:"$getAnchor",value:function(t){return"none"===(this.config.anchorStyle||"default")?"":'')}},{key:"beforeMakeHtml",value:function(t){var e=this,n=t;return this.$engine.$cherry.options.engine.global.flowSessionContext&&(n=n.replace(/(\n\s*-{1,})\s*$/,"$1 ")),this.test(n,Bm)&&(n=n.replace(this.RULE[Bm].reg,(function(t,n,r,i){return""===mh(i).call(i)?t:e.getCacheWithSpace(e.pushCache(t),t,!0)}))),this.test(n,_m)&&(n=n.replace(this.RULE[_m].reg,(function(t,n,r){return""===mh(r).call(r)||e.isContainsCache(r)?t:e.getCacheWithSpace(e.pushCache(t),t,!0)}))),n}},{key:"makeHtml",value:function(t,e){var n=this,r=this.restoreCache(t);return this.test(r,Bm)&&(r=r.replace(this.RULE[Bm].reg,(function(t,r,i,a){var o=hA(r,n.getLineCount(t.replace(/^\n+/,""))),s=a.replace(/\s+#+\s*$/,""),c=n.$wrapHeader(s,i.length,o,e),l=c.html,u=c.sign;return n.getCacheWithSpace(n.pushCache(l,u,o),t,!0)}))),this.test(r,_m)&&(r=r.replace(this.RULE[_m].reg,(function(t,r,i,a){if(n.isContainsCache(i))return t;var o=hA(r,n.getLineCount(t.replace(/^\n+/,""))),s="-"===a[0]?2:1,c=n.$wrapHeader(i,s,o,e),l=c.html,u=c.sign;return n.getCacheWithSpace(n.pushCache(l,u,o),t,!0)}))),r}},{key:"afterMakeHtml",value:function(t){var n=xm(es(e.prototype),"afterMakeHtml",this).call(this,t);return this.headerIDCache=[],this.headerIDCounter={},n}},{key:"test",value:function(t,e){return this.RULE[e].reg&&this.RULE[e].reg.test(t)}},{key:"rule",value:function(){var t={begin:"(?:^|\\n)(\\n*)",content:["(?:\\h*","(.+)",")\\n","(?:\\h*","([=]+|[-]+)",")"].join(""),end:"(?=$|\\n)"};t.reg=md(t,"g",!0);var e={begin:"(?:^|\\n)(\\n*)(?:\\h*(#{1,6}))",content:"(.+?)",end:"(?=$|\\n)"};return this.strict&&(e.begin+="(?=\\h+)"),e.reg=md(e,"g",!0),{setext:t,atx:e}}}])}(VA);function Om(t,e,n){return e=es(e),Ko(t,Dm()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Dm(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Dm=function(){return!!t})()}cs(Mm,"HOOK_NAME","header");var Fm=function(t){function e(){return ra(this,e),Om(this,e,arguments)}return ss(e,t),Ho(e,[{key:"rule",value:function(){return{begin:"",content:"",end:"",reg:new RegExp("")}}},{key:"beforeMakeHtml",value:function(t){return t.replace(/\\\n/g,"\\ \n")}},{key:"afterMakeHtml",value:function(t){var e=t.replace(/~Q/g,"~");return e=(e=(e=(e=(e=e.replace(/~X/g,"`")).replace(/~Y/g,"!")).replace(/~Z/g,"#")).replace(/~&/g,"&")).replace(/~K/g,"/")}}])}(iA);cs(Fm,"HOOK_NAME","transfer");var Nm=TypeError,Pm="Reduce of empty array with no initial value",Rm=function(t){return function(e,n,r,i){var a=yt(e),o=Q(a),s=un(a);if(ut(n),0===s&&r<2)throw new Nm(Pm);var c=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,t?c<0:s<=c)throw new Nm(Pm)}for(;t?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Qm={left:Rm(!1),right:Rm(!0)},Um="process"===x(j.process),$m=Qm.left,Hm=!Um&&Y>79&&Y<83||!Ms("reduce");Dn({target:"Array",proto:!0,forced:Hm},{reduce:function(t){var e=arguments.length;return $m(this,t,e,e>1?arguments[1]:void 0)}});var jm=Ni("Array","reduce"),Km=Array.prototype,zm=function(t){var e=t.reduce;return t===Km||rt(Km,t)&&e===Km.reduce?jm:e};function Gm(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function Xm(t){for(var e=1;e'.concat(m,""),v=hs(i="".concat(p.sign)).call(i,d);return{html:p.html.replace(/(^
)/,"$1".concat(b)).replace(/(^
0}},{key:"$renderTable",value:function(t,e,n,r){var i,a,o,s,c=this.$testHeadEmpty(e)?hs(i="~CTHD".concat(e,"~CTHD$~CTBD")).call(i,n,"~CTBD$"):"~CTBD".concat(n,"~CTBD$"),l=this.$engine.md5(c),u=c.replace(/~CTHD\$/g,"").replace(/~CTHD/g,"").replace(/~CTBD\$/g,"").replace(/~CTBD/g,"").replace(/~CTR\$/g,"").replace(/~CTR/g,"").replace(/[ ]?~CTH\$/g,"").replace(/[ ]?~CTD\$/g,"").replace(/~CT(D|H)(L|R|C|U)[ ]?/g,(function(e,n,r){var i="":' align="'.concat(t[r],'">')})).replace(/\\\|/g,"|");return{html:hs(a=hs(o=hs(s='
\n ')).call(a,u,"
"),sign:l}}},{key:"makeHtml",value:function(t,e){var n=this,r=t;return(this.$engine.$cherry.options.engine.global.flowSessionContext||this.selfClosing)&&/(^|^[^|][^\n]*\n|\n\n|\n[^|][^\n]*\n)\s*\|[^\n]+\n{0,1}[|:-\s]*\n*$/.test(r)&&(r="".concat(r.replace(/\n[|:-\s]*\n*$/,""),"\n|-|")),this.test(r,Ym)&&(r=r.replace(this.RULE[Ym].reg,(function(t,r){var i,a=n.getLineCount(t,r),o=lA(i=mh(t).call(t).split(/\n/)).call(i,(function(t){var e;return mh(e=String(t)).call(e)})),s=n.$parseTable(o,e,a),c=s.html,l=s.sign;return n.getCacheWithSpace(n.pushCache(c,l,a),t)}))),this.test(r,qm)&&(r=r.replace(this.RULE[qm].reg,(function(t,r){var i,a=n.getLineCount(t,r),o=lA(i=mh(t).call(t).split(/\n/)).call(i,(function(t){var e;return mh(e=String(t)).call(e)})),s=n.$parseTable(o,e,a),c=s.html,l=s.sign;return n.getCacheWithSpace(n.pushCache(c,l,a),t)}))),r}},{key:"test",value:function(t,e){return this.RULE[e].reg&&this.RULE[e].reg.test(t)}},{key:"rule",value:function(){return Ld()}}])}(VA);function Zm(){return"object"===("undefined"==typeof window?"undefined":Ro(window))}function tb(t,e,n){return e=es(e),Ko(t,eb()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function eb(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(eb=function(){return!!t})()}cs(Jm,"HOOK_NAME","table");var nb=function(t){function e(t){var n;return ra(this,e),(n=tb(this,e,[{needCache:!0}])).classicBr=dA("classicBr")?AA():t.globalConfig.classicBr,n}return ss(e,t),Ho(e,[{key:"beforeMakeHtml",value:function(t){var e=this;return this.test(t)?t.replace(this.RULE.reg,(function(t,n,r){var i,a;if(0===r)return t;var o,s,c=null!==(i=null===(a=n.match(/\n/g))||void 0===a?void 0:a.length)&&void 0!==i?i:0,l="br".concat(c),u="";Zm()?u=e.classicBr?hs(o=''):hs(s='

 

'):u=e.classicBr?"":"
";var h=e.pushCache(u,l,c);return"\n\n".concat(h,"\n")})):t}},{key:"makeHtml",value:function(t,e){return t}},{key:"rule",value:function(){var t={begin:"(?:\\n)",end:"",content:"((?:\\h*\\n){2,})"};return t.reg=md(t,"g",!0),t}}])}(VA);function rb(t,e,n){return e=es(e),Ko(t,ib()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function ib(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(ib=function(){return!!t})()}cs(nb,"HOOK_NAME","br");var ab=function(t){function e(){return ra(this,e),rb(this,e,[{needCache:!0}])}return ss(e,t),Ho(e,[{key:"beforeMakeHtml",value:function(t){var e=this;return t.replace(this.RULE.reg,(function(t,n){var r,i=(n.match(/\n/g)||[]).length+1,a="hr".concat(i);return uA(t,e.pushCache(hs(r='
'),a))}))}},{key:"makeHtml",value:function(t,e){return t}},{key:"rule",value:function(){var t={begin:"(?:^|\\n)(\\n*)[ ]*",end:"(?=$|\\n)",content:"((?:-[ \\t]*){3,}|(?:\\*[ \\t]*){3,}|(?:_[ \\t]*){3,})"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),t}}])}(VA);cs(ab,"HOOK_NAME","hr");var ob={processExtendAttributesInAlt:function(t){var e=t.match(/#([0-9]+(px|em|pt|pc|in|mm|cm|ex|%)|auto)/g);if(!e)return"";var n="",r=xf(e,2),i=r[0],a=r[1];return i&&(n=' width="'.concat(i.replace(/[ #]*/g,""),'"')),a&&(n+=' height="'.concat(a.replace(/[ #]*/g,""),'"')),n},processExtendStyleInAlt:function(t){var e=this.$getAlignment(t),n="",r=t.match(/#(border|shadow|radius|B|S|R)/g);if(r)for(var i=0;i')).call(u,$A(r||""),"");return hs(p="".concat(n)).call(p,this.config.videoWrapper?this.config.videoWrapper(i,t,k):k)}return e}},{key:"toHtml",value:function(t,e,n,r,i,a,o){var s=void 0===r?"ref":"url",c="";if("ref"===s)return t;if("url"===s){var l,u,h,f,d,A,g,p,m=sb.processExtendAttributesInAlt(n),b=sb.processExtendStyleInAlt(n),v=b.extendStyles,y=b.extendClasses;v&&(v=' style="'.concat(v,'" ')),y&&(y=' class="'.concat(y,'" ')),c=i&&""!==mh(i).call(i)?' title="'.concat($A(i.replace(/["']/g,"")),'"'):"";var w,k="src",C=this.$engine.$cherry.options;if(C.callback&&C.callback.beforeImageMounted){var x=C.callback.beforeImageMounted(k,r);k=x.srcProp||k,w=x.src||r}var E=o?o.replace(/[{}]/g,"").replace(/([^=\s]+)=([^\s]+)/g,'$1="$2"').replace(/&/g,"&"):"";return hs(l=hs(u=hs(h=hs(f=hs(d=hs(A=hs(g=hs(p="".concat(e,"')).call(h,$A(n||")}return t}},{key:"toMediaHtml",value:function(t,e,n,r,i,a,o,s,c){return/(video|audio)/.test(n)?this.replaceToHtml(n,t,e,r,i,a,c):t}},{key:"makeHtml",value:function(t){var e,n,r,i,a=t;this.test(a)&&(a=bd()?a.replace(this.RULE.reg,fs(e=this.toHtml).call(e,this)):Tp(a,this.RULE.reg,fs(n=this.toHtml).call(n,this),!0,1));this.testMedia(a)&&(a=bd()?a.replace(this.RULE.regExtend,fs(r=this.toMediaHtml).call(r,this)):Tp(a,this.RULE.regExtend,fs(i=this.toMediaHtml).call(i,this),!0,1));return a}},{key:"testMedia",value:function(t){return this.RULE.regExtend&&this.RULE.regExtend.test(t)}},{key:"rule",value:function(t){var e,n={begin:bd()?"((?-1?"ul":"ol",e.listStyle=function(t){return/^[a-z]/.test(t)?"lower-greek":/^[一二三四五六七八九十]/.test(t)?"cjk-ideographic":/^I/.test(t)?"upper-roman":/^\+/.test(t)?"circle":/^\*/.test(t)?"square":"default"}(r),e.start=Number(r.replace(".",""))?Number(r.replace(".","")):1,a})):(e.type="blank",t)}var vb=Ho((function t(){ra(this,t),this.index=0,this.space=0,this.type="",this.start=1,this.listStyle="",this.strs=[],this.children=[],this.lines=0})),yb=function(t){function e(t){var n,r=t.config;return ra(this,e),(n=Ab(this,e,[{needCache:!0}])).config=r||{},n.tree=[],n.emptyLines=0,n.indentSpace=Math.max(n.config.indentSpace,2),n}return ss(e,t),Ho(e,[{key:"addNode",value:function(t,e,n,r){"blank"===t.type?this.tree[r].strs.push(t.strs[0]):(this.tree[n].children.push(e),this.tree[e]=db(db({},t),{},{parent:n}))}},{key:"buildTree",value:function(t,e){var n=t.split("\n");this.tree=[],n.unshift("");for(var r=t.match(/\n*$/g)[0].length,i=0;ia.space;)o-=1;var s=a.space,c=this.tree[o].space;s".concat(c.strs.join("
"),"

");c.lines+=o.getLineCount(c.strs.join("\n"));var h=c.children.length?o.renderTree(n):"";t.lines+=c.lines,s+=c.lines;return/<\/span>/.test(u)&&(l.class+=" check-list-item"),hs(r=hs(i=hs(a="".concat(e,"")).call(i,u)).call(r,h,"")}),"");return void 0===t.parent&&(c["data-lines"]=0===t.index?s+this.emptyLines:s,c["data-sign"]=this.sign),e[0]&&"ol"===n&&(c.start=this.tree[e[0]].start),c.class="cherry-list__".concat(this.tree[e[0]].listStyle),hs(r=hs(i=hs(a="<".concat(n)).call(a,pb(c),">")).call(i,l,"")}},{key:"renderTree",value:function(t){var e=this,n=0,r=this.tree[t],i=r.children;return zm(i).call(i,(function(t,a,o){if(0===o)return t;if(e.tree[i[o]].type===e.tree[i[o-1]].type)return t;var s=e.renderSubTree(r,Bf(i).call(i,n,o),e.tree[i[o-1]].type);return n=o,t+s}),"")+(i.length?this.renderSubTree(r,Bf(i).call(i,n,i.length),this.tree[i[i.length-1]].type):"")}},{key:"toHtml",value:function(t,e){var n,r;this.emptyLines=null!==(n=null===(r=t.match(/^\n\n/))||void 0===r?void 0:r.length)&&void 0!==n?n:0;var i=t.replace(/~0$/g,"").replace(/^\n+/,"");this.buildTree(function(t){return t.replace(/^((?:|[\t ]+)[*+-]\s+)\[(\s|x)\]/gm,(function(t,e,n){var r,i=/\s/.test(n)?'':'';return hs(r="".concat(e)).call(r,i)}))}(i),e);var a=this.renderTree(0);return this.pushCache(a,this.sign,this.$getLineNum(t))}},{key:"$getLineNum",value:function(t){var e,n,r,i,a=null!==(e=null===(n=t.match(/^\n\n/))||void 0===n?void 0:n.length)&&void 0!==e?e:0;return null!==(r=null===(i=t.replace(/^\n+/,"").replace(/\n+$/,"\n").match(/\n/g))||void 0===i?void 0:i.length)&&void 0!==r?r:0+a}},{key:"makeHtml",value:function(t,e){var n=this,r="".concat(t,"~0");return this.test(r)&&(r=r.replace(this.RULE.reg,(function(t){return n.getCacheWithSpace(n.checkCache(t,e,n.$getLineNum(t)),t)}))),r=r.replace(/~0$/g,"")}},{key:"rule",value:function(){var t={begin:"(?:^|\n)(\n*)(([ ]{0,3}([*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)",content:"([^\\r]+?)",end:"(~0|\\n{2,}(?=\\S)(?![ \\t]*(?:[*+-]|\\d+[.]|[a-z]\\.|[I一二三四五六七八九十]+\\.)[ \\t]+)))"};return t.reg=new RegExp(t.begin+t.content+t.end,"gm"),t}}])}(VA);function wb(t,e,n){return e=es(e),Ko(t,kb()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function kb(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(kb=function(){return!!t})()}cs(yb,"HOOK_NAME","list");var Cb=function(t){function e(){return ra(this,e),wb(this,e,[{needCache:!0}])}return ss(e,t),Ho(e,[{key:"handleMatch",value:function(t,e){var n=this;return t.replace(this.RULE.reg,(function(t,e,r){var i,a,o,s=n.getLineCount(t,e),c=n.$engine.md5(t),l=n.testHasCache(c);if(!1!==l)return n.getCacheWithSpace(l,t);var u=hs(i=hs(a='
'),h=r.split(/\n1&&(f="\n<".concat(Bf(h).call(h,1).join("\n<")));var d=h[0].replace(/^([ \t]*>)/gm,"");return u+=n.$engine.makeHtmlForBlockquote(d),u+="
",hs(o="".concat(n.getCacheWithSpace(n.pushCache(u,c,s),t))).call(o,f)}))}},{key:"makeHtml",value:function(t,e){return this.handleMatch(t,e)}},{key:"rule",value:function(){var t={begin:"(?:^|\\n)(\\s*)",content:["(",">(?:.+?\\n(?![*+-]|\\d+[.]|[a-z]\\.))(?:>*.+?\\n(?![*+-]|\\d+[.]|[a-z]\\.))*(?:>*.+?)","|",">(?:.+?)",")"].join(""),end:"(?=(\\n)|$)"};return t.reg=md(t,"g"),t}}])}(VA);function xb(t,e,n){return e=es(e),Ko(t,Eb()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Eb(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Eb=function(){return!!t})()}cs(Cb,"HOOK_NAME","blockquote");var Tb=function(t){function e(t){var n,r=t.config;return t.globalConfig,ra(this,e),(n=xb(this,e,[{config:r}])).enableShortLink=!!r.enableShortLink,n.shortLinkLength=r.shortLinkLength,n.target=r.target?'target="'.concat(r.target,'"'):r.openNewPage?'target="_blank"':"",n.rel=r.rel?'rel="'.concat(r.rel,'"'):"",n}return ss(e,t),Ho(e,[{key:"isLinkInHtmlAttribute",value:function(t,e,n){for(var r,i=new RegExp(["<","([a-zA-Z][a-zA-Z0-9-]*)","(",["\\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*","(",["\\s*=\\s*","(",["([^\\s\"'=<>`]+)","('[^']*')",'("[^"]*")'].join("|"),")"].join(""),")?"].join(""),")*","\\s*[/]?>"].join(""),"g");null!==(r=i.exec(t))&&!(r.index>e+n);)if(r.index=e+n)return!0;return!1}},{key:"isLinkInATag",value:function(t,e,n){for(var r,i=/[^<]*<\/a>/g;null!==(r=i.exec(t))&&!(r.index>e+n);)if(r.index=e+n)return!0;return!1}},{key:"makeHtml",value:function(t,e){var n=this;return this.test(t)&&(Cd.test(t)||Ed.test(t))?t.replace(this.RULE.reg,(function(t,e,r,i,a,o,s){var c,l,u;if(n.isLinkInHtmlAttribute(s,o,r.length+i.length)||n.isLinkInATag(s,o,r.length+i.length))return t;var h=r.toLowerCase(),f="",d="",A=!0;if(("<"!==e&&"<"!==e||">"!==a&&">"!==a)&&(f=e,d=a,A=!1),""===mh(i).call(i)||!A&&""===h&&!/www\./.test(i))return t;switch(h){case"javascript:":return t;case"mailto:":var g,p,m,b,v,y;return xd.test(i)?hs(g=hs(p=hs(m=hs(b=hs(v="".concat(f,'")).call(p,$A(i),"")).call(g,d):t;case"":var w,k,C,x,E,T,B,_,S,L;if(f===d||!A)return xd.test(i)?hs(w=hs(k=hs(C=hs(x=hs(E="".concat(f,'")).call(k,$A(i),"")).call(w,d):Bd.test(i)?hs(T=hs(B="".concat(f)).call(B,n.renderLink("//".concat(i),i))).call(T,d):t;if(A)return xd.test(i)?hs(_=hs(S=hs(L='")).call(_,$A(i),""):_d.test(i)||Bd.test(i)?n.renderLink(i):t;default:return _d.test(i)?hs(c=hs(l="".concat(f)).call(l,n.renderLink(hs(u="".concat(h)).call(u,i)))).call(c,d):t}return t})):t}},{key:"rule",value:function(){var t,e={begin:"(?)"};return e.reg=md(e,"ig"),e}},{key:"renderLink",value:function(t,n){var r,i,a,o,s=n;if("string"!=typeof s)if(this.enableShortLink){var c,l=t.replace(/^https?:\/\//i,"");s=hs(c="".concat(l.substring(0,this.shortLinkLength))).call(c,l.length>this.shortLinkLength?"...":"")}else s=t;var u=KA(this.$engine.$cherry.options.callback.urlProcessor(t,"autolink")),h=$A(s),f=Qi(r=[this.target,this.rel]).call(r,Boolean).join(" ");return hs(i=hs(a=hs(o='")).call(i,e.escapePreservedSymbol(h),"")}}])}(iA);function Bb(){var t,e,n,r;Zm()&&(this.katex=null!==(t=null===(e=this.externals)||void 0===e?void 0:e.katex)&&void 0!==t?t:window.katex,this.MathJax=null!==(n=null===(r=this.externals)||void 0===r?void 0:r.MathJax)&&void 0!==n?n:window.MathJax)}cs(Tb,"HOOK_NAME","autoLink"),cs(Tb,"escapePreservedSymbol",(function(t){return t.replace(/_/g,"_").replace(/\*/g,"*")}));var _b=["&","<",">",'"',"'"],Sb=function(t){var e=t.replace(new RegExp(wd,"g"),(function(t){return-1!==Ef(_b).call(_b,t)?UA(t):"\\".concat(t)}));return e};function Lb(t,e,n){return e=es(e),Ko(t,Ib()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Ib(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Ib=function(){return!!t})()}var Mb=function(t){function e(t){var n,r,i=t.config;return ra(this,e),cs(r=Lb(this,e,[{needCache:!0}]),"engine","MathJax"),cs(r,"katex",void 0),cs(r,"MathJax",void 0),r.engine=Zm()?null!==(n=i.engine)&&void 0!==n?n:"MathJax":"node",r}return ss(e,t),Ho(e,[{key:"toHtml",value:function(t,e,n,r){var i;fs(Bb).call(Bb,this)("engine");var a=t.replace(/^[ \f\r\t\v]*/,"").replace(/\s*$/,""),o=e.replace(/^[ \f\r\t\v]*\n/,""),s=this.$engine.md5(t),c=this.getLineCount(a,o);/\n/.test(e)||(c-=1),/\n\s*$/.test(t)||(c-=1),c=c>0?c:0;var l="";if("katex"===this.engine){var u,h,f=this.katex.renderToString(r,{throwOnError:!1,displayMode:!0});l=hs(u=hs(h='
')).call(u,f,"
")}else if(null!==(i=this.MathJax)&&void 0!==i&&i.tex2svg){var d,A,g=Jf(this.MathJax.tex2svg(r),!0);l=hs(d=hs(A='
')).call(d,g,"
")}else{var p,m;l=hs(p=hs(m='
$$')).call(p,Sb(r),"$$
")}return n+this.getCacheWithSpace(this.pushCache(l,s,c),t)}},{key:"beforeMakeHtml",value:function(t){var e,n;return bd()?t.replace(this.RULE.reg,fs(n=this.toHtml).call(n,this)):Tp(t,this.RULE.reg,fs(e=this.toHtml).call(e,this),!0,1)}},{key:"makeHtml",value:function(t){return t}},{key:"rule",value:function(){var t={begin:bd()?"(\\s*)((?')).call(l,h,"
")}else if(null!==(i=this.MathJax)&&void 0!==i&&i.tex2svg){var f,d,A=Jf(this.MathJax.tex2svg(n,{em:12,ex:6,display:!1}),!0);c=hs(f=hs(d="".concat(e,'')).call(f,A,"")}else{var g,p;c=hs(g=hs(p="".concat(e,'$')).call(g,Sb(n),"$")}return this.pushCache(c,VA.IN_PARAGRAPH_CACHE_KEY_PREFIX+s)}},{key:"beforeMakeHtml",value:function(t){var e=this,n=t;return n=n.replace(Ld(!0),(function(t){var n;return lA(n=t.split("|")).call(n,(function(t){return e.makeInlineMath(t)})).join("|").replace(/\\~D/g,"~D").replace(/~D/g,"\\~D")})),this.makeInlineMath(n)}},{key:"makeInlineMath",value:function(t){var e,n;return this.test(t)?bd()?t.replace(this.RULE.reg,fs(n=this.toHtml).call(n,this)):Tp(t,this.RULE.reg,fs(e=this.toHtml).call(e,this),!0,1):t}},{key:"makeHtml",value:function(t){return t}},{key:"rule",value:function(){var t={begin:bd()?"((?1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,o=void 0===a?n:ln(a,n);o>i;)e[i++]=t;return e};Dn({target:"Array",proto:!0},{fill:Nb}),Wa();var Pb=Ni("Array","fill"),Rb=Array.prototype,Qb=function(t){var e=t.fill;return t===Rb||rt(Rb,t)&&e===Rb.fill?Pb:e};function Ub(t,e,n){return e=es(e),Ko(t,$b()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function $b(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return($b=function(){return!!t})()}function Hb(t){return t}var jb={tocStyle:"plain",tocNodeClass:"toc-li",tocContainerClass:"toc",tocTitleClass:"toc-title",linkProcessor:Hb,showAutoNumber:!1},Kb='

 

',zb=function(t){function e(t){var n,r;t.externals;var i=t.config;return ra(this,e),cs(r=Ub(this,e,[{needCache:!0}]),"tocStyle","nested"),cs(r,"tocNodeClass","toc-li"),cs(r,"tocContainerClass","toc"),cs(r,"tocTitleClass","toc-title"),cs(r,"linkProcessor",Hb),cs(r,"baseLevel",1),cs(r,"isFirstTocToken",!0),cs(r,"allowMultiToc",!1),cs(r,"showAutoNumber",!1),Qs(n=Is(jb)).call(n,(function(t){r[t]=i[t]||jb[t]})),r}return ss(e,t),Ho(e,[{key:"beforeMakeHtml",value:function(t){var e=this,n=t;return this.test(n,"extend")&&(n=n.replace(this.RULE.extend.reg,(function(t,n,r){var i;if(!e.allowMultiToc&&!e.isFirstTocToken)return hs(i="\n".concat(n)).call(i,Kb);var a=e.pushCache(t);return e.isFirstTocToken=!1,uA(t,a)}))),this.test(n,"standard")&&(n=n.replace(this.RULE.standard.reg,(function(t,n,r){var i;return e.allowMultiToc||e.isFirstTocToken?(e.isFirstTocToken=!1,uA(t,e.pushCache(t))):hs(i="\n".concat(n)).call(i,Kb)}))),n}},{key:"makeHtml",value:function(t){return t}},{key:"$makeLevel",value:function(t){for(var e="",n=this.baseLevel;n2&&void 0!==arguments[2])||arguments[2],l="";e&&(l=this.$makeLevel(t.level));var u=this.linkProcessor("#".concat(t.id).replace(/safe_/g,""));return hs(n=hs(r=hs(i=hs(a=hs(o=hs(s='
  • \n ')).call(o,l,'')).call(r,t.text,"")).call(n,c?"
  • ":"")}},{key:"$makePlainToc",value:function(t){var e=this,n=lA(t).call(t,(function(t){return e.$makeTocItem(t,!0)}));return n.join("")}},{key:"$makeNestedToc",value:function(t){var e,n,r=this,i=0,a=Qb(e=new Array(7)).call(e,!1),o=Qb(n=new Array(7)).call(n,!1),s="";Qs(t).call(t,(function(t){var e=t.level;if(0===i){for(var n=e;n>=r.baseLevel;n--)s+="
      ",o[n]=!0;return s+=r.$makeTocItem(t,!1,!1),a[e]=!0,void(i=e)}if(e=e;c--)a[c]&&(s+="",a[c]=!1),o[c]&&c>e&&(s+="
    ",o[c]=!1);a[e]=!0,s+=r.$makeTocItem(t,!1,!1),i=e}else if(e===i)a[i]&&(s+=""),s+=r.$makeTocItem(t,!1,!1),a[e]=!0,o[e]=!0;else{for(var l=i+1;l<=e;l++)s+="
      ",o[l]=!0;a[e]=!0,s+=r.$makeTocItem(t,!1,!1),i=e}}));for(var c=i;c>=this.baseLevel;c--)a[c]&&(s+="",a[c]=!1),o[c]&&(s+="
    ",o[c]=!1);return s}},{key:"$makeToc",value:function(t,e,n){var r,i,a,o,s,c=hA(n,1),l=hs(r=hs(i=hs(a=hs(o='
    ');return l+=hs(s='

    ')).call(s,this.$locale.toc,"

    "),t.length<=0?"":(this.baseLevel=Math.min.apply(Math,kp(lA(t).call(t,(function(t){return t.level})))),"nested"===this.tocStyle?l+=this.$makeNestedToc(t):l+=this.$makePlainToc(t),l+="
    ")}},{key:"afterMakeHtml",value:function(t){var n=this,r=xm(es(e.prototype),"afterMakeHtml",this).call(this,t),i=[],a="";return r.replace(/]*? id="([^"]+?)"[^>]*?>(?:|)(.+?)<\/h\1>/g,(function(t,e,n,r){var o,s=r.replace(/~fn#[0-9]+#/g,"");i.push({level:+e,id:n,text:s}),a+=hs(o="".concat(e)).call(o,n)})),a=this.$engine.md5(a),r=r.replace(/(?:^|\n)(\[\[|\[|【【)(toc|TOC)(\]\]|\]|】】)([<~])/,(function(t){return t.replace(/(\]\]|\]|】】)([<~])/,"$1\n$2")})),r=(r=r.replace(this.RULE.extend.reg,(function(t,e){return n.$makeToc(i,a,e)}))).replace(this.RULE.standard.reg,(function(t,e){return n.$makeToc(i,a,e)})),this.isFirstTocToken=!0,r}},{key:"test",value:function(t,e){return!!this.RULE[e].reg&&this.RULE[e].reg.test(t)}},{key:"rule",value:function(){var t={begin:"(?:^|\\n)(\\n*)",end:"(?=$|\\n)",content:"[ ]*((?:【【|\\[\\[)(?:toc|TOC)(?:\\]\\]|】】))[ ]*"};t.reg=new RegExp(t.begin+t.content+t.end,"g");var e={begin:"(?:^|\\n)(\\n*)",end:"(?=$|\\n)",content:"[ ]*(\\[(?:toc|TOC)\\])[ ]*"};return e.reg=new RegExp(e.begin+e.content+e.end,"g"),{extend:t,standard:e}}}])}(VA);function Gb(t,e,n){return e=es(e),Ko(t,Xb()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Xb(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Xb=function(){return!!t})()}cs(zb,"HOOK_NAME","toc");var Vb=function(t){function e(t){var n;return t.externals,t.config,ra(this,e),(n=Gb(this,e)).footnoteCache={},n.footnoteMap={},n.footnote=[],n}return ss(e,t),Ho(e,[{key:"$cleanCache",value:function(){this.footnoteCache={},this.footnoteMap={},this.footnote=[]}},{key:"pushFootnoteCache",value:function(t,e){this.footnoteCache[t]=e}},{key:"getFootnoteCache",value:function(t){return this.footnoteCache[t]||null}},{key:"pushFootNote",value:function(t,e){var n,r,i,a,o,s;if(this.footnoteMap[t])return this.footnoteMap[t];var c=this.footnote.length+1,l={};l.fn=hs(n=hs(r=hs(i='[')).call(n,c,"]"),l.fnref=hs(a=hs(o=hs(s='[')).call(a,c,"]"),l.num=c,l.note=mh(e).call(e),this.footnote.push(l);var u="\0~fn#".concat(c-1,"#\0");return this.footnoteMap[t]=u,u}},{key:"getFootNote",value:function(){return this.footnote}},{key:"formatFootNote",value:function(){var t,e=this.getFootNote();if(e.length<=0)return"";var n=lA(e).call(e,(function(t){var e;return hs(e='
    \n'.concat(t.fnref)).call(e,t.note,"\n
    ")})).join(""),r=this.$engine.md5(n);return n=hs(t='
    脚注
    ')).call(t,n,"
    ")}},{key:"beforeMakeHtml",value:function(t){var e=this,n=t;return this.test(n)&&(n=n.replace(this.RULE.reg,(function(t,n,r,i){return e.pushFootnoteCache(r,i),(t.match(/\n/g)||[]).join("")})),n=n.replace(/\[\^([^\]]+?)\](?!:)/g,(function(t,n){var r=e.getFootnoteCache(n);return r?e.pushFootNote(n,r):t})),n+=this.formatFootNote()),n}},{key:"makeHtml",value:function(t,e){return t}},{key:"afterMakeHtml",value:function(t){var e=this.getFootNote();return t.replace(/\0~fn#([0-9]+)#\0/g,(function(t,n){return e[n].fn}))}},{key:"rule",value:function(){var t={begin:"(^|\\n)[ \t]*",content:["\\[\\^([^\\]]+?)\\]:\\h*","([\\s\\S]+?)"].join(""),end:"(?=\\s*$|\\n\\n)"};return t.reg=md(t,"g",!0),t}}])}(VA);function Wb(t,e,n){return e=es(e),Ko(t,qb()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function qb(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(qb=function(){return!!t})()}cs(Vb,"HOOK_NAME","footnote");var Yb=function(t){function e(t){var n;return t.externals,t.config,ra(this,e),(n=Wb(this,e)).commentCache={},n}return ss(e,t),Ho(e,[{key:"$cleanCache",value:function(){this.commentCache={}}},{key:"pushCommentReferenceCache",value:function(t,e){var n,r=Cp(e.split(/[ ]+/g)),i=r[0],a=Bf(r).call(r,1),o=hm.set(i);this.commentCache["".concat(t).toLowerCase()]=hs(n=[o]).call(n,kp(a)).join(" ")}},{key:"getCommentReferenceCache",value:function(t){return this.commentCache["".concat(t).toLowerCase()]||null}},{key:"beforeMakeHtml",value:function(t){var e=this,n=t;if(this.test(n)){n=n.replace(this.RULE.reg,(function(t,n,r,i){var a;return e.pushCommentReferenceCache(r,i),(null!==(a=t.match(/\n/g))&&void 0!==a?a:[]).join("")}));n=n.replace(/(\[[^\]\n]+?\])?(?:\[([^\]\n]+?)\])/g,(function(t,n,r){var i,a,o=e.getCommentReferenceCache(r);return o?n?hs(a="".concat(n,"(")).call(a,o,")"):hs(i="[".concat(r,"](")).call(i,o,")"):t})),this.$cleanCache()}return n}},{key:"makeHtml",value:function(t,e){return t}},{key:"afterMakeHtml",value:function(t){return hm.restoreAll(t)}},{key:"rule",value:function(){var t={begin:"(^|\\n)[ \t]*",content:["\\[([^^][^\\]]*?)\\]:\\h*","([^\\n]+?)"].join(""),end:"(?=$|\\n)"};return t.reg=md(t,"g",!0),t}}])}(VA);cs(Yb,"HOOK_NAME","commentReference");var Jb=Mr.some,Zb=Ms("some");Dn({target:"Array",proto:!0,forced:!Zb},{some:function(t){return Jb(this,t,arguments.length>1?arguments[1]:void 0)}});var tv=Ni("Array","some"),ev=Array.prototype,nv=function(t){var e=t.some;return t===ev||rt(ev,t)&&e===ev.some?tv:e},rv=r((function(t,e){t.exports=function(){const{entries:t,setPrototypeOf:e,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;a||(a=function(t){return t}),o||(o=function(t){return t}),c||(c=function(t,e,n){return t.apply(e,n)}),l||(l=function(t,e){return new t(...e)});const u=k(Array.prototype.forEach),h=k(Array.prototype.pop),f=k(Array.prototype.push),d=k(String.prototype.toLowerCase),A=k(String.prototype.toString),g=k(String.prototype.match),p=k(String.prototype.replace),m=k(String.prototype.indexOf),b=k(String.prototype.trim),v=k(Object.prototype.hasOwnProperty),y=k(RegExp.prototype.test),w=C(TypeError);function k(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:d;e&&e(t,null);let a=r.length;for(;a--;){let e=r[a];if("string"==typeof e){const t=i(e);t!==e&&(n(r)||(r[a]=t),e=t)}t[e]=!0}return t}function E(t){for(let e=0;e/gm),$=o(/\${[\w\W]*}/gm),H=o(/^data-[\-\w.\u00B7-\uFFFF]/),j=o(/^aria-[\-\w]+$/),K=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=o(/^html$/i),V=o(/^[a-z][.\w]*(-[.\w]+)+$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:Q,ERB_EXPR:U,TMPLIT_EXPR:$,DATA_ATTR:H,ARIA_ATTR:j,IS_ALLOWED_URI:K,IS_SCRIPT_OR_DATA:z,ATTR_WHITESPACE:G,DOCTYPE_NAME:X,CUSTOM_ELEMENT:V});const q={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Y=function(){return"undefined"==typeof window?null:window},J=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const n=t=>Z(t);if(n.version="3.1.5",n.removed=[],!e||!e.document||e.document.nodeType!==q.document)return n.isSupported=!1,n;let{document:r}=e;const i=r,o=i.currentScript,{DocumentFragment:c,HTMLTemplateElement:l,Node:k,Element:C,NodeFilter:E,NamedNodeMap:Q=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:U,DOMParser:$,trustedTypes:H}=e,j=C.prototype,z=B(j,"cloneNode"),G=B(j,"nextSibling"),V=B(j,"childNodes"),tt=B(j,"parentNode");if("function"==typeof l){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let et,nt="";const{implementation:rt,createNodeIterator:it,createDocumentFragment:at,getElementsByTagName:ot}=r,{importNode:st}=i;let ct={};n.isSupported="function"==typeof t&&"function"==typeof tt&&rt&&void 0!==rt.createHTMLDocument;const{MUSTACHE_EXPR:lt,ERB_EXPR:ut,TMPLIT_EXPR:ht,DATA_ATTR:ft,ARIA_ATTR:dt,IS_SCRIPT_OR_DATA:At,ATTR_WHITESPACE:gt,CUSTOM_ELEMENT:pt}=W;let{IS_ALLOWED_URI:mt}=W,bt=null;const vt=x({},[..._,...S,...L,...M,...D]);let yt=null;const wt=x({},[...F,...N,...P,...R]);let kt=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,xt=null,Et=!0,Tt=!0,Bt=!1,_t=!0,St=!1,Lt=!0,It=!1,Mt=!1,Ot=!1,Dt=!1,Ft=!1,Nt=!1,Pt=!0,Rt=!1;const Qt="user-content-";let Ut=!0,$t=!1,Ht={},jt=null;const Kt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zt=null;const Gt=x({},["audio","video","img","source","image","track"]);let Xt=null;const Vt=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wt="http://www.w3.org/1998/Math/MathML",qt="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let Jt=Yt,Zt=!1,te=null;const ee=x({},[Wt,qt,Yt],A);let ne=null;const re=["application/xhtml+xml","text/html"],ie="text/html";let ae=null,oe=null;const se=r.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},le=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!oe||oe!==t){if(t&&"object"==typeof t||(t={}),t=T(t),ne=-1===re.indexOf(t.PARSER_MEDIA_TYPE)?ie:t.PARSER_MEDIA_TYPE,ae="application/xhtml+xml"===ne?A:d,bt=v(t,"ALLOWED_TAGS")?x({},t.ALLOWED_TAGS,ae):vt,yt=v(t,"ALLOWED_ATTR")?x({},t.ALLOWED_ATTR,ae):wt,te=v(t,"ALLOWED_NAMESPACES")?x({},t.ALLOWED_NAMESPACES,A):ee,Xt=v(t,"ADD_URI_SAFE_ATTR")?x(T(Vt),t.ADD_URI_SAFE_ATTR,ae):Vt,zt=v(t,"ADD_DATA_URI_TAGS")?x(T(Gt),t.ADD_DATA_URI_TAGS,ae):Gt,jt=v(t,"FORBID_CONTENTS")?x({},t.FORBID_CONTENTS,ae):Kt,Ct=v(t,"FORBID_TAGS")?x({},t.FORBID_TAGS,ae):{},xt=v(t,"FORBID_ATTR")?x({},t.FORBID_ATTR,ae):{},Ht=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,Et=!1!==t.ALLOW_ARIA_ATTR,Tt=!1!==t.ALLOW_DATA_ATTR,Bt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,St=t.SAFE_FOR_TEMPLATES||!1,Lt=!1!==t.SAFE_FOR_XML,It=t.WHOLE_DOCUMENT||!1,Dt=t.RETURN_DOM||!1,Ft=t.RETURN_DOM_FRAGMENT||!1,Nt=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,Rt=t.SANITIZE_NAMED_PROPS||!1,Ut=!1!==t.KEEP_CONTENT,$t=t.IN_PLACE||!1,mt=t.ALLOWED_URI_REGEXP||K,Jt=t.NAMESPACE||Yt,kt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(kt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(kt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(kt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(Tt=!1),Ft&&(Dt=!0),Ht&&(bt=x({},D),yt=[],!0===Ht.html&&(x(bt,_),x(yt,F)),!0===Ht.svg&&(x(bt,S),x(yt,N),x(yt,R)),!0===Ht.svgFilters&&(x(bt,L),x(yt,N),x(yt,R)),!0===Ht.mathMl&&(x(bt,M),x(yt,P),x(yt,R))),t.ADD_TAGS&&(bt===vt&&(bt=T(bt)),x(bt,t.ADD_TAGS,ae)),t.ADD_ATTR&&(yt===wt&&(yt=T(yt)),x(yt,t.ADD_ATTR,ae)),t.ADD_URI_SAFE_ATTR&&x(Xt,t.ADD_URI_SAFE_ATTR,ae),t.FORBID_CONTENTS&&(jt===Kt&&(jt=T(jt)),x(jt,t.FORBID_CONTENTS,ae)),Ut&&(bt["#text"]=!0),It&&x(bt,["html","head","body"]),bt.table&&(x(bt,["tbody"]),delete Ct.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');et=t.TRUSTED_TYPES_POLICY,nt=et.createHTML("")}else void 0===et&&(et=J(H,o)),null!==et&&"string"==typeof nt&&(nt=et.createHTML(""));a&&a(t),oe=t}},ue=x({},["mi","mo","mn","ms","mtext"]),he=x({},["foreignobject","annotation-xml"]),fe=x({},["title","style","font","a","script"]),de=x({},[...S,...L,...I]),Ae=x({},[...M,...O]),ge=function(t){let e=tt(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});const n=d(t.tagName),r=d(e.tagName);return!!te[t.namespaceURI]&&(t.namespaceURI===qt?e.namespaceURI===Yt?"svg"===n:e.namespaceURI===Wt?"svg"===n&&("annotation-xml"===r||ue[r]):Boolean(de[n]):t.namespaceURI===Wt?e.namespaceURI===Yt?"math"===n:e.namespaceURI===qt?"math"===n&&he[r]:Boolean(Ae[n]):t.namespaceURI===Yt?!(e.namespaceURI===qt&&!he[r])&&!(e.namespaceURI===Wt&&!ue[r])&&!Ae[n]&&(fe[n]||!de[n]):!("application/xhtml+xml"!==ne||!te[t.namespaceURI]))},pe=function(t){f(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},me=function(t,e){try{f(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){f(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!yt[t])if(Dt||Ft)try{pe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},be=function(t){let e=null,n=null;if(Ot)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===ne&&Jt===Yt&&(t=''+t+"");const i=et?et.createHTML(t):t;if(Jt===Yt)try{e=(new $).parseFromString(i,ne)}catch(t){}if(!e||!e.documentElement){e=rt.createDocument(Jt,"template",null);try{e.documentElement.innerHTML=Zt?nt:i}catch(t){}}const a=e.body||e.documentElement;return t&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Jt===Yt?ot.call(e,It?"html":"body")[0]:It?e.documentElement:a},ve=function(t){return it.call(t.ownerDocument||t,t,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},ye=function(t){return t instanceof U&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof Q)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},we=function(t){return"function"==typeof k&&t instanceof k},ke=function(t,e,r){ct[t]&&u(ct[t],(t=>{t.call(n,e,r,oe)}))},Ce=function(t){let e=null;if(ke("beforeSanitizeElements",t,null),ye(t))return pe(t),!0;const r=ae(t.nodeName);if(ke("uponSanitizeElement",t,{tagName:r,allowedTags:bt}),t.hasChildNodes()&&!we(t.firstElementChild)&&y(/<[/\w]/g,t.innerHTML)&&y(/<[/\w]/g,t.textContent))return pe(t),!0;if(t.nodeType===q.progressingInstruction)return pe(t),!0;if(Lt&&t.nodeType===q.comment&&y(/<[/\w]/g,t.data))return pe(t),!0;if(!bt[r]||Ct[r]){if(!Ct[r]&&Ee(r)){if(kt.tagNameCheck instanceof RegExp&&y(kt.tagNameCheck,r))return!1;if(kt.tagNameCheck instanceof Function&&kt.tagNameCheck(r))return!1}if(Ut&&!jt[r]){const e=tt(t)||t.parentNode,n=V(t)||t.childNodes;if(n&&e)for(let r=n.length-1;r>=0;--r){const i=z(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,G(t))}}return pe(t),!0}return t instanceof C&&!ge(t)?(pe(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!y(/<\/no(script|embed|frames)/i,t.innerHTML)?(St&&t.nodeType===q.text&&(e=t.textContent,u([lt,ut,ht],(t=>{e=p(e,t," ")})),t.textContent!==e&&(f(n.removed,{element:t.cloneNode()}),t.textContent=e)),ke("afterSanitizeElements",t,null),!1):(pe(t),!0)},xe=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in r||n in se))return!1;if(Tt&&!xt[e]&&y(ft,e));else if(Et&&y(dt,e));else if(!yt[e]||xt[e]){if(!(Ee(t)&&(kt.tagNameCheck instanceof RegExp&&y(kt.tagNameCheck,t)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(t))&&(kt.attributeNameCheck instanceof RegExp&&y(kt.attributeNameCheck,e)||kt.attributeNameCheck instanceof Function&&kt.attributeNameCheck(e))||"is"===e&&kt.allowCustomizedBuiltInElements&&(kt.tagNameCheck instanceof RegExp&&y(kt.tagNameCheck,n)||kt.tagNameCheck instanceof Function&&kt.tagNameCheck(n))))return!1}else if(Xt[e]);else if(y(mt,p(n,gt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==m(n,"data:")||!zt[t])if(Bt&&!y(At,p(n,gt,"")));else if(n)return!1;return!0},Ee=function(t){return"annotation-xml"!==t&&g(t,pt)},Te=function(t){ke("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt};let i=e.length;for(;i--;){const a=e[i],{name:o,namespaceURI:s,value:c}=a,l=ae(o);let f="value"===o?c:b(c);if(r.attrName=l,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,ke("uponSanitizeAttribute",t,r),f=r.attrValue,r.forceKeepAttr)continue;if(me(o,t),!r.keepAttr)continue;if(!_t&&y(/\/>/i,f)){me(o,t);continue}if(Lt&&y(/((--!?|])>)|<\/(style|title)/i,f)){me(o,t);continue}St&&u([lt,ut,ht],(t=>{f=p(f,t," ")}));const d=ae(t.nodeName);if(xe(d,l,f)){if(!Rt||"id"!==l&&"name"!==l||(me(o,t),f=Qt+f),et&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(s);else switch(H.getAttributeType(d,l)){case"TrustedHTML":f=et.createHTML(f);break;case"TrustedScriptURL":f=et.createScriptURL(f)}try{s?t.setAttributeNS(s,o,f):t.setAttribute(o,f),ye(t)?pe(t):h(n.removed)}catch(t){}}}ke("afterSanitizeAttributes",t,null)},Be=function t(e){let n=null;const r=ve(e);for(ke("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ke("uponSanitizeShadowNode",n,null),Ce(n)||(n.content instanceof c&&t(n.content),Te(n));ke("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,a=null,o=null,s=null;if(Zt=!t,Zt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!we(t)){if("function"!=typeof t.toString)throw w("toString is not a function");if("string"!=typeof(t=t.toString()))throw w("dirty is not a string, aborting")}if(!n.isSupported)return t;if(Mt||le(e),n.removed=[],"string"==typeof t&&($t=!1),$t){if(t.nodeName){const e=ae(t.nodeName);if(!bt[e]||Ct[e])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof k)r=be("\x3c!----\x3e"),a=r.ownerDocument.importNode(t,!0),a.nodeType===q.element&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Dt&&!St&&!It&&-1===t.indexOf("<"))return et&&Nt?et.createHTML(t):t;if(r=be(t),!r)return Dt?null:Nt?nt:""}r&&Ot&&pe(r.firstChild);const l=ve($t?t:r);for(;o=l.nextNode();)Ce(o)||(o.content instanceof c&&Be(o.content),Te(o));if($t)return t;if(Dt){if(Ft)for(s=at.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(yt.shadowroot||yt.shadowrootmode)&&(s=st.call(i,s,!0)),s}let h=It?r.outerHTML:r.innerHTML;return It&&bt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&y(X,r.ownerDocument.doctype.name)&&(h="\n"+h),St&&u([lt,ut,ht],(t=>{h=p(h,t," ")})),et&&Nt?et.createHTML(h):h},n.setConfig=function(){le(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Mt=!0},n.clearConfig=function(){oe=null,Mt=!1},n.isValidAttribute=function(t,e,n){oe||le({});const r=ae(t),i=ae(e);return xe(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(ct[t]=ct[t]||[],f(ct[t],e))},n.removeHook=function(t){if(ct[t])return h(ct[t])},n.removeHooks=function(t){ct[t]&&(ct[t]=[])},n.removeAllHooks=function(){ct={}},n}var tt=Z();return tt}()})),iv=rv(window);function av(t,e,n){return e=es(e),Ko(t,ov()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function ov(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(ov=function(){return!!t})()}var sv=["href","src"];iv.addHook("afterSanitizeAttributes",(function(t){Qs(sv).call(sv,(function(e){if(t.hasAttribute(e)){var n=t.getAttribute(e);t.setAttribute(e,n.replace(/\\/g,"%5c"))}}))}));var cv=function(t){function e(t){var n,r=t.config;return ra(this,e),(n=av(this,e,[{needCache:!0}])).filterStyle=r.filterStyle||!1,n}return ss(e,t),Ho(e,[{key:"isAutoLinkTag",value:function(t){var e=[/^<([a-z][a-z0-9+.-]{1,31}:\/\/[^<> `]+)>$/i,/^<(mailto:[^<> `]+)>$/i,/^<([^()<>[\]:'@\\,"\s`]+@[^()<>[\]:'@\\,"\s`.]+\.[^()<>[\]:'@\\,"\s`]+)>$/i];return nv(e).call(e,(function(e){return e.test(t)}))}},{key:"isHtmlComment",value:function(t){return/^$/.test(t)}},{key:"beforeMakeHtml",value:function(t,e){var n=this;this.$engine.htmlWhiteListAppend?(this.htmlWhiteListAppend=new RegExp("^(".concat(this.$engine.htmlWhiteListAppend,")( |$|/)"),"i"),this.htmlWhiteList=this.$engine.htmlWhiteListAppend.split("|")):(this.htmlWhiteListAppend=!1,this.htmlWhiteList=[]);var r=t;return r=function(t){if("string"!=typeof t)return"";var e=t.replace(/&(\w+);?/g,(function(t,e){return-1===Ef(t).call(t,";")||-1===Ef(DA).call(DA,e.toLowerCase())?t.replace(/&/g,"&"):t}));return e=e.replace(/&#(?!x)(\d*);?/gi,(function(t,e){return FA(e)||-1===Ef(t).call(t,";")||e.lenth>7||!NA(e)?t.replace(/&/g,"&"):t})),e=e.replace(/&#x([0-9a-f]*);?/gi,(function(t,e){if(FA(e))return t.replace(/&/g,"&");var n="0x".concat(e),r=Ff(n,16);return isNaN(r)||-1===Ef(t).call(t,";")||e.lenth>6||!NA(n)?t.replace(/&/g,"&"):t})),e}(r=HA(r)),r=(r=(r=r.replace(/<[/]?(.*?)>/g,(function(t,e){return QA.test(e)||n.isAutoLinkTag(t)||n.isHtmlComment(t)||!1!==n.htmlWhiteListAppend&&n.htmlWhiteListAppend.test(e)?t.replace(//g,"$#62;"):t.replace(//g,">")}))).replace(/<(?=\/?(\w|\n|$))/g,"<")).replace(/\$#60;/g,"<").replace(/\$#62;/g,">"),this.filterStyle&&(r=(r=r.replace(/<([^/][^>]+?) style="[^>\n]+?"([^>\n]*)>/gi,"<$1$2>")).replace(/<([^/][^>]+?) style='[^>\n]+?'([^>\n]*)>/gi,"<$1$2>")),r}},{key:"makeHtml",value:function(t,e){return t}},{key:"afterMakeHtml",value:function(t){var e=t,n={ALLOW_UNKNOWN_PROTOCOLS:!0,ADD_ATTR:["target"]};if(!1!==this.htmlWhiteListAppend){var r;if(n.ADD_TAGS=this.htmlWhiteList,(this.htmlWhiteListAppend.test("style")||this.htmlWhiteListAppend.test("ALL"))&&(e=e.replace(/| [^>]*>).*?<\/style>/gi,(function(t){return t.replace(/
    /gi,"")}))),this.htmlWhiteListAppend.test("iframe")||this.htmlWhiteListAppend.test("ALL"))n.ADD_ATTR=hs(r=n.ADD_ATTR).call(r,["align","frameborder","height","longdesc","marginheight","marginwidth","name","sandbox","scrolling","seamless","src","srcdoc","width"]),n.SANITIZE_DOM=!1,e=e.replace(/| [^>]*>).*?<\/iframe>/gi,(function(t){return t.replace(/
    /gi,"").replace(/\n/g,"")}));if(this.htmlWhiteListAppend.test("script")||this.htmlWhiteListAppend.test("ALL"))return e=e.replace(/| [^>]*>).*?<\/script>/gi,(function(t){return t.replace(/
    /gi,"")})),e}return Zm()||(n.FORBID_ATTR=["data-sign","data-lines"]),iv.sanitize(e,n)}}])}(VA);cs(cv,"HOOK_NAME","htmlBlock");var lv={"+1":"1f44d","-1":"1f44e",100:"1f4af",1234:"1f522","1st_place_medal":"1f947","2nd_place_medal":"1f948","3rd_place_medal":"1f949","8ball":"1f3b1",a:"1f170",ab:"1f18e",abacus:"1f9ee",abc:"1f524",abcd:"1f521",accept:"1f251",adhesive_bandage:"1fa79",adult:"1f9d1",aerial_tramway:"1f6a1",afghanistan:"1f1e6-1f1eb",airplane:"2708",aland_islands:"1f1e6-1f1fd",alarm_clock:"23f0",albania:"1f1e6-1f1f1",alembic:"2697",algeria:"1f1e9-1f1ff",alien:"1f47d",ambulance:"1f691",american_samoa:"1f1e6-1f1f8",amphora:"1f3fa",anchor:"2693",andorra:"1f1e6-1f1e9",angel:"1f47c",anger:"1f4a2",angola:"1f1e6-1f1f4",angry:"1f620",anguilla:"1f1e6-1f1ee",anguished:"1f627",ant:"1f41c",antarctica:"1f1e6-1f1f6",antigua_barbuda:"1f1e6-1f1ec",apple:"1f34e",aquarius:"2652",argentina:"1f1e6-1f1f7",aries:"2648",armenia:"1f1e6-1f1f2",arrow_backward:"25c0",arrow_double_down:"23ec",arrow_double_up:"23eb",arrow_down:"2b07",arrow_down_small:"1f53d",arrow_forward:"25b6",arrow_heading_down:"2935",arrow_heading_up:"2934",arrow_left:"2b05",arrow_lower_left:"2199",arrow_lower_right:"2198",arrow_right:"27a1",arrow_right_hook:"21aa",arrow_up:"2b06",arrow_up_down:"2195",arrow_up_small:"1f53c",arrow_upper_left:"2196",arrow_upper_right:"2197",arrows_clockwise:"1f503",arrows_counterclockwise:"1f504",art:"1f3a8",articulated_lorry:"1f69b",artificial_satellite:"1f6f0",artist:"1f9d1-1f3a8",aruba:"1f1e6-1f1fc",ascension_island:"1f1e6-1f1e8",asterisk:"002a-20e3",astonished:"1f632",astronaut:"1f9d1-1f680",athletic_shoe:"1f45f",atm:"1f3e7",atom_symbol:"269b",australia:"1f1e6-1f1fa",austria:"1f1e6-1f1f9",auto_rickshaw:"1f6fa",avocado:"1f951",axe:"1fa93",azerbaijan:"1f1e6-1f1ff",b:"1f171",baby:"1f476",baby_bottle:"1f37c",baby_chick:"1f424",baby_symbol:"1f6bc",back:"1f519",bacon:"1f953",badger:"1f9a1",badminton:"1f3f8",bagel:"1f96f",baggage_claim:"1f6c4",baguette_bread:"1f956",bahamas:"1f1e7-1f1f8",bahrain:"1f1e7-1f1ed",balance_scale:"2696",bald_man:"1f468-1f9b2",bald_woman:"1f469-1f9b2",ballet_shoes:"1fa70",balloon:"1f388",ballot_box:"1f5f3",ballot_box_with_check:"2611",bamboo:"1f38d",banana:"1f34c",bangbang:"203c",bangladesh:"1f1e7-1f1e9",banjo:"1fa95",bank:"1f3e6",bar_chart:"1f4ca",barbados:"1f1e7-1f1e7",barber:"1f488",baseball:"26be",basket:"1f9fa",basketball:"1f3c0",basketball_man:"26f9-2642",basketball_woman:"26f9-2640",bat:"1f987",bath:"1f6c0",bathtub:"1f6c1",battery:"1f50b",beach_umbrella:"1f3d6",bear:"1f43b",bearded_person:"1f9d4",bed:"1f6cf",bee:"1f41d",beer:"1f37a",beers:"1f37b",beetle:"1f41e",beginner:"1f530",belarus:"1f1e7-1f1fe",belgium:"1f1e7-1f1ea",belize:"1f1e7-1f1ff",bell:"1f514",bellhop_bell:"1f6ce",benin:"1f1e7-1f1ef",bento:"1f371",bermuda:"1f1e7-1f1f2",beverage_box:"1f9c3",bhutan:"1f1e7-1f1f9",bicyclist:"1f6b4",bike:"1f6b2",biking_man:"1f6b4-2642",biking_woman:"1f6b4-2640",bikini:"1f459",billed_cap:"1f9e2",biohazard:"2623",bird:"1f426",birthday:"1f382",black_circle:"26ab",black_flag:"1f3f4",black_heart:"1f5a4",black_joker:"1f0cf",black_large_square:"2b1b",black_medium_small_square:"25fe",black_medium_square:"25fc",black_nib:"2712",black_small_square:"25aa",black_square_button:"1f532",blond_haired_man:"1f471-2642",blond_haired_person:"1f471",blond_haired_woman:"1f471-2640",blonde_woman:"1f471-2640",blossom:"1f33c",blowfish:"1f421",blue_book:"1f4d8",blue_car:"1f699",blue_heart:"1f499",blue_square:"1f7e6",blush:"1f60a",boar:"1f417",boat:"26f5",bolivia:"1f1e7-1f1f4",bomb:"1f4a3",bone:"1f9b4",book:"1f4d6",bookmark:"1f516",bookmark_tabs:"1f4d1",books:"1f4da",boom:"1f4a5",boot:"1f462",bosnia_herzegovina:"1f1e7-1f1e6",botswana:"1f1e7-1f1fc",bouncing_ball_man:"26f9-2642",bouncing_ball_person:"26f9",bouncing_ball_woman:"26f9-2640",bouquet:"1f490",bouvet_island:"1f1e7-1f1fb",bow:"1f647",bow_and_arrow:"1f3f9",bowing_man:"1f647-2642",bowing_woman:"1f647-2640",bowl_with_spoon:"1f963",bowling:"1f3b3",boxing_glove:"1f94a",boy:"1f466",brain:"1f9e0",brazil:"1f1e7-1f1f7",bread:"1f35e",breast_feeding:"1f931",bricks:"1f9f1",bride_with_veil:"1f470",bridge_at_night:"1f309",briefcase:"1f4bc",british_indian_ocean_territory:"1f1ee-1f1f4",british_virgin_islands:"1f1fb-1f1ec",broccoli:"1f966",broken_heart:"1f494",broom:"1f9f9",brown_circle:"1f7e4",brown_heart:"1f90e",brown_square:"1f7eb",brunei:"1f1e7-1f1f3",bug:"1f41b",building_construction:"1f3d7",bulb:"1f4a1",bulgaria:"1f1e7-1f1ec",bullettrain_front:"1f685",bullettrain_side:"1f684",burkina_faso:"1f1e7-1f1eb",burrito:"1f32f",burundi:"1f1e7-1f1ee",bus:"1f68c",business_suit_levitating:"1f574",busstop:"1f68f",bust_in_silhouette:"1f464",busts_in_silhouette:"1f465",butter:"1f9c8",butterfly:"1f98b",cactus:"1f335",cake:"1f370",calendar:"1f4c6",call_me_hand:"1f919",calling:"1f4f2",cambodia:"1f1f0-1f1ed",camel:"1f42b",camera:"1f4f7",camera_flash:"1f4f8",cameroon:"1f1e8-1f1f2",camping:"1f3d5",canada:"1f1e8-1f1e6",canary_islands:"1f1ee-1f1e8",cancer:"264b",candle:"1f56f",candy:"1f36c",canned_food:"1f96b",canoe:"1f6f6",cape_verde:"1f1e8-1f1fb",capital_abcd:"1f520",capricorn:"2651",car:"1f697",card_file_box:"1f5c3",card_index:"1f4c7",card_index_dividers:"1f5c2",caribbean_netherlands:"1f1e7-1f1f6",carousel_horse:"1f3a0",carrot:"1f955",cartwheeling:"1f938",cat:"1f431",cat2:"1f408",cayman_islands:"1f1f0-1f1fe",cd:"1f4bf",central_african_republic:"1f1e8-1f1eb",ceuta_melilla:"1f1ea-1f1e6",chad:"1f1f9-1f1e9",chains:"26d3",chair:"1fa91",champagne:"1f37e",chart:"1f4b9",chart_with_downwards_trend:"1f4c9",chart_with_upwards_trend:"1f4c8",checkered_flag:"1f3c1",cheese:"1f9c0",cherries:"1f352",cherry_blossom:"1f338",chess_pawn:"265f",chestnut:"1f330",chicken:"1f414",child:"1f9d2",children_crossing:"1f6b8",chile:"1f1e8-1f1f1",chipmunk:"1f43f",chocolate_bar:"1f36b",chopsticks:"1f962",christmas_island:"1f1e8-1f1fd",christmas_tree:"1f384",church:"26ea",cinema:"1f3a6",circus_tent:"1f3aa",city_sunrise:"1f307",city_sunset:"1f306",cityscape:"1f3d9",cl:"1f191",clamp:"1f5dc",clap:"1f44f",clapper:"1f3ac",classical_building:"1f3db",climbing:"1f9d7",climbing_man:"1f9d7-2642",climbing_woman:"1f9d7-2640",clinking_glasses:"1f942",clipboard:"1f4cb",clipperton_island:"1f1e8-1f1f5",clock1:"1f550",clock10:"1f559",clock1030:"1f565",clock11:"1f55a",clock1130:"1f566",clock12:"1f55b",clock1230:"1f567",clock130:"1f55c",clock2:"1f551",clock230:"1f55d",clock3:"1f552",clock330:"1f55e",clock4:"1f553",clock430:"1f55f",clock5:"1f554",clock530:"1f560",clock6:"1f555",clock630:"1f561",clock7:"1f556",clock730:"1f562",clock8:"1f557",clock830:"1f563",clock9:"1f558",clock930:"1f564",closed_book:"1f4d5",closed_lock_with_key:"1f510",closed_umbrella:"1f302",cloud:"2601",cloud_with_lightning:"1f329",cloud_with_lightning_and_rain:"26c8",cloud_with_rain:"1f327",cloud_with_snow:"1f328",clown_face:"1f921",clubs:"2663",cn:"1f1e8-1f1f3",coat:"1f9e5",cocktail:"1f378",coconut:"1f965",cocos_islands:"1f1e8-1f1e8",coffee:"2615",coffin:"26b0",cold_face:"1f976",cold_sweat:"1f630",collision:"1f4a5",colombia:"1f1e8-1f1f4",comet:"2604",comoros:"1f1f0-1f1f2",compass:"1f9ed",computer:"1f4bb",computer_mouse:"1f5b1",confetti_ball:"1f38a",confounded:"1f616",confused:"1f615",congo_brazzaville:"1f1e8-1f1ec",congo_kinshasa:"1f1e8-1f1e9",congratulations:"3297",construction:"1f6a7",construction_worker:"1f477",construction_worker_man:"1f477-2642",construction_worker_woman:"1f477-2640",control_knobs:"1f39b",convenience_store:"1f3ea",cook:"1f9d1-1f373",cook_islands:"1f1e8-1f1f0",cookie:"1f36a",cool:"1f192",cop:"1f46e",copyright:"00a9",corn:"1f33d",costa_rica:"1f1e8-1f1f7",cote_divoire:"1f1e8-1f1ee",couch_and_lamp:"1f6cb",couple:"1f46b",couple_with_heart:"1f491",couple_with_heart_man_man:"1f468-2764-1f468",couple_with_heart_woman_man:"1f469-2764-1f468",couple_with_heart_woman_woman:"1f469-2764-1f469",couplekiss:"1f48f",couplekiss_man_man:"1f468-2764-1f48b-1f468",couplekiss_man_woman:"1f469-2764-1f48b-1f468",couplekiss_woman_woman:"1f469-2764-1f48b-1f469",cow:"1f42e",cow2:"1f404",cowboy_hat_face:"1f920",crab:"1f980",crayon:"1f58d",credit_card:"1f4b3",crescent_moon:"1f319",cricket:"1f997",cricket_game:"1f3cf",croatia:"1f1ed-1f1f7",crocodile:"1f40a",croissant:"1f950",crossed_fingers:"1f91e",crossed_flags:"1f38c",crossed_swords:"2694",crown:"1f451",cry:"1f622",crying_cat_face:"1f63f",crystal_ball:"1f52e",cuba:"1f1e8-1f1fa",cucumber:"1f952",cup_with_straw:"1f964",cupcake:"1f9c1",cupid:"1f498",curacao:"1f1e8-1f1fc",curling_stone:"1f94c",curly_haired_man:"1f468-1f9b1",curly_haired_woman:"1f469-1f9b1",curly_loop:"27b0",currency_exchange:"1f4b1",curry:"1f35b",cursing_face:"1f92c",custard:"1f36e",customs:"1f6c3",cut_of_meat:"1f969",cyclone:"1f300",cyprus:"1f1e8-1f1fe",czech_republic:"1f1e8-1f1ff",dagger:"1f5e1",dancer:"1f483",dancers:"1f46f",dancing_men:"1f46f-2642",dancing_women:"1f46f-2640",dango:"1f361",dark_sunglasses:"1f576",dart:"1f3af",dash:"1f4a8",date:"1f4c5",de:"1f1e9-1f1ea",deaf_man:"1f9cf-2642",deaf_person:"1f9cf",deaf_woman:"1f9cf-2640",deciduous_tree:"1f333",deer:"1f98c",denmark:"1f1e9-1f1f0",department_store:"1f3ec",derelict_house:"1f3da",desert:"1f3dc",desert_island:"1f3dd",desktop_computer:"1f5a5",detective:"1f575",diamond_shape_with_a_dot_inside:"1f4a0",diamonds:"2666",diego_garcia:"1f1e9-1f1ec",disappointed:"1f61e",disappointed_relieved:"1f625",diving_mask:"1f93f",diya_lamp:"1fa94",dizzy:"1f4ab",dizzy_face:"1f635",djibouti:"1f1e9-1f1ef",dna:"1f9ec",do_not_litter:"1f6af",dog:"1f436",dog2:"1f415",dollar:"1f4b5",dolls:"1f38e",dolphin:"1f42c",dominica:"1f1e9-1f1f2",dominican_republic:"1f1e9-1f1f4",door:"1f6aa",doughnut:"1f369",dove:"1f54a",dragon:"1f409",dragon_face:"1f432",dress:"1f457",dromedary_camel:"1f42a",drooling_face:"1f924",drop_of_blood:"1fa78",droplet:"1f4a7",drum:"1f941",duck:"1f986",dumpling:"1f95f",dvd:"1f4c0","e-mail":"1f4e7",eagle:"1f985",ear:"1f442",ear_of_rice:"1f33e",ear_with_hearing_aid:"1f9bb",earth_africa:"1f30d",earth_americas:"1f30e",earth_asia:"1f30f",ecuador:"1f1ea-1f1e8",egg:"1f95a",eggplant:"1f346",egypt:"1f1ea-1f1ec",eight:"0038-20e3",eight_pointed_black_star:"2734",eight_spoked_asterisk:"2733",eject_button:"23cf",el_salvador:"1f1f8-1f1fb",electric_plug:"1f50c",elephant:"1f418",elf:"1f9dd",elf_man:"1f9dd-2642",elf_woman:"1f9dd-2640",email:"2709",end:"1f51a",england:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",envelope:"2709",envelope_with_arrow:"1f4e9",equatorial_guinea:"1f1ec-1f1f6",eritrea:"1f1ea-1f1f7",es:"1f1ea-1f1f8",estonia:"1f1ea-1f1ea",ethiopia:"1f1ea-1f1f9",eu:"1f1ea-1f1fa",euro:"1f4b6",european_castle:"1f3f0",european_post_office:"1f3e4",european_union:"1f1ea-1f1fa",evergreen_tree:"1f332",exclamation:"2757",exploding_head:"1f92f",expressionless:"1f611",eye:"1f441",eye_speech_bubble:"1f441-1f5e8",eyeglasses:"1f453",eyes:"1f440",face_with_head_bandage:"1f915",face_with_thermometer:"1f912",facepalm:"1f926",facepunch:"1f44a",factory:"1f3ed",factory_worker:"1f9d1-1f3ed",fairy:"1f9da",fairy_man:"1f9da-2642",fairy_woman:"1f9da-2640",falafel:"1f9c6",falkland_islands:"1f1eb-1f1f0",fallen_leaf:"1f342",family:"1f46a",family_man_boy:"1f468-1f466",family_man_boy_boy:"1f468-1f466-1f466",family_man_girl:"1f468-1f467",family_man_girl_boy:"1f468-1f467-1f466",family_man_girl_girl:"1f468-1f467-1f467",family_man_man_boy:"1f468-1f468-1f466",family_man_man_boy_boy:"1f468-1f468-1f466-1f466",family_man_man_girl:"1f468-1f468-1f467",family_man_man_girl_boy:"1f468-1f468-1f467-1f466",family_man_man_girl_girl:"1f468-1f468-1f467-1f467",family_man_woman_boy:"1f468-1f469-1f466",family_man_woman_boy_boy:"1f468-1f469-1f466-1f466",family_man_woman_girl:"1f468-1f469-1f467",family_man_woman_girl_boy:"1f468-1f469-1f467-1f466",family_man_woman_girl_girl:"1f468-1f469-1f467-1f467",family_woman_boy:"1f469-1f466",family_woman_boy_boy:"1f469-1f466-1f466",family_woman_girl:"1f469-1f467",family_woman_girl_boy:"1f469-1f467-1f466",family_woman_girl_girl:"1f469-1f467-1f467",family_woman_woman_boy:"1f469-1f469-1f466",family_woman_woman_boy_boy:"1f469-1f469-1f466-1f466",family_woman_woman_girl:"1f469-1f469-1f467",family_woman_woman_girl_boy:"1f469-1f469-1f467-1f466",family_woman_woman_girl_girl:"1f469-1f469-1f467-1f467",farmer:"1f9d1-1f33e",faroe_islands:"1f1eb-1f1f4",fast_forward:"23e9",fax:"1f4e0",fearful:"1f628",feet:"1f43e",female_detective:"1f575-2640",female_sign:"2640",ferris_wheel:"1f3a1",ferry:"26f4",field_hockey:"1f3d1",fiji:"1f1eb-1f1ef",file_cabinet:"1f5c4",file_folder:"1f4c1",film_projector:"1f4fd",film_strip:"1f39e",finland:"1f1eb-1f1ee",fire:"1f525",fire_engine:"1f692",fire_extinguisher:"1f9ef",firecracker:"1f9e8",firefighter:"1f9d1-1f692",fireworks:"1f386",first_quarter_moon:"1f313",first_quarter_moon_with_face:"1f31b",fish:"1f41f",fish_cake:"1f365",fishing_pole_and_fish:"1f3a3",fist:"270a",fist_left:"1f91b",fist_oncoming:"1f44a",fist_raised:"270a",fist_right:"1f91c",five:"0035-20e3",flags:"1f38f",flamingo:"1f9a9",flashlight:"1f526",flat_shoe:"1f97f",fleur_de_lis:"269c",flight_arrival:"1f6ec",flight_departure:"1f6eb",flipper:"1f42c",floppy_disk:"1f4be",flower_playing_cards:"1f3b4",flushed:"1f633",flying_disc:"1f94f",flying_saucer:"1f6f8",fog:"1f32b",foggy:"1f301",foot:"1f9b6",football:"1f3c8",footprints:"1f463",fork_and_knife:"1f374",fortune_cookie:"1f960",fountain:"26f2",fountain_pen:"1f58b",four:"0034-20e3",four_leaf_clover:"1f340",fox_face:"1f98a",fr:"1f1eb-1f1f7",framed_picture:"1f5bc",free:"1f193",french_guiana:"1f1ec-1f1eb",french_polynesia:"1f1f5-1f1eb",french_southern_territories:"1f1f9-1f1eb",fried_egg:"1f373",fried_shrimp:"1f364",fries:"1f35f",frog:"1f438",frowning:"1f626",frowning_face:"2639",frowning_man:"1f64d-2642",frowning_person:"1f64d",frowning_woman:"1f64d-2640",fu:"1f595",fuelpump:"26fd",full_moon:"1f315",full_moon_with_face:"1f31d",funeral_urn:"26b1",gabon:"1f1ec-1f1e6",gambia:"1f1ec-1f1f2",game_die:"1f3b2",garlic:"1f9c4",gb:"1f1ec-1f1e7",gear:"2699",gem:"1f48e",gemini:"264a",genie:"1f9de",genie_man:"1f9de-2642",genie_woman:"1f9de-2640",georgia:"1f1ec-1f1ea",ghana:"1f1ec-1f1ed",ghost:"1f47b",gibraltar:"1f1ec-1f1ee",gift:"1f381",gift_heart:"1f49d",giraffe:"1f992",girl:"1f467",globe_with_meridians:"1f310",gloves:"1f9e4",goal_net:"1f945",goat:"1f410",goggles:"1f97d",golf:"26f3",golfing:"1f3cc",golfing_man:"1f3cc-2642",golfing_woman:"1f3cc-2640",gorilla:"1f98d",grapes:"1f347",greece:"1f1ec-1f1f7",green_apple:"1f34f",green_book:"1f4d7",green_circle:"1f7e2",green_heart:"1f49a",green_salad:"1f957",green_square:"1f7e9",greenland:"1f1ec-1f1f1",grenada:"1f1ec-1f1e9",grey_exclamation:"2755",grey_question:"2754",grimacing:"1f62c",grin:"1f601",grinning:"1f600",guadeloupe:"1f1ec-1f1f5",guam:"1f1ec-1f1fa",guard:"1f482",guardsman:"1f482-2642",guardswoman:"1f482-2640",guatemala:"1f1ec-1f1f9",guernsey:"1f1ec-1f1ec",guide_dog:"1f9ae",guinea:"1f1ec-1f1f3",guinea_bissau:"1f1ec-1f1fc",guitar:"1f3b8",gun:"1f52b",guyana:"1f1ec-1f1fe",haircut:"1f487",haircut_man:"1f487-2642",haircut_woman:"1f487-2640",haiti:"1f1ed-1f1f9",hamburger:"1f354",hammer:"1f528",hammer_and_pick:"2692",hammer_and_wrench:"1f6e0",hamster:"1f439",hand:"270b",hand_over_mouth:"1f92d",handbag:"1f45c",handball_person:"1f93e",handshake:"1f91d",hankey:"1f4a9",hash:"0023-20e3",hatched_chick:"1f425",hatching_chick:"1f423",headphones:"1f3a7",health_worker:"1f9d1-2695",hear_no_evil:"1f649",heard_mcdonald_islands:"1f1ed-1f1f2",heart:"2764",heart_decoration:"1f49f",heart_eyes:"1f60d",heart_eyes_cat:"1f63b",heartbeat:"1f493",heartpulse:"1f497",hearts:"2665",heavy_check_mark:"2714",heavy_division_sign:"2797",heavy_dollar_sign:"1f4b2",heavy_exclamation_mark:"2757",heavy_heart_exclamation:"2763",heavy_minus_sign:"2796",heavy_multiplication_x:"2716",heavy_plus_sign:"2795",hedgehog:"1f994",helicopter:"1f681",herb:"1f33f",hibiscus:"1f33a",high_brightness:"1f506",high_heel:"1f460",hiking_boot:"1f97e",hindu_temple:"1f6d5",hippopotamus:"1f99b",hocho:"1f52a",hole:"1f573",honduras:"1f1ed-1f1f3",honey_pot:"1f36f",honeybee:"1f41d",hong_kong:"1f1ed-1f1f0",horse:"1f434",horse_racing:"1f3c7",hospital:"1f3e5",hot_face:"1f975",hot_pepper:"1f336",hotdog:"1f32d",hotel:"1f3e8",hotsprings:"2668",hourglass:"231b",hourglass_flowing_sand:"23f3",house:"1f3e0",house_with_garden:"1f3e1",houses:"1f3d8",hugs:"1f917",hungary:"1f1ed-1f1fa",hushed:"1f62f",ice_cream:"1f368",ice_cube:"1f9ca",ice_hockey:"1f3d2",ice_skate:"26f8",icecream:"1f366",iceland:"1f1ee-1f1f8",id:"1f194",ideograph_advantage:"1f250",imp:"1f47f",inbox_tray:"1f4e5",incoming_envelope:"1f4e8",india:"1f1ee-1f1f3",indonesia:"1f1ee-1f1e9",infinity:"267e",information_desk_person:"1f481",information_source:"2139",innocent:"1f607",interrobang:"2049",iphone:"1f4f1",iran:"1f1ee-1f1f7",iraq:"1f1ee-1f1f6",ireland:"1f1ee-1f1ea",isle_of_man:"1f1ee-1f1f2",israel:"1f1ee-1f1f1",it:"1f1ee-1f1f9",izakaya_lantern:"1f3ee",jack_o_lantern:"1f383",jamaica:"1f1ef-1f1f2",japan:"1f5fe",japanese_castle:"1f3ef",japanese_goblin:"1f47a",japanese_ogre:"1f479",jeans:"1f456",jersey:"1f1ef-1f1ea",jigsaw:"1f9e9",jordan:"1f1ef-1f1f4",joy:"1f602",joy_cat:"1f639",joystick:"1f579",jp:"1f1ef-1f1f5",judge:"1f9d1-2696",juggling_person:"1f939",kaaba:"1f54b",kangaroo:"1f998",kazakhstan:"1f1f0-1f1ff",kenya:"1f1f0-1f1ea",key:"1f511",keyboard:"2328",keycap_ten:"1f51f",kick_scooter:"1f6f4",kimono:"1f458",kiribati:"1f1f0-1f1ee",kiss:"1f48b",kissing:"1f617",kissing_cat:"1f63d",kissing_closed_eyes:"1f61a",kissing_heart:"1f618",kissing_smiling_eyes:"1f619",kite:"1fa81",kiwi_fruit:"1f95d",kneeling_man:"1f9ce-2642",kneeling_person:"1f9ce",kneeling_woman:"1f9ce-2640",knife:"1f52a",koala:"1f428",koko:"1f201",kosovo:"1f1fd-1f1f0",kr:"1f1f0-1f1f7",kuwait:"1f1f0-1f1fc",kyrgyzstan:"1f1f0-1f1ec",lab_coat:"1f97c",label:"1f3f7",lacrosse:"1f94d",lantern:"1f3ee",laos:"1f1f1-1f1e6",large_blue_circle:"1f535",large_blue_diamond:"1f537",large_orange_diamond:"1f536",last_quarter_moon:"1f317",last_quarter_moon_with_face:"1f31c",latin_cross:"271d",latvia:"1f1f1-1f1fb",laughing:"1f606",leafy_green:"1f96c",leaves:"1f343",lebanon:"1f1f1-1f1e7",ledger:"1f4d2",left_luggage:"1f6c5",left_right_arrow:"2194",left_speech_bubble:"1f5e8",leftwards_arrow_with_hook:"21a9",leg:"1f9b5",lemon:"1f34b",leo:"264c",leopard:"1f406",lesotho:"1f1f1-1f1f8",level_slider:"1f39a",liberia:"1f1f1-1f1f7",libra:"264e",libya:"1f1f1-1f1fe",liechtenstein:"1f1f1-1f1ee",light_rail:"1f688",link:"1f517",lion:"1f981",lips:"1f444",lipstick:"1f484",lithuania:"1f1f1-1f1f9",lizard:"1f98e",llama:"1f999",lobster:"1f99e",lock:"1f512",lock_with_ink_pen:"1f50f",lollipop:"1f36d",loop:"27bf",lotion_bottle:"1f9f4",lotus_position:"1f9d8",lotus_position_man:"1f9d8-2642",lotus_position_woman:"1f9d8-2640",loud_sound:"1f50a",loudspeaker:"1f4e2",love_hotel:"1f3e9",love_letter:"1f48c",love_you_gesture:"1f91f",low_brightness:"1f505",luggage:"1f9f3",luxembourg:"1f1f1-1f1fa",lying_face:"1f925",m:"24c2",macau:"1f1f2-1f1f4",macedonia:"1f1f2-1f1f0",madagascar:"1f1f2-1f1ec",mag:"1f50d",mag_right:"1f50e",mage:"1f9d9",mage_man:"1f9d9-2642",mage_woman:"1f9d9-2640",magnet:"1f9f2",mahjong:"1f004",mailbox:"1f4eb",mailbox_closed:"1f4ea",mailbox_with_mail:"1f4ec",mailbox_with_no_mail:"1f4ed",malawi:"1f1f2-1f1fc",malaysia:"1f1f2-1f1fe",maldives:"1f1f2-1f1fb",male_detective:"1f575-2642",male_sign:"2642",mali:"1f1f2-1f1f1",malta:"1f1f2-1f1f9",man:"1f468",man_artist:"1f468-1f3a8",man_astronaut:"1f468-1f680",man_cartwheeling:"1f938-2642",man_cook:"1f468-1f373",man_dancing:"1f57a",man_facepalming:"1f926-2642",man_factory_worker:"1f468-1f3ed",man_farmer:"1f468-1f33e",man_firefighter:"1f468-1f692",man_health_worker:"1f468-2695",man_in_manual_wheelchair:"1f468-1f9bd",man_in_motorized_wheelchair:"1f468-1f9bc",man_in_tuxedo:"1f935",man_judge:"1f468-2696",man_juggling:"1f939-2642",man_mechanic:"1f468-1f527",man_office_worker:"1f468-1f4bc",man_pilot:"1f468-2708",man_playing_handball:"1f93e-2642",man_playing_water_polo:"1f93d-2642",man_scientist:"1f468-1f52c",man_shrugging:"1f937-2642",man_singer:"1f468-1f3a4",man_student:"1f468-1f393",man_teacher:"1f468-1f3eb",man_technologist:"1f468-1f4bb",man_with_gua_pi_mao:"1f472",man_with_probing_cane:"1f468-1f9af",man_with_turban:"1f473-2642",mandarin:"1f34a",mango:"1f96d",mans_shoe:"1f45e",mantelpiece_clock:"1f570",manual_wheelchair:"1f9bd",maple_leaf:"1f341",marshall_islands:"1f1f2-1f1ed",martial_arts_uniform:"1f94b",martinique:"1f1f2-1f1f6",mask:"1f637",massage:"1f486",massage_man:"1f486-2642",massage_woman:"1f486-2640",mate:"1f9c9",mauritania:"1f1f2-1f1f7",mauritius:"1f1f2-1f1fa",mayotte:"1f1fe-1f1f9",meat_on_bone:"1f356",mechanic:"1f9d1-1f527",mechanical_arm:"1f9be",mechanical_leg:"1f9bf",medal_military:"1f396",medal_sports:"1f3c5",medical_symbol:"2695",mega:"1f4e3",melon:"1f348",memo:"1f4dd",men_wrestling:"1f93c-2642",menorah:"1f54e",mens:"1f6b9",mermaid:"1f9dc-2640",merman:"1f9dc-2642",merperson:"1f9dc",metal:"1f918",metro:"1f687",mexico:"1f1f2-1f1fd",microbe:"1f9a0",micronesia:"1f1eb-1f1f2",microphone:"1f3a4",microscope:"1f52c",middle_finger:"1f595",milk_glass:"1f95b",milky_way:"1f30c",minibus:"1f690",minidisc:"1f4bd",mobile_phone_off:"1f4f4",moldova:"1f1f2-1f1e9",monaco:"1f1f2-1f1e8",money_mouth_face:"1f911",money_with_wings:"1f4b8",moneybag:"1f4b0",mongolia:"1f1f2-1f1f3",monkey:"1f412",monkey_face:"1f435",monocle_face:"1f9d0",monorail:"1f69d",montenegro:"1f1f2-1f1ea",montserrat:"1f1f2-1f1f8",moon:"1f314",moon_cake:"1f96e",morocco:"1f1f2-1f1e6",mortar_board:"1f393",mosque:"1f54c",mosquito:"1f99f",motor_boat:"1f6e5",motor_scooter:"1f6f5",motorcycle:"1f3cd",motorized_wheelchair:"1f9bc",motorway:"1f6e3",mount_fuji:"1f5fb",mountain:"26f0",mountain_bicyclist:"1f6b5",mountain_biking_man:"1f6b5-2642",mountain_biking_woman:"1f6b5-2640",mountain_cableway:"1f6a0",mountain_railway:"1f69e",mountain_snow:"1f3d4",mouse:"1f42d",mouse2:"1f401",movie_camera:"1f3a5",moyai:"1f5ff",mozambique:"1f1f2-1f1ff",mrs_claus:"1f936",muscle:"1f4aa",mushroom:"1f344",musical_keyboard:"1f3b9",musical_note:"1f3b5",musical_score:"1f3bc",mute:"1f507",myanmar:"1f1f2-1f1f2",nail_care:"1f485",name_badge:"1f4db",namibia:"1f1f3-1f1e6",national_park:"1f3de",nauru:"1f1f3-1f1f7",nauseated_face:"1f922",nazar_amulet:"1f9ff",necktie:"1f454",negative_squared_cross_mark:"274e",nepal:"1f1f3-1f1f5",nerd_face:"1f913",netherlands:"1f1f3-1f1f1",neutral_face:"1f610",new:"1f195",new_caledonia:"1f1f3-1f1e8",new_moon:"1f311",new_moon_with_face:"1f31a",new_zealand:"1f1f3-1f1ff",newspaper:"1f4f0",newspaper_roll:"1f5de",next_track_button:"23ed",ng:"1f196",ng_man:"1f645-2642",ng_woman:"1f645-2640",nicaragua:"1f1f3-1f1ee",niger:"1f1f3-1f1ea",nigeria:"1f1f3-1f1ec",night_with_stars:"1f303",nine:"0039-20e3",niue:"1f1f3-1f1fa",no_bell:"1f515",no_bicycles:"1f6b3",no_entry:"26d4",no_entry_sign:"1f6ab",no_good:"1f645",no_good_man:"1f645-2642",no_good_woman:"1f645-2640",no_mobile_phones:"1f4f5",no_mouth:"1f636",no_pedestrians:"1f6b7",no_smoking:"1f6ad","non-potable_water":"1f6b1",norfolk_island:"1f1f3-1f1eb",north_korea:"1f1f0-1f1f5",northern_mariana_islands:"1f1f2-1f1f5",norway:"1f1f3-1f1f4",nose:"1f443",notebook:"1f4d3",notebook_with_decorative_cover:"1f4d4",notes:"1f3b6",nut_and_bolt:"1f529",o:"2b55",o2:"1f17e",ocean:"1f30a",octopus:"1f419",oden:"1f362",office:"1f3e2",office_worker:"1f9d1-1f4bc",oil_drum:"1f6e2",ok:"1f197",ok_hand:"1f44c",ok_man:"1f646-2642",ok_person:"1f646",ok_woman:"1f646-2640",old_key:"1f5dd",older_adult:"1f9d3",older_man:"1f474",older_woman:"1f475",om:"1f549",oman:"1f1f4-1f1f2",on:"1f51b",oncoming_automobile:"1f698",oncoming_bus:"1f68d",oncoming_police_car:"1f694",oncoming_taxi:"1f696",one:"0031-20e3",one_piece_swimsuit:"1fa71",onion:"1f9c5",open_book:"1f4d6",open_file_folder:"1f4c2",open_hands:"1f450",open_mouth:"1f62e",open_umbrella:"2602",ophiuchus:"26ce",orange:"1f34a",orange_book:"1f4d9",orange_circle:"1f7e0",orange_heart:"1f9e1",orange_square:"1f7e7",orangutan:"1f9a7",orthodox_cross:"2626",otter:"1f9a6",outbox_tray:"1f4e4",owl:"1f989",ox:"1f402",oyster:"1f9aa",package:"1f4e6",page_facing_up:"1f4c4",page_with_curl:"1f4c3",pager:"1f4df",paintbrush:"1f58c",pakistan:"1f1f5-1f1f0",palau:"1f1f5-1f1fc",palestinian_territories:"1f1f5-1f1f8",palm_tree:"1f334",palms_up_together:"1f932",panama:"1f1f5-1f1e6",pancakes:"1f95e",panda_face:"1f43c",paperclip:"1f4ce",paperclips:"1f587",papua_new_guinea:"1f1f5-1f1ec",parachute:"1fa82",paraguay:"1f1f5-1f1fe",parasol_on_ground:"26f1",parking:"1f17f",parrot:"1f99c",part_alternation_mark:"303d",partly_sunny:"26c5",partying_face:"1f973",passenger_ship:"1f6f3",passport_control:"1f6c2",pause_button:"23f8",paw_prints:"1f43e",peace_symbol:"262e",peach:"1f351",peacock:"1f99a",peanuts:"1f95c",pear:"1f350",pen:"1f58a",pencil:"1f4dd",pencil2:"270f",penguin:"1f427",pensive:"1f614",people_holding_hands:"1f9d1-1f91d-1f9d1",performing_arts:"1f3ad",persevere:"1f623",person_bald:"1f9d1-1f9b2",person_curly_hair:"1f9d1-1f9b1",person_fencing:"1f93a",person_in_manual_wheelchair:"1f9d1-1f9bd",person_in_motorized_wheelchair:"1f9d1-1f9bc",person_red_hair:"1f9d1-1f9b0",person_white_hair:"1f9d1-1f9b3",person_with_probing_cane:"1f9d1-1f9af",person_with_turban:"1f473",peru:"1f1f5-1f1ea",petri_dish:"1f9eb",philippines:"1f1f5-1f1ed",phone:"260e",pick:"26cf",pie:"1f967",pig:"1f437",pig2:"1f416",pig_nose:"1f43d",pill:"1f48a",pilot:"1f9d1-2708",pinching_hand:"1f90f",pineapple:"1f34d",ping_pong:"1f3d3",pirate_flag:"1f3f4-2620",pisces:"2653",pitcairn_islands:"1f1f5-1f1f3",pizza:"1f355",place_of_worship:"1f6d0",plate_with_cutlery:"1f37d",play_or_pause_button:"23ef",pleading_face:"1f97a",point_down:"1f447",point_left:"1f448",point_right:"1f449",point_up:"261d",point_up_2:"1f446",poland:"1f1f5-1f1f1",police_car:"1f693",police_officer:"1f46e",policeman:"1f46e-2642",policewoman:"1f46e-2640",poodle:"1f429",poop:"1f4a9",popcorn:"1f37f",portugal:"1f1f5-1f1f9",post_office:"1f3e3",postal_horn:"1f4ef",postbox:"1f4ee",potable_water:"1f6b0",potato:"1f954",pouch:"1f45d",poultry_leg:"1f357",pound:"1f4b7",pout:"1f621",pouting_cat:"1f63e",pouting_face:"1f64e",pouting_man:"1f64e-2642",pouting_woman:"1f64e-2640",pray:"1f64f",prayer_beads:"1f4ff",pregnant_woman:"1f930",pretzel:"1f968",previous_track_button:"23ee",prince:"1f934",princess:"1f478",printer:"1f5a8",probing_cane:"1f9af",puerto_rico:"1f1f5-1f1f7",punch:"1f44a",purple_circle:"1f7e3",purple_heart:"1f49c",purple_square:"1f7ea",purse:"1f45b",pushpin:"1f4cc",put_litter_in_its_place:"1f6ae",qatar:"1f1f6-1f1e6",question:"2753",rabbit:"1f430",rabbit2:"1f407",raccoon:"1f99d",racehorse:"1f40e",racing_car:"1f3ce",radio:"1f4fb",radio_button:"1f518",radioactive:"2622",rage:"1f621",railway_car:"1f683",railway_track:"1f6e4",rainbow:"1f308",rainbow_flag:"1f3f3-1f308",raised_back_of_hand:"1f91a",raised_eyebrow:"1f928",raised_hand:"270b",raised_hand_with_fingers_splayed:"1f590",raised_hands:"1f64c",raising_hand:"1f64b",raising_hand_man:"1f64b-2642",raising_hand_woman:"1f64b-2640",ram:"1f40f",ramen:"1f35c",rat:"1f400",razor:"1fa92",receipt:"1f9fe",record_button:"23fa",recycle:"267b",red_car:"1f697",red_circle:"1f534",red_envelope:"1f9e7",red_haired_man:"1f468-1f9b0",red_haired_woman:"1f469-1f9b0",red_square:"1f7e5",registered:"00ae",relaxed:"263a",relieved:"1f60c",reminder_ribbon:"1f397",repeat:"1f501",repeat_one:"1f502",rescue_worker_helmet:"26d1",restroom:"1f6bb",reunion:"1f1f7-1f1ea",revolving_hearts:"1f49e",rewind:"23ea",rhinoceros:"1f98f",ribbon:"1f380",rice:"1f35a",rice_ball:"1f359",rice_cracker:"1f358",rice_scene:"1f391",right_anger_bubble:"1f5ef",ring:"1f48d",ringed_planet:"1fa90",robot:"1f916",rocket:"1f680",rofl:"1f923",roll_eyes:"1f644",roll_of_paper:"1f9fb",roller_coaster:"1f3a2",romania:"1f1f7-1f1f4",rooster:"1f413",rose:"1f339",rosette:"1f3f5",rotating_light:"1f6a8",round_pushpin:"1f4cd",rowboat:"1f6a3",rowing_man:"1f6a3-2642",rowing_woman:"1f6a3-2640",ru:"1f1f7-1f1fa",rugby_football:"1f3c9",runner:"1f3c3",running:"1f3c3",running_man:"1f3c3-2642",running_shirt_with_sash:"1f3bd",running_woman:"1f3c3-2640",rwanda:"1f1f7-1f1fc",sa:"1f202",safety_pin:"1f9f7",safety_vest:"1f9ba",sagittarius:"2650",sailboat:"26f5",sake:"1f376",salt:"1f9c2",samoa:"1f1fc-1f1f8",san_marino:"1f1f8-1f1f2",sandal:"1f461",sandwich:"1f96a",santa:"1f385",sao_tome_principe:"1f1f8-1f1f9",sari:"1f97b",sassy_man:"1f481-2642",sassy_woman:"1f481-2640",satellite:"1f4e1",satisfied:"1f606",saudi_arabia:"1f1f8-1f1e6",sauna_man:"1f9d6-2642",sauna_person:"1f9d6",sauna_woman:"1f9d6-2640",sauropod:"1f995",saxophone:"1f3b7",scarf:"1f9e3",school:"1f3eb",school_satchel:"1f392",scientist:"1f9d1-1f52c",scissors:"2702",scorpion:"1f982",scorpius:"264f",scotland:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",scream:"1f631",scream_cat:"1f640",scroll:"1f4dc",seat:"1f4ba",secret:"3299",see_no_evil:"1f648",seedling:"1f331",selfie:"1f933",senegal:"1f1f8-1f1f3",serbia:"1f1f7-1f1f8",service_dog:"1f415-1f9ba",seven:"0037-20e3",seychelles:"1f1f8-1f1e8",shallow_pan_of_food:"1f958",shamrock:"2618",shark:"1f988",shaved_ice:"1f367",sheep:"1f411",shell:"1f41a",shield:"1f6e1",shinto_shrine:"26e9",ship:"1f6a2",shirt:"1f455",poo:"1f4a9",shoe:"1f45e",shopping:"1f6cd",shopping_cart:"1f6d2",shorts:"1fa73",shower:"1f6bf",shrimp:"1f990",shrug:"1f937",shushing_face:"1f92b",sierra_leone:"1f1f8-1f1f1",signal_strength:"1f4f6",singapore:"1f1f8-1f1ec",singer:"1f9d1-1f3a4",sint_maarten:"1f1f8-1f1fd",six:"0036-20e3",six_pointed_star:"1f52f",skateboard:"1f6f9",ski:"1f3bf",skier:"26f7",skull:"1f480",skull_and_crossbones:"2620",skunk:"1f9a8",sled:"1f6f7",sleeping:"1f634",sleeping_bed:"1f6cc",sleepy:"1f62a",slightly_frowning_face:"1f641",slightly_smiling_face:"1f642",slot_machine:"1f3b0",sloth:"1f9a5",slovakia:"1f1f8-1f1f0",slovenia:"1f1f8-1f1ee",small_airplane:"1f6e9",small_blue_diamond:"1f539",small_orange_diamond:"1f538",small_red_triangle:"1f53a",small_red_triangle_down:"1f53b",smile:"1f604",smile_cat:"1f638",smiley:"1f603",smiley_cat:"1f63a",smiling_face_with_three_hearts:"1f970",smiling_imp:"1f608",smirk:"1f60f",smirk_cat:"1f63c",smoking:"1f6ac",snail:"1f40c",snake:"1f40d",sneezing_face:"1f927",snowboarder:"1f3c2",snowflake:"2744",snowman:"26c4",snowman_with_snow:"2603",soap:"1f9fc",sob:"1f62d",soccer:"26bd",socks:"1f9e6",softball:"1f94e",solomon_islands:"1f1f8-1f1e7",somalia:"1f1f8-1f1f4",soon:"1f51c",sos:"1f198",sound:"1f509",south_africa:"1f1ff-1f1e6",south_georgia_south_sandwich_islands:"1f1ec-1f1f8",south_sudan:"1f1f8-1f1f8",space_invader:"1f47e",spades:"2660",spaghetti:"1f35d",sparkle:"2747",sparkler:"1f387",sparkles:"2728",sparkling_heart:"1f496",speak_no_evil:"1f64a",speaker:"1f508",speaking_head:"1f5e3",speech_balloon:"1f4ac",speedboat:"1f6a4",spider:"1f577",spider_web:"1f578",spiral_calendar:"1f5d3",spiral_notepad:"1f5d2",sponge:"1f9fd",spoon:"1f944",squid:"1f991",sri_lanka:"1f1f1-1f1f0",st_barthelemy:"1f1e7-1f1f1",st_helena:"1f1f8-1f1ed",st_kitts_nevis:"1f1f0-1f1f3",st_lucia:"1f1f1-1f1e8",st_martin:"1f1f2-1f1eb",st_pierre_miquelon:"1f1f5-1f1f2",st_vincent_grenadines:"1f1fb-1f1e8",stadium:"1f3df",standing_man:"1f9cd-2642",standing_person:"1f9cd",standing_woman:"1f9cd-2640",star:"2b50",star2:"1f31f",star_and_crescent:"262a",star_of_david:"2721",star_struck:"1f929",stars:"1f320",station:"1f689",statue_of_liberty:"1f5fd",steam_locomotive:"1f682",stethoscope:"1fa7a",stew:"1f372",stop_button:"23f9",stop_sign:"1f6d1",stopwatch:"23f1",straight_ruler:"1f4cf",strawberry:"1f353",stuck_out_tongue:"1f61b",stuck_out_tongue_closed_eyes:"1f61d",stuck_out_tongue_winking_eye:"1f61c",student:"1f9d1-1f393",studio_microphone:"1f399",stuffed_flatbread:"1f959",sudan:"1f1f8-1f1e9",sun_behind_large_cloud:"1f325",sun_behind_rain_cloud:"1f326",sun_behind_small_cloud:"1f324",sun_with_face:"1f31e",sunflower:"1f33b",sunglasses:"1f60e",sunny:"2600",sunrise:"1f305",sunrise_over_mountains:"1f304",superhero:"1f9b8",superhero_man:"1f9b8-2642",superhero_woman:"1f9b8-2640",supervillain:"1f9b9",supervillain_man:"1f9b9-2642",supervillain_woman:"1f9b9-2640",surfer:"1f3c4",surfing_man:"1f3c4-2642",surfing_woman:"1f3c4-2640",suriname:"1f1f8-1f1f7",sushi:"1f363",suspension_railway:"1f69f",svalbard_jan_mayen:"1f1f8-1f1ef",swan:"1f9a2",swaziland:"1f1f8-1f1ff",sweat:"1f613",sweat_drops:"1f4a6",sweat_smile:"1f605",sweden:"1f1f8-1f1ea",sweet_potato:"1f360",swim_brief:"1fa72",swimmer:"1f3ca",swimming_man:"1f3ca-2642",swimming_woman:"1f3ca-2640",switzerland:"1f1e8-1f1ed",symbols:"1f523",synagogue:"1f54d",syria:"1f1f8-1f1fe",syringe:"1f489","t-rex":"1f996",taco:"1f32e",tada:"1f389",taiwan:"1f1f9-1f1fc",tajikistan:"1f1f9-1f1ef",takeout_box:"1f961",tanabata_tree:"1f38b",tangerine:"1f34a",tanzania:"1f1f9-1f1ff",taurus:"2649",taxi:"1f695",tea:"1f375",teacher:"1f9d1-1f3eb",technologist:"1f9d1-1f4bb",teddy_bear:"1f9f8",telephone:"260e",telephone_receiver:"1f4de",telescope:"1f52d",tennis:"1f3be",tent:"26fa",test_tube:"1f9ea",thailand:"1f1f9-1f1ed",thermometer:"1f321",thinking:"1f914",thought_balloon:"1f4ad",thread:"1f9f5",three:"0033-20e3",thumbsdown:"1f44e",thumbsup:"1f44d",ticket:"1f3ab",tickets:"1f39f",tiger:"1f42f",tiger2:"1f405",timer_clock:"23f2",timor_leste:"1f1f9-1f1f1",tipping_hand_man:"1f481-2642",tipping_hand_person:"1f481",tipping_hand_woman:"1f481-2640",tired_face:"1f62b",tm:"2122",togo:"1f1f9-1f1ec",toilet:"1f6bd",tokelau:"1f1f9-1f1f0",tokyo_tower:"1f5fc",tomato:"1f345",tonga:"1f1f9-1f1f4",tongue:"1f445",toolbox:"1f9f0",tooth:"1f9b7",top:"1f51d",tophat:"1f3a9",tornado:"1f32a",tr:"1f1f9-1f1f7",trackball:"1f5b2",tractor:"1f69c",traffic_light:"1f6a5",train:"1f68b",train2:"1f686",tram:"1f68a",triangular_flag_on_post:"1f6a9",triangular_ruler:"1f4d0",trident:"1f531",trinidad_tobago:"1f1f9-1f1f9",tristan_da_cunha:"1f1f9-1f1e6",triumph:"1f624",trolleybus:"1f68e",trophy:"1f3c6",tropical_drink:"1f379",tropical_fish:"1f420",truck:"1f69a",trumpet:"1f3ba",tshirt:"1f455",tulip:"1f337",tumbler_glass:"1f943",tunisia:"1f1f9-1f1f3",turkey:"1f983",turkmenistan:"1f1f9-1f1f2",turks_caicos_islands:"1f1f9-1f1e8",turtle:"1f422",tuvalu:"1f1f9-1f1fb",tv:"1f4fa",twisted_rightwards_arrows:"1f500",two:"0032-20e3",two_hearts:"1f495",two_men_holding_hands:"1f46c",two_women_holding_hands:"1f46d",u5272:"1f239",u5408:"1f234",u55b6:"1f23a",u6307:"1f22f",u6708:"1f237",u6709:"1f236",u6e80:"1f235",u7121:"1f21a",u7533:"1f238",u7981:"1f232",u7a7a:"1f233",uganda:"1f1fa-1f1ec",uk:"1f1ec-1f1e7",ukraine:"1f1fa-1f1e6",umbrella:"2614",unamused:"1f612",underage:"1f51e",unicorn:"1f984",united_arab_emirates:"1f1e6-1f1ea",united_nations:"1f1fa-1f1f3",unlock:"1f513",up:"1f199",upside_down_face:"1f643",uruguay:"1f1fa-1f1fe",us:"1f1fa-1f1f8",us_outlying_islands:"1f1fa-1f1f2",us_virgin_islands:"1f1fb-1f1ee",uzbekistan:"1f1fa-1f1ff",v:"270c",vampire:"1f9db",vampire_man:"1f9db-2642",vampire_woman:"1f9db-2640",vanuatu:"1f1fb-1f1fa",vatican_city:"1f1fb-1f1e6",venezuela:"1f1fb-1f1ea",vertical_traffic_light:"1f6a6",vhs:"1f4fc",vibration_mode:"1f4f3",video_camera:"1f4f9",video_game:"1f3ae",vietnam:"1f1fb-1f1f3",violin:"1f3bb",virgo:"264d",volcano:"1f30b",volleyball:"1f3d0",vomiting_face:"1f92e",vs:"1f19a",vulcan_salute:"1f596",waffle:"1f9c7",wales:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",walking:"1f6b6",walking_man:"1f6b6-2642",walking_woman:"1f6b6-2640",wallis_futuna:"1f1fc-1f1eb",waning_crescent_moon:"1f318",waning_gibbous_moon:"1f316",warning:"26a0",wastebasket:"1f5d1",watch:"231a",water_buffalo:"1f403",water_polo:"1f93d",watermelon:"1f349",wave:"1f44b",wavy_dash:"3030",waxing_crescent_moon:"1f312",waxing_gibbous_moon:"1f314",wc:"1f6be",weary:"1f629",wedding:"1f492",weight_lifting:"1f3cb",weight_lifting_man:"1f3cb-2642",weight_lifting_woman:"1f3cb-2640",western_sahara:"1f1ea-1f1ed",whale:"1f433",whale2:"1f40b",wheel_of_dharma:"2638",wheelchair:"267f",white_check_mark:"2705",white_circle:"26aa",white_flag:"1f3f3",white_flower:"1f4ae",white_haired_man:"1f468-1f9b3",white_haired_woman:"1f469-1f9b3",white_heart:"1f90d",white_large_square:"2b1c",white_medium_small_square:"25fd",white_medium_square:"25fb",white_small_square:"25ab",white_square_button:"1f533",wilted_flower:"1f940",wind_chime:"1f390",wind_face:"1f32c",wine_glass:"1f377",wink:"1f609",wolf:"1f43a",woman:"1f469",woman_artist:"1f469-1f3a8",woman_astronaut:"1f469-1f680",woman_cartwheeling:"1f938-2640",woman_cook:"1f469-1f373",woman_dancing:"1f483",woman_facepalming:"1f926-2640",woman_factory_worker:"1f469-1f3ed",woman_farmer:"1f469-1f33e",woman_firefighter:"1f469-1f692",woman_health_worker:"1f469-2695",woman_in_manual_wheelchair:"1f469-1f9bd",woman_in_motorized_wheelchair:"1f469-1f9bc",woman_judge:"1f469-2696",woman_juggling:"1f939-2640",woman_mechanic:"1f469-1f527",woman_office_worker:"1f469-1f4bc",woman_pilot:"1f469-2708",woman_playing_handball:"1f93e-2640",woman_playing_water_polo:"1f93d-2640",woman_scientist:"1f469-1f52c",woman_shrugging:"1f937-2640",woman_singer:"1f469-1f3a4",woman_student:"1f469-1f393",woman_teacher:"1f469-1f3eb",woman_technologist:"1f469-1f4bb",woman_with_headscarf:"1f9d5",woman_with_probing_cane:"1f469-1f9af",woman_with_turban:"1f473-2640",womans_clothes:"1f45a",womans_hat:"1f452",women_wrestling:"1f93c-2640",womens:"1f6ba",woozy_face:"1f974",world_map:"1f5fa",worried:"1f61f",wrench:"1f527",wrestling:"1f93c",writing_hand:"270d",x:"274c",yarn:"1f9f6",yawning_face:"1f971",yellow_circle:"1f7e1",yellow_heart:"1f49b",yellow_square:"1f7e8",yemen:"1f1fe-1f1ea",yen:"1f4b4",yin_yang:"262f",yo_yo:"1fa80",yum:"1f60b",zambia:"1f1ff-1f1f2",zany_face:"1f92a",zap:"26a1",zebra:"1f993",zero:"0030-20e3",zimbabwe:"1f1ff-1f1fc",zipper_mouth_face:"1f910",zombie:"1f9df",zombie_man:"1f9df-2642",zombie_woman:"1f9df-2640",zzz:"1f4a4"};function uv(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function hv(t){for(var e=1;e>>0===a))throw new RangeError("Invalid code point: ".concat(a));a<=65535?e=t.push(a):(a-=65536,e=t.push(55296+(a>>10),a%1024+56320)),e>=16383&&(n+=String.fromCharCode.apply(null,t),t.length=0)}return n+String.fromCharCode.apply(null,t)}var gv=function(t){function e(){var t,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:void 0}).config;if(ra(this,e),(t=fv(this,e,[{config:n}])).options={useUnicode:!0,upperCase:!1,customHandled:!1,resourceURL:"https://github.githubassets.com/images/icons/emoji/unicode/${code}.png?v8",emojis:hv({},lv)},"object"!==Ro(n))return Ko(t);var r=n.useUnicode,i=n.customResourceURL,a=n.customRenderer,o=n.upperCase;return t.options.useUnicode="boolean"==typeof r?r:t.options.useUnicode,t.options.upperCase="boolean"==typeof o?o:t.options.upperCase,!1===r&&"string"==typeof i&&(t.options.resourceURL=i),"function"==typeof a&&(t.options.customHandled=!0,t.options.customRenderer=a),t}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t,e){var n=this;return this.test(t)?t.replace(this.RULE.reg,(function(t,e){var r;if(n.options.customHandled&&"function"==typeof n.options.customRenderer)return n.options.customRenderer(e);var i=n.options.emojis[e];if("string"!=typeof i)return t;if(n.options.useUnicode){var a,o=lA(a=i.split("-")).call(a,(function(t){return"0x".concat(t)}));return Av.apply(void 0,kp(o))}n.options.upperCase&&(i=i.toUpperCase());var s=n.options.resourceURL.replace(/\$\{code\}/g,i);return hs(r='')).call(r,$A(e),'')})):t}},{key:"rule",value:function(){var t={begin:":",content:"([a-zA-Z0-9+_]+?)",end:":"};return t.reg=md(t,"g"),t}}])}(iA);function pv(t,e,n){return e=es(e),Ko(t,mv()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function mv(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(mv=function(){return!!t})()}cs(gv,"HOOK_NAME","emoji");var bv=function(t){function e(){return ra(this,e),pv(this,e,arguments)}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t){return this.test(t)?t.replace(this.RULE.reg,'$1$2$3'):t}},{key:"rule",value:function(){var t={begin:"(^| )\\/",end:"\\/( |$)",content:"([^\\n]+?)"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),t}}])}(iA);function vv(t,e,n){return e=es(e),Ko(t,yv()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function yv(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(yv=function(){return!!t})()}cs(bv,"HOOK_NAME","underline");var wv=function(t){function e(){return ra(this,e),vv(this,e,arguments)}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t){return this.test(t)?t.replace(this.RULE.reg,"$1$2$3"):t}},{key:"rule",value:function(){var t={begin:"(^| )==",end:"==( |$|\\n)",content:"([^\\n]+?)"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),t}}])}(iA);cs(wv,"HOOK_NAME","highLight");var kv=fn.includes,Cv=u((function(){return!Array(1).includes()}));Dn({target:"Array",proto:!0,forced:Cv},{includes:function(t){return kv(this,t,arguments.length>1?arguments[1]:void 0)}}),Wa();var xv=Ni("Array","includes"),Ev=w("".indexOf);Dn({target:"String",proto:!0,forced:!Hh("includes")},{includes:function(t){return!!~Ev(xr(U(this)),xr($h(t)),arguments.length>1?arguments[1]:void 0)}});var Tv=Ni("String","includes"),Bv=xv,_v=Tv,Sv=Array.prototype,Lv=String.prototype,Iv=function(t){var e=t.includes;return t===Sv||rt(Sv,t)&&e===Sv.includes?Bv:"string"==typeof t||t===Lv||rt(Lv,t)&&e===Lv.includes?_v:e};var Mv=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function zv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n",keyword:"》",value:">"}],Yv=[{icon:"FullWidth",label:"[]",keyword:"【】",value:"[]",goLeft:1},{icon:"FullWidth",label:"【】",keyword:"【",value:"【】",goLeft:1},{icon:"link",label:"Link",keyword:"【】",value:"[title](https://url)",selection:{from:19,to:14}},{icon:"FullWidth",label:"()",keyword:"(",value:"()",goLeft:1},{icon:"FullWidth",label:"()",keyword:"(",value:"()",goLeft:1},{icon:"FullWidth",label:"<>",keyword:"《》",value:"<>",goLeft:1},{icon:"FullWidth",label:"《》",keyword:"《》",value:"《》",goLeft:1},{icon:"FullWidth",label:'""',keyword:"“”",value:'""',goLeft:1},{icon:"FullWidth",label:"“”",keyword:"“”",value:"”“",goLeft:1},{icon:"FullWidth",label:"inlineCode",keyword:"`",value:"``",goLeft:1},{icon:"FullWidth",label:"codeBlock",keyword:"`",value:"```\n\n```\n",goTop:2}],Jv=(Gv=lA(jv).call(jv,(function(t){return{icon:"FullWidth",label:t,keyword:"```",value:"```".concat(t,"\n\n```\n"),goTop:2,exactMatch:!0}})),Xv=[],Qs(jv).call(jv,(function(t){var e,n="",r=Kv(t);try{for(r.s();!(e=r.n()).done;)n+=e.value,Xv.push({icon:"FullWidth",label:t,keyword:"```".concat(n),value:"```".concat(t,"\n\n```\n"),goTop:2,exactMatch:!0})}catch(t){r.e(t)}finally{r.f()}})),hs(Gv).call(Gv,Xv)),Zv=hs(Uv=hs(qv).call(qv,Yv)).call(Uv,Jv);var ty=function(){return"CodeMirror.Pass"};function ey(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return ny(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ny(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ny(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n')).call(c,n)).call(s,r,""):!1===(null===(i=this.suggester[n])||void 0===i?void 0:i.echo)?"".concat(e):this.suggester[n]?r?e+r:"".concat(e):e+r}},{key:"rule",value:function(){var t,e,n,r,i,a,o,s=this;if(null===(t=this.config)||void 0===t||!t.suggester||Is(null===(e=this.config)||void 0===e?void 0:e.suggester).length<=0)return{};sd(this.config.suggester)?i=lA(a=this.config.suggester).call(a,(function(t){return t.keyword||""})):i=lA(o=Is(this.config.suggester)).call(o,(function(t){return s.config.suggester[t].keyword||""}));var c=lA(i).call(i,(function(t){return $v(t)})).join("|");return{reg:new RegExp(hs(n=hs(r="".concat(bd()?"((?
    '),this.searchCache=!1,this.searchKeyCache=[],this.optionList=[],this.cursorMove=!0,this.suggesterConfig={},this.$cherry=e}),[{key:"tryCreatePanel",value:function(){!this.$suggesterPanel&&Zm()&&document&&(this.$cherry.wrapperDom.appendChild(this.createDom(this.panelWrap)),this.$suggesterPanel=this.$cherry.wrapperDom.querySelector(".cherry-suggester-panel"))}},{key:"hasEditor",value:function(){return!!this.editor&&!!this.editor.editor.display&&!!this.editor.editor.display.wrapper}},{key:"setEditor",value:function(t){this.editor=t}},{key:"setSuggester",value:function(t){this.suggesterConfig=t}},{key:"bindEvent",value:function(){var t=this;if(this.editor.options.showSuggestList){var e=!1;this.editor.editor.on("change",(function(n,r){e=!0,t.onCodeMirrorChange(n,r)})),this.editor.editor.on("keydown",(function(n,r){e=!0,t.enableRelate()&&t.onKeyDown(n,r)})),this.editor.editor.on("cursorActivity",(function(){e||t.stopRelate(),e=!1}));var n=this.editor.editor.getOption("extraKeys"),r=["Up","Down","Enter"];Qs(r).call(r,(function(e){if("function"==typeof n[e]){var r=n[e];n[e]=function(e){if(t.cursorMove){var n=r.call(e,e);if(n)return n}}}else if(n[e]){if("string"==typeof n[e]){var i=n[e];n[e]=function(e){t.cursorMove&&t.editor.editor.execCommand(i)}}}else n[e]=function(){if(t.cursorMove)return ty()}})),this.editor.editor.setOption("extraKeys",n),this.editor.editor.on("scroll",(function(e,n){t.searchCache&&t.relocatePanel(t.editor.editor)})),this.onClickPanelItem()}}},{key:"onClickPanelItem",value:function(){var t=this;this.tryCreatePanel(),this.$suggesterPanel.addEventListener("click",(function(e){var n=function(t,e){var n,r=-1;return Qs(n=t.childNodes).call(n,(function(t,n){return t===e?r=n:""})),r}(t.$suggesterPanel,e.target);n>-1&&t.pasteSelectResult(n),t.stopRelate()}),!1)}},{key:"showSuggesterPanel",value:function(t){var e=t.left,n=t.top,r=t.items;this.tryCreatePanel(),!this.$suggesterPanel&&Zm()&&(this.$cherry.wrapperDom.appendChild(this.createDom(this.panelWrap)),this.$suggesterPanel=this.$cherry.wrapperDom.querySelector(".cherry-suggester-panel")),this.updatePanel(r),this.$suggesterPanel.style.left="".concat(e,"px"),this.$suggesterPanel.style.top="".concat(n,"px"),this.$suggesterPanel.style.display="block",this.$suggesterPanel.style.position="absolute",this.$suggesterPanel.style.zIndex="100"}},{key:"hideSuggesterPanel",value:function(){this.tryCreatePanel(),this.$suggesterPanel&&(this.$suggesterPanel.style.display="none")}},{key:"updatePanel",value:function(t){var e=this;this.tryCreatePanel();var n=lA(t).call(t,(function(t,n){if("object"===Ro(t)&&null!==t){var r,i=t.label;if(null!=t&&t.icon)i=hs(r='')).call(r,i);return e.renderPanelItem(i,!1)}return e.renderPanelItem(t,!1)})).join(""),r=this.suggesterConfig[this.keyword];r&&"function"==typeof r.suggestListRender&&(n=r.suggestListRender.call(this,t)||n),this.$suggesterPanel.innerHTML="","string"==typeof n?this.$suggesterPanel.innerHTML=n:sd(n)&&n.length>0?Qs(n).call(n,(function(t){e.$suggesterPanel.appendChild(t)})):"object"===Ro(n)&&1===n.nodeType&&this.$suggesterPanel.appendChild(n)}},{key:"renderPanelItem",value:function(t,e){return e?'
    '.concat(t,"
    "):'
    '.concat(t,"
    ")}},{key:"createDom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.template||(this.template=document.createElement("div")),this.template.innerHTML=mh(t).call(t);var e=document.createDocumentFragment();return lA(Array.prototype).call(this.template.childNodes,(function(t,n){e.appendChild(t)})),e}},{key:"relocatePanel",value:function(t){var e=this.$cherry.wrapperDom.querySelector(".CodeMirror-cursors .CodeMirror-cursor");if(e||(e=this.$cherry.wrapperDom.querySelector(".CodeMirror-selected")),!e)return!1;var n=this.$cherry.wrapperDom.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.top+r.height+5-n.top,a=r.left-n.left;this.showSuggesterPanel({left:a,top:i,items:this.optionList})}},{key:"getCursorPos",value:function(t){var e=document.querySelector(".CodeMirror-cursors .CodeMirror-cursor");if(!e)return null;var n=t.getCursor(),r=t.lineInfo(n.line).handle.height,i=e.getBoundingClientRect(),a=i.top+r;return{left:i.left,top:a}}},{key:"startRelate",value:function(t,e,n){this.cursorFrom=n,this.keyword=e,this.searchCache=!0,this.relocatePanel(t)}},{key:"stopRelate",value:function(){this.hideSuggesterPanel(),this.cursorFrom=null,this.cursorTo=null,this.keyword="",this.searchKeyCache=[],this.searchCache=!1,this.cursorMove=!0,this.optionList=[]}},{key:"pasteSelectResult",value:function(t,e){if(this.cursorTo&&this.cursorTo!==this.cursorFrom||(this.cursorTo=JSON.parse(Zu(this.cursorFrom))),this.cursorTo){this.cursorTo.ch+=1;var n=this.cursorFrom,r=this.cursorTo;if(this.optionList[t]){var i="";if("object"===Ro(this.optionList[t])&&null!==this.optionList[t]&&"string"==typeof this.optionList[t].value)i=this.optionList[t].value;else if("object"===Ro(this.optionList[t])&&null!==this.optionList[t]&&"function"==typeof this.optionList[t].value)i=this.optionList[t].value();else{var a;i=hs(a=" ".concat(this.keyword)).call(a,this.optionList[t]," ")}if(i&&this.editor.editor.replaceRange(i,n,r),this.optionList[t].goLeft){var o=this.editor.editor.getCursor();this.editor.editor.setCursor(o.line,o.ch-this.optionList[t].goLeft)}if(this.optionList[t].goTop){var s=this.editor.editor.getCursor();this.editor.editor.setCursor(s.line-this.optionList[t].goTop,s.ch)}if(this.optionList[t].selection){var c=this.editor.editor.getCursor().line,l=this.editor.editor.getCursor().ch;this.editor.editor.setSelection({line:c,ch:l-this.optionList[t].selection.from},{line:c,ch:l-this.optionList[t].selection.to})}}}}},{key:"findSelectedItemIndex",value:function(){return Xd(Array.prototype).call(this.$suggesterPanel.childNodes,(function(t){return t.classList.contains("cherry-suggester-panel__item--selected")}))}},{key:"enableRelate",value:function(){return this.searchCache}},{key:"onCodeMirrorChange",value:function(t,e){var n=this,r=e.text,i=e.from,a=e.to,o=e.origin,s=1===r.length?r[0]:"";if(!this.enableRelate()&&this.suggesterConfig[s]&&this.startRelate(t,s,i),this.enableRelate()&&(s||"+delete"===o)){var c;if(this.cursorTo=a,s)this.searchKeyCache.push(s);else if("+delete"===o&&(this.searchKeyCache.pop(),0===this.searchKeyCache.length))return void this.stopRelate();"function"==typeof(null===(c=this.suggesterConfig[this.keyword])||void 0===c?void 0:c.suggestList)&&this.suggesterConfig[this.keyword].suggestList(this.searchKeyCache.join(""),(function(t){!1!==t?(n.optionList=t&&t.length?t:[],n.updatePanel(n.optionList)):n.stopRelate()}))}}},{key:"onKeyDown",value:function(t,e){var n,r=this;if(this.tryCreatePanel(),!this.$suggesterPanel)return!1;var i=e.keyCode;if(Iv(n=[38,40]).call(n,i)){if(0===this.optionList.length)return void ks((function(){r.stopRelate()}),0);this.cursorMove=!1;var a=this.$suggesterPanel.querySelector(".cherry-suggester-panel__item--selected")||this.$suggesterPanel.querySelector(".cherry-suggester-panel__item:last-child"),o=null;38!==i||a.previousElementSibling?40!==i||a.nextElementSibling?38===i?o=a.previousElementSibling:40===i&&(o=a.nextElementSibling):o=this.$suggesterPanel.firstElementChild:o=this.$suggesterPanel.lastElementChild,a.classList.remove("cherry-suggester-panel__item--selected"),o.classList.add("cherry-suggester-panel__item--selected");var s=this.$suggesterPanel.offsetHeight,c=this.$suggesterPanel.scrollTop,l=c+s,u=o.offsetTop,h=o.offsetHeight;(ul)&&(this.$suggesterPanel.scrollTop=u-s/2)}else if(13===i){var f=this.findSelectedItemIndex();f>=0&&(e.stopPropagation(),this.cursorMove=!1,this.pasteSelectResult(f,e),t.focus()),ks((function(){r.stopRelate()}),0)}else 27!==i&&37!==i&&39!==i||(e.stopPropagation(),t.focus(),ks((function(){r.stopRelate()}),0))}}])}();function sy(t,e,n){return e=es(e),Ko(t,cy()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function cy(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(cy=function(){return!!t})()}var ly=function(t){function e(){return ra(this,e),sy(this,e,arguments)}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t){return this.test(t)?t.replace(this.RULE.reg,"$1$2$3$4"):t}},{key:"rule",value:function(){var t={begin:"(^| )\\{",end:"\\}( |$)",content:"([^\n]+?)\\|([^\n]+?)"};return t.reg=new RegExp(t.begin+t.content+t.end,"g"),t}}])}(iA);function uy(t,e,n){return e=es(e),Ko(t,hy()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function hy(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(hy=function(){return!!t})()}cs(ly,"HOOK_NAME","ruby");var fy=function(t){function e(t){var n;return ra(this,e),(n=uy(this,e,[{needCache:!0}])).initBrReg(t.globalConfig.classicBr),n}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t,e){var n=this;return t.replace(this.RULE.reg,(function(t,r,i,a){var o,s,c,l,u,h=n.getLineCount(t,r),f=n.$engine.md5(t),d=n.testHasCache(f);if(!1!==d)return uA(t,d);var A=n.$getPanelInfo(i,a,e),g=A.title,p=A.body,m=A.appendStyle,b=A.className;return uA(t,n.pushCache(hs(o=hs(s=hs(c=hs(l=hs(u='
    ")).call(s,g)).call(o,p,"
    "),f,h))}))}},{key:"$getClassByType",value:function(t){return/(left|right|center)/i.test(t)?"cherry-text-align cherry-text-align__".concat(t):"cherry-panel cherry-panel__".concat(t)}},{key:"$getPanelInfo",value:function(t,e,n){var r,i=this,a={type:this.$getTargetType(t),title:n(this.$getTitle(t)).html,body:e,appendStyle:"",className:""};a.className=this.$getClassByType(a.type),/(left|right|center)/i.test(a.type)&&(a.appendStyle='style="text-align:'.concat(a.type,';"')),a.title=hs(r='
    ')).call(r,a.title,"
    ");var o=function(t){var e,r;if(""===mh(t).call(t))return"";var a=n(t).html,o="p";return new RegExp("<(".concat(PA,")[^>]*>"),"i").test(a)&&(o="div"),hs(e=hs(r="<".concat(o,">")).call(r,i.$cleanParagraph(a),"")},s="";return s=this.isContainsCache(a.body)?this.makeExcludingCached(a.body,o):o(a.body),a.body='
    '.concat(s,"
    "),a}},{key:"$getTitle",value:function(t){var e=mh(t).call(t);return/\s/.test(e)?e.replace(/[^\s]+\s/,""):""}},{key:"$getTargetType",value:function(t){var e=/\s/.test(mh(t).call(t))?mh(t).call(t).replace(/\s.*$/,""):t;switch(mh(e).call(e).toLowerCase()){case"primary":case"p":default:return"primary";case"info":case"i":return"info";case"warning":case"w":return"warning";case"danger":case"d":return"danger";case"success":case"s":return"success";case"right":case"r":return"right";case"center":case"c":return"center";case"left":case"l":return"left"}}},{key:"rule",value:function(){return Od()}}])}(VA);function dy(t,e,n){return e=es(e),Ko(t,Ay()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Ay(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Ay=function(){return!!t})()}cs(fy,"HOOK_NAME","panel");var gy=function(t){function e(){return ra(this,e),dy(this,e,[{needCache:!0}])}return ss(e,t),Ho(e,[{key:"makeHtml",value:function(t,e){var n=this;return t.replace(this.RULE.reg,(function(t,r,i,a,o){var s,c,l,u=n.getLineCount(t,r),h=n.$engine.md5(t),f=n.testHasCache(h);if(!1!==f)return uA(t,f);var d=n.$getDetailInfo(i,a,o,e),A=d.type,g=d.html;return uA(t,n.pushCache(hs(s=hs(c=hs(l='
    ')).call(s,g,"
    "),h,u))}))}},{key:"$getDetailInfo",value:function(t,e,n,r){var i=this,a=/\n\s*(\+\+|\+\+-)\s*[^\n]+\n/.test(n)?"multiple":"single",o=n.split(/\n\s*(\+\+[-]{0,1}\s*[^\n]+)\n/),s="-"===t,c=e,l="";return"multiple"===a?Qs(o).call(o,(function(t){if(/^\s*\+\+/.test(t))return s=/^\s*\+\+-/.test(t),c=t.replace(/\+\+[-]{0,1}\s*([^\n]+)$/,"$1"),!0;l+=i.$getDetailHtml(s,c,t,r)})):l=this.$getDetailHtml(s,c,n,r),{type:a,html:l}}},{key:"$getDetailHtml",value:function(t,e,n,r){var i=this,a="
    "),o=function(t){var e,n;if(""===mh(t).call(t))return"";var a=r(t).html,o="p";return new RegExp("<(".concat(PA,")[^>]*>"),"i").test(a)&&(o="div"),hs(e=hs(n="<".concat(o,">")).call(n,i.$cleanParagraph(a),"")};a+="".concat(r(e).html,"");var s="";return s=this.isContainsCache(n)?this.makeExcludingCached(n,o):o(n),a+='
    '.concat(s,"
    "),a+="
    "}},{key:"rule",value:function(){return Dd()}}])}(VA);function py(t,e,n){return e=es(e),Ko(t,my()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function my(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(my=function(){return!!t})()}cs(gy,"HOOK_NAME","detail");var by=function(t){function e(t){return ra(this,e),py(this,e,[{needCache:!0}])}return ss(e,t),Ho(e,[{key:"beforeMakeHtml",value:function(t){var e=this;return t.replace(this.RULE.reg,(function(t,n){var r,i,a,o,s=null!==(r=null===(i=t.match(/\n/g))||void 0===i?void 0:i.length)&&void 0!==r?r:0,c="fontMatter".concat(s);n.replace(/(?:^|\n)\s*(font-size|fontSize): ([0-9a-zA-Z]+)(\n|$)/,(function(t,n,r){return e.$engine.$cherry.previewer.getDom().style.fontSize=r,t}));var l=/^\s*{/.test(n)?n.replace(/\n/g,""):n.replace(/\n/g,";"),u=hs(a=hs(o='

    '),h=e.pushCache(u,c,s);return"".concat(h,"\n")}))}},{key:"makeHtml",value:function(t,e){return t}},{key:"rule",value:function(){var t={begin:"^\\s*-{3,}[^\\n]*\\n",end:"\\n-{3,}[^\\n]*\\n",content:"([\\s\\S]+?)"};return t.reg=md(t,"g",!0),t}}])}(VA);cs(by,"HOOK_NAME","frontMatter");var vy=[by,Jp,em,Mb,Fb,cv,Vb,Yb,Fm,nb,Jm,Cb,zb,Mm,ab,yb,gy,fy,ym,gv,hb,Am,Tb,mm,Mp,Sp,Fp,Gp,jp,ly,Up,bv,wv,ay],yy=function(){return Ho((function t(e,n){ra(this,t),this.$cherry=n,na(this,"_cherry",{get:function(){return id.warn("`_engine._cherry` is deprecated. Use `$engine.$cherry` instead."),this.$cherry}}),this.initMath(e),this.$configInit(e),this.hookCenter=new yp(vy,e,n),this.hooks=this.hookCenter.getHookList(),this.md5Cache={},this.md5StrMap={},this.cachedBigData={},this.markdownParams=e,this.currentStrMd5=[],this.globalConfig=e.engine.global,this.htmlWhiteListAppend=this.globalConfig.htmlWhiteList}),[{key:"initMath",value:function(t){var e=t.externals,n=t.engine.syntax,r=n.mathBlock.plugins;if(Zm()&&(n.mathBlock.src||n.inlineMath.src||n.mathBlock.engine||n.inlineMath.engine)&&!e.MathJax&&!window.MathJax){!function(t){if(Zm()){var e=t?["input/asciimath","[tex]/noerrors","[tex]/cancel","[tex]/color","[tex]/boldsymbol","ui/safe"]:["ui/safe"];window.MathJax={startup:{elements:[".Cherry-Math",".Cherry-InlineMath"],typeset:!0},tex:{inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],tags:"ams",packages:{"[+]":["noerrors","cancel","color"]},macros:{bm:["{\\boldsymbol{#1}}",1]}},options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","a"],ignoreHtmlClass:"tex2jax_ignore",processHtmlClass:"tex2jax_process",enableMenu:!1},loader:{load:e}}}}(r);var i=document.createElement("script");i.src=n.mathBlock.src?n.mathBlock.src:n.inlineMath.src,i.async=!0,i.src&&document.head.appendChild(i)}}},{key:"$configInit",value:function(t){if(t.hooksConfig&&hp(t.hooksConfig.hooksList,Array))for(var e=0;e>>0:a>>>0;(s=i.exec(e))&&!((c=s.index+s[0].length)>f&&(u.push(e.slice(f,s.index)),!r&&s.length>1&&s[0].replace(o,(function(){for(var e=1;e1&&s.index=a));)i.lastIndex===s.index&&i.lastIndex++;return f===e.length?!l&&i.test("")||u.push(""):u.push(e.slice(f)),u.length>a?u.slice(0,a):u},e}(),Py=/([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/,Ry=/^\.|#/,Qy=function(t,e){if(!t)return"DIV";var n,r,i,a,o=!e.hasOwnProperty("id"),s=Ny(t,Py),c=null;Ry.test(s[1])&&(c="DIV");for(a=0;a=i.length?e.length:i[c],g=0;g=A&&s.push(p)}for(var m,b=s.slice(),v=0,y=[],w=[],k=0;kl?c:l,h=0;h=e&&i<=n;if(in))return!0;o=r-1}}return!1}function Iw(t,e){return t>e?1:-1}var Mw=function(t,e){if(Ty(t)&&Ty(e))return"name"in t&&"name"in e?t.id===e.id:t.init===e.init;return!1};var Ow=function(t,e,n){var r=t.type,i=t.vNode,a=t.patch;switch(r){case tw.REMOVE:return function(t,e){var n=t.parentNode;n&&n.removeChild(t);return Dw(t,e),null}(e,i);case tw.INSERT:return function(t,e,n){var r=n.render(e,n);t&&t.appendChild(r);return t}(e,a,n);case tw.VTEXT:return function(t,e,n,r){var i;if(3===t.nodeType)t.replaceData(0,t.length,n.text),i=t;else{var a=t.parentNode;i=r.render(n,r),a&&i!==t&&a.replaceChild(i,t)}return i}(e,0,a,n);case tw.WIDGET:return function(t,e,n,r){var i,a=Mw(e,n);i=a?n.update(e,t)||t:r.render(n,r);var o=t.parentNode;o&&i!==t&&o.replaceChild(i,t);a||Dw(t,e);return i}(e,i,a,n);case tw.VNODE:return function(t,e,n,r){var i=t.parentNode,a=r.render(n,r);i&&a!==t&&i.replaceChild(a,t);return a}(e,0,a,n);case tw.ORDER:return function(t,e){for(var n,r,i,a=t.childNodes,o={},s=0;s=c++?null:a[i.to])}(e,a),e;case tw.PROPS:return kw(e,a,i.properties),e;case tw.THUNK:return function(t,e){t&&e&&t!==e&&t.parentNode&&t.parentNode.replaceChild(e,t);return e}(e,n.patch(e,a,n));default:return e}};function Dw(t,e){"function"==typeof e.destroy&&Ty(e)&&e.destroy(t)}var Fw=function t(e,n,r){return(r=r||{}).patch=r.patch&&r.patch!==t?r.patch:Nw,r.render=r.render||Tw,r.patch(e,n,r)};function Nw(t,e,n){var r=function(t){var e=[];for(var n in t)"a"!==n&&e.push(Number(n));return e}(e);if(0===r.length)return t;var i=_w(t,e.a,r),a=t.ownerDocument;n.document||a===ww||(n.document=a);for(var o=0;o=r&&A>=n)return o[s]=c,this.$backtraceSnakes(o,n,r,s)}o[s]=c}return[]}},{key:"$backtraceSnakes",value:function(t,e,n,r){for(var i=[],a={x:n,y:e},o=r;o>0;o--){var s=t[o],c=t[o-1],l=a.x-a.y,u=s[l],h=l===-o||l!==o&&c[l+1]>c[l-1],f=h?l+1:l-1,d=c[f],A=d-f,g=h?d:d+1;i.unshift({xStart:d,xMid:g,xEnd:u}),a.x=d,a.y=A}return i}},{key:"assembleResult",value:function(t,e,n){var r,i=this,a="color: gray",o="",s=[],c=0,l=[],u={},h={},f={};return Qs(t).call(t,(function(t,r){var d=t.xStart;if(0===r&&0!==t.xStart)for(var A=0;A0;)t[i]=t[--i];i!==a++&&(t[i]=r)}else for(var o=jw(n/2),s=Kw(Te(t,0,o),e),c=Kw(Te(t,o),e),l=s.length,u=c.length,h=0,f=0;h=e.length)return t.target=void 0,Ya(void 0,!0);var r=e[n];switch(t.kind){case"keys":return Ya(r.key,!1);case"values":return Ya(r.value,!1)}return Ya([r.key,r.value],!1)}),!0),Bk=function(t){this.entries=[],this.url=null,void 0!==t&&(ft(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===lk(t,0)?pk(t,1):t:xr(t)))};Bk.prototype={type:Ww,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,n,r,i,a,o,s,c=this.entries,l=kh(t);if(l)for(n=(e=Th(t,l)).next;!(r=ht(n,e)).done;){if(a=(i=Th(ue(r.value))).next,(o=ht(a,i)).done||(s=ht(a,i)).done||!ht(a,i).done)throw new ok("Expected sequence with length 2");hk(c,{key:xr(o.value),value:xr(s.value)})}else for(var u in t)Bt(t,u)&&hk(c,{key:u,value:xr(t[u])})},parseQuery:function(t){if(t)for(var e,n,r=this.entries,i=gk(t,"&"),a=0;a0?arguments[0]:void 0));$t||(this.size=t.entries.length)},Sk=_k.prototype;if(Ag(Sk,{append:function(t,e){var n=Jw(this);ps(arguments.length,2),hk(n.entries,{key:xr(t),value:xr(e)}),$t||this.length++,n.updateURL()},delete:function(t){for(var e=Jw(this),n=ps(arguments.length,1),r=e.entries,i=xr(t),a=n<2?void 0:arguments[1],o=void 0===a?a:xr(a),s=0;se.key?1:-1})),t.updateURL()},forEach:function(t){for(var e,n=Jw(this).entries,r=ke(t,arguments.length>1?arguments[1]:void 0),i=0;i1?Mk(arguments[1]):{})}}),$(ek)){var Ok=function(t){return cg(this,rk),new ek(t,arguments.length>1?Mk(arguments[1]):{})};rk.constructor=Ok,Ok.prototype=rk,Dn({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ok})}}var Dk,Fk={URLSearchParams:_k,getState:Jw},Nk=2147483647,Pk=/[^\0-\u007E]/,Rk=/[.\u3002\uFF0E\uFF61]/g,Qk="Overflow: input needs wider integers to process",Uk=RangeError,$k=w(Rk.exec),Hk=Math.floor,jk=String.fromCharCode,Kk=w("".charCodeAt),zk=w([].join),Gk=w([].push),Xk=w("".replace),Vk=w("".split),Wk=w("".toLowerCase),qk=function(t){return t+22+75*(t<26)},Yk=function(t,e,n){var r=0;for(t=n?Hk(t/700):t>>1,t+=Hk(t/e);t>455;)t=Hk(t/35),r+=36;return Hk(r+36*t/(t+38))},Jk=function(t){var e=[];t=function(t){for(var e=[],n=0,r=t.length;n=55296&&i<=56319&&n=a&&rHk((Nk-o)/h))throw new Uk(Qk);for(o+=(u-a)*h,a=u,n=0;nNk)throw new Uk(Qk);if(r===a){for(var f=o,d=36;;){var A=d<=s?1:d>=s+26?26:d-s;if(f?@[\\\]^|]/,OC=/[\0\t\n\r #/:<>?@[\\\]^|]/,DC=/^[\u0000-\u0020]+/,FC=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,NC=/[\t\n\r]/g,PC=function(t){var e,n,r,i;if("number"==typeof t){for(e=[],n=0;n<4;n++)wC(e,t%256),t=cC(t/256);return fC(e,".")}if("object"==typeof t){for(e="",r=function(t){for(var e=null,n=1,r=null,i=0,a=0;a<8;a++)0!==t[a]?(i>n&&(e=r,n=i),r=null,i=0):(null===r&&(r=a),++i);return i>n&&(e=r,n=i),e}(t),n=0;n<8;n++)i&&0===t[n]||(i&&(i=!1),r===n?(e+=n?":":"::",i=!0):(e+=dC(t[n],16),n<7&&(e+=":")));return"["+e+"]"}return t},RC={},QC=Bs({},RC,{" ":1,'"':1,"<":1,">":1,"`":1}),UC=Bs({},QC,{"#":1,"?":1,"{":1,"}":1}),$C=Bs({},UC,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),HC=function(t,e){var n=tC(t,0);return n>32&&n<127&&!Bt(e,t)?t:encodeURIComponent(t)},jC={ftp:21,file:null,http:80,https:443,ws:80,wss:443},KC=function(t,e){var n;return 2===t.length&&hC(EC,uC(t,0))&&(":"===(n=uC(t,1))||!e&&"|"===n)},zC=function(t){var e;return t.length>1&&KC(vC(t,0,2))&&(2===t.length||"/"===(e=uC(t,2))||"\\"===e||"?"===e||"#"===e)},GC=function(t){return"."===t||"%2e"===yC(t)},XC={},VC={},WC={},qC={},YC={},JC={},ZC={},tx={},ex={},nx={},rx={},ix={},ax={},ox={},sx={},cx={},lx={},ux={},hx={},fx={},dx={},Ax=function(t,e,n){var r,i,a,o=xr(t);if(e){if(i=this.parse(o))throw new oC(i);this.searchParams=null}else{if(void 0!==n&&(r=new Ax(n,!0)),i=this.parse(o,null,r))throw new oC(i);(a=iC(new rC)).bindURL(this),this.searchParams=a}};Ax.prototype={type:"URL",parse:function(t,e,n){var r,i,a,o,s,c=this,l=e||XC,u=0,h="",f=!1,d=!1,A=!1;for(t=xr(t),e||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,t=pC(t,DC,""),t=pC(t,FC,"$1")),t=pC(t,NC,""),r=Mh(t);u<=r.length;){switch(i=r[u],l){case XC:if(!i||!hC(EC,i)){if(e)return kC;l=WC;continue}h+=yC(i),l=VC;break;case VC:if(i&&(hC(TC,i)||"+"===i||"-"===i||"."===i))h+=yC(i);else{if(":"!==i){if(e)return kC;h="",l=WC,u=0;continue}if(e&&(c.isSpecial()!==Bt(jC,h)||"file"===h&&(c.includesCredentials()||null!==c.port)||"file"===c.scheme&&!c.host))return;if(c.scheme=h,e)return void(c.isSpecial()&&jC[c.scheme]===c.port&&(c.port=null));h="","file"===c.scheme?l=ox:c.isSpecial()&&n&&n.scheme===c.scheme?l=qC:c.isSpecial()?l=tx:"/"===r[u+1]?(l=YC,u++):(c.cannotBeABaseURL=!0,gC(c.path,""),l=hx)}break;case WC:if(!n||n.cannotBeABaseURL&&"#"!==i)return kC;if(n.cannotBeABaseURL&&"#"===i){c.scheme=n.scheme,c.path=Te(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=dx;break}l="file"===n.scheme?ox:JC;continue;case qC:if("/"!==i||"/"!==r[u+1]){l=JC;continue}l=ex,u++;break;case YC:if("/"===i){l=nx;break}l=ux;continue;case JC:if(c.scheme=n.scheme,i===Dk)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Te(n.path),c.query=n.query;else if("/"===i||"\\"===i&&c.isSpecial())l=ZC;else if("?"===i)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Te(n.path),c.query="",l=fx;else{if("#"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Te(n.path),c.path.length--,l=ux;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Te(n.path),c.query=n.query,c.fragment="",l=dx}break;case ZC:if(!c.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=ux;continue}l=nx}else l=ex;break;case tx:if(l=ex,"/"!==i||"/"!==uC(h,u+1))continue;u++;break;case ex:if("/"!==i&&"\\"!==i){l=nx;continue}break;case nx:if("@"===i){f&&(h="%40"+h),f=!0,a=Mh(h);for(var g=0;g65535)return xC;c.port=c.isSpecial()&&b===jC[c.scheme]?null:b,h=""}if(e)return;l=lx;continue}return xC}h+=i;break;case ox:if(c.scheme="file","/"===i||"\\"===i)l=sx;else{if(!n||"file"!==n.scheme){l=ux;continue}switch(i){case Dk:c.host=n.host,c.path=Te(n.path),c.query=n.query;break;case"?":c.host=n.host,c.path=Te(n.path),c.query="",l=fx;break;case"#":c.host=n.host,c.path=Te(n.path),c.query=n.query,c.fragment="",l=dx;break;default:zC(fC(Te(r,u),""))||(c.host=n.host,c.path=Te(n.path),c.shortenPath()),l=ux;continue}}break;case sx:if("/"===i||"\\"===i){l=cx;break}n&&"file"===n.scheme&&!zC(fC(Te(r,u),""))&&(KC(n.path[0],!0)?gC(c.path,n.path[0]):c.host=n.host),l=ux;continue;case cx:if(i===Dk||"/"===i||"\\"===i||"?"===i||"#"===i){if(!e&&KC(h))l=ux;else if(""===h){if(c.host="",e)return;l=lx}else{if(o=c.parseHost(h))return o;if("localhost"===c.host&&(c.host=""),e)return;h="",l=lx}continue}h+=i;break;case lx:if(c.isSpecial()){if(l=ux,"/"!==i&&"\\"!==i)continue}else if(e||"?"!==i)if(e||"#"!==i){if(i!==Dk&&(l=ux,"/"!==i))continue}else c.fragment="",l=dx;else c.query="",l=fx;break;case ux:if(i===Dk||"/"===i||"\\"===i&&c.isSpecial()||!e&&("?"===i||"#"===i)){if(".."===(s=yC(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"===i||"\\"===i&&c.isSpecial()||gC(c.path,"")):GC(h)?"/"===i||"\\"===i&&c.isSpecial()||gC(c.path,""):("file"===c.scheme&&!c.path.length&&KC(h)&&(c.host&&(c.host=""),h=uC(h,0)+":"),gC(c.path,h)),h="","file"===c.scheme&&(i===Dk||"?"===i||"#"===i))for(;c.path.length>1&&""===c.path[0];)mC(c.path);"?"===i?(c.query="",l=fx):"#"===i&&(c.fragment="",l=dx)}else h+=HC(i,UC);break;case hx:"?"===i?(c.query="",l=fx):"#"===i?(c.fragment="",l=dx):i!==Dk&&(c.path[0]+=HC(i,RC));break;case fx:e||"#"!==i?i!==Dk&&("'"===i&&c.isSpecial()?c.query+="%27":c.query+="#"===i?"%23":HC(i,RC)):(c.fragment="",l=dx);break;case dx:i!==Dk&&(c.fragment+=HC(i,QC))}u++}},parseHost:function(t){var e,n,r;if("["===uC(t,0)){if("]"!==uC(t,t.length-1))return CC;if(e=function(t){var e,n,r,i,a,o,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,h=0,f=function(){return uC(t,h)};if(":"===f()){if(":"!==uC(t,1))return;h+=2,u=++l}for(;f();){if(8===l)return;if(":"!==f()){for(e=n=0;n<4&&hC(IC,f());)e=16*e+sC(f(),16),h++,n++;if("."===f()){if(0===n)return;if(h-=n,l>6)return;for(r=0;f();){if(i=null,r>0){if(!("."===f()&&r<4))return;h++}if(!hC(BC,f()))return;for(;hC(BC,f());){if(a=sC(f(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}c[l]=256*c[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;c[l++]=e}else{if(null!==u)return;h++,u=++l}}if(null!==u)for(o=l-u,l=7;0!==l&&o>0;)s=c[l],c[l--]=c[u+o-1],c[u+--o]=s;else if(8!==l)return;return c}(vC(t,1,-1)),!e)return CC;this.host=e}else if(this.isSpecial()){if(t=Zk(t),hC(MC,t))return CC;if(e=function(t){var e,n,r,i,a,o,s,c=bC(t,".");if(c.length&&""===c[c.length-1]&&c.length--,(e=c.length)>4)return t;for(n=[],r=0;r1&&"0"===uC(i,0)&&(a=hC(_C,i)?16:8,i=vC(i,8===a?1:2)),""===i)o=0;else{if(!hC(10===a?LC:8===a?SC:IC,i))return t;o=sC(i,a)}gC(n,o)}for(r=0;r=lC(256,5-e))return null}else if(o>255)return null;for(s=AC(n),r=0;r1?arguments[1]:void 0,r=eC(e,new Ax(t,!1,n));$t||(e.href=r.serialize(),e.origin=r.getOrigin(),e.protocol=r.getProtocol(),e.username=r.getUsername(),e.password=r.getPassword(),e.host=r.getHost(),e.hostname=r.getHostname(),e.port=r.getPort(),e.pathname=r.getPathname(),e.search=r.getSearch(),e.searchParams=r.getSearchParams(),e.hash=r.getHash())},px=gx.prototype,mx=function(t,e){return{get:function(){return nC(this)[t]()},set:e&&function(t){return nC(this)[e](t)},configurable:!0,enumerable:!0}};if($t&&(Br(px,"href",mx("serialize","setHref")),Br(px,"origin",mx("getOrigin")),Br(px,"protocol",mx("getProtocol","setProtocol")),Br(px,"username",mx("getUsername","setUsername")),Br(px,"password",mx("getPassword","setPassword")),Br(px,"host",mx("getHost","setHost")),Br(px,"hostname",mx("getHostname","setHostname")),Br(px,"port",mx("getPort","setPort")),Br(px,"pathname",mx("getPathname","setPathname")),Br(px,"search",mx("getSearch","setSearch")),Br(px,"searchParams",mx("getSearchParams")),Br(px,"hash",mx("getHash","setHash"))),ir(px,"toJSON",(function(){return nC(this).serialize()}),{enumerable:!0}),ir(px,"toString",(function(){return nC(this).serialize()}),{enumerable:!0}),aC){var bx=aC.createObjectURL,vx=aC.revokeObjectURL;bx&&ir(gx,"createObjectURL",ke(bx,aC)),vx&&ir(gx,"revokeObjectURL",ke(vx,aC))}Lr(gx,"URL"),Dn({global:!0,constructor:!0,forced:!Gw,sham:!$t},{URL:gx});var yx=nt("URL"),wx=Gw&&u((function(){yx.canParse()})),kx=u((function(){return 1!==yx.canParse.length}));Dn({target:"URL",stat:!0,forced:!wx||kx},{canParse:function(t){var e=ps(arguments.length,1),n=xr(t),r=e<2||void 0===arguments[1]?void 0:xr(arguments[1]);try{return!!new yx(n,r)}catch(t){return!1}}});var Cx=nt("URL");Dn({target:"URL",stat:!0,forced:!Gw},{parse:function(t){var e=ps(arguments.length,1),n=xr(t),r=e<2||void 0===arguments[1]?void 0:xr(arguments[1]);try{return new Cx(n,r)}catch(t){return null}}});var xx=H.URL,Ex=r((function(t,e){t.exports=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=55296&&i<=56319&&n>10),o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f="undefined"==typeof Uint8Array?[]:new Uint8Array(256),d=0;d>4,u[c++]=(15&r)<<4|i>>2,u[c++]=(3&i)<<6|63&a;return l},b=function(t){for(var e=t.length,n=[],r=0;r>y,x=(1<>y)+32,T=65536>>w,B=(1<=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>y])<>y)])<>w),e=this.index[e],e+=t>>y&B,e=((e=this.index[e])<F?(i.push(!0),o-=F):i.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(t))return r.push(a),n.push(q);if(o===Q||o===z){if(0===a)return r.push(a),n.push(ut);var s=n[a-1];return-1===Ot.indexOf(s)?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(ut))}return r.push(a),o===ht?n.push("strict"===e?et:mt):o===kt||o===lt?n.push(ut):o===Ct?t>=131072&&t<=196605||t>=196608&&t<=262141?n.push(mt):n.push(ut):void n.push(o)})),[r,n,i]},Pt=function(t,e,n,r){var i=r[n];if(Array.isArray(t)?-1!==t.indexOf(i):t===i)for(var a=n;a<=r.length;){if((c=r[++a])===e)return!0;if(c!==K)break}if(i===K)for(a=n;a>0;){var o=r[--a];if(Array.isArray(t)?-1!==t.indexOf(o):t===o)for(var s=n;s<=r.length;){var c;if((c=r[++s])===e)return!0;if(c!==K)break}if(o!==K)break}return!1},Rt=function(t,e){for(var n=t;n>=0;){var r=e[n];if(r!==K)return r;n--}return 0},Qt=function(t,e,n,r,i){if(0===n[r])return Tt;var a=r-1;if(Array.isArray(i)&&!0===i[a])return Tt;var o=a-1,s=a+1,c=e[a],l=o>=0?e[o]:0,u=e[s];if(c===P&&u===R)return Tt;if(-1!==Lt.indexOf(c))return Et;if(-1!==Lt.indexOf(u))return Tt;if(-1!==It.indexOf(u))return Tt;if(Rt(a,e)===H)return Bt;if(_t.get(t[a])===z)return Tt;if((c===ft||c===dt)&&_t.get(t[s])===z)return Tt;if(c===$||u===$)return Tt;if(c===j)return Tt;if(-1===[K,X,W].indexOf(c)&&u===j)return Tt;if(-1!==[Y,J,Z,it,ct].indexOf(u))return Tt;if(Rt(a,e)===nt)return Tt;if(Pt(rt,nt,a,e))return Tt;if(Pt([Y,J],et,a,e))return Tt;if(Pt(G,G,a,e))return Tt;if(c===K)return Bt;if(c===rt||u===rt)return Tt;if(u===q||c===q)return Bt;if(-1!==[X,W,et].indexOf(u)||c===V)return Tt;if(l===pt&&-1!==Ft.indexOf(c))return Tt;if(c===ct&&u===pt)return Tt;if(u===tt)return Tt;if(-1!==St.indexOf(u)&&c===at||-1!==St.indexOf(c)&&u===at)return Tt;if(c===st&&-1!==[mt,ft,dt].indexOf(u)||-1!==[mt,ft,dt].indexOf(c)&&u===ot)return Tt;if(-1!==St.indexOf(c)&&-1!==Mt.indexOf(u)||-1!==Mt.indexOf(c)&&-1!==St.indexOf(u))return Tt;if(-1!==[st,ot].indexOf(c)&&(u===at||-1!==[nt,W].indexOf(u)&&e[s+1]===at)||-1!==[nt,W].indexOf(c)&&u===at||c===at&&-1!==[at,ct,it].indexOf(u))return Tt;if(-1!==[at,ct,it,Y,J].indexOf(u))for(var h=a;h>=0;){if((f=e[h])===at)return Tt;if(-1===[ct,it].indexOf(f))break;h--}if(-1!==[st,ot].indexOf(u))for(h=-1!==[Y,J].indexOf(c)?o:a;h>=0;){var f;if((f=e[h])===at)return Tt;if(-1===[ct,it].indexOf(f))break;h--}if(bt===c&&-1!==[bt,vt,At,gt].indexOf(u)||-1!==[vt,At].indexOf(c)&&-1!==[vt,yt].indexOf(u)||-1!==[yt,gt].indexOf(c)&&u===yt)return Tt;if(-1!==Dt.indexOf(c)&&-1!==[tt,ot].indexOf(u)||-1!==Dt.indexOf(u)&&c===st)return Tt;if(-1!==St.indexOf(c)&&-1!==St.indexOf(u))return Tt;if(c===it&&-1!==St.indexOf(u))return Tt;if(-1!==St.concat(at).indexOf(c)&&u===nt&&-1===xt.indexOf(t[s])||-1!==St.concat(at).indexOf(u)&&c===J)return Tt;if(c===wt&&u===wt){for(var d=n[a],A=1;d>0&&e[--d]===wt;)A++;if(A%2!=0)return Tt}return c===ft&&u===dt?Tt:Bt},Ut=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var n=Nt(t,e.lineBreak),r=n[0],i=n[1],a=n[2];"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(i=i.map((function(t){return-1!==[at,ut,kt].indexOf(t)?mt:t})));var o="keep-all"===e.wordBreak?a.map((function(e,n){return e&&t[n]>=19968&&t[n]<=40959})):void 0;return[r,i,o]},$t=function(){function t(t,e,n,r){this.codePoints=t,this.required=e===Et,this.start=n,this.end=r}return t.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},t}(),Ht=function(t,e){var n=l(t),r=Ut(n,e),i=r[0],a=r[1],o=r[2],s=n.length,c=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var t=Tt;u=Fe&&t<=57},Xe=function(t){return t>=55296&&t<=57343},Ve=function(t){return Ge(t)||t>=$e&&t<=je||t>=Ne&&t<=Re},We=function(t){return t>=Ne&&t<=Ue},qe=function(t){return t>=$e&&t<=ze},Ye=function(t){return We(t)||qe(t)},Je=function(t){return t>=ye},Ze=function(t){return t===Xt||t===qt||t===Yt},tn=function(t){return Ye(t)||Je(t)||t===oe},en=function(t){return tn(t)||Ge(t)||t===se},nn=function(t){return t>=_e&&t<=Se||t===Le||t>=Ie&&t<=Me||t===Oe},rn=function(t,e){return t===Wt&&e!==Xt},an=function(t,e,n){return t===se?tn(e)||rn(e,n):!!tn(t)||!(t!==Wt||!rn(t,e))},on=function(t,e,n){return t===Ce||t===se?!!Ge(e)||e===Be&&Ge(n):Ge(t===Be?e:t)},sn=function(t){var e=0,n=1;t[e]!==Ce&&t[e]!==se||(t[e]===se&&(n=-1),e++);for(var r=[];Ge(t[e]);)r.push(t[e++]);var i=r.length?parseInt(u.apply(void 0,r),10):0;t[e]===Be&&e++;for(var a=[];Ge(t[e]);)a.push(t[e++]);var o=a.length,s=o?parseInt(u.apply(void 0,a),10):0;t[e]!==He&&t[e]!==Pe||e++;var c=1;t[e]!==Ce&&t[e]!==se||(t[e]===se&&(c=-1),e++);for(var l=[];Ge(t[e]);)l.push(t[e++]);var h=l.length?parseInt(u.apply(void 0,l),10):0;return n*(i+s*Math.pow(10,-o))*Math.pow(10,c*h)},cn={type:2},ln={type:3},un={type:4},hn={type:13},fn={type:8},dn={type:21},An={type:9},gn={type:10},pn={type:11},mn={type:12},bn={type:14},vn={type:23},yn={type:1},wn={type:25},kn={type:24},Cn={type:26},xn={type:27},En={type:28},Tn={type:29},Bn={type:31},_n={type:32},Sn=function(){function t(){this._value=[]}return t.prototype.write=function(t){this._value=this._value.concat(l(t))},t.prototype.read=function(){for(var t=[],e=this.consumeToken();e!==_n;)t.push(e),e=this.consumeToken();return t},t.prototype.consumeToken=function(){var t=this.consumeCodePoint();switch(t){case Jt:return this.consumeStringToken(Jt);case te:var e=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(en(e)||rn(n,r)){var i=an(e,n,r)?Kt:jt;return{type:5,value:this.consumeName(),flags:i}}break;case ee:if(this.peekCodePoint(0)===Zt)return this.consumeCodePoint(),hn;break;case re:return this.consumeStringToken(re);case ie:return cn;case ae:return ln;case ke:if(this.peekCodePoint(0)===Zt)return this.consumeCodePoint(),bn;break;case Ce:if(on(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case xe:return un;case se:var a=t,o=this.peekCodePoint(0),s=this.peekCodePoint(1);if(on(a,o,s))return this.reconsumeCodePoint(t),this.consumeNumericToken();if(an(a,o,s))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();if(o===se&&s===ue)return this.consumeCodePoint(),this.consumeCodePoint(),kn;break;case Be:if(on(t,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(t),this.consumeNumericToken();break;case Vt:if(this.peekCodePoint(0)===ke)for(this.consumeCodePoint();;){var c=this.consumeCodePoint();if(c===ke&&(c=this.consumeCodePoint())===Vt)return this.consumeToken();if(c===De)return this.consumeToken()}break;case Ee:return Cn;case Te:return xn;case le:if(this.peekCodePoint(0)===ce&&this.peekCodePoint(1)===se&&this.peekCodePoint(2)===se)return this.consumeCodePoint(),this.consumeCodePoint(),wn;break;case he:var l=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(an(l,h,f))return{type:7,value:this.consumeName()};break;case fe:return En;case Wt:if(rn(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),this.consumeIdentLikeToken();break;case de:return Tn;case Ae:if(this.peekCodePoint(0)===Zt)return this.consumeCodePoint(),fn;break;case ge:return pn;case me:return mn;case Qe:case Ke:var d=this.peekCodePoint(0),A=this.peekCodePoint(1);return d!==Ce||!Ve(A)&&A!==pe||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(t),this.consumeIdentLikeToken();case be:if(this.peekCodePoint(0)===Zt)return this.consumeCodePoint(),An;if(this.peekCodePoint(0)===be)return this.consumeCodePoint(),dn;break;case ve:if(this.peekCodePoint(0)===Zt)return this.consumeCodePoint(),gn;break;case De:return _n}return Ze(t)?(this.consumeWhiteSpace(),Bn):Ge(t)?(this.reconsumeCodePoint(t),this.consumeNumericToken()):tn(t)?(this.reconsumeCodePoint(t),this.consumeIdentLikeToken()):{type:6,value:u(t)}},t.prototype.consumeCodePoint=function(){var t=this._value.shift();return void 0===t?-1:t},t.prototype.reconsumeCodePoint=function(t){this._value.unshift(t)},t.prototype.peekCodePoint=function(t){return t>=this._value.length?-1:this._value[t]},t.prototype.consumeUnicodeRangeToken=function(){for(var t=[],e=this.consumeCodePoint();Ve(e)&&t.length<6;)t.push(e),e=this.consumeCodePoint();for(var n=!1;e===pe&&t.length<6;)t.push(e),e=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(u.apply(void 0,t.map((function(t){return t===pe?Fe:t}))),16),end:parseInt(u.apply(void 0,t.map((function(t){return t===pe?je:t}))),16)};var r=parseInt(u.apply(void 0,t),16);if(this.peekCodePoint(0)===se&&Ve(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var i=[];Ve(e)&&i.length<6;)i.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(u.apply(void 0,i),16)}}return{type:30,start:r,end:r}},t.prototype.consumeIdentLikeToken=function(){var t=this.consumeName();return"url"===t.toLowerCase()&&this.peekCodePoint(0)===ie?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===ie?(this.consumeCodePoint(),{type:19,value:t}):{type:20,value:t}},t.prototype.consumeUrlToken=function(){var t=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===De)return{type:22,value:""};var e=this.peekCodePoint(0);if(e===re||e===Jt){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===De||this.peekCodePoint(0)===ae)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),vn)}for(;;){var r=this.consumeCodePoint();if(r===De||r===ae)return{type:22,value:u.apply(void 0,t)};if(Ze(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===De||this.peekCodePoint(0)===ae?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,t)}):(this.consumeBadUrlRemnants(),vn);if(r===Jt||r===re||r===ie||nn(r))return this.consumeBadUrlRemnants(),vn;if(r===Wt){if(!rn(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),vn;t.push(this.consumeEscapedCodePoint())}else t.push(r)}},t.prototype.consumeWhiteSpace=function(){for(;Ze(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var t=this.consumeCodePoint();if(t===ae||t===De)return;rn(t,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(t){for(var e=5e4,n="";t>0;){var r=Math.min(e,t);n+=u.apply(void 0,this._value.splice(0,r)),t-=r}return this._value.shift(),n},t.prototype.consumeStringToken=function(t){for(var e="",n=0;;){var r=this._value[n];if(r===De||void 0===r||r===t)return{type:0,value:e+=this.consumeStringSlice(n)};if(r===Xt)return this._value.splice(0,n),yn;if(r===Wt){var i=this._value[n+1];i!==De&&void 0!==i&&(i===Xt?(e+=this.consumeStringSlice(n),n=-1,this._value.shift()):rn(r,i)&&(e+=this.consumeStringSlice(n),e+=u(this.consumeEscapedCodePoint()),n=-1))}n++}},t.prototype.consumeNumber=function(){var t=[],e=zt,n=this.peekCodePoint(0);for(n!==Ce&&n!==se||t.push(this.consumeCodePoint());Ge(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===Be&&Ge(r))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Gt;Ge(this.peekCodePoint(0));)t.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===He||n===Pe)&&((r===Ce||r===se)&&Ge(i)||Ge(r)))for(t.push(this.consumeCodePoint(),this.consumeCodePoint()),e=Gt;Ge(this.peekCodePoint(0));)t.push(this.consumeCodePoint());return[sn(t),e]},t.prototype.consumeNumericToken=function(){var t=this.consumeNumber(),e=t[0],n=t[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),a=this.peekCodePoint(2);return an(r,i,a)?{type:15,number:e,flags:n,unit:this.consumeName()}:r===ne?(this.consumeCodePoint(),{type:16,number:e,flags:n}):{type:17,number:e,flags:n}},t.prototype.consumeEscapedCodePoint=function(){var t=this.consumeCodePoint();if(Ve(t)){for(var e=u(t);Ve(this.peekCodePoint(0))&&e.length<6;)e+=u(this.consumeCodePoint());Ze(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(e,16);return 0===n||Xe(n)||n>1114111?we:n}return t===De?we:t},t.prototype.consumeName=function(){for(var t="";;){var e=this.consumeCodePoint();if(en(e))t+=u(e);else{if(!rn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),t;t+=u(this.consumeEscapedCodePoint())}}},t}(),Ln=function(){function t(t){this._tokens=t}return t.create=function(e){var n=new Sn;return n.write(e),new t(n.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var t=this.consumeToken();31===t.type;)t=this.consumeToken();if(32===t.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(t);var e=this.consumeComponentValue();do{t=this.consumeToken()}while(31===t.type);if(32===t.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var t=[];;){var e=this.consumeComponentValue();if(32===e.type)return t;t.push(e),t.push()}},t.prototype.consumeComponentValue=function(){var t=this.consumeToken();switch(t.type){case 11:case 28:case 2:return this.consumeSimpleBlock(t.type);case 19:return this.consumeFunction(t)}return t},t.prototype.consumeSimpleBlock=function(t){for(var e={type:t,values:[]},n=this.consumeToken();;){if(32===n.type||Qn(n,t))return e;this.reconsumeToken(n),e.values.push(this.consumeComponentValue()),n=this.consumeToken()}},t.prototype.consumeFunction=function(t){for(var e={name:t.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return e;this.reconsumeToken(n),e.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var t=this._tokens.shift();return void 0===t?_n:t},t.prototype.reconsumeToken=function(t){this._tokens.unshift(t)},t}(),In=function(t){return 15===t.type},Mn=function(t){return 17===t.type},On=function(t){return 20===t.type},Dn=function(t){return 0===t.type},Fn=function(t,e){return On(t)&&t.value===e},Nn=function(t){return 31!==t.type},Pn=function(t){return 31!==t.type&&4!==t.type},Rn=function(t){var e=[],n=[];return t.forEach((function(t){if(4===t.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(n),void(n=[])}31!==t.type&&n.push(t)})),n.length&&e.push(n),e},Qn=function(t,e){return 11===e&&12===t.type||28===e&&29===t.type||2===e&&3===t.type},Un=function(t){return 17===t.type||15===t.type},$n=function(t){return 16===t.type||Un(t)},Hn=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},jn={type:17,number:0,flags:zt},Kn={type:16,number:50,flags:zt},zn={type:16,number:100,flags:zt},Gn=function(t,e,n){var r=t[0],i=t[1];return[Xn(r,e),Xn(void 0!==i?i:r,n)]},Xn=function(t,e){if(16===t.type)return t.number/100*e;if(In(t))switch(t.unit){case"rem":case"em":return 16*t.number;default:return t.number}return t.number},Vn="deg",Wn="grad",qn="rad",Yn="turn",Jn={name:"angle",parse:function(t,e){if(15===e.type)switch(e.unit){case Vn:return Math.PI*e.number/180;case Wn:return Math.PI/200*e.number;case qn:return e.number;case Yn:return 2*Math.PI*e.number}throw new Error("Unsupported angle type")}},Zn=function(t){return 15===t.type&&(t.unit===Vn||t.unit===Wn||t.unit===qn||t.unit===Yn)},tr=function(t){switch(t.filter(On).map((function(t){return t.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[jn,jn];case"to top":case"bottom":return er(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[jn,zn];case"to right":case"left":return er(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[zn,zn];case"to bottom":case"top":return er(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[zn,jn];case"to left":case"right":return er(270)}return 0},er=function(t){return Math.PI*t/180},nr={name:"color",parse:function(t,e){if(18===e.type){var n=ur[e.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return n(t,e.values)}if(5===e.type){if(3===e.value.length){var r=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3);return ar(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(4===e.value.length){r=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3);var o=e.value.substring(3,4);return ar(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(6===e.value.length)return r=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6),ar(parseInt(r,16),parseInt(i,16),parseInt(a,16),1);if(8===e.value.length)return r=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6),o=e.value.substring(6,8),ar(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}if(20===e.type){var s=fr[e.value.toUpperCase()];if(void 0!==s)return s}return fr.TRANSPARENT}},rr=function(t){return!(255&t)},ir=function(t){var e=255&t,n=255&t>>8,r=255&t>>16,i=255&t>>24;return e<255?"rgba("+i+","+r+","+n+","+e/255+")":"rgb("+i+","+r+","+n+")"},ar=function(t,e,n,r){return(t<<24|e<<16|n<<8|Math.round(255*r))>>>0},or=function(t,e){if(17===t.type)return t.number;if(16===t.type){var n=3===e?1:255;return 3===e?t.number/100*n:Math.round(t.number/100*n)}return 0},sr=function(t,e){var n=e.filter(Pn);if(3===n.length){var r=n.map(or),i=r[0],a=r[1],o=r[2];return ar(i,a,o,1)}if(4===n.length){var s=n.map(or),c=(i=s[0],a=s[1],o=s[2],s[3]);return ar(i,a,o,c)}return 0};function cr(t,e,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(e-t)*n*6+t:n<.5?e:n<2/3?6*(e-t)*(2/3-n)+t:t}var lr=function(t,e){var n=e.filter(Pn),r=n[0],i=n[1],a=n[2],o=n[3],s=(17===r.type?er(r.number):Jn.parse(t,r))/(2*Math.PI),c=$n(i)?i.number/100:0,l=$n(a)?a.number/100:0,u=void 0!==o&&$n(o)?Xn(o,1):1;if(0===c)return ar(255*l,255*l,255*l,1);var h=l<=.5?l*(c+1):l+c-l*c,f=2*l-h,d=cr(f,h,s+1/3),A=cr(f,h,s),g=cr(f,h,s-1/3);return ar(255*d,255*A,255*g,u)},ur={hsl:lr,hsla:lr,rgb:sr,rgba:sr},hr=function(t,e){return nr.parse(t,Ln.create(e).parseComponentValue())},fr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},dr={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(On(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Ar={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gr=function(t,e){var n=nr.parse(t,e[0]),r=e[1];return r&&$n(r)?{color:n,stop:r}:{color:n,stop:null}},pr=function(t,e){var n=t[0],r=t[t.length-1];null===n.stop&&(n.stop=jn),null===r.stop&&(r.stop=zn);for(var i=[],a=0,o=0;oa?i.push(c):i.push(a),a=c}else i.push(null)}var l=null;for(o=0;ot.optimumDistance)?{optimumCorner:e,optimumDistance:s}:t}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},wr=function(t,e,n,r,i){var a=0,o=0;switch(t.size){case 0:0===t.shape?a=o=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-i)):1===t.shape&&(a=Math.min(Math.abs(e),Math.abs(e-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===t.shape)a=o=Math.min(vr(e,n),vr(e,n-i),vr(e-r,n),vr(e-r,n-i));else if(1===t.shape){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(e),Math.abs(e-r)),c=yr(r,i,e,n,!0),l=c[0],u=c[1];o=s*(a=vr(l-e,(u-n)/s))}break;case 1:0===t.shape?a=o=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-i)):1===t.shape&&(a=Math.max(Math.abs(e),Math.abs(e-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===t.shape)a=o=Math.max(vr(e,n),vr(e,n-i),vr(e-r,n),vr(e-r,n-i));else if(1===t.shape){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(e),Math.abs(e-r));var h=yr(r,i,e,n,!1);l=h[0],u=h[1],o=s*(a=vr(l-e,(u-n)/s))}}return Array.isArray(t.size)&&(a=Xn(t.size[0],r),o=2===t.size.length?Xn(t.size[1],i):a),[a,o]},kr=function(t,e){var n=er(180),r=[];return Rn(e).forEach((function(e,i){if(0===i){var a=e[0];if(20===a.type&&"to"===a.value)return void(n=tr(e));if(Zn(a))return void(n=Jn.parse(t,a))}var o=gr(t,e);r.push(o)})),{angle:n,stops:r,type:1}},Cr=function(t,e){var n=er(180),r=[];return Rn(e).forEach((function(e,i){if(0===i){var a=e[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value))return void(n=tr(e));if(Zn(a))return void(n=(Jn.parse(t,a)+er(270))%er(360))}var o=gr(t,e);r.push(o)})),{angle:n,stops:r,type:1}},xr=function(t,e){var n=er(180),r=[],i=1,a=0,o=3,s=[];return Rn(e).forEach((function(e,n){var a=e[0];if(0===n){if(On(a)&&"linear"===a.value)return void(i=1);if(On(a)&&"radial"===a.value)return void(i=2)}if(18===a.type)if("from"===a.name){var o=nr.parse(t,a.values[0]);r.push({stop:jn,color:o})}else if("to"===a.name)o=nr.parse(t,a.values[0]),r.push({stop:zn,color:o});else if("color-stop"===a.name){var s=a.values.filter(Pn);if(2===s.length){o=nr.parse(t,s[1]);var c=s[0];Mn(c)&&r.push({stop:{type:16,number:100*c.number,flags:c.flags},color:o})}}})),1===i?{angle:(n+er(180))%er(360),stops:r,type:i}:{size:o,shape:a,stops:r,position:s,type:i}},Er="closest-side",Tr="farthest-side",Br="closest-corner",_r="farthest-corner",Sr="circle",Lr="ellipse",Ir="cover",Mr="contain",Or=function(t,e){var n=0,r=3,i=[],a=[];return Rn(e).forEach((function(e,o){var s=!0;if(0===o){var c=!1;s=e.reduce((function(t,e){if(c)if(On(e))switch(e.value){case"center":return a.push(Kn),t;case"top":case"left":return a.push(jn),t;case"right":case"bottom":return a.push(zn),t}else($n(e)||Un(e))&&a.push(e);else if(On(e))switch(e.value){case Sr:return n=0,!1;case Lr:return n=1,!1;case"at":return c=!0,!1;case Er:return r=0,!1;case Ir:case Tr:return r=1,!1;case Mr:case Br:return r=2,!1;case _r:return r=3,!1}else if(Un(e)||$n(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return t}),s)}if(s){var l=gr(t,e);i.push(l)}})),{size:r,shape:n,stops:i,position:a,type:2}},Dr=function(t,e){var n=0,r=3,i=[],a=[];return Rn(e).forEach((function(e,o){var s=!0;if(0===o?s=e.reduce((function(t,e){if(On(e))switch(e.value){case"center":return a.push(Kn),!1;case"top":case"left":return a.push(jn),!1;case"right":case"bottom":return a.push(zn),!1}else if($n(e)||Un(e))return a.push(e),!1;return t}),s):1===o&&(s=e.reduce((function(t,e){if(On(e))switch(e.value){case Sr:return n=0,!1;case Lr:return n=1,!1;case Mr:case Er:return r=0,!1;case Tr:return r=1,!1;case Br:return r=2,!1;case Ir:case _r:return r=3,!1}else if(Un(e)||$n(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return t}),s)),s){var c=gr(t,e);i.push(c)}})),{size:r,shape:n,stops:i,position:a,type:2}},Fr=function(t){return 1===t.type},Nr=function(t){return 2===t.type},Pr={name:"image",parse:function(t,e){if(22===e.type){var n={url:e.value,type:0};return t.cache.addImage(e.value),n}if(18===e.type){var r=Ur[e.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(t,e.values)}throw new Error("Unsupported image type "+e.type)}};function Rr(t){return!(20===t.type&&"none"===t.value||18===t.type&&!Ur[t.name])}var Qr,Ur={"linear-gradient":kr,"-moz-linear-gradient":Cr,"-ms-linear-gradient":Cr,"-o-linear-gradient":Cr,"-webkit-linear-gradient":Cr,"radial-gradient":Or,"-moz-radial-gradient":Dr,"-ms-radial-gradient":Dr,"-o-radial-gradient":Dr,"-webkit-radial-gradient":Dr,"-webkit-gradient":xr},$r={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(0===e.length)return[];var n=e[0];return 20===n.type&&"none"===n.value?[]:e.filter((function(t){return Pn(t)&&Rr(t)})).map((function(e){return Pr.parse(t,e)}))}},Hr={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map((function(t){if(On(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},jr={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return Rn(e).map((function(t){return t.filter($n)})).map(Hn)}},Kr={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return Rn(e).map((function(t){return t.filter(On).map((function(t){return t.value})).join(" ")})).map(zr)}},zr=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"}(Qr||(Qr={}));var Gr,Xr={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return Rn(e).map((function(t){return t.filter(Vr)}))}},Vr=function(t){return On(t)||$n(t)},Wr=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},qr=Wr("top"),Yr=Wr("right"),Jr=Wr("bottom"),Zr=Wr("left"),ti=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(t,e){return Hn(e.filter($n))}}},ei=ti("top-left"),ni=ti("top-right"),ri=ti("bottom-right"),ii=ti("bottom-left"),ai=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(t,e){switch(e){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},oi=ai("top"),si=ai("right"),ci=ai("bottom"),li=ai("left"),ui=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return In(e)?e.number:0}}},hi=ui("top"),fi=ui("right"),di=ui("bottom"),Ai=ui("left"),gi={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pi={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){return"rtl"===e?1:0}},mi={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(On).reduce((function(t,e){return t|bi(e.value)}),0)}},bi=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},vi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},yi={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return 20===e.type&&"normal"===e.value?0:17===e.type||15===e.type?e.number:0}};!function(t){t.NORMAL="normal",t.STRICT="strict"}(Gr||(Gr={}));var wi,ki={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"strict"===e?Gr.STRICT:Gr.NORMAL}},Ci={name:"line-height",initialValue:"normal",prefix:!1,type:4},xi=function(t,e){return On(t)&&"normal"===t.value?1.2*e:17===t.type?e*t.number:$n(t)?Xn(t,e):e},Ei={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return 20===e.type&&"none"===e.value?null:Pr.parse(t,e)}},Ti={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){return"inside"===e?0:1}},Bi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},_i=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},Si=_i("top"),Li=_i("right"),Ii=_i("bottom"),Mi=_i("left"),Oi={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(On).map((function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},Di={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return"break-word"===e?"break-word":"normal"}},Fi=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Ni=Fi("top"),Pi=Fi("right"),Ri=Fi("bottom"),Qi=Fi("left"),Ui={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},$i={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Hi={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return 1===e.length&&Fn(e[0],"none")?[]:Rn(e).map((function(e){for(var n={color:fr.TRANSPARENT,offsetX:jn,offsetY:jn,blur:jn},r=0,i=0;i1?1:0],this.overflowWrap=Ca(t,Di,e.overflowWrap),this.paddingTop=Ca(t,Ni,e.paddingTop),this.paddingRight=Ca(t,Pi,e.paddingRight),this.paddingBottom=Ca(t,Ri,e.paddingBottom),this.paddingLeft=Ca(t,Qi,e.paddingLeft),this.paintOrder=Ca(t,ma,e.paintOrder),this.position=Ca(t,$i,e.position),this.textAlign=Ca(t,Ui,e.textAlign),this.textDecorationColor=Ca(t,na,null!==(n=e.textDecorationColor)&&void 0!==n?n:e.color),this.textDecorationLine=Ca(t,ra,null!==(r=e.textDecorationLine)&&void 0!==r?r:e.textDecoration),this.textShadow=Ca(t,Hi,e.textShadow),this.textTransform=Ca(t,ji,e.textTransform),this.transform=Ca(t,Ki,e.transform),this.transformOrigin=Ca(t,qi,e.transformOrigin),this.visibility=Ca(t,Yi,e.visibility),this.webkitTextStrokeColor=Ca(t,ba,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=Ca(t,va,e.webkitTextStrokeWidth),this.wordBreak=Ca(t,Ji,e.wordBreak),this.zIndex=Ca(t,Zi,e.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},t.prototype.isTransparent=function(){return rr(this.backgroundColor)},t.prototype.isTransformed=function(){return null!==this.transform},t.prototype.isPositioned=function(){return 0!==this.position},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return 0!==this.float},t.prototype.isInlineLevel=function(){return la(this.display,4)||la(this.display,33554432)||la(this.display,268435456)||la(this.display,536870912)||la(this.display,67108864)||la(this.display,134217728)},t}(),wa=function(){function t(t,e){this.content=Ca(t,ua,e.content),this.quotes=Ca(t,Aa,e.quotes)}return t}(),ka=function(){function t(t,e){this.counterIncrement=Ca(t,ha,e.counterIncrement),this.counterReset=Ca(t,fa,e.counterReset)}return t}(),Ca=function(t,e,n){var r=new Sn,i=null!=n?n.toString():e.initialValue;r.write(i);var a=new Ln(r.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(t,On(o)?o.value:e.initialValue);case 0:return e.parse(t,a.parseComponentValue());case 1:return e.parse(t,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(e.format){case"angle":return Jn.parse(t,a.parseComponentValue());case"color":return nr.parse(t,a.parseComponentValue());case"image":return Pr.parse(t,a.parseComponentValue());case"length":var s=a.parseComponentValue();return Un(s)?s:jn;case"length-percentage":var c=a.parseComponentValue();return $n(c)?c:jn;case"time":return ta.parse(t,a.parseComponentValue())}}},xa="data-html2canvas-debug",Ea=function(t){switch(t.getAttribute(xa)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ta=function(t,e){var n=Ea(t);return 1===n||e===n},Ba=function(){function t(t,e){this.context=t,this.textNodes=[],this.elements=[],this.flags=0,Ta(e,3),this.styles=new ya(t,window.getComputedStyle(e,null)),gs(e)&&(this.styles.animationDuration.some((function(t){return t>0}))&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=s(this.context,e),Ta(e,4)&&(this.flags|=16)}return t}(),_a="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Sa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",La="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ia=0;Ia>4,u[c++]=(15&r)<<4|i>>2,u[c++]=(3&i)<<6|63&a;return l},Oa=function(t){for(var e=t.length,n=[],r=0;r>Fa,Qa=(1<>Fa)+32,$a=65536>>Na,Ha=(1<=0){if(t<55296||t>56319&&t<=65535)return e=((e=this.index[t>>Fa])<>Fa)])<>Na),e=this.index[e],e+=t>>Fa&Ha,e=((e=this.index[e])<=55296&&i<=56319&&n>10),o%1024+56320)),(i+1===n||r.length>16384)&&(a+=String.fromCharCode.apply(String,r),r.length=0)}return a},Ao=za(_a),go="×",po="÷",mo=function(t){return Ao.get(t)},bo=function(t,e,n){var r=n-2,i=e[r],a=e[n-1],o=e[n];if(a===Ja&&o===Za)return go;if(a===Ja||a===Za||a===to)return po;if(o===Ja||o===Za||o===to)return po;if(a===ro&&-1!==[ro,io,oo,so].indexOf(o))return go;if(!(a!==oo&&a!==io||o!==io&&o!==ao))return go;if((a===so||a===ao)&&o===ao)return go;if(o===co||o===eo)return go;if(o===no)return go;if(a===Ya)return go;if(a===co&&o===lo){for(;i===eo;)i=e[--r];if(i===lo)return go}if(a===uo&&o===uo){for(var s=0;i===uo;)s++,i=e[--r];if(s%2==0)return go}return po},vo=function(t){var e=ho(t),n=e.length,r=0,i=0,a=e.map(mo);return{next:function(){if(r>=n)return{done:!0,value:null};for(var t=go;ro.x||i.y>o.y;return o=i,0===e||s}));return t.body.removeChild(e),s},Co=function(){return void 0!==(new Image).crossOrigin},xo=function(){return"string"==typeof(new XMLHttpRequest).responseType},Eo=function(t){var e=new Image,n=t.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,";try{r.drawImage(e,0,0),n.toDataURL()}catch(t){return!1}return!0},To=function(t){return 0===t[0]&&255===t[1]&&0===t[2]&&255===t[3]},Bo=function(t){var e=t.createElement("canvas"),n=100;e.width=n,e.height=n;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,a=e.toDataURL();i.src=a;var o=_o(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),So(o).then((function(e){r.drawImage(e,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var o=t.createElement("div");return o.style.backgroundImage="url("+a+")",o.style.height=n+"px",To(i)?So(_o(n,n,0,0,o)):Promise.reject(!1)})).then((function(t){return r.drawImage(t,0,0),To(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))},_o=function(t,e,n,r,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",t.toString()),o.setAttributeNS(null,"height",e.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},So=function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){return e(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(t))}))},Lo={get SUPPORT_RANGE_BOUNDS(){var t=wo(document);return Object.defineProperty(Lo,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=Lo.SUPPORT_RANGE_BOUNDS&&ko(document);return Object.defineProperty(Lo,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=Eo(document);return Object.defineProperty(Lo,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t="function"==typeof Array.from&&"function"==typeof window.fetch?Bo(document):Promise.resolve(!1);return Object.defineProperty(Lo,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=Co();return Object.defineProperty(Lo,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t=xo();return Object.defineProperty(Lo,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Lo,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Lo,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},Io=function(){function t(t,e){this.text=t,this.bounds=e}return t}(),Mo=function(t,e,n,r){var i=Po(e,n),a=[],s=0;return i.forEach((function(e){if(n.textDecorationLine.length||e.trim().length>0)if(Lo.SUPPORT_RANGE_BOUNDS){var i=Do(r,s,e.length).getClientRects();if(i.length>1){var c=Fo(e),l=0;c.forEach((function(e){a.push(new Io(e,o.fromDOMRectList(t,Do(r,l+s,e.length).getClientRects()))),l+=e.length}))}else a.push(new Io(e,o.fromDOMRectList(t,i)))}else{var u=r.splitText(e.length);a.push(new Io(e,Oo(t,r))),r=u}else Lo.SUPPORT_RANGE_BOUNDS||(r=r.splitText(e.length));s+=e.length})),a},Oo=function(t,e){var n=e.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var i=e.parentNode;if(i){i.replaceChild(r,e);var a=s(t,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return o.EMPTY},Do=function(t,e,n){var r=t.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(t,e),i.setEnd(t,e+n),i},Fo=function(t){if(Lo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map((function(t){return t.segment}))}return yo(t)},No=function(t,e){if(Lo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(t)).map((function(t){return t.segment}))}return Qo(t,e)},Po=function(t,e){return 0!==e.letterSpacing?Fo(t):No(t,e)},Ro=[32,160,4961,65792,65793,4153,4241],Qo=function(t,e){for(var n,r=Ht(t,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak}),i=[],a=function(){if(n.value){var t=n.value.slice(),e=l(t),r="";e.forEach((function(t){-1===Ro.indexOf(t)?r+=u(t):(r.length&&i.push(r),i.push(u(t)),r="")})),r.length&&i.push(r)}};!(n=r.next()).done;)a();return i},Uo=function(){function t(t,e,n){this.text=$o(e.data,n.textTransform),this.textBounds=Mo(t,this.text,n,e)}return t}(),$o=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(Ho,jo);case 2:return t.toUpperCase();default:return t}},Ho=/(^|\s|:|-|\(|\))([a-z])/g,jo=function(t,e,n){return t.length>0?e+n.toUpperCase():t},Ko=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return e(n,t),n}(Ba),zo=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return e(n,t),n}(Ba),Go=function(t){function n(e,n){var r=t.call(this,e,n)||this,i=new XMLSerializer,a=s(e,n);return n.setAttribute("width",a.width+"px"),n.setAttribute("height",a.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e(n,t),n}(Ba),Xo=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.value=n.value,r}return e(n,t),n}(Ba),Vo=function(t){function n(e,n){var r=t.call(this,e,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return e(n,t),n}(Ba),Wo=[{type:15,flags:0,unit:"px",number:3}],qo=[{type:16,flags:0,number:50}],Yo=function(t){return t.width>t.height?new o(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width0)n.textNodes.push(new Uo(t,i,n.styles));else if(As(i))if(Is(i)&&i.assignedNodes)i.assignedNodes().forEach((function(e){return cs(t,e,n,r)}));else{var o=ls(t,i);o.styles.isVisible()&&(hs(i,o,r)?o.flags|=4:fs(o.styles)&&(o.flags|=2),-1!==ss.indexOf(i.tagName)&&(o.flags|=8),n.elements.push(o),i.slot,i.shadowRoot?cs(t,i.shadowRoot,o,r):Ss(i)||ws(i)||Ls(i)||cs(t,i,o,r))}},ls=function(t,e){return Es(e)?new Ko(t,e):Cs(e)?new zo(t,e):ws(e)?new Go(t,e):ms(e)?new Xo(t,e):bs(e)?new Vo(t,e):vs(e)?new rs(t,e):Ls(e)?new is(t,e):Ss(e)?new as(t,e):Ts(e)?new os(t,e):new Ba(t,e)},us=function(t,e){var n=ls(t,e);return n.flags|=4,cs(t,e,n,n),n},hs=function(t,e,n){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||ks(t)&&n.styles.isTransparent()},fs=function(t){return t.isPositioned()||t.isFloating()},ds=function(t){return t.nodeType===Node.TEXT_NODE},As=function(t){return t.nodeType===Node.ELEMENT_NODE},gs=function(t){return As(t)&&void 0!==t.style&&!ps(t)},ps=function(t){return"object"==typeof t.className},ms=function(t){return"LI"===t.tagName},bs=function(t){return"OL"===t.tagName},vs=function(t){return"INPUT"===t.tagName},ys=function(t){return"HTML"===t.tagName},ws=function(t){return"svg"===t.tagName},ks=function(t){return"BODY"===t.tagName},Cs=function(t){return"CANVAS"===t.tagName},xs=function(t){return"VIDEO"===t.tagName},Es=function(t){return"IMG"===t.tagName},Ts=function(t){return"IFRAME"===t.tagName},Bs=function(t){return"STYLE"===t.tagName},_s=function(t){return"SCRIPT"===t.tagName},Ss=function(t){return"TEXTAREA"===t.tagName},Ls=function(t){return"SELECT"===t.tagName},Is=function(t){return"SLOT"===t.tagName},Ms=function(t){return t.tagName.indexOf("-")>0},Os=function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(t){var e=this.counters[t];return e&&e.length?e[e.length-1]:1},t.prototype.getCounterValues=function(t){var e=this.counters[t];return e||[]},t.prototype.pop=function(t){var e=this;t.forEach((function(t){return e.counters[t].pop()}))},t.prototype.parse=function(t){var e=this,n=t.counterIncrement,r=t.counterReset,i=!0;null!==n&&n.forEach((function(t){var n=e.counters[t.counter];n&&0!==t.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=t.increment)}));var a=[];return i&&r.forEach((function(t){var n=e.counters[t.counter];a.push(t.counter),n||(n=e.counters[t.counter]=[]),n.push(t.reset)})),a},t}(),Ds={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Fs={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ns={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ps={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Rs=function(t,e,n,r,i,a){return tn?Ys(t,i,a.length>0):r.integers.reduce((function(e,n,i){for(;t>=n;)t-=n,e+=r.values[i];return e}),"")+a},Qs=function(t,e,n,r){var i="";do{n||t--,i=r(t)+i,t/=e}while(t*e>=e);return i},Us=function(t,e,n,r,i){var a=n-e+1;return(t<0?"-":"")+(Qs(Math.abs(t),a,r,(function(t){return u(Math.floor(t%a)+e)}))+i)},$s=function(t,e,n){void 0===n&&(n=". ");var r=e.length;return Qs(Math.abs(t),r,!1,(function(t){return e[Math.floor(t%r)]}))+n},Hs=1,js=2,Ks=4,zs=8,Gs=function(t,e,n,r,i,a){if(t<-9999||t>9999)return Ys(t,4,i.length>0);var o=Math.abs(t),s=i;if(0===o)return e[0]+s;for(var c=0;o>0&&c<=4;c++){var l=o%10;0===l&&la(a,Hs)&&""!==s?s=e[l]+s:l>1||1===l&&0===c||1===l&&1===c&&la(a,js)||1===l&&1===c&&la(a,Ks)&&t>100||1===l&&c>1&&la(a,zs)?s=e[l]+(c>0?n[c-1]:"")+s:1===l&&c>0&&(s=n[c-1]+s),o=Math.floor(o/10)}return(t<0?r:"")+s},Xs="十百千萬",Vs="拾佰仟萬",Ws="マイナス",qs="마이너스",Ys=function(t,e,n){var r=n?". ":"",i=n?"、":"",a=n?", ":"",o=n?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=Us(t,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return $s(t,"〇一二三四五六七八九",i);case 6:return Rs(t,1,3999,Ds,3,r).toLowerCase();case 7:return Rs(t,1,3999,Ds,3,r);case 8:return Us(t,945,969,!1,r);case 9:return Us(t,97,122,!1,r);case 10:return Us(t,65,90,!1,r);case 11:return Us(t,1632,1641,!0,r);case 12:case 49:return Rs(t,1,9999,Fs,3,r);case 35:return Rs(t,1,9999,Fs,3,r).toLowerCase();case 13:return Us(t,2534,2543,!0,r);case 14:case 30:return Us(t,6112,6121,!0,r);case 15:return $s(t,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return $s(t,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return Gs(t,"零一二三四五六七八九",Xs,"負",i,js|Ks|zs);case 47:return Gs(t,"零壹貳參肆伍陸柒捌玖",Vs,"負",i,Hs|js|Ks|zs);case 42:return Gs(t,"零一二三四五六七八九",Xs,"负",i,js|Ks|zs);case 41:return Gs(t,"零壹贰叁肆伍陆柒捌玖",Vs,"负",i,Hs|js|Ks|zs);case 26:return Gs(t,"〇一二三四五六七八九","十百千万",Ws,i,0);case 25:return Gs(t,"零壱弐参四伍六七八九","拾百千万",Ws,i,Hs|js|Ks);case 31:return Gs(t,"영일이삼사오육칠팔구","십백천만",qs,a,Hs|js|Ks);case 33:return Gs(t,"零一二三四五六七八九","十百千萬",qs,a,0);case 32:return Gs(t,"零壹貳參四五六七八九","拾百千",qs,a,Hs|js|Ks);case 18:return Us(t,2406,2415,!0,r);case 20:return Rs(t,1,19999,Ps,3,r);case 21:return Us(t,2790,2799,!0,r);case 22:return Us(t,2662,2671,!0,r);case 22:return Rs(t,1,10999,Ns,3,r);case 23:return $s(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return $s(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Us(t,3302,3311,!0,r);case 28:return $s(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return $s(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Us(t,3792,3801,!0,r);case 37:return Us(t,6160,6169,!0,r);case 38:return Us(t,4160,4169,!0,r);case 39:return Us(t,2918,2927,!0,r);case 40:return Us(t,1776,1785,!0,r);case 43:return Us(t,3046,3055,!0,r);case 44:return Us(t,3174,3183,!0,r);case 45:return Us(t,3664,3673,!0,r);case 46:return Us(t,3872,3881,!0,r);default:return Us(t,48,57,!0,r)}},Js="data-html2canvas-ignore",Zs=function(){function t(t,e,n){if(this.context=t,this.options=n,this.scrolledElements=[],this.referenceElement=e,this.counters=new Os,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(t,e){var n=this,a=ec(t,e);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var o=t.defaultView.pageXOffset,s=t.defaultView.pageYOffset,c=a.contentWindow,l=c.document,u=ic(a).then((function(){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(lc),c&&(c.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||c.scrollY===e.top&&c.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-e.left,c.scrollY-e.top,0,0))),t=this.options.onclone,void 0===(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,rc(l)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof t?[2,Promise.resolve().then((function(){return t(l,n)})).then((function(){return a}))]:[2,a]}}))}))}));return l.open(),l.write(sc(document.doctype)+""),cc(this.referenceElement.ownerDocument,o,s),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},t.prototype.createElementClone=function(t){if(Ta(t,2),Cs(t))return this.createCanvasClone(t);if(xs(t))return this.createVideoClone(t);if(Bs(t))return this.createStyleClone(t);var e=t.cloneNode(!1);return Es(e)&&(Es(t)&&t.currentSrc&&t.currentSrc!==t.src&&(e.src=t.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),Ms(e)?this.createCustomElementClone(e):e},t.prototype.createCustomElementClone=function(t){var e=document.createElement("html2canvascustomelement");return oc(t.style,e),e},t.prototype.createStyleClone=function(t){try{var e=t.sheet;if(e&&e.cssRules){var n=[].slice.call(e.cssRules,0).reduce((function(t,e){return e&&"string"==typeof e.cssText?t+e.cssText:t}),""),r=t.cloneNode(!1);return r.textContent=n,r}}catch(t){if(this.context.logger.error("Unable to access cssRules property",t),"SecurityError"!==t.name)throw t}return t.cloneNode(!1)},t.prototype.createCanvasClone=function(t){var e;if(this.options.inlineImages&&t.ownerDocument){var n=t.ownerDocument.createElement("img");try{return n.src=t.toDataURL(),n}catch(e){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",t)}}var r=t.cloneNode(!1);try{r.width=t.width,r.height=t.height;var i=t.getContext("2d"),a=r.getContext("2d");if(a)if(!this.options.allowTaint&&i)a.putImageData(i.getImageData(0,0,t.width,t.height),0,0);else{var o=null!==(e=t.getContext("webgl2"))&&void 0!==e?e:t.getContext("webgl");if(o){var s=o.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",t)}a.drawImage(t,0,0)}return r}catch(e){this.context.logger.info("Unable to clone canvas as it is tainted",t)}return r},t.prototype.createVideoClone=function(t){var e=t.ownerDocument.createElement("canvas");e.width=t.offsetWidth,e.height=t.offsetHeight;var n=e.getContext("2d");try{return n&&(n.drawImage(t,0,0,e.width,e.height),this.options.allowTaint||n.getImageData(0,0,e.width,e.height)),e}catch(e){this.context.logger.info("Unable to clone video as it is tainted",t)}var r=t.ownerDocument.createElement("canvas");return r.width=t.offsetWidth,r.height=t.offsetHeight,r},t.prototype.appendChildNode=function(t,e,n){As(e)&&(_s(e)||e.hasAttribute(Js)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(e))||this.options.copyStyles&&As(e)&&Bs(e)||t.appendChild(this.cloneNode(e,n))},t.prototype.cloneChildNodes=function(t,e,n){for(var r=this,i=t.shadowRoot?t.shadowRoot.firstChild:t.firstChild;i;i=i.nextSibling)if(As(i)&&Is(i)&&"function"==typeof i.assignedNodes){var a=i.assignedNodes();a.length&&a.forEach((function(t){return r.appendChildNode(e,t,n)}))}else this.appendChildNode(e,i,n)},t.prototype.cloneNode=function(t,e){if(ds(t))return document.createTextNode(t.data);if(!t.ownerDocument)return t.cloneNode(!1);var n=t.ownerDocument.defaultView;if(n&&As(t)&&(gs(t)||ps(t))){var r=this.createElementClone(t);r.style.transitionProperty="none";var i=n.getComputedStyle(t),a=n.getComputedStyle(t,":before"),o=n.getComputedStyle(t,":after");this.referenceElement===t&&gs(r)&&(this.clonedReferenceElement=r),ks(r)&&gc(r);var s=this.counters.parse(new ka(this.context,i)),c=this.resolvePseudoContent(t,r,a,qa.BEFORE);Ms(t)&&(e=!0),xs(t)||this.cloneChildNodes(t,r,e),c&&r.insertBefore(c,r.firstChild);var l=this.resolvePseudoContent(t,r,o,qa.AFTER);return l&&r.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||ps(t))&&!Ts(t)||e)&&oc(i,r),0===t.scrollTop&&0===t.scrollLeft||this.scrolledElements.push([r,t.scrollLeft,t.scrollTop]),(Ss(t)||Ls(t))&&(Ss(r)||Ls(r))&&(r.value=t.value),r}return t.cloneNode(!1)},t.prototype.resolvePseudoContent=function(t,e,n,r){var i=this;if(n){var a=n.content,o=e.ownerDocument;if(o&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==n.display){this.counters.parse(new ka(this.context,n));var s=new wa(this.context,n),c=o.createElement("html2canvaspseudoelement");oc(n,c),s.content.forEach((function(e){if(0===e.type)c.appendChild(o.createTextNode(e.value));else if(22===e.type){var n=o.createElement("img");n.src=e.value,n.style.opacity="1",c.appendChild(n)}else if(18===e.type){if("attr"===e.name){var r=e.values.filter(On);r.length&&c.appendChild(o.createTextNode(t.getAttribute(r[0].value)||""))}else if("counter"===e.name){var a=e.values.filter(Pn),l=a[0],u=a[1];if(l&&On(l)){var h=i.counters.getCounterValue(l.value),f=u&&On(u)?Bi.parse(i.context,u.value):3;c.appendChild(o.createTextNode(Ys(h,f,!1)))}}else if("counters"===e.name){var d=e.values.filter(Pn),A=(l=d[0],d[1]);if(u=d[2],l&&On(l)){var g=i.counters.getCounterValues(l.value),p=u&&On(u)?Bi.parse(i.context,u.value):3,m=A&&0===A.type?A.value:"",b=g.map((function(t){return Ys(t,p,!1)})).join(m);c.appendChild(o.createTextNode(b))}}}else if(20===e.type)switch(e.value){case"open-quote":c.appendChild(o.createTextNode(ga(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":c.appendChild(o.createTextNode(ga(s.quotes,--i.quoteDepth,!1)));break;default:c.appendChild(o.createTextNode(e.value))}})),c.className=fc+" "+dc;var l=r===qa.BEFORE?" "+fc:" "+dc;return ps(e)?e.className.baseValue+=l:e.className+=l,c}}},t.destroy=function(t){return!!t.parentNode&&(t.parentNode.removeChild(t),!0)},t}();!function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"}(qa||(qa={}));var tc,ec=function(t,e){var n=t.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=e.width.toString(),n.height=e.height.toString(),n.scrolling="no",n.setAttribute(Js,"true"),t.body.appendChild(n),n},nc=function(t){return new Promise((function(e){t.complete?e():t.src?(t.onload=e,t.onerror=e):e()}))},rc=function(t){return Promise.all([].slice.call(t.images,0).map(nc))},ic=function(t){return new Promise((function(e,n){var r=t.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=t.onload=function(){r.onload=t.onload=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),e(t))}),50)}}))},ac=["all","d","content"],oc=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t.item(n);-1===ac.indexOf(r)&&e.style.setProperty(r,t.getPropertyValue(r))}return e},sc=function(t){var e="";return t&&(e+=""),e},cc=function(t,e,n){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||n!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,n)},lc=function(t){var e=t[0],n=t[1],r=t[2];e.scrollLeft=n,e.scrollTop=r},uc=":before",hc=":after",fc="___html2canvas___pseudoelement_before",dc="___html2canvas___pseudoelement_after",Ac='{\n content: "" !important;\n display: none !important;\n}',gc=function(t){pc(t,"."+fc+uc+Ac+"\n ."+dc+hc+Ac)},pc=function(t,e){var n=t.ownerDocument;if(n){var r=n.createElement("style");r.textContent=e,t.appendChild(r)}},mc=function(){function t(){}return t.getOrigin=function(e){var n=t._link;return n?(n.href=e,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t}(),bc=function(){function t(t,e){this.context=t,this._options=e,this._cache={}}return t.prototype.addImage=function(t){var e=Promise.resolve();return this.has(t)?e:Ec(t)||kc(t)?((this._cache[t]=this.loadImage(t)).catch((function(){})),e):e},t.prototype.match=function(t){return this._cache[t]},t.prototype.loadImage=function(t){return r(this,void 0,void 0,(function(){var e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return e=mc.isSameOrigin(t),n=!Cc(t)&&!0===this._options.useCORS&&Lo.SUPPORT_CORS_IMAGES&&!e,r=!Cc(t)&&!e&&!Ec(t)&&"string"==typeof this._options.proxy&&Lo.SUPPORT_CORS_XHR&&!n,e||!1!==this._options.allowTaint||Cc(t)||Ec(t)||r||n?(a=t,r?[4,this.proxy(a)]:[3,2]):[2];case 1:a=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise((function(t,e){var r=new Image;r.onload=function(){return t(r)},r.onerror=e,(xc(a)||n)&&(r.crossOrigin="anonymous"),r.src=a,!0===r.complete&&setTimeout((function(){return t(r)}),500),o._options.imageTimeout>0&&setTimeout((function(){return e("Timed out ("+o._options.imageTimeout+"ms) loading image")}),o._options.imageTimeout)}))];case 3:return[2,i.sent()]}}))}))},t.prototype.has=function(t){return void 0!==this._cache[t]},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(t){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=t.substring(0,256);return new Promise((function(i,a){var o=Lo.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===o)i(s.response);else{var t=new FileReader;t.addEventListener("load",(function(){return i(t.result)}),!1),t.addEventListener("error",(function(t){return a(t)}),!1),t.readAsDataURL(s.response)}else a("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=a;var c=n.indexOf("?")>-1?"&":"?";if(s.open("GET",""+n+c+"url="+encodeURIComponent(t)+"&responseType="+o),"text"!==o&&s instanceof XMLHttpRequest&&(s.responseType=o),e._options.imageTimeout){var l=e._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+r)}}s.send()}))},t}(),vc=/^data:image\/svg\+xml/i,yc=/^data:image\/.*;base64,/i,wc=/^data:image\/.*/i,kc=function(t){return Lo.SUPPORT_SVG_DRAWING||!Tc(t)},Cc=function(t){return wc.test(t)},xc=function(t){return yc.test(t)},Ec=function(t){return"blob"===t.substr(0,4)},Tc=function(t){return"svg"===t.substr(-3).toLowerCase()||vc.test(t)},Bc=function(){function t(t,e){this.type=0,this.x=t,this.y=e}return t.prototype.add=function(e,n){return new t(this.x+e,this.y+n)},t}(),_c=function(t,e,n){return new Bc(t.x+(e.x-t.x)*n,t.y+(e.y-t.y)*n)},Sc=function(){function t(t,e,n,r){this.type=1,this.start=t,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(e,n){var r=_c(this.start,this.startControl,e),i=_c(this.startControl,this.endControl,e),a=_c(this.endControl,this.end,e),o=_c(r,i,e),s=_c(i,a,e),c=_c(o,s,e);return n?new t(this.start,r,o,c):new t(c,s,a,this.end)},t.prototype.add=function(e,n){return new t(this.start.add(e,n),this.startControl.add(e,n),this.endControl.add(e,n),this.end.add(e,n))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),Lc=function(t){return 1===t.type},Ic=function(){function t(t){var e=t.styles,n=t.bounds,r=Gn(e.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=Gn(e.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=Gn(e.borderBottomRightRadius,n.width,n.height),u=l[0],h=l[1],f=Gn(e.borderBottomLeftRadius,n.width,n.height),d=f[0],A=f[1],g=[];g.push((i+s)/n.width),g.push((d+u)/n.width),g.push((a+A)/n.height),g.push((c+h)/n.height);var p=Math.max.apply(Math,g);p>1&&(i/=p,a/=p,s/=p,c/=p,u/=p,h/=p,d/=p,A/=p);var m=n.width-s,b=n.height-h,v=n.width-u,y=n.height-A,w=e.borderTopWidth,k=e.borderRightWidth,C=e.borderBottomWidth,x=e.borderLeftWidth,E=Xn(e.paddingTop,t.bounds.width),T=Xn(e.paddingRight,t.bounds.width),B=Xn(e.paddingBottom,t.bounds.width),_=Xn(e.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?Mc(n.left+x/3,n.top+w/3,i-x/3,a-w/3,tc.TOP_LEFT):new Bc(n.left+x/3,n.top+w/3),this.topRightBorderDoubleOuterBox=i>0||a>0?Mc(n.left+m,n.top+w/3,s-k/3,c-w/3,tc.TOP_RIGHT):new Bc(n.left+n.width-k/3,n.top+w/3),this.bottomRightBorderDoubleOuterBox=u>0||h>0?Mc(n.left+v,n.top+b,u-k/3,h-C/3,tc.BOTTOM_RIGHT):new Bc(n.left+n.width-k/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=d>0||A>0?Mc(n.left+x/3,n.top+y,d-x/3,A-C/3,tc.BOTTOM_LEFT):new Bc(n.left+x/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?Mc(n.left+2*x/3,n.top+2*w/3,i-2*x/3,a-2*w/3,tc.TOP_LEFT):new Bc(n.left+2*x/3,n.top+2*w/3),this.topRightBorderDoubleInnerBox=i>0||a>0?Mc(n.left+m,n.top+2*w/3,s-2*k/3,c-2*w/3,tc.TOP_RIGHT):new Bc(n.left+n.width-2*k/3,n.top+2*w/3),this.bottomRightBorderDoubleInnerBox=u>0||h>0?Mc(n.left+v,n.top+b,u-2*k/3,h-2*C/3,tc.BOTTOM_RIGHT):new Bc(n.left+n.width-2*k/3,n.top+n.height-2*C/3),this.bottomLeftBorderDoubleInnerBox=d>0||A>0?Mc(n.left+2*x/3,n.top+y,d-2*x/3,A-2*C/3,tc.BOTTOM_LEFT):new Bc(n.left+2*x/3,n.top+n.height-2*C/3),this.topLeftBorderStroke=i>0||a>0?Mc(n.left+x/2,n.top+w/2,i-x/2,a-w/2,tc.TOP_LEFT):new Bc(n.left+x/2,n.top+w/2),this.topRightBorderStroke=i>0||a>0?Mc(n.left+m,n.top+w/2,s-k/2,c-w/2,tc.TOP_RIGHT):new Bc(n.left+n.width-k/2,n.top+w/2),this.bottomRightBorderStroke=u>0||h>0?Mc(n.left+v,n.top+b,u-k/2,h-C/2,tc.BOTTOM_RIGHT):new Bc(n.left+n.width-k/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=d>0||A>0?Mc(n.left+x/2,n.top+y,d-x/2,A-C/2,tc.BOTTOM_LEFT):new Bc(n.left+x/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?Mc(n.left,n.top,i,a,tc.TOP_LEFT):new Bc(n.left,n.top),this.topRightBorderBox=s>0||c>0?Mc(n.left+m,n.top,s,c,tc.TOP_RIGHT):new Bc(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||h>0?Mc(n.left+v,n.top+b,u,h,tc.BOTTOM_RIGHT):new Bc(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||A>0?Mc(n.left,n.top+y,d,A,tc.BOTTOM_LEFT):new Bc(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?Mc(n.left+x,n.top+w,Math.max(0,i-x),Math.max(0,a-w),tc.TOP_LEFT):new Bc(n.left+x,n.top+w),this.topRightPaddingBox=s>0||c>0?Mc(n.left+Math.min(m,n.width-k),n.top+w,m>n.width+k?0:Math.max(0,s-k),Math.max(0,c-w),tc.TOP_RIGHT):new Bc(n.left+n.width-k,n.top+w),this.bottomRightPaddingBox=u>0||h>0?Mc(n.left+Math.min(v,n.width-x),n.top+Math.min(b,n.height-C),Math.max(0,u-k),Math.max(0,h-C),tc.BOTTOM_RIGHT):new Bc(n.left+n.width-k,n.top+n.height-C),this.bottomLeftPaddingBox=d>0||A>0?Mc(n.left+x,n.top+Math.min(y,n.height-C),Math.max(0,d-x),Math.max(0,A-C),tc.BOTTOM_LEFT):new Bc(n.left+x,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?Mc(n.left+x+_,n.top+w+E,Math.max(0,i-(x+_)),Math.max(0,a-(w+E)),tc.TOP_LEFT):new Bc(n.left+x+_,n.top+w+E),this.topRightContentBox=s>0||c>0?Mc(n.left+Math.min(m,n.width+x+_),n.top+w+E,m>n.width+x+_?0:s-x+_,c-(w+E),tc.TOP_RIGHT):new Bc(n.left+n.width-(k+T),n.top+w+E),this.bottomRightContentBox=u>0||h>0?Mc(n.left+Math.min(v,n.width-(x+_)),n.top+Math.min(b,n.height+w+E),Math.max(0,u-(k+T)),h-(C+B),tc.BOTTOM_RIGHT):new Bc(n.left+n.width-(k+T),n.top+n.height-(C+B)),this.bottomLeftContentBox=d>0||A>0?Mc(n.left+x+_,n.top+y,Math.max(0,d-(x+_)),A-(C+B),tc.BOTTOM_LEFT):new Bc(n.left+x+_,n.top+n.height-(C+B))}return t}();!function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(tc||(tc={}));var Mc=function(t,e,n,r,i){var a=(Math.sqrt(2)-1)/3*4,o=n*a,s=r*a,c=t+n,l=e+r;switch(i){case tc.TOP_LEFT:return new Sc(new Bc(t,l),new Bc(t,l-s),new Bc(c-o,e),new Bc(c,e));case tc.TOP_RIGHT:return new Sc(new Bc(t,e),new Bc(t+o,e),new Bc(c,l-s),new Bc(c,l));case tc.BOTTOM_RIGHT:return new Sc(new Bc(c,e),new Bc(c,e+s),new Bc(t+o,l),new Bc(t,l));case tc.BOTTOM_LEFT:default:return new Sc(new Bc(c,l),new Bc(c-o,l),new Bc(t,e+s),new Bc(t,e))}},Oc=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},Dc=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Fc=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},Nc=function(){function t(t,e,n){this.offsetX=t,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),Pc=function(){function t(t,e){this.path=t,this.target=e,this.type=1}return t}(),Rc=function(){function t(t){this.opacity=t,this.type=2,this.target=6}return t}(),Qc=function(t){return 0===t.type},Uc=function(t){return 1===t.type},$c=function(t){return 2===t.type},Hc=function(t,e){return t.length===e.length&&t.some((function(t,n){return t===e[n]}))},jc=function(t,e,n,r,i){return t.map((function(t,a){switch(a){case 0:return t.add(e,n);case 1:return t.add(e+r,n);case 2:return t.add(e+r,n+i);case 3:return t.add(e,n+i)}return t}))},Kc=function(){function t(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),zc=function(){function t(t,e){if(this.container=t,this.parent=e,this.effects=[],this.curves=new Ic(this.container),this.container.styles.opacity<1&&this.effects.push(new Rc(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Nc(n,r,i))}if(0!==this.container.styles.overflowX){var a=Oc(this.curves),o=Fc(this.curves);Hc(a,o)?this.effects.push(new Pc(a,6)):(this.effects.push(new Pc(a,2)),this.effects.push(new Pc(o,4)))}}return t.prototype.getEffects=function(t){for(var e=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter((function(t){return!Uc(t)}));if(e||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),e=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var a=Oc(n.curves),o=Fc(n.curves);Hc(a,o)||r.unshift(new Pc(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter((function(e){return la(e.target,t)}))},t}(),Gc=function(t,e,n,r){t.container.elements.forEach((function(i){var a=la(i.flags,4),o=la(i.flags,2),s=new zc(i,t);la(i.styles.display,2048)&&r.push(s);var c=la(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:e,u=new Kc(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var h=i.styles.zIndex.order;if(h<0){var f=0;l.negativeZIndex.some((function(t,e){return h>t.element.container.styles.zIndex.order?(f=e,!1):f>0})),l.negativeZIndex.splice(f,0,u)}else if(h>0){var d=0;l.positiveZIndex.some((function(t,e){return h>=t.element.container.styles.zIndex.order?(d=e+1,!1):d>0})),l.positiveZIndex.splice(d,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Gc(s,u,a?u:n,c)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),Gc(s,e,n,c);la(i.flags,8)&&Xc(i,c)}))},Xc=function(t,e){for(var n=t instanceof Vo?t.start:1,r=t instanceof Vo&&t.reversed,i=0;i0&&t.intrinsicHeight>0){var r=nl(t),i=Fc(e);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,t.intrinsicWidth,t.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(t){return r(this,void 0,void 0,(function(){var e,r,a,s,c,l,u,h,f,d,A,g,p,m,b,v,y,w;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(t.getEffects(4)),e=t.container,r=t.curves,a=e.styles,s=0,c=e.textNodes,i.label=1;case 1:return s0&&x>0&&(b=r.ctx.createPattern(g,"repeat"),r.renderRepeat(y,b,T,B))):Nr(n)&&(v=al(t,e,[null,null,null]),y=v[0],w=v[1],k=v[2],C=v[3],x=v[4],E=0===n.position.length?[Kn]:n.position,T=Xn(E[0],C),B=Xn(E[E.length-1],x),_=wr(n,T,B,C,x),S=_[0],L=_[1],S>0&&L>0&&(I=r.ctx.createRadialGradient(w+T,k+B,0,w+T,k+B,S),pr(n.stops,2*S).forEach((function(t){return I.addColorStop(t.stop,ir(t.color))})),r.path(y),r.ctx.fillStyle=I,S!==L?(M=t.bounds.left+.5*t.bounds.width,O=t.bounds.top+.5*t.bounds.height,F=1/(D=L/S),r.ctx.save(),r.ctx.translate(M,O),r.ctx.transform(1,0,0,D,0,0),r.ctx.translate(-M,-O),r.ctx.fillRect(w,F*(k-O)+O,C,x*F),r.ctx.restore()):r.ctx.fill())),i.label=6;case 6:return e--,[2]}}))},r=this,a=0,o=t.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return a0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,o,t.curves,2)]:[3,11]:[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,o,t.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,o,t.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,t.curves)];case 10:i.sent(),i.label=11;case 11:o++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(t,e,n,a,o){return r(this,void 0,void 0,(function(){var r,s,c,l,u,h,f,d,A,g,p,m,b,v,y,w;return i(this,(function(i){return this.ctx.save(),r=Jc(a,n),s=Wc(a,n),2===o&&(this.path(s),this.ctx.clip()),Lc(s[0])?(c=s[0].start.x,l=s[0].start.y):(c=s[0].x,l=s[0].y),Lc(s[1])?(u=s[1].end.x,h=s[1].end.y):(u=s[1].x,h=s[1].y),f=0===n||2===n?Math.abs(c-u):Math.abs(l-h),this.ctx.beginPath(),3===o?this.formatPath(r):this.formatPath(s.slice(0,2)),d=e<3?3*e:2*e,A=e<3?2*e:e,3===o&&(d=e,A=e),g=!0,f<=2*d?g=!1:f<=2*d+A?(d*=p=f/(2*d+A),A*=p):(m=Math.floor((f+A)/(d+A)),b=(f-m*d)/(m-1),A=(v=(f-(m+1)*d)/m)<=0||Math.abs(A-b)0&&void 0!==arguments[0]?arguments[0]:[];Qs(t=Nh(document.body.children)).call(t,(function(t,n){void 0!==e[n]&&(t.style.display=e[n])}))}(a),document.body.style.overflow=o}))};function Bx(t,e){Tx(t,(function(t,n){window.scrollTo(0,0),Ex(t,{allowTaint:!0,height:t.clientHeight,width:t.clientWidth,scrollY:0,scrollX:0}).then((function(t){!function(t,e){var n=document.createElement("a");n.style.display="none",n.href=t,n.download="".concat(e,".png"),document.body.appendChild(n),n.click(),document.body.removeChild(n)}(t.toDataURL("image/jpeg"),e),n()}))}))}var _x=Kt.f,Sx=w(_x),Lx=w([].push),Ix=$t&&u((function(){var t=Object.create(null);return t[2]=2,!Sx(t,2)})),Mx=function(t){return function(e){for(var n,r=Gt(e),i=bn(r),a=Ix&&null===Ea(r),o=i.length,s=0,c=[];o>s;)n=i[s++],$t&&!(a?n in r:Sx(r,n))||Lx(c,t?[n,r[n]]:r[n]);return c}},Ox={entries:Mx(!0),values:Mx(!1)},Dx=Ox.values;Dn({target:"Object",stat:!0},{values:function(t){return Dx(t)}});var Fx=H.Object.values,Nx=Ox.entries;Dn({target:"Object",stat:!0},{entries:function(t){return Nx(t)}});var Px=H.Object.entries,Rx={mouseResize:{},getImgPosition:function(){var t=this.img.getBoundingClientRect(),e=this.previewerDom.parentNode.getBoundingClientRect(),n=Wf(this.img.style.padding)||0;return{bottom:t.bottom-e.bottom,top:t.top-e.top+1.5*n,height:t.height,width:t.width,right:t.right-e.right,left:t.left-e.left+1.5*n,x:t.x-e.x,y:t.y-e.y}},initBubbleButtons:function(){var t=this.getImgPosition();return{points:{arr:["leftTop","leftBottom","rightTop","rightBottom","leftMiddle","middleBottom","middleTop","rightMiddle"],arrInfo:{leftTop:{name:"20",left:0,top:0},leftBottom:{name:"00",left:0,top:0},rightTop:{name:"22",left:0,top:0},rightBottom:{name:"02",left:0,top:0},leftMiddle:{name:"10",left:0,top:0},middleBottom:{name:"01",left:0,top:0},middleTop:{name:"21",left:0,top:0},rightMiddle:{name:"12",left:0,top:0}}},imgSrc:this.img.src,style:{width:this.img.width,height:this.img.height,left:t.left-1,top:t.top-1,marginTop:0,marginLeft:0},scrollTop:this.previewerDom.scrollTop,position:t}},showBubble:function(t,e,n){this.$isResizing()||(this.img=t,this.previewerDom=n,this.container=e,this.buts=this.initBubbleButtons(),this.drawBubbleButs())},emit:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t){case"mousedown":return this.resizeBegin(e);case"mouseup":return this.resizeStop(e);case"mousemove":return this.resizeWorking(e);case"scroll":return this.dealScroll(e);case"remove":return this.remove();case"previewUpdate":return this.previewUpdate(e)}},previewUpdate:function(t){this.$isResizing()||(this.remove(),t())},drawBubbleButs:function(){var t,e=this;return this.butsLayout||(this.butsLayout=this.container,this.butsImg=document.createElement("div"),this.butsImg.className="cherry-previewer-img-size-handler__background",this.butsImg.style.backgroundImage="url(".concat(this.buts.imgSrc,")"),this.butsLayout.appendChild(this.butsImg),this.butsPoints={},Qs(t=Is(this.buts.points.arr)).call(t,(function(t){var n=e.buts.points.arr[t],r=document.createElement("div");r.className=["cherry-previewer-img-size-handler__points","cherry-previewer-img-size-handler__points-".concat(n)].join(" "),r.dataset.name=n,e.butsLayout.appendChild(r),e.butsPoints["pints-".concat(n)]=r}))),this.updateBubbleButs()},remove:function(){this.butsLayout=!1},updateBubbleButs:function(){var t,e,n=this;this.$updatePointsInfo(),Qs(t=Is(this.buts.style)).call(t,(function(t){n.butsLayout.style[t]="".concat(n.buts.style[t],"px")})),Qs(e=Is(this.buts.points.arr)).call(e,(function(t){var e=n.buts.points.arr[t];n.butsPoints["pints-".concat(e)].style.top="".concat(n.buts.points.arrInfo[e].top,"px"),n.butsPoints["pints-".concat(e)].style.left="".concat(n.buts.points.arrInfo[e].left,"px")}))},$updatePointsInfo:function(){var t,e=this,n=this.buts.style.width,r=this.buts.style.height,i=this.$getPointsInfo(n,r);Qs(t=Is(this.buts.points.arr)).call(t,(function(t){var n=e.buts.points.arr[t];e.buts.points.arrInfo[n].left!==i[n].left&&(e.buts.points.arrInfo[n].left=i[n].left),e.buts.points.arrInfo[n].top!==i[n].top&&(e.buts.points.arrInfo[n].top=i[n].top)}))},$getPointsInfo:function(t,e){return{leftTop:{left:0,top:0},leftBottom:{left:0,top:e},rightTop:{left:t,top:0},rightBottom:{left:t,top:e},leftMiddle:{left:0,top:e/2},middleBottom:{left:t/2,top:e},middleTop:{left:t/2,top:0},rightMiddle:{left:t,top:e/2}}},$isResizing:function(){return this.mouseResize.resize},dealScroll:function(t){var e=this.getImgPosition();this.butsLayout.style.marginTop!==e.top-this.buts.position.top&&(this.butsLayout.style.marginTop="".concat(e.top-this.buts.position.top,"px"),this.buts.style.marginTop="".concat(e.top-this.buts.position.top,"px")),this.butsLayout.style.marginLeft!==e.left-this.buts.position.left&&(this.butsLayout.style.marginLeft="".concat(e.left-this.buts.position.left,"px"),this.buts.style.marginLeft="".concat(e.left-this.buts.position.left,"px"))},initMouse:function(){return{left:0,top:0,resize:!1,name:""}},resizeBegin:function(t){var e=t.target;if(!e.classList.contains("cherry-previewer-img-size-handler__points"))return!1;this.mouseResize.left=t.clientX,this.mouseResize.top=t.clientY,this.mouseResize.resize=!0,this.mouseResize.name=e.getAttribute("data-name"),this.previewerDom.classList.add("doing-resize-img")},resizeStop:function(t,e,n,r){if(!this.$isResizing())return!1;this.img.style.width="".concat(this.buts.style.width,"px"),this.img.style.height="".concat(this.buts.style.height,"px"),this.buts.style.marginTop=0,this.buts.style.marginLeft=0,this.updateBubbleButs(),this.mouseResize.resize=!1,this.previewerDom.classList.remove("doing-resize-img"),this.change()},resizeWorking:function(t,e){if(this.$isResizing()){var n=t.clientX-this.mouseResize.left,r=t.clientY-this.mouseResize.top,i={};switch(this.mouseResize.name){case"leftTop":case"leftBottom":case"leftMiddle":i=this.$getChange(n,r,"x"),this.buts.style.width=this.buts.position.width-i.changeX,"leftMiddle"!==this.mouseResize.name&&(this.buts.style.height=this.buts.position.height-i.changeY);break;case"rightTop":case"rightBottom":case"rightMiddle":i=this.$getChange(n,r,"x"),this.buts.style.width=this.buts.position.width+i.changeX,"rightMiddle"!==this.mouseResize.name&&(this.buts.style.height=this.buts.position.height+i.changeY);break;case"middleTop":i=this.$getChange(n,r,"y"),this.buts.style.height=this.buts.position.height-i.changeY;break;case"middleBottom":i=this.$getChange(n,r,"y"),this.buts.style.height=this.buts.position.height+i.changeY}this.updateBubbleButs(),this.change()}},change:function(){this.emitChange(this.img,{width:this.buts.style.width,height:this.buts.style.height})},bindChange:function(t){this.emitChange=t},$getChange:function(t,e,n){var r={changeX:0,changeY:0};if("y"===n)r.changeY=e,r.changeX=e*this.buts.position.width/this.buts.position.height;else r.changeX=t,r.changeY=t*this.buts.position.height/this.buts.position.width;return r}},Qx=Rx,Ux=Mr.every,$x=Ms("every");Dn({target:"Array",proto:!0,forced:!$x},{every:function(t){return Ux(this,t,arguments.length>1?arguments[1]:void 0)}});var Hx=Ni("Array","every"),jx=Array.prototype,Kx=function(t){var e=t.every;return t===jx||rt(jx,t)&&e===jx.every?Hx:e},zx=function(t,e,n,r,i,a,o,s){for(var c,l,u=i,h=0,f=!!o&&ke(o,s);h0&&pr(c)?(l=un(c),u=zx(t,e,c,l,u,a-1)-1):(sa(u+1),t[u]=c),u++),h++;return u},Gx=zx;Dn({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=yt(this),n=un(e),r=yr(e,0);return r.length=Gx(r,e,e,n,0,void 0===t?1:rn(t)),r}}),Wa();var Xx=Ni("Array","flat"),Vx=Array.prototype,Wx=function(t){var e=t.flat;return t===Vx||rt(Vx,t)&&e===Vx.flat?Xx:e},qx=function(){return Ho((function t(e,n,r,i,a,o,s){ra(this,t),cs(this,"tableEditor",{info:{},tableCodes:[],editorDom:{}}),this.trigger=e,this.target=n,this.previewerDom=i,this.container=r,this.codeMirror=a,this.$initReg(),this.$findTableInEditor(),this.tableElement=o,this.$cherry=s}),[{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};switch(t){case"keyup":return"click"===this.trigger&&this.$onInputChange(e);case"remove":return this.$remove();case"scroll":case"previewUpdate":return this.$refreshPosition();case"mousedown":return;case"mouseup":return"click"===this.trigger&&this.$tryRemoveMe(e,n)}}},{key:"$tryRemoveMe",value:function(t,e){/textarea/i.test(t.target.tagName)||(this.$remove(),e())}},{key:"$getPosition",value:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tableEditor.info.tdNode).getBoundingClientRect(),e=this.previewerDom.parentNode.getBoundingClientRect();return{top:t.top-e.top,height:t.height,width:t.width,left:t.left-e.left,maxHeight:e.height}}},{key:"setStyle",value:function(t,e,n){t.getBoundingClientRect()[e]!==n&&(t.style[e]=n)}},{key:"$setInputOffset",value:function(){var t=this.$getPosition(),e=this.tableEditor.editorDom.inputDiv;this.setStyle(e,"width","".concat(t.width,"px")),this.setStyle(e,"height","".concat(t.height,"px")),this.setStyle(e,"top","".concat(t.top,"px")),this.setStyle(e,"left","".concat(t.left,"px"));var n=t.top>=0&&t.top+t.height<=t.maxHeight;this.setStyle(e,"display",n?"":"none")}},{key:"$setSymbolOffset",value:function(){var t,e=this,n=this.tableEditor.editorDom.symbolContainer,r=this.tableEditor.info,i=r.tableNode,a=r.trNode,o=r.isTHead,s=this.$getPosition(i),c=this.$getPosition(a),l=this.$getPosition(),u=this.previewerDom.getBoundingClientRect();this.setStyle(this.container,"width","".concat(s.width,"px")),this.setStyle(this.container,"height","".concat(s.height,"px")),this.setStyle(this.container,"top","".concat(s.top,"px")),this.setStyle(this.container,"left","".concat(s.left,"px"));Qs(t=n.childNodes).call(t,(function(t){var n,r=t.dataset,i=r.index,a=r.type,h=r.dir,f=20,d=7;e.setStyle(t,{Row:["left","right"],Col:["top","bottom"]}[h][i],"-".concat(f,"px")),e.setStyle(t,"display","");var A={LastRow:function(){return e.setStyle(t,"top","".concat(c.top-s.top-d,"px"))},NextRow:function(){return e.setStyle(t,"top","".concat(c.top-s.top+c.height-d,"px"))},LastCol:function(){return e.setStyle(t,"left","".concat(l.left-s.left-d,"px"))},NextCol:function(){return e.setStyle(t,"left","".concat(l.left-s.left+l.width-d,"px"))}},g=hs(n="".concat(a)).call(n,h);A[g](),e.setStyle(t,"display",function(t){var e,n=t.getBoundingClientRect(),r={top:[u.top,u.top+u.height-n.height],left:[u.left,u.left+u.width-n.width]};return Kx(e=Px(r)).call(e,(function(t){var e=xf(t,2),r=e[0],i=xf(e[1],2),a=i[0],o=i[1];return n[r]>=a&&n[r]<=o}))}(t)?"":"none"),o&&"LastRow"===g&&e.setStyle(t,"display","none")}))}},{key:"$refreshPosition",value:function(){"click"!==this.trigger?(this.$setSymbolOffset(),this.$setDeleteButtonPosition()):this.$setInputOffset()}},{key:"$remove",value:function(){this.tableEditor={info:{},tableCodes:[],editorDom:{}}}},{key:"$collectTableCode",value:function(){var t=[];this.codeMirror.getValue().replace(this.codeBlockReg,(function(t){return t.replace(/\|/g,".")})).replace(this.tableReg,(function(e){var n,r=e.replace(/^\n*/,""),i=((n=(arguments.length<=1?0:arguments.length-1)-2+1)<1||arguments.length<=n?void 0:arguments[n])+e.match(/^\n*/)[0].length;t.push({code:r,offset:i})})),this.tableEditor.tableCodes=t}},{key:"$collectTableDom",value:function(){var t,e,n,r=Nh(this.previewerDom.querySelectorAll("table.cherry-table")),i=this.$getClosestNode(this.target,"TABLE");if(!1===i)return!1;var a=Qi(t=Nh(this.target.parentElement.childNodes)).call(t,(function(t){return"td"===t.tagName.toLowerCase()})).length;this.tableEditor.info={tableNode:i,tdNode:this.target,trNode:this.target.parentElement,tdIndex:Ef(e=Nh(this.target.parentElement.childNodes)).call(e,this.target),trIndex:Ef(n=Nh(this.target.parentElement.parentElement.childNodes)).call(n,this.target.parentElement),isTHead:"TBODY"!==this.target.parentElement.parentElement.tagName,totalTables:r.length,tableIndex:Ef(r).call(r,i),tableText:i.textContent.replace(/[\s]/g,""),columns:a}}},{key:"$setSelection",value:function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table",a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.tableEditor.tableCodes[t],s=this.codeMirror.getValue(),c=this.tableEditor.info,l=null!==(e=null===(n=Bf(s).call(s,0,o.offset).match(/\n/g))||void 0===n?void 0:n.length)&&void 0!==e?e:0,u=this.$getTdOffset(o.code,c.isTHead,c.trIndex,c.tdIndex),h=u.preLine,f=u.preCh,d=u.plusCh,A=u.currentTd;if("table"===i){var g=l+o.code.match(/\n/g).length,p=o.code.match(/[^\n]+\n*$/)[0].length;this.tableEditor.info.selection=[{line:l,ch:0},{line:g,ch:p}]}else this.tableEditor.info.selection=[{line:l+h,ch:f},{line:l+h,ch:f+d}];a&&(r=this.codeMirror).setSelection.apply(r,kp(this.tableEditor.info.selection)),this.tableEditor.info.code=A}},{key:"$getTdOffset",value:function(t,e,n,r){for(var i=e?0:n+2,a=t.split(/\n/)[i].split(/\|/),o=/^\s*$/.test(a[0]),s=o?r+1:r,c=a[s],l=[],u=0;u/g,"\n"),this.tableEditor.editorDom.inputDom.focus()}},{key:"$onInputChange",value:function(t){"TEXTAREA"===t.target.tagName&&this.codeMirror.replaceSelection(t.target.value.replace(/\n/g,"
    "),"around")}},{key:"$updateEditorPosition",value:function(){this.$setInputOffset();var t=getComputedStyle(this.tableEditor.info.tdNode);this.tableEditor.editorDom.inputDom.style.textAlign=t.textAlign||"left",this.tableEditor.editorDom.inputDom.style.fontSize=t.fontSize||"16px",this.tableEditor.editorDom.inputDom.style.fontFamily=t.fontFamily,this.tableEditor.editorDom.inputDom.style.lineHeight=t.lineHeight,this.tableEditor.editorDom.inputDom.style.padding=t.padding,/left/.test(t.textAlign)&&(this.tableEditor.editorDom.inputDom.style.paddingRight="0px"),/right/.test(t.textAlign)&&(this.tableEditor.editorDom.inputDom.style.paddingLeft="0px"),/center/.test(t.textAlign)&&(this.tableEditor.editorDom.inputDom.style.paddingLeft="0px",this.tableEditor.editorDom.inputDom.style.paddingRight="0px"),this.tableEditor.editorDom.inputDom.style.paddingBottom="0px"}},{key:"$getClosestNode",value:function(t,e){return t.tagName===e?t:"BODY"!==t.parentNode.tagName&&this.$getClosestNode(t.parentNode,e)}},{key:"$drawSymbol",value:function(){var t,e=this,n=["Last","Next"],r=["Row","Col"],i={Row:"Row",Col:"Col"},a=Wx(t=lA(r).call(r,(function(t,e){return lA(n).call(n,(function(t){return lA(r).call(r,(function(n){return["".concat(e),t,n]}))}))}))).call(t,2),o=document.createElement("ul");o.className="cherry-previewer-table-hover-handler-container",Qs(a).call(a,(function(t){var n=xf(t,3),r=n[0],a=n[1],s=n[2],c=document.createElement("li");c.setAttribute("data-index",r),c.setAttribute("data-type",a),c.setAttribute("data-dir",s),c.className="cherry-previewer-table-hover-handler__symbol",c.title=e.$cherry.locale["add".concat(i[s])],c.innerHTML="+",c.addEventListener("click",(function(t){var n,r=t.target;if(r instanceof HTMLElement){var i=r.dataset,a=i.type,o=i.dir;e[hs(n="$add".concat(a)).call(n,o)]()}})),o.appendChild(c)}),!0),this.tableEditor.editorDom.symbolContainer=o,this.container.appendChild(this.tableEditor.editorDom.symbolContainer),this.$setSymbolOffset()}},{key:"$drawSortSymbol",value:function(){var t=this,e=["RowLeft","RowRight","ColUp"],n=document.createElement("ul");n.className="cherry-previewer-table-hover-handler-sort-container",Qs(e).call(e,(function(e){var r=document.createElement("li");if(r.setAttribute("data-type",e),r.className="cherry-previewer-table-hover-handler__sort ch-icon",r.draggable=!0,Vh(e).call(e,"Row"))r.title=t.$cherry.locale.moveRow,r.classList.add("ch-icon-swap-vert"),r.addEventListener("mouseover",(function(){var e=t.tableEditor.info.tdNode;e.draggable=!0,e.parentNode.style.backgroundColor="rgb(206,226,248)"})),r.addEventListener("mouseleave",(function(){var e=t.tableEditor.info.tdNode;e.draggable=!1,e.parentNode.style.backgroundColor=""})),r.addEventListener("mousedown",(function(e){t.$setSelection(t.tableEditor.info.tableIndex,"table"),t.$dragLine()}));else{r.title=t.$cherry.locale.moveCol,r.classList.add("ch-icon-swap");var i=[];r.addEventListener("mouseover",(function(){var e,n,r,a=t.tableEditor.info.tdNode;a.draggable=!0;var o=Ef(e=Nh(a.parentNode.children)).call(e,a);Qs(n=lA(r=Nh(a.parentNode.parentNode.parentNode.children)).call(r,(function(t){return t.children}))).call(n,(function(t){var e;Qs(e=Nh(t)).call(e,(function(t){i.push(t)}))})),Qs(i).call(i,(function(t){return t.children[o].style.backgroundColor="rgb(206,226,248)"}))})),r.addEventListener("mouseleave",(function(){var e,n=t.tableEditor.info.tdNode;n.draggable=!1;var r=Ef(e=Nh(n.parentNode.children)).call(e,n);Qs(i).call(i,(function(t){return t.children[r].style.backgroundColor=""}))})),r.addEventListener("mousedown",(function(e){t.$setSelection(t.tableEditor.info.tableIndex,"table"),t.$dragCol()}))}n.appendChild(r)})),this.tableEditor.editorDom.sortContainer=n,this.container.appendChild(this.tableEditor.editorDom.sortContainer),this.$setSortSymbolsPosition()}},{key:"$setSortSymbolsPosition",value:function(){var t,e=this,n=this.tableEditor.editorDom.sortContainer,r=this.tableEditor.info,i=r.tableNode,a=r.tdNode,o=r.isTHead,s=this.$getPosition(i),c=this.$getPosition(a);this.setStyle(this.container,"width","".concat(s.width,"px")),this.setStyle(this.container,"height","".concat(s.height,"px")),this.setStyle(this.container,"top","".concat(s.top,"px")),this.setStyle(this.container,"left","".concat(s.left,"px")),Qs(t=n.childNodes).call(t,(function(t){var n=t.dataset.type;switch(n){case"RowLeft":e.setStyle(t,"top","".concat(c.top-s.top+c.height/2-t.offsetHeight/2,"px")),e.setStyle(t,"left","".concat(-t.offsetWidth/2,"px"));break;case"RowRight":e.setStyle(t,"top","".concat(c.top-s.top+c.height/2-t.offsetHeight/2,"px")),e.setStyle(t,"left","".concat(s.width-t.offsetWidth/2,"px"));break;case"ColUp":e.setStyle(t,"left","".concat(c.left-s.left+c.width/2-t.offsetWidth/2,"px")),e.setStyle(t,"top","".concat(-t.offsetHeight/2,"px"));break;case"ColDown":e.setStyle(t,"left","".concat(c.left-s.left+c.width/2-t.offsetWidth/2,"px")),e.setStyle(t,"top","".concat(s.height-t.offsetHeight/2,"px"))}o&&Vh(n).call(n,"Row")&&e.setStyle(t,"display","none")}))}},{key:"$addLastRow",value:function(){var t=xf(this.tableEditor.info.selection,1)[0].line,e="".concat(Rf("|").call("|",this.tableEditor.info.columns),"\n");this.codeMirror.replaceRange(e,{line:t,ch:0}),this.$findTableInEditor(),this.$setSelection(this.tableEditor.info.tableIndex,"td")}},{key:"$addNextRow",value:function(){var t=xf(this.tableEditor.info.selection,2)[1].line,e="".concat(Rf("|").call("|",this.tableEditor.info.columns),"\n");this.codeMirror.replaceRange(e,{line:t+1,ch:0}),this.$findTableInEditor(),this.$setSelection(this.tableEditor.info.tableIndex,"td")}},{key:"$addLastCol",value:function(){var t=this;this.$setSelection(this.tableEditor.info.tableIndex,"table");var e=this.codeMirror.getSelection().split("\n"),n=lA(e).call(e,(function(e,n){var r=e.split("|"),i=1===n?":-:":"";return eA(r).call(r,t.tableEditor.info.tdIndex+1,0,i),r.join("|")})),r=n.join("\n");this.codeMirror.replaceSelection(r),this.$findTableInEditor(),this.$setSelection(this.tableEditor.info.tableIndex,"table")}},{key:"$addNextCol",value:function(){var t=this;this.$setSelection(this.tableEditor.info.tableIndex,"table");var e=this.codeMirror.getSelection().split("\n"),n=lA(e).call(e,(function(e,n){var r=e.split("|"),i=1===n?":-:":"";return eA(r).call(r,t.tableEditor.info.tdIndex+2,0,i),r.join("|")})),r=n.join("\n");this.codeMirror.replaceSelection(r),this.$findTableInEditor(),this.$setSelection(this.tableEditor.info.tableIndex,"table")}},{key:"$highlightColumn",value:function(){var t=this.tableEditor.info,e=t.tableNode,n=t.tdIndex,r=e.rows;r[0].cells[n].style.borderTop="1px solid red",r[r.length-1].cells[n].style.borderBottom="1px solid red";for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"",n=this.tableEditor.info,r=n.trNode,i=n.tableNode,a=r.cells,o=(null===(t=r.previousElementSibling)||void 0===t?void 0:t.cells)||i.tHead.firstChild.cells,s=0;s=0&&nn&&(this.setStyle(t.parentElement,"border","1px solid #dfe6ee"),this.setStyle(t.parentElement,"border-top","2px solid #6897bb"))):en&&(this.setStyle(t,"border","1px solid #dfe6ee"),this.setStyle(t,"border-left","2px solid #6897bb")))}},{key:"$operateLines",value:function(t,e,n){if(te){var r=n[t];eA(n).call(n,t,1),eA(n).call(n,e,0,r)}return n}}])}(),Yx=Error,Jx=w("".replace),Zx=String(new Yx("zxcasd").stack),tE=/\n\s*at [^:]*:[^\n]*/,eE=tE.test(Zx),nE=!u((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",zt(1,7)),7!==t.stack)})),rE=function(t,e){if(eE&&"string"==typeof t&&!Yx.prepareStackTrace)for(;e--;)t=Jx(t,tE,"");return t},iE=nE,aE=Error.captureStackTrace,oE=function(t,e,n){for(var r=Xi(e),i=me.f,a=ye.f,o=0;o2&&sE(n,arguments[2]);var i=[];return sg(t,fE,{that:i}),Ce(n,"errors",i),n};$a?$a(dE,hE):oE(dE,hE,{name:!0});var AE=dE.prototype=Pn(hE.prototype,{constructor:zt(1,dE),message:zt(1,""),name:zt(1,"AggregateError")});Dn({global:!0,constructor:!0,arity:2},{AggregateError:dE});var gE,pE,mE,bE,vE=Ft("species"),yE=/(?:ipad|iphone|ipod).*applewebkit/i.test(G),wE=j.setImmediate,kE=j.clearImmediate,CE=j.process,xE=j.Dispatch,EE=j.Function,TE=j.MessageChannel,BE=j.String,_E=0,SE={},LE="onreadystatechange";u((function(){gE=j.location}));var IE=function(t){if(Bt(SE,t)){var e=SE[t];delete SE[t],e()}},ME=function(t){return function(){IE(t)}},OE=function(t){IE(t.data)},DE=function(t){j.postMessage(BE(t),gE.protocol+"//"+gE.host)};wE&&kE||(wE=function(t){ps(arguments.length,1);var e=$(t)?t:EE(t),n=Te(arguments,1);return SE[++_E]=function(){ve(e,void 0,n)},pE(_E),_E},kE=function(t){delete SE[t]},Um?pE=function(t){CE.nextTick(ME(t))}:xE&&xE.now?pE=function(t){xE.now(ME(t))}:TE&&!yE?(bE=(mE=new TE).port2,mE.port1.onmessage=OE,pE=ke(bE.postMessage,bE)):j.addEventListener&&$(j.postMessage)&&!j.importScripts&&gE&&"file:"!==gE.protocol&&!u(DE)?(pE=DE,j.addEventListener("message",OE,!1)):pE=LE in Ht("script")?function(t){xn.appendChild(Ht("script"))[LE]=function(){xn.removeChild(this),IE(t)}}:function(t){setTimeout(ME(t),0)});var FE={set:wE,clear:kE},NE=function(){this.head=null,this.tail=null};NE.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var PE,RE,QE,UE,$E,HE=NE,jE=/ipad|iphone|ipod/i.test(G)&&"undefined"!=typeof Pebble,KE=/web0s(?!.*chrome)/i.test(G),zE=FE,GE=HE,XE=jE,VE=KE,WE=zE.set,qE=j.MutationObserver||j.WebKitMutationObserver,YE=j.document,JE=j.process,ZE=j.Promise,tT=zw("queueMicrotask");if(!tT){var eT=new GE,nT=function(){var t,e;for(Um&&(t=JE.domain)&&t.exit();e=eT.get();)try{e()}catch(t){throw eT.head&&PE(),t}t&&t.enter()};yE||Um||VE||!qE||!YE?!XE&&ZE&&ZE.resolve?((UE=ZE.resolve(void 0)).constructor=ZE,$E=ke(UE.then,UE),PE=function(){$E(nT)}):Um?PE=function(){JE.nextTick(nT)}:(WE=ke(WE,j),PE=function(){WE(nT)}):(RE=!0,QE=YE.createTextNode(""),new qE(nT).observe(QE,{characterData:!0}),PE=function(){QE.data=RE=!RE}),tT=function(t){eT.head||PE(),eT.add(t)}}var rT,iT,aT=tT,oT=j.Promise,sT="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,cT=!sT&&!Um&&"object"==typeof window&&"object"==typeof document,lT=oT,uT=cT,hT=lT&&lT.prototype,fT=Ft("species"),dT=!1,AT=$(j.PromiseRejectionEvent),gT=we("Promise",(function(){var t=$e(lT),e=t!==String(lT);if(!e&&66===Y)return!0;if(!hT.catch||!hT.finally)return!0;if(!Y||Y<51||!/native code/.test(t)){var n=new lT((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[fT]=r,!(dT=n.then((function(){}))instanceof r))return!0}return!e&&(uT||sT)&&!AT})),pT=TypeError,mT=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new pT("Bad Promise constructor");e=t,n=r})),this.resolve=ut(e),this.reject=ut(n)},bT=function(t,e){var n,r=ue(t).constructor;return void 0===r||P(n=ue(r)[vE])?e:Nn(n)},vT=aT,yT=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},wT=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},kT={CONSTRUCTOR:gT,REJECTION_EVENT:AT,SUBCLASSING:dT},CT={f:function(t){return new mT(t)}},xT=zE.set,ET="Promise",TT=kT.CONSTRUCTOR,BT=kT.REJECTION_EVENT,_T=Ir.getterFor(ET),ST=Ir.set,LT=lT&&lT.prototype,IT=lT,MT=LT,OT=j.TypeError,DT=j.document,FT=j.process,NT=CT.f,PT=NT,RT=!!(DT&&DT.createEvent&&j.dispatchEvent),QT="unhandledrejection",UT=function(t){var e;return!(!ft(t)||!$(e=t.then))&&e},$T=function(t,e){var n,r,i,a=e.value,o=1===e.state,s=o?t.ok:t.fail,c=t.resolve,l=t.reject,u=t.domain;try{s?(o||(2===e.rejection&>(e),e.rejection=1),!0===s?n=a:(u&&u.enter(),n=s(a),u&&(u.exit(),i=!0)),n===t.promise?l(new OT("Promise-chain cycle")):(r=UT(n))?ht(r,n,c,l):c(n)):l(a)}catch(t){u&&!i&&u.exit(),l(t)}},HT=function(t,e){t.notified||(t.notified=!0,vT((function(){for(var n,r=t.reactions;n=r.get();)$T(n,t);t.notified=!1,e&&!t.rejection&&KT(t)})))},jT=function(t,e,n){var r,i;RT?((r=DT.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),j.dispatchEvent(r)):r={promise:e,reason:n},!BT&&(i=j["on"+t])?i(r):t===QT&&yT("Unhandled promise rejection",n)},KT=function(t){ht(xT,j,(function(){var e,n=t.facade,r=t.value;if(zT(t)&&(e=wT((function(){Um?FT.emit("unhandledRejection",r,n):jT(QT,n,r)})),t.rejection=Um||zT(t)?2:1,e.error))throw e.value}))},zT=function(t){return 1!==t.rejection&&!t.parent},GT=function(t){ht(xT,j,(function(){var e=t.facade;Um?FT.emit("rejectionHandled",e):jT("rejectionhandled",e,t.value)}))},XT=function(t,e,n){return function(r){t(e,r,n)}},VT=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,HT(t,!0))},WT=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new OT("Promise can't be resolved itself");var r=UT(e);r?vT((function(){var n={done:!1};try{ht(r,e,XT(WT,n,t),XT(VT,n,t))}catch(e){VT(n,e,t)}})):(t.value=e,t.state=1,HT(t,!1))}catch(e){VT({done:!1},e,t)}}};TT&&(MT=(IT=function(t){cg(this,MT),ut(t),ht(rT,this);var e=_T(this);try{t(XT(WT,e),XT(VT,e))}catch(t){VT(e,t)}}).prototype,(rT=function(t){ST(this,{type:ET,done:!1,notified:!1,parent:!1,reactions:new GE,rejection:!1,state:0,value:void 0})}).prototype=ir(MT,"then",(function(t,e){var n=_T(this),r=NT(bT(this,IT));return n.parent=!0,r.ok=!$(t)||t,r.fail=$(e)&&e,r.domain=Um?FT.domain:void 0,0===n.state?n.reactions.add(r):vT((function(){$T(r,n)})),r.promise})),iT=function(){var t=new rT,e=_T(t);this.promise=t,this.resolve=XT(WT,e),this.reject=XT(VT,e)},CT.f=NT=function(t){return t===IT||undefined===t?new iT(t):PT(t)}),Dn({global:!0,constructor:!0,wrap:!0,forced:TT},{Promise:IT}),Lr(IT,ET,!1,!0),gg(ET);var qT=kT.CONSTRUCTOR||!Oh((function(t){lT.all(t).then(void 0,(function(){}))}));Dn({target:"Promise",stat:!0,forced:qT},{all:function(t){var e=this,n=CT.f(e),r=n.resolve,i=n.reject,a=wT((function(){var n=ut(e.resolve),a=[],o=0,s=1;sg(t,(function(t){var c=o++,l=!1;s++,ht(n,e,t).then((function(t){l||(l=!0,a[c]=t,--s||r(a))}),i)})),--s||r(a)}));return a.error&&i(a.value),n.promise}});var YT=kT.CONSTRUCTOR;lT&&lT.prototype;Dn({target:"Promise",proto:!0,forced:YT,real:!0},{catch:function(t){return this.then(void 0,t)}}),Dn({target:"Promise",stat:!0,forced:qT},{race:function(t){var e=this,n=CT.f(e),r=n.reject,i=wT((function(){var i=ut(e.resolve);sg(t,(function(t){ht(i,e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}}),Dn({target:"Promise",stat:!0,forced:kT.CONSTRUCTOR},{reject:function(t){var e=CT.f(this);return(0,e.reject)(t),e.promise}});var JT=function(t,e){if(ue(t),ft(e)&&e.constructor===t)return e;var n=CT.f(t);return(0,n.resolve)(e),n.promise},ZT=kT.CONSTRUCTOR,tB=nt("Promise"),eB=!ZT;Dn({target:"Promise",stat:!0,forced:gt},{resolve:function(t){return JT(eB&&this===tB?lT:this,t)}}),Dn({target:"Promise",stat:!0,forced:qT},{allSettled:function(t){var e=this,n=CT.f(e),r=n.resolve,i=n.reject,a=wT((function(){var n=ut(e.resolve),i=[],a=0,o=1;sg(t,(function(t){var s=a++,c=!1;o++,ht(n,e,t).then((function(t){c||(c=!0,i[s]={status:"fulfilled",value:t},--o||r(i))}),(function(t){c||(c=!0,i[s]={status:"rejected",reason:t},--o||r(i))}))})),--o||r(i)}));return a.error&&i(a.value),n.promise}});var nB="No one promise resolved";Dn({target:"Promise",stat:!0,forced:qT},{any:function(t){var e=this,n=nt("AggregateError"),r=CT.f(e),i=r.resolve,a=r.reject,o=wT((function(){var r=ut(e.resolve),o=[],s=0,c=1,l=!1;sg(t,(function(t){var u=s++,h=!1;c++,ht(r,e,t).then((function(t){h||l||(l=!0,i(t))}),(function(t){h||l||(h=!0,o[u]=t,--c||a(new n(o,nB)))}))})),--c||a(new n(o,nB))}));return o.error&&a(o.value),r.promise}}),Dn({target:"Promise",stat:!0},{withResolvers:function(){var t=CT.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var rB=lT&&lT.prototype,iB=!!lT&&u((function(){rB.finally.call({then:function(){}},(function(){}))}));Dn({target:"Promise",proto:!0,real:!0,forced:iB},{finally:function(t){var e=bT(this,nt("Promise")),n=$(t);return this.then(n?function(n){return JT(e,t()).then((function(){return n}))}:t,n?function(n){return JT(e,t()).then((function(){throw n}))}:t)}});var aB=H.Promise,oB=aB;Dn({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Te(arguments,1),n=CT.f(this),r=wT((function(){return ve(ut(t),void 0,e)}));return(r.error?n.reject:n.resolve)(r.value),n.promise}});var sB=oB,cB=sB;function lB(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):cB.resolve(c).then(r,i)}function uB(t){return function(){var e=this,n=arguments;return new cB((function(r,i){var a=t.apply(e,n);function o(t){lB(a,r,i,o,s,"next",t)}function s(t){lB(a,r,i,o,s,"throw",t)}o(void 0)}))}}var hB=r((function(t){function e(n){return t.exports=e="function"==typeof xo&&"symbol"==typeof No?function(t){return typeof t}:function(t){return t&&"function"==typeof xo&&t.constructor===xo&&t!==xo.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}));n(hB);var fB=Rs,dB=w([].reverse),AB=[1,2];Dn({target:"Array",proto:!0,forced:String(AB)===String(AB.reverse())},{reverse:function(){return pr(this)&&(this.length=this.length),dB(this)}});var gB=Ni("Array","reverse"),pB=Array.prototype,mB=function(t){var e=t.reverse;return t===pB||rt(pB,t)&&e===pB.reverse?gB:e},bB=fB,vB=mB,yB=bf,wB=r((function(t){var e=hB.default;function n(){t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var r,i={},a=Object.prototype,o=a.hasOwnProperty,s=ia||function(t,e,n){t[e]=n.value},c="function"==typeof xo?xo:{},l=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function f(t,e,n){return ia(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var i=e&&e.prototype instanceof y?e:y,a=is(i.prototype),o=new M(r||[]);return s(a,"_invoke",{value:_(t,n,o)}),a}function A(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}i.wrap=d;var g="suspendedStart",p="suspendedYield",m="executing",b="completed",v={};function y(){}function w(){}function k(){}var C={};f(C,l,(function(){return this}));var x=Zo&&Zo(Zo(O([])));x&&x!==a&&o.call(x,l)&&(C=x);var E=k.prototype=y.prototype=is(C);function T(t){var e;bB(e=["next","throw","return"]).call(e,(function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function B(t,n){function r(i,a,s,c){var l=A(t[i],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==e(h)&&o.call(h,"__await")?n.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):n.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var i;s(this,"_invoke",{value:function(t,e){function a(){return new n((function(n,i){r(t,e,n,i)}))}return i=i?i.then(a,a):a()}})}function _(t,e,n){var i=g;return function(a,o){if(i===m)throw Error("Generator is already running");if(i===b){if("throw"===a)throw o;return{value:r,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var c=S(s,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===g)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var l=A(t,e,n);if("normal"===l.type){if(i=n.done?b:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=b,n.method="throw",n.arg=l.arg)}}}function S(t,e){var n=e.method,i=t.iterator[n];if(i===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,S(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=A(i,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,v;var o=a.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,v):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,v)}function L(t){var e,n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),lf(e=this.tryEntries).call(e,n)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],bB(t).call(t,L,this),this.reset(!0)}function O(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),v}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));n(wB);var kB=wB(),CB=kB;try{regeneratorRuntime=kB}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=kB:Function("r","regeneratorRuntime = r")(kB)}var xB=CB;function EB(t){function e(e){e.clipboardData.setData("text/html",t),e.clipboardData.setData("text/plain",t),e.preventDefault()}document.addEventListener("copy",e),document.execCommand("copy"),document.removeEventListener("copy",e)}function TB(t){var e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}function BB(t){return _B.apply(this,arguments)}function _B(){return _B=uB(xB.mark((function t(e){return xB.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(navigator.clipboard){t.next=3;break}return TB(e),t.abrupt("return");case 3:return t.next=5,navigator.clipboard.writeText(e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)}))),_B.apply(this,arguments)}var SB=function(){return Ho((function t(e,n,r,i,a,o){ra(this,t),cs(this,"codeBlockEditor",{info:{},editorDom:{}}),this.trigger=e,this.target=n,this.previewerDom=i,this.container=r,this.codeMirror=a,this.$cherry=o.previewer.$cherry,this.parent=o,this.$initReg()}),[{key:"$initReg",value:function(){this.codeBlockReg=this.codeBlockReg?this.codeBlockReg:Id().reg}},{key:"emit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};switch(t){case"remove":return this.$remove();case"scroll":return this.$updateContainerPosition();case"previewUpdate":return this.$updateContainerPosition(),void(this.editing&&this.$setInputOffset());case"mouseup":return this.$tryRemoveMe(e,n)}}},{key:"$remove",value:function(){this.codeBlockEditor={info:{},codeBlockCodes:[],editorDom:{}}}},{key:"$tryRemoveMe",value:function(t,e){var n=this.codeBlockEditor.editorDom.inputDiv;this.editing&&n&&!n.contains(t.target)&&(this.editing=!1,this.$remove(),e())}},{key:"$findCodeInEditor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$collectCodeBlockDom(),this.$collectCodeBlockCode(),t?this.$setLangSelection(this.codeBlockEditor.info.codeBlockIndex):this.$setBlockSelection(this.codeBlockEditor.info.codeBlockIndex)}},{key:"$collectCodeBlockDom",value:function(){var t=Nh(this.previewerDom.querySelectorAll('[data-type="codeBlock"]'));this.codeBlockEditor.info={codeBlockNode:this.target,codeBlockIndex:Ef(t).call(t,this.target)}}},{key:"$collectCodeBlockCode",value:function(){var t=[];this.codeMirror.getValue().replace(this.codeBlockReg,(function(e){var n,r=e.replace(/^\n*/,""),i=((n=(arguments.length<=1?0:arguments.length-1)-2+1)<1||arguments.length<=n?void 0:arguments[n])+e.match(/^\n*/)[0].length;Vh(r).call(r,"```mermaid")||t.push({code:r,offset:i})})),this.codeBlockEditor.codeBlockCodes=t}},{key:"$setBlockSelection",value:function(t){var e,n,r,i,a=this.codeBlockEditor.codeBlockCodes[t],o=this.codeMirror.getValue(),s=null!==(e=null===(n=Bf(o).call(o,0,a.offset).match(/\n/g))||void 0===n?void 0:n.length)&&void 0!==e?e:0,c=s+a.code.match(/\n/g).length,l=Bf(r=a.code).call(r,0,-3).match(/[^\n]+\n*$/)[0].length;this.codeBlockEditor.info.selection=[{line:c-1,ch:l},{line:s+1,ch:0}],(i=this.codeMirror).setSelection.apply(i,kp(this.codeBlockEditor.info.selection))}},{key:"$setLangSelection",value:function(t){var e,n,r,i,a=this.codeBlockEditor.codeBlockCodes[t],o=this.codeMirror.getValue(),s=null!==(e=null===(n=Bf(o).call(o,0,a.offset).match(/\n/g))||void 0===n?void 0:n.length)&&void 0!==e?e:0,c=(null!==(r=a.code.match(/```\s*[^\n]+/)[0])&&void 0!==r?r:"```").length;this.codeBlockEditor.info.selection=[{line:s,ch:3},{line:s,ch:c}],(i=this.codeMirror).setSelection.apply(i,kp(this.codeBlockEditor.info.selection))}},{key:"showBubble",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$updateContainerPosition(),"hover"===this.trigger&&this.$showBtn(e),"click"===this.trigger&&this.$showContentEditor(),this.container.addEventListener("wheel",(function(e){e.stopPropagation(),e.preventDefault(),t.previewerDom.scrollTop+=e.deltaY/3}))}},{key:"$showContentEditor",value:function(){this.editing=!0,this.$findCodeInEditor(),this.$drawEditor()}},{key:"$showBtn",value:function(t){var e=this,n=this.target.dataset,r=n.changeLang,i=n.editCode,a=n.copyCode,o=n.lang,s=n.expandCode;if(this.container.innerHTML="","true"===r&&t){this.container.innerHTML=function(t){var e,n=lA(jv).call(jv,(function(e){var n,r;return t===e?hs(r='"):hs(n='")}));return hs(e='")}(o);var c=this.container.querySelector("#code-preview-lang-select");this.changeLangDom=c,this.changeLangDom.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.parent.$removeAllPreviewerBubbles("click"),e.$changeLang(t.target.value||"")}))}if("true"===i&&t){var l=document.createElement("div");l.className="cherry-edit-code-block",l.innerHTML='',this.container.appendChild(l),l.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.$expandCodeBlock(!0),e.$hideAllBtn(),e.parent.$removeAllPreviewerBubbles("click"),e.parent.showCodeBlockPreviewerBubbles("click",e.target)})),this.editDom=l}if("true"===a){var u=document.createElement("div");u.className="cherry-copy-code-block",u.innerHTML='',this.container.appendChild(u),u.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.parent.$removeAllPreviewerBubbles("click"),e.$copyCodeBlock()})),this.copyDom=u}if("true"===s){var h=this.target.classList.contains("cherry-code-expand"),f=this.target.querySelector(".cherry-mask-code-block"),d=document.createElement("div");d.className="cherry-unExpand-code-block",d.innerHTML='',h&&f||d.classList.add("hidden"),this.container.appendChild(d),d.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.parent.$removeAllPreviewerBubbles("click"),e.$expandCodeBlock(!1)})),this.unExpandDom=d}}},{key:"$hideAllBtn",value:function(){var t,e,n,r,i,a,o,s;null!==(t=this.changeLangDom)&&void 0!==t&&null!==(e=t.style)&&void 0!==e&&e.display&&(this.changeLangDom.style.display="none"),null!==(n=this.editDom)&&void 0!==n&&null!==(r=n.style)&&void 0!==r&&r.display&&(this.editDom.style.display="none"),null!==(i=this.copyDom)&&void 0!==i&&null!==(a=i.style)&&void 0!==a&&a.display&&(this.copyDom.style.display="none"),null!==(o=this.unExpandDom)&&void 0!==o&&null!==(s=o.style)&&void 0!==s&&s.display&&(this.unExpandDom.style.display="none")}},{key:"$changeLang",value:function(t){this.$findCodeInEditor(!0),this.codeMirror.replaceSelection(t,"around")}},{key:"$drawEditor",value:function(){var t=document.createElement("div");t.className="cherry-previewer-codeBlock-content-handler__input";var e=document.createElement("textarea");e.id="codeMirrorEditor",t.appendChild(e);var n=Wh.fromTextArea(e,{mode:"",theme:"default",scrollbarStyle:"null",lineNumbers:!0,autofocus:!0,lineWrapping:!0,cursorHeight:.85,indentUnit:4,tabSize:4,keyMap:"sublime"}),r=this.codeMirror;n.on("change",(function(){r.replaceSelection(n.getValue(),"around")})),this.codeBlockEditor.editorDom.inputDiv=t,this.codeBlockEditor.editorDom.inputDom=n,this.$updateEditorPosition(),this.container.appendChild(this.codeBlockEditor.editorDom.inputDiv),this.codeBlockEditor.editorDom.inputDom.focus(),this.codeBlockEditor.editorDom.inputDom.refresh(),n.setValue(this.codeMirror.getSelection())}},{key:"$expandCodeBlock",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.unExpandDom&&(this.target.classList.remove("cherry-code-unExpand"),this.target.classList.remove("cherry-code-expand"),this.unExpandDom.classList.remove("hidden"),t?this.target.classList.add("cherry-code-expand"):(this.unExpandDom.classList.add("hidden"),this.target.classList.add("cherry-code-unExpand")))}},{key:"$copyCodeBlock",value:function(){var t=this.target.querySelector("pre").innerText,e=this.$cherry.options.callback.onCopyCode({target:this.target},t);if(!1===e)return!1;var n=this.copyDom.querySelector("i.ch-icon-copy");n&&(n.className=n.className.replace("copy","ok"),ks((function(){n.className=n.className.replace("ok","copy")}),1e3)),EB(e)}},{key:"$updateContainerPosition",value:function(){this.codeBlockEditor.info.codeBlockNode=this.target;var t=this.$getPosition();this.setStyle(this.container,"width","".concat(t.width,"px")),this.setStyle(this.container,"top","".concat(t.top,"px")),this.setStyle(this.container,"left","".concat(t.left,"px"))}},{key:"$updateEditorPosition",value:function(){this.$setInputOffset();var t=getComputedStyle(this.codeBlockEditor.info.codeBlockNode),e=this.codeBlockEditor.editorDom.inputDom.getWrapperElement();this.setStyle(e,"fontSize",t.fontSize||"16px"),this.setStyle(e,"fontFamily",t.fontFamily),this.setStyle(e,"lineHeight","1.8em"),this.setStyle(e,"zIndex","1")}},{key:"$setInputOffset",value:function(){var t=this.$getPosition(),e=this.codeBlockEditor.editorDom.inputDiv;this.setStyle(e,"width","".concat(t.width,"px")),this.setStyle(e,"height","".concat(t.height+10,"px"))}},{key:"setStyle",value:function(t,e,n){t.getBoundingClientRect()[e]!==n&&(t.style[e]=n)}},{key:"$getPosition",value:function(){var t=this.codeBlockEditor.info.codeBlockNode.getBoundingClientRect(),e=this.previewerDom.parentNode.getBoundingClientRect();return{top:t.top-e.top,height:t.height,width:t.width,left:t.left-e.left,maxHeight:e.height}}}])}(),LB=function(t,e,n){return Math.min(Math.max(t,e),n)},IB={open:function(){this.resetStyle(),this.dom.style.display="block",this.postMessage("ready?")},close:function(){this.dom.style.display="none"},postMessage:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";null===(e=this.iframeDom)||void 0===e||null===(n=e.contentWindow)||void 0===n||n.postMessage({eventName:t,value:r},"*")},resetStyle:function(){var t=this.dom;t.style.left="10%",t.style.top="10%"},bindEvents:function(){this.bindClickEvents(),this.bindDNDEvents()},bindClickEvents:function(){var t=this;this.headCloseButton.addEventListener("click",(function(){t.close()})),this.footSureButton.addEventListener("click",(function(){t.postMessage("getData")}))},bindDNDEvents:function(){var t,e,n=this.dom,r=this.head,i=this.body,a=function(r){r.preventDefault();var i=LB(r.clientX-t,0,window.innerWidth-16),a=LB(r.clientY-e,0,window.innerHeight-16);n.style.left="".concat(i,"px"),n.style.top="".concat(a,"px")},o=function t(e){r.style.cursor="grab",i.style.pointerEvents=null,document.removeEventListener("mousemove",a),document.removeEventListener("mousemove",t)};r.addEventListener("mousedown",(function(s){s.target.classList.contains("cherry-dialog--close")||(t=s.clientX-n.offsetLeft,e=s.clientY-n.offsetTop,r.style.cursor="grabbing",i.style.pointerEvents="none",document.addEventListener("mousemove",a),document.addEventListener("mouseup",o))}))},draw:function(t,e,n){var r=this,i=t.iframeSrc,a=t.iframeStyle,o=t.title;if(this.onSubmit=n,this.onReady=e,this.dom)return new RegExp("".concat(i,"$"),"i").test(this.iframeDom.src)||(this.iframeDom.src=i),void this.open();window.addEventListener("message",(function(t){if(t.data&&t.data.eventName)switch(t.data.eventName){case"getData:success":r.onSubmit(t.data.value),r.close();case"ready":r.onReady()}})),this.iframeDom=Zf("iframe","cherry-dialog-iframe",{src:i,style:a}),this.dom=Zf("div","cherry-dialog",{style:["z-index:9999","display: block","position: absolute","top: 10%;left: 10%;width: 80%;height: 80%;","background-color: #FFF","box-shadow: 0px 50px 100px -12px rgba(0,0,0,.05),0px 30px 60px -30px rgba(0,0,0,.1)","border-radius: 6px","border: 1px solid #ddd;"].join(";")}),this.head=Zf("div","cherry-dialog--head",{style:["height: 30px","line-height: 30px","padding-left: 10px","padding-right: 10px","cursor: grab;"].join(";")}),this.body=Zf("div","cherry-dialog--body",{style:["position: absolute","bottom: 30px","top: 30px","left: 0","right: 0","overflow: hidden"].join(";")}),this.foot=Zf("div","cherry-dialog--foot",{style:["height: 30px","line-height: 30px","padding-left: 10px","padding-right: 10px","position: absolute","bottom: 0","left: 0","right: 0"].join(";")}),this.headTitle=Zf("span","cherry-dialog--title",{style:"user-select:none;"}),this.headCloseButton=Zf("i","cherry-dialog--close ch-icon ch-icon-close",{style:"float: right;font-size: 12px;cursor: pointer;"}),this.footSureButton=Zf("button","cherry-dialog--sure",{style:["float: right","cursor: pointer","margin: 3px","background-color: #4d90fe","color: #FFF","border: 1px solid #4d90fe","border-radius: 2px","padding: 2px 15px","user-select:none"].join(";")}),this.headCloseButton.title="关闭",this.footSureButton.textContent="确定",this.headTitle.textContent=o,this.head.appendChild(this.headTitle),this.head.appendChild(this.headCloseButton),this.foot.appendChild(this.footSureButton),this.body.appendChild(this.iframeDom),this.dom.appendChild(this.head),this.dom.appendChild(this.body),this.dom.appendChild(this.foot),this.bindEvents(),document.body.appendChild(this.dom)}};function MB(){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n={iframeSrc:arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",iframeStyle:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",title:"draw.io"};IB.draw(n,(function(){IB.postMessage("setData",t)}),(function(t){e(t)}))}var OB=function(){return nc.Date.now()},DB=/\s/;var FB=function(t){for(var e=t.length;e--&&DB.test(t.charAt(e)););return e},NB=/^\s+/;var PB=function(t){return t?t.slice(0,FB(t)+1).replace(NB,""):t},RB=/^[-+]0x[0-9a-f]+$/i,QB=/^0b[01]+$/i,UB=/^0o[0-7]+$/i,$B=parseInt;var HB=function(t){if("number"==typeof t)return t;if(Ov(t))return NaN;if(dc(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=dc(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=PB(t);var n=QB.test(t);return n||UB.test(t)?$B(t.slice(2),n?2:8):RB.test(t)?NaN:+t},jB=Math.max,KB=Math.min;var zB=function(t,e,n){var r,i,a,o,s,c,l=0,u=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,a=i;return r=i=void 0,l=e,o=t.apply(a,n)}function A(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=a}function g(){var t=OB();if(A(t))return p(t);s=setTimeout(g,function(t){var n=e-(t-c);return h?KB(n,a-(t-l)):n}(t))}function p(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function m(){var t=OB(),n=A(t);if(r=arguments,i=this,c=t,n){if(void 0===s)return function(t){return l=t,s=setTimeout(g,e),u?d(t):o}(c);if(h)return clearTimeout(s),s=setTimeout(g,e),d(c)}return void 0===s&&(s=setTimeout(g,e)),o}return e=HB(e)||0,dc(n)&&(u=!!n.leading,a=(h="maxWait"in n)?jB(HB(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},m.flush=function(){return void 0===s?o:p(OB())},m};function GB(t,e){var n=document.createElement("a");n.href=t,n.download=e,n.click(),n.remove()}function XB(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("svg"!==e.format){var n=e.width,r=void 0===n?t.width.baseVal.value:n,i=e.height,a=void 0===i?t.height.baseVal.value:i,o=e.scale,s=void 0===o?5:o,c=e.quality,l=void 0===c?1:c,u=e.backgroundColor,h=void 0===u?"white":u,f=e.filename,d=void 0===f?"formula":f,A=e.format,g=void 0===A?"png":A,p=e.mimeType,m=void 0===p?"image/png":p,b=VB(t),v=document.createElement("canvas"),y=v.getContext("2d"),w=new Image;w.src="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(b)))),w.onload=function(){v.width=r*s,v.height=a*s,y.fillStyle=h,y.fillRect(0,0,v.width,v.height),y.drawImage(w,0,0,v.width,v.height),v.toBlob((function(t){var e,n=xx.createObjectURL(t);GB(n,hs(e="".concat(d,".")).call(e,g)),xx.revokeObjectURL(n)}),m,l)}}else{var k;!function(t,e){var n=VB(t),r=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),i=xx.createObjectURL(r);GB(i,e),xx.revokeObjectURL(i)}(t,null!==(k=e.filename)&&void 0!==k?k:"formula.svg")}}function VB(t){return(new XMLSerializer).serializeToString(t)}var WB=function(){return Ho((function t(e,n,r,i,a){ra(this,t),cs(this,"bubbleContainer",null),this.trigger=e,this.target=n,this.container=r,this.previewerDom=i,this.editor=a}),[{key:"emit",value:function(t,e){switch(t){case"remove":case"scroll":return this.remove()}}},{key:"drawBubble",value:function(){var t,e,n,r=document.createElement("div");r.innerHTML='
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    ',r.id="formula-utils-bubble-container",r.className=["formula-utils-bubble-container"].join(" "),this.bubbleContainer=r,null==this||null===(t=this.editor)||void 0===t||null===(e=t.$cherry)||void 0===e||null===(n=e.wrapperDom)||void 0===n||n.appendChild(r)}},{key:"showBubble",value:function(t,e){var n,r,i,a,o,s=null==this||null===(n=this.editor)||void 0===n||null===(r=n.$cherry)||void 0===r||null===(i=r.wrapperDom)||void 0===i||null===(a=i.children)||void 0===a?void 0:a.namedItem("formula-utils-bubble-container"),c=this.target.getBoundingClientRect();s instanceof HTMLElement?this.bubbleContainer=s:this.drawBubble(),this.bubbleContainer.style.display="flex",this.bubbleContainer.style.top="".concat(e||c.top,"px"),this.bubbleContainer.style.left="".concat(t||c.left,"px"),this.bubbleContainer.addEventListener("click",fs(o=this.bubbleClickHandler).call(o,this),{once:!0}),this.collectFormulaCode()}},{key:"collectFormulaCode",value:function(){var t=[];this.editor.editor.getValue().replace(/(\$+)\s*([\w\W]*?)\s*(\1)/g,(function(e,n,r,i,a){t.push({code:r,offset:a})})),this.formulaCode=t}},{key:"remove",value:function(){this.bubbleContainer&&(this.bubbleContainer.style.display="none")}},{key:"bubbleClickHandler",value:function(t){var e=this;t.preventDefault(),t.stopPropagation();var n=t.target;if(n instanceof HTMLButtonElement){var r=n.dataset.name,i=void 0===r?"":r;switch(i){case"svg":case"png":case"jpg":this.target instanceof SVGSVGElement&&XB(this.target,{format:i});break;case"html":case"svgcode":if(this.target instanceof SVGSVGElement)if("svgcode"===i)BB(VB(this.target));else{var a=this.target.parentElement.querySelector("math");a.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),BB(a.outerHTML)}break;case"\\":case"$":case"$$":case"latex":case"mathml":case"docx":var o=this.previewerDom.querySelectorAll("mjx-container"),s=-1;if(Qs(o).call(o,(function(t,n){t===e.target.parentElement&&(s=n)})),s>=0&&this.formulaCode[s]){var c=this.formulaCode[s].code;if("mathml"===i||"docx"===i){var l,u,h,f,d=ah(l=this.editor.$cherry.engine.hooks.paragraph).call(l,(function(t){return t instanceof Mb}));if(d&&"MathJax"===d.engine)null===(u=window.MathJax)||void 0===u||u.texReset(),null===(h=window.MathJax)||void 0===h||null===(f=h.tex2mmlPromise)||void 0===f||f.call(h,c,{display:!0}).then((function(t){"mathml"===i&&BB(t)}))}else if("latex"===i)BB(c);else if("$"===i){var A,g;BB(hs(A=hs(g="".concat(i)).call(g,c)).call(A,i))}else if("$$"===i){var p,m;BB(hs(p=hs(m="".concat(i,"\n")).call(m,c,"\n")).call(p,i))}else"\\"===i&&BB("\\".concat(c))}}}this.remove()}}])}(),qB=(ye.f,ie("".slice)),YB=Math.min,JB=Hh("endsWith");Dn({target:"String",proto:!0,forced:!JB},{endsWith:function(t){var e=xr(U(this));$h(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,i=void 0===n?r:YB(cn(n),r),a=xr(t);return qB(e,i-a.length,i)===a}});var ZB=Ni("String","endsWith"),t_=String.prototype,e_=function(t){var e=t.endsWith;return"string"==typeof t||t===t_||rt(t_,t)&&e===t_.endsWith?ZB:e},n_=function(){return Ho((function t(e,n,r,i,a){var o,s;ra(this,t),cs(this,"bubbleContainer",null),cs(this,"regList",Sd),cs(this,"range",[]),cs(this,"position",{line:0,ch:0}),cs(this,"input",!1),cs(this,"isCheckbox",!1),this.trigger=e,this.target=n,this.container=r,this.previewerDom=i,this.editor=a,this.insertLineBreak=!1,this.handleEditablesInputBinded=fs(o=this.handleEditablesInput).call(o,this),this.handleEditablesUnfocusBinded=fs(s=this.handleEditablesUnfocus).call(s,this),this.target.addEventListener("input",this.handleEditablesInputBinded,!1),this.target.addEventListener("focusout",this.handleEditablesUnfocusBinded,!1),this.setSelection()}),[{key:"emit",value:function(t,e){if("remove"===t)return this.remove()}},{key:"remove",value:function(){this.bubbleContainer&&(this.bubbleContainer.style.display="none",this.bubbleContainer.children[0]instanceof HTMLTextAreaElement&&(this.bubbleContainer.children[0].value="")),this.target.removeAttribute("contenteditable"),this.target.removeEventListener("input",this.handleEditablesInputBinded,!1),this.target.removeEventListener("focusout",this.handleEditablesUnfocusBinded,!1);var t=this.editor.editor.getCursor();this.editor.editor.setSelection(t,t)}},{key:"setSelection",value:function(){var t,e,n,r=this,i=Nh(this.previewerDom.querySelectorAll("li.cherry-list-item")),a=Xd(i).call(i,(function(t){return t===r.target.parentElement}));if(-1!==a){for(var o=null!==(t=null===(e=Rd(null==this?void 0:this.editor.editor.getValue()))||void 0===e?void 0:e.split("\n"))&&void 0!==t?t:[],s=0,c=-1,l=-1,u=[],h=0;h0)break;var A=xf(d,5),g=A[1],p=A[2],m=A[3],b=A[4];s===a&&void 0!==g&&(c=h,u.push(b),l=Ef(f).call(f,b),null!=p&&e_(p).call(p,".")&&(l+=1),m&&(this.isCheckbox=!0)),s+=1}else u.length>0&&u.push(f)}var v={line:c,ch:l},y={line:c+u.length-1,ch:l+(null===(n=u[u.length-1])||void 0===n?void 0:n.length)};this.editor.editor.setSelection(v,y),this.range=[v,y],this.position=this.editor.editor.getCursor()}}},{key:"handleEditablesInput",value:function(t){this.input=!0,t.stopPropagation(),t.preventDefault(),t.target instanceof HTMLParagraphElement&&("insertParagraph"!==t.inputType&&"insertLineBreak"!==t.inputType||(this.insertLineBreak=!0,this.handleInsertLineBreak(t)))}},{key:"handleEditablesUnfocus",value:function(t){if(t.stopPropagation(),t.preventDefault(),t.target instanceof HTMLParagraphElement){if(this.input){if(!this.insertLineBreak){var e=this.isCheckbox?t.target.innerHTML.replace(/<\/span>/,""):t.target.innerHTML,n=this.editor.$cherry.engine.makeMarkdown(e),r=xf(this.range,2),i=r[0],a=r[1];this.editor.editor.replaceRange(n,i,a)}this.isCheckbox=!1,this.input=!1,this.insertLineBreak=!1}this.remove()}}},{key:"handleInsertLineBreak",value:function(t){var e,n,r,i=[];"innerText"in t.target&&"string"==typeof t.target.innerText&&(i=t.target.innerText.split("\n"));var a,o,s=Cp(i),c=s[0],l=Bf(s).call(s,1),u=this.editor.editor.getCursor(),h=this.editor.editor.getLine(u.line),f=this.regList.exec(h),d="\n- ";null!==f&&(d=hs(a="\n".concat(f[1])).call(a,null===(o=f[2])||void 0===o?void 0:o.replace("[x]","[ ] ")));d+=null!==(e=null==l?void 0:l.join(""))&&void 0!==e?e:"",this.editor.editor.replaceRange(c,{line:u.line,ch:null!==(n=null===(r=f[2])||void 0===r?void 0:r.length)&&void 0!==n?n:0},{line:u.line,ch:h.length}),this.editor.editor.replaceRange(d,{line:u.line,ch:h.length}),this.editor.editor.setCursor({line:u.line+1,ch:d.length+1}),this.editor.editor.focus(),this.remove()}}])}(),r_=function(){return Ho((function t(e){ra(this,t),this.previewer=e,this.editor=e.editor,this.previewerDom=this.previewer.getDom(),this.$cherry=e.$cherry,this.bubble={},this.bubbleHandler={},this.init()}),[{key:"init",value:function(){var t,e,n,r=this;this.oldWrapperDomOverflow=this.previewer.$cherry.wrapperDom.style.overflow,this.previewerDom.addEventListener("click",fs(t=this.$onClick).call(t,this)),this.previewerDom.addEventListener("mouseover",fs(e=this.$onMouseOver).call(e,this)),document.addEventListener("mousedown",(function(t){var e;Qs(e=Fx(r.bubbleHandler)).call(e,(function(e){return e.emit("mousedown",t)}))})),document.addEventListener("mouseup",(function(t){var e;Qs(e=Fx(r.bubbleHandler)).call(e,(function(e){return e.emit("mouseup",t,(function(){return r.$removeAllPreviewerBubbles("click")}))}))})),document.addEventListener("mousemove",(function(t){var e;Qs(e=Fx(r.bubbleHandler)).call(e,(function(e){return e.emit("mousemove",t)}))})),document.addEventListener("keyup",(function(t){var e;Qs(e=Fx(r.bubbleHandler)).call(e,(function(e){return e.emit("keyup",t)}))})),this.previewerDom.addEventListener("scroll",(function(t){var e;Qs(e=Fx(r.bubbleHandler)).call(e,(function(e){return e.emit("scroll",t)}))}),!0),this.$cherry.$event.on("previewerClose",(function(){return r.$removeAllPreviewerBubbles()})),this.previewer.options.afterUpdateCallBack.push((function(){var t;Qs(t=Fx(r.bubbleHandler)).call(t,(function(t){return t.emit("previewUpdate",(function(){return r.$removeAllPreviewerBubbles()}))}))})),this.previewerDom.addEventListener("change",fs(n=this.$onChange).call(n,this)),this.removeHoverBubble=zB((function(){return r.$removeAllPreviewerBubbles("hover")}),400)}},{key:"isCherryCodeBlock",value:function(t){if(!1!==this.$getClosestNode(t,"BLOCKQUOTE"))return!1;if("DIV"===t.nodeName&&"codeBlock"===t.dataset.type)return t;var e=this.$getClosestNode(t,"DIV");return!1!==e&&("codeBlock"===e.dataset.type&&e)}},{key:"isCherryTable",value:function(t){var e=this.$getClosestNode(t,"DIV");return!1!==e&&(!(/simple-table/.test(e.className)||!/cherry-table-container/.test(e.className))&&(!1===this.$getClosestNode(t,"BLOCKQUOTE")&&e))}},{key:"$isEnableBubbleAndEditorShow",value:function(){return!!this.previewer.options.enablePreviewerBubble&&"hide"!==this.previewer.$cherry.getStatus().editor}},{key:"$onMouseOver",value:function(t){var e=t.target;if(e instanceof Element&&void 0!==e.tagName){switch(e.tagName){case"TD":case"TH":if(!this.$isEnableBubbleAndEditorShow())return;var n=this.isCherryTable(t.target);if(!1===n)return;return this.removeHoverBubble.cancel(),this.$removeAllPreviewerBubbles("hover"),void this.$showTablePreviewerBubbles("hover",t.target,n);case"PRE":case"CODE":case"SPAN":case"DIV":var r=this.isCherryCodeBlock(t.target);if(!1===r)return;return void this.showCodeBlockPreviewerBubbles("hover",r)}this.removeHoverBubble()}}},{key:"$onMouseOut",value:function(){this.previewer.options.enablePreviewerBubble&&this.previewer.$cherry.getStatus().editor}},{key:"$dealCheckboxClick",value:function(t){var e=this,n=t.target,r=Nh(this.previewerDom.querySelectorAll(".ch-icon-square, .ch-icon-check"));this.checkboxIdx=Ef(r).call(r,n);var i=Rd(this.editor.editor.getValue()).split("\n"),a=0,o=-1,s=-1;Qs(i).call(i,(function(t,n){var r=mh(t).call(t);(Vh(r).call(r,"- [ ]")||Vh(r).call(r,"- [x]"))&&(a===e.checkboxIdx&&(o=n,s=Ef(t).call(t,"- [")+3),a+=1)})),-1!==o&&(this.editor.editor.setSelection({line:o,ch:s},{line:o,ch:s+1}),this.editor.editor.replaceSelection(" "===this.editor.editor.getSelection()?"x":" ","around"))}},{key:"$onClick",value:function(t){var e,n=this,r=t.target;if(r instanceof Element)if(r instanceof HTMLImageElement&&"IMG"===r.tagName&&"drawio"===r.getAttribute("data-type")&&"show"===this.$cherry.status.editor){if(!this.beginChangeDrawioImg(r))return;var i=decodeURI(r.getAttribute("data-xml"));MB(this.previewer.$cherry.options.drawioIframeUrl,this.previewer.$cherry.options.drawioIframeStyle,i,(function(t){var e,r=t.xmlData,i=t.base64;n.editor.editor.replaceSelection(hs(e="(".concat(i,"){data-type=drawio data-xml=")).call(e,encodeURI(r),"}"),"around")}))}else{if("expand-btn "===r.className||"ch-icon ch-icon-expand"===r.className){var a,o,s=this.$getClosestNode(r,"DIV");s.parentNode.parentNode.classList.remove("cherry-code-unExpand"),s.parentNode.parentNode.classList.add("cherry-code-expand"),null!==(a=this.bubbleHandler)&&void 0!==a&&null!==(o=a.hover)&&void 0!==o&&o.unExpandDom&&this.bubbleHandler.hover.unExpandDom.classList.remove("hidden")}if(this.previewer.options.enablePreviewerBubble&&("ch-icon ch-icon-square"!==r.className&&"ch-icon ch-icon-check"!==r.className||this.$dealCheckboxClick(t),this.$removeAllPreviewerBubbles("click"),void 0!==r.tagName))switch(r.tagName){case"IMG":r instanceof HTMLImageElement&&this.$showImgPreviewerBubbles(r);break;case"TD":case"TH":if(r instanceof HTMLElement){var c=this.isCherryTable(r);if(!1===c)return;this.$showTablePreviewerBubbles("click",r,c)}break;case"svg":"MJX-CONTAINER"===(null==r||null===(e=r.parentElement)||void 0===e?void 0:e.tagName)&&this.$showFormulaPreviewerBubbles("click",r,{x:t.pageX,y:t.pageY});break;case"A":t.stopPropagation();break;case"P":r instanceof HTMLParagraphElement&&r.parentElement instanceof HTMLLIElement&&!1===this.$getClosestNode(r,"BLOCKQUOTE")&&(0!==r.children.length&&(t.preventDefault(),t.stopPropagation()),r.setAttribute("contenteditable","true"),r.focus(),this.$showListPreviewerBubbles("click",r))}}}},{key:"$onChange",value:function(t){}},{key:"$getClosestNode",value:function(t,e){return t.tagName===e?t:"BODY"!==t.parentNode.tagName&&this.$getClosestNode(t.parentNode,e)}},{key:"$removeAllPreviewerBubbles",value:function(){var t,e,n,r,i=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Qs(t=Qi(e=Px(this.bubble)).call(e,(function(t){var e=xf(t,1)[0];return!a||a===e}))).call(t,(function(t){var e=xf(t,2),n=e[0];e[1].remove(),delete i.bubble[n]})),Qs(n=Qi(r=Px(this.bubbleHandler)).call(r,(function(t){var e=xf(t,1)[0];return!a||a===e}))).call(n,(function(t){var e=xf(t,2),n=e[0];e[1].emit("remove"),delete i.bubbleHandler[n]})),Is(this.bubbleHandler).length<=0&&(this.previewer.$cherry.wrapperDom.style.overflow=this.oldWrapperDomOverflow||"")}},{key:"$showTablePreviewerBubbles",value:function(t,e,n){if(this.bubbleHandler[t]&&this.bubbleHandler[t].tableElement===n)this.bubbleHandler[t].showBubble();else{this.$createPreviewerBubbles(t,"click"===t?"table-content-handler":"table-hover-handler");var r=new qx(t,e,this.bubble[t],this.previewerDom,this.editor.editor,n,this.previewer.$cherry);r.showBubble(),this.bubbleHandler[t]=r}}},{key:"showCodeBlockPreviewerBubbles",value:function(t,e){if(this.bubbleHandler[t]&&this.bubbleHandler[t].target===e)this.removeHoverBubble.cancel();else{this.$removeAllPreviewerBubbles("hover"),this.$createPreviewerBubbles(t,"codeBlock-".concat(t,"-handler"));var n=new SB(t,e,this.bubble[t],this.previewerDom,this.editor.editor,this);n.showBubble(this.$isEnableBubbleAndEditorShow()),this.bubbleHandler[t]=n}}},{key:"$showImgPreviewerBubbles",value:function(t){var e;this.$createPreviewerBubbles();var n=Nh(this.previewerDom.querySelectorAll("img"));if(this.totalImgs=n.length,this.imgIndex=Ef(n).call(n,t),!this.beginChangeImgValue(t))return{emit:function(){}};Qx.showBubble(t,this.bubble.click,this.previewerDom),Qx.bindChange(fs(e=this.changeImgValue).call(e,this)),this.bubbleHandler.click=Qx}},{key:"$showFormulaPreviewerBubbles",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$createPreviewerBubbles(t,"formula-hover-handler");var r=new WB(t,e,this.bubble[t],this.previewerDom,this.editor);r.showBubble((null==n?void 0:n.x)||0,(null==n?void 0:n.y)||0),this.bubbleHandler[t]=r}},{key:"$showListPreviewerBubbles",value:function(t,e){this.$createPreviewerBubbles(t,"list-hover-handler");var n=new n_(t,e,this.bubble[t],this.previewerDom,this.editor);this.bubbleHandler[t]=n}},{key:"beginChangeDrawioImg",value:function(t){var e,n=Nh(this.previewerDom.querySelectorAll('img[data-type="drawio"]')),r=n.length,i=Ef(n).call(n,t),a=Rd(this.editor.editor.getValue()),o=a.match(Pd),s=o[i]?mh(e=o[i].replace(/^!\[.*?\]\((.*?)\)/,"$1")).call(e):"";if(o.length===r||t.getAttribute("src")===s)for(var c=a.split(Pd),l=0,u=0,h=0,f=0,d=0;d0&&void 0!==arguments[0]?arguments[0]:"click",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"img-size-handler";this.bubble[t]||(this.bubble[t]=document.createElement("div"),this.bubble[t].className="cherry-previewer-".concat(e),this.previewerDom.after(this.bubble[t]),"hover"===t&&(this.bubble[t].addEventListener("mouseover",this.removeHoverBubble.cancel),this.bubble[t].addEventListener("mouseout",this.removeHoverBubble)),this.previewer.$cherry.wrapperDom.style.overflow="hidden")}},{key:"$showBorderBubbles",value:function(){}},{key:"$showBtnBubbles",value:function(){}}])}(),i_=H.setInterval,a_=function(){return Ho((function t(e,n){ra(this,t),cs(this,"options",{loadingImgPath:"",maxNumPerTime:2,noLoadImgNum:5,autoLoadImgNum:5,maxTryTimesPerSrc:2,beforeLoadOneImgCallback:function(t){},failLoadOneImgCallback:function(t){},afterLoadOneImgCallback:function(t){},afterLoadAllImgCallback:function(){}}),Ss(this.options,e),this.previewer=n,this.srcLoadedList=[],this.srcFailLoadedList={},this.srcLoadingList=[],this.srcList=[],this.loadingImgNum=0,this.lastLoadAllNum=0,this.previewerDom=this.previewer.getDomContainer()}),[{key:"isLoaded",value:function(t){var e;return Iv(e=this.srcLoadedList).call(e,t)}},{key:"isLoading",value:function(t){var e;return Iv(e=this.srcLoadingList).call(e,t)}},{key:"loadFailed",value:function(t){this.srcFailLoadedList[t]=this.srcFailLoadedList[t]?this.srcFailLoadedList[t]+1:1}},{key:"isFailLoadedMax",value:function(t){return this.srcFailLoadedList[t]&&this.srcFailLoadedList[t]>this.options.maxTryTimesPerSrc}},{key:"isLoadedAllDone",value:function(){var t=this.previewerDom.querySelectorAll("img[data-src]"),e=this.srcLoadedList.length;return t.length<=0&&this.lastLoadAllNum=h&&e.top<=u,a=r.srcList.length=r.options.maxNumPerTime)return{v:!1};var s,c=r.options.beforeLoadOneImgCallback(t);if(void 0!==c&&!c)return r.loadFailed(o),0;o=null!==(s=t.getAttribute("data-src"))&&void 0!==s?s:o,r.loadingImgNum+=1,r.srcList.push(o),r.srcLoadingList.push(o),r.tryLoadOneImg(o,(function(){var e,n;t.setAttribute("src",o),t.removeAttribute("data-src"),r.srcLoadedList.push(o),r.loadingImgNum-=1,eA(e=r.srcLoadingList).call(e,Ef(n=r.srcLoadingList).call(n,o),1),r.options.afterLoadOneImgCallback(t),r.loadOneImg()}),(function(){var e,n;r.loadFailed(o),r.loadingImgNum-=1,eA(e=r.srcLoadingList).call(e,Ef(n=r.srcLoadingList).call(n,o),1),r.options.failLoadOneImgCallback(t),r.loadOneImg()}))},A=0;A]*?)data-src="([^"]+)"([^>]*?)>/g,(function(t,n,r,i){var a,o;return hs(a=hs(o="").replace(/ {2,}/g," ")}))}},{key:"changeLoadedDataSrc2Src",value:function(t){var e=this;return t.replace(/]*?)data-src="([^"]+)"([^>]*?)>/g,(function(t,n,r,i){var a,o;return e.isLoaded(r)?hs(a=hs(o="").replace(/ {2,}/g," "):t}))}},{key:"$removeSrc",value:function(t){return" ".concat(t).replace(/^(.*?) src=".*?"(.*?$)/,"$1$2")}},{key:"changeSrc2DataSrc",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.options.loadingImgPath,i=this.options.noLoadImgNum,a=0;return t.replace(/]*?)src="([^"]+)"([^>]*?)>/g,(function(t,o,s,c){var l,u,h,f,d;if(/data-src="/.test(t)||!/ src="/.test(t)||i<0)return t;if(!1===n){if(a"):hs(l=hs(u="")}))}}])}(),o_=function(){},s_=function(){return Ho((function t(e){ra(this,t),cs(this,"applyingDomChanges",!1),cs(this,"syncScrollLockTimer",0),cs(this,"isMobilePreview",!1),this.options={previewerDom:document.createElement("div"),virtualDragLineDom:document.createElement("div"),editorMaskDom:document.createElement("div"),previewerMaskDom:document.createElement("div"),minBlockPercentage:.2,value:"",enablePreviewerBubble:!0,floatWhenClosePreviewer:!1,afterUpdateCallBack:[],isPreviewOnly:!1,previewerCache:{html:"",htmlChanged:!1,layout:{}},lazyLoadImg:{loadingImgPath:"",maxNumPerTime:2,noLoadImgNum:5,autoLoadImgNum:5,maxTryTimesPerSrc:2,beforeLoadOneImgCallback:function(t){},failLoadOneImgCallback:function(t){},afterLoadOneImgCallback:function(t){},afterLoadAllImgCallback:function(){}}},Ss(this.options,e),this.$cherry=this.options.$cherry,this.instanceId=this.$cherry.getInstanceId(),this.animation={}}),[{key:"init",value:function(t){this.disableScrollListener=!1,this.bindScroll(),this.editor=t,this.bindDrag(),this.$initPreviewerBubble(),this.lazyLoadImg=new a_(this.options.lazyLoadImg,this),this.lazyLoadImg.doLazyLoad(),this.bindClick(),this.onMouseDown(),this.onSizeChange()}},{key:"onSizeChange",value:function(){var t=this;new ResizeObserver((function(){t.syncVirtualLayoutFromReal()})).observe(this.$cherry.wrapperDom)}},{key:"$initPreviewerBubble",value:function(){this.previewerBubble=new r_(this)}},{key:"getDomContainer",value:function(){return this.isMobilePreview?this.options.previewerDom.querySelector(".cherry-mobile-previewer-content"):this.options.previewerDom}},{key:"getDom",value:function(){return this.options.previewerDom}},{key:"getValue",value:function(){var t,e,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r="";if(r=this.isPreviewerHidden()?this.options.previewerCache.html:this.getDomContainer().innerHTML,r=this.lazyLoadImg.changeDataSrc2Src(r),!n||!this.$cherry.wrapperDom)return r;var i=this.$cherry.wrapperDom.getAttribute("data-inline-code-theme"),a=this.$cherry.wrapperDom.getAttribute("data-code-block-theme");return hs(t=hs(e='
    ')).call(t,r,"
    ")}},{key:"isPreviewerHidden",value:function(){return this.options.previewerDom.classList.contains("cherry-previewer--hidden")}},{key:"isPreviewerFloat",value:function(){var t=this.$cherry.cherryDom.querySelector(".float-previewer-wrap");return this.$cherry.cherryDom.contains(t)}},{key:"isPreviewerNeedFloat",value:function(){return this.options.floatWhenClosePreviewer}},{key:"calculateRealLayout",value:function(t){var e=+(t/(this.editor.options.editorDom.getBoundingClientRect().width+this.options.previewerDom.getBoundingClientRect().width)).toFixed(3);e1-this.options.minBlockPercentage&&(e=+(1-this.options.minBlockPercentage).toFixed(3));var n=+(1-e).toFixed(3);return{editorPercentage:"".concat(100*e,"%"),previewerPercentage:"".concat(100*n,"%")}}},{key:"setRealLayout",value:function(t,e){var n=t,r=e;n&&r||(n="50%",r="50%"),this.editor.options.editorDom.style.width=n,this.options.previewerDom.style.width=r,this.syncVirtualLayoutFromReal()}},{key:"syncVirtualLayoutFromReal",value:function(){var t=this.editor.options.editorDom.getBoundingClientRect(),e=this.options.previewerDom.getBoundingClientRect(),n=t.height,r=this.editor.options.editorDom.offsetTop,i=t.left,a=t.width,o=e.left?e.left-i:0,s=e.width||0,c=this.options,l=c.editorMaskDom,u=c.previewerMaskDom,h=c.virtualDragLineDom;this.$tryChangeValue(h,"top","".concat(r,"px")),this.$tryChangeValue(h,"left","".concat(o,"px")),this.$tryChangeValue(h,"bottom","0px"),this.$tryChangeValue(l,"height","".concat(n,"px")),this.$tryChangeValue(l,"top","".concat(r,"px")),this.$tryChangeValue(l,"left","0px"),this.$tryChangeValue(l,"width","".concat(a,"px")),this.$tryChangeValue(u,"height","".concat(n,"px")),this.$tryChangeValue(u,"top","".concat(r,"px")),this.$tryChangeValue(u,"left","".concat(o,"px")),this.$tryChangeValue(u,"width","".concat(s,"px"))}},{key:"$tryChangeValue",value:function(t,e,n){t.style[e]!==n&&(t.style[e]=n)}},{key:"calculateVirtualLayout",value:function(t,e){var n=this.editor.options.editorDom.getBoundingClientRect().width+this.options.previewerDom.getBoundingClientRect().width,r=t.toFixed(0),i=e-t;in*(1-this.options.minBlockPercentage)&&(i=+(n*(1-this.options.minBlockPercentage)).toFixed(0));var a=n-i;return{startWidth:Ff(r,10),leftWidth:i,rightWidth:a}}},{key:"setVirtualLayout",value:function(t,e,n){var r=this.options,i=r.editorMaskDom,a=r.previewerMaskDom,o=r.virtualDragLineDom;i.style.left="".concat(0,"px"),i.style.width="".concat(e,"px"),o.style.left="".concat(0+e,"px"),a.style.left="".concat(0+e,"px"),a.style.width="".concat(n,"px")}},{key:"bindDrag",value:function(){var t,e=this,n=function(t){t&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,t.preventDefault?t.preventDefault():window.event.returnValue=!1;var n=e.editor.options.editorDom.getBoundingClientRect().left,r=t.clientX,i=e.calculateVirtualLayout(n,r);return e.setVirtualLayout(i.startWidth,i.leftWidth,i.rightWidth),!1},r=function t(r){r&&r.stopPropagation?r.stopPropagation():r.cancelBubble=!0,r.preventDefault?r.preventDefault():window.event.returnValue=!1;var i=e.editor.options.editorDom.getBoundingClientRect().left,a=r.clientX,o=e.calculateRealLayout(a-i);return e.setRealLayout(o.editorPercentage,o.previewerPercentage),e.editor.options.editorDom.classList.remove("no-select"),e.options.previewerDom.classList.remove("no-select"),e.options.editorMaskDom.classList.remove("cherry-editor-mask--show"),e.options.previewerMaskDom.classList.remove("cherry-previewer-mask--show"),e.options.virtualDragLineDom.classList.remove("cherry-drag--show"),e.editor.editor.refresh(),rd(document,"mousemove",n,!1),rd(document,"mouseup",t,!1),!1};nd(this.options.virtualDragLineDom,"mousedown",(function(t){t&&t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,t.preventDefault?t.preventDefault():window.event.returnValue=!1,e.syncVirtualLayoutFromReal();var i=e.editor.options.editorDom.getBoundingClientRect().left,a=t.clientX,o=e.calculateVirtualLayout(i,a);return e.setVirtualLayout(o.startWidth,o.leftWidth,o.rightWidth),e.options.virtualDragLineDom.classList.contains("cherry-drag--show")||(e.options.virtualDragLineDom.classList.add("cherry-drag--show"),e.options.editorMaskDom.classList.add("cherry-editor-mask--show"),e.options.previewerMaskDom.classList.add("cherry-previewer-mask--show"),e.options.previewerDom.classList.add("no-select"),e.editor.options.editorDom.classList.add("no-select"),nd(document,"mousemove",n,!1),nd(document,"mouseup",r,!1)),!1}),!1),nd(window,"resize",fs(t=this.syncVirtualLayoutFromReal).call(t,this),!1),this.setRealLayout()}},{key:"bindScroll",value:function(){var t=this,e=this.getDomContainer();o_=function(){if(t.applyingDomChanges)id.log(new Date,"sync scroll locked");else if(t.disableScrollListener)t.disableScrollListener=!1;else if(e.scrollTop<=0)t.editor.scrollToLineNum(0,0,1);else if(e.scrollTop+e.offsetHeight+10>e.scrollHeight)t.editor.scrollToLineNum(null);else{for(var n,r=e.getBoundingClientRect(),i={x:r.left+r.width/2,y:r.top+1},a=function(t,e){if("function"==typeof document.elementsFromPoint)return document.elementsFromPoint(t,e);if("function"==typeof document.msElementsFromPoint){var n=document.msElementsFromPoint(t,e);return null!==n?Nh(n):n}var r,i=[],a=[];do{var o=document.elementFromPoint(t,e);r!==o?(r=o,i.push(r),a.push(r.style.pointerEvents),r.style.pointerEvents="none"):r=null}while(r);return Qs(i).call(i,(function(t,e){t.style.pointerEvents=a[e]})),i}(i.x,i.y),o=0;o0)for(var a=0;a0&&(Qs(t).call(t,(function(t,i){var a;Bf(a=t.sign).call(a,0,12)===Bf(e).call(e,0,12)&&i>n&&(r={index:i>n?i:n,sign:e})})),r)}},{key:"$dealWithMyersDiffResult",value:function(t,e,n,r){var i=this;Qs(t).call(t,(function(t){switch(n[t.newIndex].dom&&(n[t.newIndex].dom.innerHTML=i.lazyLoadImg.changeLoadedDataSrc2Src(n[t.newIndex].dom.innerHTML)),t.type){case"delete":r.removeChild(e[t.oldIndex].dom);break;case"insert":e[t.oldIndex]?r.insertBefore(n[t.newIndex].dom,e[t.oldIndex].dom):r.appendChild(n[t.newIndex].dom);break;case"update":try{var a=!1;if("cherry-table-container"===n[t.newIndex].dom.className&&n[t.newIndex].dom.querySelector(".cherry-table-figure")&&e[t.oldIndex].dom.querySelector(".cherry-table-figure"))e[t.oldIndex].dom.querySelector(".cherry-table-figure").replaceWith(n[t.newIndex].dom.querySelector(".cherry-table-figure")),e[t.oldIndex].dom.dataset.sign=n[t.oldIndex].dom.dataset.sign,i.$updateDom(n[t.newIndex].dom.querySelector(".cherry-table"),e[t.oldIndex].dom.querySelector(".cherry-table")),a=!0;else if(n[t.newIndex].dom.querySelector("svg"))throw new Error;a||i.$updateDom(n[t.newIndex].dom,e[t.oldIndex].dom)}catch(i){r.insertBefore(n[t.newIndex].dom,e[t.oldIndex].dom),r.removeChild(e[t.oldIndex].dom)}}}))}},{key:"$dealUpdate",value:function(t,e,n){if(n.list!==e.list)if(n.list.length&&e.list.length){var r=new Qw(n.list,e.list,(function(t,e){return t[e].sign})).doDiff();id.log(r),this.$dealWithMyersDiffResult(r,e.list,n.list,t)}else if(n.list.length&&!e.list.length){var i;id.log("add all"),Qs(i=n.list).call(i,(function(e){t.appendChild(e.dom)}))}else if(!n.list.length&&e.list.length){var a;id.log("delete all"),Qs(a=e.list).call(a,(function(e){t.removeChild(e.dom)}))}}},{key:"refresh",value:function(t){this.getDomContainer().innerHTML=t}},{key:"update",value:function(t){var e=this,n=this.lazyLoadImg.changeSrc2DataSrc(t);if(this.isPreviewerHidden())this.doHtmlCache(n);else{window.clearTimeout(this.syncScrollLockTimer),this.applyingDomChanges=!0;var r=document.createElement("div"),i=this.getDomContainer();this.editor.selectAll&&(i.innerHTML=""),r.innerHTML=n;var a=this.$getSignData(r),o=this.$getSignData(i);try{this.$dealUpdate(i,o,a),this.afterUpdate()}finally{this.syncScrollLockTimer=ks((function(){e.applyingDomChanges=!1}),50)}}}},{key:"$dealEditAndPreviewOnly",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n={editorPercentage:"0%",previewerPercentage:"100%"};e&&(n={editorPercentage:"100%",previewerPercentage:"0%"});var r=this.editor.options.editorDom.getBoundingClientRect().width,i=this.calculateRealLayout(r);this.options.previewerCache.layout=i,this.setRealLayout(n.editorPercentage,n.previewerPercentage),this.options.virtualDragLineDom.classList.add("cherry-drag--hidden");var a=this.options.previewerDom,o=this.editor.options.editorDom;e?(a.classList.add("cherry-previewer--hidden"),o.classList.add("cherry-editor--full"),a.classList.remove("cherry-preview--full"),o.classList.remove("cherry-editor--hidden")):(a.classList.add("cherry-preview--full"),o.classList.add("cherry-editor--hidden"),a.classList.remove("cherry-previewer--hidden"),o.classList.remove("cherry-editor--full")),ks((function(){return t.editor.editor.refresh()}),0)}},{key:"previewOnly",value:function(){this.$dealEditAndPreviewOnly(!1),this.options.previewerCache.htmlChanged&&this.update(this.options.previewerCache.html),this.cleanHtmlCache(),this.$cherry.$event.emit("previewerOpen"),this.$cherry.$event.emit("editorClose")}},{key:"editOnly",value:function(){this.$dealEditAndPreviewOnly(!0),this.cleanHtmlCache(),this.$cherry.$event.emit("previewerClose"),this.$cherry.$event.emit("editorOpen")}},{key:"floatPreviewer",value:function(){var t="100%",e="100%",n=this.editor.options.editorDom.getBoundingClientRect().width,r=this.calculateRealLayout(n);this.options.previewerCache.layout=r,this.setRealLayout(t,e),this.options.virtualDragLineDom.classList.add("cherry-drag--hidden"),this.$cherry.createFloatPreviewer()}},{key:"recoverFloatPreviewer",value:function(){this.recoverPreviewer(!0),this.$cherry.clearFloatPreviewer()}},{key:"recoverPreviewer",value:function(){var t=this;this.options.previewerDom.classList.remove("cherry-previewer--hidden"),this.options.virtualDragLineDom.classList.remove("cherry-drag--hidden"),this.editor.options.editorDom.classList.remove("cherry-editor--full");var e=this.options.previewerCache.layout;this.setRealLayout(e.editorPercentage,e.previewerPercentage),this.options.previewerCache.htmlChanged&&this.update(this.options.previewerCache.html),this.cleanHtmlCache(),this.$cherry.$event.emit("previewerOpen"),this.$cherry.$event.emit("editorOpen"),ks((function(){return t.editor.editor.refresh()}),0)}},{key:"doHtmlCache",value:function(t){this.options.previewerCache.html=t,this.options.previewerCache.htmlChanged=!0}},{key:"cleanHtmlCache",value:function(){this.options.previewerCache.html="",this.options.previewerCache.htmlChanged=!1,this.options.previewerCache.layout={}}},{key:"afterUpdate",value:function(){var t;lA(t=this.options.afterUpdateCallBack).call(t,(function(t){return t()})),void 0===this.highlightLineNum&&(this.highlightLineNum=0),this.highlightLine(this.highlightLineNum)}},{key:"registerAfterUpdate",value:function(t){if(sd(t)){var e;this.options.afterUpdateCallBack=hs(e=this.options.afterUpdateCallBack).call(e,t)}else{if(!t)throw new Error("[markdown error]: Previewer registerAfterUpdate params are undefined");this.options.afterUpdateCallBack.push(t)}}},{key:"$getTopByLineNum",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getDomContainer();if(null===t)return n.scrollHeight;for(var r="number"==typeof t?t:Ff(t,10),i=n.querySelectorAll("[data-sign]"),a=0,o=n.offsetTop,s=0;s1&&(f=h+(c-Math.abs(r-(a+c))-1)/c*u+u/c*e),f}a+=c}return n.scrollHeight}},{key:"highlightLine",value:function(t){var e,n,r,i,a,o=this.getDomContainer();if(Qs(e=o.querySelectorAll(".cherry-highlight-line")).call(e,(function(t){t.classList.remove("cherry-highlight-line")})),"show"===(null===(n=this.$cherry)||void 0===n||null===(r=n.status)||void 0===r?void 0:r.previewer)&&"show"===(null===(i=this.$cherry)||void 0===i||null===(a=i.status)||void 0===a?void 0:a.editor))for(var s=o.querySelectorAll("[data-sign]"),c=0,l=0;l=n.scrollHeight||a>Math.abs(i))return cancelAnimationFrame(e.animation.timer),void(e.animation.timer=0);e.disableScrollListener=!0,e.getDomContainer().scrollTo(null,r+i/Math.abs(i)*a),e.animation.timer=requestAnimationFrame(t)}))}}},{key:"scrollToLineNum",value:function(t,e){var n=this.$getTopByLineNum(t,e);this.$scrollAnimation(n)}},{key:"getDomCanScroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getDomContainer();return t.scrollHeight>t.clientHeight||t.clientHeightdocument.documentElement.clientHeight?document.documentElement:t:this.getDomCanScroll(t.parentElement):void 0}},{key:"scrollToHeadByIndex",value:function(t){var e,n=this.getDomContainer(),r=this.getDomCanScroll(n),i=null!==(e=n.querySelectorAll("h1,h2,h3,h4,h5,h6,h7,h8")[t])&&void 0!==e&&e,a=0;!1!==i&&(a="HTML"===r.nodeName?r.scrollTop+i.getBoundingClientRect().y-10:r.scrollTop+i.getBoundingClientRect().y-r.getBoundingClientRect().y-10,r.scrollTo({top:a,left:0,behavior:"smooth"}))}},{key:"bindClick",value:function(){var t=this;this.getDomContainer().addEventListener("click",(function(e){var n;if(t.$cherry.options.callback.onClickPreview){var r=t.$cherry.options.callback.onClickPreview(e);if(!1===r)return r}if(!1===(null===(n=t.$cherry.options.toolbars.toc)||void 0===n?void 0:n.updateLocationHash)){var i=e.target;if(i instanceof Element&&"A"===i.nodeName&&/level-\d+/.test(i.className)){var a,o=i.parentElement,s=Ef(a=Nh(o.parentElement.children)).call(a,o)-1;t.scrollToHeadByIndex(s),e.stopPropagation(),e.preventDefault()}if(i instanceof Element&&"A"===i.nodeName&&/(footnote|footnote-ref)/.test(i.className)){var c=i.getAttribute("href");t.scrollToId(c),e.stopPropagation(),e.preventDefault()}}}))}},{key:"onMouseDown",value:function(){var t=this;nd(this.getDomContainer(),"mousedown",(function(){ks((function(){t.$cherry.$event.emit("cleanAllSubMenus")}))}))}},{key:"export",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pdf",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e;if(!e){var r=this.getDomContainer().innerText;n=/^\s*([^\s][^\n]*)\n/.test(r)?r.match(/^\s*([^\s][^\n]*)\n/)[1]:"cherry-export"}"pdf"===t?function(t,e){var n=document.title;document.title=e,Tx(t,(function(t,e){window.print(),e(),document.title=n}))}(this.getDomContainer(),n):"screenShot"===t||"img"===t?Bx(this.getDomContainer(),n):"markdown"===t?function(t,e){var n=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=document.createElement("a");r.style.display="none",r.href=xx.createObjectURL(n),r.download="".concat(e,".md"),document.body.appendChild(r),r.click(),document.body.removeChild(r)}(this.$cherry.getMarkdown(),n):"html"===t&&function(t,e){var n=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=document.createElement("a");r.style.display="none",r.href=xx.createObjectURL(n),r.download="".concat(e,".html"),document.body.appendChild(r),r.click(),document.body.removeChild(r)}(this.getValue(),n)}}])}();function c_(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"absolute",n=t.getBoundingClientRect();return"fixed"===e?n:"sidebar"===e?{left:l_.getTargetParentByButton(t).offsetLeft-130+n.width,top:t.offsetTop+n.height/2,width:n.width,height:n.height}:{left:t.offsetLeft,top:t.offsetTop,width:n.width,height:n.height}}var l_=function(){function t(e){var n,r,i;ra(this,t),cs(this,"_onClick",void 0),this.$cherry=e,this.bubbleMenu=!1,this.subMenu=null,this.$currentMenuOptions=e.$currentMenuOptions,this.name=null!==(n=null===(r=e.$currentMenuOptions)||void 0===r?void 0:r.name)&&void 0!==n?n:"","string"==typeof(null===(i=e.$currentMenuOptions)||void 0===i?void 0:i.icon)&&(this.iconName=e.$currentMenuOptions.icon),this.iconType=null,this.editor=e.editor,this.locale=e.locale,this.dom=null,this.updateMarkdown=!0,this.subMenuConfig=[],this.noIcon=!1,this.cacheOnce=!1,this.positionModel="absolute","function"==typeof this._onClick&&(id.warn("`MenuBase._onClick` is deprecated. Override `fire` instead"),this.fire=this._onClick),this.shortcutKeyMap={}}return Ho(t,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"setName",value:function(t,e){this.name=t,this.iconName=e,this.$currentMenuOptions={name:t,icon:e}}},{key:"setCacheOnce",value:function(t){this.cacheOnce=t}},{key:"getAndCleanCacheOnce",value:function(){this.updateMarkdown=!0;var t=this.cacheOnce;return this.cacheOnce=!1,t}},{key:"hasCacheOnce",value:function(){return!1!==this.cacheOnce}},{key:"createIconFontIcon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Zf("i","ch-icon ch-icon-".concat(t));return"string"==typeof(null==e?void 0:e.className)&&n.classList.add(e.className),n}},{key:"createSvgIcon",value:function(t){if("svg"!==t.type)throw new Error('except options.type is "svg", but get "${options.type}"');try{var e,n=null===(e=(new DOMParser).parseFromString(t.content,"image/svg+xml"))||void 0===e?void 0:e.lastElementChild;return t.iconStyle&&n.setAttribute("style",t.iconStyle),t.iconClassName&&n.setAttribute("class",t.iconClassName),n}catch(t){throw new Ap(t)}}},{key:"createImageIcon",value:function(t){if("image"!==t.type)throw new Error('except options.type is "image", but get "${options.type}"');return Zf("img","ch-icon".concat(t.iconClassName?" ".concat(t.iconClassName):""),{src:t.content,style:t.iconStyle})}},{key:"createBtn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=Zf("span",t?"cherry-dropdown-item":"cherry-toolbar-button cherry-toolbar-".concat(this.iconName?this.iconName:this.name),{title:this.locale[this.name]||$A(this.name)});if(!this.noIcon){var n=null,r=this.$currentMenuOptions.icon;if("string"==typeof r)n=this.createIconFontIcon(this.iconName!==this.name?this.iconName:r),this.iconType="iconfont";else if(r instanceof HTMLElement)n=r,this.iconType="element";else if("object"===Ro(r)){var i=r.type;if("svg"===i)n=this.createSvgIcon(r),this.iconType="svg";else if("image"===i)n=this.createImageIcon(r),this.iconType="image";else{if("iconfont"!==i)throw new Error('except customIcon.type is "svg", "image", "iconfont", but get "'.concat(i,'"'));n=this.createIconFontIcon(r.content),this.iconType="iconfont"}}null!==n&&(n.classList.add("cherry-menu-".concat(this.name)),e.appendChild(n))}return(t||this.noIcon)&&(e.innerHTML+=this.locale[this.name]||$A(this.name)),t||this.dom||(this.dom=e),e}},{key:"createSubBtnByConfig",value:function(t){var e=t.name,n=t.iconName,r=t.icon,i=t.onclick,a=Zf("span","cherry-dropdown-item",{title:this.locale[e]||$A(e)});if(n){var o=Zf("i","ch-icon ch-icon-".concat(n));a.appendChild(o)}else if(r){var s=Zf("img","ch-icon",{src:r,style:"width: 16px; height: 16px; vertical-align: sub;"});a.appendChild(s)}return a.innerHTML+=this.locale[e]||$A(e),a.addEventListener("click",i,!1),a}},{key:"fire",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(null==t||t.stopPropagation(),"function"==typeof this.onClick){var r=this.editor.editor.getSelections();this.isSelections=r.length>1;var i=lA(r).call(r,(function(r,i,a){return e.onClick(r,n,t)||a[i]}));!this.bubbleMenu&&this.updateMarkdown&&(this.editor.editor.replaceSelections(i,"around"),this.editor.editor.focus(),this.$afterClick())}}},{key:"$getSelectionRange",value:function(){var t=this.editor.editor.listSelections()[0],e=t.anchor,n=t.head;return e.line===n.line&&e.ch>n.ch||e.line>n.line?{begin:n,end:e}:{begin:e,end:n}}},{key:"registerAfterClickCb",value:function(t){this.afterClickCb=t}},{key:"$afterClick",value:function(){"function"!=typeof this.afterClickCb||this.isSelections||(this.afterClickCb(),this.afterClickCb=null)}},{key:"setLessSelection",value:function(t,e){var n,r,i,a,o=this.editor.editor,s=this.$getSelectionRange(),c=s.begin,l=s.end,u={line:(null===(n=t.match(/\n/g))||void 0===n?void 0:n.length)>0?c.line+t.match(/\n/g).length:c.line,ch:(null===(r=t.match(/\n/g))||void 0===r?void 0:r.length)>0?t.replace(/^[\s\S]*?\n([^\n]*)$/,"$1").length:c.ch+t.length},h=(null===(i=e.match(/\n/g))||void 0===i?void 0:i.length)>0?l.line-e.match(/\n/g).length:l.line,f={line:h,ch:(null===(a=e.match(/\n/g))||void 0===a?void 0:a.length)>0?o.getLine(h).length:l.ch-e.length};o.setSelection(u,f)}},{key:"getMoreSelection",value:function(t,e,n){var r=this.editor.editor,i=this.$getSelectionRange(),a=i.begin,o=i.end,s=/\n/.test(t)?0:a.ch-t.length;s=s<0?0:s;var c,l=/\n/.test(t)?a.line-t.match(/\n/g).length:a.line,u={line:l=l<0?0:l,ch:s},h=o.line,f=o.ch;/\n/.test(e)?(h=o.line+e.match(/\n/g).length,f=null===(c=r.getLine(h))||void 0===c?void 0:c.length):f=r.getLine(o.line).length1&&void 0!==arguments[1]?arguments[1]:"word",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this.editor.editor;if(this.isSelections)return t;if(t&&!n)return t;if("line"===e){var i=this.$getSelectionRange(),a=i.begin,o=i.end;return r.setSelection({line:a.line,ch:0},{line:o.line,ch:r.getLine(o.line).length}),r.getSelection()}if("word"===e){var s=r.findWordAt(r.getCursor()),c=s.anchor,l=s.head;return r.setSelection(c,l),r.getSelection()}}},{key:"bindSubClick",value:function(t,e){return this.fire(null,t)}},{key:"onClick",value:function(t,e,n){return t}},{key:"shortcutKeys",get:function(){return[]}},{key:"updateMenuIcon",value:function(t){if(this.noIcon)return!1;var e;if("string"==typeof t)return"iconfont"===this.iconType&&(null===(e=this.dom.querySelector("i"))||void 0===e||e.classList.replace("ch-icon-".concat(this.iconName),"ch-icon-".concat(t)),this.iconName=t,this.$currentMenuOptions.icon=t,this.iconType="iconfont",!0);if(t instanceof HTMLElement)return t.classList.add("ch-icon cherry-menu-".concat(this.name)),this.dom.replaceChildren(t),this.iconType="element",!0;var n=this.iconName;switch(t.type){case"iconfont":if("iconfont"===this.iconType){var r;n=t.content,null===(r=this.dom.querySelector("i"))||void 0===r||r.classList.replace("ch-icon-".concat(this.iconName),"ch-icon-".concat(n)),this.iconName=n}else{var i=this.createIconFontIcon(t.content,{className:"cherry-menu-".concat(this.name)});t.iconClassName&&i.classList.add(t.iconClassName),t.iconStyle&&i.setAttribute("style",t.iconStyle),this.dom.replaceChildren(i)}this.iconType="iconfont";break;case"svg":this.dom.replaceChildren(this.createSvgIcon(t)),this.iconType="svg";break;case"image":this.dom.replaceChildren(this.createImageIcon(t)),this.iconType="image";break;case"element":throw Error("except the options argument instance of HTMLElement, but get a type of ".concat(Ro(t)))}}},{key:"getMenuPosition",value:function(){var e=t.getTargetParentByButton(this.dom),n=/cherry-sidebar/.test(e.className);return/cherry-bubble/.test(e.className)||/cherry-floatmenu/.test(e.className)?this.positionModel="fixed":this.positionModel=n?"sidebar":"absolute",c_(this.dom,this.positionModel)}},{key:"hide",value:function(){this.dom.style.display="none"}},{key:"show",value:function(){this.dom.style.display="block"}},{key:"getActiveSubMenuIndex",value:function(t){return-1}}],[{key:"getTargetParentByButton",value:function(t){var e=t.parentElement;return/toolbar-(left|right)/.test(e.className)&&(e=e.parentElement),e}}])}(),u_=navigator.userAgent,h_=navigator.platform;/gecko\/\d/i.test(u_);var f_=/MSIE \d/.test(u_),d_=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(u_),A_=/Edge\/(\d+)/.exec(u_);(f_||d_||A_)&&(f_?document.documentMode:(A_||d_)[1]);var g_=!A_&&/WebKit\//.test(u_);g_&&/Qt\/\d+\.\d+/.test(u_),!A_&&/Chrome\//.test(u_);var p_=/Opera\//.test(u_);/Apple Computer/.test(navigator.vendor),/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(u_),/PhantomJS/.test(u_);var m_=!A_&&/AppleWebKit/.test(u_)&&/Mobile\/\w+/.test(u_),b_=/Android/.test(u_);m_||b_||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(u_);var v_=m_||/Mac/.test(h_);/\bCrOS\b/.test(u_),/win/i.test(h_);var y_,w_=p_&&u_.match(/Version\/(\d*\.\d*)/);w_&&(w_=Number(w_[1])),w_&&w_>=15&&(p_=!1,g_=!0);var k_="Shift",C_="Alt",x_=v_?"Meta":"Control",E_="Meta",T_="Enter",B_=cs(cs(cs(cs({},k_,(function(t){return{text:"⇧",tip:"Shift"}})),x_,(function(t){return t?{text:"⌃",tip:"Control"}:{text:"Ctrl",tip:"Control"}})),C_,(function(t){return t?{text:"⌥",tip:"Option"}:{text:"Alt",tip:"Alt"}})),E_,(function(t){return t?{text:"⌘",tip:"Command"}:{text:"⊞",tip:"Windows"}})),__=hs(y_=[]).call(y_,["Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo"],["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp"],[" ","Tab","Enter"]),S_=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=hs(e=[]).call(e,kp(__),kp(n)),i=[],a=t.metaKey||t.ctrlKey||t.altKey||t.shiftKey;if(Iv(r).call(r,t.key))return i;if(a&&(t.metaKey&&i.push(E_),t.ctrlKey&&i.push(x_),t.altKey&&i.push(C_),t.shiftKey&&i.push(k_)),!Iv(i).call(i,t.key)){if(Rf(t))return i.push(t.code),i;i.push(t.code)}return i},L_=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"disable";window.localStorage.setItem("".concat(t,"-disable-cherry-shortcut-key"),e)},I_=function(t){return"disable"!==window.localStorage.getItem("".concat(t,"-disable-cherry-shortcut-key"))},M_=function(t,e){if(!e||"object"!==Ro(e))throw new Error("keyMap must be a object");return window.localStorage.setItem("".concat(t,"-cherry-shortcut-keymap"),Zu(e))},O_=function(t){var e=window.localStorage.getItem("".concat(t,"-cherry-shortcut-keymap"));if(e)try{return JSON.parse(e)}catch(t){return console.error(t),null}return null},D_=function(t){if(!sd(t))throw new Error("keyStack must be a array");return t.join("-")},F_=function(t,e){if(t in B_){var n=B_[t];if("function"==typeof n)return n(e)}var r=t.replace(/Key|Digit/g,"");return{text:r,tip:r}},N_=function(t,e){if(!sd(t))throw new Error("keyStack must be a array");return D_(lA(t).call(t,(function(t){return F_(t,e).text})))},P_=function(t){if("number"==typeof t)return"Digit".concat(t);if("string"!=typeof t)throw new Error("key must be a string or number");if(t.length>1)throw new Error("key length must be 1, but get ".concat(t.length));var e=t.toUpperCase();return/\d/.test(e)?"Digit".concat(e):/[A-Z]/.test(e)?"Key".concat(e):void 0};function R_(t,e,n){return e=es(e),Ko(t,Q_()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function Q_(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(Q_=function(){return!!t})()}var U_=function(t){function e(t){var n,r;return ra(this,e),(r=R_(this,e,[t])).setName("bold","bold"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("b")),{hookName:r.name,aliasName:t.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"$testIsBold",value:function(t){return/^\s*(\*\*|__)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e=this,n=this.getSelection(t)||this.locale.bold;return this.isSelections||this.$testIsBold(n)||this.getMoreSelection("**","**",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsBold(t);return r&&(n=t),r})),this.$testIsBold(n)?n.replace(/(^)(\s*)(\*\*|__)([^\n]+)(\3)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection("**","**")})),n.replace(/(^)([^\n]+)($)/gm,"$1**$2**$3"))}}])}(l_);function $_(t,e,n){return e=es(e),Ko(t,H_()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function H_(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(H_=function(){return!!t})()}var j_=function(t){function e(t){var n,r;return ra(this,e),(r=$_(this,e,[t])).setName("italic","italic"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("i")),{hookName:r.name,aliasName:r.$cherry.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"$testIsItalic",value:function(t){return/^\s*(\*|_)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e=this,n=this.getSelection(t)||this.locale.italic;return this.isSelections||this.$testIsItalic(n)||this.getMoreSelection("*","*",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsItalic(t);return r&&(n=t),r})),this.$testIsItalic(n)?n.replace(/(^)(\s*)(\*|_)([^\n]+)(\3)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection("*","*")})),n.replace(/(^)([^\n]+)($)/gm,"$1*$2*$3"))}}])}(l_);function K_(t,e,n){return e=es(e),Ko(t,z_()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function z_(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(z_=function(){return!!t})()}var G_=function(t){function e(t){var n;return ra(this,e),(n=K_(this,e,[t])).setName("split","|"),n}return ss(e,t),Ho(e,[{key:"createBtn",value:function(){var t=document.createElement("i");return t.className="cherry-toolbar-button cherry-toolbar-split",t}}])}(l_);function X_(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"word",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t.getSelections().length>1)return e;if(e&&!r)return e;if("line"===n){var i=t.listSelections()[0],a=i.anchor,o=i.head;return a.line===o.line&&a.ch>o.ch||a.line>o.line?t.setSelection({line:o.line,ch:0},{line:a.line,ch:t.getLine(a.line).length}):t.setSelection({line:a.line,ch:0},{line:o.line,ch:t.getLine(o.line).length}),t.getSelection()}if("word"===n){var s=t.findWordAt(t.getCursor()),c=s.anchor,l=s.head;return t.setSelection(c,l),t.getSelection()}}function V_(t,e,n){return e=es(e),Ko(t,W_()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function W_(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(W_=function(){return!!t})()}var q_=function(t){function e(t){var n,r;return ra(this,e),(r=V_(this,e,[t])).setName("strikethrough","strike"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("d")),{hookName:r.name,aliasName:r.$cherry.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"$testIsStrike",value:function(t){return/(~~)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e,n,r,i,a,o,s=this,c=X_(this.editor.editor,t)||this.locale.strikethrough,l=(null===(e=this.$cherry)||void 0===e||null===(n=e.options)||void 0===n||null===(r=n.engine)||void 0===r||null===(i=r.syntax)||void 0===i||null===(a=i.strikethrough)||void 0===a?void 0:a.needWhitespace)?" ":"";return this.isSelections||this.$testIsStrike(c)||this.getMoreSelection("".concat(l,"~~"),"~~".concat(l),(function(){var t=s.editor.editor.getSelection(),e=s.$testIsStrike(t);return e&&(c=t),e})),this.$testIsStrike(c)?t.replace(/[\s]*(~~)([\s\S]+)(\1)[\s]*/g,"$2"):(this.registerAfterClickCb((function(){s.setLessSelection("".concat(l,"~~"),"~~".concat(l))})),c.replace(/(^)[\s]*([\s\S]+?)[\s]*($)/g,hs(o="$1".concat(l,"~~$2~~")).call(o,l,"$3")))}}])}(l_);function Y_(t,e,n){return e=es(e),Ko(t,J_()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function J_(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(J_=function(){return!!t})()}var Z_=function(t){function e(t){var n;return ra(this,e),(n=Y_(this,e,[t])).setName("sub","sub"),n}return ss(e,t),Ho(e,[{key:"$testIsSub",value:function(t){return/^\s*(\^\^)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e=this,n=X_(this.editor.editor,t)||this.locale.sub;return this.isSelections||this.$testIsSub(n)||this.getMoreSelection("^^","^^",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsSub(t);return r&&(n=t),r})),this.$testIsSub(n)?n.replace(/(^)(\s*)(\^\^)([^\n]+)(\3)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection("^^","^^")})),n.replace(/(^)([^\n]+)($)/gm,"$1^^$2^^$3"))}}])}(l_);function tS(t,e,n){return e=es(e),Ko(t,eS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function eS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(eS=function(){return!!t})()}var nS=function(t){function e(t){var n;return ra(this,e),(n=tS(this,e,[t])).setName("sup","sup"),n}return ss(e,t),Ho(e,[{key:"$testIsSup",value:function(t){return/^\s*(\^)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e=this,n=X_(this.editor.editor,t)||this.locale.sup;return this.isSelections||this.$testIsSup(n)||this.getMoreSelection("^","^",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsSup(t);return r&&(n=t),r})),this.$testIsSup(n)?t.replace(/(^)(\s*)(\^)([^\n]+)(\3)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection("^","^")})),n.replace(/(^)([^\n]+)($)/gm,"$1^$2^$3"))}}])}(l_);function rS(t,e,n){return e=es(e),Ko(t,iS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function iS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(iS=function(){return!!t})()}var aS=function(t){function e(t){var n;return ra(this,e),(n=rS(this,e,[t])).setName("color","color"),n.bubbleColor=new oS(t),n}return ss(e,t),Ho(e,[{key:"$testIsColor",value:function(t,e){var n=/^\s*!!![^\s]+ [\s\S]+!!!\s*$/;return"text"===t?/^\s*!![^\s]+ [\s\S]+!!\s*$/.test(e)&&!n.test(e):n.test(e)}},{key:"$testIsShortKey",value:function(t){return/(color|background-color)\s*:/.test(t)}},{key:"$getTypeAndColor",value:function(t){var e;return this.$testIsShortKey(t)?{type:/background-color\s*:/.test(t)?"background-color":"text",color:mh(e=t.replace(/(color|background-color)\s*:\s*([#0-9a-zA-Z]+)[^#0-9a-zA-Z]*$/,"$2")).call(e)}:this.getAndCleanCacheOnce()}},{key:"hideOtherSubMenu",value:function(t){var e=this.bubbleColor.dom.style.display||"none";t(),this.bubbleColor.dom.style.display=e}},{key:"onClick",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;if(this.hasCacheOnce()||this.$testIsShortKey(n)){var i,a,o=X_(this.editor.editor,t)||this.locale.color,s=this.$getTypeAndColor(n),c=s.type,l=s.color,u="text"===c?"!!".concat(l," "):"!!!".concat(l," "),h="text"===c?"!!":"!!!";if(this.isSelections||this.$testIsColor(c,o)||this.getMoreSelection(u,h,(function(){var t=e.editor.editor.getSelection();return!!e.$testIsColor(c,t)&&(o=t,!0)})),this.$testIsColor(c,o)){var f,d=new RegExp(hs(f="(^\\s*".concat(h,")([^\\s]+) ([\\s\\S]+")).call(f,h,"\\s*$)"),"gm"),A=!0,g=o.replace(d,(function(t,e,n,r){var i,a;return A=!!A&&n===l,hs(i=hs(a="".concat(e)).call(a,l," ")).call(i,r)}));return A?o.replace(d,"$3").replace(/!+\s*$/gm,""):(this.registerAfterClickCb((function(){e.setLessSelection(u,h)})),g)}return this.registerAfterClickCb((function(){e.setLessSelection(u,h)})),hs(i=hs(a="".concat(u)).call(a,o)).call(i,h)}var p=0,m=0;if(r.target.closest(".cherry-bubble")){var b=r.target.closest(".cherry-bubble"),v=b.getBoundingClientRect();p=v.top+b.offsetHeight,m=r.target.closest(".cherry-toolbar-color").offsetLeft+v.left}else{var y=r.target.closest(".cherry-toolbar-color"),w=y.getBoundingClientRect();p=w.top+y.offsetHeight,m=w.left}this.updateMarkdown=!1,this.bubbleColor.toggle({left:m,top:p,$color:this})}}])}(l_),oS=function(){return Ho((function t(e){ra(this,t),cs(this,"colorStack",["#000000","#444444","#666666","#999999","#cccccc","#eeeeee","#f3f3f3","#ffffff","#ff0000","#ff9900","#ffff00","#00ff00","#00ffff","#0000ff","#9900ff","#ff00ff","#f4cccc","#fce5cd","#fff2cc","#d9ead3","#d0e0e3","#cfe2f3","#d9d2e9","#ead1dc","#ea9999","#f9cb9c","#ffe599","#b6d7a8","#a2c4c9","#9fc5e8","#b4a7d6","#d5a6bd","#e06666","#f6b26b","#ffd966","#93c47d","#76a5af","#6fa8dc","#8e7cc3","#c27ba0","#cc0000","#e69138","#f1c232","#6aa84f","#45818e","#3d85c6","#674ea7","#a64d79","#990000","#b45f06","#bf9000","#38761d","#134f5c","#0b5394","#351c75","#741b47","#660000","#783f04","#7f6000","#274e13","#0c343d","#073763","#20124d","#4c1130"]),this.editor=e.editor,this.$cherry=e,this.init(),this.initAction()}),[{key:"setSelection",value:function(t){this.selection=t}},{key:"getFontColorDom",value:function(t){var e,n,r=lA(e=this.colorStack).call(e,(function(t){var e,n;return hs(e=hs(n='')})).join("");return hs(n="

    ".concat(t,"

    ")).call(n,r)}},{key:"getDom",value:function(){var t=document.createElement("div");t.classList.add("cherry-color-wrap"),t.classList.add("cherry-dropdown");var e=document.createElement("div");e.classList.add("cherry-color-text"),e.innerHTML=this.getFontColorDom(this.$cherry.locale.fontColor),t.appendChild(e);var n=document.createElement("div");return n.classList.add("cherry-color-bg"),n.innerHTML=this.getFontColorDom(this.$cherry.locale.fontBgColor),t.appendChild(n),t}},{key:"init",value:function(){this.dom=this.getDom(),this.editor.options.wrapperDom.appendChild(this.dom)}},{key:"onClick",value:function(){var t,e;return"text"===this.type?/^!!#\S+ [\s\S]+?!!/.test(this.selection)?this.selection.replace(/^!!#\S+ ([\s\S]+?)!!/,"!!".concat(this.colorValue," $1!!")):hs(e="!!".concat(this.colorValue," ")).call(e,this.selection,"!!"):/^!!!#\S+ [\s\S]+?!!!/.test(this.selection)?this.selection.replace(/^!!!#\S+ ([\s\S]+?)!!!/,"!!!".concat(this.colorValue," $1!!!")):hs(t="!!!".concat(this.colorValue," ")).call(t,this.selection,"!!!")}},{key:"initAction",value:function(){var t=this;this.dom.addEventListener("click",(function(e){var n=e.target;if(t.colorValue=n.getAttribute("data-val"),!t.colorValue)return!1;t.type=n.closest(".cherry-color-text")?"text":"bg",t.$color.setCacheOnce({type:t.type,color:t.colorValue}),t.$color.fire(null)}),!1)}},{key:"toggle",value:function(t){var e,n=t.left,r=t.top,i=t.$color;(null===(e=this.dom.style.display)||void 0===e?void 0:e.length)>0&&"none"!==this.dom.style.display?this.dom.style.display="none":(this.dom.style.left="".concat(n,"px"),this.dom.style.top="".concat(r,"px"),this.dom.style.display="block",this.$color=i)}}])}();function sS(t,e,n){return e=es(e),Ko(t,cS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function cS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(cS=function(){return!!t})()}var lS=function(t){function e(t){var n,r,i,a,o,s,c,l,u,h,f;return ra(this,e),(f=sS(this,e,[t])).setName("header","header"),f.subMenuConfig=[{iconName:"h1",name:"h1",onclick:fs(n=f.bindSubClick).call(n,f,"1")},{iconName:"h2",name:"h2",onclick:fs(r=f.bindSubClick).call(r,f,"2")},{iconName:"h3",name:"h3",onclick:fs(i=f.bindSubClick).call(i,f,"3")},{iconName:"h4",name:"h4",onclick:fs(a=f.bindSubClick).call(a,f,"4")},{iconName:"h5",name:"h5",onclick:fs(o=f.bindSubClick).call(o,f,"5")}],f.shortcutKeyMap=cs(cs(cs(cs(cs({},hs(s="".concat(x_,"-")).call(s,P_(1)),{hookName:f.name,aliasName:f.$cherry.locale.h1}),hs(c="".concat(x_,"-")).call(c,P_(2)),{hookName:f.name,aliasName:f.$cherry.locale.h2}),hs(l="".concat(x_,"-")).call(l,P_(3)),{hookName:f.name,aliasName:f.$cherry.locale.h3}),hs(u="".concat(x_,"-")).call(u,P_(4)),{hookName:f.name,aliasName:f.$cherry.locale.h4}),hs(h="".concat(x_,"-")).call(h,P_(5)),{hookName:f.name,aliasName:f.$cherry.locale.h5}),f}return ss(e,t),Ho(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"$getFlagStr",value:function(t){var e=+("string"==typeof t?t.replace(/[^0-9]+([0-9])/g,"$1"):t);return Rf("#").call("#",e||1)}},{key:"$testIsHead",value:function(t){return/^\s*(#+)\s*.+/.test(t)}},{key:"onClick",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=X_(this.editor.editor,t,"line",!0)||this.locale.header,i=this.$getFlagStr(n);if(this.isSelections||this.$testIsHead(r)||this.getMoreSelection("\n","",(function(){var t=e.editor.editor.getSelection(),n=e.$testIsHead(t);return n&&(r=t),n})),this.$testIsHead(r)){var a=!0,o=r.replace(/(^\s*)(#+)(\s*)(.+$)/gm,(function(t,e,n,r,o){var s,c,l;return a=!!a&&n.length===i.length,hs(s=hs(c=hs(l="".concat(e)).call(l,i)).call(c,r)).call(s,o)}));return a?r.replace(/(^\s*)(#+)(\s*)(.+$)/gm,"$1$4"):(this.registerAfterClickCb((function(){e.setLessSelection("".concat(i," "),"")})),o)}return this.registerAfterClickCb((function(){e.setLessSelection("".concat(i," "),"")})),r.replace(/(^)([\s]*)([^\n]+)($)/gm,"$1".concat(i," $3$4"))}}])}(l_),uS=function(t,e){var n,r=document.createElement("td");return r.className=e||"table-item",Qs(n=Is(t)).call(n,(function(e){r.dataset[e]=t[e]})),r},hS=function(){return Ho((function t(e,n){var r=e.row,i=e.col;ra(this,t),this.init(r,i,n),this.initEventListeners(),this.afterClick=function(){}}),[{key:"init",value:function(t,e,n){var r=this,i=document.createElement("table"),a=[];i.className=["cherry-insert-table-menu","cherry-dropdown"].join(" ");for(var o=1;o<=t;o++){var s=document.createElement("tr");s.className="cherry-insert-table-menu-row",a[o-1]=[];for(var c=1;c<=e;c++){var l=uS({row:o,col:c},"cherry-insert-table-menu-item");s.appendChild(l),a[o-1][c-1]=l}i.appendChild(s)}return i.style.display="none",i.addEventListener("EditorHideToolbarSubMenu",(function(){r.hide()})),this.dom=i,this.cell=a,this.maxRow=t,this.maxCol=e,this.activeRow=0,this.activeCol=0,this.dom}},{key:"initEventListeners",value:function(){var t,e;this.dom.addEventListener("mousemove",fs(t=this.handleMouseMove).call(t,this),!1),this.dom.addEventListener("mouseup",fs(e=this.handleMouseUp).call(e,this))}},{key:"setActiveCell",value:function(t,e){if(this.activeRow!==t||this.activeCol!==e){var n=Math.min(this.activeRow,t),r=Math.max(this.activeRow,t);if(n!==r)for(var i=r;i>n;i--)for(var a=1;a<=this.activeCol;a++)this.cell[i-1][a-1].classList.toggle("active");var o=Math.min(this.activeCol,e),s=Math.max(this.activeCol,e);if(o!==s)for(var c=s;c>o;c--)for(var l=1;l<=t;l++)this.cell[l-1][c-1].classList.toggle("active");this.activeRow=t,this.activeCol=e}}},{key:"handleMouseMove",value:function(t){var e=t.target;e!==this.dom&&(e.classList.contains("cherry-insert-table-menu-item")||(e=e.querySelector(".cherry-insert-table-menu-item")),e&&this.setActiveCell(e.dataset.row,e.dataset.col))}},{key:"handleMouseUp",value:function(t){var e=t.target;return e===this.dom||e.classList.contains("cherry-insert-table-menu-item")||(e=e.querySelector(".cherry-insert-table-menu-item")),this.afterClick(this.activeRow,this.activeCol),void this.hide()}},{key:"show",value:function(t){this.dom.style.display="block",this.afterClick=t}},{key:"hide",value:function(){this.dom.style.display="none";for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:"image",n=document.createElement("input");n.type="file",n.id="fileUpload",n.value="",n.style.display="none",n.addEventListener("change",(function(n){var r=xf(n.target.files,1)[0];t.$cherry.options.callback.fileUpload(r,(function(n){if("string"==typeof n&&n){var i,a="";if("image"===e)a=hs(i="![".concat(r.name,"](")).call(i,n,")");else if("video"===e){var o;a=hs(o="!video[".concat(r.name,"](")).call(o,n,")")}else if("audio"===e){var s;a=hs(s="!audio[".concat(r.name,"](")).call(s,n,")")}else{var c;a=hs(c="[".concat(r.name,"](")).call(c,n,")")}t.$cherry.$cherry.doc.replaceSelection(a)}}))})),n.click()}},{key:"onClick",value:function(t){var e,n,r,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2?arguments[2]:void 0;if(/normal-table/.test(o)){var c,l,u,h=o.match(/([0-9]+)[^0-9]([0-9]+)/),f=h?+h[1]:3,d=h?+h[2]:5,A=Rf(" Header |").call(" Header |",d),g=Rf(" ------ |").call(" ------ |",d),p="\n|".concat(Rf(" Sample |").call(" Sample |",d));return hs(c=hs(l=hs(u="".concat(t,"\n\n|")).call(u,A,"\n|")).call(l,g)).call(c,Rf(p).call(p,f),"\n\n")}var m=X_(this.editor.editor,t);switch(o){case"hr":return"".concat(t,"\n\n---\n");case"br":return"".concat(t,"
    ");case"code":return"\n``` \n".concat(t||"code...","\n```\n");case"formula":return"".concat(t,"\n\n$ e=mc^2 $\n\n");case"checklist":return"".concat(t,"\n\n- [x] Item 1\n- [ ] Item 2\n- [ ] Item 3\n");case"toc":return"".concat(t,"\n\n[[toc]]\n");case"link":return hs(e="".concat(t,"[")).call(e,this.locale.link,"](http://url.com) ");case"image":return this.handleUpload("image"),t;case"video":return this.handleUpload("video"),t;case"audio":return this.handleUpload("audio"),t;case"table":return this.subBubbleTableMenu.dom.style.left=this.subMenu.dom.style.left,this.subBubbleTableMenu.dom.style.top=this.subMenu.dom.style.top,void this.subBubbleTableMenu.show((function(e,n){var r,i,a,o=Rf(" Header |").call(" Header |",n),c=Rf(" ------ |").call(" ------ |",n),l="\n|".concat(Rf(" Sample |").call(" Sample |",n)),u=hs(r=hs(i=hs(a="".concat(t,"\n\n|")).call(a,o,"\n|")).call(i,c)).call(r,Rf(l).call(l,e),"\n\n");s(u)}));case"line-table":return hs(n="".concat(t,"\n\n")).call(n,["| :line: {x,y} | a | b | c |","| :-: | :-: | :-: | :-: |","| x | 1 | 2 | 3 |","| y | 2 | 4 | 6 |","| z | 7 | 5 | 3 |"].join("\n"),"\n\n");case"bar-table":return hs(r="".concat(t,"\n\n")).call(r,["| :bar: {x,y} | a | b | c |","| :-: | :-: | :-: | :-: |","| x | 1 | 2 | 3 |","| y | 2 | 4 | 6 |","| z | 7 | 5 | 3 |"].join("\n"),"\n\n");case"headlessTable":return this.subBubbleTableMenu.dom.style.left=this.subMenu.dom.style.left,this.subBubbleTableMenu.dom.style.top=this.subMenu.dom.style.top,void this.subBubbleTableMenu.show((function(e,n){var r,i,a,o=hs(r=hs(i="".concat(t,"\n\n||")).call(i,Rf(" ~Header ||").call(" ~Header ||",n))).call(r,Rf(a="\n||".concat(Rf(" SampleT ||").call(" SampleT ||",n))).call(a,e-1),"\n\n");s(o)}));case"pdf":return this.handleUpload("pdf"),t;case"word":return this.handleUpload("word"),t;case"ruby":return/^\s*\{[\s\S]+\|[\s\S]+\}/.test(m)?m.replace(/^\s*\{\s*([\s\S]+?)\s*\|[\s\S]+\}\s*/gm,"$1"):hs(i=" { ".concat(m," | ")).call(i,mh(a=this.editor.$cherry.options.callback.changeString2Pinyin(m)).call(a)," } ")}}}])}(l_);function gS(t,e,n){return e=es(e),Ko(t,pS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function pS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(pS=function(){return!!t})()}var mS=function(t){function e(t){var n,r,i,a;return ra(this,e),(a=gS(this,e,[t])).setName("list","list"),a.subMenuConfig=[{iconName:"ol",name:"ol",onclick:fs(n=a.bindSubClick).call(n,a,"1")},{iconName:"ul",name:"ul",onclick:fs(r=a.bindSubClick).call(r,a,"2")},{iconName:"checklist",name:"checklist",onclick:fs(i=a.bindSubClick).call(i,a,"3")}],a}return ss(e,t),Ho(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"onClick",value:function(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=[null,"ol","ul","checklist"],a=X_(this.editor.editor,t,"line",!0),o=xf(a.match(/^\n*/),1)[0],s=xf(a.match(/\n*$/),1)[0],c=i[r]?i[r]:r;return c&&/^(ol|ul|checklist)$/.test(c)?hs(e=hs(n="".concat(o)).call(n,Md(a,c))).call(e,s):a}}])}(l_);function bS(t,e,n){return e=es(e),Ko(t,vS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function vS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(vS=function(){return!!t})()}var yS=function(t){function e(t){var n;return ra(this,e),(n=bS(this,e,[t])).setName("ol","ol"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n,r=X_(this.editor.editor,t,"line",!0)||"Item 1\n Item 1.1\nItem 2",i=xf(r.match(/^\n*/),1)[0],a=xf(r.match(/\n*$/),1)[0];return hs(e=hs(n="".concat(i)).call(n,Md(r,"ol"))).call(e,a)}}])}(l_);function wS(t,e,n){return e=es(e),Ko(t,kS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function kS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(kS=function(){return!!t})()}var CS=function(t){function e(t){var n;return ra(this,e),(n=wS(this,e,[t])).setName("ul","ul"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n,r=X_(this.editor.editor,t,"line",!0)||"Item 1\n Item 1.1\nItem 2",i=xf(r.match(/^\n*/),1)[0],a=xf(r.match(/\n*$/),1)[0];return hs(e=hs(n="".concat(i)).call(n,Md(r,"ul"))).call(e,a)}}])}(l_);function xS(t,e,n){return e=es(e),Ko(t,ES()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function ES(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(ES=function(){return!!t})()}var TS=function(t){function e(t){var n;return ra(this,e),(n=xS(this,e,[t])).setName("checklist","checklist"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n,r=X_(this.editor.editor,t,"line",!0)||"Item 1\n Item 1.1\nItem 2",i=xf(r.match(/^\n*/),1)[0],a=xf(r.match(/\n*$/),1)[0];return hs(e=hs(n="".concat(i)).call(n,Md(r,"checklist"))).call(e,a)}}])}(l_);function BS(t,e,n){return e=es(e),Ko(t,_S()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function _S(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(_S=function(){return!!t})()}function SS(t,e){return[t,"```mermaid",e,"```"].join("\n")}var LS=["\tA[公司] --\x3e| 下 班 | B(菜市场)","\tB --\x3e C{看见
    卖西瓜的}","\tC --\x3e|Yes| D[买一个包子]","\tC --\x3e|No| E[买一斤包子]"].join("\n"),IS=["\tA[Company] --\x3e| Finish work | B(Grocery Store)","\tB --\x3e C{See
    Watermelon Seller}","\tC --\x3e|Yes| D[Buy a bun]","\tC --\x3e|No| E[Buy a kilogram of buns]"].join("\n"),MS={flow:["FlowChart",SS("左右结构","graph LR\n".concat(LS)),SS("上下结构","graph TD\n".concat(LS))].join("\n"),sequence:SS("SequenceDiagram",["sequenceDiagram","autonumber","A--\x3eA: 文本1","A->>B: 文本2","loop 循环1","loop 循环2","A->B: 文本3","end","loop 循环3","B --\x3e>A: 文本4","end","B --\x3e> B: 文本5","end"].join("\n")),state:SS("StateDiagram",["stateDiagram-v2","[*] --\x3e A","A --\x3e B","A --\x3e C","state A {"," \t[*] --\x3e D"," \tD --\x3e [*]","}","B --\x3e [*]","C --\x3e [*]"].join("\n")),class:SS("ClassDiagram",["classDiagram","Base <|-- One","Base <|-- Two","Base : +String name","Base: +getName()","Base: +setName(String name)","class One{"," \t+String newName"," \t+getNewName()","}","class Two{"," \t-int id"," \t-getId()","}"].join("\n")),pie:SS("PieChart",["pie","title 饼图",'"A" : 100','"B" : 80','"C" : 40','"D" : 30'].join("\n")),gantt:SS("GanttChart",["gantt","\ttitle 敏捷研发流程","\tsection 迭代前","\t\t交互设计 :a1, 2020-03-01, 4d","\t\tUI设计 :after a1, 5d","\t\t需求评审 : 1d","\tsection 迭代中","\t\t详细设计 :a2, 2020-03-11, 2d","\t\t开发 :2020-03-15, 7d","\t\t测试 :2020-03-22, 5d","\tsection 迭代后","\t\t发布: 1d","\t\t验收: 2d","\t\t回顾: 1d"].join("\n"))},OS={flow:["FlowChart",SS("Left-right structure","graph LR\n".concat(IS)),SS("Top-bottom structure","graph TD\n".concat(IS))].join("\n"),sequence:SS("SequenceDiagram",["sequenceDiagram","autonumber","A--\x3eA: text1","A->>B: text2","loop loop1","loop loop2","A->B: text3","end","loop loop3","B --\x3e>A: text4","end","B --\x3e> B: text5","end"].join("\n")),state:SS("StateDiagram",["stateDiagram-v2","[*] --\x3e A","A --\x3e B","A --\x3e C","state A {"," \t[*] --\x3e D"," \tD --\x3e [*]","}","B --\x3e [*]","C --\x3e [*]"].join("\n")),class:SS("ClassDiagram",["classDiagram","Base <|-- One","Base <|-- Two","Base : +String name","Base: +getName()","Base: +setName(String name)","class One{"," \t+String newName"," \t+getNewName()","}","class Two{"," \t-int id"," \t-getId()","}"].join("\n")),pie:SS("PieChart",["pie","title pie",'"A" : 100','"B" : 80','"C" : 40','"D" : 30'].join("\n")),gantt:SS("GanttChart",["gantt","\ttitle work","\tsection session 1","\t\twork1 :a1, 2020-03-01, 4d","\t\twork2 :after a1, 5d","\t\twork3 : 1d","\tsection session 2","\t\twork4 :a2, 2020-03-11, 2d","\t\twork5 :2020-03-15, 7d","\t\twork6 :2020-03-22, 5d","\tsection session 3","\t\twork7: 1d","\t\twork8: 2d","\t\twork9: 1d"].join("\n"))},DS=function(t){function e(t){var n,r,i,a,o,s,c;return ra(this,e),(c=BS(this,e,[t])).setName("graph","insertChart"),c.noIcon=!0,c.localeName=t.options.locale,c.subMenuConfig=[{iconName:"insertFlow",name:"insertFlow",onclick:fs(n=c.bindSubClick).call(n,c,"1")},{iconName:"insertSeq",name:"insertSeq",onclick:fs(r=c.bindSubClick).call(r,c,"2")},{iconName:"insertState",name:"insertState",onclick:fs(i=c.bindSubClick).call(i,c,"3")},{iconName:"insertClass",name:"insertClass",onclick:fs(a=c.bindSubClick).call(a,c,"4")},{iconName:"insertPie",name:"insertPie",onclick:fs(o=c.bindSubClick).call(o,c,"5")},{iconName:"insertGantt",name:"insertGantt",onclick:fs(s=c.bindSubClick).call(s,c,"6")}],c}return ss(e,t),Ho(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"onClick",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=[null,"flow","sequence","state","class","pie","gantt"],i=r[n]?r[n]:n;if(i&&/^(flow|sequence|state|class|pie|gantt)$/.test(i))return this.registerAfterClickCb((function(){e.setLessSelection("\n\n\n\n\n","\n\n")})),"\n\n".concat(this.$getSampleCode(i),"\n")}},{key:"$getSampleCode",value:function(t){var e,n;return"zh-CN"!==this.localeName&&"zh_CN"!==this.localeName?null===(n=OS[t])||void 0===n?void 0:n.replace(/\t/g," "):null===(e=MS[t])||void 0===e?void 0:e.replace(/\t/g," ")}}])}(l_);function FS(t,e,n){return e=es(e),Ko(t,NS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function NS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(NS=function(){return!!t})()}var PS=function(t){function e(t){var n,r,i,a,o,s,c,l,u,h,f,d,A;return ra(this,e),(A=FS(this,e,[t])).setName("size","size"),A.subMenuConfig=[{name:A.$cherry.locale.small,noIcon:!0,onclick:fs(n=A.bindSubClick).call(n,A,"12")},{name:A.$cherry.locale.medium,noIcon:!0,onclick:fs(r=A.bindSubClick).call(r,A,"17")},{name:A.$cherry.locale.large,noIcon:!0,onclick:fs(i=A.bindSubClick).call(i,A,"24")},{name:A.$cherry.locale.superLarge,noIcon:!0,onclick:fs(a=A.bindSubClick).call(a,A,"32")}],A.shortKeyMap={"Alt-1":"12","Alt-2":"17","Alt-3":"24","Alt-4":"32"},A.shortcutKeyMap=cs(cs(cs(cs({},hs(o="".concat(C_,"-")).call(o,P_(1)),{hookName:A.name,aliasName:hs(s="".concat(A.$cherry.locale[A.name],"-")).call(s,A.$cherry.locale.small)}),hs(c="".concat(C_,"-")).call(c,P_(2)),{hookName:A.name,aliasName:hs(l="".concat(A.$cherry.locale[A.name],"-")).call(l,A.$cherry.locale.medium)}),hs(u="".concat(C_,"-")).call(u,P_(3)),{hookName:A.name,aliasName:hs(h="".concat(A.$cherry.locale[A.name],"-")).call(h,A.$cherry.locale.large)}),hs(f="".concat(C_,"-")).call(f,P_(4)),{hookName:A.name,aliasName:hs(d="".concat(A.$cherry.locale[A.name],"-")).call(d,A.$cherry.locale.superLarge)}),A}return ss(e,t),Ho(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"_getFlagStr",value:function(t){for(var e=t.replace(/[^0-9]+([0-9])/g,"$1"),n="#",r=1;r1&&void 0!==arguments[1]?arguments[1]:"17",r=this.$getSizeByShortKey(n),i=X_(this.editor.editor,t)||"字号";if(this.isSelections||this.$testIsSize(i)||this.getMoreSelection("!32 ","!",(function(){var t=e.editor.editor.getSelection();return!!e.$testIsSize(t)&&(i=t,!0)})),this.$testIsSize(i)){var a=!0,o=i.replace(/(^)(\s*)(![0-9]+)([^\n]+)(!)(\s*)($)/gm,(function(t,e,n,i,o,s,c,l){var u,h,f,d,A,g;return a=!!a&&i==="!".concat(r),hs(u=hs(h=hs(f=hs(d=hs(A=hs(g="".concat(e)).call(g,n,"!")).call(A,r)).call(d,o)).call(f,s)).call(h,c)).call(u,l)}));return a?i.replace(/(^)(\s*)(![0-9]+\s*)([^\n]+)(!)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection("!".concat(r," "),"!")})),o)}return this.registerAfterClickCb((function(){e.setLessSelection("!".concat(r," "),"!")})),i.replace(/(^)([^\n]+)($)/gm,"$1!".concat(r," $2!$3"))}}])}(l_);function RS(t,e,n){return e=es(e),Ko(t,QS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function QS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(QS=function(){return!!t})()}var US=function(t){function e(t){var n;return ra(this,e),(n=RS(this,e,[t])).setName("h1","h1"),n}return ss(e,t),Ho(e,[{key:"$testIsHead",value:function(t){return/^\s*(#+)\s*.+/.test(t)}},{key:"onClick",value:function(t){var e=this,n=X_(this.editor.editor,t,"line",!0)||this.locale.h1,r="#";if(this.isSelections||this.$testIsHead(n)||this.getMoreSelection("\n","",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsHead(t);return r&&(n=t),r})),this.$testIsHead(n)){var i=!0,a=n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,(function(t,e,n,a,o){var s,c,l;return i=!!i&&1===n.length,hs(s=hs(c=hs(l="".concat(e)).call(l,r)).call(c,a)).call(s,o)}));return i?n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,"$1$4"):(this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),a)}return this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),n.replace(/(^)([\s]*)([^\n]+)($)/gm,"$1".concat(r," $3$4"))}}])}(l_);function $S(t,e,n){return e=es(e),Ko(t,HS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function HS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(HS=function(){return!!t})()}var jS=function(t){function e(t){var n;return ra(this,e),(n=$S(this,e,[t])).setName("h2","h2"),n}return ss(e,t),Ho(e,[{key:"$testIsHead",value:function(t){return/^\s*(#+)\s*.+/.test(t)}},{key:"onClick",value:function(t){var e=this,n=X_(this.editor.editor,t,"line",!0)||this.locale.h2,r="##";if(this.isSelections||this.$testIsHead(n)||this.getMoreSelection("\n","",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsHead(t);return r&&(n=t),r})),this.$testIsHead(n)){var i=!0,a=n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,(function(t,e,n,a,o){var s,c,l;return i=!!i&&2===n.length,hs(s=hs(c=hs(l="".concat(e)).call(l,r)).call(c,a)).call(s,o)}));return i?n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,"$1$4"):(this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),a)}return this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),n.replace(/(^)([\s]*)([^\n]+)($)/gm,"$1".concat(r," $3$4"))}}])}(l_);function KS(t,e,n){return e=es(e),Ko(t,zS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function zS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(zS=function(){return!!t})()}var GS=function(t){function e(t){var n;return ra(this,e),(n=KS(this,e,[t])).setName("h3","h3"),n}return ss(e,t),Ho(e,[{key:"$testIsHead",value:function(t){return/^\s*(#+)\s*.+/.test(t)}},{key:"onClick",value:function(t){var e=this,n=X_(this.editor.editor,t,"line",!0)||this.locale.h3,r="###";if(this.isSelections||this.$testIsHead(n)||this.getMoreSelection("\n","",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsHead(t);return r&&(n=t),r})),this.$testIsHead(n)){var i=!0,a=n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,(function(t,e,n,a,o){var s,c,l;return i=!!i&&3===n.length,hs(s=hs(c=hs(l="".concat(e)).call(l,r)).call(c,a)).call(s,o)}));return i?n.replace(/(^\s*)(#+)(\s*)(.+$)/gm,"$1$4"):(this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),a)}return this.registerAfterClickCb((function(){e.setLessSelection("".concat(r," "),"")})),n.replace(/(^)([\s]*)([^\n]+)($)/gm,"$1".concat(r," $3$4"))}}])}(l_);function XS(t,e,n){return e=es(e),Ko(t,VS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function VS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(VS=function(){return!!t})()}var WS=function(t){function e(t){var n;return ra(this,e),(n=XS(this,e,[t])).setName("quote","blockquote"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n=this,r=X_(this.editor.editor,t,"line",!0)||this.locale.quote,i=Kx(e=r.split("\n")).call(e,(function(t){return/^\s*>[^\n]+$/.exec(t)}));return i?r.replace(/(^\s*)>\s*([^\n]+)($)/gm,"$1$2$3").replace(/\n+$/,"\n\n"):(this.registerAfterClickCb((function(){n.setLessSelection("> ","")})),r.replace(/(^)([^\n]+)($)/gm,"$1> $2$3").replace(/\n+$/,"\n\n"))}}])}(l_);function qS(t,e,n){return e=es(e),Ko(t,YS()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function YS(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(YS=function(){return!!t})()}var JS=function(t){function e(t){var n;return ra(this,e),(n=qS(this,e,[t])).setName("quickTable","table"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){return"".concat(t,"| LeftAlignedCol | CenterAlignedCol | RightAlignedCol |\n")+"| :--- | :---: | ---: |\n| sampleText | sampleText | sampleText |\n| **left**Text | centered Text | *right*Text |\n"}}])}(l_);function ZS(t,e,n){return e=es(e),Ko(t,tL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function tL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(tL=function(){return!!t})()}var eL=function(t){function e(t){var n;return ra(this,e),cs(n=ZS(this,e,[t]),"$previewerHidden",!1),n.setName("previewClose","previewClose"),n.instanceId=t.instanceId,n.updateMarkdown=!1,n.attachEventListeners(),n}return ss(e,t),Ho(e,[{key:"attachEventListeners",value:function(){var t=this;this.$cherry.$event.on("previewerClose",(function(){t.isHidden=!0})),this.$cherry.$event.on("previewerOpen",(function(){t.isHidden=!1}))}},{key:"isHidden",get:function(){return this.$previewerHidden},set:function(t){if(t!==this.$previewerHidden){var e=this.dom.querySelector("i");t?(e.classList.toggle("ch-icon-previewClose",!1),e.classList.toggle("ch-icon-preview",!0),e.title=this.locale.togglePreview):(e.classList.toggle("ch-icon-previewClose",!0),e.classList.toggle("ch-icon-preview",!1),e.title=this.locale.previewClose),this.$previewerHidden=t}}},{key:"onClick",value:function(){this.editor.previewer.isPreviewerNeedFloat()?this.editor.previewer.isPreviewerFloat()?(this.editor.previewer.recoverFloatPreviewer(!0),this.isHidden=!1):(this.editor.previewer.floatPreviewer(),this.isHidden=!0):this.editor.previewer.isPreviewerHidden()?(this.editor.previewer.recoverPreviewer(!0),this.isHidden=!1):(this.editor.previewer.editOnly(!0),this.isHidden=!0)}}])}(l_);function nL(t,e,n){return e=es(e),Ko(t,rL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function rL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(rL=function(){return!!t})()}var iL=function(t){function e(t){var n;return ra(this,e),(n=nL(this,e,[t])).updateMarkdown=!1,n.setName("fullScreen","fullscreen"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(){for(var t=this.editor.options.editorDom.parentElement.classList,e=document.querySelector(".cherry-toolbar-fullscreen");e&&e.firstChild;)e.removeChild(e.firstChild);if(t.contains("fullscreen")){var n=Zf("i","ch-icon ch-icon-fullscreen");e&&e.appendChild(n),t.remove("fullscreen")}else{var r=Zf("i","ch-icon ch-icon-minscreen");e&&e.appendChild(r),t.add("fullscreen")}this.editor.editor.refresh()}}])}(l_);function aL(t,e,n){return e=es(e),Ko(t,oL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function oL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(oL=function(){return!!t})()}var sL=function(t){function e(t){var n;return ra(this,e),(n=aL(this,e,[t])).setName("undo","undo"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(){this.editor.editor.undo()}}])}(l_);function cL(t,e,n){return e=es(e),Ko(t,lL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function lL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(lL=function(){return!!t})()}var uL=function(t){function e(t){var n;return ra(this,e),(n=cL(this,e,[t])).setName("redo","redo"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(){this.editor.editor.redo()}}])}(l_);function hL(t,e,n){return e=es(e),Ko(t,fL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function fL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(fL=function(){return!!t})()}var dL=function(t){function e(t){var n,r;return ra(this,e),(r=hL(this,e,[t])).setName("codeBlock","codeBlock"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("k")),{hookName:r.name,aliasName:r.$cherry.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e=this,n=t||"code...";return this.registerAfterClickCb((function(){e.setLessSelection("\n``` \n","\n```\n")})),"\n``` \n".concat(n,"\n```\n")}}])}(l_);function AL(t,e,n){return e=es(e),Ko(t,gL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function gL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(gL=function(){return!!t})()}var pL=function(t){function e(t){var n;return ra(this,e),(n=AL(this,e,[t])).setName("inlineCode","inlineCode"),n.shortcutKeyMap=cs({},"".concat(x_,"-Backquote"),{hookName:n.name,aliasName:n.$cherry.locale[n.name]}),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n=this;return t?Iv(t).call(t,"\n")?lA(e=t.split("\n")).call(e,(function(t){return"`".concat(t,"`")})).join("\n"):(this.registerAfterClickCb((function(){return n.setLessSelection("`","`")})),"`".concat(t,"`")):(this.registerAfterClickCb((function(){return n.setLessSelection("`","`")})),"``")}}])}(l_);function mL(t,e,n){return e=es(e),Ko(t,bL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function bL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(bL=function(){return!!t})()}var vL=function(t){function e(t){var n,r,i,a,o,s,c,l,u,h,f,d,A;return ra(this,e),(A=mL(this,e,[t])).setName("codeTheme"),A.updateMarkdown=!1,A.noIcon=!0,A.subMenuConfig=[{noIcon:!1,name:"autoWrap",iconName:"br",onclick:fs(n=A.bindSubClick).call(n,A,"wrap")},{noIcon:!0,name:"light",onclick:fs(r=A.bindSubClick).call(r,A,"default")},{noIcon:!0,name:"dark",onclick:fs(i=A.bindSubClick).call(i,A,"dark")},{noIcon:!0,name:"one light",onclick:fs(a=A.bindSubClick).call(a,A,"one-light")},{noIcon:!0,name:"one dark",onclick:fs(o=A.bindSubClick).call(o,A,"one-dark")},{noIcon:!0,name:"vs light",onclick:fs(s=A.bindSubClick).call(s,A,"vs-light")},{noIcon:!0,name:"vs dark",onclick:fs(c=A.bindSubClick).call(c,A,"vs-dark")},{noIcon:!0,name:"solarized light",onclick:fs(l=A.bindSubClick).call(l,A,"solarized-light")},{noIcon:!0,name:"tomorrow dark",onclick:fs(u=A.bindSubClick).call(u,A,"tomorrow-night")},{noIcon:!0,name:"okaidia",onclick:fs(h=A.bindSubClick).call(h,A,"okaidia")},{noIcon:!0,name:"twilight",onclick:fs(f=A.bindSubClick).call(f,A,"twilight")},{noIcon:!0,name:"coy",onclick:fs(d=A.bindSubClick).call(d,A,"coy")}],A}return ss(e,t),Ho(e,[{key:"getActiveSubMenuIndex",value:function(t){return"wrap"===this.$cherry.getCodeWrap()?0:-1}},{key:"onClick",value:function(){var t=arguments.length>1?arguments[1]:void 0;if("wrap"===t){var e="wrap"===this.$cherry.getCodeWrap()?"nowrap":"wrap";return this.$cherry.wrapperDom.dataset.codeWrap=e,void this.$cherry.setCodeWrap(e)}this.$cherry.$event.emit("changeCodeBlockTheme",t),vA(this.$cherry,t)}}])}(l_);function yL(t,e,n){return e=es(e),Ko(t,wL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function wL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(wL=function(){return!!t})()}var kL=function(t){function e(t){var n,r,i,a,o;return ra(this,e),(o=yL(this,e,[t])).setName("export"),o.noIcon=!0,o.updateMarkdown=!1,o.subMenuConfig=[{noIcon:!0,name:"exportToPdf",onclick:fs(n=o.bindSubClick).call(n,o,"pdf")},{noIcon:!0,name:"exportScreenshot",onclick:fs(r=o.bindSubClick).call(r,o,"screenShot")},{noIcon:!0,name:"exportMarkdownFile",onclick:fs(i=o.bindSubClick).call(i,o,"markdown")},{noIcon:!0,name:"exportHTMLFile",onclick:fs(a=o.bindSubClick).call(a,o,"html")}],o}return ss(e,t),Ho(e,[{key:"onClick",value:function(){var t=arguments.length>1?arguments[1]:void 0;document.querySelector(".cherry-dropdown[name=export]")&&(document.querySelector(".cherry-dropdown[name=export]").style.display="none");var e=this.$cherry.previewer,n="";n=e.isPreviewerHidden()?e.options.previewerCache.html:e.getDomContainer().innerHTML,n=e.lazyLoadImg.changeDataSrc2Src(n),e.refresh(n),e.export(t)}}])}(l_),CL=["hookName","aliasName"];function xL(t,e){t.setAttribute("style","display: none;"),e.style.display="flex"}var EL=function(){return Ho((function t(e){var n=this;ra(this,t),this.$cherry=e,this.shortcutUlClassName="cherry-shortcut-key-config-panel-ul",this.shortcutUlId=this.shortcutUlClassName,this.shortcutConfigPanelKbdClassName="shortcut-key-config-panel-kbd",this.shortcutKeyboardKeyClassName="keyboard-key",this.handleDbClick=function(t){if(I_(n.$cherry.nameSpace)&&t.target instanceof HTMLElement&&(t.target.classList.contains(n.shortcutConfigPanelKbdClassName)||t.target.classList.contains(n.shortcutKeyboardKeyClassName))){var e,r=t.target.classList.contains(n.shortcutConfigPanelKbdClassName)?t.target:t.target.parentElement;r.style.display="none";var i=r.nextElementSibling;i.setAttribute("style","display: block;");var a=i.querySelector("input"),o=[];Qs(e=r.childNodes).call(e,(function(t){o.push(t.innerText)})),a.placeholder=o.join("-"),a.focus(),a.onblur=function(){xL(i,r),a.value=""};var s=[];a.onkeydown=function(t){if(t.preventDefault(),t.stopPropagation(),t.key===T_||"Backspace"===t.key)if(t.key===T_){for(var e,o,c=(null!==(e=null===(o=r.parentElement)||void 0===o?void 0:o.dataset)&&void 0!==e?e:{}).hookname,l=void 0===c?"":c,u=[],h=0;h=2&&(a.value=N_(s,v_))}}},this.clickSettingsDisableBtn=function(){I_(n.$cherry.nameSpace)?(L_(n.$cherry.nameSpace,"disable"),n.dom.classList.add("disable"),n.$cherry.editor.disableShortcut(!0)):(L_(n.$cherry.nameSpace,"enable"),n.dom.classList.remove("disable"),n.$cherry.editor.disableShortcut(!1))},this.clickSettingsRecoverBtn=function(){L_(n.$cherry.nameSpace,"enable"),n.dom.classList.remove("disable"),n.$cherry.editor.disableShortcut(!1),n.$cherry.toolbar.shortcutKeyMap={},n.$cherry.toolbar.collectShortcutKey(!1),M_(n.$cherry.nameSpace,n.$cherry.toolbar.shortcutKeyMap),n.dom.innerHTML=n.generateShortcutKeyConfigPanelHtmlStr(),n.show()},this.init()}),[{key:"init",value:function(){var t,e;null!==(t=this.$cherry)&&void 0!==t&&null!==(e=t.toolbar)&&void 0!==e&&e.shortcutKeyMap&&(this.dom=document.createElement("div"),this.dom.className=["cherry-dropdown","cherry-shortcut-key-config-panel","cherry-shortcut-key-config-panel-wrapper"].join(" "),this.dom.innerHTML=this.generateShortcutKeyConfigPanelHtmlStr(),this.dom.style.display="none",I_(this.$cherry.nameSpace)||this.dom.classList.add("disable"),this.$cherry.wrapperDom.append(this.dom))}},{key:"generateShortcutKeyConfigPanelHtmlStr",value:function(){var t,e,n,r,i,a,o,s,c,l=this,u=lA(t=Qi(e=Px(null!==(n=this.$cherry.toolbar.shortcutKeyMap)&&void 0!==n?n:{})).call(e,(function(t){var e=xf(t,2);e[0];var n=e[1];return"object"===Ro(n)&&n}))).call(t,(function(t){var e,n,r,i,a,o,s=xf(t,2),c=s[0],u=s[1],h=u.hookName,f=u.aliasName,d=_u(u,CL),A="";d&&"object"===Ro(d)&&(A=lA(o=Px(d)).call(o,(function(t){var e,n=xf(t,2),r=n[0],i=n[1];return hs(e="data-".concat(r,"=")).call(e,i)})).join(" "));return hs(e=hs(n=hs(r=hs(i='
  • \n
    ')).call(r,f,'
    \n
    ')).call(e,null==c?void 0:lA(a=c.split("-")).call(a,(function(t){var e,n,r,i=F_(t,v_),a=null!=i?i:{text:t,tip:t};return hs(e=hs(n=hs(r='')).call(e,a.text,"")})).join(""),'
    \n \n
  • ')})).join("");return hs(r=hs(i=hs(a=hs(o=hs(s=hs(c='\n
    \n
    \n '.concat(this.$cherry.locale.disableShortcut,'\n ')).call(c,this.$cherry.locale.recoverShortcut,'\n
    \n
    ')).call(s,this.$cherry.locale.editShortcutKeyConfigTip,'
    \n
      ')).call(i,u,"
    \n ")).call(r,this.$getStaticShortcut(),"\n
    ")}},{key:"$getStaticShortcut",value:function(){var t;if("vim"===this.$cherry.options.editor.keyMap)return"";for(var e=[{name:this.$cherry.locale.shortcutStatic1,key:"Ctrl+["},{name:this.$cherry.locale.shortcutStatic2,key:"Ctrl+]"},{name:this.$cherry.locale.shortcutStatic3,key:"Ctrl+Shift+D"},{name:this.$cherry.locale.shortcutStatic4,key:"Ctrl+Enter"},{name:this.$cherry.locale.shortcutStatic5,key:"Ctrl+Shift+Enter"},{name:this.$cherry.locale.shortcutStatic6,key:"Ctrl+Shift+↑"},{name:this.$cherry.locale.shortcutStatic7,key:"Ctrl+Shift+↓"},{name:this.$cherry.locale.shortcutStatic8,key:"Ctrl+Shift+K"},{name:this.$cherry.locale.shortcutStatic9,key:"Ctrl+Shift+←"},{name:this.$cherry.locale.shortcutStatic10,key:"Ctrl+Shift+→"},{name:this.$cherry.locale.shortcutStatic11,key:"Ctrl+Backspace"},{name:this.$cherry.locale.shortcutStatic12,key:"Ctrl+Shift+M"},{name:this.$cherry.locale.shortcutStatic13,key:"Ctrl+".concat(this.$cherry.locale.leftMouseButton)},{name:this.$cherry.locale.shortcutStatic14,key:"Ctrl+Shift+L"},{name:this.$cherry.locale.shortcutStatic16,key:"Alt+F3"},{name:this.$cherry.locale.shortcutStatic17,key:"Ctrl+Z"},{name:this.$cherry.locale.shortcutStatic18,key:"Ctrl+Y"}],n=[],r=0;r\n
    '.concat(a.name,'
    \n
    ')).call(i,a.key.replace(/\+/g,'+'),"\n
    \n \n "))}return hs(t='
    \n
    '.concat(this.$cherry.locale.shortcutStaticTitle,'
    \n
      ')).call(t,n.join(""),"
    \n
    ")}},{key:"show",value:function(){this.dom.style.removeProperty("display");var t=this.dom.querySelector("#".concat(this.shortcutUlId));t instanceof HTMLUListElement&&t.addEventListener("dblclick",this.handleDbClick);var e=this.dom.querySelector(".j-shortcut-settings-disable-btn");e instanceof HTMLElement&&e.addEventListener("click",this.clickSettingsDisableBtn);var n=this.dom.querySelector(".j-shortcut-settings-recover-btn");n instanceof HTMLElement&&n.addEventListener("click",this.clickSettingsRecoverBtn)}},{key:"hide",value:function(){this.dom.style.display="none";var t=this.dom.querySelector("#".concat(this.shortcutUlId));t instanceof HTMLUListElement&&t.removeEventListener("dblclick",this.handleDbClick);var e=this.dom.querySelector(".j-shortcut-settings-disable-btn");e instanceof HTMLElement&&e.removeEventListener("click",this.clickSettingsDisableBtn);var n=this.dom.querySelector(".j-shortcut-settings-recover-btn");n instanceof HTMLElement&&n.removeEventListener("click",this.clickSettingsRecoverBtn)}},{key:"isShow",value:function(){return"block"===this.dom.style.display}},{key:"isHide",value:function(){return"none"===this.dom.style.display}},{key:"toggle",value:function(t){if(!(t instanceof HTMLElement))throw new Error("settingsDom must be an instance of HTMLElement, but got: ".concat(t));var e=t.getBoundingClientRect();if(this.isHide()){this.dom.style.left="".concat(e.left+e.width/2,"px"),this.dom.style.top="".concat(e.top+e.height,"px"),this.show();var n=this.dom.getBoundingClientRect();return this.dom.style.marginLeft="0px",this.dom.style.left="".concat(e.left+e.width/2-n.width/2,"px"),void(n.left+n.width>window.innerWidth&&(this.dom.style.left="".concat(window.innerWidth-n.width-5,"px")))}return this.hide()}}])}();function TL(t,e,n){return e=es(e),Ko(t,BL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function BL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(BL=function(){return!!t})()}var _L=function(t){function e(t){var n,r,i,a,o,s;ra(this,e),(s=TL(this,e,[t])).setName("settings","settings"),s.updateMarkdown=!1,s.engine=t.engine;var c=dA("classicBr")?AA():null===(n=s.engine.$cherry.options.engine.global)||void 0===n?void 0:n.classicBr,l=t.editor.options.defaultModel,u=c?"br":"normal",h=c?"classicBr":"normalBr",f="editOnly"===l?"preview":"previewClose",d="editOnly"===l?"togglePreview":"previewClose";return s.instanceId=t.instanceId,s.subMenuConfig=[{iconName:u,name:h,onclick:fs(r=s.bindSubClick).call(r,s,"classicBr")},{iconName:f,name:d,onclick:fs(i=s.bindSubClick).call(i,s,"previewClose")},{iconName:"",name:"hide",onclick:fs(a=s.bindSubClick).call(a,s,"toggleToolbar")}],s.attachEventListeners(),s.shortcutKeyMap=cs({},hs(o="".concat(x_,"-")).call(o,P_("0")),{hookName:s.name,sub:"toggleToolbar",aliasName:s.$cherry.locale.hide}),s}return ss(e,t),Ho(e,[{key:"getSubMenuConfig",value:function(){return this.subMenuConfig}},{key:"bindSubClick",value:function(t,e,n,r){return n?this.onClick(e,t,r):this.onClick(e,t)}},{key:"togglePreviewBtn",value:function(t){var e=this,n=t?"previewClose":"preview",r=t?"previewClose":"togglePreview";if(this.subMenu){var i=document.querySelector('.cherry-dropdown[name="settings"]');if(i){var a=i.querySelector(".ch-icon-previewClose,.ch-icon-preview");a.classList.toggle("ch-icon-previewClose"),a.classList.toggle("ch-icon-preview"),a.title=this.locale[r],a.parentElement.innerHTML=a.parentElement.innerHTML.replace(/<\/i>.+$/,"".concat(this.locale[r]))}}else{var o;this.subMenuConfig=lA(o=this.subMenuConfig).call(o,(function(t){var i;return"previewClose"===t.iconName||"preview"===t.iconName?{iconName:n,name:r,onclick:fs(i=e.bindSubClick).call(i,e,"previewClose")}:t}))}}},{key:"attachEventListeners",value:function(){var t=this;this.$cherry.$event.on("previewerClose",(function(){t.togglePreviewBtn(!1)})),this.$cherry.$event.on("previewerOpen",(function(){t.togglePreviewBtn(!0)}))}},{key:"onClick",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("classicBr"===(n=this.matchShortcutKey(n))){var r,i=!AA();e=i,"undefined"!=typeof localStorage&&localStorage.setItem("cherry-classicBr",e?"true":"false"),this.engine.$cherry.options.engine.global.classicBr=i,Qs(r=this.engine.hookCenter.hookList.paragraph).call(r,(function(t){t.classicBr=i}));var a=this.$cherry.wrapperDom.querySelector(".cherry-dropdown .ch-icon-normal");a=a||this.$cherry.wrapperDom.querySelector(".cherry-dropdown .ch-icon-br"),i?(a.classList.replace("ch-icon-normal","ch-icon-br"),a.parentElement.childNodes[1].textContent=this.locale.classicBr):(a.classList.replace("ch-icon-br","ch-icon-normal"),a.parentElement.childNodes[1].textContent=this.locale.normalBr),this.engine.$cherry.previewer.update(""),this.engine.$cherry.initText(this.engine.$cherry.editor.editor)}else if("previewClose"===n){if(this.editor.previewer.isPreviewerNeedFloat())return void(this.editor.previewer.isPreviewerFloat()?this.editor.previewer.recoverFloatPreviewer(!0):this.editor.previewer.floatPreviewer());this.editor.previewer.isPreviewerHidden()?this.editor.previewer.recoverPreviewer(!0):this.editor.previewer.editOnly(!0)}else if("toggleToolbar"===n)this.toggleToolbar();else if("shortcutKey"===n){var o,s,c,l;this.shortcutKeyConfigPanel||(this.shortcutKeyConfigPanel=new EL(this.engine.$cherry));var u=null===(o=this.engine)||void 0===o||null===(s=o.$cherry)||void 0===s||null===(c=s.toolbar)||void 0===c||null===(l=c.subMenus)||void 0===l?void 0:l[this.name];u instanceof HTMLElement&&(u.style.display="none"),this.shortcutKeyConfigPanel.toggle(this.dom)}return t}},{key:"matchShortcutKey",value:function(t){var e,n=ah(e=Fx(this.shortcutKeyMap)).call(e,(function(e){return e.sub===t}));if(void 0===n){var r=O_(this.$cherry.nameSpace),i=null==r?void 0:r[t];return i?String(i.sub):t}return n.sub}},{key:"toggleToolbar",value:function(){var t,e=this.engine.$cherry.wrapperDom;e instanceof HTMLDivElement&&(Ef(t=e.className).call(t,"cherry--no-toolbar")>-1?(e.classList.remove("cherry--no-toolbar"),this.$cherry.$event.emit("toolbarShow")):(e.classList.add("cherry--no-toolbar"),this.$cherry.$event.emit("toolbarHide")))}}])}(l_);function SL(t,e,n){return e=es(e),Ko(t,LL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function LL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(LL=function(){return!!t})()}var IL=function(t){function e(t){var n,r;return ra(this,e),(r=SL(this,e,[t])).setName("underline","underline"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("u")),{hookName:r.name,aliasName:r.$cherry.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"$testIsUnderline",value:function(t){return/^\s*(\/)[\s\S]+(\1)/.test(t)}},{key:"onClick",value:function(t){var e=this,n=t||this.locale.underline;return this.isSelections||this.$testIsUnderline(n)||this.getMoreSelection(" /","/ ",(function(){var t=e.editor.editor.getSelection(),r=e.$testIsUnderline(t);return r&&(n=t),r})),this.$testIsUnderline(n)?n.replace(/(^)(\s*)(\/)([^\n]+)(\3)(\s*)($)/gm,"$1$4$7"):(this.registerAfterClickCb((function(){e.setLessSelection(" /","/ ")})),n.replace(/(^)([^\n]+)($)/gm,"$1 /$2/ $3"))}}])}(l_);function ML(t,e,n){return e=es(e),Ko(t,OL()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function OL(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(OL=function(){return!!t})()}var DL=function(t){function e(t){var n;return ra(this,e),(n=ML(this,e,[t])).setName("switchPreview"),n.instanceId=t.instanceId,n.attachEventListeners(),n}return ss(e,t),Ho(e,[{key:"attachEventListeners",value:function(){var t=this;this.$cherry.$event.on("toolbarHide",(function(){t.dom.textContent=t.locale.switchEdit})),this.$cherry.$event.on("toolbarShow",(function(){t.dom.textContent=t.locale.switchPreview}))}},{key:"onClick",value:function(){this.editor.previewer.isPreviewerHidden()?(this.editor.previewer.previewOnly(),this.dom.parentElement.parentElement.classList.add("preview-only"),this.dom.textContent=this.locale.switchEdit):(this.editor.previewer.editOnly(!0),this.dom.parentElement.parentElement.classList.remove("preview-only"),this.dom.textContent=this.locale.switchPreview)}}])}(l_);function FL(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return NL(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?NL(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function NL(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function $L(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function GL(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n")}}])}(l_);function ZL(t,e,n){return e=es(e),Ko(t,tI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function tI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(tI=function(){return!!t})()}var eI=function(t){function e(t){var n;return ra(this,e),(n=ZL(this,e,[t])).setName("hr","line"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){return"".concat(t,"\n\n---\n")}}])}(l_),nI=function(){return Ho((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ra(this,t),cs(this,"formulaConfig",{toolbar:{title:"快捷工具",subCategory:{sqrt:{title:"根式角标",formulas:[{name:"根式 Radicals",img:"",latex:""},{name:"",img:'',latex:"\\sqrt[n]{x^{a}}"},{name:"上下标 Sub&Super",img:"",latex:""},{name:"",img:'',latex:"\\sideset{_1^2}{_3^4}X_a^b"}]},limit:{title:"极限对数",formulas:[{name:"极限 Limits",img:"",latex:""},{name:"",img:'',latex:"\n\\lim_{x \\to \\infty} a"},{name:"",img:'',latex:"\\log_{a}{b}"}]}}},template:{title:"公式模板",subCategory:{algebra:{title:"代数",formulas:[{name:"",img:'',latex:"\\sqrt{a^2+b^2}"},{name:"",img:'',latex:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{name:"",img:'',latex:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{name:"",img:'',latex:"\n\\left\\{\\begin{matrix}\n x=a + r\\text{cos}\\theta \\\\\n y=b + r\\text{sin}\\theta \n\\end{matrix}\\right."}]},array:{title:"矩阵",formulas:[{name:"",img:'',latex:"\n\\begin{pmatrix}\n 1 & 0 \\\\\n 0 & 1\n\\end{pmatrix}"},{name:"",img:'',latex:"\n\\begin{pmatrix}\n a_{11} & \\cdots & a_{1n} \\\\\n \\vdots & \\ddots & \\vdots \\\\\n a_{m1} & \\cdots & a_{mn}\n\\end{pmatrix}"},{name:"",img:'',latex:"\nA_{m\\times n}=\n\\begin{bmatrix}\n a_{11}& a_{12}& \\cdots & a_{1n} \\\\\n a_{21}& a_{22}& \\cdots & a_{2n} \\\\\n \\vdots & \\vdots & \\ddots & \\vdots \\\\\n a_{m1}& a_{m2}& \\cdots & a_{mn}\n\\end{bmatrix}\n=\\left [ a_{ij}\\right ]"},{name:"",img:'',latex:"\n\\mathbf{V}_1 \\times \\mathbf{V}_2 =\n\\begin{vmatrix}\n \\mathbf{i}& \\mathbf{j}& \\mathbf{k} \\\\\n \\frac{\\partial X}{\\partial u}& \\frac{\\partial Y}{\\partial u}& 0 \\\\\n \\frac{\\partial X}{\\partial v}& \\frac{\\partial Y}{\\partial v}& 0 \\\\\n\\end{vmatrix}"}]}}}}),cs(this,"showLatexLive",!0),Is(e).length&&(this.formulaConfig=e.templateConfig||this.formulaConfig,this.showLatexLive=e.showLatexLive),this.init(),this.initEventListeners()}),[{key:"afterClick",value:function(t){}},{key:"generateBubbleFormulaHtmlStr",value:function(){var t,e,n=Px(this.formulaConfig||{}),r=lA(n).call(n,(function(t,e){var n,r,i=xf(t,2),a=i[0],o=i[1].title;return hs(n=hs(r='
  • ')).call(n,o,"
  • ")})).join(""),i='
      '.concat(r,"
    "),a=lA(n).call(n,(function(t,e){var n,r,i,a,o=xf(t,2),s=o[0],c=o[1],l=null===(n=Px((null==c?void 0:c.subCategory)||{}))||void 0===n?void 0:lA(n).call(n,(function(t){var e,n,r,i,a,o,s=xf(t,2),c=s[0],l=s[1],u=null==l||null===(e=l.formulas)||void 0===e?void 0:lA(e).call(e,(function(t){var e,n;if(""===t.latex)return'
    '.concat(t.name,"
    ");var r=t.img||"";return hs(e=hs(n='
    ')).call(e,r||t.name,"
    ")})).join(""),h=hs(n='
    ')).call(n,u,"
    "),f=hs(r='");return hs(i=hs(a=hs(o='
    ')).call(a,f)).call(i,h,"
    ")})).join("");return hs(r=hs(i=hs(a='
    ')).call(r,l,"
    ")})).join(""),o=this.showLatexLive?'
    查看更多:www.latexlive.com
    ':"";return hs(t=hs(e="".concat(i)).call(e,a)).call(t,o)}},{key:"init",value:function(){Is(this.formulaConfig).length&&(this.dom=document.createElement("div"),this.dom.className=["cherry-dropdown","cherry-insert-formula","cherry-insert-formula-wrappler"].join(" "),this.dom.innerHTML=this.generateBubbleFormulaHtmlStr(),this.dom.style.display="none")}},{key:"show",value:function(t){this.dom.style.removeProperty("display"),this.afterClick=t}},{key:"hide",value:function(){this.dom.style.display="none"}},{key:"isShow",value:function(){return"block"===this.dom.style.display}},{key:"isHide",value:function(){return"none"===this.dom.style.display}},{key:"initEventListeners",value:function(){var t,e,n,r=this;null===(t=this.dom.querySelector(".cherry-insert-formula-tabs"))||void 0===t||t.addEventListener("click",fs(e=this.handleClickFormulaTabs).call(e,this)),null===(n=this.dom.querySelectorAll(".cherry-insert-formula-categary__func-item"))||void 0===n||Qs(n).call(n,(function(t){var e;return null==t?void 0:t.addEventListener("click",fs(e=r.handleClickFormulaSelect).call(e,r))}))}},{key:"handleClickFormulaTabs",value:function(t){t.preventDefault(),t.stopPropagation();var e=t.target;if(e instanceof HTMLLIElement||e instanceof HTMLSpanElement){var n=e instanceof HTMLSpanElement?e.parentElement:e,r=n.dataset.name,i=document.querySelector(".cherry-insert-formula-select[data-name=".concat(r,"]")),a=document.querySelector(".cherry-insert-formula-tab.active"),o=document.querySelector(".cherry-insert-formula-select.active");null==a||a.classList.remove("active"),null==o||o.classList.remove("active"),n.classList.add("active"),i.classList.add("active")}}},{key:"handleClickFormulaSelect",value:function(t){t.preventDefault(),t.stopPropagation();var e=t.target;if(e instanceof HTMLElement){var n=e.dataset.formulaCode,r=void 0===n?"":n;this.afterClick(r),this.hide()}}}])}();function rI(t,e,n){return e=es(e),Ko(t,iI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function iI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(iI=function(){return!!t})()}var aI=function(t){function e(t){var n,r,i,a,o;return ra(this,e),(o=rI(this,e,[t])).setName("formula","insertFormula"),o.subBubbleFormulaMenu=new nI(null==t||null===(n=t.options)||void 0===n||null===(r=n.toolbars)||void 0===r||null===(i=r.config)||void 0===i?void 0:i.formula),t.editor.options.wrapperDom.appendChild(o.subBubbleFormulaMenu.dom),o.catchOnce="",o.shortcutKeyMap=cs({},hs(a="".concat(x_,"-")).call(a,P_("m")),{hookName:o.name,aliasName:o.$cherry.locale[o.name]}),o}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e=this;if(this.subBubbleFormulaMenu.isHide()||!this.hasCacheOnce()){var n=this.dom.getBoundingClientRect();return this.subBubbleFormulaMenu.dom.style.left="".concat(n.left+n.width,"px"),this.subBubbleFormulaMenu.dom.style.top="".concat(n.top+n.height,"px"),this.subBubbleFormulaMenu.show((function(n){var r,i,a=/\n/.test(n)?"".concat(/\n$/.test(t)?t:"".concat(t,"\n"),"$$"):"".concat(t," $ "),o=/\n/.test(n)?"\n$$ ":" $ ";e.registerAfterClickCb((function(){e.setLessSelection(a,o)}));var s=hs(r=hs(i="".concat(a)).call(i,n)).call(r,o);e.setCacheOnce(s),e.fire(null)})),this.updateMarkdown=!1,!1}return this.getAndCleanCacheOnce()}}])}(l_);function oI(t,e,n){return e=es(e),Ko(t,sI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function sI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(sI=function(){return!!t})()}var cI=function(t){function e(t){var n,r;return ra(this,e),(r=oI(this,e,[t])).setName("link","link"),r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("l")),{hookName:r.name,aliasName:r.$cherry.locale[r.name]}),r}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e;if(/^http/.test(t))return hs(e="[".concat(this.locale.link,"](")).call(e,t,")");var n=t||this.locale.link;return"[".concat(n,"](http://url.com) ")}}])}(l_);function lI(t,e,n){return e=es(e),Ko(t,uI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function uI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(uI=function(){return!!t})()}var hI=function(t){function e(t){var n;return ra(this,e),(n=lI(this,e,[t])).setName("table","table"),n.subBubbleTableMenu=new hS({row:9,col:9}),t.editor.options.wrapperDom.appendChild(n.subBubbleTableMenu.dom),n.catchOnce="",n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e=this;if("none"===this.subBubbleTableMenu.dom.style.display||!this.hasCacheOnce()){var n=this.dom.getBoundingClientRect();return this.subBubbleTableMenu.dom.style.left="".concat(n.left+n.width,"px"),this.subBubbleTableMenu.dom.style.top="".concat(n.top+n.height,"px"),this.subBubbleTableMenu.show((function(n,r){var i,a,o,s=Rf(" Header |").call(" Header |",r),c=Rf(" ------ |").call(" ------ |",r),l="\n|".concat(Rf(" Sample |").call(" Sample |",r)),u=hs(i=hs(a=hs(o="".concat(t,"\n\n|")).call(o,s,"\n|")).call(a,c)).call(i,Rf(l).call(l,n),"\n\n");e.setCacheOnce(u),e.fire(null)})),this.updateMarkdown=!1,!1}return this.getAndCleanCacheOnce()}}])}(l_);function fI(t,e,n){return e=es(e),Ko(t,dI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function dI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(dI=function(){return!!t})()}var AI=function(t){function e(t){var n;return ra(this,e),(n=fI(this,e,[t])).setName("toc","toc"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){return"".concat(t,"\n\n[[toc]]\n")}}])}(l_);function gI(t,e,n){return e=es(e),Ko(t,pI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function pI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(pI=function(){return!!t})()}var mI=function(t){function e(t){var n;return ra(this,e),(n=gI(this,e,[t])).setName("lineTable","table"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e;return hs(e="".concat(t,"\n\n")).call(e,["| :line: {x,y} | a | b | c |","| :-: | :-: | :-: | :-: |","| x | 1 | 2 | 3 |","| y | 2 | 4 | 6 |","| z | 7 | 5 | 3 |"].join("\n"),"\n\n")}}])}(l_);function bI(t,e,n){return e=es(e),Ko(t,vI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function vI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(vI=function(){return!!t})()}var yI=function(t){function e(t){var n;return ra(this,e),(n=bI(this,e,[t])).setName("brTable","table"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e;return hs(e="".concat(t,"\n\n")).call(e,["| :bar: {x,y} | a | b | c |","| :-: | :-: | :-: | :-: |","| x | 1 | 2 | 3 |","| y | 2 | 4 | 6 |","| z | 7 | 5 | 3 |"].join("\n"),"\n\n")}}])}(l_);function wI(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return kI(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kI(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function kI(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function BI(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function MI(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:"";return this.$cherry.$event.emit("changeMainTheme",e),mA(this.$cherry,e),this.updateMarkdown=!1,""}}])}(l_);function HI(t,e,n){return e=es(e),Ko(t,jI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function jI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(jI=function(){return!!t})()}var KI=function(t){function e(t){var n;return ra(this,e),(n=HI(this,e,[t])).setName("wordCount","wordCount"),n.noIcon=!0,n.countState=0,n.countEvent=new Event("count"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e=this,n=this.$cherry.wrapperDom.querySelector(".cherry-toolbar-button.cherry-toolbar-wordCount");if(0===this.countState){n.addEventListener("count",(function(){var t,r,i,a,o,s,c,l,u=e.$cherry.getMarkdown(),h=e.wordCount(u),f=h.characters,d=h.words,A=h.paragraphs,g=e.$cherry.locale;switch(e.countState){case 0:n.innerHTML=g.wordCount;break;case 1:n.innerHTML=hs(t="".concat(g.wordCountC," ")).call(t,f);break;case 2:n.innerHTML=hs(r="".concat(g.wordCountW," ")).call(r,d);break;case 3:n.innerHTML=hs(i="".concat(g.wordCountP," ")).call(i,A);break;case 4:n.innerHTML=hs(a=hs(o=hs(s=hs(c=hs(l="".concat(g.wordCountC," ")).call(l,f,"   ")).call(c,g.wordCountW," ")).call(s,d,"   ")).call(o,g.wordCountP," ")).call(a,A)}}));var r=null;this.editor.editor.on("change",(function(){r&&clearTimeout(r),r=ks((function(){n.dispatchEvent(e.countEvent),r=null}),500)}))}return this.countState+=1,this.countState>4&&(this.countState=0),n.dispatchEvent(this.countEvent),t}},{key:"wordCount",value:function(t){var e,n,r=/[\u4e00-\u9fa5]|[\u3001\u3002\uff01\uff0c\uff1b\uff1a\u201c\u201d\u2018\u2019\u300a\u300b\u3008\u3009\u3010\u3011\u300e\u300f\u300c\u300d\uff08\uff09\u2014\u2026\u2013\uff0e]/g,i=t.replace(/\n|\s/g,"").length,a=(t.match(r)||[]).length+Qi(e=t.replace(r," ").split(/[\s\n]+/)).call(e,Boolean).length,o=Qi(n=t.split(/\n{2,}/)).call(n,(function(t){return""!==mh(t).call(t)})).length;return{characters:i,words:a,paragraphs:o}}}])}(l_);function zI(t,e,n){return e=es(e),Ko(t,GI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function GI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(GI=function(){return!!t})()}var XI=function(t){function e(t){var n;return ra(this,e),(n=zI(this,e,[t])).previewer=t.previewer,n.updateMarkdown=!1,n.setName("mobilePreview","phone"),n}return ss(e,t),Ho(e,[{key:"onClick",value:function(){this.previewer.removeScroll();var t=this.previewer.getDomContainer();this.previewer.isMobilePreview?t.parentNode.innerHTML=t.innerHTML:t.innerHTML="
    ".concat(t.innerHTML,"
    "),this.previewer.isMobilePreview=!this.previewer.isMobilePreview,this.previewer.bindScroll()}}])}(l_),VI=aB;function WI(t,e,n){return e=es(e),Ko(t,qI()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function qI(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(qI=function(){return!!t})()}var YI=function(t){function e(t){var n;return ra(this,e),(n=WI(this,e,[t])).previewer=t.previewer,n.isLoading=!1,n.updateMarkdown=!1,n.setName("copy","copy"),n.lastIconOuterHtml="",n}return ss(e,t),Ho(e,[{key:"adaptWechat",value:(n=uB(xB.mark((function t(e){var n,r,i,a,o;return xB.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=/(
    .*?<\/figure>)/g,r=e.replace(n,(function(t,e,n,r){var i,a;return hs(i=hs(a="".concat(e,"p")).call(a,n,"p")).call(i,r)})),i=/()/g,a=[],r.replace(i,(function(t,e,n){a.push(JI(n))})),t.next=7,VI.all(a);case 7:return o=t.sent,t.abrupt("return",r.replace(i,(function(t,e,n,r){return e+o.shift()+r})));case 9:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"getStyleFromSheets",value:function(t){var e,n=Qi(e=Nh(document.styleSheets)).call(e,(function(e){var n;return e.cssRules[0]&&Ef(n=e.cssRules[0].cssText).call(n,t)>-1}));return"")}},{key:"computeStyle",value:function(){return{mathStyle:this.getStyleFromSheets("mjx-container"),echartStyle:"",cherryStyle:this.getStyleFromSheets("cherry")}}},{key:"toggleLoading",value:function(){this.isLoading?(this.dom.lastElementChild.outerHTML=this.lastIconOuterHtml,this.lastIconOuterHtml=""):(this.lastIconOuterHtml=this.dom.lastElementChild.outerHTML,this.dom.lastElementChild.outerHTML='
    '),this.isLoading=!this.isLoading}},{key:"onClick",value:function(t){var e=this;this.toggleLoading();var n=document.querySelector(".cherry").getAttribute("data-inline-code-theme"),r=document.querySelector(".cherry").getAttribute("data-code-block-theme"),i=this.computeStyle(),a=i.mathStyle,o=i.echartStyle,s=i.cherryStyle,c=this.previewer.isPreviewerHidden()?this.previewer.options.previewerCache.html:this.previewer.getValue();this.adaptWechat(c).then((function(t){var i,c,l;EB(hs(i=hs(c=hs(l="".concat(a+o+s,'\n
    \n
    ')).call(i,t,"
    \n
    ")),e.toggleLoading()}))}}]);var n}(l_);function JI(t,e,n){return new VI((function(e){var r=document.createElement("CANVAS"),i=r.getContext("2d"),a=new Image;a.crossOrigin="Anonymous",a.onload=function(){r.height=a.height,r.width=a.width,i.drawImage(a,0,0);var t=r.toDataURL(n||"image/png");e(t),r=null},a.src=t}))}function ZI(t,e,n){return e=es(e),Ko(t,tM()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function tM(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(tM=function(){return!!t})()}var eM=function(t){function e(t){var n,r,i,a,o,s;return ra(this,e),(s=ZI(this,e,[t])).setName("panel","tips"),s.panelRule=Od().reg,s.subMenuConfig=[{iconName:"tips",name:"tips",onclick:fs(n=s.bindSubClick).call(n,s,"primary")},{iconName:"info",name:"info",onclick:fs(r=s.bindSubClick).call(r,s,"info")},{iconName:"warning",name:"warning",onclick:fs(i=s.bindSubClick).call(i,s,"warning")},{iconName:"danger",name:"danger",onclick:fs(a=s.bindSubClick).call(a,s,"danger")},{iconName:"success",name:"success",onclick:fs(o=s.bindSubClick).call(o,s,"success")}],s}return ss(e,t),Ho(e,[{key:"$getNameFromStr",value:function(t){var e=!1;return this.panelRule.lastIndex=0,t.replace(this.panelRule,(function(t,n,r,i){var a=/\s/.test(mh(r).call(r))?mh(r).call(r).replace(/\s.*$/,""):r;return e=a?mh(a).call(a).toLowerCase():"",t})),e}},{key:"$getTitle",value:function(t){return this.panelRule.lastIndex=0,t.replace(this.panelRule,(function(t,e,n,r){var i=mh(n).call(n);return/\s/.test(i)?i.replace(/[^\s]+\s/,""):""})),""}},{key:"onClick",value:function(t){var e,n,r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=X_(this.editor.editor,t,"line",!0)||"内容",o=this.$getNameFromStr(a),s=this.$getTitle(a);return!1===o&&this.getMoreSelection("::: ","\n",(function(){var t=r.editor.editor.getSelection(),e=r.$getNameFromStr(t);return!1!==e&&(a=t,o=e,s=r.$getTitle(t)),!1!==e})),!1!==o?o===i?(this.panelRule.lastIndex=0,a.replace(this.panelRule,(function(t,e,n,r){var i,a=mh(n).call(n),o=/\s/.test(a)?a.replace(/[^\s]+\s/,""):"";return hs(i="".concat(o,"\n")).call(i,r)}))):(this.registerAfterClickCb((function(){r.setLessSelection("::: ","\n")})),this.panelRule.lastIndex=0,a.replace(this.panelRule,(function(t,e,n,r){var a,o,s=mh(n).call(n),c=/\s/.test(s)?s.replace(/[^\s]+\s/,""):"";return hs(a=hs(o="::: ".concat(i," ")).call(o,c,"\n")).call(a,r.replace(/\n+$/,""),"\n:::")}))):(this.registerAfterClickCb((function(){r.setLessSelection("::: ","\n")})),a=a.replace(/^\n+/,""),/\n/.test(a)?s||(s=a.replace(/\n[\w\W]+$/,""),a=a.replace(/^[^\n]+\n/,"")):s=s||"标题",hs(e=hs(n="::: ".concat(i," ")).call(n,s,"\n")).call(e,a,"\n:::").replace(/\n{2,}:::/g,"\n:::"))}}])}(l_);function nM(t,e,n){return e=es(e),Ko(t,rM()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function rM(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(rM=function(){return!!t})()}var iM=function(t){function e(t){var n,r,i,a,o,s,c;ra(this,e),(c=nM(this,e,[t])).setName("justify","justify"),c.panelRule=Od().reg;var l=c.$cherry.locale;return c.subMenuConfig=[{iconName:"justifyLeft",name:null!==(n=null==l?void 0:l.justifyLeft)&&void 0!==n?n:"左对齐",onclick:fs(r=c.bindSubClick).call(r,c,"left")},{iconName:"justifyCenter",name:null!==(i=null==l?void 0:l.justifyCenter)&&void 0!==i?i:"居中",onclick:fs(a=c.bindSubClick).call(a,c,"center")},{iconName:"justifyRight",name:null!==(o=null==l?void 0:l.justifyRight)&&void 0!==o?o:"右对齐",onclick:fs(s=c.bindSubClick).call(s,c,"right")}],c}return ss(e,t),Ho(e,[{key:"$getTitle",value:function(){return" "}}])}(eM);function aM(t,e,n){return e=es(e),Ko(t,oM()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function oM(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(oM=function(){return!!t})()}var sM=function(t){function e(t){var n;return ra(this,e),(n=aM(this,e,[t])).setName("detail","insertFlow"),n.detailRule=Dd().reg,n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e,n=this,r=X_(this.editor.editor,t,"line",!0)||this.$cherry.locale.detailDefaultContent;if(this.detailRule.lastIndex=0,this.detailRule.test(r)||this.getMoreSelection("+++ ","\n",(function(){var t=n.editor.editor.getSelection();n.detailRule.lastIndex=0;var e=n.detailRule.test(t);return!1!==e&&(r=t),!1!==e})),this.detailRule.lastIndex=0,this.detailRule.test(r))return this.detailRule.lastIndex=0,r.replace(this.detailRule,(function(t,e,n,r,i){var a;return hs(a="".concat(r,"\n")).call(a,i)}));(r=r.replace(/^\s+/,""),/\n/.test(r))||(r=hs(e="".concat(r,"\n")).call(e,r));return this.registerAfterClickCb((function(){n.setLessSelection("+++ ","\n")})),"+++ ".concat(r,"\n+++").replace(/\n{2,}\+\+\+/g,"\n+++")}}])}(l_);function cM(t,e,n){return e=es(e),Ko(t,lM()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function lM(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(lM=function(){return!!t})()}var uM=function(t){function e(t){var n;return ra(this,e),(n=cM(this,e,[t])).setName("draw.io","draw.io"),n.noIcon=!0,n}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){var e=this;if(!this.$cherry.options.drawioIframeUrl)return t;if(this.hasCacheOnce()){var n,r,i=this.getAndCleanCacheOnce(),a=i.xmlData,o=i.base64,s=hs(n="](".concat(o,"){data-type=drawio data-xml=")).call(n,encodeURI(a),"}");return this.registerAfterClickCb((function(){e.setLessSelection("![",s)})),hs(r="".concat("![","在预览区点击图片重新编辑draw.io")).call(r,s)}return MB(this.$cherry.options.drawioIframeUrl,this.$cherry.options.drawioIframeStyle,"",(function(t){e.setCacheOnce(t),e.fire(null)})),this.updateMarkdown=!1,t}}])}(l_);yg("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),wg);var hM=TypeError,fM=nt("Set"),dM=fM.prototype,AM={Set:fM,add:kg("add",1),has:kg("has",1),remove:kg("delete",1),proto:dM},gM=function(t,e,n){return n?Ug(t.keys(),e,!0):t.forEach(e)},pM=AM.Set,mM=AM.add,bM=function(t){return{iterator:t,next:t.next,done:!1}},vM="Invalid size",yM=RangeError,wM=TypeError,kM=Math.max,CM=function(t,e){this.set=t,this.size=kM(e,0),this.has=ut(t.has),this.keys=ut(t.keys)};CM.prototype={getIterator:function(){return bM(ue(ht(this.keys,this.set)))},includes:function(t){return ht(this.has,this.set,t)}};var xM=function(t){if("object"==typeof t&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new hM(ct(t)+" is not a set")},EM=function(t){var e=new pM;return gM(t,(function(t){mM(e,t)})),e},TM=function(t){return t.size},BM=function(t){ue(t);var e=+t.size;if(e!=e)throw new wM(vM);var n=rn(e);if(n<0)throw new yM(vM);return new CM(t,n)},_M=AM.has,SM=AM.remove,LM=function(t){var e=xM(this),n=BM(t),r=EM(e);return TM(e)<=n.size?gM(e,(function(t){n.includes(t)&&SM(r,t)})):Ug(n.getIterator(),(function(t){_M(e,t)&&SM(r,t)})),r},IM=function(){return!1};Dn({target:"Set",proto:!0,real:!0,forced:!IM()},{difference:LM});var MM=AM.Set,OM=AM.add,DM=AM.has,FM=function(t){var e=xM(this),n=BM(t),r=new MM;return TM(e)>n.size?Ug(n.getIterator(),(function(t){DM(e,t)&&OM(r,t)})):gM(e,(function(t){n.includes(t)&&OM(r,t)})),r},NM=!IM()||u((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));Dn({target:"Set",proto:!0,real:!0,forced:NM},{intersection:FM});var PM=AM.has,RM=function(t){var e=xM(this),n=BM(t);if(TM(e)<=n.size)return!1!==gM(e,(function(t){if(n.includes(t))return!1}),!0);var r=n.getIterator();return!1!==Ug(r,(function(t){if(PM(e,t))return bh(r,"normal",!1)}))};Dn({target:"Set",proto:!0,real:!0,forced:!IM()},{isDisjointFrom:RM});var QM=function(t){var e=xM(this),n=BM(t);return!(TM(e)>n.size)&&!1!==gM(e,(function(t){if(!n.includes(t))return!1}),!0)};Dn({target:"Set",proto:!0,real:!0,forced:!IM()},{isSubsetOf:QM});var UM=AM.has,$M=function(t){var e=xM(this),n=BM(t);if(TM(e).*?<\/figure>)/g,r=e.replace(n,(function(t,e,n,r){var i,a;return hs(i=hs(a="".concat(e,"p")).call(a,n,"p")).call(i,r)})),i=/()/g,a=[],r.replace(i,(function(t,e,n){return a.push(WM(n)),t})),t.next=7,VI.all(a);case 7:return o=t.sent,r=(r=r.replace(/(]+)href="[^"]*"/g,"$1")).replace(/(]+style="[^">]*width:\s*)[^";]+(;[^>]*>)/g,"$1100%$2"),t.abrupt("return",r.replace(i,(function(t,e,n,r){return e+o.shift()+r})));case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),YM=function(){var t=uB(xB.mark((function t(e,n){return xB.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"==typeof e&&e){t.next=2;break}return t.abrupt("return","");case 2:t.t0=n,t.next="wechat"===t.t0?5:6;break;case 5:return t.abrupt("return",qM(e));case 6:throw new Error("platform not support");case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),JM=YM;function ZM(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function tO(t){for(var e=1;e".concat(lA(e=Nh(t.cssRules)).call(e,(function(t){return t.cssText})).join(""),"")})).join("")}}])}(l_);function aO(t,e,n){return e=es(e),Ko(t,oO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function oO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(oO=function(){return!!t})()}var sO=function(t){function e(t){var n,r,i,a;ra(this,e),(a=aO(this,e,[t])).noIcon=!0;a.changeLocale=(null==t||null===(n=t.options)||void 0===n||null===(r=n.toolbars)||void 0===r||null===(i=r.config)||void 0===i?void 0:i.changeLocale)||[{locale:"zh_CN",name:"中文"},{locale:"en_US",name:"English"},{locale:"ru_RU",name:"Русский"}],a.subMenuConfig=[],a.nameMap={};for(var o=0;o]*>)/g,bO=/\$([$&'`]|\d{1,2})/g,vO=function(t){var e=t.flags;return void 0!==e||"flags"in fO||Bt(t,"flags")||!rt(fO,t)?e:ht(hO,t)},yO=function(t,e,n,r,i,a){var o=n+t.length,s=r.length,c=bO;return void 0!==i&&(i=yt(i),c=mO),gO(a,c,(function(a,c){var l;switch(AO(c,0)){case"$":return"$";case"&":return t;case"`":return pO(e,0,n);case"'":return pO(e,o);case"<":l=i[pO(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=dO(u/10);return 0===h?a:h<=s?void 0===r[h-1]?AO(c,1):r[h-1]+AO(c,1):a}l=r[u-1]}return void 0===l?"":l}))},wO=Ft("replace"),kO=TypeError,CO=w("".indexOf),xO=w("".replace),EO=w("".slice),TO=Math.max;Dn({target:"String",proto:!0},{replaceAll:function(t,e){var n,r,i,a,o,s,c,l,u,h=U(this),f=0,d=0,A="";if(!P(t)){if((n=Rh(t))&&(r=xr(U(vO(t))),!~CO(r,"g")))throw new kO("`.replaceAll` does not allow non-global regexes");if(i=Ot(t,wO))return ht(i,t,h,e);if(n)return xO(xr(h),t,e)}for(a=xr(h),o=xr(t),(s=$(e))||(e=xr(e)),c=o.length,l=TO(1,c),f=CO(a,o);-1!==f;)u=s?xr(e(o,f,a)):yO(o,a,f,[],void 0,e),A+=EO(a,d,f)+u,d=f+c,f=f+l>a.length?-1:CO(a,o,f+l);return d','','
    ','','','',"
    ",'
    ','','",'","
    ",'
    ','+','0 matches found.','','Aa','',"
    ","
    "].join("");e.innerHTML=n;var r=e.firstChild;return t.appendChild(r),r}},{key:"addStyle",value:function(){var t=document.createElement("style"),e=[".ace_search {","color: black;","background-color: #ddd;","border: 1px solid #cbcbcb;","border-top: 0 none;","max-width: 325px;","overflow: hidden;","margin: 0;","padding: 4px;","padding-right: 6px;","padding-bottom: 0;","position: absolute;","top: 0px;","z-index: 99;","white-space: normal;","font-size: 12px;","}",".ace_search.left {","border-left: 0 none;","border-radius: 0px 0px 5px 0px;","left: 0;","}",".ace_search.right {","border-radius: 0px 0px 0px 5px;","border-right: 0 none;","right: 0;","}",".ace_search_form, .ace_replace_form {","border-radius: 3px;","border: 1px solid #cbcbcb;","float: left;","margin-bottom: 4px;","overflow: hidden;","}",".ace_search_form.ace_nomatch {","outline: 1px solid red;","}",".ace_search_field {","background-color: white;","border-right: 1px solid #cbcbcb;","border: 0 none;","-webkit-box-sizing: border-box;","-moz-box-sizing: border-box;","box-sizing: border-box;","float: left;","height: 22px;","outline: 0;","padding: 0 7px;","width: 238px;","margin: 0;","}",".ace_searchbtn,",".ace_replacebtn {","background: #fff;","border: 0 none;","border-left: 1px solid #dcdcdc;","cursor: pointer;","float: left;","height: 22px;","padding: 0 5px;","margin: 0;","position: relative;","}",".ace_searchbtn:last-child,",".ace_replacebtn:last-child {","border-top-right-radius: 3px;","border-bottom-right-radius: 3px;","}",".ace_searchbtn:disabled {","background: none;","cursor: default;","}",".ace_searchbtn {","background-position: 50% 50%;","background-repeat: no-repeat;","width: 27px;","}",".ace_searchbtn.prev {","background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); ","}",".ace_searchbtn.next {","background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); ","}",".ace_searchbtn_close {","background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;","border-radius: 50%;","border: 0 none;","color: #656565;","cursor: pointer;","float: right;","font: 16px/16px Arial;","height: 14px;","margin: 5px 1px 9px 5px;","padding: 0;","text-align: center;","width: 14px;","}",".ace_searchbtn_close:hover {","background-color: #656565;","background-position: 50% 100%;","color: white;","}",".ace_replacebtn.prev {","width: 54px","}",".ace_replacebtn.next {","width: 27px","}",".ace_button {","margin-left: 2px;","cursor: pointer;","-webkit-user-select: none;","-moz-user-select: none;","-o-user-select: none;","-ms-user-select: none;","user-select: none;","overflow: hidden;","opacity: 0.7;","border: 1px solid rgba(100,100,100,0.23);","padding: 1px;","-moz-box-sizing: border-box;","box-sizing: border-box;","color: black;","}",".ace_button:hover {","background-color: #eee;","opacity:1;","}",".ace_button:active {","background-color: #ddd;","}",".ace_button.checked {","border-color: #3399ff;","opacity:1;","}",".ace_search_options{","clear: both;","margin: 4px 0;","text-align: right;","-webkit-user-select: none;","-moz-user-select: none;","-o-user-select: none;","-ms-user-select: none;","user-select: none;","}",".replace_toggle{","float: left;","margin-top: -2px;","padding: 0 5px;"," }",".ace_search_counter{","float: left;","font-family: arial;","padding: 0 8px;","}","button svg,path {","pointer-events: none;","}"].join("");t.setAttribute("data-name","js-searchbox"),t.textContent=e,document.head.appendChild(t)}},{key:"initElements",value:function(t){this.searchBox=t.querySelector(".ace_search_form"),this.replaceBox=t.querySelector(".ace_replace_form"),this.searchOptions=t.querySelector(".ace_search_options"),this.regExpOption=t.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=t.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=t.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")}},{key:"bindKeys",value:function(){var t=this,e={"Ctrl-F|Cmd-F|Ctrl-H|Command-Alt-F":function(){t.isReplace=!t.isReplace;var e=t.isReplace;t.replaceBox.style.display=e?"":"none",t[e?"replaceInput":"searchInput"].focus()},"Ctrl-G|Cmd-G":function(){t.findNext()},"Ctrl-Shift-G|Cmd-Shift-G":function(){t.findPrev()},Esc:function(){ks((function(){t.hide()}))},Enter:function(){t.activeInput===t.replaceInput&&t.replace(),t.findNext()},"Shift-Enter":function(){t.activeInput===t.replaceInput&&t.replace(),t.findPrev()},"Alt-Enter":function(){t.activeInput===t.replaceInput&&SO(t).call(t),t.findAll()},Tab:function(){this.activeInput===this.replaceInput?this.searchInput.focus():this.replaceInput.focus()}};this.element.addEventListener("keydown",(function(t){var n;nv(n=Is(e)).call(n,(function(n){var r=function(t,e){var n,r={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,UP:38,DOWN:40,INSERT:45,DELETE:46,INSERT_MAC:96,ASTERISK:106,PLUS:107,MINUS:109,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,SLASH:191,TRA:192,BACKSLASH:220},i=nv(n=t.split("|")).call(n,(function(t){var n,i=nv(n=t.split("-")).call(n,(function(t){var n,i;switch(t){case"Ctrl":i=e.ctrlKey;break;case"Shift":i=e.shiftKey;break;case"Alt":i=e.altKey;break;case"Cmd":i=e.metaKey;break;default:1===t.length?i=e.keyCode===t.charCodeAt(0):nv(n=Is(r)).call(n,(function(n){return t.toUpperCase()===n&&(i=e.keyCode===r[n]),n}))}return!i}));return!i}));return i}(n,t);return r&&(t.stopPropagation(),t.preventDefault(),e[n](t)),r}))}))}},{key:"$syncOptions",value:function(){IO(this.regExpOption,"checked",this.regExpOption.checked),IO(this.wholeWordOption,"checked",this.wholeWordOption.checked),IO(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),ah(this).call(this,!1,!1)}},{key:"find",value:function(t,e){var n=this,r=this.searchInput.value,i={skipCurrent:t,backwards:e,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked};this.$find(r,i,(function(t){var e=t.matches(!1,t.from());n.cm.setSelection(e.from,e.to)}))}},{key:"$find",value:function(t,e,n){var r,i,a,o,s,c,l=this.cm;if(!t)return this.clearSearch(l),void this.updateCount();var u=t,h=e,f=!0,d=h.caseSensitive,A=h.regExp,g=h.wholeWord;A&&(u=u.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")),g&&(u=d?RegExp("\\b".concat(u,"\\b")):RegExp("\\b".concat(u,"\\b"),"i")),A&&(u=RegExp(u)),this.clearSearch(l),this.doSearch(l,u,d),this.updateCount(),c=h.backwards?h.skipCurrent?"from":"to":h.skipCurrent?"to":"from";var p=l.getCursor(c),m=l.getSearchCursor(u,p,!d);o=fs(r=m.findNext).call(r,m),s=fs(i=m.findPrevious).call(i,m),h.backwards&&!s()?(f=o())&&(l.setCursor(l.doc.size-1,0),this.$find(t,e,n),a=!0):h.backwards||o()||(f=s())&&(l.setCursor(0,0),this.$find(t,e,n),a=!0);var b=!f&&this.searchInput.value;IO(this.searchBox,"ace_nomatch",b),!a&&f&&n(m)}},{key:"findNext",value:function(){ah(this).call(this,!0,!1)}},{key:"findPrev",value:function(){ah(this).call(this,!0,!0)}},{key:"findAll",value:function(){var t=this.cm,e=this.searchInput.value,n=this.searchInput.value;IO(this.searchBox,"ace_nomatch",n),t.showMatchesOnScrollbar&&t.showMatchesOnScrollbar(e),this.hide()}},{key:"replace",value:function(){var t=this.cm,e=t.getOption("readOnly"),n=!!t.getSelection();!e&&n&&t.replaceSelection(this.replaceInput.value,"start"),this.updateCount()}},{key:"replaceAndFindNext",value:function(){this.cm.getOption("readOnly")||(this.replace(),this.findNext())}},{key:"replaceAll",value:function(){var t,e,n=this.cm,r=this.searchInput.value,i=this.replaceInput.value,a=RegExp(r,this.caseSensitiveOption.checked?"g":"gi");this.wholeWordOption.checked&&!this.regExpOption.checked&&(a=this.caseSensitiveOption.checked?RegExp("\\b".concat(r,"\\b"),"g"):RegExp("\\b".concat(r,"\\b"),"gi")),!n.getOption("readOnly")&&n.getSelection()&&(e=n.getCursor(),t=(t=n.getValue()).replace(a,i),n.setValue(t),n.setCursor(e)),this.updateCount()}},{key:"toggleReplace",value:function(){var t=this.cm.display.wrapper;"+"===t.parentElement.querySelector("[action=toggleReplace]").innerText?(t.parentElement.querySelector("[action=toggleReplace]").innerText="-",this.replaceBox.style.display="",this.isReplace=!0):(t.parentElement.querySelector("[action=toggleReplace]").innerText="+",this.replaceBox.style.display="none",this.isReplace=!1)}},{key:"hide",value:function(){var t=this.cm;this.clearSearch(t),this.element.style.display="none",t.focus()}},{key:"isVisible",value:function(){return"none"!==this.element.style.display}},{key:"show",value:function(t,e){(this.element.style.display="",this.replaceBox.style.display=e?"":"none",this.isReplace=e,t)&&(this.searchInput.value=t,ah(this).call(this,!1,!1));this.searchInput.focus(),this.searchInput.select()}},{key:"isFocused",value:function(){var t=document.activeElement;return t===this.searchInput||t===this.replaceInput}},{key:"doSearch",value:function(t,e,n){var r=this.getSearchState(t),i=e;i&&i!==r.queryText&&(this.startSearch(t,r,i,n),r.posFrom=t.getCursor(),r.posTo=r.posFrom)}},{key:"parseString",value:function(t){return t.replace(/\\([nrt\\])/g,(function(t,e){return"n"===e?"\n":"r"===e?"\r":"t"===e?"\t":"\\"===e?"\\":t}))}},{key:"parseQuery",value:function(t){var e=("object"===Ro(t)?t.toString():t).match(/^\/(.*)\/([a-z]*)$/),n=t;if(e)try{var r;n=new RegExp(e[1],-1===Ef(r=e[2]).call(r,"i")?"":"i")}catch(t){}else n=this.parseString(t);return("string"==typeof n?""===n:n.test(""))&&(n=/x^/),n}},{key:"startSearch",value:function(t,e,n,r){e.queryText=n,e.query=this.parseQuery(n),t.removeOverlay(e.overlay,this.queryCaseInsensitive(e.query,r)),e.overlay=this.searchOverlay(e.query,this.queryCaseInsensitive(e.query,r)),t.addOverlay(e.overlay),t.showMatchesOnScrollbar&&(e.annotate&&(e.annotate.clear(),e.annotate=null),e.annotate=t.showMatchesOnScrollbar(e.query,this.queryCaseInsensitive(e.query,r)))}},{key:"queryCaseInsensitive",value:function(t,e){return"string"==typeof t&&!e}},{key:"searchOverlay",value:function(t,e){var n=t;return"string"==typeof t?n=new RegExp(t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),e?"gi":"g"):t.global||(n=new RegExp(t.source,t.ignoreCase?"gi":"g")),{token:function(t){n.lastIndex=t.pos;var e=n.exec(t.string);if(e&&e.index===t.pos)return t.pos+=e[0].length||1,"searching";e?t.pos=e.index:t.skipToEnd()}}}},{key:"getSearchState",value:function(t){return t.state.search||(t.state.search={posFrom:null,posTo:null,lastQuery:null,query:null,overlay:null})}},{key:"clearSearch",value:function(t){var e=this;t.operation((function(){var n=e.getSearchState(t);n.lastQuery=n.query,n.query&&(n.query=null,n.queryText=null,t.removeOverlay(n.overlay),n.annotate&&(n.annotate.clear(),n.annotate=null))}))}},{key:"updateCount",value:function(){var t,e=this.cm,n=this.searchInput.value,r=[];n&&(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t=this.caseSensitiveOption.checked?RegExp(n,"g"):RegExp(n,"gi"),this.wholeWordOption.checked&&(t=this.caseSensitiveOption.checked?RegExp("\\b".concat(n,"\\b"),"g"):RegExp("\\b".concat(n,"\\b"),"gi")),this.regExpOption.checked&&(t=RegExp(n,"gi")),r=e.getValue().match(t));var i=r?r.length:0,a=e.display.wrapper.parentElement.querySelector(".ace_search_counter");a&&(a.innerText="".concat(i," matches found.")),0===i&&e.setSelection({ch:0,line:0},{ch:0,line:0})}}])}();function IO(t,e,n){t.classList[n?"add":"remove"](e)}function MO(t,e,n){return e=es(e),Ko(t,OO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function OO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(OO=function(){return!!t})()}var DO=function(t){function e(t){var n,r;return ra(this,e),(r=MO(this,e,[t])).setName("search","search"),r.updateMarkdown=!1,r.shortcutKeyMap=cs({},hs(n="".concat(x_,"-")).call(n,P_("f")),{hookName:r.name,aliasName:t.locale[r.name]}),r.searchBox=new LO,r.searchBoxInit=!1,r}return ss(e,t),Ho(e,[{key:"onClick",value:function(t){this.searchBoxInit||(this.searchBoxInit=!0,this.searchBox.init(this.$cherry.editor.editor)),this.searchBox.isVisible()?this.searchBox.hide():this.searchBox.show(t,!0)}}])}(l_),FO={bold:U_,italic:j_,"|":G_,strikethrough:q_,sub:Z_,sup:nS,header:lS,insert:AS,list:mS,ol:yS,ul:CS,checklist:TS,graph:DS,size:PS,h1:US,h2:jS,h3:GS,color:aS,quote:WS,quickTable:JS,togglePreview:eL,code:dL,inlineCode:pL,codeTheme:vL,export:kL,settings:_L,fullScreen:iL,mobilePreview:XI,copy:YI,undo:sL,redo:uL,underline:IL,switchModel:DL,image:QL,audio:KL,video:WL,br:JL,hr:eI,formula:aI,link:cI,table:hI,toc:AI,lineTable:mI,barTable:yI,pdf:EI,word:FI,ruby:RI,theme:$I,file:LI,panel:eM,justify:iM,detail:sM,drawIo:uM,wordCount:KI,publish:iO,changeLocale:sO,shortcutKey:uO,search:DO},NO=function(){return Ho((function t(e){ra(this,t),this.toolbar=e,this.hooks={},this.allMenusName=[],this.level1MenusName=[],this.level2MenusName={},this.menuOptionsKey=["name","icon","subMenu"],this.init()}),[{key:"$newMenu",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this.hooks[t]){var n=e||{name:t,icon:t},r=this.toolbar.options,i=r.$cherry,a=r.customMenu;i.$currentMenuOptions=n,FO[t]?(this.allMenusName.push(t),this.hooks[t]=new FO[t](i)):null!=a&&a[t]&&(this.allMenusName.push(t),this.hooks[t]=new a[t](i))}}},{key:"init",value:function(){var t=this,e=this.toolbar.options.buttonConfig;Qs(e).call(e,(function(e){if("string"==typeof e)t.level1MenusName.push(e),t.$newMenu(e);else if("object"===Ro(e)){var n=Is(e);if(1===n.length){var r,i,a,o,s=xf(n,1)[0];if(Iv(r=t.menuOptionsKey).call(r,s))throw Error(hs(o="this menu key is not allowed: ".concat(s,", forbid menu key: ")).call(o,t.menuOptionsKey));console.warn(hs(i="this subMenu config type will be deprecated, please use {subMenu: ['".concat(s,"']} config: ")).call(i,e)),t.level1MenusName.push(s),t.$newMenu(s),t.level2MenusName[s]=e[s],Qs(a=e[s]).call(a,(function(e){t.$newMenu(e)}))}else{if(!e.name)return;t.level1MenusName.push(e.name),t.$newMenu(e.name,e)}}}))}}])}(),PO=function(){return Ho((function t(e){ra(this,t),cs(this,"toolbarHandlers",{}),this.menus={},this.shortcutKeyMap={},this.subMenus={},this.options={dom:document.createElement("div"),buttonConfig:["bold"],customMenu:[]},Ss(this.options,e),this.$cherry=this.options.$cherry,this.instanceId=this.$cherry.instanceId,this.menus=new NO(this),this.drawMenus(),this.collectShortcutKey(),this.collectToolbarHandler(),this.init()}),[{key:"init",value:function(){var t=this;this.$cherry.$event.on("cleanAllSubMenus",(function(){return t.hideAllSubMenu()}))}},{key:"previewOnly",value:function(){this.options.dom.classList.add("preview-only"),this.$cherry.wrapperDom.classList.add("cherry--no-toolbar"),this.$cherry.$event.emit("toolbarHide")}},{key:"showToolbar",value:function(){this.options.dom.classList.remove("preview-only"),this.$cherry.wrapperDom.classList.remove("cherry--no-toolbar"),this.$cherry.$event.emit("toolbarShow")}},{key:"isHasLevel2Menu",value:function(t){return this.menus.level2MenusName[t]}},{key:"isHasConfigMenu",value:function(t){return this.menus.hooks[t].subMenuConfig||[]}},{key:"isHasSubMenu",value:function(t){return Boolean(this.isHasLevel2Menu(t)||this.isHasConfigMenu(t).length>0)}},{key:"drawMenus",value:function(){var t,e=this,n=document.createDocumentFragment();Qs(t=this.menus.level1MenusName).call(t,(function(t){var r=e.menus.hooks[t].createBtn();"object"===("undefined"==typeof window?"undefined":Ro(window))&&"onpointerup"in window?(r.addEventListener("pointerdown",(function(){e.isPointerDown=!0}),!1),r.addEventListener("pointerup",(function(n){e.isPointerDown&&e.onClick(n,t),e.isPointerDown=!1}),!1)):r.addEventListener("click",(function(n){e.onClick(n,t)}),!1),e.isHasSubMenu(t)&&r.classList.add("cherry-toolbar-dropdown"),n.appendChild(r)})),this.appendMenusToDom(n)}},{key:"appendMenusToDom",value:function(t){var e=Zf("div","toolbar-left");e.appendChild(t),this.options.dom.appendChild(e)}},{key:"setSubMenuPosition",value:function(t,e){var n=t.getMenuPosition();e.style.left="".concat(n.left+n.width/2,"px"),e.style.top="".concat(n.top+n.height,"px"),e.style.position=t.positionModel}},{key:"drawSubMenus",value:function(t){var e=this;this.subMenus[t]=Zf("div","cherry-dropdown",{name:t}),this.setSubMenuPosition(this.menus.hooks[t],this.subMenus[t]);var n=this.isHasLevel2Menu(t);n&&Qs(n).call(n,(function(n){var r=e.menus.hooks[n];if(void 0!==r&&"function"==typeof r.createBtn){var i=r.createBtn(!0);r.dom=r.dom?r.dom:e.menus.hooks[t].dom,i.addEventListener("click",(function(t){return e.onClick(t,n,!0)}),!1),e.subMenus[t].appendChild(i)}}));var r=this.isHasConfigMenu(t);r.length>0&&Qs(r).call(r,(function(n){var r=e.menus.hooks[t].createSubBtnByConfig(n);null!=n&&n.disabledHideAllSubMenu||r.addEventListener("click",(function(){return e.hideAllSubMenu()}),!1),e.subMenus[t].appendChild(r)})),this.$cherry.wrapperDom.appendChild(this.subMenus[t])}},{key:"onClick",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this.menus.hooks[e];i&&(this.isHasSubMenu(e)&&!r?this.toggleSubMenu(e):("function"==typeof i.hideOtherSubMenu?i.hideOtherSubMenu((function(){return n.hideAllSubMenu()})):this.hideAllSubMenu(),i.fire(t,e)))}},{key:"activeSubMenuItem",value:function(t){var e,n,r,i=this.subMenus[t],a=null===(e=this.menus.hooks)||void 0===e||null===(n=e[t])||void 0===n?void 0:n.getActiveSubMenuIndex(i);null==i||Qs(r=i.querySelectorAll(".cherry-dropdown-item")).call(r,(function(t,e){t.classList.toggle("cherry-dropdown-item__selected",e===a)}))}},{key:"toggleSubMenu",value:function(t){if(!this.subMenus[t])return this.hideAllSubMenu(),this.drawSubMenus(t),this.subMenus[t].style.display="block",void this.activeSubMenuItem(t);"none"===this.subMenus[t].style.display?(this.hideAllSubMenu(),this.subMenus[t].style.display="block",this.setSubMenuPosition(this.menus.hooks[t],this.subMenus[t]),this.activeSubMenuItem(t)):this.subMenus[t].style.display="none"}},{key:"hideAllSubMenu",value:function(){var t;Qs(t=this.$cherry.wrapperDom.querySelectorAll(".cherry-dropdown")).call(t,(function(t){t.style.display="none"}))}},{key:"collectMenuInfo",value:function(t){this.toolbarHandlers=Ss({},this.toolbarHandlers,t.toolbarHandlers),this.menus.hooks=Ss({},t.menus.hooks,this.menus.hooks),(!this.options.shortcutKey||Is(this.options.shortcutKey).length<=0)&&(this.shortcutKeyMap=Ss({},this.shortcutKeyMap,t.shortcutKeyMap))}},{key:"collectShortcutKey",value:function(){var t,e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.$cherry.options.toolbars.shortcutKey&&Is(this.$cherry.options.toolbars.shortcutKey).length>0&&Qs(t=Px(this.$cherry.options.toolbars.shortcutKey)).call(t,(function(t){var n=xf(t,2),r=n[0],i=n[1],a=r.replace(/Ctrl-/g,"Control-").replace(/-([A-Za-z])$/g,(function(t,e){return"-Key".concat(e.toUpperCase())})).replace(/-([0-9])$/g,"-Digit$1");e.shortcutKeyMap[a]={hookName:i,aliasName:e.$cherry.locale[i]||i}}));if(this.$cherry.options.toolbars.shortcutKeySettings.isReplace)this.shortcutKeyMap=this.$cherry.options.toolbars.shortcutKeySettings.shortcutKeyMap;else{var r,i;if(Qs(r=this.menus.allMenusName).call(r,(function(t){var n,r;(null===(n=e.menus.hooks[t].shortcutKeys)||void 0===n||Qs(n).call(n,(function(n){e.shortcutKeyMap[n]=t})),"object"===Ro(e.menus.hooks[t].shortcutKeyMap)&&e.menus.hooks[t].shortcutKeyMap)&&Qs(r=Px(e.menus.hooks[t].shortcutKeyMap)).call(r,(function(t){var n=xf(t,2),r=n[0],i=n[1];r in e.shortcutKeyMap?console.error("The shortcut key ".concat(r," is already registered")):e.shortcutKeyMap[r]=i}))})),Qs(i=Px(this.$cherry.options.toolbars.shortcutKeySettings.shortcutKeyMap)).call(i,(function(t){var n=xf(t,2),r=n[0],i=n[1];e.shortcutKeyMap[r]=i})),!n)return;var a=O_(this.$cherry.nameSpace);if(a){var o,s,c={};Qs(o=Px(this.shortcutKeyMap)).call(o,(function(t){var e,n=xf(t,2),r=n[0],i=n[1];c[hs(e="".concat(i.hookName,"-")).call(e,i.aliasName)]=r})),Qs(s=Px(a)).call(s,(function(t){var n,r=xf(t,2),i=r[0],a=r[1],o=hs(n="".concat(a.hookName,"-")).call(n,a.aliasName);c[o]&&delete e.shortcutKeyMap[c[o]],e.shortcutKeyMap[i]=a}))}}}},{key:"updateShortcutKeyMap",value:function(t,e){if(t===e)return!1;var n=this.shortcutKeyMap[t];if(!n)return!1;delete this.shortcutKeyMap[t],this.shortcutKeyMap[e]=n,M_(this.$cherry.nameSpace,this.shortcutKeyMap)}},{key:"collectToolbarHandler",value:function(){var t,e=this;this.toolbarHandlers=zm(t=this.menus.allMenusName).call(t,(function(t,n){var r=e.menus.hooks[n];return r?(t[n]=function(t,e){"function"==typeof e&&id.warn("MenuBase#onClick param callback is no longer supported. Please register the callback via MenuBase#registerAfterClickCb instead."),r.fire.call(r,void 0,t)},t):t}),{})}},{key:"matchShortcutKey",value:function(t){var e,n=S_(t),r=D_(n);return!(null===(e=this.shortcutKeyMap)||void 0===e||!e[r])}},{key:"fireShortcutKey",value:function(t){var e;if(!I_(this.$cherry.nameSpace))return!1;var n,r=S_(t),i=D_(r),a=null===(e=this.shortcutKeyMap[i])||void 0===e?void 0:e.hookName;"string"==typeof a&&a&&(null===(n=this.menus.hooks[a])||void 0===n||n.fire(t,i));return!0}}])}();function RO(t,e,n){return e=es(e),Ko(t,QO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function QO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(QO=function(){return!!t})()}var UO=function(t){function e(){return ra(this,e),RO(this,e,arguments)}return ss(e,t),Ho(e,[{key:"visible",get:function(){var t=window.getComputedStyle(this.bubbleDom);return"none"!==t.display&&"hidden"!==t.visibility},set:function(t){var n=window.getComputedStyle(this.bubbleDom);t?"none"===n.display&&(this.bubbleDom.style.display=e.displayType):"none"!==n.display&&(this.bubbleDom.style.display="none")}},{key:"init",value:function(){var t,e=this;this.options.editor=this.$cherry.editor,this.addSelectionChangeListener(),this.bubbleDom=this.options.dom,this.editorDom=this.options.editor.getEditorDom(),this.initBubbleDom(),this.editorDom.querySelector(".CodeMirror").appendChild(this.bubbleDom),Qs(t=Px(this.shortcutKeyMap)).call(t,(function(t){var n=xf(t,2),r=n[0],i=n[1];e.$cherry.toolbar.shortcutKeyMap[r]=i}))}},{key:"appendMenusToDom",value:function(t){this.options.dom.appendChild(t)}},{key:"getScrollTop",value:function(){return this.options.editor.editor.getScrollInfo().top}},{key:"updatePositionWhenScroll",value:function(){this.bubbleDom.style.display===e.displayType&&(this.bubbleDom.style.marginTop="".concat(Wf(this.bubbleDom.dataset.scrollTop)-this.getScrollTop(),"px"))}},{key:"showBubble",value:function(t,e){this.visible||(this.visible=!0,this.bubbleDom.style.marginTop="0",this.bubbleDom.dataset.scrollTop=String(this.getScrollTop()));var n=this.editorDom.querySelector(".CodeMirror-lines").firstChild.getBoundingClientRect(),r=this.editorDom.getBoundingClientRect(),i=n.left-r.left,a=n.width+i,o=t;o<2*this.bubbleDom.offsetHeight?(o+=this.bubbleDom.offsetHeight-this.bubbleTop.getBoundingClientRect().height,this.bubbleTop.style.display="block",this.bubbleBottom.style.display="none"):(o-=this.bubbleDom.offsetHeight+2*this.bubbleBottom.getBoundingClientRect().height,this.bubbleTop.style.display="none",this.bubbleBottom.style.display="block"),this.bubbleDom.style.top="".concat(o,"px");var s=e-this.bubbleDom.offsetWidth/2;sa?(s=a-this.bubbleDom.offsetWidth,this.$setBubbleCursorPosition("".concat(e-s,"px"))):this.$setBubbleCursorPosition("50%"),this.bubbleDom.style.left="".concat(Math.max(20,s),"px")}},{key:"hideBubble",value:function(){this.visible=!1}},{key:"$setBubbleCursorPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"50%";if("50%"===t)this.bubbleTop.style.left="50%",this.bubbleBottom.style.left="50%";else{var e=Wf(t)<10?"10px":t;this.bubbleTop.style.left=e,this.bubbleBottom.style.left=e}}},{key:"initBubbleDom",value:function(){var t=document.createElement("div");t.className="cherry-bubble-top";var e=document.createElement("div");e.className="cherry-bubble-bottom",this.bubbleTop=t,this.bubbleBottom=e,this.bubbleDom.appendChild(t),this.bubbleDom.appendChild(e),this.visible=!1}},{key:"getBubbleDom",value:function(){return this.bubbleDom}},{key:"addSelectionChangeListener",value:function(){var t=this;this.options.editor.addListener("change",(function(e){t.hideBubble()})),this.options.editor.addListener("refresh",(function(e){t.hideBubble()})),this.options.editor.addListener("scroll",(function(e){t.updatePositionWhenScroll()})),this.options.editor.addListener("beforeSelectionChange",(function(e,n){if(ks((function(){var r=e.getSelections(),i=r.join("");i!==t.lastSelectionsStr&&(i||t.lastSelectionsStr)&&(t.lastSelections=t.lastSelections?t.lastSelections:[],t.$cherry.$event.emit("selectionChange",{selections:r,lastSelections:t.lastSelections,info:n}),t.lastSelections=r,t.lastSelectionsStr=i)}),10),"*mouse"!==n.origin&&(null!==n.origin||void 0===n.origin))return!0;if(!n.ranges[0])return!0;var r=1e6*n.ranges[0].anchor.line+n.ranges[0].anchor.ch,i=1e6*n.ranges[0].head.line+n.ranges[0].head.ch,a="asc";r>i&&(a="desc"),ks((function(){if(e.getSelections().join("").length<=0)t.hideBubble();else{var n=e.getWrapperElement().getElementsByClassName("CodeMirror-selected"),r=t.editorDom.getBoundingClientRect(),i=0,o=0;if("object"!==Ro(n)||n.length<=0)t.hideBubble();else{for(var s=0;s=o&&(o=l,i=c.left-r.left+c.width/2):(l<=o||o<=0)&&(o=l,i=c.left-r.left+c.width/2)}t.showBubble(o,i)}}}),10)}))}}])}(PO);function $O(t,e,n){return e=es(e),Ko(t,HO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function HO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(HO=function(){return!!t})()}cs(UO,"displayType","flex");var jO=function(t){function e(){return ra(this,e),$O(this,e,arguments)}return ss(e,t),Ho(e,[{key:"init",value:function(){var t,e=this;this.editor=this.$cherry.editor,this.editorDom=this.editor.getEditorDom(),this.editorDom.querySelector(".CodeMirror-scroll").appendChild(this.options.dom),this.initAction(),Qs(t=Px(this.shortcutKeyMap)).call(t,(function(t){var n=xf(t,2),r=n[0],i=n[1];e.$cherry.toolbar.shortcutKeyMap[r]=i}))}},{key:"appendMenusToDom",value:function(t){this.options.dom.appendChild(t)}},{key:"initAction",value:function(){var t=this;this.editor.addListener("cursorActivity",(function(e,n){t.cursorActivity(n,e)})),this.editor.addListener("update",(function(e,n){t.cursorActivity(n,e)})),this.editor.addListener("refresh",(function(e,n){ks((function(){t.cursorActivity(n,e)}),0)}))}},{key:"update",value:function(t,e){var n=e.getCursor();if(this.isHidden(n.line,e))return this.options.dom.style.display="none",!1;this.options.dom.style.display="inline-block"}},{key:"cursorActivity",value:function(t,e){var n=e.getCursor(),r=document.querySelector(".cherry-editor .CodeMirror-lines");if(!r)return!1;var i=getComputedStyle(r),a=Wf(i.paddingLeft),o=Wf(i.paddingTop);if(this.isHidden(n.line,e))return this.options.dom.style.display="none",!1;this.options.dom.style.display="inline-block",this.options.dom.style.left="".concat(a,"px"),this.options.dom.style.top="".concat(this.getLineHeight(n.line,e)+o,"px")}},{key:"isHidden",value:function(t,e){return e.getSelections().length>1||(e.getSelection().length>0||!!e.getLine(t))}},{key:"getLineHeight",value:function(t,e){var n=0;return e.getDoc().eachLine(0,t,(function(t){n+=t.height})),n}}])}(PO);function KO(t,e,n){return e=es(e),Ko(t,zO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function zO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(zO=function(){return!!t})()}var GO=function(t){function e(){return ra(this,e),KO(this,e,arguments)}return ss(e,t),Ho(e,[{key:"appendMenusToDom",value:function(t){var e=Zf("div","toolbar-right");e.appendChild(t),this.options.dom.appendChild(e)}},{key:"init",value:function(){var t,n=this;xm(es(e.prototype),"init",this).call(this),Qs(t=Px(this.shortcutKeyMap)).call(t,(function(t){var e=xf(t,2),r=e[0],i=e[1];n.$cherry.toolbar.shortcutKeyMap[r]=i}))}}])}(PO),XO=function(){return Ho((function t(e){var n,r,i,a,o;ra(this,t),this.$cherry=e.$cherry,this.editor=e.$cherry.editor.editor,this.tocStr="",this.updateLocationHash=null===(n=e.updateLocationHash)||void 0===n||n,this.defaultModel=null!==(r=e.defaultModel)&&void 0!==r?r:"full",this.showAutoNumber=null!==(i=e.showAutoNumber)&&void 0!==i&&i,this.position=null!==(a=e.position)&&void 0!==a?a:"absolute",this.cssText=null!==(o=e.cssText)&&void 0!==o?o:"",this.init()}),[{key:"init",value:function(){var t=this;this.drawDom(),this.timer=ks((function(){t.updateTocList()}),300),this.editor.on("change",(function(e,n){clearTimeout(t.timer),t.timer=ks((function(){t.updateTocList(),t.$switchModel(t.model)}),300)})),this.$switchModel(this.getModelFromLocalStorage())}},{key:"getModelFromLocalStorage",value:function(){return"undefined"==typeof localStorage?this.defaultModel:localStorage.getItem("cherry-toc-model")||this.defaultModel}},{key:"setModelToLocalStorage",value:function(t){"undefined"!=typeof localStorage&&localStorage.setItem("cherry-toc-model",t)}},{key:"drawDom",value:function(){var t=Zf("div","cherry-flex-toc cherry-flex-toc__pure".concat(this.showAutoNumber?" auto-num":""));"fixed"===this.position&&t.classList.add("cherry-flex-toc__fixed"),this.cssText.length>0&&(t.style.cssText=this.cssText);var e=Zf("div","cherry-toc-head"),n=Zf("span","cherry-toc-title");n.append(this.$cherry.locale.toc);var r=Zf("i","ch-icon ch-icon-chevronsRight"),i=Zf("i","ch-icon ch-icon-chevronsLeft");this.tocClose=r,this.tocOpen=i,e.appendChild(n),e.appendChild(r),e.appendChild(i),t.appendChild(e);var a=Zf("div","cherry-toc-list");this.tocListDom=a,t.appendChild(a),this.tocDom=t,this.$cherry.wrapperDom.appendChild(t),this.bindClickEvent()}},{key:"bindClickEvent",value:function(){var t=this;this.tocDom.addEventListener("click",(function(e){var n=t.$getClosestNode(e.target,"A");if(!1!==n&&/cherry-toc-one-a/.test(n.className)){var r=n.dataset,i=r.id,a=r.index;if("hide"===t.$cherry.status.previewer){for(var o=t.$cherry.editor.editor.getSearchCursor(/(?:^|\n)\n*((?:[ \t\u00a0]*#{1,6}).+?|(?:[ \t\u00a0]*.+)\n(?:[ \t\u00a0]*[=]+|[-]+))(?=$|\n)/g),s=0;s<=a;s++)o.findNext();var c=o.from();t.$cherry.editor.scrollToLineNum(c.line,c.line+1,0)}else t.$cherry.previewer.scrollToHeadByIndex(a);t.updateLocationHash&&(location.href=i)}})),this.tocClose.addEventListener("click",(function(e){t.$switchModel("pure"),t.setModelToLocalStorage("pure")})),this.tocOpen.addEventListener("click",(function(e){t.$switchModel("full"),t.setModelToLocalStorage("full")})),window&&window.addEventListener("resize",(function(){t.$switchModel(t.model)})),this.editor.on("scroll",(function(e,n){t.updateTocList(!0)}));var e=this.$cherry.previewer.getDomCanScroll();"HTML"===e.nodeName?window.addEventListener("scroll",(function(){t.updateTocList(!0)})):e.addEventListener("scroll",(function(){t.updateTocList(!0)}))}},{key:"$switchModel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pure";this.model=t;var e="cherry-flex-toc__".concat(t);this.tocDom.classList.contains(e)||(this.tocDom.classList.remove("cherry-flex-toc__pure"),this.tocDom.classList.remove("cherry-flex-toc__full"),this.tocDom.classList.add(e));var n=this.tocListDom.querySelectorAll(".cherry-toc-one-a");if(n.length>0){var r=28;if("pure"===t){var i=this.tocListDom.getBoundingClientRect().height,a=Math.floor((i-3*n.length)/n.length);r=a<3?3:a>10?10:a}for(var o=0;o0&&void 0!==arguments[0]&&arguments[0]));else{var t=this.$cherry.getToc(),e="";if(lA(t).call(t,(function(t){return e+=t.text,t})),e=sm(e),this.tocStr!==e){this.tocStr=e;var n="",r=0;lA(t).call(t,(function(t){var e,i,a,o,s=t.text.replace(//g,""),c=s.replace(/<[^>]+?>/g,"");return n+=hs(e=hs(i=hs(a=hs(o='')).call(e,s,""),r+=1,t})),this.tocListDom.innerHTML=n}}if("hide"===this.$cherry.status.previewer);else{for(var i,a=this.$cherry.previewer.getDomCanScroll(),o="HTML"===a.nodeName?0:a.getBoundingClientRect().y,s=this.$cherry.previewer.getDomContainer().querySelectorAll("h1,h2,h3,h4,h5,h6,h7,h8"),c=0;co+20)break}c=c>0?c-1:c,Qs(i=this.tocListDom.querySelectorAll(".cherry-toc-one-a")).call(i,(function(t,e){e===c?t.classList.add("current"):t.classList.remove("current")}))}}}])}();function VO(t,e,n){return e=es(e),Ko(t,WO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function WO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(WO=function(){return!!t})()}var qO=function(t){function e(){return ra(this,e),VO(this,e,arguments)}return ss(e,t),Ho(e,[{key:"appendMenusToDom",value:function(t){this.options.dom.appendChild(t)}},{key:"init",value:function(){var t,n=this;xm(es(e.prototype),"init",this).call(this),Qs(t=Px(this.shortcutKeyMap)).call(t,(function(t){var e=xf(t,2),r=e[0],i=e[1];n.$cherry.toolbar.shortcutKeyMap[r]=i}))}}])}(PO);function YO(t,e,n){return e=es(e),Ko(t,JO()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function JO(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(JO=function(){return!!t})()}var ZO=function(t){function e(){return ra(this,e),YO(this,e,arguments)}return ss(e,t),Ho(e,[{key:"appendMenusToDom",value:function(t){}},{key:"init",value:function(){var t,n=this;xm(es(e.prototype),"init",this).call(this),Qs(t=Px(this.shortcutKeyMap)).call(t,(function(t){var e=xf(t,2),r=e[0],i=e[1];n.$cherry.toolbar.shortcutKeyMap[r]=i}))}}])}(PO),tD=-1,eD=1,nD=0;function rD(t,e,n,r,i){if(t===e)return t?[[nD,t]]:[];if(null!=n){var a=function(t,e,n){var r="number"==typeof n?{index:n,length:0}:n.oldRange,i="number"==typeof n?null:n.newRange,a=t.length,o=e.length;if(0===r.length&&(null===i||0===i.length)){var s=r.index,c=t.slice(0,s),l=t.slice(s),u=i?i.index:null,h=s+o-a;if((null===u||u===h)&&!(h<0||h>o)){var f=e.slice(0,h);if((g=e.slice(h))===l){var d=Math.min(s,h);if((m=c.slice(0,d))===(v=f.slice(0,d)))return bD(m,c.slice(d),f.slice(d),l)}}if(null===u||u===s){var A=s,g=(f=e.slice(0,A),e.slice(A));if(f===c){var p=Math.min(a-A,o-A);if((b=l.slice(l.length-p))===(y=g.slice(g.length-p)))return bD(c,l.slice(0,l.length-p),g.slice(0,g.length-p),b)}}}if(r.length>0&&i&&0===i.length){var m=t.slice(0,r.index),b=t.slice(r.index+r.length);if(!(o<(d=m.length)+(p=b.length))){var v=e.slice(0,d),y=e.slice(o-p);if(m===v&&b===y)return bD(m,t.slice(d,a-p),e.slice(d,o-p),b)}}return null}(t,e,n);if(a)return a}var o=aD(t,e),s=t.substring(0,o);o=sD(t=t.substring(o),e=e.substring(o));var c=t.substring(t.length-o),l=function(t,e){var n;if(!t)return[[eD,e]];if(!e)return[[tD,t]];var r=t.length>e.length?t:e,i=t.length>e.length?e:t,a=r.indexOf(i);if(-1!==a)return n=[[eD,r.substring(0,a)],[nD,i],[eD,r.substring(a+i.length)]],t.length>e.length&&(n[0][0]=n[2][0]=tD),n;if(1===i.length)return[[tD,t],[eD,e]];var o=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length=t.length?[r,i,a,o,l]:null}var a,o,s,c,l,u=i(n,r,Math.ceil(n.length/4)),h=i(n,r,Math.ceil(n.length/2));if(!u&&!h)return null;a=h?u&&u[4].length>h[4].length?u:h:u;t.length>e.length?(o=a[0],s=a[1],c=a[2],l=a[3]):(c=a[0],l=a[1],o=a[2],s=a[3]);var f=a[4];return[o,s,c,l,f]}(t,e);if(o){var s=o[0],c=o[1],l=o[2],u=o[3],h=o[4],f=rD(s,l),d=rD(c,u);return f.concat([[nD,h]],d)}return function(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,o=2*i,s=new Array(o),c=new Array(o),l=0;ln)d+=2;else if(v>r)f+=2;else if(h){if((k=a+u-m)>=0&&k=(w=n-c[k]))return iD(t,e,x,v)}}for(var y=-p+A;y<=p-g;y+=2){for(var w,k=a+y,C=(w=y===-p||y!==p&&c[k-1]n)g+=2;else if(C>r)A+=2;else if(!h){if((b=a+u-y)>=0&&b=(w=n-w))return iD(t,e,x,v)}}}}return[[tD,t],[eD,e]]}(t,e)}(t=t.substring(0,t.length-o),e=e.substring(0,e.length-o));return s&&l.unshift([nD,s]),c&&l.push([nD,c]),dD(l,i),r&&function(t){var e=!1,n=[],r=0,i=null,a=0,o=0,s=0,c=0,l=0;for(;a0?n[r-1]:-1,o=0,s=0,c=0,l=0,i=null,e=!0)),a++;e&&dD(t);(function(t){function e(t,e){if(!t||!e)return 6;var n=t.charAt(t.length-1),r=e.charAt(0),i=n.match(cD),a=r.match(cD),o=i&&n.match(lD),s=a&&r.match(lD),c=o&&n.match(uD),l=s&&r.match(uD),u=c&&t.match(hD),h=l&&e.match(fD);return u||h?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}var n=1;for(;n=h&&(h=f,c=r,l=i,u=a)}t[n-1][1]!=c&&(c?t[n-1][1]=c:(t.splice(n-1,1),n--),t[n][1]=l,u?t[n+1][1]=u:(t.splice(n+1,1),n--))}n++}})(t),a=1;for(;a=d?(f>=u.length/2||f>=h.length/2)&&(t.splice(a,0,[nD,h.substring(0,f)]),t[a-1][1]=u.substring(0,u.length-f),t[a+1][1]=h.substring(f),a++):(d>=u.length/2||d>=h.length/2)&&(t.splice(a,0,[nD,u.substring(0,d)]),t[a-1][0]=eD,t[a-1][1]=h.substring(0,h.length-d),t[a+1][0]=tD,t[a+1][1]=u.substring(d),a++),a++}a++}}(l),l}function iD(t,e,n,r){var i=t.substring(0,n),a=e.substring(0,r),o=t.substring(n),s=e.substring(r),c=rD(i,a),l=rD(o,s);return c.concat(l)}function aD(t,e){if(!t||!e||t.charAt(0)!==e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),i=r,a=0;nr?t=t.substring(n-r):n=0&&mD(t[c][1])){var l=t[c][1].slice(-1);if(t[c][1]=t[c][1].slice(0,-1),o=l+o,s=l+s,!t[c][1]){t.splice(c,1),r--;var u=c-1;t[u]&&t[u][0]===eD&&(a++,s=t[u][1]+s,u--),t[u]&&t[u][0]===tD&&(i++,o=t[u][1]+o,u--),c=u}}if(pD(t[r][1])){l=t[r][1].charAt(0);t[r][1]=t[r][1].slice(1),o+=l,s+=l}}if(r0||s.length>0){o.length>0&&s.length>0&&(0!==(n=aD(s,o))&&(c>=0?t[c][1]+=s.substring(0,n):(t.splice(0,0,[nD,s.substring(0,n)]),r++),s=s.substring(n),o=o.substring(n)),0!==(n=sD(s,o))&&(t[r][1]=s.substring(s.length-n)+t[r][1],s=s.substring(0,s.length-n),o=o.substring(0,o.length-n)));var h=a+i;0===o.length&&0===s.length?(t.splice(r-h,h),r-=h):0===o.length?(t.splice(r-h,h,[eD,s]),r=r-h+1):0===s.length?(t.splice(r-h,h,[tD,o]),r=r-h+1):(t.splice(r-h,h,[tD,o],[eD,s]),r=r-h+2)}0!==r&&t[r-1][0]===nD?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,a=0,i=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var f=!1;for(r=1;r=55296&&t<=56319}function gD(t){return t>=56320&&t<=57343}function pD(t){return gD(t.charCodeAt(0))}function mD(t){return AD(t.charCodeAt(t.length-1))}function bD(t,e,n,r){return mD(t)||pD(r)?null:function(t){for(var e=[],n=0;n0&&e.push(t[n]);return e}([[nD,t],[tD,e],[eD,n],[nD,r]])}function vD(t,e,n,r){return rD(t,e,n,r,!0)}vD.INSERT=eD,vD.DELETE=tD,vD.EQUAL=nD;var yD=vD;var wD=function(t,e){for(var n=-1,r=null==t?0:t.length;++n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function TF(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}()),this.instanceId=e}),[{key:"setInstanceId",value:function(t){this.instanceId=t}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"clearAll",value:function(){this.emitter.all.clear()}},{key:"bindCallbacksByOptions",value:function(t){t.callback.afterChange&&this.on(this.Events.afterChange,(function(e){t.callback.afterChange(e.markdownText,e.html)})),t.callback.afterInit&&this.on(this.Events.afterInit,(function(e){t.callback.afterInit(e.markdownText,e.html)})),t.event.afterChange&&this.on(this.Events.afterChange,(function(e){t.event.afterChange(e.markdownText,e.html)})),t.event.afterInit&&this.on(this.Events.afterInit,(function(e){t.event.afterInit(e.markdownText,e.html)})),t.event.focus&&this.on(this.Events.focus,(function(e){t.event.focus(e)})),t.event.blur&&this.on(this.Events.blur,(function(e){t.event.blur(e)})),t.event.selectionChange&&this.on(this.Events.selectionChange,(function(e){t.event.selectionChange(e)})),t.event.afterChangeLocale&&this.on(this.Events.afterChangeLocale,(function(e){t.event.afterChangeLocale(e)})),t.event.changeMainTheme&&this.on(this.Events.changeMainTheme,(function(e){t.event.changeMainTheme(e)})),t.event.changeCodeBlockTheme&&this.on(this.Events.changeCodeBlockTheme,(function(e){t.event.changeCodeBlockTheme(e)}))}},{key:"on",value:function(t,e){var n;this.emitter.on(hs(n="".concat(this.instanceId,":")).call(n,t),e)}},{key:"off",value:function(t,e){var n;this.emitter.off(hs(n="".concat(this.instanceId,":")).call(n,t),e)}},{key:"emit",value:function(t,e){var n;this.emitter.emit(hs(n="".concat(this.instanceId,":")).call(n,t),e)}}])}(),LF={zh_CN:{bold:"加粗",code:"代码",graph:"画图",h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",header:"标题",insert:"插入",italic:"斜体",list:"列表",quickTable:"表格",quote:"引用",size:"大小",color:"文字颜色&背景",strikethrough:"删除线",sub:"下标",sup:"上标",togglePreview:"预览",fullScreen:"全屏",image:"图片",audio:"音频",video:"视频",link:"超链接",hr:"分隔线",br:"换行",toc:"目录",pdf:"pdf",word:"word",table:"表格","line-table":"折线表格","bar-table":"柱状表格",formula:"公式",insertFormula:"公式",insertFlow:"流程图",insertSeq:"时序图",insertState:"状态图",insertClass:"类图",insertPie:"饼图",insertGantt:"甘特图",checklist:"清单",ol:"有序列表",ul:"无序列表",undo:"撤销",redo:"恢复",previewClose:"关闭预览",codeTheme:"代码主题",switchModel:"模式切换",switchPreview:"预览",switchEdit:"返回编辑",classicBr:"经典换行",normalBr:"常规换行",settings:"设置",mobilePreview:"移动端预览",copy:"复制内容",export:"导出",underline:"下划线",pinyin:"拼音",file:"文件",pastePlain:"粘贴为纯文本格式",pasteMarkdown:"粘贴为markdown格式",hide:"隐藏工具栏",exportToPdf:"导出PDF",exportScreenshot:"导出长图",exportMarkdownFile:"导出markdown",exportHTMLFile:"导出html",theme:"主题",panel:"面板",detail:"手风琴","H1 Heading":"H1 一级标题","H2 Heading":"H2 二级标题","H3 Heading":"H3 三级标题",complement:"续写",summary:"总结",justify:"对齐方式",justifyLeft:"左对齐",justifyCenter:"居中",justifyRight:"右对齐",publish:"发布",fontColor:"文本颜色",fontBgColor:"背景颜色",small:"小",medium:"中",large:"大",superLarge:"特大",detailDefaultContent:"点击展开更多\n内容\n++- 默认展开\n内容\n++ 默认收起\n内容",inlineCode:"行内代码",codeBlock:"代码块",shortcutKeySetting:"快捷键设置",editShortcutKeyConfigTip:"双击快捷键区域编辑快捷键",wordCount:"字数统计",wordCountP:"段落",wordCountW:"单词",wordCountC:"字符",deleteColumn:"删除列",deleteRow:"删除行",addRow:"添加行",addCol:"添加列",moveRow:"移动行",moveCol:"移动列",shortcutStaticTitle:"以下快捷键无法修改",shortcutStatic1:"整行向左缩进",shortcutStatic2:"整行向右缩进",shortcutStatic3:"复制并粘贴一行",shortcutStatic4:"在下方插入空行",shortcutStatic5:"在上方插入空行",shortcutStatic6:"与上行互换",shortcutStatic7:"与下行互换",shortcutStatic8:"删除一行",shortcutStatic9:"按词语向左选中",shortcutStatic10:"按词语向右选中",shortcutStatic11:"按词语删除",shortcutStatic12:"选中括号内内容",shortcutStatic13:"插入多个光标",shortcutStatic14:"分别选中文本块的每一行",shortcutStatic15:"查找",shortcutStatic16:"选中所有相同的词",shortcutStatic17:"撤销",shortcutStatic18:"回滚撤销",leftMouseButton:"鼠标左键",disableShortcut:"禁用所有快捷键",recoverShortcut:"恢复默认",search:"搜索",autoWrap:"自动换行"},en_US:{bold:"Bold",code:"Code",graph:"Graph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",header:"Header",insert:"Insert",italic:"Italic",list:"List",quickTable:"Quick Table",quote:"Quote",size:"Size",color:"Text Color & Background",strikethrough:"Strikethrough",sub:"Sub",sup:"Sup",togglePreview:"Toggle Preview",fullScreen:"Full Screen",image:"Image",audio:"Audio",video:"Video",link:"Link",hr:"Horizontal Rule",br:"New Line",toc:"Table Of Content",pdf:"PDF",word:"Word",table:"Table","line-table":"Line Table","bar-table":"Bar Table",formula:"Formula",insertFormula:"Insert Formula",insertFlow:"Insert Flow",insertSeq:"Insert Seq",insertState:"Insert State",insertClass:"Insert Class",insertPie:"Insert Pie",insertGantt:"Insert Gantt",checklist:"Checklist",ol:"Ordered List",ul:"Unordered List",undo:"Undo",redo:"Redo",previewClose:"Preview Close",codeTheme:"Code Theme",switchModel:"Switch Model",switchPreview:"Switch Preview",switchEdit:"Switch Edit",classicBr:"Classic New Line",normalBr:"Normal New Line",settings:"Settings",mobilePreview:"Mobile Preview",copy:"Copy",export:"Export",underline:"Underline",pinyin:"Pinyin",pastePlain:"Paste as Plain Text",pasteMarkdown:"Paste as Markdown",hide:"Hide Toolbar",exportToPdf:"Export to PDF",exportScreenshot:"Screenshot",exportMarkdownFile:"Export Markdown File",exportHTMLFile:"Export preview HTML File","H1 Heading":"H1 Heading","H2 Heading":"H1 Heading","H3 Heading":"H1 Heading",complement:"Complement",summary:"Summary",justify:"justify",justifyLeft:"Left",justifyCenter:"Center",justifyRight:"Right",publish:"Publish",fontColor:"Font Color",fontBgColor:"Font Bg Color",small:"Small",medium:"Medium",large:"Large",superLarge:"Super Large",detailDefaultContent:"Click to expand more\nContent\n++- Expand by default\nContent\n++ Collapse by default\nContent",inlineCode:"Inline Code",codeBlock:"Code Block",shortcutKeySetting:"Keyboard Shortcuts",editShortcutKeyConfigTip:"double click shortcut key area to edit",wordCount:"Word Count",wordCountP:"P",wordCountW:"W",wordCountC:"C",deleteColumn:"delete column",deleteRow:"delete row",addRow:"add row",addCol:"add column",moveRow:"move row",moveCol:"move column",shortcutStaticTitle:"The following shortcuts cannot be modified",shortcutStatic1:"Indent the whole line to the left",shortcutStatic2:"Indent the whole line to the right",shortcutStatic3:"Duplicate and paste a line",shortcutStatic4:"Insert a blank line below",shortcutStatic5:"Insert a blank line above",shortcutStatic6:"Swap with the line above",shortcutStatic7:"Swap with the line below",shortcutStatic8:"Delete a line",shortcutStatic9:"Select to the left by word",shortcutStatic10:"Select to the right by word",shortcutStatic11:"Delete by word",shortcutStatic12:"Select the content inside parentheses",shortcutStatic13:"Insert multiple cursors",shortcutStatic14:"Select each line of the text block separately",shortcutStatic15:"Find",shortcutStatic16:"Select all occurrences of the word",shortcutStatic17:"Undo",shortcutStatic18:"Redo",leftMouseButton:"left mouse button",disableShortcut:"Disable all shortcuts",recoverShortcut:"Restore default",search:"Search",autoWrap:"Auto Wrap"},ru_RU:{bold:"Жирный",code:"Code",graph:"Graph",h1:"Заголовок 1",h2:"Заголовок 2",h3:"Заголовок 3",h4:"Заголовок 4",h5:"Заголовок 5",header:"Заголовок",insert:"Вставить",italic:"Курсив",list:"Лист",quickTable:"Quick Table",quote:"Цитата",size:"Размер",color:"Цвет текста и фон",strikethrough:"Зачеркнуто",sub:"Sub",sup:"Sup",togglePreview:"Переключение предварительного просмотра",fullScreen:"Полноэкранный режим",image:"Изображение",audio:"Аудио",video:"Видео",link:"Ссылка",hr:"Горизонтальная линия",br:"Новая строка",toc:"Таблица содержания",pdf:"PDF",word:"Word",table:"Таблица","line-table":"Строки в таблице","bar-table":"Bar Table",formula:"Формула",insertFormula:"Вставить формулу",insertFlow:"Вставить поток",insertSeq:"Вставить Seq",insertState:"Вставить State",insertClass:"Вставить класс",insertPie:"Вставить Pie",insertGantt:"Вставить Gantt",checklist:"Контрольный список",ol:"Упорядоченный список",ul:"Неупорядоченный список",undo:"Отменить",redo:"Переделывать",previewClose:"Предварительный просмотр закрыт",codeTheme:"Тема для кода",switchModel:"Модель переключателя",switchPreview:"Переключите предварительный просмотр",switchEdit:"Переключить редактирование",classicBr:"Классическая новая линия",normalBr:"Обычная новая строка",settings:"Настройки",mobilePreview:"Предварительный просмотр на мобильном устройстве",copy:"Копировать",export:"Экспорт",underline:"Подчеркивать",pinyin:"Pinyin",pastePlain:"Вставить в виде обычного текста",pasteMarkdown:"Вставить как Markdown",hide:"Скрыть панель инструментов",exportToPdf:"Экспорт в формат PDF",exportScreenshot:"Скриншот",exportMarkdownFile:"Экспорт файла Markdown",exportHTMLFile:"Экспорт предварительного просмотра HTML-файла","H1 Заголовок":"H1 Заголовок","H2 Заголовок":"H1 Заголовок","H3 Заголовок":"H1 Заголовок",complement:"Дополнение",summary:"Резюме",justify:"объяснить",justifyLeft:"Слева",justifyCenter:"Центр",justifyRight:"Справа",publish:"Публиковать",fontColor:"Цвет шрифта",fontBgColor:"Цвет фона",small:"Маленький",medium:"Средний",large:"Большой",superLarge:"Очень большой",detailDefaultContent:"Нажмите, чтобы развернуть подробнее\nСодержание\n++- Развернуть по умолчанию\nСодержание\n++ Свернуть по умолчанию\nСодержание",inlineCode:"Встроенный код",codeBlock:"Кодовый блок",shortcutKeySetting:"Настройки горячих клавиш",editShortcutKeyConfigTip:"дважды щелкните область сочетания клавиш для редактирования",wordCount:"Количество слов",wordCountP:"P",wordCountW:"W",wordCountC:"C",deleteColumn:"Удалить столбец",deleteRow:"Удалить строку",addRow:"Добавить строку",addCol:"Добавить столбец",moveRow:"Переместить строку",moveCol:"Переместить столбец",shortcutStaticTitle:"Следующие сочетания клавиш не могут быть изменены",shortcutStatic1:"Отступить всю строку влево",shortcutStatic2:"Отступить всю строку вправо",shortcutStatic3:"Скопировать и вставить строку",shortcutStatic4:"Вставить пустую строку ниже",shortcutStatic5:"Вставить пустую строку выше",shortcutStatic6:"Поменять с предыдущей строкой",shortcutStatic7:"Поменять с следующей строкой",shortcutStatic8:"Удалить строку",shortcutStatic9:"Выделить влево по слову",shortcutStatic10:"Выделить вправо по слову",shortcutStatic11:"Удалить по слову",shortcutStatic12:"Выделить содержимое внутри скобок",shortcutStatic13:"Вставить несколько курсоров",shortcutStatic14:"Выделить каждую строку текстового блока отдельно",shortcutStatic15:"Найти",shortcutStatic16:"Выделить все вхождения слова",shortcutStatic17:"Отменить",shortcutStatic18:"Вернуть отмену",leftMouseButton:"левая кнопка мыши",disableShortcut:"Отключить все горячие клавиши",recoverShortcut:"Восстановить по умолчанию",search:"Поиск",autoWrap:"Автоперенос строк"}};function IF(t,e,n){return e=es(e),Ko(t,MF()?Vn(e,n||[],es(t).constructor):e.apply(t,n))}function MF(){try{var t=!Boolean.prototype.valueOf.call(Vn(Boolean,[],(function(){})))}catch(t){}return(MF=function(){return!!t})()}function OF(t,e,n){if("object"!==Ro(t)||!t)throw TypeError("first argument must be a object, but get ".concat(Ro(t)));var r;return sd(n)||"object"!==Ro(n)||null===n||"object"!==Ro(t[e])||null===t[e]?"string"==typeof n&&Ro(t[e])===n||("function"==typeof n&&t[e]instanceof n||!!sd(n)&&nv(n).call(n,(function(n){return OF(t,e,n)}))):Kx(r=Is(t[e])).call(r,(function(r){return OF(t[e],r,n[r])}))}function DF(t,e,n){var r,i={};return Qs(r=Is(t)).call(r,(function(r){-1!==Ef(e).call(e,r)&&("object"===Ro(n)?OF(t,r,n[r])&&(i[r]=t[r]):"string"==typeof n&&Ro(t[r])===n&&(i[r]=t[r]))})),i}var FF={HOOKS_TYPE_LIST:rA},NF=[];Zm()||Qs(NF).call(NF,(function(t){}));var PF=function(){function t(){ra(this,t)}return Ho(t,null,[{key:"usePlugin",value:function(e){var n;if(this===t)throw new Error("`usePlugin` is not allowed to called through CherryStatic class.");if(this.initialized)throw new Error("The function `usePlugin` should be called before Cherry is instantiated.");if(!0!==e.$cherry$mounted){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:{};return ra(this,n),(t=e===rA.PAR?IF(this,n,[{needCache:!!o.needCache,defaultCache:o.defaultCache}]):IF(this,n)).config=r.config,jo(t)}return ss(n,t),Ho(n,[{key:"beforeMakeHtml",value:function(){for(var t,e,r=arguments.length,i=new Array(r),o=0;or.pageWidth&&(i=r.pageWidth-r.floatPreviewerWrapDom.offsetWidth),a+r.floatPreviewerWrapDom.offsetHeight>r.pageHeight&&(a=r.pageHeight-r.floatPreviewerWrapDom.offsetHeight),requestAnimationFrame((function(){r.floatPreviewerWrapDom.style.left="".concat(i,"px"),r.floatPreviewerWrapDom.style.top="".concat(a,"px")}))}})),cs(r,"handleFloatPreviewerMouseUp",(function(t){r.floatPreviewerWrapDom.classList.remove("float-previewer-dragging")})),e.initialized=!0;var i=xF(e.config.defaults);return r.defaultToolbar=i.toolbars.toolbar,hp(t,Object),r.options=bu({},i,t,fA),r.storageFloatPreviewerWrapData={x:50,y:58,width:800,height:500},r.locales=LF,r.options.locales&&(r.locales=QF(QF({},r.options.locales),r.locales)),r.locale=r.locales[r.options.locale],"function"==typeof r.options.engine.global.urlProcessor?(r.options.engine.global.urlProcessor=um(r.options.engine.global.urlProcessor),r.options.callback.urlProcessor=r.options.engine.global.urlProcessor):r.options.callback.urlProcessor=um(r.options.callback.urlProcessor),r.status={toolbar:"show",previewer:"show",editor:"show"},(r.options.isPreviewOnly||"previewOnly"===r.options.editor.defaultModel)&&(r.options.toolbars.showToolbar=!1,r.options.editor.defaultModel="previewOnly",r.status.editor="hide",r.status.toolbar="hide"),r.instanceId=hs(n="cherry-".concat((new Date).getTime())).call(n,Math.random()),r.options.instanceId=r.instanceId,r.lastMarkdownText="",r.$event=new SF(r.instanceId),r.engine=new yy(r.options,r),r.init(),r}return ss(e,t),Ho(e,[{key:"init",value:function(){var t,e=this;this.storeDocumentScroll();var n=this.options.id?document.getElementById(this.options.id):this.options.el;if(!n){if(!this.options.forceAppend)return!1;this.noMountEl=!0,(n=document.createElement("div")).id=this.options.id||"cherry-markdown",document.body.appendChild(n)}n.style.height||(n.style.height=this.options.editor.height),this.cherryDom=n,"string"==typeof this.options.themeNameSpace?this.nameSpace=this.options.themeNameSpace:this.nameSpace=this.options.nameSpace;var r=this.createWrapper(),i=this.createEditor(),a=this.createPreviewer();!1!==this.options.toolbars.showToolbar&&!1!==this.options.toolbars.toolbar||(r.classList.add("cherry--no-toolbar"),this.options.toolbars.toolbar=this.options.toolbars.toolbar?this.options.toolbars.toolbar:this.defaultToolbar),hp(this.options.toolbars.toolbar,Array),this.createToolbar(),this.createToolbarRight();var o,s=document.createDocumentFragment();(s.appendChild(this.toolbar.options.dom),s.appendChild(i.options.editorDom),this.options.previewer.dom||s.appendChild(a.options.previewerDom),s.appendChild(a.options.virtualDragLineDom),s.appendChild(a.options.editorMaskDom),s.appendChild(a.options.previewerMaskDom),r.appendChild(s),this.wrapperDom=r,this.createSidebar(),this.createHiddenToolbar(),n.appendChild(r),i.init(a),this.createBubble(),this.createFloatMenu(),a.init(i),a.registerAfterUpdate(fs(t=this.engine.mounted).call(t,this.engine)),this.initText(i.editor),this.$event.on("toolbarHide",(function(){e.status.toolbar="hide"})),this.$event.on("toolbarShow",(function(){e.status.toolbar="show"})),this.$event.on("previewerClose",(function(){e.status.previewer="hide"})),this.$event.on("previewerOpen",(function(){e.status.previewer="show"})),this.$event.on("editorClose",(function(){e.status.editor="hide",e.previewer.highlightLine(0)})),this.$event.on("editorOpen",(function(){e.status.editor="show"})),this.switchModel(this.options.editor.defaultModel,this.options.toolbars.showToolbar),this.options.autoScrollByHashAfterInit)&&ks(fs(o=this.scrollByHash).call(o,this));this.createToc(),this.$event.bindCallbacksByOptions(this.options),this.restoreDocumentScroll()}},{key:"storeDocumentScroll",value:function(){this.options.editor.keepDocumentScrollAfterInit&&(this.needRestoreDocumentScroll=!0,this.documentElementScrollTop=document.documentElement.scrollTop,this.documentElementScrollLeft=document.documentElement.scrollLeft)}},{key:"restoreDocumentScroll",value:function(){this.options.editor.keepDocumentScrollAfterInit&&this.needRestoreDocumentScroll&&(this.needRestoreDocumentScroll=!1,window.scrollTo(this.documentElementScrollLeft,this.documentElementScrollTop))}},{key:"destroy",value:function(){this.noMountEl?this.cherryDom.remove():this.wrapperDom.remove(),this.$event.clearAll()}},{key:"on",value:function(t,e){if(this.$event.Events[t])return/^(afterInit|afterChange)$/.test(t)?this.$event.on(t,(function(t){e(t.markdownText,t.html)})):this.$event.on(t,e);if("urlProcessor"===t)this.options.callback.urlProcessor=um(e);else this.options.callback[t]=e}},{key:"off",value:function(t,e){if(this.$event.Events[t])return this.$event.off(t,e);this.options.callback[t]=function(){}}},{key:"createToc",value:function(){var t,e,n,r,i;!1!==this.options.toolbars.toc?this.toc=new XO({$cherry:this,updateLocationHash:null===(t=this.options.toolbars.toc.updateLocationHash)||void 0===t||t,position:null!==(e=this.options.toolbars.toc.position)&&void 0!==e?e:"absolute",cssText:null!==(n=this.options.toolbars.toc.cssText)&&void 0!==n?n:"",defaultModel:null!==(r=this.options.toolbars.toc.defaultModel)&&void 0!==r?r:"pure",showAutoNumber:null!==(i=this.options.toolbars.toc.showAutoNumber)&&void 0!==i&&i}):this.toc=!1}},{key:"scrollByHash",value:function(){if(location.hash)try{var t=location.hash,e=document.getElementById(t.replace("#",""));e&&this.previewer.getDomContainer().contains(e)&&(location.hash="",location.hash=t)}catch(t){}}},{key:"$t",value:function(t){return this.locale[t]?this.locale[t]:t}},{key:"addLocale",value:function(t,e){this.locale[t]=e}},{key:"addLocales",value:function(t){this.locale=Ss(this.locale,t)}},{key:"getLocales",value:function(){return this.locale}},{key:"switchModel",value:function(){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"edit&preview"){case"edit&preview":this.previewer&&(this.previewer.editOnly(!0),this.previewer.recoverPreviewer()),this.toolbar&&t&&this.toolbar.showToolbar(),t?this.wrapperDom.classList.remove("cherry--no-toolbar"):this.wrapperDom.classList.add("cherry--no-toolbar");break;case"editOnly":this.previewer.isPreviewerHidden()||this.previewer.editOnly(!0),this.toolbar&&t&&this.toolbar.showToolbar(),t?this.wrapperDom.classList.remove("cherry--no-toolbar"):this.wrapperDom.classList.add("cherry--no-toolbar");break;case"previewOnly":this.previewer.previewOnly(),this.toolbar&&this.toolbar.previewOnly(),this.wrapperDom.classList.add("cherry--no-toolbar")}}},{key:"getInstanceId",value:function(){return this.instanceId}},{key:"getStatus",value:function(){return this.status}},{key:"getValue",value:function(){return this.editor.editor.getValue()}},{key:"getMarkdown",value:function(){return this.getValue()}},{key:"getCodeMirror",value:function(){return this.editor.editor}},{key:"getHtml",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.previewer.getValue(t)}},{key:"getPreviewer",value:function(){return this.previewer}},{key:"getToc",value:function(){var t=this.getHtml(),e=[];return t.replace(/(.+?)<\/h[0-6]>/g,(function(t,n,r,i){return e.push({level:+n,id:r,text:i.replace(//,"")}),t})),e}},{key:"setValue",value:function(t){if(!1===(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.editor.editor.setValue(t);var e=this.editor.editor,n=this.getValue(),r=function(t,e,n){for(var r=yD(e,n),i=t,a=t,o=0;o1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];n&&this.editor.editor.setSelection({line:n[0],ch:n[1]},{line:n[0],ch:n[1]}),this.editor.editor.replaceSelection(t,e?"around":"end"),r&&this.editor.editor.focus()}},{key:"insertValue",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this.insert(t,e,n,r)}},{key:"refreshPreviewer",value:function(){try{var t=this.getValue(),e=this.engine.makeHtml(t);this.previewer.refresh(e)}catch(t){throw new Ap(t)}}},{key:"setMarkdown",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.setValue(t,e)}},{key:"createWrapper",value:function(){var t="",e="",n="",r="";gA(this.nameSpace,"theme")?t=pA(!0,this.nameSpace):(t=(t=this.options.themeSettings.mainTheme).replace(/theme__/g,""),t="theme__".concat(t)),e="string"==typeof this.options.toolbars.theme?"dark"===this.options.toolbars.theme?"dark":"light":"dark"===this.options.themeSettings.toolbarTheme?"dark":"light",n="string"==typeof this.options.engine.syntax.inlineCode.theme?"black"===this.options.engine.syntax.inlineCode.theme?"black":"red":"black"===this.options.themeSettings.inlineCodeTheme?"black":"red",r="string"==typeof this.options.engine.syntax.codeBlock.theme?this.options.engine.syntax.codeBlock.theme:this.options.themeSettings.codeBlockTheme,gA(this.nameSpace,"codeTheme")&&(r=bA(this.nameSpace)),"dark"===r?r="tomorrow-night":"light"===r&&(r="solarized-light");var i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cherry",e=arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"nowrap":"wrap";if("undefined"!=typeof localStorage){var n=localStorage.getItem("".concat(t,"-codeWrap"));n&&(e=n)}return e}(this.nameSpace,this.options.engine.syntax.codeBlock.wrap),a=Zf("div",["cherry","clearfix",t].join(" "),{"data-toolbarTheme":e,"data-inlineCodeTheme":n,"data-codeBlockTheme":r,"data-codeWrap":"wrap"===i?"wrap":"nowrap"});return this.wrapperDom=a,a}},{key:"getCodeWrap",value:function(){return this.wrapperDom.dataset.codeWrap||"wrap"}},{key:"setCodeWrap",value:function(t){this.wrapperDom.dataset.codeWrap="wrap"===t?"wrap":"nowrap",function(t,e){"undefined"!=typeof localStorage&&localStorage.setItem("".concat(t,"-codeWrap"),e)}(this.nameSpace,t)}},{key:"createToolbar",value:function(){if(!this.toolbarContainer){var t=Zf("div","cherry-toolbar");this.toolbarContainer=t}return this.options.toolbars.shortcutKey&&Is(this.options.toolbars.shortcutKey).length>0&&console.warn("options.shortcutKey is deprecated, please use shortcutKeySettings.shortcutKeyMap instead, get more info at https://github.com/Tencent/cherry-markdown/wiki"),this.toolbar=new PO({dom:this.toolbarContainer,$cherry:this,buttonConfig:this.options.toolbars.toolbar,customMenu:this.options.toolbars.customMenu}),this.toolbar}},{key:"resetToolbar",value:function(t,e){var n;return!1!==(!!/(toolbar|toolbarRight|sidebar|bubble|float|toc)/.test(t)&&t)&&(this.toolbarContainer&&(this.toolbarContainer.innerHTML=""),this.toolbarFloatContainer&&(this.toolbarFloatContainer.innerHTML=""),this.toolbarBubbleContainer&&(this.toolbarBubbleContainer.innerHTML=""),this.sidebarDom&&(this.sidebarDom.innerHTML=""),this.toc&&this.toc.tocDom.remove(),Qs(n=this.cherryDom.querySelectorAll(".cherry-dropdown")).call(n,(function(t){t.remove()})),this.options.toolbars[t]=e,this.createToolbar(),this.createToolbarRight(),this.createBubble(),this.createFloatMenu(),this.createSidebar(),this.createHiddenToolbar(),this.createToc(),!0)}},{key:"createToolbarRight",value:function(){return this.toolbarRight=new GO({dom:this.toolbarContainer,$cherry:this,buttonConfig:this.options.toolbars.toolbarRight,customMenu:this.options.toolbars.customMenu}),this.toolbar.collectMenuInfo(this.toolbarRight),this.toolbarRight}},{key:"createSidebar",value:function(){if(this.options.toolbars.sidebar){hp(this.options.toolbars.sidebar,Array);var t=!1;if(!this.sidebarDom){t=!0;var e="dark"===this.options.toolbars.theme?"dark":"",n=Zf("div","cherry-sidebar ".concat(e));this.sidebarDom=n}this.sidebar=new qO({dom:this.sidebarDom,$cherry:this,buttonConfig:this.options.toolbars.sidebar,customMenu:this.options.toolbars.customMenu}),this.toolbar.collectMenuInfo(this.sidebar),!0===t&&this.wrapperDom.appendChild(this.sidebarDom)}}},{key:"createHiddenToolbar",value:function(){this.options.toolbars.hiddenToolbar&&(hp(this.options.toolbars.hiddenToolbar,Array),this.hiddenToolbar=new ZO({$cherry:this,buttonConfig:this.options.toolbars.hiddenToolbar,customMenu:this.options.toolbars.customMenu}),this.toolbar.collectMenuInfo(this.hiddenToolbar))}},{key:"createFloatMenu",value:function(){if(this.options.toolbars.float){if(!this.toolbarFloatContainer){var t=Zf("div","cherry-floatmenu");this.toolbarFloatContainer=t}hp(this.options.toolbars.float,Array),this.floatMenu=new jO({dom:this.toolbarFloatContainer,$cherry:this,buttonConfig:this.options.toolbars.float,customMenu:this.options.toolbars.customMenu}),this.toolbar.collectMenuInfo(this.floatMenu)}}},{key:"createBubble",value:function(){if(this.options.toolbars.bubble){if(!this.toolbarBubbleContainer){var t=Zf("div","cherry-bubble");this.toolbarBubbleContainer=t}hp(this.options.toolbars.bubble,Array),this.bubble=new UO({dom:this.toolbarBubbleContainer,$cherry:this,buttonConfig:this.options.toolbars.bubble,customMenu:this.options.toolbars.customMenu,engine:this.engine}),this.toolbar.collectMenuInfo(this.bubble)}}},{key:"createEditor",value:function(){var t,e,n,r,i=Zf("textarea","",{id:null!==(t=this.options.editor.id)&&void 0!==t?t:"code",name:null!==(e=this.options.editor.name)&&void 0!==e?e:"code"});i.textContent=this.options.value;var a=Zf("div","cherry-editor");return a.appendChild(i),"function"==typeof this.options.fileUpload&&(this.options.callback.fileUpload=this.options.fileUpload),this.editor=new $d(QF({$cherry:this,editorDom:a,wrapperDom:this.wrapperDom,value:this.options.value,onKeydown:fs(n=this.fireShortcutKey).call(n,this),onChange:fs(r=this.editText).call(r,this),toolbars:this.options.toolbars,autoScrollByCursor:this.options.autoScrollByCursor},this.options.editor)),this.editor}},{key:"createPreviewer",value:function(){var t,e="autonumber"===(this.options.engine.syntax.header&&this.options.engine.syntax.header.anchorStyle||"default")?" head-num":"",n=this.options.previewer,r=n.className,i=n.dom,a=n.enablePreviewerBubble,o=n.floatWhenClosePreviewer,s=["cherry-previewer cherry-markdown",r||"",e,gA(this.nameSpace,"theme")?pA(!0,this.nameSpace):this.options.themeSettings.mainTheme].join(" ");i?(t=i).className+=" ".concat(s):t=Zf("div",s);var c=Zf("div","cherry-drag"),l=Zf("div","cherry-editor-mask"),u=Zf("div","cherry-previewer-mask");return this.previewer=new s_({$cherry:this,virtualDragLineDom:c,editorMaskDom:l,previewerMaskDom:u,previewerDom:t,value:this.options.value,isPreviewOnly:this.options.isPreviewOnly,enablePreviewerBubble:a,floatWhenClosePreviewer:o,lazyLoadImg:this.options.previewer.lazyLoadImg}),this.previewer}},{key:"clearFloatPreviewer",value:function(){this.wrapperDom.appendChild(this.previewer.getDom()),this.storageFloatPreviewerWrapData={x:this.floatPreviewerWrapDom.offsetLeft,y:this.floatPreviewerWrapDom.offsetTop,height:this.floatPreviewerWrapDom.offsetHeight,width:this.floatPreviewerWrapDom.offsetWidth},this.floatPreviewerWrapDom.remove(),this.removeFloatPreviewerListener()}},{key:"createFloatPreviewerListener",value:function(){document.addEventListener("mousedown",this.handleFloatPreviewerMouseDown),document.addEventListener("mousemove",this.handleFloatPreviewerMouseMove),document.addEventListener("mouseup",this.handleFloatPreviewerMouseUp)}},{key:"removeFloatPreviewerListener",value:function(){document.removeEventListener("mousedown",this.handleFloatPreviewerMouseDown),document.removeEventListener("mousemove",this.handleFloatPreviewerMouseMove),document.removeEventListener("mouseup",this.handleFloatPreviewerMouseUp)}},{key:"createFloatPreviewer",value:function(){var t=Zf("div","float-previewer-wrap"),e=Zf("div","float-previewer-header"),n=Zf("div","float-previewer-title");n.innerHTML="预览",t.style.left="".concat(this.storageFloatPreviewerWrapData.x,"px"),t.style.top="".concat(this.storageFloatPreviewerWrapData.y,"px"),t.style.height="".concat(this.storageFloatPreviewerWrapData.height,"px"),t.style.width="".concat(this.storageFloatPreviewerWrapData.width,"px"),e.appendChild(n),t.appendChild(e),t.appendChild(this.previewer.getDom()),this.wrapperDom.appendChild(t),this.floatPreviewerHeaderDom=e,this.floatPreviewerWrapDom=t,this.pageWidth=document.body.clientWidth,this.pageHeight=document.body.clientHeight,this.createFloatPreviewerListener()}},{key:"initText",value:function(t){try{var e=t.getValue();this.lastMarkdownText=e;var n=this.engine.makeHtml(e);this.previewer.update(n),this.$event.emit("afterInit",{markdownText:e,html:n})}catch(t){throw new Ap(t)}}},{key:"editText",value:function(t,e){var n=this;try{this.timer&&(clearTimeout(this.timer),this.timer=null);var r=this.options.engine.global.flowSessionContext?10:50;this.timer=ks((function(){var t=e.getValue();if(t!==n.lastMarkdownText){n.lastMarkdownText=t;var r=n.engine.makeHtml(t);n.previewer.update(r),n.$event.emit("afterChange",{markdownText:t,html:r})}n.options.editor.keepDocumentScrollAfterInit||e.scrollIntoView(null)}),r)}catch(t){throw new Ap(t)}}},{key:"onChange",value:function(t){this.editor.editor.on("change",(function(e){t({markdown:e.getValue()})}))}},{key:"fireShortcutKey",value:function(t){var e=this.editor.editor.getCursor(),n=this.editor.editor.getLine(e.line);if(!t.shiftKey&&"Tab"===t.key&&Sd.test(n)&&(0===e.ch||e.ch===n.length||e.ch===n.length+1)){t.preventDefault(),this.editor.editor.setSelection({line:e.line,ch:0},{line:e.line,ch:n.length}),this.editor.editor.replaceSelection("\t".concat(n),"around");var r=this.editor.editor.getCursor();this.editor.editor.setSelection(r,r)}this.toolbar.matchShortcutKey(t)&&(this.toolbar.fireShortcutKey(t)&&t.preventDefault())}},{key:"export",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pdf",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.previewer.export(t,e)}},{key:"setTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";this.$event.emit("changeMainTheme",t),mA(this,t)}},{key:"setCodeBlockTheme",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";this.$event.emit("changeCodeBlockTheme",t),vA(this,t)}},{key:"setWritingStyle",value:function(t){this.editor.setWritingStyle(t)}},{key:"setLocale",value:function(t){return!!this.locales[t]&&(this.options.locale=t,this.locale=this.locales[t],this.$event.emit("afterChangeLocale",t),this.resetToolbar("toolbar",this.options.toolbars.toolbar||[]),!0)}}])}(PF);cs(HF,"initialized",!1),cs(HF,"config",{defaults:_F}),window&&(window.Cherry=HF);var jF=HF;function KF(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function zF(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};ra(this,t),cs(this,"mermaidAPIRefs",null),cs(this,"options",GF),cs(this,"dom",null),cs(this,"mermaidCanvas",null);var n=e.mermaid,r=e.mermaidAPI;if(!(r||window.mermaidAPI||n&&n.mermaidAPI||window.mermaid&&window.mermaid.mermaidAPI))throw new Error("code-block-mermaid-plugin[init]: Package mermaid or mermaidAPI not found.");this.options=zF(zF({},GF),e||{}),this.mermaidAPIRefs=r||window.mermaidAPI||n.mermaidAPI||window.mermaid.mermaidAPI,delete this.options.mermaid,delete this.options.mermaidAPI,this.mermaidAPIRefs.initialize(this.options)}return Ho(t,[{key:"mountMermaidCanvas",value:function(t){this.mermaidCanvas&&document.body.contains(this.mermaidCanvas)||(this.mermaidCanvas=document.createElement("div"),this.mermaidCanvas.style="width:1024px;opacity:0;position:fixed;top:100%;",(t.$cherry.wrapperDom||document.body).appendChild(this.mermaidCanvas))}},{key:"convertMermaidSvgToImg",value:function(t,e){var n,r=new DOMParser,i=function(t){return t.replace("')}}else n=i(t)}catch(e){n=i(t)}return n}},{key:"render",value:function(t,e,n){var r,i,a,o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=e;c||(c=Math.round(1e8*Math.random())),this.mountMermaidCanvas(n);var l=hs(r="mermaid-".concat(c,"-")).call(r,(new Date).getTime());this.svg2img=null!==(i=null==s?void 0:s.svg2img)&&void 0!==i&&i;try{this.mermaidAPIRefs.render(l,t,(function(t){var e=t.replace(/\s*markerUnits="0"/g,"").replace(/\s*x="NaN"/g,"").replace(/
    /g,"
    ");a=o.convertMermaidSvgToImg(e,l)}),this.mermaidCanvas)}catch(t){return null==t?void 0:t.str}return a}}],[{key:"install",value:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i>>8):(zt(255&t),zt(t>>>8))}function Xt(){A=(A<>7)])}function qt(t,e,n){return t[e].fcmt?y-mt:At,c=y+ct,l=s[i+a-1],h=s[i+a];v>=B&&(r>>=2);do{if(s[(e=t)+a]==h&&s[e+a-1]==l&&s[e]==s[i]&&s[++e]==s[i+1]){i+=2,e++;do{}while(s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&s[++i]==s[++e]&&ia){if(w=t,a=n,n>=ct)break;l=s[i+a-1],h=s[i+a]}}}while((t=u[t&dt])>o&&0!=--r);return a}function Zt(){var t,e,n=ot-C-y;if(-1==n)n--;else if(y>=et+mt){for(t=0;t=et?e-et:At);for(t=0;t=et?e-et:At;n+=et}k||((t=Yt(s,y+C,n))<=0?k=!0:C+=t)}function te(){k||(h=0,f=0,function(){var t,e,n,r,i;if(0!=I[0].dl)return;for(O.dyn_tree=_,O.static_tree=L,O.extra_bits=Pt,O.extra_base=kt+1,O.elems=xt,O.max_length=vt,O.max_code=0,D.dyn_tree=S,D.static_tree=I,D.extra_bits=Rt,D.extra_base=0,D.elems=Et,D.max_length=vt,D.max_code=0,F.dyn_tree=M,F.static_tree=null,F.extra_bits=Qt,F.extra_base=0,F.elems=Tt,F.max_length=yt,F.max_code=0,n=0,r=0;r>=7;rC&&(b=C),b>=st)if(t=ue(y-w,b-st),C-=b,b<=E){b--;do{y++,Xt()}while(0!=--b);y++}else y+=b,b=0,A=((A=255&s[y])<C&&(b=C),b==st&&y-w>gt&&b--),v>=st&&b<=v){var t;t=ue(y-1-p,v-st),C-=v-1,v-=2;do{y++,Xt()}while(0!=--v);m=0,b=st-1,y++,t&&(le(0),d=y)}else 0!=m?(ue(0,255&s[y-1])&&(le(0),d=y),y++,C--):(m=1,y++,C--);for(;Ce.len&&(s=e.len),c=0;ci-a&&(s=i-a),c=0;c>1;e>=1;e--)ie(r,e);do{e=P[bt],P[bt]=P[R--],ie(r,bt),n=P[bt],P[--Q]=e,P[--Q]=n,r[s].fc=r[e].fc+r[n].fc,U[e]>U[n]+1?U[s]=U[e]:U[s]=U[n]+1,r[e].dl=r[n].dl=s,P[bt]=s++,ie(r,bt)}while(R>=2);P[--Q]=P[bt],function(t){var e,n,r,i,a,o,s=t.dyn_tree,c=t.extra_bits,l=t.extra_base,u=t.max_code,h=t.max_length,f=t.static_tree,d=0;for(i=0;i<=vt;i++)N[i]=0;for(s[P[Q]].dl=0,e=Q+1;eh&&(i=h,d++),s[n].dl=i,n>u||(N[i]++,a=0,n>=l&&(a=c[n-l]),o=s[n].fc,Y+=o*(i+a),null!=f&&(J+=o*(f[n].dl+a)));if(0!=d){do{for(i=h-1;0==N[i];)i--;N[i]--,N[i+1]+=2,N[h]--,d-=2}while(d>0);for(i=h;0!=i;i--)for(n=N[i];0!=n;)(r=P[--e])>u||(s[r].dl!=i&&(Y+=(i-s[r].dl)*s[r].fc,s[r].fc=i),n--)}}(t),ae(r,o)}function se(t,e){var n,r,i=-1,a=t[0].dl,o=0,s=7,c=4;for(0==a&&(s=138,c=3),t[e+1].dl=65535,n=0;n<=e;n++)r=a,a=t[n+1].dl,++o=3&&0==M[Ut[t]].dl;t--);return Y+=3*(t+1)+5+5+4,t}(),(n=J+3+7>>3)<=(e=Y+3+7>>3)&&(e=n),i+4<=e&&d>=0)for(de((nt<<1)+t,3),ge(),Gt(i),Gt(~i),a=0;a2&&!(4095&G)){var n,r=8*G,i=y-d;for(n=0;n>=3,X>=1}while(ofe-e?(Gt(h|=t<>fe-f,f+=e-fe):(h|=t<>=1,n<<=1}while(--e>0);return n>>1}function ge(){f>8?Gt(h):f>0&&zt(h),h=0,f=0}return function(i,a){var o,h;Z=i,tt=0,void 0===a&&(a=6),function(i){var a;if(i?i<1?i=1:i>9&&(i=9):i=6,T=i,r=!1,k=!1,null==Mt){for(t=e=n=null,Mt=new Array(at),s=new Array(ot),c=new Array(ut),l=new Array(32832),u=new Array(65536),_=new Array(Lt),a=0;a0;){var A=new Array(o);for(h=0;h>4,i=(15&e)<<2|n>>6,a=63&n,o="";return o+=ZF(63&t>>2),o+=ZF(63&r),o+=ZF(63&i),o+=ZF(63&a)}function ZF(t){var e=t;return e<10?String.fromCharCode(48+e):(e-=10)<26?String.fromCharCode(65+e):(e-=26)<26?String.fromCharCode(97+e):0===(e-=26)?"-":1===e?"_":"?"}function tN(t,e){var n,r=unescape(encodeURIComponent(t));return hs(n="".concat(e,"/svg/")).call(n,function(t){for(var e="",n=0;n0&&void 0!==arguments[0]?arguments[0]:{};ra(this,t);this.baseUrl=null!==(e=n.baseUrl)&&void 0!==e?e:"http://www.plantuml.com/plantuml"}return Ho(t,[{key:"render",value:function(t,e){var n,r,i=e;i||(i=Math.round(1e8*Math.random()));var a=hs(n="plantuml-".concat(i,"-")).call(n,(new Date).getTime());return hs(r='')}}],[{key:"install",value:function(e,n){var r;bu(e,{engine:{syntax:{codeBlock:{customRenderer:{plantuml:new t(YF(YF({},n),null!==(r=e.engine.syntax.plantuml)&&void 0!==r?r:{}))}}}}})}}])}();Dn({target:"Number",stat:!0,forced:Number.parseFloat!==Vf},{parseFloat:Vf});var nN=H.Number.parseFloat,rN=["echarts"];function iN(t,e){var n=Is(t);if(Ii){var r=Ii(t);e&&(r=Qi(r).call(r,(function(e){return Ki(t,e).enumerable}))),n.push.apply(n,r)}return n}function aN(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};ra(this,t);var n=e.echarts,r=_u(e,rN);if(!n&&!window.echarts)throw new Error("table-echarts-plugin[init]: Package echarts not found.");this.options=aN(aN({},oN),r||{}),this.echartsRef=n||window.echarts,this.dom=null}return Ho(t,[{key:"getInstance",value:function(){return this.dom||(this.dom=document.createElement("div"),this.echartsRef.init(this.dom,null,this.options)),this.echartsRef.getInstanceByDom(this.dom)}},{key:"render",value:function(t,e,n){var r={};switch(t){case"bar":r=this.renderBarChart(n,e);break;case"line":r=this.renderLineChart(n,e);break;default:return""}var i=this.getInstance();return i.clear(),i.setOption(r),i.getDom().innerHTML}},{key:"renderBarChart",value:function(t,e){return this.$renderChartCommon(t,e,"bar")}},{key:"renderLineChart",value:function(t,e){return this.$renderChartCommon(t,e,"line")}},{key:"$renderChartCommon",value:function(t,e,n){var r,i,a={bar:{type:"bar",barWidth:20,animation:!1,name:"",data:[]},line:{type:"line",animation:!1,name:"",data:[]}};if(a[n]){var o=zm(r=t.rows).call(r,(function(t,e){var r;return t.legend.data.push(e[0]),t.series.push(aN(aN({},a[n]),{},{name:e[0],data:lA(r=Bf(e).call(e,1)).call(r,(function(t){return nN(t.replace(/,/g,""))}))})),t}),{legend:{data:[]},series:[]});return aN(aN({},o),{},{xAxis:{data:Bf(i=t.header).call(i,1),type:"category"},yAxis:{type:"value",axisLabel:{width:"100%"}},grid:{containLabel:!0,left:"1%",right:"1%",bottom:"10%"}})}}},{key:"onDestroy",value:function(){this.dom&&this.echartsRef.dispose(this.dom)}}],[{key:"install",value:function(e){if("undefined"==typeof window)return console.warn("echarts-table-engine only works in browser."),void bu(e,{engine:{syntax:{table:{enableChart:!1}}}});bu(e,{engine:{syntax:{table:{enableChart:!0,chartRenderEngine:t,externals:["echarts"]}}}})}}])}();function cN(t){for(var e=[],n=1;n=e?t:""+Array(e+1-r.length).join(n)+t},b={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(o[0])}else{var s=e.name;y[s]=e,i=s}return!r&&i&&(v=i),i||!r&&v},x=function(t,e){if(k(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new T(n)},E=b;E.l=C,E.i=k,E.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function p(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var m=p.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(E.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(A);if(r){var i=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return E},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return x(t)-1}(c))return c;var l=c.match(o);if(!l)return c;var u=l[0];return n.test(u)?e.BLANK_URL:c}}));n(uN);var hN=uN.sanitizeUrl;function fN(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function dN(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function AN(t){var e,n,r;function i(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;n(t[o],r)<0?i=o+1:a=o}while(i2&&void 0!==arguments[2]?arguments[2]:0,a=i(t,e,n,(arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length)-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(i>>1;n(t[o],r)<=0?i=o+1:a=o}while(i3)){if(BN)return!0;if(_N)return _N<603;var t,e,n,r,i="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)SN.push({k:e+r,v:n})}for(SN.sort((function(t,e){return e.v-t.v})),r=0;rxr(n)?1:-1}}(t)),n=un(i),r=0;r=jN?10:c>=KN?5:c>=zN?2:1;return s<0?(a=Math.pow(10,-s)/l,(r=Math.round(t*a))/ae&&--i,a=-a):(a=Math.pow(10,s)*l,(r=Math.round(t/a))*ae&&--i),i=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function qN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=a)&&(n=a)}}catch(t){i.e(t)}finally{i.f()}}else{var o,s=-1,c=WN(t);try{for(c.s();!(o=c.n()).done;){var l=o.value;null!=(l=e(l,++s,t))&&(n=l)&&(n=l)}}catch(t){c.e(t)}finally{c.f()}}return n}function JN(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return ZN(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ZN(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function ZN(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);na||void 0===n&&a>=a)&&(n=a)}}catch(t){i.e(t)}finally{i.f()}}else{var o,s=-1,c=JN(t);try{for(c.s();!(o=c.n()).done;){var l=o.value;null!=(l=e(l,++s,t))&&(n>l||void 0===n&&l>=l)&&(n=l)}}catch(t){c.e(t)}finally{c.f()}}return n}var eP=mB;function nP(t){return t}var rP=1,iP=2,aP=3,oP=4,sP=1e-6;function cP(t){return"translate("+t+",0)"}function lP(t){return"translate(0,"+t+")"}function uP(t){return function(e){return+t(e)}}function hP(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function fP(){return!this.__axis}function dP(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=t===rP||t===oP?-1:1,u=t===oP||t===iP?"x":"y",h=t===rP||t===aP?cP:lP;function f(f){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,A=null==i?e.tickFormat?e.tickFormat.apply(e,n):nP:i,g=Math.max(a,0)+s,p=e.range(),m=+p[0]+c,b=+p[p.length-1]+c,v=(e.bandwidth?hP:uP)(e.copy(),c),y=f.selection?f.selection():f,w=y.selectAll(".domain").data([null]),k=y.selectAll(".tick").data(d,e).order(),C=k.exit(),x=k.enter().append("g").attr("class","tick"),E=k.select("line"),T=k.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(x),E=E.merge(x.append("line").attr("stroke","currentColor").attr(u+"2",l*a)),T=T.merge(x.append("text").attr("fill","currentColor").attr(u,l*g).attr("dy",t===rP?"0em":t===aP?"0.71em":"0.32em")),f!==y&&(w=w.transition(f),k=k.transition(f),E=E.transition(f),T=T.transition(f),C=C.transition(f).attr("opacity",sP).attr("transform",(function(t){return isFinite(t=v(t))?h(t+c):this.getAttribute("transform")})),x.attr("opacity",sP).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:v(t))+c)}))),C.remove(),w.attr("d",t===oP||t===iP?o?"M"+l*o+","+m+"H"+c+"V"+b+"H"+l*o:"M"+c+","+m+"V"+b:o?"M"+m+","+l*o+"V"+c+"H"+b+"V"+l*o:"M"+m+","+c+"H"+b),k.attr("opacity",1).attr("transform",(function(t){return h(v(t)+c)})),E.attr(u+"2",l*a),T.attr(u,l*g).text(A),Qi(y).call(y,fP).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===iP?"start":t===oP?"end":"middle"),y.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Nh(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Nh(t),f):Bf(n).call(n)},f.tickValues=function(t){return arguments.length?(r=null==t?null:Nh(t),f):r&&Bf(r).call(r)},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(c=+t,f):c},f}var AP={value:function(){}};function gP(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=Bf(t).call(t,r+1),t=Bf(t).call(t,0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=Bf(t).call(t,0,n))&&(t=Bf(t).call(t,n+1)),yP.hasOwnProperty(e)?{space:yP[e],local:t}:t}function kP(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===vP&&e.documentElement.namespaceURI===vP?e.createElement(t):e.createElementNS(n,t)}}function CP(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function xP(t){var e=wP(t);return(e.local?CP:kP)(e)}var EP=Fo;function TP(){}function BP(t){return null==t?TP:function(){return this.querySelector(t)}}function _P(t){return null==t?[]:sd(t)?t:Nh(t)}function SP(){return[]}function LP(t){return null==t?SP:function(){return this.querySelectorAll(t)}}function IP(t){return function(){return this.matches(t)}}function MP(t){return function(e){return e.matches(t)}}var OP=ah(Array.prototype);function DP(){return this.firstElementChild}var FP=Qi(Array.prototype);function NP(){return Nh(this.children)}var PP=Lg;function RP(t){return new Array(t.length)}function QP(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function UP(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;se?1:t>=e?0:NaN}function zP(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return GP(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?GP(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function GP(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=0&&(eA(n=this._names).call(n,r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){var e;return Ef(e=this._names).call(e,t)>=0}};var MR=xB.mark(OR);function OR(){var t,e,n,r,i,a,o;return xB.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:t=this._groups,e=0,n=t.length;case 1:if(!(e=y&&(y=v+1);!(b=p[y])&&++y=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=KP);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?tR:"function"==typeof e?nR:eR)(t,e,null==n?"":n)):rR(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?iR:"function"==typeof e?oR:aR)(t,e)):this.node()[t]},classed:function(t,e){var n=sR(t+"");if(arguments.length<2){for(var r=cR(this.node()),i=-1,a=n.length;++i=0&&(e=Bf(t).call(t,n+1),t=Bf(t).call(t,0,n)),{type:t,name:e}}))}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?_R:BR,r=0;r>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===r?yQ(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===r?yQ(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=lQ.exec(t))?new CQ(n[1],n[2],n[3],1):(n=uQ.exec(t))?new CQ(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=hQ.exec(t))?yQ(n[1],n[2],n[3],n[4]):(n=fQ.exec(t))?yQ(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=dQ.exec(t))?SQ(n[1],n[2]/100,n[3]/100,1):(n=AQ.exec(t))?SQ(n[1],n[2]/100,n[3]/100,n[4]):gQ.hasOwnProperty(t)?vQ(gQ[t]):"transparent"===t?new CQ(NaN,NaN,NaN,0):null}function vQ(t){return new CQ(t>>16&255,t>>8&255,255&t,1)}function yQ(t,e,n,r){return r<=0&&(t=e=n=NaN),new CQ(t,e,n,r)}function wQ(t){return t instanceof nQ||(t=bQ(t)),t?new CQ((t=t.rgb()).r,t.g,t.b,t.opacity):new CQ}function kQ(t,e,n,r){return 1===arguments.length?wQ(t):new CQ(t,e,n,null==r?1:r)}function CQ(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function xQ(){var t,e;return hs(t=hs(e="#".concat(_Q(this.r))).call(e,_Q(this.g))).call(t,_Q(this.b))}function EQ(){var t,e,n,r,i=TQ(this.opacity);return hs(t=hs(e=hs(n=hs(r="".concat(1===i?"rgb(":"rgba(")).call(r,BQ(this.r),", ")).call(n,BQ(this.g),", ")).call(e,BQ(this.b))).call(t,1===i?")":", ".concat(i,")"))}function TQ(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function BQ(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _Q(t){return((t=BQ(t))<16?"0":"")+t.toString(16)}function SQ(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new IQ(t,e,n,r)}function LQ(t){if(t instanceof IQ)return new IQ(t.h,t.s,t.l,t.opacity);if(t instanceof nQ||(t=bQ(t)),!t)return new IQ;if(t instanceof IQ)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new IQ(o,s,c,t.opacity)}function IQ(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function MQ(t){return(t=(t||0)%360)<0?t+360:t}function OQ(t){return Math.max(0,Math.min(1,t||0))}function DQ(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}tQ(nQ,bQ,{copy:function(t){return Ss(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:pQ,formatHex:pQ,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return LQ(this).formatHsl()},formatRgb:mQ,toString:mQ}),tQ(CQ,kQ,eQ(nQ,{brighter:function(t){return t=null==t?iQ:Math.pow(iQ,t),new CQ(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?rQ:Math.pow(rQ,t),new CQ(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new CQ(BQ(this.r),BQ(this.g),BQ(this.b),TQ(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:xQ,formatHex:xQ,formatHex8:function(){var t,e,n;return hs(t=hs(e=hs(n="#".concat(_Q(this.r))).call(n,_Q(this.g))).call(e,_Q(this.b))).call(t,_Q(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:EQ,toString:EQ})),tQ(IQ,(function(t,e,n,r){return 1===arguments.length?LQ(t):new IQ(t,e,n,null==r?1:r)}),eQ(nQ,{brighter:function(t){return t=null==t?iQ:Math.pow(iQ,t),new IQ(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?rQ:Math.pow(rQ,t),new IQ(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new CQ(DQ(t>=240?t-240:t+120,i,r),DQ(t,i,r),DQ(t<120?t+240:t-120,i,r),this.opacity)},clamp:function(){return new IQ(MQ(this.h),OQ(this.s),OQ(this.l),TQ(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t,e,n,r,i=TQ(this.opacity);return hs(t=hs(e=hs(n=hs(r="".concat(1===i?"hsl(":"hsla(")).call(r,MQ(this.h),", ")).call(n,100*OQ(this.s),"%, ")).call(e,100*OQ(this.l),"%")).call(t,1===i?")":", ".concat(i,")"))}}));var FQ=Math.PI/180,NQ=180/Math.PI,PQ=.96422,RQ=1,QQ=.82521,UQ=4/29,$Q=6/29,HQ=3*$Q*$Q,jQ=$Q*$Q*$Q;function KQ(t){if(t instanceof zQ)return new zQ(t.l,t.a,t.b,t.opacity);if(t instanceof YQ)return JQ(t);t instanceof CQ||(t=wQ(t));var e,n,r=WQ(t.r),i=WQ(t.g),a=WQ(t.b),o=GQ((.2225045*r+.7168786*i+.0606169*a)/RQ);return r===i&&i===a?e=n=o:(e=GQ((.4360747*r+.3850649*i+.1430804*a)/PQ),n=GQ((.0139322*r+.0971045*i+.7141733*a)/QQ)),new zQ(116*o-16,500*(e-o),200*(o-n),t.opacity)}function zQ(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function GQ(t){return t>jQ?Math.pow(t,1/3):t/HQ+UQ}function XQ(t){return t>$Q?t*t*t:HQ*(t-UQ)}function VQ(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function WQ(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function qQ(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof YQ)return new YQ(t.h,t.c,t.l,t.opacity);if(t instanceof zQ||(t=KQ(t)),0===t.a&&0===t.b)return new YQ(NaN,0a&&(i=Bf(e).call(e,a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:sU(n,r)})),a=uU.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:sU(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:sU(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:sU(t,n)},{i:s-2,x:sU(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n180||n<-180?n-360*Math.round(n/360):n):ZQ(isNaN(t)?e:t)})),EU=0,TU=0,BU=0,_U=1e3,SU=0,LU=0,IU=0,MU="object"===("undefined"==typeof performance?"undefined":Ro(performance))&&performance.now?performance:Date,OU="object"===("undefined"==typeof window?"undefined":Ro(window))&&window.requestAnimationFrame?fs(wU=window.requestAnimationFrame).call(wU,window):function(t){ks(t,17)};function DU(){return LU||(OU(FU),LU=MU.now()+IU)}function FU(){LU=0}function NU(){this._call=this._time=this._next=null}function PU(t,e,n){var r=new NU;return r.restart(t,e,n),r}function RU(){LU=(SU=MU.now())+IU,EU=TU=0;try{!function(){DU(),++EU;for(var t,e=kU;e;)(t=LU-e._time)>=0&&e._call.call(void 0,t),e=e._next;--EU}()}finally{EU=0,function(){var t,e,n=kU,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:kU=e);CU=t,UU(r)}(),LU=0}}function QU(){var t=MU.now(),e=t-SU;e>_U&&(IU-=e,SU=t)}function UU(t){EU||(TU&&(TU=clearTimeout(TU)),t-LU>24?(t<1/0&&(TU=ks(RU,t-MU.now()-IU)),BU&&(BU=clearInterval(BU))):(BU||(SU=MU.now(),BU=i_(QU,_U)),EU=1,OU(RU)))}function $U(t,e,n){var r=new NU;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}NU.prototype=PU.prototype={constructor:NU,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?DU():+n)+(null==e?0:+e),this._next||CU===this||(CU?CU._next=this:kU=this,CU=this),this._call=t,this._time=n,UU()},stop:function(){this._call&&(this._call=null,this._time=1/0,UU())}};var HU=gP("start","end","cancel","interrupt"),jU=[],KU=0,zU=1,GU=2,XU=3,VU=4,WU=5,qU=6;function YU(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=zU,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,u,h,f;if(n.state!==zU)return c();for(l in i)if((f=i[l]).name===n.name){if(f.state===XU)return $U(o);f.state===VU?(f.state=qU,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+lKU)throw new Error("too late; already scheduled");return n}function ZU(t,e){var n=t$(t,e);if(n.state>XU)throw new Error("too late; already running");return n}function t$(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function e$(t,e){var n,r;return function(){var i=ZU(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o=0&&(t=Bf(t).call(t,0,e)),!t||"start"===t}))}(e)?JU:ZU;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var b$=YR.prototype.constructor;function v$(t){return function(){this.style.removeProperty(t)}}var y$=0;function w$(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function k$(){return++y$}var C$=YR.prototype;w$.prototype=cs({constructor:w$,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=BP(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;oGU&&n.state=0))throw new Error("invalid digits: ".concat(t));if(e>15)return eH;var n=Math.pow(10,e);return function(t){this._+=t[0];for(var e=1,r=t.length;eZ$)if(Math.abs(u*s-c*l)>Z$&&i){var f=n-a,d=r-o,A=s*s+c*c,g=f*f+d*d,p=Math.sqrt(A),m=Math.sqrt(h),b=i*Math.tan((Y$-Math.acos((A+h-g)/(2*p*m)))/2),v=b/m,y=b/p;Math.abs(v-1)>Z$&&this._append(U$||(U$=q$(["L",",",""])),t+v*l,e+v*u),this._append($$||($$=q$(["A",",",",0,0,",",",",",""])),i,i,+(u*f>l*d),this._x1=t+y*s,this._y1=e+y*c)}else this._append(Q$||(Q$=q$(["L",",",""])),this._x1=t,this._y1=e);else;}},{key:"arc",value:function(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: ".concat(n));var o=n*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;null===this._x1?this._append(H$||(H$=q$(["M",",",""])),c,l):(Math.abs(this._x1-c)>Z$||Math.abs(this._y1-l)>Z$)&&this._append(j$||(j$=q$(["L",",",""])),c,l),n&&(h<0&&(h=h%J$+J$),h>tH?this._append(K$||(K$=q$(["A",",",",0,1,",",",",","A",",",",0,1,",",",",",""])),n,n,u,t-o,e-s,n,n,u,this._x1=c,this._y1=l):h>Z$&&this._append(z$||(z$=q$(["A",",",",0,",",",",",",",""])),n,n,+(h>=Y$),u,this._x1=t+n*Math.cos(i),this._y1=e+n*Math.sin(i)))}},{key:"rect",value:function(t,e,n,r){this._append(G$||(G$=q$(["M",",","h","v","h","Z"])),this._x0=this._x1=+t,this._y0=this._y1=+e,n=+n,+r,-n)}},{key:"toString",value:function(){return this._}}])}();function rH(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}nH.prototype;function iH(t,e){var n;if((r=Ef(n=t=e?t.toExponential(e-1):t.toExponential()).call(n,"e"))<0)return null;var r,i=Bf(t).call(t,0,r);return[i.length>1?i[0]+Bf(i).call(i,2):i,+Bf(t).call(t,r+1)]}function aH(t){return(t=iH(Math.abs(t)))?t[1]:NaN}var oH,sH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cH(t){var e,n;if(!(n=sH.exec(t)))throw new Error("invalid format: "+t);return new lH({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&Bf(e=n[8]).call(e,1),trim:n[9],type:n[10]})}function lH(t){this.fill=void 0===Qb(t)?" ":Qb(t)+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!mh(t),this.type=void 0===t.type?"":t.type+""}function uH(t,e){var n=iH(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?Bf(r).call(r,0,i+1)+"."+Bf(r).call(r,i+1):r+new Array(i-r.length+2).join("0")}cH.prototype=lH.prototype,lH.prototype.toString=function(){return Qb(this)+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(mh(this)?"~":"")+this.type};var hH={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return uH(100*t,e)},r:uH,s:function(t,e){var n=iH(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(oH=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?Bf(r).call(r,0,a)+"."+Bf(r).call(r,a):"0."+new Array(1-a).join("0")+iH(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fH(t){return t}var dH,AH,gH,pH=lA(Array.prototype),mH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bH(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fH:(e=pH.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return eP(a).call(a).join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fH:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(pH.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"−":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){t=cH(t);var e=Qb(t),n=t.align,h=t.sign,f=t.symbol,d=t.zero,A=t.width,g=t.comma,p=t.precision,m=mh(t),b=t.type;"n"===b?(g=!0,b="g"):hH[b]||(void 0===p&&(p=12),m=!0,b="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var v="$"===f?i:"#"===f&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",y="$"===f?a:/[%p]/.test(b)?c:"",w=hH[b],k=/[defgprs%]/.test(b);function C(t){var i,a,c,f=v,C=y;if("c"===b)C=w(t)+C,t="";else{var x=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:w(Math.abs(t),p),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?Bf(t).call(t,0,i)+Bf(t).call(t,e+1):t}(t)),x&&0==+t&&"+"!==h&&(x=!1),f=(x?"("===h?h:l:"-"===h||"("===h?"":h)+f,C=("s"===b?mH[8+oH/3]:"")+C+(x&&"("===h?")":""),k)for(i=-1,a=t.length;++i(c=t.charCodeAt(i))||c>57){C=(46===c?o+Bf(t).call(t,i+1):Bf(t).call(t,i))+C,t=Bf(t).call(t,0,i);break}}g&&!d&&(t=r(t,1/0));var E=f.length+t.length+C.length,T=E>1)+f+t+C+Bf(T).call(T,E);break;default:t=T+f+t+C}return s(t)}return p=void 0===p?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),C.toString=function(){return t+""},C}return{format:h,formatPrefix:function(t,e){var n=h(((t=cH(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(aH(e)/3))),i=Math.pow(10,-r),a=mH[8+r/3];return function(t){return n(i*t)+a}}}}function vH(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function yH(t,e){var n=void 0!==ad&&od(t)||t["@@iterator"];if(!n){if(sd(t)||(n=function(t,e){if(t){var n;if("string"==typeof t)return wH(t,e);var r=Bf(n={}.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Nh(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?wH(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function wH(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);ne&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?SH:_H,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(lA(o).call(o,t),s,c)))(t(l(e)))}return h.invert=function(n){return l(e((a||(a=r(s,lA(o).call(o,t),sU)))(n)))},h.domain=function(t){return arguments.length?(o=Nh(t,xH),u()):Bf(o).call(o)},h.range=function(t){return arguments.length?(s=Nh(t),u()):Bf(s).call(s)},h.rangeRound=function(t){return s=Nh(t),c=dU,u()},h.clamp=function(t){return arguments.length?(l=!!t||TH,u()):l!==TH},h.interpolate=function(t){return arguments.length?(c=t,u()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,u()}}function MH(){return IH()(TH,TH)}function OH(t,e,n,r){var i,a=VN(t,e,n);switch((r=cH(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(aH(e)/3)))-aH(Math.abs(t)))}(a,o))||(r.precision=i),gH(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,aH(e)-aH(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-aH(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return AH(r)}function DH(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];var r=e=a))return[];var c=o-a+1,l=new Array(c);if(r)if(s<0)for(var u=0;u0;){if((i=XN(c,l,n))===r)return a[o]=c,a[s]=l,e(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function FH(){var t=MH();return t.copy=function(){return LH(t,FH())},vH.apply(t,arguments),DH(t)}var NH=new Date,PH=new Date;function RH(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return NH.setTime(+e),PH.setTime(+r),t(NH),t(PH),Math.floor(n(NH,PH))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Qi(i).call(i,r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var QH=RH((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));QH.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?RH((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):QH:null},QH.range;var UH=1e3,$H=6e4,HH=36e5,jH=864e5,KH=6048e5,zH=2592e6,GH=31536e6,XH=RH((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*UH)}),(function(t,e){return(e-t)/UH}),(function(t){return t.getUTCSeconds()}));XH.range;var VH=RH((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*UH)}),(function(t,e){t.setTime(+t+e*$H)}),(function(t,e){return(e-t)/$H}),(function(t){return t.getMinutes()}));VH.range;var WH=RH((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*$H)}),(function(t,e){return(e-t)/$H}),(function(t){return t.getUTCMinutes()}));WH.range;var qH=RH((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*UH-t.getMinutes()*$H)}),(function(t,e){t.setTime(+t+e*HH)}),(function(t,e){return(e-t)/HH}),(function(t){return t.getHours()}));qH.range;var YH=RH((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*HH)}),(function(t,e){return(e-t)/HH}),(function(t){return t.getUTCHours()}));YH.range;var JH=RH((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*$H)/jH}),(function(t){return t.getDate()-1}));JH.range;var ZH=RH((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/jH}),(function(t){return t.getUTCDate()-1}));ZH.range;var tj=RH((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/jH}),(function(t){return Math.floor(t/jH)}));function ej(t){return RH((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*$H)/KH}))}tj.range;var nj=ej(0),rj=ej(1),ij=ej(2),aj=ej(3),oj=ej(4),sj=ej(5),cj=ej(6);function lj(t){return RH((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/KH}))}nj.range,rj.range,ij.range,aj.range,oj.range,sj.range,cj.range;var uj=lj(0),hj=lj(1),fj=lj(2),dj=lj(3),Aj=lj(4),gj=lj(5),pj=lj(6);uj.range,hj.range,fj.range,dj.range,Aj.range,gj.range,pj.range;var mj=RH((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));mj.range;var bj=RH((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));bj.range;var vj=RH((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));vj.every=function(t){return isFinite(t=Math.floor(t))&&t>0?RH((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},vj.range;var yj=RH((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function wj(t,e,n,r,i,a){var o=[[XH,1,UH],[XH,5,5e3],[XH,15,15e3],[XH,30,3e4],[a,1,$H],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,HH],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,jH],[r,2,1728e5],[n,1,KH],[e,1,zH],[e,3,7776e6],[t,1,GH]];function s(e,n,r){var i=Math.abs(n-e)/r,a=AN((function(t){return xf(t,3)[2]})).right(o,i);if(a===o.length)return Kx(t).call(t,VN(e/GH,n/GH,r));if(0===a)return Kx(QH).call(QH,Math.max(VN(e,n,r),1));var s=xf(o[i/o[a-1][2]0?RH((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},yj.range;var kj=xf(wj(yj,bj,uj,tj,YH,WH),2);kj[0],kj[1];var Cj=xf(wj(vj,mj,nj,JH,qH,VH),2),xj=Cj[0],Ej=Cj[1];function Tj(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Bj(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function _j(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var Sj,Lj,Ij={"-":"",_:" ",0:"0"},Mj=/^\s*\d+/,Oj=/^%/,Dj=/[\\^$*+?|[\]().{}]/g;function Fj(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Gj(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Bf(e).call(e,n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Xj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Vj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Wj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function qj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Yj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Jj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Zj(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function tK(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function eK(t,e,n){var r=Mj.exec(Bf(e).call(e,n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function nK(t,e,n){var r=Oj.exec(Bf(e).call(e,n,n+1));return r?n+r[0].length:-1}function rK(t,e,n){var r=Mj.exec(Bf(e).call(e,n));return r?(t.Q=+r[0],n+r[0].length):-1}function iK(t,e,n){var r=Mj.exec(Bf(e).call(e,n));return r?(t.s=+r[0],n+r[0].length):-1}function aK(t,e){return Fj(t.getDate(),e,2)}function oK(t,e){return Fj(t.getHours(),e,2)}function sK(t,e){return Fj(t.getHours()%12||12,e,2)}function cK(t,e){return Fj(1+JH.count(vj(t),t),e,3)}function lK(t,e){return Fj(t.getMilliseconds(),e,3)}function uK(t,e){return lK(t,e)+"000"}function hK(t,e){return Fj(t.getMonth()+1,e,2)}function fK(t,e){return Fj(t.getMinutes(),e,2)}function dK(t,e){return Fj(t.getSeconds(),e,2)}function AK(t){var e=t.getDay();return 0===e?7:e}function gK(t,e){return Fj(nj.count(vj(t)-1,t),e,2)}function pK(t){var e=t.getDay();return e>=4||0===e?oj(t):oj.ceil(t)}function mK(t,e){return t=pK(t),Fj(oj.count(vj(t),t)+(4===vj(t).getDay()),e,2)}function bK(t){return t.getDay()}function vK(t,e){return Fj(rj.count(vj(t)-1,t),e,2)}function yK(t,e){return Fj(t.getFullYear()%100,e,2)}function wK(t,e){return Fj((t=pK(t)).getFullYear()%100,e,2)}function kK(t,e){return Fj(t.getFullYear()%1e4,e,4)}function CK(t,e){var n=t.getDay();return Fj((t=n>=4||0===n?oj(t):oj.ceil(t)).getFullYear()%1e4,e,4)}function xK(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Fj(e/60|0,"0",2)+Fj(e%60,"0",2)}function EK(t,e){return Fj(t.getUTCDate(),e,2)}function TK(t,e){return Fj(t.getUTCHours(),e,2)}function BK(t,e){return Fj(t.getUTCHours()%12||12,e,2)}function _K(t,e){return Fj(1+ZH.count(yj(t),t),e,3)}function SK(t,e){return Fj(t.getUTCMilliseconds(),e,3)}function LK(t,e){return SK(t,e)+"000"}function IK(t,e){return Fj(t.getUTCMonth()+1,e,2)}function MK(t,e){return Fj(t.getUTCMinutes(),e,2)}function OK(t,e){return Fj(t.getUTCSeconds(),e,2)}function DK(t){var e=t.getUTCDay();return 0===e?7:e}function FK(t,e){return Fj(uj.count(yj(t)-1,t),e,2)}function NK(t){var e=t.getUTCDay();return e>=4||0===e?Aj(t):Aj.ceil(t)}function PK(t,e){return t=NK(t),Fj(Aj.count(yj(t),t)+(4===yj(t).getUTCDay()),e,2)}function RK(t){return t.getUTCDay()}function QK(t,e){return Fj(hj.count(yj(t)-1,t),e,2)}function UK(t,e){return Fj(t.getUTCFullYear()%100,e,2)}function $K(t,e){return Fj((t=NK(t)).getUTCFullYear()%100,e,2)}function HK(t,e){return Fj(t.getUTCFullYear()%1e4,e,4)}function jK(t,e){var n=t.getUTCDay();return Fj((t=n>=4||0===n?Aj(t):Aj.ceil(t)).getUTCFullYear()%1e4,e,4)}function KK(){return"+0000"}function zK(){return"%"}function GK(t){return+t}function XK(t){return Math.floor(+t/1e3)}function VK(t){return new Date(t)}function WK(t){return t instanceof Date?+t:+new Date(+t)}function qK(t,e,n,r,i,a,o,s,c,l){var u=MH(),h=u.invert,f=u.domain,d=l(".%L"),A=l(":%S"),g=l("%I:%M"),p=l("%I %p"),m=l("%a %d"),b=l("%b %d"),v=l("%B"),y=l("%Y");function w(t){return(c(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:GK,s:XK,S:dK,u:AK,U:gK,V:mK,w:bK,W:vK,x:null,X:null,y:yK,Y:kK,Z:xK,"%":zK},y={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:EK,e:EK,f:LK,g:$K,G:jK,H:TK,I:BK,j:_K,L:SK,m:IK,M:MK,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:GK,s:XK,S:OK,u:DK,U:FK,V:PK,w:RK,W:QK,x:null,X:null,y:UK,Y:HK,Z:KK,"%":zK},w={a:function(t,e,n){var r=d.exec(Bf(e).call(e,n));return r?(t.w=A.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(Bf(e).call(e,n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(Bf(e).call(e,n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(Bf(e).call(e,n));return r?(t.m=p.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return x(t,e,n,r)},d:Wj,e:Wj,f:eK,g:zj,G:Kj,H:Yj,I:Yj,j:qj,L:tK,m:Vj,M:Jj,p:function(t,e,n){var r=l.exec(Bf(e).call(e,n));return r?(t.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Xj,Q:rK,s:iK,S:Zj,u:Uj,U:$j,V:Hj,w:Qj,W:jj,x:function(t,e,r){return x(t,n,e,r)},X:function(t,e,n){return x(t,r,e,n)},y:zj,Y:Kj,Z:Gj,"%":nK};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Bj(_j(a.y,0,1))).getUTCDay(),r=i>4||0===i?hj.ceil(r):hj(r),r=ZH.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Tj(_j(a.y,0,1))).getDay(),r=i>4||0===i?rj.ceil(r):rj(r),r=JH.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Bj(_j(a.y,0,1)).getUTCDay():Tj(_j(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Bj(a)):Tj(a)}}function x(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Ij?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=k(n,v),v.X=k(r,v),v.c=k(e,v),y.x=k(n,y),y.X=k(r,y),y.c=k(e,y),{format:function(t){var e=k(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",y);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t+="",!0);return e.toString=function(){return t},e}}}(t),Lj=Sj.format,Sj.parse,Sj.utcFormat,Sj.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var JK=Math.abs,ZK=Math.atan2,tz=Math.cos,ez=Math.max,nz=Math.min,rz=Math.sin,iz=Math.sqrt,az=1e-12,oz=Math.PI,sz=oz/2,cz=2*oz;function lz(t){return t>=1?sz:t<=-1?-sz:Math.asin(t)}function uz(t){var e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{var r=Math.floor(n);if(!(r>=0))throw new RangeError("invalid digits: ".concat(n));e=r}return t},function(){return new nH(e)}}function hz(t){return t.innerRadius}function fz(t){return t.outerRadius}function dz(t){return t.startAngle}function Az(t){return t.endAngle}function gz(t){return t&&t.padAngle}function pz(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/iz(s*s+c*c),u=l*c,h=-l*s,f=t+u,d=e+h,A=n+u,g=r+h,p=(f+A)/2,m=(d+g)/2,b=A-f,v=g-d,y=b*b+v*v,w=i-a,k=f*g-A*d,C=(v<0?-1:1)*iz(ez(0,w*w*y-k*k)),x=(k*v-b*C)/y,E=(-k*b-v*C)/y,T=(k*v+b*C)/y,B=(-k*b+v*C)/y,_=x-p,S=E-m,L=T-p,I=B-m;return _*_+S*S>L*L+I*I&&(x=T,E=B),{cx:x,cy:E,x01:-u,y01:-h,x11:x*(i/w-1),y11:E*(i/w-1)}}function mz(){var t=hz,e=fz,n=YK(0),r=null,i=dz,a=Az,o=gz,s=null,c=uz(l);function l(){var l,u,h=+t.apply(this,arguments),f=+e.apply(this,arguments),d=i.apply(this,arguments)-sz,A=a.apply(this,arguments)-sz,g=JK(A-d),p=A>d;if(s||(s=l=c()),faz)if(g>cz-az)s.moveTo(f*tz(d),f*rz(d)),s.arc(0,0,f,d,A,!p),h>az&&(s.moveTo(h*tz(A),h*rz(A)),s.arc(0,0,h,A,d,p));else{var m,b,v=d,y=A,w=d,k=A,C=g,x=g,E=o.apply(this,arguments)/2,T=E>az&&(r?+r.apply(this,arguments):iz(h*h+f*f)),B=nz(JK(f-h)/2,+n.apply(this,arguments)),_=B,S=B;if(T>az){var L=lz(T/h*rz(E)),I=lz(T/f*rz(E));(C-=2*L)>az?(w+=L*=p?1:-1,k-=L):(C=0,w=k=(d+A)/2),(x-=2*I)>az?(v+=I*=p?1:-1,y-=I):(x=0,v=y=(d+A)/2)}var M=f*tz(v),O=f*rz(v),D=h*tz(k),F=h*rz(k);if(B>az){var N,P=f*tz(y),R=f*rz(y),Q=h*tz(w),U=h*rz(w);if(g1?0:t<-1?oz:Math.acos(t)}(($*j+H*K)/(iz($*$+H*H)*iz(j*j+K*K)))/2),G=iz(N[0]*N[0]+N[1]*N[1]);_=nz(B,(h-G)/(z-1)),S=nz(B,(f-G)/(z+1))}else _=S=0}x>az?S>az?(m=pz(Q,U,M,O,f,S,p),b=pz(P,R,D,F,f,S,p),s.moveTo(m.cx+m.x01,m.cy+m.y01),Saz&&C>az?_>az?(m=pz(D,F,P,R,h,-_,p),b=pz(M,O,Q,U,h,-_,p),s.lineTo(m.cx+m.x01,m.cy+m.y01),_t?1:e>=t?0:NaN}function Ez(t){return t}Bf(Array.prototype),vz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Tz=function(){return Ho((function t(e,n){ra(this,t),this._context=e,this._x=n}),[{key:"areaStart",value:function(){this._line=0}},{key:"areaEnd",value:function(){this._line=NaN}},{key:"lineStart",value:function(){this._point=0}},{key:"lineEnd",value:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}},{key:"point",value:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}])}();function Bz(){}function _z(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Sz(t){this._context=t}function Lz(t){return new Sz(t)}function Iz(t){this._context=t}function Mz(t){this._context=t}function Oz(t,e){this._basis=new Sz(t),this._beta=e}Sz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_z(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_z(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Iz.prototype={areaStart:Bz,areaEnd:Bz,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_z(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Mz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:_z(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Oz.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Dz=function t(e){function n(t){return 1===e?new Sz(t):new Oz(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Fz(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Nz(t,e){this._context=t,this._k=(1-e)/6}Nz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fz(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Fz(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pz=function t(e){function n(t){return new Nz(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rz(t,e){this._context=t,this._k=(1-e)/6}Rz.prototype={areaStart:Bz,areaEnd:Bz,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fz(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Qz=function t(e){function n(t){return new Rz(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Uz(t,e){this._context=t,this._k=(1-e)/6}Uz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fz(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var $z=function t(e){function n(t){return new Uz(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Hz(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>az){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>az){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function jz(t,e){this._context=t,this._alpha=e}jz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Hz(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Kz=function t(e){function n(t){return e?new jz(t,e):new Nz(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function zz(t,e){this._context=t,this._alpha=e}zz.prototype={areaStart:Bz,areaEnd:Bz,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Hz(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Gz=function t(e){function n(t){return e?new zz(t,e):new Rz(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Xz(t,e){this._context=t,this._alpha=e}Xz.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Hz(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Vz=function t(e){function n(t){return e?new Xz(t,e):new Uz(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Wz(t){this._context=t}function qz(t){return t<0?-1:1}function Yz(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(qz(a)+qz(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Jz(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Zz(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function tG(t){this._context=t}function eG(t){this._context=new nG(t)}function nG(t){this._context=t}function rG(t){this._context=t}function iG(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},oG.prototype={constructor:oG,scale:function(t){return 1===t?this:new oG(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new oG(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){var e,n;return t.copy().domain(lA(e=lA(n=t.range()).call(n,this.invertX,this)).call(e,t.invert,t))},rescaleY:function(t){var e,n;return t.copy().domain(lA(e=lA(n=t.range()).call(n,this.invertY,this)).call(e,t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new oG(1,0,0),oG.prototype;var sG=r((function(t,e){t.exports=function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function r(t,i,a){return r=n()?Reflect.construct:function(t,n,r){var i=[null];i.push.apply(i,n);var a=new(Function.bind.apply(t,i));return r&&e(a,r.prototype),a},r.apply(null,arguments)}function i(t){return a(t)||o(t)||s(t)||l()}function a(t){if(Array.isArray(t))return c(t)}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?n-1:0),i=1;i/gm),q=p(/\${[\w\W]*}/gm),Y=p(/^data-[\-\w.\u00B7-\uFFFF]/),J=p(/^aria-[\-\w]+$/),Z=p(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=p(/^(?:\w+script|data):/i),et=p(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=p(/^html$/i),rt=function(){return"undefined"==typeof window?null:window},it=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rt(),n=function(t){return at(t)};if(n.version="2.4.3",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,a=e.document,o=e.DocumentFragment,s=e.HTMLTemplateElement,c=e.Node,l=e.Element,u=e.NodeFilter,h=e.NamedNodeMap,f=void 0===h?e.NamedNodeMap||e.MozNamedAttrMap:h,d=e.HTMLFormElement,A=e.DOMParser,p=e.trustedTypes,m=l.prototype,b=N(m,"cloneNode"),v=N(m,"nextSibling"),y=N(m,"childNodes"),M=N(m,"parentNode");if("function"==typeof s){var O=a.createElement("template");O.content&&O.content.ownerDocument&&(a=O.content.ownerDocument)}var ot=it(p,r),st=ot?ot.createHTML(""):"",ct=a,lt=ct.implementation,ut=ct.createNodeIterator,ht=ct.createDocumentFragment,ft=ct.getElementsByTagName,dt=r.importNode,At={};try{At=F(a).documentMode?a.documentMode:{}}catch(t){}var gt={};n.isSupported="function"==typeof M&<&&void 0!==lt.createHTMLDocument&&9!==At;var pt,mt,bt=V,vt=W,yt=q,wt=Y,kt=J,Ct=tt,xt=et,Et=Z,Tt=null,Bt=D({},[].concat(i(P),i(R),i(Q),i($),i(j))),_t=null,St=D({},[].concat(i(K),i(z),i(G),i(X))),Lt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),It=null,Mt=null,Ot=!0,Dt=!0,Ft=!1,Nt=!1,Pt=!1,Rt=!1,Qt=!1,Ut=!1,$t=!1,Ht=!1,jt=!0,Kt=!1,zt="user-content-",Gt=!0,Xt=!1,Vt={},Wt=null,qt=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Yt=null,Jt=D({},["audio","video","img","source","image","track"]),Zt=null,te=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml",ie=re,ae=!1,oe=null,se=D({},[ee,ne,re],E),ce=["application/xhtml+xml","text/html"],le="text/html",ue=null,he=a.createElement("form"),fe=function(t){return t instanceof RegExp||t instanceof Function},de=function(e){ue&&ue===e||(e&&"object"===t(e)||(e={}),e=F(e),pt=pt=-1===ce.indexOf(e.PARSER_MEDIA_TYPE)?le:e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===pt?E:x,Tt="ALLOWED_TAGS"in e?D({},e.ALLOWED_TAGS,mt):Bt,_t="ALLOWED_ATTR"in e?D({},e.ALLOWED_ATTR,mt):St,oe="ALLOWED_NAMESPACES"in e?D({},e.ALLOWED_NAMESPACES,E):se,Zt="ADD_URI_SAFE_ATTR"in e?D(F(te),e.ADD_URI_SAFE_ATTR,mt):te,Yt="ADD_DATA_URI_TAGS"in e?D(F(Jt),e.ADD_DATA_URI_TAGS,mt):Jt,Wt="FORBID_CONTENTS"in e?D({},e.FORBID_CONTENTS,mt):qt,It="FORBID_TAGS"in e?D({},e.FORBID_TAGS,mt):{},Mt="FORBID_ATTR"in e?D({},e.FORBID_ATTR,mt):{},Vt="USE_PROFILES"in e&&e.USE_PROFILES,Ot=!1!==e.ALLOW_ARIA_ATTR,Dt=!1!==e.ALLOW_DATA_ATTR,Ft=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=e.SAFE_FOR_TEMPLATES||!1,Pt=e.WHOLE_DOCUMENT||!1,Ut=e.RETURN_DOM||!1,$t=e.RETURN_DOM_FRAGMENT||!1,Ht=e.RETURN_TRUSTED_TYPE||!1,Qt=e.FORCE_BODY||!1,jt=!1!==e.SANITIZE_DOM,Kt=e.SANITIZE_NAMED_PROPS||!1,Gt=!1!==e.KEEP_CONTENT,Xt=e.IN_PLACE||!1,Et=e.ALLOWED_URI_REGEXP||Et,ie=e.NAMESPACE||re,e.CUSTOM_ELEMENT_HANDLING&&fe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Lt.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&fe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Lt.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Lt.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Nt&&(Dt=!1),$t&&(Ut=!0),Vt&&(Tt=D({},i(j)),_t=[],!0===Vt.html&&(D(Tt,P),D(_t,K)),!0===Vt.svg&&(D(Tt,R),D(_t,z),D(_t,X)),!0===Vt.svgFilters&&(D(Tt,Q),D(_t,z),D(_t,X)),!0===Vt.mathMl&&(D(Tt,$),D(_t,G),D(_t,X))),e.ADD_TAGS&&(Tt===Bt&&(Tt=F(Tt)),D(Tt,e.ADD_TAGS,mt)),e.ADD_ATTR&&(_t===St&&(_t=F(_t)),D(_t,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&D(Zt,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Wt===qt&&(Wt=F(Wt)),D(Wt,e.FORBID_CONTENTS,mt)),Gt&&(Tt["#text"]=!0),Pt&&D(Tt,["html","head","body"]),Tt.table&&(D(Tt,["tbody"]),delete It.tbody),g&&g(e),ue=e)},Ae=D({},["mi","mo","mn","ms","mtext"]),ge=D({},["foreignobject","desc","title","annotation-xml"]),pe=D({},["title","style","font","a","script"]),me=D({},R);D(me,Q),D(me,U);var be=D({},$);D(be,H);var ve=function(t){var e=M(t);e&&e.tagName||(e={namespaceURI:ie,tagName:"template"});var n=x(t.tagName),r=x(e.tagName);return!!oe[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===re?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===r||Ae[r]):Boolean(me[n]):t.namespaceURI===ee?e.namespaceURI===re?"math"===n:e.namespaceURI===ne?"math"===n&&ge[r]:Boolean(be[n]):t.namespaceURI===re?!(e.namespaceURI===ne&&!ge[r])&&!(e.namespaceURI===ee&&!Ae[r])&&!be[n]&&(pe[n]||!me[n]):!("application/xhtml+xml"!==pt||!oe[t.namespaceURI]))},ye=function(t){C(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=st}catch(e){t.remove()}}},we=function(t,e){try{C(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){C(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!_t[t])if(Ut||$t)try{ye(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ke=function(t){var e,n;if(Qt)t=""+t;else{var r=T(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pt&&ie===re&&(t=''+t+"");var i=ot?ot.createHTML(t):t;if(ie===re)try{e=(new A).parseFromString(i,pt)}catch(t){}if(!e||!e.documentElement){e=lt.createDocument(ie,"template",null);try{e.documentElement.innerHTML=ae?st:i}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),ie===re?ft.call(e,Pt?"html":"body")[0]:Pt?e.documentElement:o},Ce=function(t){return ut.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null,!1)},xe=function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof f)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Ee=function(e){return"object"===t(c)?e instanceof c:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Te=function(t,e,r){gt[t]&&w(gt[t],(function(t){t.call(n,e,r,ue)}))},Be=function(t){var e;if(Te("beforeSanitizeElements",t,null),xe(t))return ye(t),!0;if(L(/[\u0080-\uFFFF]/,t.nodeName))return ye(t),!0;var r=mt(t.nodeName);if(Te("uponSanitizeElement",t,{tagName:r,allowedTags:Tt}),t.hasChildNodes()&&!Ee(t.firstElementChild)&&(!Ee(t.content)||!Ee(t.content.firstElementChild))&&L(/<[/\w]/g,t.innerHTML)&&L(/<[/\w]/g,t.textContent))return ye(t),!0;if("select"===r&&L(/