-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.5b280939d40b88b123be.js
1 lines (1 loc) · 33.5 KB
/
main.5b280939d40b88b123be.js
1
!function(e){function t(t){for(var n,l,u=t[0],i=t[1],p=t[2],c=0,_=[];c<u.length;c++)l=u[c],a[l]&&_.push(a[l][0]),a[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(s&&s(t);_.length;)_.shift()();return o.push.apply(o,p||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,u=1;u<r.length;u++){var i=r[u];0!==a[i]&&(n=!1)}n&&(o.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},a={0:0},o=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/";var u=window.webpackJsonp=window.webpackJsonp||[],i=u.push.bind(u);u.push=t,u=u.slice();for(var p=0;p<u.length;p++)t(u[p]);var s=i;o.push([31,1]),r()}([,,,,,,,,,,,function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(55));!function(){var t=r(2).enterModule;t&&t(e)}();var a="http://ineedtpformybonghole.online/ineedtpapi",o=function(e){var t=e.id,r=e.name,n=e.message,a=e.location,o=e.createdAt,l=e.fullfilledAt,u=e.img_url;return{id:t,name:r,message:n,location:a,createdAt:new Date(1e3*o),fullfilledAt:l?new Date(1e3*l):null,img_url:u}},l=function(e){return null==e?[]:e.map(o)},u=function(){return n.default.get(a+"/getTPRequests").then(function(e){var t=e.data.response;return l(t)})},i=function(){return n.default.get(a+"/getTPRequests?fullfilled=1").then(function(e){var t=e.data.response;return l(t)})},p=function(e){return n.default.get(a+"/getDetail?id="+e).then(function(e){var t=e.data.response;return o(t)})},s=function(e){return n.default.post(a+"/createTPRequest",e,{headers:{"content-type":"application/json"}})},c=function(e){return n.default.post(a+"/upload",e,{})},_={getUnfullfilledTPRequests:u,getFullfilledTPRequests:i,fullfillTPRequest:c,createTPRequest:s,getDetail:p};t.default=_,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(a,"API_ENDPOINT","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(o,"parseTPObject","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(l,"parseTPObjects","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(u,"getUnfullfilledTPRequests","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(i,"getFullfilledTPRequests","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(p,"getDetail","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(s,"createTPRequest","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(c,"fullfillTPRequest","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),t.register(_,"default","/Users/philipp/node/dev/tp-app/src/app/api/index.js"),n(e))}()}).call(this,r(5)(e))},,,,function(module,exports,__webpack_require__){"use strict";(function(module){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=__webpack_require__(1),React=_interopRequireWildcard(_react),_reactRouterDom=__webpack_require__(9),_kittenLogo=__webpack_require__(51),_kittenLogo2=_interopRequireDefault(_kittenLogo);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 _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)}__webpack_require__(52),function(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var SiteWrapper=function(_React$Component){function SiteWrapper(){return _classCallCheck(this,SiteWrapper),_possibleConstructorReturn(this,(SiteWrapper.__proto__||Object.getPrototypeOf(SiteWrapper)).apply(this,arguments))}return _inherits(SiteWrapper,_React$Component),_createClass(SiteWrapper,[{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("nav",{className:"sitewrapper-navbar-container"},React.createElement(_reactRouterDom.Link,{className:"sitewrapper-navbar-container-logo",to:"/"},React.createElement("img",{src:_kittenLogo2.default})," I need TP FOR MY BONGHOLE!"),React.createElement(_reactRouterDom.Link,{className:"sitewrapper-navbar-container-newTPRequestButton",role:"button",to:"/urgently-need-tp"},"Urgently need TP!")),React.createElement("main",{className:"sitewrapper-main"},this.props.children))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SiteWrapper}(React.Component),_default=SiteWrapper;exports.default=_default,function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(SiteWrapper,"SiteWrapper","/Users/philipp/node/dev/tp-app/src/app/pages/SiteWrapper.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/pages/SiteWrapper.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},,function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.Page=t.Loading=t.Input=t.Button=void 0;var n=u(r(78)),a=u(r(81)),o=u(r(84)),l=u(r(85));function u(e){return e&&e.__esModule?e:{default:e}}!function(){var t=r(2).enterModule;t&&t(e)}();var i=t.Button=n.default,p=t.Input=a.default,s=t.Loading=o.default,c=t.Page=l.default;!function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(i,"Button","/Users/philipp/node/dev/tp-app/src/app/pages/components/index.js"),t.register(p,"Input","/Users/philipp/node/dev/tp-app/src/app/pages/components/index.js"),t.register(s,"Loading","/Users/philipp/node/dev/tp-app/src/app/pages/components/index.js"),t.register(c,"Page","/Users/philipp/node/dev/tp-app/src/app/pages/components/index.js"),n(e))}()}).call(this,r(5)(e))},,,,,,,,,,,,,,function(e,t,r){"use strict";(function(e){var t=o(r(32)),n=o(r(1)),a=o(r(41));function o(e){return e&&e.__esModule?e:{default:e}}!function(){var t=r(2).enterModule;t&&t(e)}();var l=document.getElementById("app");if(!l)throw Error("'Cannot find mount point with id=app");t.default.render(n.default.createElement(a.default,null),l),function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register("app","MOUNT_POINT_ID","/Users/philipp/node/dev/tp-app/src/app/index.js"),t.register(l,"mountPoint","/Users/philipp/node/dev/tp-app/src/app/index.js"),n(e))}()}).call(this,r(5)(e))},,,,,,,,,,function(module,exports,__webpack_require__){"use strict";(function(module){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}}();__webpack_require__(42),__webpack_require__(44);var _react=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(9),_tpForMyBonghole=__webpack_require__(49),_tpForMyBonghole2=_interopRequireDefault(_tpForMyBonghole),_HomePage=__webpack_require__(50),_HomePage2=_interopRequireDefault(_HomePage),_TPDetails=__webpack_require__(77),_TPDetails2=_interopRequireDefault(_TPDetails),_RequestTP=__webpack_require__(99),_RequestTP2=_interopRequireDefault(_RequestTP),_=__webpack_require__(102),_2=_interopRequireDefault(_);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(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var Main=function(_Component){function Main(){return _classCallCheck(this,Main),_possibleConstructorReturn(this,(Main.__proto__||Object.getPrototypeOf(Main)).call(this))}return _inherits(Main,_Component),_createClass(Main,[{key:"render",value:function(){return _react2.default.createElement(_reactRouterDom.BrowserRouter,null,_react2.default.createElement("div",null,_react2.default.createElement("video",{className:"homepage-background-video",controls:!0,loop:!0,autoPlay:!0,src:_tpForMyBonghole2.default,width:"100%",height:"100%"},"Sorry, your browser doesn't support embedded videos."),_react2.default.createElement(_reactRouterDom.Switch,null,_react2.default.createElement(_reactRouterDom.Route,{exact:!0,path:"/",component:_HomePage2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/urgently-need-tp",component:_RequestTP2.default}),_react2.default.createElement(_reactRouterDom.Route,{path:"/tp/:tpId",component:_TPDetails2.default}),_react2.default.createElement(_reactRouterDom.Route,{component:_2.default}))))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Main}(_react.Component),_default=Main;exports.default=_default,function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(Main,"Main","/Users/philipp/node/dev/tp-app/src/app/App.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/App.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},function(e,t,r){},,function(e,t,r){},,,,,function(e,t,r){e.exports=r.p+"99b41222a6e2fbe95a789f58e319b014.mp4"},function(module,exports,__webpack_require__){"use strict";(function(module){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=__webpack_require__(1),_react2=_interopRequireDefault(_react),_SiteWrapper=__webpack_require__(15),_SiteWrapper2=_interopRequireDefault(_SiteWrapper),_reactRouterDom=__webpack_require__(9),_api=__webpack_require__(11),_api2=_interopRequireDefault(_api);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)}__webpack_require__(75),function(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var HomePage=function(_Component){function HomePage(){_classCallCheck(this,HomePage);var e=_possibleConstructorReturn(this,(HomePage.__proto__||Object.getPrototypeOf(HomePage)).call(this));return e.pollData=function(){_api2.default.getUnfullfilledTPRequests().then(function(t){e.setState({unfullfilled:t})}),_api2.default.getFullfilledTPRequests().then(function(t){e.setState({fullfilled:t})})},e.state={unfullfilled:[],fullfilled:[]},e}return _inherits(HomePage,_Component),_createClass(HomePage,[{key:"componentDidMount",value:function(){var e=this;this.pollData(),this.pollID=setInterval(function(){return e.pollData()},5e3)}},{key:"componentWillUnmount",value:function(){clearInterval(this.pollID)}},{key:"render",value:function(){var e=this.state,t=e.unfullfilled,r=e.fullfilled;return _react2.default.createElement(_SiteWrapper2.default,null,_react2.default.createElement("div",{className:"homepage-main-container"},_react2.default.createElement("h2",null,"TP NEEDED NAOW!"),_react2.default.createElement(TPRequests,{tps:t}),_react2.default.createElement("h2",null,"TP NEED IS SATISFIED!"),_react2.default.createElement(TPRequests,{tps:r})))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),HomePage}(_react.Component),_default=HomePage;exports.default=_default;var TPRequests=function(e){var t=e.tps.map(function(e){return _react2.default.createElement(TPRequest,{key:e.id,tp:e})});return _react2.default.createElement("div",{className:"homepage-tprequests-container"},t)},TPRequest=function(e){var t=e.tp;return _react2.default.createElement("article",{className:"homepage-tprequest-container"},_react2.default.createElement("h2",null,t.name),_react2.default.createElement("h5",{style:{fontWeight:"normal",marginTop:"-12px"}},"from ",t.location),_react2.default.createElement("p",{style:{color:"orange"}},t.message),_react2.default.createElement(_reactRouterDom.Link,{to:"/tp/"+t.id},"Detail"))};!function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(HomePage,"HomePage","/Users/philipp/node/dev/tp-app/src/app/pages/HomePage/index.js"),e.register(TPRequests,"TPRequests","/Users/philipp/node/dev/tp-app/src/app/pages/HomePage/index.js"),e.register(TPRequest,"TPRequest","/Users/philipp/node/dev/tp-app/src/app/pages/HomePage/index.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/pages/HomePage/index.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},function(e,t,r){e.exports=r.p+"63a12906e75abe101080b756cf6397da.jpg"},function(e,t,r){},,,,,,,,,,,,,,,,,,,,,,,function(e,t,r){},,function(module,exports,__webpack_require__){"use strict";(function(module){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=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(9),_SiteWrapper=__webpack_require__(15),_SiteWrapper2=_interopRequireDefault(_SiteWrapper),_components=__webpack_require__(17),_unfullfilled=__webpack_require__(88),_unfullfilled2=_interopRequireDefault(_unfullfilled),_api=__webpack_require__(11),_api2=_interopRequireDefault(_api),_Unfullfilled=__webpack_require__(89),_Unfullfilled2=_interopRequireDefault(_Unfullfilled),_Fullfilled=__webpack_require__(94),_Fullfilled2=_interopRequireDefault(_Fullfilled);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)}__webpack_require__(97),function(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var RequestTP=function(_Component){function RequestTP(){_classCallCheck(this,RequestTP);var e=_possibleConstructorReturn(this,(RequestTP.__proto__||Object.getPrototypeOf(RequestTP)).call(this));return e.refreshData=function(){var t=e.props.match.params.tpId;_api2.default.getDetail(t).then(function(t){e.setState({loading:!1,tp:t})})},e.state={loading:!0,tp:null},e}return _inherits(RequestTP,_Component),_createClass(RequestTP,[{key:"componentDidMount",value:function(){this.refreshData()}},{key:"render",value:function(){var e=this,t=this.state,r=t.tp;if(t.loading||null==r)return _react2.default.createElement(_components.Loading,null);var n=null!=r.fullfilledAt,a=n?"http://"+r.img_url:_unfullfilled2.default,o=n?_react2.default.createElement(HeaderFullFilled,{tp:r}):_react2.default.createElement(HeaderUnfullFilled,{tp:r});return _react2.default.createElement(_SiteWrapper2.default,null,_react2.default.createElement(_components.Page,null,_react2.default.createElement("div",null,_react2.default.createElement("img",{style:{maxWidth:"100%"},src:a})),o,_react2.default.createElement(_Unfullfilled2.default,{tp:r,onSubmitting:function(){e.setState({loading:!0})},onSubmitted:function(){return e.refreshData()}}),_react2.default.createElement(_Fullfilled2.default,{tp:r})))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),RequestTP}(_react.Component),HeaderUnfullFilled=function(e){var t=e.tp;return _react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement("h1",null,"Help ",t.name," to find TP!"),_react2.default.createElement("h5",null,"Message from ",t.name,":"),_react2.default.createElement("p",{style:{border:"2px dashed blue",borderRadius:"5px",padding:"15px"}},t.message),_react2.default.createElement("p",null,"This request is open for"," ",renderTime(Date.now()-t.createdAt.getTime()),"!"))},HeaderFullFilled=function(e){var t=e.tp;return _react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement("h2",null,t.name," is so happy since"," ",renderTime(Date.now()-t.fullfilledAt.getTime()),"!"))},renderTime=function(e){var t=Math.floor(e/1e3/60/60),r=1e3*t*60*60,n=Math.floor((e-r)/1e3/60),a=1e3*n*60,o=Math.floor((e-a-r)/1e3);return 0!==t?t+" hours and "+n+" minutes":0===n&&0===o?"now":0===n?o+" seconds":n+" minutes and "+o+" seconds"},_default=(0,_reactRouterDom.withRouter)(RequestTP);exports.default=_default,function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(RequestTP,"RequestTP","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/index.js"),e.register(HeaderUnfullFilled,"HeaderUnfullFilled","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/index.js"),e.register(HeaderFullFilled,"HeaderFullFilled","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/index.js"),e.register(renderTime,"renderTime","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/index.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/index.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=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},a=function(e){return e&&e.__esModule?e:{default:e}}(r(1));r(79),function(){var t=r(2).enterModule;t&&t(e)}();var o=function(e){var t=e.children,r=function(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}(e,["children"]);return a.default.createElement("button",n({className:"components-button"},r),t)};t.default=o,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(o,"default","/Users/philipp/node/dev/tp-app/src/app/pages/components/Button.js"),n(e))}()}).call(this,r(5)(e))},function(e,t,r){},,function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));r(82),function(){var t=r(2).enterModule;t&&t(e)}();var a=function(e){var t=e.name,r=e.value,a=e.type,l=e.label,u=e.onChange,i=e.error;return n.default.createElement("div",{className:"components-textinput-container"},n.default.createElement("label",{className:"components-textinput-label"},l),n.default.createElement("br",null),n.default.createElement("input",{className:"components-textinput-input",name:t,type:a||"text",value:r,onChange:u}),n.default.createElement(o,{error:i}))};t.default=a;var o=function(e){var t=e.error;return null==t?null:n.default.createElement("p",{className:"components-textinput-error"},t)};!function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(o,"TextInputError","/Users/philipp/node/dev/tp-app/src/app/pages/components/Input.js"),t.register(a,"default","/Users/philipp/node/dev/tp-app/src/app/pages/components/Input.js"),n(e))}()}).call(this,r(5)(e))},function(e,t,r){},,function(module,exports,__webpack_require__){"use strict";(function(module){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=__webpack_require__(1),_react2=_interopRequireDefault(_react);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(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var Loading=function(_Component){function Loading(){return _classCallCheck(this,Loading),_possibleConstructorReturn(this,(Loading.__proto__||Object.getPrototypeOf(Loading)).apply(this,arguments))}return _inherits(Loading,_Component),_createClass(Loading,[{key:"render",value:function(){return _react2.default.createElement("div",{style:{display:"inline-block"}},_react2.default.createElement("h1",null,"Loading..."))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Loading}(_react.Component),_default=Loading;exports.default=_default,function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(Loading,"Loading","/Users/philipp/node/dev/tp-app/src/app/pages/components/Loading.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/pages/components/Loading.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));r(86),function(){var t=r(2).enterModule;t&&t(e)}();var a=function(e){var t=e.children;return n.default.createElement("div",{className:"components-page"},t)};t.default=a,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(a,"default","/Users/philipp/node/dev/tp-app/src/app/pages/components/Page.js"),n(e))}()}).call(this,r(5)(e))},function(e,t,r){},,function(e,t,r){e.exports=r.p+"7ca2a081e4f1e6fb273d187eda78d17d.jpg"},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=u(r(1)),a=r(17),o=(u(r(90)),u(r(11))),l=r(29);function u(e){return e&&e.__esModule?e:{default:e}}!function(){var t=r(2).enterModule;t&&t(e)}();var i=function(e){var t=e.tp,r=e.onSubmitted,u=e.onSubmitting;if(null!=t.fullfilledAt)return null;var i=t.id;return n.default.createElement(n.default.Fragment,null,n.default.createElement("h3",null,"Provide Toiletpaper"),n.default.createElement(l.Formik,{enableReinitialize:!0,initialValues:{message:"",file:null},isInitialValid:!0,validate:function(e){var t={};return""===e.message&&(t.message="No message? :'-("),t},onSubmit:function(e){e.name;var t=e.message,n=e.file;u();var a=new FormData;return a.append("file",n),a.append("message",t),a.append("id",i+""),o.default.fullfillTPRequest(a).then(function(){return r()}).catch(function(e){alert(e),r()})},render:function(e){var t=e.values,r=e.errors,o=e.handleChange,l=e.handleSubmit,u=e.isSubmitting,i=e.setFieldValue;return n.default.createElement("form",{className:"form",onSubmit:function(e){if(e.preventDefault(),!u)return l(e)}},n.default.createElement(a.Input,{value:t.message,onChange:o,label:"Message",name:"message",error:r.message}),n.default.createElement(a.Input,{type:"file",label:"Toiletpaper",name:"file",error:null,onChange:function(e){return i("file",e.currentTarget.files[0])}}),n.default.createElement(a.Button,{type:"submit"},"Submit"))}}))};t.default=i,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(i,"default","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/components/Unfullfilled.js"),n(e))}()}).call(this,r(5)(e))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=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}}();!function(){var t=r(2).enterModule;t&&t(e)}();var a="undefined"!=typeof Blob&&function(){try{return Boolean(new Blob)}catch(e){return!1}}(),o=a&&"undefined"!=typeof Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(e){return!1}}(),l="undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype.toBlob,u=l||"undefined"!=typeof Uint8Array&&"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof atob,i="undefined"!=typeof FileReader||"undefined"!=typeof URL,p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"resize",value:function(t,r,n){"function"==typeof r&&(n=r,r={width:640,height:480});r.width,r.height;if(!e.isSupported()||!t.type.match(/image.*/))return n(t,!1),!1;if(t.type.match(/image\/gif/))return n(t,!1),!1;var a=document.createElement("img");return a.onload=function(o){var u=a.width,i=a.height,p=!1;if(u>=i&&u>r.width?(i*=r.width/u,u=r.width,p=!0):i>r.height&&(u*=r.height/i,i=r.height,p=!0),p){var s=document.createElement("canvas");if(s.width=u,s.height=i,s.getContext("2d").drawImage(a,0,0,u,i),l)s.toBlob(function(e){n(e,!0)},t.type);else{var c=e._toBlob(s,t.type);n(c,!0)}}else n(t,!1)},e._loadImage(a,t),!0}},{key:"_toBlob",value:function(e,t){var r=e.toDataURL(t).split(","),n=void 0;n=r[0].indexOf("base64")>=0?atob(r[1]):decodeURIComponent(r[1]);for(var l=new ArrayBuffer(n.length),u=new Uint8Array(l),i=0;i<n.length;i+=1)u[i]=n.charCodeAt(i);var p=r[0].split(":")[1].split(";")[0],s=null;if(a)s=new Blob([o?u:l],{type:p});else{var c=new BlobBuilder;c.append(l),s=c.getBlob(p)}return s}},{key:"_loadImage",value:function(e,t,r){if("undefined"==typeof URL){var n=new FileReader;n.onload=function(t){e.src=t.target.result,r&&r()},n.readAsDataURL(t)}else e.src=URL.createObjectURL(t),r&&r()}},{key:"isSupported",value:function(){return"undefined"!=typeof HTMLCanvasElement&&u&&i}}]),e}(),s=p;t.default=s,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(a,"hasBlobConstructor","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(o,"hasArrayBufferViewSupport","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(l,"hasToBlobSupport","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(u,"hasBlobSupport","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(i,"hasReaderSupport","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(p,"ImageTools","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),t.register(s,"default","/Users/philipp/node/dev/tp-app/src/app/pages/components/ImageTools.js"),n(e))}()}).call(this,r(5)(e))},,,,function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));r(95),function(){var t=r(2).enterModule;t&&t(e)}();var a=function(e){var t=e.tp;if(null==t.fullfilledAt)return null;var r=t.message;return n.default.createElement("div",null,n.default.createElement("h3",null,"Message from the generous passerby"),n.default.createElement("p",{className:"tpdetails-components-message"},r))};t.default=a,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(a,"default","/Users/philipp/node/dev/tp-app/src/app/pages/TPDetails/components/Fullfilled.js"),n(e))}()}).call(this,r(5)(e))},function(e,t,r){},,function(e,t,r){},,function(module,exports,__webpack_require__){"use strict";(function(module){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=__webpack_require__(1),_react2=_interopRequireDefault(_react),_reactRouterDom=__webpack_require__(9),_SiteWrapper=__webpack_require__(15),_SiteWrapper2=_interopRequireDefault(_SiteWrapper),_components=__webpack_require__(17),_api=__webpack_require__(11),_api2=_interopRequireDefault(_api),_formik=__webpack_require__(29);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)}__webpack_require__(100),function(){var e=__webpack_require__(2).enterModule;e&&e(module)}();var RequestTP=function(_Component){function RequestTP(){return _classCallCheck(this,RequestTP),_possibleConstructorReturn(this,(RequestTP.__proto__||Object.getPrototypeOf(RequestTP)).call(this))}return _inherits(RequestTP,_Component),_createClass(RequestTP,[{key:"render",value:function(){var e=this;return _react2.default.createElement(_SiteWrapper2.default,null,_react2.default.createElement(_components.Page,null,_react2.default.createElement("h1",null,"Urgently in need?"),_react2.default.createElement("h3",null,"Get relief asap!"),_react2.default.createElement(_formik.Formik,{enableReinitialize:!0,initialValues:{name:"",message:""},isInitialValid:!0,validate:function(e){var t=e.name,r=e.message,n={};return""===t&&(n.name="Fill in a name"),""===r&&(n.message="No message? :'-("),n},onSubmit:function(t){var r=t.name,n=t.message;return _api2.default.createTPRequest({name:r,message:n}).then(function(){e.props.history.push("/")}).catch(function(e){return alert(e)})},render:function(e){var t=e.values,r=e.errors,n=e.handleChange,a=e.handleSubmit,o=e.isSubmitting;return _react2.default.createElement("form",{onSubmit:function(e){if(e.preventDefault(),!o)return a(e)}},_react2.default.createElement(_components.Input,{value:t.name,onChange:n,label:"Name",name:"name",error:r.name}),_react2.default.createElement(_components.Input,{value:t.message,onChange:n,label:"Message",name:"message",error:r.message}),_react2.default.createElement(_components.Button,{type:"submit"},"I need TP!"))}})))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),RequestTP}(_react.Component),_default=(0,_reactRouterDom.withRouter)(RequestTP);exports.default=_default,function(){var e=__webpack_require__(2).default,t=__webpack_require__(2).leaveModule;e&&(e.register(RequestTP,"RequestTP","/Users/philipp/node/dev/tp-app/src/app/pages/RequestTP/index.js"),e.register(_default,"default","/Users/philipp/node/dev/tp-app/src/app/pages/RequestTP/index.js"),t(module))}()}).call(this,__webpack_require__(5)(module))},function(e,t,r){},,function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.__esModule?e:{default:e}}(r(1));!function(){var t=r(2).enterModule;t&&t(e)}();var a=function(){return n.default.createElement("section",null,"No TP FOR YOU!")};t.default=a,function(){var t=r(2).default,n=r(2).leaveModule;t&&(t.register(a,"default","/Users/philipp/node/dev/tp-app/src/app/pages/404/index.js"),n(e))}()}).call(this,r(5)(e))}]);