/*! For license information please see et-cloud-app.bundle.js.LICENSE */ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="http://0.0.0.0:31495/",n(n.s=297)}([function(e,t,n){(function(e,n){(function(){var r="Expected a function",o="__lodash_placeholder__",i=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",c="[object Array]",s="[object Boolean]",u="[object Date]",l="[object Error]",f="[object Function]",p="[object GeneratorFunction]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",b="[object String]",y="[object Symbol]",w="[object WeakMap]",O="[object ArrayBuffer]",_="[object DataView]",j="[object Float32Array]",k="[object Float64Array]",x="[object Int8Array]",S="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",E="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,A=/\b(__p \+=) '' \+/g,L=/(__e\(.*?\)|\b__t\)) \+\n'';/g,D=/&(?:amp|lt|gt|quot|#39);/g,M=/[&<>"']/g,N=RegExp(D.source),R=RegExp(M.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,V=RegExp(q.source),Y=/^\s+/,$=/\s/,G=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Z=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,se=/($^)/,ue=/['\n\r\u2028\u2029\\]/g,le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",de="["+fe+"]",he="["+le+"]",me="\\d+",ge="[\\u2700-\\u27bf]",ve="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+fe+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ye="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",je="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ke="(?:"+ve+"|"+be+")",xe="(?:"+je+"|"+be+")",Se="(?:"+he+"|"+ye+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Se+("(?:\\u200d(?:"+[we,Oe,_e].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*"),Te="(?:"+[ge,Oe,_e].join("|")+")"+Ce,Ee="(?:"+[we+he+"?",he,Oe,_e,pe].join("|")+")",Pe=RegExp("['\u2019]","g"),Ie=RegExp(he,"g"),Ae=RegExp(ye+"(?="+ye+")|"+Ee+Ce,"g"),Le=RegExp([je+"?"+ve+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[de,je,"$"].join("|")+")",xe+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[de,je+ke,"$"].join("|")+")",je+"?"+ke+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",je+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Te].join("|"),"g"),De=RegExp("[\\u200d\\ud800-\\udfff"+le+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Re=-1,Fe={};Fe[j]=Fe[k]=Fe[x]=Fe[S]=Fe[C]=Fe[T]=Fe["[object Uint8ClampedArray]"]=Fe[E]=Fe[P]=!0,Fe[a]=Fe[c]=Fe[O]=Fe[s]=Fe[_]=Fe[u]=Fe[l]=Fe[f]=Fe[d]=Fe[h]=Fe[m]=Fe[g]=Fe[v]=Fe[b]=Fe[w]=!1;var Be={};Be[a]=Be[c]=Be[O]=Be[_]=Be[s]=Be[u]=Be[j]=Be[k]=Be[x]=Be[S]=Be[C]=Be[d]=Be[h]=Be[m]=Be[g]=Be[v]=Be[b]=Be[y]=Be[T]=Be["[object Uint8ClampedArray]"]=Be[E]=Be[P]=!0,Be[l]=Be[f]=Be[w]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,He="object"==typeof e&&e&&e.Object===Object&&e,qe="object"==typeof self&&self&&self.Object===Object&&self,Ve=He||qe||Function("return this")(),Ye=t&&!t.nodeType&&t,$e=Ye&&"object"==typeof n&&n&&!n.nodeType&&n,Ge=$e&&$e.exports===Ye,Ke=Ge&&He.process,Xe=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||Ke&&Ke.binding&&Ke.binding("util")}catch(e){}}(),Je=Xe&&Xe.isArrayBuffer,Ze=Xe&&Xe.isDate,Qe=Xe&&Xe.isMap,et=Xe&&Xe.isRegExp,tt=Xe&&Xe.isSet,nt=Xe&&Xe.isTypedArray;function rt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function lt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Lt(e,t){for(var n=e.length;n--&&yt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Mt=kt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Nt=kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Rt(e){return"\\"+ze[e]}function Ft(e){return De.test(e)}function Bt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,i=0,a=[];++n",""":'"',"'":"'"});var Gt=function e(t){var n,$=(t=null==t?Ve:Gt.defaults(Ve.Object(),t,Gt.pick(Ve,Ne))).Array,le=t.Date,fe=t.Error,pe=t.Function,de=t.Math,he=t.Object,me=t.RegExp,ge=t.String,ve=t.TypeError,be=$.prototype,ye=pe.prototype,we=he.prototype,Oe=t["__core-js_shared__"],_e=ye.toString,je=we.hasOwnProperty,ke=0,xe=(n=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Se=we.toString,Ce=_e.call(he),Te=Ve._,Ee=me("^"+_e.call(je).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=Ge?t.Buffer:void 0,De=t.Symbol,ze=t.Uint8Array,He=Ae?Ae.allocUnsafe:void 0,qe=zt(he.getPrototypeOf,he),Ye=he.create,$e=we.propertyIsEnumerable,Ke=be.splice,Xe=De?De.isConcatSpreadable:void 0,gt=De?De.iterator:void 0,kt=De?De.toStringTag:void 0,Kt=function(){try{var e=ti(he,"defineProperty");return e({},"",{}),e}catch(e){}}(),Xt=t.clearTimeout!==Ve.clearTimeout&&t.clearTimeout,Jt=le&&le.now!==Ve.Date.now&&le.now,Zt=t.setTimeout!==Ve.setTimeout&&t.setTimeout,Qt=de.ceil,en=de.floor,tn=he.getOwnPropertySymbols,nn=Ae?Ae.isBuffer:void 0,rn=t.isFinite,on=be.join,an=zt(he.keys,he),cn=de.max,sn=de.min,un=le.now,ln=t.parseInt,fn=de.random,pn=be.reverse,dn=ti(t,"DataView"),hn=ti(t,"Map"),mn=ti(t,"Promise"),gn=ti(t,"Set"),vn=ti(t,"WeakMap"),bn=ti(he,"create"),yn=vn&&new vn,wn={},On=Ti(dn),_n=Ti(hn),jn=Ti(mn),kn=Ti(gn),xn=Ti(vn),Sn=De?De.prototype:void 0,Cn=Sn?Sn.valueOf:void 0,Tn=Sn?Sn.toString:void 0;function En(e){if(Va(e)&&!Da(e)&&!(e instanceof Ln)){if(e instanceof An)return e;if(je.call(e,"__wrapped__"))return Ei(e)}return new An(e)}var Pn=function(){function e(){}return function(t){if(!qa(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function In(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Ln(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Jn(e,t,n,r,o,i){var c,l=1&t,w=2&t,I=4&t;if(n&&(c=o?n(e,r,o,i):n(e)),void 0!==c)return c;if(!qa(e))return e;var A=Da(e);if(A){if(c=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return yo(e,c)}else{var L=oi(e),D=L==f||L==p;if(Fa(e))return po(e,l);if(L==m||L==a||D&&!o){if(c=w||D?{}:ai(e),!l)return w?function(e,t){return wo(e,ri(e),t)}(e,function(e,t){return e&&wo(t,_c(t),e)}(c,e)):function(e,t){return wo(e,ni(e),t)}(e,$n(c,e))}else{if(!Be[L])return o?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case O:return ho(e);case s:case u:return new r(+e);case _:return function(e,t){var n=t?ho(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case k:case x:case S:case C:case T:case"[object Uint8ClampedArray]":case E:case P:return mo(e,n);case d:return new r;case h:case b:return new r(e);case g:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return new r;case y:return o=e,Cn?he(Cn.call(o)):{}}var o}(e,L,l)}}i||(i=new Fn);var M=i.get(e);if(M)return M;i.set(e,c),Xa(e)?e.forEach((function(r){c.add(Jn(r,t,n,r,e,i))})):Ya(e)&&e.forEach((function(r,o){c.set(o,Jn(r,t,n,o,e,i))}));var N=A?void 0:(I?w?Go:$o:w?_c:Oc)(e);return it(N||e,(function(r,o){N&&(r=e[o=r]),qn(c,o,Jn(r,t,n,o,e,i))})),c}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=he(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new ve(r);return Oi((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var o=-1,i=ut,a=!0,c=e.length,s=[],u=t.length;if(!c)return s;n&&(t=ft(t,Et(n))),r?(i=lt,a=!1):t.length>=200&&(i=It,a=!1,t=new Rn(t));e:for(;++o-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=Vn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Nn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(hn||Mn),string:new Dn}},Nn.prototype.delete=function(e){var t=Qo(this,e).delete(e);return this.size-=t?1:0,t},Nn.prototype.get=function(e){return Qo(this,e).get(e)},Nn.prototype.has=function(e){return Qo(this,e).has(e)},Nn.prototype.set=function(e,t){var n=Qo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Rn.prototype.add=Rn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(e,t),this.size=n.size,this};var tr=jo(ur),nr=jo(lr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function or(e,t,n){for(var r=-1,o=e.length;++r0&&n(c)?t>1?ar(c,t-1,n,r,o):pt(o,c):r||(o[o.length]=c)}return o}var cr=ko(),sr=ko(!0);function ur(e,t){return e&&cr(e,t,Oc)}function lr(e,t){return e&&sr(e,t,Oc)}function fr(e,t){return st(t,(function(t){return Ua(e[t])}))}function pr(e,t){for(var n=0,r=(t=so(t,e)).length;null!=e&&nt}function gr(e,t){return null!=e&&je.call(e,t)}function vr(e,t){return null!=e&&t in he(e)}function br(e,t,n){for(var r=n?lt:ut,o=e[0].length,i=e.length,a=i,c=$(i),s=1/0,u=[];a--;){var l=e[a];a&&t&&(l=ft(l,Et(t))),s=sn(l.length,s),c[a]=!n&&(t||o>=120&&l.length>=120)?new Rn(a&&l):void 0}l=e[0];var f=-1,p=c[0];e:for(;++f=c)return s;var u=n[r];return s*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)c!==e&&Ke.call(c,s,1),Ke.call(e,s,1);return e}function Nr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;si(o)?Ke.call(e,o,1):eo(e,o)}}return e}function Rr(e,t){return e+en(fn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Br(e,t){return _i(gi(e,t,$c),e+"")}function zr(e){return zn(Pc(e))}function Ur(e,t){var n=Pc(e);return xi(n,Xn(t,0,n.length))}function Wr(e,t,n,r){if(!qa(e))return e;for(var o=-1,i=(t=so(t,e)).length,a=i-1,c=e;null!=c&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=$(o);++r>>1,a=e[i];null!==a&&!Za(a)&&(n?a<=t:a=200){var u=t?null:Bo(e);if(u)return Wt(u);a=!1,o=It,s=new Rn}else s=t?[]:c;e:for(;++r=r?e:Yr(e,t,n)}var fo=Xt||function(e){return Ve.clearTimeout(e)};function po(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function ho(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function mo(e,t){var n=t?ho(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function go(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Za(e),a=void 0!==t,c=null===t,s=t==t,u=Za(t);if(!c&&!u&&!i&&e>t||i&&a&&s&&!c&&!u||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!u&&e1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&ui(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=he(t);++r-1?o[i?t[a]:a]:void 0}}function Eo(e){return Yo((function(t){var n=t.length,o=n,i=An.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new ve(r);if(i&&!c&&"wrapper"==Xo(a))var c=new An([],!0)}for(o=c?o:n;++o1&&b.reverse(),l&&sc))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,p=!0,d=2&n?new Rn:void 0;for(i.set(e,t),i.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(G,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return it(i,(function(n){var r="_."+n[0];t&n[1]&&!ut(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(K);return t?t[1].split(X):[]}(r),n)))}function ki(e){var t=0,n=0;return function(){var r=un(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function xi(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ki(e,n)}));function na(e){var t=En(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var oa=Yo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Kn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Ln&&si(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[o],thisArg:void 0}),new An(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ia=Oo((function(e,t,n){je.call(e,n)?++e[n]:Gn(e,n,1)}));var aa=To(Li),ca=To(Di);function sa(e,t){return(Da(e)?it:tr)(e,Zo(t,3))}function ua(e,t){return(Da(e)?at:nr)(e,Zo(t,3))}var la=Oo((function(e,t,n){je.call(e,n)?e[n].push(t):Gn(e,n,[t])}));var fa=Br((function(e,t,n){var r=-1,o="function"==typeof t,i=Na(e)?$(e.length):[];return tr(e,(function(e){i[++r]=o?rt(t,e,n):yr(e,t,n)})),i})),pa=Oo((function(e,t,n){Gn(e,n,t)}));function da(e,t){return(Da(e)?ft:Tr)(e,Zo(t,3))}var ha=Oo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ma=Br((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ui(e,t[0],t[1])?t=[]:n>2&&ui(t[0],t[1],t[2])&&(t=[t[0]]),Lr(e,ar(t,1),[])})),ga=Jt||function(){return Ve.Date.now()};function va(e,t,n){return t=n?void 0:t,Uo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ba(e,t){var n;if("function"!=typeof t)throw new ve(r);return e=oc(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ya=Br((function(e,t,n){var r=1;if(n.length){var o=Ut(n,Jo(ya));r|=32}return Uo(e,r,t,n,o)})),wa=Br((function(e,t,n){var r=3;if(n.length){var o=Ut(n,Jo(wa));r|=32}return Uo(t,r,e,n,o)}));function Oa(e,t,n){var o,i,a,c,s,u,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new ve(r);function h(t){var n=o,r=i;return o=i=void 0,l=t,c=e.apply(r,n)}function m(e){return l=e,s=Oi(v,t),f?h(e):c}function g(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=a}function v(){var e=ga();if(g(e))return b(e);s=Oi(v,function(e){var n=t-(e-u);return p?sn(n,a-(e-l)):n}(e))}function b(e){return s=void 0,d&&o?h(e):(o=i=void 0,c)}function y(){var e=ga(),n=g(e);if(o=arguments,i=this,u=e,n){if(void 0===s)return m(u);if(p)return fo(s),s=Oi(v,t),h(u)}return void 0===s&&(s=Oi(v,t)),c}return t=ac(t)||0,qa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?cn(ac(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&fo(s),l=0,o=u=i=s=void 0},y.flush=function(){return void 0===s?c:b(ga())},y}var _a=Br((function(e,t){return Qn(e,1,t)})),ja=Br((function(e,t,n){return Qn(e,ac(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ka.Cache||Nn),n}function xa(e){if("function"!=typeof e)throw new ve(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Nn;var Sa=uo((function(e,t){var n=(t=1==t.length&&Da(t[0])?ft(t[0],Et(Zo())):ft(ar(t,1),Et(Zo()))).length;return Br((function(r){for(var o=-1,i=sn(r.length,n);++o=t})),La=wr(function(){return arguments}())?wr:function(e){return Va(e)&&je.call(e,"callee")&&!$e.call(e,"callee")},Da=$.isArray,Ma=Je?Et(Je):function(e){return Va(e)&&hr(e)==O};function Na(e){return null!=e&&Ha(e.length)&&!Ua(e)}function Ra(e){return Va(e)&&Na(e)}var Fa=nn||as,Ba=Ze?Et(Ze):function(e){return Va(e)&&hr(e)==u};function za(e){if(!Va(e))return!1;var t=hr(e);return t==l||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ga(e)}function Ua(e){if(!qa(e))return!1;var t=hr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Wa(e){return"number"==typeof e&&e==oc(e)}function Ha(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Va(e){return null!=e&&"object"==typeof e}var Ya=Qe?Et(Qe):function(e){return Va(e)&&oi(e)==d};function $a(e){return"number"==typeof e||Va(e)&&hr(e)==h}function Ga(e){if(!Va(e)||hr(e)!=m)return!1;var t=qe(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_e.call(n)==Ce}var Ka=et?Et(et):function(e){return Va(e)&&hr(e)==g};var Xa=tt?Et(tt):function(e){return Va(e)&&oi(e)==v};function Ja(e){return"string"==typeof e||!Da(e)&&Va(e)&&hr(e)==b}function Za(e){return"symbol"==typeof e||Va(e)&&hr(e)==y}var Qa=nt?Et(nt):function(e){return Va(e)&&Ha(e.length)&&!!Fe[hr(e)]};var ec=No(Cr),tc=No((function(e,t){return e<=t}));function nc(e){if(!e)return[];if(Na(e))return Ja(e)?Vt(e):yo(e);if(gt&&e[gt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[gt]());var t=oi(e);return(t==d?Bt:t==v?Wt:Pc)(e)}function rc(e){return e?(e=ac(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function oc(e){var t=rc(e),n=t%1;return t==t?n?t-n:t:0}function ic(e){return e?Xn(oc(e),0,4294967295):0}function ac(e){if("number"==typeof e)return e;if(Za(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Tt(e);var n=re.test(e);return n||ie.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function cc(e){return wo(e,_c(e))}function sc(e){return null==e?"":Zr(e)}var uc=_o((function(e,t){if(di(t)||Na(t))wo(t,Oc(t),e);else for(var n in t)je.call(t,n)&&qn(e,n,t[n])})),lc=_o((function(e,t){wo(t,_c(t),e)})),fc=_o((function(e,t,n,r){wo(t,_c(t),e,r)})),pc=_o((function(e,t,n,r){wo(t,Oc(t),e,r)})),dc=Yo(Kn);var hc=Br((function(e,t){e=he(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&ui(t[0],t[1],o)&&(r=1);++n1),t})),wo(e,Go(e),n),r&&(n=Jn(n,7,qo));for(var o=t.length;o--;)eo(n,t[o]);return n}));var Sc=Yo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return vc(e,n)}))}(e,t)}));function Cc(e,t){if(null==e)return{};var n=ft(Go(e),(function(e){return[e]}));return t=Zo(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var Tc=zo(Oc),Ec=zo(_c);function Pc(e){return null==e?[]:Pt(e,Oc(e))}var Ic=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Ac(t):t)}));function Ac(e){return zc(sc(e).toLowerCase())}function Lc(e){return(e=sc(e))&&e.replace(ce,Mt).replace(Ie,"")}var Dc=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Mc=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Nc=xo("toLowerCase");var Rc=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fc=So((function(e,t,n){return e+(n?" ":"")+zc(t)}));var Bc=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),zc=xo("toUpperCase");function Uc(e,t,n){return e=sc(e),void 0===(t=n?void 0:t)?function(e){return Me.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(J)||[]}(e):e.match(t)||[]}var Wc=Br((function(e,t){try{return rt(e,void 0,t)}catch(e){return za(e)?e:new fe(e)}})),Hc=Yo((function(e,t){return it(t,(function(t){t=Ci(t),Gn(e,t,ya(e[t],e))})),e}));function qc(e){return function(){return e}}var Vc=Eo(),Yc=Eo(!0);function $c(e){return e}function Gc(e){return kr("function"==typeof e?e:Jn(e,1))}var Kc=Br((function(e,t){return function(n){return yr(n,e,t)}})),Xc=Br((function(e,t){return function(n){return yr(e,n,t)}}));function Jc(e,t,n){var r=Oc(t),o=fr(t,r);null!=n||qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=fr(t,Oc(t)));var i=!(qa(n)&&"chain"in n&&!n.chain),a=Ua(e);return it(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Zc(){}var Qc=Lo(ft),es=Lo(ct),ts=Lo(mt);function ns(e){return li(e)?jt(Ci(e)):function(e){return function(t){return pr(t,e)}}(e)}var rs=Mo(),os=Mo(!0);function is(){return[]}function as(){return!1}var cs=Ao((function(e,t){return e+t}),0),ss=Fo("ceil"),us=Ao((function(e,t){return e/t}),1),ls=Fo("floor");var fs,ps=Ao((function(e,t){return e*t}),1),ds=Fo("round"),hs=Ao((function(e,t){return e-t}),0);return En.after=function(e,t){if("function"!=typeof t)throw new ve(r);return e=oc(e),function(){if(--e<1)return t.apply(this,arguments)}},En.ary=va,En.assign=uc,En.assignIn=lc,En.assignInWith=fc,En.assignWith=pc,En.at=dc,En.before=ba,En.bind=ya,En.bindAll=Hc,En.bindKey=wa,En.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},En.chain=na,En.chunk=function(e,t,n){t=(n?ui(e,t,n):void 0===t)?1:cn(oc(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=$(Qt(r/t));oo?0:o+n),(r=void 0===r||r>o?o:oc(r))<0&&(r+=o),r=n>r?0:ic(r);n>>0)?(e=sc(e))&&("string"==typeof t||null!=t&&!Ka(t))&&!(t=Zr(t))&&Ft(e)?lo(Vt(e),0,n):e.split(t,n):[]},En.spread=function(e,t){if("function"!=typeof e)throw new ve(r);return t=null==t?0:cn(oc(t),0),Br((function(n){var r=n[t],o=lo(n,0,t);return r&&pt(o,r),rt(e,this,o)}))},En.tail=function(e){var t=null==e?0:e.length;return t?Yr(e,1,t):[]},En.take=function(e,t,n){return e&&e.length?Yr(e,0,(t=n||void 0===t?1:oc(t))<0?0:t):[]},En.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Yr(e,(t=r-(t=n||void 0===t?1:oc(t)))<0?0:t,r):[]},En.takeRightWhile=function(e,t){return e&&e.length?no(e,Zo(t,3),!1,!0):[]},En.takeWhile=function(e,t){return e&&e.length?no(e,Zo(t,3)):[]},En.tap=function(e,t){return t(e),e},En.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new ve(r);return qa(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Oa(e,t,{leading:o,maxWait:t,trailing:i})},En.thru=ra,En.toArray=nc,En.toPairs=Tc,En.toPairsIn=Ec,En.toPath=function(e){return Da(e)?ft(e,Ci):Za(e)?[e]:yo(Si(sc(e)))},En.toPlainObject=cc,En.transform=function(e,t,n){var r=Da(e),o=r||Fa(e)||Qa(e);if(t=Zo(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:qa(e)&&Ua(i)?Pn(qe(e)):{}}return(o?it:ur)(e,(function(e,r,o){return t(n,e,r,o)})),n},En.unary=function(e){return va(e,1)},En.union=Vi,En.unionBy=Yi,En.unionWith=$i,En.uniq=function(e){return e&&e.length?Qr(e):[]},En.uniqBy=function(e,t){return e&&e.length?Qr(e,Zo(t,2)):[]},En.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qr(e,void 0,t):[]},En.unset=function(e,t){return null==e||eo(e,t)},En.unzip=Gi,En.unzipWith=Ki,En.update=function(e,t,n){return null==e?e:to(e,t,co(n))},En.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:to(e,t,co(n),r)},En.values=Pc,En.valuesIn=function(e){return null==e?[]:Pt(e,_c(e))},En.without=Xi,En.words=Uc,En.wrap=function(e,t){return Ca(co(t),e)},En.xor=Ji,En.xorBy=Zi,En.xorWith=Qi,En.zip=ea,En.zipObject=function(e,t){return io(e||[],t||[],qn)},En.zipObjectDeep=function(e,t){return io(e||[],t||[],Wr)},En.zipWith=ta,En.entries=Tc,En.entriesIn=Ec,En.extend=lc,En.extendWith=fc,Jc(En,En),En.add=cs,En.attempt=Wc,En.camelCase=Ic,En.capitalize=Ac,En.ceil=ss,En.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ac(n))==n?n:0),void 0!==t&&(t=(t=ac(t))==t?t:0),Xn(ac(e),t,n)},En.clone=function(e){return Jn(e,4)},En.cloneDeep=function(e){return Jn(e,5)},En.cloneDeepWith=function(e,t){return Jn(e,5,t="function"==typeof t?t:void 0)},En.cloneWith=function(e,t){return Jn(e,4,t="function"==typeof t?t:void 0)},En.conformsTo=function(e,t){return null==t||Zn(e,t,Oc(t))},En.deburr=Lc,En.defaultTo=function(e,t){return null==e||e!=e?t:e},En.divide=us,En.endsWith=function(e,t,n){e=sc(e),t=Zr(t);var r=e.length,o=n=void 0===n?r:Xn(oc(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},En.eq=Pa,En.escape=function(e){return(e=sc(e))&&R.test(e)?e.replace(M,Nt):e},En.escapeRegExp=function(e){return(e=sc(e))&&V.test(e)?e.replace(q,"\\$&"):e},En.every=function(e,t,n){var r=Da(e)?ct:rr;return n&&ui(e,t,n)&&(t=void 0),r(e,Zo(t,3))},En.find=aa,En.findIndex=Li,En.findKey=function(e,t){return vt(e,Zo(t,3),ur)},En.findLast=ca,En.findLastIndex=Di,En.findLastKey=function(e,t){return vt(e,Zo(t,3),lr)},En.floor=ls,En.forEach=sa,En.forEachRight=ua,En.forIn=function(e,t){return null==e?e:cr(e,Zo(t,3),_c)},En.forInRight=function(e,t){return null==e?e:sr(e,Zo(t,3),_c)},En.forOwn=function(e,t){return e&&ur(e,Zo(t,3))},En.forOwnRight=function(e,t){return e&&lr(e,Zo(t,3))},En.get=gc,En.gt=Ia,En.gte=Aa,En.has=function(e,t){return null!=e&&ii(e,t,gr)},En.hasIn=vc,En.head=Ni,En.identity=$c,En.includes=function(e,t,n,r){e=Na(e)?e:Pc(e),n=n&&!r?oc(n):0;var o=e.length;return n<0&&(n=cn(o+n,0)),Ja(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&yt(e,t,n)>-1},En.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:oc(n);return o<0&&(o=cn(r+o,0)),yt(e,t,o)},En.inRange=function(e,t,n){return t=rc(t),void 0===n?(n=t,t=0):n=rc(n),function(e,t,n){return e>=sn(t,n)&&e=-9007199254740991&&e<=9007199254740991},En.isSet=Xa,En.isString=Ja,En.isSymbol=Za,En.isTypedArray=Qa,En.isUndefined=function(e){return void 0===e},En.isWeakMap=function(e){return Va(e)&&oi(e)==w},En.isWeakSet=function(e){return Va(e)&&"[object WeakSet]"==hr(e)},En.join=function(e,t){return null==e?"":on.call(e,t)},En.kebabCase=Dc,En.last=zi,En.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=oc(n))<0?cn(r+o,0):sn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):bt(e,Ot,o,!0)},En.lowerCase=Mc,En.lowerFirst=Nc,En.lt=ec,En.lte=tc,En.max=function(e){return e&&e.length?or(e,$c,mr):void 0},En.maxBy=function(e,t){return e&&e.length?or(e,Zo(t,2),mr):void 0},En.mean=function(e){return _t(e,$c)},En.meanBy=function(e,t){return _t(e,Zo(t,2))},En.min=function(e){return e&&e.length?or(e,$c,Cr):void 0},En.minBy=function(e,t){return e&&e.length?or(e,Zo(t,2),Cr):void 0},En.stubArray=is,En.stubFalse=as,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=ps,En.nth=function(e,t){return e&&e.length?Ar(e,oc(t)):void 0},En.noConflict=function(){return Ve._===this&&(Ve._=Te),this},En.noop=Zc,En.now=ga,En.pad=function(e,t,n){e=sc(e);var r=(t=oc(t))?qt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(en(o),n)+e+Do(Qt(o),n)},En.padEnd=function(e,t,n){e=sc(e);var r=(t=oc(t))?qt(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=fn();return sn(e+o*(t-e+Ue("1e-"+((o+"").length-1))),t)}return Rr(e,t)},En.reduce=function(e,t,n){var r=Da(e)?dt:xt,o=arguments.length<3;return r(e,Zo(t,4),n,o,tr)},En.reduceRight=function(e,t,n){var r=Da(e)?ht:xt,o=arguments.length<3;return r(e,Zo(t,4),n,o,nr)},En.repeat=function(e,t,n){return t=(n?ui(e,t,n):void 0===t)?1:oc(t),Fr(sc(e),t)},En.replace=function(){var e=arguments,t=sc(e[0]);return e.length<3?t:t.replace(e[1],e[2])},En.result=function(e,t,n){var r=-1,o=(t=so(t,e)).length;for(o||(o=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=sn(e,4294967295);e-=4294967295;for(var o=Ct(r,t=Zo(t));++n=i)return e;var c=n-qt(r);if(c<1)return r;var s=a?lo(a,0,c).join(""):e.slice(0,c);if(void 0===o)return s+r;if(a&&(c+=s.length-c),Ka(o)){if(e.slice(c).search(o)){var u,l=s;for(o.global||(o=me(o.source,sc(te.exec(o))+"g")),o.lastIndex=0;u=o.exec(l);)var f=u.index;s=s.slice(0,void 0===f?c:f)}}else if(e.indexOf(Zr(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},En.unescape=function(e){return(e=sc(e))&&N.test(e)?e.replace(D,$t):e},En.uniqueId=function(e){var t=++ke;return sc(e)+t},En.upperCase=Bc,En.upperFirst=zc,En.each=sa,En.eachRight=ua,En.first=Ni,Jc(En,(fs={},ur(En,(function(e,t){je.call(En.prototype,t)||(fs[t]=e)})),fs),{chain:!1}),En.VERSION="4.17.21",it(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){En[e].placeholder=En})),it(["drop","take"],(function(e,t){Ln.prototype[e]=function(n){n=void 0===n?1:cn(oc(n),0);var r=this.__filtered__&&!t?new Ln(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Ln.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),it(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Ln.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),it(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Ln.prototype[e]=function(){return this[n](1).value()[0]}})),it(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Ln.prototype[e]=function(){return this.__filtered__?new Ln(this):this[n](1)}})),Ln.prototype.compact=function(){return this.filter($c)},Ln.prototype.find=function(e){return this.filter(e).head()},Ln.prototype.findLast=function(e){return this.reverse().find(e)},Ln.prototype.invokeMap=Br((function(e,t){return"function"==typeof e?new Ln(this):this.map((function(n){return yr(n,e,t)}))})),Ln.prototype.reject=function(e){return this.filter(xa(Zo(e)))},Ln.prototype.slice=function(e,t){e=oc(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ln(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=oc(t))<0?n.dropRight(-t):n.take(t-e)),n)},Ln.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295)},ur(Ln.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=En[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(En.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof Ln,s=a[0],u=c||Da(t),l=function(e){var t=o.apply(En,pt([e],a));return r&&f?t[0]:t};u&&n&&"function"==typeof s&&1!=s.length&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=c&&!p;if(!i&&u){t=h?t:new Ln(this);var m=e.apply(t,a);return m.__actions__.push({func:ra,args:[l],thisArg:void 0}),new An(m,f)}return d&&h?e.apply(this,a):(m=this.thru(l),d?r?m.value()[0]:m.value():m)})})),it(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);En.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Da(o)?o:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),ur(Ln.prototype,(function(e,t){var n=En[t];if(n){var r=n.name+"";je.call(wn,r)||(wn[r]=[]),wn[r].push({name:t,func:n})}})),wn[Po(void 0,2).name]=[{name:"wrapper",func:void 0}],Ln.prototype.clone=function(){var e=new Ln(this.__wrapped__);return e.__actions__=yo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yo(this.__views__),e},Ln.prototype.reverse=function(){if(this.__filtered__){var e=new Ln(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ln.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(e){for(var t,n=this;n instanceof In;){var r=Ei(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},En.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ln){var t=e;return this.__actions__.length&&(t=new Ln(this)),(t=t.reverse()).__actions__.push({func:ra,args:[qi],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(qi)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return ro(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,gt&&(En.prototype[gt]=function(){return this}),En}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ve._=Gt,define((function(){return Gt}))):$e?(($e.exports=Gt)._=Gt,Ye._=Gt):Ve._=Gt}).call(this)}).call(this,n(21),n(39)(e))},function(e,t){e.exports=React},function(e,t,n){"use strict";n.r(t),n.d(t,"string",(function(){return i})),n.d(t,"path",(function(){return a})),n.d(t,"signal",(function(){return c})),n.d(t,"signals",(function(){return s})),n.d(t,"sequences",(function(){return u})),n.d(t,"state",(function(){return l})),n.d(t,"module",(function(){return e})),n.d(t,"moduleState",(function(){return f})),n.d(t,"moduleSequences",(function(){return p})),n.d(t,"props",(function(){return d}));var r=n(9),o=n(4);n.d(t,"createTemplateTag",(function(){return r.e})),n.d(t,"extractValueWithPath",(function(){return r.g})),n.d(t,"resolveObject",(function(){return r.i})),n.d(t,"ResolveValue",(function(){return r.c})),n.d(t,"Tag",(function(){return r.d}));var i=Object(r.e)("string",(function(e){return e})),a=Object(r.e)("path",(function(e){return e})),c=Object(r.e)("signal",(function(e,t){return Object(o.a)("tags.signal",'use the "sequences" tag instead'),t.controller.getSequence(e)})),s=Object(r.e)("signals",(function(e,t){return Object(o.a)("tags.signals",'use the "sequences" tag instead'),t.controller.getSequences(e)})),u=Object(r.e)("sequences",(function(e,t){return t.controller.getSequence(e)||t.controller.getSequences(e)})),l=Object(r.e)("state",(function(e,t){return t.controller.getState(e)})),f=(e=Object(r.e)("module",(function(e,t){return Object(o.a)("tags.module",'use the "moduleState" tag instead'),t.controller.getState(Object(o.o)(e,t))})),Object(r.e)("moduleState",(function(e,t){return t.controller.getState(Object(o.o)(e,t))}))),p=Object(r.e)("moduleSequences",(function(e,t){return t.controller.getSequence(Object(o.o)(e,t))||t.controller.getSequences(Object(o.o)(e,t))})),d=Object(r.e)("props",(function(e,t){return Object(r.g)(t.props,e)}))},function(e,t,n){"use strict";n.r(t),n.d(t,"props",(function(){return Y})),n.d(t,"path",(function(){return $})),n.d(t,"state",(function(){return G})),n.d(t,"string",(function(){return K})),n.d(t,"sequences",(function(){return X})),n.d(t,"computed",(function(){return J})),n.d(t,"moduleState",(function(){return Z})),n.d(t,"moduleSequences",(function(){return Q})),n.d(t,"moduleComputed",(function(){return ee})),n.d(t,"ModuleClass",(function(){return h})),n.d(t,"ControllerClass",(function(){return E})),n.d(t,"ProviderClass",(function(){return g.a})),n.d(t,"BaseControllerClass",(function(){return j})),n.d(t,"ChainSequenceFactory",(function(){return F})),n.d(t,"ChainSequenceWithPropsFactory",(function(){return B})),n.d(t,"sequence",(function(){return c.j})),n.d(t,"parallel",(function(){return c.h})),n.d(t,"createTemplateTag",(function(){return c.e})),n.d(t,"extractValueWithPath",(function(){return c.g})),n.d(t,"resolveObject",(function(){return c.i})),n.d(t,"ResolveValue",(function(){return c.c})),n.d(t,"Tag",(function(){return c.d})),n.d(t,"Controller",(function(){return te})),n.d(t,"UniversalController",(function(){return ne})),n.d(t,"UniversalApp",(function(){return re})),n.d(t,"Module",(function(){return oe})),n.d(t,"CerebralError",(function(){return W})),n.d(t,"Provider",(function(){return g.a})),n.d(t,"Compute",(function(){return s.c})),n.d(t,"Reaction",(function(){return p})),n.d(t,"View",(function(){return q})),n.d(t,"createDummyController",(function(){return o.d})),n.d(t,"throwError",(function(){return o.y})),n.d(t,"default",(function(){return ae}));var r=n(2),o=n(4),i=function(){function e(e,t){for(var n=0;nt.rawId?1:-1}))}},{key:"getUniqueEntities",value:function(e){return Object(o.g)(e,this.map).reduce((function(e,t){return(t.entities||[]).reduce((function(e,t){return-1===e.indexOf(t)?e.concat(t):e}),e)}),[]).sort((function(e,t){return e.rawId>t.rawId?1:-1}))}}]),e}(),c=n(9),s=n(14),u=n(55),l=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];n=Object(o.h)(n),Object(o.a)("module.*","use the new STORE provider, store.set(state.isAwesome, true)");for(var r=this.context.execution.name.split("."),i=r.splice(0,r.length-1),a=arguments.length,c=Array(a>1?a-1:0),s=1;s2&&void 0!==arguments[2]?arguments[2]:{};!this.devtools||Object(o.v)(r)&&Object(o.w)(r)||(console.warn('You passed an invalid payload to sequence "'+e+'". Only serializable payloads can be passed to a sequence. The payload has been ignored. This is the object:',r),r={}),this.devtools&&(r=Object.keys(r).reduce((function(t,i){return Object(o.w)(r[i],n.devtools.allowedTypes)?(t[i]=Object(o.k)(r[i]),t):(console.warn('You passed an invalid payload to sequence "'+e+'", on key "'+i+'". Only serializable values like Object, Array, String, Number and Boolean can be passed in. Also these special value types:',n.devtools.allowedTypes),t)}),{}));var i=function(e){if(e){var t=Object(o.h)(e.execution.name).reduce((function(e,t,n){return e.currentModule.catch&&(e.catchingModule=e.currentModule),e.currentModule=e.currentModule.modules[t],e}),{currentModule:n.module,catchingModule:null});if(t.catchingModule){var r=!0,i=!1,a=void 0;try{for(var c,s=t.catchingModule.catch[Symbol.iterator]();!(r=(c=s.next()).done);r=!0){var u=O(c.value,2),l=u[0],f=u[1];if(e instanceof l)return n.runSequence("catch",f,e.payload),void(n.throwToConsole&&setTimeout((function(){console.log('Cerebral is handling error "'+e.name+": "+e.message+'" thrown by sequence "'+e.execution.name+'". Check debugger for more information.')})))}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}}if(!n.noRethrow){if(!e.execution.isAsync)throw e;setTimeout((function(){throw e}))}}};if(this.returnSequencePromise)return this.run(e,t,r).catch(i);this.run(e,t,r,i)}},{key:"getSequence",value:function(e){var t=Object(o.h)(e),n=t.pop(),r=t.reduce((function(e,t){return e?e.modules[t]:void 0}),this.module),i=r&&r.sequences[n];if(i)return i&&i.run}},{key:"getSequences",value:function(e){var t=Object(o.h)(e).reduce((function(e,t){return e?e.modules[t]:void 0}),this.module),n=t&&t.sequences;if(n){var r={};for(var i in n)r[i]=n[i].run;return r}}},{key:"addModule",value:function(e,t){var n=Object(o.h)(e),r=n.pop(),i=Object(o.m)(n,this.module),a=t instanceof h?t.create(this,Object(o.h)(e)):new h(t).create(this,Object(o.h)(e));i.modules[r]=a,a.providers&&Object.assign(this.contextProviders,a.providers),this.emit("moduleAdded",e.split("."),a),this.flush()}},{key:"removeModule",value:function(e){var t=this;if(!e)return console.warn("Controller.removeModule requires a Module Path"),null;var n=Object(o.h)(e),r=n.pop(),i=Object(o.m)(n,this.module),a=i.modules[r];a.providers&&Object.keys(a.providers).forEach((function(e){delete t.contextProviders[e]})),delete i.modules[r],this.emit("moduleRemoved",Object(o.h)(e),a),this.flush()}}]),t}(c.f),k=n(104),x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2];e.length?e.reduce((function(i,a,c){if(c===e.length-1){Array.isArray(i)||Object(o.v)(i)||Object(o.y)('The path "'+e.join(".")+'" is invalid. Path: "'+e.slice(0,e.length-1).join(".")+'" is type of "'+(null===i?"null":void 0===i?"undefined":x(i))+'"');var s=i[a];t(i[a],i,a),(i[a]!==s||Object(o.s)(i[a])&&Object(o.s)(s))&&n.changedPaths.push({path:e,forceChildPathUpdates:r})}else i[a]||(i[a]={});return i[a]}),this.state):t(this.state,this,"state")}},{key:"checkForComputed",value:function(e){var t=e.reduce((function(e,t){return e[t]}),this.state);if(t instanceof s.a&&Object(o.y)('You are trying to replace a computed value on path "'+e.join(".")+'", but that is not allowed'),Object(o.v)(t)){!function e(t,n){Object.keys(t).forEach((function(r){t[r]instanceof s.a?Object(o.y)('You are trying to replace a computed value on path "'+n.join(".")+'", but that is not allowed'):Object(o.v)(t[r])&&e(t[r],n.concat(r))}))}(t,e)}}},{key:"verifyValue",value:function(e,t){this.devtools&&(this.checkForComputed(t),Object(o.w)(e,this.devtools.allowedTypes)||Object(o.y)('You are passing a non serializable value into the state tree on path "'+t.join(".")+'"'),Object(o.k)(e),this.devtools.warnStateProps&&Object(o.b)(e))}},{key:"verifyValues",value:function(e,t){var n=this;this.devtools&&e.forEach((function(e){n.verifyValue(e,t)}))}},{key:"emitMutationEvent",value:function(e,t,n){for(var r=arguments.length,o=Array(r>3?r-3:0),i=3;i0&&void 0!==arguments[0]?arguments[0]:[];return e.reduce((function(t,n,r){return t instanceof s.b?t:t instanceof s.a?new s.b(t,e.slice(r)):t?t[n]:void 0}),this.state)}},{key:"set",value:function(e,t){this.verifyValue(t,e),this.updateIn(e,(function(e,n,r){n[r]=t}),!0),this.emitMutationEvent("set",e,!0,t)}},{key:"toggle",value:function(e){this.updateIn(e,(function(e,t,n){t[n]=!e})),this.emitMutationEvent("toggle",e,!1)}},{key:"push",value:function(e,t){this.verifyValue(t,e),this.updateIn(e,(function(e){e.push(t)})),this.emitMutationEvent("push",e,t,!1)}},{key:"merge",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:1;if(!Number.isInteger(t))throw new Error("Cerebral state.increment: you must increment with integer values.");this.updateIn(e,(function(e,n,r){if(!Number.isInteger(e))throw new Error("Cerebral state.increment: you must increment integer values.");n[r]=e+t})),this.emitMutationEvent("increment",e,!1,t)}}]),t}(k.a),T=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=this.createContext(t),r=e.getValue(n);return Object(o.t)(r)?r.getValue(t):r}},{key:"createContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.length?t.join(".")+".":"";return{props:e,controller:this,execution:{name:n}}}},{key:"createDependencyMap",value:function(e,t,n){var r=this,i=this.createContext(t,n);return e.reduce((function(e,n){return n instanceof c.d?n.getTags(i).reduce((function(e,n){if("state"===n.type||"moduleState"===n.type){var a=n.getValue(i);if(Object(o.t)(a))return a.getValue(t),Object.assign(e,a.getDependencyMap());var c=n.getPath(i);e[Object(o.i)(c,r.getState(c))]=!0}return e}),e):e}),{})}}]),t}(j),P=function(){function e(e,t){for(var n=0;nwindow.CEREBRAL_STATE = "+e+"<\/script>"}},{key:"runSequence",value:function(e,t){var n=void 0;if(Array.isArray(e))n=this.run("UniversalController.run",e,t);else if("string"==typeof e){var r=Object(o.h)(e),i=r.pop(),a=Object(o.m)(r,this.module),c=a&&a.sequences[i];n=this.run(e,c.sequence,t)}else Object(o.y)("Sequence must be a sequence-path or an array of action.");return n}},{key:"setState",value:function(e,t){this.model.set(Object(o.h)(e),t),this.flush(!0)}}]),t}(E),L=n(46),D=(I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}I(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),M=function(){function e(e){this.sequenceArray=e}return e.prototype.action=function(){for(var t=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:"";z(this,t);var n=U(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),U(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(e).stack,writable:!0}),n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(function(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}(Error))),H=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=Object.keys(this.dependencies).reduce((function(r,i){var a=t.dependencies[i],c=a.getValue(e);if(Object(o.t)(c)){var s=a.getPath(e);t.computedWithProps[s]?r[i]=t.computedWithProps[s].getValue(n):r[i]=c.getValue(n)}else r[i]=c;return r}),{});return this.controller.devtools&&this.controller.devtools.bigComponentsWarning&&!this._hasWarnedBigComponent&&Object.keys(this.dependencies).length>=this.controller.devtools.bigComponentsWarning&&(console.warn("Component named "+this._displayName+" has a lot of dependencies, consider refactoring or adjust this option in devtools"),this._hasWarnedBigComponent=!0),this.mergeProps?this.mergeProps(i,n,(function(t){t instanceof c.d||Object(o.y)("You are not passing a tag to the mergeProp get function");var r=t.getValue(e);return Object(o.t)(r)?r.getValue(n):r})):(i.get=this.createDynamicGetter(n,e),i.reaction=this.createReaction,Object.assign({},r?n:{},i))}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments[2],r=this.controller.createContext(e),o=this.getProps(r,e,n);this.executedCount++,this.controller.devtools&&this.controller.devtools.sendWatchMap([],[],0,0);var i=t(o);return this.dynamicDependencies.length&&this.update(e),i}}]),t}(u.a),V=r;var Y=V.props,$=V.path,G=V.state,K=V.string,X=V.sequences,J=V.computed,Z=V.moduleState,Q=V.moduleSequences,ee=V.moduleComputed;function te(e,t){return Object(o.a)("Controller","Use App default import instead"),new E(e,t)}function ne(e,t){return Object(o.a)("UniversalController","Use UniversalApp import instead"),new A(e,t)}function re(e,t){return new A(e,t)}function oe(e){return Object(o.a)("Module","Use plain object/function. Type with ModuleDefinition export"),new h(e)}var ie=void 0;function ae(e,t){return t&&!0===t.hotReloading&&ie?(ie.reconfigure(e),ie):ie=new E(e,t)}},function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"v",(function(){return u})),n.d(t,"s",(function(){return l})),n.d(t,"w",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"y",(function(){return d})),n.d(t,"u",(function(){return h})),n.d(t,"f",(function(){return m})),n.d(t,"k",(function(){return g})),n.d(t,"n",(function(){return v})),n.d(t,"g",(function(){return y})),n.d(t,"r",(function(){return w})),n.d(t,"i",(function(){return O})),n.d(t,"e",(function(){return _})),n.d(t,"x",(function(){return j})),n.d(t,"d",(function(){return k})),n.d(t,"b",(function(){return x})),n.d(t,"q",(function(){return S})),n.d(t,"m",(function(){return C})),n.d(t,"j",(function(){return T})),n.d(t,"a",(function(){return P})),n.d(t,"o",(function(){return I})),n.d(t,"t",(function(){return A})),n.d(t,"p",(function(){return L}));var r=n(2),o=n(14),i=n(9),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function c(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.keys(e),r=Object.keys(t),o=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:[],n=t.reduce((function(t,n){return!!(t||e instanceof n)||t}),!1);return!(void 0===e||!(n||u(e)&&"[object Object]"===Object.prototype.toString.call(e)&&(e.constructor===Object||null===Object.getPrototypeOf(e))||"number"==typeof e||"string"==typeof e||"boolean"==typeof e||null===e||Array.isArray(e)))}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:"string"==typeof e?e.split("."):[]}function d(e){throw new Error("Cerebral - "+e)}function h(){return!1}function m(e,t,n){var r=void 0;return function(){var o=this,i=arguments,a=function(){r=null,n||e.apply(o,i)},c=n&&!r;clearTimeout(r),r=setTimeout(a,t),c&&e.apply(o,i)}}function g(e){if(e&&!f(e)){var t=e.constructor.name;try{Object.defineProperty(e,"toJSON",{value:function(){return"["+t+"]"}})}catch(e){}}return e}function v(e){return Object.assign(Object.keys(e.providers||{}).reduce((function(t,n){return t[n]=e.providers[n]instanceof i.b?e.providers[n]:new i.b(e.providers[n]),t}),{}),Object.keys(e.modules||{}).reduce((function(t,n){return Object.assign(t,v(e.modules[n]))}),{}))}function b(e){return Object.keys(e).reduce((function(t,n){return e[n].children?t.concat(e[n]).concat(b(e[n].children)):t.concat(e[n])}),[])}function y(e,t){for(var n=[],r=0;r0&&void 0===e&&d('You are extracting with path "'+t+'", but it is not valid for this object'),e[n]}),e)}}function O(e,t){return l(t)&&-1===e.indexOf("*")?e+".**":e}function _(e){return{isTag:function(e){if(!(e instanceof r.Tag))return!1;for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(t){return p(t).reduce((function(e,t){return e?e[t]:void 0}),e)};return{options:{},on:function(){},getState:n,model:{get:n},getSequence:function(e){return t[e]||function(){}},dependencyStore:{addEntity:j,removeEntity:j}}}function x(e){if(l(e)&&!(e instanceof o.a)){for(var t in e)x(e[t]);!e.__CerebralState&&Object.defineProperty(e,"__CerebralState",{value:!0})}return e}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){return!t&&l(e[n])&&"__CerebralState"in e[n]?n:t}),null)}function C(e,t){var n=Array.isArray(e)?e:p(e);return n.reduce((function(t,r){return t.modules[r]||d('The path "'+n.join(".")+'" is invalid, can not find module. Does the path "'+n.splice(0,e.length-1).join(".")+'" exist?'),t.modules[r]}),t)}function T(e,t,n){var r=Object.keys(e.modules||{}).reduce((function(r,o){return r[o]=T(e.modules[o],t,n),r}),{});if(e[t]){var o=Object.keys(e[t]).reduce((function(n,r){var o=Object.getOwnPropertyDescriptor(e[t],r);return o&&"get"in o?Object.defineProperty(n,r,o):n[r]=e[t][r],n}),r);return n?n(o,e):o}return r}var E=[];function P(e,t){-1===E.indexOf(e)&&(E.push(e),console.warn(e+" is DEPRECATED - "+t))}function I(e,t){var n=t.execution.name.split(".");return n.splice(0,n.length-1).concat(e).join(".")}function A(e){return e instanceof o.a||e instanceof o.b}function L(e,t,n){var r=[];return function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(A(n)||A(o))return o;if(u(n)&&u(o)){var a=Object.keys(n).concat(Object.keys(o)).reduce((function(e,t){return-1===e.indexOf(t)?e.concat(t):e}),[]),c=!0,s=!1,l=void 0;try{for(var f,p=a[Symbol.iterator]();!(c=(f=p.next()).done);c=!0){var d=f.value;e(t[d],n[d],o[d],i.concat(d))}}catch(e){s=!0,l=e}finally{try{!c&&p.return&&p.return()}finally{if(s)throw l}}}else"function"!=typeof o&&(Array.isArray(n)&&Array.isArray(o)||o===t&&n!==t?r.push({path:i.slice(),value:n}):o!==t&&r.push({path:i.slice(),value:o}))}(e,t,n),r}},function(e,t,n){e.exports=n(305)()},function(e,t,n){e.exports=n(300)()},function(e,t,n){e.exports=n(298)},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"j",(function(){return Y})),n.d(t,"h",(function(){return $})),n.d(t,"f",(function(){return V})),n.d(t,"b",(function(){return S.a})),n.d(t,"g",(function(){return P})),n.d(t,"i",(function(){return A})),n.d(t,"c",(function(){return E})),n.d(t,"e",(function(){return M})),n.d(t,"d",(function(){return D}));var r=function(){function e(e,t){for(var n=0;n0&&void 0===e)throw new Error('Cannot extract value at path "'+t+'" ("'+n+'" is not defined).');return e[n]}),e)}var I=function(e){function t(e){T(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.cvalue=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),C(t,[{key:"getValue",value:function(e){var t=e.resolve,n=this.cvalue;return t.isResolveValue(n)?t.value(n):Object.keys(n).reduce((function(e,r){return e[r]=t.value(n[r]),e}),{})}}]),t}(E),A=function(e){return new I(e)},L=function(){function e(e,t){for(var n=0;n1?r-1:0),i=1;i1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{};return e instanceof E?e.getValue(t?Object.assign({},this.context,t):this.context):e},path:function(e){if(e instanceof D)return e.getPath(this.context);throw new Error("You are extracting a path from an argument that is not a Tag.")}},{wrap:!1}),R=n(56),F=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};U(this,t);var r=z(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(r.cachedTrees=[],r.cachedStaticTrees=[],r.executeBranchWrapper=n.executeBranchWrapper||function(e){e()},"object"!==(void 0===e?"undefined":B(e))||null===e||Array.isArray(e))throw new Error("You have to pass an object of context providers to FunctionTree");var o=Object.keys(e);if(o.indexOf("props")>=0||o.indexOf("path")>=0||o.indexOf("resolve")>=0||o.indexOf("execution")>=0||o.indexOf("debugger")>=0)throw new Error('You are trying to add a provider with protected key. "props", "path", "resolve", "execution" and "debugger" are protected');return r.contextProviders=Object.assign({},e,{resolve:N}),r.run=r.run.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),F(t,[{key:"run",value:function(){var e=this,t=void 0,n=void 0,r=void 0,o=void 0,i=void 0,a=[].slice.call(arguments);if(a.forEach((function(e){"string"==typeof e?t=e:Array.isArray(e)||e instanceof c?n=e:n||"function"!=typeof e?"function"==typeof e?o=e:r=e:n=e})),!n)throw new Error("function-tree - You did not pass in a function tree");var s=function(o,a){var c=e.cachedTrees.indexOf(n);-1===c?(i=w(t,n),e.cachedTrees.push(n),e.cachedStaticTrees.push(i)):i=e.cachedStaticTrees[c];var s=new q(t,i,e,(function(t,n,r,o){e.emit("error",t,n,r,o),a(t)}));e.emit("start",s,r),x(s,r,e.executeBranchWrapper,(function(t,n,r){e.emit("pathStart",n,s,t,r)}),(function(t){e.emit("pathEnd",s,t)}),(function(t,n){e.emit("parallelStart",s,t,n)}),(function(t,n){e.emit("parallelProgress",s,t,n)}),(function(t,n){e.emit("parallelEnd",s,t,n)}),(function(t){e.emit("end",s,t),o===a?o(null,t):o(t)}))};if(!o)return new Promise(s);s(o,o)}}]),t}(j.a);function Y(){for(var e=arguments.length,t=Array(e),n=0;n"']/g,N=RegExp(D.source),R=RegExp(M.source),F=/<%-([\s\S]+?)%>/g,B=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,V=RegExp(q.source),Y=/^\s+/,$=/\s/,G=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Z=/[()=,{}\[\]\/\s]/,Q=/\\(\\)?/g,ee=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ne=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,oe=/^\[object .+?Constructor\]$/,ie=/^0o[0-7]+$/i,ae=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,se=/($^)/,ue=/['\n\r\u2028\u2029\\]/g,le="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",de="["+fe+"]",he="["+le+"]",me="\\d+",ge="[\\u2700-\\u27bf]",ve="[a-z\\xdf-\\xf6\\xf8-\\xff]",be="[^\\ud800-\\udfff"+fe+me+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ye="\\ud83c[\\udffb-\\udfff]",we="[^\\ud800-\\udfff]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",_e="[\\ud800-\\udbff][\\udc00-\\udfff]",je="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ke="(?:"+ve+"|"+be+")",xe="(?:"+je+"|"+be+")",Se="(?:"+he+"|"+ye+")"+"?",Ce="[\\ufe0e\\ufe0f]?"+Se+("(?:\\u200d(?:"+[we,Oe,_e].join("|")+")[\\ufe0e\\ufe0f]?"+Se+")*"),Te="(?:"+[ge,Oe,_e].join("|")+")"+Ce,Ee="(?:"+[we+he+"?",he,Oe,_e,pe].join("|")+")",Pe=RegExp("['\u2019]","g"),Ie=RegExp(he,"g"),Ae=RegExp(ye+"(?="+ye+")|"+Ee+Ce,"g"),Le=RegExp([je+"?"+ve+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?="+[de,je,"$"].join("|")+")",xe+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?="+[de,je+ke,"$"].join("|")+")",je+"?"+ke+"+(?:['\u2019](?:d|ll|m|re|s|t|ve))?",je+"+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Te].join("|"),"g"),De=RegExp("[\\u200d\\ud800-\\udfff"+le+"\\ufe0e\\ufe0f]"),Me=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Re=-1,Fe={};Fe[j]=Fe[k]=Fe[x]=Fe[S]=Fe[C]=Fe[T]=Fe["[object Uint8ClampedArray]"]=Fe[E]=Fe[P]=!0,Fe[a]=Fe[c]=Fe[O]=Fe[s]=Fe[_]=Fe[u]=Fe[l]=Fe[f]=Fe[d]=Fe[h]=Fe[m]=Fe[g]=Fe[v]=Fe[b]=Fe[w]=!1;var Be={};Be[a]=Be[c]=Be[O]=Be[_]=Be[s]=Be[u]=Be[j]=Be[k]=Be[x]=Be[S]=Be[C]=Be[d]=Be[h]=Be[m]=Be[g]=Be[v]=Be[b]=Be[y]=Be[T]=Be["[object Uint8ClampedArray]"]=Be[E]=Be[P]=!0,Be[l]=Be[f]=Be[w]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,We=parseInt,He="object"==typeof e&&e&&e.Object===Object&&e,qe="object"==typeof self&&self&&self.Object===Object&&self,Ve=He||qe||Function("return this")(),Ye=t&&!t.nodeType&&t,$e=Ye&&"object"==typeof n&&n&&!n.nodeType&&n,Ge=$e&&$e.exports===Ye,Ke=Ge&&He.process,Xe=function(){try{var e=$e&&$e.require&&$e.require("util").types;return e||Ke&&Ke.binding&&Ke.binding("util")}catch(e){}}(),Je=Xe&&Xe.isArrayBuffer,Ze=Xe&&Xe.isDate,Qe=Xe&&Xe.isMap,et=Xe&&Xe.isRegExp,tt=Xe&&Xe.isSet,nt=Xe&&Xe.isTypedArray;function rt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function ot(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o-1}function lt(e,t,n){for(var r=-1,o=null==e?0:e.length;++r-1;);return n}function Lt(e,t){for(var n=e.length;n--&&yt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Mt=kt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Nt=kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function Rt(e){return"\\"+ze[e]}function Ft(e){return De.test(e)}function Bt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Ut(e,t){for(var n=-1,r=e.length,i=0,a=[];++n",""":'"',"'":"'"});var Gt=function e(t){var n,$=(t=null==t?Ve:Gt.defaults(Ve.Object(),t,Gt.pick(Ve,Ne))).Array,le=t.Date,fe=t.Error,pe=t.Function,de=t.Math,he=t.Object,me=t.RegExp,ge=t.String,ve=t.TypeError,be=$.prototype,ye=pe.prototype,we=he.prototype,Oe=t["__core-js_shared__"],_e=ye.toString,je=we.hasOwnProperty,ke=0,xe=(n=/[^.]+$/.exec(Oe&&Oe.keys&&Oe.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Se=we.toString,Ce=_e.call(he),Te=Ve._,Ee=me("^"+_e.call(je).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae=Ge?t.Buffer:void 0,De=t.Symbol,ze=t.Uint8Array,He=Ae?Ae.allocUnsafe:void 0,qe=zt(he.getPrototypeOf,he),Ye=he.create,$e=we.propertyIsEnumerable,Ke=be.splice,Xe=De?De.isConcatSpreadable:void 0,gt=De?De.iterator:void 0,kt=De?De.toStringTag:void 0,Kt=function(){try{var e=ti(he,"defineProperty");return e({},"",{}),e}catch(e){}}(),Xt=t.clearTimeout!==Ve.clearTimeout&&t.clearTimeout,Jt=le&&le.now!==Ve.Date.now&&le.now,Zt=t.setTimeout!==Ve.setTimeout&&t.setTimeout,Qt=de.ceil,en=de.floor,tn=he.getOwnPropertySymbols,nn=Ae?Ae.isBuffer:void 0,rn=t.isFinite,on=be.join,an=zt(he.keys,he),cn=de.max,sn=de.min,un=le.now,ln=t.parseInt,fn=de.random,pn=be.reverse,dn=ti(t,"DataView"),hn=ti(t,"Map"),mn=ti(t,"Promise"),gn=ti(t,"Set"),vn=ti(t,"WeakMap"),bn=ti(he,"create"),yn=vn&&new vn,wn={},On=Ti(dn),_n=Ti(hn),jn=Ti(mn),kn=Ti(gn),xn=Ti(vn),Sn=De?De.prototype:void 0,Cn=Sn?Sn.valueOf:void 0,Tn=Sn?Sn.toString:void 0;function En(e){if(Va(e)&&!Da(e)&&!(e instanceof Ln)){if(e instanceof An)return e;if(je.call(e,"__wrapped__"))return Ei(e)}return new An(e)}var Pn=function(){function e(){}return function(t){if(!qa(t))return{};if(Ye)return Ye(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function In(){}function An(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Ln(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=t?e:t)),e}function Jn(e,t,n,r,o,i){var c,l=1&t,w=2&t,I=4&t;if(n&&(c=o?n(e,r,o,i):n(e)),void 0!==c)return c;if(!qa(e))return e;var A=Da(e);if(A){if(c=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!l)return yo(e,c)}else{var L=oi(e),D=L==f||L==p;if(Fa(e))return po(e,l);if(L==m||L==a||D&&!o){if(c=w||D?{}:ai(e),!l)return w?function(e,t){return wo(e,ri(e),t)}(e,function(e,t){return e&&wo(t,_c(t),e)}(c,e)):function(e,t){return wo(e,ni(e),t)}(e,$n(c,e))}else{if(!Be[L])return o?e:{};c=function(e,t,n){var r=e.constructor;switch(t){case O:return ho(e);case s:case u:return new r(+e);case _:return function(e,t){var n=t?ho(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case k:case x:case S:case C:case T:case"[object Uint8ClampedArray]":case E:case P:return mo(e,n);case d:return new r;case h:case b:return new r(e);case g:return function(e){var t=new e.constructor(e.source,te.exec(e));return t.lastIndex=e.lastIndex,t}(e);case v:return new r;case y:return o=e,Cn?he(Cn.call(o)):{}}var o}(e,L,l)}}i||(i=new Fn);var M=i.get(e);if(M)return M;i.set(e,c),Xa(e)?e.forEach((function(r){c.add(Jn(r,t,n,r,e,i))})):Ya(e)&&e.forEach((function(r,o){c.set(o,Jn(r,t,n,o,e,i))}));var N=A?void 0:(I?w?Go:$o:w?_c:Oc)(e);return it(N||e,(function(r,o){N&&(r=e[o=r]),qn(c,o,Jn(r,t,n,o,e,i))})),c}function Zn(e,t,n){var r=n.length;if(null==e)return!r;for(e=he(e);r--;){var o=n[r],i=t[o],a=e[o];if(void 0===a&&!(o in e)||!i(a))return!1}return!0}function Qn(e,t,n){if("function"!=typeof e)throw new ve(r);return Oi((function(){e.apply(void 0,n)}),t)}function er(e,t,n,r){var o=-1,i=ut,a=!0,c=e.length,s=[],u=t.length;if(!c)return s;n&&(t=ft(t,Et(n))),r?(i=lt,a=!1):t.length>=200&&(i=It,a=!1,t=new Rn(t));e:for(;++o-1},Mn.prototype.set=function(e,t){var n=this.__data__,r=Vn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Nn.prototype.clear=function(){this.size=0,this.__data__={hash:new Dn,map:new(hn||Mn),string:new Dn}},Nn.prototype.delete=function(e){var t=Qo(this,e).delete(e);return this.size-=t?1:0,t},Nn.prototype.get=function(e){return Qo(this,e).get(e)},Nn.prototype.has=function(e){return Qo(this,e).has(e)},Nn.prototype.set=function(e,t){var n=Qo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Rn.prototype.add=Rn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.clear=function(){this.__data__=new Mn,this.size=0},Fn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Fn.prototype.get=function(e){return this.__data__.get(e)},Fn.prototype.has=function(e){return this.__data__.has(e)},Fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!hn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(e,t),this.size=n.size,this};var tr=jo(ur),nr=jo(lr,!0);function rr(e,t){var n=!0;return tr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function or(e,t,n){for(var r=-1,o=e.length;++r0&&n(c)?t>1?ar(c,t-1,n,r,o):pt(o,c):r||(o[o.length]=c)}return o}var cr=ko(),sr=ko(!0);function ur(e,t){return e&&cr(e,t,Oc)}function lr(e,t){return e&&sr(e,t,Oc)}function fr(e,t){return st(t,(function(t){return Ua(e[t])}))}function pr(e,t){for(var n=0,r=(t=so(t,e)).length;null!=e&&nt}function gr(e,t){return null!=e&&je.call(e,t)}function vr(e,t){return null!=e&&t in he(e)}function br(e,t,n){for(var r=n?lt:ut,o=e[0].length,i=e.length,a=i,c=$(i),s=1/0,u=[];a--;){var l=e[a];a&&t&&(l=ft(l,Et(t))),s=sn(l.length,s),c[a]=!n&&(t||o>=120&&l.length>=120)?new Rn(a&&l):void 0}l=e[0];var f=-1,p=c[0];e:for(;++f=c)return s;var u=n[r];return s*("desc"==u?-1:1)}}return e.index-t.index}(e,t,n)}))}function Dr(e,t,n){for(var r=-1,o=t.length,i={};++r-1;)c!==e&&Ke.call(c,s,1),Ke.call(e,s,1);return e}function Nr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;si(o)?Ke.call(e,o,1):eo(e,o)}}return e}function Rr(e,t){return e+en(fn()*(t-e+1))}function Fr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Br(e,t){return _i(gi(e,t,$c),e+"")}function zr(e){return zn(Pc(e))}function Ur(e,t){var n=Pc(e);return xi(n,Xn(t,0,n.length))}function Wr(e,t,n,r){if(!qa(e))return e;for(var o=-1,i=(t=so(t,e)).length,a=i-1,c=e;null!=c&&++oo?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=$(o);++r>>1,a=e[i];null!==a&&!Za(a)&&(n?a<=t:a=200){var u=t?null:Bo(e);if(u)return Wt(u);a=!1,o=It,s=new Rn}else s=t?[]:c;e:for(;++r=r?e:Yr(e,t,n)}var fo=Xt||function(e){return Ve.clearTimeout(e)};function po(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function ho(e){var t=new e.constructor(e.byteLength);return new ze(t).set(new ze(e)),t}function mo(e,t){var n=t?ho(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function go(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=Za(e),a=void 0!==t,c=null===t,s=t==t,u=Za(t);if(!c&&!u&&!i&&e>t||i&&a&&s&&!c&&!u||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!u&&e1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,a&&ui(n[0],n[1],a)&&(i=o<3?void 0:i,o=1),t=he(t);++r-1?o[i?t[a]:a]:void 0}}function Eo(e){return Yo((function(t){var n=t.length,o=n,i=An.prototype.thru;for(e&&t.reverse();o--;){var a=t[o];if("function"!=typeof a)throw new ve(r);if(i&&!c&&"wrapper"==Xo(a))var c=new An([],!0)}for(o=c?o:n;++o1&&b.reverse(),l&&sc))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,p=!0,d=2&n?new Rn:void 0;for(i.set(e,t),i.set(t,e);++f-1&&e%1==0&&e1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(G,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return it(i,(function(n){var r="_."+n[0];t&n[1]&&!ut(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(K);return t?t[1].split(X):[]}(r),n)))}function ki(e){var t=0,n=0;return function(){var r=un(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function xi(e,t){var n=-1,r=e.length,o=r-1;for(t=void 0===t?r:t;++n1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Ki(e,n)}));function na(e){var t=En(e);return t.__chain__=!0,t}function ra(e,t){return t(e)}var oa=Yo((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return Kn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Ln&&si(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ra,args:[o],thisArg:void 0}),new An(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ia=Oo((function(e,t,n){je.call(e,n)?++e[n]:Gn(e,n,1)}));var aa=To(Li),ca=To(Di);function sa(e,t){return(Da(e)?it:tr)(e,Zo(t,3))}function ua(e,t){return(Da(e)?at:nr)(e,Zo(t,3))}var la=Oo((function(e,t,n){je.call(e,n)?e[n].push(t):Gn(e,n,[t])}));var fa=Br((function(e,t,n){var r=-1,o="function"==typeof t,i=Na(e)?$(e.length):[];return tr(e,(function(e){i[++r]=o?rt(t,e,n):yr(e,t,n)})),i})),pa=Oo((function(e,t,n){Gn(e,n,t)}));function da(e,t){return(Da(e)?ft:Tr)(e,Zo(t,3))}var ha=Oo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ma=Br((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ui(e,t[0],t[1])?t=[]:n>2&&ui(t[0],t[1],t[2])&&(t=[t[0]]),Lr(e,ar(t,1),[])})),ga=Jt||function(){return Ve.Date.now()};function va(e,t,n){return t=n?void 0:t,Uo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function ba(e,t){var n;if("function"!=typeof t)throw new ve(r);return e=oc(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ya=Br((function(e,t,n){var r=1;if(n.length){var o=Ut(n,Jo(ya));r|=32}return Uo(e,r,t,n,o)})),wa=Br((function(e,t,n){var r=3;if(n.length){var o=Ut(n,Jo(wa));r|=32}return Uo(t,r,e,n,o)}));function Oa(e,t,n){var o,i,a,c,s,u,l=0,f=!1,p=!1,d=!0;if("function"!=typeof e)throw new ve(r);function h(t){var n=o,r=i;return o=i=void 0,l=t,c=e.apply(r,n)}function m(e){return l=e,s=Oi(v,t),f?h(e):c}function g(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=a}function v(){var e=ga();if(g(e))return b(e);s=Oi(v,function(e){var n=t-(e-u);return p?sn(n,a-(e-l)):n}(e))}function b(e){return s=void 0,d&&o?h(e):(o=i=void 0,c)}function y(){var e=ga(),n=g(e);if(o=arguments,i=this,u=e,n){if(void 0===s)return m(u);if(p)return fo(s),s=Oi(v,t),h(u)}return void 0===s&&(s=Oi(v,t)),c}return t=ac(t)||0,qa(n)&&(f=!!n.leading,a=(p="maxWait"in n)?cn(ac(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&fo(s),l=0,o=u=i=s=void 0},y.flush=function(){return void 0===s?c:b(ga())},y}var _a=Br((function(e,t){return Qn(e,1,t)})),ja=Br((function(e,t,n){return Qn(e,ac(t)||0,n)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ve(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ka.Cache||Nn),n}function xa(e){if("function"!=typeof e)throw new ve(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Nn;var Sa=uo((function(e,t){var n=(t=1==t.length&&Da(t[0])?ft(t[0],Et(Zo())):ft(ar(t,1),Et(Zo()))).length;return Br((function(r){for(var o=-1,i=sn(r.length,n);++o=t})),La=wr(function(){return arguments}())?wr:function(e){return Va(e)&&je.call(e,"callee")&&!$e.call(e,"callee")},Da=$.isArray,Ma=Je?Et(Je):function(e){return Va(e)&&hr(e)==O};function Na(e){return null!=e&&Ha(e.length)&&!Ua(e)}function Ra(e){return Va(e)&&Na(e)}var Fa=nn||as,Ba=Ze?Et(Ze):function(e){return Va(e)&&hr(e)==u};function za(e){if(!Va(e))return!1;var t=hr(e);return t==l||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ga(e)}function Ua(e){if(!qa(e))return!1;var t=hr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Wa(e){return"number"==typeof e&&e==oc(e)}function Ha(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function qa(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Va(e){return null!=e&&"object"==typeof e}var Ya=Qe?Et(Qe):function(e){return Va(e)&&oi(e)==d};function $a(e){return"number"==typeof e||Va(e)&&hr(e)==h}function Ga(e){if(!Va(e)||hr(e)!=m)return!1;var t=qe(e);if(null===t)return!0;var n=je.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&_e.call(n)==Ce}var Ka=et?Et(et):function(e){return Va(e)&&hr(e)==g};var Xa=tt?Et(tt):function(e){return Va(e)&&oi(e)==v};function Ja(e){return"string"==typeof e||!Da(e)&&Va(e)&&hr(e)==b}function Za(e){return"symbol"==typeof e||Va(e)&&hr(e)==y}var Qa=nt?Et(nt):function(e){return Va(e)&&Ha(e.length)&&!!Fe[hr(e)]};var ec=No(Cr),tc=No((function(e,t){return e<=t}));function nc(e){if(!e)return[];if(Na(e))return Ja(e)?Vt(e):yo(e);if(gt&&e[gt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[gt]());var t=oi(e);return(t==d?Bt:t==v?Wt:Pc)(e)}function rc(e){return e?(e=ac(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function oc(e){var t=rc(e),n=t%1;return t==t?n?t-n:t:0}function ic(e){return e?Xn(oc(e),0,4294967295):0}function ac(e){if("number"==typeof e)return e;if(Za(e))return NaN;if(qa(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=qa(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Tt(e);var n=re.test(e);return n||ie.test(e)?We(e.slice(2),n?2:8):ne.test(e)?NaN:+e}function cc(e){return wo(e,_c(e))}function sc(e){return null==e?"":Zr(e)}var uc=_o((function(e,t){if(di(t)||Na(t))wo(t,Oc(t),e);else for(var n in t)je.call(t,n)&&qn(e,n,t[n])})),lc=_o((function(e,t){wo(t,_c(t),e)})),fc=_o((function(e,t,n,r){wo(t,_c(t),e,r)})),pc=_o((function(e,t,n,r){wo(t,Oc(t),e,r)})),dc=Yo(Kn);var hc=Br((function(e,t){e=he(e);var n=-1,r=t.length,o=r>2?t[2]:void 0;for(o&&ui(t[0],t[1],o)&&(r=1);++n1),t})),wo(e,Go(e),n),r&&(n=Jn(n,7,qo));for(var o=t.length;o--;)eo(n,t[o]);return n}));var Sc=Yo((function(e,t){return null==e?{}:function(e,t){return Dr(e,t,(function(t,n){return vc(e,n)}))}(e,t)}));function Cc(e,t){if(null==e)return{};var n=ft(Go(e),(function(e){return[e]}));return t=Zo(t),Dr(e,n,(function(e,n){return t(e,n[0])}))}var Tc=zo(Oc),Ec=zo(_c);function Pc(e){return null==e?[]:Pt(e,Oc(e))}var Ic=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Ac(t):t)}));function Ac(e){return zc(sc(e).toLowerCase())}function Lc(e){return(e=sc(e))&&e.replace(ce,Mt).replace(Ie,"")}var Dc=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Mc=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Nc=xo("toLowerCase");var Rc=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Fc=So((function(e,t,n){return e+(n?" ":"")+zc(t)}));var Bc=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),zc=xo("toUpperCase");function Uc(e,t,n){return e=sc(e),void 0===(t=n?void 0:t)?function(e){return Me.test(e)}(e)?function(e){return e.match(Le)||[]}(e):function(e){return e.match(J)||[]}(e):e.match(t)||[]}var Wc=Br((function(e,t){try{return rt(e,void 0,t)}catch(e){return za(e)?e:new fe(e)}})),Hc=Yo((function(e,t){return it(t,(function(t){t=Ci(t),Gn(e,t,ya(e[t],e))})),e}));function qc(e){return function(){return e}}var Vc=Eo(),Yc=Eo(!0);function $c(e){return e}function Gc(e){return kr("function"==typeof e?e:Jn(e,1))}var Kc=Br((function(e,t){return function(n){return yr(n,e,t)}})),Xc=Br((function(e,t){return function(n){return yr(e,n,t)}}));function Jc(e,t,n){var r=Oc(t),o=fr(t,r);null!=n||qa(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=fr(t,Oc(t)));var i=!(qa(n)&&"chain"in n&&!n.chain),a=Ua(e);return it(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Zc(){}var Qc=Lo(ft),es=Lo(ct),ts=Lo(mt);function ns(e){return li(e)?jt(Ci(e)):function(e){return function(t){return pr(t,e)}}(e)}var rs=Mo(),os=Mo(!0);function is(){return[]}function as(){return!1}var cs=Ao((function(e,t){return e+t}),0),ss=Fo("ceil"),us=Ao((function(e,t){return e/t}),1),ls=Fo("floor");var fs,ps=Ao((function(e,t){return e*t}),1),ds=Fo("round"),hs=Ao((function(e,t){return e-t}),0);return En.after=function(e,t){if("function"!=typeof t)throw new ve(r);return e=oc(e),function(){if(--e<1)return t.apply(this,arguments)}},En.ary=va,En.assign=uc,En.assignIn=lc,En.assignInWith=fc,En.assignWith=pc,En.at=dc,En.before=ba,En.bind=ya,En.bindAll=Hc,En.bindKey=wa,En.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Da(e)?e:[e]},En.chain=na,En.chunk=function(e,t,n){t=(n?ui(e,t,n):void 0===t)?1:cn(oc(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var o=0,i=0,a=$(Qt(r/t));oo?0:o+n),(r=void 0===r||r>o?o:oc(r))<0&&(r+=o),r=n>r?0:ic(r);n>>0)?(e=sc(e))&&("string"==typeof t||null!=t&&!Ka(t))&&!(t=Zr(t))&&Ft(e)?lo(Vt(e),0,n):e.split(t,n):[]},En.spread=function(e,t){if("function"!=typeof e)throw new ve(r);return t=null==t?0:cn(oc(t),0),Br((function(n){var r=n[t],o=lo(n,0,t);return r&&pt(o,r),rt(e,this,o)}))},En.tail=function(e){var t=null==e?0:e.length;return t?Yr(e,1,t):[]},En.take=function(e,t,n){return e&&e.length?Yr(e,0,(t=n||void 0===t?1:oc(t))<0?0:t):[]},En.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Yr(e,(t=r-(t=n||void 0===t?1:oc(t)))<0?0:t,r):[]},En.takeRightWhile=function(e,t){return e&&e.length?no(e,Zo(t,3),!1,!0):[]},En.takeWhile=function(e,t){return e&&e.length?no(e,Zo(t,3)):[]},En.tap=function(e,t){return t(e),e},En.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new ve(r);return qa(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Oa(e,t,{leading:o,maxWait:t,trailing:i})},En.thru=ra,En.toArray=nc,En.toPairs=Tc,En.toPairsIn=Ec,En.toPath=function(e){return Da(e)?ft(e,Ci):Za(e)?[e]:yo(Si(sc(e)))},En.toPlainObject=cc,En.transform=function(e,t,n){var r=Da(e),o=r||Fa(e)||Qa(e);if(t=Zo(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:qa(e)&&Ua(i)?Pn(qe(e)):{}}return(o?it:ur)(e,(function(e,r,o){return t(n,e,r,o)})),n},En.unary=function(e){return va(e,1)},En.union=Vi,En.unionBy=Yi,En.unionWith=$i,En.uniq=function(e){return e&&e.length?Qr(e):[]},En.uniqBy=function(e,t){return e&&e.length?Qr(e,Zo(t,2)):[]},En.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Qr(e,void 0,t):[]},En.unset=function(e,t){return null==e||eo(e,t)},En.unzip=Gi,En.unzipWith=Ki,En.update=function(e,t,n){return null==e?e:to(e,t,co(n))},En.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:to(e,t,co(n),r)},En.values=Pc,En.valuesIn=function(e){return null==e?[]:Pt(e,_c(e))},En.without=Xi,En.words=Uc,En.wrap=function(e,t){return Ca(co(t),e)},En.xor=Ji,En.xorBy=Zi,En.xorWith=Qi,En.zip=ea,En.zipObject=function(e,t){return io(e||[],t||[],qn)},En.zipObjectDeep=function(e,t){return io(e||[],t||[],Wr)},En.zipWith=ta,En.entries=Tc,En.entriesIn=Ec,En.extend=lc,En.extendWith=fc,Jc(En,En),En.add=cs,En.attempt=Wc,En.camelCase=Ic,En.capitalize=Ac,En.ceil=ss,En.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=ac(n))==n?n:0),void 0!==t&&(t=(t=ac(t))==t?t:0),Xn(ac(e),t,n)},En.clone=function(e){return Jn(e,4)},En.cloneDeep=function(e){return Jn(e,5)},En.cloneDeepWith=function(e,t){return Jn(e,5,t="function"==typeof t?t:void 0)},En.cloneWith=function(e,t){return Jn(e,4,t="function"==typeof t?t:void 0)},En.conformsTo=function(e,t){return null==t||Zn(e,t,Oc(t))},En.deburr=Lc,En.defaultTo=function(e,t){return null==e||e!=e?t:e},En.divide=us,En.endsWith=function(e,t,n){e=sc(e),t=Zr(t);var r=e.length,o=n=void 0===n?r:Xn(oc(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},En.eq=Pa,En.escape=function(e){return(e=sc(e))&&R.test(e)?e.replace(M,Nt):e},En.escapeRegExp=function(e){return(e=sc(e))&&V.test(e)?e.replace(q,"\\$&"):e},En.every=function(e,t,n){var r=Da(e)?ct:rr;return n&&ui(e,t,n)&&(t=void 0),r(e,Zo(t,3))},En.find=aa,En.findIndex=Li,En.findKey=function(e,t){return vt(e,Zo(t,3),ur)},En.findLast=ca,En.findLastIndex=Di,En.findLastKey=function(e,t){return vt(e,Zo(t,3),lr)},En.floor=ls,En.forEach=sa,En.forEachRight=ua,En.forIn=function(e,t){return null==e?e:cr(e,Zo(t,3),_c)},En.forInRight=function(e,t){return null==e?e:sr(e,Zo(t,3),_c)},En.forOwn=function(e,t){return e&&ur(e,Zo(t,3))},En.forOwnRight=function(e,t){return e&&lr(e,Zo(t,3))},En.get=gc,En.gt=Ia,En.gte=Aa,En.has=function(e,t){return null!=e&&ii(e,t,gr)},En.hasIn=vc,En.head=Ni,En.identity=$c,En.includes=function(e,t,n,r){e=Na(e)?e:Pc(e),n=n&&!r?oc(n):0;var o=e.length;return n<0&&(n=cn(o+n,0)),Ja(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&yt(e,t,n)>-1},En.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:oc(n);return o<0&&(o=cn(r+o,0)),yt(e,t,o)},En.inRange=function(e,t,n){return t=rc(t),void 0===n?(n=t,t=0):n=rc(n),function(e,t,n){return e>=sn(t,n)&&e=-9007199254740991&&e<=9007199254740991},En.isSet=Xa,En.isString=Ja,En.isSymbol=Za,En.isTypedArray=Qa,En.isUndefined=function(e){return void 0===e},En.isWeakMap=function(e){return Va(e)&&oi(e)==w},En.isWeakSet=function(e){return Va(e)&&"[object WeakSet]"==hr(e)},En.join=function(e,t){return null==e?"":on.call(e,t)},En.kebabCase=Dc,En.last=zi,En.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return void 0!==n&&(o=(o=oc(n))<0?cn(r+o,0):sn(o,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):bt(e,Ot,o,!0)},En.lowerCase=Mc,En.lowerFirst=Nc,En.lt=ec,En.lte=tc,En.max=function(e){return e&&e.length?or(e,$c,mr):void 0},En.maxBy=function(e,t){return e&&e.length?or(e,Zo(t,2),mr):void 0},En.mean=function(e){return _t(e,$c)},En.meanBy=function(e,t){return _t(e,Zo(t,2))},En.min=function(e){return e&&e.length?or(e,$c,Cr):void 0},En.minBy=function(e,t){return e&&e.length?or(e,Zo(t,2),Cr):void 0},En.stubArray=is,En.stubFalse=as,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=ps,En.nth=function(e,t){return e&&e.length?Ar(e,oc(t)):void 0},En.noConflict=function(){return Ve._===this&&(Ve._=Te),this},En.noop=Zc,En.now=ga,En.pad=function(e,t,n){e=sc(e);var r=(t=oc(t))?qt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Do(en(o),n)+e+Do(Qt(o),n)},En.padEnd=function(e,t,n){e=sc(e);var r=(t=oc(t))?qt(e):0;return t&&rt){var r=e;e=t,t=r}if(n||e%1||t%1){var o=fn();return sn(e+o*(t-e+Ue("1e-"+((o+"").length-1))),t)}return Rr(e,t)},En.reduce=function(e,t,n){var r=Da(e)?dt:xt,o=arguments.length<3;return r(e,Zo(t,4),n,o,tr)},En.reduceRight=function(e,t,n){var r=Da(e)?ht:xt,o=arguments.length<3;return r(e,Zo(t,4),n,o,nr)},En.repeat=function(e,t,n){return t=(n?ui(e,t,n):void 0===t)?1:oc(t),Fr(sc(e),t)},En.replace=function(){var e=arguments,t=sc(e[0]);return e.length<3?t:t.replace(e[1],e[2])},En.result=function(e,t,n){var r=-1,o=(t=so(t,e)).length;for(o||(o=1,e=void 0);++r9007199254740991)return[];var n=4294967295,r=sn(e,4294967295);e-=4294967295;for(var o=Ct(r,t=Zo(t));++n=i)return e;var c=n-qt(r);if(c<1)return r;var s=a?lo(a,0,c).join(""):e.slice(0,c);if(void 0===o)return s+r;if(a&&(c+=s.length-c),Ka(o)){if(e.slice(c).search(o)){var u,l=s;for(o.global||(o=me(o.source,sc(te.exec(o))+"g")),o.lastIndex=0;u=o.exec(l);)var f=u.index;s=s.slice(0,void 0===f?c:f)}}else if(e.indexOf(Zr(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},En.unescape=function(e){return(e=sc(e))&&N.test(e)?e.replace(D,$t):e},En.uniqueId=function(e){var t=++ke;return sc(e)+t},En.upperCase=Bc,En.upperFirst=zc,En.each=sa,En.eachRight=ua,En.first=Ni,Jc(En,(fs={},ur(En,(function(e,t){je.call(En.prototype,t)||(fs[t]=e)})),fs),{chain:!1}),En.VERSION="4.17.21",it(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){En[e].placeholder=En})),it(["drop","take"],(function(e,t){Ln.prototype[e]=function(n){n=void 0===n?1:cn(oc(n),0);var r=this.__filtered__&&!t?new Ln(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},Ln.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),it(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Ln.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Zo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),it(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Ln.prototype[e]=function(){return this[n](1).value()[0]}})),it(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Ln.prototype[e]=function(){return this.__filtered__?new Ln(this):this[n](1)}})),Ln.prototype.compact=function(){return this.filter($c)},Ln.prototype.find=function(e){return this.filter(e).head()},Ln.prototype.findLast=function(e){return this.reverse().find(e)},Ln.prototype.invokeMap=Br((function(e,t){return"function"==typeof e?new Ln(this):this.map((function(n){return yr(n,e,t)}))})),Ln.prototype.reject=function(e){return this.filter(xa(Zo(e)))},Ln.prototype.slice=function(e,t){e=oc(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Ln(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=oc(t))<0?n.dropRight(-t):n.take(t-e)),n)},Ln.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ln.prototype.toArray=function(){return this.take(4294967295)},ur(Ln.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=En[r?"take"+("last"==t?"Right":""):t],i=r||/^find/.test(t);o&&(En.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof Ln,s=a[0],u=c||Da(t),l=function(e){var t=o.apply(En,pt([e],a));return r&&f?t[0]:t};u&&n&&"function"==typeof s&&1!=s.length&&(c=u=!1);var f=this.__chain__,p=!!this.__actions__.length,d=i&&!f,h=c&&!p;if(!i&&u){t=h?t:new Ln(this);var m=e.apply(t,a);return m.__actions__.push({func:ra,args:[l],thisArg:void 0}),new An(m,f)}return d&&h?e.apply(this,a):(m=this.thru(l),d?r?m.value()[0]:m.value():m)})})),it(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);En.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Da(o)?o:[],e)}return this[n]((function(n){return t.apply(Da(n)?n:[],e)}))}})),ur(Ln.prototype,(function(e,t){var n=En[t];if(n){var r=n.name+"";je.call(wn,r)||(wn[r]=[]),wn[r].push({name:t,func:n})}})),wn[Po(void 0,2).name]=[{name:"wrapper",func:void 0}],Ln.prototype.clone=function(){var e=new Ln(this.__wrapped__);return e.__actions__=yo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yo(this.__views__),e},Ln.prototype.reverse=function(){if(this.__filtered__){var e=new Ln(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ln.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Da(e),r=t<0,o=n?e.length:0,i=function(e,t,n){var r=-1,o=n.length;for(;++r=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(e){for(var t,n=this;n instanceof In;){var r=Ei(n);r.__index__=0,r.__values__=void 0,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},En.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ln){var t=e;return this.__actions__.length&&(t=new Ln(this)),(t=t.reverse()).__actions__.push({func:ra,args:[qi],thisArg:void 0}),new An(t,this.__chain__)}return this.thru(qi)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return ro(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,gt&&(En.prototype[gt]=function(){return this}),En}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ve._=Gt,define((function(){return Gt}))):$e?(($e.exports=Gt)._=Gt,Ye._=Gt):Ve._=Gt}).call(this)}).call(this,n(21),n(39)(e))},function(e,t,n){e.exports=n(469)()},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return u}));var r=n(9),o=n(55),i=n(4),a=function(){function e(e,t){for(var n=0;n2),b=/Android/.test(t),y=v||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),w=v||/Mac/.test(n),O=/\bCrOS\b/.test(t),_=/win/i.test(n),j=d&&t.match(/Version\/(\d*\.\d*)/);j&&(j=Number(j[1])),j&&j>=15&&(d=!1,u=!0);var k=w&&(l||d&&(null==j||j<12.11)),x=r||c&&s>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,T=function(e,t){var n=e.className,r=S(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return E(e).appendChild(t)}function I(t,n,r,o){var i=e.createElement(t);if(r&&(i.className=r),o&&(i.style.cssText=o),"string"==typeof n)i.appendChild(e.createTextNode(n));else if(n)for(var a=0;a=t)return a+(t-i);a+=c-i,a+=n-a%n,i=c+1}}v?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:c&&(R=function(e){try{e.select()}catch(e){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function W(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(X(G)+" ");return G[e]}function X(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var oe=/[\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 ie(e){return e.charCodeAt(0)>=768&&oe.test(e)}function ae(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var se=null;function ue(e,t,n){var r;se=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:se=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:se=o)}return null!=r?r:se}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,c){var s="ltr"==c?"L":"R";if(0==a.length||"ltr"==c&&!e.test(a))return!1;for(var u,l=a.length,f=[],p=0;p-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ge(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function we(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){me(this,e,t)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function je(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){Oe(e),_e(e)}function xe(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),w&&e.ctrlKey&&1==t&&(t=3),t}var Ce,Te,Ee=function(){if(c&&s<9)return!1;var e=I("div");return"draggable"in e||"dragDrop"in e}();function Pe(t){if(null==Ce){var n=I("span","\u200b");P(t,I("span",[n,e.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Ce=n.offsetWidth<=1&&n.offsetHeight>2&&!(c&&s<8))}var r=Ce?I("span","\u200b"):I("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ie(t){if(null!=Te)return Te;var n=P(t,e.createTextNode("A\u062eA")),r=C(n,0,1).getBoundingClientRect(),o=C(n,1,2).getBoundingClientRect();return E(t),!(!r||r.left==r.right)&&(Te=o.right-r.right<3)}var Ae,Le=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},De=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Me="oncopy"in(Ae=I("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Ne=null,Re={},Fe={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function ze(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=ze(t);var n=Re[t.name];if(!n)return Ue(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var o=We[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function He(e,t){B(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var $e=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ge(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?nt(n,Ge(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?nt(e.line,t):n<0?nt(e.line,0):e}(t,Ge(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.post},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ft=function(e,t){this.state=e,this.lookAhead=t},pt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var o=[e.state.modeGen],i={};_t(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,c=function(r){n.baseTokens=o;var c=e.state.overlays[r],s=1,u=0;n.state=!0,_t(e,t.text,c.mode,n,(function(e,t){for(var n=s;ue&&o.splice(s,1,e,o[s+1],r),s+=2,u=Math.min(e,r)}if(t)if(c.opaque)o.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),i=dt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function mt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new pt(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),c=t;c>a;--c){if(c<=i.first)return i.first;var s=Ge(i,c-1),u=s.stateAfter;if(u&&(!n||c+(u instanceof ft?u.lookAhead:0)<=i.modeFrontier))return c;var l=z(s.text,null,e.options.tabSize);(null==o||r>l)&&(o=c-1,r=l)}return o}(e,t,n),a=i>r.first&&Ge(r,i-1).stateAfter,c=a?pt.fromSaved(r,a,i):new pt(r,Ye(r.mode),i);return r.iter(i,t,(function(n){gt(e,n.text,c);var r=c.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pt.fromSaved=function(e,t,n){return t instanceof ft?new pt(e,qe(e.mode,t.state),n,t.lookAhead):new pt(e,qe(e.mode,t),n)},pt.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ft(t,this.maxLookAhead):t};var yt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function wt(e,t,n,r){var o,i,a=e.doc,c=a.mode,s=Ge(a,(t=ut(a,t)).line),u=mt(e,t.line,n),l=new $e(s.text,e.options.tabSize,u);for(r&&(i=[]);(r||l.pose.options.maxHighlightLength?(c=!1,a&>(e,t,r,f.pos),f.pos=t.length,s=null):s=Ot(bt(n,f,r.state,p),i),p){var d=p[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!c||l!=s){for(;u=t:i.to>t);(r||(r=[])).push(new xt(a,i.from,c?null:i.to))}}return r}(n,o,a),s=function(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var c=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&c)for(var y=0;yt)&&(!n||Dt(n,i.marker)<0)&&(n=i.marker)}return n}function Bt(e,t,n,r,o){var i=Ge(e,t),a=kt&&i.markedSpans;if(a)for(var c=0;c=0&&f<=0||l<=0&&f>=0)&&(l<=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?rt(u.to,n)>=0:rt(u.to,n)>0)||l>=0&&(s.marker.inclusiveRight&&o.inclusiveLeft?rt(u.from,r)<=0:rt(u.from,r)<0)))return!0}}}function zt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Ut(e,t){var n=Ge(e,t),r=zt(n);return n==r?t:Ze(r)}function Wt(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!Ht(e,r))return t;for(;n=Rt(r);)r=n.find(1,!0).line;return Ze(r)+1}function Ht(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};function Kt(e){e.parent=null,Pt(e)}Gt.prototype.lineNo=function(){return Ze(this)},we(Gt);var Xt={},Jt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Xt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=A("span",null,null,u?"padding-right: .1px":null),r={pre:A("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=tn,Ie(e.display.measure)&&(a=fe(i,e.doc.direction))&&(r.addToken=nn(r.addToken,a)),r.map=[],on(i,r,ht(e,i,t!=e.display.externalMeasured&&Ze(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=N(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=N(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(u){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=N(r.pre.className,r.textClass||"")),r}function en(e){var t=I("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function tn(t,n,r,o,i,a,u){if(n){var l,f=t.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;ou&&f.from<=u);p++);if(f.to>=l)return e(n,r,o,i,a,c,s);e(n,r.slice(0,f.to-u),o,i,null,c,s),i=null,r=r.slice(f.to-u),u=f.to}}}function rn(t,n,r,o){var i=!o&&r.widgetNode;i&&t.map.push(t.pos,t.pos+n,i),!o&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(e.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=n,t.trailingSpace=!1}function on(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,c,s,u,l,f,p,d=o.length,h=0,m=1,g="",v=0;;){if(v==h){s=u=l=c="",p=null,f=null,v=1/0;for(var b=[],y=void 0,w=0;wh||_.collapsed&&O.to==h&&O.from==h)){if(null!=O.to&&O.to!=h&&v>O.to&&(v=O.to,u=""),_.className&&(s+=" "+_.className),_.css&&(c=(c?c+";":"")+_.css),_.startStyle&&O.from==h&&(l+=" "+_.startStyle),_.endStyle&&O.to==v&&(y||(y=[])).push(_.endStyle,O.to),_.title&&((p||(p={})).title=_.title),_.attributes)for(var j in _.attributes)(p||(p={}))[j]=_.attributes[j];_.collapsed&&(!f||Dt(f.marker,_)<0)&&(f=O)}else O.from>h&&v>O.from&&(v=O.from)}if(y)for(var k=0;k=d)break;for(var S=Math.min(d,v);;){if(g){var C=h+g.length;if(!f){var T=C>S?g.slice(0,S-h):g;t.addToken(t,T,a?a+s:s,l,h+T.length==v?u:"",c,p)}if(C>=S){g=g.slice(S-h),h=S;break}h=C,l=""}g=o.slice(i,i=n[m++]),a=Zt(n[m++],t.cm.options)}}else for(var E=1;En)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function An(e,t,n,r){return Mn(e,Dn(e,t),n,r)}function Ln(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&i.push((s.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Fn(t.map,n,r),a=i.node,u=i.start,l=i.end,f=i.collapse;if(3==a.nodeType){for(var p=0;p<4;p++){for(;u&&ie(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+l1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var d;u>0&&(f=r="right"),o=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==r?d.length-1:0]:a.getBoundingClientRect()}if(c&&s<9&&!u&&(!o||!o.left&&!o.right)){var h=a.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+ar(e.display),top:h.top,bottom:h.bottom}:Rn}for(var m=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;yt)&&(o=(i=s-c)-1,t>=s&&(a="right")),null!=o){if(r=e[u+2],c==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==s-c)for(;u=0&&(n=e[o]).left==n.right;o--);return n}function zn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(s=r.text.length,u="before"):s<=0&&(s=0,u="after"),!c)return a("before"==u?s-1:s,"before"==u);function l(e,t,n){return a(n?e-1:e,1==c[t].level!=n)}var f=ue(c,s,u),p=se,d=l(s,f,"before"==u);return null!=p&&(d.other=l(s,p,"before"!=u)),d}function Xn(e,t){var n=0;t=ut(e.doc,t),e.options.lineWrapping||(n=ar(e.display)*t.ch);var r=Ge(e.doc,t.line),o=Vt(r)+xn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Jn(e,t,n,r,o){var i=nt(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Zn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var o=Qe(r,n),i=r.first+r.size-1;if(o>i)return Jn(r.first+r.size-1,Ge(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,o);;){var c=nr(e,a,o,t,n),s=Ft(a,c.ch+(c.xRel>0||c.outside>0?1:0));if(!s)return c;var u=s.find(1);if(u.line==o)return u;a=Ge(r,o=u.line)}}function Qn(e,t,n,r){r-=Vn(t);var o=t.text.length,i=ce((function(t){return Mn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ce((function(t){return Mn(e,n,t).top>r}),i,o)}}function er(e,t,n,r){return n||(n=Dn(e,t)),Qn(e,t,n,Yn(e,t,Mn(e,n,r),"line").top)}function tr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function nr(e,t,n,r,o){o-=Vt(t);var i=Dn(e,t),a=Vn(t),c=0,s=t.text.length,u=!0,l=fe(t,e.doc.direction);if(l){var f=(e.options.lineWrapping?or:rr)(e,t,n,i,l,r,o);c=(u=1!=f.level)?f.from:f.to-1,s=u?f.to:f.from-1}var p,d,h=null,m=null,g=ce((function(t){var n=Mn(e,i,t);return n.top+=a,n.bottom+=a,!!tr(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),c,s),v=!1;if(m){var b=r-m.left=w.bottom?1:0}return Jn(n,g=ae(t.text,g,1),d,v,r-p)}function rr(e,t,n,r,o,i,a){var c=ce((function(c){var s=o[c],u=1!=s.level;return tr(Kn(e,nt(n,u?s.to:s.from,u?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),s=o[c];if(c>0){var u=1!=s.level,l=Kn(e,nt(n,u?s.from:s.to,u?"after":"before"),"line",t,r);tr(l,i,a,!0)&&l.top>a&&(s=o[c-1])}return s}function or(e,t,n,r,o,i,a){var c=Qn(e,t,r,a),s=c.begin,u=c.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var l=null,f=null,p=0;p=u||d.to<=s)){var h=Mn(e,r,1!=d.level?Math.min(u,d.to)-1:Math.max(s,d.from)).right,m=hm)&&(l=d,f=m)}}return l||(l=o[o.length-1]),l.fromu&&(l={from:l.from,to:u,level:l.level}),l}function ir(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Nn){Nn=I("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Nn.appendChild(e.createTextNode("x")),Nn.appendChild(I("br"));Nn.appendChild(e.createTextNode("x"))}P(t.measure,Nn);var r=Nn.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),E(t.measure),r||1}function ar(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=I("span","xxxxxxxxxx"),n=I("pre",[t],"CodeMirror-line-like");P(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function cr(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var c=e.display.gutterSpecs[a].className;n[c]=i.offsetLeft+i.clientLeft+o,r[c]=i.clientWidth}return{fixedPos:sr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function sr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ur(e){var t=ir(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/ar(e.display)-3);return function(o){if(Ht(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(s=Ge(e.doc,u.line).text).length==u.ch){var l=z(s,s.length,e.options.tabSize)-s.length;u=nt(u.line,Math.max(0,Math.round((i-Cn(e.display).left)/ar(e.display))-l))}return u}function pr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)kt&&Ut(e.doc,t)o.viewFrom?mr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)mr(e);else if(t<=o.viewFrom){var i=gr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):mr(e)}else if(n>=o.viewTo){var a=gr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):mr(e)}else{var c=gr(e,t,t,-1),s=gr(e,n,n+r,1);c&&s?(o.view=o.view.slice(0,c.index).concat(cn(e,c.lineN,s.lineN)).concat(o.view.slice(s.index)),o.viewTo+=r):mr(e)}var u=o.externalMeasured;u&&(n=o.lineN&&t=r.viewTo)){var i=r.view[pr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==W(a,n)&&a.push(n)}}}function mr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gr(e,t,n,r){var o,i=pr(e,t),a=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var c=e.display.viewFrom,s=0;s0){if(i==a.length-1)return null;o=c+a[i].size-t,i++}else o=c-t;t+=o,n+=o}for(;Ut(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r=t.display.viewTo||u.to().line0?a:e.defaultCharWidth())+"px"}if(r.other){var c=n.appendChild(I("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));c.style.display="",c.style.left=r.other.left+"px",c.style.top=r.other.top+"px",c.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Or(e,t){return e.top-t.top||e.left-t.left}function _r(t,n,r){var o=t.display,i=t.doc,a=e.createDocumentFragment(),c=Cn(t.display),s=c.left,u=Math.max(o.sizerWidth,En(t)-o.sizer.offsetLeft)-c.right,l="ltr"==i.direction;function f(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),a.appendChild(I("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?u-e:n)+"px;\n height: "+(r-t)+"px"))}function p(e,n,r){var o,a,c=Ge(i,e),p=c.text.length;function d(n,r){return Gn(t,nt(e,n),"div",c,r)}function h(e,n,r){var o=er(t,c,null,e),i="ltr"==n==("after"==r)?"left":"right";return d("after"==r?o.begin:o.end-(/\s/.test(c.text.charAt(o.end-1))?2:1),i)[i]}var m=fe(c,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;it||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(m,n||0,null==r?p:r,(function(e,t,i,c){var g="ltr"==i,v=d(e,g?"left":"right"),b=d(t-1,g?"right":"left"),y=null==n&&0==e,w=null==r&&t==p,O=0==c,_=!m||c==m.length-1;if(b.top-v.top<=3){var j=(l?w:y)&&_,k=(l?y:w)&&O?s:(g?v:b).left,x=j?u:(g?b:v).right;f(k,v.top,x-k,v.bottom)}else{var S,C,T,E;g?(S=l&&y&&O?s:v.left,C=l?u:h(e,i,"before"),T=l?s:h(t,i,"after"),E=l&&w&&_?u:b.right):(S=l?h(e,i,"before"):s,C=!l&&y&&O?u:v.right,T=!l&&w&&_?s:b.left,E=l?h(t,i,"after"):u),f(S,v.top,C-S,v.bottom),v.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Cr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Sr(e))}function xr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Cr(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,M(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),u&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),jr(e))}function Cr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Tr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,i=0,a=0;a.005||m<-.005)&&(oe.display.sizerWidth){var v=Math.ceil(p/ar(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(t.scroller.scrollTop+=i)}function Er(e){if(e.widgets)for(var t=0;t=a&&(i=Qe(t,Vt(Ge(t,s))-e.wrapper.clientHeight),a=s)}return{from:i,to:Math.max(a,i+1)}}function Ir(e,t){var n=e.display,r=ir(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Pn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var c=e.doc.height+Sn(n),s=t.topc-r;if(t.topo+i){var l=Math.min(t.top,(u?c:t.bottom)-i);l!=o&&(a.scrollTop=l)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,d=En(e)-n.gutters.offsetWidth,h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.leftd+p-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Ar(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Dr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,Xn(e,t.from),Xn(e,t.to),t.margin))}function Nr(e,t,n,r){var o=Ir(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Dr(e,o.scrollLeft,o.scrollTop)}function Rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||lo(e,{top:t}),Fr(e,t,!0),r&&lo(e),io(e,100))}function Fr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Br(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,ho(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Sn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ur=function(e,t,n){this.cm=n;var r=this.vert=I("div",[I("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=I("div",[I("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,c&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ur.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ur.prototype.zeroWidthHack=function(){var e=w&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},Ur.prototype.enableZeroWidthBar=function(t,n,r){t.style.pointerEvents="auto",n.set(1e3,(function o(){var i=t.getBoundingClientRect();("vert"==r?e.elementFromPoint(i.right-1,(i.top+i.bottom)/2):e.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":n.set(1e3,o)}))},Ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Wr=function(){};function Hr(e,t){t||(t=zr(e));var n=e.display.barWidth,r=e.display.barHeight;qr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Tr(e),qr(e,zr(e)),n=e.display.barWidth,r=e.display.barHeight}function qr(e,t){var n=e.display,r=n.scrollbars.update(t);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&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Wr.prototype.update=function(){return{bottom:0,right:0}},Wr.prototype.setScrollLeft=function(){},Wr.prototype.setScrollTop=function(){},Wr.prototype.clear=function(){};var Vr={native:Ur,null:Wr};function Yr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Vr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Br(e,t):Rr(e,t)}),e),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)}var $r=0;function Gr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++$r,markArrays:null},t=e.curOp,sn?sn.ops.push(t):t.ownsGroup=sn={ops:[t],delayedCallbacks:[]}}function Kr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new co(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&so(e.cm,e.update)}function Zr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Tr(t),e.barMeasure=zr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-En(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(r.innerHeight||e.documentElement.clientHeight)&&(a=!1),null!=a&&!g){var c=I("div","\u200b",null,"position: absolute;\n top: "+(n.top-o.viewOffset-xn(t.display))+"px;\n height: "+(n.bottom-n.top+Tn(t)+o.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");t.display.lineSpace.appendChild(c),c.scrollIntoView(a),t.display.lineSpace.removeChild(c)}}}(n,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?nt(t.line,t.ch+1,"before"):t,t=t.ch?nt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,c=Kn(e,t),s=n&&n!=t?Kn(e,n):c,u=Ir(e,o={left:Math.min(c.left,s.left),top:Math.min(c.top,s.top)-r,right:Math.max(c.left,s.left),bottom:Math.max(c.bottom,s.bottom)+r}),l=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Rr(e,u.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(n,ut(o,t.scrollToPos.from),ut(o,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,a=t.maybeUnhiddenMarkers;if(i)for(var c=0;c=e.display.viewTo)){var n=+new Date+e.options.workTime,r=mt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,c=i.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,s=dt(e,i,r,!0);c&&(r.state=c),i.styles=s.styles;var u=i.styleClasses,l=s.classes;l?i.styleClasses=l:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=l&&(!u||!l||u.bgClass!=l.bgClass||u.textClass!=l.textClass),p=0;!f&&pn)return io(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&to(e,(function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==vr(t))return!1;mo(t)&&(mr(t),n.dims=cr(t));var i=o.first+o.size,a=Math.max(n.visible.from-t.options.viewportMargin,o.first),c=Math.min(i,n.visible.to+t.options.viewportMargin);r.viewFromc&&r.viewTo-c<20&&(c=Math.min(i,r.viewTo)),kt&&(a=Ut(t.doc,a),c=Wt(t.doc,c));var s=a!=r.viewFrom||c!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=cn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=cn(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,pr(e,n)))),r.viewTo=n}(t,a,c),r.viewOffset=Vt(Ge(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var l=vr(t);if(!s&&0==l&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var f=function(e){if(e.hasFocus())return null;var t=D();if(!t||!L(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&L(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(t);return l>4&&(r.lineDiv.style.display="none"),function(t,n,r){var o=t.display,i=t.options.lineNumbers,a=o.lineDiv,c=a.firstChild;function s(e){var n=e.nextSibling;return u&&w&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var l=o.view,f=o.viewFrom,p=0;p-1&&(h=!1),pn(t,d,f,r)),h&&(E(d.lineNumber),d.lineNumber.appendChild(e.createTextNode(tt(t.options,f)))),c=d.node.nextSibling}else{var m=yn(t,d,f,r);a.insertBefore(m,c)}f+=d.size}for(;c;)c=s(c)}(t,r.updateLineNumbers,n.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=D()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&L(e.body,t.anchorNode)&&L(e.body,t.focusNode))){var n=window.getSelection(),r=e.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(t.focusNode,t.focusOffset)}}(f),E(r.cursorDiv),E(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,io(t,400)),r.updateLineNumbers=null,!0}function uo(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=En(e))r&&(t.visible=Pr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-Pn(e),n.top)}),t.visible=Pr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!so(e,t))break;Tr(e);var o=zr(e);br(e),Hr(e,o),po(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,t){var n=new co(e,t);if(so(e,n)){Tr(e),uo(e,n);var r=zr(e);br(e),Hr(e,r),po(e,r),n.finish()}}function fo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ln(e,"gutterChanged",e)}function po(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tn(e)+"px"}function ho(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=sr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a=102&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=_o(t),o=n.x,i=n.y,a=Oo;0===t.deltaMode&&(o=t.deltaX,i=t.deltaY,a=1);var c=e.display,s=c.scroller,l=s.scrollWidth>s.clientWidth,h=s.scrollHeight>s.clientHeight;if(o&&l||i&&h){if(i&&w&&u)e:for(var m=t.target,g=c.view;m!=s;m=m.parentNode)for(var v=0;v=0&&rt(e,r.to())<=0)return n}return-1};var So=function(e,t){this.anchor=e,this.head=t};function Co(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return rt(e.from(),t.from())})),n=W(t,o);for(var i=1;i0:s>=0){var u=ct(c.from(),a.from()),l=at(c.to(),a.to()),f=c.empty()?a.from()==a.head:c.from()==c.head;i<=n&&--n,t.splice(--i,2,new So(f?l:u,f?u:l))}}return new xo(t,n)}function To(e,t){return new xo([new So(e,t||e)],0)}function Eo(e){return e.text?nt(e.from.line+e.text.length-1,X(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Po(e,t){if(rt(e,t.from)<0)return e;if(rt(e,t.to)<=0)return Eo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Eo(t).ch-t.to.ch),nt(n,r)}function Io(e,t){for(var n=[],r=0;r1&&e.remove(c.line+1,h-1),e.insert(c.line+1,v)}ln(e,"change",e,t)}function Ro(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;ac-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Wo(e.done),X(e.done)):e.done.length&&!X(e.done).ranges?X(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),X(e.done)):void 0}(o,o.lastOp==r)))a=X(i.changes),0==rt(t.from,t.to)&&0==rt(t.from,a.to)?a.to=Eo(t):i.changes.push(Uo(e,t));else{var s=X(o.done);for(s&&s.ranges||Vo(e.sel,o.done),i={changes:[Uo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=c,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function qo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,X(o.done),t))?o.done[o.done.length-1]=t:Vo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Wo(o.undone)}function Vo(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Yo(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function $o(e){if(!e)return null;for(var t,n=0;n-1&&(X(c)[f]=u[f],delete u[f])}}}return r}function Xo(e,t,n,r){if(r){var o=e.anchor;if(n){var i=rt(t,o)<0;i!=rt(n,o)<0?(o=t,t=n):i!=rt(t,n)<0&&(t=n)}return new So(o,t)}return new So(n||t,t)}function Jo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ni(e,new xo([Xo(e.sel.primary(),t,n,o)],0),r)}function Zo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:c.to>t.ch))){if(o&&(ge(s,"beforeCursorEnter"),s.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var f=s.find(r<0?1:-1),p=void 0;if((r<0?l:u)&&(f=ui(e,f,-r,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(p=rt(f,n))&&(r<0?p<0:p>0))return ci(e,f,t,r,o)}var d=s.find(r<0?-1:1);return(r<0?u:l)&&(d=ui(e,d,r,d.line==t.line?i:null)),d?ci(e,d,t,r,o):null}}return t}function si(e,t,n,r,o){var i=r||1,a=ci(e,t,n,i,o)||!o&&ci(e,t,n,i,!0)||ci(e,t,n,-i,o)||!o&&ci(e,t,n,-i,!0);return a||(e.cantEdit=!0,nt(e.first,0))}function ui(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ut(e,nt(t.line-1)):null:n>0&&t.ch==(r||Ge(e,t.line)).text.length?t.line0)){var l=[s,1],f=rt(u.from,c.from),p=rt(u.to,c.to);(f<0||!a.inclusiveLeft&&!f)&&l.push({from:u.from,to:c.from}),(p>0||!a.inclusiveRight&&!p)&&l.push({from:c.to,to:u.to}),o.splice.apply(o,l),s+=l.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else di(e,t)}}function di(e,t){if(1!=t.text.length||""!=t.text[0]||0!=rt(t.from,t.to)){var n=Io(e,t);Ho(e,t,n,e.cm?e.cm.curOp.id:NaN),gi(e,t,n,Tt(e,t));var r=[];Ro(e,(function(e,n){n||-1!=W(r,e.history)||(wi(e.history,t),r.push(e.history)),gi(e,t,null,Tt(e,t))}))}}function hi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,c="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,u=0;u=0;--d){var h=p(d);if(h)return h.v}}}}function mi(e,t){if(0!=t&&(e.first+=t,e.sel=new xo(J(e.sel.ranges,(function(e){return new So(nt(e.anchor.line+t,e.anchor.ch),nt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:nt(i,Ge(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),n||(n=Io(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,c=!1,s=i.line;e.options.lineWrapping||(s=Ze(zt(Ge(r,i.line))),r.iter(s,a.line+1,(function(e){if(e==o.maxLine)return c=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&be(e),No(r,t,n,ur(e)),e.options.lineWrapping||(r.iter(s,i.line+t.text.length,(function(e){var t=Yt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,c=!1)})),c&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=Ge(e,r).stateAfter;if(o&&(!(o instanceof ft)||r+o.lookAhead1||!(this.children[0]instanceof _i))){var c=[];this.collapse(c),this.children=[new _i(c)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,c=a;c10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=A("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Bt(e,t.line,t,n,i)||t.line!=n.line&&Bt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!0}i.addToHistory&&Ho(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var c,s=t.line,u=e.cm;if(e.iter(s,n.line+1,(function(r){u&&i.collapsed&&!u.options.lineWrapping&&zt(r)==u.display.maxLine&&(c=!0),i.collapsed&&s!=t.line&&Je(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new xt(i,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&Je(t,0)})),i.clearOnEnter&&de(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(jt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Si,i.atomic=!0),u){if(c&&(u.curOp.updateMaxLine=!0),i.collapsed)dr(u,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var l=t.line;l<=n.line;l++)hr(u,l,"text");i.atomic&&ii(u.doc),ln(u,"markerAdded",u,i)}return i}Ci.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),ye(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ii(e.doc)),e&&ln(e,"markerCleared",e,this,r,o),t&&Kr(e),this.parent&&this.parent.clear()}},Ci.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;s--)pi(this,r[s]);c?ti(this,c):this.cm&&Lr(this.cm)})),undo:oo((function(){hi(this,"undo")})),redo:oo((function(){hi(this,"redo")})),undoSelection:oo((function(){hi(this,"undo",!0)})),redoSelection:oo((function(){hi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ut(this,e),t=ut(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var c=0;c=s.to||null==s.from&&o!=e.line||null!=s.from&&o==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n})),ut(this,nt(n,t))},indexFromPos:function(e){var t=(e=ut(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ri(t.doc,To(n,n)),p)for(var d=0;d=0;t--)vi(e.doc,"",r[t].from,r[t].to,"+delete");Lr(e)}))}function ea(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ta(e,t,n){var r=ea(e,t.ch,n);return null==r?null:new nt(t.line,r,n<0?"after":"before")}function na(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=fe(n,t.doc.direction);if(i){var a,c=o<0?X(i):i[0],s=o<0==(1==c.level)?"after":"before";if(c.level>0||"rtl"==t.doc.direction){var u=Dn(t,n);a=o<0?n.text.length-1:0;var l=Mn(t,u,a).top;a=ce((function(e){return Mn(t,u,e).top==l}),o<0==(1==c.level)?c.from:c.to-1,a),"before"==s&&(a=ea(n,a,1))}else a=o<0?c.to:c.from;return new nt(r,a,s)}}return new nt(r,o<0?n.text.length:0,o<0?"before":"after")}Vi.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"},Vi.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"},Vi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vi.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"]},Vi.default=w?Vi.macDefault:Vi.pcDefault;var ra={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Qi(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new nt(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),nt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ge(e.doc,o.line-1).text;a&&(o=new nt(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),nt(o.line-1,a.length-1),o,"+transpose"))}n.push(new So(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return to(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(rt((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(rt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,a=no(e,(function(t){u&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:xr(e)),me(o.wrapper.ownerDocument,"mouseup",a),me(o.wrapper.ownerDocument,"mousemove",l),me(o.scroller,"dragstart",f),me(o.scroller,"drop",a),i||(Oe(t),r.addNew||Jo(e.doc,n,null,null,r.extend),u&&!h||c&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),l=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};u&&(o.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,de(o.wrapper.ownerDocument,"mouseup",a),de(o.wrapper.ownerDocument,"mousemove",l),de(o.scroller,"dragstart",f),de(o.scroller,"drop",a),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){c&&xr(e);var o=e.display,i=e.doc;Oe(t);var a,s,u=i.sel,l=u.ranges;if(r.addNew&&!r.extend?(s=i.sel.contains(n),a=s>-1?l[s]:new So(n,n)):(a=i.sel.primary(),s=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new So(n,n)),n=fr(e,t,!0,!0),s=-1;else{var f=ya(e,n,r.unit);a=r.extend?Xo(a,f.anchor,f.head,r.extend):f}r.addNew?-1==s?(s=l.length,ni(i,Co(e,l.concat([a]),s),{scroll:!1,origin:"*mouse"})):l.length>1&&l[s].empty()&&"char"==r.unit&&!r.extend?(ni(i,Co(e,l.slice(0,s).concat(l.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=i.sel):Qo(i,s,a,V):(s=0,ni(i,new xo([a],0),V),u=i.sel);var p=n;function d(t){if(0!=rt(p,t))if(p=t,"rectangle"==r.unit){for(var o=[],c=e.options.tabSize,l=z(Ge(i,n.line).text,n.ch,c),f=z(Ge(i,t.line).text,t.ch,c),d=Math.min(l,f),h=Math.max(l,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ge(i,m).text,b=$(v,d,c);d==h?o.push(new So(nt(m,b),nt(m,b))):v.length>b&&o.push(new So(nt(m,b),nt(m,$(v,h,c))))}o.length||o.push(new So(n,n)),ni(i,Co(e,u.ranges.slice(0,s).concat(o),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,w=a,O=ya(e,t,r.unit),_=w.anchor;rt(O.anchor,_)>0?(y=O.head,_=ct(w.from(),O.anchor)):(y=O.anchor,_=at(w.to(),O.head));var j=u.ranges.slice(0);j[s]=function(e,t){var n=t.anchor,r=t.head,o=Ge(e.doc,n.line);if(0==rt(n,r)&&n.sticky==r.sticky)return t;var i=fe(o);if(!i)return t;var a=ue(i,n.ch,n.sticky),c=i[a];if(c.from!=n.ch&&c.to!=n.ch)return t;var s,u=a+(c.from==n.ch==(1!=c.level)?0:1);if(0==u||u==i.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=ue(i,r.ch,r.sticky),f=l-a||(r.ch-n.ch)*(1==c.level?-1:1);s=l==u-1||l==u?f<0:f>0}var p=i[u+(s?-1:0)],d=s==(1==p.level),h=d?p.from:p.to,m=d?"after":"before";return n.ch==h&&n.sticky==m?t:new So(new nt(n.line,h,m),r)}(e,new So(ut(i,_),y)),ni(i,Co(e,j,s),V)}}var h=o.wrapper.getBoundingClientRect(),m=0;function g(t){e.state.selectingText=!1,m=1/0,t&&(Oe(t),o.input.focus()),me(o.wrapper.ownerDocument,"mousemove",v),me(o.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var v=no(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var a=++m,c=fr(e,n,!0,"rectangle"==r.unit);if(c)if(0!=rt(c,p)){e.curOp.focus=D(),d(c);var s=Pr(o,i);(c.line>=s.to||c.lineh.bottom?20:0;u&&setTimeout(no(e,(function(){m==a&&(o.scroller.scrollTop+=u,t(n))})),50)}}(t):g(t)})),b=no(e,g);e.state.selectingText=b,de(o.wrapper.ownerDocument,"mousemove",v),de(o.wrapper.ownerDocument,"mouseup",b)}(e,r,t,i)}(t,r,i,e):xe(e)==n.scroller&&Oe(e):2==o?(r&&Jo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(x?t.display.input.onContextMenu(e):xr(t)))}}function ya(e,t,n){if("char"==n)return new So(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new So(nt(t.line,0),ut(e.doc,nt(t.line+1,0)));var r=n(e,t);return new So(r.from,r.to)}function wa(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Oe(t);var a=e.display,c=a.lineDiv.getBoundingClientRect();if(i>c.bottom||!ye(e,n))return je(t);i-=c.top-a.viewOffset;for(var s=0;s=o)return ge(e,n,e,Qe(e.doc,i),e.display.gutterSpecs[s].className,t),je(t)}}function Oa(e,t){return wa(e,t,"gutterClick",!0)}function _a(e,t){kn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&wa(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||x||e.display.input.onContextMenu(t)}function ja(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wn(e)}va.prototype.compare=function(e,t,n){return this.time+400>e&&0==rt(t,this.pos)&&n==this.button};var ka={toString:function(){return"CodeMirror.Init"}},xa={},Sa={};function Ca(e,t,n){if(!t!=!(n&&n!=ka)){var r=e.display.dragFunctions,o=t?de:me;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ta(e){e.options.lineWrapping?(M(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),$t(e)),lr(e),dr(e),Wn(e),setTimeout((function(){return Hr(e)}),100)}function Ea(t,n){var r=this;if(!(this instanceof Ea))return new Ea(t,n);this.options=n=n?B(n):{},B(xa,n,!1);var o=n.value;"string"==typeof o?o=new Li(o,n.mode,null,n.lineSeparator,n.direction):n.mode&&(o.modeOption=n.mode),this.doc=o;var i=new Ea.inputStyles[n.inputStyle](this),a=this.display=new yo(t,o,i,n);for(var l in a.wrapper.CodeMirror=this,ja(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Yr(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 U,keySeq:null,specialChars:null},n.autofocus&&!y&&a.input.focus(),c&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(t){var n=t.display;de(n.scroller,"mousedown",no(t,ba)),de(n.scroller,"dblclick",c&&s<11?no(t,(function(e){if(!ve(t,e)){var n=fr(t,e);if(n&&!Oa(t,e)&&!kn(t.display,e)){Oe(e);var r=t.findWordAt(n);Jo(t.doc,r.anchor,r.head)}}})):function(e){return ve(t,e)||Oe(e)}),de(n.scroller,"contextmenu",(function(e){return _a(t,e)})),de(n.input.getField(),"contextmenu",(function(e){n.scroller.contains(e.target)||_a(t,e)}));var r,o={end:0};function i(){n.activeTouch&&(r=setTimeout((function(){return n.activeTouch=null}),1e3),(o=n.activeTouch).end=+new Date)}function a(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}de(n.scroller,"touchstart",(function(e){if(!ve(t,e)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(e)&&!Oa(t,e)){n.input.ensurePolled(),clearTimeout(r);var i=+new Date;n.activeTouch={start:i,moved:!1,prev:i-o.end<=300?o:null},1==e.touches.length&&(n.activeTouch.left=e.touches[0].pageX,n.activeTouch.top=e.touches[0].pageY)}})),de(n.scroller,"touchmove",(function(){n.activeTouch&&(n.activeTouch.moved=!0)})),de(n.scroller,"touchend",(function(e){var r=n.activeTouch;if(r&&!kn(n,e)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,c=t.coordsChar(n.activeTouch,"page");o=!r.prev||a(r,r.prev)?new So(c,c):!r.prev.prev||a(r,r.prev.prev)?t.findWordAt(c):new So(nt(c.line,0),ut(t.doc,nt(c.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),Oe(e)}i()})),de(n.scroller,"touchcancel",i),de(n.scroller,"scroll",(function(){n.scroller.clientHeight&&(Rr(t,n.scroller.scrollTop),Br(t,n.scroller.scrollLeft,!0),ge(t,"scroll",t))})),de(n.scroller,"mousewheel",(function(e){return ko(t,e)})),de(n.scroller,"DOMMouseScroll",(function(e){return ko(t,e)})),de(n.wrapper,"scroll",(function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0})),n.dragFunctions={enter:function(e){ve(t,e)||ke(e)},over:function(n){ve(t,n)||(function(t,n){var r=fr(t,n);if(r){var o=e.createDocumentFragment();wr(t,r,o),t.display.dragCursor||(t.display.dragCursor=I("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),P(t.display.dragCursor,o)}}(t,n),ke(n))},start:function(e){return function(e,t){if(c&&(!e.state.draggingText||+new Date-Di<100))ke(t);else if(!ve(e,t)&&!kn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=I("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(t,e)},drop:no(t,Mi),leave:function(e){ve(t,e)||Ni(t)}};var u=n.input.getField();de(u,"keyup",(function(e){return da.call(t,e)})),de(u,"keydown",no(t,pa)),de(u,"keypress",no(t,ha)),de(u,"focus",(function(e){return Sr(t,e)})),de(u,"blur",(function(e){return Cr(t,e)}))}(this),Bi(),Gr(this),this.curOp.forceUpdate=!0,Fo(this,o),n.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Sr(r)}),20):Cr(this),Sa)Sa.hasOwnProperty(l)&&Sa[l](this,n[l],ka);mo(this),n.finishInit&&n.finishInit(this);for(var f=0;f150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?z(Ge(i,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/a);d;--d)p+=a,f+="\t";if(pa,s=Le(t),u=null;if(c&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==t){if(r.ranges.length%Aa.text.length==0){u=[];for(var l=0;l=0;p--){var d=r.ranges[p],h=d.from(),m=d.to();d.empty()&&(n&&n>0?h=nt(h.line,h.ch-n):e.state.overwrite&&!c?m=nt(m.line,Math.min(Ge(i,m.line).text.length,m.ch+X(s).length)):c&&Aa&&Aa.lineWise&&Aa.text.join("\n")==s.join("\n")&&(h=m=nt(h.line,0)));var g={from:h,to:m,text:u?u[p%u.length]:s,origin:o||(c?"paste":e.state.cutIncoming>a?"cut":"+input")};pi(e.doc,g),ln(e,"inputRead",e,g)}t&&!c&&Na(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ma(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||to(t,(function(){return Da(t,n,0,null,"paste")})),!0}function Na(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var c=0;c-1){a=Ia(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ge(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ia(e,o.head.line,"smart"));a&&ln(e,"electricInput",e,o.head.line)}}}function Ra(e){for(var t=[],n=[],r=0;r0?0:-1));if(isNaN(l))a=null;else{var f=n>0?l>=55296&&l<56320:l>=56320&&l<57343;a=new nt(t.line,Math.max(0,Math.min(c.text.length,t.ch+n*(f?2:1))),-n)}}else a=o?function(e,t,n,r){var o=fe(t,e.doc.direction);if(!o)return ta(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=ue(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=l.begin)){var d=f?"before":"after";return new nt(n.line,p,d)}}var h=function(e,t,r){for(var i=function(e,t){return t?new nt(n.line,s(e,1),"before"):new nt(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=c?r.begin:s(r.end,-1);if(a.from<=u&&u0?l.end:s(l.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:o.length-1,r,u(g)))?null:m}(e.cm,c,t,n):ta(c,t,n);if(null==a){if(i||(u=t.line+s)=e.first+e.size||(t=new nt(u,t.ch,t.sticky),!(c=Ge(e,u))))return!1;t=na(o,e.cm,c,t.line,s)}else t=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var l=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||u(!d);d=!1){var h=c.text.charAt(t.ch)||"\n",m=ne(h,p)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||d||m||(m="s"),l&&l!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(l=m),n>0&&!u(!d))break}var g=si(e,t,i,a,!0);return ot(i,g)&&(g.hitSide=!0),g}function Ua(t,n,r,o){var i,a,c=t.doc,s=n.left;if("page"==o){var u=Math.min(t.display.wrapper.clientHeight,window.innerHeight||e.documentElement.clientHeight),l=Math.max(u-.5*ir(t.display),3);i=(r>0?n.bottom:n.top)+r*l}else"line"==o&&(i=r>0?n.bottom+3:n.top-3);for(;(a=Zn(t,s,i)).outside;){if(r<0?i<=0:i>=c.height){a.hitSide=!0;break}i+=5*r}return a}var Wa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Ln(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),o=In(n,r,t.line),i=fe(r,e.doc.direction),a="left";i&&(a=ue(i,t.ch)%2?"right":"left");var c=Fn(o.map,t.ch,a);return c.offset="right"==c.collapse?c.end:c.start,c}function qa(e,t){return t&&(e.bad=!0),e}function Va(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return qa(e.clipPos(nt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Ha(t,o)||{node:s[0].measure.map[2],offset:0},l=i.liner.firstLine()&&(a=nt(a.line-1,Ge(r.doc,a.line-1).length)),c.ch==Ge(r.doc,c.line).text.length&&c.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=pr(r,a.line))?(t=Ze(o.view[0].line),n=o.view[0].node):(t=Ze(o.view[e].line),n=o.view[e-1].node.nextSibling);var s,u,l=pr(r,c.line);if(l==o.view.length-1?(s=o.viewTo-1,u=o.lineDiv.lastChild):(s=Ze(o.view[l+1].line)-1,u=o.view[l+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,c=e.doc.lineSeparator(),s=!1;function u(){a&&(i+=c,s&&(i+=c),a=s=!1)}function l(e){e&&(u(),i+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void l(n);var i,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(nt(r,0),nt(o+1,0),(g=+p,function(e){return e.id==g}));return void(d.length&&(i=d[0].find(0))&&l(Ke(e.doc,i.from,i.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var m=0;m1&&p.length>1;)if(X(f)==X(p))f.pop(),p.pop(),s--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,m=f[0],g=p[0],v=Math.min(m.length,g.length);da.ch&&b.charCodeAt(b.length-h-1)==y.charCodeAt(y.length-h-1);)d--,h++;f[f.length-1]=b.slice(0,b.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var O=nt(t,d),_=nt(s,p.length?X(p).length-h:0);return f.length>1||f[0]||rt(O,_)?(vi(r.doc,f,O,_,"+input"),!0):void 0},Wa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Wa.prototype.reset=function(){this.forceCompositionEnd()},Wa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Wa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Wa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||to(this.cm,(function(){return dr(e.cm)}))},Wa.prototype.setUneditable=function(e){e.contentEditable="false"},Wa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||no(this.cm,Da)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Wa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Wa.prototype.onContextMenu=function(){},Wa.prototype.resetPosition=function(){},Wa.prototype.needsContentAttribute=!0;var $a=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};$a.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ve(r,e)){if(r.somethingSelected())La({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ra(r);La({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,q):(n.prevInput="",o.value=t.text.join("\n"),R(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),de(o,"input",(function(){c&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(o,"paste",(function(e){ve(r,e)||Ma(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(o,"cut",i),de(o,"copy",i),de(e.scroller,"paste",(function(t){if(!kn(e,t)&&!ve(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),de(e.lineSpace,"selectstart",(function(t){kn(e,t)||Oe(t)})),de(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},$a.prototype.createField=function(e){this.wrapper=Ba(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var o=Kn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},$a.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),c&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",c&&s>=9&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$a.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},$a.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||De(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(c&&s>=9&&this.hasSelection===o||w&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(r.length,o.length);a1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){c&&s>=9&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=fr(n,e),a=r.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&no(n,ni)(n.doc,To(i),q);var l,f=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(c?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(l=window.scrollY),r.input.focus(),u&&window.scrollTo(null,l),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=v,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),c&&s>=9&&g(),x){ke(e);var m=function(){me(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="\u200b"+(e?o.value:"");o.value="\u21da",o.value=i,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=f,c&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=a),null!=o.selectionStart)){(!c||c&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?no(n,li)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=ka&&o(e,t,n)}:o)}e.defineOption=n,e.Init=ka,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Lo(e)}),!0),n("indentUnit",2,Lo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Do(e),Wn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(nt(r,i))}r++}));for(var o=n.length-1;o>=0;o--)vi(e.doc,t,n[o],nt(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=ka&&e.refresh()})),n("specialCharPlaceholder",en,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!_),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){ja(e),bo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Zi(t),o=n!=ka&&Zi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ta,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=go(t,e.options.lineNumbers),bo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?sr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hr(e)}),!0),n("scrollbarStyle","native",(function(e){Yr(e),Hr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=go(e.options.gutters,t),bo(e)}),!0),n("firstLineNumber",1,bo,!0),n("lineNumberFormatter",(function(e){return e}),bo,!0),n("showCursorWhenSelecting",!1,br,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Cr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,br,!0),n("singleCursorHeightPerLine",!0,br,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Do,!0),n("addModeClass",!1,Do,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Do,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ea),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&no(this,t[e])(this,n,o),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Zi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ia(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var i=o.from(),a=o.to(),c=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=c;s0&&Qo(this.doc,r,new So(i,u[r].to()),q)}}})),getTokenAt:function(e,t){return wt(this,e,t)},getLineTokens:function(e,t){return wt(this,nt(e),t,!0)},getTokenTypeAt:function(e){e=ut(this.doc,e);var t,n=ht(this,Ge(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=Ge(this.doc,e)}else r=e;return Yn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Vt(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return ar(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,c,s=this.display,u=(e=Kn(this,ut(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var f=Math.max(s.wrapper.clientHeight,this.doc.height),p=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),l+t.offsetWidth>p&&(l=p-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==o?(l=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?l=0:"middle"==o&&(l=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&(i=this,a={left:l,top:u,right:l+t.offsetWidth,bottom:u+t.offsetHeight},null!=(c=Ir(i,a)).scrollTop&&Rr(i,c.scrollTop),null!=c.scrollLeft&&Br(i,c.scrollLeft))},triggerOnKeyDown:ro(pa),triggerOnKeyPress:ro(ha),triggerOnKeyUp:da,triggerOnMouseDown:ro(ba),execCommand:function(e){if(ra.hasOwnProperty(e))return ra[e].call(null,this)},triggerElectric:ro((function(e){Na(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=ut(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5||this.options.lineWrapping)&&lr(this),ge(this,"refresh",this)})),swapDoc:ro((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Fo(this,e),Wn(this),this.display.input.reset(),Dr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},we(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ea);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Li.prototype)Li.prototype.hasOwnProperty(Ka)&&W(Ga,Ka)<0&&(Ea.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Li.prototype[Ka]));return we(Li),Ea.inputStyles={textarea:$a,contenteditable:Wa},Ea.defineMode=function(e){Ea.defaults.mode||"null"==e||(Ea.defaults.mode=e),Be.apply(this,arguments)},Ea.defineMIME=function(e,t){Fe[e]=t},Ea.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(e,t){Ea.prototype[e]=t},Ea.defineDocExtension=function(e,t){Li.prototype[e]=t},Ea.fromTextArea=function(t,n){if((n=n?B(n):{}).value=t.value,!n.tabindex&&t.tabIndex&&(n.tabindex=t.tabIndex),!n.placeholder&&t.placeholder&&(n.placeholder=t.placeholder),null==n.autofocus){var r=D();n.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==e.body}function o(){t.value=s.getValue()}var i;if(t.form&&(de(t.form,"submit",o),!n.leaveSubmitMethodAlone)){var a=t.form;i=a.submit;try{var c=a.submit=function(){o(),a.submit=i,a.submit(),a.submit=c}}catch(e){}}n.finishInit=function(e){e.save=o,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,o(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(me(t.form,"submit",o),n.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Ea((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),n);return s},function(e){e.off=me,e.on=de,e.wheelEventPixels=jo,e.Doc=Li,e.splitLines=Le,e.countColumn=z,e.findColumn=$,e.isWordChar=te,e.Pass=H,e.signal=ge,e.Line=Gt,e.changeEnd=Eo,e.scrollbarModel=Vr,e.Pos=nt,e.cmpPos=rt,e.modes=Re,e.mimeModes=Fe,e.resolveMode=ze,e.getMode=Ue,e.modeExtensions=We,e.extendMode=He,e.copyState=qe,e.startState=Ye,e.innerMode=Ve,e.commands=ra,e.keyMap=Vi,e.keyName=Ji,e.isModifierKey=Ki,e.lookupKey=Gi,e.normalizeKeyMap=$i,e.StringStream=$e,e.SharedTextMarker=Ei,e.TextMarker=Ci,e.LineWidget=ki,e.e_preventDefault=Oe,e.e_stopPropagation=_e,e.e_stop=ke,e.addClass=M,e.contains=L,e.rmClass=T,e.keyNames=Ui}(Ea),Ea.version="5.65.5",Ea}()},function(e,t,n){var r=n(128);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Td=t.Tbody=t.Th=t.Tr=t.Thead=t.Table=void 0;var r,o=(r=n(1))&&r.__esModule?r:{default:r},i=n(699);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(){return(c=Object.assign||function(e){for(var t=1;tw},L=function(e){return function(e){var t=g[e].b;return m+t+y}(e)>O},D=function(e){return function(e){return x(e)<0}(e)||A(e)||function(e){return I(e)<0}(e)||L(e)},M=function(e){return!D(e)},N=["top","bottom","left","right"],R=[],F=0;F<4;F++){var B=N[F];M(B)&&R.push(B)}var z,U=!1,W=o!==r;return M(o)&&W?(U=!0,z=o):R.length>0&&D(o)&&D(r)&&(U=!0,z=R[0]),U?{isNewState:!0,newState:{place:z}}:{isNewState:!1,position:{left:parseInt(x(r)-k,10),top:parseInt(I(r)-j,10)}}}var S=function(e){var t=e.getBoundingClientRect(),n=t.height,r=t.width;return{height:parseInt(n,10),width:parseInt(r,10)}},C=function(e,t,n){var r=t.getBoundingClientRect(),o=r.top,i=r.left,a=S(t),c=a.width,s=a.height;return"float"===n?{mouseX:e.clientX,mouseY:e.clientY}:{mouseX:i+c/2,mouseY:o+s/2}},T=function(e,t,n,r,o){var i,a,c,s;return"float"===e?(i={l:-r/2,r:r/2,t:-(o+3+2),b:-3},c={l:-r/2,r:r/2,t:15,b:o+3+2+12},s={l:-(r+3+2),r:-3,t:-o/2,b:o/2},a={l:3,r:r+3+2,t:-o/2,b:o/2}):"solid"===e&&(i={l:-r/2,r:r/2,t:-(n/2+o+2),b:-n/2},c={l:-r/2,r:r/2,t:n/2,b:n/2+o+2},s={l:-(r+t/2+2),r:-t/2,t:-o/2,b:o/2},a={l:t/2,r:r+t/2+2,t:-o/2,b:o/2}),{top:i,bottom:c,left:s,right:a}},E=function(e){var t=0,n=0;for(var r in"[object String]"===Object.prototype.toString.apply(e)&&(e=JSON.parse(e.toString().replace(/'/g,'"'))),e)"top"===r?n-=parseInt(e[r],10):"bottom"===r?n+=parseInt(e[r],10):"left"===r?t-=parseInt(e[r],10):"right"===r&&(t+=parseInt(e[r],10));return{extraOffsetX:t,extraOffsetY:n}},P=function(e){for(var t=e;t;){var n=window.getComputedStyle(t);if("none"!==n.getPropertyValue("transform")||"transform"===n.getPropertyValue("will-change"))break;t=t.parentElement}return{parentTop:t&&t.getBoundingClientRect().top||0,parentLeft:t&&t.getBoundingClientRect().left||0}};function I(e,t,n,r){if(t)return t;if(null!=n)return n;if(null===n)return null;var i=//;return r&&"false"!==r&&i.test(e)?e.split(i).map((function(e,t){return o.a.createElement("span",{key:t,className:"multi-line"},e)})):e}function A(e){var t={};return Object.keys(e).filter((function(e){return/(^aria-\w+$|^role$)/.test(e)})).forEach((function(n){t[n]=e[n]})),t}function L(e){var t=e.length;return e.hasOwnProperty?Array.prototype.slice.call(e):new Array(t).fill().map((function(t){return e[t]}))}var D={dark:{text:"#fff",background:"#222",border:"transparent",arrow:"#222"},success:{text:"#fff",background:"#8DC572",border:"transparent",arrow:"#8DC572"},warning:{text:"#fff",background:"#F0AD4E",border:"transparent",arrow:"#F0AD4E"},error:{text:"#fff",background:"#BE6464",border:"transparent",arrow:"#BE6464"},info:{text:"#fff",background:"#337AB7",border:"transparent",arrow:"#337AB7"},light:{text:"#222",background:"#fff",border:"transparent",arrow:"#fff"}};function M(e,t,n,r){return function(e,t){var n=t.text,r=t.background,o=t.border,i=t.arrow;return"\n \t.".concat(e," {\n\t color: ").concat(n,";\n\t background: ").concat(r,";\n\t border: 1px solid ").concat(o,";\n \t}\n\n \t.").concat(e,".place-top {\n margin-top: -10px;\n }\n .").concat(e,".place-top::before {\n border-top: 8px solid ").concat(o,";\n }\n .").concat(e,".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(i,";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(e,".place-bottom {\n margin-top: 10px;\n }\n .").concat(e,".place-bottom::before {\n border-bottom: 8px solid ").concat(o,";\n }\n .").concat(e,".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(i,";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(e,".place-left {\n margin-left: -10px;\n }\n .").concat(e,".place-left::before {\n border-left: 8px solid ").concat(o,";\n }\n .").concat(e,".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(i,";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(e,".place-right {\n margin-left: 10px;\n }\n .").concat(e,".place-right::before {\n border-right: 8px solid ").concat(o,";\n }\n .").concat(e,".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(i,";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ")}(e,function(e,t,n){var r=e.text,o=e.background,i=e.border,a=e.arrow?e.arrow:e.background,c=function(e){return D[e]?d({},D[e]):void 0}(t);r&&(c.text=r);o&&(c.background=o);n&&(c.border=i||("light"===t?"black":"white"));a&&(c.arrow=a);return c}(t,n,r))}var N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function R(e,t){return e(t={exports:{}},t.exports),t.exports}var F=function(e){return e&&e.Math==Math&&e},B=F("object"==typeof globalThis&&globalThis)||F("object"==typeof window&&window)||F("object"==typeof self&&self)||F("object"==typeof N&&N)||function(){return this}()||Function("return this")(),z=function(e){try{return!!e()}catch(e){return!0}},U=!z((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),W={}.propertyIsEnumerable,H=Object.getOwnPropertyDescriptor,q={f:H&&!W.call({1:2},1)?function(e){var t=H(this,e);return!!t&&t.enumerable}:W},V=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Y={}.toString,$=function(e){return Y.call(e).slice(8,-1)},G="".split,K=z((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==$(e)?G.call(e,""):Object(e)}:Object,X=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},J=function(e){return K(X(e))},Z=function(e){return"object"==typeof e?null!==e:"function"==typeof e},Q=function(e,t){if(!Z(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!Z(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!Z(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!Z(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},ee=function(e){return Object(X(e))},te={}.hasOwnProperty,ne=function(e,t){return te.call(ee(e),t)},re=B.document,oe=Z(re)&&Z(re.createElement),ie=function(e){return oe?re.createElement(e):{}},ae=!U&&!z((function(){return 7!=Object.defineProperty(ie("div"),"a",{get:function(){return 7}}).a})),ce=Object.getOwnPropertyDescriptor,se={f:U?ce:function(e,t){if(e=J(e),t=Q(t,!0),ae)try{return ce(e,t)}catch(e){}if(ne(e,t))return V(!q.f.call(e,t),e[t])}},ue=function(e){if(!Z(e))throw TypeError(String(e)+" is not an object");return e},le=Object.defineProperty,fe={f:U?le:function(e,t,n){if(ue(e),t=Q(t,!0),ue(n),ae)try{return le(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},pe=U?function(e,t,n){return fe.f(e,t,V(1,n))}:function(e,t,n){return e[t]=n,e},de=function(e,t){try{pe(B,e,t)}catch(n){B[e]=t}return t},he=B["__core-js_shared__"]||de("__core-js_shared__",{}),me=Function.toString;"function"!=typeof he.inspectSource&&(he.inspectSource=function(e){return me.call(e)});var ge,ve,be,ye=he.inspectSource,we=B.WeakMap,Oe="function"==typeof we&&/native code/.test(ye(we)),_e=R((function(e){(e.exports=function(e,t){return he[e]||(he[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})})),je=0,ke=Math.random(),xe=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++je+ke).toString(36)},Se=_e("keys"),Ce=function(e){return Se[e]||(Se[e]=xe(e))},Te={},Ee=B.WeakMap;if(Oe||he.state){var Pe=he.state||(he.state=new Ee),Ie=Pe.get,Ae=Pe.has,Le=Pe.set;ge=function(e,t){if(Ae.call(Pe,e))throw new TypeError("Object already initialized");return t.facade=e,Le.call(Pe,e,t),t},ve=function(e){return Ie.call(Pe,e)||{}},be=function(e){return Ae.call(Pe,e)}}else{var De=Ce("state");Te[De]=!0,ge=function(e,t){if(ne(e,De))throw new TypeError("Object already initialized");return t.facade=e,pe(e,De,t),t},ve=function(e){return ne(e,De)?e[De]:{}},be=function(e){return ne(e,De)}}var Me,Ne,Re={set:ge,get:ve,has:be,enforce:function(e){return be(e)?ve(e):ge(e,{})},getterFor:function(e){return function(t){var n;if(!Z(t)||(n=ve(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Fe=R((function(e){var t=Re.get,n=Re.enforce,r=String(String).split("String");(e.exports=function(e,t,o,i){var a,c=!!i&&!!i.unsafe,s=!!i&&!!i.enumerable,u=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof t||ne(o,"name")||pe(o,"name",t),(a=n(o)).source||(a.source=r.join("string"==typeof t?t:""))),e!==B?(c?!u&&e[t]&&(s=!0):delete e[t],s?e[t]=o:pe(e,t,o)):s?e[t]=o:de(t,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||ye(this)}))})),Be=B,ze=function(e){return"function"==typeof e?e:void 0},Ue=function(e,t){return arguments.length<2?ze(Be[e])||ze(B[e]):Be[e]&&Be[e][t]||B[e]&&B[e][t]},We=Math.ceil,He=Math.floor,qe=function(e){return isNaN(e=+e)?0:(e>0?He:We)(e)},Ve=Math.min,Ye=function(e){return e>0?Ve(qe(e),9007199254740991):0},$e=Math.max,Ge=Math.min,Ke=function(e){return function(t,n,r){var o,i=J(t),a=Ye(i.length),c=function(e,t){var n=qe(e);return n<0?$e(n+t,0):Ge(n,t)}(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},Xe={includes:Ke(!0),indexOf:Ke(!1)}.indexOf,Je=function(e,t){var n,r=J(e),o=0,i=[];for(n in r)!ne(Te,n)&&ne(r,n)&&i.push(n);for(;t.length>o;)ne(r,n=t[o++])&&(~Xe(i,n)||i.push(n));return i},Ze=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qe=Ze.concat("length","prototype"),et={f:Object.getOwnPropertyNames||function(e){return Je(e,Qe)}},tt={f:Object.getOwnPropertySymbols},nt=Ue("Reflect","ownKeys")||function(e){var t=et.f(ue(e)),n=tt.f;return n?t.concat(n(e)):t},rt=function(e,t){for(var n=nt(t),r=fe.f,o=se.f,i=0;i=74)&&(Me=ht.match(/Chrome\/(\d+)/))&&(Ne=Me[1]);var bt,yt=Ne&&+Ne,wt=!!Object.getOwnPropertySymbols&&!z((function(){return!String(Symbol())||!Symbol.sham&&yt&&yt<41})),Ot=wt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_t=_e("wks"),jt=B.Symbol,kt=Ot?jt:jt&&jt.withoutSetter||xe,xt=function(e){return ne(_t,e)&&(wt||"string"==typeof _t[e])||(wt&&ne(jt,e)?_t[e]=jt[e]:_t[e]=kt("Symbol."+e)),_t[e]},St=xt("species"),Ct=function(e,t){var n;return dt(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!dt(n.prototype)?Z(n)&&null===(n=n[St])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},Tt=[].push,Et=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=7==e,c=5==e||i;return function(s,u,l,f){for(var p,d,h=ee(s),m=K(h),g=pt(u,l,3),v=Ye(m.length),b=0,y=f||Ct,w=t?y(s,v):n||a?y(s,0):void 0;v>b;b++)if((c||b in m)&&(d=g(p=m[b],b,h),e))if(t)w[b]=d;else if(d)switch(e){case 3:return!0;case 5:return p;case 6:return b;case 2:Tt.call(w,p)}else switch(e){case 4:return!1;case 7:Tt.call(w,p)}return i?-1:r||o?o:w}},Pt={forEach:Et(0),map:Et(1),filter:Et(2),some:Et(3),every:Et(4),find:Et(5),findIndex:Et(6),filterOut:Et(7)},It=Object.keys||function(e){return Je(e,Ze)},At=U?Object.defineProperties:function(e,t){ue(e);for(var n,r=It(t),o=r.length,i=0;o>i;)fe.f(e,n=r[i++],t[n]);return e},Lt=Ue("document","documentElement"),Dt=Ce("IE_PROTO"),Mt=function(){},Nt=function(e){return"