You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
3 years ago
|
(this["webpackJsonpmitmproxy-client"]=this["webpackJsonpmitmproxy-client"]||[]).push([[0],{52:function(e,t,s){},58:function(e,t,s){"use strict";s.r(t);var n,i=s(0),r=s.n(i),o=s(20),a=s.n(o),c=(s(51),s(8)),l=s(9),h=s(17),d=s(16),u=s(45),p=s(7),j=s(10),v=s(42),b=s.n(v),y=(s(52),s(21)),f=s(18),O=s(12),w=s(33),x=s(23),S=s(1),R=function(e){Object(h.a)(s,e);var t=Object(d.a)(s);function s(e){var n;return Object(c.a)(this,s),(n=t.call(this,e)).state={show:!1,rule:{method:"ALL",url:"",action:1},haveRules:!1},n.handleClose=n.handleClose.bind(Object(f.a)(n)),n.handleShow=n.handleShow.bind(Object(f.a)(n)),n.handleSave=n.handleSave.bind(Object(f.a)(n)),n}return Object(l.a)(s,[{key:"handleClose",value:function(){this.setState({show:!1})}},{key:"handleShow",value:function(){this.setState({show:!0})}},{key:"handleSave",value:function(){var e=this.state.rule,t=[];e.url&&t.push({method:"ALL"===e.method?"":e.method,url:e.url,action:e.action}),this.props.onSave(t),this.handleClose(),this.setState({haveRules:!!t.length})}},{key:"render",value:function(){var e=this,t=this.state,s=t.rule,n=t.haveRules?"success":"primary";return Object(S.jsxs)("div",{children:[Object(S.jsx)(j.a,{variant:n,size:"sm",onClick:this.handleShow,children:"BreakPoint"}),Object(S.jsxs)(O.a,{show:this.state.show,onHide:this.handleClose,children:[Object(S.jsx)(O.a.Header,{closeButton:!0,children:Object(S.jsx)(O.a.Title,{children:"Set BreakPoint"})}),Object(S.jsxs)(O.a.Body,{children:[Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"Method"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsxs)(p.a.Control,{as:"select",value:s.method,onChange:function(t){e.setState({rule:Object(y.a)(Object(y.a)({},s),{},{method:t.target.value})})},children:[Object(S.jsx)("option",{children:"ALL"}),Object(S.jsx)("option",{children:"GET"}),Object(S.jsx)("option",{children:"POST"}),Object(S.jsx)("option",{children:"PUT"}),Object(S.jsx)("option",{children:"DELETE"})]})})]}),Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"URL"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsx)(p.a.Control,{value:s.url,onChange:function(t){e.setState({rule:Object(y.a)(Object(y.a)({},s),{},{url:t.target.value})})}})})]}),Object(S.jsxs)(p.a.Group,{as:w.a,children:[Object(S.jsx)(p.a.Label,{column:!0,sm:2,children:"Action"}),Object(S.jsx)(x.a,{sm:10,children:Object(S.jsxs)(p.a.Control,{as:"select",value:s.action,onChange:function(t){e.setState({rule:Object(y.a)(Object(y.a)({},s),{},{action:parseInt(t.target.value)})})},children:[Object(S.jsx)("option",{value:"1",children:"Request"}),Object(S.jsx)("option",{value:"2",children:"Response"}),Object(S.jsx)("option",{value:"3",children:"Both"})]})})]})]}),Object(S.jsxs)(O.a.Footer,{children:[Object(S.jsx)(j.a,{variant:"secondary",onClick:this.handleClose,children:"Close"}),Object(S.jsx)(j.a,{variant:"primary",onClick:this.handleSave,children:"Save"})]})]})]})}}]),s}(r.a.Component),m=function(e){return!!e&&(!!e.header&&(!!e.header["Content-Type"]&&/text|javascript|json|x-www-form-urlencoded|xml|form-data/.test(e.header["Content-Type"].join(""))))},g=function(e){return e?isNaN(e)||e<=0?"0":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB"):"0"},E=function(e){for(var t="",s=new Uint8Array(e),n=s.byteLength,i=0;i<n;i++)t+=String.fromCharCode(s[i]);return btoa(t)},T=function(e){var t="",s=new Uint8Array(e),n=s.byteLength;t+="00000000: ";for(var i=0;i<n;i++)t+=s[i].toString(16).padStart(2,"0")+" ",(i+1)%16===0?t+="\n".concat((i+1).toString(16).padStart(8,"0"),": "):(i+1)%8===0&&(t+=" ");return t},B=function(e){Object(h.a)(s,e);var t=Object(d.a)(s);function s(){return Object(c.a)(this,s),t.apply(this,arguments)}return Object(l.a)(s,[{key:"shouldComponentUpdate",value:function(e){return e.isSelected!==this.props.isSelected||!function(e,t){if(e===t)return!0;var s=Object.keys(e),n=Object.keys(t);if(s.length!==n.length)return!1;for(var i=0;i<s.length;i++){var r=s[i];if(void 0===t[r]||e[r]!==t[r])return!1}return!0}(e.flow,this.props.flo
|
||
|
//# sourceMappingURL=main.f92efe67.chunk.js.map
|