{"size": 156712, "ext": "js", "max_stars_repo_path": "mitmproxy/tools/web/static/app.js", "max_stars_repo_name": "fotinakis/mitmproxy", "max_stars_repo_stars_event_min_datetime": "2021-01-13T15:39:58.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-13T15:39:58.000Z", "max_issues_repo_path": "mitmproxy/tools/web/static/app.js", "max_issues_repo_name": "fotinakis/mitmproxy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "mitmproxy/tools/web/static/app.js", "max_forks_repo_name": "fotinakis/mitmproxy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 861.0549450549, "max_line_length": 15060, "alphanum_fraction": 0.7524631171}
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_redux=require("redux"),_reactRedux=require("react-redux"),_reduxThunk=require("redux-thunk"),_reduxThunk2=_interopRequireDefault(_reduxThunk),_ProxyApp=require("./components/ProxyApp"),_ProxyApp2=_interopRequireDefault(_ProxyApp),_index=require("./ducks/index"),_index2=_interopRequireDefault(_index),_eventLog=require("./ducks/eventLog"),_urlState=require("./urlState"),_urlState2=_interopRequireDefault(_urlState),_websocket=require("./backends/websocket"),_websocket2=_interopRequireDefault(_websocket),middlewares=[_reduxThunk2.default],createLogger,store=(0,_redux.createStore)(_index2.default,_redux.applyMiddleware.apply(void 0,middlewares));(0,_urlState2.default)(store),window.backend=new _websocket2.default(store),window.addEventListener("error",function(e){store.dispatch((0,_eventLog.add)(e))}),document.addEventListener("DOMContentLoaded",function(){(0,_reactDom.render)(_react2.default.createElement(_reactRedux.Provider,{store:store},_react2.default.createElement(_ProxyApp2.default,null)),document.getElementById("mitmproxy"))});

},{"./backends/websocket":2,"./components/ProxyApp":36,"./ducks/eventLog":47,"./ducks/index":49,"./urlState":58,"react":"react","react-dom":"react-dom","react-redux":"react-redux","redux":"redux","redux-thunk":"redux-thunk"}],2:[function(require,module,exports){
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.CMD_RESET=void 0;var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass=function(){function e(e,t){for(var n=0;n<t.length;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}}(),_utils=require("../utils"),CMD_RESET=exports.CMD_RESET="reset",WebsocketBackend=function(){function e(t){_classCallCheck(this,e),this.activeFetches={},this.store=t,this.connect()}return _createClass(e,[{key:"connect",value:function(){var e=this;this.socket=new WebSocket(location.origin.replace("http","ws")+"/updates"),this.socket.addEventListener("open",function(){return e.onOpen()}),this.socket.addEventListener("close",function(){return e.onClose()}),this.socket.addEventListener("message",function(t){return e.onMessage(JSON.parse(t.data))}),this.socket.addEventListener("error",function(t){return e.onError(t)})}},{key:"onOpen",value:function(){this.fetchData("settings"),this.fetchData("flows"),this.fetchData("events")}},{key:"fetchData",value:function(e){var t=this,n=[];this.activeFetches[e]=n,(0,_utils.fetchApi)("/"+e).then(function(e){return e.json()}).then(function(r){t.activeFetches[e]===n&&t.receive(e,r)})}},{key:"onMessage",value:function(e){if(e.cmd===CMD_RESET)return this.fetchData(e.resource);if(e.resource in this.activeFetches)this.activeFetches[e.resource].push(e);else{var t=(e.resource+"_"+e.cmd).toUpperCase();this.store.dispatch(_extends({type:t},e))}}},{key:"receive",value:function(e,t){var n=this,r=(e+"_RECEIVE").toUpperCase();this.store.dispatch({type:r,cmd:"receive",resource:e,data:t});var s=this.activeFetches[e];delete this.activeFetches[e],s.forEach(function(e){return n.onMessage(e)})}},{key:"onClose",value:function(){console.error("onClose",arguments)}},{key:"onError",value:function(){console.error("onError",arguments)}}]),e}();exports.default=WebsocketBackend;

},{"../utils":59}],3:[function(require,module,exports){
"use strict";function _interopRequireWildcard(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 _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ContentView(e){var t=e.flow,n=e.message,r=e.contentView,o=e.isDisplayLarge,i=e.displayLarge,a=e.onContentChange,u=e.readonly;if(0===n.contentLength&&u)return _react2.default.createElement(MetaViews.ContentEmpty,e);if(null===n.contentLength&&u)return _react2.default.createElement(MetaViews.ContentMissing,e);if(!o&&ContentView.isContentTooLarge(n))return _react2.default.createElement(MetaViews.ContentTooLarge,_extends({},e,{onClick:i}));var l=ContentViews[r]||ContentViews.ViewServer;return _react2.default.createElement("div",{className:"contentview"},_react2.default.createElement(l,{flow:t,message:n,contentView:r,readonly:u,onChange:a}),_react2.default.createElement(_ShowFullContentButton2.default,null))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_ContentViews=require("./ContentView/ContentViews"),ContentViews=_interopRequireWildcard(_ContentViews),_MetaViews=require("./ContentView/MetaViews"),MetaViews=_interopRequireWildcard(_MetaViews),_ShowFullContentButton=require("./ContentView/ShowFullContentButton"),_ShowFullContentButton2=_interopRequireDefault(_ShowFullContentButton),_flow=require("../ducks/ui/flow");ContentView.propTypes={flow:_react2.default.PropTypes.object.isRequired,message:_react2.default.PropTypes.object.isRequired},ContentView.isContentTooLarge=function(e){return e.contentLength>1048576*(ContentViews.ViewImage.matches(e)?10:.2)},exports.default=(0,_reactRedux.connect)(function(e){return{contentView:e.ui.flow.contentView,isDisplayLarge:e.ui.flow.displayLarge}},{displayLarge:_flow.displayLarge,updateEdit:_flow.updateEdit})(ContentView);

},{"../ducks/ui/flow":51,"./ContentView/ContentViews":7,"./ContentView/MetaViews":9,"./ContentView/ShowFullContentButton":10,"react":"react","react-redux":"react-redux"}],4:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function CodeEditor(e){var r=e.content,t=e.onChange,o={lineNumbers:!0};return _react2.default.createElement("div",{className:"codeeditor",onKeyDown:function(e){return e.stopPropagation()}},_react2.default.createElement(_reactCodemirror2.default,{value:r,onChange:t,options:o}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=CodeEditor;var _react=require("react"),_react2=_interopRequireDefault(_react),_reactCodemirror=require("react-codemirror"),_reactCodemirror2=_interopRequireDefault(_reactCodemirror);CodeEditor.propTypes={content:_react.PropTypes.string.isRequired,onChange:_react.PropTypes.func.isRequired};

},{"react":"react","react-codemirror":"react-codemirror"}],5:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_createClass=function(){function e(e,t){for(var n=0;n<t.length;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}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_utils=require("../../flow/utils.js");exports.default=function(e){var t,n;return n=t=function(t){function n(e){_classCallCheck(this,n);var t=_possibleConstructorReturn(this,Object.getPrototypeOf(n).call(this,e));return t.state={content:void 0,request:void 0},t}return _inherits(n,t),_createClass(n,[{key:"componentWillMount",value:function(){this.updateContent(this.props)}},{key:"componentWillReceiveProps",value:function(e){e.message.content===this.props.message.content&&e.message.contentHash===this.props.message.contentHash&&e.contentView===this.props.contentView||this.updateContent(e)}},{key:"componentWillUnmount",value:function(){this.state.request&&this.state.request.abort()}},{key:"updateContent",value:function(t){if(this.state.request&&this.state.request.abort(),void 0!==t.message.content)return this.setState({request:void 0,content:t.message.content});if(0===t.message.contentLength||null===t.message.contentLength)return this.setState({request:void 0,content:""});var n=_utils.MessageUtils.getContentURL(t.flow,t.message,"ViewServer"==e.name?t.contentView:void 0),r=new XMLHttpRequest;r.addEventListener("load",this.requestComplete.bind(this,r)),r.addEventListener("error",this.requestFailed.bind(this,r)),r.open("GET",n),r.send(),this.setState({request:r,content:void 0})}},{key:"requestComplete",value:function(e,t){e===this.state.request&&this.setState({content:e.responseText,request:void 0})}},{key:"requestFailed",value:function(e,t){e===this.state.request&&(console.error(t),this.setState({content:"Error getting content.",request:void 0}))}},{key:"render",value:function(){return void 0!==this.state.content?_react2.default.createElement(e,_extends({content:this.state.content},this.props)):_react2.default.createElement("div",{className:"text-center"},_react2.default.createElement("i",{className:"fa fa-spinner fa-spin"}))}}]),n}(_react2.default.Component),t.displayName=e.displayName||e.name,t.matches=e.matches,t.propTypes=_extends({},e.propTypes,{content:_react.PropTypes.string,flow:_react.PropTypes.object.isRequired,message:_react.PropTypes.object.isRequired}),n};

},{"../../flow/utils.js":57,"react":"react"}],6:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ContentViewOptions(e){var t=e.flow,n=e.message,o=e.uploadContent,r=(e.readonly,e.contentViewDescription);return _react2.default.createElement("div",{className:"view-options"},_react2.default.createElement(_ViewSelector2.default,{message:n})," ",_react2.default.createElement(_DownloadContentButton2.default,{flow:t,message:n})," ",_react2.default.createElement(_UploadContentButton2.default,{uploadContent:o})," ",_react2.default.createElement("span",null,r))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_ViewSelector=require("./ViewSelector"),_ViewSelector2=_interopRequireDefault(_ViewSelector),_UploadContentButton=require("./UploadContentButton"),_UploadContentButton2=_interopRequireDefault(_UploadContentButton),_DownloadContentButton=require("./DownloadContentButton"),_DownloadContentButton2=_interopRequireDefault(_DownloadContentButton);ContentViewOptions.propTypes={flow:_react2.default.PropTypes.object.isRequired,message:_react2.default.PropTypes.object.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{contentViewDescription:e.ui.flow.viewDescription}})(ContentViewOptions);

},{"./DownloadContentButton":8,"./UploadContentButton":11,"./ViewSelector":12,"react":"react","react-redux":"react-redux"}],7:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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)}function ViewImage(e){var t=e.flow,r=e.message;return _react2.default.createElement("div",{className:"flowview-image"},_react2.default.createElement("img",{src:_utils.MessageUtils.getContentURL(t,r),alt:"preview",className:"img-thumbnail"}))}function Edit(e){var t=e.content,r=e.onChange;return _react2.default.createElement(_CodeEditor2.default,{content:t,onChange:r})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ViewImage=exports.ViewServer=exports.Edit=void 0;var _slicedToArray=function(){function e(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_flow=require("../../ducks/ui/flow"),_ContentLoader=require("./ContentLoader"),_ContentLoader2=_interopRequireDefault(_ContentLoader),_utils=require("../../flow/utils"),_CodeEditor=require("./CodeEditor"),_CodeEditor2=_interopRequireDefault(_CodeEditor),isImage=/^image\/(png|jpe?g|gif|vnc.microsoft.icon|x-icon)$/i;ViewImage.matches=function(e){return isImage.test(_utils.MessageUtils.getContentType(e))},ViewImage.propTypes={flow:_react.PropTypes.object.isRequired,message:_react.PropTypes.object.isRequired},Edit.propTypes={content:_react2.default.PropTypes.string.isRequired},exports.Edit=Edit=(0,_ContentLoader2.default)(Edit);var ViewServer=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"componentWillMount",value:function(){this.setContentView(this.props)}},{key:"componentWillReceiveProps",value:function(e){e.content!=this.props.content&&this.setContentView(e)}},{key:"setContentView",value:function(e){try{this.data=JSON.parse(e.content)}catch(e){this.data={lines:[],description:e.message}}e.setContentViewDescription(e.contentView!=this.data.description?this.data.description:""),e.setContent(this.data.lines)}},{key:"render",value:function(){var e=this.props,t=(e.content,e.contentView,e.message),r=e.maxLines,n=this.props.showFullContent?this.data.lines:this.data.lines.slice(0,r);return _react2.default.createElement("div",null,_react2.default.createElement("pre",null,n.map(function(e,t){return _react2.default.createElement("div",{key:"line"+t},e.map(function(e,t){var r=_slicedToArray(e,2),n=r[0],i=r[1];return _react2.default.createElement("span",{key:"tuple"+t,className:n},i)}))})),ViewImage.matches(t)&&_react2.default.createElement(ViewImage,this.props))}}]),t}(_react.Component);ViewServer.propTypes={showFullContent:_react.PropTypes.bool.isRequired,maxLines:_react.PropTypes.number.isRequired,setContentViewDescription:_react.PropTypes.func.isRequired,setContent:_react.PropTypes.func.isRequired},exports.ViewServer=ViewServer=(0,_reactRedux.connect)(function(e){return{showFullContent:e.ui.flow.showFullContent,maxLines:e.ui.flow.maxContentLines}},{setContentViewDescription:_flow.setContentViewDescription,setContent:_flow.setContent})((0,_ContentLoader2.default)(ViewServer)),exports.Edit=Edit,exports.ViewServer=ViewServer,exports.ViewImage=ViewImage;

},{"../../ducks/ui/flow":51,"../../flow/utils":57,"./CodeEditor":4,"./ContentLoader":5,"react":"react","react-redux":"react-redux"}],8:[function(require,module,exports){
"use strict";function DownloadContentButton(e){var t=e.flow,o=e.message;return React.createElement("a",{className:"btn btn-default btn-xs",href:_utils.MessageUtils.getContentURL(t,o),title:"Download the content of the flow."},React.createElement("i",{className:"fa fa-download"}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=DownloadContentButton;var _utils=require("../../flow/utils"),_react=require("react");DownloadContentButton.propTypes={flow:_react.PropTypes.object.isRequired,message:_react.PropTypes.object.isRequired};

},{"../../flow/utils":57,"react":"react"}],9:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ContentEmpty(e){var t=e.flow,n=e.message;return _react2.default.createElement("div",{className:"alert alert-info"},"No ",t.request===n?"request":"response"," content.")}function ContentMissing(e){var t=e.flow,n=e.message;return _react2.default.createElement("div",{className:"alert alert-info"},t.request===n?"Request":"Response"," content missing.")}function ContentTooLarge(e){var t=e.message,n=e.onClick,o=e.uploadContent,a=e.flow;return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"alert alert-warning"},_react2.default.createElement("button",{onClick:n,className:"btn btn-xs btn-warning pull-right"},"Display anyway"),(0,_utils.formatSize)(t.contentLength)," content size."),_react2.default.createElement("div",{className:"view-options text-center"},_react2.default.createElement(_UploadContentButton2.default,{uploadContent:o})," ",_react2.default.createElement(_DownloadContentButton2.default,{flow:a,message:t})))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ContentEmpty=ContentEmpty,exports.ContentMissing=ContentMissing,exports.ContentTooLarge=ContentTooLarge;var _react=require("react"),_react2=_interopRequireDefault(_react),_utils=require("../../utils.js"),_UploadContentButton=require("./UploadContentButton"),_UploadContentButton2=_interopRequireDefault(_UploadContentButton),_DownloadContentButton=require("./DownloadContentButton"),_DownloadContentButton2=_interopRequireDefault(_DownloadContentButton);

},{"../../utils.js":59,"./DownloadContentButton":8,"./UploadContentButton":11,"react":"react"}],10:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ShowFullContentButton(e){var t=e.setShowFullContent,n=e.showFullContent,o=e.visibleLines,u=e.contentLines;return!n&&_react2.default.createElement("div",null,_react2.default.createElement(_Button2.default,{className:"view-all-content-btn btn-xs",onClick:function(){return t()},text:"Show full content"}),_react2.default.createElement("span",{className:"pull-right"}," ",o,"/",u," are visible   "))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_reactDom=require("react-dom"),_Button=require("../common/Button"),_Button2=_interopRequireDefault(_Button),_flow=require("../../ducks/ui/flow");ShowFullContentButton.propTypes={setShowFullContent:_react.PropTypes.func.isRequired,showFullContent:_react.PropTypes.bool.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{showFullContent:e.ui.flow.showFullContent,visibleLines:e.ui.flow.maxContentLines,contentLines:e.ui.flow.content.length}},{setShowFullContent:_flow.setShowFullContent})(ShowFullContentButton);

},{"../../ducks/ui/flow":51,"../common/Button":39,"react":"react","react-dom":"react-dom","react-redux":"react-redux"}],11:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function UploadContentButton(e){var t=e.uploadContent;return React.createElement(_FileChooser2.default,{icon:"fa-upload",title:"Upload a file to replace the content.",onOpenFile:t,className:"btn btn-default btn-xs"})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=UploadContentButton;var _react=require("react"),_FileChooser=require("../common/FileChooser"),_FileChooser2=_interopRequireDefault(_FileChooser);UploadContentButton.propTypes={uploadContent:_react.PropTypes.func.isRequired};

},{"../common/FileChooser":41,"react":"react"}],12:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ViewSelector(e){var t=e.contentViews,r=e.activeView,n=e.isEdit,i=e.setContentView,o=ContentViews.Edit.displayName,a=_react2.default.createElement("span",null," ",_react2.default.createElement("b",null,"View:")," ",r,_react2.default.createElement("span",{className:"caret"})," ");return _react2.default.createElement(_Dropdown2.default,{dropup:!0,className:"pull-left",btnClass:"btn btn-default btn-xs",text:a},t.map(function(e){return _react2.default.createElement("a",{href:"#",key:e,onClick:function(t){t.preventDefault(),i(e)}},e.toLowerCase().replace("_"," "))}),n&&_react2.default.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),i(o)}},o.toLowerCase()))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_ContentViews=require("./ContentViews"),ContentViews=_interopRequireWildcard(_ContentViews),_flow=require("../../ducks/ui/flow"),_Dropdown=require("../common/Dropdown"),_Dropdown2=_interopRequireDefault(_Dropdown);ViewSelector.propTypes={contentViews:_react.PropTypes.array.isRequired,activeView:_react.PropTypes.string.isRequired,isEdit:_react.PropTypes.bool.isRequired,setContentView:_react.PropTypes.func.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{contentViews:e.settings.contentViews,activeView:e.ui.flow.contentView,isEdit:!!e.ui.flow.modifiedFlow}},{setContentView:_flow.setContentView})(ViewSelector);

},{"../../ducks/ui/flow":51,"../common/Dropdown":40,"./ContentViews":7,"react":"react","react-redux":"react-redux"}],13:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_eventLog=require("../ducks/eventLog"),_ToggleButton=require("./common/ToggleButton"),_ToggleButton2=_interopRequireDefault(_ToggleButton),_EventList=require("./EventLog/EventList"),_EventList2=_interopRequireDefault(_EventList),EventLog=function(e){function t(e,r){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,r));return n.state={height:n.props.defaultHeight},n.onDragStart=n.onDragStart.bind(n),n.onDragMove=n.onDragMove.bind(n),n.onDragStop=n.onDragStop.bind(n),n}return _inherits(t,e),_createClass(t,[{key:"onDragStart",value:function(e){e.preventDefault(),this.dragStart=this.state.height+e.pageY,window.addEventListener("mousemove",this.onDragMove),window.addEventListener("mouseup",this.onDragStop),window.addEventListener("dragend",this.onDragStop)}},{key:"onDragMove",value:function(e){e.preventDefault(),this.setState({height:this.dragStart-e.pageY})}},{key:"onDragStop",value:function(e){e.preventDefault(),window.removeEventListener("mousemove",this.onDragMove)}},{key:"render",value:function(){var e=this.state.height,t=this.props,r=t.filters,n=t.events,o=t.toggleFilter,a=t.close;return _react2.default.createElement("div",{className:"eventlog",style:{height:e}},_react2.default.createElement("div",{onMouseDown:this.onDragStart},"Eventlog",_react2.default.createElement("div",{className:"pull-right"},["debug","info","web"].map(function(e){return _react2.default.createElement(_ToggleButton2.default,{key:e,text:e,checked:r[e],onToggle:function(){return o(e)}})}),_react2.default.createElement("i",{onClick:a,className:"fa fa-close"}))),_react2.default.createElement(_EventList2.default,{events:n}))}}]),t}(_react.Component);EventLog.propTypes={filters:_react.PropTypes.object.isRequired,events:_react.PropTypes.array.isRequired,toggleFilter:_react.PropTypes.func.isRequired,close:_react.PropTypes.func.isRequired,defaultHeight:_react.PropTypes.number},EventLog.defaultProps={defaultHeight:200},exports.default=(0,_reactRedux.connect)(function(e){return{filters:e.eventLog.filters,events:e.eventLog.view.data}},{close:_eventLog.toggleVisibility,toggleFilter:_eventLog.toggleFilter})(EventLog);

},{"../ducks/eventLog":47,"./EventLog/EventList":14,"./common/ToggleButton":43,"react":"react","react-redux":"react-redux"}],14:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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)}function LogIcon(e){var t=e.event,r={web:"html5",debug:"bug"}[t.level]||"info";return _react2.default.createElement("i",{className:"fa fa-fw fa-"+r})}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_shallowequal=require("shallowequal"),_shallowequal2=_interopRequireDefault(_shallowequal),_AutoScroll=require("../helpers/AutoScroll"),_AutoScroll2=_interopRequireDefault(_AutoScroll),_VirtualScroll=require("../helpers/VirtualScroll"),EventLogList=function(e){function t(e){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return r.heights={},r.state={vScroll:(0,_VirtualScroll.calcVScroll)()},r.onViewportUpdate=r.onViewportUpdate.bind(r),r}return _inherits(t,e),_createClass(t,[{key:"componentDidMount",value:function(){window.addEventListener("resize",this.onViewportUpdate),this.onViewportUpdate()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onViewportUpdate)}},{key:"componentDidUpdate",value:function(){this.onViewportUpdate()}},{key:"onViewportUpdate",value:function(){var e=this,t=_reactDom2.default.findDOMNode(this),r=(0,_VirtualScroll.calcVScroll)({itemCount:this.props.events.length,rowHeight:this.props.rowHeight,viewportTop:t.scrollTop,viewportHeight:t.offsetHeight,itemHeights:this.props.events.map(function(t){return e.heights[t.id]})});(0,_shallowequal2.default)(this.state.vScroll,r)||this.setState({vScroll:r})}},{key:"setHeight",value:function(e,t){if(t&&!this.heights[e]){var r=t.offsetHeight;this.heights[e]!==r&&(this.heights[e]=r,this.onViewportUpdate())}}},{key:"render",value:function(){var e=this,t=this.state.vScroll,r=this.props.events;return _react2.default.createElement("pre",{onScroll:this.onViewportUpdate},_react2.default.createElement("div",{style:{height:t.paddingTop}}),r.slice(t.start,t.end).map(function(t){return _react2.default.createElement("div",{key:t.id,ref:function(r){return e.setHeight(t.id,r)}},_react2.default.createElement(LogIcon,{event:t}),t.message)}),_react2.default.createElement("div",{style:{height:t.paddingBottom}}))}}]),t}(_react.Component);EventLogList.propTypes={events:_react.PropTypes.array.isRequired,rowHeight:_react.PropTypes.number},EventLogList.defaultProps={rowHeight:18},exports.default=(0,_AutoScroll2.default)(EventLogList);

},{"../helpers/AutoScroll":45,"../helpers/VirtualScroll":46,"react":"react","react-dom":"react-dom","shallowequal":"shallowequal"}],15:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_shallowequal=require("shallowequal"),_shallowequal2=_interopRequireDefault(_shallowequal),_AutoScroll=require("./helpers/AutoScroll"),_AutoScroll2=_interopRequireDefault(_AutoScroll),_VirtualScroll=require("./helpers/VirtualScroll"),_FlowTableHead=require("./FlowTable/FlowTableHead"),_FlowTableHead2=_interopRequireDefault(_FlowTableHead),_FlowRow=require("./FlowTable/FlowRow"),_FlowRow2=_interopRequireDefault(_FlowRow),_filt=require("../filt/filt"),_filt2=_interopRequireDefault(_filt),FlowTable=function(e){function t(e,o){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,o));return r.state={vScroll:(0,_VirtualScroll.calcVScroll)()},r.onViewportUpdate=r.onViewportUpdate.bind(r),r}return _inherits(t,e),_createClass(t,[{key:"componentWillMount",value:function(){window.addEventListener("resize",this.onViewportUpdate)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onViewportUpdate)}},{key:"componentDidUpdate",value:function(){if(this.onViewportUpdate(),this.shouldScrollIntoView){this.shouldScrollIntoView=!1;var e=this.props,t=e.rowHeight,o=e.flows,r=e.selected,l=_reactDom2.default.findDOMNode(this),a=_reactDom2.default.findDOMNode(this.refs.head),i=a?a.offsetHeight:0,n=o.indexOf(r)*t+i,u=n+t,c=l.scrollTop,s=l.offsetHeight;n-i<c?l.scrollTop=n-i:u>c+s&&(l.scrollTop=u-s)}}},{key:"componentWillReceiveProps",value:function(e){e.selected&&e.selected!==this.props.selected&&(this.shouldScrollIntoView=!0)}},{key:"onViewportUpdate",value:function(){var e=_reactDom2.default.findDOMNode(this),t=e.scrollTop,o=(0,_VirtualScroll.calcVScroll)({viewportTop:t,viewportHeight:e.offsetHeight,itemCount:this.props.flows.length,rowHeight:this.props.rowHeight});this.state.viewportTop===t&&(0,_shallowequal2.default)(this.state.vScroll,o)||this.setState({vScroll:o,viewportTop:t})}},{key:"render",value:function(){var e=this,t=this.state,o=t.vScroll,r=t.viewportTop,l=this.props,a=l.flows,i=l.selected,n=l.highlight,u=n?_filt2.default.parse(n):function(){return!1};return _react2.default.createElement("div",{className:"flow-table",onScroll:this.onViewportUpdate},_react2.default.createElement("table",null,_react2.default.createElement("thead",{ref:"head",style:{transform:"translateY("+r+"px)"}},_react2.default.createElement(_FlowTableHead2.default,null)),_react2.default.createElement("tbody",null,_react2.default.createElement("tr",{style:{height:o.paddingTop}}),a.slice(o.start,o.end).map(function(t){return _react2.default.createElement(_FlowRow2.default,{key:t.id,flow:t,selected:t===i,highlighted:u(t),onSelect:e.props.onSelect})}),_react2.default.createElement("tr",{style:{height:o.paddingBottom}}))))}}]),t}(_react2.default.Component);FlowTable.propTypes={onSelect:_react.PropTypes.func.isRequired,flows:_react.PropTypes.array.isRequired,rowHeight:_react.PropTypes.number,highlight:_react.PropTypes.string,selected:_react.PropTypes.object},FlowTable.defaultProps={rowHeight:32},exports.default=(0,_AutoScroll2.default)(FlowTable);

},{"../filt/filt":56,"./FlowTable/FlowRow":17,"./FlowTable/FlowTableHead":18,"./helpers/AutoScroll":45,"./helpers/VirtualScroll":46,"react":"react","react-dom":"react-dom","shallowequal":"shallowequal"}],16:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function TLSColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:(0,_classnames2.default)("col-tls","https"===t.request.scheme?"col-tls-https":"col-tls-http")})}function IconColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-icon"},_react2.default.createElement("div",{className:(0,_classnames2.default)("resource-icon",IconColumn.getIcon(t))}))}function PathColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-path"},t.request.is_replay&&_react2.default.createElement("i",{className:"fa fa-fw fa-repeat pull-right"}),t.intercepted&&_react2.default.createElement("i",{className:"fa fa-fw fa-pause pull-right"}),_utils.RequestUtils.pretty_url(t.request))}function MethodColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-method"},t.request.method)}function StatusColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-status"},t.response&&t.response.status_code)}function SizeColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-size"},(0,_utils2.formatSize)(SizeColumn.getTotalSize(t)))}function TimeColumn(e){var t=e.flow;return _react2.default.createElement("td",{className:"col-time"},t.response?(0,_utils2.formatTimeDelta)(1e3*(t.response.timestamp_end-t.request.timestamp_start)):"...")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TLSColumn=TLSColumn,exports.IconColumn=IconColumn,exports.PathColumn=PathColumn,exports.MethodColumn=MethodColumn,exports.StatusColumn=StatusColumn,exports.SizeColumn=SizeColumn,exports.TimeColumn=TimeColumn;var _react=require("react"),_react2=_interopRequireDefault(_react),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_utils=require("../../flow/utils.js"),_utils2=require("../../utils.js");TLSColumn.headerClass="col-tls",TLSColumn.headerName="",IconColumn.headerClass="col-icon",IconColumn.headerName="",IconColumn.getIcon=function(e){if(!e.response)return"resource-icon-plain";var t=_utils.ResponseUtils.getContentType(e.response)||"";return 304===e.response.status_code?"resource-icon-not-modified":300<=e.response.status_code&&e.response.status_code<400?"resource-icon-redirect":t.indexOf("image")>=0?"resource-icon-image":t.indexOf("javascript")>=0?"resource-icon-js":t.indexOf("css")>=0?"resource-icon-css":t.indexOf("html")>=0?"resource-icon-document":"resource-icon-plain"},PathColumn.headerClass="col-path",PathColumn.headerName="Path",MethodColumn.headerClass="col-method",MethodColumn.headerName="Method",StatusColumn.headerClass="col-status",StatusColumn.headerName="Status",SizeColumn.getTotalSize=function(e){var t=e.request.contentLength;return e.response&&(t+=e.response.contentLength||0),t},SizeColumn.headerClass="col-size",SizeColumn.headerName="Size",TimeColumn.headerClass="col-time",TimeColumn.headerName="Time",exports.default=[TLSColumn,IconColumn,PathColumn,MethodColumn,StatusColumn,SizeColumn,TimeColumn];

},{"../../flow/utils.js":57,"../../utils.js":59,"classnames":"classnames","react":"react"}],17:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function FlowRow(e){var t=e.flow,r=e.selected,l=e.highlighted,s=e.onSelect,o=(0,_classnames2.default)({selected:r,highlighted:l,intercepted:t.intercepted,"has-request":t.request,"has-response":t.response});return _react2.default.createElement("tr",{className:o,onClick:function(){return s(t.id)}},_FlowColumns2.default.map(function(e){return _react2.default.createElement(e,{key:e.name,flow:t})}))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_FlowColumns=require("./FlowColumns"),_FlowColumns2=_interopRequireDefault(_FlowColumns),_utils=require("../../utils");FlowRow.propTypes={onSelect:_react.PropTypes.func.isRequired,flow:_react.PropTypes.object.isRequired,highlighted:_react.PropTypes.bool,selected:_react.PropTypes.bool},exports.default=(0,_utils.pure)(FlowRow);

},{"../../utils":59,"./FlowColumns":16,"classnames":"classnames","react":"react"}],18:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function FlowTableHead(e){var r=e.sortColumn,t=e.sortDesc,s=e.setSort,o=t?"sort-desc":"sort-asc";return _react2.default.createElement("tr",null,_FlowColumns2.default.map(function(e){return _react2.default.createElement("th",{className:(0,_classnames2.default)(e.headerClass,r===e.name&&o),key:e.name,onClick:function(){return s(e.name,e.name===r&&!t)}},e.headerName)}))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_FlowColumns=require("./FlowColumns"),_FlowColumns2=_interopRequireDefault(_FlowColumns),_flows=require("../../ducks/flows");FlowTableHead.propTypes={setSort:_react.PropTypes.func.isRequired,sortDesc:_react2.default.PropTypes.bool.isRequired,sortColumn:_react2.default.PropTypes.string},exports.default=(0,_reactRedux.connect)(function(e){return{sortDesc:e.flows.sort.desc,sortColumn:e.flows.sort.column}},{setSort:_flows.setSort})(FlowTableHead);

},{"../../ducks/flows":48,"./FlowColumns":16,"classnames":"classnames","react":"react","react-redux":"react-redux"}],19:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),_Nav=require("./FlowView/Nav"),_Nav2=_interopRequireDefault(_Nav),_Messages=require("./FlowView/Messages"),_Details=require("./FlowView/Details"),_Details2=_interopRequireDefault(_Details),_Prompt=require("./Prompt"),_Prompt2=_interopRequireDefault(_Prompt),_flow=require("../ducks/ui/flow"),FlowView=function(e){function t(e,r){_classCallCheck(this,t);var o=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,r));return o.onPromptFinish=o.onPromptFinish.bind(o),o}return _inherits(t,e),_createClass(t,[{key:"onPromptFinish",value:function(e){this.props.setPrompt(!1),e&&this.tabComponent&&this.tabComponent.edit(e)}},{key:"getPromptOptions",value:function(){switch(this.props.tab){case"request":return["method","url",{text:"http version",key:"v"},"header"];case"response":return[{text:"http version",key:"v"},"code","message","header"];case"details":return;default:throw"Unknown tab for edit: "+this.props.tab}}},{key:"render",value:function(){var e=this,r=this.props,o=r.flow,n=r.tab,a=r.updateFlow,s=["request","response","error"].filter(function(e){return o[e]}).concat(["details"]);s.indexOf(n)<0&&(n="response"===n&&o.error?"error":"error"===n&&o.response?"response":s[0]);var i=t.allTabs[_lodash2.default.capitalize(n)];return _react2.default.createElement("div",{className:"flow-detail"},_react2.default.createElement(_Nav2.default,{flow:o,tabs:s,active:n,onSelectTab:this.props.selectTab}),_react2.default.createElement(i,{ref:function(t){return e.tabComponent=t},flow:o,updateFlow:a}),this.props.promptOpen&&_react2.default.createElement(_Prompt2.default,{options:this.getPromptOptions(),done:this.onPromptFinish}))}}]),t}(_react.Component);FlowView.allTabs={Request:_Messages.Request,Response:_Messages.Response,Error:_Messages.ErrorView,Details:_Details2.default},exports.default=FlowView,exports.default=(0,_reactRedux.connect)(function(e){return{promptOpen:e.ui.promptOpen,tab:e.ui.flow.tab}},{selectTab:_flow.selectTab})(FlowView);

},{"../ducks/ui/flow":51,"./FlowView/Details":20,"./FlowView/Messages":22,"./FlowView/Nav":23,"./Prompt":35,"lodash":"lodash","react":"react","react-redux":"react-redux"}],20:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function TimeStamp(e){var t=e.t,a=e.deltaTo,r=e.title;return t?_react2.default.createElement("tr",null,_react2.default.createElement("td",null,r,":"),_react2.default.createElement("td",null,(0,_utils.formatTimeStamp)(t),a&&_react2.default.createElement("span",{className:"text-muted"},"(",(0,_utils.formatTimeDelta)(1e3*(t-a)),")"))):_react2.default.createElement("tr",null)}function ConnectionInfo(e){var t=e.conn;return _react2.default.createElement("table",{className:"connection-table"},_react2.default.createElement("tbody",null,_react2.default.createElement("tr",{key:"address"},_react2.default.createElement("td",null,"Address:"),_react2.default.createElement("td",null,t.address.address.join(":"))),t.sni&&_react2.default.createElement("tr",{key:"sni"},_react2.default.createElement("td",null,_react2.default.createElement("abbr",{title:"TLS Server Name Indication"},"TLS SNI:")),_react2.default.createElement("td",null,t.sni))))}function CertificateInfo(e){var t=e.flow;return _react2.default.createElement("div",null,t.client_conn.cert&&[_react2.default.createElement("h4",{key:"name"},"Client Certificate"),_react2.default.createElement("pre",{key:"value",style:{maxHeight:100}},t.client_conn.cert)],t.server_conn.cert&&[_react2.default.createElement("h4",{key:"name"},"Server Certificate"),_react2.default.createElement("pre",{key:"value",style:{maxHeight:100}},t.server_conn.cert)])}function Timing(e){var t=e.flow,a=t.server_conn,r=t.client_conn,n=t.request,l=t.response,c=[{title:"Server conn. initiated",t:a.timestamp_start,deltaTo:n.timestamp_start},{title:"Server conn. TCP handshake",t:a.timestamp_tcp_setup,deltaTo:n.timestamp_start},{title:"Server conn. SSL handshake",t:a.timestamp_ssl_setup,deltaTo:n.timestamp_start},{title:"Client conn. established",t:r.timestamp_start,deltaTo:n.timestamp_start},{title:"Client conn. SSL handshake",t:r.timestamp_ssl_setup,deltaTo:n.timestamp_start},{title:"First request byte",t:n.timestamp_start},{title:"Request complete",t:n.timestamp_end,deltaTo:n.timestamp_start},l&&{title:"First response byte",t:l.timestamp_start,deltaTo:n.timestamp_start},l&&{title:"Response complete",t:l.timestamp_end,deltaTo:n.timestamp_start}];return _react2.default.createElement("div",null,_react2.default.createElement("h4",null,"Timing"),_react2.default.createElement("table",{className:"timing-table"},_react2.default.createElement("tbody",null,c.filter(function(e){return e}).sort(function(e,t){return e.t-t.t}).map(function(e){return _react2.default.createElement(TimeStamp,_extends({key:e.title},e))}))))}function Details(e){var t=e.flow;return _react2.default.createElement("section",{className:"detail"},_react2.default.createElement("h4",null,"Client Connection"),_react2.default.createElement(ConnectionInfo,{conn:t.client_conn}),_react2.default.createElement("h4",null,"Server Connection"),_react2.default.createElement(ConnectionInfo,{conn:t.server_conn}),_react2.default.createElement(CertificateInfo,{flow:t}),_react2.default.createElement(Timing,{flow:t}))}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e};exports.TimeStamp=TimeStamp,exports.ConnectionInfo=ConnectionInfo,exports.CertificateInfo=CertificateInfo,exports.Timing=Timing,exports.default=Details;var _react=require("react"),_react2=_interopRequireDefault(_react),_lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),_utils=require("../../utils.js");

},{"../../utils.js":59,"lodash":"lodash","react":"react"}],21:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _objectWithoutProperties(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_ValueEditor=require("../ValueEditor/ValueEditor"),_ValueEditor2=_interopRequireDefault(_ValueEditor),_utils=require("../../utils"),HeaderEditor=function(e){function t(e){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return r.onKeyDown=r.onKeyDown.bind(r),r}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.props,t=(e.onTab,_objectWithoutProperties(e,["onTab"]));return _react2.default.createElement(_ValueEditor2.default,_extends({},t,{onKeyDown:this.onKeyDown}))}},{key:"focus",value:function(){_reactDom2.default.findDOMNode(this).focus()}},{key:"onKeyDown",value:function(e){switch(e.keyCode){case _utils.Key.BACKSPACE:var t=window.getSelection().getRangeAt(0);0===t.startOffset&&0===t.endOffset&&this.props.onRemove(e);break;case _utils.Key.ENTER:case _utils.Key.TAB:e.shiftKey||this.props.onTab(e)}}}]),t}(_react.Component),Headers=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"onChange",value:function(e,t,r){var n=_.cloneDeep(this.props.message.headers);n[e][t]=r,n[e][0]||n[e][1]||(1===n.length?(n[0][0]="Name",n[0][1]="Value"):(n.splice(e,1),e===n.length&&(this._nextSel=e-1+"-value"))),this.props.onChange(n)}},{key:"edit",value:function(){this.refs["0-key"].focus()}},{key:"onTab",value:function(e,t,r){var n=this.props.message.headers;if(0===t)return void(this._nextSel=e+"-value");if(e!==n.length-1)return void(this._nextSel=e+1+"-key");r.preventDefault();var o=_.cloneDeep(this.props.message.headers);o.push(["Name","Value"]),this.props.onChange(o),this._nextSel=e+1+"-key"}},{key:"componentDidUpdate",value:function(){this._nextSel&&this.refs[this._nextSel]&&(this.refs[this._nextSel].focus(),this._nextSel=void 0)}},{key:"onRemove",value:function(e,t,r){1===t?(r.preventDefault(),this.refs[e+"-key"].focus()):e>0&&(r.preventDefault(),this.refs[e-1+"-value"].focus())}},{key:"render",value:function(){var e=this,t=this.props,r=t.message,n=t.readonly;return _react2.default.createElement("table",{className:"header-table"},_react2.default.createElement("tbody",null,r.headers.map(function(t,r){return _react2.default.createElement("tr",{key:r},_react2.default.createElement("td",{className:"header-name"},_react2.default.createElement(HeaderEditor,{ref:r+"-key",content:t[0],readonly:n,onDone:function(t){return e.onChange(r,0,t)},onRemove:function(t){return e.onRemove(r,0,t)},onTab:function(t){return e.onTab(r,0,t)}}),_react2.default.createElement("span",{className:"header-colon"},":")),_react2.default.createElement("td",{className:"header-value"},_react2.default.createElement(HeaderEditor,{ref:r+"-value",content:t[1],readonly:n,onDone:function(t){return e.onChange(r,1,t)},onRemove:function(t){return e.onRemove(r,1,t)},onTab:function(t){return e.onTab(r,1,t)}})))})))}}]),t}(_react.Component);Headers.propTypes={onChange:_react.PropTypes.func.isRequired,message:_react.PropTypes.object.isRequired},exports.default=Headers;

},{"../../utils":59,"../ValueEditor/ValueEditor":38,"react":"react","react-dom":"react-dom"}],22:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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)}function RequestLine(e){var t=e.flow,r=e.readonly,n=e.updateFlow;return _react2.default.createElement("div",{className:"first-line request-line"},_react2.default.createElement("div",null,_react2.default.createElement(_ValueEditor2.default,{content:t.request.method,readonly:r,onDone:function(e){return n({request:{method:e}})}})," ",_react2.default.createElement(_ValidateEditor2.default,{content:_utils.RequestUtils.pretty_url(t.request),readonly:r,onDone:function(e){return n({request:_extends({path:""},(0,_utils.parseUrl)(e))})},isValid:function(e){return!!(0,_utils.parseUrl)(e).host}})," ",_react2.default.createElement(_ValidateEditor2.default,{content:t.request.http_version,readonly:r,onDone:function(e){return n({request:{http_version:e}})},isValid:_utils.isValidHttpVersion})))}function ResponseLine(e){var t=e.flow,r=e.readonly,n=e.updateFlow;return _react2.default.createElement("div",{className:"first-line response-line"},_react2.default.createElement(_ValidateEditor2.default,{content:t.response.http_version,readonly:r,onDone:function(e){return n({response:{http_version:e}})},isValid:_utils.isValidHttpVersion})," ",_react2.default.createElement(_ValidateEditor2.default,{content:t.response.status_code+"",readonly:r,onDone:function(e){return n({response:{code:parseInt(e)}})},isValid:function(e){return/^\d+$/.test(e)}})," ",_react2.default.createElement(_ValueEditor2.default,{content:t.response.reason,readonly:r,onDone:function(e){return n({response:{msg:e}})}}))}function ErrorView(e){var t=e.flow;return _react2.default.createElement("section",{className:"error"},_react2.default.createElement("div",{className:"alert alert-warning"},t.error.msg,_react2.default.createElement("div",null,_react2.default.createElement("small",null,(0,_utils2.formatTimeStamp)(t.error.timestamp)))))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Response=exports.Request=void 0;var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};exports.ErrorView=ErrorView;var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_utils=require("../../flow/utils.js"),_utils2=require("../../utils.js"),_ContentView=require("../ContentView"),_ContentView2=_interopRequireDefault(_ContentView),_ContentViewOptions=require("../ContentView/ContentViewOptions"),_ContentViewOptions2=_interopRequireDefault(_ContentViewOptions),_ValidateEditor=require("../ValueEditor/ValidateEditor"),_ValidateEditor2=_interopRequireDefault(_ValidateEditor),_ValueEditor=require("../ValueEditor/ValueEditor"),_ValueEditor2=_interopRequireDefault(_ValueEditor),_Headers=require("./Headers"),_Headers2=_interopRequireDefault(_Headers),_flow=require("../../ducks/ui/flow"),_flows=require("../../ducks/flows"),FlowActions=_interopRequireWildcard(_flows),_ToggleEdit=require("./ToggleEdit"),_ToggleEdit2=_interopRequireDefault(_ToggleEdit),Message=(0,_reactRedux.connect)(function(e){return{flow:e.ui.flow.modifiedFlow||e.flows.byId[e.flows.selected[0]],isEdit:!!e.ui.flow.modifiedFlow}},{updateFlow:_flow.updateEdit,uploadContent:FlowActions.uploadContent}),Request=exports.Request=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.props,t=e.flow,r=e.isEdit,n=e.updateFlow,o=e.uploadContent,a=!r&&(0==t.request.contentLength||null==t.request.contentLength);return _react2.default.createElement("section",{className:"request"},_react2.default.createElement("article",null,_react2.default.createElement(_ToggleEdit2.default,null),_react2.default.createElement(RequestLine,{flow:t,readonly:!r,updateFlow:n}),_react2.default.createElement(_Headers2.default,{message:t.request,readonly:!r,onChange:function(e){return n({request:{headers:e}})}}),_react2.default.createElement("hr",null),_react2.default.createElement(_ContentView2.default,{readonly:!r,flow:t,onContentChange:function(e){return n({request:{content:e}})},message:t.request})),!a&&_react2.default.createElement("footer",null,_react2.default.createElement(_ContentViewOptions2.default,{flow:t,readonly:!r,message:t.request,uploadContent:function(e){return o(t,e,"request")}})))}},{key:"edit",value:function(e){throw"unimplemented"}}]),t}(_react.Component);exports.Request=Request=Message(Request);var Response=exports.Response=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this.props,t=e.flow,r=e.isEdit,n=e.updateFlow,o=e.uploadContent,a=!r&&(0==t.response.contentLength||null==t.response.contentLength);return _react2.default.createElement("section",{className:"response"},_react2.default.createElement("article",null,_react2.default.createElement(_ToggleEdit2.default,null),_react2.default.createElement(ResponseLine,{flow:t,readonly:!r,updateFlow:n}),_react2.default.createElement(_Headers2.default,{message:t.response,readonly:!r,onChange:function(e){return n({response:{headers:e}})}}),_react2.default.createElement("hr",null),_react2.default.createElement(_ContentView2.default,{readonly:!r,flow:t,onContentChange:function(e){return n({response:{content:e}})},message:t.response})),!a&&_react2.default.createElement("footer",null,_react2.default.createElement(_ContentViewOptions2.default,{flow:t,message:t.response,uploadContent:function(e){return o(t,e,"response")},readonly:!r})))}},{key:"edit",value:function(e){throw"unimplemented"}}]),t}(_react.Component);exports.Response=Response=Message(Response),ErrorView.propTypes={flow:_react.PropTypes.object.isRequired};

},{"../../ducks/flows":48,"../../ducks/ui/flow":51,"../../flow/utils.js":57,"../../utils.js":59,"../ContentView":3,"../ContentView/ContentViewOptions":6,"../ValueEditor/ValidateEditor":37,"../ValueEditor/ValueEditor":38,"./Headers":21,"./ToggleEdit":24,"react":"react","react-redux":"react-redux"}],23:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function NavAction(e){var a=e.icon,t=e.title,r=e.onClick;return _react2.default.createElement("a",{title:t,href:"#",className:"nav-action",onClick:function(e){e.preventDefault(),r(e)}},_react2.default.createElement("i",{className:"fa fa-fw "+a}))}function Nav(e){var a=e.active,t=e.tabs,r=e.onSelectTab;return _react2.default.createElement("nav",{className:"nav-tabs nav-tabs-sm"},t.map(function(e){return _react2.default.createElement("a",{key:e,href:"#",className:(0,_classnames2.default)({active:a===e}),onClick:function(a){a.preventDefault(),r(e)}},_.capitalize(e))}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Nav;var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames);NavAction.propTypes={icon:_react.PropTypes.string.isRequired,title:_react.PropTypes.string.isRequired,onClick:_react.PropTypes.func.isRequired},Nav.propTypes={active:_react.PropTypes.string.isRequired,tabs:_react.PropTypes.array.isRequired,onSelectTab:_react.PropTypes.func.isRequired};

},{"classnames":"classnames","react":"react","react-redux":"react-redux"}],24:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ToggleEdit(e){var t=e.isEdit,r=e.startEdit,i=e.stopEdit,o=e.flow,a=e.modifiedFlow;return _react2.default.createElement("div",{className:"edit-flow-container"},t?_react2.default.createElement("a",{className:"edit-flow",onClick:function(){return i(o,a)}},_react2.default.createElement("i",{className:"fa fa-check"})):_react2.default.createElement("a",{className:"edit-flow",onClick:function(){return r(o)}},_react2.default.createElement("i",{className:"fa fa-pencil"})))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_flow=require("../../ducks/ui/flow");ToggleEdit.propTypes={isEdit:_react.PropTypes.bool.isRequired,flow:_react.PropTypes.object.isRequired,startEdit:_react.PropTypes.func.isRequired,stopEdit:_react.PropTypes.func.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{isEdit:!!e.ui.flow.modifiedFlow,modifiedFlow:e.ui.flow.modifiedFlow||e.flows.byId[e.flows.selected[0]],flow:e.flows.byId[e.flows.selected[0]]}},{startEdit:_flow.startEdit,stopEdit:_flow.stopEdit})(ToggleEdit);

},{"../../ducks/ui/flow":51,"react":"react","react-redux":"react-redux"}],25:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Footer(e){var a=e.settings,t=a.mode,s=a.intercept,l=a.showhost,c=a.no_upstream_cert,r=a.rawtcp,u=a.http2,n=a.anticache,o=a.anticomp,i=a.stickyauth,m=a.stickycookie,p=a.stream;return _react2.default.createElement("footer",null,t&&"regular"!=t&&_react2.default.createElement("span",{className:"label label-success"},t," mode"),s&&_react2.default.createElement("span",{className:"label label-success"},"Intercept: ",s),l&&_react2.default.createElement("span",{className:"label label-success"},"showhost"),c&&_react2.default.createElement("span",{className:"label label-success"},"no-upstream-cert"),r&&_react2.default.createElement("span",{className:"label label-success"},"raw-tcp"),!u&&_react2.default.createElement("span",{className:"label label-success"},"no-http2"),n&&_react2.default.createElement("span",{className:"label label-success"},"anticache"),o&&_react2.default.createElement("span",{className:"label label-success"},"anticomp"),i&&_react2.default.createElement("span",{className:"label label-success"},"stickyauth: ",i),m&&_react2.default.createElement("span",{className:"label label-success"},"stickycookie: ",m),p&&_react2.default.createElement("span",{className:"label label-success"},"stream: ",(0,_utils.formatSize)(p)))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_utils=require("../utils.js");Footer.propTypes={settings:_react2.default.PropTypes.object.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{settings:e.settings}})(Footer);

},{"../utils.js":59,"react":"react","react-redux":"react-redux"}],26:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_MainMenu=require("./Header/MainMenu"),_MainMenu2=_interopRequireDefault(_MainMenu),_ViewMenu=require("./Header/ViewMenu"),_ViewMenu2=_interopRequireDefault(_ViewMenu),_OptionMenu=require("./Header/OptionMenu"),_OptionMenu2=_interopRequireDefault(_OptionMenu),_FileMenu=require("./Header/FileMenu"),_FileMenu2=_interopRequireDefault(_FileMenu),_FlowMenu=require("./Header/FlowMenu"),_FlowMenu2=_interopRequireDefault(_FlowMenu),_header=require("../ducks/ui/header"),Header=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"handleClick",value:function(e,t){t.preventDefault(),this.props.setActiveMenu(e.title)}},{key:"render",value:function(){var e=this,r=this.props,n=r.selectedFlowId,u=r.activeMenu,a=[].concat(_toConsumableArray(t.entries));n&&a.push(_FlowMenu2.default);var i=_.find(a,function(e){return e.title==u});return _react2.default.createElement("header",null,_react2.default.createElement("nav",{className:"nav-tabs nav-tabs-lg"},_react2.default.createElement(_FileMenu2.default,null),a.map(function(t){return _react2.default.createElement("a",{key:t.title,href:"#",className:(0,_classnames2.default)({active:t===i}),onClick:function(r){return e.handleClick(t,r)}},t.title)})),_react2.default.createElement("div",{className:"menu"},_react2.default.createElement(i,null)))}}]),t}(_react.Component);Header.entries=[_MainMenu2.default,_ViewMenu2.default,_OptionMenu2.default],exports.default=(0,_reactRedux.connect)(function(e){return{selectedFlowId:e.flows.selected[0],activeMenu:e.ui.header.activeMenu}},{setActiveMenu:_header.setActiveMenu})(Header);

},{"../ducks/ui/header":52,"./Header/FileMenu":27,"./Header/FlowMenu":30,"./Header/MainMenu":31,"./Header/OptionMenu":32,"./Header/ViewMenu":33,"classnames":"classnames","react":"react","react-redux":"react-redux"}],27:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function FileMenu(e){var r=e.clearFlows,t=e.loadFlows,l=e.saveFlows;return _react2.default.createElement(_Dropdown2.default,{className:"pull-left",btnClass:"special",text:"mitmproxy"},_react2.default.createElement("a",{href:"#",onClick:function(e){return FileMenu.onNewClick(e,r)}},_react2.default.createElement("i",{className:"fa fa-fw fa-file"}),"New"),_react2.default.createElement(_FileChooser2.default,{icon:"fa-folder-open",text:"Open...",onOpenFile:function(e){return t(e)}}),_react2.default.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),l()}},_react2.default.createElement("i",{className:"fa fa-fw fa-floppy-o"}),"Save..."),_react2.default.createElement(_Dropdown.Divider,null),_react2.default.createElement("a",{href:"http://mitm.it/",target:"_blank"},_react2.default.createElement("i",{className:"fa fa-fw fa-external-link"}),"Install Certificates..."))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_FileChooser=require("../common/FileChooser"),_FileChooser2=_interopRequireDefault(_FileChooser),_Dropdown=require("../common/Dropdown"),_Dropdown2=_interopRequireDefault(_Dropdown),_flows=require("../../ducks/flows"),flowsActions=_interopRequireWildcard(_flows);FileMenu.propTypes={clearFlows:_react.PropTypes.func.isRequired,loadFlows:_react.PropTypes.func.isRequired,saveFlows:_react.PropTypes.func.isRequired},FileMenu.onNewClick=function(e,r){e.preventDefault(),confirm("Delete all flows?")&&r()},exports.default=(0,_reactRedux.connect)(null,{clearFlows:flowsActions.clear,loadFlows:flowsActions.upload,saveFlows:flowsActions.download})(FileMenu);

},{"../../ducks/flows":48,"../common/Dropdown":40,"../common/FileChooser":41,"react":"react","react-redux":"react-redux"}],28:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_utils=require("../../utils"),FilterDocs=function(e){function t(e,r){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,r));return n.state={doc:t.doc},n}return _inherits(t,e),_createClass(t,[{key:"componentWillMount",value:function(){var e=this;t.xhr||(t.xhr=(0,_utils.fetchApi)("/filter-help").then(function(e){return e.json()}),t.xhr.catch(function(){t.xhr=null})),this.state.doc||t.xhr.then(function(r){t.doc=r,e.setState({doc:r})})}},{key:"render",value:function(){var e=this.state.doc;return e?_react2.default.createElement("table",{className:"table table-condensed"},_react2.default.createElement("tbody",null,e.commands.map(function(e){return _react2.default.createElement("tr",{key:e[1]},_react2.default.createElement("td",null,e[0].replace(" "," ")),_react2.default.createElement("td",null,e[1]))}),_react2.default.createElement("tr",{key:"docs-link"},_react2.default.createElement("td",{colSpan:"2"},_react2.default.createElement("a",{href:"http://docs.mitmproxy.org/en/stable/features/filters.html",target:"_blank"},_react2.default.createElement("i",{className:"fa fa-external-link"}),"&nbsp mitmproxy docs"))))):_react2.default.createElement("i",{className:"fa fa-spinner fa-spin"})}}]),t}(_react.Component);FilterDocs.xhr=null,FilterDocs.doc=null,exports.default=FilterDocs;

},{"../../utils":59,"react":"react"}],29:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_utils=require("../../utils.js"),_filt=require("../../filt/filt"),_filt2=_interopRequireDefault(_filt),_FilterDocs=require("./FilterDocs"),_FilterDocs2=_interopRequireDefault(_FilterDocs),FilterInput=function(e){function t(e,n){_classCallCheck(this,t);var o=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,n));return o.state={value:o.props.value,focus:!1,mousefocus:!1},o.onChange=o.onChange.bind(o),o.onFocus=o.onFocus.bind(o),o.onBlur=o.onBlur.bind(o),o.onKeyDown=o.onKeyDown.bind(o),o.onMouseEnter=o.onMouseEnter.bind(o),o.onMouseLeave=o.onMouseLeave.bind(o),o}return _inherits(t,e),_createClass(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({value:e.value})}},{key:"isValid",value:function(e){try{var t=null==e?this.state.value:e;return t&&_filt2.default.parse(t),!0}catch(e){return!1}}},{key:"getDesc",value:function(){if(!this.state.value)return _react2.default.createElement(_FilterDocs2.default,null);try{return _filt2.default.parse(this.state.value).desc}catch(e){return""+e}}},{key:"onChange",value:function(e){var t=e.target.value;this.setState({value:t}),this.isValid(t)&&this.props.onChange(t)}},{key:"onFocus",value:function(){this.setState({focus:!0})}},{key:"onBlur",value:function(){this.setState({focus:!1})}},{key:"onMouseEnter",value:function(){this.setState({mousefocus:!0})}},{key:"onMouseLeave",value:function(){this.setState({mousefocus:!1})}},{key:"onKeyDown",value:function(e){e.keyCode!==_utils.Key.ESC&&e.keyCode!==_utils.Key.ENTER||(this.blur(),this.setState({mousefocus:!1})),e.stopPropagation()}},{key:"blur",value:function(){_reactDom2.default.findDOMNode(this.refs.input).blur()}},{key:"select",value:function(){_reactDom2.default.findDOMNode(this.refs.input).select()}},{key:"render",value:function(){var e=this.props,t=e.type,n=e.color,o=e.placeholder,r=this.state,a=r.value,u=r.focus,s=r.mousefocus;return _react2.default.createElement("div",{className:(0,_classnames2.default)("filter-input input-group",{"has-error":!this.isValid()})},_react2.default.createElement("span",{className:"input-group-addon"},_react2.default.createElement("i",{className:"fa fa-fw fa-"+t,style:{color:n}})),_react2.default.createElement("input",{type:"text",ref:"input",placeholder:o,className:"form-control",value:a,onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown}),(u||s)&&_react2.default.createElement("div",{className:"popover bottom",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},_react2.default.createElement("div",{className:"arrow"}),_react2.default.createElement("div",{className:"popover-content"},this.getDesc())))}}]),t}(_react.Component);exports.default=FilterInput;

},{"../../filt/filt":56,"../../utils.js":59,"./FilterDocs":28,"classnames":"classnames","react":"react","react-dom":"react-dom"}],30:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function FlowMenu(e){var t=e.flow,r=e.acceptFlow,l=e.replayFlow,o=e.duplicateFlow,c=e.removeFlow,n=e.revertFlow;return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"menu-row"},_react2.default.createElement(_Button2.default,{disabled:!t||!t.intercepted,title:"[a]ccept intercepted flow",text:"Accept",icon:"fa-play",onClick:function(){return r(t)}}),_react2.default.createElement(_Button2.default,{title:"[r]eplay flow",text:"Replay",icon:"fa-repeat",onClick:function(){return l(t)}}),_react2.default.createElement(_Button2.default,{title:"[D]uplicate flow",text:"Duplicate",icon:"fa-copy",onClick:function(){return o(t)}}),_react2.default.createElement(_Button2.default,{title:"[d]elete flow",text:"Delete",icon:"fa-trash",onClick:function(){return c(t)}}),_react2.default.createElement(_Button2.default,{disabled:!t||!t.modified,title:"revert changes to flow [V]",text:"Revert",icon:"fa-history",onClick:function(){return n(t)}}),_react2.default.createElement(_Button2.default,{title:"download",text:"Download",icon:"fa-download",onClick:function(){return window.location=_utils.MessageUtils.getContentURL(t,t.response)}})),_react2.default.createElement("div",{className:"clearfix"}))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_Button=require("../common/Button"),_Button2=_interopRequireDefault(_Button),_utils=require("../../flow/utils.js"),_flows=require("../../ducks/flows"),flowsActions=_interopRequireWildcard(_flows);FlowMenu.title="Flow",FlowMenu.propTypes={flow:_react.PropTypes.object.isRequired,acceptFlow:_react.PropTypes.func.isRequired,replayFlow:_react.PropTypes.func.isRequired,duplicateFlow:_react.PropTypes.func.isRequired,removeFlow:_react.PropTypes.func.isRequired,revertFlow:_react.PropTypes.func.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{flow:e.flows.byId[e.flows.selected[0]]}},{acceptFlow:flowsActions.accept,replayFlow:flowsActions.replay,duplicateFlow:flowsActions.duplicate,removeFlow:flowsActions.remove,revertFlow:flowsActions.revert})(FlowMenu);

},{"../../ducks/flows":48,"../../flow/utils.js":57,"../common/Button":39,"react":"react","react-redux":"react-redux"}],31:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function MainMenu(){return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"menu-row"},_react2.default.createElement(FlowFilterInput,null),_react2.default.createElement(HighlightInput,null),_react2.default.createElement(InterceptInput,null)),_react2.default.createElement("div",{className:"clearfix"}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=MainMenu;var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_FilterInput=require("./FilterInput"),_FilterInput2=_interopRequireDefault(_FilterInput),_settings=require("../../ducks/settings"),_flows=require("../../ducks/flows");MainMenu.title="Start";var InterceptInput=(0,_reactRedux.connect)(function(e){return{value:e.settings.intercept||"",placeholder:"Intercept",type:"pause",color:"hsl(208, 56%, 53%)"}},{onChange:function(e){return(0,_settings.update)({intercept:e})}})(_FilterInput2.default),FlowFilterInput=(0,_reactRedux.connect)(function(e){return{value:e.flows.filter||"",placeholder:"Search",type:"search",color:"black"}},{onChange:_flows.setFilter})(_FilterInput2.default),HighlightInput=(0,_reactRedux.connect)(function(e){return{value:e.flows.highlight||"",placeholder:"Highlight",type:"tag",color:"hsl(48, 100%, 50%)"}},{onChange:_flows.setHighlight})(_FilterInput2.default);

},{"../../ducks/flows":48,"../../ducks/settings":50,"./FilterInput":29,"react":"react","react-redux":"react-redux"}],32:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function OptionMenu(e){var t=e.settings,n=e.updateSettings;return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"menu-row"},_react2.default.createElement(_ToggleButton2.default,{text:"showhost",checked:t.showhost,onToggle:function(){return n({showhost:!t.showhost})}}),_react2.default.createElement(_ToggleButton2.default,{text:"no_upstream_cert",checked:t.no_upstream_cert,onToggle:function(){return n({no_upstream_cert:!t.no_upstream_cert})}}),_react2.default.createElement(_ToggleButton2.default,{text:"rawtcp",checked:t.rawtcp,onToggle:function(){return n({rawtcp:!t.rawtcp})}}),_react2.default.createElement(_ToggleButton2.default,{text:"http2",checked:t.http2,onToggle:function(){return n({http2:!t.http2})}}),_react2.default.createElement(_ToggleButton2.default,{text:"anticache",checked:t.anticache,onToggle:function(){return n({anticache:!t.anticache})}}),_react2.default.createElement(_ToggleButton2.default,{text:"anticomp",checked:t.anticomp,onToggle:function(){return n({anticomp:!t.anticomp})}}),_react2.default.createElement(_ToggleInputButton2.default,{name:"stickyauth",placeholder:"Sticky auth filter",checked:!!t.stickyauth,txt:t.stickyauth,onToggleChanged:function(e){return n({stickyauth:t.stickyauth?null:e})}}),_react2.default.createElement(_ToggleInputButton2.default,{name:"stickycookie",placeholder:"Sticky cookie filter",checked:!!t.stickycookie,txt:t.stickycookie,onToggleChanged:function(e){return n({stickycookie:t.stickycookie?null:e})}}),_react2.default.createElement(_ToggleInputButton2.default,{name:"stream",placeholder:"stream...",checked:!!t.stream,txt:t.stream,inputType:"number",onToggleChanged:function(e){return n({stream:t.stream?null:e})}})),_react2.default.createElement("div",{className:"clearfix"}))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_ToggleButton=require("../common/ToggleButton"),_ToggleButton2=_interopRequireDefault(_ToggleButton),_ToggleInputButton=require("../common/ToggleInputButton"),_ToggleInputButton2=_interopRequireDefault(_ToggleInputButton),_settings=require("../../ducks/settings");OptionMenu.title="Options",OptionMenu.propTypes={settings:_react.PropTypes.object.isRequired,updateSettings:_react.PropTypes.func.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{settings:e.settings}},{updateSettings:_settings.update})(OptionMenu);

},{"../../ducks/settings":50,"../common/ToggleButton":43,"../common/ToggleInputButton":44,"react":"react","react-redux":"react-redux"}],33:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ViewMenu(e){var t=e.eventLogVisible,r=e.toggleEventLog;return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"menu-row"},_react2.default.createElement(_ToggleButton2.default,{text:"Show Event Log",checked:t,onToggle:r})),_react2.default.createElement("div",{className:"clearfix"}))}Object.defineProperty(exports,"__esModule",{value:!0});var _react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_ToggleButton=require("../common/ToggleButton"),_ToggleButton2=_interopRequireDefault(_ToggleButton),_eventLog=require("../../ducks/eventLog");ViewMenu.title="View",ViewMenu.route="flows",ViewMenu.propTypes={eventLogVisible:_react.PropTypes.bool.isRequired,toggleEventLog:_react.PropTypes.func.isRequired},exports.default=(0,_reactRedux.connect)(function(e){return{eventLogVisible:e.eventLog.visible}},{toggleEventLog:_eventLog.toggleVisibility})(ViewMenu);

},{"../../ducks/eventLog":47,"../common/ToggleButton":43,"react":"react","react-redux":"react-redux"}],34:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_Splitter=require("./common/Splitter"),_Splitter2=_interopRequireDefault(_Splitter),_FlowTable=require("./FlowTable"),_FlowTable2=_interopRequireDefault(_FlowTable),_FlowView=require("./FlowView"),_FlowView2=_interopRequireDefault(_FlowView),_flows=require("../ducks/flows"),flowsActions=_interopRequireWildcard(_flows),MainView=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"render",value:function(){var e=this,t=this.props,r=t.flows,o=t.selectedFlow,l=t.highlight;return _react2.default.createElement("div",{className:"main-view"},_react2.default.createElement(_FlowTable2.default,{ref:"flowTable",flows:r,selected:o,highlight:l,onSelect:this.props.selectFlow}),o&&[_react2.default.createElement(_Splitter2.default,{key:"splitter"}),_react2.default.createElement(_FlowView2.default,{key:"flowDetails",ref:"flowDetails",tab:this.props.tab,updateFlow:function(t){return e.props.updateFlow(o,t)},flow:o})])}}]),t}(_react.Component);MainView.propTypes={highlight:_react.PropTypes.string,sort:_react.PropTypes.object},exports.default=(0,_reactRedux.connect)(function(e){return{flows:e.flows.view,filter:e.flows.filter,highlight:e.flows.highlight,selectedFlow:e.flows.byId[e.flows.selected[0]],tab:e.ui.flow.tab}},{selectFlow:flowsActions.select,updateFlow:flowsActions.update})(MainView);

},{"../ducks/flows":48,"./FlowTable":15,"./FlowView":19,"./common/Splitter":42,"react":"react","react-redux":"react-redux"}],35:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Prompt(e){function t(e){return _lodash2.default.map(i,"key").includes(e)}function r(e){e.stopPropagation(),e.preventDefault();var t=i.find(function(t){return _utils.Key[t.key.toUpperCase()]===e.keyCode});(t||e.keyCode===_utils.Key.ESC||e.keyCode===_utils.Key.ENTER)&&o(t.key||!1)}for(var a=e.prompt,o=e.done,n=e.options,i=[],u=0;u<n.length;u++){var s=n[u];if(_lodash2.default.isString(s)){for(var l=s;l.length>0&&t(l[0]);)l=l.substr(1);s={text:s,key:l[0]}}if(!s.text||!s.key||t(s.key))throw"invalid options";i.push(s)}return _react2.default.createElement("div",{tabIndex:"0",onKeyDown:r,className:"prompt-dialog"},_react2.default.createElement("div",{className:"prompt-content"},a||_react2.default.createElement("strong",null,"Select: "),i.map(function(e){function t(t){o(e.key),t.stopPropagation()}var r=e.text.indexOf(e.key);return _react2.default.createElement("span",{key:e.key,className:"option",onClick:t},r!==-1?e.text.substring(0,r):e.text+"(",_react2.default.createElement("strong",{className:"text-primary"},e.key),r!==-1?e.text.substring(r+1):")")})))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Prompt;var _react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),_utils=require("../utils.js");Prompt.propTypes={options:_react.PropTypes.array.isRequired,done:_react.PropTypes.func.isRequired,prompt:_react.PropTypes.string};

},{"../utils.js":59,"lodash":"lodash","react":"react","react-dom":"react-dom"}],36:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactRedux=require("react-redux"),_keyboard=require("../ducks/ui/keyboard"),_MainView=require("./MainView"),_MainView2=_interopRequireDefault(_MainView),_Header=require("./Header"),_Header2=_interopRequireDefault(_Header),_EventLog=require("./EventLog"),_EventLog2=_interopRequireDefault(_EventLog),_Footer=require("./Footer"),_Footer2=_interopRequireDefault(_Footer),ProxyAppMain=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"componentWillMount",value:function(){window.addEventListener("keydown",this.props.onKeyDown)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.props.onKeyDown)}},{key:"render",value:function(){var e=this.props,t=e.showEventLog;e.location,e.filter,e.highlight;return _react2.default.createElement("div",{id:"container",tabIndex:"0"},_react2.default.createElement(_Header2.default,null),_react2.default.createElement(_MainView2.default,null),t&&_react2.default.createElement(_EventLog2.default,{key:"eventlog"}),_react2.default.createElement(_Footer2.default,null))}}]),t}(_react.Component);exports.default=(0,_reactRedux.connect)(function(e){return{showEventLog:e.eventLog.visible}},{onKeyDown:_keyboard.onKeyDown})(ProxyAppMain);

},{"../ducks/ui/keyboard":54,"./EventLog":13,"./Footer":25,"./Header":26,"./MainView":34,"react":"react","react-redux":"react-redux"}],37:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;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}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_ValueEditor=require("./ValueEditor"),_ValueEditor2=_interopRequireDefault(_ValueEditor),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),ValidateEditor=function(e){function t(e){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return n.state={valid:e.isValid(e.content)},n.onInput=n.onInput.bind(n),n.onDone=n.onDone.bind(n),n}return _inherits(t,e),_createClass(t,[{key:"componentWillReceiveProps",value:function(e){this.setState({valid:e.isValid(e.content)})}},{key:"onInput",value:function(e){this.setState({valid:this.props.isValid(e)})}},{key:"onDone",value:function(e){this.props.isValid(e)||(this.editor.reset(),e=this.props.content),this.props.onDone(e)}},{key:"render",value:function(){var e=this,t=(0,_classnames2.default)(this.props.className,{"has-success":this.state.valid,"has-warning":!this.state.valid});return _react2.default.createElement(_ValueEditor2.default,{content:this.props.content,readonly:this.props.readonly,onDone:this.onDone,onInput:this.onInput,className:t,ref:function(t){return e.editor=t}})}}]),t}(_react.Component);ValidateEditor.propTypes={content:_react.PropTypes.string.isRequired,readonly:_react.PropTypes.bool,onDone:_react.PropTypes.func.isRequired,className:_react.PropTypes.string,isValid:_react.PropTypes.func.isRequired},exports.default=ValidateEditor;

},{"./ValueEditor":38,"classnames":"classnames","react":"react"}],38:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_utils=require("../../utils"),ValueEditor=function(e){function t(e){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return n.state={editable:!1},n.onPaste=n.onPaste.bind(n),n.onMouseDown=n.onMouseDown.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n.onFocus=n.onFocus.bind(n),n.onClick=n.onClick.bind(n),n.blur=n.blur.bind(n),n.onBlur=n.onBlur.bind(n),n.reset=n.reset.bind(n),n.onKeyDown=n.onKeyDown.bind(n),n.onInput=n.onInput.bind(n),n}return _inherits(t,e),_createClass(t,[{key:"blur",value:function(){this.input.blur()}},{key:"reset",value:function(){this.input.innerHTML=_lodash2.default.escape(this.props.content)}},{key:"render",value:function(){var e=this,t=(0,_classnames2.default)("inline-input",{readonly:this.props.readonly,editable:!this.props.readonly},this.props.className);return _react2.default.createElement("div",{ref:function(t){return e.input=t},tabIndex:this.props.readonly?void 0:0,className:t,contentEditable:this.state.editable||void 0,onFocus:this.onFocus,onMouseDown:this.onMouseDown,onClick:this.onClick,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onInput:this.onInput,onPaste:this.onPaste,dangerouslySetInnerHTML:{__html:_lodash2.default.escape(this.props.content)}})}},{key:"onPaste",value:function(e){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertHTML",!1,t)}},{key:"onMouseDown",value:function(e){this._mouseDown=!0,window.addEventListener("mouseup",this.onMouseUp)}},{key:"onMouseUp",value:function(){this._mouseDown&&(this._mouseDown=!1,window.removeEventListener("mouseup",this.onMouseUp))}},{key:"onClick",value:function(e){this.onMouseUp(),this.onFocus(e)}},{key:"onFocus",value:function(e){var t=this;if(!(this._mouseDown||this._ignore_events||this.state.editable||this.props.readonly)){var n=window.getSelection(),o=void 0;if(n.rangeCount>0)o=n.getRangeAt(0);else if(document.caretPositionFromPoint&&e.clientX&&e.clientY){var s=document.caretPositionFromPoint(e.clientX,e.clientY);o=document.createRange(),o.setStart(s.offsetNode,s.offset)}else document.caretRangeFromPoint&&e.clientX&&e.clientY?o=document.caretRangeFromPoint(e.clientX,e.clientY):(o=document.createRange(),o.selectNodeContents(this.input));this._ignore_events=!0,this.setState({editable:!0},function(){t.input.blur(),t.input.focus(),t._ignore_events=!1,o.selectNodeContents(t.input),n.removeAllRanges(),n.addRange(o)})}}},{key:"onBlur",value:function(e){this._ignore_events||this.props.readonly||(window.getSelection().removeAllRanges(),this.setState({editable:!1}),this.props.onDone(this.input.textContent))}},{key:"onKeyDown",value:function(e){switch(e.stopPropagation(),e.keyCode){case _utils.Key.ESC:e.preventDefault(),this.reset(),this.blur();break;case _utils.Key.ENTER:e.shiftKey||(e.preventDefault(),this.blur())}this.props.onKeyDown(e)}},{key:"onInput",value:function(){this.props.onInput(this.input.textContent)}}]),t}(_react.Component);ValueEditor.propTypes={content:_react.PropTypes.string.isRequired,readonly:_react.PropTypes.bool,onDone:_react.PropTypes.func.isRequired,className:_react.PropTypes.string,onInput:_react.PropTypes.func,onKeyDown:_react.PropTypes.func},ValueEditor.defaultProps={onInput:function(){},onKeyDown:function(){}},exports.default=ValueEditor;

},{"../../utils":59,"classnames":"classnames","lodash":"lodash","react":"react"}],39:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function Button(e){var t=e.onClick,a=e.text,r=e.icon,s=e.disabled,n=e.className;return _react2.default.createElement("div",{className:(0,_classnames2.default)(n,"btn btn-default"),onClick:t,disabled:s},r&&_react2.default.createElement("i",{className:"fa fa-fw "+r}),a&&a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Button;var _react=require("react"),_react2=_interopRequireDefault(_react),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames);Button.propTypes={onClick:_react.PropTypes.func.isRequired,text:_react.PropTypes.string,icon:_react.PropTypes.string};

},{"classnames":"classnames","react":"react"}],40:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0}),exports.Divider=void 0;var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),Divider=exports.Divider=function(){return _react2.default.createElement("hr",{className:"divider"})},Dropdown=function(e){function t(e,r){_classCallCheck(this,t);var n=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,r));return n.state={open:!1},n.close=n.close.bind(n),n.open=n.open.bind(n),n}return _inherits(t,e),_createClass(t,[{key:"close",value:function(){this.setState({open:!1}),document.removeEventListener("click",this.close)}},{key:"open",value:function(e){e.preventDefault(),this.state.open||(this.setState({open:!this.state.open}),document.addEventListener("click",this.close))}},{key:"render",value:function(){var e=this.props,t=e.dropup,r=e.className,n=e.btnClass,o=e.text,a=e.children;return _react2.default.createElement("div",{className:(0,_classnames2.default)(t?"dropup":"dropdown",r,{open:this.state.open})},_react2.default.createElement("a",{href:"#",className:n,onClick:this.open},o),_react2.default.createElement("ul",{className:"dropdown-menu",role:"menu"},a.map(function(e,t){return _react2.default.createElement("li",{key:t}," ",e," ")})))}}]),t}(_react.Component);Dropdown.propTypes={dropup:_react.PropTypes.bool,className:_react.PropTypes.string,btnClass:_react.PropTypes.string.isRequired},Dropdown.defaultProps={dropup:!1},exports.default=Dropdown;

},{"classnames":"classnames","react":"react"}],41:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function FileChooser(e){var t=e.icon,r=e.text,a=e.className,n=e.title,i=e.onOpenFile,c=void 0;return _react2.default.createElement("a",{href:"#",onClick:function(){return c.click()},className:a,title:n},_react2.default.createElement("i",{className:"fa fa-fw "+t}),r,_react2.default.createElement("input",{ref:function(e){return c=e},className:"hidden",type:"file",onChange:function(e){e.preventDefault(),e.target.files.length>0&&i(e.target.files[0]),c=""}}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=FileChooser;var _react=require("react"),_react2=_interopRequireDefault(_react);FileChooser.propTypes={icon:_react.PropTypes.string,text:_react.PropTypes.string,className:_react.PropTypes.string,title:_react.PropTypes.string,onOpenFile:_react.PropTypes.func.isRequired};

},{"react":"react"}],42:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),Splitter=function(e){function t(e,n){_classCallCheck(this,t);var o=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e,n));return o.state={applied:!1,startX:!1,startY:!1},o.onMouseMove=o.onMouseMove.bind(o),o.onMouseDown=o.onMouseDown.bind(o),o.onMouseUp=o.onMouseUp.bind(o),o.onDragEnd=o.onDragEnd.bind(o),o}return _inherits(t,e),_createClass(t,[{key:"onMouseDown",value:function(e){this.setState({startX:e.pageX,startY:e.pageY}),window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("dragend",this.onDragEnd)}},{key:"onDragEnd",value:function(){_reactDom2.default.findDOMNode(this).style.transform="",window.removeEventListener("dragend",this.onDragEnd),window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)}},{key:"onMouseUp",value:function(e){this.onDragEnd();var t=_reactDom2.default.findDOMNode(this),n=t.previousElementSibling,o=n.offsetHeight+e.pageY-this.state.startY;"x"===this.props.axis&&(o=n.offsetWidth+e.pageX-this.state.startX),n.style.flex="0 0 "+Math.max(0,o)+"px",t.nextElementSibling.style.flex="1 1 auto",this.setState({applied:!0}),this.onResize()}},{key:"onMouseMove",value:function(e){var t=0,n=0;"x"===this.props.axis?t=e.pageX-this.state.startX:n=e.pageY-this.state.startY,_reactDom2.default.findDOMNode(this).style.transform="translate("+t+"px, "+n+"px)"}},{key:"onResize",value:function(){window.setTimeout(function(){return window.dispatchEvent(new CustomEvent("resize"))},1)}},{key:"reset",value:function(e){if(this.state.applied){var t=_reactDom2.default.findDOMNode(this);t.previousElementSibling.style.flex="",t.nextElementSibling.style.flex="",e||this.setState({applied:!1}),this.onResize()}}},{key:"componentWillUnmount",value:function(){this.reset(!0)}},{key:"render",value:function(){return _react2.default.createElement("div",{className:(0,_classnames2.default)("splitter","x"===this.props.axis?"splitter-x":"splitter-y")},_react2.default.createElement("div",{onMouseDown:this.onMouseDown,draggable:"true"}))}}]),t}(_react.Component);Splitter.defaultProps={axis:"x"},exports.default=Splitter;

},{"classnames":"classnames","react":"react","react-dom":"react-dom"}],43:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ToggleButton(e){var t=e.checked,r=e.onToggle,a=e.text;return _react2.default.createElement("div",{className:"btn btn-toggle "+(t?"btn-primary":"btn-default"),onClick:r},_react2.default.createElement("i",{className:"fa fa-fw "+(t?"fa-check-square-o":"fa-square-o")})," ",a)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=ToggleButton;var _react=require("react"),_react2=_interopRequireDefault(_react);ToggleButton.propTypes={checked:_react.PropTypes.bool.isRequired,onToggle:_react.PropTypes.func.isRequired,text:_react.PropTypes.string.isRequired};

},{"react":"react"}],44:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_react=require("react"),_react2=_interopRequireDefault(_react),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_utils=require("../../utils"),ToggleInputButton=function(e){function t(e){_classCallCheck(this,t);var r=_possibleConstructorReturn(this,Object.getPrototypeOf(t).call(this,e));return r.state={txt:e.txt||""},r}return _inherits(t,e),_createClass(t,[{key:"onKeyDown",value:function(e){e.stopPropagation(),e.keyCode===_utils.Key.ENTER&&this.props.onToggleChanged(this.state.txt)}},{key:"render",value:function(){var e=this,t=this.props,r=t.checked,n=t.onToggleChanged,a=t.name,o=t.inputType,s=t.placeholder;return _react2.default.createElement("div",{className:"input-group toggle-input-btn"},_react2.default.createElement("span",{className:"input-group-btn",onClick:function(){return n(e.state.txt)}},_react2.default.createElement("div",{className:(0,_classnames2.default)("btn",r?"btn-primary":"btn-default")},_react2.default.createElement("span",{className:(0,_classnames2.default)("fa",r?"fa-check-square-o":"fa-square-o")})," ",a)),_react2.default.createElement("input",{className:"form-control",placeholder:s,disabled:r,value:this.state.txt,type:o||"text",onChange:function(t){return e.setState({txt:t.target.value})},onKeyDown:function(t){return e.onKeyDown(t)}}))}}]),t}(_react.Component);ToggleInputButton.propTypes={name:_react.PropTypes.string.isRequired,txt:_react.PropTypes.string,onToggleChanged:_react.PropTypes.func.isRequired,checked:_react.PropTypes.bool.isRequired,placeholder:_react.PropTypes.string.isRequired,inputType:_react.PropTypes.string},exports.default=ToggleInputButton;

},{"../../utils":59,"classnames":"classnames","react":"react"}],45:[function(require,module,exports){
"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),_get=function t(e,o,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,o);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,o,r)}if("value"in n)return n.value;var c=n.get;if(void 0!==c)return c.call(r)},_react=require("react"),_react2=_interopRequireDefault(_react),_reactDom=require("react-dom"),_reactDom2=_interopRequireDefault(_reactDom),symShouldStick=Symbol("shouldStick"),isAtBottom=function(t){return t.scrollTop+t.clientHeight===t.scrollHeight};exports.default=function(t){var e,o;return Object.assign((o=e=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,Object.getPrototypeOf(e).apply(this,arguments))}return _inherits(e,t),_createClass(e,[{key:"componentWillUpdate",value:function(){var t=_reactDom2.default.findDOMNode(this);this[symShouldStick]=t.scrollTop&&isAtBottom(t),_get(Object.getPrototypeOf(e.prototype),"componentWillUpdate",this)&&_get(Object.getPrototypeOf(e.prototype),"componentWillUpdate",this).call(this)}},{key:"componentDidUpdate",value:function(){var t=_reactDom2.default.findDOMNode(this);this[symShouldStick]&&!isAtBottom(t)&&(t.scrollTop=t.scrollHeight),_get(Object.getPrototypeOf(e.prototype),"componentDidUpdate",this)&&_get(Object.getPrototypeOf(e.prototype),"componentDidUpdate",this).call(this)}}]),e}(t),e.displayName=t.name,o),t)};

},{"react":"react","react-dom":"react-dom"}],46:[function(require,module,exports){
"use strict";function calcVScroll(t){if(!t)return{start:0,end:0,paddingTop:0,paddingBottom:0};var e=t.itemCount,o=t.rowHeight,r=t.viewportTop,a=t.viewportHeight,i=t.itemHeights,l=r+a,n=0,c=0,d=0,p=0;if(i)for(var h=0,s=0;h<e;h++){var m=i[h]||o;s<=r&&h%2===0&&(d=s,n=h),s<=l?c=h+1:p+=m,s+=m}else n=Math.max(0,Math.floor(r/o)-1)&-2,c=Math.min(e,n+Math.ceil(a/o)+2),d=Math.min(n,e)*o,p=Math.max(0,e-c)*o;return{start:n,end:c,paddingTop:d,paddingBottom:p}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.calcVScroll=calcVScroll;

},{}],47:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function reduce(){var e=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],t=arguments[1],r=function(){switch(t.type){case TOGGLE_VISIBILITY:return{v:_extends({},e,{visible:!e.visible})};case TOGGLE_FILTER:var r=_extends({},e.filters,_defineProperty({},t.filter,!e.filters[t.filter]));return{v:_extends({},e,{filters:r},(0,storeActions.default)(e,storeActions.setFilter(function(e){return r[e.level]})))};case ADD:case RECEIVE:return{v:_extends({},e,(0,storeActions.default)(e,storeActions[t.cmd](t.data,function(t){return e.filters[t.level]})))};default:return{v:e}}}();if("object"===("undefined"==typeof r?"undefined":_typeof(r)))return r.v}function toggleFilter(e){return{type:TOGGLE_FILTER,filter:e}}function toggleVisibility(){return{type:TOGGLE_VISIBILITY}}function add(e){var t=arguments.length<=1||void 0===arguments[1]?"web":arguments[1],r={id:logId,message:e,level:t};return logId+=2,{type:ADD,cmd:"add",data:r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.TOGGLE_FILTER=exports.TOGGLE_VISIBILITY=exports.RECEIVE=exports.ADD=void 0;var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};exports.default=reduce,exports.toggleFilter=toggleFilter,exports.toggleVisibility=toggleVisibility,exports.add=add;var _store=require("./utils/store"),storeActions=_interopRequireWildcard(_store),ADD=exports.ADD="EVENTS_ADD",RECEIVE=exports.RECEIVE="EVENTS_RECEIVE",TOGGLE_VISIBILITY=exports.TOGGLE_VISIBILITY="EVENTS_TOGGLE_VISIBILITY",TOGGLE_FILTER=exports.TOGGLE_FILTER="EVENTS_TOGGLE_FILTER",defaultState=_extends({visible:!1,filters:{debug:!1,info:!0,web:!0}},(0,storeActions.default)(void 0,{})),logId=1;

},{"./utils/store":55}],48:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function reduce(){var e=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],t=arguments[1];switch(t.type){case ADD:case UPDATE:case REMOVE:case RECEIVE:var r=storeActions[t.cmd](t.data,makeFilter(e.filter),makeSort(e.sort));return _extends({},e,(0,storeActions.default)(e,r));case SET_FILTER:return _extends({},e,{filter:t.filter},(0,storeActions.default)(e,storeActions.setFilter(makeFilter(t.filter),makeSort(e.sort))));case SET_SORT:return _extends({},e,{sort:t.sort},(0,storeActions.default)(e,storeActions.setSort(makeSort(t.sort))));case SELECT:return _extends({},e,{selected:t.flowIds});default:return e}}function makeFilter(e){if(e)return _filt2.default.parse(e)}function makeSort(e){var t=e.column,r=e.desc,o=sortKeyFuns[t];if(o)return function(e,t){var n=o(e),s=o(t);return n>s?r?-1:1:n<s?r?1:-1:0}}function setFilter(e){return{type:SET_FILTER,filter:e}}function setHighlight(e){return{type:SET_HIGHLIGHT,highlight:e}}function setSort(e,t){return{type:SET_SORT,sort:{column:e,desc:t}}}function selectRelative(e){return function(t,r){var o=r().flows.viewIndex[r().flows.selected[0]],n=0,s=r().flows.view.length-1,u=void 0;void 0===o?u=e<0?n:s:(u=o+e,u=window.Math.max(u,n),u=window.Math.min(u,s));var i=r().flows.view[u];t(select(i?i.id:void 0))}}function accept(e){return function(t){return(0,_utils.fetchApi)("/flows/"+e.id+"/accept",{method:"POST"})}}function acceptAll(){return function(e){return(0,_utils.fetchApi)("/flows/accept",{method:"POST"})}}function remove(e){return function(t){return(0,_utils.fetchApi)("/flows/"+e.id,{method:"DELETE"})}}function duplicate(e){return function(t){return(0,_utils.fetchApi)("/flows/"+e.id+"/duplicate",{method:"POST"})}}function replay(e){return function(t){return(0,_utils.fetchApi)("/flows/"+e.id+"/replay",{method:"POST"})}}function revert(e){return function(t){return(0,_utils.fetchApi)("/flows/"+e.id+"/revert",{method:"POST"})}}function update(e,t){return function(r){return _utils.fetchApi.put("/flows/"+e.id,t)}}function uploadContent(e,t,r){var o=new FormData;return t=new window.Blob([t],{type:"plain/text"}),o.append("file",t),function(t){return(0,_utils.fetchApi)("/flows/"+e.id+"/"+r+"/content",{method:"post",body:o})}}function clear(){return function(e){return(0,_utils.fetchApi)("/clear",{method:"POST"})}}function download(){return window.location="/flows/dump",{type:REQUEST_ACTION}}function upload(e){var t=new FormData;return t.append("file",e),function(e){return(0,_utils.fetchApi)("/flows/dump",{method:"post",body:t})}}function select(e){return{type:SELECT,flowIds:e?[e]:[]}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.REQUEST_ACTION=exports.SET_HIGHLIGHT=exports.SET_SORT=exports.SET_FILTER=exports.SELECT=exports.RECEIVE=exports.REMOVE=exports.UPDATE=exports.ADD=void 0;var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};exports.default=reduce,exports.makeFilter=makeFilter,exports.makeSort=makeSort,exports.setFilter=setFilter,exports.setHighlight=setHighlight,exports.setSort=setSort,exports.selectRelative=selectRelative,exports.accept=accept,exports.acceptAll=acceptAll,exports.remove=remove,exports.duplicate=duplicate,exports.replay=replay,exports.revert=revert,exports.update=update,exports.uploadContent=uploadContent,exports.clear=clear,exports.download=download,exports.upload=upload,exports.select=select;var _utils=require("../utils"),_store=require("./utils/store"),storeActions=_interopRequireWildcard(_store),_filt=require("../filt/filt"),_filt2=_interopRequireDefault(_filt),_utils2=require("../flow/utils"),ADD=exports.ADD="FLOWS_ADD",UPDATE=exports.UPDATE="FLOWS_UPDATE",REMOVE=exports.REMOVE="FLOWS_REMOVE",RECEIVE=exports.RECEIVE="FLOWS_RECEIVE",SELECT=exports.SELECT="FLOWS_SELECT",SET_FILTER=exports.SET_FILTER="FLOWS_SET_FILTER",SET_SORT=exports.SET_SORT="FLOWS_SET_SORT",SET_HIGHLIGHT=exports.SET_HIGHLIGHT="FLOWS_SET_HIGHLIGHT",REQUEST_ACTION=exports.REQUEST_ACTION="FLOWS_REQUEST_ACTION",defaultState=_extends({highlight:null,filter:null,sort:{column:null,desc:!1},selected:[]},(0,storeActions.default)(void 0,{})),sortKeyFuns={TLSColumn:function(e){return e.request.scheme},PathColumn:function(e){return _utils2.RequestUtils.pretty_url(e.request)},MethodColumn:function(e){return e.request.method},StatusColumn:function(e){return e.response&&e.response.status_code},TimeColumn:function(e){return e.response&&e.response.timestamp_end-e.request.timestamp_start},SizeColumn:function(e){var t=e.request.contentLength;return e.response&&(t+=e.response.contentLength||0),t}};

},{"../filt/filt":56,"../flow/utils":57,"../utils":59,"./utils/store":55}],49:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _redux=require("redux"),_eventLog=require("./eventLog"),_eventLog2=_interopRequireDefault(_eventLog),_flows=require("./flows"),_flows2=_interopRequireDefault(_flows),_settings=require("./settings"),_settings2=_interopRequireDefault(_settings),_index=require("./ui/index"),_index2=_interopRequireDefault(_index);exports.default=(0,_redux.combineReducers)({eventLog:_eventLog2.default,flows:_flows2.default,settings:_settings2.default,ui:_index2.default});

},{"./eventLog":47,"./flows":48,"./settings":50,"./ui/index":53,"redux":"redux"}],50:[function(require,module,exports){
"use strict";function reducer(){var e=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],t=arguments[1];switch(t.type){case RECEIVE:return t.data;case UPDATE:return _extends({},e,t.data);default:return e}}function update(e){return _utils.fetchApi.put("/settings",e),{type:REQUEST_UPDATE}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.UNKNOWN_CMD=exports.REQUEST_UPDATE=exports.UPDATE=exports.RECEIVE=void 0;var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var E in r)Object.prototype.hasOwnProperty.call(r,E)&&(e[E]=r[E])}return e};exports.default=reducer,exports.update=update;var _utils=require("../utils"),RECEIVE=exports.RECEIVE="SETTINGS_RECEIVE",UPDATE=exports.UPDATE="SETTINGS_UPDATE",REQUEST_UPDATE=exports.REQUEST_UPDATE="REQUEST_UPDATE",UNKNOWN_CMD=exports.UNKNOWN_CMD="SETTINGS_UNKNOWN_CMD",defaultState={};

},{"../utils":59}],51:[function(require,module,exports){
"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _interopRequireWildcard(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function reducer(){var t=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],e=arguments[1],n=!!t.modifiedFlow,o=e.content||t.content,r=o&&o.length<=t.maxContentLines;switch(e.type){case START_EDIT:return _extends({},t,{modifiedFlow:e.flow,contentView:"Edit",showFullContent:!0});case UPDATE_EDIT:return _extends({},t,{modifiedFlow:_lodash2.default.merge({},t.modifiedFlow,e.update)});case flowsActions.SELECT:return _extends({},t,{modifiedFlow:!1,displayLarge:!1,contentView:n?"Auto":t.contentView,showFullContent:r});case flowsActions.UPDATE:return e.data.id===t.modifiedFlow.id?_extends({},t,{modifiedFlow:!1,displayLarge:!1,contentView:n?"Auto":t.contentView,showFullContent:!1}):t;case SET_CONTENT_VIEW_DESCRIPTION:return _extends({},t,{viewDescription:e.description});case SET_SHOW_FULL_CONTENT:return _extends({},t,{showFullContent:!0});case SET_TAB:return _extends({},t,{tab:e.tab?e.tab:"request",displayLarge:!1,showFullContent:!1});case SET_CONTENT_VIEW:return _extends({},t,{contentView:e.contentView,showFullContent:"Edit"==e.contentView});case SET_CONTENT:return _extends({},t,{content:e.content,showFullContent:r});case DISPLAY_LARGE:return _extends({},t,{displayLarge:!0});default:return t}}function setContentView(t){return{type:SET_CONTENT_VIEW,contentView:t}}function displayLarge(){return{type:DISPLAY_LARGE}}function selectTab(t){return{type:SET_TAB,tab:t}}function startEdit(t){return{type:START_EDIT,flow:t}}function updateEdit(t){return{type:UPDATE_EDIT,update:t}}function setContentViewDescription(t){return{type:SET_CONTENT_VIEW_DESCRIPTION,description:t}}function setShowFullContent(){return{type:SET_SHOW_FULL_CONTENT}}function setContent(t){return{type:SET_CONTENT,content:t}}function stopEdit(t,e){return flowsActions.update(t,(0,_utils.getDiff)(t,e))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.SET_CONTENT=exports.SET_CONTENT_VIEW_DESCRIPTION=exports.SET_SHOW_FULL_CONTENT=exports.UPLOAD_CONTENT=exports.UPDATE_EDIT=exports.START_EDIT=exports.SET_TAB=exports.DISPLAY_LARGE=exports.SET_CONTENT_VIEW=void 0;var _extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};exports.default=reducer,exports.setContentView=setContentView,exports.displayLarge=displayLarge,exports.selectTab=selectTab,exports.startEdit=startEdit,exports.updateEdit=updateEdit,exports.setContentViewDescription=setContentViewDescription,exports.setShowFullContent=setShowFullContent,exports.setContent=setContent,exports.stopEdit=stopEdit;var _flows=require("../flows"),flowsActions=_interopRequireWildcard(_flows),_utils=require("../../utils"),_lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),SET_CONTENT_VIEW=exports.SET_CONTENT_VIEW="UI_FLOWVIEW_SET_CONTENT_VIEW",DISPLAY_LARGE=exports.DISPLAY_LARGE="UI_FLOWVIEW_DISPLAY_LARGE",SET_TAB=exports.SET_TAB="UI_FLOWVIEW_SET_TAB",START_EDIT=exports.START_EDIT="UI_FLOWVIEW_START_EDIT",UPDATE_EDIT=exports.UPDATE_EDIT="UI_FLOWVIEW_UPDATE_EDIT",UPLOAD_CONTENT=exports.UPLOAD_CONTENT="UI_FLOWVIEW_UPLOAD_CONTENT",SET_SHOW_FULL_CONTENT=exports.SET_SHOW_FULL_CONTENT="UI_SET_SHOW_FULL_CONTENT",SET_CONTENT_VIEW_DESCRIPTION=exports.SET_CONTENT_VIEW_DESCRIPTION="UI_SET_CONTENT_VIEW_DESCRIPTION",SET_CONTENT=exports.SET_CONTENT="UI_SET_CONTENT",defaultState={displayLarge:!1,viewDescription:"",showFullContent:!1,modifiedFlow:!1,contentView:"Auto",tab:"request",content:[],maxContentLines:80};

},{"../../utils":59,"../flows":48,"lodash":"lodash"}],52:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function reducer(){var e=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],t=arguments[1];switch(t.type){case SET_ACTIVE_MENU:return _extends({},e,{activeMenu:t.activeMenu});case flowsActions.SELECT:if(t.flowIds.length&&!e.isFlowSelected)return _extends({},e,{activeMenu:"Flow",isFlowSelected:!0});if(!t.flowIds.length&&e.isFlowSelected){var r=e.activeMenu;return"Flow"==r&&(r="Start"),_extends({},e,{activeMenu:r,isFlowSelected:!1})}return e;default:return e}}function setActiveMenu(e){return{type:SET_ACTIVE_MENU,activeMenu:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.SET_ACTIVE_MENU=void 0;var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};exports.default=reducer,exports.setActiveMenu=setActiveMenu;var _flows=require("../flows"),flowsActions=_interopRequireWildcard(_flows),SET_ACTIVE_MENU=exports.SET_ACTIVE_MENU="UI_SET_ACTIVE_MENU",defaultState={activeMenu:"Start",isFlowSelected:!1};

},{"../flows":48}],53:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var _redux=require("redux"),_flow=require("./flow"),_flow2=_interopRequireDefault(_flow),_header=require("./header"),_header2=_interopRequireDefault(_header);exports.default=(0,_redux.combineReducers)({flow:_flow2.default,header:_header2.default});

},{"./flow":51,"./header":52,"redux":"redux"}],54:[function(require,module,exports){
"use strict";function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t.default=e,t}function onKeyDown(e){if(console.debug("onKeyDown",e),e.ctrlKey)return function(){};var t=e.keyCode,s=e.shiftKey;return e.preventDefault(),function(e,l){var r=l().flows.byId[l().flows.selected[0]];switch(t){case _utils.Key.K:case _utils.Key.UP:e(flowsActions.selectRelative(-1));break;case _utils.Key.J:case _utils.Key.DOWN:e(flowsActions.selectRelative(1));break;case _utils.Key.SPACE:case _utils.Key.PAGE_DOWN:e(flowsActions.selectRelative(10));break;case _utils.Key.PAGE_UP:e(flowsActions.selectRelative(-10));break;case _utils.Key.END:e(flowsActions.selectRelative(1e10));break;case _utils.Key.HOME:e(flowsActions.selectRelative(-1e10));break;case _utils.Key.ESC:e(flowsActions.select(null));break;case _utils.Key.LEFT:if(!r)break;var i=["request","response","error"].filter(function(e){return r[e]}).concat(["details"]),o=l().ui.flow.tab,c=i[(i.indexOf(o)-1+i.length)%i.length];e((0,_flow.selectTab)(c));break;case _utils.Key.TAB:case _utils.Key.RIGHT:if(!r)break;var a=["request","response","error"].filter(function(e){return r[e]}).concat(["details"]),n=l().ui.flow.tab,u=a[(a.indexOf(n)+1)%a.length];e((0,_flow.selectTab)(u));break;case _utils.Key.C:s&&e(flowsActions.clear());break;case _utils.Key.D:if(!r)return;e(s?flowsActions.duplicate(r):flowsActions.remove(r));break;case _utils.Key.A:s?e(flowsActions.acceptAll()):r&&r.intercepted&&e(flowsActions.accept(r));break;case _utils.Key.R:!s&&r&&e(flowsActions.replay(r));break;case _utils.Key.V:!s&&r&&r.modified&&e(flowsActions.revert(r));break;default:return}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.onKeyDown=onKeyDown;var _utils=require("../../utils"),_flow=require("./flow"),_flows=require("../flows"),flowsActions=_interopRequireWildcard(_flows);

},{"../../utils":59,"../flows":48,"./flow":51}],55:[function(require,module,exports){
"use strict";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function reduce(){var e=arguments.length<=0||void 0===arguments[0]?defaultState:arguments[0],t=arguments[1],r=e.byId,i=e.list,n=e.listIndex,o=e.view,a=e.viewIndex;switch(t.type){case SET_FILTER:o=i.filter(t.filter).sort(t.sort),a={},o.forEach(function(e,t){a[e.id]=t});break;case SET_SORT:o=[].concat(_toConsumableArray(o)).sort(t.sort),a={},o.forEach(function(e,t){a[e.id]=t});break;case ADD:if(t.item.id in r)break;if(r=_extends({},r,_defineProperty({},t.item.id,t.item)),n=_extends({},n,_defineProperty({},t.item.id,i.length)),i=[].concat(_toConsumableArray(i),[t.item]),t.filter(t.item)){var d=sortedInsert(e,t.item,t.sort);o=d.view,a=d.viewIndex}break;case UPDATE:r=_extends({},r,_defineProperty({},t.item.id,t.item)),i=[].concat(_toConsumableArray(i)),i[n[t.item.id]]=t.item;var s=t.item.id in a,l=t.filter(t.item);if(l&&!s){var f=sortedInsert(e,t.item,t.sort);o=f.view,a=f.viewIndex}else if(!l&&s){var u=removeData(o,a,t.item.id);o=u.data,a=u.dataIndex}else if(l&&s){var v=sortedUpdate(e,t.item,t.sort);o=v.view,a=v.viewIndex}break;case REMOVE:if(!(t.id in r))break;delete r[t.id];var c=removeData(i,n,t.id);if(i=c.data,n=c.dataIndex,t.id in a){var E=removeData(o,a,t.id);o=E.data,a=E.dataIndex}break;case RECEIVE:i=t.list,n={},r={},i.forEach(function(e,t){r[e.id]=e,n[e.id]=t}),o=i.filter(t.filter).sort(t.sort),a={},o.forEach(function(e,t){a[e.id]=t})}return{byId:r,list:i,listIndex:n,view:o,viewIndex:a}}function setFilter(){var e=arguments.length<=0||void 0===arguments[0]?defaultFilter:arguments[0],t=arguments.length<=1||void 0===arguments[1]?defaultSort:arguments[1];return{type:SET_FILTER,filter:e,sort:t}}function setSort(){var e=arguments.length<=0||void 0===arguments[0]?defaultSort:arguments[0];return{type:SET_SORT,sort:e}}function add(e){var t=arguments.length<=1||void 0===arguments[1]?defaultFilter:arguments[1],r=arguments.length<=2||void 0===arguments[2]?defaultSort:arguments[2];return{type:ADD,item:e,filter:t,sort:r}}function update(e){var t=arguments.length<=1||void 0===arguments[1]?defaultFilter:arguments[1],r=arguments.length<=2||void 0===arguments[2]?defaultSort:arguments[2];return{type:UPDATE,item:e,filter:t,sort:r}}function remove(e){return{type:REMOVE,id:e}}function receive(e){var t=arguments.length<=1||void 0===arguments[1]?defaultFilter:arguments[1],r=arguments.length<=2||void 0===arguments[2]?defaultSort:arguments[2];return{type:RECEIVE,list:e,filter:t,sort:r}}function sortedInsert(e,t,r){var i=sortedIndex(e.view,t,r),n=[].concat(_toConsumableArray(e.view)),o=_extends({},e.viewIndex);n.splice(i,0,t);for(var a=n.length-1;a>=i;a--)o[n[a].id]=a;return{view:n,viewIndex:o}}function removeData(e,t,r){var i=t[r],n=[].concat(_toConsumableArray(e)),o=_extends({},t);delete o[r],n.splice(i,1);for(var a=n.length-1;a>=i;a--)o[n[a].id]=a;return{data:n,dataIndex:o}}function sortedUpdate(e,t,r){var i=[].concat(_toConsumableArray(e.view)),n=_extends({},e.viewIndex),o=n[t.id];for(i[o]=t;o+1<i.length&&r(i[o],i[o+1])>0;)i[o]=i[o+1],i[o+1]=t,n[t.id]=o+1,n[i[o].id]=o,++o;for(;o>0&&r(i[o],i[o-1])<0;)i[o]=i[o-1],i[o-1]=t,n[t.id]=o-1,n[i[o].id]=o,--o;return{view:i,viewIndex:n}}function sortedIndex(e,t,r){for(var i=0,n=e.length;i<n;){var o=i+n>>>1;r(t,e[o])>=0?i=o+1:n=o}return i}function defaultFilter(){return!0}function defaultSort(e,t){return 0}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e};exports.default=reduce,exports.setFilter=setFilter,exports.setSort=setSort,exports.add=add,exports.update=update,exports.remove=remove,exports.receive=receive;var SET_FILTER=exports.SET_FILTER="LIST_SET_FILTER",SET_SORT=exports.SET_SORT="LIST_SET_SORT",ADD=exports.ADD="LIST_ADD",UPDATE=exports.UPDATE="LIST_UPDATE",REMOVE=exports.REMOVE="LIST_REMOVE",RECEIVE=exports.RECEIVE="LIST_RECEIVE",defaultState={byId:{},list:[],listIndex:{},view:[],viewIndex:{}};

},{}],56:[function(require,module,exports){
"use strict";module.exports=function(){function e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function t(e,r,n,i){this.message=e,this.expected=r,this.found=n,this.location=i,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}function r(e){function r(t){var r,n,i=Ot[t];if(i)return i;for(r=t-1;!Ot[r];)r--;for(i=Ot[r],i={line:i.line,column:i.column,seenCR:i.seenCR};r<t;)n=e.charAt(r),"\n"===n?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):"\r"===n||"\u2028"===n||"\u2029"===n?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),r++;return Ot[t]=i,i}function n(e,t){var n=r(e),i=r(t);return{start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:i.line,column:i.column}}}function i(e){Mt<Pt||(Mt>Pt&&(Pt=Mt,Qt=[]),Qt.push(e))}function s(e,r,n,i){function s(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function u(e,t){function r(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0100-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1000-\uFFFF]/g,function(e){return"\\u"+t(e)})}var n,i,s,u=new Array(e.length);for(s=0;s<e.length;s++)u[s]=e[s].description;return n=e.length>1?u.slice(0,-1).join(", ")+" or "+u[e.length-1]:u[0],i=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+i+" found."}return null!==r&&s(r),new t(null!==e?e:u(r,n),r,n,i)}function u(){var e,t,r,n;return Vt++,e=Mt,t=a(),t!==P?(r=l(),r!==P?(n=a(),n!==P?(Nt=e,t=X(r),e=t):(Mt=e,e=P)):(Mt=e,e=P)):(Mt=e,e=P),Vt--,e===P&&(t=P,0===Vt&&i(W)),e}function c(){var t,r;return Vt++,Z.test(e.charAt(Mt))?(t=e.charAt(Mt),Mt++):(t=P,0===Vt&&i($)),Vt--,t===P&&(r=P,0===Vt&&i(Y)),t}function o(){var t,r;return Vt++,te.test(e.charAt(Mt))?(t=e.charAt(Mt),Mt++):(t=P,0===Vt&&i(re)),Vt--,t===P&&(r=P,0===Vt&&i(ee)),t}function a(){var e,t;for(Vt++,e=[],t=c();t!==P;)e.push(t),t=c();return Vt--,e===P&&(t=P,0===Vt&&i(ne)),e}function l(){var t,r,n,s,u,c;return t=Mt,r=p(),r!==P?(n=a(),n!==P?(124===e.charCodeAt(Mt)?(s=ie,Mt++):(s=P,0===Vt&&i(se)),s!==P?(u=a(),u!==P?(c=l(),c!==P?(Nt=t,r=ue(r,c),t=r):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P),t===P&&(t=p()),t}function p(){var t,r,n,s,u,o;if(t=Mt,r=f(),r!==P?(n=a(),n!==P?(38===e.charCodeAt(Mt)?(s=ce,Mt++):(s=P,0===Vt&&i(oe)),s!==P?(u=a(),u!==P?(o=p(),o!==P?(Nt=t,r=ae(r,o),t=r):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P),t===P){if(t=Mt,r=f(),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=p(),s!==P?(Nt=t,r=ae(r,s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;t===P&&(t=f())}return t}function f(){var t,r,n,s;return t=Mt,33===e.charCodeAt(Mt)?(r=le,Mt++):(r=P,0===Vt&&i(pe)),r!==P?(n=a(),n!==P?(s=f(),s!==P?(Nt=t,r=fe(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P),t===P&&(t=h()),t}function h(){var t,r,n,s,u,c;return t=Mt,40===e.charCodeAt(Mt)?(r=he,Mt++):(r=P,0===Vt&&i(de)),r!==P?(n=a(),n!==P?(s=l(),s!==P?(u=a(),u!==P?(41===e.charCodeAt(Mt)?(c=ve,Mt++):(c=P,0===Vt&&i(ye)),c!==P?(Nt=t,r=ge(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P)):(Mt=t,t=P),t===P&&(t=d()),t}function d(){var e;return e=v(),e===P&&(e=g()),e}function v(){var t,r;return t=y(),t===P&&(t=Mt,e.substr(Mt,2)===Ae?(r=Ae,Mt+=2):(r=P,0===Vt&&i(xe)),r!==P&&(Nt=t,r=Re()),t=r,t===P&&(t=Mt,e.substr(Mt,2)===me?(r=me,Mt+=2):(r=P,0===Vt&&i(qe)),r!==P&&(Nt=t,r=Ce()),t=r,t===P&&(t=Mt,e.substr(Mt,2)===we?(r=we,Mt+=2):(r=P,0===Vt&&i(Ee)),r!==P&&(Nt=t,r=be()),t=r,t===P&&(t=Mt,e.substr(Mt,2)===Fe?(r=Fe,Mt+=2):(r=P,0===Vt&&i(Ue)),r!==P&&(Nt=t,r=je()),t=r)))),t}function y(){var t,r;return t=Mt,e.substr(Mt,4)===Te?(r=Te,Mt+=4):(r=P,0===Vt&&i(_e)),r!==P&&(Nt=t,r=Se()),t=r,t===P&&(t=Mt,e.substr(Mt,5)===ke?(r=ke,Mt+=5):(r=P,0===Vt&&i(Be)),r!==P&&(Nt=t,r=Ie()),t=r),t}function g(){var t,r,n,s;if(t=Mt,e.substr(Mt,2)===ze?(r=ze,Mt+=2):(r=P,0===Vt&&i(De)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=A(),s!==P?(Nt=t,r=Ge(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,2)===He?(r=He,Mt+=2):(r=P,0===Vt&&i(Je)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=Ke(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,2)===Le?(r=Le,Mt+=2):(r=P,0===Vt&&i(Me)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=Ne(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,3)===Oe?(r=Oe,Mt+=3):(r=P,0===Vt&&i(Pe)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=Qe(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,3)===Ve?(r=Ve,Mt+=3):(r=P,0===Vt&&i(We)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=Xe(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,2)===Ye?(r=Ye,Mt+=2):(r=P,0===Vt&&i(Ze)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=$e(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,2)===et?(r=et,Mt+=2):(r=P,0===Vt&&i(tt)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=rt(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,3)===nt?(r=nt,Mt+=3):(r=P,0===Vt&&i(it)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=st(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,3)===ut?(r=ut,Mt+=3):(r=P,0===Vt&&i(ct)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=ot(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,e.substr(Mt,2)===at?(r=at,Mt+=2):(r=P,0===Vt&&i(lt)),r!==P){if(n=[],s=c(),s!==P)for(;s!==P;)n.push(s),s=c();else n=P;n!==P?(s=x(),s!==P?(Nt=t,r=pt(s),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;t===P&&(t=Mt,r=x(),r!==P&&(Nt=t,r=pt(r)),t=r)}}}}}}}}}return t}function A(){var t,r,n,s;if(Vt++,t=Mt,ht.test(e.charAt(Mt))?(r=e.charAt(Mt),Mt++):(r=P,0===Vt&&i(dt)),r===P&&(r=null),r!==P){if(n=[],vt.test(e.charAt(Mt))?(s=e.charAt(Mt),Mt++):(s=P,0===Vt&&i(yt)),s!==P)for(;s!==P;)n.push(s),vt.test(e.charAt(Mt))?(s=e.charAt(Mt),Mt++):(s=P,0===Vt&&i(yt));else n=P;n!==P?(ht.test(e.charAt(Mt))?(s=e.charAt(Mt),Mt++):(s=P,0===Vt&&i(dt)),s===P&&(s=null),s!==P?(Nt=t,r=gt(n),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;return Vt--,t===P&&(r=P,0===Vt&&i(ft)),t}function x(){var t,r,n,s;if(Vt++,t=Mt,34===e.charCodeAt(Mt)?(r=xt,Mt++):(r=P,0===Vt&&i(Rt)),r!==P){for(n=[],s=R();s!==P;)n.push(s),s=R();n!==P?(34===e.charCodeAt(Mt)?(s=xt,Mt++):(s=P,0===Vt&&i(Rt)),s!==P?(Nt=t,r=mt(n),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P){if(t=Mt,39===e.charCodeAt(Mt)?(r=qt,Mt++):(r=P,0===Vt&&i(Ct)),r!==P){for(n=[],s=m();s!==P;)n.push(s),s=m();n!==P?(39===e.charCodeAt(Mt)?(s=qt,Mt++):(s=P,0===Vt&&i(Ct)),s!==P?(Nt=t,r=mt(n),t=r):(Mt=t,t=P)):(Mt=t,t=P)}else Mt=t,t=P;if(t===P)if(t=Mt,r=Mt,Vt++,n=o(),Vt--,n===P?r=void 0:(Mt=r,r=P),r!==P){if(n=[],s=q(),s!==P)for(;s!==P;)n.push(s),s=q();else n=P;n!==P?(Nt=t,r=mt(n),t=r):(Mt=t,t=P)}else Mt=t,t=P}return Vt--,t===P&&(r=P,0===Vt&&i(At)),t}function R(){var t,r,n;return t=Mt,r=Mt,Vt++,wt.test(e.charAt(Mt))?(n=e.charAt(Mt),Mt++):(n=P,0===Vt&&i(Et)),Vt--,n===P?r=void 0:(Mt=r,r=P),r!==P?(e.length>Mt?(n=e.charAt(Mt),Mt++):(n=P,0===Vt&&i(bt)),n!==P?(Nt=t,r=Ft(n),t=r):(Mt=t,t=P)):(Mt=t,t=P),t===P&&(t=Mt,92===e.charCodeAt(Mt)?(r=Ut,Mt++):(r=P,0===Vt&&i(jt)),r!==P?(n=C(),n!==P?(Nt=t,r=Ft(n),t=r):(Mt=t,t=P)):(Mt=t,t=P)),t}function m(){var t,r,n;return t=Mt,r=Mt,Vt++,Tt.test(e.charAt(Mt))?(n=e.charAt(Mt),Mt++):(n=P,0===Vt&&i(_t)),Vt--,n===P?r=void 0:(Mt=r,r=P),r!==P?(e.length>Mt?(n=e.charAt(Mt),Mt++):(n=P,0===Vt&&i(bt)),n!==P?(Nt=t,r=Ft(n),t=r):(Mt=t,t=P)):(Mt=t,t=P),t===P&&(t=Mt,92===e.charCodeAt(Mt)?(r=Ut,Mt++):(r=P,0===Vt&&i(jt)),r!==P?(n=C(),n!==P?(Nt=t,r=Ft(n),t=r):(Mt=t,t=P)):(Mt=t,t=P)),t}function q(){var t,r,n;return t=Mt,r=Mt,Vt++,n=c(),Vt--,n===P?r=void 0:(Mt=r,r=P),r!==P?(e.length>Mt?(n=e.charAt(Mt),Mt++):(n=P,0===Vt&&i(bt)),n!==P?(Nt=t,r=Ft(n),t=r):(Mt=t,t=P)):(Mt=t,t=P),t}function C(){var t,r;return St.test(e.charAt(Mt))?(t=e.charAt(Mt),Mt++):(t=P,0===Vt&&i(kt)),t===P&&(t=Mt,110===e.charCodeAt(Mt)?(r=Bt,Mt++):(r=P,0===Vt&&i(It)),r!==P&&(Nt=t,r=zt()),t=r,t===P&&(t=Mt,114===e.charCodeAt(Mt)?(r=Dt,Mt++):(r=P,0===Vt&&i(Gt)),r!==P&&(Nt=t,r=Ht()),t=r,t===P&&(t=Mt,116===e.charCodeAt(Mt)?(r=Jt,Mt++):(r=P,0===Vt&&i(Kt)),r!==P&&(Nt=t,r=Lt()),t=r))),t}function w(e,t){function r(){return e.apply(this,arguments)||t.apply(this,arguments)}return r.desc=e.desc+" or "+t.desc,r}function E(e,t){function r(){return e.apply(this,arguments)&&t.apply(this,arguments)}return r.desc=e.desc+" and "+t.desc,r}function b(e){function t(){return!e.apply(this,arguments)}return t.desc="not "+e.desc,t}function F(e){function t(){return e.apply(this,arguments)}return t.desc="("+e.desc+")",t}function U(e){return!0}function j(e){return!1}function T(e){if(e.response)for(var t=Wt.ResponseUtils.getContentType(e.response),r=Xt.length;r--;)if(Xt[r].test(t))return!0;return!1}function _(e){function t(t){return t.response&&t.response.status_code===e}return t.desc="resp. code is "+e,t}function S(e){function t(t){return t.request&&e.test(t.request.host)}return e=new RegExp(e,"i"),t.desc="domain matches "+e,t}function k(e){return!!e.error}function B(e){function t(t){return t.request&&Wt.RequestUtils.match_header(t.request,e)||t.response&&Wt.ResponseUtils.match_header(t.response,e)}return e=new RegExp(e,"i"),t.desc="header matches "+e,t}function I(e){function t(t){return t.request&&Wt.RequestUtils.match_header(t.request,e)}return e=new RegExp(e,"i"),t.desc="req. header matches "+e,t}function z(e){function t(t){return t.response&&Wt.ResponseUtils.match_header(t.response,e)}return e=new RegExp(e,"i"),t.desc="resp. header matches "+e,t}function D(e){function t(t){return t.request&&e.test(t.request.method)}return e=new RegExp(e,"i"),t.desc="method matches "+e,t}function G(e){return e.request&&!e.response}function H(e){return!!e.response}function J(e){function t(t){return t.request&&e.test(Wt.RequestUtils.getContentType(t.request))||t.response&&e.test(Wt.ResponseUtils.getContentType(t.response))}return e=new RegExp(e,"i"),t.desc="content type matches "+e,t}function K(e){function t(t){return t.request&&e.test(Wt.RequestUtils.getContentType(t.request))}return e=new RegExp(e,"i"),t.desc="req. content type matches "+e,t}function L(e){function t(t){return t.response&&e.test(Wt.ResponseUtils.getContentType(t.response))}return e=new RegExp(e,"i"),t.desc="resp. content type matches "+e,t}function M(e){function t(t){return t.request&&e.test(Wt.RequestUtils.pretty_url(t.request))}return e=new RegExp(e,"i"),t.desc="url matches "+e,t}var N,O=arguments.length>1?arguments[1]:{},P={},Q={start:u},V=u,W={type:"other",description:"filter expression"},X=function(e){return e},Y={type:"other",description:"whitespace"},Z=/^[ \t\n\r]/,$={type:"class",value:"[ \\t\\n\\r]",description:"[ \\t\\n\\r]"},ee={type:"other",description:"control character"},te=/^[|&!()~"]/,re={type:"class",value:'[|&!()~"]',description:'[|&!()~"]'},ne={type:"other",description:"optional whitespace"},ie="|",se={type:"literal",value:"|",description:'"|"'},ue=function(e,t){return w(e,t)},ce="&",oe={type:"literal",value:"&",description:'"&"'},ae=function(e,t){return E(e,t)},le="!",pe={type:"literal",value:"!",description:'"!"'},fe=function(e){return b(e)},he="(",de={type:"literal",value:"(",description:'"("'},ve=")",ye={type:"literal",value:")",description:'")"'},ge=function(e){return F(e)},Ae="~a",xe={type:"literal",value:"~a",description:'"~a"'},Re=function(){return T},me="~e",qe={type:"literal",value:"~e",description:'"~e"'},Ce=function(){return k},we="~q",Ee={type:"literal",value:"~q",description:'"~q"'},be=function(){return G},Fe="~s",Ue={type:"literal",value:"~s",description:'"~s"'},je=function(){return H},Te="true",_e={type:"literal",value:"true",description:'"true"'},Se=function(){return U},ke="false",Be={type:"literal",value:"false",description:'"false"'},Ie=function(){return j},ze="~c",De={type:"literal",value:"~c",description:'"~c"'},Ge=function(e){return _(e)},He="~d",Je={type:"literal",value:"~d",description:'"~d"'},Ke=function(e){return S(e)},Le="~h",Me={type:"literal",value:"~h",description:'"~h"'},Ne=function(e){return B(e)},Oe="~hq",Pe={type:"literal",value:"~hq",description:'"~hq"'},Qe=function(e){return I(e)},Ve="~hs",We={type:"literal",value:"~hs",description:'"~hs"'},Xe=function(e){return z(e)},Ye="~m",Ze={type:"literal",value:"~m",description:'"~m"'},$e=function(e){return D(e)},et="~t",tt={type:"literal",value:"~t",description:'"~t"'},rt=function(e){return J(e)},nt="~tq",it={type:"literal",value:"~tq",description:'"~tq"'},st=function(e){return K(e)},ut="~ts",ct={type:"literal",value:"~ts",description:'"~ts"'},ot=function(e){return L(e)},at="~u",lt={type:"literal",value:"~u",description:'"~u"'},pt=function(e){return M(e)},ft={type:"other",description:"integer"},ht=/^['"]/,dt={type:"class",value:"['\"]",description:"['\"]"},vt=/^[0-9]/,yt={type:"class",value:"[0-9]",description:"[0-9]"},gt=function(e){return parseInt(e.join(""),10)},At={type:"other",description:"string"},xt='"',Rt={type:"literal",value:'"',description:'"\\""'},mt=function(e){return e.join("")},qt="'",Ct={type:"literal",value:"'",description:'"\'"'},wt=/^["\\]/,Et={type:"class",value:'["\\\\]',description:'["\\\\]'},bt={type:"any",description:"any character"},Ft=function(e){return e},Ut="\\",jt={type:"literal",value:"\\",description:'"\\\\"'},Tt=/^['\\]/,_t={type:"class",value:"['\\\\]",description:"['\\\\]"},St=/^['"\\]/,kt={type:"class",value:"['\"\\\\]",description:"['\"\\\\]"},Bt="n",It={type:"literal",value:"n",description:'"n"'},zt=function(){return"\n"},Dt="r",Gt={type:"literal",value:"r",description:'"r"'},Ht=function(){return"\r"},Jt="t",Kt={type:"literal",value:"t",description:'"t"'},Lt=function(){return"\t"},Mt=0,Nt=0,Ot=[{line:1,column:1,seenCR:!1}],Pt=0,Qt=[],Vt=0;if("startRule"in O){if(!(O.startRule in Q))throw new Error("Can't start parsing from rule \""+O.startRule+'".');V=Q[O.startRule]}var Wt=require("../flow/utils.js");U.desc="true",j.desc="false";var Xt=[new RegExp("text/javascript"),new RegExp("application/x-javascript"),new RegExp("application/javascript"),new RegExp("text/css"),new RegExp("image/.*"),new RegExp("application/x-shockwave-flash")];if(T.desc="is asset",k.desc="has error",G.desc="has no response",H.desc="has response",N=V(),N!==P&&Mt===e.length)return N;throw N!==P&&Mt<e.length&&i({type:"end",description:"end of input"}),s(null,Qt,Pt<e.length?e.charAt(Pt):null,Pt<e.length?n(Pt,Pt+1):n(Pt,Pt))}return e(t,Error),{SyntaxError:t,parse:r}}();

},{"../flow/utils.js":57}],57:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValidHttpVersion=exports.parseUrl=exports.ResponseUtils=exports.RequestUtils=exports.MessageUtils=void 0;var _lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),defaultPorts={http:80,https:443},MessageUtils=exports.MessageUtils={getContentType:function(e){var t=this.get_first_header(e,/^Content-Type$/i);if(t)return t.split(";")[0].trim()},get_first_header:function(e,t){if(e._headerLookups||Object.defineProperty(e,"_headerLookups",{value:{},configurable:!1,enumerable:!1,writable:!1}),!(t in e._headerLookups)){for(var r,s=0;s<e.headers.length;s++)if(e.headers[s][0].match(t)){r=e.headers[s];break}e._headerLookups[t]=r?r[1]:void 0}return e._headerLookups[t]},match_header:function(e,t){for(var r=e.headers,s=r.length;s--;)if(t.test(r[s].join(" ")))return r[s];return!1},getContentURL:function(e,t,r){return t===e.request?t="request":t===e.response&&(t="response"),"/flows/"+e.id+"/"+t+"/content"+(r?"/"+r:"")}},RequestUtils=exports.RequestUtils=_lodash2.default.extend(MessageUtils,{pretty_host:function(e){return e.host},pretty_url:function(e){var t="";return defaultPorts[e.scheme]!==e.port&&(t=":"+e.port),e.scheme+"://"+this.pretty_host(e)+t+e.path}}),ResponseUtils=exports.ResponseUtils=_lodash2.default.extend(MessageUtils,{}),parseUrl_regex=/^(?:(https?):\/\/)?([^\/:]+)?(?::(\d+))?(\/.*)?$/i,parseUrl=exports.parseUrl=function(e){var t=parseUrl_regex.exec(e);if(!t)return!1;var r=t[1],s=t[2],o=parseInt(t[3]),i=t[4];r&&(o=o||defaultPorts[r]);var a={};return r&&(a.scheme=r),s&&(a.host=s),o&&(a.port=o),i&&(a.path=i),a},isValidHttpVersion_regex=/^HTTP\/\d+(\.\d+)*$/i,isValidHttpVersion=exports.isValidHttpVersion=function(e){return isValidHttpVersion_regex.test(e)};

},{"lodash":"lodash"}],58:[function(require,module,exports){
"use strict";function _defineProperty(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function updateStoreFromUrl(e){var r=window.location.hash.substr(1).split("?",2),t=_slicedToArray(r,2),i=t[0],o=t[1],n=i.substr(1).split("/");if("flows"===n[0]&&3==n.length){var l=n.slice(1),s=_slicedToArray(l,2),a=s[0],u=s[1];e.dispatch((0,_flows.select)(a)),e.dispatch((0,_flow.selectTab)(u))}o&&o.split("&").forEach(function(r){var t=r.split("=",2),i=_slicedToArray(t,2),o=i[0],n=i[1];switch(o){case Query.SEARCH:e.dispatch((0,_flows.setFilter)(n));break;case Query.HIGHLIGHT:e.dispatch((0,_flows.setHighlight)(n));break;case Query.SHOW_EVENTLOG:e.getState().eventLog.visible||e.dispatch((0,_eventLog.toggleVisibility)());break;default:console.error("unimplemented query arg: "+r)}})}function updateUrlFromStore(e){var r,t=e.getState(),i=(r={},_defineProperty(r,Query.SEARCH,t.flows.filter),_defineProperty(r,Query.HIGHLIGHT,t.flows.highlight),_defineProperty(r,Query.SHOW_EVENTLOG,t.eventLog.visible),r),o=Object.keys(i).filter(function(e){return i[e]}).map(function(e){return e+"="+i[e]}).join("&"),n=void 0;n=t.flows.selected.length>0?"/flows/"+t.flows.selected[0]+"/"+t.ui.flow.tab:"/flows",o&&(n+="?"+o),window.location.hash!==n&&(window.location.hash=n)}function initialize(e){updateStoreFromUrl(e),e.subscribe(function(){return updateUrlFromStore(e)})}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],i=!0,o=!1,n=void 0;try{for(var l,s=e[Symbol.iterator]();!(i=(l=s.next()).done)&&(t.push(l.value),!r||t.length!==r);i=!0);}catch(e){o=!0,n=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw n}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports.default=initialize;var _flows=require("./ducks/flows"),_flow=require("./ducks/ui/flow"),_eventLog=require("./ducks/eventLog"),Query={SEARCH:"s",HIGHLIGHT:"h",SHOW_EVENTLOG:"e"};

},{"./ducks/eventLog":47,"./ducks/flows":48,"./ducks/ui/flow":51}],59:[function(require,module,exports){
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(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 _inherits(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)}function reverseString(e){return String.fromCharCode.apply(String,_lodash2.default.map(e.split(""),function(e){return 65535-e.charCodeAt(0)}))+end}function getCookie(e){var t=document.cookie.match(new RegExp("\\b"+e+"=([^;]*)\\b"));return t?t[1]:void 0}function fetchApi(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.method&&"GET"!==t.method&&(e+=e.indexOf("?")===-1?"?"+xsrf:"&"+xsrf),fetch(e,_extends({credentials:"same-origin"},t))}function getDiff(e,t){var r=_extends({},t);for(var o in e)_lodash2.default.isEqual(t[o],e[o])?r[o]=void 0:"[object Object]"===Object.prototype.toString.call(t[o])&&"[object Object]"===Object.prototype.toString.call(e[o])&&(r[o]=getDiff(e[o],t[o]));return r}Object.defineProperty(exports,"__esModule",{value:!0}),exports.pure=exports.formatTimeStamp=exports.formatTimeDelta=exports.formatSize=exports.Key=void 0;var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};exports.reverseString=reverseString,exports.fetchApi=fetchApi,exports.getDiff=getDiff;var _lodash=require("lodash"),_lodash2=_interopRequireDefault(_lodash),_react=require("react"),_react2=_interopRequireDefault(_react),_shallowequal=require("shallowequal"),_shallowequal2=_interopRequireDefault(_shallowequal);window._=_lodash2.default,window.React=_react2.default;for(var Key=exports.Key={UP:38,DOWN:40,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,LEFT:37,RIGHT:39,ENTER:13,ESC:27,TAB:9,SPACE:32,BACKSPACE:8,SHIFT:16},i=65;i<=90;i++)Key[String.fromCharCode(i)]=i;var formatSize=exports.formatSize=function(e){if(0===e)return"0";for(var t=["b","kb","mb","gb","tb"],r=0;r<t.length&&!(Math.pow(1024,r+1)>e);r++);var o;return o=e%Math.pow(1024,r)===0?0:1,(e/Math.pow(1024,r)).toFixed(o)+t[r]},formatTimeDelta=exports.formatTimeDelta=function(e){for(var t=e,r=["ms","s","min","h"],o=[1e3,60,60],n=0;Math.abs(t)>=o[n]&&n<o.length;)t/=o[n],n++;return Math.round(t)+r[n]},formatTimeStamp=exports.formatTimeStamp=function(e){var t=new Date(1e3*e).toISOString();return t.replace("T"," ").replace("Z","")},end=String.fromCharCode(65535),xsrf="_xsrf="+getCookie("_xsrf");fetchApi.put=function(e,t,r){return fetchApi(e,_extends({method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},r))};var pure=exports.pure=function(e){var t,r;return r=t=function(t){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,Object.getPrototypeOf(r).apply(this,arguments))}return _inherits(r,t),_createClass(r,[{key:"shouldComponentUpdate",value:function(e){return!(0,_shallowequal2.default)(this.props,e)}},{key:"render",value:function(){return e(this.props)}}]),r}(_react2.default.Component),t.displayName=e.name,r};

},{"lodash":"lodash","react":"react","shallowequal":"shallowequal"}]},{},[1])


//# sourceMappingURL=app.js.map
