diff --git a/dist/bundle.js b/dist/bundle.js index 12fd43ab..63fa58d4 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,10 +1,10 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/static/",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(4),a=i(o),s=n(90),l=n(51),u=n(98),c=n(77),f=n(306),d=r(f),p=n(299),h=i(p),m=n(79),g=i(m),v=n(37),y=(i(v),n(148)),b=i(y),x=n(152),w=i(x),C=n(155),_=(i(C),n(80)),k=(i(_),d.reducer(b["default"])),E=(0,h["default"])("atlas-store"),S=d.createMiddleware(E),T=(0,c.applyMiddleware)(S)(c.createStore),M=T(k),O=d.createLoader(E);O(M),(0,s.render)(a["default"].createElement(l.Provider,{store:M},a["default"].createElement(u.Router,{history:g["default"]},a["default"].createElement(u.Route,{path:"/",component:w["default"]}))),document.getElementById("root"))},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;l=new Error(t.replace(/%s/g,function(){return u[c++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=r},function(e,t,n){"use strict";var r=n(12),i=r;e.exports=i},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,i=1;i2?n-2:0),i=2;n>i;i++)r[i-2]=arguments[i]}t.__esModule=!0,t["default"]=i;var o=n(13);r(o);e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===W?e.documentElement:e.firstChild:null}function o(e){var t=i(e);return t&&X.getID(t)}function a(e){var t=s(e);if(t)if(H.hasOwnProperty(t)){var n=H[t];n!==e&&(f(n,t)?I(!1):void 0,H[t]=e)}else H[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(B)||""}function l(e,t){var n=s(e);n!==t&&delete H[n],e.setAttribute(B,t),H[t]=e}function u(e){return H.hasOwnProperty(e)&&f(H[e],e)||(H[e]=X.findReactNodeByID(e)),H[e]}function c(e){var t=S.get(e)._rootNodeID;return k.isNullComponentID(t)?null:(H.hasOwnProperty(t)&&f(H[t],t)||(H[t]=X.findReactNodeByID(t)),H[t])}function f(e,t){if(e){s(e)!==t?I(!1):void 0;var n=X.findReactContainerForID(t);if(n&&D(n,e))return!0}return!1}function d(e){delete H[e]}function p(e){var t=H[e];return t&&f(t,e)?void(G=t):!1}function h(e){G=null,E.traverseAncestors(e,p);var t=G;return G=null,t}function m(e,t,n,r,i,o){C.useCreateElement&&(o=P({},o),n.nodeType===W?o[q]=n:o[q]=n.ownerDocument);var a=O.mountComponent(e,t,r,o);e._renderedComponent._topLevelWrapper=e,X._mountImageIntoNode(a,n,i,r)}function g(e,t,n,r,i){var o=A.ReactReconcileTransaction.getPooled(r);o.perform(m,null,e,t,n,o,r,i),A.ReactReconcileTransaction.release(o)}function v(e,t){for(O.unmountComponent(e),t.nodeType===W&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=o(e);return t?t!==E.getReactRootIDFromNodeID(t):!1}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=E.getReactRootIDFromNodeID(t),i=e;do if(n=s(i),i=i.parentNode,null==i)return null;while(n!==r);if(i===K[r])return e}}return null}var x=n(29),w=n(40),C=(n(16),n(112)),_=n(9),k=n(119),E=n(30),S=n(34),T=n(122),M=n(10),O=n(24),N=n(64),A=n(11),P=n(3),L=n(31),D=n(82),R=n(71),I=n(1),j=n(47),F=n(74),B=(n(76),n(2),x.ID_ATTRIBUTE_NAME),H={},U=1,W=9,z=11,q="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),V={},K={},$=[],G=null,Y=function(){};Y.prototype.isReactComponent={},Y.prototype.render=function(){return this.props};var X={TopLevelWrapper:Y,_instancesByReactRootID:V,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return X.scrollMonitor(n,function(){N.enqueueElementInternal(e,t),r&&N.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==U&&t.nodeType!==W&&t.nodeType!==z?I(!1):void 0,w.ensureScrollValueMonitoring();var n=X.registerContainer(t);return V[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var i=R(e,null),o=X._registerComponent(i,t);return A.batchedUpdates(g,i,o,t,n,r),i},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?I(!1):void 0,X._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){_.isValidElement(t)?void 0:I(!1);var a=new _(Y,null,null,null,null,null,t),l=V[o(n)];if(l){var u=l._currentElement,c=u.props;if(F(c,t)){var f=l._renderedComponent.getPublicInstance(),d=r&&function(){r.call(f)};return X._updateRootComponent(l,a,n,d),f}X.unmountComponentAtNode(n)}var p=i(n),h=p&&!!s(p),m=y(n),g=h&&!l&&!m,v=X._renderNewRootComponent(a,n,g,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):L)._renderedComponent.getPublicInstance();return r&&r.call(v),v},render:function(e,t,n){return X._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=o(e);return t&&(t=E.getReactRootIDFromNodeID(t)),t||(t=E.createReactRootID()),K[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==U&&e.nodeType!==W&&e.nodeType!==z?I(!1):void 0;var t=o(e),n=V[t];if(!n){var r=(y(e),s(e));r&&r===E.getReactRootIDFromNodeID(r);return!1}return A.batchedUpdates(v,n,e),delete V[t],delete K[t],!0},findReactContainerForID:function(e){var t=E.getReactRootIDFromNodeID(e),n=K[t];return n},findReactNodeByID:function(e){var t=X.findReactContainerForID(e);return X.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=$,r=0,i=h(t)||e;for(n[0]=i.firstChild,n.length=1;r1){for(var p=Array(d),h=0;d>h;h++)p[h]=arguments[h+2];o.children=p}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)"undefined"==typeof o[i]&&(o[i]=m[i])}return s(e,l,u,c,f,r.current,o)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var o,l=i({},e.props),u=e.key,c=e.ref,f=e._self,d=e._source,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(u=""+t.key);for(o in t)t.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(l[o]=t[o])}var h=arguments.length-2;if(1===h)l.children=n;else if(h>1){for(var m=Array(h),g=0;h>g;g++)m[g]=arguments[g+2];l.children=m}return s(e.type,u,c,f,d,p,l)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},e.exports=s},function(e,t,n){"use strict";function r(e,t,n){return n}var i={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){i.storedMeasure=e}}};e.exports=i},function(e,t,n){"use strict";function r(){S.ReactReconcileTransaction&&x?void 0:g(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=S.ReactReconcileTransaction.getPooled(!1)}function o(e,t,n,i,o,a){r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==v.length?g(!1):void 0,v.sort(a);for(var n=0;t>n;n++){var r=v[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,p.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var o=0;o=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function u(e,t){var n,r,i;if(t.singleton){var o=y++;n=v||(v=s(t)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function f(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var p={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=h(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,y=0,b=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;axo&&setTimeout(function(){l.display.input.reset(!0)},20),Wt(this),Yi(),xt(this),this.curOp.forceUpdate=!0,Xr(this,i),r.autofocus&&!Oo||l.hasFocus()?setTimeout(Fi(vn,this),20):yn(this);for(var c in ea)ea.hasOwnProperty(c)&&ea[c](this,r[c],ta);C(this),r.finishInit&&r.finishInit(this);for(var f=0;fxo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),wo||go&&Oo||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Be(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function i(e){e.options.lineWrapping?(Qa(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Xa(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Rt(e),st(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(Cr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=Li(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(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+Ke(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Wi("div",[Wi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Wi("div",[Wi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Oa(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Oa(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>xo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Xa(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Oa(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Qa(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&A(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(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",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=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-ze(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),a=ni(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;o>s?(o=s,a=ni(t,ri(Qr(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=ni(t,ri(Qr(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function w(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=k(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Ut(e))return!1;C(e)&&(jt(e),t.dims=L(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Io&&(o=xr(e.doc,o),a=wr(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ht(e,o,a),n.viewOffset=ri(Qr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Ut(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vi();return l>4&&(n.lineDiv.style.display="none"),D(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,u&&Vi()!=u&&u.offsetHeight&&u.focus(),zi(n.cursorDiv),zi(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Be(e,400)),n.updateLineNumbers=null,!0}function M(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=$e(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-Ge(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&T(e,t);r=!1){A(e);var i=h(e);De(e),N(e,i),y(e,i)}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 O(e,t){var n=new E(e,t);if(T(e,n)){A(e),M(e,n);var r=h(e);De(e),N(e,r),y(e,r),n.finish()}}function N(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Ke(e),t.clientHeight)+"px"}function A(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rxo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var l=o.line.height-i;if(2>i&&(i=yt(t)),(l>.001||-.001>l)&&(ei(o.line,i),P(o.line),o.rest))for(var u=0;u=t&&f.lineNumber;f.changes&&(Li(f.changes,"gutter")>-1&&(d=!1),R(e,f,u,n)),d&&(zi(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(_(e.options,u)))),s=f.node.nextSibling}else{var p=z(e,f,u,n);a.insertBefore(p,s)}u+=f.size}for(;s;)s=r(s)}function R(e,t,n,r){for(var i=0;ixo&&(e.node.style.zIndex=2)),e.node}function j(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=I(e);e.background=n.insertBefore(Wi("div",null,t),n.firstChild)}}function F(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Fr(e,t)}function B(e,t){var n=t.text.className,r=F(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,H(t)):n&&(t.text.className=n)}function H(e){j(e),e.line.wrapClass?I(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function U(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=I(t);t.gutterBackground=Wi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=I(t),a=t.gutter=Wi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px"); -if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Wi("div",_(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s1)if(Bo&&Bo.join("\n")==t){if(r.ranges.length%Bo.length==0){l=[];for(var u=0;u=0;u--){var c=r.ranges[u],f=c.from(),d=c.to();c.empty()&&(n&&n>0?f=jo(f.line,f.ch-n):e.state.overwrite&&!a&&(d=jo(d.line,Math.min(Qr(o,d.line).text.length,d.ch+Pi(s).length))));var p=e.curOp.updateInput,h={from:f,to:d,text:l?l[u%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Sn(e.doc,h),ki(e,"inputRead",e,h)}t&&!a&&J(e,t),Fn(e),e.curOp.updateInput=p,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Z(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||Ot(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Hn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Hn(e,i.head.line,"smart"));a&&ki(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?u.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),jo(l,f)}}}var i=e.text.firstChild,o=!1;if(!t||!$a(i,t))return ae(jo(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Pi(e.rest):e.line;return ae(jo(ti(a),a.text.length),o)}var s=3==t.nodeType?t:null,l=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var u=e.measure,c=u.maps,f=r(s,l,n);if(f)return ae(f,o);for(var d=l.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(jo(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=l.previousSibling,p=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return ae(jo(f.line,f.ch+p),o);p+=d.textContent.length}}function ue(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var c,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(jo(r,0),jo(i+1,0),o(+f));return void(d.length&&(c=d[0].find())&&(s+=Zr(e.doc,c.from,c.to).join(u)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p=0){var a=Y(o.from(),i.from()),s=G(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(l?s:a,l?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.linen?jo(n,Qr(e,n).text.length):ge(t,Qr(e,t.line).text.length)}function ge(e,t){var n=e.ch;return null==n||n>t?jo(e.line,t):0>n?jo(e.line,0):e}function ve(e,t){return t>=e.first&&t=t.ch:s.to>t.ch))){if(i&&(Pa(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var u,c=l.find(0>r?1:-1);if((0>r?l.inclusiveRight:l.inclusiveLeft)&&(c=Le(e,c,-r,o)),c&&c.line==t.line&&(u=Fo(c,n))&&(0>r?0>u:u>0))return Ae(e,c,t,r,i)}var f=l.find(0>r?-1:1);return(0>r?l.inclusiveLeft:l.inclusiveRight)&&(f=Le(e,f,r,o)),f?Ae(e,f,t,r,i):null}}return t}function Pe(e,t,n,r,i){var o=r||1,a=Ae(e,t,n,o,i)||!i&&Ae(e,t,n,o,!0)||Ae(e,t,n,-o,i)||!i&&Ae(e,t,n,-o,!0);return a?a:(e.cantEdit=!0,jo(e.first,0))}function Le(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?me(e,jo(t.line-1)):null:n>0&&t.ch==(r||Qr(e,t.line)).text.length?t.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Wi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return dt(e,jo(t,n),"div",f,r)}var s,l,f=Qr(a,t),d=f.text.length;return eo(ii(f),n||0,null==i?d:i,function(e,t,a){var f,p,h,m=o(e,"left");if(e==t)f=m,p=h=m.left;else{if(f=o(t-1,"right"),"rtl"==a){var g=m;m=f,f=g}p=m.left,h=f.right}null==n&&0==e&&(p=u),f.top-m.top>3&&(r(p,m.top,null,m.bottom),p=u,m.bottoml.bottom||f.bottom==l.bottom&&f.right>l.right)&&(l=f),u+1>p&&(p=u),r(p,f.top,h-p,f.bottom)}),{start:s,end:l}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),l=Ve(e.display),u=l.left,c=Math.max(o.sizerWidth,$e(e)-o.sizer.offsetLeft)-l.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var p=Qr(a,f.line),h=Qr(a,d.line),m=yr(p)==yr(h),g=i(f.line,f.ch,m?p.text.length+1:null).end,v=i(d.line,m?0:null,d.ch).start;m&&(g.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Be(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=sa(t.mode,We(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,l=Dr(e,o,s?sa(t.mode,r):r,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),d=0;!f&&dn?(Be(e,e.options.workDelay),!0):void 0}),i.length&&Ot(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var l=Qr(o,s-1);if(l.stateAfter&&(!n||s<=o.frontier))return s;var u=Ba(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}function We(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=Ue(e,t,n),a=o>r.first&&Qr(r,o-1).stateAfter;return a=a?sa(r.mode,a):la(r.mode),r.iter(o,t,function(n){Ir(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Qe(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Lt(e.doc,t,n);r.lineN=n;var i=r.built=Fr(e,r);return r.text=i.pre,qi(e.display.lineMeasure,i.pre),r}function Ze(e,t,n,r){return tt(e,et(e,t),n,r)}function Je(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):u>t?(i=t-l,o=i+1):(s==e.length-3||t==u&&e[s+3]>t)&&(o=u-l,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[s+2],l==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==u-l)for(;sc;c++){for(;s&&Ui(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+lxo&&0==s&&l==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var f=za(a,s,l).getClientRects();i=f.length?f["right"==r?f.length-1:0]:zo}else i=za(a,s,l).getBoundingClientRect()||zo;if(i.left||i.right||0==s)break;l=s,s-=1,u="right"}bo&&11>xo&&(i=it(e.display.measure,i))}else{s>0&&(u=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(bo&&9>xo&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+bt(e.display),top:d.top,bottom:d.bottom}:zo}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(p+h)/2,g=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Qr(e.doc,t.line),i||(i=et(e,r));var l=ii(r),u=t.ch;if(!l)return a(u);var c=uo(l,u),f=s(u,c);return null!=os&&(f.other=s(u,os)),f}function ht(e,t){var n=0,t=me(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var r=Qr(e.doc,t.line),i=ri(r)+ze(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function mt(e,t,n,r){var i=jo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function gt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return mt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return mt(r.first+r.size-1,Qr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Qr(r,i);;){var s=vt(e,a,i,t,n),l=gr(a),u=l&&l.find(0,!0);if(!l||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=ti(a=u.to.line)}}function vt(e,t,n,r,i){function o(r){var i=pt(e,jo(n,r),"line",t,u);return s=!0,a>i.bottom?i.left-l:ag)return mt(n,p,v,1);for(;;){if(c?p==d||p==fo(t,d,1):1>=p-d){for(var y=h>r||g-r>=r-h?d:p,b=r-(y==d?h:g);Ui(t.text.charAt(y));)++y;var x=mt(n,y,y==d?m:v,-1>b?-1:b>1?1:0);return x}var w=Math.ceil(f/2),C=d+w;if(c){C=d;for(var _=0;w>_;++_)C=fo(t,C,1)}var k=o(C);k>r?(p=C,g=k,(v=s)&&(g+=1e3),f=w):(d=C,h=k,m=s,f-=w)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ho){Ho=Wi("pre");for(var t=0;49>t;++t)Ho.appendChild(document.createTextNode("x")),Ho.appendChild(Wi("br"));Ho.appendChild(document.createTextNode("x"))}qi(e.measure,Ho);var n=Ho.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),zi(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Wi("span","xxxxxxxxxx"),n=Wi("pre",[t]);qi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vo},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new E(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Et(e){e.updatedDisplay=e.mustUpdate&&T(e.cm,e.update)}function St(e){var t=e.cm,n=t.display;e.updatedDisplay&&A(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ze(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+Ke(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-$e(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Tt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Lt(e.doc,Qr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Rt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Io&&xr(e.doc,t)i.viewFrom?jt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)jt(e);else if(t<=i.viewFrom){var o=Bt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):jt(e)}else if(n>=i.viewTo){var o=Bt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):jt(e)}else{var a=Bt(e,t,t,-1),s=Bt(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(Dt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):jt(e)}var l=i.externalMeasured;l&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Ft(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Li(a,n)&&a.push(n)}}}function jt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ft(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Bt(e,t,n,r){var i,o=Ft(e,t),a=e.display.view;if(!Io||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,l=e.display.viewFrom;o>s;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}for(;xr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Ht(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Dt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Dt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Ft(e,n)))),r.viewTo=n}function Ut(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Oa(i.scroller,"mousedown",Nt(e,$t)),bo&&11>xo?Oa(i.scroller,"dblclick",Nt(e,function(t){if(!Si(e,t)){var n=Kt(e,t);if(n&&!Zt(e,t)&&!Vt(e.display,t)){Sa(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Oa(i.scroller,"dblclick",function(t){Si(e,t)||Sa(t)}),Do||Oa(i.scroller,"contextmenu",function(t){bn(e,t)});var o,a={end:0};Oa(i.scroller,"touchstart",function(t){if(!Si(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Oa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Oa(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Vt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(jo(s.line,0),me(e.doc,jo(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Sa(n)}t()}),Oa(i.scroller,"touchcancel",t),Oa(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),Pa(e,"scroll",e))}),Oa(i.scroller,"mousewheel",function(t){an(e,t)}),Oa(i.scroller,"DOMMouseScroll",function(t){an(e,t)}),Oa(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Si(e,t)||Ma(t)},over:function(t){Si(e,t)||(tn(e,t),Ma(t))},start:function(t){en(e,t)},drop:Nt(e,Jt),leave:function(){nn(e)}};var s=i.input.getField();Oa(s,"keyup",function(t){hn.call(e,t)}),Oa(s,"keydown",Nt(e,dn)),Oa(s,"keypress",Nt(e,mn)),Oa(s,"focus",Fi(vn,e)),Oa(s,"blur",Fi(yn,e))}function zt(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Oa:Aa;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function qt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Vt(e,t){for(var n=wi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Kt(e,t,n,r){var i=e.display;if(!n&&"true"==wi(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var l,u=gt(e,o,a);if(r&&1==u.xRel&&(l=Qr(e.doc,u.line).text).length==u.ch){var c=Ba(l,l.length,e.options.tabSize)-l.length;u=jo(u.line,Math.max(0,Math.round((o-Ve(e.display).left)/bt(e.display))-c))}return u}function $t(e){var t=this,n=t.display;if(!(Si(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Vt(n,e))return void(wo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Zt(t,e)){ -var r=Kt(t,e);switch(window.focus(),Ci(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Gt(t,e,r):wi(e)==n.scroller&&Sa(e);break;case 2:wo&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Sa(e);break;case 3:Do?bn(t,e):gn(t)}}}}function Gt(e,t,n){bo?setTimeout(Fi(X,e),0):e.curOp.focus=Vi();var r,i=+new Date;Wo&&Wo.time>i-400&&0==Fo(Wo.pos,n)?r="triple":Uo&&Uo.time>i-400&&0==Fo(Uo.pos,n)?(r="double",Wo={time:i,pos:n}):(r="single",Uo={time:i,pos:n});var o,a=e.doc.sel,s=No?t.metaKey:t.ctrlKey;e.options.dragDrop&&Ja&&!e.isReadOnly()&&"single"==r&&(o=a.contains(n))>-1&&(Fo((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(Fo(o.to(),n)>0||n.xRel<0)?Yt(e,t,n,s):Xt(e,t,n,r,s)}function Yt(e,t,n,r){var i=e.display,o=+new Date,a=Nt(e,function(s){wo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Aa(document,"mouseup",a),Aa(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Sa(s),!r&&+new Date-200=h;h++){var v=Qr(u,h).text,y=Ha(v,l,o);l==p?i.push(new fe(jo(h,y),jo(h,y))):v.length>y&&i.push(new fe(jo(h,y),jo(h,Ha(v,p,o))))}i.length||i.push(new fe(n,n)),Se(u,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,x=b.anchor,w=t;if("single"!=r){if("double"==r)var C=e.findWordAt(t);else var C=new fe(jo(t.line,0),me(u,jo(t.line+1,0)));Fo(C.anchor,x)>0?(w=C.head,x=Y(b.from(),C.anchor)):(w=C.anchor,x=G(b.to(),C.head))}var i=d.ranges.slice(0);i[f]=new fe(me(u,x),w),Se(u,de(i,f),ja)}}function a(t){var n=++y,i=Kt(e,t,!0,"rect"==r);if(i)if(0!=Fo(i,g)){e.curOp.focus=Vi(),o(i);var s=x(l,u);(i.line>=s.to||i.linev.bottom?20:0;c&&setTimeout(Nt(e,function(){y==n&&(l.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Sa(t),l.input.focus(),Aa(document,"mousemove",b),Aa(document,"mouseup",w),u.history.lastSelOrigin=null}var l=e.display,u=e.doc;Sa(t);var c,f,d=u.sel,p=d.ranges;if(i&&!t.shiftKey?(f=u.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=u.sel.primary(),f=u.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=Kt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||u.extend?be(u,c,h.anchor,h.head):h}else if("triple"==r){var m=new fe(jo(n.line,0),me(u,jo(n.line+1,0)));c=e.display.shift||u.extend?be(u,c,m.anchor,m.head):m}else c=be(u,c,n);i?-1==f?(f=p.length,Se(u,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(Se(u,de(p.slice(0,f).concat(p.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),d=u.sel):Ce(u,f,c,ja):(f=0,Se(u,new ce([c],0),ja),d=u.sel);var g=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Nt(e,function(e){Ci(e)?a(e):s(e)}),w=Nt(e,s);e.state.selectingText=w,Oa(document,"mousemove",b),Oa(document,"mouseup",w)}function Qt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Sa(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Mi(e,n))return xi(t);o-=s.top-a.viewOffset;for(var l=0;l=i){var c=ni(e.doc,o),f=e.options.gutters[l];return Pa(e,n,e,c,f,t),xi(t)}}}function Zt(e,t){return Qt(e,t,"gutterClick",!0)}function Jt(e){var t=this;if(nn(t),!Si(t,e)&&!Vt(t.display,e)){Sa(e),bo&&(Ko=+new Date);var n=Kt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||-1!=Li(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=Nt(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=me(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Sn(t.doc,l),Ee(t.doc,pe(n,Zo(l)))}}),s.readAsText(e)}},l=0;i>l;++l)s(r[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(No?e.altKey:e.ctrlKey))var u=t.listSelections();if(Te(t.doc,pe(n,n)),u)for(var l=0;la.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&No&&wo)e:for(var u=t.target,c=o.view;u!=a;u=u.parentNode)for(var f=0;fd?p=Math.max(0,p+d-50):h=Math.min(e.doc.height,h+d+50),O(e,{top:p,bottom:h})}20>$o&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Go=(Go*$o+n)/($o+1),++$o)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function sn(e,t,n){if("string"==typeof t&&(t=ua[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ra}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function ln(e,t,n){for(var r=0;rxo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=cn(t,e);ko&&(Qo=r?n:null,!r&&88==n&&!ns&&(No?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||pn(t)}}function pn(e){function t(e){18!=e.keyCode&&e.altKey||(Xa(n,"CodeMirror-crosshair"),Aa(document,"keyup",t),Aa(document,"mouseover",t))}var n=e.display.lineDiv;Qa(n,"CodeMirror-crosshair"),Oa(document,"keyup",t),Oa(document,"mouseover",t)}function hn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Si(this,e)}function mn(e){var t=this;if(!(Vt(t.display,e)||Si(t,e)||e.ctrlKey&&!e.altKey||No&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(ko&&n==Qo)return Qo=null,void Sa(e);if(!ko||e.which&&!(e.which<10)||!cn(t,e)){var i=String.fromCharCode(null==r?n:r);fn(t,e,i)||t.display.input.onKeyPress(e)}}}function gn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Pa(e,"focus",e),e.state.focused=!0,Qa(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fe(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(Pa(e,"blur",e),e.state.focused=!1,Xa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){Vt(e.display,t)||xn(e,t)||Si(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xn(e,t){return Mi(e,"gutterContextMenu")?Qt(e,t,"gutterContextMenu",!1):!1}function wn(e,t){if(Fo(e,t.from)<0)return e;if(Fo(e,t.to)<=0)return Zo(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+=Zo(t).ch-t.to.ch),jo(n,r)}function Cn(e,t){for(var n=[],r=0;r=0;--i)Tn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Tn(e,t)}}function Tn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Fo(t.from,t.to)){var n=Cn(e,t);ui(e,t,n,e.cm?e.cm.curOp.id:NaN),Nn(e,t,n,or(e,t));var r=[];Yr(e,function(e,n){n||-1!=Li(r,e.history)||(bi(e.history,t),r.push(e.history)),Nn(e,t,null,or(e,t))})}}function Mn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--l){var f=r.changes[l];if(f.origin=t,c&&!En(e,f,!1))return void(a.length=0);u.push(ai(e,f));var d=l?Cn(e,f):Pi(a);Nn(e,f,d,sr(e,f)),!l&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Zo(f)});var p=[];Yr(e,function(e,t){t||-1!=Li(p,e.history)||(bi(e.history,f),p.push(e.history)),Nn(e,f,null,sr(e,f))})}}}}function On(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(Di(e.sel.ranges,function(e){return new fe(jo(e.anchor.line+t,e.anchor.ch),jo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:jo(o,Qr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Zr(e,t.from,t.to),n||(n=Cn(e,t)),e.cm?An(e.cm,t,r):Kr(e,t,r),Te(e,n,Ia)}}function An(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=ti(yr(Qr(r,a.line))),r.iter(u,s.line+1,function(e){return e==i.maxLine?(l=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Ti(e),Kr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),Be(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Rt(e):a.line!=s.line||1!=t.text.length||Vr(e.doc,t)?Rt(e,a.line,s.line+1,c):It(e,a.line,"text");var d=Mi(e,"changes"),p=Mi(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&ki(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Pn(e,t,n,r,i){if(r||(r=n),Fo(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Sn(e,{from:n,to:r,text:t,origin:i})}function Ln(e,t){if(!Si(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!To){var o=Wi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-ze(e.display))+"px; height: "+(t.bottom-t.top+Ke(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Dn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=pt(e,t),s=n&&n!=t?pt(e,n):a,l=In(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),u=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=l.scrollTop&&(rn(e,l.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(o=!0)),null!=l.scrollLeft&&(on(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Rn(e,t,n,r,i){var o=In(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function In(e,t,n,r,i){var o=e.display,a=yt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=Ge(e),u={};i-n>l&&(i=n+l);var c=e.doc.height+qe(o),f=a>n,d=i>c-a;if(s>n)u.scrollTop=f?0:n;else if(i>s+l){var p=Math.min(n,(d?c:i)-l);p!=s&&(u.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=$e(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),g=r-t>m;return g&&(r=t+m),10>t?u.scrollLeft=0:h>t?u.scrollLeft=Math.max(0,t-(g?0:10)):r>m+h-3&&(u.scrollLeft=r+(g?0:10)-m),u}function jn(e,t,n){(null!=t||null!=n)&&Bn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Fn(e){Bn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?jo(t.line,t.ch-1):t,r=jo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Bn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ht(e,t.from),r=ht(e,t.to),i=In(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Hn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=We(e,t):n="prev");var a=e.options.tabSize,s=Qr(o,t),l=Ba(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(u=o.mode.indent(i,s.text.slice(c.length),s.text),u==Ra||u>150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?Ba(Qr(o,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+=" ";if(u>d&&(f+=Ai(u-d)),f!=c)return Pn(o,f,jo(t,0),jo(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p=0;t--)Pn(e.doc,"",r[t].from,r[t].to,"+delete");Fn(e)})}function zn(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?!1:(s=t,c=Qr(e,t))}function a(e){var t=(i?fo:po)(c,l,n,!0);if(null==t){if(e||!o())return!1;l=i?(0>n?io:ro)(c):0>n?c.text.length:0}else l=t;return!0}var s=t.line,l=t.ch,u=n,c=Qr(e,s);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(0>n)||a(!h);h=!1){var m=c.text.charAt(l)||"\n",g=Bi(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||g||(g="s"),f&&f!=g){0>n&&(n=1,a());break}if(g&&(f=g),n>0&&!a(!h))break}var v=Pe(e,jo(s,l),t,u,!0);return Fo(t,v)||(v.hitSide=!0),v}function qn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var l=gt(e,a,i);if(!l.outside)break;if(0>n?0>=i:i>=o.height){l.hitSide=!0;break}i+=5*n}return l}function Vn(t,n,r,i){e.defaults[t]=n,r&&(ea[t]=i?function(e,t,n){n!=ta&&r(e,t,n)}:r)}function Kn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Wi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vr(e,t.line,t,n,o)||t.line!=n.line&&vr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Io=!0}o.addToHistory&&ui(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&yr(e)==u.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&ei(e,0),nr(e,new Jn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Cr(e,t)&&ei(t,0)}),o.clearOnEnter&&Oa(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Ro=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ma,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Rt(u,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)It(u,c,"text");o.atomic&&Oe(u.doc),ki(u,"markerAdded",u,o)}return o}function Yn(e,t,n,r,i){r=ji(r),r.shared=!1;var o=[Gn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Yr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Gn(e,me(e,t),me(e,n),r,i));for(var l=0;l=t:o.to>t);(r||(r=[])).push(new Jn(a,o.from,l?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)h.push(m);h.push(l)}return h}function ar(e){for(var t=0;t0)){var c=[l,1],f=Fo(u.from,s.from),d=Fo(u.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function ur(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Fo(u.to,n)>0||l.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Fo(u.from,r)<0||l.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function yr(e){for(var t;t=mr(e);)e=t.find(-1,!0).line;return e}function br(e){for(var t,n;t=gr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function xr(e,t){var n=Qr(e,t),r=yr(n);return n==r?t:ti(r)}function wr(e,t){if(t>e.lastLine())return t;var n,r=Qr(e,t);if(!Cr(e,r))return t;for(;n=gr(r);)r=n.find(1,!0).line;return ti(r)+1}function Cr(e,t){var n=Io&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Pr(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?sa(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=me(a,t);var l,u=Qr(a,t.line),c=We(e,t.line,n),f=new ha(u.text,e.options.tabSize);for(r&&(l=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Ir(e,t,r,f.pos),f.pos=t.length,l=null):l=Or(Ar(n,f,r,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;uu;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Rr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=We(e,ti(t)),i=Dr(e,t,t.text.length>e.options.maxHighlightLength?sa(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ir(e,t,n,r){var i=e.doc.mode,o=new ha(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Nr(i,n);!o.eol();)Ar(i,o,n),o.start=o.pos}function jr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?wa:xa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Fr(e,t){var n=Wi("span",null,null,wo?"padding-right: .1px":null),r={pre:Wi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||wo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Hr,Zi(e.display.measure)&&(o=ii(a))&&(r.addToken=Wr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&ti(a);qr(a,r,Rr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=$i(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=$i(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Qi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return wo&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),Pa(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=$i(r.pre.className,r.textClass||"")),r}function Br(e){var t=Wi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Hr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,Ur):t,l=e.cm.state.specialChars,u=!1;if(l.test(t))for(var c=document.createDocumentFragment(),f=0;;){l.lastIndex=f;var d=l.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));bo&&9>xo?c.appendChild(Wi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1," "==d[0]){var m=e.cm.options.tabSize,g=m-e.col%m,h=c.appendChild(Wi("span",Ai(g),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=g}else if("\r"==d[0]||"\n"==d[0]){var h=c.appendChild(Wi("span","\r"==d[0]?"␍":"␤","cm-invalidchar")); -h.setAttribute("cm-text",d[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),bo&&9>xo?c.appendChild(Wi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),bo&&9>xo&&(u=!0),e.pos+=t.length}if(n||r||i||u||a){var v=n||"";r&&(v+=r),i&&(v+=i);var y=Wi("span",[c],v,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function Ur(e){for(var t=" ",n=0;nu&&d.from<=u)break}if(d.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-u),i,o,null,s,l),o=null,r=r.slice(d.to-u),u=d.to}}}function zr(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,u,c,f,d,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=f=s="",d=null,v=1/0;for(var y,b=[],x=0;xh||C.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==h&&(c+=" "+C.startStyle),C.endStyle&&w.to==v&&(y||(y=[])).push(C.endStyle,w.to),C.title&&!f&&(f=C.title),C.collapsed&&(!d||pr(d.marker,C)<0)&&(d=w)):w.from>h&&v>w.from&&(v=w.from)}if(y)for(var x=0;x=p)break;for(var _=Math.min(p,v);;){if(g){var k=h+g.length;if(!d){var E=k>_?g.slice(0,_-h):g;t.addToken(t,E,a?a+l:l,c,h+E.length==v?u:"",f,s)}if(k>=_){g=g.slice(_-h),h=_;break}h=k,c=""}g=i.slice(o,o=n[m++]),a=jr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)o.push(new ba(u[n],i(n),r));return o}var s=t.from,l=t.to,u=t.text,c=Qr(e,s.line),f=Qr(e,l.line),d=Pi(u),p=i(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(Vr(e,t)){var m=a(0,u.length-1);o(f,f.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(l.ch),p);else{var m=a(1,u.length-1);m.push(new ba(d+c.text.slice(l.ch),p,r)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,d+f.text.slice(l.ch),p);var m=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}ki(e,"change",e,t)}function $r(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||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 i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Zr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Jr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Li(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Pi(e.done)):void 0}function ui(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=li(i,i.lastOp==r))){var s=Pi(o.changes);0==Fo(t.from,t.to)&&0==Fo(t.from,s.to)?s.to=Zo(t):o.changes.push(ai(e,t))}else{var l=Pi(i.done);for(l&&l.ranges||di(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||Pa(e,"historyAdded")}function ci(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ci(e,o,Pi(i.done),t))?i.done[i.done.length-1]=t:di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&si(i.undone)}function di(e,t){var n=Pi(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function hi(e){if(!e)return null;for(var t,n=0;n-1&&(Pi(s)[f]=c[f],delete c[f])}}}return i}function vi(e,t,n,r){n0?r.slice():Na:r||Na}function ki(e,t){function n(e){return function(){e.apply(null,o)}}var r=_i(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);qo?i=qo.delayedCallbacks:La?i=La:(i=La=[],setTimeout(Ei,0));for(var a=0;a0}function Oi(e){e.prototype.on=function(e,t){Oa(this,e,t)},e.prototype.off=function(e,t){Aa(this,e,t)}}function Ni(){this.id=null}function Ai(e){for(;Ua.length<=e;)Ua.push(Pi(Ua)+" ");return Ua[e]}function Pi(e){return e[e.length-1]}function Li(e,t){for(var n=0;n-1&&Va(e)?!0:t.test(e):Va(e)}function Hi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Ui(e){return e.charCodeAt(0)>=768&&Ka.test(e)}function Wi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return zi(e).appendChild(t)}function Vi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Ki(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function $i(e,t){for(var n=e.split(" "),r=0;r2&&!(bo&&8>xo))}var n=Ga?Wi("span","​"):Wi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Zi(e){if(null!=Ya)return Ya;var t=qi(e,document.createTextNode("AخA")),n=za(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=za(t,1,2).getBoundingClientRect();return Ya=r.right-n.right<3}function Ji(e){if(null!=rs)return rs;var t=qi(e,Wi("span","x")),n=t.getBoundingClientRect(),r=za(t,0,1).getBoundingClientRect();return rs=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Pi(t)):e.text.length}function oo(e,t){var n=Qr(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return jo(t,o)}function ao(e,t){for(var n,r=Qr(e.doc,t);n=gr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return jo(null==t?ti(r):t,o)}function so(e,t){var n=oo(e,t.line),r=Qr(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return jo(n.line,a?0:o)}return n}function lo(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function uo(e,t){os=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return lo(e,i.level,e[n].level)?(i.from!=i.to&&(os=n),r):(i.from!=i.to&&(os=r),n);n=r}}return n}function co(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&Ui(e.text.charAt(t)));return t}function fo(e,t,n,r){var i=ii(e);if(!i)return po(e,t,n,r);for(var o=uo(i,t),a=i[o],s=co(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?co(e,a.to,-1,r):co(e,a.from,1,r)}}function po(e,t,n,r){var i=t+n;if(r)for(;i>0&&Ui(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var ho=navigator.userAgent,mo=navigator.platform,go=/gecko\/\d/i.test(ho),vo=/MSIE \d/.test(ho),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ho),bo=vo||yo,xo=bo&&(vo?document.documentMode||6:yo[1]),wo=/WebKit\//.test(ho),Co=wo&&/Qt\/\d+\.\d+/.test(ho),_o=/Chrome\//.test(ho),ko=/Opera\//.test(ho),Eo=/Apple Computer/.test(navigator.vendor),So=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ho),To=/PhantomJS/.test(ho),Mo=/AppleWebKit/.test(ho)&&/Mobile\/\w+/.test(ho),Oo=Mo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ho),No=Mo||/Mac/.test(mo),Ao=/win/i.test(mo),Po=ko&&ho.match(/Version\/(\d*\.\d*)/);Po&&(Po=Number(Po[1])),Po&&Po>=15&&(ko=!1,wo=!0);var Lo=No&&(Co||ko&&(null==Po||12.11>Po)),Do=go||bo&&xo>=9,Ro=!1,Io=!1;m.prototype=ji({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 i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else 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 o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"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}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=No&&!So?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ni,this.disableVert=new Ni},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),g.prototype=ji({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),e.scrollbarModel={"native":m,"null":g},E.prototype.signal=function(e,t){Mi(e,t)&&this.events.push(arguments)},E.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Oa(o,"paste",function(e){Si(r,e)||Z(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Oa(o,"cut",t),Oa(o,"copy",t),Oa(e.scroller,"paste",function(t){Vt(e,t)||Si(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Oa(e.lineSpace,"selectstart",function(t){Vt(e,t)||Sa(t)}),Oa(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"})}}),Oa(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=Re(e);if(e.options.moveInputWithCursor){var i=pt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qi(n.cursorDiv,e.cursors),qi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ns&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Wa(this.textarea),bo&&xo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",bo&&xo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Oo||Vi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||ts(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(bo&&xo>=9&&this.hasSelection===r||No&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return Ot(e,function(){Q(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&xo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,bo&&9>xo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!bo||bo&&9>xo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Nt(i,ua.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Kt(i,e),l=o.scroller.scrollTop;if(s&&!ko){var u=i.options.resetSelectionOnContextMenu;u&&-1==i.doc.sel.contains(s)&&Nt(i,Se)(i.doc,pe(s),Ia);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var f=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&xo>=9&&t(),Do){Ma(e);var d=function(){Aa(window,"mouseup",d),setTimeout(n,20)};Oa(window,"mouseup",d)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Ri,needsContentAttribute:!1},ne.prototype),ie.prototype=ji({init:function(e){function t(e){if(!Si(r,e)){if(r.somethingSelected())Bo=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Bo=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ia),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Mo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Bo.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Bo.join("\n");var o=document.activeElement;Wa(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Oa(i,"paste",function(e){Si(r,e)||Z(e,r)}),Oa(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=pe(jo(i.head.line,a),jo(i.head.line,a+t.length)))}}),Oa(i,"compositionupdate",function(e){n.composing.data=e.data}),Oa(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Oa(i,"touchstart",function(){n.forceCompositionEnd()}),Oa(i,"input",function(){n.composing||(r.isReadOnly()||!n.pollContent())&&Ot(n.cm,function(){Rt(r)})}),Oa(i,"copy",t),Oa(i,"cut",t)},prepareSelection:function(){var e=Re(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Fo(Y(n,r),t.from())||0!=Fo(G(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var l=a[a.length-1].measure,u=l.maps?l.maps[l.maps.length-1]:l.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=za(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(!go&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):go&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qi(this.cm.display.cursorDiv,e.cursors),qi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $a(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Ot(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&Ot(t,function(){Se(t.doc,pe(n,r),Ia),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Ft(e,r.line)))var a=ti(t.view[0].line),s=t.view[0].node;else var a=ti(t.view[o].line),s=t.view[o-1].node.nextSibling;var l=Ft(e,i.line);if(l==t.view.length-1)var u=t.viewTo-1,c=t.lineDiv.lastChild;else var u=ti(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling;for(var f=e.doc.splitLines(ue(e,s,c,a,u)),d=Zr(e.doc,jo(a,0),jo(u,Qr(e.doc,u).text.length));f.length>1&&d.length>1;)if(Pi(f)==Pi(d))f.pop(),d.pop(),u--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,m=f[0],g=d[0],v=Math.min(m.length,g.length);v>p&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=Pi(f),b=Pi(d),x=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));x>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var w=jo(a,p),C=jo(u,d.length?Pi(d).length-h:0);return f.length>1||f[0]||Fo(w,C)?(Pn(e.doc,f,w,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Nt(this.cm,Rt)(this.cm):e.data&&e.data!=e.startData&&Nt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Nt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Ri,resetPosition:Ri,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Fo(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return Y(this.anchor,this.head)},to:function(){return G(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Ho,Uo,Wo,zo={left:0,right:0,top:0,bottom:0},qo=null,Vo=0,Ko=0,$o=0,Go=null;bo?Go=-.53:go?Go=15:_o?Go=-.7:Eo&&(Go=-1/3);var Yo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Yo(e);return t.x*=Go,t.y*=Go,t};var Xo=new Ni,Qo=null,Zo=e.changeEnd=function(e){return e.text?jo(e.from.line+e.text.length-1,Pi(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,ea.hasOwnProperty(e)&&Nt(this,ea[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($n(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Hn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Fn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;n>l;++l)Hn(this,l,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[r].from().ch>0&&Ce(this.doc,r,new fe(o,u[r].to()),Ia)}}}),getTokenAt:function(e,t){return Pr(this,e,t)},getLineTokens:function(e,t){return Pr(this,jo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,n=Rr(this,Qr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode; -return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!aa.hasOwnProperty(t))return n;var r=aa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Qr(this.doc,e)}else n=e;return ct(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:At(function(e,t,n){return Un(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Hi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:At(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,It(t,r,"gutter"),Hi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Qr(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=pt(this,me(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Rn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:At(dn),triggerOnKeyPress:At(mn),triggerOnKeyUp:hn,execCommand:function(e){return ua.hasOwnProperty(e)?ua[e].call(null,this):void 0},triggerElectric:At(function(e){J(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=me(this.doc,e);t>o&&(a=zn(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:At(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?zn(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Fa)}),deleteH:At(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Wn(this,function(n){var i=zn(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=me(this.doc,e);t>a;++a){var l=pt(this,s,"div");if(null==o?o=l.left:l.left=o,s=qn(this,l,i,n),s.hitSide)break}return s},moveV:At(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=pt(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=qn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&jn(n,null,dt(n,l,"div").top-s.top),l},Fa),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),Pa(this,"refresh",this)}),swapDoc:At(function(e){var t=this.doc;return t.cm=null,Xr(this,e),st(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ki(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Oi(e);var Jo=e.defaults={},ea=e.optionHandlers={},ta=e.Init={toString:function(){return"CodeMirror.Init"}};Vn("value","",function(e,t){e.setValue(t)},!0),Vn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Vn("indentUnit",2,n,!0),Vn("indentWithTabs",!1),Vn("smartIndent",!0),Vn("tabSize",4,function(e){r(e),st(e),Rt(e)},!0),Vn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(jo(r,o))}r++});for(var i=n.length-1;i>=0;i--)Pn(e.doc,t,n[i],jo(n[i].line,n[i].ch+t.length))}}),Vn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Vn("specialCharPlaceholder",Br,function(e){e.refresh()},!0),Vn("electricChars",!0),Vn("inputStyle",Oo?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Vn("rtlMoveVisually",!Ao),Vn("wholeLineUpdateBefore",!0),Vn("theme","default",function(e){s(e),l(e)},!0),Vn("keyMap","default",function(t,n,r){var i=$n(n),o=r!=e.Init&&$n(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Vn("extraKeys",null),Vn("lineWrapping",!1,i,!0),Vn("gutters",[],function(e){p(e.options),l(e)},!0),Vn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?k(e.display)+"px":"0",e.refresh()},!0),Vn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Vn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Vn("lineNumbers",!1,function(e){p(e.options),l(e)},!0),Vn("firstLineNumber",1,l,!0),Vn("lineNumberFormatter",function(e){return e},l,!0),Vn("showCursorWhenSelecting",!1,De,!0),Vn("resetSelectionOnContextMenu",!0),Vn("lineWiseCopyCut",!0),Vn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Vn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Vn("dragDrop",!0,zt),Vn("allowDropFileTypes",null),Vn("cursorBlinkRate",530),Vn("cursorScrollMargin",0),Vn("cursorHeight",1,De,!0),Vn("singleCursorHeightPerLine",!0,De,!0),Vn("workTime",100),Vn("workDelay",100),Vn("flattenSpans",!0,r,!0),Vn("addModeClass",!1,r,!0),Vn("pollInterval",100),Vn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Vn("historyEventDelay",1250),Vn("viewportMargin",10,function(e){e.refresh()},!0),Vn("maxHighlightLength",1e4,r,!0),Vn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Vn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Vn("autofocus",null);var na=e.modes={},ra=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),na[t]=n},e.defineMIME=function(e,t){ra[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ra.hasOwnProperty(t))t=ra[t];else if(t&&"string"==typeof t.name&&ra.hasOwnProperty(t.name)){var n=ra[t.name];"string"==typeof n&&(n={name:n}),t=Ii(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=na[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ia.hasOwnProperty(n.name)){var o=ia[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ia=e.modeExtensions={};e.extendMode=function(e,t){var n=ia.hasOwnProperty(e)?ia[e]:ia[e]={};ji(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){_a.prototype[e]=t},e.defineOption=Vn;var oa=[];e.defineInitHook=function(e){oa.push(e)};var aa=e.helpers={};e.registerHelper=function(t,n,r){aa.hasOwnProperty(t)||(aa[t]=e[t]={_global:[]}),aa[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),aa[t]._global.push({pred:r,val:i})};var sa=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},la=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ua=e.commands={selectAll:function(e){e.setSelection(jo(e.firstLine(),0),jo(e.lastLine()),Ia)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ia)},killLine:function(e){Wn(e,function(t){if(t.empty()){var n=Qr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new jo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),jo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Qr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),jo(i.line-1,a.length-1),jo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Ot(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Fn(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},ca=e.keyMap={};ca.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"},ca.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"},ca.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ca.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"]},ca["default"]=No?ca.macDefault:ca.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Di(n.split(" "),Kn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ma=0,ga=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};Oi(ga),ga.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Mi(this,"clear")){var n=this.find();n&&ki(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Oe(e.doc)),e&&ki(e,"markerCleared",e,this),t&&Ct(e),this.parent&&this.parent.clear()}},ga.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Mr(i),ki(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Gr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof $r))){var s=[];this.collapse(s),this.children=[new $r(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new $r(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Gr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Li(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Gr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Ca=0,_a=e.Doc=function(e,t,n,r){if(!(this instanceof _a))return new _a(e,t,n,r);null==n&&(n=0),Gr.call(this,[new $r([new ba("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=jo(n,0);this.sel=pe(i),this.history=new oi(null),this.id=++Ca,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Kr(this,{from:i,to:i,text:e}),Se(this,pe(i),Ia)};_a.prototype=Ii(Gr.prototype,{constructor:_a,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)Sn(this,r[o]);s?Ee(this,s):this.cm&&Fn(this.cm)}),undo:Pt(function(){Mn(this,"undo")}),redo:Pt(function(){Mn(this,"redo")}),undoSelection:Pt(function(){Mn(this,"undo",!0)}),redoSelection:Pt(function(){Mn(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(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=me(this,e),t=me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;sl.to||null==l.from&&i!=e.line||i==t.line&&l.from>t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),me(this,jo(n,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Ha=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},Ua=[""],Wa=function(e){e.select()};Mo?Wa=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Wa=function(e){try{e.select()}catch(t){}});var za,qa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Va=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qa.test(e))},Ka=/[\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]/;za=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var $a=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>xo&&(Vi=function(){try{return document.activeElement}catch(e){return document.body}});var Ga,Ya,Xa=e.rmClass=function(e,t){var n=e.className,r=Ki(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Qa=e.addClass=function(e,t){var n=e.className;Ki(t).test(n)||(e.className+=(n?" ":"")+t)},Za=!1,Ja=function(){if(bo&&9>xo)return!1;var e=Wi("div");return"draggable"in e||"dragDrop"in e}(),es=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ts=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ns=function(){var e=Wi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),rs=null,is=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)is[e+48]=is[e+96]=String(e);for(var e=65;90>=e;e++)is[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)is[e+111]=is[e+63235]="F"+e}();var os,as=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,u="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,p=u;c>d;++d){var r=f[d];"m"==r?f[d]=p:p=r}for(var d=0,h=u;c>d;++d){var r=f[d];"1"==r&&"r"==h?f[d]="n":a.test(r)&&(h=r,"r"==r&&(f[d]="R"))}for(var d=1,p=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=r||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var m=d+1;c>m&&"%"==f[m];++m);for(var g=d&&"!"==f[d-1]||c>m&&"1"==f[m]?"1":"N",v=d;m>v;++v)f[v]=g;d=m-1}}for(var d=0,h=u;c>d;++d){var r=f[d];"L"==h&&"1"==r?f[d]="L":a.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var m=d+1;c>m&&o.test(f[m]);++m);for(var y="L"==(d?f[d-1]:u),b="L"==(c>m?f[m]:u),g=y||b?"L":"R",v=d;m>v;++v)f[v]=g;d=m-1}for(var x,w=[],d=0;c>d;)if(s.test(f[d])){var C=d;for(++d;c>d&&s.test(f[d]);++d);w.push(new t(0,C,d))}else{var _=d,k=w.length;for(++d;c>d&&"L"!=f[d];++d);for(var v=_;d>v;)if(l.test(f[v])){v>_&&w.splice(k,0,new t(1,_,v));var E=v;for(++v;d>v&&l.test(f[v]);++v);w.splice(k,0,new t(2,E,v)),_=v}else++v;d>_&&w.splice(k,0,new t(1,_,d))}return 1==w[0].level&&(x=n.match(/^\s+/))&&(w[0].from=x[0].length,w.unshift(new t(0,0,x[0].length))),1==Pi(w).level&&(x=n.match(/\s+$/))&&(Pi(w).to-=x[0].length,w.push(new t(0,c-x[0].length,c))),2==w[0].level&&w.unshift(new t(1,w[0].to,w[0].to)),w[0].level!=Pi(w).level&&w.push(new t(w[0].level,c,c)),w}}();return e.version="5.11.0",e})},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return null==e||p["default"].isValidElement(e)}function o(e){return i(e)||Array.isArray(e)&&e.every(i)}function a(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var i=t[r](n,r,e);i instanceof Error}}function s(e,t){return f({},e,t)}function l(e){var t=e.type,n=s(t.defaultProps,e.props);if(t.propTypes&&a(t.displayName||t.name,t.propTypes,n),n.children){var r=u(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function u(e,t){var n=[];return p["default"].Children.forEach(e,function(e){if(p["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(l(e))}),n}function c(e){return o(e)?e=u(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var i=n(4),o=i.PropTypes.func,a=i.PropTypes.object,s=i.PropTypes.arrayOf,l=i.PropTypes.oneOfType,u=i.PropTypes.element,c=i.PropTypes.shape,f=i.PropTypes.string,d=c({listen:o.isRequired,pushState:o.isRequired,replaceState:o.isRequired,go:o.isRequired});t.history=d;var p=c({pathname:f.isRequired,search:f.isRequired,state:a,action:f.isRequired,key:f});t.location=p;var h=l([o,f]);t.component=h;var m=l([h,a]);t.components=m;var g=l([a,u]);t.route=g;var v=l([g,s(g)]);t.routes=v,t["default"]={falsy:r,history:d,location:p,component:h,components:m,route:g}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}function o(e){var t=i(e),n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substring(o),t=t.substring(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substring(a),t=t.substring(0,a)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0,t.extractPath=i,t.parsePath=o;var a=n(13);r(a)},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(269),o={mountComponent:function(e,t,n,i){var o=e.mountComponent(t,n,i);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),o},unmountComponent:function(e){i.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;l?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var i=n(21),o=n(3),a=n(12),s=(n(2),{type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);o(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";var r=n(1),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o(e){return i(e).replace(/\/+/g,"/+")}function a(e){for(var t="",n=[],r=[],i=void 0,a=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;i=s.exec(e);)i.index!==a&&(r.push(e.slice(a,i.index)),t+=o(e.slice(a,i.index))),i[1]?(t+="([^/?#]+)",n.push(i[1])):"**"===i[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===i[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]&&(t+=")?"),r.push(i[0]),a=s.lastIndex;return a!==e.length&&(r.push(e.slice(a,e.length)),t+=o(e.slice(a,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function s(e){return e in h||(h[e]=a(e)),h[e]}function l(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=s(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;r+="/*";var a="*"!==o[o.length-1];a&&(r+="([\\s\\S]*?)");var l=t.match(new RegExp("^"+r+"$","i")),u=void 0,c=void 0;if(null!=l){if(a){u=l.pop();var f=l[0].substr(0,l[0].length-u.length);if(u&&"/"!==f.charAt(f.length-1))return{remainingPathname:null,paramNames:i,paramValues:null}}else u="";c=l.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else u=c=null;return{remainingPathname:u,paramNames:i,paramValues:c}}function u(e){return s(e).paramNames}function c(e,t){var n=l(e,t),r=n.paramNames,i=n.paramValues;return null!=i?r.reduce(function(e,t,n){return e[t]=i[n],e},{}):null}function f(e,t){t=t||{};for(var n=s(e),r=n.tokens,i=0,o="",a=0,l=void 0,u=void 0,c=void 0,f=0,d=r.length;d>f;++f)l=r[f],"*"===l||"**"===l?(c=Array.isArray(t.splat)?t.splat[a++]:t.splat,null!=c||i>0?void 0:p["default"](!1),null!=c&&(o+=encodeURI(c))):"("===l?i+=1:")"===l?i-=1:":"===l.charAt(0)?(u=l.substring(1),c=t[u],null!=c||i>0?void 0:p["default"](!1),null!=c&&(o+=encodeURIComponent(c))):o+=l;return o.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=s,t.matchPattern=l,t.getParamNames=u,t.getParams=c,t.formatPattern=f;var d=n(8),p=r(d),h={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var i="POP";t.POP=i,t["default"]={PUSH:n,REPLACE:r,POP:i}},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(1),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},l=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var f in n){s.properties.hasOwnProperty(f)?i(!1):void 0;var d=f.toLowerCase(),p=n[f],h={attributeName:d,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseAttribute:r(p,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(p,t.MUST_USE_PROPERTY),hasSideEffects:r(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?i(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),l.hasOwnProperty(f)){var m=l[f];h.attributeName=m}a.hasOwnProperty(f)&&(h.attributeNamespace=a[f]),u.hasOwnProperty(f)&&(h.propertyName=u[f]),c.hasOwnProperty(f)&&(h.mutationMethod=c[f]),s.properties[f]=h}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t=a;a++)if(i(e,a)&&i(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return o(s)?void 0:d(!1),s}function c(e,t,n,r,i,o){e=e||"",t=t||"",e===t?d(!1):void 0;var u=a(t,e);u||a(e,t)?void 0:d(!1);for(var c=0,f=u?s:l,p=e;;p=f(p,t)){var h;if(i&&p===e||o&&p===t||(h=n(p,u,r)),h===!1||p===t)break;c++1){var t=e.indexOf(p,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var o=u(e,t);o!==e&&c(e,o,n,r,!1,!0),o!==t&&c(o,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:u,_getNextDescendantID:l,isAncestorIDOf:a,SEPARATOR:p};e.exports=g},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(107),i=n(247),o=n(120),a=n(129),s=n(130),l=n(1),u=(n(2),{}),c=null,f=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return f(e,!0)},p=function(e){return f(e,!1)},h=null,m={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?l(!1):void 0;var i=u[t]||(u[t]={});i[e]=n;var o=r.registrationNameModules[t];o&&o.didPutListener&&o.didPutListener(e,t,n)},getListener:function(e,t){var n=u[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=u[t];i&&delete i[e]},deleteAllListeners:function(e){for(var t in u)if(u[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete u[t][e]}},extractEvents:function(e,t,n,i,o){for(var s,l=r.plugins,u=0;u=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return u.stringify(e).replace(/%20/g,"+")}function a(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=C(t.substring(1)),e[m]={search:t,searchBase:""}}return e}function n(e,t){var n,r=e[m],i=t?w(t):"";if(!r&&!i)return e;"string"==typeof e&&(e=d.parsePath(e));var o=void 0;o=r&&e.search===r.search?r.searchBase:e.search||"";var a=o;return i&&(a+=(a?"&":"?")+i),s({},e,(n={search:a},n[m]={search:a,searchBase:o},n))}function r(e){return k.listenBefore(function(n,r){f["default"](e,t(n),r)})}function a(e){return k.listen(function(n){e(t(n))})}function l(e){k.push(n(e,e.query))}function u(e){k.replace(n(e,e.query))}function c(e,t){return k.createPath(n(e,t||e.query))}function p(e,t){return k.createHref(n(e,t||e.query))}function v(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];var a=k.createLocation.apply(k,[n(e,e.query)].concat(i));return e.query&&(a.query=e.query),t(a)}function y(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),l(s({state:e},t,{query:n}))}function b(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),u(s({state:e},t,{query:n}))}var x=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],w=x.stringifyQuery,C=x.parseQueryString,_=i(x,["stringifyQuery","parseQueryString"]),k=e(_);return"function"!=typeof w&&(w=o),"function"!=typeof C&&(C=g),s({},k,{listenBefore:r,listen:a,push:l,replace:u,createPath:c,createHref:p,createLocation:v,pushState:h["default"](y,"pushState is deprecated; use push instead"),replaceState:h["default"](b,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(5),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return{type:u,text:e,editor:t}}function o(e){return{type:c,toggledEditor:e}}function a(e){return{type:f,createdAt:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveEditors=t.ADD_REVISION=t.TOGGLE_EDITORS=t.UPDATE_TEXT=void 0,t.updateText=i,t.toggleEditors=o,t.addRevision=a;var s=n(26),l=r(s),u=t.UPDATE_TEXT="UPDATE_TEXT",c=t.TOGGLE_EDITORS="TOGGLE_EDITORS",f=t.ADD_REVISION="ADD_REVISION";t.ActiveEditors=(0,l["default"])({MARKDOWN:null,TEXT:null})},function(e,t,n){function r(e){if(!o(e)||c.call(e)!=a||i(e))return!1;var t=s;if("function"==typeof e.constructor&&(t=f(e)),null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}var i=n(203),o=n(204),a="[object Object]",s=Object.prototype,l=Function.prototype.toString,u=l.call(Object),c=s.toString,f=Object.getPrototypeOf;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var i=n(212),o=r(i),a=n(213),s=r(a);t.Provider=o["default"],t.connect=s["default"]},function(e,t){"use strict";function n(e,t,n){function r(){return s=!0,l?void(c=[].concat(i.call(arguments))):void n.apply(this,arguments)}function o(){if(!s&&(u=!0,!l)){for(l=!0;!s&&e>a&&u;)u=!1,t.call(this,a++,o,r);return l=!1,s?void n.apply(this,c):void(a>=e&&u&&(s=!0,n()))}}var a=0,s=!1,l=!1,u=!1,c=void 0;o()}function r(e,t,n){function r(e,t,r){a||(t?(a=!0,n(t)):(o[e]=r,a=++s===i,a&&n(null,o)))}var i=e.length,o=[];if(0===i)return n(null,o);var a=!1,s=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0;var i=Array.prototype.slice;t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;ts;++s)o=i[s](e);n(o)})}function g(){if(w.routes){for(var e=d(w.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function y(e){var t=u(e,!1);t&&(delete k[t],i(k)||(E&&(E(),E=null),S&&(S(),S=null)))}function b(t,n){var r=u(t),o=k[r];if(o)-1===o.indexOf(n)&&o.push(n);else{var a=!i(k);k[r]=[n],a&&(E=e.listenBefore(h),e.listenBeforeUnload&&(S=e.listenBeforeUnload(g)))}return function(){var e=k[r];if(e){var i=e.filter(function(e){return e!==n});0===i.length?y(t):k[r]=i}}}function x(t){return e.listen(function(n){w.location===n?t(null,w):o(n,function(n,r,i){n?t(n):r?e.transitionTo(r):i&&t(null,i)})})}var w={},C=void 0,_=1,k={},E=void 0,S=void 0;return{isActive:n,match:o,listenBeforeLeavingRoute:b,listen:x}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tt||e.hasOverloadedBooleanValue&&t===!1}var o=n(29),a=n(10),s=n(292),l=(n(2),/^[a-zA-Z_][\w\.\-]*$/),u={},c={},f={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(o.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,l=r.attributeNamespace;l?e.setAttributeNS(l,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}}else o.isCustomAttribute(t)&&f.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var i=n.propertyName,a=o.getDefaultValueForProperty(e.nodeName,i);n.hasSideEffects&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(f,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=f},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u(!1):void 0}function i(e){r(e),null!=e.value||null!=e.onChange?u(!1):void 0}function o(e){r(e),null!=e.checked||null!=e.onChange?u(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(126),l=n(42),u=n(1),c=(n(2),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),f={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},d={},p={checkPropTypes:function(e,t,n){for(var r in f){if(f.hasOwnProperty(r))var i=f[r](t,r,e,l.prop);if(i instanceof Error&&!(i.message in d)){d[i.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(o(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(o(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=p},function(e,t,n){"use strict";var r=n(63),i=n(7),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){i.purgeID(e)}};e.exports=o},function(e,t,n){"use strict";var r=n(1),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?r(!1):void 0,o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";var r=n(106),i=n(59),o=n(7),a=n(10),s=n(1),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},u={updatePropertyByID:function(e,t,n){var r=o.getNode(e);l.hasOwnProperty(t)?s(!1):void 0,null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=o.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[i]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||e===!1)t=new a(i);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?u(!1):void 0,t="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):u(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var o=n(253),a=n(118),s=n(124),l=n(3),u=n(1),c=(n(2),function(){});l(c.prototype,o.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";/** +!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/static/",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e){return e&&e.__esModule?e:{"default":e}}var o=n(4),a=i(o),s=n(90),u=n(51),l=n(98),c=n(77),f=n(308),d=r(f),p=n(301),h=i(p),m=n(79),v=i(m),g=n(37),y=(i(g),n(149)),b=i(y),x=n(153),A=i(x),w=n(156),k=(i(w),n(80)),P=(i(k),d.reducer(b["default"])),C=(0,h["default"])("atlas-store"),T=d.createMiddleware(C),E=(0,c.applyMiddleware)(T)(c.createStore),S=E(P),N=d.createLoader(C);N(S),(0,s.render)(a["default"].createElement(u.Provider,{store:S},a["default"].createElement(l.Router,{history:v["default"]},a["default"].createElement(l.Route,{path:"/",component:A["default"]}))),document.getElementById("root"))},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,a,s],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t,n){"use strict";var r=n(13),i=r;e.exports=i},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,i=1;i2?n-2:0),i=2;n>i;i++)r[i-2]=arguments[i]}t.__esModule=!0,t["default"]=i;var o=n(15);r(o);e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===X?e.documentElement:e.firstChild:null}function o(e){var t=i(e);return t&&Y.getID(t)}function a(e){var t=s(e);if(t)if(F.hasOwnProperty(t)){var n=F[t];n!==e&&(f(n,t)?I(!1):void 0,F[t]=e)}else F[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(W)||""}function u(e,t){var n=s(e);n!==t&&delete F[n],e.setAttribute(W,t),F[t]=e}function l(e){return F.hasOwnProperty(e)&&f(F[e],e)||(F[e]=Y.findReactNodeByID(e)),F[e]}function c(e){var t=T.get(e)._rootNodeID;return P.isNullComponentID(t)?null:(F.hasOwnProperty(t)&&f(F[t],t)||(F[t]=Y.findReactNodeByID(t)),F[t])}function f(e,t){if(e){s(e)!==t?I(!1):void 0;var n=Y.findReactContainerForID(t);if(n&&j(n,e))return!0}return!1}function d(e){delete F[e]}function p(e){var t=F[e];return t&&f(t,e)?void(J=t):!1}function h(e){J=null,C.traverseAncestors(e,p);var t=J;return J=null,t}function m(e,t,n,r,i,o){w.useCreateElement&&(o=L({},o),n.nodeType===X?o[V]=n:o[V]=n.ownerDocument);var a=N.mountComponent(e,t,r,o);e._renderedComponent._topLevelWrapper=e,Y._mountImageIntoNode(a,n,i,r)}function v(e,t,n,r,i){var o=O.ReactReconcileTransaction.getPooled(r);o.perform(m,null,e,t,n,o,r,i),O.ReactReconcileTransaction.release(o)}function g(e,t){for(N.unmountComponent(e),t.nodeType===X&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function y(e){var t=o(e);return t?t!==C.getReactRootIDFromNodeID(t):!1}function b(e){for(;e&&e.parentNode!==e;e=e.parentNode)if(1===e.nodeType){var t=s(e);if(t){var n,r=C.getReactRootIDFromNodeID(t),i=e;do if(n=s(i),i=i.parentNode,null==i)return null;while(n!==r);if(i===Z[r])return e}}return null}var x=n(29),A=n(40),w=(n(17),n(112)),k=n(9),P=n(119),C=n(30),T=n(34),E=n(122),S=n(10),N=n(24),M=n(64),O=n(11),L=n(3),R=n(31),j=n(82),D=n(71),I=n(1),z=n(47),H=n(74),W=(n(76),n(2),x.ID_ATTRIBUTE_NAME),F={},q=1,X=9,U=11,V="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),B={},Z={},G=[],J=null,K=function(){};K.prototype.isReactComponent={},K.prototype.render=function(){return this.props};var Y={TopLevelWrapper:K,_instancesByReactRootID:B,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return Y.scrollMonitor(n,function(){M.enqueueElementInternal(e,t),r&&M.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){!t||t.nodeType!==q&&t.nodeType!==X&&t.nodeType!==U?I(!1):void 0,A.ensureScrollValueMonitoring();var n=Y.registerContainer(t);return B[n]=e,n},_renderNewRootComponent:function(e,t,n,r){var i=D(e,null),o=Y._registerComponent(i,t);return O.batchedUpdates(v,i,o,t,n,r),i},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?I(!1):void 0,Y._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){k.isValidElement(t)?void 0:I(!1);var a=new k(K,null,null,null,null,null,t),u=B[o(n)];if(u){var l=u._currentElement,c=l.props;if(H(c,t)){var f=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(f)};return Y._updateRootComponent(u,a,n,d),f}Y.unmountComponentAtNode(n)}var p=i(n),h=p&&!!s(p),m=y(n),v=h&&!u&&!m,g=Y._renderNewRootComponent(a,n,v,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):R)._renderedComponent.getPublicInstance();return r&&r.call(g),g},render:function(e,t,n){return Y._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=o(e);return t&&(t=C.getReactRootIDFromNodeID(t)),t||(t=C.createReactRootID()),Z[t]=e,t},unmountComponentAtNode:function(e){!e||e.nodeType!==q&&e.nodeType!==X&&e.nodeType!==U?I(!1):void 0;var t=o(e),n=B[t];if(!n){var r=(y(e),s(e));r&&r===C.getReactRootIDFromNodeID(r);return!1}return O.batchedUpdates(g,n,e),delete B[t],delete Z[t],!0},findReactContainerForID:function(e){var t=C.getReactRootIDFromNodeID(e),n=Z[t];return n},findReactNodeByID:function(e){var t=Y.findReactContainerForID(e);return Y.findComponentRoot(t,e)},getFirstReactDOM:function(e){return b(e)},findComponentRoot:function(e,t){var n=G,r=0,i=h(t)||e;for(n[0]=i.firstChild,n.length=1;r1){for(var p=Array(d),h=0;d>h;h++)p[h]=arguments[h+2];o.children=p}if(e&&e.defaultProps){var m=e.defaultProps;for(i in m)"undefined"==typeof o[i]&&(o[i]=m[i])}return s(e,u,l,c,f,r.current,o)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceKey=function(e,t){var n=s(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},s.cloneAndReplaceProps=function(e,t){var n=s(e.type,e.key,e.ref,e._self,e._source,e._owner,t);return n},s.cloneElement=function(e,t,n){var o,u=i({},e.props),l=e.key,c=e.ref,f=e._self,d=e._source,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(l=""+t.key);for(o in t)t.hasOwnProperty(o)&&!a.hasOwnProperty(o)&&(u[o]=t[o])}var h=arguments.length-2;if(1===h)u.children=n;else if(h>1){for(var m=Array(h),v=0;h>v;v++)m[v]=arguments[v+2];u.children=m}return s(e.type,l,c,f,d,p,u)},s.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},e.exports=s},function(e,t,n){"use strict";function r(e,t,n){return n}var i={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){i.storedMeasure=e}}};e.exports=i},function(e,t,n){"use strict";function r(){T.ReactReconcileTransaction&&x?void 0:v(!1)}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled(!1)}function o(e,t,n,i,o,a){r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==g.length?v(!1):void 0,g.sort(a);for(var n=0;t>n;n++){var r=g[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,p.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var o=0;o=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var n,r,i;if(t.singleton){var o=y++;n=g||(g=s(t)),r=c.bind(null,n,o,!1),i=c.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function c(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function f(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var p={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,y=0,b=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;axo&&setTimeout(function(){u.display.input.reset(!0)},20),Xt(this),Ki(),xt(this),this.curOp.forceUpdate=!0,Yr(this,i),r.autofocus&&!No||u.hasFocus()?setTimeout(Hi(gn,this),20):yn(this);for(var c in ea)ea.hasOwnProperty(c)&&ea[c](this,r[c],ta);w(this),r.finishInit&&r.finishInit(this);for(var f=0;fxo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Ao||vo&&No||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,We(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Qa(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ya(e.display.wrapper,"CodeMirror-wrap"),d(e)),a(e),Dt(e),st(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(i){if(wr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function p(e){var t=Ri(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function h(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Ve(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+Ze(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=Xi("div",[Xi("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=Xi("div",[Xi("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Na(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Na(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>xo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function v(){}function g(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Ya(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Na(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Qa(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=h(e));var n=e.display.barWidth,r=e.display.barHeight;b(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&O(e),b(e,h(e)),n=e.display.barWidth,r=e.display.barHeight}function b(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",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=""}function x(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ue(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),a=ni(t,i);if(n&&n.ensure){var s=n.ensure.from.line,u=n.ensure.to.line;o>s?(o=s,a=ni(t,ri(Qr(t,s))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=a&&(o=ni(t,ri(Qr(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function A(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=P(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==qt(e))return!1;w(e)&&(zt(e),t.dims=R(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Io&&(o=xr(e.doc,o),a=Ar(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ft(e,o,a),n.viewOffset=ri(Qr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=qt(e);if(!s&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var l=Bi();return u>4&&(n.lineDiv.style.display="none"),j(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,l&&Bi()!=l&&l.offsetHeight&&l.focus(),Ui(n.cursorDiv),Ui(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,We(e,400)),n.updateLineNumbers=null,!0}function S(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ge(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ve(e.display)-Je(e),n.top)}),t.visible=x(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&E(e,t);r=!1){O(e);var i=h(e);je(e),M(e,i),y(e,i)}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 N(e,t){var n=new C(e,t);if(E(e,n)){O(e),S(e,n);var r=h(e);je(e),M(e,r),y(e,r),n.finish()}}function M(e,t){e.display.sizer.style.minHeight=t.docHeight+"px";var n=t.docHeight+e.display.barHeight;e.display.heightForcer.style.top=n+"px",e.display.gutters.style.height=Math.max(n+Ze(e),t.clientHeight)+"px"}function O(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rxo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var s=o.node.getBoundingClientRect();i=s.bottom-s.top}var u=o.line.height-i;if(2>i&&(i=yt(t)),(u>.001||-.001>u)&&(ei(o.line,i),L(o.line),o.rest))for(var l=0;l=t&&f.lineNumber;f.changes&&(Ri(f.changes,"gutter")>-1&&(d=!1),D(e,f,l,n)),d&&(Ui(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(k(e.options,l)))),s=f.node.nextSibling}else{var p=U(e,f,l,n);a.insertBefore(p,s)}l+=f.size}for(;s;)s=r(s)}function D(e,t,n,r){for(var i=0;ixo&&(e.node.style.zIndex=2)),e.node}function z(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=I(e);e.background=n.insertBefore(Xi("div",null,t),n.firstChild)}}function H(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Hr(e,t)}function W(e,t){var n=t.text.className,r=H(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,F(t)):n&&(t.text.className=n)}function F(e){z(e),e.line.wrapClass?I(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function q(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=I(t);t.gutterBackground=Xi("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=I(t),a=t.gutter=Xi("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px"); +if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(Xi("div",k(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s1)if(Wo&&Wo.join("\n")==t){if(r.ranges.length%Wo.length==0){u=[];for(var l=0;l=0;l--){var c=r.ranges[l],f=c.from(),d=c.to();c.empty()&&(n&&n>0?f=zo(f.line,f.ch-n):e.state.overwrite&&!a&&(d=zo(d.line,Math.min(Qr(o,d.line).text.length,d.ch+Li(s).length))));var p=e.curOp.updateInput,h={from:f,to:d,text:u?u[l%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Tn(e.doc,h),Pi(e,"inputRead",e,h)}t&&!a&&$(e,t),Hn(e),e.curOp.updateInput=p,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function _(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||Nt(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function $(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Fn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fn(e,i.head.line,"smart"));a&&Pi(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?l.map:c[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||s!=t)&&(f=o[a+(r?1:0)]),zo(u,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Ga(i,t))return ae(zo(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Li(e.rest):e.line;return ae(zo(ti(a),a.text.length),o)}var s=3==t.nodeType?t:null,u=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var l=e.measure,c=l.maps,f=r(s,u,n);if(f)return ae(f,o);for(var d=u.nextSibling,p=s?s.nodeValue.length-n:0;d;d=d.nextSibling){if(f=r(d,d.firstChild,0))return ae(zo(f.line,f.ch-p),o);p+=d.textContent.length}for(var h=u.previousSibling,p=n;h;h=h.previousSibling){if(f=r(h,h.firstChild,-1))return ae(zo(f.line,f.ch+p),o);p+=d.textContent.length}}function le(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(s+=n);var c,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(zo(r,0),zo(i+1,0),o(+f));return void(d.length&&(c=d[0].find())&&(s+=_r(e.doc,c.from,c.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;for(var p=0;p=0){var a=K(o.from(),i.from()),s=J(o.to(),i.to()),u=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(u?s:a,u?a:s))}}return new ce(e,t)}function pe(e,t){return new ce([new fe(e,t||e)],0)}function he(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.linen?zo(n,Qr(e,n).text.length):ve(t,Qr(e,t.line).text.length)}function ve(e,t){var n=e.ch;return null==n||n>t?zo(e.line,t):0>n?zo(e.line,0):e}function ge(e,t){return t>=e.first&&t=t.ch:s.to>t.ch))){if(i&&(La(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var l,c=u.find(0>r?1:-1);if((0>r?u.inclusiveRight:u.inclusiveLeft)&&(c=Re(e,c,-r,o)),c&&c.line==t.line&&(l=Ho(c,n))&&(0>r?0>l:l>0))return Oe(e,c,t,r,i)}var f=u.find(0>r?-1:1);return(0>r?u.inclusiveLeft:u.inclusiveRight)&&(f=Re(e,f,r,o)),f?Oe(e,f,t,r,i):null}}return t}function Le(e,t,n,r,i){var o=r||1,a=Oe(e,t,n,o,i)||!i&&Oe(e,t,n,o,!0)||Oe(e,t,n,-o,i)||!i&&Oe(e,t,n,-o,!0);return a?a:(e.cantEdit=!0,zo(e.first,0))}function Re(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?me(e,zo(t.line-1)):null:n>0&&t.ch==(r||Qr(e,t.line)).text.length?t.linet&&(t=0),t=Math.round(t),r=Math.round(r),s.appendChild(Xi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?c-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return dt(e,zo(t,n),"div",f,r)}var s,u,f=Qr(a,t),d=f.text.length;return eo(ii(f),n||0,null==i?d:i,function(e,t,a){var f,p,h,m=o(e,"left");if(e==t)f=m,p=h=m.left;else{if(f=o(t-1,"right"),"rtl"==a){var v=m;m=f,f=v}p=m.left,h=f.right}null==n&&0==e&&(p=l),f.top-m.top>3&&(r(p,m.top,null,m.bottom),p=l,m.bottomu.bottom||f.bottom==u.bottom&&f.right>u.right)&&(u=f),l+1>p&&(p=l),r(p,f.top,h-p,f.bottom)}),{start:s,end:u}}var o=e.display,a=e.doc,s=document.createDocumentFragment(),u=Be(e.display),l=u.left,c=Math.max(o.sizerWidth,Ge(e)-o.sizer.offsetLeft)-u.right,f=t.from(),d=t.to();if(f.line==d.line)i(f.line,f.ch,d.ch);else{var p=Qr(a,f.line),h=Qr(a,d.line),m=yr(p)==yr(h),v=i(f.line,f.ch,m?p.text.length+1:null).end,g=i(d.line,m?0:null,d.ch).start;m&&(v.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function We(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=sa(t.mode,Xe(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength,u=jr(e,o,s?sa(t.mode,r):r,!0);o.styles=u.styles;var l=o.styleClasses,c=u.classes;c?o.styleClasses=c:l&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),d=0;!f&&dn?(We(e,e.options.workDelay),!0):void 0}),i.length&&Nt(e,function(){for(var t=0;ta;--s){if(s<=o.first)return o.first;var u=Qr(o,s-1);if(u.stateAfter&&(!n||s<=o.frontier))return s;var l=Wa(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}function Xe(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=qe(e,t,n),a=o>r.first&&Qr(r,o-1).stateAfter;return a=a?sa(r.mode,a):ua(r.mode),r.iter(o,t,function(n){Ir(e,n.text,a);var s=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((u.bottom+l.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ye(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Qe(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Rt(e.doc,t,n);r.lineN=n;var i=r.built=Hr(e,r);return r.text=i.pre,Vi(e.display.lineMeasure,i.pre),r}function _e(e,t,n,r){return tt(e,et(e,t),n,r)}function $e(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):l>t?(i=t-u,o=i+1):(s==e.length-3||t==l&&e[s+3]>t)&&(o=l-u,i=o-1,t>=l&&(a="right")),null!=i){if(r=e[s+2],u==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;s&&e[s-2]==e[s-3]&&e[s-1].insertLeft;)r=e[(s-=3)+2],a="left";if("right"==n&&i==l-u)for(;sc;c++){for(;s&&qi(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+uxo&&0==s&&u==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var f=Ua(a,s,u).getClientRects();i=f.length?f["right"==r?f.length-1:0]:Uo}else i=Ua(a,s,u).getBoundingClientRect()||Uo;if(i.left||i.right||0==s)break;u=s,s-=1,l="right"}bo&&11>xo&&(i=it(e.display.measure,i))}else{s>0&&(l=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(bo&&9>xo&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+bt(e.display),top:d.top,bottom:d.bottom}:Uo}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,m=(p+h)/2,v=t.view.measure.heights,c=0;cn.from?a(e-1):a(e,r)}r=r||Qr(e.doc,t.line),i||(i=et(e,r));var u=ii(r),l=t.ch;if(!u)return a(l);var c=lo(u,l),f=s(l,c);return null!=os&&(f.other=s(l,os)),f}function ht(e,t){var n=0,t=me(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var r=Qr(e.doc,t.line),i=ri(r)+Ue(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function mt(e,t,n,r){var i=zo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function vt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return mt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return mt(r.first+r.size-1,Qr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Qr(r,i);;){var s=gt(e,a,i,t,n),u=vr(a),l=u&&u.find(0,!0);if(!u||!(s.ch>l.from.ch||s.ch==l.from.ch&&s.xRel>0))return s;i=ti(a=l.to.line)}}function gt(e,t,n,r,i){function o(r){var i=pt(e,zo(n,r),"line",t,l);return s=!0,a>i.bottom?i.left-u:av)return mt(n,p,g,1);for(;;){if(c?p==d||p==fo(t,d,1):1>=p-d){for(var y=h>r||v-r>=r-h?d:p,b=r-(y==d?h:v);qi(t.text.charAt(y));)++y;var x=mt(n,y,y==d?m:g,-1>b?-1:b>1?1:0);return x}var A=Math.ceil(f/2),w=d+A;if(c){w=d;for(var k=0;A>k;++k)w=fo(t,w,1)}var P=o(w);P>r?(p=w,v=P,(g=s)&&(v+=1e3),f=A):(d=w,h=P,m=s,f-=A)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Fo){Fo=Xi("pre");for(var t=0;49>t;++t)Fo.appendChild(document.createTextNode("x")),Fo.appendChild(Xi("br"));Fo.appendChild(document.createTextNode("x"))}Vi(e.measure,Fo);var n=Fo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ui(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=Xi("span","xxxxxxxxxx"),n=Xi("pre",[t]);Vi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function xt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bo},Vo?Vo.ops.push(e.curOp):e.curOp.ownsGroup=Vo={ops:[e.curOp],delayedCallbacks:[]}}function At(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new C(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ct(e){e.updatedDisplay=e.mustUpdate&&E(e.cm,e.update)}function Tt(e){var t=e.cm,n=t.display;e.updatedDisplay&&O(t),e.barMeasure=h(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_e(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+Ze(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ge(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Et(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Rt(e.doc,Qr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Io&&xr(e.doc,t)i.viewFrom?zt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)zt(e);else if(t<=i.viewFrom){var o=Wt(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):zt(e)}else if(n>=i.viewTo){var o=Wt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):zt(e)}else{var a=Wt(e,t,t,-1),s=Wt(e,n,n+r,1);a&&s?(i.view=i.view.slice(0,a.index).concat(jt(e,a.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):zt(e)}var u=i.externalMeasured;u&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Ht(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Ri(a,n)&&a.push(n)}}}function zt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ht(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function Wt(e,t,n,r){var i,o=Ht(e,t),a=e.display.view;if(!Io||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=0,u=e.display.viewFrom;o>s;s++)u+=a[s].size;if(u!=t){if(r>0){if(o==a.length-1)return null;i=u+a[o].size-t,o++}else i=u-t;t+=i,n+=i}for(;xr(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Ft(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=jt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=jt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Ht(e,n)))),r.viewTo=n}function qt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Na(i.scroller,"mousedown",Mt(e,Gt)),bo&&11>xo?Na(i.scroller,"dblclick",Mt(e,function(t){if(!Ti(e,t)){var n=Zt(e,t);if(n&&!_t(e,t)&&!Bt(e.display,t)){Ta(t);var r=e.findWordAt(n);xe(e.doc,r.anchor,r.head)}}})):Na(i.scroller,"dblclick",function(t){Ti(e,t)||Ta(t)}),jo||Na(i.scroller,"contextmenu",function(t){bn(e,t)});var o,a={end:0};Na(i.scroller,"touchstart",function(t){if(!Ti(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Na(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Na(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Bt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new fe(zo(s.line,0),me(e.doc,zo(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ta(n)}t()}),Na(i.scroller,"touchcancel",t),Na(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),La(e,"scroll",e))}),Na(i.scroller,"mousewheel",function(t){an(e,t)}),Na(i.scroller,"DOMMouseScroll",function(t){an(e,t)}),Na(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ti(e,t)||Sa(t)},over:function(t){Ti(e,t)||(tn(e,t),Sa(t))},start:function(t){en(e,t)},drop:Mt(e,$t),leave:function(){nn(e)}};var s=i.input.getField();Na(s,"keyup",function(t){hn.call(e,t)}),Na(s,"keydown",Mt(e,dn)),Na(s,"keypress",Mt(e,mn)),Na(s,"focus",Hi(gn,e)),Na(s,"blur",Hi(yn,e))}function Ut(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Na:Oa;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function Vt(e){var t=e.display;(t.lastWrapHeight!=t.wrapper.clientHeight||t.lastWrapWidth!=t.wrapper.clientWidth)&&(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Bt(e,t){for(var n=Ai(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Zt(e,t,n,r){var i=e.display;if(!n&&"true"==Ai(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(t){return null}var u,l=vt(e,o,a);if(r&&1==l.xRel&&(u=Qr(e.doc,l.line).text).length==l.ch){var c=Wa(u,u.length,e.options.tabSize)-u.length;l=zo(l.line,Math.max(0,Math.round((o-Be(e.display).left)/bt(e.display))-c))}return l}function Gt(e){var t=this,n=t.display;if(!(Ti(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Bt(n,e))return void(Ao||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!_t(t,e)){ +var r=Zt(t,e);switch(window.focus(),wi(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Jt(t,e,r):Ai(e)==n.scroller&&Ta(e);break;case 2:Ao&&(t.state.lastMiddleDown=+new Date),r&&xe(t.doc,r),setTimeout(function(){n.input.focus()},20),Ta(e);break;case 3:jo?bn(t,e):vn(t)}}}}function Jt(e,t,n){bo?setTimeout(Hi(Y,e),0):e.curOp.focus=Bi();var r,i=+new Date;Xo&&Xo.time>i-400&&0==Ho(Xo.pos,n)?r="triple":qo&&qo.time>i-400&&0==Ho(qo.pos,n)?(r="double",Xo={time:i,pos:n}):(r="single",qo={time:i,pos:n});var o,a=e.doc.sel,s=Mo?t.metaKey:t.ctrlKey;e.options.dragDrop&&$a&&!e.isReadOnly()&&"single"==r&&(o=a.contains(n))>-1&&(Ho((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(Ho(o.to(),n)>0||n.xRel<0)?Kt(e,t,n,s):Yt(e,t,n,r,s)}function Kt(e,t,n,r){var i=e.display,o=+new Date,a=Mt(e,function(s){Ao&&(i.scroller.draggable=!1),e.state.draggingText=!1,Oa(document,"mouseup",a),Oa(i.scroller,"drop",a),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Ta(s),!r&&+new Date-200=h;h++){var g=Qr(l,h).text,y=Fa(g,u,o);u==p?i.push(new fe(zo(h,y),zo(h,y))):g.length>y&&i.push(new fe(zo(h,y),zo(h,Fa(g,p,o))))}i.length||i.push(new fe(n,n)),Te(l,de(d.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=c,x=b.anchor,A=t;if("single"!=r){if("double"==r)var w=e.findWordAt(t);else var w=new fe(zo(t.line,0),me(l,zo(t.line+1,0)));Ho(w.anchor,x)>0?(A=w.head,x=K(b.from(),w.anchor)):(A=w.anchor,x=J(b.to(),w.head))}var i=d.ranges.slice(0);i[f]=new fe(me(l,x),A),Te(l,de(i,f),za)}}function a(t){var n=++y,i=Zt(e,t,!0,"rect"==r);if(i)if(0!=Ho(i,v)){e.curOp.focus=Bi(),o(i);var s=x(u,l);(i.line>=s.to||i.lineg.bottom?20:0;c&&setTimeout(Mt(e,function(){y==n&&(u.scroller.scrollTop+=c,a(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Ta(t),u.input.focus(),Oa(document,"mousemove",b),Oa(document,"mouseup",A),l.history.lastSelOrigin=null}var u=e.display,l=e.doc;Ta(t);var c,f,d=l.sel,p=d.ranges;if(i&&!t.shiftKey?(f=l.sel.contains(n),c=f>-1?p[f]:new fe(n,n)):(c=l.sel.primary(),f=l.sel.primIndex),t.altKey)r="rect",i||(c=new fe(n,n)),n=Zt(e,t,!0,!0),f=-1;else if("double"==r){var h=e.findWordAt(n);c=e.display.shift||l.extend?be(l,c,h.anchor,h.head):h}else if("triple"==r){var m=new fe(zo(n.line,0),me(l,zo(n.line+1,0)));c=e.display.shift||l.extend?be(l,c,m.anchor,m.head):m}else c=be(l,c,n);i?-1==f?(f=p.length,Te(l,de(p.concat([c]),f),{scroll:!1,origin:"*mouse"})):p.length>1&&p[f].empty()&&"single"==r&&!t.shiftKey?(Te(l,de(p.slice(0,f).concat(p.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),d=l.sel):we(l,f,c,za):(f=0,Te(l,new ce([c],0),za),d=l.sel);var v=n,g=u.wrapper.getBoundingClientRect(),y=0,b=Mt(e,function(e){wi(e)?a(e):s(e)}),A=Mt(e,s);e.state.selectingText=A,Na(document,"mousemove",b),Na(document,"mouseup",A)}function Qt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ta(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Si(e,n))return xi(t);o-=s.top-a.viewOffset;for(var u=0;u=i){var c=ni(e.doc,o),f=e.options.gutters[u];return La(e,n,e,c,f,t),xi(t)}}}function _t(e,t){return Qt(e,t,"gutterClick",!0)}function $t(e){var t=this;if(nn(t),!Ti(t,e)&&!Bt(t.display,e)){Ta(e),bo&&(Zo=+new Date);var n=Zt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,s=function(e,r){if(!t.options.allowDropFileTypes||-1!=Ri(t.options.allowDropFileTypes,e.type)){var s=new FileReader;s.onload=Mt(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=me(t.doc,n);var u={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Tn(t.doc,u),Ce(t.doc,pe(n,_o(u)))}}),s.readAsText(e)}},u=0;i>u;++u)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Mo?e.altKey:e.ctrlKey))var l=t.listSelections();if(Ee(t.doc,pe(n,n)),l)for(var u=0;ua.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Mo&&Ao)e:for(var l=t.target,c=o.view;l!=a;l=l.parentNode)for(var f=0;fd?p=Math.max(0,p+d-50):h=Math.min(e.doc.height,h+d+50),N(e,{top:p,bottom:h})}20>Go&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Jo=(Jo*Go+n)/(Go+1),++Go)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function sn(e,t,n){if("string"==typeof t&&(t=la[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Da}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function un(e,t,n){for(var r=0;rxo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=cn(t,e);Po&&(Qo=r?n:null,!r&&88==n&&!ns&&(Mo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||pn(t)}}function pn(e){function t(e){18!=e.keyCode&&e.altKey||(Ya(n,"CodeMirror-crosshair"),Oa(document,"keyup",t),Oa(document,"mouseover",t))}var n=e.display.lineDiv;Qa(n,"CodeMirror-crosshair"),Na(document,"keyup",t),Na(document,"mouseover",t)}function hn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ti(this,e)}function mn(e){var t=this;if(!(Bt(t.display,e)||Ti(t,e)||e.ctrlKey&&!e.altKey||Mo&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(Po&&n==Qo)return Qo=null,void Ta(e);if(!Po||e.which&&!(e.which<10)||!cn(t,e)){var i=String.fromCharCode(null==r?n:r);fn(t,e,i)||t.display.input.onKeyPress(e)}}}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function gn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(La(e,"focus",e),e.state.focused=!0,Qa(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Ao&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),He(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(La(e,"blur",e),e.state.focused=!1,Ya(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){Bt(e.display,t)||xn(e,t)||Ti(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xn(e,t){return Si(e,"gutterContextMenu")?Qt(e,t,"gutterContextMenu",!1):!1}function An(e,t){if(Ho(e,t.from)<0)return e;if(Ho(e,t.to)<=0)return _o(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+=_o(t).ch-t.to.ch),zo(n,r)}function wn(e,t){for(var n=[],r=0;r=0;--i)En(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else En(e,t)}}function En(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Ho(t.from,t.to)){var n=wn(e,t);li(e,t,n,e.cm?e.cm.curOp.id:NaN),Mn(e,t,n,or(e,t));var r=[];Kr(e,function(e,n){n||-1!=Ri(r,e.history)||(bi(e.history,t),r.push(e.history)),Mn(e,t,null,or(e,t))})}}function Sn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,u=0;u=0;--u){var f=r.changes[u];if(f.origin=t,c&&!Cn(e,f,!1))return void(a.length=0);l.push(ai(e,f));var d=u?wn(e,f):Li(a);Mn(e,f,d,sr(e,f)),!u&&e.cm&&e.cm.scrollIntoView({from:f.from,to:_o(f)});var p=[];Kr(e,function(e,t){t||-1!=Ri(p,e.history)||(bi(e.history,f),p.push(e.history)),Mn(e,f,null,sr(e,f))})}}}}function Nn(e,t){if(0!=t&&(e.first+=t,e.sel=new ce(ji(e.sel.ranges,function(e){return new fe(zo(e.anchor.line+t,e.anchor.ch),zo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:zo(o,Qr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_r(e,t.from,t.to),n||(n=wn(e,t)),e.cm?On(e.cm,t,r):Zr(e,t,r),Ee(e,n,Ia)}}function On(e,t,n){var r=e.doc,i=e.display,a=t.from,s=t.to,u=!1,l=a.line;e.options.lineWrapping||(l=ti(yr(Qr(r,a.line))),r.iter(l,s.line+1,function(e){return e==i.maxLine?(u=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Ei(e),Zr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(l,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),We(e,400);var c=t.text.length-(s.line-a.line)-1;t.full?Dt(e):a.line!=s.line||1!=t.text.length||Br(e.doc,t)?Dt(e,a.line,s.line+1,c):It(e,a.line,"text");var d=Si(e,"changes"),p=Si(e,"change");if(p||d){var h={from:a,to:s,text:t.text,removed:t.removed,origin:t.origin};p&&Pi(e,"change",e,h),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ln(e,t,n,r,i){if(r||(r=n),Ho(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Tn(e,{from:n,to:r,text:t,origin:i})}function Rn(e,t){if(!Ti(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Eo){var o=Xi("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ue(e.display))+"px; height: "+(t.bottom-t.top+Ze(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function jn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=pt(e,t),s=n&&n!=t?pt(e,n):a,u=In(e,Math.min(a.left,s.left),Math.min(a.top,s.top)-r,Math.max(a.left,s.left),Math.max(a.bottom,s.bottom)+r),l=e.doc.scrollTop,c=e.doc.scrollLeft;if(null!=u.scrollTop&&(rn(e,u.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(o=!0)),null!=u.scrollLeft&&(on(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-c)>1&&(o=!0)),!o)break}return a}function Dn(e,t,n,r,i){var o=In(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function In(e,t,n,r,i){var o=e.display,a=yt(e.display);0>n&&(n=0);var s=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,u=Je(e),l={};i-n>u&&(i=n+u);var c=e.doc.height+Ve(o),f=a>n,d=i>c-a;if(s>n)l.scrollTop=f?0:n;else if(i>s+u){var p=Math.min(n,(d?c:i)-u);p!=s&&(l.scrollTop=p)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=Ge(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),v=r-t>m;return v&&(r=t+m),10>t?l.scrollLeft=0:h>t?l.scrollLeft=Math.max(0,t-(v?0:10)):r>m+h-3&&(l.scrollLeft=r+(v?0:10)-m),l}function zn(e,t,n){(null!=t||null!=n)&&Wn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Hn(e){Wn(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?zo(t.line,t.ch-1):t,r=zo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function Wn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=ht(e,t.from),r=ht(e,t.to),i=In(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Fn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Xe(e,t):n="prev");var a=e.options.tabSize,s=Qr(o,t),u=Wa(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var l,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&(l=o.mode.indent(i,s.text.slice(c.length),s.text),l==Da||l>150)){if(!r)return;n="prev"}}else l=0,n="not";"prev"==n?l=t>o.first?Wa(Qr(o,t-1).text,null,a):0:"add"==n?l=u+e.options.indentUnit:"subtract"==n?l=u-e.options.indentUnit:"number"==typeof n&&(l=u+n),l=Math.max(0,l);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/a);p;--p)d+=a,f+=" ";if(l>d&&(f+=Oi(l-d)),f!=c)return Ln(o,f,zo(t,0),zo(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p=0;t--)Ln(e.doc,"",r[t].from,r[t].to,"+delete");Hn(e)})}function Un(e,t,n,r,i){function o(){var t=s+n;return t=e.first+e.size?!1:(s=t,c=Qr(e,t))}function a(e){var t=(i?fo:po)(c,u,n,!0);if(null==t){if(e||!o())return!1;u=i?(0>n?io:ro)(c):0>n?c.text.length:0}else u=t;return!0}var s=t.line,u=t.ch,l=n,c=Qr(e,s);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,d="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(0>n)||a(!h);h=!1){var m=c.text.charAt(u)||"\n",v=Wi(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||h||v||(v="s"),f&&f!=v){0>n&&(n=1,a());break}if(v&&(f=v),n>0&&!a(!h))break}var g=Le(e,zo(s,u),t,l,!0);return Ho(t,g)||(g.hitSide=!0),g}function Vn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(s-(0>n?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var u=vt(e,a,i);if(!u.outside)break;if(0>n?0>=i:i>=o.height){u.hitSide=!0;break}i+=5*n}return u}function Bn(t,n,r,i){e.defaults[t]=n,r&&(ea[t]=i?function(e,t,n){n!=ta&&r(e,t,n)}:r)}function Zn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Xi("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(gr(e,t.line,t,n,o)||t.line!=n.line&&gr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Io=!0}o.addToHistory&&li(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,u=t.line,l=e.cm;if(e.iter(u,n.line+1,function(e){l&&o.collapsed&&!l.options.lineWrapping&&yr(e)==l.display.maxLine&&(s=!0),o.collapsed&&u!=t.line&&ei(e,0),nr(e,new $n(o,u==t.line?t.ch:null,u==n.line?n.ch:null)),++u}),o.collapsed&&e.iter(t.line,n.line+1,function(t){wr(e,t)&&ei(t,0)}),o.clearOnEnter&&Na(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Do=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ma,o.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),o.collapsed)Dt(l,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=n.line;c++)It(l,c,"text");o.atomic&&Ne(l.doc),Pi(l,"markerAdded",l,o)}return o}function Kn(e,t,n,r,i){r=zi(r),r.shared=!1;var o=[Jn(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Kr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Jn(e,me(e,t),me(e,n),r,i));for(var u=0;u=t:o.to>t);(r||(r=[])).push(new $n(a,o.from,u?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var f=0;ff;++f)h.push(m);h.push(u)}return h}function ar(e){for(var t=0;t0)){var c=[u,1],f=Ho(l.from,s.from),d=Ho(l.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:l.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&c.push({from:s.to,to:l.to}),i.splice.apply(i,c),u+=c.length-1}}return i}function lr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Ho(l.to,n)>0||u.marker.inclusiveRight&&i.inclusiveLeft)||c>=0&&(Ho(l.from,r)<0||u.marker.inclusiveLeft&&i.inclusiveRight)))return!0}}}function yr(e){for(var t;t=mr(e);)e=t.find(-1,!0).line;return e}function br(e){for(var t,n;t=vr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function xr(e,t){var n=Qr(e,t),r=yr(n);return n==r?t:ti(r)}function Ar(e,t){if(t>e.lastLine())return t;var n,r=Qr(e,t);if(!wr(e,r))return t;for(;n=vr(r);)r=n.find(1,!0).line;return ti(r)+1}function wr(e,t){var n=Io&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Lr(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?sa(a.mode,c):c}}var o,a=e.doc,s=a.mode;t=me(a,t);var u,l=Qr(a,t.line),c=Xe(e,t.line,n),f=new ha(l.text,e.options.tabSize);for(r&&(u=[]);(r||f.pose.options.maxHighlightLength?(s=!1,a&&Ir(e,t,r,f.pos),f.pos=t.length,u=null):u=Nr(Or(n,f,r,d),o),d){var p=d[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!s||c!=u){for(;ll;){var r=i[u];r>e&&i.splice(u,1,e,i[u+1],r),u+=2,l=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"cm-overlay "+t),u=n+2;else for(;u>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Dr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=Xe(e,ti(t)),i=jr(e,t,t.text.length>e.options.maxHighlightLength?sa(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ir(e,t,n,r){var i=e.doc.mode,o=new ha(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Mr(i,n);!o.eol();)Or(i,o,n),o.start=o.pos}function zr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Aa:xa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Hr(e,t){var n=Xi("span",null,null,Ao?"padding-right: .1px":null),r={pre:Xi("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||Ao)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Fr,_i(e.display.measure)&&(o=ii(a))&&(r.addToken=Xr(r.addToken,o)),r.map=[];var s=t!=e.display.externalMeasured&&ti(a);Vr(a,r,Dr(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Gi(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Gi(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Qi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return Ao&&/\bcm-tab\b/.test(r.content.lastChild.className)&&(r.content.className="cm-tab-wrap-hack"),La(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Gi(r.pre.className,r.textClass||"")),r}function Wr(e){var t=Xi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fr(e,t,n,r,i,o,a){if(t){var s=e.splitSpaces?t.replace(/ {3,}/g,qr):t,u=e.cm.state.specialChars,l=!1;if(u.test(t))for(var c=document.createDocumentFragment(),f=0;;){u.lastIndex=f;var d=u.exec(t),p=d?d.index-f:t.length-f;if(p){var h=document.createTextNode(s.slice(f,f+p));bo&&9>xo?c.appendChild(Xi("span",[h])):c.appendChild(h),e.map.push(e.pos,e.pos+p,h),e.col+=p,e.pos+=p}if(!d)break;if(f+=p+1," "==d[0]){var m=e.cm.options.tabSize,v=m-e.col%m,h=c.appendChild(Xi("span",Oi(v),"cm-tab"));h.setAttribute("role","presentation"),h.setAttribute("cm-text"," "),e.col+=v}else if("\r"==d[0]||"\n"==d[0]){var h=c.appendChild(Xi("span","\r"==d[0]?"␍":"␤","cm-invalidchar")); +h.setAttribute("cm-text",d[0]),e.col+=1}else{var h=e.cm.options.specialCharPlaceholder(d[0]);h.setAttribute("cm-text",d[0]),bo&&9>xo?c.appendChild(Xi("span",[h])):c.appendChild(h),e.col+=1}e.map.push(e.pos,e.pos+1,h),e.pos++}else{e.col+=t.length;var c=document.createTextNode(s);e.map.push(e.pos,e.pos+t.length,c),bo&&9>xo&&(l=!0),e.pos+=t.length}if(n||r||i||l||a){var g=n||"";r&&(g+=r),i&&(g+=i);var y=Xi("span",[c],g,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(c)}}function qr(e){for(var t=" ",n=0;nl&&d.from<=l)break}if(d.to>=c)return e(n,r,i,o,a,s,u);e(n,r.slice(0,d.to-l),i,o,null,s,u),o=null,r=r.slice(d.to-l),l=d.to}}}function Ur(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function Vr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,l,c,f,d,p=i.length,h=0,m=1,v="",g=0;;){if(g==h){u=l=c=f=s="",d=null,g=1/0;for(var y,b=[],x=0;xh||w.collapsed&&A.to==h&&A.from==h)?(null!=A.to&&A.to!=h&&g>A.to&&(g=A.to,l=""),w.className&&(u+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&A.from==h&&(c+=" "+w.startStyle),w.endStyle&&A.to==g&&(y||(y=[])).push(w.endStyle,A.to),w.title&&!f&&(f=w.title),w.collapsed&&(!d||pr(d.marker,w)<0)&&(d=A)):A.from>h&&g>A.from&&(g=A.from)}if(y)for(var x=0;x=p)break;for(var k=Math.min(p,g);;){if(v){var P=h+v.length;if(!d){var C=P>k?v.slice(0,k-h):v;t.addToken(t,C,a?a+u:u,c,h+C.length==g?l:"",f,s)}if(P>=k){v=v.slice(k-h),h=k;break}h=P,c=""}v=i.slice(o,o=n[m++]),a=zr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)o.push(new ba(l[n],i(n),r));return o}var s=t.from,u=t.to,l=t.text,c=Qr(e,s.line),f=Qr(e,u.line),d=Li(l),p=i(l.length-1),h=u.line-s.line;if(t.full)e.insert(0,a(0,l.length)),e.remove(l.length,e.size-l.length);else if(Br(e,t)){var m=a(0,l.length-1);o(f,f.text,p),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==f)if(1==l.length)o(c,c.text.slice(0,s.ch)+d+c.text.slice(u.ch),p);else{var m=a(1,l.length-1);m.push(new ba(d+c.text.slice(u.ch),p,r)),o(c,c.text.slice(0,s.ch)+l[0],i(0)),e.insert(s.line+1,m)}else if(1==l.length)o(c,c.text.slice(0,s.ch)+l[0]+f.text.slice(u.ch),i(0)),e.remove(s.line+1,h);else{o(c,c.text.slice(0,s.ch)+l[0],i(0)),o(f,d+f.text.slice(u.ch),p);var m=a(1,l.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}Pi(e,"change",e,t)}function Gr(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||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 i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function _r(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function $r(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Ri(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=s}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Li(e.done)):void 0}function li(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ui(i,i.lastOp==r))){var s=Li(o.changes);0==Ho(t.from,t.to)&&0==Ho(t.from,s.to)?s.to=_o(t):o.changes.push(ai(e,t))}else{var u=Li(i.done);for(u&&u.ranges||di(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||La(e,"historyAdded")}function ci(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ci(e,o,Li(i.done),t))?i.done[i.done.length-1]=t:di(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&si(i.undone)}function di(e,t){var n=Li(t);n&&n.ranges&&n.equals(e)||t.push(e)}function pi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function hi(e){if(!e)return null;for(var t,n=0;n-1&&(Li(s)[f]=c[f],delete c[f])}}}return i}function gi(e,t,n,r){n0?r.slice():Ma:r||Ma}function Pi(e,t){function n(e){return function(){e.apply(null,o)}}var r=ki(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);Vo?i=Vo.delayedCallbacks:Ra?i=Ra:(i=Ra=[],setTimeout(Ci,0));for(var a=0;a0}function Ni(e){e.prototype.on=function(e,t){Na(this,e,t)},e.prototype.off=function(e,t){Oa(this,e,t)}}function Mi(){this.id=null}function Oi(e){for(;qa.length<=e;)qa.push(Li(qa)+" ");return qa[e]}function Li(e){return e[e.length-1]}function Ri(e,t){for(var n=0;n-1&&Ba(e)?!0:t.test(e):Ba(e)}function Fi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function qi(e){return e.charCodeAt(0)>=768&&Za.test(e)}function Xi(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Vi(e,t){return Ui(e).appendChild(t)}function Bi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Zi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Gi(e,t){for(var n=e.split(" "),r=0;r2&&!(bo&&8>xo))}var n=Ja?Xi("span","​"):Xi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function _i(e){if(null!=Ka)return Ka;var t=Vi(e,document.createTextNode("AخA")),n=Ua(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=Ua(t,1,2).getBoundingClientRect();return Ka=r.right-n.right<3}function $i(e){if(null!=rs)return rs;var t=Vi(e,Xi("span","x")),n=t.getBoundingClientRect(),r=Ua(t,0,1).getBoundingClientRect();return rs=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Li(t)):e.text.length}function oo(e,t){var n=Qr(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return zo(t,o)}function ao(e,t){for(var n,r=Qr(e.doc,t);n=vr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return zo(null==t?ti(r):t,o)}function so(e,t){var n=oo(e,t.line),r=Qr(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return zo(n.line,a?0:o)}return n}function uo(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function lo(e,t){os=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return uo(e,i.level,e[n].level)?(i.from!=i.to&&(os=n),r):(i.from!=i.to&&(os=r),n);n=r}}return n}function co(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&qi(e.text.charAt(t)));return t}function fo(e,t,n,r){var i=ii(e);if(!i)return po(e,t,n,r);for(var o=lo(i,t),a=i[o],s=co(e,t,a.level%2?-n:n,r);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;s=n>0==a.level%2?co(e,a.to,-1,r):co(e,a.from,1,r)}}function po(e,t,n,r){var i=t+n;if(r)for(;i>0&&qi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var ho=navigator.userAgent,mo=navigator.platform,vo=/gecko\/\d/i.test(ho),go=/MSIE \d/.test(ho),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ho),bo=go||yo,xo=bo&&(go?document.documentMode||6:yo[1]),Ao=/WebKit\//.test(ho),wo=Ao&&/Qt\/\d+\.\d+/.test(ho),ko=/Chrome\//.test(ho),Po=/Opera\//.test(ho),Co=/Apple Computer/.test(navigator.vendor),To=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ho),Eo=/PhantomJS/.test(ho),So=/AppleWebKit/.test(ho)&&/Mobile\/\w+/.test(ho),No=So||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ho),Mo=So||/Mac/.test(mo),Oo=/win/i.test(mo),Lo=Po&&ho.match(/Version\/(\d*\.\d*)/);Lo&&(Lo=Number(Lo[1])),Lo&&Lo>=15&&(Po=!1,Ao=!0);var Ro=Mo&&(wo||Po&&(null==Lo||12.11>Lo)),jo=vo||bo&&xo>=9,Do=!1,Io=!1;m.prototype=zi({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 i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else 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 o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"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}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Mo&&!To?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Mi,this.disableVert=new Mi},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),v.prototype=zi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},v.prototype),e.scrollbarModel={"native":m,"null":v},C.prototype.signal=function(e,t){Si(e,t)&&this.events.push(arguments)},C.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Na(o,"paste",function(e){Ti(r,e)||_(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Na(o,"cut",t),Na(o,"copy",t),Na(e.scroller,"paste",function(t){Bt(e,t)||Ti(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Na(e.lineSpace,"selectstart",function(t){Bt(e,t)||Ta(t)}),Na(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"})}}),Na(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=pt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;Vi(n.cursorDiv,e.cursors),Vi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=ns&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Xa(this.textarea),bo&&xo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",bo&&xo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!No||Bi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||ts(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(bo&&xo>=9&&this.hasSelection===r||Mo&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var s=this;return Nt(e,function(){Q(e,r.slice(o),n.length-o,null,s.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=s.prevInput="":s.prevInput=r,s.composing&&(s.composing.range.clear(),s.composing.range=e.markText(s.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&xo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.position="relative",a.style.cssText=c,bo&&9>xo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=u),null!=a.selectionStart){(!bo||bo&&9>xo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Mt(i,la.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Zt(i,e),u=o.scroller.scrollTop;if(s&&!Po){var l=i.options.resetSelectionOnContextMenu;l&&-1==i.doc.sel.contains(s)&&Mt(i,Te)(i.doc,pe(s),Ia);var c=a.style.cssText;if(r.wrapper.style.position="absolute",a.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ao)var f=window.scrollY;if(o.input.focus(),Ao&&window.scrollTo(null,f),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),bo&&xo>=9&&t(),jo){Sa(e);var d=function(){Oa(window,"mouseup",d),setTimeout(n,20)};Na(window,"mouseup",d)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Di,needsContentAttribute:!1},ne.prototype),ie.prototype=zi({init:function(e){function t(e){if(!Ti(r,e)){if(r.somethingSelected())Wo=r.getSelections(),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Wo=t.text,"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Ia),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!So)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Wo.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Wo.join("\n");var o=document.activeElement;Xa(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Na(i,"paste",function(e){Ti(r,e)||_(e,r)}),Na(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=pe(zo(i.head.line,a),zo(i.head.line,a+t.length)))}}),Na(i,"compositionupdate",function(e){n.composing.data=e.data}),Na(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Na(i,"touchstart",function(){n.forceCompositionEnd()}),Na(i,"input",function(){n.composing||(r.isReadOnly()||!n.pollContent())&&Nt(n.cm,function(){Dt(r)})}),Na(i,"copy",t),Na(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e){e&&this.cm.display.view.length&&(e.focus&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=se(this.cm,e.anchorNode,e.anchorOffset),r=se(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=Ho(K(n,r),t.from())||0!=Ho(J(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var u=a[a.length-1].measure,l=u.maps?u.maps[u.maps.length-1]:u.map;o={node:l[l.length-1],offset:l[l.length-2]-l[l.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var c=Ua(i.node,i.offset,o.offset,o.node)}catch(f){}c&&(!vo&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||e.addRange(c)):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):vo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Vi(this.cm.display.cursorDiv,e.cursors),Vi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Ga(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Nt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=se(t,e.anchorNode,e.anchorOffset),r=se(t,e.focusNode,e.focusOffset);n&&r&&Nt(t,function(){Te(t.doc,pe(n,r),Ia),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Ht(e,r.line)))var a=ti(t.view[0].line),s=t.view[0].node;else var a=ti(t.view[o].line),s=t.view[o-1].node.nextSibling;var u=Ht(e,i.line);if(u==t.view.length-1)var l=t.viewTo-1,c=t.lineDiv.lastChild;else var l=ti(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling;for(var f=e.doc.splitLines(le(e,s,c,a,l)),d=_r(e.doc,zo(a,0),zo(l,Qr(e.doc,l).text.length));f.length>1&&d.length>1;)if(Li(f)==Li(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),a++}for(var p=0,h=0,m=f[0],v=d[0],g=Math.min(m.length,v.length);g>p&&m.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Li(f),b=Li(d),x=Math.min(y.length-(1==f.length?p:0),b.length-(1==d.length?p:0));x>h&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;f[f.length-1]=y.slice(0,y.length-h),f[0]=f[0].slice(p);var A=zo(a,p),w=zo(l,d.length?Li(d).length-h:0);return f.length>1||f[0]||Ho(A,w)?(Ln(e.doc,f,A,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Mt(this.cm,Dt)(this.cm):e.data&&e.data!=e.startData&&Mt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Mt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Di,resetPosition:Di,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ce.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Ho(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return K(this.anchor,this.head)},to:function(){return J(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Fo,qo,Xo,Uo={left:0,right:0,top:0,bottom:0},Vo=null,Bo=0,Zo=0,Go=0,Jo=null;bo?Jo=-.53:vo?Jo=15:ko?Jo=-.7:Co&&(Jo=-1/3);var Ko=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Ko(e);return t.x*=Jo,t.y*=Jo,t};var Yo=new Mi,Qo=null,_o=e.changeEnd=function(e){return e.text?zo(e.from.line+e.text.length-1,Li(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];(n[e]!=t||"mode"==e)&&(n[e]=t,ea.hasOwnProperty(e)&&Mt(this,ea[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Fn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Hn(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;n>u;++u)Fn(this,u,e);var l=this.doc.sel.ranges;0==o.ch&&t.length==l.length&&l[r].from().ch>0&&we(this.doc,r,new fe(o,l[r].to()),Ia)}}}),getTokenAt:function(e,t){return Lr(this,e,t)},getLineTokens:function(e,t){return Lr(this,zo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,n=Dr(this,Qr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]s?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode; +return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!aa.hasOwnProperty(t))return n;var r=aa[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Qr(this.doc,e)}else n=e;return ct(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Ot(function(e,t,n){return qn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Fi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,It(t,r,"gutter"),Fi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ge(this.doc,e))return null;var t=e;if(e=Qr(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=pt(this,me(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>l&&(s=l-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Dn(this,s,a,s+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(dn),triggerOnKeyPress:Ot(mn),triggerOnKeyUp:hn,execCommand:function(e){return la.hasOwnProperty(e)?la[e].call(null,this):void 0},triggerElectric:Ot(function(e){$(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=me(this.doc,e);t>o&&(a=Un(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Ot(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Un(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},Ha)}),deleteH:Ot(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Xn(this,function(n){var i=Un(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,s=me(this.doc,e);t>a;++a){var u=pt(this,s,"div");if(null==o?o=u.left:u.left=o,s=Vn(this,u,i,n),s.hitSide)break}return s},moveV:Ot(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var s=pt(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var u=Vn(n,s,e,t);return"page"==t&&a==r.sel.primary()&&zn(n,null,dt(n,u,"div").top-s.top),u},Ha),i.length)for(var a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&a(this),La(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;return t.cm=null,Yr(this,e),st(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Pi(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ni(e);var $o=e.defaults={},ea=e.optionHandlers={},ta=e.Init={toString:function(){return"CodeMirror.Init"}};Bn("value","",function(e,t){e.setValue(t)},!0),Bn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Bn("indentUnit",2,n,!0),Bn("indentWithTabs",!1),Bn("smartIndent",!0),Bn("tabSize",4,function(e){r(e),st(e),Dt(e)},!0),Bn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(zo(r,o))}r++});for(var i=n.length-1;i>=0;i--)Ln(e.doc,t,n[i],zo(n[i].line,n[i].ch+t.length))}}),Bn("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Bn("specialCharPlaceholder",Wr,function(e){e.refresh()},!0),Bn("electricChars",!0),Bn("inputStyle",No?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Bn("rtlMoveVisually",!Oo),Bn("wholeLineUpdateBefore",!0),Bn("theme","default",function(e){s(e),u(e)},!0),Bn("keyMap","default",function(t,n,r){var i=Gn(n),o=r!=e.Init&&Gn(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Bn("extraKeys",null),Bn("lineWrapping",!1,i,!0),Bn("gutters",[],function(e){p(e.options),u(e)},!0),Bn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?P(e.display)+"px":"0",e.refresh()},!0),Bn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Bn("scrollbarStyle","native",function(e){g(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Bn("lineNumbers",!1,function(e){p(e.options),u(e)},!0),Bn("firstLineNumber",1,u,!0),Bn("lineNumberFormatter",function(e){return e},u,!0),Bn("showCursorWhenSelecting",!1,je,!0),Bn("resetSelectionOnContextMenu",!0),Bn("lineWiseCopyCut",!0),Bn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Bn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Bn("dragDrop",!0,Ut),Bn("allowDropFileTypes",null),Bn("cursorBlinkRate",530),Bn("cursorScrollMargin",0),Bn("cursorHeight",1,je,!0),Bn("singleCursorHeightPerLine",!0,je,!0),Bn("workTime",100),Bn("workDelay",100),Bn("flattenSpans",!0,r,!0),Bn("addModeClass",!1,r,!0),Bn("pollInterval",100),Bn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Bn("historyEventDelay",1250),Bn("viewportMargin",10,function(e){e.refresh()},!0),Bn("maxHighlightLength",1e4,r,!0),Bn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Bn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Bn("autofocus",null);var na=e.modes={},ra=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),na[t]=n},e.defineMIME=function(e,t){ra[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ra.hasOwnProperty(t))t=ra[t];else if(t&&"string"==typeof t.name&&ra.hasOwnProperty(t.name)){var n=ra[t.name];"string"==typeof n&&(n={name:n}),t=Ii(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=na[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(ia.hasOwnProperty(n.name)){var o=ia[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ia=e.modeExtensions={};e.extendMode=function(e,t){var n=ia.hasOwnProperty(e)?ia[e]:ia[e]={};zi(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){ka.prototype[e]=t},e.defineOption=Bn;var oa=[];e.defineInitHook=function(e){oa.push(e)};var aa=e.helpers={};e.registerHelper=function(t,n,r){aa.hasOwnProperty(t)||(aa[t]=e[t]={_global:[]}),aa[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),aa[t]._global.push({pred:r,val:i})};var sa=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},ua=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var la=e.commands={selectAll:function(e){e.setSelection(zo(e.firstLine(),0),zo(e.lastLine()),Ia)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ia)},killLine:function(e){Xn(e,function(t){if(t.empty()){var n=Qr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new zo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),zo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Qr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),zo(i.line-1,a.length-1),zo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){Nt(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Hn(e)})},toggleOverwrite:function(e){e.toggleOverwrite()}},ca=e.keyMap={};ca.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"},ca.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"},ca.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},ca.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"]},ca["default"]=Mo?ca.macDefault:ca.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=ji(n.split(" "),Zn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ma=0,va=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ma};Ni(va),va.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&xt(e),Si(this,"clear")){var n=this.find();n&&Pi(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=l,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ne(e.doc)),e&&Pi(e,"markerCleared",e,this),t&&wt(e),this.parent&&this.parent.clear()}},va.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Sr(i),Pi(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Jr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Gr))){var s=[];this.collapse(s),this.children=[new Gr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),s=new Gr(a);i.height-=s.height,this.children.splice(r+1,0,s),s.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new Jr(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=Ri(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new Jr(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var wa=0,ka=e.Doc=function(e,t,n,r){if(!(this instanceof ka))return new ka(e,t,n,r);null==n&&(n=0),Jr.call(this,[new Gr([new ba("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=zo(n,0);this.sel=pe(i),this.history=new oi(null),this.id=++wa,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Zr(this,{from:i,to:i,text:e}),Te(this,pe(i),Ia)};ka.prototype=Ii(Jr.prototype,{constructor:ka,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)Tn(this,r[o]);s?Ce(this,s):this.cm&&Hn(this.cm)}),undo:Lt(function(){Sn(this,"undo")}),redo:Lt(function(){Sn(this,"redo")}),undoSelection:Lt(function(){Sn(this,"undo",!0)}),redoSelection:Lt(function(){Sn(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(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=me(this,e),t=me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;su.to||null==u.from&&i!=e.line||i==t.line&&u.from>t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=i,void++n)}),me(this,zo(n,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;return e.linet&&(t=e.from),null!=e.to&&e.tos||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}},Fa=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},qa=[""],Xa=function(e){e.select()};So?Xa=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Xa=function(e){try{e.select()}catch(t){}});var Ua,Va=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ba=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Va.test(e))},Za=/[\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]/;Ua=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Ga=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>xo&&(Bi=function(){try{return document.activeElement}catch(e){return document.body}});var Ja,Ka,Ya=e.rmClass=function(e,t){var n=e.className,r=Zi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Qa=e.addClass=function(e,t){var n=e.className;Zi(t).test(n)||(e.className+=(n?" ":"")+t)},_a=!1,$a=function(){if(bo&&9>xo)return!1;var e=Xi("div");return"draggable"in e||"dragDrop"in e}(),es=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ts=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ns=function(){var e=Xi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),rs=null,is=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)is[e+48]=is[e+96]=String(e);for(var e=65;90>=e;e++)is[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)is[e+111]=is[e+63235]="F"+e}();var os,as=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,u=/[1n]/,l="L";return function(n){if(!i.test(n))return!1;for(var r,c=n.length,f=[],d=0;c>d;++d)f.push(r=e(n.charCodeAt(d)));for(var d=0,p=l;c>d;++d){var r=f[d];"m"==r?f[d]=p:p=r}for(var d=0,h=l;c>d;++d){var r=f[d];"1"==r&&"r"==h?f[d]="n":a.test(r)&&(h=r,"r"==r&&(f[d]="R"))}for(var d=1,p=f[0];c-1>d;++d){var r=f[d];"+"==r&&"1"==p&&"1"==f[d+1]?f[d]="1":","!=r||p!=f[d+1]||"1"!=p&&"n"!=p||(f[d]=p),p=r}for(var d=0;c>d;++d){var r=f[d];if(","==r)f[d]="N";else if("%"==r){for(var m=d+1;c>m&&"%"==f[m];++m);for(var v=d&&"!"==f[d-1]||c>m&&"1"==f[m]?"1":"N",g=d;m>g;++g)f[g]=v;d=m-1}}for(var d=0,h=l;c>d;++d){var r=f[d];"L"==h&&"1"==r?f[d]="L":a.test(r)&&(h=r)}for(var d=0;c>d;++d)if(o.test(f[d])){for(var m=d+1;c>m&&o.test(f[m]);++m);for(var y="L"==(d?f[d-1]:l),b="L"==(c>m?f[m]:l),v=y||b?"L":"R",g=d;m>g;++g)f[g]=v;d=m-1}for(var x,A=[],d=0;c>d;)if(s.test(f[d])){var w=d;for(++d;c>d&&s.test(f[d]);++d);A.push(new t(0,w,d))}else{var k=d,P=A.length;for(++d;c>d&&"L"!=f[d];++d);for(var g=k;d>g;)if(u.test(f[g])){g>k&&A.splice(P,0,new t(1,k,g));var C=g;for(++g;d>g&&u.test(f[g]);++g);A.splice(P,0,new t(2,C,g)),k=g}else++g;d>k&&A.splice(P,0,new t(1,k,d))}return 1==A[0].level&&(x=n.match(/^\s+/))&&(A[0].from=x[0].length,A.unshift(new t(0,0,x[0].length))),1==Li(A).level&&(x=n.match(/\s+$/))&&(Li(A).to-=x[0].length,A.push(new t(0,c-x[0].length,c))),2==A[0].level&&A.unshift(new t(1,A[0].to,A[0].to)),A[0].level!=Li(A).level&&A.push(new t(A[0].level,c,c)),A}}();return e.version="5.11.0",e})},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return null==e||p["default"].isValidElement(e)}function o(e){return i(e)||Array.isArray(e)&&e.every(i)}function a(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var i=t[r](n,r,e);i instanceof Error}}function s(e,t){return f({},e,t)}function u(e){var t=e.type,n=s(t.defaultProps,e.props);if(t.propTypes&&a(t.displayName||t.name,t.propTypes,n),n.children){var r=l(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function l(e,t){var n=[];return p["default"].Children.forEach(e,function(e){if(p["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(u(e))}),n}function c(e){return o(e)?e=l(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var i=n(4),o=i.PropTypes.func,a=i.PropTypes.object,s=i.PropTypes.arrayOf,u=i.PropTypes.oneOfType,l=i.PropTypes.element,c=i.PropTypes.shape,f=i.PropTypes.string,d=c({listen:o.isRequired,pushState:o.isRequired,replaceState:o.isRequired,go:o.isRequired});t.history=d;var p=c({pathname:f.isRequired,search:f.isRequired,state:a,action:f.isRequired,key:f});t.location=p;var h=u([o,f]);t.component=h;var m=u([h,a]);t.components=m;var v=u([a,l]);t.route=v;var g=u([v,s(v)]);t.routes=g,t["default"]={falsy:r,history:d,location:p,component:h,components:m,route:v}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}function o(e){var t=i(e),n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substring(o),t=t.substring(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substring(a),t=t.substring(0,a)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0,t.extractPath=i,t.parsePath=o;var a=n(15);r(a)},function(e,t,n){"use strict";function r(){i.attachRefs(this,this._currentElement)}var i=n(271),o={mountComponent:function(e,t,n,i){var o=e.mountComponent(t,n,i);return e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e),o},unmountComponent:function(e){i.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,o){var a=e._currentElement;if(t!==a||o!==e._context){var s=i.shouldUpdateRefs(a,t);s&&i.detachRefs(e,a),e.receiveComponent(t,n,o),s&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var i=n(21),o=n(3),a=n(13),s=(n(2),{type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null});o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);o(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){"use strict";var r=n(1),i=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o(e){return i(e).replace(/\/+/g,"/+")}function a(e){for(var t="",n=[],r=[],i=void 0,a=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;i=s.exec(e);)i.index!==a&&(r.push(e.slice(a,i.index)),t+=o(e.slice(a,i.index))),i[1]?(t+="([^/?#]+)",n.push(i[1])):"**"===i[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===i[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===i[0]?t+="(?:":")"===i[0]&&(t+=")?"),r.push(i[0]),a=s.lastIndex;return a!==e.length&&(r.push(e.slice(a,e.length)),t+=o(e.slice(a,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function s(e){return e in h||(h[e]=a(e)),h[e]}function u(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=s(e),r=n.regexpSource,i=n.paramNames,o=n.tokens;r+="/*";var a="*"!==o[o.length-1];a&&(r+="([\\s\\S]*?)");var u=t.match(new RegExp("^"+r+"$","i")),l=void 0,c=void 0;if(null!=u){if(a){l=u.pop();var f=u[0].substr(0,u[0].length-l.length);if(l&&"/"!==f.charAt(f.length-1))return{remainingPathname:null,paramNames:i,paramValues:null}}else l="";c=u.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else l=c=null;return{remainingPathname:l,paramNames:i,paramValues:c}}function l(e){return s(e).paramNames}function c(e,t){var n=u(e,t),r=n.paramNames,i=n.paramValues;return null!=i?r.reduce(function(e,t,n){return e[t]=i[n],e},{}):null}function f(e,t){t=t||{};for(var n=s(e),r=n.tokens,i=0,o="",a=0,u=void 0,l=void 0,c=void 0,f=0,d=r.length;d>f;++f)u=r[f],"*"===u||"**"===u?(c=Array.isArray(t.splat)?t.splat[a++]:t.splat,null!=c||i>0?void 0:p["default"](!1),null!=c&&(o+=encodeURI(c))):"("===u?i+=1:")"===u?i-=1:":"===u.charAt(0)?(l=u.substring(1),c=t[l],null!=c||i>0?void 0:p["default"](!1),null!=c&&(o+=encodeURIComponent(c))):o+=u;return o.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=s,t.matchPattern=u,t.getParamNames=l,t.getParams=c,t.formatPattern=f;var d=n(8),p=r(d),h={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var i="POP";t.POP=i,t["default"]={PUSH:n,REPLACE:r,POP:i}},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=n(1),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},l=e.DOMPropertyNames||{},c=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var f in n){s.properties.hasOwnProperty(f)?i(!1):void 0;var d=f.toLowerCase(),p=n[f],h={attributeName:d,attributeNamespace:null,propertyName:f,mutationMethod:null,mustUseAttribute:r(p,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(p,t.MUST_USE_PROPERTY),hasSideEffects:r(p,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(p,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(p,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(p,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(p,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.mustUseAttribute&&h.mustUseProperty?i(!1):void 0,!h.mustUseProperty&&h.hasSideEffects?i(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:i(!1),u.hasOwnProperty(f)){var m=u[f];h.attributeName=m}a.hasOwnProperty(f)&&(h.attributeNamespace=a[f]),l.hasOwnProperty(f)&&(h.propertyName=l[f]),c.hasOwnProperty(f)&&(h.mutationMethod=c[f]),s.properties[f]=h}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t=a;a++)if(i(e,a)&&i(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return o(s)?void 0:d(!1),s}function c(e,t,n,r,i,o){e=e||"",t=t||"",e===t?d(!1):void 0;var l=a(t,e);l||a(e,t)?void 0:d(!1);for(var c=0,f=l?s:u,p=e;;p=f(p,t)){var h;if(i&&p===e||o&&p===t||(h=n(p,l,r)),h===!1||p===t)break;c++1){var t=e.indexOf(p,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var o=l(e,t);o!==e&&c(e,o,n,r,!1,!0),o!==t&&c(o,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(c("",e,t,n,!0,!0),c(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:p};e.exports=v},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(107),i=n(249),o=n(120),a=n(129),s=n(130),u=n(1),l=(n(2),{}),c=null,f=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return f(e,!0)},p=function(e){return f(e,!1)},h=null,m={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(e){h=e},getInstanceHandle:function(){return h},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){"function"!=typeof n?u(!1):void 0;var i=l[t]||(l[t]={});i[e]=n;var o=r.registrationNameModules[t];o&&o.didPutListener&&o.didPutListener(e,t,n)},getListener:function(e,t){var n=l[t];return n&&n[e]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var i=l[t];i&&delete i[e]},deleteAllListeners:function(e){for(var t in l)if(l[t][e]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete l[t][e]}},extractEvents:function(e,t,n,i,o){for(var s,u=r.plugins,l=0;l=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return l.stringify(e).replace(/%20/g,"+")}function a(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=w(t.substring(1)),e[m]={search:t,searchBase:""}}return e}function n(e,t){var n,r=e[m],i=t?A(t):"";if(!r&&!i)return e;"string"==typeof e&&(e=d.parsePath(e));var o=void 0;o=r&&e.search===r.search?r.searchBase:e.search||"";var a=o;return i&&(a+=(a?"&":"?")+i),s({},e,(n={search:a},n[m]={search:a,searchBase:o},n))}function r(e){return P.listenBefore(function(n,r){f["default"](e,t(n),r)})}function a(e){return P.listen(function(n){e(t(n))})}function u(e){P.push(n(e,e.query))}function l(e){P.replace(n(e,e.query))}function c(e,t){return P.createPath(n(e,t||e.query))}function p(e,t){return P.createHref(n(e,t||e.query))}function g(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];var a=P.createLocation.apply(P,[n(e,e.query)].concat(i));return e.query&&(a.query=e.query),t(a)}function y(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),u(s({state:e},t,{query:n}))}function b(e,t,n){"string"==typeof t&&(t=d.parsePath(t)),l(s({state:e},t,{query:n}))}var x=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],A=x.stringifyQuery,w=x.parseQueryString,k=i(x,["stringifyQuery","parseQueryString"]),P=e(k);return"function"!=typeof A&&(A=o),"function"!=typeof w&&(w=v),s({},P,{listenBefore:r,listen:a,push:u,replace:l,createPath:c,createHref:p,createLocation:g,pushState:h["default"](y,"pushState is deprecated; use push instead"),replaceState:h["default"](b,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t":">","<":"<",'"':""","'":"'"},o=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(5),i=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return{type:l,text:e,editor:t}}function o(e){return{type:c,toggledEditor:e}}function a(e){return{type:f,createdAt:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveEditors=t.ADD_REVISION=t.TOGGLE_EDITORS=t.UPDATE_TEXT=void 0,t.updateText=i,t.toggleEditors=o,t.addRevision=a;var s=n(26),u=r(s),l=t.UPDATE_TEXT="UPDATE_TEXT",c=t.TOGGLE_EDITORS="TOGGLE_EDITORS",f=t.ADD_REVISION="ADD_REVISION";t.ActiveEditors=(0,u["default"])({MARKDOWN:null,TEXT:null})},function(e,t,n){function r(e){if(!o(e)||c.call(e)!=a||i(e))return!1;var t=s;if("function"==typeof e.constructor&&(t=f(e)),null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}var i=n(205),o=n(206),a="[object Object]",s=Object.prototype,u=Function.prototype.toString,l=u.call(Object),c=s.toString,f=Object.getPrototypeOf;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var i=n(214),o=r(i),a=n(215),s=r(a);t.Provider=o["default"],t.connect=s["default"]},function(e,t){"use strict";function n(e,t,n){function r(){return s=!0,u?void(c=[].concat(i.call(arguments))):void n.apply(this,arguments)}function o(){if(!s&&(l=!0,!u)){for(u=!0;!s&&e>a&&l;)l=!1,t.call(this,a++,o,r);return u=!1,s?void n.apply(this,c):void(a>=e&&l&&(s=!0,n()))}}var a=0,s=!1,u=!1,l=!1,c=void 0;o()}function r(e,t,n){function r(e,t,r){a||(t?(a=!0,n(t)):(o[e]=r,a=++s===i,a&&n(null,o)))}var i=e.length,o=[];if(0===i)return n(null,o);var a=!1,s=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0;var i=Array.prototype.slice;t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;ts;++s)o=i[s](e);n(o)})}function v(){if(A.routes){for(var e=d(A.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function y(e){var t=l(e,!1);t&&(delete P[t],i(P)||(C&&(C(),C=null),T&&(T(),T=null)))}function b(t,n){var r=l(t),o=P[r];if(o)-1===o.indexOf(n)&&o.push(n);else{var a=!i(P);P[r]=[n],a&&(C=e.listenBefore(h),e.listenBeforeUnload&&(T=e.listenBeforeUnload(v)))}return function(){var e=P[r];if(e){var i=e.filter(function(e){return e!==n});0===i.length?y(t):P[r]=i}}}function x(t){return e.listen(function(n){A.location===n?t(null,A):o(n,function(n,r,i){n?t(n):r?e.transitionTo(r):i&&t(null,i)})})}var A={},w=void 0,k=1,P={},C=void 0,T=void 0;return{isActive:n,match:o,listenBeforeLeavingRoute:b,listen:x}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tt||e.hasOverloadedBooleanValue&&t===!1}var o=n(29),a=n(10),s=n(294),u=(n(2),/^[a-zA-Z_][\w\.\-]*$/),l={},c={},f={createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+s(e)},setAttributeForID:function(e,t){e.setAttribute(o.ID_ATTRIBUTE_NAME,t)},createMarkupForProperty:function(e,t){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){if(i(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+s(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+s(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+s(t):""},setValueForProperty:function(e,t,n){var r=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else if(i(r,n))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute){var s=r.attributeName,u=r.attributeNamespace;u?e.setAttributeNS(u,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}else{var l=r.propertyName;r.hasSideEffects&&""+e[l]==""+n||(e[l]=n)}}else o.isCustomAttribute(t)&&f.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseAttribute)e.removeAttribute(n.attributeName);else{var i=n.propertyName,a=o.getDefaultValueForProperty(e.nodeName,i);n.hasSideEffects&&""+e[i]===a||(e[i]=a)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};a.measureMethods(f,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",deleteValueForProperty:"deleteValueForProperty"}),e.exports=f},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?l(!1):void 0}function i(e){r(e),null!=e.value||null!=e.onChange?l(!1):void 0}function o(e){r(e),null!=e.checked||null!=e.onChange?l(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var s=n(126),u=n(42),l=n(1),c=(n(2),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),f={value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},d={},p={checkPropTypes:function(e,t,n){for(var r in f){if(f.hasOwnProperty(r))var i=f[r](t,r,e,u.prop);if(i instanceof Error&&!(i.message in d)){d[i.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(i(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(o(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(i(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(o(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=p},function(e,t,n){"use strict";var r=n(63),i=n(7),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){i.purgeID(e)}};e.exports=o},function(e,t,n){"use strict";var r=n(1),i=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){i?r(!1):void 0,o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,i=!0}}};e.exports=o},function(e,t,n){"use strict";var r=n(106),i=n(59),o=n(7),a=n(10),s=n(1),u={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:function(e,t,n){var r=o.getNode(e);u.hasOwnProperty(t)?s(!1):void 0,null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=o.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=i[e];return r?!!n[r]:!1}function r(e){return n}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[i]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e){var t;if(null===e||e===!1)t=new a(i);else if("object"==typeof e){var n=e;!n||"function"!=typeof n.type&&"string"!=typeof n.type?l(!1):void 0,t="string"==typeof n.type?s.createInternalComponent(n):r(n.type)?new n.type(n):new c}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):l(!1);return t.construct(e),t._mountIndex=0,t._mountImage=null,t}var o=n(255),a=n(118),s=n(124),u=n(3),l=n(1),c=(n(2),function(){});u(c.prototype,o.Mixin,{_instantiateReactComponent:i}),e.exports=i},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, @@ -18,10 +18,11 @@ v.ReactEventListener.trapCapturedEvent(l.topBlur,"blur",n)):f("focusin")&&(v.Rea * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ -function r(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&i&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var i,o=n(5);o.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(5),i=n(46),o=n(47),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var i=typeof e,o=typeof t;return"string"===i||"number"===i?"string"===o||"number"===o:"object"===o&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e){return m[e]}function i(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function o(e){return(""+e).replace(g,r)}function a(e){return"$"+o(e)}function s(e,t,n,r){var o=typeof e;if(("undefined"===o||"boolean"===o)&&(e=null),null===e||"string"===o||"number"===o||u.isValidElement(e))return n(r,e,""===t?p+i(e,0):t),1;var l,c,m=0,g=""===t?p:t+h;if(Array.isArray(e))for(var v=0;v":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var i=n(5),o=n(1),a=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],u=[1,"","
"],c=[3,"","
"],f=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){d[e]=f,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=r.bind(t),a=0;a-1&&e%1==0&&c>=e}function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return!!e&&"object"==typeof e}var c=9007199254740991,f="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",h=Object.prototype,m=h.hasOwnProperty,g=h.toString,v=h.propertyIsEnumerable,y=n("length");e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){return e.set(t[0],t[1]),e}function a(e,t){return e.add(t),e}function s(e,t,n){var r=n.length;switch(r){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 l(e,t,n,r){for(var i=-1,o=e.length;++i-1}function m(e,t,n){for(var r=-1,i=e.length;++r-1;);return n}function L(e,t){for(var n=e.length;n--&&k(t,e[n],0)>-1;);return n}function D(e){return e&&e.Object===Object?e:null}function R(e,t){if(e!==t){var n=null===e,r=e===Q,i=e===e,o=null===t,a=t===Q,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function I(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r=s)return l;var u=n[r];return l*("desc"==u?-1:1)}}return e.index-t.index}function j(e){return Cn[e]}function F(e){return _n[e]}function B(e){return"\\"+Sn[e]}function H(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i-1&&e%1==0&&t>e}function z(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function q(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,i=n?e.length:0,o=fi(0,i,this.__views__),a=o.start,s=o.end,l=s-a,u=r?s:a-1,c=this.__iteratees__,f=c.length,d=0,p=uu(l,this.__takeCount__);if(!n||me>i||i==l&&p==l)return Cr(e,this.__actions__);var h=[];e:for(;l--&&p>d;){u+=t;for(var m=-1,g=e[u];++mn)return!1;var r=e.length-1;return n==r?e.pop():nu.call(e,n,1),!0}function Jt(e,t){var n=tn(e,t);return 0>n?Q:e[n][1]}function en(e,t){return tn(e,t)>-1}function tn(e,t){for(var n=e.length;n--;)if(ma(e[n][0],t))return n;return-1}function nn(e,t,n){var r=tn(e,t);0>r?e.push([t,n]):e[r][1]=n}function rn(e,t,n,r){return e===Q||ma(e,jl[n])&&!Bl.call(r,n)?t:e}function on(e,t,n){(n!==Q&&!ma(e[t],n)||"number"==typeof t&&n===Q&&!(t in e))&&(e[t]=n)}function an(e,t,n){var r=e[t];(!ma(r,n)||ma(r,jl[t])&&!Bl.call(e,t)||n===Q&&!(t in e))&&(e[t]=n)}function sn(e,t,n,r){return Su(e,function(e,i,o){t(r,e,n(e),o)}),r}function ln(e,t){return e&&Rr(t,xs(t),e)}function un(e,t){for(var n=-1,r=null==e,i=t.length,o=Array(i);++n=e?e:n),t!==Q&&(e=e>=t?e:t)),e}function fn(e,t,n,r,i,o){var a;if(n&&(a=i?n(e,r,i,o):n(e)),a!==Q)return a;if(!La(e))return e;var s=gc(e);if(s){if(a=pi(e),!t)return Dr(e,a)}else{var l=ci(e),u=l==De||l==Re;if(vc(e))return Er(e,t);if(l!=Fe&&l!=Oe&&(!u||i))return wn[l]?mi(e,l,t):i?e:{};if(U(e))return i?e:{};if(a=hi(u?{}:e),!t)return jr(e,ln(a,e))}o||(o=new Kt);var f=o.get(e);return f?f:(o.set(e,a),(s?c:An)(e,function(r,i){an(a,i,fn(r,t,n,i,e,o))}),s?a:jr(e,a))}function pn(e){var t=xs(e),n=t.length;return function(r){if(null==r)return!n;for(var i=n;i--;){var o=t[i],a=e[o],s=r[o];if(s===Q&&!(o in Object(r))||!a(s))return!1}return!0}}function Cn(e,t,n){if("function"!=typeof e)throw new Rl(be);return tu(function(){e.apply(Q,n)},t)}function _n(e,t,n,r){var i=-1,o=h,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=g(t,N(n))),r?(o=m,a=!1):t.length>=me&&(o=qt,a=!1,t=new zt(t));e:for(;++in&&(n=-n>i?0:i+n),r=r===Q||r>i?i:ns(r),0>r&&(r+=i),r=n>r?0:rs(r);r>n;)e[n++]=t;return e}function Sn(e,t){var n=[];return Su(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function On(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++in;)e=e[t[n++]];return n&&n==r?e:Q}function Fn(e,t){return Bl.call(e,t)||"object"==typeof e&&t in e&&null===Ql(e)}function Bn(e,t){return t in Object(e)}function Hn(e,t,n){return e>=uu(t,n)&&e=120)?new zt(o&&l):Q}l=e[0];var u=-1,c=l.length,f=a[0];e:for(;++u-1;)o!==e&&nu.call(o,a,1),nu.call(e,a,1);return e}function lr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(r==n||i!=o){var o=i;if(W(i))nu.call(e,i,1);else if(yi(i,e))delete e[i];else{var a=yr(i),s=Ei(e,a);null!=s&&delete s[$i(a)]}}}return e}function ur(e,t){return e+iu(fu()*(t-e+1))}function cr(e,t,n,r){for(var i=-1,o=lu(ru((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function fr(e,t,n,r){t=yi(t,e)?[t+""]:yr(t);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++it&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return mr(e,t,ul,n)}function mr(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,l=t===Q;o>i;){var u=iu((i+o)/2),c=n(e[u]),f=c!==Q,d=c===c;if(a)var p=d||r;else p=s?d&&f&&(r||null!=c):l?d&&(r||f):null==c?!1:r?t>=c:t>c;p?i=u+1:o=u}return uu(o,Se)}function gr(e){return vr(e)}function vr(e,t){for(var n=0,r=e.length,i=e[0],o=t?t(i):i,a=o,s=0,l=[i];++n=me){var u=t?null:Au(e);if(u)return K(u);a=!1,i=qt,l=new zt}else l=t?[]:s;e:for(;++rr?t[r]:Q);return a}function Er(e,t){if(t)return e.slice();var n=e.constructor,r=new n(e.length);return e.copy(r),r}function Sr(e){var t=e.constructor,n=new t(e.byteLength),r=new Gl(n);return r.set(new Gl(e)),n}function Tr(e){var t=e.constructor;return y(q(e),o,new t)}function Mr(e){var t=e.constructor,n=new t(e.source,wt.exec(e));return n.lastIndex=e.lastIndex,n}function Or(e){var t=e.constructor;return y(K(e),a,new t)}function Nr(e){return $l?Object(Cu.call(e)):{}}function Ar(e,t){var n=e.buffer,r=e.constructor;return new r(t?Sr(n):n,e.byteOffset,e.length)}function Pr(e,t,n){for(var r=n.length,i=-1,o=lu(e.length-r,0),a=-1,s=t.length,l=Array(s+o);++a1?n[i-1]:Q,a=i>2?n[2]:Q;for(o="function"==typeof o?(i--,o):Q,a&&vi(n[0],n[1],a)&&(o=3>i?Q:o,i=1),t=Object(t);++ra&&u[0]!==f&&u[a-1]!==f?[]:V(u,f);return a-=d.length,r>a?ei(e,n,Gr,f,Q,u,d,Q,Q,r-a):s(c,this,u)}var o=Vr(e);return i}function $r(e){return aa(function(t){t=On(t);var n=t.length,i=n,o=r.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Rl(be);if(o&&!s&&"wrapper"==ai(a))var s=new r([],!0)}for(i=s?i:n;++i=me)return s.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++ib)return ei(e,n,Gr,C,r,w,_,l,u,c-b)}var k=p?r:this,E=h?k[e]:e;return l?w=Si(w,l):v&&w.length>1&&w.reverse(),d&&u=t)return"";var i=t-r;n=n===Q?" ":n+"";var o=$s(n,ru(i/$(n)));return hn.test(n)?G(o).slice(0,i).join(""):o.slice(0,i)}function Zr(e,t,n,r){function i(){for(var t=-1,l=arguments.length,u=-1,c=r.length,f=Array(c+l),d=this&&this!==In&&this instanceof i?a:e;++ut?1:-1:is(r)||0,cr(t,n,r,e)}}function ei(e,t,n,r,i,o,a,s,l,u){var c=t&ne,f=s?Dr(s):Q,d=c?a:Q,p=c?Q:a,h=c?o:Q,m=c?Q:o;t|=c?ie:oe,t&=~(c?oe:ie),t&te||(t&=~(J|ee));var g=[e,t,i,h,d,m,p,f,l,u],v=n.apply(Q,g);return xi(e)&&Ru(v,g),v.placeholder=r,v}function ti(e){var t=Ll[e];return function(e,n){if(e=is(e),n=ns(n)){var r=(ss(e)+"e").split("e"),i=t(r[0]+"e"+(+r[1]+n));return r=(ss(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function ni(e,t,n,r,i,o,a,s){var l=tⅇif(!l&&"function"!=typeof e)throw new Rl(be);var u=r?r.length:0;if(u||(t&=~(ie|oe),r=i=Q),a=a===Q?a:lu(ns(a),0),s=s===Q?s:ns(s),u-=i?i.length:0,t&oe){var c=r,f=i;r=i=Q}var d=l?Q:Pu(e),p=[e,t,n,r,i,c,f,o,a,s];if(d&&_i(p,d),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],s=p[9]=null==p[9]?l?0:e.length:lu(p[9]-u,0),!s&&t&(ne|re)&&(t&=~(ne|re)),t&&t!=J)h=t==ne||t==re?Kr(e,t,s):t!=ie&&t!=(J|ie)||i.length?Gr.apply(Q,p):Zr(e,t,n,r);else var h=Wr(e,t,n);var m=d?Nu:Ru;return m(h,p)}function ri(e,t,n,r,i,o){var a=-1,s=i&ce,l=i&ue,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var f=o.get(e);if(f)return f==t;var d=!0;for(o.set(e,t);++ai,a=r==ae&&n==ne||r==ae&&n==se&&e[7].length<=t[8]||r==(ae|se)&&t[7].length<=t[8]&&n==ne;if(!o&&!a)return e;r&J&&(e[2]=t[2],i|=n&J?0:te);var s=t[3];if(s){var l=e[3];e[3]=l?Pr(l,s,t[4]):Dr(s),e[4]=l?V(e[3],Me):Dr(t[4])}return s=t[5],s&&(l=e[5],e[5]=l?Lr(l,s,t[6]):Dr(s),e[6]=l?V(e[5],Me):Dr(t[6])),s=t[7],s&&(e[7]=Dr(s)),r&ae&&(e[8]=null==e[8]?t[8]:uu(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function ki(e,t,n,r,i,o){return La(e)&&La(t)&&(o.set(t,e),Jn(e,t,Q,ki,o)),e}function Ei(e,t){return 1==t.length?e:vs(e,dr(t,0,-1))}function Si(e,t){for(var n=e.length,r=uu(t.length,n),i=Dr(e);r--;){var o=t[r];e[r]=W(o,n)?i[o]:Q}return e}function Ti(e){var t=[];return ss(e).replace(pt,function(e,n,r,i){t.push(r?i.replace(bt,"$1"):n||e)}),t}function Mi(e){return wa(e)?e:[]}function Oi(e){return"function"==typeof e?e:ul}function Ni(e){if(e instanceof i)return e.clone();var t=new r(e.__wrapped__,e.__chain__);return t.__actions__=Dr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Ai(e,t){t=lu(ns(t),0);var n=e?e.length:0;if(!n||1>t)return[];for(var r=0,i=-1,o=Array(ru(n/t));n>r;)o[++i]=dr(e,r,r+=t);return o}function Pi(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t,r)):[]}function Di(e,t,n){var r=e?e.length:0;return r?(t=n||t===Q?1:ns(t),t=r-t,dr(e,0,0>t?0:t)):[]}function Ri(e,t){return e&&e.length?wr(e,si(t,3),!0,!0):[]}function Ii(e,t){return e&&e.length?wr(e,si(t,3),!0):[]}function ji(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&vi(e,t,n)&&(n=0,r=i),En(e,t,n,r)):[]}function Fi(e,t){return e&&e.length?_(e,si(t,3)):-1}function Bi(e,t){return e&&e.length?_(e,si(t,3),!0):-1}function Hi(e){var t=e?e.length:0;return t?On(e):[]}function Ui(e){var t=e?e.length:0;return t?On(e,!0):[]}function Wi(e){for(var t=-1,n=e?e.length:0,r={};++tn&&(n=lu(r+n,0)), -k(e,t,n)):-1}function Vi(e){return Di(e,1)}function Ki(e,t){return e?au.call(e,t):""}function $i(e){var t=e?e.length:0;return t?e[t-1]:Q}function Gi(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if(n!==Q&&(i=ns(n),i=(0>i?lu(r+i,0):uu(i,r-1))+1),t!==t)return H(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Yi(e,t){return e&&e.length&&t&&t.length?ar(e,t):e}function Xi(e,t,n){return e&&e.length&&t&&t.length?sr(e,t,si(n)):e}function Qi(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=si(t,3);++rr&&ma(e[r],t))return r}return-1}function ro(e,t){return hr(e,t,!0)}function io(e,t,n){return mr(e,t,si(n),!0)}function oo(e,t){var n=e?e.length:0;if(n){var r=hr(e,t,!0)-1;if(ma(e[r],t))return r}return-1}function ao(e){return e&&e.length?gr(e):[]}function so(e,t){return e&&e.length?vr(e,si(t)):[]}function lo(e){return Li(e,1)}function uo(e,t,n){return e&&e.length?(t=n||t===Q?1:ns(t),dr(e,0,0>t?0:t)):[]}function co(e,t,n){var r=e?e.length:0;return r?(t=n||t===Q?1:ns(t),t=r-t,dr(e,0>t?0:t,r)):[]}function fo(e,t){return e&&e.length?wr(e,si(t,3),!1,!0):[]}function po(e,t){return e&&e.length?wr(e,si(t,3)):[]}function ho(e){return e&&e.length?br(e):[]}function mo(e,t){return e&&e.length?br(e,si(t)):[]}function go(e,t){return e&&e.length?br(e,Q,t):[]}function vo(e){if(!e||!e.length)return[];var t=0;return e=p(e,function(e){return wa(e)?(t=lu(e.length,t),!0):void 0}),M(t,function(t){return g(e,ir(t))})}function yo(e,t){if(!e||!e.length)return[];var n=vo(e);return null==t?n:g(n,function(e){return s(t,Q,e)})}function bo(e,t){return kr(e||[],t||[],an)}function xo(e,t){return kr(e||[],t||[],fr)}function wo(e){var n=t(e);return n.__chain__=!0,n}function Co(e,t){return t(e),e}function _o(e,t){return t(e)}function ko(){return wo(this)}function Eo(){return new r(this.value(),this.__chain__)}function So(e){return this.map(e).flatten()}function To(){this.__values__===Q&&(this.__values__=ts(this.value()));var e=this.__index__>=this.__values__.length,t=e?Q:this.__values__[this.__index__++];return{done:e,value:t}}function Mo(){return this}function Oo(e){for(var t,r=this;r instanceof n;){var i=Ni(r);i.__index__=0,i.__values__=Q,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t}function No(){var e=this.__wrapped__;if(e instanceof i){var t=e;return this.__actions__.length&&(t=new i(this)),t=t.reverse(),t.__actions__.push({func:_o,args:[Zi],thisArg:Q}),new r(t,this.__chain__)}return this.thru(Zi)}function Ao(){return Cr(this.__wrapped__,this.__actions__)}function Po(e,t,n){var r=gc(e)?d:kn;return n&&vi(e,t,n)&&(t=Q),r(e,si(t,3))}function Lo(e,t){var n=gc(e)?p:Sn;return n(e,si(t,3))}function Do(e,t){if(t=si(t,3),gc(e)){var n=_(e,t);return n>-1?e[n]:Q}return C(e,t,Su)}function Ro(e,t){if(t=si(t,3),gc(e)){var n=_(e,t,!0);return n>-1?e[n]:Q}return C(e,t,Tu)}function Io(e,t){return On(Ho(e,t))}function jo(e,t){return"function"==typeof t&&gc(e)?c(e,t):Su(e,Oi(t))}function Fo(e,t){return"function"==typeof t&&gc(e)?f(e,t):Tu(e,Oi(t))}function Bo(e,t,n,r){e=xa(e)?e:Ls(e),n=n&&!r?ns(n):0;var i=e.length;return 0>n&&(n=lu(i+n,0)),$a(e)?i>=n&&e.indexOf(t,n)>-1:!!i&&k(e,t,n)>-1}function Ho(e,t){var n=gc(e)?g:Xn;return n(e,si(t,3))}function Uo(e,t,n,r){return null==e?[]:(gc(t)||(t=null==t?[]:[t]),n=r?Q:n,gc(n)||(n=null==n?[]:[n]),tr(e,t,n))}function Wo(e,t,n){var r=gc(e)?y:E,i=arguments.length<3;return r(e,si(t,4),n,i,Su)}function zo(e,t,n){var r=gc(e)?b:E,i=arguments.length<3;return r(e,si(t,4),n,i,Tu)}function qo(e,t){var n=gc(e)?p:Sn;return t=si(t,3),n(e,function(e,n,r){return!t(e,n,r)})}function Vo(e){var t=xa(e)?e:Ls(e),n=t.length;return n>0?t[ur(0,n-1)]:Q}function Ko(e,t){var n=-1,r=ts(e),i=r.length,o=i-1;for(t=cn(ns(t),0,i);++n0&&(n=t.apply(this,arguments)),1>=e&&(t=Q),n}}function Jo(e,n,r){n=r?Q:n;var i=ni(e,ne,Q,Q,Q,Q,Q,n);return i.placeholder=t.placeholder||Jo.placeholder,i}function ea(e,n,r){n=r?Q:n;var i=ni(e,re,Q,Q,Q,Q,Q,n);return i.placeholder=t.placeholder||ea.placeholder,i}function ta(e,t,n){function r(){h&&Yl(h),c&&Yl(c),g=0,u=c=p=h=m=Q}function i(t,n){n&&Yl(n),c=h=m=Q,t&&(g=sc(),f=e.apply(p,u),h||c||(u=p=Q))}function o(){var e=t-(sc()-d);0>=e||e>t?i(m,c):h=tu(o,e)}function a(){return(h&&m||c&&b)&&(f=e.apply(p,u)),r(),f}function s(){i(b,h)}function l(){if(u=arguments,d=sc(),p=this,m=b&&(h||!v),y===!1)var n=v&&!h;else{g||c||v||(g=d);var r=y-(d-g),i=0>=r||r>y;i?(c&&(c=Yl(c)),g=d,f=e.apply(p,u)):c||(c=tu(s,r))}return i&&h?h=Yl(h):h||t===y||(h=tu(o,t)),n&&(i=!0,f=e.apply(p,u)),!i||h||c||(u=p=Q),f}var u,c,f,d,p,h,m,g=0,v=!1,y=!1,b=!0;if("function"!=typeof e)throw new Rl(be);return t=is(t)||0,La(n)&&(v=!!n.leading,y="maxWait"in n&&lu(is(n.maxWait)||0,t),b="trailing"in n?!!n.trailing:b),l.cancel=r,l.flush=a,l}function na(e){return ni(e,le)}function ra(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Rl(be);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ra.Cache,n}function ia(e){if("function"!=typeof e)throw new Rl(be);return function(){return!e.apply(this,arguments)}}function oa(e){return Zo(2,e)}function aa(e,t){if("function"!=typeof e)throw new Rl(be);return t=lu(t===Q?e.length-1:ns(t),0),function(){for(var n=arguments,r=-1,i=lu(n.length-t,0),o=Array(i);++rt}function va(e,t){return e>=t}function ya(e){return wa(e)&&Bl.call(e,"callee")&&(!eu.call(e,"callee")||Wl.call(e)==Oe)}function ba(e){return Da(e)&&Wl.call(e)==Ve}function xa(e){return null!=e&&!("function"==typeof e&&Na(e))&&Pa(Lu(e))}function wa(e){return Da(e)&&xa(e)}function Ca(e){return e===!0||e===!1||Da(e)&&Wl.call(e)==Ae}function _a(e){return Da(e)&&Wl.call(e)==Pe}function ka(e){return!!e&&1===e.nodeType&&Da(e)&&!za(e)}function Ea(e){if(xa(e)&&(gc(e)||$a(e)||Na(e.splice)||ya(e)))return!e.length;for(var t in e)if(Bl.call(e,t))return!1;return!0}function Sa(e,t){return qn(e,t)}function Ta(e,t,n){n="function"==typeof n?n:Q;var r=n?n(e,t):Q;return r===Q?qn(e,t,n):!!r}function Ma(e){return Da(e)&&"string"==typeof e.message&&Wl.call(e)==Le}function Oa(e){return"number"==typeof e&&ou(e)}function Na(e){var t=La(e)?Wl.call(e):"";return t==De||t==Re}function Aa(e){return"number"==typeof e&&e==ns(e)}function Pa(e){return"number"==typeof e&&e>-1&&e%1==0&&Ce>=e}function La(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Da(e){return!!e&&"object"==typeof e}function Ra(e){return Da(e)&&ci(e)==Ie}function Ia(e,t){return e===t||Kn(e,t,li(t))}function ja(e,t,n){return n="function"==typeof n?n:Q,Kn(e,t,li(t),n)}function Fa(e){return Wa(e)&&e!=+e}function Ba(e){return null==e?!1:Na(e)?ql.test(Fl.call(e)):Da(e)&&(U(e)?ql:Et).test(e)}function Ha(e){return null===e}function Ua(e){return null==e}function Wa(e){return"number"==typeof e||Da(e)&&Wl.call(e)==je}function za(e){if(!Da(e)||Wl.call(e)!=Fe||U(e))return!1;var t=jl;if("function"==typeof e.constructor&&(t=Ql(e)),null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Fl.call(n)==Ul}function qa(e){return La(e)&&Wl.call(e)==Be}function Va(e){return Aa(e)&&e>=-Ce&&Ce>=e}function Ka(e){return Da(e)&&ci(e)==He}function $a(e){return"string"==typeof e||!gc(e)&&Da(e)&&Wl.call(e)==Ue}function Ga(e){return"symbol"==typeof e||Da(e)&&Wl.call(e)==We}function Ya(e){return Da(e)&&Pa(e.length)&&!!xn[Wl.call(e)]}function Xa(e){return e===Q}function Qa(e){return Da(e)&&ci(e)==ze}function Za(e){return Da(e)&&Wl.call(e)==qe}function Ja(e,t){return t>e}function es(e,t){return t>=e}function ts(e){if(!e)return[];if(xa(e))return $a(e)?G(e):Dr(e);if(Jl&&e[Jl])return z(e[Jl]());var t=ci(e),n=t==Ie?q:t==He?K:Ls;return n(e)}function ns(e){if(!e)return 0===e?e:0;if(e=is(e),e===we||e===-we){var t=0>e?-1:1;return t*_e}var n=e%1;return e===e?n?e-n:e:0}function rs(e){return e?cn(ns(e),0,Ee):0}function is(e){if(La(e)){var t=Na(e.valueOf)?e.valueOf():e;e=La(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(gt,"");var n=kt.test(e);return n||St.test(e)?Mn(e.slice(2),n?2:8):_t.test(e)?ke:+e}function os(e){return Rr(e,ws(e))}function as(e){return cn(ns(e),-Ce,Ce)}function ss(e){if("string"==typeof e)return e;if(null==e)return"";if(Ga(e))return $l?_u.call(e):"";var t=e+"";return"0"==t&&1/e==-we?"-0":t}function ls(e,t){var n=Eu(e);return t?ln(n,t):n}function us(e,t){return C(e,si(t,3),An,!0)}function cs(e,t){return C(e,si(t,3),Pn,!0)}function fs(e,t){return null==e?e:Mu(e,Oi(t),ws)}function ds(e,t){return null==e?e:Ou(e,Oi(t),ws)}function ps(e,t){return e&&An(e,Oi(t))}function hs(e,t){return e&&Pn(e,Oi(t))}function ms(e){return null==e?[]:Ln(e,xs(e))}function gs(e){return null==e?[]:Ln(e,ws(e))}function vs(e,t,n){var r=null==e?Q:Rn(e,t);return r===Q?n:r}function ys(e,t){return di(e,t,Fn)}function bs(e,t){return di(e,t,Bn)}function xs(e){var t=wi(e);if(!t&&!xa(e))return Gn(e);var n=gi(e),r=!!n,i=n||[],o=i.length;for(var a in e)!Fn(e,a)||r&&("length"==a||W(a,o))||t&&"constructor"==a||i.push(a);return i}function ws(e){for(var t=-1,n=wi(e),r=Yn(e),i=r.length,o=gi(e),a=!!o,s=o||[],l=s.length;++tt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=fu();return uu(e+i*(t-e+Tn("1e-"+((i+"").length-1))),t)}return ur(e,t)}function Fs(e){return Ic(ss(e).toLowerCase())}function Bs(e){return e=ss(e),e&&e.replace(Mt,j).replace(dn,"")}function Hs(e,t,n){e=ss(e),t="string"==typeof t?t:t+"";var r=e.length;return n=n===Q?r:cn(ns(n),0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function Us(e){return e=ss(e),e&&st.test(e)?e.replace(ot,F):e}function Ws(e){return e=ss(e),e&&mt.test(e)?e.replace(ht,"\\$&"):e}function zs(e,t,n){e=ss(e),t=ns(t);var r=$(e);if(!t||r>=t)return e;var i=(t-r)/2,o=iu(i),a=ru(i);return Qr("",o,n)+e+Qr("",a,n)}function qs(e,t,n){return e=ss(e),e+Qr(e,t,n)}function Vs(e,t,n){return e=ss(e),Qr(e,t,n)+e}function Ks(e,t,n){return n||null==t?t=0:t&&(t=+t),e=ss(e).replace(gt,""),cu(e,t||(Ct.test(e)?16:10))}function $s(e,t){e=ss(e),t=ns(t);var n="";if(!e||1>t||t>Ce)return n;do t%2&&(n+=e),t=iu(t/2),e+=e;while(t);return n}function Gs(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Ys(e,t,n){return ss(e).split(t,n)}function Xs(e,t,n){return e=ss(e),n=cn(ns(n),0,e.length),e.lastIndexOf(t,n)==n}function Qs(e,n,r){var i=t.templateSettings;r&&vi(e,n,r)&&(n=Q),e=ss(e),n=xc({},n,i,rn);var o,a,s=xc({},n.imports,i.imports,rn),l=xs(s),u=A(s,l),c=0,f=n.interpolate||Ot,d="__p += '",p=Dl((n.escape||Ot).source+"|"+f.source+"|"+(f===ct?xt:Ot).source+"|"+(n.evaluate||Ot).source+"|$","g"),h="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++bn+"]")+"\n";e.replace(p,function(t,n,r,i,s,l){return r||(r=i),d+=e.slice(c,l).replace(Nt,B),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t}),d+="';\n";var m=n.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(tt,""):d).replace(nt,"$1").replace(rt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Hc(function(){return Function(l,h+"return "+d).apply(Q,u)});if(g.source=d,Ma(g))throw g;return g}function Zs(e){return ss(e).toLowerCase()}function Js(e){return ss(e).toUpperCase()}function el(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(gt,"");if(t+="",!t)return e;var r=G(e),i=G(t);return r.slice(P(r,i),L(r,i)+1).join("")}function tl(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(yt,"");if(t+="",!t)return e;var r=G(e);return r.slice(0,L(r,G(t))+1).join("")}function nl(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(vt,"");if(t+="",!t)return e;var r=G(e);return r.slice(P(r,G(t))).join("")}function rl(e,t){var n=fe,r=de;if(La(t)){var i="separator"in t?t.separator:i;n="length"in t?ns(t.length):n,r="omission"in t?ss(t.omission):r}e=ss(e);var o=e.length;if(hn.test(e)){var a=G(e);o=a.length}if(n>=o)return e;var s=n-$(r);if(1>s)return r;var l=a?a.slice(0,s).join(""):e.slice(0,s);if(i===Q)return l+r;if(a&&(s+=l.length-s),qa(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=Dl(i.source,ss(wt.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var f=u.index;l=l.slice(0,f===Q?s:f)}}else if(e.indexOf(i,s)!=s){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r}function il(e){return e=ss(e),e&&at.test(e)?e.replace(it,Y):e}function ol(e,t,n){return e=ss(e),t=n?Q:t,t===Q&&(t=vn.test(e)?gn:mn),e.match(t)||[]}function al(e){var t=e?e.length:0,n=si();return e=t?g(e,function(e){if("function"!=typeof e[1])throw new Rl(be);return[n(e[0]),e[1]]}):[],aa(function(n){for(var r=-1;++re||e>Ce)return[];var n=Ee,r=uu(e,Ee);t=Oi(t),e-=Ee;for(var i=M(r,t);++n0){if(++e>=pe)return n}else e=0;return Nu(n,r)}}(),Iu=aa(function(e,t){return gc(e)||(e=null==e?[]:[Object(e)]),t=On(t),u(e,t)}),ju=aa(function(e,t){return wa(e)?_n(e,On(t,!1,!0)):[]}),Fu=aa(function(e,t){var n=$i(t);return wa(n)&&(n=Q),wa(e)?_n(e,On(t,!1,!0),si(n)):[]}),Bu=aa(function(e,t){var n=$i(t);return wa(n)&&(n=Q),wa(e)?_n(e,On(t,!1,!0),Q,n):[]}),Hu=aa(function(e){var t=g(e,Mi);return t.length&&t[0]===e[0]?Un(t):[]}),Uu=aa(function(e){var t=$i(e),n=g(e,Mi);return t===$i(n)?t=Q:n.pop(),n.length&&n[0]===e[0]?Un(n,si(t)):[]}),Wu=aa(function(e){var t=$i(e),n=g(e,Mi);return t===$i(n)?t=Q:n.pop(),n.length&&n[0]===e[0]?Un(n,Q,t):[]}),zu=aa(Yi),qu=aa(function(e,t){t=g(On(t),String);var n=un(e,t);return lr(e,t.sort(R)),n}),Vu=aa(function(e){return br(On(e,!1,!0))}),Ku=aa(function(e){var t=$i(e);return wa(t)&&(t=Q),br(On(e,!1,!0),si(t))}),$u=aa(function(e){var t=$i(e);return wa(t)&&(t=Q),br(On(e,!1,!0),Q,t)}),Gu=aa(function(e,t){return wa(e)?_n(e,t):[]}),Yu=aa(function(e){return _r(p(e,wa))}),Xu=aa(function(e){var t=$i(e);return wa(t)&&(t=Q),_r(p(e,wa),si(t))}),Qu=aa(function(e){var t=$i(e);return wa(t)&&(t=Q),_r(p(e,wa),Q,t)}),Zu=aa(vo),Ju=aa(function(e){var t=e.length,n=t>1?e[t-1]:Q;return n="function"==typeof n?(e.pop(),n):Q,yo(e,n)}),ec=aa(function(e){e=On(e);var t=e.length,n=t?e[0]:0,o=this.__wrapped__,a=function(t){return un(t,e)};return!(t>1||this.__actions__.length)&&o instanceof i&&W(n)?(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:_o,args:[a],thisArg:Q}),new r(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(Q),e})):this.thru(a)}),tc=Fr(function(e,t,n){Bl.call(e,n)?++e[n]:e[n]=1}),nc=Fr(function(e,t,n){Bl.call(e,n)?e[n].push(t):e[n]=[t]}),rc=aa(function(e,t,n){var r=-1,i="function"==typeof t,o=yi(t),a=xa(e)?Array(e.length):[];return Su(e,function(e){var l=i?t:o&&null!=e?e[t]:Q;a[++r]=l?s(l,e,n):zn(e,t,n)}),a}),ic=Fr(function(e,t,n){e[n]=t}),oc=Fr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ac=aa(function(e,t){if(null==e)return[];var n=t.length;return n>1&&vi(e,t[0],t[1])?t=[]:n>2&&vi(t[0],t[1],t[2])&&(t.length=1),tr(e,On(t),[])}),sc=Al.now,lc=aa(function(e,n,r){var i=J;if(r.length){var o=t.placeholder||lc.placeholder,a=V(r,o);i|=ie}return ni(e,i,n,r,a)}),uc=aa(function(e,n,r){var i=J|ee;if(r.length){var o=t.placeholder||uc.placeholder,a=V(r,o);i|=ie}return ni(n,i,e,r,a)}),cc=aa(function(e,t){return Cn(e,1,t)}),fc=aa(function(e,t,n){return Cn(e,is(t)||0,n)}),dc=aa(function(e,t){t=g(On(t),si());var n=t.length;return aa(function(r){for(var i=-1,o=uu(r.length,n);++i0||0>t)?new i(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==Q&&(t=ns(t),n=0>t?n.dropRight(-t):n.take(t-e)),n)},i.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},i.prototype.toArray=function(){return this.take(Ee)},An(i.prototype,function(e,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),s=t[a?"take"+("last"==n?"Right":""):n],l=a||/^find/.test(n);s&&(t.prototype[n]=function(){var n=this.__wrapped__,u=a?[1]:arguments,c=n instanceof i,f=u[0],d=c||gc(n),p=function(e){var n=s.apply(t,v([e],u));return a&&h?n[0]:n};d&&o&&"function"==typeof f&&1!=f.length&&(c=d=!1);var h=this.__chain__,m=!!this.__actions__.length,g=l&&!h,y=c&&!m;if(!l&&d){n=y?n:new i(this);var b=e.apply(n,u);return b.__actions__.push({func:_o,args:[p],thisArg:Q}),new r(b,h)}return g&&y?e.apply(this,u):(b=this.thru(p),g?a?b.value()[0]:b.value():b)})}),c(["pop","push","shift","sort","splice","unshift"],function(e){var n=Il[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),An(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name+"",o=ku[i]||(ku[i]=[]);o.push({name:n,func:r})}}),ku[Gr(Q,ee).name]=[{name:"wrapper",func:Q}],i.prototype.clone=D,i.prototype.reverse=Tt,i.prototype.value=At,t.prototype.at=ec,t.prototype.chain=ko,t.prototype.commit=Eo,t.prototype.flatMap=So,t.prototype.next=To,t.prototype.plant=Oo,t.prototype.reverse=No,t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Ao,Jl&&(t.prototype[Jl]=Mo),t}var Q,Z="4.3.0",J=1,ee=2,te=4,ne=8,re=16,ie=32,oe=64,ae=128,se=256,le=512,ue=1,ce=2,fe=30,de="...",pe=150,he=16,me=200,ge=1,ve=2,ye=3,be="Expected a function",xe="__lodash_hash_undefined__",we=1/0,Ce=9007199254740991,_e=1.7976931348623157e308,ke=NaN,Ee=4294967295,Se=Ee-1,Te=Ee>>>1,Me="__lodash_placeholder__",Oe="[object Arguments]",Ne="[object Array]",Ae="[object Boolean]",Pe="[object Date]",Le="[object Error]",De="[object Function]",Re="[object GeneratorFunction]",Ie="[object Map]",je="[object Number]",Fe="[object Object]",Be="[object RegExp]",He="[object Set]",Ue="[object String]",We="[object Symbol]",ze="[object WeakMap]",qe="[object WeakSet]",Ve="[object ArrayBuffer]",Ke="[object Float32Array]",$e="[object Float64Array]",Ge="[object Int8Array]",Ye="[object Int16Array]",Xe="[object Int32Array]",Qe="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Je="[object Uint16Array]",et="[object Uint32Array]",tt=/\b__p \+= '';/g,nt=/\b(__p \+=) '' \+/g,rt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,it=/&(?:amp|lt|gt|quot|#39|#96);/g,ot=/[&<>"'`]/g,at=RegExp(it.source),st=RegExp(ot.source),lt=/<%-([\s\S]+?)%>/g,ut=/<%([\s\S]+?)%>/g,ct=/<%=([\s\S]+?)%>/g,ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ht=/[\\^$.*+?()[\]{}|]/g,mt=RegExp(ht.source),gt=/^\s+|\s+$/g,vt=/^\s+/,yt=/\s+$/,bt=/\\(\\)?/g,xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,wt=/\w*$/,Ct=/^0x/i,_t=/^[-+]0x[0-9a-f]+$/i,kt=/^0b[01]+$/i,Et=/^\[object .+?Constructor\]$/,St=/^0o[0-7]+$/i,Tt=/^(?:0|[1-9]\d*)$/,Mt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Ot=/($^)/,Nt=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",Pt="\\u0300-\\u036f\\ufe20-\\ufe23",Lt="\\u20d0-\\u20f0",Dt="\\u2700-\\u27bf",Rt="a-z\\xdf-\\xf6\\xf8-\\xff",It="\\xac\\xb1\\xd7\\xf7",jt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ft="\\u2018\\u2019\\u201c\\u201d",Bt=" \\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",Ht="A-Z\\xc0-\\xd6\\xd8-\\xde",Ut="\\ufe0e\\ufe0f",Wt=It+jt+Ft+Bt,zt="["+At+"]",qt="["+Wt+"]",Vt="["+Pt+Lt+"]",Kt="\\d+",$t="["+Dt+"]",Gt="["+Rt+"]",Yt="[^"+At+Wt+Kt+Dt+Rt+Ht+"]",Xt="\\ud83c[\\udffb-\\udfff]",Qt="(?:"+Vt+"|"+Xt+")",Zt="[^"+At+"]",Jt="(?:\\ud83c[\\udde6-\\uddff]){2}",en="[\\ud800-\\udbff][\\udc00-\\udfff]",tn="["+Ht+"]",nn="\\u200d",rn="(?:"+Gt+"|"+Yt+")",on="(?:"+tn+"|"+Yt+")",an=Qt+"?",sn="["+Ut+"]?",ln="(?:"+nn+"(?:"+[Zt,Jt,en].join("|")+")"+sn+an+")*",un=sn+an+ln,cn="(?:"+[$t,Jt,en].join("|")+")"+un,fn="(?:"+[Zt+Vt+"?",Vt,Jt,en,zt].join("|")+")",dn=RegExp(Vt,"g"),pn=RegExp(Xt+"(?="+Xt+")|"+fn+un,"g"),hn=RegExp("["+nn+At+Pt+Lt+Ut+"]"),mn=/[a-zA-Z0-9]+/g,gn=RegExp([tn+"?"+Gt+"+(?="+[qt,tn,"$"].join("|")+")",on+"+(?="+[qt,tn+rn,"$"].join("|")+")",tn+"?"+rn+"+",tn+"+",Kt,cn].join("|"),"g"),vn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yn=["Array","Buffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],bn=-1,xn={}; -xn[Ke]=xn[$e]=xn[Ge]=xn[Ye]=xn[Xe]=xn[Qe]=xn[Ze]=xn[Je]=xn[et]=!0,xn[Oe]=xn[Ne]=xn[Ve]=xn[Ae]=xn[Pe]=xn[Le]=xn[De]=xn[Ie]=xn[je]=xn[Fe]=xn[Be]=xn[He]=xn[Ue]=xn[ze]=!1;var wn={};wn[Oe]=wn[Ne]=wn[Ve]=wn[Ae]=wn[Pe]=wn[Ke]=wn[$e]=wn[Ge]=wn[Ye]=wn[Xe]=wn[Ie]=wn[je]=wn[Fe]=wn[Be]=wn[He]=wn[Ue]=wn[We]=wn[Qe]=wn[Ze]=wn[Je]=wn[et]=!0,wn[Le]=wn[De]=wn[ze]=!1;var Cn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},_n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},kn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},En={"function":!0,object:!0},Sn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Tn=parseFloat,Mn=parseInt,On=En[typeof t]&&t&&!t.nodeType?t:null,Nn=En[typeof e]&&e&&!e.nodeType?e:null,An=D(On&&Nn&&"object"==typeof i&&i),Pn=D(En[typeof self]&&self),Ln=D(En[typeof window]&&window),Dn=Nn&&Nn.exports===On?On:null,Rn=D(En[typeof this]&&this),In=An||Ln!==(Rn&&Rn.window)&&Ln||Pn||Rn||Function("return this")(),jn=X();(Ln||Pn||{})._=jn,r=function(){return jn}.call(t,n,t,e),!(r!==Q&&(e.exports=r))}).call(this)}).call(t,n(48)(e),function(){return this}())},function(e,t,n){"use strict";e.exports=n(111)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return 0===e.button}function a(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function l(e,t){var n=t.query,r=t.hash,i=t.state;return n||r||i?{pathname:e,query:n,hash:r,state:i}:e}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t=0;r--){var i=e[r],o=i.path||"";if(n=o.replace(/\/*$/,"/")+n,0===o.indexOf("/"))break}return"/"+n}},propTypes:{path:d,from:d,to:d.isRequired,query:p,state:p,onEnter:c.falsy,children:c.falsy},render:function(){s["default"](!1)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return a({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive})}function o(e,t){return e=a({},e,t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0&&0===window.sessionStorage.length)return;throw n}}function a(e){var t=void 0;try{t=window.sessionStorage.getItem(i(e))}catch(n){if(n.name===c)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=o,t.readState=a;var s=n(13),l=(r(s),"@@History/"),u=["QuotaExceededError","QUOTA_EXCEEDED_ERR"],c="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return l.canUseDOM?void 0:s["default"](!1),n.listen(e)}var n=f["default"](o({getUserConfirmation:u.getUserConfirmation},e,{go:u.go}));return o({},n,{listen:t})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){function t(e){return b&&null==e.basename&&(0===e.pathname.indexOf(b)?(e.pathname=e.pathname.substring(b.length),e.basename=b,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!b)return e;"string"==typeof e&&(e=l.parsePath(e));var t=e.pathname,n="/"===b.slice(-1)?b:b+"/",r="/"===t.charAt(0)?t.slice(1):t,i=n+r;return a({},e,{pathname:i})}function r(e){return w.listenBefore(function(n,r){c["default"](e,t(n),r)})}function o(e){return w.listen(function(n){e(t(n))})}function u(e){w.push(n(e))}function f(e){w.replace(n(e))}function p(e){return w.createPath(n(e))}function h(e){return w.createHref(n(e))}function m(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return t(w.createLocation.apply(w,[n(e)].concat(i)))}function g(e,t){"string"==typeof t&&(t=l.parsePath(t)),u(a({state:e},t))}function v(e,t){"string"==typeof t&&(t=l.parsePath(t)),f(a({state:e},t))}var y=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=y.basename,x=i(y,["basename"]),w=e(x);if(null==b&&s.canUseDOM){var C=document.getElementsByTagName("base")[0];C&&(b=l.extractPath(C.href))}return a({},w,{listenBefore:r,listen:o,push:u,replace:f,createPath:p,createHref:h,createLocation:m,pushState:d["default"](g,"pushState is deprecated; use push instead"),replaceState:d["default"](v,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var i=n(244),o=n(123),a=n(10),s=n(47),l=n(73),u=n(1),c={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:l,processUpdates:function(e,t){for(var n,a=null,c=null,f=0;f-1?void 0:a(!1),!u.plugins[n]){t.extractEvents?void 0:a(!1),u.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a(!1)}}}function i(e,t,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){u.registrationNameModules[e]?a(!1):void 0,u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(1),s=null,l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a(!1):void 0,l[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in l)l.hasOwnProperty(e)&&delete l[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=u},function(e,t,n){"use strict";function r(e){return(""+e).replace(x,"//")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);v(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function l(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,l=a.call(s,t,e.count++);Array.isArray(l)?u(l,i,n,g.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,o+(l!==t?r(l.key||"")+"/":"")+n)),i.push(l))}function u(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var u=s.getPooled(t,a,i,o);v(e,l,u),s.release(u)}function c(e,t,n){if(null==e)return e;var r=[];return u(e,r,null,t,n),r}function f(e,t,n){return null}function d(e,t){return v(e,f,null)}function p(e){var t=[];return u(e,t,null,g.thatReturnsArgument),t}var h=n(21),m=n(9),g=n(12),v=n(75),y=h.twoArgumentPooler,b=h.fourArgumentPooler,x=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var w={forEach:a,map:c,mapIntoWithKeyPrefixInternal:u,count:d,toArray:p};e.exports=w},function(e,t,n){"use strict";function r(e,t){var n=C.hasOwnProperty(t)?C[t]:null;k.hasOwnProperty(t)&&(n!==x.OVERRIDE_BASE?g(!1):void 0),e.hasOwnProperty(t)&&(n!==x.DEFINE_MANY&&n!==x.DEFINE_MANY_MERGED?g(!1):void 0)}function i(e,t){if(t){"function"==typeof t?g(!1):void 0,d.isValidElement(t)?g(!1):void 0;var n=e.prototype;t.hasOwnProperty(b)&&_.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var o=t[i];if(r(n,i),_.hasOwnProperty(i))_[i](e,o);else{var a=C.hasOwnProperty(i),u=n.hasOwnProperty(i),c="function"==typeof o,f=c&&!a&&!u&&t.autobind!==!1;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=o,n[i]=o;else if(u){var p=C[i];!a||p!==x.DEFINE_MANY_MERGED&&p!==x.DEFINE_MANY?g(!1):void 0,p===x.DEFINE_MANY_MERGED?n[i]=s(n[i],o):p===x.DEFINE_MANY&&(n[i]=l(n[i],o))}else n[i]=o}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in _;i?g(!1):void 0;var o=n in e;o?g(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:g(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?g(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,n)}}var f=n(110),d=n(9),p=(n(42),n(41),n(125)),h=n(3),m=n(31),g=n(1),v=n(26),y=n(19),b=(n(2),y({mixins:null})),x=v({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),w=[],C={mixins:x.DEFINE_MANY,statics:x.DEFINE_MANY,propTypes:x.DEFINE_MANY,contextTypes:x.DEFINE_MANY,childContextTypes:x.DEFINE_MANY,getDefaultProps:x.DEFINE_MANY_MERGED,getInitialState:x.DEFINE_MANY_MERGED,getChildContext:x.DEFINE_MANY_MERGED,render:x.DEFINE_ONCE,componentWillMount:x.DEFINE_MANY,componentDidMount:x.DEFINE_MANY,componentWillReceiveProps:x.DEFINE_MANY,shouldComponentUpdate:x.DEFINE_ONCE,componentWillUpdate:x.DEFINE_MANY,componentDidUpdate:x.DEFINE_MANY,componentWillUnmount:x.DEFINE_MANY,updateComponent:x.OVERRIDE_BASE},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var i=a.getNode(this._rootNodeID);r.updateTextContent(i,n)}}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(11),o=n(44),a=n(3),s=n(12),l={initialize:s,close:function(){d.isBatchingUpdates=!1}},u={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[u,l];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return c}});var f=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,i,o):f.perform(e,null,t,n,r,i,o)}};e.exports=d},function(e,t,n){"use strict";function r(){if(!E){E=!0,v.EventEmitter.injectReactEventListener(g),v.EventPluginHub.injectEventPluginOrder(s),v.EventPluginHub.injectInstanceHandle(y),v.EventPluginHub.injectMount(b),v.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:_,EnterLeaveEventPlugin:l,ChangeEventPlugin:o,SelectEventPlugin:w,BeforeInputEventPlugin:i}),v.NativeComponent.injectGenericComponentClass(h),v.NativeComponent.injectTextComponentClass(m),v.Class.injectMixin(f),v.DOMProperty.injectDOMPropertyConfig(c),v.DOMProperty.injectDOMPropertyConfig(k),v.EmptyComponent.injectEmptyComponent("noscript"),v.Updates.injectReconcileTransaction(x),v.Updates.injectBatchingStrategy(p),v.RootIndex.injectCreateReactRootIndex(u.canUseDOM?a.createReactRootIndex:C.createReactRootIndex),v.Component.injectEnvironment(d)}}var i=n(240),o=n(242),a=n(243),s=n(245),l=n(246),u=n(5),c=n(249),f=n(251),d=n(61),p=n(115),h=n(255),m=n(114),g=n(263),v=n(264),y=n(30),b=n(7),x=n(268),w=n(274),C=n(275),_=n(276),k=n(273),E=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(f.current){var e=f.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;o("uniqueKey",e,t)}}function o(e,t,n){var i=r();if(!i){var o="string"==typeof n?n:n.displayName||n.name;o&&(i=" Check the top-level render call using <"+o+">.")}var a=h[e]||(h[e]={});if(a[i])return null;a[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==f.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(i," "+o.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t,n){"use strict";var r=n(26),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=f[t];return null==n&&(f[t]=n=u(t)),n}function i(e){return c?void 0:l(!1),new c(e.type,e.props)}function o(e){return new d(e)}function a(e){return e instanceof d}var s=n(3),l=n(1),u=null,c=null,f={},d=null,p={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){s(f,e)}},h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:p};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var i=(n(2),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=i},function(e,t,n){"use strict";function r(e){function t(t,n,r,i,o,a){if(i=i||C,a=a||r,null==n[r]){var s=b[o];return t?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,o,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if(s!==e){var l=b[i],u=g(a);return new Error("Invalid "+l+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function o(){return r(x.thatReturns(null))}function a(e){function t(t,n,r,i,o){var a=t[n];if(!Array.isArray(a)){var s=b[i],l=m(a);return new Error("Invalid "+s+" `"+o+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>"}var y=n(9),b=n(41),x=n(12),w=n(70),C="<>",_={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:l,node:d(),objectOf:c,oneOf:u,oneOfType:f,shape:p};e.exports=_},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(1);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(5),o=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function i(e,t){return function(n,i){if(i.type!==e)return n;var a=o.isError(i)?"throw":"next";r(t)&&(t.next=t["throw"]=t);var s=t[a];return r(s)?s(n,i):n}}t.__esModule=!0,t["default"]=i;var o=n(192);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.save=t.load=void 0;var i=n(297),o=n(36),a=r(o);t.load=(0,i.createAction)(a.LOAD),t.save=(0,i.createAction)(a.SAVE)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(134);t["default"]=function(e){return function(t){var n=function(e){return t.dispatch((0,r.load)(e))};return e.load().then(function(e){return n(e),e})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tn;n++)t[n]=arguments[n];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],n=t.slice(0,-1);return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){function r(){h===p&&(h=p.slice())}function o(){return d}function l(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),h.push(e),function(){if(t){t=!1,r();var n=h.indexOf(e);h.splice(n,1)}}}function u(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,d=f(d,e)}finally{m=!1}for(var t=p=h,n=0;nf;f++)u[f]=arguments[f];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.onChange=function(e){e!==r.props.text&&r.props.onChange(e)},r.render=function(){var e={readOnly:!1,lineNumbers:!1,mode:"gfm",matchBrackets:!0,lineWrapping:!0,viewportMargin:1/0,theme:"atlas",extraKeys:{Enter:"newlineAndIndentContinueMarkdownList"}};return l["default"].createElement("div",{className:d["default"].container},l["default"].createElement(c["default"],{value:r.props.text,onChange:r.onChange,options:e}))},a=n,o(r,a)}return a(t,e),t}(l["default"].Component);p.propTypes={text:l["default"].PropTypes.string,onChange:l["default"].PropTypes.func},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(144),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),l=r(s),u=n(211),c=r(u),f=n(205),d=r(f),p=n(317),h=r(p);n(311),n(312);var m=function(e){function t(){var e,n,r,a;i(this,t);for(var s=arguments.length,u=Array(s),f=0;s>f;f++)u[f]=arguments[f];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.onChange=function(e){e!==r.props.text&&r.props.onChange(e)},r.render=function(){return l["default"].createElement("div",{className:h["default"].container},l["default"].createElement("div",null),l["default"].createElement(c["default"],{options:{toolbar:{buttons:["bold","italic","underline","anchor","unorderedlist","orderedlist","h1","h2","h3","quote"]},placeholder:!1},text:(0,d["default"])(r.props.text),onChange:r.onChange,className:h["default"].editor}))},a=n,o(r,a)}return a(t,e),t}(l["default"].Component);m.propTypes={text:l["default"].PropTypes.string,onChange:l["default"].PropTypes.func},t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(146),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0?n:s["default"].xor([u.ActiveEditors.MARKDOWN,u.ActiveEditors.TEXT],[t.toggledEditor]);default:return e}},f=function(){var e=arguments.length<=0||void 0===arguments[0]?{visible:!1}:arguments[0],t=arguments[1];switch(t.type){case u.TOGGLE_HISTORY_SIDEBAR:return o({},e,{visible:!e.visible});default:return e}},d="# Welcome to Beautiful Atlas\n\nThis is just a small preview here's what you can do:\n\n- Write markdown or rich text, you choose\n- Dont' worry about saving\n- One document for now\n- More to come\n",p={text:d,revisions:[],unsavedChanges:!1},h=function(){var e=arguments.length<=0||void 0===arguments[0]?p:arguments[0],t=arguments[1],n=s["default"].last(e.revisions);switch(t.type){case u.UPDATE_TEXT:var r=!1;return n&&n.text!==e.text&&(r=!0),o({},e,{unsavedChanges:r,text:t.text});case u.ADD_REVISION:if(n&&n.text===e.text)return e;var a=n?n.id:0;return o({},e,{revisions:[].concat(i(e.revisions),[{id:a+1,text:e.text,created_at:t.createdAt}]),unsavedChanges:!1});default:return e}};t["default"]=(0,l.combineReducers)({activeEditors:c,historySidebar:f,text:h})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;var o=n(89),a=r(o),s=n(37),l=r(s),u=n(78),c=r(u),f=function p(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,p),this.fetch=function(n,r,i){var o=void 0,a=void 0;"GET"===r?a=n+t.constructQueryString(i):("POST"===r||"PUT"===r)&&(o=JSON.stringify(i));var s=new Headers({Accept:"application/json","Content-Type":"application/json","User-Agent":t.userAgent});l["default"].getToken()&&s.set("Authorization","JWT "+l["default"].getToken());var u=e(t.baseUrl+(a||n),{method:r,body:o,headers:s,redirect:"follow"});return new Promise(function(e,t){u.then(function(e){if(e.status>=200&&e.status<300)return e;401===e.status&&l["default"].logout();var n=void 0;try{n=JSON.parse(e)}catch(r){n={error:e.statusText}}n.statusCode=e.status,n.response=e,t(n)}).then(function(e){return e.json()}).then(function(t){e(t)})["catch"](function(){t({error:"Unknown error"})})})},this.post=function(e,n){return t.fetch(e,"POST",n)},this.put=function(e,n){return t.fetch(e,"PUT",n)},this.get=function(e,n){return t.fetch(e,"GET",n)},this["delete"]=function(e,n){return t.fetch(e,"DELETE",n)},this.constructQueryString=function(e){return a["default"].map(e,function(e,t){return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&")},this.baseUrl=n.baseUrl||c["default"].API_BASE_URL,this.userAgent=n.userAgent||c["default"].API_USER_AGENT};t["default"]=f;var d=new f;t.client=d}).call(t,n(194))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=(0,a["default"])(e,{gfm:!0,converters:[s,l]});return t}Object.defineProperty(t,"__esModule",{value:!0}),t.toMarkdown=i;var o=n(320),a=r(o),s={filter:"li",replacement:function(e,t){e=e.replace(/^\s+/,"").replace(/\n/gm,"\n ");var n="- ",r=t.parentNode,i=Array.prototype.indexOf.call(r.children,t)+1;return n=/ol/i.test(r.nodeName)?i+". ":"- ",n+e}},l={filter:["ul","ol"],replacement:function(e,t){for(var n=[],r=0;ru;u++)l[u]=arguments[u];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.state={loggedIn:b["default"].loggedIn()},r.componentWillMount=function(){b["default"].onChange=r.updateAuth},r.updateAuth=function(e){r.setState({loggedIn:e})},r.logout=function(){b["default"].logout()},a=n,o(r,a)}return a(t,e),s(t,[{key:"render",value:function(){return u["default"].createElement("div",{className:d["default"].container},u["default"].createElement(m["default"],{activeEditors:this.props.activeEditors,toggleEditors:this.props.toggleEditors,addRevision:this.props.addRevision,unsavedChanges:this.props.unsavedChanges}),u["default"].createElement("div",{className:d["default"].content},u["default"].createElement(v["default"],null)))}}]),t}(l.Component);x.propTypes={children:u["default"].PropTypes.element,activeEditors:u["default"].PropTypes.array.isRequired,toggleEditors:u["default"].PropTypes.func.isRequired,addRevision:u["default"].PropTypes.func.isRequired,unsavedChanges:u["default"].PropTypes.bool.isRequired};var w=function(e){return{activeEditors:e.activeEditors,unsavedChanges:e.text.unsavedChanges}},C=function(e){return{toggleEditors:function(t){e((0,p.toggleEditors)(t))},addRevision:function(){e((0,p.addRevision)())}}};x=(0,c.connect)(w,C)(x),t["default"]=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(151),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1?y["default"].panel:y["default"].fullscreen)+" "+y["default"].markdown},u["default"].createElement(d["default"],{onChange:this.props.editMarkdown,text:this.props.text})):null,e.includes("TEXT")?u["default"].createElement("div",{className:(e.length>1?y["default"].panel:y["default"].fullscreen)+" "+y["default"].text},u["default"].createElement(h["default"],{onChange:this.props.editText,text:this.props.text})):null)}}]),t}(l.Component);b.propTypes={editMarkdown:u["default"].PropTypes.func.isRequired,editText:u["default"].PropTypes.func.isRequired,text:u["default"].PropTypes.string,activeEditors:u["default"].PropTypes.arrayOf(u["default"].PropTypes.string),showHistorySidebar:u["default"].PropTypes.bool.isRequired};var x=function(e){return{text:e.text.text,editor:e.editor,activeEditors:e.activeEditors,showHistorySidebar:e.historySidebar.visible,revisions:e.text.revisions}},w=function(e){return{editMarkdown:function(t){e((0,g.updateText)(t,"markdown"))},editText:function(t){var n=(0,m.toMarkdown)(t);e((0,g.updateText)(n,"text"))}}};b=(0,c.connect)(x,w)(b),t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;nu;u++)l[u]=arguments[u];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.state={email:"",password:"",error:null},r.handleEmailChange=function(e){r.setState({email:e.target.value})},r.handlePasswordChange=function(e){r.setState({password:e.target.value})},r.handleSubmit=function(e){e.preventDefault(),f["default"].login(r.state.email,r.state.password).then(function(){var e=r.props.location;e.state&&e.state.nextPathname?r.context.router.replace(e.state.nextPathname):r.context.router.replace("/dashboard")})["catch"](function(e){r.setState({error:e.error})})},a=n,o(r,a)}return a(t,e),s(t,[{key:"render",value:function(){return u["default"].createElement("div",null,u["default"].createElement("h2",null,"Login"),u["default"].createElement("form",{action:"",onSubmit:this.handleSubmit},this.state.error&&u["default"].createElement("p",null,this.state.error),u["default"].createElement("div",null,u["default"].createElement("input",{placeholder:"Email",onChange:this.handleEmailChange})),u["default"].createElement("div",null,u["default"].createElement("input",{placeholder:"Password",type:"password",onChange:this.handlePasswordChange})),u["default"].createElement("div",null,u["default"].createElement("input",{type:"submit"}))))}}]),t}(l.Component);d.propTypes={location:u["default"].PropTypes.object},d.contextTypes={router:u["default"].PropTypes.object.isRequired},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(154),o=r(i);t["default"]=o["default"]},function(e,t){e.exports=function(e){var t={},n=arguments[1];if("string"==typeof n){n={};for(var r=1;r":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var i=n(5),o=n(1),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],l=[1,"","
"],c=[3,"","
"],f=[1,'',""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(e){d[e]=f,s[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=r.bind(t),a=0;a-1&&e%1==0&&c>=e}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function l(e){return!!e&&"object"==typeof e}var c=9007199254740991,f="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",h=Object.prototype,m=h.hasOwnProperty,v=h.toString,g=h.propertyIsEnumerable,y=n("length");e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var r;(function(e,i){(function(){function o(e,t){return e.set(t[0],t[1]),e}function a(e,t){return e.add(t),e}function s(e,t,n){var r=n.length;switch(r){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 u(e,t,n,r){for(var i=-1,o=e.length;++i-1}function m(e,t,n){for(var r=-1,i=e.length;++r-1;);return n}function R(e,t){for(var n=e.length;n--&&P(t,e[n],0)>-1;);return n}function j(e){return e&&e.Object===Object?e:null}function D(e,t){if(e!==t){var n=null===e,r=e===Q,i=e===e,o=null===t,a=t===Q,s=t===t;if(e>t&&!o||!i||n&&!a&&s||r&&s)return 1;if(t>e&&!n||!s||o&&!r&&i||a&&i)return-1}return 0}function I(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r=s)return u;var l=n[r];return u*("desc"==l?-1:1)}}return e.index-t.index}function z(e){return wn[e]}function H(e){return kn[e]}function W(e){return"\\"+Tn[e]}function F(e,t,n){for(var r=e.length,i=t+(n?0:-1);n?i--:++i-1&&e%1==0&&t>e}function U(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function B(e,t){for(var n=-1,r=e.length,i=-1,o=[];++nt,i=n?e.length:0,o=fi(0,i,this.__views__),a=o.start,s=o.end,u=s-a,l=r?s:a-1,c=this.__iteratees__,f=c.length,d=0,p=ll(u,this.__takeCount__);if(!n||me>i||i==u&&p==u)return wr(e,this.__actions__);var h=[];e:for(;u--&&p>d;){l+=t;for(var m=-1,v=e[l];++mn)return!1;var r=e.length-1;return n==r?e.pop():nl.call(e,n,1),!0}function $t(e,t){var n=tn(e,t);return 0>n?Q:e[n][1]}function en(e,t){return tn(e,t)>-1}function tn(e,t){for(var n=e.length;n--;)if(ma(e[n][0],t))return n;return-1}function nn(e,t,n){var r=tn(e,t);0>r?e.push([t,n]):e[r][1]=n}function rn(e,t,n,r){return e===Q||ma(e,zu[n])&&!Wu.call(r,n)?t:e}function on(e,t,n){(n!==Q&&!ma(e[t],n)||"number"==typeof t&&n===Q&&!(t in e))&&(e[t]=n)}function an(e,t,n){var r=e[t];(!ma(r,n)||ma(r,zu[t])&&!Wu.call(e,t)||n===Q&&!(t in e))&&(e[t]=n)}function sn(e,t,n,r){return Tl(e,function(e,i,o){t(r,e,n(e),o)}),r}function un(e,t){return e&&Dr(t,xs(t),e)}function ln(e,t){for(var n=-1,r=null==e,i=t.length,o=Array(i);++n=e?e:n),t!==Q&&(e=e>=t?e:t)),e}function fn(e,t,n,r,i,o){var a;if(n&&(a=i?n(e,r,i,o):n(e)),a!==Q)return a;if(!Ra(e))return e;var s=vc(e);if(s){if(a=pi(e),!t)return jr(e,a)}else{var u=ci(e),l=u==je||u==De;if(gc(e))return Cr(e,t);if(u!=He&&u!=Ne&&(!l||i))return An[u]?mi(e,u,t):i?e:{};if(q(e))return i?e:{};if(a=hi(l?{}:e),!t)return zr(e,un(a,e))}o||(o=new Zt);var f=o.get(e);return f?f:(o.set(e,a),(s?c:On)(e,function(r,i){an(a,i,fn(r,t,n,i,e,o))}),s?a:zr(e,a))}function pn(e){var t=xs(e),n=t.length;return function(r){if(null==r)return!n;for(var i=n;i--;){var o=t[i],a=e[o],s=r[o];if(s===Q&&!(o in Object(r))||!a(s))return!1}return!0}}function wn(e,t,n){if("function"!=typeof e)throw new Du(be);return tl(function(){e.apply(Q,n)},t)}function kn(e,t,n,r){var i=-1,o=h,a=!0,s=e.length,u=[],l=t.length;if(!s)return u;n&&(t=v(t,M(n))),r?(o=m,a=!1):t.length>=me&&(o=Vt,a=!1,t=new Ut(t));e:for(;++in&&(n=-n>i?0:i+n),r=r===Q||r>i?i:ns(r),0>r&&(r+=i),r=n>r?0:rs(r);r>n;)e[n++]=t;return e}function Tn(e,t){var n=[];return Tl(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Nn(e,t,n,r){r||(r=[]);for(var i=-1,o=e.length;++in;)e=e[t[n++]];return n&&n==r?e:Q}function Hn(e,t){return Wu.call(e,t)||"object"==typeof e&&t in e&&null===Qu(e)}function Wn(e,t){return t in Object(e)}function Fn(e,t,n){return e>=ll(t,n)&&e=120)?new Ut(o&&u):Q}u=e[0];var l=-1,c=u.length,f=a[0];e:for(;++l-1;)o!==e&&nl.call(o,a,1),nl.call(e,a,1);return e}function ur(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(r==n||i!=o){var o=i;if(X(i))nl.call(e,i,1);else if(yi(i,e))delete e[i];else{var a=yr(i),s=Ci(e,a);null!=s&&delete s[Gi(a)]}}}return e}function lr(e,t){return e+il(fl()*(t-e+1))}function cr(e,t,n,r){for(var i=-1,o=ul(rl((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}function fr(e,t,n,r){t=yi(t,e)?[t+""]:yr(t);for(var i=-1,o=t.length,a=o-1,s=e;null!=s&&++it&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=i){for(;i>r;){var o=r+i>>>1,a=e[o];(n?t>=a:t>a)&&null!==a?r=o+1:i=o}return i}return mr(e,t,lu,n)}function mr(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,s=null===t,u=t===Q;o>i;){var l=il((i+o)/2),c=n(e[l]),f=c!==Q,d=c===c;if(a)var p=d||r;else p=s?d&&f&&(r||null!=c):u?d&&(r||f):null==c?!1:r?t>=c:t>c;p?i=l+1:o=l}return ll(o,Te)}function vr(e){return gr(e)}function gr(e,t){for(var n=0,r=e.length,i=e[0],o=t?t(i):i,a=o,s=0,u=[i];++n=me){var l=t?null:Ol(e);if(l)return Z(l);a=!1,i=Vt,u=new Ut}else u=t?[]:s;e:for(;++rr?t[r]:Q);return a}function Cr(e,t){if(t)return e.slice();var n=e.constructor,r=new n(e.length);return e.copy(r),r}function Tr(e){var t=e.constructor,n=new t(e.byteLength),r=new Ju(n);return r.set(new Ju(e)),n}function Er(e){var t=e.constructor;return y(V(e),o,new t)}function Sr(e){var t=e.constructor,n=new t(e.source,At.exec(e));return n.lastIndex=e.lastIndex,n}function Nr(e){var t=e.constructor;return y(Z(e),a,new t)}function Mr(e){return Gu?Object(wl.call(e)):{}}function Or(e,t){var n=e.buffer,r=e.constructor;return new r(t?Tr(n):n,e.byteOffset,e.length)}function Lr(e,t,n){for(var r=n.length,i=-1,o=ul(e.length-r,0),a=-1,s=t.length,u=Array(s+o);++a1?n[i-1]:Q,a=i>2?n[2]:Q;for(o="function"==typeof o?(i--,o):Q,a&&gi(n[0],n[1],a)&&(o=3>i?Q:o,i=1),t=Object(t);++ra&&l[0]!==f&&l[a-1]!==f?[]:B(l,f);return a-=d.length,r>a?ei(e,n,Jr,f,Q,l,d,Q,Q,r-a):s(c,this,l)}var o=Br(e);return i}function Gr(e){return aa(function(t){t=Nn(t);var n=t.length,i=n,o=r.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Du(be);if(o&&!s&&"wrapper"==ai(a))var s=new r([],!0)}for(i=s?i:n;++i=me)return s.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++ib)return ei(e,n,Jr,w,r,A,k,u,l,c-b)}var P=p?r:this,C=h?P[e]:e;return u?A=Ti(A,u):g&&A.length>1&&A.reverse(),d&&l=t)return"";var i=t-r;n=n===Q?" ":n+"";var o=Gs(n,rl(i/G(n)));return hn.test(n)?J(o).slice(0,i).join(""):o.slice(0,i)}function _r(e,t,n,r){function i(){for(var t=-1,u=arguments.length,l=-1,c=r.length,f=Array(c+u),d=this&&this!==In&&this instanceof i?a:e;++lt?1:-1:is(r)||0,cr(t,n,r,e)}}function ei(e,t,n,r,i,o,a,s,u,l){var c=t&ne,f=s?jr(s):Q,d=c?a:Q,p=c?Q:a,h=c?o:Q,m=c?Q:o;t|=c?ie:oe,t&=~(c?oe:ie),t&te||(t&=~($|ee));var v=[e,t,i,h,d,m,p,f,u,l],g=n.apply(Q,v);return xi(e)&&Dl(g,v),g.placeholder=r,g}function ti(e){var t=Ru[e];return function(e,n){if(e=is(e),n=ns(n)){var r=(ss(e)+"e").split("e"),i=t(r[0]+"e"+(+r[1]+n));return r=(ss(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-n))}return t(e)}}function ni(e,t,n,r,i,o,a,s){var u=tⅇif(!u&&"function"!=typeof e)throw new Du(be);var l=r?r.length:0;if(l||(t&=~(ie|oe),r=i=Q),a=a===Q?a:ul(ns(a),0),s=s===Q?s:ns(s),l-=i?i.length:0,t&oe){var c=r,f=i;r=i=Q}var d=u?Q:Ll(e),p=[e,t,n,r,i,c,f,o,a,s];if(d&&ki(p,d),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],s=p[9]=null==p[9]?u?0:e.length:ul(p[9]-l,0),!s&&t&(ne|re)&&(t&=~(ne|re)),t&&t!=$)h=t==ne||t==re?Zr(e,t,s):t!=ie&&t!=($|ie)||i.length?Jr.apply(Q,p):_r(e,t,n,r);else var h=Xr(e,t,n);var m=d?Ml:Dl;return m(h,p)}function ri(e,t,n,r,i,o){var a=-1,s=i&ce,u=i&le,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var f=o.get(e);if(f)return f==t;var d=!0;for(o.set(e,t);++ai,a=r==ae&&n==ne||r==ae&&n==se&&e[7].length<=t[8]||r==(ae|se)&&t[7].length<=t[8]&&n==ne;if(!o&&!a)return e;r&$&&(e[2]=t[2],i|=n&$?0:te);var s=t[3];if(s){var u=e[3];e[3]=u?Lr(u,s,t[4]):jr(s),e[4]=u?B(e[3],Se):jr(t[4])}return s=t[5],s&&(u=e[5],e[5]=u?Rr(u,s,t[6]):jr(s),e[6]=u?B(e[5],Se):jr(t[6])),s=t[7],s&&(e[7]=jr(s)),r&ae&&(e[8]=null==e[8]?t[8]:ll(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function Pi(e,t,n,r,i,o){return Ra(e)&&Ra(t)&&(o.set(t,e),$n(e,t,Q,Pi,o)),e}function Ci(e,t){return 1==t.length?e:gs(e,dr(t,0,-1))}function Ti(e,t){for(var n=e.length,r=ll(t.length,n),i=jr(e);r--;){var o=t[r];e[r]=X(o,n)?i[o]:Q}return e}function Ei(e){var t=[];return ss(e).replace(pt,function(e,n,r,i){t.push(r?i.replace(bt,"$1"):n||e)}),t}function Si(e){return Aa(e)?e:[]}function Ni(e){return"function"==typeof e?e:lu}function Mi(e){if(e instanceof i)return e.clone();var t=new r(e.__wrapped__,e.__chain__);return t.__actions__=jr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Oi(e,t){t=ul(ns(t),0);var n=e?e.length:0;if(!n||1>t)return[];for(var r=0,i=-1,o=Array(rl(n/t));n>r;)o[++i]=dr(e,r,r+=t);return o}function Li(e){for(var t=-1,n=e?e.length:0,r=-1,i=[];++tt?0:t,r)):[]}function ji(e,t,n){var r=e?e.length:0;return r?(t=n||t===Q?1:ns(t),t=r-t,dr(e,0,0>t?0:t)):[]}function Di(e,t){return e&&e.length?Ar(e,si(t,3),!0,!0):[]}function Ii(e,t){return e&&e.length?Ar(e,si(t,3),!0):[]}function zi(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&gi(e,t,n)&&(n=0,r=i),Cn(e,t,n,r)):[]}function Hi(e,t){return e&&e.length?k(e,si(t,3)):-1}function Wi(e,t){return e&&e.length?k(e,si(t,3),!0):-1}function Fi(e){var t=e?e.length:0;return t?Nn(e):[]}function qi(e){var t=e?e.length:0;return t?Nn(e,!0):[]}function Xi(e){for(var t=-1,n=e?e.length:0,r={};++tn&&(n=ul(r+n,0)), +P(e,t,n)):-1}function Bi(e){return ji(e,1)}function Zi(e,t){return e?al.call(e,t):""}function Gi(e){var t=e?e.length:0;return t?e[t-1]:Q}function Ji(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=r;if(n!==Q&&(i=ns(n),i=(0>i?ul(r+i,0):ll(i,r-1))+1),t!==t)return F(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1}function Ki(e,t){return e&&e.length&&t&&t.length?ar(e,t):e}function Yi(e,t,n){return e&&e.length&&t&&t.length?sr(e,t,si(n)):e}function Qi(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=si(t,3);++rr&&ma(e[r],t))return r}return-1}function ro(e,t){return hr(e,t,!0)}function io(e,t,n){return mr(e,t,si(n),!0)}function oo(e,t){var n=e?e.length:0;if(n){var r=hr(e,t,!0)-1;if(ma(e[r],t))return r}return-1}function ao(e){return e&&e.length?vr(e):[]}function so(e,t){return e&&e.length?gr(e,si(t)):[]}function uo(e){return Ri(e,1)}function lo(e,t,n){return e&&e.length?(t=n||t===Q?1:ns(t),dr(e,0,0>t?0:t)):[]}function co(e,t,n){var r=e?e.length:0;return r?(t=n||t===Q?1:ns(t),t=r-t,dr(e,0>t?0:t,r)):[]}function fo(e,t){return e&&e.length?Ar(e,si(t,3),!1,!0):[]}function po(e,t){return e&&e.length?Ar(e,si(t,3)):[]}function ho(e){return e&&e.length?br(e):[]}function mo(e,t){return e&&e.length?br(e,si(t)):[]}function vo(e,t){return e&&e.length?br(e,Q,t):[]}function go(e){if(!e||!e.length)return[];var t=0;return e=p(e,function(e){return Aa(e)?(t=ul(e.length,t),!0):void 0}),S(t,function(t){return v(e,ir(t))})}function yo(e,t){if(!e||!e.length)return[];var n=go(e);return null==t?n:v(n,function(e){return s(t,Q,e)})}function bo(e,t){return Pr(e||[],t||[],an)}function xo(e,t){return Pr(e||[],t||[],fr)}function Ao(e){var n=t(e);return n.__chain__=!0,n}function wo(e,t){return t(e),e}function ko(e,t){return t(e)}function Po(){return Ao(this)}function Co(){return new r(this.value(),this.__chain__)}function To(e){return this.map(e).flatten()}function Eo(){this.__values__===Q&&(this.__values__=ts(this.value()));var e=this.__index__>=this.__values__.length,t=e?Q:this.__values__[this.__index__++];return{done:e,value:t}}function So(){return this}function No(e){for(var t,r=this;r instanceof n;){var i=Mi(r);i.__index__=0,i.__values__=Q,t?o.__wrapped__=i:t=i;var o=i;r=r.__wrapped__}return o.__wrapped__=e,t}function Mo(){var e=this.__wrapped__;if(e instanceof i){var t=e;return this.__actions__.length&&(t=new i(this)),t=t.reverse(),t.__actions__.push({func:ko,args:[_i],thisArg:Q}),new r(t,this.__chain__)}return this.thru(_i)}function Oo(){return wr(this.__wrapped__,this.__actions__)}function Lo(e,t,n){var r=vc(e)?d:Pn;return n&&gi(e,t,n)&&(t=Q),r(e,si(t,3))}function Ro(e,t){var n=vc(e)?p:Tn;return n(e,si(t,3))}function jo(e,t){if(t=si(t,3),vc(e)){var n=k(e,t);return n>-1?e[n]:Q}return w(e,t,Tl)}function Do(e,t){if(t=si(t,3),vc(e)){var n=k(e,t,!0);return n>-1?e[n]:Q}return w(e,t,El)}function Io(e,t){return Nn(Fo(e,t))}function zo(e,t){return"function"==typeof t&&vc(e)?c(e,t):Tl(e,Ni(t))}function Ho(e,t){return"function"==typeof t&&vc(e)?f(e,t):El(e,Ni(t))}function Wo(e,t,n,r){e=xa(e)?e:Rs(e),n=n&&!r?ns(n):0;var i=e.length;return 0>n&&(n=ul(i+n,0)),Ga(e)?i>=n&&e.indexOf(t,n)>-1:!!i&&P(e,t,n)>-1}function Fo(e,t){var n=vc(e)?v:Yn;return n(e,si(t,3))}function qo(e,t,n,r){return null==e?[]:(vc(t)||(t=null==t?[]:[t]),n=r?Q:n,vc(n)||(n=null==n?[]:[n]),tr(e,t,n))}function Xo(e,t,n){var r=vc(e)?y:C,i=arguments.length<3;return r(e,si(t,4),n,i,Tl)}function Uo(e,t,n){var r=vc(e)?b:C,i=arguments.length<3;return r(e,si(t,4),n,i,El)}function Vo(e,t){var n=vc(e)?p:Tn;return t=si(t,3),n(e,function(e,n,r){return!t(e,n,r)})}function Bo(e){var t=xa(e)?e:Rs(e),n=t.length;return n>0?t[lr(0,n-1)]:Q}function Zo(e,t){var n=-1,r=ts(e),i=r.length,o=i-1;for(t=cn(ns(t),0,i);++n0&&(n=t.apply(this,arguments)),1>=e&&(t=Q),n}}function $o(e,n,r){n=r?Q:n;var i=ni(e,ne,Q,Q,Q,Q,Q,n);return i.placeholder=t.placeholder||$o.placeholder,i}function ea(e,n,r){n=r?Q:n;var i=ni(e,re,Q,Q,Q,Q,Q,n);return i.placeholder=t.placeholder||ea.placeholder,i}function ta(e,t,n){function r(){h&&Ku(h),c&&Ku(c),v=0,l=c=p=h=m=Q}function i(t,n){n&&Ku(n),c=h=m=Q,t&&(v=sc(),f=e.apply(p,l),h||c||(l=p=Q))}function o(){var e=t-(sc()-d);0>=e||e>t?i(m,c):h=tl(o,e)}function a(){return(h&&m||c&&b)&&(f=e.apply(p,l)),r(),f}function s(){i(b,h)}function u(){if(l=arguments,d=sc(),p=this,m=b&&(h||!g),y===!1)var n=g&&!h;else{v||c||g||(v=d);var r=y-(d-v),i=0>=r||r>y;i?(c&&(c=Ku(c)),v=d,f=e.apply(p,l)):c||(c=tl(s,r))}return i&&h?h=Ku(h):h||t===y||(h=tl(o,t)),n&&(i=!0,f=e.apply(p,l)),!i||h||c||(l=p=Q),f}var l,c,f,d,p,h,m,v=0,g=!1,y=!1,b=!0;if("function"!=typeof e)throw new Du(be);return t=is(t)||0,Ra(n)&&(g=!!n.leading,y="maxWait"in n&&ul(is(n.maxWait)||0,t),b="trailing"in n?!!n.trailing:b),u.cancel=r,u.flush=a,u}function na(e){return ni(e,ue)}function ra(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Du(be);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new ra.Cache,n}function ia(e){if("function"!=typeof e)throw new Du(be);return function(){return!e.apply(this,arguments)}}function oa(e){return _o(2,e)}function aa(e,t){if("function"!=typeof e)throw new Du(be);return t=ul(t===Q?e.length-1:ns(t),0),function(){for(var n=arguments,r=-1,i=ul(n.length-t,0),o=Array(i);++rt}function ga(e,t){return e>=t}function ya(e){return Aa(e)&&Wu.call(e,"callee")&&(!el.call(e,"callee")||Xu.call(e)==Ne)}function ba(e){return ja(e)&&Xu.call(e)==Be}function xa(e){return null!=e&&!("function"==typeof e&&Ma(e))&&La(Rl(e))}function Aa(e){return ja(e)&&xa(e)}function wa(e){return e===!0||e===!1||ja(e)&&Xu.call(e)==Oe}function ka(e){return ja(e)&&Xu.call(e)==Le}function Pa(e){return!!e&&1===e.nodeType&&ja(e)&&!Ua(e)}function Ca(e){if(xa(e)&&(vc(e)||Ga(e)||Ma(e.splice)||ya(e)))return!e.length;for(var t in e)if(Wu.call(e,t))return!1;return!0}function Ta(e,t){return Vn(e,t)}function Ea(e,t,n){n="function"==typeof n?n:Q;var r=n?n(e,t):Q;return r===Q?Vn(e,t,n):!!r}function Sa(e){return ja(e)&&"string"==typeof e.message&&Xu.call(e)==Re}function Na(e){return"number"==typeof e&&ol(e)}function Ma(e){var t=Ra(e)?Xu.call(e):"";return t==je||t==De}function Oa(e){return"number"==typeof e&&e==ns(e)}function La(e){return"number"==typeof e&&e>-1&&e%1==0&&we>=e}function Ra(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ja(e){return!!e&&"object"==typeof e}function Da(e){return ja(e)&&ci(e)==Ie}function Ia(e,t){return e===t||Zn(e,t,ui(t))}function za(e,t,n){return n="function"==typeof n?n:Q,Zn(e,t,ui(t),n)}function Ha(e){return Xa(e)&&e!=+e}function Wa(e){return null==e?!1:Ma(e)?Vu.test(Hu.call(e)):ja(e)&&(q(e)?Vu:Ct).test(e)}function Fa(e){return null===e}function qa(e){return null==e}function Xa(e){return"number"==typeof e||ja(e)&&Xu.call(e)==ze}function Ua(e){if(!ja(e)||Xu.call(e)!=He||q(e))return!1;var t=zu;if("function"==typeof e.constructor&&(t=Qu(e)),null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&Hu.call(n)==qu}function Va(e){return Ra(e)&&Xu.call(e)==We}function Ba(e){return Oa(e)&&e>=-we&&we>=e}function Za(e){return ja(e)&&ci(e)==Fe}function Ga(e){return"string"==typeof e||!vc(e)&&ja(e)&&Xu.call(e)==qe}function Ja(e){return"symbol"==typeof e||ja(e)&&Xu.call(e)==Xe}function Ka(e){return ja(e)&&La(e.length)&&!!xn[Xu.call(e)]}function Ya(e){return e===Q}function Qa(e){return ja(e)&&ci(e)==Ue}function _a(e){return ja(e)&&Xu.call(e)==Ve}function $a(e,t){return t>e}function es(e,t){return t>=e}function ts(e){if(!e)return[];if(xa(e))return Ga(e)?J(e):jr(e);if($u&&e[$u])return U(e[$u]());var t=ci(e),n=t==Ie?V:t==Fe?Z:Rs;return n(e)}function ns(e){if(!e)return 0===e?e:0;if(e=is(e),e===Ae||e===-Ae){var t=0>e?-1:1;return t*ke}var n=e%1;return e===e?n?e-n:e:0}function rs(e){return e?cn(ns(e),0,Ce):0}function is(e){if(Ra(e)){var t=Ma(e.valueOf)?e.valueOf():e;e=Ra(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(vt,"");var n=Pt.test(e);return n||Tt.test(e)?Sn(e.slice(2),n?2:8):kt.test(e)?Pe:+e}function os(e){return Dr(e,As(e))}function as(e){return cn(ns(e),-we,we)}function ss(e){if("string"==typeof e)return e;if(null==e)return"";if(Ja(e))return Gu?kl.call(e):"";var t=e+"";return"0"==t&&1/e==-Ae?"-0":t}function us(e,t){var n=Cl(e);return t?un(n,t):n}function ls(e,t){return w(e,si(t,3),On,!0)}function cs(e,t){return w(e,si(t,3),Ln,!0)}function fs(e,t){return null==e?e:Sl(e,Ni(t),As)}function ds(e,t){return null==e?e:Nl(e,Ni(t),As)}function ps(e,t){return e&&On(e,Ni(t))}function hs(e,t){return e&&Ln(e,Ni(t))}function ms(e){return null==e?[]:Rn(e,xs(e))}function vs(e){return null==e?[]:Rn(e,As(e))}function gs(e,t,n){var r=null==e?Q:Dn(e,t);return r===Q?n:r}function ys(e,t){return di(e,t,Hn)}function bs(e,t){return di(e,t,Wn)}function xs(e){var t=Ai(e);if(!t&&!xa(e))return Jn(e);var n=vi(e),r=!!n,i=n||[],o=i.length;for(var a in e)!Hn(e,a)||r&&("length"==a||X(a,o))||t&&"constructor"==a||i.push(a);return i}function As(e){for(var t=-1,n=Ai(e),r=Kn(e),i=r.length,o=vi(e),a=!!o,s=o||[],u=s.length;++tt){var r=e;e=t,t=r}if(n||e%1||t%1){var i=fl();return ll(e+i*(t-e+En("1e-"+((i+"").length-1))),t)}return lr(e,t)}function Hs(e){return Ic(ss(e).toLowerCase())}function Ws(e){return e=ss(e),e&&e.replace(St,z).replace(dn,"")}function Fs(e,t,n){e=ss(e),t="string"==typeof t?t:t+"";var r=e.length;return n=n===Q?r:cn(ns(n),0,r),n-=t.length,n>=0&&e.indexOf(t,n)==n}function qs(e){return e=ss(e),e&&st.test(e)?e.replace(ot,H):e}function Xs(e){return e=ss(e),e&&mt.test(e)?e.replace(ht,"\\$&"):e}function Us(e,t,n){e=ss(e),t=ns(t);var r=G(e);if(!t||r>=t)return e;var i=(t-r)/2,o=il(i),a=rl(i);return Qr("",o,n)+e+Qr("",a,n)}function Vs(e,t,n){return e=ss(e),e+Qr(e,t,n)}function Bs(e,t,n){return e=ss(e),Qr(e,t,n)+e}function Zs(e,t,n){return n||null==t?t=0:t&&(t=+t),e=ss(e).replace(vt,""),cl(e,t||(wt.test(e)?16:10))}function Gs(e,t){e=ss(e),t=ns(t);var n="";if(!e||1>t||t>we)return n;do t%2&&(n+=e),t=il(t/2),e+=e;while(t);return n}function Js(){var e=arguments,t=ss(e[0]);return e.length<3?t:t.replace(e[1],e[2])}function Ks(e,t,n){return ss(e).split(t,n)}function Ys(e,t,n){return e=ss(e),n=cn(ns(n),0,e.length),e.lastIndexOf(t,n)==n}function Qs(e,n,r){var i=t.templateSettings;r&&gi(e,n,r)&&(n=Q),e=ss(e),n=xc({},n,i,rn);var o,a,s=xc({},n.imports,i.imports,rn),u=xs(s),l=O(s,u),c=0,f=n.interpolate||Nt,d="__p += '",p=ju((n.escape||Nt).source+"|"+f.source+"|"+(f===ct?xt:Nt).source+"|"+(n.evaluate||Nt).source+"|$","g"),h="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++bn+"]")+"\n";e.replace(p,function(t,n,r,i,s,u){return r||(r=i),d+=e.slice(c,u).replace(Mt,W),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+t.length,t}),d+="';\n";var m=n.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(tt,""):d).replace(nt,"$1").replace(rt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Fc(function(){return Function(u,h+"return "+d).apply(Q,l)});if(v.source=d,Sa(v))throw v;return v}function _s(e){return ss(e).toLowerCase()}function $s(e){return ss(e).toUpperCase()}function eu(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(vt,"");if(t+="",!t)return e;var r=J(e),i=J(t);return r.slice(L(r,i),R(r,i)+1).join("")}function tu(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(yt,"");if(t+="",!t)return e;var r=J(e);return r.slice(0,R(r,J(t))+1).join("")}function nu(e,t,n){if(e=ss(e),!e)return e;if(n||t===Q)return e.replace(gt,"");if(t+="",!t)return e;var r=J(e);return r.slice(L(r,J(t))).join("")}function ru(e,t){var n=fe,r=de;if(Ra(t)){var i="separator"in t?t.separator:i;n="length"in t?ns(t.length):n,r="omission"in t?ss(t.omission):r}e=ss(e);var o=e.length;if(hn.test(e)){var a=J(e);o=a.length}if(n>=o)return e;var s=n-G(r);if(1>s)return r;var u=a?a.slice(0,s).join(""):e.slice(0,s);if(i===Q)return u+r;if(a&&(s+=u.length-s),Va(i)){if(e.slice(s).search(i)){var l,c=u;for(i.global||(i=ju(i.source,ss(At.exec(i))+"g")),i.lastIndex=0;l=i.exec(c);)var f=l.index;u=u.slice(0,f===Q?s:f)}}else if(e.indexOf(i,s)!=s){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r}function iu(e){return e=ss(e),e&&at.test(e)?e.replace(it,K):e}function ou(e,t,n){return e=ss(e),t=n?Q:t,t===Q&&(t=gn.test(e)?vn:mn),e.match(t)||[]}function au(e){var t=e?e.length:0,n=si();return e=t?v(e,function(e){if("function"!=typeof e[1])throw new Du(be);return[n(e[0]),e[1]]}):[],aa(function(n){for(var r=-1;++re||e>we)return[];var n=Ce,r=ll(e,Ce);t=Ni(t),e-=Ce;for(var i=S(r,t);++n0){if(++e>=pe)return n}else e=0;return Ml(n,r)}}(),Il=aa(function(e,t){return vc(e)||(e=null==e?[]:[Object(e)]),t=Nn(t),l(e,t)}),zl=aa(function(e,t){return Aa(e)?kn(e,Nn(t,!1,!0)):[]}),Hl=aa(function(e,t){var n=Gi(t);return Aa(n)&&(n=Q),Aa(e)?kn(e,Nn(t,!1,!0),si(n)):[]}),Wl=aa(function(e,t){var n=Gi(t);return Aa(n)&&(n=Q),Aa(e)?kn(e,Nn(t,!1,!0),Q,n):[]}),Fl=aa(function(e){var t=v(e,Si);return t.length&&t[0]===e[0]?qn(t):[]}),ql=aa(function(e){var t=Gi(e),n=v(e,Si);return t===Gi(n)?t=Q:n.pop(),n.length&&n[0]===e[0]?qn(n,si(t)):[]}),Xl=aa(function(e){var t=Gi(e),n=v(e,Si);return t===Gi(n)?t=Q:n.pop(),n.length&&n[0]===e[0]?qn(n,Q,t):[]}),Ul=aa(Ki),Vl=aa(function(e,t){t=v(Nn(t),String);var n=ln(e,t);return ur(e,t.sort(D)),n}),Bl=aa(function(e){return br(Nn(e,!1,!0))}),Zl=aa(function(e){var t=Gi(e);return Aa(t)&&(t=Q),br(Nn(e,!1,!0),si(t))}),Gl=aa(function(e){var t=Gi(e);return Aa(t)&&(t=Q),br(Nn(e,!1,!0),Q,t)}),Jl=aa(function(e,t){return Aa(e)?kn(e,t):[]}),Kl=aa(function(e){return kr(p(e,Aa))}),Yl=aa(function(e){var t=Gi(e);return Aa(t)&&(t=Q),kr(p(e,Aa),si(t))}),Ql=aa(function(e){var t=Gi(e);return Aa(t)&&(t=Q),kr(p(e,Aa),Q,t)}),_l=aa(go),$l=aa(function(e){var t=e.length,n=t>1?e[t-1]:Q;return n="function"==typeof n?(e.pop(),n):Q,yo(e,n)}),ec=aa(function(e){e=Nn(e);var t=e.length,n=t?e[0]:0,o=this.__wrapped__,a=function(t){return ln(t,e)};return!(t>1||this.__actions__.length)&&o instanceof i&&X(n)?(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:ko,args:[a],thisArg:Q}),new r(o,this.__chain__).thru(function(e){return t&&!e.length&&e.push(Q),e})):this.thru(a)}),tc=Hr(function(e,t,n){Wu.call(e,n)?++e[n]:e[n]=1}),nc=Hr(function(e,t,n){Wu.call(e,n)?e[n].push(t):e[n]=[t]}),rc=aa(function(e,t,n){var r=-1,i="function"==typeof t,o=yi(t),a=xa(e)?Array(e.length):[];return Tl(e,function(e){var u=i?t:o&&null!=e?e[t]:Q;a[++r]=u?s(u,e,n):Un(e,t,n)}),a}),ic=Hr(function(e,t,n){e[n]=t}),oc=Hr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),ac=aa(function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t.length=1),tr(e,Nn(t),[])}),sc=Ou.now,uc=aa(function(e,n,r){var i=$;if(r.length){var o=t.placeholder||uc.placeholder,a=B(r,o);i|=ie}return ni(e,i,n,r,a)}),lc=aa(function(e,n,r){var i=$|ee;if(r.length){var o=t.placeholder||lc.placeholder,a=B(r,o);i|=ie}return ni(n,i,e,r,a)}),cc=aa(function(e,t){return wn(e,1,t)}),fc=aa(function(e,t,n){return wn(e,is(t)||0,n)}),dc=aa(function(e,t){t=v(Nn(t),si());var n=t.length;return aa(function(r){for(var i=-1,o=ll(r.length,n);++i0||0>t)?new i(n):(0>e?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==Q&&(t=ns(t),n=0>t?n.dropRight(-t):n.take(t-e)),n)},i.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},i.prototype.toArray=function(){return this.take(Ce)},On(i.prototype,function(e,n){var o=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),s=t[a?"take"+("last"==n?"Right":""):n],u=a||/^find/.test(n);s&&(t.prototype[n]=function(){var n=this.__wrapped__,l=a?[1]:arguments,c=n instanceof i,f=l[0],d=c||vc(n),p=function(e){var n=s.apply(t,g([e],l));return a&&h?n[0]:n};d&&o&&"function"==typeof f&&1!=f.length&&(c=d=!1);var h=this.__chain__,m=!!this.__actions__.length,v=u&&!h,y=c&&!m;if(!u&&d){n=y?n:new i(this);var b=e.apply(n,l);return b.__actions__.push({func:ko,args:[p],thisArg:Q}),new r(b,h)}return v&&y?e.apply(this,l):(b=this.thru(p),v?a?b.value()[0]:b.value():b)})}),c(["pop","push","shift","sort","splice","unshift"],function(e){var n=Iu[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);t.prototype[e]=function(){var e=arguments;return i&&!this.__chain__?n.apply(this.value(),e):this[r](function(t){return n.apply(t,e)})}}),On(i.prototype,function(e,n){var r=t[n];if(r){var i=r.name+"",o=Pl[i]||(Pl[i]=[]);o.push({name:n,func:r})}}),Pl[Jr(Q,ee).name]=[{name:"wrapper",func:Q}],i.prototype.clone=j,i.prototype.reverse=Et,i.prototype.value=Ot,t.prototype.at=ec,t.prototype.chain=Po,t.prototype.commit=Co,t.prototype.flatMap=To,t.prototype.next=Eo,t.prototype.plant=No,t.prototype.reverse=Mo,t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=Oo,$u&&(t.prototype[$u]=So),t}var Q,_="4.3.0",$=1,ee=2,te=4,ne=8,re=16,ie=32,oe=64,ae=128,se=256,ue=512,le=1,ce=2,fe=30,de="...",pe=150,he=16,me=200,ve=1,ge=2,ye=3,be="Expected a function",xe="__lodash_hash_undefined__",Ae=1/0,we=9007199254740991,ke=1.7976931348623157e308,Pe=NaN,Ce=4294967295,Te=Ce-1,Ee=Ce>>>1,Se="__lodash_placeholder__",Ne="[object Arguments]",Me="[object Array]",Oe="[object Boolean]",Le="[object Date]",Re="[object Error]",je="[object Function]",De="[object GeneratorFunction]",Ie="[object Map]",ze="[object Number]",He="[object Object]",We="[object RegExp]",Fe="[object Set]",qe="[object String]",Xe="[object Symbol]",Ue="[object WeakMap]",Ve="[object WeakSet]",Be="[object ArrayBuffer]",Ze="[object Float32Array]",Ge="[object Float64Array]",Je="[object Int8Array]",Ke="[object Int16Array]",Ye="[object Int32Array]",Qe="[object Uint8Array]",_e="[object Uint8ClampedArray]",$e="[object Uint16Array]",et="[object Uint32Array]",tt=/\b__p \+= '';/g,nt=/\b(__p \+=) '' \+/g,rt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,it=/&(?:amp|lt|gt|quot|#39|#96);/g,ot=/[&<>"'`]/g,at=RegExp(it.source),st=RegExp(ot.source),ut=/<%-([\s\S]+?)%>/g,lt=/<%([\s\S]+?)%>/g,ct=/<%=([\s\S]+?)%>/g,ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,dt=/^\w*$/,pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,ht=/[\\^$.*+?()[\]{}|]/g,mt=RegExp(ht.source),vt=/^\s+|\s+$/g,gt=/^\s+/,yt=/\s+$/,bt=/\\(\\)?/g,xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,At=/\w*$/,wt=/^0x/i,kt=/^[-+]0x[0-9a-f]+$/i,Pt=/^0b[01]+$/i,Ct=/^\[object .+?Constructor\]$/,Tt=/^0o[0-7]+$/i,Et=/^(?:0|[1-9]\d*)$/,St=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Nt=/($^)/,Mt=/['\n\r\u2028\u2029\\]/g,Ot="\\ud800-\\udfff",Lt="\\u0300-\\u036f\\ufe20-\\ufe23",Rt="\\u20d0-\\u20f0",jt="\\u2700-\\u27bf",Dt="a-z\\xdf-\\xf6\\xf8-\\xff",It="\\xac\\xb1\\xd7\\xf7",zt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ht="\\u2018\\u2019\\u201c\\u201d",Wt=" \\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",Ft="A-Z\\xc0-\\xd6\\xd8-\\xde",qt="\\ufe0e\\ufe0f",Xt=It+zt+Ht+Wt,Ut="["+Ot+"]",Vt="["+Xt+"]",Bt="["+Lt+Rt+"]",Zt="\\d+",Gt="["+jt+"]",Jt="["+Dt+"]",Kt="[^"+Ot+Xt+Zt+jt+Dt+Ft+"]",Yt="\\ud83c[\\udffb-\\udfff]",Qt="(?:"+Bt+"|"+Yt+")",_t="[^"+Ot+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",en="[\\ud800-\\udbff][\\udc00-\\udfff]",tn="["+Ft+"]",nn="\\u200d",rn="(?:"+Jt+"|"+Kt+")",on="(?:"+tn+"|"+Kt+")",an=Qt+"?",sn="["+qt+"]?",un="(?:"+nn+"(?:"+[_t,$t,en].join("|")+")"+sn+an+")*",ln=sn+an+un,cn="(?:"+[Gt,$t,en].join("|")+")"+ln,fn="(?:"+[_t+Bt+"?",Bt,$t,en,Ut].join("|")+")",dn=RegExp(Bt,"g"),pn=RegExp(Yt+"(?="+Yt+")|"+fn+ln,"g"),hn=RegExp("["+nn+Ot+Lt+Rt+qt+"]"),mn=/[a-zA-Z0-9]+/g,vn=RegExp([tn+"?"+Jt+"+(?="+[Vt,tn,"$"].join("|")+")",on+"+(?="+[Vt,tn+rn,"$"].join("|")+")",tn+"?"+rn+"+",tn+"+",Zt,cn].join("|"),"g"),gn=/[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,yn=["Array","Buffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Reflect","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],bn=-1,xn={}; +xn[Ze]=xn[Ge]=xn[Je]=xn[Ke]=xn[Ye]=xn[Qe]=xn[_e]=xn[$e]=xn[et]=!0,xn[Ne]=xn[Me]=xn[Be]=xn[Oe]=xn[Le]=xn[Re]=xn[je]=xn[Ie]=xn[ze]=xn[He]=xn[We]=xn[Fe]=xn[qe]=xn[Ue]=!1;var An={};An[Ne]=An[Me]=An[Be]=An[Oe]=An[Le]=An[Ze]=An[Ge]=An[Je]=An[Ke]=An[Ye]=An[Ie]=An[ze]=An[He]=An[We]=An[Fe]=An[qe]=An[Xe]=An[Qe]=An[_e]=An[$e]=An[et]=!0,An[Re]=An[je]=An[Ue]=!1;var wn={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},kn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Pn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Cn={"function":!0,object:!0},Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},En=parseFloat,Sn=parseInt,Nn=Cn[typeof t]&&t&&!t.nodeType?t:null,Mn=Cn[typeof e]&&e&&!e.nodeType?e:null,On=j(Nn&&Mn&&"object"==typeof i&&i),Ln=j(Cn[typeof self]&&self),Rn=j(Cn[typeof window]&&window),jn=Mn&&Mn.exports===Nn?Nn:null,Dn=j(Cn[typeof this]&&this),In=On||Rn!==(Dn&&Dn.window)&&Rn||Ln||Dn||Function("return this")(),zn=Y();(Rn||Ln||{})._=zn,r=function(){return zn}.call(t,n,t,e),!(r!==Q&&(e.exports=r))}).call(this)}).call(t,n(48)(e),function(){return this}())},function(e,t,n){"use strict";e.exports=n(111)},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return 0===e.button}function a(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function s(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function u(e,t){var n=t.query,r=t.hash,i=t.state;return n||r||i?{pathname:e,query:n,hash:r,state:i}:e}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t=0;r--){var i=e[r],o=i.path||"";if(n=o.replace(/\/*$/,"/")+n,0===o.indexOf("/"))break}return"/"+n}},propTypes:{path:d,from:d,to:d.isRequired,query:p,state:p,onEnter:c.falsy,children:c.falsy},render:function(){s["default"](!1)}});t["default"]=h,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){return a({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive})}function o(e,t){return e=a({},e,t)}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0&&0===window.sessionStorage.length)return;throw n}}function a(e){var t=void 0;try{t=window.sessionStorage.getItem(i(e))}catch(n){if(n.name===c)return null}if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=o,t.readState=a;var s=n(15),u=(r(s),"@@History/"),l=["QuotaExceededError","QUOTA_EXCEEDED_ERR"],c="SecurityError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){function t(e){return u.canUseDOM?void 0:s["default"](!1),n.listen(e)}var n=f["default"](o({getUserConfirmation:l.getUserConfirmation},e,{go:l.go}));return o({},n,{listen:t})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){function t(e){return b&&null==e.basename&&(0===e.pathname.indexOf(b)?(e.pathname=e.pathname.substring(b.length),e.basename=b,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!b)return e;"string"==typeof e&&(e=u.parsePath(e));var t=e.pathname,n="/"===b.slice(-1)?b:b+"/",r="/"===t.charAt(0)?t.slice(1):t,i=n+r;return a({},e,{pathname:i})}function r(e){return A.listenBefore(function(n,r){c["default"](e,t(n),r)})}function o(e){return A.listen(function(n){e(t(n))})}function l(e){A.push(n(e))}function f(e){A.replace(n(e))}function p(e){return A.createPath(n(e))}function h(e){return A.createHref(n(e))}function m(e){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;r>o;o++)i[o-1]=arguments[o];return t(A.createLocation.apply(A,[n(e)].concat(i)))}function v(e,t){"string"==typeof t&&(t=u.parsePath(t)),l(a({state:e},t))}function g(e,t){"string"==typeof t&&(t=u.parsePath(t)),f(a({state:e},t))}var y=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],b=y.basename,x=i(y,["basename"]),A=e(x);if(null==b&&s.canUseDOM){var w=document.getElementsByTagName("base")[0];w&&(b=u.extractPath(w.href))}return a({},A,{listenBefore:r,listen:o,push:l,replace:f,createPath:p,createHref:h,createLocation:m,pushState:d["default"](v,"pushState is deprecated; use push instead"),replaceState:d["default"](g,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=e.childNodes.length?null:e.childNodes.item(n);e.insertBefore(t,r)}var i=n(246),o=n(123),a=n(10),s=n(47),u=n(73),l=n(1),c={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:u,processUpdates:function(e,t){for(var n,a=null,c=null,f=0;f-1?void 0:a(!1),!l.plugins[n]){t.extractEvents?void 0:a(!1),l.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a(!1)}}}function i(e,t,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){l.registrationNameModules[e]?a(!1):void 0,l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(1),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){s?a(!1):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?a(!1):void 0,u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=l},function(e,t,n){"use strict";function r(e){return(""+e).replace(x,"//")}function i(e,t){this.func=e,this.context=t,this.count=0}function o(e,t,n){var r=e.func,i=e.context;r.call(i,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=i.getPooled(t,n);g(e,o,r),i.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var i=e.result,o=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?l(u,i,n,v.thatReturnsArgument):null!=u&&(m.isValidElement(u)&&(u=m.cloneAndReplaceKey(u,o+(u!==t?r(u.key||"")+"/":"")+n)),i.push(u))}function l(e,t,n,i,o){var a="";null!=n&&(a=r(n)+"/");var l=s.getPooled(t,a,i,o);g(e,u,l),s.release(l)}function c(e,t,n){if(null==e)return e;var r=[];return l(e,r,null,t,n),r}function f(e,t,n){return null}function d(e,t){return g(e,f,null)}function p(e){var t=[];return l(e,t,null,v.thatReturnsArgument),t}var h=n(21),m=n(9),v=n(13),g=n(75),y=h.twoArgumentPooler,b=h.fourArgumentPooler,x=/\/(?!\/)/g;i.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(i,y),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,b);var A={forEach:a,map:c,mapIntoWithKeyPrefixInternal:l,count:d,toArray:p};e.exports=A},function(e,t,n){"use strict";function r(e,t){var n=w.hasOwnProperty(t)?w[t]:null;P.hasOwnProperty(t)&&(n!==x.OVERRIDE_BASE?v(!1):void 0),e.hasOwnProperty(t)&&(n!==x.DEFINE_MANY&&n!==x.DEFINE_MANY_MERGED?v(!1):void 0)}function i(e,t){if(t){"function"==typeof t?v(!1):void 0,d.isValidElement(t)?v(!1):void 0;var n=e.prototype;t.hasOwnProperty(b)&&k.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var o=t[i];if(r(n,i),k.hasOwnProperty(i))k[i](e,o);else{var a=w.hasOwnProperty(i),l=n.hasOwnProperty(i),c="function"==typeof o,f=c&&!a&&!l&&t.autobind!==!1;if(f)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[i]=o,n[i]=o;else if(l){var p=w[i];!a||p!==x.DEFINE_MANY_MERGED&&p!==x.DEFINE_MANY?v(!1):void 0,p===x.DEFINE_MANY_MERGED?n[i]=s(n[i],o):p===x.DEFINE_MANY&&(n[i]=u(n[i],o))}else n[i]=o}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in k;i?v(!1):void 0;var o=n in e;o?v(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:v(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?v(!1):void 0,e[n]=t[n]);return e}function s(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return a(i,n),a(i,r),i}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e,t){var n=t.bind(e);return n}function c(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=l(e,n)}}var f=n(110),d=n(9),p=(n(42),n(41),n(125)),h=n(3),m=n(31),v=n(1),g=n(26),y=n(19),b=(n(2),y({mixins:null})),x=g({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),A=[],w={mixins:x.DEFINE_MANY,statics:x.DEFINE_MANY,propTypes:x.DEFINE_MANY,contextTypes:x.DEFINE_MANY,childContextTypes:x.DEFINE_MANY,getDefaultProps:x.DEFINE_MANY_MERGED,getInitialState:x.DEFINE_MANY_MERGED,getChildContext:x.DEFINE_MANY_MERGED,render:x.DEFINE_ONCE,componentWillMount:x.DEFINE_MANY,componentDidMount:x.DEFINE_MANY,componentWillReceiveProps:x.DEFINE_MANY,shouldComponentUpdate:x.DEFINE_ONCE,componentWillUpdate:x.DEFINE_MANY,componentDidUpdate:x.DEFINE_MANY,componentWillUnmount:x.DEFINE_MANY,updateComponent:x.OVERRIDE_BASE},k={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n"+s+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var i=a.getNode(this._rootNodeID);r.updateTextContent(i,n)}}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(11),o=n(44),a=n(3),s=n(13),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:i.flushBatchedUpdates.bind(i)},c=[l,u];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return c}});var f=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=d.isBatchingUpdates;d.isBatchingUpdates=!0,a?e(t,n,r,i,o):f.perform(e,null,t,n,r,i,o)}};e.exports=d},function(e,t,n){"use strict";function r(){if(!C){C=!0,g.EventEmitter.injectReactEventListener(v),g.EventPluginHub.injectEventPluginOrder(s),g.EventPluginHub.injectInstanceHandle(y),g.EventPluginHub.injectMount(b),g.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:k,EnterLeaveEventPlugin:u,ChangeEventPlugin:o,SelectEventPlugin:A,BeforeInputEventPlugin:i}),g.NativeComponent.injectGenericComponentClass(h),g.NativeComponent.injectTextComponentClass(m),g.Class.injectMixin(f),g.DOMProperty.injectDOMPropertyConfig(c),g.DOMProperty.injectDOMPropertyConfig(P),g.EmptyComponent.injectEmptyComponent("noscript"),g.Updates.injectReconcileTransaction(x),g.Updates.injectBatchingStrategy(p),g.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:w.createReactRootIndex),g.Component.injectEnvironment(d)}}var i=n(242),o=n(244),a=n(245),s=n(247),u=n(248),l=n(5),c=n(251),f=n(253),d=n(61),p=n(115),h=n(257),m=n(114),v=n(265),g=n(266),y=n(30),b=n(7),x=n(270),A=n(276),w=n(277),k=n(278),P=n(275),C=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(){if(f.current){var e=f.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function i(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;o("uniqueKey",e,t)}}function o(e,t,n){var i=r();if(!i){var o="string"==typeof n?n:n.displayName||n.name;o&&(i=" Check the top-level render call using <"+o+">.")}var a=h[e]||(h[e]={});if(a[i])return null;a[i]=!0;var s={parentOrOwner:i,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==f.current&&(s.childOwner=" It was passed a child from "+t._owner.getName()+"."),s}function a(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n/,o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(i," "+o.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t,n){"use strict";var r=n(26),i=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=i},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=f[t];return null==n&&(f[t]=n=l(t)),n}function i(e){return c?void 0:u(!1),new c(e.type,e.props)}function o(e){return new d(e)}function a(e){return e instanceof d}var s=n(3),u=n(1),l=null,c=null,f={},d=null,p={injectGenericComponentClass:function(e){c=e},injectTextComponentClass:function(e){d=e},injectComponentClasses:function(e){s(f,e)}},h={getComponentClassForElement:r,createInternalComponent:i,createInstanceForText:o,isTextComponent:a,injection:p};e.exports=h},function(e,t,n){"use strict";function r(e,t){}var i=(n(2),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")},enqueueSetProps:function(e,t){r(e,"setProps")},enqueueReplaceProps:function(e,t){r(e,"replaceProps")}});e.exports=i},function(e,t,n){"use strict";function r(e){function t(t,n,r,i,o,a){if(i=i||w,a=a||r,null==n[r]){var s=b[o];return t?new Error("Required "+s+" `"+a+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,o,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,i,o){var a=t[n],s=m(a);if(s!==e){var u=b[i],l=v(a);return new Error("Invalid "+u+" `"+o+"` of type "+("`"+l+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(t)}function o(){return r(x.thatReturns(null))}function a(e){function t(t,n,r,i,o){var a=t[n];if(!Array.isArray(a)){var s=b[i],u=m(a);return new Error("Invalid "+s+" `"+o+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l>"}var y=n(9),b=n(41),x=n(13),A=n(70),w="<>",k={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:u,node:d(),objectOf:c,oneOf:l,oneOfType:f,shape:p};e.exports=k},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?i(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var i=n(1);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(5),o=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function i(e,t){return function(n,i){if(i.type!==e)return n;var a=o.isError(i)?"throw":"next";r(t)&&(t.next=t["throw"]=t);var s=t[a];return r(s)?s(n,i):n}}t.__esModule=!0,t["default"]=i;var o=n(194);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.save=t.load=void 0;var i=n(299),o=n(36),a=r(o);t.load=(0,i.createAction)(a.LOAD),t.save=(0,i.createAction)(a.SAVE)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(134);t["default"]=function(e){return function(t){var n=function(e){return t.dispatch((0,r.load)(e))};return e.load().then(function(e){return n(e),e})}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tn;n++)t[n]=arguments[n];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],n=t.slice(0,-1);return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){function r(){h===p&&(h=p.slice())}function o(){return d}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),h.push(e),function(){if(t){t=!1,r();var n=h.indexOf(e);h.splice(n,1)}}}function l(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,d=f(d,e)}finally{m=!1}for(var t=p=h,n=0;nf;f++)l[f]=arguments[f];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.onChange=function(e){e!==r.props.text&&r.props.onChange(e)},r.render=function(){var e={readOnly:!1,lineNumbers:!1,mode:"gfm",matchBrackets:!0,lineWrapping:!0,viewportMargin:1/0,theme:"atlas",extraKeys:{Enter:"newlineAndIndentContinueMarkdownList"}};return u["default"].createElement("div",{className:d["default"].container},u["default"].createElement(c["default"],{value:r.props.text,onChange:r.onChange,options:e}))},a=n,o(r,a)}return a(t,e),t}(u["default"].Component);p.propTypes={text:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func},t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(145),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),u=r(s),l=n(213),c=r(l),f=n(207),d=r(f),p=n(320),h=r(p);n(313),n(314);var m=function(e){function t(){var e,n,r,a;i(this,t);for(var s=arguments.length,l=Array(s),f=0;s>f;f++)l[f]=arguments[f];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),r.onChange=function(e){e!==r.props.text&&r.props.onChange(e)},r.render=function(){return u["default"].createElement("div",{className:h["default"].container},u["default"].createElement("div",null),u["default"].createElement(c["default"],{options:{toolbar:{buttons:["bold","italic","underline","anchor","unorderedlist","orderedlist","h1","h2","h3","quote"]},placeholder:!1},text:(0,d["default"])(r.props.text),onChange:r.onChange,className:h["default"].editor}))},a=n,o(r,a)}return a(t,e),t}(u["default"].Component);m.propTypes={text:u["default"].PropTypes.string,onChange:u["default"].PropTypes.func},t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(147),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0?n:s["default"].xor([l.ActiveEditors.MARKDOWN,l.ActiveEditors.TEXT],[t.toggledEditor]);default:return e}},f=function(){var e=arguments.length<=0||void 0===arguments[0]?{visible:!1}:arguments[0],t=arguments[1];switch(t.type){case l.TOGGLE_HISTORY_SIDEBAR:return o({},e,{visible:!e.visible});default:return e}},d="# Welcome to Beautiful Atlas\n\nThis is just a small preview here's what you can do:\n\n- Write markdown or rich text, you choose\n- Dont' worry about saving\n- One document for now\n- More to come\n",p={text:d,revisions:[],unsavedChanges:!1},h=function(){var e=arguments.length<=0||void 0===arguments[0]?p:arguments[0],t=arguments[1],n=s["default"].last(e.revisions);switch(t.type){case l.UPDATE_TEXT:var r=!1;return n&&n.text!==e.text&&(r=!0),o({},e,{unsavedChanges:r,text:t.text});case l.ADD_REVISION:if(n&&n.text===e.text)return e;var a=n?n.id:0;return o({},e,{revisions:[].concat(i(e.revisions),[{id:a+1,text:e.text,created_at:t.createdAt}]),unsavedChanges:!1});default:return e}};t["default"]=(0,u.combineReducers)({activeEditors:c,historySidebar:f,text:h})},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.client=void 0;var o=n(89),a=r(o),s=n(37),u=r(s),l=n(78),c=r(l),f=function p(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];i(this,p),this.fetch=function(n,r,i){var o=void 0,a=void 0;"GET"===r?a=n+t.constructQueryString(i):("POST"===r||"PUT"===r)&&(o=JSON.stringify(i));var s=new Headers({Accept:"application/json","Content-Type":"application/json","User-Agent":t.userAgent});u["default"].getToken()&&s.set("Authorization","JWT "+u["default"].getToken());var l=e(t.baseUrl+(a||n),{method:r,body:o,headers:s,redirect:"follow"});return new Promise(function(e,t){l.then(function(e){if(e.status>=200&&e.status<300)return e;401===e.status&&u["default"].logout();var n=void 0;try{n=JSON.parse(e)}catch(r){n={error:e.statusText}}n.statusCode=e.status,n.response=e,t(n)}).then(function(e){return e.json()}).then(function(t){e(t)})["catch"](function(){t({error:"Unknown error"})})})},this.post=function(e,n){return t.fetch(e,"POST",n)},this.put=function(e,n){return t.fetch(e,"PUT",n)},this.get=function(e,n){return t.fetch(e,"GET",n)},this["delete"]=function(e,n){return t.fetch(e,"DELETE",n)},this.constructQueryString=function(e){return a["default"].map(e,function(e,t){return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&")},this.baseUrl=n.baseUrl||c["default"].API_BASE_URL,this.userAgent=n.userAgent||c["default"].API_USER_AGENT};t["default"]=f;var d=new f;t.client=d}).call(t,n(196))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){var t=(0,a["default"])(e,{gfm:!0,converters:[s,u]});return t}Object.defineProperty(t,"__esModule",{value:!0}),t.toMarkdown=i;var o=n(323),a=r(o),s={filter:"li",replacement:function(e,t){e=e.replace(/^\s+/,"").replace(/\n/gm,"\n ");var n="- ",r=t.parentNode,i=Array.prototype.indexOf.call(r.children,t)+1;return n=/ol/i.test(r.nodeName)?i+". ":"- ",n+e}},u={filter:["ul","ol"],replacement:function(e,t){for(var n=[],r=0;rl;l++)u[l]=arguments[l];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={loggedIn:b["default"].loggedIn()},r.componentWillMount=function(){b["default"].onChange=r.updateAuth},r.updateAuth=function(e){r.setState({loggedIn:e})},r.logout=function(){b["default"].logout()},a=n,o(r,a)}return a(t,e),s(t,[{key:"render",value:function(){return l["default"].createElement("div",{className:d["default"].container},l["default"].createElement(m["default"],{activeEditors:this.props.activeEditors,toggleEditors:this.props.toggleEditors,addRevision:this.props.addRevision,unsavedChanges:this.props.unsavedChanges}),l["default"].createElement("div",{className:d["default"].content},l["default"].createElement(g["default"],null)))}}]),t}(u.Component);x.propTypes={children:l["default"].PropTypes.element,activeEditors:l["default"].PropTypes.array.isRequired,toggleEditors:l["default"].PropTypes.func.isRequired,addRevision:l["default"].PropTypes.func.isRequired,unsavedChanges:l["default"].PropTypes.bool.isRequired};var A=function(e){return{activeEditors:e.activeEditors,unsavedChanges:e.text.unsavedChanges}},w=function(e){return{toggleEditors:function(t){e((0,p.toggleEditors)(t))},addRevision:function(){e((0,p.addRevision)())}}};x=(0,c.connect)(A,w)(x),t["default"]=x},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(152),o=r(i);t["default"]=o["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1?y["default"].panel:y["default"].fullscreen)+" "+y["default"].markdown},l["default"].createElement(d["default"],{onChange:this.props.editMarkdown,text:this.props.text})):null,e.includes("TEXT")?l["default"].createElement("div",{className:(e.length>1?y["default"].panel:y["default"].fullscreen)+" "+y["default"].text},l["default"].createElement(h["default"],{onChange:this.props.editText,text:this.props.text})):null)}}]),t}(u.Component);b.propTypes={editMarkdown:l["default"].PropTypes.func.isRequired,editText:l["default"].PropTypes.func.isRequired,text:l["default"].PropTypes.string,activeEditors:l["default"].PropTypes.arrayOf(l["default"].PropTypes.string),showHistorySidebar:l["default"].PropTypes.bool.isRequired};var x=function(e){return{text:e.text.text,editor:e.editor,activeEditors:e.activeEditors,showHistorySidebar:e.historySidebar.visible,revisions:e.text.revisions}},A=function(e){return{editMarkdown:function(t){e((0,v.updateText)(t,"markdown"))},editText:function(t){var n=(0,m.toMarkdown)(t);e((0,v.updateText)(n,"text"))}}};b=(0,c.connect)(x,A)(b),t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;nl;l++)u[l]=arguments[l];return n=r=o(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={email:"",password:"",error:null},r.handleEmailChange=function(e){r.setState({email:e.target.value})},r.handlePasswordChange=function(e){r.setState({password:e.target.value})},r.handleSubmit=function(e){e.preventDefault(),f["default"].login(r.state.email,r.state.password).then(function(){var e=r.props.location;e.state&&e.state.nextPathname?r.context.router.replace(e.state.nextPathname):r.context.router.replace("/dashboard")})["catch"](function(e){r.setState({error:e.error})})},a=n,o(r,a)}return a(t,e),s(t,[{key:"render",value:function(){return l["default"].createElement("div",null,l["default"].createElement("h2",null,"Login"),l["default"].createElement("form",{action:"",onSubmit:this.handleSubmit},this.state.error&&l["default"].createElement("p",null,this.state.error),l["default"].createElement("div",null,l["default"].createElement("input",{placeholder:"Email",onChange:this.handleEmailChange})),l["default"].createElement("div",null,l["default"].createElement("input",{placeholder:"Password",type:"password",onChange:this.handlePasswordChange})),l["default"].createElement("div",null,l["default"].createElement("input",{type:"submit"}))))}}]),t}(u.Component);d.propTypes={location:l["default"].PropTypes.object},d.contextTypes={router:l["default"].PropTypes.object.isRequired},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(155),o=r(i);t["default"]=o["default"]},function(e,t){e.exports=function(e){var t={},n=arguments[1];if("string"==typeof n){n={};for(var r=1;r[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return e.Pass;for(var o=i.listSelections(),a=[],s=0;s")>=0?p[2]:parseInt(p[3],10)+1+p[4];a[s]="\n"+h+g+m}}i.replaceSelections(a)}})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,r){function i(e){return e.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var a=1+e.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},s={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in r)s[l]=r[l];return s.name="markdown",e.overlayMode(e.getMode(n,s),a)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return xe=e,we=n,t}function a(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=s(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=l,l(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Oe),o("operator","operator",e.current()));if("`"==r)return n.tokenize=u,u(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Oe.test(r))return e.eatWhile(Oe),o("operator","operator",e.current());if(Te.test(r)){e.eatWhile(Te);var a=e.current(),c=Me.propertyIsEnumerable(a)&&Me[a];return c&&"."!=n.lastType?o(c.type,c.style,a):o("variable","variable",a)}}function s(e){return function(t,n){var r,i=!1;if(ke&&"@"==t.peek()&&t.match(Ne))return n.tokenize=a,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=a),o("string","string")}}function l(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return o("comment","comment")}function u(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=a;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Ae.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Te.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function f(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function d(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,r,i){var o=e.cc;for(Le.state=e,Le.stream=i,Le.marked=null,Le.cc=o,Le.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Ee?_:C;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Le.marked?Le.marked:"variable"==n&&d(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Le.cc.push(arguments[e])}function m(){return h.apply(null,arguments),!0}function g(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Le.state;if(Le.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function v(){Le.state.context={prev:Le.state.context,vars:Le.state.localVars},Le.state.localVars=De}function y(){Le.state.localVars=Le.state.context.vars,Le.state.context=Le.state.context.prev}function b(e,t){var n=function(){var n=Le.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new f(r,Le.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function x(){var e=Le.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(n){return n==e?m():";"==e?h():m(t)}return t}function C(e,t){return"var"==e?m(b("vardef",t.length),G,w(";"),x):"keyword a"==e?m(b("form"),_,C,x):"keyword b"==e?m(b("form"),C,x):"{"==e?m(b("}"),q,x):";"==e?m():"if"==e?("else"==Le.state.lexical.info&&Le.state.cc[Le.state.cc.length-1]==x&&Le.state.cc.pop()(),m(b("form"),_,C,x,J)):"function"==e?m(oe):"for"==e?m(b("form"),ee,C,x):"variable"==e?m(b("stat"),j):"switch"==e?m(b("form"),_,b("}","switch"),w("{"),q,x,x):"case"==e?m(_,w(":")):"default"==e?m(w(":")):"catch"==e?m(b("form"),v,w("("),ae,w(")"),C,x,y):"class"==e?m(b("form"),se,x):"export"==e?m(b("stat"),fe,x):"import"==e?m(b("stat"),de,x):"module"==e?m(b("form"),Y,b("}"),w("{"),q,x,x):h(b("stat"),_,w(";"),x)}function _(e){return E(e,!1)}function k(e){return E(e,!0)}function E(e,t){if(Le.state.fatArrowAt==Le.stream.start){var n=t?L:P;if("("==e)return m(v,b(")"),W(Y,")"),x,w("=>"),n,y);if("variable"==e)return h(v,Y,w("=>"),n,y)}var r=t?O:M;return Pe.hasOwnProperty(e)?m(r):"function"==e?m(oe,r):"keyword c"==e?m(t?T:S):"("==e?m(b(")"),S,ye,w(")"),x,r):"operator"==e||"spread"==e?m(t?k:_):"["==e?m(b("]"),ge,x,r):"{"==e?z(B,"}",null,r):"quasi"==e?h(N,r):"new"==e?m(D(t)):m()}function S(e){return e.match(/[;\}\)\],]/)?h():h(_)}function T(e){return e.match(/[;\}\)\],]/)?h():h(k)}function M(e,t){return","==e?m(_):O(e,t,!1)}function O(e,t,n){var r=0==n?M:O,i=0==n?_:k;return"=>"==e?m(v,n?L:P,y):"operator"==e?/\+\+|--/.test(t)?m(r):"?"==t?m(_,w(":"),i):m(i):"quasi"==e?h(N,r):";"!=e?"("==e?z(k,")","call",r):"."==e?m(F,r):"["==e?m(b("]"),S,w("]"),x,r):void 0:void 0}function N(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(N):m(_,A)}function A(e){return"}"==e?(Le.marked="string-2",Le.state.tokenize=u,m(N)):void 0}function P(e){return c(Le.stream,Le.state),h("{"==e?C:_)}function L(e){return c(Le.stream,Le.state),h("{"==e?C:k)}function D(e){return function(t){return"."==t?m(e?I:R):h(e?k:_)}}function R(e,t){return"target"==t?(Le.marked="keyword",m(M)):void 0}function I(e,t){return"target"==t?(Le.marked="keyword",m(O)):void 0}function j(e){return":"==e?m(x,C):h(M,w(";"),x)}function F(e){return"variable"==e?(Le.marked="property",m()):void 0}function B(e,t){return"variable"==e||"keyword"==Le.style?(Le.marked="property",m("get"==t||"set"==t?H:U)):"number"==e||"string"==e?(Le.marked=ke?"property":Le.style+" property",m(U)):"jsonld-keyword"==e?m(U):"modifier"==e?m(B):"["==e?m(_,w("]"),U):"spread"==e?m(_):void 0}function H(e){return"variable"!=e?h(U):(Le.marked="property",m(oe))}function U(e){return":"==e?m(k):"("==e?h(oe):void 0}function W(e,t){function n(r){if(","==r){var i=Le.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),m(e,n)}return r==t?m():m(w(t))}return function(r){return r==t?m():h(e,n)}}function z(e,t,n){for(var r=3;r!?|~^]/,Ne=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ae="([{}])",Pe={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Le={state:null,column:null,marked:null,cc:null},De={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new f((e||0)-Ce,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=l&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==xe?n:(t.lastType="operator"!=xe||"++"!=we&&"--"!=we?xe:"incdec",p(t,n,xe,we,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=a)return 0;var i=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var s=t.cc.length-1;s>=0;--s){var u=t.cc[s];if(u==x)o=o.prev;else if(u!=J)break}"stat"==o.type&&"}"==i&&(o=o.prev),_e&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var c=o.type,f=i==c;return"vardef"==c?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==c&&"{"==i?o.indented:"form"==c?o.indented+Ce:"stat"==c?o.indented+(be(t,n)?_e||Ce:0):"switch"!=o.info||f||0==r.doubleIndentSwitch?o.align?o.column+(f?0:1):o.indented+(f?0:Ce):o.indented+(/^(?:case|default)\b/.test(n)?Ce:2*Ce)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ee?null:"/*",blockCommentEnd:Ee?null:"*/",lineComment:Ee?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ee?"json":"javascript",jsonldMode:ke,jsonMode:Ee,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==_||t==k)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(e){e(n(18),n(166),n(165))}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function s(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,C||e.f!=u||(e.f=h,e.block=l),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function l(e,t){var o=e.sol(),s=t.list!==!1,l=t.indentedCode;t.indentedCode=!1,s&&(t.indentationDiff>=0?(t.indentationDiff<4&&(t.indentation-=t.indentationDiff),t.list=null):t.indentation>0?(t.list=null,t.listDepth=Math.floor(t.indentation/4)):(t.list=!1,t.listDepth=0));var u=null;if(t.indentationDiff>=4)return e.skipToEnd(),l||a(t.prevLine)?(t.indentation-=4,t.indentedCode=!0,E.code):null;if(e.eatSpace())return null;if((u=e.match(A))&&u[1].length<=6)return t.header=u[1].length,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(!(a(t.prevLine)||t.quote||s||l)&&(u=e.match(P)))return t.header="="==u[0].charAt(0)?1:2,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(e.eat(">"))return t.quote=o?1:t.quote+1,n.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),d(t);if("["===e.peek())return i(e,t,y);if(e.match(T,!0))return t.hr=!0,E.hr;if((a(t.prevLine)||s)&&(e.match(M,!1)||e.match(O,!1))){var f=null;return e.match(M,!0)?f="ul":(e.match(O,!0),f="ol"),t.indentation=e.column()+e.current().length,t.list=!0,t.listDepth++,n.taskLists&&e.match(N,!1)&&(t.taskList=!0),t.f=t.inline,n.highlightFormatting&&(t.formatting=["list","list-"+f]),d(t)}return n.fencedCodeBlocks&&(u=e.match(D,!0))?(t.fencedChars=u[1],t.localMode=r(u[2]),t.localMode&&(t.localState=t.localMode.startState()),t.f=t.block=c,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0,d(t)):i(e,t,t.inline)}function u(e,t){var n=_.token(e,t.htmlState);return(C&&null===t.htmlState.tagStart&&!t.htmlState.context&&t.htmlState.tokenize.isInText||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=h,t.block=l,t.htmlState=null),n}function c(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=f,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),E.code)}function f(e,t){e.match(t.fencedChars),t.block=l,t.f=h,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0;var r=d(t);return t.code=!1,r}function d(e){var t=[];if(e.formatting){t.push(E.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r=e.quote?t.push(E.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(E.linkHref,"url"):(e.strong&&t.push(E.strong),e.em&&t.push(E.em),e.strikethrough&&t.push(E.strikethrough),e.linkText&&t.push(E.linkText),e.code&&t.push(E.code)),e.header&&t.push(E.header,E.header+"-"+e.header),e.quote&&(t.push(E.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(E.quote+"-"+e.quote):t.push(E.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listDepth-1)%3;i?1===i?t.push(E.list2):t.push(E.list3):t.push(E.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function p(e,t){return e.match(L,!0)?d(t):void 0}function h(t,r){var i=r.text(t,r);if("undefined"!=typeof i)return i;if(r.list)return r.list=null,d(r);if(r.taskList){var a="x"!==t.match(N,!0)[1];return a?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,d(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),d(r);var s=t.sol(),l=t.next();if("\\"===l&&(t.next(),n.highlightFormatting)){var c=d(r),f=E.formatting+"-escape";return c?c+" "+f:f}if(r.linkTitle){r.linkTitle=!1;var p=l;"("===l&&(p=")"),p=(p+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var h="^\\s*(?:[^"+p+"\\\\]+|\\\\\\\\|\\\\.)"+p;if(t.match(new RegExp(h),!0))return E.linkHref}if("`"===l){var v=r.formatting;n.highlightFormatting&&(r.formatting="code");var y=d(r),b=t.pos;t.eatWhile("`");var x=1+t.pos-b;return r.code?x===k?(r.code=!1,y):(r.formatting=v,d(r)):(k=x,r.code=!0,d(r))}if(r.code)return d(r);if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),r.inline=r.f=g,E.image;if("["===l&&t.match(/.*\](\(.*\)| ?\[.*\])/,!1))return r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),d(r);if("]"===l&&r.linkText&&t.match(/\(.*\)| ?\[.*\]/,!1)){n.highlightFormatting&&(r.formatting="link");var c=d(r);return r.linkText=!1,r.inline=r.f=g,c}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var c=d(r);return c?c+=" ":c="",c+E.linkInline}if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var c=d(r);return c?c+=" ":c="",c+E.linkEmail}if("<"===l&&t.match(/^(!--|\w)/,!1)){var w=t.string.indexOf(">",t.pos);if(-1!=w){var C=t.string.substring(t.start,w);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(C)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(_),o(t,r,u)}if("<"===l&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";var S=!1;if(!n.underscoresBreakWords&&"_"===l&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var T=t.pos-2;if(T>=0){var M=t.string.charAt(T);"_"!==M&&M.match(/(\w)/,!1)&&(S=!0)}}if("*"===l||"_"===l&&!S)if(s&&" "===t.peek());else{if(r.strong===l&&t.eat(l)){n.highlightFormatting&&(r.formatting="strong");var y=d(r);return r.strong=!1,y}if(!r.strong&&t.eat(l))return r.strong=l,n.highlightFormatting&&(r.formatting="strong"),d(r);if(r.em===l){n.highlightFormatting&&(r.formatting="em");var y=d(r);return r.em=!1,y}if(!r.em)return r.em=l,n.highlightFormatting&&(r.formatting="em"),d(r)}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return d(r);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var y=d(r);return r.strikethrough=!1,y}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),d(r)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return d(r);t.backUp(2)}return" "===l&&(t.match(/ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),d(r)}function m(e,t){var r=e.next();if(">"===r){t.f=t.inline=h,n.highlightFormatting&&(t.formatting="link");var i=d(t);return i?i+=" ":i="",i+E.linkInline}return e.match(/^[^>]+/,!0),E.linkInline}function g(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=v("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,d(t)):"error"}function v(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link-string");var o=d(r);return r.linkHref=!1,o}return t.match(w(e),!0)&&t.backUp(1),r.linkHref=!0,d(r)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=b,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,d(t)):i(e,t,h)}function b(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=x,n.highlightFormatting&&(t.formatting="link");var r=d(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),E.linkText}function x(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=h,E.linkHref+" url")}function w(e){return R[e]||(e=(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),R[e]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+e+")")),R[e]}var C=e.modes.hasOwnProperty("xml"),_=e.getMode(t,C?{name:"xml",htmlMode:!0}:"text/plain");void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var k=0,E={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var S in E)E.hasOwnProperty(S)&&n.tokenTypeOverrides[S]&&(E[S]=n.tokenTypeOverrides[S]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,M=/^[*\-+]\s+/,O=/^[0-9]+([.)])\s+/,N=/^\[(x| )\](?=\s)/,A=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,P=/^ *(?:\={1,}|-{1,})\s*$/,L=/^[^#!\[\]*_\\<>` "'(~]+/,D=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#]*)"),R=[],I={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:h,text:p,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(_,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listDepth:t.listDepth,quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(s(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length,i=4*Math.floor((r-t.indentation)/4);i>4&&(i=4);var o=t.indentation+i;if(t.indentationDiff=o-t.indentation,t.indentation=o,r>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==u?{state:e.htmlState,mode:_}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:I}},blankLine:s,getType:d,fold:"markdown"};return I},"xml"),e.defineMIME("text/x-markdown","markdown")})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET", -mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps"},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["py","pyw"]},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"MariaDB",mime:"text/x-mariadb",mode:"sql"},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(u(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,S=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return S="equals",null;if("<"==n){t.tokenize=o,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function u(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=u(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=u(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(_.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function d(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!_.contextGrabbers.hasOwnProperty(n)||!_.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),h):"closeTag"==e?m:p}function h(e,t,n){return"word"==e?(n.tagName=t.current(),T="tag",y):(T="error",h)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&_.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r?(T="tag",g):(T="tag error",v)}return T="error",v}function g(e,t,n){return"endTag"!=e?(T="error",g):(f(n),p)}function v(e,t,n){return T="error",g(e,t,n)}function y(e,t,n){if("word"==e)return T="attribute",b;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||_.autoSelfClosers.hasOwnProperty(r)?d(n,r):(d(n,r),n.context=new c(n,r,i==n.indented)),p}return T="error",y}function b(e,t,n){return"equals"==e?x:(_.allowMissing||(T="error"),y(e,t,n))}function x(e,t,n){return"string"==e?w:"word"==e&&_.allowUnquoted?(T="string",y):(T="error",y(e,t,n))}function w(e,t,n){return"string"==e?w:y(e,t,n)}var C=r.indentUnit,_={},k=i.htmlMode?t:n;for(var E in k)_[E]=k[E];for(var E in i)_[E]=i[E];var S,T;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var n=t.tokenize(e,t);return(n||S)&&"comment"!=n&&(T=null,t.state=t.state(S||n,e,t),T&&(n="error"==T?n+" error":T)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return _.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+C*(_.multilineTagIndentFactor||1);if(_.alignCDATA&&/$/,blockCommentStart:"",configuration:_.htmlMode?"html":"xml",helperType:_.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){"use strict";function r(e){return!(!e||!u[e.nodeName])}function i(e){return!(!e||!l[e.nodeName])}function o(e,t){if(e.firstChild&&"PRE"!==e.nodeName){"function"!=typeof t&&(t=r);for(var n=null,o=!1,l=null,u=s(l,e);u!==e;){if(3===u.nodeType){var c=u.data.replace(/[ \r\n\t]+/g," ");if(n&&!/ $/.test(n.data)||o||" "!==c[0]||(c=c.substr(1)),!c){u=a(u);continue}u.data=c,n=u}else{if(1!==u.nodeType){u=a(u);continue}t(u)||"BR"===u.nodeName?(n&&(n.data=n.data.replace(/ $/,"")),n=null,o=!1):i(u)&&(n=null,o=!0)}var f=s(l,u);l=u,u=f}n&&(n.data=n.data.replace(/ $/,""),n.data||a(n))}}function a(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function s(e,t){return e&&e.parentNode===t||"PRE"===t.nodeName?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var l=n(323);Object.keys(l).forEach(function(e){l[e.toUpperCase()]=1});var u={};n(157).forEach(function(e){u[e.toUpperCase()]=1}),e.exports=o},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,"@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden;z-index:2000}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;left:0;position:absolute;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:'';display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;position:absolute;top:0;visibility:hidden;z-index:2000}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:none}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards .16s forwards linear;animation:medium-editor-pop-upwards .16s forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-actions:after{clear:both;content:\"\";display:table}[data-medium-editor-element] img{max-width:100%}[data-medium-editor-element] sub{vertical-align:sub}[data-medium-editor-element] sup{vertical-align:super}.medium-editor-hidden{display:none}",""])},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".medium-toolbar-arrow-under:after{border-color:#242424 transparent transparent;top:50px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #242424;top:-8px}.medium-editor-toolbar{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.75));background:linear-gradient(180deg,#242424,rgba(36,36,36,.75));border:1px solid #000;border-radius:5px;box-shadow:0 0 3px #000}.medium-editor-toolbar li button{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.89));background:linear-gradient(180deg,#242424,rgba(36,36,36,.89));border:0;border-right:1px solid #000;border-left:1px solid #333;border-left:1px solid hsla(0,0%,100%,.1);box-shadow:0 2px 2px rgba(0,0,0,.3);color:#fff;height:50px;min-width:50px;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#000;color:#ff0}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:5px;border-top-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:5px;border-top-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;background:-webkit-linear-gradient(top,#242424,rgba(0,0,0,.89));background:linear-gradient(180deg,#242424,rgba(0,0,0,.89));color:#fff}.medium-editor-toolbar-form{background:#242424;border-radius:5px;color:#999}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#242424;box-sizing:border-box;color:#ccc;height:50px}.medium-editor-toolbar-form a{color:#fff}.medium-editor-toolbar-anchor-preview{background:#242424;border-radius:5px;color:#fff}.medium-editor-placeholder:after{color:#b3b3b1}",""])},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,"/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}",""])},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,"@import url(https://fonts.googleapis.com/css?family=Cousine:400,700,700italic,400italic);",""]),t.push([e.id,".cm-s-atlas.CodeMirror{background:#fff;color:#202020;font-family:Cousine,Monaco,monospace;font-weight:300;height:auto}.cm-s-atlas .CodeMirror-line::selection,.cm-s-atlas .CodeMirror-line>span::selection,.cm-s-atlas .CodeMirror-line>span>span::selection,.cm-s-atlas div.CodeMirror-selected{background:#90caf9}.cm-s-atlas .CodeMirror-line::-moz-selection,.cm-s-atlas .CodeMirror-line>span::-moz-selection,.cm-s-atlas .CodeMirror-line>span>span::-moz-selection{background:#e0e0e0}.cm-s-atlas .CodeMirror-gutters{background:#f5f5f5;border-right:0}.cm-s-atlas .CodeMirror-guttermarker{color:#ac4142}.cm-s-atlas .CodeMirror-guttermarker-subtle,.cm-s-atlas .CodeMirror-linenumber{color:#b0b0b0}.cm-s-atlas .CodeMirror-cursor{border-left:2px solid #2196f3}.cm-s-atlas span.cm-quote{font-style:italic}.cm-s-atlas span.cm-comment{color:#8f5536}.cm-s-atlas span.cm-atom,.cm-s-atlas span.cm-number{color:#aa759f}.cm-s-atlas span.cm-attribute,.cm-s-atlas span.cm-property{color:#90a959}.cm-s-atlas span.cm-keyword{color:#ac4142}.cm-s-atlas span.cm-string{color:#f4bf75}.cm-s-atlas span.cm-variable{color:#90a959}.cm-s-atlas span.cm-variable-2{color:#788696}.cm-s-atlas span.cm-def{color:#d28445}.cm-s-atlas span.cm-bracket{color:#202020}.cm-s-atlas span.cm-tag{color:#ac4142}.cm-s-atlas span.cm-link{color:#aa759f}.cm-s-atlas span.cm-error{background:#ac4142;color:#505050}.cm-s-atlas .CodeMirror-activeline-background{background:#dddcdc}.cm-s-atlas .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}",""])},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".Header__header___1hCuT{display:flex;width:100%;height:42px;position:fixed;z-index:9999;justify-content:space-between;background-color:#111;color:#fff}.Header__header___1hCuT i{color:#fff;font-family:serif}.Header__header___1hCuT .Header__headerItem___QODyV{width:150px;padding:12px 22px;font-size:13px;font-weight:300;text-align:center}.Header__header___1hCuT .Header__headerItem___QODyV:first-child{text-align:left}.Header__header___1hCuT .Header__headerItem___QODyV:last-child{text-align:right}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div{margin-right:12px;cursor:pointer;opacity:.4;color:#fff}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div.Header__active___2vcAt{opacity:1}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div:first-child{margin-top:2px;margin-right:15px}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div:last-child{margin-top:-2px}.Header__header___1hCuT .Header__textIcon___T7vs0{font-family:Times,serif;font-size:20px}",""]),t.locals={header:"Header__header___1hCuT",headerItem:"Header__headerItem___QODyV",editorToggle:"Header__editorToggle___2Bcm9",active:"Header__active___2vcAt",textIcon:"Header__textIcon___T7vs0"}},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".MarkdownEditor__container___m9ImS{font-weight:400;font-size:1em;line-height:1.5em;margin:0 auto;padding:2em 3em;max-width:50em}@media all and (max-width:2000px) and (min-width:960px){.MarkdownEditor__container___m9ImS{font-size:1.1em}}",""]),t.locals={container:"MarkdownEditor__container___m9ImS"}},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".TextEditor__container___1wyeS{font-weight:400;font-size:1em;line-height:1.5em;margin:0 auto;padding:2em 3em;max-width:50em}.TextEditor__editor___23Qnn{outline:none}@media all and (max-width:2000px) and (min-width:960px){.TextEditor__container___1wyeS{font-size:1.1em}}",""]),t.locals={container:"TextEditor__container___1wyeS",editor:"TextEditor__editor___23Qnn"}},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".App__container___355Yh{display:flex;flex-flow:column;width:100%;height:100%;background-color:#fff;font-family:-apple-system,Helvetica Neue,Lucida Grande;color:#222}",""]),t.locals={container:"App__container___355Yh"}},function(e,t,n){t=e.exports=n(14)(),t.push([e.id,".Dashboard__container___2SQeY{display:flex;padding-top:48px}.Dashboard__panel___3wTFN{width:50%}.Dashboard__fullscreen___2vN3A{width:100%}.Dashboard__markdown___fMe4o{background-color:#fff}",""]),t.locals={container:"Dashboard__container___2SQeY",panel:"Dashboard__panel___3wTFN",fullscreen:"Dashboard__fullscreen___2vN3A",markdown:"Dashboard__markdown___fMe4o"}},function(e,t,n){function r(e){return null===e||void 0===e}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function o(e,t,n){var o,c;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(l(e))return l(t)?(e=a.call(e),t=a.call(t),u(e,t,n)):!1;if(i(e)){if(!i(t))return!1;if(e.length!==t.length)return!1;for(o=0;o=0;o--)if(f[o]!=d[o])return!1;for(o=f.length-1;o>=0;o--)if(c=f[o],!u(e[c],t[c],n))return!1;return typeof e==typeof t}var a=Array.prototype.slice,s=n(179),l=n(178),u=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=i?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return i(e.replace(o,"ms-"))}var i=n(180),o=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return r(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=n(191);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function i(e,t){var n=u;u?void 0:l(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var c=o[0];c--;)n=n.lastChild}else n.innerHTML=e;var f=n.getElementsByTagName("script");f.length&&(t?void 0:l(!1),a(f).forEach(t));for(var d=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var o=n(5),a=n(182),s=n(85),l=n(1),u=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=i},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return i(e).replace(o,"-ms-")}var i=n(185),o=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(187);e.exports=r},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var i={};for(var o in e)r.call(e,o)&&(i[o]=t.call(n,e[o],o,e));return i}var r=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?i(!1):void 0,"number"!=typeof t?i(!1):void 0,0===t||t-1 in e?void 0:i(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;t>o;o++)r[o]=e[o];return r}var i=n(1);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return u.indexOf(e)>-1}function o(e){return l["default"](e)&&"undefined"!=typeof e.type&&Object.keys(e).every(i)}function a(e){return e.error===!0}t.__esModule=!0,t.isFSA=o,t.isError=a;var s=n(200),l=r(s),u=["type","payload","error","meta"]},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var i=Object.getOwnPropertyNames(t),o=0;o-1?t:e}function c(e,t){t=t||{};var n=t.body;if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new r(t.headers)),this.method=u(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function d(e){var t=new r,n=e.getAllResponseHeaders().trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},l.call(c.prototype),l.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var g=[301,302,303,307,308];p.redirect=function(e,t){if(-1===g.indexOf(t))throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=c,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void r(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:d(a),url:i()},o="response"in a?a.response:a.responseText;n(new p(o,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),e.exports=t.fetch}).call(t)}).call(t,function(){return this}())},function(e,t){e.exports={name:"BeautifulAtlas",version:"0.0.1",description:"For writing",main:"index.js",scripts:{clean:"rimraf dist","build:webpack":"cross-env NODE_ENV=production webpack --config webpack.config.prod.js --progress --colors",build:"npm run clean && npm run build:webpack",start:"node server.js",lint:"eslint src"},repository:{type:"git",url:"git+ssh://git@github.com/jorilallo/atlas.git"},author:"Jori Lallo",license:"ISC",bugs:{url:"https://github.com/jorilallo/atlas/issues"},homepage:"https://github.com/jorilallo/atlas#readme",dependencies:{express:"^4.13.4",react:"^0.14.7","react-dom":"^0.14.7","body-parser":"^1.15.0"},devDependencies:{"babel-core":"^6.4.5","babel-eslint":"^4.1.8","babel-loader":"^6.2.1","babel-preset-es2015":"^6.3.13","babel-preset-react":"^6.3.13","babel-preset-react-hmre":"^1.0.1","babel-preset-stage-0":"^6.5.0",classnames:"^2.2.3",codemirror:"^5.11.0","cross-env":"^1.0.7","css-loader":"^0.23.1",dotenv:"^2.0.0",eslint:"^1.10.3","eslint-config-airbnb":"^5.0.0","eslint-plugin-react":"^3.16.1","exports-loader":"^0.6.3",fetch:"^1.0.1",history:"^1.17.0","imports-loader":"^0.6.5","json-loader":"^0.5.4",lodash:"^4.3.0",marked:"^0.3.5","node-sass":"^3.4.2","normalize.css":"^3.0.3",react:"^0.14.7","react-codemirror":"^0.2.5","react-medium-editor":"^1.6.2","react-redux":"^4.4.0","react-router":"^2.0.0",redux:"^3.3.1","redux-storage":"^4.0.0","redux-storage-engine-localstorage":"^1.0.0","sass-loader":"^3.1.2","style-loader":"^0.13.0","to-markdown":"^2.0.1",webpack:"^1.12.12","webpack-dev-middleware":"^1.5.1","webpack-hot-middleware":"^2.6.4","whatwg-fetch":"^0.11.0"}}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t,n){(function(e,n){function r(e){return e&&e.Object===Object?e:null}function i(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function o(){}function a(e,t){return l(e,t)&&delete e[t]}function s(e,t){if(ne){var n=e[t];return n===R?void 0:n}return Q.call(e,t)?e[t]:void 0}function l(e,t){return ne?void 0!==e[t]:Q.call(e,t)}function u(e,t,n){e[t]=ne&&void 0===n?R:n}function c(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():ee.call(e,n,1),!0}function _(e,t){var n=E(e,t);return 0>n?void 0:e[n][1]}function k(e,t){return E(e,t)>-1}function E(e,t){for(var n=e.length;n--;)if(O(e[n][0],t))return n;return-1}function S(e,t,n){var r=E(e,t);0>r?e.push([t,n]):e[r][1]=n}function T(e,t){var n=null==e?void 0:e[t];return L(n)?n:void 0}function M(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}function O(e,t){return e===t||e!==e&&t!==t}function N(e){var t=A(e)?Z.call(e):"";return t==I||t==j}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function P(e){return!!e&&"object"==typeof e}function L(e){return null==e?!1:N(e)?J.test(X.call(e)):P(e)&&(i(e)?J:B).test(e)}var D=200,R="__lodash_hash_undefined__",I="[object Function]",j="[object GeneratorFunction]",F=/[\\^$.*+?()[\]{}|]/g,B=/^\[object .+?Constructor\]$/,H={"function":!0,object:!0},U=H[typeof t]&&t&&!t.nodeType?t:void 0,W=H[typeof e]&&e&&!e.nodeType?e:void 0,z=r(U&&W&&"object"==typeof n&&n),q=r(H[typeof self]&&self),V=r(H[typeof window]&&window),K=r(H[typeof this]&&this),$=z||V!==(K&&K.window)&&V||q||K||Function("return this")(),G=Array.prototype,Y=Object.prototype,X=Function.prototype.toString,Q=Y.hasOwnProperty,Z=Y.toString,J=RegExp("^"+X.call(Q).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=G.splice,te=T($,"Map"),ne=T(Object,"create");o.prototype=ne?ne(null):Y,c.prototype.clear=f,c.prototype["delete"]=d,c.prototype.get=p,c.prototype.has=h,c.prototype.set=m,g.prototype.clear=v,g.prototype["delete"]=y,g.prototype.get=b,g.prototype.has=x,g.prototype.set=w,e.exports=g}).call(t,n(48)(e),function(){return this}())},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&v>=e}function o(e){return a(e)&&h.call(e)==u}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null==e?!1:o(e)?m.test(d.call(e)):n(e)&&c.test(e)}var l="[object Array]",u="[object Function]",c=/^\[object .+?Constructor\]$/,f=Object.prototype,d=Function.prototype.toString,p=f.hasOwnProperty,h=f.toString,m=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=r(Array,"isArray"),v=9007199254740991,y=g||function(e){return n(e)&&i(e.length)&&h.call(e)==l};e.exports=y},function(e,t){function n(e){var t=r(e)?s.call(e):"";return t==i||t==o}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var i="[object Function]",o="[object GeneratorFunction]",a=Object.prototype,s=a.toString;e.exports=n},function(e,t,n){function r(e){return!!e&&"object"==typeof e}function i(e,t){return a(e,t,l)}function o(e){var t;if(!r(e)||d.call(e)!=u||s(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return i(e,function(e,t){n=t}),void 0===n||f.call(e,n)}var a=n(196),s=n(87),l=n(201),u="[object Object]",c=Object.prototype,f=c.hasOwnProperty,d=c.toString;e.exports=o},function(e,t,n){function r(e,t){return e="number"==typeof e||u.test(e)?+e:-1,t=null==t?d:t,e>-1&&e%1==0&&t>e}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&d>=e}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){if(null==e)return[];o(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(l(e)||s(e))&&t||0;for(var n=e.constructor,a=-1,u="function"==typeof n&&n.prototype===e,c=Array(t),d=t>0;++ae?-1:1;return t*c}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(h,"");var n=g.test(e);return n||v.test(e)?y(e.slice(2),n?2:8):m.test(e)?f:+e}var l="Expected a function",u=1/0,c=1.7976931348623157e308,f=NaN,d="[object Function]",p="[object GeneratorFunction]",h=/^\s+|\s+$/g,m=/^[-+]0x[0-9a-f]+$/i,g=/^0b[01]+$/i,v=/^0o[0-7]+$/i,y=parseInt,b=Object.prototype,x=b.toString,w=Math.max;e.exports=r},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function n(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=d.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=d.breaks:this.rules=d.gfm:this.options.pedantic&&(this.rules=d.pedantic)}function r(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function u(e){for(var t,n,r=1;rAn error occured:

"+o(d.message+"",!0)+"
";throw d}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};f.bullet=/(?:[*+-]|\d+\.)/,f.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,f.item=s(f.item,"gm")(/bull/g,f.bullet)(),f.list=s(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=s(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=s(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=s(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=u({},f),f.gfm=u({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=s(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=u({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,u,c,d,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,d=o.length,c=0;d>c;c++)l=o[c],u=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(u-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),this.options.smartLists&&c!==d-1&&(s=f.bullet.exec(o[c+1])[0],a===s||a.length>1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=d-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==d-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=s(d.link)("inside",d._inside)("href",d._href)(),d.reflink=s(d.reflink)("inside",d._inside)(),d.normal=u({},d),d.pedantic=u({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=u({},d.normal,{escape:s(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=u({},d.gfm,{br:s(d.br)("{2,}","*")(),text:s(d.gfm.text)("{2,}","*")()}),n.rules=d,n.output=function(e,t,r){var i=new n(t,r);return i.output(e)},n.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=o(i[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(o(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(o(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;r>i;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
'+(n?e:o(e,!0))+"\n
\n":"
"+(n?e:o(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"
\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(i){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var o='
    "},r.prototype.image=function(e,t,n){var r=''+n+'":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;et;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},l=function(e,t){if(""===t)throw new s("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","String contains an invalid character");return a.call(e,t)},u=function(e){for(var t=o.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,i=n.length;i>r;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},c=u[n]=[],f=function(){return new u(this)};if(s[n]=Error[n],c.item=function(e){return this[e]||null},c.contains=function(e){return e+="",-1!==l(this,e)},c.add=function(){var e,t=arguments,n=0,r=t.length,i=!1;do e=t[n]+"",-1===l(this,e)&&(this.push(e),i=!0);while(++nl;l++)i+=String.fromCharCode(o[l]);n.push(i)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var c=new a;n.push(c.readAsBinaryString(e))}else e instanceof r?"base64"===e.encoding&&m?n.push(m(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},i.getBlob=function(e){return arguments.length||(e=null),new r(this.data.join(""),e,"raw")},i.toString=function(){return"[object BlobBuilder]"},o.slice=function(e,t,n){var i=arguments.length;return 3>i&&(n=null),new r(this.data.slice(e,i>1?t:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,t){var r=t?t.type||"":"",i=new n;if(e)for(var o=0,a=e.length;a>o;o++)Uint8Array&&e[o]instanceof Uint8Array?i.append(e[o].buffer):i.append(e[o]);var s=i.getBlob(r);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var r=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=r(new e.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(t,n){"use strict";e.exports=n}(this,function(){"use strict";function e(e,t){return this.init(e,t)}return e.extensions={},function(t){function n(e,t){var n,r=Array.prototype.slice.call(arguments,2);t=t||{};for(var i=0;i-1,isMac:t.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77},isMetaCtrlKey:function(e){return s.isMac&&e.metaKey||!s.isMac&&e.ctrlKey?!0:!1},isKey:function(e,t){var n=s.getKeyCode(e);return!1===Array.isArray(t)?n===t:-1===t.indexOf(n)?!1:!0},getKeyCode:function(e){var t=e.which;return null===t&&(t=null!==e.charCode?e.charCode:e.keyCode),t},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var e=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},defaults:function(){var e=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},createLink:function(e,t,n,r){var i=e.createElement("a");return s.moveTextRangeIntoElement(t[0],t[t.length-1],i),i.setAttribute("href",n),r&&i.setAttribute("target",r),i},findOrCreateMatchingTextNodes:function(e,t,n){for(var r=e.createTreeWalker(t,NodeFilter.SHOW_ALL,null,!1),i=[],o=0,a=!1,l=null,u=null;null!==(l=r.nextNode());)if(!(l.nodeType>3))if(3===l.nodeType){if(!a&&n.startn.end+1)throw new Error("PerformLinking overshot the target!");a&&i.push(u||l),o+=l.nodeValue.length,null!==u&&(o+=u.nodeValue.length,r.nextNode()),u=null}else"img"===l.tagName.toLowerCase()&&(!a&&n.start<=o&&(a=!0),a&&i.push(l));return i},splitStartNodeIfNeeded:function(e,t,n){return t!==n?e.splitText(t-n):null},splitEndNodeIfNeeded:function(e,t,n,r){var i,o;i=r+(t||e).nodeValue.length+(t?e.nodeValue.length:0)-1,o=(t||e).nodeValue.length-(i+1-n),i>=n&&r!==i&&0!==o&&(t||e).splitText(o)},splitByBlockElements:function(t){if(3!==t.nodeType&&1!==t.nodeType)return[];var n=[],r=e.util.blockContainerElementNames.join(",");if(3===t.nodeType||0===t.querySelectorAll(r).length)return[t];for(var i=0;i0)break;r=o.nextNode()}return r},findPreviousSibling:function(e){if(!e||s.isMediumEditorElement(e))return!1;for(var t=e.previousSibling;!t&&!s.isMediumEditorElement(e.parentNode);)e=e.parentNode,t=e.previousSibling;return t},isDescendant:function(e,t,n){if(!e||!t)return!1;if(e===t)return!!n;if(1!==e.nodeType)return!1;if(r||3!==t.nodeType)return e.contains(t);for(var i=t.parentNode;null!==i;){if(i===e)return!0;i=i.parentNode}return!1},isElement:function(e){return!(!e||1!==e.nodeType)},throttle:function(e,t){var n,r,i,o=50,a=null,s=0,l=function(){s=Date.now(),a=null,i=e.apply(n,r),a||(n=r=null)};return t||0===t||(t=o),function(){var o=Date.now(),u=t-(o-s);return n=this,r=arguments,0>=u||u>t?(a&&(clearTimeout(a),a=null),s=o,i=e.apply(n,r),a||(n=r=null)):a||(a=setTimeout(l,u)),i}},traverseUp:function(e,t){if(!e)return!1;do{if(1===e.nodeType){if(t(e))return e;if(s.isMediumEditorElement(e))return!1}e=e.parentNode}while(e);return!1},htmlEntities:function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(t,n){var r,i,o,a,l,u,c;if(!e.util.isEdge&&t.queryCommandSupported("insertHTML"))try{return t.execCommand("insertHTML",!1,n)}catch(f){}if(r=t.getSelection(),r.rangeCount){if(i=r.getRangeAt(0),c=i.commonAncestorContainer,s.isMediumEditorElement(c)&&!c.firstChild)i.selectNode(c.appendChild(t.createTextNode("")));else if(3===c.nodeType&&0===i.startOffset&&i.endOffset===c.nodeValue.length||3!==c.nodeType&&c.innerHTML===i.toString()){for(;!s.isMediumEditorElement(c)&&c.parentNode&&1===c.parentNode.childNodes.length&&!s.isMediumEditorElement(c.parentNode);)c=c.parentNode;i.selectNode(c)}for(i.deleteContents(),o=t.createElement("div"),o.innerHTML=n,a=t.createDocumentFragment();o.firstChild;)l=o.firstChild,u=a.appendChild(l);i.insertNode(a),u&&(i=i.cloneRange(),i.setStartAfter(u),i.collapse(!0),r.removeAllRanges(),r.addRange(i))}},execFormatBlock:function(t,n){var r,i=s.getTopBlockContainer(e.selection.getSelectionStart(t));if("blockquote"===n){if(i&&(r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return s.isBlockContainer(e)})))return t.execCommand("outdent",!1,null);if(s.isIE)return t.execCommand("indent",!1,n)}if(i&&n===i.nodeName.toLowerCase()&&(n="p"),s.isIE&&(n="<"+n+">"),i&&"blockquote"===i.nodeName.toLowerCase()){if(s.isIE&&"

    "===n)return t.execCommand("outdent",!1,n);if((s.isFF||s.isEdge)&&"p"===n)return r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return!s.isBlockContainer(e)})&&t.execCommand("formatBlock",!1,n),t.execCommand("outdent",!1,n)}return t.execCommand("formatBlock",!1,n)},setTargetBlank:function(e,t){var n,r=t||!1;if("a"===e.nodeName.toLowerCase())e.target="_blank";else for(e=e.getElementsByTagName("a"),n=0;nr?(i=i.parentNode,n-=1):(o=o.parentNode,r-=1);for(;i!==o;)i=i.parentNode,o=o.parentNode;return i},isElementAtBeginningOfBlock:function(e){for(var t,n;!s.isBlockContainer(e)&&!s.isMediumEditorElement(e);){for(n=e;n=n.previousSibling;)if(t=3===n.nodeType?n.nodeValue:n.textContent,t.length>0)return!1;e=e.parentNode}return!0},isMediumEditorElement:function(e){return e&&e.getAttribute&&!!e.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(e){return s.traverseUp(e,function(e){return s.isMediumEditorElement(e)})},isBlockContainer:function(e){return e&&3!==e.nodeType&&-1!==s.blockContainerElementNames.indexOf(e.nodeName.toLowerCase())},getClosestBlockContainer:function(e){return s.traverseUp(e,function(e){return s.isBlockContainer(e)||s.isMediumEditorElement(e)})},getTopBlockContainer:function(e){var t=s.isBlockContainer(e)?e:!1;return s.traverseUp(e,function(e){return s.isBlockContainer(e)&&(t=e),!t&&s.isMediumEditorElement(e)?(t=e,!0):!1}),t},getFirstSelectableLeafNode:function(e){for(;e&&e.firstChild;)e=e.firstChild;if(e=s.traverseUp(e,function(e){return-1===s.emptyElementNames.indexOf(e.nodeName.toLowerCase())}),"table"===e.nodeName.toLowerCase()){var t=e.querySelector("th, td");t&&(e=t)}return e},getFirstTextNode:function(e){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(e)},_getFirstTextNode:function(e){if(3===e.nodeType)return e;for(var t=0;t0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(e),a.setEnd(o.startContainer,o.startOffset),i=a.toString().length,n={start:i,end:i+o.toString().length},this.doesRangeStartWithImages(o,t)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(e,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var l=this.getIndexRelativeToAdjacentEmptyBlocks(t,e,o.startContainer,o.startOffset);-1!==l&&(n.emptyBlocksIndex=l)}}return n},importSelection:function(e,t,n,r){if(e&&t){var i=n.createRange();i.setStart(t,0),i.collapse(!0);var o,a=t,s=[],l=0,u=!1,c=!1,f=0,d=!1,p=!1,h=null;for((r||e.startsWithImage||"undefined"!=typeof e.emptyBlocksIndex)&&(p=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if(e.trailingImageCount&&c&&("img"===a.nodeName.toLowerCase()&&f++,f===e.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;i.setEnd(a.parentNode,m+1),d=!0}if(!d&&1===a.nodeType)for(var g=a.childNodes.length-1;g>=0;)s.push(a.childNodes[g]),g-=1}else o=l+a.length,!u&&e.start>=l&&e.start<=o&&(p||e.start=l&&e.end<=o&&(e.trailingImageCount?c=!0:(i.setEnd(a,e.end-l),d=!0)),l=o;d||(a=s.pop())}!u&&h&&(i.setStart(h,h.length),i.setEnd(h,h.length)),"undefined"!=typeof e.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,t,e.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(e,i));var v=n.getSelection();v.removeAllRanges(),v.addRange(i)}},importSelectionMoveCursorPastAnchor:function(t,n){var r=function(e){return"a"===e.nodeName.toLowerCase()};if(t.start===t.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&e.util.traverseUp(n.startContainer,r)){for(var i=n.startContainer,o=n.startContainer.parentNode;null!==o&&"a"!==o.nodeName.toLowerCase();)o.childNodes[o.childNodes.length-1]!==i?o=null:(i=o,o=o.parentNode);if(null!==o&&"a"===o.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s0)break}else a===l.currentNode&&(s=l.currentNode);return s||(s=a),o.setStart(e.util.getFirstSelectableLeafNode(s),0),o},getIndexRelativeToAdjacentEmptyBlocks:function(n,r,i,o){if(i.textContent.length>0&&o>0)return-1;var a=i;if(3!==a.nodeType&&(a=i.childNodes[o]),a){if(!e.util.isElementAtBeginningOfBlock(a))return-1;var s=e.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var l=e.util.getClosestBlockContainer(i),u=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,t,!1),c=0;u.nextNode();){var f=""===u.currentNode.textContent;if((f||c>0)&&(c+=1),u.currentNode===l)return c;f||(c=0)}return c},doesRangeStartWithImages:function(e,t){if(0!==e.startOffset||1!==e.startContainer.nodeType)return!1;if("img"===e.startContainer.nodeName.toLowerCase())return!0;var n=e.startContainer.querySelector("img");if(!n)return!1;for(var r=t.createTreeWalker(e.startContainer,NodeFilter.SHOW_ALL,null,!1);r.nextNode();){var i=r.currentNode;if(i===n)break;if(i.nodeValue)return!1}return!0},getTrailingImageCount:function(e,t,n,r){if(0===r||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var i=n.childNodes[r-1];i.hasChildNodes();)i=i.lastChild;for(var o,a=e,s=[],l=0,u=!1,c=!1,f=!1,d=0;!f&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if("img"===a.nodeName.toLowerCase()&&d++,a===i)f=!0;else if(1===a.nodeType)for(var p=a.childNodes.length-1;p>=0;)s.push(a.childNodes[p]),p-=1}else d=0,o=l+a.length,!u&&t.start>=l&&t.start<=o&&(u=!0),u&&t.end>=l&&t.end<=o&&(c=!0),l=o;f||(a=s.pop())}return d},selectionContainsContent:function(e){var t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;if(""!==t.toString().trim())return!0;var n=this.getSelectedParentElement(t.getRangeAt(0));return n&&("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img"))?!0:!1},selectionInContentEditableFalse:function(e){var t,n=this.findMatchingSelectionParent(function(e){var n=e&&e.getAttribute("contenteditable");return"true"===n&&(t=!0),"#text"!==e.nodeName&&"false"===n},e);return!t&&n},getSelectionHtml:function(e){var t,n,r,i="",o=e.getSelection();if(o.rangeCount){for(r=e.createElement("div"),t=0,n=o.rangeCount;n>t;t+=1)r.appendChild(o.getRangeAt(t).cloneContents());i=r.innerHTML}return i},getCaretOffsets:function(e,t){var n,r;return t||(t=window.getSelection().getRangeAt(0)),n=t.cloneRange(),r=t.cloneRange(),n.selectNodeContents(e),n.setEnd(t.endContainer,t.endOffset),r.selectNodeContents(e),r.setStart(t.endContainer,t.endOffset),{left:n.toString().length,right:r.toString().length}},rangeSelectsSingleNode:function(e){var t=e.startContainer;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===e.startOffset+1},getSelectedParentElement:function(e){return e?this.rangeSelectsSingleNode(e)&&3!==e.startContainer.childNodes[e.startOffset].nodeType?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer:null},getSelectedElements:function(e){var t,n,r,i=e.getSelection();if(!i.rangeCount||i.isCollapsed||!i.getRangeAt(0).commonAncestorContainer)return[];if(t=i.getRangeAt(0),3===t.commonAncestorContainer.nodeType){for(n=[],r=t.commonAncestorContainer;r.parentNode&&1===r.parentNode.childNodes.length;)n.push(r.parentNode),r=r.parentNode;return n}return[].filter.call(t.commonAncestorContainer.getElementsByTagName("*"),function(e){return"function"==typeof i.containsNode?i.containsNode(e,!0):!0})},selectNode:function(e,t){var n=t.createRange(),r=t.getSelection();n.selectNodeContents(e),r.removeAllRanges(),r.addRange(n)},select:function(e,t,n,r,i){e.getSelection().removeAllRanges();var o=e.createRange();return o.setStart(t,n),r?o.setEnd(r,i):o.collapse(!0),e.getSelection().addRange(o),o},moveCursor:function(e,t,n){this.select(e,t,n)},getSelectionRange:function(e){var t=e.getSelection();return 0===t.rangeCount?null:t.getRangeAt(0)},getSelectionStart:function(e){var t=e.getSelection().anchorNode,n=t&&3===t.nodeType?t.parentNode:t;return n}};e.selection=n}(),function(){var t=function(e){this.base=e,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};t.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(e,t,n,r){e.addEventListener(t,n,r),this.events.push([e,t,n,r])},detachDOMEvent:function(e,t,n,r){var i,o=this.indexOfListener(e,t,n,r);-1!==o&&(i=this.events.splice(o,1)[0],i[0].removeEventListener(i[1],i[2],i[3]))},indexOfListener:function(e,t,n,r){var i,o,a;for(i=0,o=this.events.length;o>i;i+=1)if(a=this.events[i],a[0]===e&&a[1]===t&&a[2]===n&&a[3]===r)return i;return-1},detachAllDOMEvents:function(){for(var e=this.events.pop();e;)e[0].removeEventListener(e[1],e[2],e[3]),e=this.events.pop()},enableCustomEvent:function(e){void 0!==this.disabledEvents[e]&&delete this.disabledEvents[e]},disableCustomEvent:function(e){this.disabledEvents[e]=!0},attachCustomEvent:function(e,t){this.setupListener(e),this.customEvents[e]||(this.customEvents[e]=[]),this.customEvents[e].push(t)},detachCustomEvent:function(e,t){var n=this.indexOfCustomListener(e,t);-1!==n&&this.customEvents[e].splice(n,1)},indexOfCustomListener:function(e,t){return this.customEvents[e]&&this.customEvents[e].length?this.customEvents[e].indexOf(t):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(e,t,n){this.customEvents[e]&&!this.disabledEvents[e]&&this.customEvents[e].forEach(function(e){e(t,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(e){e.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(e){this.handleDocumentExecCommand(e)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var e=this.options.ownerDocument;if(this.execCommandListener&&e.execCommand.listeners){var t=e.execCommand.listeners.indexOf(this.execCommandListener);-1!==t&&e.execCommand.listeners.splice(t,1),e.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var e=this.options.ownerDocument;if(!e.execCommand.listeners){var t=function(t,n,r){var i=e.execCommand.orig.apply(this,arguments);if(!e.execCommand.listeners)return i;var o=Array.prototype.slice.call(arguments);return e.execCommand.listeners.forEach(function(e){e({command:t,value:r,args:o,result:i})}),i};t.orig=e.execCommand,t.listeners=[],e.execCommand=t}},unwrapExecCommand:function(){var e=this.options.ownerDocument;e.execCommand.orig&&(e.execCommand=e.execCommand.orig)},setupListener:function(e){if(!this.listeners[e]){switch(e){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":this.setupListener("externalInteraction");break;case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache=[],this.base.elements.forEach(function(e){this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML,this.InputEventOnContenteditableSupported&&this.attachDOMEvent(e,"input",this.handleInput.bind(this))}.bind(this)),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":this.setupListener("editableKeydown");break;case"editableKeydownEnter":this.setupListener("editableKeydown");break;case"editableKeydownTab":this.setupListener("editableKeydown");break;case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[e]=!0}},attachToEachElement:function(e,t){this.base.elements.forEach(function(n){this.attachDOMEvent(n,e,t.bind(this))},this)},focusElement:function(e){e.focus(),this.updateFocus(e,{target:e,type:"focus"})},updateFocus:function(t,n){var r,i=this.base.getExtensionByName("toolbar"),o=i?i.getToolbarElement():null,a=this.base.getExtensionByName("anchor-preview"),s=a&&a.getPreviewElement?a.getPreviewElement():null,l=this.base.getFocusedElement();l&&"click"===n.type&&this.lastMousedownTarget&&(e.util.isDescendant(l,this.lastMousedownTarget,!0)||e.util.isDescendant(o,this.lastMousedownTarget,!0)||e.util.isDescendant(s,this.lastMousedownTarget,!0))&&(r=l),r||this.base.elements.some(function(n){return!r&&e.util.isDescendant(n,t,!0)&&(r=n),!!r},this);var u=!e.util.isDescendant(l,t,!0)&&!e.util.isDescendant(o,t,!0)&&!e.util.isDescendant(s,t,!0);r!==l&&(l&&u&&(l.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",n,l)),r&&(r.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",n,r))),u&&this.triggerCustomEvent("externalInteraction",n)},updateInput:function(e,t){if(this.contentCache){var n=e.getAttribute("medium-editor-index");e.innerHTML!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",t,e),this.contentCache[n]=e.innerHTML}},handleDocumentSelectionChange:function(t){if(t.currentTarget&&t.currentTarget.activeElement){var n,r=t.currentTarget.activeElement;this.base.elements.some(function(t){return e.util.isDescendant(t,r,!0)?(n=t,!0):!1},this),n&&this.updateInput(n,{target:r,currentTarget:n})}},handleDocumentExecCommand:function(){var e=this.base.getFocusedElement();e&&this.updateInput(e,{target:e,currentTarget:e})},handleBodyClick:function(e){this.updateFocus(e.target,e)},handleBodyFocus:function(e){this.updateFocus(e.target,e)},handleBodyMousedown:function(e){this.lastMousedownTarget=e.target},handleInput:function(e){this.updateInput(e.currentTarget,e)},handleClick:function(e){this.triggerCustomEvent("editableClick",e,e.currentTarget)},handleBlur:function(e){this.triggerCustomEvent("editableBlur",e,e.currentTarget)},handleKeypress:function(e){if(this.triggerCustomEvent("editableKeypress",e,e.currentTarget),this.keypressUpdateInput){var t={target:e.target,currentTarget:e.currentTarget};setTimeout(function(){this.updateInput(t.currentTarget,t)}.bind(this),0)}},handleKeyup:function(e){this.triggerCustomEvent("editableKeyup",e,e.currentTarget)},handleMouseover:function(e){this.triggerCustomEvent("editableMouseover",e,e.currentTarget)},handleDragging:function(e){this.triggerCustomEvent("editableDrag",e,e.currentTarget)},handleDrop:function(e){this.triggerCustomEvent("editableDrop",e,e.currentTarget)},handlePaste:function(e){this.triggerCustomEvent("editablePaste",e,e.currentTarget)},handleKeydown:function(t){return this.triggerCustomEvent("editableKeydown",t,t.currentTarget),e.util.isKey(t,e.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.ENTER)||t.ctrlKey&&e.util.isKey(t,e.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",t,t.currentTarget):e.util.isKey(t,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",t,t.currentTarget):void 0}},e.Events=t}(),function(){var t=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){t.isBuiltInButton(n)?e.Extension.call(this,this.defaults[n]):e.Extension.call(this,n)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var e=this.document.createElement("button"),t=this.contentDefault,n=this.getAria(),r=this.getEditorOption("buttonLabels");return e.classList.add("medium-editor-action"),e.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(t){e.classList.add(t)}),e.setAttribute("data-action",this.getAction()),n&&(e.setAttribute("title",n),e.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(t){e.setAttribute(t,this.attrs[t])},this),"fontawesome"===r&&this.contentFA&&(t=this.contentFA),e.innerHTML=t,e},handleClick:function(e){e.preventDefault(),e.stopPropagation();var t=this.getAction();t&&this.execAction(t)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var e=null;return this.useQueryState&&(e=this.base.queryCommandState(this.getAction())),e},isAlreadyApplied:function(e){var t,n,r=!1,i=this.getTagNames();return this.knownState===!1||this.knownState===!0?this.knownState:(i&&i.length>0&&(r=-1!==i.indexOf(e.nodeName.toLowerCase())),!r&&this.style&&(t=this.style.value.split("|"),n=this.window.getComputedStyle(e,null).getPropertyValue(this.style.prop),t.forEach(function(e){this.knownState||(r=-1!==n.indexOf(e),(r||"text-decoration"!==this.style.prop)&&(this.knownState=r)); -},this)),r)}});t.isBuiltInButton=function(t){return"string"==typeof t&&e.extensions.button.prototype.defaults.hasOwnProperty(t)},e.extensions.button=t}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}}}(),function(){var t=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",hasForm:!0,getForm:function(){},isDisplayed:function(){},hideForm:function(){},showToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.hideToolbarDefaultActions()},setToolbarPosition:function(){var e=this.base.getExtensionByName("toolbar");e&&e.setToolbarPosition()}});e.extensions.form=t}(),function(){var t=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var n=e.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||e.util.getClosestTag(e.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){e.util.isKey(t,e.util.keyCode.K)&&e.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var e=[''];return e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formSaveLabel,""),e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formCloseLabel,""),this.targetCheckbox&&e.push('

    ','',"","
    "),this.customClassOption&&e.push('
    ','',"","
    "),e.join("")},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(e){var t=this.getInput(),n=this.getAnchorTargetCheckbox(),r=this.getAnchorButtonCheckbox();if(e=e||{url:""},"string"==typeof e&&(e={url:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e.url,t.focus(),n&&(n.checked="_blank"===e.target),r){var i=e.buttonClass?e.buttonClass.split(" "):[];r.checked=-1!==i.indexOf(this.customClassOption)}},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},getFormOpts:function(){var e=this.getAnchorTargetCheckbox(),t=this.getAnchorButtonCheckbox(),n={url:this.getInput().value.trim()};return this.linkValidation&&(n.url=this.checkLinkFormat(n.url)),n.target="_self",e&&e.checked&&(n.target="_blank"),t&&t.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var e=this.getFormOpts();this.completeFormSave(e)},completeFormSave:function(e){this.base.restoreSelection(),this.execAction(this.action,e),this.base.checkSelection()},checkLinkFormat:function(e){var t=/^([a-z]+:)?\/\/|^(mailto|tel|maps):/i,n=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/;return n.test(e)?"tel:"+e:(t.test(e)?"":"http://")+e},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(e){var t=e.querySelector(".medium-editor-toolbar-close"),n=e.querySelector(".medium-editor-toolbar-save"),r=e.querySelector(".medium-editor-toolbar-input");this.on(e,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(t,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var e=this.document,t=e.createElement("div");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),t.innerHTML=this.getTemplate(),this.attachFormEvents(t),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(t){return t.keyCode===e.util.keyCode.ENTER?(t.preventDefault(),void this.doFormSave()):void(t.keyCode===e.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel()))},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.anchor=t}(),function(){var t=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var e=this.document.createElement("div");return e.id="medium-editor-anchor-preview-"+this.getEditorId(),e.className="medium-editor-anchor-preview",e.innerHTML=this.getTemplate(),this.on(e,"click",this.handleClick.bind(this)),e},getTemplate:function(){return'
    '},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(e){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||e.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=e.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=e.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=e,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(e){e=e||this.activeAnchor;var t,n,r=this.anchorPreview.offsetHeight,i=e.getBoundingClientRect(),o=(i.left+i.right)/2,a=this.diffLeft,s=this.diffTop;t=this.anchorPreview.offsetWidth/2;var l=this.base.getExtensionByName("toolbar");l&&(a=l.diffLeft,s=l.diffTop),n=a-t,this.anchorPreview.style.top=Math.round(r+i.bottom-s+this.window.pageYOffset-this.anchorPreview.offsetHeight)+"px",this.anchorPreview.style.right="initial",t>o?(this.anchorPreview.style.left=n+t+"px",this.anchorPreview.style.right="initial"):this.window.innerWidth-othis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=t}(),function(){function t(t){return!e.util.getClosestTag(t,"a")}var n,r,i,o;n=[" "," ","\n","\r"," "," "," "," "," ","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i");var a=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(e,t){this.performLinking(t)},onKeypress:function(t){this.disableEventHandling||e.util.isKey(t,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var e=this.base.exportSelection();this.performLinking(t.target)&&this.base.importSelection(e,!0)}catch(n){window.console&&window.console.error("Failed to perform linking",n),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(t){var n=e.util.splitByBlockElements(t),r=!1;0===n.length&&(n=[t]);for(var i=0;i0&&null!==a;)i=n.currentNode,o=i.nodeValue,o.length>t?(a=i.splitText(o.length-t),t=0):(a=n.previousNode(),t-=o.length);return a},performLinkingWithinElement:function(t){for(var n=this.findLinkableText(t),r=!1,i=0;i1;)i.appendChild(r.childNodes[1])}});e.extensions.autoLink=a}(),function(){function t(t){var r=e.util.getContainerEditorElement(t),i=Array.prototype.slice.call(r.parentElement.querySelectorAll("."+n));i.forEach(function(e){e.classList.remove(n)})}var n="medium-editor-dragover",r=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy";var r=e.target.classList?e.target:e.target.parentElement;t(r),"dragover"===e.type&&r.classList.add(n)},handleDrop:function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&Array.prototype.slice.call(e.dataTransfer.files).forEach(function(e){this.isAllowedFile(e)&&e.type.match("image")&&this.insertImageFile(e)},this),t(e.target)},isAllowedFile:function(e){return this.allowedTypes.some(function(t){return!!e.type.match(t)})},insertImageFile:function(t){var n=new FileReader;n.readAsDataURL(t);var r="medium-img-"+ +new Date;e.util.insertHTMLCommand(this.document,''),n.onload=function(){var e=this.document.getElementById(r);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}});e.extensions.fileDragging=r}(),function(){var t=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(e){var t=e.key.charCodeAt(0);this.keys[t]||(this.keys[t]=[]),this.keys[t].push(e)},this)},handleKeydown:function(t){var n=e.util.getKeyCode(t);if(this.keys[n]){var r=e.util.isMetaCtrlKey(t),i=!!t.shiftKey,o=!!t.altKey;this.keys[n].forEach(function(e){e.meta!==r||e.shift!==i||e.alt!==o&&void 0!==e.alt||(t.preventDefault(),t.stopPropagation(),!1!==e.command&&this.execAction(e.command))},this)}}});e.extensions.keyboardCommands=t}(),function(){var t=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontName")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(e){var t=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var e,t=this.document,n=t.createElement("div"),r=t.createElement("select"),i=t.createElement("a"),o=t.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a
    ':"✓",n.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",n.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("face")&&e.removeAttribute("face")})},handleFontChange:function(){var e=this.getSelect().value;""===e?this.clearFontName():this.execAction("fontName",{name:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontName=t}(),function(){var t=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontSize")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(e){var t=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var e=this.document,t=e.createElement("div"),n=e.createElement("input"),r=e.createElement("a"),i=e.createElement("a");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(t,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",t.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),i.setAttribute("href","#"),i.className="medium-editor-toobar-save",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"✓",t.appendChild(i),this.on(i,"click",this.handleSaveClick.bind(this),!0),r.setAttribute("href","#"),r.className="medium-editor-toobar-close",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",t.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("size")&&e.removeAttribute("size")})},handleSliderChange:function(){var e=this.getInput().value;"4"===e?this.clearFontSize():this.execAction("fontSize",{size:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=t}(),function(){function t(){return[[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
    /g),"
    "],[new RegExp(/]*(font-style:italic;font-weight:bold|font-weight:bold;font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:bold[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

    "],[new RegExp(/\n+

    /gi),""],["",""],["",""]]}var n=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&this.subscribe("editablePaste",this.handlePaste.bind(this))},handlePaste:function(t,n){var r,i,o,a,s="",l="text/html",u="text/plain";if(this.window.clipboardData&&void 0===t.clipboardData&&(t.clipboardData=this.window.clipboardData,l="Text",u="Text"),t.clipboardData&&t.clipboardData.getData&&!t.defaultPrevented){if(t.preventDefault(),o=t.clipboardData.getData(l),a=t.clipboardData.getData(u),this.cleanPastedHTML&&o)return this.cleanPaste(o);if(this.getEditorOption("disableReturn")||n.getAttribute("data-disable-return"))s=e.util.htmlEntities(a);else if(r=a.split(/[\r\n]+/g),r.length>1)for(i=0;i"+e.util.htmlEntities(r[i])+"

    ");else s=e.util.htmlEntities(r[0]);e.util.insertHTMLCommand(this.document,s)}},cleanPaste:function(e){var n,r,i,o,a=/"+e.split("

    ").join("

    ")+"

    ",r=i.querySelectorAll("a,p,div,br"),n=0;n"+r.innerHTML+"
    ":i.innerHTML=r.innerHTML,r.parentNode.replaceChild(i,r);for(o=t.querySelectorAll("span"),n=0;n0&&(r[0].classList.add(this.firstButtonClass),r[r.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this["static"]&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(t){return t&&t.target&&e.util.isDescendant(this.getToolbarElement(),t.target)?!1:void this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(e){e.hasForm&&e.isDisplayed()&&e.hideForm()})},multipleBlockElementsSelected:function(){var t=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),r=e.selection.getSelectionHtml(this.document).replace(t,""),i=r.match(n);return!!i&&i.length>1},modifySelection:function(){var t=this.window.getSelection(),n=t.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var r=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),n.startContainer,this.document);if(r){for(var i=0;0===r.nodeValue.substr(i,1).trim().length;)i+=1;n=e.selection.select(this.document,r,i,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var t=e.selection.getSelectionElement(this.window);return!t||-1===this.getEditorElements().indexOf(t)||t.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this["static"]?this.showAndUpdateToolbar():!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(e){"function"==typeof e.isActive&&"function"==typeof e.setInactive&&e.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var t,n=[],r=null,i=e.selection.getSelectionRange(this.document),o=function(e){"function"==typeof e.checkState?e.checkState(t):"function"==typeof e.isActive&&"function"==typeof e.isAlreadyApplied&&"function"==typeof e.setActive&&!e.isActive()&&e.isAlreadyApplied(t)&&e.setActive()};if(i&&(this.forEachExtension(function(e){return"function"==typeof e.queryCommandState&&(r=e.queryCommandState(),null!==r)?void(r&&"function"==typeof e.setActive&&e.setActive()):void n.push(e)}),t=e.selection.getSelectedParentElement(i),this.getEditorElements().some(function(n){return e.util.isDescendant(n,t,!0)})))for(;t&&(n.forEach(o),!e.util.isMediumEditorElement(t));)t=t.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var e,t=this.base.getFocusedElement(),n=this.window.getSelection();return t?(this["static"]&&!this.relativeContainer?(this.showToolbar(),this.positionStaticToolbar(t)):n.isCollapsed||(this.showToolbar(),this.relativeContainer||this.positionToolbar(n)),e=this.base.getExtensionByName("anchor-preview"),void(e&&"function"==typeof e.hidePreview&&e.hidePreview())):this},positionStaticToolbar:function(e){this.getToolbarElement().style.left="0";var t,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=e.getBoundingClientRect(),a=o.top+n,s=o.left+o.width/2,l=i.offsetHeight,u=i.offsetWidth,c=u/2;switch(this.sticky?n>a+e.offsetHeight-l-this.stickyTopOffset?(i.style.top=a+e.offsetHeight-l+"px",i.classList.remove("medium-editor-sticky-toolbar")):n>a-l-this.stickyTopOffset?(i.classList.add("medium-editor-sticky-toolbar"),i.style.top=this.stickyTopOffset+"px"):(i.classList.remove("medium-editor-sticky-toolbar"),i.style.top=a-l+"px"):i.style.top=a-l+"px",this.align){case"left":t=o.left;break;case"right":t=o.right-u;break;case"center":t=s-c}0>t?t=0:t+u>r&&(t=r-Math.ceil(u)-1),i.style.left=t+"px"},positionToolbar:function(e){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var t=e.getRangeAt(0),n=t.getBoundingClientRect();(!n||0===n.height&&0===n.width&&t.startContainer===t.endContainer)&&(n=1===t.startContainer.nodeType&&t.startContainer.querySelector("img")?t.startContainer.querySelector("img").getBoundingClientRect():t.startContainer.getBoundingClientRect());var r=this.window.innerWidth,i=(n.left+n.right)/2,o=this.getToolbarElement(),a=o.offsetHeight,s=o.offsetWidth,l=s/2,u=50,c=this.diffLeft-l;n.topi?(o.style.left=c+l+"px",o.style.right="initial"):l>r-i?(o.style.left="auto",o.style.right=0):(o.style.left=c+i+"px",o.style.right="initial")}});e.extensions.toolbar=t}(),function(){var t=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){var t="medium-editor-dragover";e.preventDefault(),e.dataTransfer.dropEffect="copy","dragover"===e.type?e.target.classList.add(t):"dragleave"===e.type&&e.target.classList.remove(t)},handleDrop:function(t){var n,r="medium-editor-dragover";t.preventDefault(),t.stopPropagation(),t.dataTransfer.files&&(n=Array.prototype.slice.call(t.dataTransfer.files,0),n.some(function(t){if(t.type.match("image")){var n,r;n=new FileReader,n.readAsDataURL(t),r="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,''),n.onload=function(){var e=this.document.getElementById(r);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}}.bind(this))),t.target.classList.remove(r)}});e.extensions.imageDragging=t}(),function(){function t(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=e.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim())&&t.preventDefault()}function n(t,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))t.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=e.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&t.preventDefault()}}function r(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),r=n&&n.nodeName.toLowerCase();"pre"===r&&(t.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(n)&&(t.preventDefault(),t.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|)?$/i,a=/h\d/i;e.util.isKey(t,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===e.selection.getCaretOffsets(r).left?e.util.isKey(t,e.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),t.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(t,e.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
    ",r.previousElementSibling.parentNode.insertBefore(n,r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&"li"===i&&o.test(r.innerHTML)&&!r.previousElementSibling&&!r.parentElement.previousElementSibling&&r.nextElementSibling&&"li"===r.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
    ",r.parentElement.parentElement.insertBefore(n,r.parentElement),e.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(r,"blockquote")!==!1&&0===e.selection.getCaretOffsets(r).left&&(t.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p"))}function o(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument);r&&(e.util.isMediumEditorElement(r)&&0===r.children.length&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey(t,e.util.keyCode.ENTER)&&!e.util.isListItem(r)&&(n=r.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):t.shiftKey||t.ctrlKey||/h\d/.test(n)||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(e){e._mediumEditors||(e._mediumEditors=[null]),this.id||(this.id=e._mediumEditors.length),e._mediumEditors[this.id]=this}function s(e){e._mediumEditors&&e._mediumEditors[this.id]&&(e._mediumEditors[this.id]=null)}function l(t){t||(t=[]),"string"==typeof t&&(t=this.options.ownerDocument.querySelectorAll(t)),e.util.isElement(t)&&(t=[t]);var n=Array.prototype.slice.apply(t);this.elements=[],n.forEach(function(e,t){"textarea"===e.nodeName.toLowerCase()?this.elements.push(y.call(this,e,t)):this.elements.push(e)},this)}function u(e,t){return Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])}),e}function c(e,t,n){var r={window:n.options.contentWindow,document:n.options.ownerDocument,base:n};return e=u(e,r),"function"==typeof e.init&&e.init(),e.name||(e.name=t),e}function f(){return this.elements.every(function(e){return!!e.getAttribute("data-disable-toolbar")})?!1:this.options.toolbar!==!1}function d(){return f.call(this)?this.options.anchorPreview!==!1:!1}function p(){return this.options.placeholder!==!1}function h(){return this.options.autoLink!==!1}function m(){return this.options.imageDragging!==!1}function g(){return this.options.keyboardCommands!==!1}function v(){return!this.options.extensions.imageDragging}function y(e,t){for(var n=this.options.ownerDocument.createElement("div"),r=Date.now(),i="medium-editor-"+r+"-"+t,o=e.attributes;this.options.ownerDocument.getElementById(i);)r++,i="medium-editor-"+r+"-"+t;n.className=e.className,n.id=i,n.innerHTML=e.value,e.setAttribute("medium-editor-textarea-id",i);for(var a=0,s=o.length;s>a;a++)n.hasAttribute(o[a].nodeName)||n.setAttribute(o[a].nodeName,o[a].nodeValue);return e.classList.add("medium-editor-hidden"),e.parentNode.insertBefore(n,e),n}function b(){var e=!1;this.elements.forEach(function(t,n){this.options.disableEditing||t.getAttribute("data-disable-editing")||(t.setAttribute("contentEditable",!0),t.setAttribute("spellcheck",this.options.spellcheck)),t.setAttribute("data-medium-editor-element",!0),t.setAttribute("role","textbox"),t.setAttribute("aria-multiline",!0),t.setAttribute("medium-editor-index",n),t.hasAttribute("medium-editor-textarea-id")&&(e=!0)},this),e&&this.subscribe("editableInput",function(e,t){var n=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=this.serialize()[t.id].value)}.bind(this))}function x(){var e;if(this.subscribe("editableKeydownTab",r.bind(this)),this.subscribe("editableKeydownDelete",i.bind(this)),this.subscribe("editableKeydownEnter",i.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",t.bind(this)),this.options.disableReturn||this.options.disableDoubleReturn)this.subscribe("editableKeydownEnter",n.bind(this));else for(e=0;e=0&&(r=e.selection.exportSelection(t,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(t,n){if(t){var r=this.elements[t.editableElementIndex||0];e.selection.importSelection(t,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(t){var n=e.selection.getSelectionElement(this.options.contentWindow),r={};if(-1!==this.elements.indexOf(n)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&t.url.trim().length>0){var i=this.options.contentWindow.getSelection();if(i){var o,a,s,l,u=i.getRangeAt(0),c=u.commonAncestorContainer;if(3===u.endContainer.nodeType&&3!==u.startContainer.nodeType&&0===u.startOffset&&u.startContainer.firstChild===u.endContainer&&(c=u.endContainer),a=e.util.getClosestBlockContainer(u.startContainer),s=e.util.getClosestBlockContainer(u.endContainer),3!==c.nodeType&&0!==c.textContent.length&&a===s){var f=a||n,d=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),o=this.exportSelection(),d.appendChild(f.cloneNode(!0)),n===f?e.selection.select(this.options.ownerDocument,f.firstChild,0,f.lastChild,3===f.lastChild.nodeType?f.lastChild.nodeValue.length:f.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,f,0,f,f.childNodes.length);var p=this.exportSelection();l=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,d,{start:o.start-p.start,end:o.end-p.start,editableElementIndex:o.editableElementIndex}),0===l.length&&(d=this.options.ownerDocument.createDocumentFragment(),d.appendChild(c.cloneNode(!0)),l=[d.firstChild.firstChild,d.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,l,t.url.trim());var h=(d.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,d.firstChild.innerHTML.replace(/^\s+/,"")),o.start-=h,o.end-=h,this.importSelection(o)}else this.options.ownerDocument.execCommand("createLink",!1,t.url);(this.options.targetBlank||"_blank"===t.target)&&e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),t.url),t.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||t.buttonClass){r=this.options.ownerDocument.createEvent("HTMLEvents"),r.initEvent("input",!0,!0,this.options.contentWindow);for(var m=0;m1?t[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:r,toString:function(){return[n[0],n[1],n[2]].join(".")+(r?"-"+r:"")}}},e.version=e.parseVersionString.call(this,{version:"5.14.2"}.version),e}())},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(e,t){for(var o,a,s=n(e),l=1;l, "+('or explicitly pass "store" as a prop to "'+a.constructor.displayName+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(n,t),n.prototype.shouldComponentUpdate=function(){return!M||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return l(r)},n.prototype.configureFinalMapState=function(e,t){var n=h(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:h,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):l(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return l(r,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=g(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:g,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):l(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,m["default"])(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,m["default"])(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=r(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&x&&(0,m["default"])(e,this.mergedProps)?!1:(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){d&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillReceiveProps=function(e){M&&(0,m["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},n.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},n.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();M&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,_["default"])(N,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},n.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var i=!0,o=!0;M&&r&&(i=n||t&&this.doStatePropsDependOnOwnProps,o=t&&this.doDispatchPropsDependOnOwnProps);var a=!1,s=!1;i&&(a=this.updateStatePropsIfNeeded()),o&&(s=this.updateDispatchPropsIfNeeded());var l=!0;return l=a||s||t?this.updateMergedPropsIfNeeded():!1,!l&&r?r:(N?this.renderedElement=(0,f.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,f.createElement)(e,this.mergedProps),this.renderedElement)},n}(f.Component);return t.displayName="Connect("+s(e)+")",t.WrappedComponent=e,t.contextTypes={store:p["default"]},t.propTypes={store:p["default"]},(0,w["default"])(t,e)}}var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return!e||!e.__v2_compatible__}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tt;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=a,t.runLeaveHooks=s;var l=n(52),u=n(6);r(u)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(236),o=r(i),a=n(96),s=r(a);t["default"]=s["default"](o["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=o.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function i(e,t){var n=e&&e.routes,i=t.routes,o=void 0,a=void 0;return n?(o=n.filter(function(n){return-1===i.indexOf(n)||r(n,e,t)}),o.reverse(),a=i.filter(function(e){return-1===n.indexOf(e)||-1!==o.indexOf(e)})):(o=[],a=i),{leaveRoutes:o,enterRoutes:a}}t.__esModule=!0;var o=n(27);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function i(e,t){o.mapAsync(e.routes,function(t,n,i){r(e.location,t,i)},t)}t.__esModule=!0;var o=n(52);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=i.getParamNames(e.path);for(var o in t)t.hasOwnProperty(o)&&-1!==r.indexOf(o)&&(n[o]=t[o]);return n}t.__esModule=!0;var i=n(27);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(102),o=r(i),a=n(96),s=r(a);t["default"]=s["default"](o["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!t.hasOwnProperty(n))return!1;if(!r(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function i(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function o(e,t,n){for(var r=e,o=[],a=[],s=0,l=t.length;l>s;++s){var c=t[s],f=c.path||"";if("/"===f.charAt(0)&&(r=e,o=[],a=[]),null!==r){var d=u.matchPattern(f,r);r=d.remainingPathname,o=[].concat(o,d.paramNames),a=[].concat(a,d.paramValues)}if(""===r&&c.path&&i(o,a,n))return s}return null}function a(e,t,n,r){var i=o(e,t,n);return null===i?!1:r?t.slice(i+1).every(function(e){return!e.path}):!0}function s(e,t){return null==t?null==e:null==e?!0:r(e,t)}function l(e,t,n,r,i){var o=e.pathname,l=e.query;return null==n?!1:a(o,r,i,t)?s(l,n.query):!1}t.__esModule=!0,t["default"]=l;var u=n(27);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){var n=e.history,r=e.routes,o=e.location,s=i(e,["history","routes","location"]);n||o?void 0:l["default"](!1),n=n?n:c["default"](s);var u=d["default"](n,p.createRoutes(r)),f=void 0;o?o=n.createLocation(o):f=n.listen(function(e){o=e});var m=h.createRouterObject(n,u);n=h.createRoutingHistory(n,u),u.match(o,function(e,r,i){t(e,r,i&&a({},i,{history:n,router:m,matchContext:{history:n,transitionManager:u,router:m}})),f&&f()})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.routes,r=i(t,["routes"]),o=l["default"](e)(r),s=c["default"](o,n);return a({},o,s)}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;to?t.call(this,o++,i,r):r.apply(this,arguments))}var o=0,a=!1;i()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e=e||window.history.state||{};var t=f.getWindowPath(),n=e,r=n.key,i=void 0;r?i=d.readState(r):(i=null,r=b.createKey(),v&&window.history.replaceState(o({},e,{key:r}),null,t));var a=u.parsePath(t);return b.createLocation(o({},a,{state:i}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return f.addEventListener(window,"popstate",n),function(){f.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=e.state,a=e.action,s=e.key;if(a!==l.POP){d.saveState(s,o);var u=(t||"")+n+r+i,c={key:s};if(a===l.PUSH){if(y)return window.location.href=u,!1;window.history.pushState(c,null,u)}else{if(y)return window.location.replace(u),!1;window.history.replaceState(c,null,u)}}}function r(e){1===++x&&(w=t(b));var n=b.listenBefore(e);return function(){n(),0===--x&&w()}}function i(e){1===++x&&(w=t(b));var n=b.listen(e);return function(){n(),0===--x&&w()}}function a(e){1===++x&&(w=t(b)),b.registerTransitionHook(e)}function p(e){b.unregisterTransitionHook(e),0===--x&&w()}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c.canUseDOM?void 0:s["default"](!1);var g=m.forceRefresh,v=f.supportsHistory(),y=!v||g,b=h["default"](o({},m,{getCurrentLocation:e,finishTransition:n,saveState:d.saveState})),x=0,w=void 0;return o({},b,{listenBefore:r,listen:i,registerTransitionHook:a,unregisterTransitionHook:p})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0&&t=0&&g8&&11>=_),S=32,T=String.fromCharCode(S),M=p.topLevelTypes,O={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[M.topCompositionEnd,M.topKeyPress,M.topTextInput,M.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[M.topBlur,M.topCompositionEnd,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[M.topBlur,M.topCompositionStart,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[M.topBlur,M.topCompositionUpdate,M.topKeyDown,M.topKeyPress,M.topKeyUp,M.topMouseDown]}},N=!1,A=null,P={eventTypes:O,extractEvents:function(e,t,n,r,i){return[u(e,t,n,r,i),d(e,t,n,r,i)]}};e.exports=P},function(e,t,n){"use strict";var r=n(105),i=n(5),o=n(10),a=(n(181),n(286)),s=n(186),l=n(190),u=(n(2),l(function(e){return s(e)})),c=!1,f="cssFloat";if(i.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(p){c=!0}void 0===document.documentElement.style.cssFloat&&(f="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=u(n)+":",t+=a(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=a(i,t[i]);if("float"===i&&(i=f),o)n[i]=o;else{var s=c&&r.shorthandPropertyExpansions[i];if(s)for(var l in s)n[l]="";else n[i]=""}}}};o.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=h},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=_.getPooled(O.change,A,e,k(e));x.accumulateTwoPhaseDispatches(t),C.batchedUpdates(o,t)}function o(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){N=e,A=t,N.attachEvent("onchange",i)}function s(){N&&(N.detachEvent("onchange",i),N=null,A=null)}function l(e,t,n){return e===M.topChange?n:void 0}function u(e,t,n){e===M.topFocus?(s(),a(t,n)):e===M.topBlur&&s()}function c(e,t){N=e,A=t,P=e.value,L=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(N,"value",I),N.attachEvent("onpropertychange",d)}function f(){N&&(delete N.value,N.detachEvent("onpropertychange",d),N=null,A=null,P=null,L=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==P&&(P=t,i(e))}}function p(e,t,n){return e===M.topInput?n:void 0}function h(e,t,n){e===M.topFocus?(f(),c(t,n)):e===M.topBlur&&f()}function m(e,t,n){return e!==M.topSelectionChange&&e!==M.topKeyUp&&e!==M.topKeyDown||!N||N.value===P?void 0:(P=N.value,A)}function g(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===M.topClick?n:void 0}var y=n(15),b=n(32),x=n(33),w=n(5),C=n(11),_=n(25),k=n(69),E=n(72),S=n(132),T=n(19),M=y.topLevelTypes,O={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[M.topBlur,M.topChange,M.topClick,M.topFocus,M.topInput,M.topKeyDown,M.topKeyUp,M.topSelectionChange]}},N=null,A=null,P=null,L=null,D=!1;w.canUseDOM&&(D=E("change")&&(!("documentMode"in document)||document.documentMode>8));var R=!1;w.canUseDOM&&(R=E("input")&&(!("documentMode"in document)||document.documentMode>9));var I={get:function(){return L.get.call(this)},set:function(e){P=""+e,L.set.call(this,e)}},j={eventTypes:O,extractEvents:function(e,t,n,i,o){var a,s;if(r(t)?D?a=l:s=u:S(t)?R?a=p:(a=m,s=h):g(t)&&(a=v),a){var c=a(e,t,n);if(c){var f=_.getPooled(O.change,c,i,o);return f.type="change",x.accumulateTwoPhaseDispatches(f),f}}s&&s(e,t,n)}};e.exports=j},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var i=n(5),o=n(183),a=n(12),s=n(85),l=n(1),u=/^(<[^ \/>]+)/,c="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:l(!1);for(var t,n={},f=0;fe&&n[e]===i[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===i[o-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r,i=n(29),o=n(5),a=i.injection.MUST_USE_ATTRIBUTE,s=i.injection.MUST_USE_PROPERTY,l=i.injection.HAS_BOOLEAN_VALUE,u=i.injection.HAS_SIDE_EFFECTS,c=i.injection.HAS_NUMERIC_VALUE,f=i.injection.HAS_POSITIVE_NUMERIC_VALUE,d=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var p=document.implementation;r=p&&p.hasFeature&&p.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|l,allowTransparency:a,alt:null,async:l,autoComplete:null,autoPlay:l,capture:a|l,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|l,classID:a,className:r?a:s,cols:a|f,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|l,coords:null,crossOrigin:null,data:null,dateTime:a,"default":l,defer:l,dir:null,disabled:a|l,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:l,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|l,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|l,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|l,muted:s|l,name:null,nonce:a,noValidate:l,open:l,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|l,rel:null,required:l,reversed:l,role:a,rows:a|f,rowSpan:null,sandbox:null,scope:null,scoped:l,scrolling:null,seamless:a|l,selected:s|l,shape:null,size:a|f,sizes:a,span:f,spellCheck:null,src:null,srcDoc:s,srcLang:null,srcSet:a,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|u,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:a,autoCorrect:a,autoSave:null,color:null,itemProp:a,itemScope:a|l,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(111),i=n(260),o=n(265),a=n(3),s=n(287),l={};a(l,o),a(l,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),l.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,l.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i,e.exports=l},function(e,t,n){"use strict";var r=(n(34),n(66)),i=(n(2),"_getDOMNodeDidWarn"),o={getDOMNode:function(){return this.constructor[i]=!0,r(this)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=o(t,null))}var i=n(24),o=n(71),a=n(74),s=n(75),l=(n(2),{instantiateChildren:function(e,t,n){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var s;for(s in t)if(t.hasOwnProperty(s)){var l=e&&e[s],u=l&&l._currentElement,c=t[s];if(null!=l&&a(u,c))i.receiveComponent(l,c,n,r),t[s]=l;else{l&&i.unmountComponent(l,s);var f=o(c,null);t[s]=f}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||i.unmountComponent(e[s]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];i.unmountComponent(n)}}});e.exports=l},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(e){}var o=n(62),a=n(16),s=n(9),l=n(34),u=n(10),c=n(42),f=(n(41),n(24)),d=n(64),p=n(3),h=n(31),m=n(1),g=n(74);n(2);i.prototype.render=function(){var e=l.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var v=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=v++,this._rootNodeID=e;var r,o,a=this._processProps(this._currentElement.props),u=this._processContext(n),c=this._currentElement.type,p="prototype"in c;p&&(r=new c(a,u,d)),(!p||null===r||r===!1||s.isValidElement(r))&&(o=r,r=new i(c)),r.props=a,r.context=u,r.refs=h,r.updater=d,this._instance=r,l.set(r,this);var g=r.state;void 0===g&&(r.state=g=null),"object"!=typeof g||Array.isArray(g)?m(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===o&&(o=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(o);var y=f.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),f.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,l.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return h;t={};for(var i in r)t[i]=e[i];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?m(!1):void 0;for(var i in r)i in t.childContextTypes?void 0:m(!1);return p({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var i=this.getName();for(var o in e)if(e.hasOwnProperty(o)){var a;try{"function"!=typeof e[o]?m(!1):void 0,a=e[o](t,o,i,n)}catch(s){a=s}if(a instanceof Error){r(this);n===c.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,r,e,i,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&f.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,i){var o,a=this._instance,s=this._context===i?a.context:this._processContext(i);t===n?o=n.props:(o=this._processProps(n.props),a.componentWillReceiveProps&&a.componentWillReceiveProps(o,s));var l=this._processPendingState(o,s),u=this._pendingForceUpdate||!a.shouldComponentUpdate||a.shouldComponentUpdate(o,l,s);u?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,o,l,s,e,i)):(this._currentElement=n,this._context=i,a.props=o,a.state=l,a.context=s)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=p({},i?r[0]:n.state),a=i?1:0;a=0||null!=t.is}function g(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var v=n(239),y=n(241),b=n(29),x=n(59),w=n(15),C=n(40),_=n(61),k=n(254),E=n(257),S=n(258),T=n(113),M=n(261),O=n(7),N=n(266),A=n(10),P=n(64),L=n(3),D=n(45),R=n(46),I=n(1),j=(n(72),n(19)),F=n(47),B=n(73),H=(n(86),n(76),n(2),C.deleteListener),U=C.listenTo,W=C.registrationNameModules,z={string:!0,number:!0},q=j({children:null}),V=j({style:null}),K=j({__html:null}),$=1,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},Y={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},Q=(L({menuitem:!0},Y),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),Z={},J={}.hasOwnProperty;g.displayName="ReactDOMComponent",g.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(f,this);break;case"button":r=k.getNativeProps(this,r,n);break;case"input":E.mountWrapper(this,r,n),r=E.getNativeProps(this,r,n);break;case"option":S.mountWrapper(this,r,n),r=S.getNativeProps(this,r,n);break;case"select":T.mountWrapper(this,r,n),r=T.getNativeProps(this,r,n),n=T.processChildContext(this,r,n);break;case"textarea":M.mountWrapper(this,r,n),r=M.getNativeProps(this,r,n)}l(this,r);var i;if(t.useCreateElement){var o=n[O.ownerDocumentContextKey],a=o.createElement(this._currentElement.type);x.setAttributeForID(a,this._rootNodeID),O.getID(a),this._updateDOMProperties({},r,t,a),this._createInitialChildren(t,r,n,a),i=a}else{var s=this._createOpenTagMarkupAndPutListeners(t,r),u=this._createContentMarkup(t,r,n);i=!u&&Y[this._tag]?s+"/>":s+">"+u+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(v.focusDOMComponent,this)}return i},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(W.hasOwnProperty(r))i&&u(this._rootNodeID,r,i,e);else{r===V&&(i&&(i=this._previousStyleCopy=L({},t.style)),i=y.createMarkupForStyles(i));var o=null;null!=this._tag&&m(this._tag,t)?r!==q&&(o=x.createMarkupForCustomAttribute(r,i)):o=x.createMarkupForProperty(r,i),o&&(n+=" "+o)}}if(e.renderToStaticMarkup)return n;var a=x.createMarkupForID(this._rootNodeID);return n+" "+a},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=R(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&F(r,i.__html);else{var o=z[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)B(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),l=0;lt.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,i=Math.min(t.start,r),o="undefined"==typeof t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=u(e,i),l=u(e,o);if(s&&l){var f=document.createRange();f.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(f),n.extend(l.node,l.offset)):(f.setEnd(l.node,l.offset),n.addRange(f))}}}var l=n(5),u=n(290),c=n(131),f=l.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:f?i:o,setOffsets:f?a:s};e.exports=d},function(e,t,n){"use strict";var r=n(116),i=n(271),o=n(65);r.inject();var a={renderToString:i.renderToString,renderToStaticMarkup:i.renderToStaticMarkup,version:o};e.exports=a},function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=o.executeOnChange(t,e);return s.asap(r,this),n}var o=n(60),a=n(63),s=n(11),l=n(3),u=n(1),c=(n(2),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?u(!1):void 0;var r=l({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?u(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:u(!1),r=r[0]),n=""+r),null==n&&(n="");var a=o.getValue(t);e._wrapperState={initialValue:""+(null!=a?a:n),onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=o.getValue(t);null!=n&&a.updatePropertyByID(e._rootNodeID,"value",""+n)}});e.exports=c},function(e,t,n){"use strict";function r(e){i.enqueueEvents(e),i.processEventQueue(!1)}var i=n(32),o={handleTopLevel:function(e,t,n,o,a){var s=i.extractEvents(e,t,n,o,a);r(s)}};e.exports=o},function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=f.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),i=d.getFirstReactDOM(r);return i}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){a(e)}function a(e){for(var t=d.getFirstReactDOM(m(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var i=0;ii;){for(;ii;i++)n+=t+=e.charCodeAt(i);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var i=n(105),o=i.isUnitlessNumber;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){return i}n(3),n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,i=void 0===r[n];i&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return o(e,r,t),t}var o=n(75);n(2);e.exports=i},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(67),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,t>=o&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o(!1),e}var i=n(9),o=n(1);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+i(e)+'"'}var i=n(46);e.exports=r},function(e,t,n){"use strict";var r=n(7);e.exports=r.renderSubtreeIntoContainer},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e,n){return t.reduce(function(e,t){return t(e,n)},e)}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e){return e}function r(e,t,r){var i="function"==typeof t?t:n;return function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];var a={type:e,payload:i.apply(void 0,n)};return 1===n.length&&n[0]instanceof Error&&(a.error=!0),"function"==typeof r&&(a.meta=r.apply(void 0,n)),a}}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n=l["default"](e).map(function(t){return a["default"](t,e[t])});return"undefined"!=typeof t?function(e,r){return void 0===e&&(e=t),c["default"].apply(void 0,n)(e,r)}:c["default"].apply(void 0,n)}t.__esModule=!0,t["default"]=i;var o=n(133),a=r(o),s=n(298),l=r(s),u=n(294),c=r(u);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(295),o=r(i),a=n(133),s=r(a),l=n(296),u=r(l);t.createAction=o["default"],t.handleAction=s["default"],t.handleActions=u["default"]},function(e,t){"use strict";function n(e){if("undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys)return Reflect.ownKeys(e);var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return{load:function(){var t=localStorage.getItem(e);return Promise.resolve(JSON.parse(t)||{})},save:function(t){var n=JSON.stringify(t);return localStorage.setItem(e,n),Promise.resolve()}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t-1&&e%1==0&&t>e}function f(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function d(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function p(){}function h(e,t){return g(e,t)&&delete e[t]}function m(e,t){if(Tt){var n=e[t];return n===Ce?void 0:n}return dt.call(e,t)?e[t]:void 0}function g(e,t){return Tt?void 0!==e[t]:dt.call(e,t)}function v(e,t,n){e[t]=Tt&&void 0===n?Ce:n}function y(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():Ct.call(e,n,1),!0}function A(e,t){var n=L(e,t);return 0>n?void 0:e[n][1]}function P(e,t){return L(e,t)>-1}function L(e,t){for(var n=e.length;n--;)if(ue(e[n][0],t))return n;return-1}function D(e,t,n){var r=L(e,t);0>r?e.push([t,n]):e[r][1]=n}function R(e,t,n){var r=e[t];dt.call(e,t)&&ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function I(e,t){return e&&Q(t,be(t),e)}function j(e,t,n,r,i,a,s){var l;if(r&&(l=a?r(e,i,a,s):r(e)),void 0!==l)return l;if(!me(e))return e;var c=It(e);if(c){if(l=re(e),!t)return X(e,l)}else{var f=ne(e),d=f==Oe||f==Ne;if(jt(e))return z(e,t);if(f==Le||f==ke||d&&!a){if(u(e))return a?e:{};if(l=ie(d?{}:e),!t)return l=I(l,e),n?J(e,l):l}else{if(!Je[f])return a?e:{};l=oe(e,f,t)}}s||(s=new k);var p=s.get(e);return p?p:(s.set(e,l),(c?o:B)(e,function(i,o){R(l,o,j(i,t,n,r,o,e,s))}),n&&!c?J(e,l):l)}function F(e){return me(e)?xt(e):{}}function B(e,t){return e&&Lt(e,t,be)}function H(e,t){return dt.call(e,t)||"object"==typeof e&&t in e&&null===yt(e)}function U(e){return _t(Object(e))}function W(e){return function(t){return null==t?void 0:t[e]}}function z(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function q(e){var t=new e.constructor(e.byteLength);return new vt(t).set(new vt(e)),t}function V(e){return a(f(e),r,new e.constructor)}function K(e){var t=new e.constructor(e.source,Xe.exec(e));return t.lastIndex=e.lastIndex,t}function $(e){return a(d(e),i,new e.constructor)}function G(e){return Pt?Object(Pt.call(e)):{}}function Y(e,t){var n=t?q(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function X(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&_e>=e}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return null==e?!1:pe(e)?ht.test(ft.call(e)):ge(e)&&(u(e)?ht:Qe).test(e)}function ye(e){return"string"==typeof e||!It(e)&&ge(e)&&pt.call(e)==Ie}function be(e){var t=le(e);if(!t&&!fe(e))return U(e);var n=ae(e),r=!!n,i=n||[],o=i.length;for(var a in e)!H(e,a)||r&&("length"==a||c(a,o))||t&&"constructor"==a||i.push(a);return i}function xe(e){return function(){return e}}var we=200,Ce="__lodash_hash_undefined__",_e=9007199254740991,ke="[object Arguments]",Ee="[object Array]",Se="[object Boolean]",Te="[object Date]",Me="[object Error]",Oe="[object Function]",Ne="[object GeneratorFunction]",Ae="[object Map]",Pe="[object Number]",Le="[object Object]",De="[object RegExp]",Re="[object Set]",Ie="[object String]",je="[object Symbol]",Fe="[object WeakMap]",Be="[object ArrayBuffer]",He="[object Float32Array]",Ue="[object Float64Array]",We="[object Int8Array]",ze="[object Int16Array]",qe="[object Int32Array]",Ve="[object Uint8Array]",Ke="[object Uint8ClampedArray]",$e="[object Uint16Array]",Ge="[object Uint32Array]",Ye=/[\\^$.*+?()[\]{}|]/g,Xe=/\w*$/,Qe=/^\[object .+?Constructor\]$/,Ze=/^(?:0|[1-9]\d*)$/,Je={};Je[ke]=Je[Ee]=Je[Be]=Je[Se]=Je[Te]=Je[He]=Je[Ue]=Je[We]=Je[ze]=Je[qe]=Je[Ae]=Je[Pe]=Je[Le]=Je[De]=Je[Re]=Je[Ie]=Je[je]=Je[Ve]=Je[Ke]=Je[$e]=Je[Ge]=!0,Je[Me]=Je[Oe]=Je[Fe]=!1;var et={"function":!0,object:!0},tt=et[typeof t]&&t&&!t.nodeType?t:void 0,nt=et[typeof e]&&e&&!e.nodeType?e:void 0,rt=nt&&nt.exports===tt?tt:void 0,it=l(tt&&nt&&"object"==typeof n&&n),ot=l(et[typeof self]&&self),at=l(et[typeof window]&&window),st=l(et[typeof this]&&this),lt=it||at!==(st&&st.window)&&at||ot||st||Function("return this")(),ut=Array.prototype,ct=Object.prototype,ft=Function.prototype.toString,dt=ct.hasOwnProperty,pt=ct.toString,ht=RegExp("^"+ft.call(dt).replace(Ye,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=rt?lt.Buffer:void 0,gt=lt.Symbol,vt=lt.Uint8Array,yt=Object.getPrototypeOf,bt=Object.getOwnPropertySymbols,xt=Object.create,wt=ct.propertyIsEnumerable,Ct=ut.splice,_t=Object.keys,kt=te(lt,"Map"),Et=te(lt,"Set"),St=te(lt,"WeakMap"),Tt=te(Object,"create"),Mt=kt?ft.call(kt):"",Ot=Et?ft.call(Et):"",Nt=St?ft.call(St):"",At=gt?gt.prototype:void 0,Pt=At?At.valueOf:void 0,Lt=ee(),Dt=W("length"),Rt=bt||function(){return[]};(kt&&ne(new kt)!=Ae||Et&&ne(new Et)!=Re||St&&ne(new St)!=Fe)&&(ne=function(e){var t=pt.call(e),n=t==Le?e.constructor:null,r="function"==typeof n?ft.call(n):"";if(r)switch(r){case Mt:return Ae;case Ot:return Re;case Nt:return Fe}return t});var It=Array.isArray,jt=mt?function(e){return e instanceof mt}:xe(!1);p.prototype=Tt?Tt(null):ct,y.prototype.clear=b,y.prototype["delete"]=x,y.prototype.get=w,y.prototype.has=C,y.prototype.set=_,k.prototype.clear=E,k.prototype["delete"]=S,k.prototype.get=T,k.prototype.has=M,k.prototype.set=O, -e.exports=j}).call(t,n(48)(e),function(){return this}())},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function r(e){return!!e&&"object"==typeof e}function i(e){if(!r(e)||u.call(e)!=o||n(e))return!1;var t=c(e);if(null===t)return!0;var i=t.constructor;return"function"==typeof i&&i instanceof i&&s.call(i)==l}var o="[object Object]",a=Object.prototype,s=Function.prototype.toString,l=s.call(Object),u=a.toString,c=Object.getPrototypeOf;e.exports=i},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function a(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function s(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function l(e){return function(t){return null==t?void 0:t[e]}}function u(e){var t=e?e.length:void 0;return m(t)&&(U(e)||y(e)||f(e))?r(t,String):null}function c(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||D;return e===n}function f(e){return p(e)&&R.call(e,"callee")&&(!B.call(e,"callee")||I.call(e)==w)}function d(e){return null!=e&&m(H(e))&&!h(e)}function p(e){return v(e)&&d(e)}function h(e){var t=g(e)?I.call(e):"";return t==C||t==_}function m(e){return"number"==typeof e&&e>-1&&e%1==0&&x>=e}function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){return!!e&&"object"==typeof e}function y(e){return"string"==typeof e||!U(e)&&v(e)&&I.call(e)==k}function b(e){for(var t=-1,n=c(e),r=s(e),i=r.length,a=u(e),l=!!a,f=a||[],d=f.length;++t-1&&e%1==0&&t>e}function o(e,t,n){(void 0!==n&&!m(e[t],n)||"number"==typeof t&&void 0===n&&!(t in e))&&(e[t]=n)}function a(e,t,n){var r=e[t];ie.call(e,t)&&m(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function s(e,t,n,i,a){if(e!==t){var u=le(t)||_(t)?void 0:M(t);r(u||t,function(r,c){if(u&&(c=r,r=t[c]),w(r))a||(a=new E),l(e,t,c,n,s,i,a);else{var f=i?i(e[c],r,c+"",e,t,a):void 0;void 0===f&&(f=r),o(e,c,f)}})}}function l(e,t,n,r,i,a,s){var l=e[n],u=t[n],f=s.get(u);if(f)return void o(e,n,f);var d=a?a(l,u,n+"",e,t,s):void 0,p=void 0===d;p&&(d=u,le(u)||_(u)?le(l)?d=l:y(l)?d=c(l):(p=!1,d=S(u,!a)):T(u)||g(u)?g(l)?d=k(l):!w(l)||r&&b(l)?(p=!1,d=S(u,!a)):d=l:p=!1),s.set(u,d),p&&i(d,u,r,a,s),s["delete"](u),o(e,n,d)}function u(e){return function(t){return null==t?void 0:t[e]}}function c(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&h(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&N>=e}function w(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function C(e){return!!e&&"object"==typeof e}function _(e){return C(e)&&x(e.length)&&!!ne[oe.call(e)]}function k(e){return f(e,M(e))}var E=n(197),S=n(301),T=n(303),M=n(304),O=n(202),N=9007199254740991,A="[object Arguments]",P="[object Array]",L="[object Boolean]",D="[object Date]",R="[object Error]",I="[object Function]",j="[object GeneratorFunction]",F="[object Map]",B="[object Number]",H="[object Object]",U="[object RegExp]",W="[object Set]",z="[object String]",q="[object WeakMap]",V="[object ArrayBuffer]",K="[object Float32Array]",$="[object Float64Array]",G="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",Q="[object Uint8Array]",Z="[object Uint8ClampedArray]",J="[object Uint16Array]",ee="[object Uint32Array]",te=/^(?:0|[1-9]\d*)$/,ne={};ne[K]=ne[$]=ne[G]=ne[Y]=ne[X]=ne[Q]=ne[Z]=ne[J]=ne[ee]=!0,ne[A]=ne[P]=ne[V]=ne[L]=ne[D]=ne[R]=ne[I]=ne[F]=ne[B]=ne[H]=ne[U]=ne[W]=ne[z]=ne[q]=!1;var re=Object.prototype,ie=re.hasOwnProperty,oe=re.toString,ae=re.propertyIsEnumerable,se=u("length"),le=Array.isArray,ue=p(function(e,t,n){s(e,t,n)});e.exports=ue},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;tn;n++)t[n]=arguments[n];return function(e){return function(n,r,i){var a=e(n,r,i),l=a.dispatch,u=[],c={getState:a.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(c)}),l=s["default"].apply(void 0,u)(a.dispatch),o({},a,{dispatch:l})}}}var o=Object.assign||function(e){for(var t=1;t-1?t.documentElement.innerHTML=e:t.body.innerHTML=e,t},e}function l(e){var t=(new E).parseFromString(e,"text/html");return w(t,i),t}function u(e){for(var t,n,r,i=[e],o=[];i.length>0;)for(t=i.shift(),o.push(t),n=t.childNodes,r=0;r<",">"+t+"<")}function d(e,t){if("string"==typeof t)return t===e.nodeName.toLowerCase();if(Array.isArray(t))return-1!==t.indexOf(e.nodeName.toLowerCase());if("function"==typeof t)return t.call(g,e);throw new TypeError("`filter` needs to be a string, array, or function")}function p(e,t){var n,r,o;return"left"===e?(n=t.previousSibling,r=/ $/):(n=t.nextSibling,r=/^ /),n&&(3===n.nodeType?o=r.test(n.nodeValue):1!==n.nodeType||i(n)||(o=r.test(n.textContent))),o}function h(e){var t="",n="";if(!i(e)){var r=/^[ \r\n\t]/.test(e.innerHTML),o=/[ \r\n\t]$/.test(e.innerHTML);r&&!p("left",e)&&(t=" "),o&&!p("right",e)&&(n=" ")}return{leading:t,trailing:n}}function m(e){var t,n=c(e);if(!o(e)&&!/A/.test(e.nodeName)&&/^\s*$/i.test(n))return void(e._replacement="");for(var i=0;i=0;o--)m(i[o]);return n=c(r),n.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,"").replace(/\n\s+\n/g,"\n\n").replace(/\n{3,}/g,"\n\n")},g.isBlock=i,g.isVoid=o,g.trim=r,g.outer=f,e.exports=g},function(e,t){"use strict";function n(e,t){var n=Array.prototype.indexOf.call(t.parentNode.childNodes,t),r=" ";return 0===n&&(r="| "),r+e+" |"}var r=/highlight highlight-(\S+) lang-(\S+)/;e.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}},{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(e,t){return n(e,t)}},{filter:"tr",replacement:function(e,t){var r="",i={left:":--",right:"--:",center:":-:"};if("THEAD"===t.parentNode.nodeName)for(var o=0;oi;i++)r+="#";return"\n\n"+r+" "+e+"\n\n"}},{filter:"hr",replacement:function(){return"\n\n* * *\n\n"}},{filter:["em","i"],replacement:function(e){return"_"+e+"_"}},{filter:["strong","b"],replacement:function(e){return"**"+e+"**"}},{filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){return"`"+e+"`"}},{filter:function(e){return"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.title?' "'+t.title+'"':"";return"["+e+"]("+t.getAttribute("href")+n+")"}},{filter:"img",replacement:function(e,t){var n=t.alt||"",r=t.getAttribute("src")||"",i=t.title||"",o=i?' "'+i+'"':"";return r?"!["+n+"]("+r+o+")":""}},{filter:function(e){return"PRE"===e.nodeName&&"CODE"===e.firstChild.nodeName},replacement:function(e,t){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},{filter:"blockquote",replacement:function(e){return e=this.trim(e),e=e.replace(/\n{3,}/g,"\n\n"),e=e.replace(/^/gm,"> "),"\n\n"+e+"\n\n"}},{filter:"li",replacement:function(e,t){e=e.replace(/^\s+/,"").replace(/\n/gm,"\n ");var n="* ",r=t.parentNode,i=Array.prototype.indexOf.call(r.children,t)+1;return n=/ol/i.test(r.nodeName)?i+". ":"* ",n+e}},{filter:["ul","ol"],replacement:function(e,t){for(var n=[],r=0;r[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return e.Pass;for(var o=i.listSelections(),a=[],s=0;s")>=0?p[2]:parseInt(p[3],10)+1+p[4];a[s]="\n"+h+v+m}}i.replaceSelections(a)}})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,r){function i(e){return e.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var a=1+e.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},s={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var u in r)s[u]=r[u];return s.name="markdown",e.overlayMode(e.getMode(n,s),a)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";function t(e,t,n){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}e.defineMode("javascript",function(n,r){function i(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}function o(e,t,n){return xe=e,Ae=n,t}function a(e,n){var r=e.next();if('"'==r||"'"==r)return n.tokenize=s(r),n.tokenize(e,n);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==r&&e.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return o(r);if("="==r&&e.eat(">"))return o("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),o("number","number");if("0"==r&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),o("number","number");if("0"==r&&e.eat(/b/i))return e.eatWhile(/[01]/i),o("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==r)return e.eat("*")?(n.tokenize=u,u(e,n)):e.eat("/")?(e.skipToEnd(),o("comment","comment")):t(e,n,1)?(i(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(e.eatWhile(Ne),o("operator","operator",e.current()));if("`"==r)return n.tokenize=l,l(e,n);if("#"==r)return e.skipToEnd(),o("error","error");if(Ne.test(r))return e.eatWhile(Ne),o("operator","operator",e.current());if(Ee.test(r)){e.eatWhile(Ee);var a=e.current(),c=Se.propertyIsEnumerable(a)&&Se[a];return c&&"."!=n.lastType?o(c.type,c.style,a):o("variable","variable",a)}}function s(e){return function(t,n){var r,i=!1;if(Pe&&"@"==t.peek()&&t.match(Me))return n.tokenize=a,o("jsonld-keyword","meta");for(;null!=(r=t.next())&&(r!=e||i);)i=!i&&"\\"==r;return i||(n.tokenize=a),o("string","string")}}function u(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=a;break}r="*"==n}return o("comment","comment")}function l(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=a;break}r=!r&&"\\"==n}return o("quasi","string-2",e.current())}function c(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(0>n)){for(var r=0,i=!1,o=n-1;o>=0;--o){var a=e.string.charAt(o),s=Oe.indexOf(a);if(s>=0&&3>s){if(!r){++o;break}if(0==--r)break}else if(s>=3&&6>s)++r;else if(Ee.test(a))i=!0;else{if(/["'\/]/.test(a))return;if(i&&!r){++o;break}}}i&&!r&&(t.fatArrowAt=o)}}function f(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function d(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(var n=r.vars;n;n=n.next)if(n.name==t)return!0}function p(e,t,n,r,i){var o=e.cc;for(Re.state=e,Re.stream=i,Re.marked=null,Re.cc=o,Re.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():Ce?k:w;if(a(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Re.marked?Re.marked:"variable"==n&&d(e,r)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Re.cc.push(arguments[e])}function m(){return h.apply(null,arguments),!0}function v(e){function t(t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}var n=Re.state;if(Re.marked="def",n.context){if(t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Re.state.context={prev:Re.state.context,vars:Re.state.localVars},Re.state.localVars=je}function y(){Re.state.localVars=Re.state.context.vars,Re.state.context=Re.state.context.prev}function b(e,t){var n=function(){var n=Re.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new f(r,Re.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function x(){var e=Re.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function A(e){function t(n){return n==e?m():";"==e?h():m(t)}return t}function w(e,t){return"var"==e?m(b("vardef",t.length),J,A(";"),x):"keyword a"==e?m(b("form"),k,w,x):"keyword b"==e?m(b("form"),w,x):"{"==e?m(b("}"),V,x):";"==e?m():"if"==e?("else"==Re.state.lexical.info&&Re.state.cc[Re.state.cc.length-1]==x&&Re.state.cc.pop()(),m(b("form"),k,w,x,$)):"function"==e?m(oe):"for"==e?m(b("form"),ee,w,x):"variable"==e?m(b("stat"),z):"switch"==e?m(b("form"),k,b("}","switch"),A("{"),V,x,x):"case"==e?m(k,A(":")):"default"==e?m(A(":")):"catch"==e?m(b("form"),g,A("("),ae,A(")"),w,x,y):"class"==e?m(b("form"),se,x):"export"==e?m(b("stat"),fe,x):"import"==e?m(b("stat"),de,x):"module"==e?m(b("form"),K,b("}"),A("{"),V,x,x):h(b("stat"),k,A(";"),x)}function k(e){return C(e,!1)}function P(e){return C(e,!0)}function C(e,t){if(Re.state.fatArrowAt==Re.stream.start){var n=t?R:L;if("("==e)return m(g,b(")"),X(K,")"),x,A("=>"),n,y);if("variable"==e)return h(g,K,A("=>"),n,y)}var r=t?N:S;return Le.hasOwnProperty(e)?m(r):"function"==e?m(oe,r):"keyword c"==e?m(t?E:T):"("==e?m(b(")"),T,ye,A(")"),x,r):"operator"==e||"spread"==e?m(t?P:k):"["==e?m(b("]"),ve,x,r):"{"==e?U(W,"}",null,r):"quasi"==e?h(M,r):"new"==e?m(j(t)):m()}function T(e){return e.match(/[;\}\)\],]/)?h():h(k)}function E(e){return e.match(/[;\}\)\],]/)?h():h(P)}function S(e,t){return","==e?m(k):N(e,t,!1)}function N(e,t,n){var r=0==n?S:N,i=0==n?k:P;return"=>"==e?m(g,n?R:L,y):"operator"==e?/\+\+|--/.test(t)?m(r):"?"==t?m(k,A(":"),i):m(i):"quasi"==e?h(M,r):";"!=e?"("==e?U(P,")","call",r):"."==e?m(H,r):"["==e?m(b("]"),T,A("]"),x,r):void 0:void 0}function M(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?m(M):m(k,O)}function O(e){return"}"==e?(Re.marked="string-2",Re.state.tokenize=l,m(M)):void 0}function L(e){return c(Re.stream,Re.state),h("{"==e?w:k)}function R(e){return c(Re.stream,Re.state),h("{"==e?w:P)}function j(e){return function(t){return"."==t?m(e?I:D):h(e?P:k)}}function D(e,t){return"target"==t?(Re.marked="keyword",m(S)):void 0}function I(e,t){return"target"==t?(Re.marked="keyword",m(N)):void 0}function z(e){return":"==e?m(x,w):h(S,A(";"),x)}function H(e){return"variable"==e?(Re.marked="property",m()):void 0}function W(e,t){return"variable"==e||"keyword"==Re.style?(Re.marked="property",m("get"==t||"set"==t?F:q)):"number"==e||"string"==e?(Re.marked=Pe?"property":Re.style+" property",m(q)):"jsonld-keyword"==e?m(q):"modifier"==e?m(W):"["==e?m(k,A("]"),q):"spread"==e?m(k):void 0}function F(e){return"variable"!=e?h(q):(Re.marked="property",m(oe))}function q(e){return":"==e?m(P):"("==e?h(oe):void 0}function X(e,t){function n(r){if(","==r){var i=Re.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),m(e,n)}return r==t?m():m(A(t))}return function(r){return r==t?m():h(e,n)}}function U(e,t,n){for(var r=3;r!?|~^]/,Me=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Oe="([{}])",Le={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Re={state:null,column:null,marked:null,cc:null},je={name:"this",next:{name:"arguments"}};return x.lex=!0,{startState:function(e){var t={tokenize:a,lastType:"sof",cc:[],lexical:new f((e||0)-we,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),c(e,t)),t.tokenize!=u&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==xe?n:(t.lastType="operator"!=xe||"++"!=Ae&&"--"!=Ae?xe:"incdec",p(t,n,xe,Ae,e))},indent:function(t,n){if(t.tokenize==u)return e.Pass;if(t.tokenize!=a)return 0;var i=n&&n.charAt(0),o=t.lexical;if(!/^\s*else\b/.test(n))for(var s=t.cc.length-1;s>=0;--s){var l=t.cc[s];if(l==x)o=o.prev;else if(l!=$)break}"stat"==o.type&&"}"==i&&(o=o.prev),ke&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var c=o.type,f=i==c;return"vardef"==c?o.indented+("operator"==t.lastType||","==t.lastType?o.info+1:0):"form"==c&&"{"==i?o.indented:"form"==c?o.indented+we:"stat"==c?o.indented+(be(t,n)?ke||we:0):"switch"!=o.info||f||0==r.doubleIndentSwitch?o.align?o.column+(f?0:1):o.indented+(f?0:we):o.indented+(/^(?:case|default)\b/.test(n)?we:2*we)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ce?null:"/*",blockCommentEnd:Ce?null:"*/",lineComment:Ce?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ce?"json":"javascript",jsonldMode:Pe,jsonMode:Ce,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];(t==k||t==P)&&e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(e,t,n){!function(e){e(n(18),n(167),n(166))}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function s(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,w||e.f!=l||(e.f=h,e.block=u),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function u(e,t){var o=e.sol(),s=t.list!==!1,u=t.indentedCode;t.indentedCode=!1,s&&(t.indentationDiff>=0?(t.indentationDiff<4&&(t.indentation-=t.indentationDiff),t.list=null):t.indentation>0?(t.list=null,t.listDepth=Math.floor(t.indentation/4)):(t.list=!1,t.listDepth=0));var l=null;if(t.indentationDiff>=4)return e.skipToEnd(),u||a(t.prevLine)?(t.indentation-=4,t.indentedCode=!0,C.code):null;if(e.eatSpace())return null;if((l=e.match(O))&&l[1].length<=6)return t.header=l[1].length,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(!(a(t.prevLine)||t.quote||s||u)&&(l=e.match(L)))return t.header="="==l[0].charAt(0)?1:2,n.highlightFormatting&&(t.formatting="header"),t.f=t.inline,d(t);if(e.eat(">"))return t.quote=o?1:t.quote+1,n.highlightFormatting&&(t.formatting="quote"),e.eatSpace(),d(t);if("["===e.peek())return i(e,t,y);if(e.match(E,!0))return t.hr=!0,C.hr;if((a(t.prevLine)||s)&&(e.match(S,!1)||e.match(N,!1))){var f=null;return e.match(S,!0)?f="ul":(e.match(N,!0),f="ol"),t.indentation=e.column()+e.current().length,t.list=!0,t.listDepth++,n.taskLists&&e.match(M,!1)&&(t.taskList=!0),t.f=t.inline,n.highlightFormatting&&(t.formatting=["list","list-"+f]),d(t)}return n.fencedCodeBlocks&&(l=e.match(j,!0))?(t.fencedChars=l[1],t.localMode=r(l[2]),t.localMode&&(t.localState=t.localMode.startState()),t.f=t.block=c,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0,d(t)):i(e,t,t.inline)}function l(e,t){var n=k.token(e,t.htmlState);return(w&&null===t.htmlState.tagStart&&!t.htmlState.context&&t.htmlState.tokenize.isInText||t.md_inside&&e.current().indexOf(">")>-1)&&(t.f=h,t.block=u,t.htmlState=null),n}function c(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=f,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),C.code)}function f(e,t){e.match(t.fencedChars),t.block=u,t.f=h,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=!0;var r=d(t);return t.code=!1,r}function d(e){var t=[];if(e.formatting){t.push(C.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r=e.quote?t.push(C.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(C.linkHref,"url"):(e.strong&&t.push(C.strong),e.em&&t.push(C.em),e.strikethrough&&t.push(C.strikethrough),e.linkText&&t.push(C.linkText),e.code&&t.push(C.code)),e.header&&t.push(C.header,C.header+"-"+e.header),e.quote&&(t.push(C.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(C.quote+"-"+e.quote):t.push(C.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listDepth-1)%3;i?1===i?t.push(C.list2):t.push(C.list3):t.push(C.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function p(e,t){return e.match(R,!0)?d(t):void 0}function h(t,r){var i=r.text(t,r);if("undefined"!=typeof i)return i;if(r.list)return r.list=null,d(r);if(r.taskList){var a="x"!==t.match(M,!0)[1];return a?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,d(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),d(r);var s=t.sol(),u=t.next();if("\\"===u&&(t.next(),n.highlightFormatting)){var c=d(r),f=C.formatting+"-escape";return c?c+" "+f:f}if(r.linkTitle){r.linkTitle=!1;var p=u;"("===u&&(p=")"),p=(p+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var h="^\\s*(?:[^"+p+"\\\\]+|\\\\\\\\|\\\\.)"+p;if(t.match(new RegExp(h),!0))return C.linkHref}if("`"===u){var g=r.formatting;n.highlightFormatting&&(r.formatting="code");var y=d(r),b=t.pos;t.eatWhile("`");var x=1+t.pos-b;return r.code?x===P?(r.code=!1,y):(r.formatting=g,d(r)):(P=x,r.code=!0,d(r))}if(r.code)return d(r);if("!"===u&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),r.inline=r.f=v,C.image;if("["===u&&t.match(/.*\](\(.*\)| ?\[.*\])/,!1))return r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),d(r);if("]"===u&&r.linkText&&t.match(/\(.*\)| ?\[.*\]/,!1)){n.highlightFormatting&&(r.formatting="link");var c=d(r);return r.linkText=!1,r.inline=r.f=v,c}if("<"===u&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var c=d(r);return c?c+=" ":c="",c+C.linkInline}if("<"===u&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var c=d(r);return c?c+=" ":c="",c+C.linkEmail}if("<"===u&&t.match(/^(!--|\w)/,!1)){var A=t.string.indexOf(">",t.pos);if(-1!=A){var w=t.string.substring(t.start,A);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(w)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(k),o(t,r,l)}if("<"===u&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";var T=!1;if(!n.underscoresBreakWords&&"_"===u&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var E=t.pos-2;if(E>=0){var S=t.string.charAt(E);"_"!==S&&S.match(/(\w)/,!1)&&(T=!0)}}if("*"===u||"_"===u&&!T)if(s&&" "===t.peek());else{if(r.strong===u&&t.eat(u)){n.highlightFormatting&&(r.formatting="strong");var y=d(r);return r.strong=!1,y}if(!r.strong&&t.eat(u))return r.strong=u,n.highlightFormatting&&(r.formatting="strong"),d(r);if(r.em===u){n.highlightFormatting&&(r.formatting="em");var y=d(r);return r.em=!1,y}if(!r.em)return r.em=u,n.highlightFormatting&&(r.formatting="em"),d(r)}else if(" "===u&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return d(r);t.backUp(1)}if(n.strikethrough)if("~"===u&&t.eatWhile(u)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var y=d(r);return r.strikethrough=!1,y}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),d(r)}else if(" "===u&&t.match(/^~~/,!0)){if(" "===t.peek())return d(r);t.backUp(2)}return" "===u&&(t.match(/ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),d(r)}function m(e,t){var r=e.next();if(">"===r){t.f=t.inline=h,n.highlightFormatting&&(t.formatting="link");var i=d(t);return i?i+=" ":i="",i+C.linkInline}return e.match(/^[^>]+/,!0),C.linkInline}function v(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=g("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,d(t)):"error"}function g(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=h,n.highlightFormatting&&(r.formatting="link-string");var o=d(r);return r.linkHref=!1,o}return t.match(A(e),!0)&&t.backUp(1),r.linkHref=!0,d(r)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=b,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,d(t)):i(e,t,h)}function b(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=x,n.highlightFormatting&&(t.formatting="link");var r=d(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),C.linkText}function x(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=h,C.linkHref+" url")}function A(e){return D[e]||(e=(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),D[e]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+e+")")),D[e]}var w=e.modes.hasOwnProperty("xml"),k=e.getMode(t,w?{name:"xml",htmlMode:!0}:"text/plain");void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var P=0,C={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var T in C)C.hasOwnProperty(T)&&n.tokenTypeOverrides[T]&&(C[T]=n.tokenTypeOverrides[T]);var E=/^([*\-_])(?:\s*\1){2,}\s*$/,S=/^[*\-+]\s+/,N=/^[0-9]+([.)])\s+/,M=/^\[(x| )\](?=\s)/,O=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,L=/^ *(?:\={1,}|-{1,})\s*$/,R=/^[^#!\[\]*_\\<>` "'(~]+/,j=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#]*)"),D=[],I={startState:function(){return{f:u,prevLine:null,thisLine:null,block:u,htmlState:null,indentation:0,inline:h,text:p,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(k,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listDepth:t.listDepth,quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(s(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length,i=4*Math.floor((r-t.indentation)/4);i>4&&(i=4);var o=t.indentation+i;if(t.indentationDiff=o-t.indentation,t.indentation=o,r>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==l?{state:e.htmlState,mode:k}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:I}},blankLine:s,getType:d,fold:"markdown"};return I},"xml"),e.defineMIME("text/x-markdown","markdown")})},function(e,t,n){!function(e){e(n(18))}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET", +mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps"},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["py","pyw"]},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"MariaDB",mime:"text/x-mariadb",mode:"sql"},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n")):null:e.match("--")?n(u("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(l(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=u("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=o,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function u(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function l(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=l(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=l(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function d(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),h):"closeTag"==e?m:p}function h(e,t,n){return"word"==e?(n.tagName=t.current(),E="tag",y):(E="error",h)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r?(E="tag",v):(E="tag error",g)}return E="error",g}function v(e,t,n){return"endTag"!=e?(E="error",v):(f(n),p)}function g(e,t,n){return E="error",v(e,t,n)}function y(e,t,n){if("word"==e)return E="attribute",b;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||k.autoSelfClosers.hasOwnProperty(r)?d(n,r):(d(n,r),n.context=new c(n,r,i==n.indented)),p}return E="error",y}function b(e,t,n){return"equals"==e?x:(k.allowMissing||(E="error"),y(e,t,n))}function x(e,t,n){return"string"==e?A:"word"==e&&k.allowUnquoted?(E="string",y):(E="error",y(e,t,n))}function A(e,t,n){return"string"==e?A:y(e,t,n)}var w=r.indentUnit,k={},P=i.htmlMode?t:n;for(var C in P)k[C]=P[C];for(var C in i)k[C]=i[C];var T,E;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(E=null,t.state=t.state(T||n,e,t),E&&(n="error"==E?n+" error":E)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return k.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+w*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/$/,blockCommentStart:"",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(e){e.state==x&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(e,t,n){"use strict";function r(e){return!(!e||!l[e.nodeName])}function i(e){return!(!e||!u[e.nodeName])}function o(e,t){if(e.firstChild&&"PRE"!==e.nodeName){"function"!=typeof t&&(t=r);for(var n=null,o=!1,u=null,l=s(u,e);l!==e;){if(3===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(n&&!/ $/.test(n.data)||o||" "!==c[0]||(c=c.substr(1)),!c){l=a(l);continue}l.data=c,n=l}else{if(1!==l.nodeType){l=a(l);continue}t(l)||"BR"===l.nodeName?(n&&(n.data=n.data.replace(/ $/,"")),n=null,o=!1):i(l)&&(n=null,o=!0)}var f=s(u,l);u=l,l=f}n&&(n.data=n.data.replace(/ $/,""),n.data||a(n))}}function a(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function s(e,t){return e&&e.parentNode===t||"PRE"===t.nodeName?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var u=n(331);Object.keys(u).forEach(function(e){u[e.toUpperCase()]=1});var l={};n(158).forEach(function(e){l[e.toUpperCase()]=1}),e.exports=o},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,"@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}to{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}to{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden;z-index:2000}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;left:0;position:absolute;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:'';display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:16px;left:0;position:absolute;top:0;visibility:hidden;z-index:2000}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:none}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards .16s forwards linear;animation:medium-editor-pop-upwards .16s forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:Helvetica Neue,Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-actions:after{clear:both;content:\"\";display:table}[data-medium-editor-element] img{max-width:100%}[data-medium-editor-element] sub{vertical-align:sub}[data-medium-editor-element] sup{vertical-align:super}.medium-editor-hidden{display:none}",""])},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".medium-toolbar-arrow-under:after{border-color:#242424 transparent transparent;top:50px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #242424;top:-8px}.medium-editor-toolbar{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.75));background:linear-gradient(180deg,#242424,rgba(36,36,36,.75));border:1px solid #000;border-radius:5px;box-shadow:0 0 3px #000}.medium-editor-toolbar li button{background-color:#242424;background:-webkit-linear-gradient(top,#242424,rgba(36,36,36,.89));background:linear-gradient(180deg,#242424,rgba(36,36,36,.89));border:0;border-right:1px solid #000;border-left:1px solid #333;border-left:1px solid hsla(0,0%,100%,.1);box-shadow:0 2px 2px rgba(0,0,0,.3);color:#fff;height:50px;min-width:50px;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.medium-editor-toolbar li button:hover{background-color:#000;color:#ff0}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:5px;border-top-left-radius:5px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:5px;border-top-right-radius:5px}.medium-editor-toolbar li .medium-editor-button-active{background-color:#000;background:-webkit-linear-gradient(top,#242424,rgba(0,0,0,.89));background:linear-gradient(180deg,#242424,rgba(0,0,0,.89));color:#fff}.medium-editor-toolbar-form{background:#242424;border-radius:5px;color:#999}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#242424;box-sizing:border-box;color:#ccc;height:50px}.medium-editor-toolbar-form a{color:#fff}.medium-editor-toolbar-anchor-preview{background:#242424;border-radius:5px;color:#fff}.medium-editor-placeholder:after{color:#b3b3b1}",""])},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,"/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}",""])},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,"@import url(https://fonts.googleapis.com/css?family=Cousine:400,700,700italic,400italic);",""]),t.push([e.id,".cm-s-atlas.CodeMirror{background:#fff;color:#202020;font-family:Atlas Typewriter,Cousine,Monaco,monospace;font-weight:300;height:auto}.cm-s-atlas .CodeMirror-line::selection,.cm-s-atlas .CodeMirror-line>span::selection,.cm-s-atlas .CodeMirror-line>span>span::selection,.cm-s-atlas div.CodeMirror-selected{background:#90caf9}.cm-s-atlas .CodeMirror-line::-moz-selection,.cm-s-atlas .CodeMirror-line>span::-moz-selection,.cm-s-atlas .CodeMirror-line>span>span::-moz-selection{background:#e0e0e0}.cm-s-atlas .CodeMirror-gutters{background:#f5f5f5;border-right:0}.cm-s-atlas .CodeMirror-guttermarker{color:#ac4142}.cm-s-atlas .CodeMirror-guttermarker-subtle,.cm-s-atlas .CodeMirror-linenumber{color:#b0b0b0}.cm-s-atlas .CodeMirror-cursor{border-left:2px solid #2196f3}.cm-s-atlas span.cm-quote{font-style:italic}.cm-s-atlas span.cm-comment{color:#8f5536}.cm-s-atlas span.cm-atom,.cm-s-atlas span.cm-number{color:#aa759f}.cm-s-atlas span.cm-attribute,.cm-s-atlas span.cm-property{color:#90a959}.cm-s-atlas span.cm-keyword{color:#ac4142}.cm-s-atlas span.cm-string{color:#f4bf75}.cm-s-atlas span.cm-variable{color:#90a959}.cm-s-atlas span.cm-variable-2{color:#788696}.cm-s-atlas span.cm-def{color:#d28445}.cm-s-atlas span.cm-bracket{color:#202020}.cm-s-atlas span.cm-tag{color:#ac4142}.cm-s-atlas span.cm-link{color:#aa759f}.cm-s-atlas span.cm-error{background:#ac4142;color:#505050}.cm-s-atlas .CodeMirror-activeline-background{background:#dddcdc}.cm-s-atlas .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}",""])},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,"@font-face{font-family:Atlas Grotesk;src:url("+n(327)+") format('woff');font-weight:400;font-style:normal}@font-face{font-family:Atlas Grotesk;src:url("+n(328)+") format('woff');font-weight:400;font-style:italic}@font-face{font-family:Atlas Grotesk;src:url("+n(326)+") format('woff');font-weight:700;font-style:normal}@font-face{font-family:Atlas Grotesk;src:url("+n(141)+") format('woff');font-weight:700;font-style:italic}@font-face{font-family:Atlas Grotesk;src:url("+n(141)+") format('woff');font-weight:700;font-style:italic}@font-face{font-family:Atlas Typewriter;src:url("+n(330)+") format('woff');font-weight:400;font-style:normal}@font-face{font-family:Atlas Typewriter;src:url("+n(329)+") format('woff');font-weight:700;font-style:normal}",""])},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".Header__header___1hCuT{display:flex;width:100%;height:42px;position:fixed;z-index:9999;justify-content:space-between;background-color:#111;color:#fff}.Header__header___1hCuT i{color:#fff;font-family:serif}.Header__header___1hCuT .Header__headerItem___QODyV{width:150px;padding:12px 22px;font-size:13px;font-weight:300;font-family:Atlas Grotesk,Helvetica Neue,sans-serif;text-align:center}.Header__header___1hCuT .Header__headerItem___QODyV:first-child{text-align:left}.Header__header___1hCuT .Header__headerItem___QODyV:last-child{text-align:right}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div{margin-right:12px;cursor:pointer;opacity:.4;color:#fff}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div.Header__active___2vcAt{opacity:1}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div:first-child{margin-top:2px;margin-right:15px}.Header__header___1hCuT .Header__editorToggle___2Bcm9 div:last-child{margin-top:-2px}.Header__header___1hCuT .Header__textIcon___T7vs0{font-family:Times,serif;font-size:20px}",""]),t.locals={header:"Header__header___1hCuT",headerItem:"Header__headerItem___QODyV",editorToggle:"Header__editorToggle___2Bcm9",active:"Header__active___2vcAt",textIcon:"Header__textIcon___T7vs0"}},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".MarkdownEditor__container___m9ImS{font-weight:400;font-size:1em;line-height:1.5em;margin:0 auto;padding:2em 3em;max-width:50em}@media all and (max-width:2000px) and (min-width:960px){.MarkdownEditor__container___m9ImS{font-size:1.1em}}",""]),t.locals={container:"MarkdownEditor__container___m9ImS"}},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".TextEditor__container___1wyeS{font-weight:400;font-size:1em;line-height:1.5em;margin:0 auto;padding:2em 3em;max-width:50em}.TextEditor__editor___23Qnn{outline:none;font-family:Atlas Grotesk,Helvetica Neue,sans-serif}@media all and (max-width:2000px) and (min-width:960px){.TextEditor__container___1wyeS{font-size:1.1em}}",""]),t.locals={container:"TextEditor__container___1wyeS",editor:"TextEditor__editor___23Qnn"}},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".App__container___355Yh{display:flex;flex-flow:column;width:100%;height:100%;background-color:#fff;font-family:-apple-system,Helvetica Neue,Lucida Grande;color:#222}",""]),t.locals={container:"App__container___355Yh"}},function(e,t,n){t=e.exports=n(12)(),t.push([e.id,".Dashboard__container___2SQeY{display:flex;padding-top:48px}.Dashboard__panel___3wTFN{width:50%}.Dashboard__fullscreen___2vN3A{width:100%}.Dashboard__markdown___fMe4o{background-color:#fff}",""]),t.locals={container:"Dashboard__container___2SQeY",panel:"Dashboard__panel___3wTFN",fullscreen:"Dashboard__fullscreen___2vN3A",markdown:"Dashboard__markdown___fMe4o"}},function(e,t,n){function r(e){return null===e||void 0===e}function i(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function o(e,t,n){var o,c;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(u(e))return u(t)?(e=a.call(e),t=a.call(t),l(e,t,n)):!1;if(i(e)){if(!i(t))return!1;if(e.length!==t.length)return!1;for(o=0;o=0;o--)if(f[o]!=d[o])return!1;for(o=f.length-1;o>=0;o--)if(c=f[o],!l(e[c],t[c],n))return!1;return typeof e==typeof t}var a=Array.prototype.slice,s=n(181),u=n(180),l=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:o(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var i="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=i?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return i(e.replace(o,"ms-"))}var i=n(182),o=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return r(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=n(193);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(c);return t&&t[1].toLowerCase()}function i(e,t){var n=l;l?void 0:u(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var c=o[0];c--;)n=n.lastChild}else n.innerHTML=e;var f=n.getElementsByTagName("script");f.length&&(t?void 0:u(!1),a(f).forEach(t));for(var d=a(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var o=n(5),a=n(184),s=n(85),u=n(1),l=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;e.exports=i},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return i(e).replace(o,"-ms-")}var i=n(187),o=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(189);e.exports=r},function(e,t){"use strict";function n(e,t,n){if(!e)return null;var i={};for(var o in e)r.call(e,o)&&(i[o]=t.call(n,e[o],o,e));return i}var r=Object.prototype.hasOwnProperty;e.exports=n},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?i(!1):void 0,"number"!=typeof t?i(!1):void 0,0===t||t-1 in e?void 0:i(!1),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;t>o;o++)r[o]=e[o];return r}var i=n(1);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e){return l.indexOf(e)>-1}function o(e){return u["default"](e)&&"undefined"!=typeof e.type&&Object.keys(e).every(i)}function a(e){return e.error===!0}t.__esModule=!0,t.isFSA=o,t.isError=a;var s=n(202),u=r(s),l=["type","payload","error","meta"]},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var i=Object.getOwnPropertyNames(t),o=0;o-1?t:e}function c(e,t){t=t||{};var n=t.body;if(c.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",(t.headers||!this.headers)&&(this.headers=new r(t.headers)),this.method=l(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function d(e){var t=new r,n=e.getAllResponseHeaders().trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function p(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype["delete"]=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var h={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];c.prototype.clone=function(){return new c(this)},u.call(c.prototype),u.call(p.prototype),p.prototype.clone=function(){return new p(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},p.error=function(){var e=new p(null,{status:0,statusText:""});return e.type="error",e};var v=[301,302,303,307,308];p.redirect=function(e,t){if(-1===v.indexOf(t))throw new RangeError("Invalid status code");return new p(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=c,e.Response=p,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=c.prototype.isPrototypeOf(e)&&!t?e:new c(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(100>e||e>599)return void r(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:d(a),url:i()},o="response"in a?a.response:a.responseText;n(new p(o,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),e.exports=t.fetch}).call(t)}).call(t,function(){return this}())},function(e,t){e.exports={name:"BeautifulAtlas",version:"0.0.1",description:"For writing",main:"index.js",scripts:{clean:"rimraf dist","build:webpack":"cross-env NODE_ENV=production webpack --config webpack.config.prod.js --progress --colors",build:"npm run clean && npm run build:webpack",start:"node server.js",lint:"eslint src"},repository:{type:"git",url:"git+ssh://git@github.com/jorilallo/atlas.git"},author:"Jori Lallo",license:"ISC",bugs:{url:"https://github.com/jorilallo/atlas/issues"},homepage:"https://github.com/jorilallo/atlas#readme",dependencies:{express:"^4.13.4",react:"^0.14.7","react-dom":"^0.14.7","body-parser":"^1.15.0"},devDependencies:{"babel-core":"^6.4.5","babel-eslint":"^4.1.8","babel-loader":"^6.2.1","babel-preset-es2015":"^6.3.13","babel-preset-react":"^6.3.13","babel-preset-react-hmre":"^1.0.1","babel-preset-stage-0":"^6.5.0",classnames:"^2.2.3",codemirror:"^5.11.0","cross-env":"^1.0.7","css-loader":"^0.23.1",dotenv:"^2.0.0",eslint:"^1.10.3","eslint-config-airbnb":"^5.0.0","eslint-plugin-react":"^3.16.1","exports-loader":"^0.6.3",fetch:"^1.0.1","file-loader":"^0.8.5",history:"^1.17.0","imports-loader":"^0.6.5","json-loader":"^0.5.4",lodash:"^4.3.0",marked:"^0.3.5","node-sass":"^3.4.2","normalize.css":"^3.0.3",react:"^0.14.7","react-codemirror":"^0.2.5","react-medium-editor":"^1.6.2","react-redux":"^4.4.0","react-router":"^2.0.0",redux:"^3.3.1","redux-storage":"^4.0.0","redux-storage-engine-localstorage":"^1.0.0","sass-loader":"^3.1.2","style-loader":"^0.13.0","to-markdown":"^2.0.1","url-loader":"^0.5.7",webpack:"^1.12.12","webpack-dev-middleware":"^1.5.1","webpack-hot-middleware":"^2.6.4","whatwg-fetch":"^0.11.0"}}},function(e,t){function n(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var r=n();e.exports=r},function(e,t,n){(function(e,n){function r(e){return e&&e.Object===Object?e:null}function i(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function o(){}function a(e,t){return u(e,t)&&delete e[t]}function s(e,t){if(ne){var n=e[t];return n===D?void 0:n}return Q.call(e,t)?e[t]:void 0}function u(e,t){return ne?void 0!==e[t]:Q.call(e,t)}function l(e,t,n){e[t]=ne&&void 0===n?D:n}function c(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():ee.call(e,n,1),!0}function k(e,t){var n=C(e,t);return 0>n?void 0:e[n][1]}function P(e,t){return C(e,t)>-1}function C(e,t){for(var n=e.length;n--;)if(N(e[n][0],t))return n;return-1}function T(e,t,n){var r=C(e,t);0>r?e.push([t,n]):e[r][1]=n}function E(e,t){var n=null==e?void 0:e[t];return R(n)?n:void 0}function S(e){var t=typeof e;return"number"==t||"boolean"==t||"string"==t&&"__proto__"!=e||null==e}function N(e,t){return e===t||e!==e&&t!==t}function M(e){var t=O(e)?_.call(e):"";return t==I||t==z}function O(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function L(e){return!!e&&"object"==typeof e}function R(e){return null==e?!1:M(e)?$.test(Y.call(e)):L(e)&&(i(e)?$:W).test(e)}var j=200,D="__lodash_hash_undefined__",I="[object Function]",z="[object GeneratorFunction]",H=/[\\^$.*+?()[\]{}|]/g,W=/^\[object .+?Constructor\]$/,F={"function":!0,object:!0},q=F[typeof t]&&t&&!t.nodeType?t:void 0,X=F[typeof e]&&e&&!e.nodeType?e:void 0,U=r(q&&X&&"object"==typeof n&&n),V=r(F[typeof self]&&self),B=r(F[typeof window]&&window),Z=r(F[typeof this]&&this),G=U||B!==(Z&&Z.window)&&B||V||Z||Function("return this")(),J=Array.prototype,K=Object.prototype,Y=Function.prototype.toString,Q=K.hasOwnProperty,_=K.toString,$=RegExp("^"+Y.call(Q).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ee=J.splice,te=E(G,"Map"),ne=E(Object,"create");o.prototype=ne?ne(null):K,c.prototype.clear=f,c.prototype["delete"]=d,c.prototype.get=p,c.prototype.has=h,c.prototype.set=m,v.prototype.clear=g,v.prototype["delete"]=y,v.prototype.get=b,v.prototype.has=x,v.prototype.set=A,e.exports=v}).call(t,n(48)(e),function(){return this}())},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&g>=e}function o(e){return a(e)&&h.call(e)==l}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null==e?!1:o(e)?m.test(d.call(e)):n(e)&&c.test(e)}var u="[object Array]",l="[object Function]",c=/^\[object .+?Constructor\]$/,f=Object.prototype,d=Function.prototype.toString,p=f.hasOwnProperty,h=f.toString,m=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),v=r(Array,"isArray"),g=9007199254740991,y=v||function(e){return n(e)&&i(e.length)&&h.call(e)==u};e.exports=y},function(e,t){function n(e){var t=r(e)?s.call(e):"";return t==i||t==o}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var i="[object Function]",o="[object GeneratorFunction]",a=Object.prototype,s=a.toString;e.exports=n},function(e,t,n){function r(e){return!!e&&"object"==typeof e}function i(e,t){return a(e,t,u)}function o(e){var t;if(!r(e)||d.call(e)!=l||s(e)||!f.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return i(e,function(e,t){n=t}),void 0===n||f.call(e,n)}var a=n(198),s=n(87),u=n(203),l="[object Object]",c=Object.prototype,f=c.hasOwnProperty,d=c.toString;e.exports=o},function(e,t,n){function r(e,t){return e="number"==typeof e||l.test(e)?+e:-1,t=null==t?d:t,e>-1&&e%1==0&&t>e}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&d>=e}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){if(null==e)return[];o(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(u(e)||s(e))&&t||0;for(var n=e.constructor,a=-1,l="function"==typeof n&&n.prototype===e,c=Array(t),d=t>0;++ae?-1:1;return t*c}var n=e%1;return e===e?n?e-n:e:0}function s(e){if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(h,"");var n=v.test(e);return n||g.test(e)?y(e.slice(2),n?2:8):m.test(e)?f:+e}var u="Expected a function",l=1/0,c=1.7976931348623157e308,f=NaN,d="[object Function]",p="[object GeneratorFunction]",h=/^\s+|\s+$/g,m=/^[-+]0x[0-9a-f]+$/i,v=/^0b[01]+$/i,g=/^0o[0-7]+$/i,y=parseInt,b=Object.prototype,x=b.toString,A=Math.max;e.exports=r},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function n(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=d.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=d.breaks:this.rules=d.gfm:this.options.pedantic&&(this.rules=d.pedantic)}function r(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function o(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function u(){}function l(e){for(var t,n,r=1;rAn error occured:

    "+o(d.message+"",!0)+"
    ";throw d}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};f.bullet=/(?:[*+-]|\d+\.)/,f.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,f.item=s(f.item,"gm")(/bull/g,f.bullet)(),f.list=s(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=s(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=s(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=s(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=l({},f),f.gfm=l({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=s(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=l({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,u,l,c,d,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),u={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,d=o.length,c=0;d>c;c++)u=o[c],l=u.length,u=u.replace(/^ *([*+-]|\d+\.) +/,""),~u.indexOf("\n ")&&(l-=u.length,u=this.options.pedantic?u.replace(/^ {1,4}/gm,""):u.replace(new RegExp("^ {1,"+l+"}","gm"),"")),this.options.smartLists&&c!==d-1&&(s=f.bullet.exec(o[c+1])[0],a===s||a.length>1&&s.length>1||(e=o.slice(c+1).join("\n")+e,c=d-1)),i=r||/\n\n(?!\s*$)/.test(u),c!==d-1&&(r="\n"===u.charAt(u.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(u,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),u={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=s(d.link)("inside",d._inside)("href",d._href)(),d.reflink=s(d.reflink)("inside",d._inside)(),d.normal=l({},d),d.pedantic=l({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=l({},d.normal,{escape:s(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=l({},d.gfm,{br:s(d.br)("{2,}","*")(),text:s(d.gfm.text)("{2,}","*")()}),n.rules=d,n.output=function(e,t,r){var i=new n(t,r);return i.output(e)},n.prototype.output=function(e){for(var t,n,r,i,a="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),a+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=o(i[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^
    /i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,a+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),a+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),a+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),a+=this.renderer.codespan(o(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),a+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),a+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),a+=this.renderer.text(o(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;r>i;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:o(e,!0))+"\n
    \n":"
    "+(n?e:o(e,!0))+"\n
    "},r.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"'+e+"\n"},r.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},r.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},r.prototype.paragraph=function(e){return"

    "+e+"

    \n"},r.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},r.prototype.tablerow=function(e){return"\n"+e+"\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(i){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var o='
    "},r.prototype.image=function(e,t,n){var r=''+n+'":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;et;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},u=function(e,t){if(""===t)throw new s("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","String contains an invalid character");return a.call(e,t)},l=function(e){for(var t=o.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,i=n.length;i>r;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},c=l[n]=[],f=function(){return new l(this)};if(s[n]=Error[n],c.item=function(e){return this[e]||null},c.contains=function(e){return e+="",-1!==u(this,e)},c.add=function(){var e,t=arguments,n=0,r=t.length,i=!1;do e=t[n]+"",-1===u(this,e)&&(this.push(e),i=!0);while(++nu;u++)i+=String.fromCharCode(o[u]);n.push(i)}else if("Blob"===t(e)||"File"===t(e)){if(!a)throw new s("NOT_READABLE_ERR");var c=new a;n.push(c.readAsBinaryString(e))}else e instanceof r?"base64"===e.encoding&&m?n.push(m(e.data)):"URI"===e.encoding?n.push(decodeURIComponent(e.data)):"raw"===e.encoding&&n.push(e.data):("string"!=typeof e&&(e+=""),n.push(unescape(encodeURIComponent(e))))},i.getBlob=function(e){return arguments.length||(e=null),new r(this.data.join(""),e,"raw")},i.toString=function(){return"[object BlobBuilder]"},o.slice=function(e,t,n){var i=arguments.length;return 3>i&&(n=null),new r(this.data.slice(e,i>1?t:this.data.length),n,this.encoding)},o.toString=function(){return"[object Blob]"},o.close=function(){this.size=0,delete this.data},n}(e);e.Blob=function(e,t){var r=t?t.type||"":"",i=new n;if(e)for(var o=0,a=e.length;a>o;o++)Uint8Array&&e[o]instanceof Uint8Array?i.append(e[o].buffer):i.append(e[o]);var s=i.getBlob(r);return!s.slice&&s.webkitSlice&&(s.slice=s.webkitSlice),s};var r=Object.getPrototypeOf||function(e){return e.__proto__};e.Blob.prototype=r(new e.Blob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(t,n){"use strict";e.exports=n}(this,function(){"use strict";function e(e,t){return this.init(e,t)}return e.extensions={},function(t){function n(e,t){var n,r=Array.prototype.slice.call(arguments,2);t=t||{};for(var i=0;i-1,isMac:t.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77},isMetaCtrlKey:function(e){return s.isMac&&e.metaKey||!s.isMac&&e.ctrlKey?!0:!1},isKey:function(e,t){var n=s.getKeyCode(e);return!1===Array.isArray(t)?n===t:-1===t.indexOf(n)?!1:!0},getKeyCode:function(e){var t=e.which;return null===t&&(t=null!==e.charCode?e.charCode:e.keyCode),t},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var e=[!0].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},defaults:function(){var e=[!1].concat(Array.prototype.slice.call(arguments));return n.apply(this,e)},createLink:function(e,t,n,r){var i=e.createElement("a");return s.moveTextRangeIntoElement(t[0],t[t.length-1],i),i.setAttribute("href",n),r&&i.setAttribute("target",r),i},findOrCreateMatchingTextNodes:function(e,t,n){for(var r=e.createTreeWalker(t,NodeFilter.SHOW_ALL,null,!1),i=[],o=0,a=!1,u=null,l=null;null!==(u=r.nextNode());)if(!(u.nodeType>3))if(3===u.nodeType){if(!a&&n.startn.end+1)throw new Error("PerformLinking overshot the target!");a&&i.push(l||u),o+=u.nodeValue.length,null!==l&&(o+=l.nodeValue.length,r.nextNode()),l=null}else"img"===u.tagName.toLowerCase()&&(!a&&n.start<=o&&(a=!0),a&&i.push(u));return i},splitStartNodeIfNeeded:function(e,t,n){return t!==n?e.splitText(t-n):null},splitEndNodeIfNeeded:function(e,t,n,r){var i,o;i=r+(t||e).nodeValue.length+(t?e.nodeValue.length:0)-1,o=(t||e).nodeValue.length-(i+1-n),i>=n&&r!==i&&0!==o&&(t||e).splitText(o)},splitByBlockElements:function(t){if(3!==t.nodeType&&1!==t.nodeType)return[];var n=[],r=e.util.blockContainerElementNames.join(",");if(3===t.nodeType||0===t.querySelectorAll(r).length)return[t];for(var i=0;i0)break;r=o.nextNode()}return r},findPreviousSibling:function(e){if(!e||s.isMediumEditorElement(e))return!1;for(var t=e.previousSibling;!t&&!s.isMediumEditorElement(e.parentNode);)e=e.parentNode,t=e.previousSibling;return t},isDescendant:function(e,t,n){if(!e||!t)return!1;if(e===t)return!!n;if(1!==e.nodeType)return!1;if(r||3!==t.nodeType)return e.contains(t);for(var i=t.parentNode;null!==i;){if(i===e)return!0;i=i.parentNode}return!1},isElement:function(e){return!(!e||1!==e.nodeType)},throttle:function(e,t){var n,r,i,o=50,a=null,s=0,u=function(){s=Date.now(),a=null,i=e.apply(n,r),a||(n=r=null)};return t||0===t||(t=o),function(){var o=Date.now(),l=t-(o-s);return n=this,r=arguments,0>=l||l>t?(a&&(clearTimeout(a),a=null),s=o,i=e.apply(n,r),a||(n=r=null)):a||(a=setTimeout(u,l)),i}},traverseUp:function(e,t){if(!e)return!1;do{if(1===e.nodeType){if(t(e))return e;if(s.isMediumEditorElement(e))return!1}e=e.parentNode}while(e);return!1},htmlEntities:function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(t,n){var r,i,o,a,u,l,c;if(!e.util.isEdge&&t.queryCommandSupported("insertHTML"))try{return t.execCommand("insertHTML",!1,n)}catch(f){}if(r=t.getSelection(),r.rangeCount){if(i=r.getRangeAt(0),c=i.commonAncestorContainer,s.isMediumEditorElement(c)&&!c.firstChild)i.selectNode(c.appendChild(t.createTextNode("")));else if(3===c.nodeType&&0===i.startOffset&&i.endOffset===c.nodeValue.length||3!==c.nodeType&&c.innerHTML===i.toString()){for(;!s.isMediumEditorElement(c)&&c.parentNode&&1===c.parentNode.childNodes.length&&!s.isMediumEditorElement(c.parentNode);)c=c.parentNode;i.selectNode(c)}for(i.deleteContents(),o=t.createElement("div"),o.innerHTML=n,a=t.createDocumentFragment();o.firstChild;)u=o.firstChild,l=a.appendChild(u);i.insertNode(a),l&&(i=i.cloneRange(),i.setStartAfter(l),i.collapse(!0),r.removeAllRanges(),r.addRange(i))}},execFormatBlock:function(t,n){var r,i=s.getTopBlockContainer(e.selection.getSelectionStart(t));if("blockquote"===n){if(i&&(r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return s.isBlockContainer(e)})))return t.execCommand("outdent",!1,null);if(s.isIE)return t.execCommand("indent",!1,n)}if(i&&n===i.nodeName.toLowerCase()&&(n="p"),s.isIE&&(n="<"+n+">"),i&&"blockquote"===i.nodeName.toLowerCase()){if(s.isIE&&"

    "===n)return t.execCommand("outdent",!1,n);if((s.isFF||s.isEdge)&&"p"===n)return r=Array.prototype.slice.call(i.childNodes),r.some(function(e){return!s.isBlockContainer(e)})&&t.execCommand("formatBlock",!1,n),t.execCommand("outdent",!1,n)}return t.execCommand("formatBlock",!1,n)},setTargetBlank:function(e,t){var n,r=t||!1;if("a"===e.nodeName.toLowerCase())e.target="_blank";else for(e=e.getElementsByTagName("a"),n=0;nr?(i=i.parentNode,n-=1):(o=o.parentNode,r-=1);for(;i!==o;)i=i.parentNode,o=o.parentNode;return i},isElementAtBeginningOfBlock:function(e){for(var t,n;!s.isBlockContainer(e)&&!s.isMediumEditorElement(e);){for(n=e;n=n.previousSibling;)if(t=3===n.nodeType?n.nodeValue:n.textContent,t.length>0)return!1;e=e.parentNode}return!0},isMediumEditorElement:function(e){return e&&e.getAttribute&&!!e.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(e){return s.traverseUp(e,function(e){return s.isMediumEditorElement(e)})},isBlockContainer:function(e){return e&&3!==e.nodeType&&-1!==s.blockContainerElementNames.indexOf(e.nodeName.toLowerCase())},getClosestBlockContainer:function(e){return s.traverseUp(e,function(e){return s.isBlockContainer(e)||s.isMediumEditorElement(e)})},getTopBlockContainer:function(e){var t=s.isBlockContainer(e)?e:!1;return s.traverseUp(e,function(e){return s.isBlockContainer(e)&&(t=e),!t&&s.isMediumEditorElement(e)?(t=e,!0):!1}),t},getFirstSelectableLeafNode:function(e){for(;e&&e.firstChild;)e=e.firstChild;if(e=s.traverseUp(e,function(e){return-1===s.emptyElementNames.indexOf(e.nodeName.toLowerCase())}),"table"===e.nodeName.toLowerCase()){var t=e.querySelector("th, td");t&&(e=t)}return e},getFirstTextNode:function(e){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(e)},_getFirstTextNode:function(e){if(3===e.nodeType)return e;for(var t=0;t0){var i,o=r.getRangeAt(0),a=o.cloneRange();a.selectNodeContents(e),a.setEnd(o.startContainer,o.startOffset),i=a.toString().length,n={start:i,end:i+o.toString().length},this.doesRangeStartWithImages(o,t)&&(n.startsWithImage=!0);var s=this.getTrailingImageCount(e,n,o.endContainer,o.endOffset);if(s&&(n.trailingImageCount=s),0!==i){var u=this.getIndexRelativeToAdjacentEmptyBlocks(t,e,o.startContainer,o.startOffset);-1!==u&&(n.emptyBlocksIndex=u)}}return n},importSelection:function(e,t,n,r){if(e&&t){var i=n.createRange();i.setStart(t,0),i.collapse(!0);var o,a=t,s=[],u=0,l=!1,c=!1,f=0,d=!1,p=!1,h=null;for((r||e.startsWithImage||"undefined"!=typeof e.emptyBlocksIndex)&&(p=!0);!d&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if(e.trailingImageCount&&c&&("img"===a.nodeName.toLowerCase()&&f++,f===e.trailingImageCount)){for(var m=0;a.parentNode.childNodes[m]!==a;)m++;i.setEnd(a.parentNode,m+1),d=!0}if(!d&&1===a.nodeType)for(var v=a.childNodes.length-1;v>=0;)s.push(a.childNodes[v]),v-=1}else o=u+a.length,!l&&e.start>=u&&e.start<=o&&(p||e.start=u&&e.end<=o&&(e.trailingImageCount?c=!0:(i.setEnd(a,e.end-u),d=!0)),u=o;d||(a=s.pop())}!l&&h&&(i.setStart(h,h.length),i.setEnd(h,h.length)),"undefined"!=typeof e.emptyBlocksIndex&&(i=this.importSelectionMoveCursorPastBlocks(n,t,e.emptyBlocksIndex,i)),r&&(i=this.importSelectionMoveCursorPastAnchor(e,i));var g=n.getSelection();g.removeAllRanges(),g.addRange(i)}},importSelectionMoveCursorPastAnchor:function(t,n){var r=function(e){return"a"===e.nodeName.toLowerCase()};if(t.start===t.end&&3===n.startContainer.nodeType&&n.startOffset===n.startContainer.nodeValue.length&&e.util.traverseUp(n.startContainer,r)){for(var i=n.startContainer,o=n.startContainer.parentNode;null!==o&&"a"!==o.nodeName.toLowerCase();)o.childNodes[o.childNodes.length-1]!==i?o=null:(i=o,o=o.parentNode);if(null!==o&&"a"===o.nodeName.toLowerCase()){for(var a=null,s=0;null===a&&s0)break}else a===u.currentNode&&(s=u.currentNode);return s||(s=a),o.setStart(e.util.getFirstSelectableLeafNode(s),0),o},getIndexRelativeToAdjacentEmptyBlocks:function(n,r,i,o){if(i.textContent.length>0&&o>0)return-1;var a=i;if(3!==a.nodeType&&(a=i.childNodes[o]),a){if(!e.util.isElementAtBeginningOfBlock(a))return-1;var s=e.util.findPreviousSibling(a);if(!s)return-1;if(s.nodeValue)return-1}for(var u=e.util.getClosestBlockContainer(i),l=n.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,t,!1),c=0;l.nextNode();){var f=""===l.currentNode.textContent;if((f||c>0)&&(c+=1),l.currentNode===u)return c;f||(c=0)}return c},doesRangeStartWithImages:function(e,t){if(0!==e.startOffset||1!==e.startContainer.nodeType)return!1;if("img"===e.startContainer.nodeName.toLowerCase())return!0;var n=e.startContainer.querySelector("img");if(!n)return!1;for(var r=t.createTreeWalker(e.startContainer,NodeFilter.SHOW_ALL,null,!1);r.nextNode();){var i=r.currentNode;if(i===n)break;if(i.nodeValue)return!1}return!0},getTrailingImageCount:function(e,t,n,r){if(0===r||1!==n.nodeType)return 0;if("img"!==n.nodeName.toLowerCase()&&!n.querySelector("img"))return 0;for(var i=n.childNodes[r-1];i.hasChildNodes();)i=i.lastChild;for(var o,a=e,s=[],u=0,l=!1,c=!1,f=!1,d=0;!f&&a;)if(a.nodeType>3)a=s.pop();else{if(3!==a.nodeType||c){if("img"===a.nodeName.toLowerCase()&&d++,a===i)f=!0;else if(1===a.nodeType)for(var p=a.childNodes.length-1;p>=0;)s.push(a.childNodes[p]),p-=1}else d=0,o=u+a.length,!l&&t.start>=u&&t.start<=o&&(l=!0),l&&t.end>=u&&t.end<=o&&(c=!0),u=o;f||(a=s.pop())}return d},selectionContainsContent:function(e){var t=e.getSelection();if(!t||t.isCollapsed||!t.rangeCount)return!1;if(""!==t.toString().trim())return!0;var n=this.getSelectedParentElement(t.getRangeAt(0));return n&&("img"===n.nodeName.toLowerCase()||1===n.nodeType&&n.querySelector("img"))?!0:!1},selectionInContentEditableFalse:function(e){var t,n=this.findMatchingSelectionParent(function(e){var n=e&&e.getAttribute("contenteditable");return"true"===n&&(t=!0),"#text"!==e.nodeName&&"false"===n},e);return!t&&n},getSelectionHtml:function(e){var t,n,r,i="",o=e.getSelection();if(o.rangeCount){for(r=e.createElement("div"),t=0,n=o.rangeCount;n>t;t+=1)r.appendChild(o.getRangeAt(t).cloneContents());i=r.innerHTML}return i},getCaretOffsets:function(e,t){var n,r;return t||(t=window.getSelection().getRangeAt(0)),n=t.cloneRange(),r=t.cloneRange(),n.selectNodeContents(e),n.setEnd(t.endContainer,t.endOffset),r.selectNodeContents(e),r.setStart(t.endContainer,t.endOffset),{left:n.toString().length,right:r.toString().length}},rangeSelectsSingleNode:function(e){var t=e.startContainer;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===e.startOffset+1},getSelectedParentElement:function(e){return e?this.rangeSelectsSingleNode(e)&&3!==e.startContainer.childNodes[e.startOffset].nodeType?e.startContainer.childNodes[e.startOffset]:3===e.startContainer.nodeType?e.startContainer.parentNode:e.startContainer:null},getSelectedElements:function(e){var t,n,r,i=e.getSelection();if(!i.rangeCount||i.isCollapsed||!i.getRangeAt(0).commonAncestorContainer)return[];if(t=i.getRangeAt(0),3===t.commonAncestorContainer.nodeType){for(n=[],r=t.commonAncestorContainer;r.parentNode&&1===r.parentNode.childNodes.length;)n.push(r.parentNode),r=r.parentNode;return n}return[].filter.call(t.commonAncestorContainer.getElementsByTagName("*"),function(e){return"function"==typeof i.containsNode?i.containsNode(e,!0):!0})},selectNode:function(e,t){var n=t.createRange(),r=t.getSelection();n.selectNodeContents(e),r.removeAllRanges(),r.addRange(n)},select:function(e,t,n,r,i){e.getSelection().removeAllRanges();var o=e.createRange();return o.setStart(t,n),r?o.setEnd(r,i):o.collapse(!0),e.getSelection().addRange(o),o},moveCursor:function(e,t,n){this.select(e,t,n)},getSelectionRange:function(e){var t=e.getSelection();return 0===t.rangeCount?null:t.getRangeAt(0)},getSelectionStart:function(e){var t=e.getSelection().anchorNode,n=t&&3===t.nodeType?t.parentNode:t;return n}};e.selection=n}(),function(){var t=function(e){this.base=e,this.options=this.base.options,this.events=[],this.disabledEvents={},this.customEvents={},this.listeners={}};t.prototype={InputEventOnContenteditableSupported:!e.util.isIE&&!e.util.isEdge,attachDOMEvent:function(e,t,n,r){e.addEventListener(t,n,r),this.events.push([e,t,n,r])},detachDOMEvent:function(e,t,n,r){var i,o=this.indexOfListener(e,t,n,r);-1!==o&&(i=this.events.splice(o,1)[0],i[0].removeEventListener(i[1],i[2],i[3]))},indexOfListener:function(e,t,n,r){var i,o,a;for(i=0,o=this.events.length;o>i;i+=1)if(a=this.events[i],a[0]===e&&a[1]===t&&a[2]===n&&a[3]===r)return i;return-1},detachAllDOMEvents:function(){for(var e=this.events.pop();e;)e[0].removeEventListener(e[1],e[2],e[3]),e=this.events.pop()},enableCustomEvent:function(e){void 0!==this.disabledEvents[e]&&delete this.disabledEvents[e]},disableCustomEvent:function(e){this.disabledEvents[e]=!0},attachCustomEvent:function(e,t){this.setupListener(e),this.customEvents[e]||(this.customEvents[e]=[]),this.customEvents[e].push(t)},detachCustomEvent:function(e,t){var n=this.indexOfCustomListener(e,t);-1!==n&&this.customEvents[e].splice(n,1)},indexOfCustomListener:function(e,t){return this.customEvents[e]&&this.customEvents[e].length?this.customEvents[e].indexOf(t):-1},detachAllCustomEvents:function(){this.customEvents={}},triggerCustomEvent:function(e,t,n){this.customEvents[e]&&!this.disabledEvents[e]&&this.customEvents[e].forEach(function(e){e(t,n)})},destroy:function(){this.detachAllDOMEvents(),this.detachAllCustomEvents(),this.detachExecCommand(),this.base.elements&&this.base.elements.forEach(function(e){e.removeAttribute("data-medium-focused")})},attachToExecCommand:function(){this.execCommandListener||(this.execCommandListener=function(e){this.handleDocumentExecCommand(e)}.bind(this),this.wrapExecCommand(),this.options.ownerDocument.execCommand.listeners.push(this.execCommandListener))},detachExecCommand:function(){var e=this.options.ownerDocument;if(this.execCommandListener&&e.execCommand.listeners){var t=e.execCommand.listeners.indexOf(this.execCommandListener);-1!==t&&e.execCommand.listeners.splice(t,1),e.execCommand.listeners.length||this.unwrapExecCommand()}},wrapExecCommand:function(){var e=this.options.ownerDocument;if(!e.execCommand.listeners){var t=function(t,n,r){var i=e.execCommand.orig.apply(this,arguments);if(!e.execCommand.listeners)return i;var o=Array.prototype.slice.call(arguments);return e.execCommand.listeners.forEach(function(e){e({command:t,value:r,args:o,result:i})}),i};t.orig=e.execCommand,t.listeners=[],e.execCommand=t}},unwrapExecCommand:function(){var e=this.options.ownerDocument;e.execCommand.orig&&(e.execCommand=e.execCommand.orig)},setupListener:function(e){if(!this.listeners[e]){switch(e){case"externalInteraction":this.attachDOMEvent(this.options.ownerDocument.body,"mousedown",this.handleBodyMousedown.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"click",this.handleBodyClick.bind(this),!0),this.attachDOMEvent(this.options.ownerDocument.body,"focus",this.handleBodyFocus.bind(this),!0);break;case"blur":this.setupListener("externalInteraction");break;case"focus":this.setupListener("externalInteraction");break;case"editableInput":this.contentCache=[],this.base.elements.forEach(function(e){this.contentCache[e.getAttribute("medium-editor-index")]=e.innerHTML,this.InputEventOnContenteditableSupported&&this.attachDOMEvent(e,"input",this.handleInput.bind(this))}.bind(this)),this.InputEventOnContenteditableSupported||(this.setupListener("editableKeypress"),this.keypressUpdateInput=!0,this.attachDOMEvent(document,"selectionchange",this.handleDocumentSelectionChange.bind(this)),this.attachToExecCommand());break;case"editableClick":this.attachToEachElement("click",this.handleClick);break;case"editableBlur":this.attachToEachElement("blur",this.handleBlur);break;case"editableKeypress":this.attachToEachElement("keypress",this.handleKeypress);break;case"editableKeyup":this.attachToEachElement("keyup",this.handleKeyup);break;case"editableKeydown":this.attachToEachElement("keydown",this.handleKeydown);break;case"editableKeydownSpace":this.setupListener("editableKeydown");break;case"editableKeydownEnter":this.setupListener("editableKeydown");break;case"editableKeydownTab":this.setupListener("editableKeydown");break;case"editableKeydownDelete":this.setupListener("editableKeydown");break;case"editableMouseover":this.attachToEachElement("mouseover",this.handleMouseover);break;case"editableDrag":this.attachToEachElement("dragover",this.handleDragging),this.attachToEachElement("dragleave",this.handleDragging);break;case"editableDrop":this.attachToEachElement("drop",this.handleDrop);break;case"editablePaste":this.attachToEachElement("paste",this.handlePaste)}this.listeners[e]=!0}},attachToEachElement:function(e,t){this.base.elements.forEach(function(n){this.attachDOMEvent(n,e,t.bind(this))},this)},focusElement:function(e){e.focus(),this.updateFocus(e,{target:e,type:"focus"})},updateFocus:function(t,n){var r,i=this.base.getExtensionByName("toolbar"),o=i?i.getToolbarElement():null,a=this.base.getExtensionByName("anchor-preview"),s=a&&a.getPreviewElement?a.getPreviewElement():null,u=this.base.getFocusedElement();u&&"click"===n.type&&this.lastMousedownTarget&&(e.util.isDescendant(u,this.lastMousedownTarget,!0)||e.util.isDescendant(o,this.lastMousedownTarget,!0)||e.util.isDescendant(s,this.lastMousedownTarget,!0))&&(r=u),r||this.base.elements.some(function(n){return!r&&e.util.isDescendant(n,t,!0)&&(r=n),!!r},this);var l=!e.util.isDescendant(u,t,!0)&&!e.util.isDescendant(o,t,!0)&&!e.util.isDescendant(s,t,!0);r!==u&&(u&&l&&(u.removeAttribute("data-medium-focused"),this.triggerCustomEvent("blur",n,u)),r&&(r.setAttribute("data-medium-focused",!0),this.triggerCustomEvent("focus",n,r))),l&&this.triggerCustomEvent("externalInteraction",n)},updateInput:function(e,t){if(this.contentCache){var n=e.getAttribute("medium-editor-index");e.innerHTML!==this.contentCache[n]&&this.triggerCustomEvent("editableInput",t,e),this.contentCache[n]=e.innerHTML}},handleDocumentSelectionChange:function(t){if(t.currentTarget&&t.currentTarget.activeElement){var n,r=t.currentTarget.activeElement;this.base.elements.some(function(t){return e.util.isDescendant(t,r,!0)?(n=t,!0):!1},this),n&&this.updateInput(n,{target:r,currentTarget:n})}},handleDocumentExecCommand:function(){var e=this.base.getFocusedElement();e&&this.updateInput(e,{target:e,currentTarget:e})},handleBodyClick:function(e){this.updateFocus(e.target,e)},handleBodyFocus:function(e){this.updateFocus(e.target,e)},handleBodyMousedown:function(e){this.lastMousedownTarget=e.target},handleInput:function(e){this.updateInput(e.currentTarget,e)},handleClick:function(e){this.triggerCustomEvent("editableClick",e,e.currentTarget)},handleBlur:function(e){this.triggerCustomEvent("editableBlur",e,e.currentTarget)},handleKeypress:function(e){if(this.triggerCustomEvent("editableKeypress",e,e.currentTarget),this.keypressUpdateInput){var t={target:e.target,currentTarget:e.currentTarget};setTimeout(function(){this.updateInput(t.currentTarget,t)}.bind(this),0)}},handleKeyup:function(e){this.triggerCustomEvent("editableKeyup",e,e.currentTarget)},handleMouseover:function(e){this.triggerCustomEvent("editableMouseover",e,e.currentTarget)},handleDragging:function(e){this.triggerCustomEvent("editableDrag",e,e.currentTarget)},handleDrop:function(e){this.triggerCustomEvent("editableDrop",e,e.currentTarget)},handlePaste:function(e){this.triggerCustomEvent("editablePaste",e,e.currentTarget)},handleKeydown:function(t){return this.triggerCustomEvent("editableKeydown",t,t.currentTarget),e.util.isKey(t,e.util.keyCode.SPACE)?this.triggerCustomEvent("editableKeydownSpace",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.ENTER)||t.ctrlKey&&e.util.isKey(t,e.util.keyCode.M)?this.triggerCustomEvent("editableKeydownEnter",t,t.currentTarget):e.util.isKey(t,e.util.keyCode.TAB)?this.triggerCustomEvent("editableKeydownTab",t,t.currentTarget):e.util.isKey(t,[e.util.keyCode.DELETE,e.util.keyCode.BACKSPACE])?this.triggerCustomEvent("editableKeydownDelete",t,t.currentTarget):void 0}},e.Events=t}(),function(){var t=e.Extension.extend({action:void 0,aria:void 0,tagNames:void 0,style:void 0,useQueryState:void 0,contentDefault:void 0,contentFA:void 0,classList:void 0,attrs:void 0,constructor:function(n){t.isBuiltInButton(n)?e.Extension.call(this,this.defaults[n]):e.Extension.call(this,n)},init:function(){e.Extension.prototype.init.apply(this,arguments),this.button=this.createButton(),this.on(this.button,"click",this.handleClick.bind(this))},getButton:function(){return this.button},getAction:function(){return"function"==typeof this.action?this.action(this.base.options):this.action},getAria:function(){return"function"==typeof this.aria?this.aria(this.base.options):this.aria},getTagNames:function(){return"function"==typeof this.tagNames?this.tagNames(this.base.options):this.tagNames},createButton:function(){var e=this.document.createElement("button"),t=this.contentDefault,n=this.getAria(),r=this.getEditorOption("buttonLabels");return e.classList.add("medium-editor-action"),e.classList.add("medium-editor-action-"+this.name),this.classList&&this.classList.forEach(function(t){e.classList.add(t)}),e.setAttribute("data-action",this.getAction()),n&&(e.setAttribute("title",n),e.setAttribute("aria-label",n)),this.attrs&&Object.keys(this.attrs).forEach(function(t){e.setAttribute(t,this.attrs[t])},this),"fontawesome"===r&&this.contentFA&&(t=this.contentFA),e.innerHTML=t,e},handleClick:function(e){e.preventDefault(),e.stopPropagation();var t=this.getAction();t&&this.execAction(t)},isActive:function(){return this.button.classList.contains(this.getEditorOption("activeButtonClass"))},setInactive:function(){this.button.classList.remove(this.getEditorOption("activeButtonClass")),delete this.knownState},setActive:function(){this.button.classList.add(this.getEditorOption("activeButtonClass")),delete this.knownState},queryCommandState:function(){var e=null;return this.useQueryState&&(e=this.base.queryCommandState(this.getAction())),e},isAlreadyApplied:function(e){var t,n,r=!1,i=this.getTagNames();return this.knownState===!1||this.knownState===!0?this.knownState:(i&&i.length>0&&(r=-1!==i.indexOf(e.nodeName.toLowerCase())),!r&&this.style&&(t=this.style.value.split("|"),n=this.window.getComputedStyle(e,null).getPropertyValue(this.style.prop),t.forEach(function(e){this.knownState||(r=-1!==n.indexOf(e),(r||"text-decoration"!==this.style.prop)&&(this.knownState=r)); +},this)),r)}});t.isBuiltInButton=function(t){return"string"==typeof t&&e.extensions.button.prototype.defaults.hasOwnProperty(t)},e.extensions.button=t}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}}}(),function(){var t=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",hasForm:!0,getForm:function(){},isDisplayed:function(){},hideForm:function(){},showToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var e=this.base.getExtensionByName("toolbar");e&&e.hideToolbarDefaultActions()},setToolbarPosition:function(){var e=this.base.getExtensionByName("toolbar");e&&e.setToolbarPosition()}});e.extensions.form=t}(),function(){var t=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(t){t.preventDefault(),t.stopPropagation();var n=e.selection.getSelectionRange(this.document);return"a"===n.startContainer.nodeName.toLowerCase()||"a"===n.endContainer.nodeName.toLowerCase()||e.util.getClosestTag(e.selection.getSelectedParentElement(n),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(t){e.util.isKey(t,e.util.keyCode.K)&&e.util.isMetaCtrlKey(t)&&!t.shiftKey&&this.handleClick(t)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var e=[''];return e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formSaveLabel,""),e.push('',"fontawesome"===this.getEditorOption("buttonLabels")?'':this.formCloseLabel,""),this.targetCheckbox&&e.push('

    ','',"","
    "),this.customClassOption&&e.push('
    ','',"","
    "),e.join("")},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(e){var t=this.getInput(),n=this.getAnchorTargetCheckbox(),r=this.getAnchorButtonCheckbox();if(e=e||{url:""},"string"==typeof e&&(e={url:e}),this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e.url,t.focus(),n&&(n.checked="_blank"===e.target),r){var i=e.buttonClass?e.buttonClass.split(" "):[];r.checked=-1!==i.indexOf(this.customClassOption)}},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},getFormOpts:function(){var e=this.getAnchorTargetCheckbox(),t=this.getAnchorButtonCheckbox(),n={url:this.getInput().value.trim()};return this.linkValidation&&(n.url=this.checkLinkFormat(n.url)),n.target="_self",e&&e.checked&&(n.target="_blank"),t&&t.checked&&(n.buttonClass=this.customClassOption),n},doFormSave:function(){var e=this.getFormOpts();this.completeFormSave(e)},completeFormSave:function(e){this.base.restoreSelection(),this.execAction(this.action,e),this.base.checkSelection()},checkLinkFormat:function(e){var t=/^([a-z]+:)?\/\/|^(mailto|tel|maps):/i,n=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/;return n.test(e)?"tel:"+e:(t.test(e)?"":"http://")+e},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(e){var t=e.querySelector(".medium-editor-toolbar-close"),n=e.querySelector(".medium-editor-toolbar-save"),r=e.querySelector(".medium-editor-toolbar-input");this.on(e,"click",this.handleFormClick.bind(this)),this.on(r,"keyup",this.handleTextboxKeyup.bind(this)),this.on(t,"click",this.handleCloseClick.bind(this)),this.on(n,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var e=this.document,t=e.createElement("div");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),t.innerHTML=this.getTemplate(),this.attachFormEvents(t),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(t){return t.keyCode===e.util.keyCode.ENTER?(t.preventDefault(),void this.doFormSave()):void(t.keyCode===e.util.keyCode.ESCAPE&&(t.preventDefault(),this.doFormCancel()))},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.anchor=t}(),function(){var t=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var e=this.document.createElement("div");return e.id="medium-editor-anchor-preview-"+this.getEditorId(),e.className="medium-editor-anchor-preview",e.innerHTML=this.getTemplate(),this.on(e,"click",this.handleClick.bind(this)),e},getTemplate:function(){return'
    '},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(e){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||e.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=e.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=e.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=e,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(e){e=e||this.activeAnchor;var t,n,r=this.anchorPreview.offsetHeight,i=e.getBoundingClientRect(),o=(i.left+i.right)/2,a=this.diffLeft,s=this.diffTop;t=this.anchorPreview.offsetWidth/2;var u=this.base.getExtensionByName("toolbar");u&&(a=u.diffLeft,s=u.diffTop),n=a-t,this.anchorPreview.style.top=Math.round(r+i.bottom-s+this.window.pageYOffset-this.anchorPreview.offsetHeight)+"px",this.anchorPreview.style.right="initial",t>o?(this.anchorPreview.style.left=n+t+"px",this.anchorPreview.style.right="initial"):this.window.innerWidth-othis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=(new Date).getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=t}(),function(){function t(t){return!e.util.getClosestTag(t,"a")}var n,r,i,o;n=[" "," ","\n","\r"," "," "," "," "," ","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?«»“”‘’])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i");var a=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},destroy:function(){this.document.queryCommandSupported("AutoUrlDetect")&&this.document.execCommand("AutoUrlDetect",!1,!0)},onBlur:function(e,t){this.performLinking(t)},onKeypress:function(t){this.disableEventHandling||e.util.isKey(t,[e.util.keyCode.SPACE,e.util.keyCode.ENTER])&&(clearTimeout(this.performLinkingTimeout),this.performLinkingTimeout=setTimeout(function(){try{var e=this.base.exportSelection();this.performLinking(t.target)&&this.base.importSelection(e,!0)}catch(n){window.console&&window.console.error("Failed to perform linking",n),this.disableEventHandling=!0}}.bind(this),0))},performLinking:function(t){var n=e.util.splitByBlockElements(t),r=!1;0===n.length&&(n=[t]);for(var i=0;i0&&null!==a;)i=n.currentNode,o=i.nodeValue,o.length>t?(a=i.splitText(o.length-t),t=0):(a=n.previousNode(),t-=o.length);return a},performLinkingWithinElement:function(t){for(var n=this.findLinkableText(t),r=!1,i=0;i1;)i.appendChild(r.childNodes[1])}});e.extensions.autoLink=a}(),function(){function t(t){var r=e.util.getContainerEditorElement(t),i=Array.prototype.slice.call(r.parentElement.querySelectorAll("."+n));i.forEach(function(e){e.classList.remove(n)})}var n="medium-editor-dragover",r=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){e.preventDefault(),e.dataTransfer.dropEffect="copy";var r=e.target.classList?e.target:e.target.parentElement;t(r),"dragover"===e.type&&r.classList.add(n)},handleDrop:function(e){e.preventDefault(),e.stopPropagation(),e.dataTransfer.files&&Array.prototype.slice.call(e.dataTransfer.files).forEach(function(e){this.isAllowedFile(e)&&e.type.match("image")&&this.insertImageFile(e)},this),t(e.target)},isAllowedFile:function(e){return this.allowedTypes.some(function(t){return!!e.type.match(t)})},insertImageFile:function(t){var n=new FileReader;n.readAsDataURL(t);var r="medium-img-"+ +new Date;e.util.insertHTMLCommand(this.document,''),n.onload=function(){var e=this.document.getElementById(r);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}});e.extensions.fileDragging=r}(),function(){var t=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(e){var t=e.key.charCodeAt(0);this.keys[t]||(this.keys[t]=[]),this.keys[t].push(e)},this)},handleKeydown:function(t){var n=e.util.getKeyCode(t);if(this.keys[n]){var r=e.util.isMetaCtrlKey(t),i=!!t.shiftKey,o=!!t.altKey;this.keys[n].forEach(function(e){e.meta!==r||e.shift!==i||e.alt!==o&&void 0!==e.alt||(t.preventDefault(),t.stopPropagation(),!1!==e.command&&this.execAction(e.command))},this)}}});e.extensions.keyboardCommands=t}(),function(){var t=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontName")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(e){var t=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var e,t=this.document,n=t.createElement("div"),r=t.createElement("select"),i=t.createElement("a"),o=t.createElement("a");n.className="medium-editor-toolbar-form",n.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(n,"click",this.handleFormClick.bind(this));for(var a=0;a
    ':"✓",n.appendChild(o),this.on(o,"click",this.handleSaveClick.bind(this),!0),i.setAttribute("href","#"),i.className="medium-editor-toobar-close",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",n.appendChild(i),this.on(i,"click",this.handleCloseClick.bind(this)),n},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("face")&&e.removeAttribute("face")})},handleFontChange:function(){var e=this.getSelect().value;""===e?this.clearFontName():this.execAction("fontName",{name:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontName=t}(),function(){var t=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(e){if(e.preventDefault(),e.stopPropagation(),!this.isDisplayed()){var t=this.document.queryCommandValue("fontSize")+"";this.showForm(t)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return"block"===this.getForm().style.display},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(e){var t=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),t.value=e||"",t.focus()},destroy:function(){return this.form?(this.form.parentNode&&this.form.parentNode.removeChild(this.form),void delete this.form):!1},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var e=this.document,t=e.createElement("div"),n=e.createElement("input"),r=e.createElement("a"),i=e.createElement("a");return t.className="medium-editor-toolbar-form",t.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(t,"click",this.handleFormClick.bind(this)),n.setAttribute("type","range"),n.setAttribute("min","1"),n.setAttribute("max","7"),n.className="medium-editor-toolbar-input",t.appendChild(n),this.on(n,"change",this.handleSliderChange.bind(this)),i.setAttribute("href","#"),i.className="medium-editor-toobar-save",i.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"✓",t.appendChild(i),this.on(i,"click",this.handleSaveClick.bind(this),!0),r.setAttribute("href","#"),r.className="medium-editor-toobar-close",r.innerHTML="fontawesome"===this.getEditorOption("buttonLabels")?'':"×",t.appendChild(r),this.on(r,"click",this.handleCloseClick.bind(this)),t},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(e){"font"===e.nodeName.toLowerCase()&&e.hasAttribute("size")&&e.removeAttribute("size")})},handleSliderChange:function(){var e=this.getInput().value;"4"===e?this.clearFontSize():this.execAction("fontSize",{size:e})},handleFormClick:function(e){e.stopPropagation()},handleSaveClick:function(e){e.preventDefault(),this.doFormSave()},handleCloseClick:function(e){e.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=t}(),function(){function t(){return[[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
    /g),"
    "],[new RegExp(/]*(font-style:italic;font-weight:bold|font-weight:bold;font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:bold[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

    "],[new RegExp(/\n+

    /gi),""],["",""],["",""]]}var n=e.Extension.extend({forcePlainText:!0,cleanPastedHTML:!1,preCleanReplacements:[],cleanReplacements:[],cleanAttrs:["class","style","dir"],cleanTags:["meta"],init:function(){e.Extension.prototype.init.apply(this,arguments),(this.forcePlainText||this.cleanPastedHTML)&&this.subscribe("editablePaste",this.handlePaste.bind(this))},handlePaste:function(t,n){var r,i,o,a,s="",u="text/html",l="text/plain";if(this.window.clipboardData&&void 0===t.clipboardData&&(t.clipboardData=this.window.clipboardData,u="Text",l="Text"),t.clipboardData&&t.clipboardData.getData&&!t.defaultPrevented){if(t.preventDefault(),o=t.clipboardData.getData(u),a=t.clipboardData.getData(l),this.cleanPastedHTML&&o)return this.cleanPaste(o);if(this.getEditorOption("disableReturn")||n.getAttribute("data-disable-return"))s=e.util.htmlEntities(a);else if(r=a.split(/[\r\n]+/g),r.length>1)for(i=0;i"+e.util.htmlEntities(r[i])+"

    ");else s=e.util.htmlEntities(r[0]);e.util.insertHTMLCommand(this.document,s)}},cleanPaste:function(e){var n,r,i,o,a=/"+e.split("

    ").join("

    ")+"

    ",r=i.querySelectorAll("a,p,div,br"),n=0;n"+r.innerHTML+"
    ":i.innerHTML=r.innerHTML,r.parentNode.replaceChild(i,r);for(o=t.querySelectorAll("span"),n=0;n0&&(r[0].classList.add(this.firstButtonClass),r[r.length-1].classList.add(this.lastButtonClass)),s},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this["static"]&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(t){return t&&t.target&&e.util.isDescendant(this.getToolbarElement(),t.target)?!1:void this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return"block"===this.getToolbarActionsElement().style.display},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(e){e.hasForm&&e.isDisplayed()&&e.hideForm()})},multipleBlockElementsSelected:function(){var t=/<[^\/>][^>]*><\/[^>]+>/gim,n=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),r=e.selection.getSelectionHtml(this.document).replace(t,""),i=r.match(n);return!!i&&i.length>1},modifySelection:function(){var t=this.window.getSelection(),n=t.getRangeAt(0);if(this.standardizeSelectionStart&&n.startContainer.nodeValue&&n.startOffset===n.startContainer.nodeValue.length){var r=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),n.startContainer,this.document);if(r){for(var i=0;0===r.nodeValue.substr(i,1).trim().length;)i+=1;n=e.selection.select(this.document,r,i,n.endContainer,n.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var t=e.selection.getSelectionElement(this.window);return!t||-1===this.getEditorElements().indexOf(t)||t.getAttribute("data-disable-toolbar")?this.hideToolbar():this.updateOnEmptySelection&&this["static"]?this.showAndUpdateToolbar():!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected()?this.hideToolbar():void this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(e){"function"==typeof e.isActive&&"function"==typeof e.setInactive&&e.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var t,n=[],r=null,i=e.selection.getSelectionRange(this.document),o=function(e){"function"==typeof e.checkState?e.checkState(t):"function"==typeof e.isActive&&"function"==typeof e.isAlreadyApplied&&"function"==typeof e.setActive&&!e.isActive()&&e.isAlreadyApplied(t)&&e.setActive()};if(i&&(this.forEachExtension(function(e){return"function"==typeof e.queryCommandState&&(r=e.queryCommandState(),null!==r)?void(r&&"function"==typeof e.setActive&&e.setActive()):void n.push(e)}),t=e.selection.getSelectedParentElement(i),this.getEditorElements().some(function(n){return e.util.isDescendant(n,t,!0)})))for(;t&&(n.forEach(o),!e.util.isMediumEditorElement(t));)t=t.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var e,t=this.base.getFocusedElement(),n=this.window.getSelection();return t?(this["static"]&&!this.relativeContainer?(this.showToolbar(),this.positionStaticToolbar(t)):n.isCollapsed||(this.showToolbar(),this.relativeContainer||this.positionToolbar(n)),e=this.base.getExtensionByName("anchor-preview"),void(e&&"function"==typeof e.hidePreview&&e.hidePreview())):this},positionStaticToolbar:function(e){this.getToolbarElement().style.left="0";var t,n=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,r=this.window.innerWidth,i=this.getToolbarElement(),o=e.getBoundingClientRect(),a=o.top+n,s=o.left+o.width/2,u=i.offsetHeight,l=i.offsetWidth,c=l/2;switch(this.sticky?n>a+e.offsetHeight-u-this.stickyTopOffset?(i.style.top=a+e.offsetHeight-u+"px",i.classList.remove("medium-editor-sticky-toolbar")):n>a-u-this.stickyTopOffset?(i.classList.add("medium-editor-sticky-toolbar"),i.style.top=this.stickyTopOffset+"px"):(i.classList.remove("medium-editor-sticky-toolbar"),i.style.top=a-u+"px"):i.style.top=a-u+"px",this.align){case"left":t=o.left;break;case"right":t=o.right-l;break;case"center":t=s-c}0>t?t=0:t+l>r&&(t=r-Math.ceil(l)-1),i.style.left=t+"px"},positionToolbar:function(e){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var t=e.getRangeAt(0),n=t.getBoundingClientRect();(!n||0===n.height&&0===n.width&&t.startContainer===t.endContainer)&&(n=1===t.startContainer.nodeType&&t.startContainer.querySelector("img")?t.startContainer.querySelector("img").getBoundingClientRect():t.startContainer.getBoundingClientRect());var r=this.window.innerWidth,i=(n.left+n.right)/2,o=this.getToolbarElement(),a=o.offsetHeight,s=o.offsetWidth,u=s/2,l=50,c=this.diffLeft-u;n.topi?(o.style.left=c+u+"px",o.style.right="initial"):u>r-i?(o.style.left="auto",o.style.right=0):(o.style.left=c+i+"px",o.style.right="initial")}});e.extensions.toolbar=t}(),function(){var t=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(e){var t="medium-editor-dragover";e.preventDefault(),e.dataTransfer.dropEffect="copy","dragover"===e.type?e.target.classList.add(t):"dragleave"===e.type&&e.target.classList.remove(t)},handleDrop:function(t){var n,r="medium-editor-dragover";t.preventDefault(),t.stopPropagation(),t.dataTransfer.files&&(n=Array.prototype.slice.call(t.dataTransfer.files,0),n.some(function(t){if(t.type.match("image")){var n,r;n=new FileReader,n.readAsDataURL(t),r="medium-img-"+ +new Date,e.util.insertHTMLCommand(this.document,''),n.onload=function(){var e=this.document.getElementById(r);e&&(e.removeAttribute("id"),e.removeAttribute("class"),e.src=n.result)}.bind(this)}}.bind(this))),t.target.classList.remove(r)}});e.extensions.imageDragging=t}(),function(){function t(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),r=n.textContent,i=e.selection.getCaretOffsets(n);(void 0===r[i.left-1]||""===r[i.left-1].trim())&&t.preventDefault()}function n(t,n){if(this.options.disableReturn||n.getAttribute("data-disable-return"))t.preventDefault();else if(this.options.disableDoubleReturn||n.getAttribute("data-disable-double-return")){var r=e.selection.getSelectionStart(this.options.ownerDocument);(r&&""===r.textContent.trim()&&"li"!==r.nodeName.toLowerCase()||r.previousElementSibling&&"br"!==r.previousElementSibling.nodeName.toLowerCase()&&""===r.previousElementSibling.textContent.trim())&&t.preventDefault()}}function r(t){var n=e.selection.getSelectionStart(this.options.ownerDocument),r=n&&n.nodeName.toLowerCase();"pre"===r&&(t.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(n)&&(t.preventDefault(),t.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function i(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument),i=r.nodeName.toLowerCase(),o=/^(\s+|)?$/i,a=/h\d/i;e.util.isKey(t,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&r.previousElementSibling&&a.test(i)&&0===e.selection.getCaretOffsets(r).left?e.util.isKey(t,e.util.keyCode.BACKSPACE)&&o.test(r.previousElementSibling.innerHTML)?(r.previousElementSibling.parentNode.removeChild(r.previousElementSibling),t.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey(t,e.util.keyCode.ENTER)&&(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
    ",r.previousElementSibling.parentNode.insertBefore(n,r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.DELETE)&&r.nextElementSibling&&r.previousElementSibling&&!a.test(i)&&o.test(r.innerHTML)&&a.test(r.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,r.nextElementSibling),r.previousElementSibling.parentNode.removeChild(r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&"li"===i&&o.test(r.innerHTML)&&!r.previousElementSibling&&!r.parentElement.previousElementSibling&&r.nextElementSibling&&"li"===r.nextElementSibling.nodeName.toLowerCase()?(n=this.options.ownerDocument.createElement("p"),n.innerHTML="
    ",r.parentElement.parentElement.insertBefore(n,r.parentElement),e.selection.moveCursor(this.options.ownerDocument,n),r.parentElement.removeChild(r),t.preventDefault()):e.util.isKey(t,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(r,"blockquote")!==!1&&0===e.selection.getCaretOffsets(r).left&&(t.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p"))}function o(t){var n,r=e.selection.getSelectionStart(this.options.ownerDocument);r&&(e.util.isMediumEditorElement(r)&&0===r.children.length&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey(t,e.util.keyCode.ENTER)&&!e.util.isListItem(r)&&(n=r.nodeName.toLowerCase(),"a"===n?this.options.ownerDocument.execCommand("unlink",!1,null):t.shiftKey||t.ctrlKey||/h\d/.test(n)||this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function a(e){e._mediumEditors||(e._mediumEditors=[null]),this.id||(this.id=e._mediumEditors.length),e._mediumEditors[this.id]=this}function s(e){e._mediumEditors&&e._mediumEditors[this.id]&&(e._mediumEditors[this.id]=null)}function u(t){t||(t=[]),"string"==typeof t&&(t=this.options.ownerDocument.querySelectorAll(t)),e.util.isElement(t)&&(t=[t]);var n=Array.prototype.slice.apply(t);this.elements=[],n.forEach(function(e,t){"textarea"===e.nodeName.toLowerCase()?this.elements.push(y.call(this,e,t)):this.elements.push(e)},this)}function l(e,t){return Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])}),e}function c(e,t,n){var r={window:n.options.contentWindow,document:n.options.ownerDocument,base:n};return e=l(e,r),"function"==typeof e.init&&e.init(),e.name||(e.name=t),e}function f(){return this.elements.every(function(e){return!!e.getAttribute("data-disable-toolbar")})?!1:this.options.toolbar!==!1}function d(){return f.call(this)?this.options.anchorPreview!==!1:!1}function p(){return this.options.placeholder!==!1}function h(){return this.options.autoLink!==!1}function m(){return this.options.imageDragging!==!1}function v(){return this.options.keyboardCommands!==!1}function g(){return!this.options.extensions.imageDragging}function y(e,t){for(var n=this.options.ownerDocument.createElement("div"),r=Date.now(),i="medium-editor-"+r+"-"+t,o=e.attributes;this.options.ownerDocument.getElementById(i);)r++,i="medium-editor-"+r+"-"+t;n.className=e.className,n.id=i,n.innerHTML=e.value,e.setAttribute("medium-editor-textarea-id",i);for(var a=0,s=o.length;s>a;a++)n.hasAttribute(o[a].nodeName)||n.setAttribute(o[a].nodeName,o[a].nodeValue);return e.classList.add("medium-editor-hidden"),e.parentNode.insertBefore(n,e),n}function b(){var e=!1;this.elements.forEach(function(t,n){this.options.disableEditing||t.getAttribute("data-disable-editing")||(t.setAttribute("contentEditable",!0),t.setAttribute("spellcheck",this.options.spellcheck)),t.setAttribute("data-medium-editor-element",!0),t.setAttribute("role","textbox"),t.setAttribute("aria-multiline",!0),t.setAttribute("medium-editor-index",n),t.hasAttribute("medium-editor-textarea-id")&&(e=!0)},this),e&&this.subscribe("editableInput",function(e,t){var n=t.parentNode.querySelector('textarea[medium-editor-textarea-id="'+t.getAttribute("medium-editor-textarea-id")+'"]');n&&(n.value=this.serialize()[t.id].value)}.bind(this))}function x(){var e;if(this.subscribe("editableKeydownTab",r.bind(this)),this.subscribe("editableKeydownDelete",i.bind(this)),this.subscribe("editableKeydownEnter",i.bind(this)),this.options.disableExtraSpaces&&this.subscribe("editableKeydownSpace",t.bind(this)),this.options.disableReturn||this.options.disableDoubleReturn)this.subscribe("editableKeydownEnter",n.bind(this));else for(e=0;e=0&&(r=e.selection.exportSelection(t,this.options.ownerDocument)),null!==r&&0!==n&&(r.editableElementIndex=n),r},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function(t,n){if(t){var r=this.elements[t.editableElementIndex||0];e.selection.importSelection(t,r,this.options.ownerDocument,n)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function(t){var n=e.selection.getSelectionElement(this.options.contentWindow),r={};if(-1!==this.elements.indexOf(n)){try{if(this.events.disableCustomEvent("editableInput"),t.url&&t.url.trim().length>0){var i=this.options.contentWindow.getSelection();if(i){var o,a,s,u,l=i.getRangeAt(0),c=l.commonAncestorContainer;if(3===l.endContainer.nodeType&&3!==l.startContainer.nodeType&&0===l.startOffset&&l.startContainer.firstChild===l.endContainer&&(c=l.endContainer),a=e.util.getClosestBlockContainer(l.startContainer),s=e.util.getClosestBlockContainer(l.endContainer),3!==c.nodeType&&0!==c.textContent.length&&a===s){var f=a||n,d=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),o=this.exportSelection(),d.appendChild(f.cloneNode(!0)),n===f?e.selection.select(this.options.ownerDocument,f.firstChild,0,f.lastChild,3===f.lastChild.nodeType?f.lastChild.nodeValue.length:f.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,f,0,f,f.childNodes.length);var p=this.exportSelection();u=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,d,{start:o.start-p.start,end:o.end-p.start,editableElementIndex:o.editableElementIndex}),0===u.length&&(d=this.options.ownerDocument.createDocumentFragment(),d.appendChild(c.cloneNode(!0)),u=[d.firstChild.firstChild,d.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,u,t.url.trim());var h=(d.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,d.firstChild.innerHTML.replace(/^\s+/,"")),o.start-=h,o.end-=h,this.importSelection(o)}else this.options.ownerDocument.execCommand("createLink",!1,t.url);(this.options.targetBlank||"_blank"===t.target)&&e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),t.url),t.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),t.buttonClass)}}if(this.options.targetBlank||"_blank"===t.target||t.buttonClass){r=this.options.ownerDocument.createEvent("HTMLEvents"),r.initEvent("input",!0,!0,this.options.contentWindow);for(var m=0;m1?t[1]:"";return{major:parseInt(n[0],10),minor:parseInt(n[1],10),revision:parseInt(n[2],10),preRelease:r,toString:function(){return[n[0],n[1],n[2]].join(".")+(r?"-"+r:"")}}},e.version=e.parseVersionString.call(this,{version:"5.14.2"}.version),e}())},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=Object.assign||function(e,t){for(var o,a,s=n(e),u=1;u, "+('or explicitly pass "store" as a prop to "'+a.constructor.displayName+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(n,t),n.prototype.shouldComponentUpdate=function(){return!S||this.haveOwnPropsChanged||this.hasStoreStateChanged},n.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return u(r)},n.prototype.configureFinalMapState=function(e,t){var n=h(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:h,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):u(n)},n.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return u(r,!0)},n.prototype.configureFinalMapDispatch=function(e,t){var n=v(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:v,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):u(n,!0)},n.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return this.stateProps&&(0,m["default"])(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return this.dispatchProps&&(0,m["default"])(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateMergedPropsIfNeeded=function(){var e=r(this.stateProps,this.dispatchProps,this.props);return this.mergedProps&&x&&(0,m["default"])(e,this.mergedProps)?!1:(this.mergedProps=e,!0)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){d&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillReceiveProps=function(e){S&&(0,m["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},n.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},n.prototype.handleChange=function(){if(this.unsubscribe){var e=this.state.storeState,t=this.store.getState();S&&e===t||(this.hasStoreStateChanged=!0,this.setState({storeState:t}))}},n.prototype.getWrappedInstance=function(){return(0,k["default"])(M,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},n.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.renderedElement;this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1;var i=!0,o=!0;S&&r&&(i=n||t&&this.doStatePropsDependOnOwnProps,o=t&&this.doDispatchPropsDependOnOwnProps);var a=!1,s=!1;i&&(a=this.updateStatePropsIfNeeded()),o&&(s=this.updateDispatchPropsIfNeeded());var u=!0;return u=a||s||t?this.updateMergedPropsIfNeeded():!1,!u&&r?r:(M?this.renderedElement=(0,f.createElement)(e,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,f.createElement)(e,this.mergedProps),this.renderedElement)},n}(f.Component);return t.displayName="Connect("+s(e)+")",t.WrappedComponent=e,t.contextTypes={store:p["default"]},t.propTypes={store:p["default"]},(0,A["default"])(t,e)}}var c=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return!e||!e.__v2_compatible__}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;tt;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=a,t.runLeaveHooks=s;var u=n(52),l=n(6);r(l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(238),o=r(i),a=n(96),s=r(a);t["default"]=s["default"](o["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=o.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function i(e,t){var n=e&&e.routes,i=t.routes,o=void 0,a=void 0;return n?(o=n.filter(function(n){return-1===i.indexOf(n)||r(n,e,t)}),o.reverse(),a=i.filter(function(e){return-1===n.indexOf(e)||-1!==o.indexOf(e)})):(o=[],a=i),{leaveRoutes:o,enterRoutes:a}}t.__esModule=!0;var o=n(27);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function i(e,t){o.mapAsync(e.routes,function(t,n,i){r(e.location,t,i)},t)}t.__esModule=!0;var o=n(52);t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=i.getParamNames(e.path);for(var o in t)t.hasOwnProperty(o)&&-1!==r.indexOf(o)&&(n[o]=t[o]);return n}t.__esModule=!0;var i=n(27);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(102),o=r(i),a=n(96),s=r(a);t["default"]=s["default"](o["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!t.hasOwnProperty(n))return!1;if(!r(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function i(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function o(e,t,n){for(var r=e,o=[],a=[],s=0,u=t.length;u>s;++s){var c=t[s],f=c.path||"";if("/"===f.charAt(0)&&(r=e,o=[],a=[]),null!==r){var d=l.matchPattern(f,r);r=d.remainingPathname,o=[].concat(o,d.paramNames),a=[].concat(a,d.paramValues)}if(""===r&&c.path&&i(o,a,n))return s}return null}function a(e,t,n,r){var i=o(e,t,n);return null===i?!1:r?t.slice(i+1).every(function(e){return!e.path}):!0}function s(e,t){return null==t?null==e:null==e?!0:r(e,t)}function u(e,t,n,r,i){var o=e.pathname,u=e.query;return null==n?!1:a(o,r,i,t)?s(u,n.query):!1}t.__esModule=!0,t["default"]=u;var l=n(27);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){var n=e.history,r=e.routes,o=e.location,s=i(e,["history","routes","location"]);n||o?void 0:u["default"](!1),n=n?n:c["default"](s);var l=d["default"](n,p.createRoutes(r)),f=void 0;o?o=n.createLocation(o):f=n.listen(function(e){o=e});var m=h.createRouterObject(n,l);n=h.createRoutingHistory(n,l),l.match(o,function(e,r,i){t(e,r,i&&a({},i,{history:n,router:m,matchContext:{history:n,transitionManager:l,router:m}})),f&&f()})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.routes,r=i(t,["routes"]),o=u["default"](e)(r),s=c["default"](o,n);return a({},o,s)}}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;to?t.call(this,o++,i,r):r.apply(this,arguments))}var o=0,a=!1;i()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(){function e(e){e=e||window.history.state||{};var t=f.getWindowPath(),n=e,r=n.key,i=void 0;r?i=d.readState(r):(i=null,r=b.createKey(),g&&window.history.replaceState(o({},e,{key:r}),null,t));var a=l.parsePath(t);return b.createLocation(o({},a,{state:i}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return f.addEventListener(window,"popstate",n),function(){f.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,i=e.hash,o=e.state,a=e.action,s=e.key;if(a!==u.POP){d.saveState(s,o);var l=(t||"")+n+r+i,c={key:s};if(a===u.PUSH){if(y)return window.location.href=l,!1;window.history.pushState(c,null,l)}else{if(y)return window.location.replace(l),!1;window.history.replaceState(c,null,l)}}}function r(e){1===++x&&(A=t(b));var n=b.listenBefore(e);return function(){n(),0===--x&&A()}}function i(e){1===++x&&(A=t(b));var n=b.listen(e);return function(){n(),0===--x&&A()}}function a(e){1===++x&&(A=t(b)),b.registerTransitionHook(e)}function p(e){b.unregisterTransitionHook(e),0===--x&&A()}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c.canUseDOM?void 0:s["default"](!1);var v=m.forceRefresh,g=f.supportsHistory(),y=!g||v,b=h["default"](o({},m,{getCurrentLocation:e,finishTransition:n,saveState:d.saveState})),x=0,A=void 0;return o({},b,{listenBefore:r,listen:i,registerTransitionHook:a,unregisterTransitionHook:p})}t.__esModule=!0;var o=Object.assign||function(e){for(var t=1;t=0&&t=0&&v8&&11>=k),T=32,E=String.fromCharCode(T),S=p.topLevelTypes,N={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[S.topCompositionEnd,S.topKeyPress,S.topTextInput,S.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[S.topBlur,S.topCompositionEnd,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[S.topBlur,S.topCompositionStart,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[S.topBlur,S.topCompositionUpdate,S.topKeyDown,S.topKeyPress,S.topKeyUp,S.topMouseDown]}},M=!1,O=null,L={eventTypes:N,extractEvents:function(e,t,n,r,i){return[l(e,t,n,r,i),d(e,t,n,r,i)]}};e.exports=L},function(e,t,n){"use strict";var r=n(105),i=n(5),o=n(10),a=(n(183),n(288)),s=n(188),u=n(192),l=(n(2),u(function(e){return s(e)})),c=!1,f="cssFloat";if(i.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(p){c=!0}void 0===document.documentElement.style.cssFloat&&(f="styleFloat")}var h={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=l(n)+":",t+=a(n,r)+";")}return t||null},setValueForStyles:function(e,t){var n=e.style;for(var i in t)if(t.hasOwnProperty(i)){var o=a(i,t[i]);if("float"===i&&(i=f),o)n[i]=o;else{var s=c&&r.shorthandPropertyExpansions[i];if(s)for(var u in s)n[u]="";else n[i]=""}}}};o.measureMethods(h,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"}),e.exports=h},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function i(e){var t=k.getPooled(N.change,O,e,P(e));x.accumulateTwoPhaseDispatches(t),w.batchedUpdates(o,t)}function o(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){M=e,O=t,M.attachEvent("onchange",i)}function s(){M&&(M.detachEvent("onchange",i),M=null,O=null)}function u(e,t,n){return e===S.topChange?n:void 0}function l(e,t,n){e===S.topFocus?(s(),a(t,n)):e===S.topBlur&&s()}function c(e,t){M=e,O=t,L=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(M,"value",I),M.attachEvent("onpropertychange",d)}function f(){M&&(delete M.value,M.detachEvent("onpropertychange",d),M=null,O=null,L=null,R=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==L&&(L=t,i(e))}}function p(e,t,n){return e===S.topInput?n:void 0}function h(e,t,n){e===S.topFocus?(f(),c(t,n)):e===S.topBlur&&f()}function m(e,t,n){return e!==S.topSelectionChange&&e!==S.topKeyUp&&e!==S.topKeyDown||!M||M.value===L?void 0:(L=M.value,O)}function v(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===S.topClick?n:void 0}var y=n(16),b=n(32),x=n(33),A=n(5),w=n(11),k=n(25),P=n(69),C=n(72),T=n(132),E=n(19),S=y.topLevelTypes,N={change:{phasedRegistrationNames:{bubbled:E({onChange:null}),captured:E({onChangeCapture:null})},dependencies:[S.topBlur,S.topChange,S.topClick,S.topFocus,S.topInput,S.topKeyDown,S.topKeyUp,S.topSelectionChange]}},M=null,O=null,L=null,R=null,j=!1;A.canUseDOM&&(j=C("change")&&(!("documentMode"in document)||document.documentMode>8));var D=!1;A.canUseDOM&&(D=C("input")&&(!("documentMode"in document)||document.documentMode>9));var I={get:function(){return R.get.call(this)},set:function(e){L=""+e,R.set.call(this,e)}},z={eventTypes:N,extractEvents:function(e,t,n,i,o){var a,s;if(r(t)?j?a=u:s=l:T(t)?D?a=p:(a=m,s=h):v(t)&&(a=g),a){var c=a(e,t,n);if(c){var f=k.getPooled(N.change,c,i,o);return f.type="change",x.accumulateTwoPhaseDispatches(f),f}}s&&s(e,t,n)}};e.exports=z},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var i=n(5),o=n(185),a=n(13),s=n(85),u=n(1),l=/^(<[^ \/>]+)/,c="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:u(!1);for(var t,n={},f=0;fe&&n[e]===i[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===i[o-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r,i=n(29),o=n(5),a=i.injection.MUST_USE_ATTRIBUTE,s=i.injection.MUST_USE_PROPERTY,u=i.injection.HAS_BOOLEAN_VALUE,l=i.injection.HAS_SIDE_EFFECTS,c=i.injection.HAS_NUMERIC_VALUE,f=i.injection.HAS_POSITIVE_NUMERIC_VALUE,d=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var p=document.implementation;r=p&&p.hasFeature&&p.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,capture:a|u,cellPadding:null,cellSpacing:null,charSet:a,challenge:a,checked:s|u,classID:a,className:r?a:s,cols:a|f,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,"default":u,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,inputMode:a,integrity:null,is:a,keyParams:a,keyType:a,kind:null,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,minLength:a,multiple:s|u,muted:s|u,name:null,nonce:a,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,reversed:u,role:a,rows:a|f,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|f,sizes:a,span:f,spellCheck:null,src:null,srcDoc:s,srcLang:null,srcSet:a,start:c,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l,width:a,wmode:a,wrap:null,about:a,datatype:a,inlist:a,prefix:a,property:a,resource:a,"typeof":a,vocab:a,autoCapitalize:a,autoCorrect:a,autoSave:null,color:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,results:null,security:a,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(111),i=n(262),o=n(267),a=n(3),s=n(289),u={};a(u,o),a(u,{findDOMNode:s("findDOMNode","ReactDOM","react-dom",r,r.findDOMNode),render:s("render","ReactDOM","react-dom",r,r.render),unmountComponentAtNode:s("unmountComponentAtNode","ReactDOM","react-dom",r,r.unmountComponentAtNode),renderToString:s("renderToString","ReactDOMServer","react-dom/server",i,i.renderToString),renderToStaticMarkup:s("renderToStaticMarkup","ReactDOMServer","react-dom/server",i,i.renderToStaticMarkup)}),u.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r,u.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=i,e.exports=u},function(e,t,n){"use strict";var r=(n(34),n(66)),i=(n(2),"_getDOMNodeDidWarn"),o={getDOMNode:function(){return this.constructor[i]=!0,r(this)}};e.exports=o},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=o(t,null))}var i=n(24),o=n(71),a=n(74),s=n(75),u=(n(2),{instantiateChildren:function(e,t,n){if(null==e)return null;var i={};return s(e,r,i),i},updateChildren:function(e,t,n,r){if(!t&&!e)return null;var s;for(s in t)if(t.hasOwnProperty(s)){var u=e&&e[s],l=u&&u._currentElement,c=t[s];if(null!=u&&a(l,c))i.receiveComponent(u,c,n,r),t[s]=u;else{u&&i.unmountComponent(u,s);var f=o(c,null);t[s]=f}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||i.unmountComponent(e[s]);return t},unmountChildren:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];i.unmountComponent(n)}}});e.exports=u},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function i(e){}var o=n(62),a=n(17),s=n(9),u=n(34),l=n(10),c=n(42),f=(n(41),n(24)),d=n(64),p=n(3),h=n(31),m=n(1),v=n(74);n(2);i.prototype.render=function(){var e=u.get(this)._currentElement.type;return e(this.props,this.context,this.updater)};var g=1,y={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=g++,this._rootNodeID=e;var r,o,a=this._processProps(this._currentElement.props),l=this._processContext(n),c=this._currentElement.type,p="prototype"in c;p&&(r=new c(a,l,d)),(!p||null===r||r===!1||s.isValidElement(r))&&(o=r,r=new i(c)),r.props=a,r.context=l,r.refs=h,r.updater=d,this._instance=r,u.set(r,this);var v=r.state;void 0===v&&(r.state=v=null),"object"!=typeof v||Array.isArray(v)?m(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,r.componentWillMount&&(r.componentWillMount(),this._pendingStateQueue&&(r.state=this._processPendingState(r.props,r.context))),void 0===o&&(o=this._renderValidatedComponent()),this._renderedComponent=this._instantiateReactComponent(o);var y=f.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return r.componentDidMount&&t.getReactMountReady().enqueue(r.componentDidMount,r),y},unmountComponent:function(){var e=this._instance;e.componentWillUnmount&&e.componentWillUnmount(),f.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._instance=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,u.remove(e)},_maskContext:function(e){var t=null,n=this._currentElement.type,r=n.contextTypes;if(!r)return h;t={};for(var i in r)t[i]=e[i];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?m(!1):void 0;for(var i in r)i in t.childContextTypes?void 0:m(!1);return p({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var i=this.getName();for(var o in e)if(e.hasOwnProperty(o)){var a;try{"function"!=typeof e[o]?m(!1):void 0,a=e[o](t,o,i,n)}catch(s){a=s}if(a instanceof Error){r(this);n===c.prop}}},receiveComponent:function(e,t,n){var r=this._currentElement,i=this._context;this._pendingElement=null,this.updateComponent(t,r,e,i,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&f.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(e,t,n,r,i){var o,a=this._instance,s=this._context===i?a.context:this._processContext(i);t===n?o=n.props:(o=this._processProps(n.props),a.componentWillReceiveProps&&a.componentWillReceiveProps(o,s));var u=this._processPendingState(o,s),l=this._pendingForceUpdate||!a.shouldComponentUpdate||a.shouldComponentUpdate(o,u,s);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,o,u,s,e,i)):(this._currentElement=n,this._context=i,a.props=o,a.state=u,a.context=s)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,i=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(i&&1===r.length)return r[0];for(var o=p({},i?r[0]:n.state),a=i?1:0;a=0||null!=t.is}function v(e){h(e),this._tag=e.toLowerCase(),this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._rootNodeID=null,this._wrapperState=null,this._topLevelWrapper=null,this._nodeWithLegacyProperties=null}var g=n(241),y=n(243),b=n(29),x=n(59),A=n(16),w=n(40),k=n(61),P=n(256),C=n(259),T=n(260),E=n(113),S=n(263),N=n(7),M=n(268),O=n(10),L=n(64),R=n(3),j=n(45),D=n(46),I=n(1),z=(n(72),n(19)),H=n(47),W=n(73),F=(n(86),n(76),n(2),w.deleteListener),q=w.listenTo,X=w.registrationNameModules,U={string:!0,number:!0},V=z({children:null}),B=z({style:null}),Z=z({__html:null}),G=1,J={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Y={listing:!0,pre:!0,textarea:!0},Q=(R({menuitem:!0},K),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),_={},$={}.hasOwnProperty;v.displayName="ReactDOMComponent",v.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e;var r=this._currentElement.props;switch(this._tag){case"iframe":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(f,this);break;case"button":r=P.getNativeProps(this,r,n);break;case"input":C.mountWrapper(this,r,n),r=C.getNativeProps(this,r,n);break;case"option":T.mountWrapper(this,r,n),r=T.getNativeProps(this,r,n);break;case"select":E.mountWrapper(this,r,n),r=E.getNativeProps(this,r,n),n=E.processChildContext(this,r,n);break;case"textarea":S.mountWrapper(this,r,n),r=S.getNativeProps(this,r,n)}u(this,r);var i;if(t.useCreateElement){var o=n[N.ownerDocumentContextKey],a=o.createElement(this._currentElement.type);x.setAttributeForID(a,this._rootNodeID),N.getID(a),this._updateDOMProperties({},r,t,a),this._createInitialChildren(t,r,n,a),i=a}else{var s=this._createOpenTagMarkupAndPutListeners(t,r),l=this._createContentMarkup(t,r,n);i=!l&&K[this._tag]?s+"/>":s+">"+l+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(d,this);case"button":case"select":case"textarea":r.autoFocus&&t.getReactMountReady().enqueue(g.focusDOMComponent,this)}return i},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(X.hasOwnProperty(r))i&&l(this._rootNodeID,r,i,e);else{r===B&&(i&&(i=this._previousStyleCopy=R({},t.style)),i=y.createMarkupForStyles(i));var o=null;null!=this._tag&&m(this._tag,t)?r!==V&&(o=x.createMarkupForCustomAttribute(r,i)):o=x.createMarkupForProperty(r,i),o&&(n+=" "+o)}}if(e.renderToStaticMarkup)return n;var a=x.createMarkupForID(this._rootNodeID);return n+" "+a},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=D(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return Y[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&H(r,i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)W(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;ut.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,i=Math.min(t.start,r),o="undefined"==typeof t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=l(e,i),u=l(e,o);if(s&&u){var f=document.createRange();f.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(f),n.extend(u.node,u.offset)):(f.setEnd(u.node,u.offset),n.addRange(f))}}}var u=n(5),l=n(292),c=n(131),f=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:f?i:o,setOffsets:f?a:s};e.exports=d},function(e,t,n){"use strict";var r=n(116),i=n(273),o=n(65);r.inject();var a={renderToString:i.renderToString,renderToStaticMarkup:i.renderToStaticMarkup,version:o};e.exports=a},function(e,t,n){"use strict";function r(){this._rootNodeID&&c.updateWrapper(this)}function i(e){var t=this._currentElement.props,n=o.executeOnChange(t,e);return s.asap(r,this),n}var o=n(60),a=n(63),s=n(11),u=n(3),l=n(1),c=(n(2),{getNativeProps:function(e,t,n){null!=t.dangerouslySetInnerHTML?l(!1):void 0;var r=u({},t,{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return r},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?l(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:l(!1),r=r[0]),n=""+r),null==n&&(n="");var a=o.getValue(t);e._wrapperState={initialValue:""+(null!=a?a:n),onChange:i.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=o.getValue(t);null!=n&&a.updatePropertyByID(e._rootNodeID,"value",""+n)}});e.exports=c},function(e,t,n){"use strict";function r(e){i.enqueueEvents(e),i.processEventQueue(!1)}var i=n(32),o={handleTopLevel:function(e,t,n,o,a){var s=i.extractEvents(e,t,n,o,a);r(s)}};e.exports=o},function(e,t,n){"use strict";function r(e){var t=d.getID(e),n=f.getReactRootIDFromNodeID(t),r=d.findReactContainerForID(n),i=d.getFirstReactDOM(r);return i}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){a(e)}function a(e){for(var t=d.getFirstReactDOM(m(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var i=0;ii;){for(;ii;i++)n+=t+=e.charCodeAt(i);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var i=n(105),o=i.isUnitlessNumber;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,i){return i}n(3),n(2);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,i=void 0===r[n];i&&null!=t&&(r[n]=t)}function i(e){if(null==e)return e;var t={};return o(e,r,t),t}var o=n(75);n(2);e.exports=i},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(67),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,t>=o&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o(!1),e}var i=n(9),o=n(1);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+i(e)+'"'}var i=n(46);e.exports=r},function(e,t,n){"use strict";var r=n(7);e.exports=r.renderSubtreeIntoContainer},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return function(e,n){return t.reduce(function(e,t){return t(e,n)},e)}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e){return e}function r(e,t,r){var i="function"==typeof t?t:n;return function(){for(var t=arguments.length,n=Array(t),o=0;t>o;o++)n[o]=arguments[o];var a={type:e,payload:i.apply(void 0,n)};return 1===n.length&&n[0]instanceof Error&&(a.error=!0),"function"==typeof r&&(a.meta=r.apply(void 0,n)),a}}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n=u["default"](e).map(function(t){return a["default"](t,e[t])});return"undefined"!=typeof t?function(e,r){return void 0===e&&(e=t),c["default"].apply(void 0,n)(e,r)}:c["default"].apply(void 0,n)}t.__esModule=!0,t["default"]=i;var o=n(133),a=r(o),s=n(300),u=r(s),l=n(296),c=r(l);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var i=n(297),o=r(i),a=n(133),s=r(a),u=n(298),l=r(u);t.createAction=o["default"],t.handleAction=s["default"],t.handleActions=l["default"]},function(e,t){"use strict";function n(e){if("undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys)return Reflect.ownKeys(e);var t=Object.getOwnPropertyNames(e);return"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return{load:function(){var t=localStorage.getItem(e);return Promise.resolve(JSON.parse(t)||{})},save:function(t){var n=JSON.stringify(t);return localStorage.setItem(e,n),Promise.resolve()}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t-1&&e%1==0&&t>e}function f(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function d(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function p(){}function h(e,t){return v(e,t)&&delete e[t]}function m(e,t){if(Et){var n=e[t];return n===we?void 0:n}return dt.call(e,t)?e[t]:void 0}function v(e,t){return Et?void 0!==e[t]:dt.call(e,t)}function g(e,t,n){e[t]=Et&&void 0===n?we:n}function y(e){var t=-1,n=e?e.length:0;for(this.clear();++tn)return!1;var r=e.length-1;return n==r?e.pop():wt.call(e,n,1),!0}function O(e,t){var n=R(e,t);return 0>n?void 0:e[n][1]}function L(e,t){return R(e,t)>-1}function R(e,t){for(var n=e.length;n--;)if(le(e[n][0],t))return n;return-1}function j(e,t,n){var r=R(e,t);0>r?e.push([t,n]):e[r][1]=n}function D(e,t,n){var r=e[t];dt.call(e,t)&&le(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function I(e,t){return e&&Q(t,be(t),e)}function z(e,t,n,r,i,a,s){var u;if(r&&(u=a?r(e,i,a,s):r(e)),void 0!==u)return u;if(!me(e))return e;var c=It(e);if(c){if(u=re(e),!t)return Y(e,u)}else{var f=ne(e),d=f==Ne||f==Me;if(zt(e))return U(e,t);if(f==Re||f==Pe||d&&!a){if(l(e))return a?e:{};if(u=ie(d?{}:e),!t)return u=I(u,e),n?$(e,u):u}else{if(!$e[f])return a?e:{};u=oe(e,f,t)}}s||(s=new P);var p=s.get(e);return p?p:(s.set(e,u),(c?o:W)(e,function(i,o){D(u,o,z(i,t,n,r,o,e,s))}),n&&!c?$(e,u):u)}function H(e){return me(e)?xt(e):{}}function W(e,t){return e&&Rt(e,t,be)}function F(e,t){return dt.call(e,t)||"object"==typeof e&&t in e&&null===yt(e)}function q(e){return kt(Object(e))}function X(e){return function(t){return null==t?void 0:t[e]}}function U(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function V(e){var t=new e.constructor(e.byteLength);return new gt(t).set(new gt(e)),t}function B(e){return a(f(e),r,new e.constructor)}function Z(e){var t=new e.constructor(e.source,Ye.exec(e));return t.lastIndex=e.lastIndex,t}function G(e){return a(d(e),i,new e.constructor)}function J(e){return Lt?Object(Lt.call(e)):{}}function K(e,t){var n=t?V(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Y(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n-1&&e%1==0&&ke>=e}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ve(e){return!!e&&"object"==typeof e}function ge(e){return null==e?!1:pe(e)?ht.test(ft.call(e)):ve(e)&&(l(e)?ht:Qe).test(e)}function ye(e){return"string"==typeof e||!It(e)&&ve(e)&&pt.call(e)==Ie}function be(e){var t=ue(e);if(!t&&!fe(e))return q(e);var n=ae(e),r=!!n,i=n||[],o=i.length;for(var a in e)!F(e,a)||r&&("length"==a||c(a,o))||t&&"constructor"==a||i.push(a);return i}function xe(e){return function(){return e}}var Ae=200,we="__lodash_hash_undefined__",ke=9007199254740991,Pe="[object Arguments]",Ce="[object Array]",Te="[object Boolean]",Ee="[object Date]",Se="[object Error]",Ne="[object Function]",Me="[object GeneratorFunction]",Oe="[object Map]",Le="[object Number]",Re="[object Object]",je="[object RegExp]",De="[object Set]",Ie="[object String]",ze="[object Symbol]",He="[object WeakMap]",We="[object ArrayBuffer]",Fe="[object Float32Array]",qe="[object Float64Array]",Xe="[object Int8Array]",Ue="[object Int16Array]",Ve="[object Int32Array]",Be="[object Uint8Array]",Ze="[object Uint8ClampedArray]",Ge="[object Uint16Array]",Je="[object Uint32Array]",Ke=/[\\^$.*+?()[\]{}|]/g,Ye=/\w*$/,Qe=/^\[object .+?Constructor\]$/,_e=/^(?:0|[1-9]\d*)$/,$e={};$e[Pe]=$e[Ce]=$e[We]=$e[Te]=$e[Ee]=$e[Fe]=$e[qe]=$e[Xe]=$e[Ue]=$e[Ve]=$e[Oe]=$e[Le]=$e[Re]=$e[je]=$e[De]=$e[Ie]=$e[ze]=$e[Be]=$e[Ze]=$e[Ge]=$e[Je]=!0,$e[Se]=$e[Ne]=$e[He]=!1;var et={"function":!0,object:!0},tt=et[typeof t]&&t&&!t.nodeType?t:void 0,nt=et[typeof e]&&e&&!e.nodeType?e:void 0,rt=nt&&nt.exports===tt?tt:void 0,it=u(tt&&nt&&"object"==typeof n&&n),ot=u(et[typeof self]&&self),at=u(et[typeof window]&&window),st=u(et[typeof this]&&this),ut=it||at!==(st&&st.window)&&at||ot||st||Function("return this")(),lt=Array.prototype,ct=Object.prototype,ft=Function.prototype.toString,dt=ct.hasOwnProperty,pt=ct.toString,ht=RegExp("^"+ft.call(dt).replace(Ke,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt=rt?ut.Buffer:void 0,vt=ut.Symbol,gt=ut.Uint8Array,yt=Object.getPrototypeOf,bt=Object.getOwnPropertySymbols,xt=Object.create,At=ct.propertyIsEnumerable,wt=lt.splice,kt=Object.keys,Pt=te(ut,"Map"),Ct=te(ut,"Set"),Tt=te(ut,"WeakMap"),Et=te(Object,"create"),St=Pt?ft.call(Pt):"",Nt=Ct?ft.call(Ct):"",Mt=Tt?ft.call(Tt):"",Ot=vt?vt.prototype:void 0,Lt=Ot?Ot.valueOf:void 0,Rt=ee(),jt=X("length"),Dt=bt||function(){return[]};(Pt&&ne(new Pt)!=Oe||Ct&&ne(new Ct)!=De||Tt&&ne(new Tt)!=He)&&(ne=function(e){var t=pt.call(e),n=t==Re?e.constructor:null,r="function"==typeof n?ft.call(n):"";if(r)switch(r){case St:return Oe;case Nt:return De;case Mt:return He}return t});var It=Array.isArray,zt=mt?function(e){return e instanceof mt}:xe(!1);p.prototype=Et?Et(null):ct,y.prototype.clear=b,y.prototype["delete"]=x,y.prototype.get=A,y.prototype.has=w,y.prototype.set=k,P.prototype.clear=C,P.prototype["delete"]=T,P.prototype.get=E,P.prototype.has=S,P.prototype.set=N, +e.exports=z}).call(t,n(48)(e),function(){return this}())},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function r(e){return!!e&&"object"==typeof e}function i(e){if(!r(e)||l.call(e)!=o||n(e))return!1;var t=c(e);if(null===t)return!0;var i=t.constructor;return"function"==typeof i&&i instanceof i&&s.call(i)==u}var o="[object Object]",a=Object.prototype,s=Function.prototype.toString,u=s.call(Object),l=a.toString,c=Object.getPrototypeOf;e.exports=i},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=Array(e);++n-1&&e%1==0&&t>e}function a(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function s(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function u(e){return function(t){return null==t?void 0:t[e]}}function l(e){var t=e?e.length:void 0;return m(t)&&(q(e)||y(e)||f(e))?r(t,String):null}function c(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||j;return e===n}function f(e){return p(e)&&D.call(e,"callee")&&(!W.call(e,"callee")||I.call(e)==A)}function d(e){return null!=e&&m(F(e))&&!h(e)}function p(e){return g(e)&&d(e)}function h(e){var t=v(e)?I.call(e):"";return t==w||t==k}function m(e){return"number"==typeof e&&e>-1&&e%1==0&&x>=e}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){return!!e&&"object"==typeof e}function y(e){return"string"==typeof e||!q(e)&&g(e)&&I.call(e)==P}function b(e){for(var t=-1,n=c(e),r=s(e),i=r.length,a=l(e),u=!!a,f=a||[],d=f.length;++t-1&&e%1==0&&t>e}function o(e,t,n){(void 0!==n&&!m(e[t],n)||"number"==typeof t&&void 0===n&&!(t in e))&&(e[t]=n)}function a(e,t,n){var r=e[t];ie.call(e,t)&&m(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function s(e,t,n,i,a){if(e!==t){var l=ue(t)||k(t)?void 0:S(t);r(l||t,function(r,c){if(l&&(c=r,r=t[c]),A(r))a||(a=new C),u(e,t,c,n,s,i,a);else{var f=i?i(e[c],r,c+"",e,t,a):void 0;void 0===f&&(f=r),o(e,c,f)}})}}function u(e,t,n,r,i,a,s){var u=e[n],l=t[n],f=s.get(l);if(f)return void o(e,n,f);var d=a?a(u,l,n+"",e,t,s):void 0,p=void 0===d;p&&(d=l,ue(l)||k(l)?ue(u)?d=u:y(u)?d=c(u):(p=!1,d=T(l,!a)):E(l)||v(l)?v(u)?d=P(u):!A(u)||r&&b(u)?(p=!1,d=T(l,!a)):d=u:p=!1),s.set(l,d),p&&i(d,l,r,a,s),s["delete"](l),o(e,n,d)}function l(e){return function(t){return null==t?void 0:t[e]}}function c(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o="function"==typeof o?(i--,o):void 0,a&&h(n[0],n[1],a)&&(o=3>i?void 0:o,i=1),t=Object(t);++r-1&&e%1==0&&M>=e}function A(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function w(e){return!!e&&"object"==typeof e}function k(e){return w(e)&&x(e.length)&&!!ne[oe.call(e)]}function P(e){return f(e,S(e))}var C=n(199),T=n(303),E=n(305),S=n(306),N=n(204),M=9007199254740991,O="[object Arguments]",L="[object Array]",R="[object Boolean]",j="[object Date]",D="[object Error]",I="[object Function]",z="[object GeneratorFunction]",H="[object Map]",W="[object Number]",F="[object Object]",q="[object RegExp]",X="[object Set]",U="[object String]",V="[object WeakMap]",B="[object ArrayBuffer]",Z="[object Float32Array]",G="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",Q="[object Uint8Array]",_="[object Uint8ClampedArray]",$="[object Uint16Array]",ee="[object Uint32Array]",te=/^(?:0|[1-9]\d*)$/,ne={};ne[Z]=ne[G]=ne[J]=ne[K]=ne[Y]=ne[Q]=ne[_]=ne[$]=ne[ee]=!0,ne[O]=ne[L]=ne[B]=ne[R]=ne[j]=ne[D]=ne[I]=ne[H]=ne[W]=ne[F]=ne[q]=ne[X]=ne[U]=ne[V]=!1;var re=Object.prototype,ie=re.hasOwnProperty,oe=re.toString,ae=re.propertyIsEnumerable,se=l("length"),ue=Array.isArray,le=p(function(e,t,n){s(e,t,n)});e.exports=le},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;tn;n++)t[n]=arguments[n];return function(e){return function(n,r,i){var a=e(n,r,i),u=a.dispatch,l=[],c={getState:a.getState,dispatch:function(e){return u(e)}};return l=t.map(function(e){return e(c)}),u=s["default"].apply(void 0,l)(a.dispatch),o({},a,{dispatch:u})}}}var o=Object.assign||function(e){for(var t=1;t-1?t.documentElement.innerHTML=e:t.body.innerHTML=e,t},e}function u(e){var t=(new C).parseFromString(e,"text/html");return A(t,i),t}function l(e){for(var t,n,r,i=[e],o=[];i.length>0;)for(t=i.shift(),o.push(t),n=t.childNodes,r=0;r<",">"+t+"<")}function d(e,t){if("string"==typeof t)return t===e.nodeName.toLowerCase();if(Array.isArray(t))return-1!==t.indexOf(e.nodeName.toLowerCase());if("function"==typeof t)return t.call(v,e);throw new TypeError("`filter` needs to be a string, array, or function")}function p(e,t){var n,r,o;return"left"===e?(n=t.previousSibling,r=/ $/):(n=t.nextSibling,r=/^ /),n&&(3===n.nodeType?o=r.test(n.nodeValue):1!==n.nodeType||i(n)||(o=r.test(n.textContent))),o}function h(e){var t="",n="";if(!i(e)){var r=/^[ \r\n\t]/.test(e.innerHTML),o=/[ \r\n\t]$/.test(e.innerHTML);r&&!p("left",e)&&(t=" "),o&&!p("right",e)&&(n=" ")}return{leading:t,trailing:n}}function m(e){var t,n=c(e);if(!o(e)&&!/A/.test(e.nodeName)&&/^\s*$/i.test(n))return void(e._replacement="");for(var i=0;i=0;o--)m(i[o]);return n=c(r),n.replace(/^[\t\r\n]+|[\t\r\n\s]+$/g,"").replace(/\n\s+\n/g,"\n\n").replace(/\n{3,}/g,"\n\n")},v.isBlock=i,v.isVoid=o,v.trim=r,v.outer=f,e.exports=v},function(e,t){"use strict";function n(e,t){var n=Array.prototype.indexOf.call(t.parentNode.childNodes,t),r=" ";return 0===n&&(r="| "),r+e+" |"}var r=/highlight highlight-(\S+) lang-(\S+)/;e.exports=[{filter:"br",replacement:function(){return"\n"}},{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}},{filter:function(e){return"checkbox"===e.type&&"LI"===e.parentNode.nodeName},replacement:function(e,t){return(t.checked?"[x]":"[ ]")+" "}},{filter:["th","td"],replacement:function(e,t){return n(e,t)}},{filter:"tr",replacement:function(e,t){var r="",i={left:":--",right:"--:",center:":-:"};if("THEAD"===t.parentNode.nodeName)for(var o=0;oi;i++)r+="#";return"\n\n"+r+" "+e+"\n\n"}},{filter:"hr",replacement:function(){return"\n\n* * *\n\n"}},{filter:["em","i"],replacement:function(e){return"_"+e+"_"}},{filter:["strong","b"],replacement:function(e){return"**"+e+"**"}},{filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){return"`"+e+"`"}},{filter:function(e){return"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.title?' "'+t.title+'"':"";return"["+e+"]("+t.getAttribute("href")+n+")"}},{filter:"img",replacement:function(e,t){var n=t.alt||"",r=t.getAttribute("src")||"",i=t.title||"",o=i?' "'+i+'"':"";return r?"!["+n+"]("+r+o+")":""}},{filter:function(e){return"PRE"===e.nodeName&&"CODE"===e.firstChild.nodeName},replacement:function(e,t){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},{filter:"blockquote",replacement:function(e){return e=this.trim(e),e=e.replace(/\n{3,}/g,"\n\n"),e=e.replace(/^/gm,"> "),"\n\n"+e+"\n\n"}},{filter:"li",replacement:function(e,t){e=e.replace(/^\s+/,"").replace(/\n/gm,"\n ");var n="* ",r=t.parentNode,i=Array.prototype.indexOf.call(r.children,t)+1;return n=/ol/i.test(r.nodeName)?i+". ":"* ",n+e}},{filter:["ul","ol"],replacement:function(e,t){for(var n=[],r=0;r