UNPKG

remoteredux-standalone

Version:

A standalone monitor, debugging redux even without internet.

6 lines 1.56 MB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.RemoteDevApp=t(require("react"),require("react-dom")):e.RemoteDevApp=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,o){r.apply(this,[e,t,o].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();n(1188);var u=n(1),l=r(u),c=n(18),f=n(464),d=r(f),p=n(474),h=r(p),m=n(264),v=n(60),y=n(454),g=r(y),b=function(e){function t(){return o(this,t),i(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"componentWillMount",value:function(){this.store=(0,h.default)({monitor:(0,m.getMonitorSettings)()||this.props.monitorOptions,test:{selected:(0,m.getTemplatesSelected)(),templates:(0,m.getTestTemplates)()||this.props.testTemplates}}),this.store.dispatch({type:v.CONNECT_REQUEST,options:(0,m.getSocketSettings)()||this.props.socketOptions})}},{key:"render",value:function(){return l.default.createElement(c.Provider,{store:this.store},l.default.createElement(g.default,this.props))}}]),t}(u.Component);b.propTypes={hash:u.PropTypes.bool,socketOptions:u.PropTypes.shape({hostname:u.PropTypes.string,port:u.PropTypes.oneOfType([l.default.PropTypes.string,l.default.PropTypes.number]),autoReconnect:u.PropTypes.bool,secure:u.PropTypes.bool}),monitorOptions:u.PropTypes.shape({selected:u.PropTypes.string}),testTemplates:u.PropTypes.array},t.default=(0,d.default)(b),e.exports=t.default},function(t,n){t.exports=e},function(e,t,n){function r(e,t){for(var n=0;e.length>n;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var i=0;o.parts.length>i;i++)o.parts[i](r.parts[i]);for(;r.parts.length>i;i++)o.parts.push(l(r.parts[i],t))}else{for(var a=[],i=0;r.parts.length>i;i++)a.push(l(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;e.length>r;r++){var o=e[r],i=o[0],a=o[1],s=o[2],u=o[3],l={css:a,media:s,sourceMap:u};n[i]?n[i].parts.push(l):t.push(n[i]={id:i,parts:[l]})}return t}function i(e,t){var n=v(),r=b[b.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),b.push(t);else{if("bottom"!==e.insertAt)throw Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=b.indexOf(e);0>t||b.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var i=g++;n=y||(y=s(t)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!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),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),o=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 o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function f(e,t){var n=t.css,r=t.media;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.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},h=function(e){var t;return function(){return void 0===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]}),y=null,g=0,b=[];e.exports=function(e,t){t=t||{},void 0===t.singleton&&(t.singleton=m()),void 0===t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;n.length>a;a++){var s=n[a],u=p[s.id];u.refs--,i.push(u)}if(e){var l=o(e);r(l,t)}for(var a=0;i.length>a;a++){var u=i[a];if(0===u.refs){for(var c=0;u.parts.length>c;c++)u.parts[c]();delete p[u.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;u=Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}e.exports=r},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";var r=n(26),o=r;e.exports=o},[1280,891],function(e,t,n){e.exports={default:n(151),__esModule:!0}},[1282,893,890,213],[1283,213],function(e,t){e.exports=function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return 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)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;10>n;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,s=n(e),u=1;arguments.length>u;u++){r=Object(arguments[u]);for(var l in r)o.call(r,l)&&(s[l]=r[l]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var c=0;a.length>c;c++)i.call(r,a[c])&&(s[a[c]]=r[a[c]])}}return s}},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;t>r;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=n},function(e,t){"use strict";t.__esModule=!0,t.default=function(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}},[1281,889],function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={easeOutFunction:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutFunction:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeOut:function(e,t,n,r){if(r=r||this.easeOutFunction,t&&"[object Array]"===Object.prototype.toString.call(t)){for(var o="",i=0;t.length>i;i++)o&&(o+=","),o+=this.create(e,t[i],n,r);return o}return this.create(e,t,n,r)},create:function(e,t,n,r){return e=e||"450ms",t=t||"all",n=n||"0ms",r=r||"linear",t+" "+e+" "+r+" "+n}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(1),s=r(a),u=function(e,t){var n=e.children,r=e.color,a=e.size,u=e.style,l=o(e,["children","color","size","style"]),c=t.reactIconBase,f=void 0===c?{}:c,d=a||f.size||"1em";return s.default.createElement("svg",i({children:n,fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:d,width:d},f,l,{style:i({verticalAlign:"middle",color:r||f.color},f.style||{},u)}))};u.propTypes={color:a.PropTypes.string,size:a.PropTypes.oneOfType([a.PropTypes.string,a.PropTypes.number]),style:a.PropTypes.object},u.contextTypes={reactIconBase:a.PropTypes.shape(u.propTypes)},t.default=u,e.exports=t.default},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._hostNode=t,t[m]=n}function i(e){var t=e._hostNode;t&&(delete t[m],e._hostNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],u=r(s)._domID;if(0!==u){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(p)===u+""||8===i.nodeType&&i.nodeValue===" react-text: "+u+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+u+" "){o(s,i);continue e}c("32",u)}}e._flags|=h.hasCachedChildNodes}}function s(e){if(e[m])return e[m];for(var t=[];!e[m];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[m]);e=t.pop())n=r,t.length&&a(r,e);return n}function u(e){var t=s(e);return null!=t&&t._hostNode===e?t:null}function l(e){if(void 0===e._hostNode?c("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:c("34"),e=e._hostParent;for(;t.length;e=t.pop())a(e,e._hostNode);return e._hostNode}var c=n(12),f=n(81),d=n(371),p=(n(3),f.ID_ATTRIBUTE_NAME),h=d,m="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:s,getInstanceFromNode:u,getNodeFromInstance:l,precacheChildNodes:a,precacheNode:o,uncacheNode:i};e.exports=v},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 o=n(1076),i=r(o),a=n(1077),s=r(a);t.Provider=i.default,t.connect=s.default},function(e,t,n){"use strict";function r(e){return"@"===e.type[0]?("@@INIT_MONITOR"===e.type&&(C=e.update,k=e.monitorProps),{type:w.MONITOR_ACTION,action:e,monitorReducer:C,monitorProps:k}):{type:w.LIFTED_ACTION,message:"DISPATCH",action:e}}function o(e,t,n){return{type:w.SELECT_INSTANCE,selected:n}}function i(e,t,n,r){return{type:w.SELECT_MONITOR,monitor:n,nextMonitorState:r}}function a(e,t){return{type:w.SELECT_MONITOR,monitor:e,monitorState:t}}function s(e){return{type:w.UPDATE_MONITOR_STATE,nextState:{subTabName:e}}}function u(e){return{type:w.UPDATE_MONITOR_STATE,nextState:e}}function l(e,t){return{type:w.LIFTED_ACTION,message:"IMPORT",state:e,preloadedState:t}}function c(){return{type:w.EXPORT}}function f(e){return{type:w.LIFTED_ACTION,message:"DISPATCH",action:{type:"LOCK_CHANGES",status:e},toAll:!0}}function d(e){return{type:w.LIFTED_ACTION,message:"DISPATCH",action:{type:"PAUSE_RECORDING",status:e},toAll:!0}}function p(e){return{type:w.LIFTED_ACTION,message:"ACTION",action:e}}function h(){return{type:w.TOGGLE_SYNC}}function m(){return{type:w.TOGGLE_SLIDER}}function v(){return{type:w.TOGGLE_DISPATCHER}}function y(e,t){return{type:_.RECONNECT,isCustom:e,options:t}}function g(e){return{type:w.SHOW_NOTIFICATION,notification:{type:"ERROR",message:e}}}function b(){return{type:w.CLEAR_NOTIFICATION}}function x(e){return{type:w.GET_REPORT_REQUEST,report:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.liftedDispatch=r,t.selectInstance=o,t.selectMonitor=i,t.selectMonitorWithState=a,t.selectMonitorTab=s,t.updateMonitorState=u,t.importState=l,t.exportState=c,t.lockChanges=f,t.pauseRecording=d,t.dispatchRemotely=p,t.toggleSync=h,t.toggleSlider=m,t.toggleDispatcher=v,t.saveSocketSettings=y,t.showNotification=g,t.clearNotification=b,t.getReport=x;var w=n(27),_=n(60),C=void 0,k={}},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(408),i=r(o),a=n(1147),s=r(a),u=n(1146),l=r(u),c=n(1145),f=r(c),d=n(407),p=r(d),h=n(409);r(h);t.createStore=i.default,t.combineReducers=s.default,t.bindActionCreators=l.default,t.applyMiddleware=f.default,t.compose=p.default},4,[1280,267],function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,n){e.exports=t},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UPDATE_STATE="devTools/UPDATE_STATE",t.SET_STATE="devTools/SET_STATE",t.SELECT_INSTANCE="devTools/SELECT_INSTANCE",t.REMOVE_INSTANCE="devTools/REMOVE_INSTANCE",t.LIFTED_ACTION="devTools/LIFTED_ACTION",t.MONITOR_ACTION="devTools/MONITOR_ACTION",t.TOGGLE_SYNC="devTools/TOGGLE_SYNC",t.SELECT_MONITOR="devTools/SELECT_MONITOR",t.UPDATE_MONITOR_STATE="devTools/UPDATE_MONITOR_STATE",t.TOGGLE_SLIDER="devTools/TOGGLE_SLIDER",t.TOGGLE_DISPATCHER="devTools/TOGGLE_DISPATCHER",t.EXPORT="devTools/EXPORT",t.SHOW_NOTIFICATION="devTools/SHOW_NOTIFICATION",t.CLEAR_NOTIFICATION="devTools/CLEAR_NOTIFICATION",t.UPDATE_REPORTS="reports/UPDATE",t.GET_REPORT_REQUEST="reports/GET_REPORT_REQUEST",t.GET_REPORT_ERROR="reports/GET_REPORT_ERROR",t.GET_REPORT_SUCCESS="reports/GET_REPORT_SUCCESS",t.ERROR="ERROR",t.TEST_ADD="test/ADD",t.TEST_EDIT="test/EDIT",t.TEST_REMOVE="test/REMOVE",t.TEST_SELECT="test/SELECT"},function(e,t,n){var r=n(162)("wks"),o=n(116),i=n(42).Symbol,a="function"==typeof i,s=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};s.store=r},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return!(0,a.default)(this.props,e)||!(0,a.default)(this.state,t)}t.__esModule=!0,t.default=o;var i=n(1075),a=r(i);e.exports=t.default},function(e,t,n){var r=n(317),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";function r(){O.ReactReconcileTransaction&&w?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){return r(),w.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==y.length?c("124",t,y.length):void 0,y.sort(a),g++;for(var n=0;t>n;n++){var r=y[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(h.logTopLevelRenders){var s=r;r._currentElement.type.isReactTopLevelWrapper&&(s=r._renderedComponent),i="React update: "+s.getName(),console.time(i)}if(m.performUpdateIfNecessary(r,e.reconcileTransaction,g),i&&console.timeEnd(i),o)for(var u=0;o.length>u;u++)e.callbackQueue.enqueue(o[u],r.getPublicInstance())}}function u(e){return r(),w.isBatchingUpdates?(y.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=g+1))):void w.batchedUpdates(u,e)}function l(e,t){w.isBatchingUpdates?void 0:c("125"),b.enqueue(e,t),x=!0}var c=n(12),f=n(11),d=n(369),p=n(55),h=n(374),m=n(85),v=n(138),y=(n(3),[]),g=0,b=d.getPooled(),x=!1,w=null,_={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),S()):y.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},k=[_,C];f(o.prototype,v,{getTransactionWrappers:function(){return k},destructor:function(){this.dirtyComponentsLength=null,d.release(this.callbackQueue),this.callbackQueue=null,O.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),p.addPoolingTo(o);var S=function(){for(;y.length||x;){if(y.length){var e=o.getPooled();e.perform(s,null,e),o.release(e)}if(x){x=!1;var t=b;b=d.getPooled(),t.notifyAll(),d.release(t)}}},T={injectReconcileTransaction:function(e){e?void 0:c("126"),O.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:c("127"),"function"!=typeof e.batchedUpdates?c("128"):void 0,"boolean"!=typeof e.isBatchingUpdates?c("129"):void 0,w=e}},O={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:S,injection:T,asap:l};e.exports=O},[1281,1171],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 o(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 a(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 s(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}),t.default=void 0;var u,l,c=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;t.length>n;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(1),p=o(d),h=n(244),m=o(h),v=n(90),y=r(v),g=n(406),b=o(g),x=n(36),w=o(x),_=(l=u=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleMouseEnter=n.handleMouseEnter.bind(n),n.handleMouseLeave=n.handleMouseLeave.bind(n),n.onClick=n.onClick.bind(n),n.state={hovered:!1},n}return s(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,m.default)(this,e,t)}},{key:"onClick",value:function(){this.props.enabled&&this.props.onClick&&this.props.onClick()}},{key:"handleMouseEnter",value:function(){this.setState({hovered:!0})}},{key:"handleMouseLeave",value:function(){this.setState({hovered:!1})}},{key:"render",value:function(){var e=this.props,t=e.theme,n=e.enabled,r=e.href,o=e.download,i=e.Icon,a=e.children,s=e.onMouseDown,u=e.onMouseUp,l=c({},w.default.button,{backgroundColor:t.base02});return n&&this.state.hovered&&(l=c({},l,{backgroundColor:(0,b.default)(t.base02,.2)})),n||(l=c({},l,{opacity:.2,cursor:"text",backgroundColor:"transparent"})),p.default.createElement("a",{onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseDown:s,onMouseUp:u,onClick:this.onClick,href:r,download:o,style:l},p.default.createElement(i,null),a&&p.default.createElement("span",{style:w.default.buttonText},a))}}]),t}(p.default.Component),u.propTypes={enabled:d.PropTypes.bool,href:d.PropTypes.string,download:d.PropTypes.string,onClick:d.PropTypes.func,onMouseDown:d.PropTypes.func,onMouseUp:d.PropTypes.func,Icon:d.PropTypes.func.isRequired,children:d.PropTypes.node,theme:d.PropTypes.oneOfType([d.PropTypes.object,d.PropTypes.string])},u.defaultProps={theme:y.nicinabox,enabled:!0},l);t.default=_,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76),o={container:{height:"100%",display:"flex",flexFlow:"column nowrap"},tabs:{backgroundColor:"rgb(79, 90, 101)"},tab:{fontSize:"11px"},buttonBar:{padding:"5px",textAlign:"center",display:"flex",flexFlow:"row nowrap",borderTopWidth:"1px",borderTopStyle:"solid",borderBottomWidth:"1px",borderBottomStyle:"solid",borderColor:"#4F5A65",flexDirection:"row",backgroundColor:"#353B46",fontFamily:"monaco, Consolas, Lucida Console, monospace",minWidth:"300px",minHeight:"30px",fontSize:"13px",overflow:"hidden"},button:{cursor:"pointer",fontWeight:"bold",borderRadius:3,padding:"0 8px",margin:"auto 2px",flexGrow:1,display:"inline-block",fontSize:"12px",color:"white",textDecoration:"none",overflow:"hidden",maxHeight:"24px",minWidth:"10px",lineHeight:"22px",WebkitFontSmoothing:"antialiased"},buttonText:{verticalAlign:"middle",fontSize:"10px",lineHeight:"20px",marginLeft:"6px",WebkitUserSelect:"none"},flatButton:{minWidth:"32px"},buttonLabel:{fontSize:"14px",paddingLeft:"8px",paddingRight:"8px"},input:{fontSize:"12px"},hint:{fontSize:"10px"},select:{fontSize:"1em",width:"100%",height:"3em",margin:"0 0.2em"},selectLabel:{color:r.indigo50,lineHeight:"2.7em",paddingLeft:"7px",paddingRight:"7px"},selectIcon:{top:"0.1em",height:"2em",width:"2em"},syncToggle:{color:"#000",fontSize:"15px",marginLeft:"6px"},dialogTitle:{lineHeight:"10px"},dialogBody:{padding:"24px"}};t.default=o,e.exports=t.default},function(e,t,n){var r=n(42),o=n(20),i=n(153),a=n(66),s="prototype",u=function(e,t,n){var l,c,f,d=e&u.F,p=e&u.G,h=e&u.S,m=e&u.P,v=e&u.B,y=e&u.W,g=p?o:o[t]||(o[t]={}),b=g[s],x=p?r:h?r[t]:(r[t]||{})[s];p&&(n=t);for(l in n)c=!d&&x&&void 0!==x[l],c&&l in g||(f=c?x[l]:n[l],g[l]=p&&"function"!=typeof x[l]?n[l]:v&&c?i(f,r):y&&x[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(f):m&&"function"==typeof f?i(Function.call,f):f,m&&((g.virtual||(g.virtual={}))[l]=f,e&u.R&&b&&!b[l]&&a(b,l,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];s?this[i]=s(n):"target"===i?this.target=r:this[i]=n[i]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return this.isDefaultPrevented=u?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(11),i=n(55),a=n(26),s=(n(5),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={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():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(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;for(var n=0;s.length>n;n++)this[s[n]]=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,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},[1281,1071],function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t){"use strict";function n(e){r[e]||(r[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r={};e.exports=t.default},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(47),o=n(273),i=n(164),a=Object.defineProperty;t.f=n(48)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){return n?[e,t]:e},e.exports=t.default},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r=n(67);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(65)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(274),o=n(154);e.exports=function(e){return r(o(e))}},function(e,t,n){function r(e,t){var n=i(e,t);return o(n)?n:void 0}var o=n(705),i=n(739);e.exports=r},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},[1294,12],function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=n(11),a=n(40),s=(n(5),n(399),Object.prototype.hasOwnProperty),u=n(397),l={key:!0,ref:!0,__self:!0,__source:!0},c=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};c.createElement=function(e,t,n){var i,u={},f=null,d=null,p=null,h=null;if(null!=t){r(t)&&(d=t.ref),o(t)&&(f=""+t.key),p=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!l.hasOwnProperty(i)&&(u[i]=t[i])}var m=arguments.length-2;if(1===m)u.children=n;else if(m>1){for(var v=Array(m),y=0;m>y;y++)v[y]=arguments[y+2];u.children=v}if(e&&e.defaultProps){var g=e.defaultProps;for(i in g)void 0===u[i]&&(u[i]=g[i])}return c(e,f,d,p,h,a.current,u)},c.createFactory=function(e){var t=c.createElement.bind(null,e);return t.type=e,t},c.cloneAndReplaceKey=function(e,t){var n=c(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},c.cloneElement=function(e,t,n){var u,f=i({},e.props),d=e.key,p=e.ref,h=e._self,m=e._source,v=e._owner;if(null!=t){r(t)&&(p=t.ref,v=a.current),o(t)&&(d=""+t.key);var y;e.type&&e.type.defaultProps&&(y=e.type.defaultProps);for(u in t)s.call(t,u)&&!l.hasOwnProperty(u)&&(f[u]=void 0===t[u]&&void 0!==y?y[u]:t[u])}var g=arguments.length-2;if(1===g)f.children=n;else if(g>1){for(var b=Array(g),x=0;g>x;x++)b[x]=arguments[x+2];f.children=b}return c(e.type,d,p,h,m,v,f)},c.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},e.exports=c},12,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(95),i=r(o);t.default=i.default},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}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMIT=t.UNSUBSCRIBE=t.SUBSCRIBE_ERROR=t.SUBSCRIBE_SUCCESS=t.SUBSCRIBE_REQUEST=t.DEAUTHENTICATE=t.DISCONNECTED=t.AUTH_ERROR=t.AUTH_SUCCESS=t.AUTH_REQUEST=t.RECONNECT=t.CONNECT_ERROR=t.CONNECT_SUCCESS=t.CONNECT_REQUEST=t.UNAUTHENTICATED=t.PENDING=t.AUTHENTICATED=t.OPEN=t.CONNECTING=t.CLOSED=void 0;var o=n(420),i=r(o),a=i.default.SCSocket,s=a.CLOSED,u=a.CONNECTING,l=a.OPEN,c=a.AUTHENTICATED,f=a.PENDING,d=a.UNAUTHENTICATED;t.CLOSED=s,t.CONNECTING=u,t.OPEN=l,t.AUTHENTICATED=c,t.PENDING=f,t.UNAUTHENTICATED=d;t.CONNECT_REQUEST="socket/CONNECT_REQUEST",t.CONNECT_SUCCESS="socket/CONNECT_SUCCESS",t.CONNECT_ERROR="socket/CONNECT_ERROR",t.RECONNECT="socket/RECONNECT",t.AUTH_REQUEST="socket/AUTH_REQUEST",t.AUTH_SUCCESS="socket/AUTH_SUCCESS",t.AUTH_ERROR="socket/AUTH_ERROR",t.DISCONNECTED="socket/DISCONNECTED",t.DEAUTHENTICATE="socket/DEAUTHENTICATE",t.SUBSCRIBE_REQUEST="socket/SUBSCRIBE_REQUEST",t.SUBSCRIBE_SUCCESS="socket/SUBSCRIBE_SUCCESS",t.SUBSCRIBE_ERROR="socket/SUBSCRIBE_ERROR",t.UNSUBSCRIBE="socket/UNSUBSCRIBE",t.EMIT="socket/EMIT"},[1281,266],[1285,489,488],function(e,t,n){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;arguments.length>t;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var a in r)i.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;t.length>i;++i)o.appendChild(t[i]);return o}function o(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)}function i(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function a(t,n){var r=t.className;e(n).test(r)||(t.className+=(r?" ":"")+n)}function s(t,n){for(var r=t.split(" "),o=0;r.length>o;o++)r[o]&&!e(r[o]).test(n)&&(n+=" "+r[o]);return n}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function l(e,t,n){t||(t={});for(var r in e)!e.hasOwnProperty(r)||n===!1&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function c(e,t,n,r,o){null==t&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var i=r||0,a=o||0;;){var s=e.indexOf("\t",i);if(0>s||s>=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}function f(){this.id=null}function d(e,t){for(var n=0;e.length>n;++n)if(e[n]==t)return n;return-1}function p(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);i==-1&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=t)return r}}function h(e){for(;e>=Ia.length;)Ia.push(m(Ia)+" ");return Ia[e]}function m(e){return e[e.length-1]}function v(e,t){for(var n=[],r=0;e.length>r;r++)n[r]=t(e[r],r);return n}function y(e,t,n){for(var r=0,o=n(t);e.length>r&&n(e[r])<=o;)r++;e.splice(r,0,t)}function g(){}function b(e,t){var n;return Object.create?n=Object.create(e):(g.prototype=e,n=new g),t&&l(t,n),n}function x(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Na.test(e))}function w(e,t){return t?!(t.source.indexOf("\\w")<=-1||!x(e))||t.test(e):x(e)}function _(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function C(e){return e.charCodeAt(0)>=768&&Da.test(e)}function k(e,t,n){var o=this;this.input=n,o.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=r("div",null,"CodeMirror-cursors"),o.measure=r("div",null,"CodeMirror-measure"),o.lineMeasure=r("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none"),o.mover=r("div",[r("div",[o.lineSpace],"CodeMirror-lines")],null,"position: relative"),o.sizer=r("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=r("div",null,null,"position: absolute; height: "+Ma+"px; width: 1px;"),o.gutters=r("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=r("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=r("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),sa&&8>ua&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),la||oa&&ya||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function S(e,t){if(t-=e.first,0>t||t>=e.size)throw Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(i>t){n=o;break}t-=i}return n.lines[t]}function T(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o}),r}function O(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function E(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function M(e){if(null==e.parent)return null;for(var t=e.parent,n=d(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function P(e,t){var n=e.first;e:do{for(var r=0;e.children.length>r;++r){var o=e.children[r],i=o.height;if(i>t){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;e.lines.length>a;++a){var s=e.lines[a],u=s.height;if(u>t)break;t-=u}return n+a}function A(e,t){return t>=e.first&&e.first+e.size>t}function j(e,t){return e.lineNumberFormatter(t+e.firstLineNumber)+""}function R(e,t){return this instanceof R?(this.line=e,void(this.ch=t)):new R(e,t)}function I(e,t){return e.line-t.line||e.ch-t.ch}function N(e){return R(e.line,e.ch)}function D(e,t){return I(e,t)<0?t:e}function L(e,t){return I(e,t)<0?e:t}function F(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function B(e,t){if(e.first>t.line)return R(e.first,0);var n=e.first+e.size-1;return t.line>n?R(n,S(e,n).text.length):z(t,S(e,t.line).text.length)}function z(e,t){var n=e.ch;return null==n||n>t?R(e.line,t):0>n?R(e.line,0):e}function U(e,t){for(var n=[],r=0;t.length>r;r++)n[r]=B(e,t[r]);return n}function W(){La=!0}function q(){Fa=!0}function H(e,t,n){this.marker=e,this.from=t,this.to=n}function K(e,t){if(e)for(var n=0;e.length>n;++n){var r=e[n];if(r.marker==t)return r}}function V(e,t){for(var n,r=0;e.length>r;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function G(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Y(e,t,n){var r;if(e)for(var o=0;e.length>o;++o){var i=e[o],a=i.marker,s=null==i.from||(a.inclusiveLeft?t>=i.from:t>i.from);if(s||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var u=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new H(a,i.from,u?null:i.to))}}return r}function J(e,t,n){var r;if(e)for(var o=0;e.length>o;++o){var i=e[o],a=i.marker,s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);if(s||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var u=null==i.from||(a.inclusiveLeft?t>=i.from:t>i.from);(r||(r=[])).push(new H(a,u?null:i.from-t,null==i.to?null:i.to-t))}}return r}function Z(e,t){if(t.full)return null;var n=A(e,t.from.line)&&S(e,t.from.line).markedSpans,r=A(e,t.to.line)&&S(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==I(t.from,t.to),s=Y(n,o,a),u=J(r,i,a),l=1==t.text.length,c=m(t.text).length+(l?o:0);if(s)for(var f=0;s.length>f;++f){var d=s[f];if(null==d.to){var p=K(u,d.marker);p?l&&(d.to=null==p.to?null:p.to+c):d.to=o}}if(u)for(var h=0;u.length>h;++h){var v=u[h];if(null!=v.to&&(v.to+=c),null==v.from){var y=K(s,v.marker);y||(v.from=c,l&&(s||(s=[])).push(v))}else v.from+=c,l&&(s||(s=[])).push(v)}s&&(s=Q(s)),u&&u!=s&&(u=Q(u));var g=[s];if(!l){var b,x=t.text.length-2;if(x>0&&s)for(var w=0;s.length>w;++w)null==s[w].to&&(b||(b=[])).push(new H(s[w].marker,null,null));for(var _=0;x>_;++_)g.push(b);g.push(u)}return g}function Q(e){for(var t=0;e.length>t;++t){var n=e[t];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function X(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(e){if(e.markedSpans)for(var t=0;e.markedSpans.length>t;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&d(r,n)!=-1||(r||(r=[])).push(n)}}),!r)return null;for(var o=[{from:t,to:n}],i=0;r.length>i;++i)for(var a=r[i],s=a.find(0),u=0;o.length>u;++u){var l=o[u];if(I(l.to,s.from)>=0&&I(l.from,s.to)<=0){var c=[u,1],f=I(l.from,s.from),p=I(l.to,s.to);(0>f||!a.inclusiveLeft&&!f)&&c.push({from:l.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:l.to}),o.splice.apply(o,c),u+=c.length-1}}return o}function $(e){var t=e.markedSpans;if(t){for(var n=0;t.length>n;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function ee(e,t){if(t){for(var n=0;t.length>n;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function te(e){return e.inclusiveLeft?-1:0}function ne(e){return e.inclusiveRight?1:0}function re(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=I(r.from,o.from)||te(e)-te(t);if(i)return-i;var a=I(r.to,o.to)||ne(e)-ne(t);return a?a:t.id-e.id}function oe(e,t){var n,r=Fa&&e.markedSpans;if(r)for(var o=void 0,i=0;r.length>i;++i)o=r[i],!o.marker.collapsed||null!=(t?o.from:o.to)||n&&re(n,o.marker)>=0||(n=o.marker);return n}function ie(e){return oe(e,!0)}function ae(e){return oe(e,!1)}function se(e,t,n,r,o){var i=S(e,t),a=Fa&&i.markedSpans;if(a)for(var s=0;a.length>s;++s){var u=a[s];if(u.marker.collapsed){var l=u.marker.find(0),c=I(l.from,n)||te(u.marker)-te(o),f=I(l.to,r)||ne(u.marker)-ne(o);if((0>c||f>0)&&(c>0||0>f)&&(0>=c&&(u.marker.inclusiveRight&&o.inclusiveLeft?I(l.to,n)>=0:I(l.to,n)>0)||c>=0&&(u.marker.inclusiveRight&&o.inclusiveLeft?I(l.from,r)<=0:I(l.from,r)<0)))return!0}}}function ue(e){for(var t;t=ie(e);)e=t.find(-1,!0).line;return e}function le(e){for(var t,n;t=ae(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function ce(e,t){var n=S(e,t),r=ue(n);return n==r?t:M(r)}function fe(e,t){if(t>e.lastLine())return t;var n,r=S(e,t);if(!de(e,r))return t;for(;n=ae(r);)r=n.find(1,!0).line;return M(r)+1}function de(e,t){var n=Fa&&t.markedSpans;if(n)for(var r=void 0,o=0;n.length>o;++o)if(r=n[o],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&pe(e,t,r))return!0}}function pe(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return pe(e,r.line,K(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;t.markedSpans.length>i;++i)if(o=t.markedSpans[i],o.marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&pe(e,t,o))return!0}function he(e){e=ue(e);for(var t=0,n=e.parent,r=0;n.lines.length>r;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;n=i,i=n.parent)for(var a=0;i.children.length>a;++a){var s=i.children[a];if(s==n)break;t+=s.height}return t}function me(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=ie(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=ae(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,r=i.to.line,n+=r.text.length-i.to.ch}return n}function ve(e){var t=e.display,n=e.doc;t.maxLine=S(n,n.first),t.maxLineLength=me(t.maxLine),t.maxLineChanged=!0,n.iter(function(e){var n=me(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function ye(e,t,n,r){if(!e)return r(t,n,"ltr");for(var o=!1,i=0;e.length>i;++i){var a=e[i];(n>a.from&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),o=!0)}o||r(t,n,"ltr")}function ge(e){return e.level%2?e.to:e.from}function be(e){return e.level%2?e.from:e.to}function xe(e){var t=Oe(e);return t?ge(t[0]):0}function we(e){var t=Oe(e);return t?be(m(t)):e.text.length}function _e(e,t,n){var r=e[0].level;return t==r||n!=r&&n>t}function Ce(e,t){var n;Ba=null;for(var r=0;e.length>r;++r){var o=e[r];if(t>o.from&&o.to>t)return r;if(o.from==t||o.to==t){if(null!=n)return _e(e,o.level,e[n].level)?(o.from!=o.to&&(Ba=n),r):(o.from!=o.to&&(Ba=r),n);n=r}}return n}function ke(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&C(e.text.charAt(t)));return t}function Se(e,t,n,r){var o=Oe(e);if(!o)return Te(e,t,n,r);for(var i=Ce(o,t),a=o[i],s=ke(e,t,a.level%2?-n:n,r);;){if(s>a.from&&a.to>s)return s;if(s==a.from||s==a.to)return Ce(o,s)==i?s:(a=o[i+=n],n>0==a.level%2?a.to:a.from);if(a=o[i+=n],!a)return null;s=n>0==a.level%2?ke(e,a.to,-1,r):ke(e,a.from,1,r)}}function Te(e,t,n,r){var o=t+n;if(r)for(;o>0&&C(e.text.charAt(o));)o+=n;return 0>o||o>e.text.length?null:o}function Oe(e){var t=e.order;return null==t&&(t=e.order=za(e.text)),t}function Ee(e,t){return e._handlers&&e._handlers[t]||Ua}function Me(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=d(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function Pe(e,t){var n=Ee(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;n.length>o;++o)n[o].apply(null,r)}function Ae(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Pe(e,n||t.type,e,t),Le(t)||t.codemirrorIgnore}function je(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;t.length>r;++r)d(n,t[r])==-1&&n.push(t[r])}function Re(e,t){return Ee(e,t).length>0}function Ie(e){e.prototype.on=function(e,t){Wa(this,e,t)},e.prototype.off=function(e,t){Me(this,e,t)}}function Ne(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Fe(e){Ne(e),De(e)}function Be(e){return e.target||e.srcElement}function ze(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ga&&e.ctrlKey&&1==t&&(t=3),t}function Ue(e){if(null==Oa){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oa=1>=t.offsetWidth&&t.offsetHeight>2&&!(sa&&8>ua))}var o=Oa?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function We(e){if(null!=Ea)return Ea;var r=n(e,document.createTextNode("AخA")),o=_a(r,0,1).getBoundingClientRect(),i=_a(r,1,2).getBoundingClientRect();return t(e),!(!o||o.left==o.right)&&(Ea=3>i.right-o.right)}function qe(e){if(null!=Ga)return Ga;var t=n(e,r("span","x")),o=t.getBoundingClientRect(),i=_a(t,0,1).getBoundingClientRect();return Ga=Math.abs(o.left-i.left)>1}function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ya[e]=t}function Ke(e,t){Ja[e]=t}function Ve(e){if("string"==typeof e&&Ja.hasOwnProperty(e))e=Ja[e];else if(e&&"string"==typeof e.name&&Ja.hasOwnProperty(e.name)){var t=Ja[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=Ve(t);var n=Ya[t.name];if(!n)return Ge(e,"text/plain");var r=n(e,t);if(Za.hasOwnProperty(t.name)){var o=Za[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ye(e,t){var n=Za.hasOwnProperty(e)?Za[e]:Za[e]={};l(t,n)}function Je(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),n&&n.mode!=e);)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Qe(e,t,n){return!e.startState||e.startState(t,n)}function Xe(e,t,n,r){var o=[e.state.modeGen],i={};at(e,t.text,e.doc.mode,n,function(e,t){return o.push(e,t)},i,r);for(var a=function(n){var r=e.state.overlays[n],a=1,s=0;at(e,t.text,r.mode,!0,function(e,t){for(var n=a;e>s;){var i=o[a];i>e&&o.splice(a,1,e,o[a+1],i),a+=2,s=Math.min(e,i)}if(t)if(r.opaque)o.splice(n,a-n,e,"overlay "+t),a=n+2;else for(;a>n;n+=2){var u=o[n+1];o[n+1]=(u?u+" ":"")+"overlay "+t}},i)},s=0;e.state.overlays.length>s;++s)a(s);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function $e(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=et(e,M(t)),o=Xe(e,t,t.text.length>e.options.maxHighlightLength?Je(e.doc.mode,r):r);t.stateAfter=r,t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function et(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return!0;var i=st(e,t,n),a=i>r.first&&S(r,i-1).stateAfter;return a=a?Je(r.mode,a):Qe(r.mode),r.iter(i,t,function(n){tt(e,n.text,a);var s=i==t-1||i%5==0||i>=o.viewFrom&&o.viewTo>i;n.stateAfter=s?Je(r.mode,a):null,++i}),n&&(r.frontier=i),a}function tt(e,t,n,r){var o=e.doc.mode,i=new Qa(t,e.options.tabSize);for(i.start=i.pos=r||0,""==t&&nt(o,n);!i.eol();)rt(o,i,n),i.start=i.pos}function nt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function rt(e,t,n,r){for(var o=0;10>o;o++){r&&(r[0]=Ze(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw Error("Mode "+e.name+" failed to advance stream.")}function ot(e,t,n,r){var o,i=function(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?Je(a.mode,c):c}},a=e.doc,s=a.mode;t=B(a,t);var u,l=S(a,t.line),c=et(e,t.line,n),f=new Qa(l.text,e.options.tabSize);for(r&&(u=[]);(r||t.ch>f.pos)&&!f.eol();)f.start=f.pos,o=rt(s,f,c),r&&u.push(i(!0));return r?u:i()}function it(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function at(e,t,n,r,o,i,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var u,l=0,c=null,f=new Qa(t,e.options.tabSize),d=e.options.addModeClass&&[null];for(""==t&&it(nt(n,r),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&tt(e,t,r,f.pos),f.pos=t.length,u=null):u=it(rt(n,f,r,d),i),d){var p=d[0].name;p&&(u="m-"+(u?p+" "+u:p))}if(!s||c!=u){for(;f.start>l;)l=Math.min(f.start,l+5e3),o(l,c);c=u}f.start=f.pos}for(;f.pos>l;){var h=Math.min(f.pos,l+5e3);o(h,c),l=h}}function st(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(i.first>=s)return i.first;var u=S(i,s-1);if(u.stateAfter&&(!n||i.frontier>=s))return s;var l=c(u.text,null,e.options.tabSize);(null==o||r>l)&&(o=s-1,r=l)}return o}function ut(e,t,n){this.text=e,ee(this,t),this.height=n?n(this):1}function lt(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),$(e),ee(e,n);var o=r?r(e):1;o!=e.height&&E(e,o)}function ct(e){e.parent=null,$(e)}function ft(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?es:$a;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function dt(e,t){var n=r("span",null,null,la?"padding-right: .1px":null),o={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(sa||la)&&e.getOption("lineWrapping")};t.measur