This repository was archived by the owner on Jan 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle.js
More file actions
26 lines (26 loc) · 85.6 KB
/
bundle.js
File metadata and controls
26 lines (26 loc) · 85.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=29)}([function(e,t){e.exports=React},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONFIG={production:!0},function(e){e.ABOUT="ABOUT",e.CTF="CTF",e.ADMIN="ADMIN"}(t.NavPage||(t.NavPage={})),function(e){e[e.INCORRECT=0]="INCORRECT",e[e.CORRECT=1]="CORRECT",e[e.ALREADY_SOLVED=2]="ALREADY_SOLVED"}(t.SubmissionStatus||(t.SubmissionStatus={})),function(e){e.ERROR="error",e.INFO="info"}(t.PopupLevel||(t.PopupLevel={})),function(e){e.TOP_BAR="TOP_BAR",e.SIGNUP="SIGNUP",e.CHALLENGE_TILE="CHALLENGE_TILE"}(t.PopupLocation||(t.PopupLocation={})),function(e){e.REGISTER="register-modal",e.ADMIN_CHALLENGE="admin-challenge-modal"}(t.ModalID||(t.ModalID={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(12),r=n(51);t.store=o.createStore(r.default),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(52))},function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),a=n(5),l=n.n(a),s=r.a.createContext(null);var i=function(e){e()},u=function(){return i},c=null,d={notify:function(){}};var p=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=d,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){var e,t,n;this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=(e=u(),t=[],n=[],{clear:function(){n=c,t=c},notify:function(){var o=t=n;e((function(){for(var e=0;e<o.length;e++)o[e]()}))},get:function(){return n},subscribe:function(e){var o=!0;return n===t&&(n=t.slice()),n.push(e),function(){o&&t!==c&&(o=!1,n===t&&(n=t.slice()),n.splice(n.indexOf(e),1))}}}))},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=d)},e}();function f(e){var t=e.store,n=e.context,a=e.children,l=Object(o.useMemo)((function(){var e=new p(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),i=Object(o.useMemo)((function(){return t.getState()}),[t]);Object(o.useEffect)((function(){var e=l.subscription;return e.trySubscribe(),i!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[l,i]);var u=n||s;return r.a.createElement(u.Provider,{value:l},a)}f.propTypes={store:l.a.shape({subscribe:l.a.func.isRequired,dispatch:l.a.func.isRequired,getState:l.a.func.isRequired}),context:l.a.object,children:l.a.any};var h=f;function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function g(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}var v=n(16),y=n.n(v),b=n(6),E=n.n(b),C=n(15),_="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?o.useLayoutEffect:o.useEffect,O=[],w=[null,null];function P(e,t){var n=e[1];return[t.payload,n+1]}var S=function(){return[null,0]};function N(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,l=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,i=n.methodName,u=void 0===i?"connectAdvanced":i,c=n.renderCountProp,d=void 0===c?void 0:c,f=n.shouldHandleStateChanges,h=void 0===f||f,v=n.storeKey,b=void 0===v?"store":v,N=n.withRef,T=void 0!==N&&N,M=n.forwardRef,A=void 0!==M&&M,j=n.context,R=void 0===j?s:j,x=g(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]);E()(void 0===d,"renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension"),E()(!T,"withRef is removed. To access the wrapped instance, use a ref on the connected component");E()("store"===b,"storeKey has been removed and does not do anything. To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect");var L=R;return function(t){var n=t.displayName||t.name||"Component",a=l(n),s=m({},x,{getDisplayName:l,methodName:u,renderCountProp:d,shouldHandleStateChanges:h,storeKey:b,displayName:a,wrappedComponentName:n,WrappedComponent:t}),i=x.pure;var c=i?o.useMemo:function(e){return e()};function f(n){var l=Object(o.useMemo)((function(){var e=n.forwardedRef,t=g(n,["forwardedRef"]);return[n.context,e,t]}),[n]),i=l[0],u=l[1],d=l[2],f=Object(o.useMemo)((function(){return i&&i.Consumer&&Object(C.isContextConsumer)(r.a.createElement(i.Consumer,null))?i:L}),[i,L]),v=Object(o.useContext)(f),y=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),b=Boolean(v)&&Boolean(v.store);E()(y||b,'Could not find "store" in the context of "'+a+'". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to '+a+" in connect options.");var N=y?n.store:v.store,T=Object(o.useMemo)((function(){return function(t){return e(t.dispatch,s)}(N)}),[N]),M=Object(o.useMemo)((function(){if(!h)return w;var e=new p(N,y?null:v.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[N,y,v]),A=M[0],j=M[1],R=Object(o.useMemo)((function(){return y?v:m({},v,{subscription:A})}),[y,v,A]),x=Object(o.useReducer)(P,O,S),F=x[0][0],D=x[1];if(F&&F.error)throw F.error;var I=Object(o.useRef)(),k=Object(o.useRef)(d),U=Object(o.useRef)(),H=Object(o.useRef)(!1),B=c((function(){return U.current&&d===k.current?U.current:T(N.getState(),d)}),[N,F,d]);_((function(){k.current=d,I.current=B,H.current=!1,U.current&&(U.current=null,j())})),_((function(){if(h){var e=!1,t=null,n=function(){if(!e){var n,o,r=N.getState();try{n=T(r,k.current)}catch(e){o=e,t=e}o||(t=null),n===I.current?H.current||j():(I.current=n,U.current=n,H.current=!0,D({type:"STORE_UPDATED",payload:{error:o}}))}};A.onStateChange=n,A.trySubscribe(),n();return function(){if(e=!0,A.tryUnsubscribe(),A.onStateChange=null,t)throw t}}}),[N,A,T]);var W=Object(o.useMemo)((function(){return r.a.createElement(t,m({},B,{ref:u}))}),[u,t,B]);return Object(o.useMemo)((function(){return h?r.a.createElement(f.Provider,{value:R},W):W}),[f,W,R])}var v=i?r.a.memo(f):f;if(v.WrappedComponent=t,v.displayName=a,A){var N=r.a.forwardRef((function(e,t){return r.a.createElement(v,m({},e,{forwardedRef:t}))}));return N.displayName=a,N.WrappedComponent=t,y()(N,t)}return y()(v,t)}}var T=Object.prototype.hasOwnProperty;function M(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function A(e,t){if(M(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var r=0;r<n.length;r++)if(!T.call(t,n[r])||!M(e[n[r]],t[n[r]]))return!1;return!0}var j=n(12);function R(e){return function(t,n){var o=e(t,n);function r(){return o}return r.dependsOnOwnProps=!1,r}}function x(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function L(e,t){return function(t,n){n.displayName;var o=function(e,t){return o.dependsOnOwnProps?o.mapToProps(e,t):o.mapToProps(e)};return o.dependsOnOwnProps=!0,o.mapToProps=function(t,n){o.mapToProps=e,o.dependsOnOwnProps=x(e);var r=o(t,n);return"function"==typeof r&&(o.mapToProps=r,o.dependsOnOwnProps=x(r),r=o(t,n)),r},o}}var F=[function(e){return"function"==typeof e?L(e):void 0},function(e){return e?void 0:R((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?R((function(t){return Object(j.bindActionCreators)(e,t)})):void 0}];var D=[function(e){return"function"==typeof e?L(e):void 0},function(e){return e?void 0:R((function(){return{}}))}];function I(e,t,n){return m({},n,{},e,{},t)}var k=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var o,r=n.pure,a=n.areMergedPropsEqual,l=!1;return function(t,n,s){var i=e(t,n,s);return l?r&&a(i,o)||(o=i):(l=!0,o=i),o}}}(e):void 0},function(e){return e?void 0:function(){return I}}];function U(e,t,n,o){return function(r,a){return n(e(r,a),t(o,a),a)}}function H(e,t,n,o,r){var a,l,s,i,u,c=r.areStatesEqual,d=r.areOwnPropsEqual,p=r.areStatePropsEqual,f=!1;function h(r,f){var h,m,g=!d(f,l),v=!c(r,a);return a=r,l=f,g&&v?(s=e(a,l),t.dependsOnOwnProps&&(i=t(o,l)),u=n(s,i,l)):g?(e.dependsOnOwnProps&&(s=e(a,l)),t.dependsOnOwnProps&&(i=t(o,l)),u=n(s,i,l)):v?(h=e(a,l),m=!p(h,s),s=h,m&&(u=n(s,i,l)),u):u}return function(r,c){return f?h(r,c):(s=e(a=r,l=c),i=t(o,l),u=n(s,i,l),f=!0,u)}}function B(e,t){var n=t.initMapStateToProps,o=t.initMapDispatchToProps,r=t.initMergeProps,a=g(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),l=n(e,a),s=o(e,a),i=r(e,a);return(a.pure?H:U)(l,s,i,e,a)}function W(e,t,n){for(var o=t.length-1;o>=0;o--){var r=t[o](e);if(r)return r}return function(t,o){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+o.wrappedComponentName+".")}}function q(e,t){return e===t}var G,K,$,V,Y,Q,z,X,J,Z,ee,te,ne=($=(K=void 0===G?{}:G).connectHOC,V=void 0===$?N:$,Y=K.mapStateToPropsFactories,Q=void 0===Y?D:Y,z=K.mapDispatchToPropsFactories,X=void 0===z?F:z,J=K.mergePropsFactories,Z=void 0===J?k:J,ee=K.selectorFactory,te=void 0===ee?B:ee,function(e,t,n,o){void 0===o&&(o={});var r=o,a=r.pure,l=void 0===a||a,s=r.areStatesEqual,i=void 0===s?q:s,u=r.areOwnPropsEqual,c=void 0===u?A:u,d=r.areStatePropsEqual,p=void 0===d?A:d,f=r.areMergedPropsEqual,h=void 0===f?A:f,v=g(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),y=W(e,Q,"mapStateToProps"),b=W(t,X,"mapDispatchToProps"),E=W(n,Z,"mergeProps");return V(te,m({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:y,initMapDispatchToProps:b,initMergeProps:E,pure:l,areStatesEqual:i,areOwnPropsEqual:c,areStatePropsEqual:p,areMergedPropsEqual:h},v))});function oe(){var e=Object(o.useContext)(s);return E()(e,"could not find react-redux context value; please ensure the component is wrapped in a <Provider>"),e}function re(e){void 0===e&&(e=s);var t=e===s?oe:function(){return Object(o.useContext)(e)};return function(){return t().store}}var ae=re();function le(e){void 0===e&&(e=s);var t=e===s?ae:re(e);return function(){return t().dispatch}}var se=le(),ie=function(e,t){return e===t};function ue(e){void 0===e&&(e=s);var t=e===s?oe:function(){return Object(o.useContext)(e)};return function(e,n){void 0===n&&(n=ie),E()(e,"You must pass a selector to useSelectors");var r=t();return function(e,t,n,r){var a,l=Object(o.useReducer)((function(e){return e+1}),0)[1],s=Object(o.useMemo)((function(){return new p(n,r)}),[n,r]),i=Object(o.useRef)(),u=Object(o.useRef)(),c=Object(o.useRef)();try{a=e!==u.current||i.current?e(n.getState()):c.current}catch(e){var d="An error occurred while selecting the store state: "+e.message+".";throw i.current&&(d+="\nThe error may be correlated with this previous error:\n"+i.current.stack+"\n\nOriginal stack trace:"),new Error(d)}return _((function(){u.current=e,c.current=a,i.current=void 0})),_((function(){function e(){try{var e=u.current(n.getState());if(t(e,c.current))return;c.current=e}catch(e){i.current=e}l({})}return s.onStateChange=e,s.trySubscribe(),e(),function(){return s.tryUnsubscribe()}}),[n,s]),a}(e,n,r.store,r.subscription)}}var ce,de=ue(),pe=n(11);n.d(t,"Provider",(function(){return h})),n.d(t,"connectAdvanced",(function(){return N})),n.d(t,"ReactReduxContext",(function(){return s})),n.d(t,"connect",(function(){return ne})),n.d(t,"batch",(function(){return pe.unstable_batchedUpdates})),n.d(t,"useDispatch",(function(){return se})),n.d(t,"createDispatchHook",(function(){return le})),n.d(t,"useSelector",(function(){return de})),n.d(t,"createSelectorHook",(function(){return ue})),n.d(t,"useStore",(function(){return ae})),n.d(t,"createStoreHook",(function(){return re})),n.d(t,"shallowEqual",(function(){return A})),ce=pe.unstable_batchedUpdates,i=ce},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(49),r=n(60),a=n(61),l=n(62),s=n(23),i=n(24),u=n(10),c=n(22),d=n(21);t.default={auth:o.default,challenges:r.default,challengesAdmin:a.default,challengeFiles:l.default,config:s.default,csrf:i.default,popup:u.default,reset:c.default,user:d.default}},function(e,t,n){e.exports=n(31)()},function(e,t,n){"use strict";e.exports=function(e,t,n,o,r,a,l,s){if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,r,a,l,s],c=0;(i=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw i.framesToPop=1,i}}},function(e,t,n){var o,r;!function(a,l){"use strict";void 0===(r="function"==typeof(o=function(){var e=function(){},t="undefined",n=typeof window!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),o=["trace","debug","info","warn","error"];function r(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(t,n){for(var r=0;r<o.length;r++){var a=o[r];this[a]=r<t?e:this.methodFactory(a,t,n)}this.log=this.debug}function s(e,n,o){return function(){typeof console!==t&&(l.call(this,n,o),this[e].apply(this,arguments))}}function i(o,l,i){return function(o){return"debug"===o&&(o="log"),typeof console!==t&&("trace"===o&&n?a:void 0!==console[o]?r(console,o):void 0!==console.log?r(console,"log"):e)}(o)||s.apply(this,arguments)}function u(e,n,r){var a,s=this,u="loglevel";function c(){var e;if(typeof window!==t){try{e=window.localStorage[u]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,o=n.indexOf(encodeURIComponent(u)+"=");-1!==o&&(e=/^([^;]+)/.exec(n.slice(o))[1])}catch(e){}return void 0===s.levels[e]&&(e=void 0),e}}e&&(u+=":"+e),s.name=e,s.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},s.methodFactory=r||i,s.getLevel=function(){return a},s.setLevel=function(n,r){if("string"==typeof n&&void 0!==s.levels[n.toUpperCase()]&&(n=s.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=s.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(a=n,!1!==r&&function(e){var n=(o[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[u]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(u)+"="+n+";"}catch(e){}}}(n),l.call(s,n,e),typeof console===t&&n<s.levels.SILENT)return"No console available for logging"},s.setDefaultLevel=function(e){c()||s.setLevel(e,!1)},s.enableAll=function(e){s.setLevel(s.levels.TRACE,e)},s.disableAll=function(e){s.setLevel(s.levels.SILENT,e)};var d=c();null==d&&(d=null==n?"WARN":n),s.setLevel(d,!1)}var c=new u,d={};c.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new u(e,c.getLevel(),c.methodFactory)),t};var p=typeof window!==t?window.log:void 0;return c.noConflict=function(){return typeof window!==t&&window.log===c&&(window.log=p),c},c.getLoggers=function(){return d},c})?o.call(t,n,t,e):o)||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(50),r=n(53),a=n(54),l=n(55),s=n(56),i=n(57),u=n(58),c=n(59);t.default={auth:o.default,challenges:r.default,challengesAdmin:a.default,challengeFiles:l.default,config:s.default,csrf:i.default,reset:u.default,user:c.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(2),r=function(e){return t=>{if(o.store.dispatch(o.finishRequest(e)),500==t.status)throw"internal server error :(";if(204==t.status)return t;const n=t.headers.get("content-type"),r=null!=n&&-1!==n.indexOf("application/json");if(200==t.status){if(r)return t;throw"Server did not return a valid response"}if(400==t.status&&!r)return t;if(r)return t.json().then(e=>{throw e.error?e.error:"Error parsing JSON response"});throw"Server did not return a valid response"}};t.default={get:async function(e){return o.store.dispatch(o.startRequest(e)),fetch(e,{method:"GET",mode:"cors",cache:"no-cache",credentials:"include",headers:{Accept:"application/json","X-CSRFToken":o.store.getState().csrf}}).then(r(e))},post:async function(e,t){return o.store.dispatch(o.startRequest(e)),fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json","X-CSRFToken":o.store.getState().csrf},body:JSON.stringify(t)}).then(r(e))},upload:async function(e,t){o.store.dispatch(o.startRequest(e));var n=new FormData;return n.append("file",t),fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",headers:{"X-CSRFToken":o.store.getState().csrf},body:n}).then(r(e))},deleteHttp:async function(e){return o.store.dispatch(o.startRequest(e)),fetch(e,{method:"DELETE",mode:"cors",cache:"no-cache",credentials:"include",headers:{Accept:"application/json","Content-Type":"application/json","X-CSRFToken":o.store.getState().csrf}}).then(r(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(2),a=n(1);t.default={info:(e,t,n)=>{o.debug('Popping info "%s"',t);const l={level:a.PopupLevel.INFO,text:t,location:e,locationKey:n};r.store.dispatch(r.addPopup(l))},error:(e,t,n)=>{o.debug('Popping error "%s"',t);const l={level:a.PopupLevel.ERROR,text:t,location:e,locationKey:n};r.store.dispatch(r.addPopup(l))},remove:e=>{o.debug("Removing any popups from %s",e),r.store.dispatch(r.removePopup(e))}}},function(e,t){e.exports=ReactDOM},function(e,t,n){"use strict";n.r(t),n.d(t,"__DO_NOT_USE__ActionTypes",(function(){return a})),n.d(t,"applyMiddleware",(function(){return g})),n.d(t,"bindActionCreators",(function(){return d})),n.d(t,"combineReducers",(function(){return u})),n.d(t,"compose",(function(){return m})),n.d(t,"createStore",(function(){return s}));var o=n(17),r=function(){return Math.random().toString(36).substring(7).split("").join(".")},a={INIT:"@@redux/INIT"+r(),REPLACE:"@@redux/REPLACE"+r(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+r()}};function l(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function s(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(s)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,u=t,c=[],d=c,p=!1;function f(){d===c&&(d=c.slice())}function h(){if(p)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return u}function m(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(p)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return f(),d.push(e),function(){if(t){if(p)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,f();var n=d.indexOf(e);d.splice(n,1)}}}function g(e){if(!l(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(p)throw new Error("Reducers may not dispatch actions.");try{p=!0,u=i(u,e)}finally{p=!1}for(var t=c=d,n=0;n<t.length;n++){(0,t[n])()}return e}return g({type:a.INIT}),(r={dispatch:g,subscribe:m,getState:h,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,g({type:a.REPLACE})}})[o.a]=function(){var e,t=m;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(h())}return n(),{unsubscribe:t(n)}}})[o.a]=function(){return this},e},r}function i(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function u(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++){var r=t[o];0,"function"==typeof e[r]&&(n[r]=e[r])}var l,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:a.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:a.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+a.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){l=e}return function(e,t){if(void 0===e&&(e={}),l)throw l;for(var o=!1,r={},a=0;a<s.length;a++){var u=s[a],c=n[u],d=e[u],p=c(d,t);if(void 0===p){var f=i(u,t);throw new Error(f)}r[u]=p,o=o||p!==d}return o?r:e}}function c(e,t){return function(){return t(e.apply(this,arguments))}}function d(e,t){if("function"==typeof e)return c(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var o in e){var r=e[o];"function"==typeof r&&(n[o]=c(r,t))}return n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:n.getState,dispatch:function(){return o.apply(void 0,arguments)}},a=t.map((function(e){return e(r)}));return h({},n,{dispatch:o=m.apply(void 0,a)(n.dispatch)})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=void 0;var o,r=n(37);var a=((o=r)&&o.__esModule?o:{default:o}).default,l=a.canUseDOM?window.HTMLElement:{};t.canUseDOM=a.canUseDOM;t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(1),l=n(2),s=n(64);class i extends o.Component{render(){if(this.props.popup){var e;switch(this.props.popup.level){case a.PopupLevel.INFO:e=s.popupInfo;break;case a.PopupLevel.ERROR:e=s.popupError;break;default:e=""}return o.createElement("div",{className:s.popupContainerVisible},o.createElement("div",{className:e,"data-location":this.props.location,"data-location-key":this.props.locationKey,"data-level":this.props.popup.level},this.props.popup.text))}return o.createElement("div",{className:s.popupContainerInvisible},o.createElement("div",{"data-location":this.props.location,"data-location-key":this.props.locationKey,"data-level":""}))}}const u=r.connect((e,t)=>{const n=e.popups.get(t.location);return n&&t.locationKey===n.locationKey?{popup:n,location:t.location,locationKey:t.locationKey}:{popup:void 0,location:t.location,locationKey:t.locationKey}},e=>({clearPopups:()=>{e(l.clearPopups())}}))(i);t.default=u},function(e,t,n){"use strict";e.exports=n(40)},function(e,t,n){"use strict";var o=n(15),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},l={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function i(e){return o.isMemo(e)?l:s[e.$$typeof]||r}s[o.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,o){if("string"!=typeof n){if(h){var r=f(n);r&&r!==h&&e(t,r,o)}var l=c(n);d&&(l=l.concat(d(n)));for(var s=i(t),m=i(n),g=0;g<l.length;++g){var v=l[g];if(!(a[v]||o&&o[v]||m&&m[v]||s&&s[v])){var y=p(n,v);try{u(t,v,y)}catch(e){}}}}return t}},function(e,t,n){"use strict";(function(e,o){var r,a=n(28);r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:o;var l=Object(a.a)(r);t.a=l}).call(this,n(41),n(42)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(30),a=(o=r)&&o.__esModule?o:{default:o};t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return[].slice.call(e.querySelectorAll("*"),0).filter(l)};
/*!
* Adapted from jQuery UI core
*
* http://jqueryui.com
*
* Copyright 2014 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/ui-core/
*/
var o=/input|select|textarea|button|object/;function r(e){var t=e.offsetWidth<=0&&e.offsetHeight<=0;if(t&&!e.innerHTML)return!0;var n=window.getComputedStyle(e);return t?"visible"!==n.getPropertyValue("overflow")||e.scrollWidth<=0&&e.scrollHeight<=0:"none"==n.getPropertyValue("display")}function a(e,t){var n=e.nodeName.toLowerCase();return(o.test(n)&&!e.disabled||"a"===n&&e.href||t)&&function(e){for(var t=e;t&&t!==document.body;){if(r(t))return!1;t=t.parentNode}return!0}(e)}function l(e){var t=e.getAttribute("tabindex");null===t&&(t=void 0);var n=isNaN(t);return(n||t>=0)&&a(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertNodeList=i,t.setElement=function(e){var t=e;if("string"==typeof t&&l.canUseDOM){var n=document.querySelectorAll(t);i(n,t),t="length"in n?n[0]:n}return s=t||s},t.validateElement=u,t.hide=function(e){u(e)&&(e||s).setAttribute("aria-hidden","true")},t.show=function(e){u(e)&&(e||s).removeAttribute("aria-hidden")},t.documentNotReadyOrSSRTesting=function(){s=null},t.resetForTesting=function(){s=null};var o,r=n(36),a=(o=r)&&o.__esModule?o:{default:o},l=n(13);var s=null;function i(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function u(e){return!(!e&&!s)||((0,a.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),!1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(2);t.default={updateCurrentUser:async function(){return o.info("Updating current user"),r.default.user.getCurrentUser().then(e=>{a.store.dispatch(a.setUser(e))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(23),l=n(24),s=n(10),i=n(2),u=n(1),c=async function(){return o.info("Resetting the application state"),i.store.dispatch(i.reset()),a.default.updateConfig().then(()=>l.default.refreshCsrf()).catch(e=>{s.default.error(u.PopupLocation.TOP_BAR,"Something went wrong while resetting the application: "+e)})};t.default={resetApp:c,resetDatabase:async function(){return o.info("Resetting the application database"),r.default.reset.resetDatabase().then(()=>c().then(()=>{s.default.info(u.PopupLocation.TOP_BAR,"Database reset successfully!")})).catch(e=>{s.default.error(u.PopupLocation.TOP_BAR,"Something went wrong while resetting the database: "+e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(2),l=n(10),s=n(1);t.default={updateConfig:async function(){return o.info("Updating app configuration"),r.default.config.getConfig().then(e=>{e.production?o.setLevel("warn"):(o.setLevel("debug"),o.debug("Environment is not production, setting log level to debug")),a.store.dispatch(a.updateConfig(e))}).catch(e=>{l.default.error(s.PopupLocation.TOP_BAR,e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(8),r=n(2);t.default={refreshCsrf:async function(){return o.default.csrf.getCsrf().then(e=>r.store.dispatch(r.setCsrf(e))).then(()=>{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(26),a=n(1),l=n(69);class s extends o.Component{constructor(e,t){super(e,t),this.onChange_title=e=>{this.setState({title:e.target.value})},this.onChange_category=e=>{this.setState({category:e.target.value})},this.onChange_author=e=>{this.setState({author:e.target.value})},this.onChange_body=e=>{this.setState({body:e.target.value})},this.onChange_solution=e=>{this.setState({solution:e.target.value})},this.onChange_previousChallenge=e=>{""===e.target.value?this.setState({previousChallenge:null}):this.setState({previousChallenge:parseInt(e.target.value)})},this.onSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.props.onSubmit(this.state),this.setState({message:"",title:"",category:"",author:"",body:"",solution:"",previousChallenge:null})},this.props.challenge?this.state={message:"",title:this.props.challenge.title,category:this.props.challenge.category,author:this.props.challenge.author,body:this.props.challenge.body,solution:this.props.challenge.solution,previousChallenge:this.props.challenge.previousChallenge}:this.state={message:"",title:"",category:"",author:"",body:"",solution:"",previousChallenge:null}}render(){var e=void 0!==this.props.challenge?this.props.challenge.id:void 0;return o.createElement(r.default,{id:a.ModalID.ADMIN_CHALLENGE,index:e,className:l.challengeAdminModal},o.createElement("div",{className:l.challengeAdminModalContent},o.createElement("form",{onSubmit:this.onSubmit},o.createElement("div",null,"Title:",o.createElement("input",{type:"text",id:"title",value:this.state.title,onChange:this.onChange_title})),o.createElement("div",null,"Category:",o.createElement("input",{type:"text",id:"category",value:this.state.category,onChange:this.onChange_category})),o.createElement("div",null,"Author:",o.createElement("input",{type:"text",id:"category",value:this.state.author,onChange:this.onChange_author})),o.createElement("div",null,"Body:",o.createElement("input",{type:"text",id:"body",value:this.state.body,onChange:this.onChange_body})),o.createElement("div",null,"Solution:",o.createElement("input",{type:"text",id:"solution",value:this.state.solution,onChange:this.onChange_solution})),o.createElement("div",null,"Previous Challenge:",o.createElement("select",{value:this.state.previousChallenge||"",onChange:this.onChange_previousChallenge},o.createElement("option",{value:""},"None"),this.props.existingChallenges.map(e=>o.createElement("option",{key:e.id,value:e.id},e.id,": ",e.title)))),o.createElement("div",{className:"modal__message"},this.state.message),o.createElement("button",{type:"submit",id:"submit"},"Submit"))))}}t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(18),a=n(3),l=n(2);class s extends o.Component{constructor(e,t){super(e,t),this.close=()=>{l.store.dispatch(l.closeModal())}}render(){return o.createElement(r,{className:this.props.className,isOpen:this.props.isOpen,onRequestClose:this.close},this.props.children,o.createElement("div",null,o.createElement("button",{id:"modal-close",onClick:this.close},"Close")))}}const i=a.connect((e,t)=>null!==e.modal?void 0===t.index?{isOpen:e.modal.id===t.id}:{isOpen:e.modal.id===t.id&&e.modal.index===t.index}:{isOpen:!1})(s);t.default=i},function(e,t,n){e.exports={background:"_9NDn3i86","app-root":"_93q3hyqj",appRoot:"_93q3hyqj"}},function(e,t,n){"use strict";function o(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(11),a=n(18),l=n(3),s=n(43),i=n(4),u=n(2);n(27),a.setAppElement("#root"),i.default.reset.resetApp().then(()=>{i.default.user.updateCurrentUser()}),r.render(o.createElement(l.Provider,{store:u.store},o.createElement(s.default,null)),document.getElementById("root"))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=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}}(),a=n(0),l=h(a),s=h(n(11)),i=h(n(5)),u=h(n(33)),c=function(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}(n(20)),d=n(13),p=h(d),f=n(39);function h(e){return e&&e.__esModule?e:{default:e}}function m(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}var g=t.portalClassName="ReactModalPortal",v=t.bodyOpenClassName="ReactModal__Body--open",y=void 0!==s.default.createPortal,b=function(){return y?s.default.createPortal:s.default.unstable_renderSubtreeIntoContainer};function E(e){return e()}var C=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,i=Array(a),c=0;c<a;c++)i[c]=arguments[c];return n=r=m(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.removePortal=function(){!y&&s.default.unmountComponentAtNode(r.node),E(r.props.parentSelector).removeChild(r.node)},r.portalRef=function(e){r.portal=e},r.renderPortal=function(e){var n=b()(r,l.default.createElement(u.default,o({defaultStyles:t.defaultStyles},e)),r.node);r.portalRef(n)},m(r,n)}return function(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)}(t,e),r(t,[{key:"componentDidMount",value:function(){d.canUseDOM&&(y||(this.node=document.createElement("div")),this.node.className=this.props.portalClassName,E(this.props.parentSelector).appendChild(this.node),!y&&this.renderPortal(this.props))}},{key:"getSnapshotBeforeUpdate",value:function(e){return{prevParent:E(e.parentSelector),nextParent:E(this.props.parentSelector)}}},{key:"componentDidUpdate",value:function(e,t,n){if(d.canUseDOM){var o=this.props,r=o.isOpen,a=o.portalClassName;e.portalClassName!==a&&(this.node.className=a);var l=n.prevParent,s=n.nextParent;s!==l&&(l.removeChild(this.node),s.appendChild(this.node)),(e.isOpen||r)&&!y&&this.renderPortal(this.props)}}},{key:"componentWillUnmount",value:function(){if(d.canUseDOM&&this.node&&this.portal){var e=this.portal.state,t=Date.now(),n=e.isOpen&&this.props.closeTimeoutMS&&(e.closesAt||t+this.props.closeTimeoutMS);n?(e.beforeClose||this.portal.closeWithTimeout(),setTimeout(this.removePortal,n-t)):this.removePortal()}}},{key:"render",value:function(){return d.canUseDOM&&y?(!this.node&&y&&(this.node=document.createElement("div")),b()(l.default.createElement(u.default,o({ref:this.portalRef,defaultStyles:t.defaultStyles},this.props)),this.node)):null}}],[{key:"setAppElement",value:function(e){c.setElement(e)}}]),t}(a.Component);C.propTypes={isOpen:i.default.bool.isRequired,style:i.default.shape({content:i.default.object,overlay:i.default.object}),portalClassName:i.default.string,bodyOpenClassName:i.default.string,htmlOpenClassName:i.default.string,className:i.default.oneOfType([i.default.string,i.default.shape({base:i.default.string.isRequired,afterOpen:i.default.string.isRequired,beforeClose:i.default.string.isRequired})]),overlayClassName:i.default.oneOfType([i.default.string,i.default.shape({base:i.default.string.isRequired,afterOpen:i.default.string.isRequired,beforeClose:i.default.string.isRequired})]),appElement:i.default.instanceOf(p.default),onAfterOpen:i.default.func,onRequestClose:i.default.func,closeTimeoutMS:i.default.number,ariaHideApp:i.default.bool,shouldFocusAfterRender:i.default.bool,shouldCloseOnOverlayClick:i.default.bool,shouldReturnFocusAfterClose:i.default.bool,parentSelector:i.default.func,aria:i.default.object,data:i.default.object,role:i.default.string,contentLabel:i.default.string,shouldCloseOnEsc:i.default.bool,overlayRef:i.default.func,contentRef:i.default.func},C.defaultProps={isOpen:!1,portalClassName:g,bodyOpenClassName:v,role:"dialog",ariaHideApp:!0,closeTimeoutMS:0,shouldFocusAfterRender:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,shouldReturnFocusAfterClose:!0,parentSelector:function(){return document.body}},C.defaultStyles={overlay:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(255, 255, 255, 0.75)"},content:{position:"absolute",top:"40px",left:"40px",right:"40px",bottom:"40px",border:"1px solid #ccc",background:"#fff",overflow:"auto",WebkitOverflowScrolling:"touch",borderRadius:"4px",outline:"none",padding:"20px"}},(0,f.polyfill)(C),t.default=C},function(e,t,n){"use strict";var o=n(32);function r(){}function a(){}a.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,a,l){if(l!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=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}}(),l=n(0),s=m(l),i=m(n(5)),u=h(n(34)),c=m(n(35)),d=h(n(20)),p=h(n(38)),f=m(n(13));function h(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 m(e){return e&&e.__esModule?e:{default:e}}var g={overlay:"ReactModal__Overlay",content:"ReactModal__Content"},v=9,y=27,b=0,E=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setOverlayRef=function(e){n.overlay=e,n.props.overlayRef&&n.props.overlayRef(e)},n.setContentRef=function(e){n.content=e,n.props.contentRef&&n.props.contentRef(e)},n.afterClose=function(){var e=n.props,t=e.appElement,o=e.ariaHideApp,r=e.htmlOpenClassName,a=e.bodyOpenClassName;a&&p.remove(document.body,a),r&&p.remove(document.getElementsByTagName("html")[0],r),o&&b>0&&0===(b-=1)&&d.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(u.returnFocus(),u.teardownScopedFocus()):u.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose()},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(u.setupScopedFocus(n.node),u.markForFocusLater()),n.setState({isOpen:!0},(function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus()},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){e.keyCode===v&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&e.keyCode===y&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var o="object"===(void 0===t?"undefined":r(t))?t:{base:g[e],afterOpen:g[e]+"--after-open",beforeClose:g[e]+"--before-close"},a=o.base;return n.state.afterOpen&&(a=a+" "+o.afterOpen),n.state.beforeClose&&(a=a+" "+o.beforeClose),"string"==typeof t&&t?a+" "+t:a},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,o){return n[e+"-"+o]=t[o],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(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)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,o=e.htmlOpenClassName,r=e.bodyOpenClassName;r&&p.add(document.body,r),o&&p.add(document.getElementsByTagName("html")[0],o),n&&(b+=1,d.hide(t))}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,r=e.overlayClassName,a=e.defaultStyles,l=n?{}:a.content,i=r?{}:a.overlay;return this.shouldBeClosed()?null:s.default.createElement("div",{ref:this.setOverlayRef,className:this.buildClassName("overlay",r),style:o({},i,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},s.default.createElement("div",o({id:t,ref:this.setContentRef,style:o({},l,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",this.props.aria||{}),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),this.props.children))}}]),t}(l.Component);E.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},E.propTypes={isOpen:i.default.bool.isRequired,defaultStyles:i.default.shape({content:i.default.object,overlay:i.default.object}),style:i.default.shape({content:i.default.object,overlay:i.default.object}),className:i.default.oneOfType([i.default.string,i.default.object]),overlayClassName:i.default.oneOfType([i.default.string,i.default.object]),bodyOpenClassName:i.default.string,htmlOpenClassName:i.default.string,ariaHideApp:i.default.bool,appElement:i.default.instanceOf(f.default),onAfterOpen:i.default.func,onAfterClose:i.default.func,onRequestClose:i.default.func,closeTimeoutMS:i.default.number,shouldFocusAfterRender:i.default.bool,shouldCloseOnOverlayClick:i.default.bool,shouldReturnFocusAfterClose:i.default.bool,role:i.default.string,contentLabel:i.default.string,aria:i.default.object,data:i.default.object,children:i.default.node,shouldCloseOnEsc:i.default.bool,overlayRef:i.default.func,contentRef:i.default.func,id:i.default.string,testId:i.default.string},t.default=E,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleBlur=u,t.handleFocus=c,t.markForFocusLater=function(){l.push(document.activeElement)},t.returnFocus=function(){var e=null;try{return void(0!==l.length&&(e=l.pop()).focus())}catch(t){console.warn(["You tried to return focus to",e,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){l.length>0&&l.pop()},t.setupScopedFocus=function(e){s=e,window.addEventListener?(window.addEventListener("blur",u,!1),document.addEventListener("focus",c,!0)):(window.attachEvent("onBlur",u),document.attachEvent("onFocus",c))},t.teardownScopedFocus=function(){s=null,window.addEventListener?(window.removeEventListener("blur",u),document.removeEventListener("focus",c)):(window.detachEvent("onBlur",u),document.detachEvent("onFocus",c))};var o,r=n(19),a=(o=r)&&o.__esModule?o:{default:o};var l=[],s=null,i=!1;function u(){i=!0}function c(){if(i){if(i=!1,!s)return;setTimeout((function(){s.contains(document.activeElement)||((0,a.default)(s)[0]||s).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,a.default)(e);if(!n.length)return void t.preventDefault();var o,r=t.shiftKey,l=n[0],s=n[n.length-1];if(e===document.activeElement){if(!r)return;o=s}s!==document.activeElement||r||(o=l);l===document.activeElement&&r&&(o=s);if(o)return t.preventDefault(),void o.focus();var i=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==i||"Chrome"==i[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(document.activeElement);u>-1&&(u+=r?-1:1);if(void 0===n[u])return t.preventDefault(),void(o=r?s:l).focus();t.preventDefault(),n[u].focus()};var o,r=n(19),a=(o=r)&&o.__esModule?o:{default:o};e.exports=t.default},function(e,t,n){"use strict";var o=function(){};e.exports=o},function(e,t,n){var o;
/*!
Copyright (c) 2015 Jed Watson.
Based on code that is Copyright 2013-2015, Facebook, Inc.
All rights reserved.
*/!function(){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen};void 0===(o=function(){return a}.call(t,n,t,e))||(e.exports=o)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dumpClassLists=function(){0};var o={},r={};t.add=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?o:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(a,e),n.add(e)}));var n,a},t.remove=function(e,t){return n=e.classList,a="html"==e.nodeName.toLowerCase()?o:r,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(a,e),0===a[e]&&n.remove(e)}));var n,a}},function(e,t,n){"use strict";function o(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function r(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,o=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function l(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,l=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?l="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(l="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==l||null!==s){var i=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+i+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==l?"\n "+l:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=o,t.componentWillReceiveProps=r),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var o=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,o)}}return e}n.r(t),n.d(t,"polyfill",(function(){return l})),o.__suppressDeprecationWarning=!0,r.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";
/** @license React v16.12.0
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&Symbol.for,r=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,s=o?Symbol.for("react.strict_mode"):60108,i=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,c=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,p=o?Symbol.for("react.concurrent_mode"):60111,f=o?Symbol.for("react.forward_ref"):60112,h=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,v=o?Symbol.for("react.lazy"):60116,y=o?Symbol.for("react.fundamental"):60117,b=o?Symbol.for("react.responder"):60118,E=o?Symbol.for("react.scope"):60119;function C(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case d:case p:case l:case i:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case g:case u:return e;default:return t}}case a:return t}}}function _(e){return C(e)===p}t.typeOf=C,t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=u,t.Element=r,t.ForwardRef=f,t.Fragment=l,t.Lazy=v,t.Memo=g,t.Portal=a,t.Profiler=i,t.StrictMode=s,t.Suspense=h,t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===p||e===i||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===E)},t.isAsyncMode=function(e){return _(e)||C(e)===d},t.isConcurrentMode=_,t.isContextConsumer=function(e){return C(e)===c},t.isContextProvider=function(e){return C(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return C(e)===f},t.isFragment=function(e){return C(e)===l},t.isLazy=function(e){return C(e)===v},t.isMemo=function(e){return C(e)===g},t.isPortal=function(e){return C(e)===a},t.isProfiler=function(e){return C(e)===i},t.isStrictMode=function(e){return C(e)===s},t.isSuspense=function(e){return C(e)===h}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(44),a=n(46),l=n(72),s=n(14),i=n(79),u=n(83),c=n(84),d=n(27),p=n(1);class f extends o.Component{render(){return o.createElement("div",{className:d.background},o.createElement("div",{id:"app",className:d.appRoot},o.createElement(r.default,null),o.createElement(l.default,null),o.createElement(s.default,{location:p.PopupLocation.TOP_BAR}),o.createElement(i.default,null),o.createElement(a.default,null),o.createElement(c.default,null),o.createElement(u.default,null)))}}t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(45);class l extends o.Component{constructor(e){super(e)}render(){return this.props.config.production?o.createElement("div",{className:a.title},"CECTF","{}"):o.createElement("div",{className:a.titleStaging},o.createElement("div",{className:a.titleStagingTilt},"STAGING"),o.createElement("div",null,"CECTF","{}"))}}const s=r.connect((e,t)=>({config:e.config}))(l);t.default=s},function(e,t,n){e.exports={title:"RbSR2kI_","title-staging":"awfh0yhe",titleStaging:"awfh0yhe","title-staging--tilt":"_2QJ7Z_r9",titleStagingTilt:"_2QJ7Z_r9"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(47),l=n(66),s=n(70),i=n(1),u=n(71);class c extends o.Component{constructor(){super(...arguments),this.content=()=>{switch(this.props.navPage){case i.NavPage.ABOUT:return o.createElement(s.default,null);case i.NavPage.CTF:return o.createElement(a.default,null);case i.NavPage.ADMIN:return o.createElement(l.default,null)}}}render(){return o.createElement("div",{id:"app-content",className:u.appContent,"data-content":this.props.navPage},this.content())}}const d=r.connect(e=>({navPage:e.navPage}))(c);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(48),l=n(4),s=n(65);class i extends o.Component{constructor(e){super(e),l.default.challenges.updateChallenges()}render(){return o.createElement("div",{id:"challenges",className:s.challenges},this.props.challenges.map(e=>o.createElement(a.default,{key:e.data.id,challenge:e.data,open:e.open,files:this.props.filesMap.get(e.data.id)})))}}const u=r.connect((e,t)=>({challenges:e.challenges,filesMap:e.files}))(i);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(1),l=n(4),s=n(63),i=n(14);class u extends o.Component{constructor(e,t){super(e,t),this.state={flagAttempt:""},this.onClick=this.onClick.bind(this),this.onFlagFieldChange=this.onFlagFieldChange.bind(this),this.onFlagSubmit=this.onFlagSubmit.bind(this)}onClick(){this.props.open||l.default.challengeFiles.updateChallengeFiles(this.props.challenge),l.default.challenges.setChallengeIsOpen(this.props.challenge,!this.props.open)}onFlagFieldChange(e){this.setState({flagAttempt:e.target.value})}onFlagSubmit(e){e.preventDefault(),e.stopPropagation(),l.default.challenges.submitFlag(this.props.challenge.id,this.state.flagAttempt)}render(){const e=this.props.challenge.solved?s.challengeTileSolved:s.challengeTileUnsolved,t=this.props.open?s.challengeTileBodyOpen:s.challengeTileBodyClosed,n=this.props.files?this.props.files.map(e=>o.createElement("li",null,o.createElement("a",{href:e.url},e.name))):"Loading files...";return o.createElement("div",{key:"tile","data-id":String(this.props.challenge.id),"data-solved":this.props.challenge.solved,className:e},o.createElement("div",{className:s.challengeTileHeader,onClick:this.onClick},o.createElement("div",{"data-id":"title",className:s.challengeTileTitle},this.props.challenge.title),o.createElement("div",{"data-id":"category",className:s.challengeTileCategory},this.props.challenge.category)),o.createElement("div",{"data-id":"body","data-open":this.props.open,className:t},o.createElement("hr",null),o.createElement("div",null,this.props.challenge.body),o.createElement("div",null,"Brought to you by ",this.props.challenge.author),o.createElement("div",null,o.createElement("ul",null,n)),o.createElement("div",null,o.createElement("form",{onSubmit:this.onFlagSubmit},o.createElement(i.default,{location:a.PopupLocation.CHALLENGE_TILE,locationKey:this.props.challenge.id}),o.createElement("input",{type:"text","data-id":"flag",onChange:this.onFlagFieldChange}),o.createElement("button",{type:"submit","data-id":"submit",disabled:this.props.loading},"Submit")))))}}const c=r.connect((e,t)=>({loading:e.activeRequests.includes("/api/ctf/challenges/"+t.challenge.id)}))(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(21),l=n(10),s=n(22),i=n(1);t.default={login:async function(e,t){return o.info("Attempting login for user %s",e),r.default.auth.login(e,t).then(()=>{o.debug("Login succeeded for user %s",e),a.default.updateCurrentUser()}).catch(e=>{o.debug("Login failed: %s",e),l.default.error(i.PopupLocation.TOP_BAR,e)})},logout:async function(){return o.info("Logging out"),r.default.auth.logout().then(()=>s.default.resetApp()).catch(e=>{o.debug("Logout failed: %s",e),l.default.error(i.PopupLocation.TOP_BAR,e)})},register:async function(e,t,n){return o.info("Registering %s [%s]",t,e),r.default.auth.register(e,t,n).then(()=>(o.debug("Registration succeeded"),a.default.updateCurrentUser())).catch(e=>{o.debug("Registration failed: %s",e),l.default.error(i.PopupLocation.SIGNUP,e)})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9),r=n(2);t.default={login:async function(e,t){return o.default.post("/api/auth/login",{username:e,password:t,csrf_token:r.store.getState().csrf}).then()},logout:async function(){return o.default.get("/api/auth/logout").then()},register:async function(e,t,n){return o.default.post("/api/auth/register",{email:e,username:t,password:n,csrf_token:r.store.getState().csrf}).then()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(12),r=n(1);const a=o.combineReducers({activeRequests:function(e=[],t){switch(t.type){case"START_REQUEST":return e.concat(t.value);case"FINISH_REQUEST":var n=e.indexOf(t.value);return n>-1?e.slice(0,n).concat(e.slice(n+1,e.length)):e;default:return e}},adminChallenges:function(e=[],t){switch(t.type){case"ADMIN_SET_CHALLENGES":return t.value;case"ADMIN_ADD_CHALLENGE":return[...e,t.value];case"ADMIN_UPDATE_CHALLENGE":return e.map(e=>e.id===t.value.id?Object.assign({},e,t.value):e);case"ADMIN_DELETE_CHALLENGE":return e.reduce((e,n)=>t.value!==n?e.concat([n]):e,[]);default:return e}},config:function(e=r.DEFAULT_CONFIG,t){switch(t.type){case"UPDATE_CONFIG":return t.value;default:return e}},csrf:function(e="",t){switch(t.type){case"SET_CSRF":return t.value;default:return e}},challenges:function(e=[],t){switch(t.type){case"CTF_SET_CHALLENGES":return t.value.map(e=>({data:e,open:!1}));case"CTF_UPDATE_CHALLENGE":return e.map(e=>e.data.id===t.value.data.id?Object.assign({},e,t.value):e);default:return e}},files:function(e=new Map,t){switch(t.type){case"SET_CHALLENGE_FILES":return(e=new Map(e)).set(t.value.id,t.value.files);default:return e}},modal:function(e=null,t){switch(t.type){case"OPEN_MODAL":return t.value;case"CLOSE_MODAL":return null;default:return e}},navPage:function(e=r.NavPage.ABOUT,t){switch(t.type){case"SET_NAV_PAGE":return t.value;default:return e}},popups:function(e=new Map,t){switch(t.type){case"ADD_POPUP":return(e=new Map(e)).set(t.value.location,t.value),e;case"REMOVE_POPUP":return e.get(t.value)&&(e=new Map(e)).delete(t.value),e;case"CLEAR_POPUPS":return new Map;default:return e}},user:function(e=null,t){switch(t.type){case"SET_USER":return t.value;default:return e}}});t.default=(e,t)=>("RESET"==t.type&&(e=void 0),a(e,t))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateConfig=function(e){return{type:"UPDATE_CONFIG",value:e}},t.reset=function(){return{type:"RESET",value:null}},t.setCsrf=function(e){return{type:"SET_CSRF",value:e}},t.setNavPage=function(e){return{type:"SET_NAV_PAGE",value:e}},t.ctfSetChallenges=function(e){return{type:"CTF_SET_CHALLENGES",value:e}},t.ctfUpdateChallenge=function(e){return{type:"CTF_UPDATE_CHALLENGE",value:e}},t.adminSetChallenges=function(e){return{type:"ADMIN_SET_CHALLENGES",value:e}},t.adminAddChallenge=function(e){return{type:"ADMIN_ADD_CHALLENGE",value:e}},t.adminUpdateChallenge=function(e){return{type:"ADMIN_UPDATE_CHALLENGE",value:e}},t.adminDeleteChallenge=function(e){return{type:"ADMIN_DELETE_CHALLENGE",value:e}},t.setChallengeFiles=function(e,t){return{type:"SET_CHALLENGE_FILES",value:{id:e,files:t}}},t.setUser=function(e){return{type:"SET_USER",value:e}},t.addPopup=function(e){return{type:"ADD_POPUP",value:e}},t.removePopup=function(e){return{type:"REMOVE_POPUP",value:e}},t.clearPopups=function(){return{type:"CLEAR_POPUPS",value:void 0}},t.startRequest=function(e){return{type:"START_REQUEST",value:e}},t.finishRequest=function(e){return{type:"FINISH_REQUEST",value:e}},t.openModal=function(e){return{type:"OPEN_MODAL",value:{id:e,index:void 0}}},t.openModalKey=function(e,t){return{type:"OPEN_MODAL",value:{id:e,index:t}}},t.closeModal=function(){return{type:"CLOSE_MODAL",value:void 0}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getChallenges:async function(){return o.default.get("/api/ctf/challenges").then(async e=>200!=e.status?[]:e.json())},submitFlag:async function(e,t){return o.default.post("/api/ctf/challenges/"+e,{flag:t}).then(async e=>e.json())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getChallenges:async function(){return o.default.get("/api/admin/challenges").then(async e=>200!=e.status?[]:e.json())},createChallenge:async function(e){return o.default.post("/api/admin/challenges",e).then(async e=>e.json())},updateChallenge:async function(e,t){return o.default.post("/api/admin/challenges/"+e,t).then(async e=>e.json())},deleteChallenge:async function(e){return o.default.deleteHttp("/api/admin/challenges/"+e).then(()=>{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getFiles:async function(e){return o.default.get("/api/files/"+e).then(async e=>200!=e.status?[]:e.json())},uploadFile:async function(e,t){return o.default.upload("/api/files/"+e,t).then()},deleteFile:async function(e,t){return o.default.deleteHttp("/api/files/"+e+"/"+t.name).then()}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getConfig:async function(){return o.default.get("/api/config/config.json").then(e=>{if(e.ok)return e.json();throw"Failed to get configuration"})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getCsrf:async function(){return o.default.get("/api/auth/csrf").then(e=>e.json()).then(e=>e.csrf_token)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={resetDatabase:async function(){return o.default.get("/api/test/reset").then(()=>{})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(9);t.default={getCurrentUser:async function(){return o.default.get("/api/user").then(async e=>200!=e.status?null:e.json())}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(10),l=n(2),s=n(1),i=async function(){o.info("Updating challenges"),r.default.challenges.getChallenges().then(e=>{l.store.dispatch(l.ctfSetChallenges(e))})};t.default={updateChallenges:i,submitFlag:async function(e,t){return o.info("Submitting flag %s for challenge %s",t,e),r.default.challenges.submitFlag(e,t).then(t=>{t.status==s.SubmissionStatus.CORRECT?(o.debug("Flag was correct!"),a.default.info(s.PopupLocation.CHALLENGE_TILE,"You did it!",e),i()):t.status==s.SubmissionStatus.INCORRECT?a.default.error(s.PopupLocation.CHALLENGE_TILE,"That ain't right. n00b.",e):t.status==s.SubmissionStatus.ALREADY_SOLVED?a.default.info(s.PopupLocation.CHALLENGE_TILE,"You already solved this one!",e):(o.error("Unknown submission status: %s",t.status),a.default.error(s.PopupLocation.CHALLENGE_TILE,"Unknown server error :O",e))})},setChallengeIsOpen:async function(e,t){o.info("Opening/closing challenge %s",e.id),l.store.dispatch(l.ctfUpdateChallenge({data:e,open:t}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(2);t.default={updateChallenges:async function(){o.info("Updating admin challenges"),r.default.challengesAdmin.getChallenges().then(e=>{a.store.dispatch(a.adminSetChallenges(e))})},createChallenge:async function(e){return o.info('Creating new challenge "{}"',e.title),r.default.challengesAdmin.createChallenge(e).then(e=>(a.store.dispatch(a.adminAddChallenge(e)),e))},updateChallenge:async function(e,t){return o.info("Updating challenge {}",e),r.default.challengesAdmin.updateChallenge(e,t).then(e=>(a.store.dispatch(a.adminUpdateChallenge(e)),e))},deleteChallenge:async function(e){return o.info("Deleting challenge {}",e.id),r.default.challengesAdmin.deleteChallenge(e.id).then(()=>{a.store.dispatch(a.adminDeleteChallenge(e))})}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(7),r=n(8),a=n(2),l=async function(e){return o.info("Updating challenge files for challenge {}",e.id),r.default.challengeFiles.getFiles(e.id).then(t=>{a.store.dispatch(a.setChallengeFiles(e.id,t))})};t.default={updateChallengeFiles:l,uploadChallengeFile:async function(e,t){return o.info("Adding file {} to challenge {}",t.name,e.id),r.default.challengeFiles.uploadFile(e.id,t).then(()=>l(e))},deleteChallengeFile:async function(e,t){return o.info("Deleting file {} from challenge {}",t.name,e.id),r.default.challengeFiles.deleteFile(e.id,t).then(()=>l(e))}}},function(e,t,n){e.exports={"challenge-tile__solved":"O8P2gB4X",challengeTileSolved:"O8P2gB4X","challenge-tile__unsolved":"_7fMA6VYR",challengeTileUnsolved:"_7fMA6VYR","challenge-tile__header":"_8cHrxNBw",challengeTileHeader:"_8cHrxNBw","challenge-tile__title":"c3JYNHgN",challengeTileTitle:"c3JYNHgN","challenge-tile__category":"_6nLSNNoy",challengeTileCategory:"_6nLSNNoy","challenge-tile__author":"_8O7SEAMk",challengeTileAuthor:"_8O7SEAMk","challenge-tile__body--open":"mQCTiPCC",challengeTileBodyOpen:"mQCTiPCC","challenge-tile__body--closed":"_53u-kFd-",challengeTileBodyClosed:"_53u-kFd-"}},function(e,t,n){e.exports={"popup--error":"_2zoHcxb2",popupError:"_2zoHcxb2","popup--info":"fgvJDWL3",popupInfo:"fgvJDWL3","popup__container--invisible":"_7zXNViic",popupContainerInvisible:"_7zXNViic","popup__container--visible":"dQ31zLWx",popupContainerVisible:"dQ31zLWx"}},function(e,t,n){e.exports={challenges:"bTmECdpk"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(67);class a extends o.Component{constructor(e){super(e)}render(){return o.createElement("div",null,o.createElement("div",null,"This is the admin page!"),o.createElement(r.default,null))}}t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(4),l=n(68),s=n(25),i=n(1),u=n(2);class c extends o.Component{constructor(e){super(e),a.default.challengesAdmin.updateChallenges(),this.state={modalOpen:!1},this.openCreateChallengeModal=this.openCreateChallengeModal.bind(this),this.createChallenge=this.createChallenge.bind(this)}openCreateChallengeModal(e){e.preventDefault(),e.stopPropagation(),u.store.dispatch(u.openModal(i.ModalID.ADMIN_CHALLENGE))}createChallenge(e){a.default.challengesAdmin.createChallenge(e).then(()=>{u.store.dispatch(u.closeModal())})}render(){return[o.createElement("div",{id:"challenges",key:"challenges"},o.createElement("button",{id:"create-challenge-button",onClick:this.openCreateChallengeModal},"Create New Challenge"),this.props.challenges.map(e=>o.createElement(l.default,{key:e.id,challenge:e,files:this.props.filesMap.get(e.id),existingChallenges:this.props.challenges}))),o.createElement("div",{key:"modal"},o.createElement(s.default,{onSubmit:this.createChallenge,existingChallenges:this.props.challenges}))]}}const d=r.connect((e,t)=>({challenges:e.adminChallenges,filesMap:e.files}))(c);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(1),a=n(25),l=n(4),s=n(2);class i extends o.Component{constructor(e,t){super(e,t),this.editChallenge=e=>{e.preventDefault(),e.stopPropagation(),s.store.dispatch(s.openModalKey(r.ModalID.ADMIN_CHALLENGE,this.props.challenge.id))},this.updateChallenge=e=>{l.default.challengesAdmin.updateChallenge(this.props.challenge.id,e).then(()=>{s.store.dispatch(s.closeModal())})},this.deleteChallenge=()=>{l.default.challengesAdmin.deleteChallenge(this.props.challenge)},this.uploadFile=e=>{if(this.props.challenge.id){var t=e.target.files;if(t)for(var n=0;n<t.length;n++)l.default.challengeFiles.uploadChallengeFile(this.props.challenge,t[n])}},this.deleteFile=(e,t)=>{e.stopPropagation(),e.preventDefault(),this.props.challenge.id&&l.default.challengeFiles.deleteChallengeFile(this.props.challenge,t)},l.default.challengeFiles.updateChallengeFiles(e.challenge)}render(){const e=this.props.files?this.props.files.map(e=>o.createElement("li",null,o.createElement("a",{href:e.url},e.name),o.createElement("button",{onClick:t=>this.deleteFile(t,e)},"Delete File"))):"Loading files...";return[o.createElement("div",{className:"challenge-tile",key:"challenge-tile"},o.createElement("div",{className:"challenge-tile__title"},this.props.challenge.title),o.createElement("div",{className:"challenge-tile__category"},this.props.challenge.category),o.createElement("div",{className:"challenge-tile__author"},this.props.challenge.author),o.createElement("div",null,"Solution: ",this.props.challenge.solution),o.createElement("button",{onClick:this.editChallenge}," Edit Challenge"),o.createElement("div",null,o.createElement("ul",null,e),o.createElement("input",{type:"file",onChange:this.uploadFile,onClick:e=>{e.stopPropagation()}})),o.createElement("button",{onClick:this.deleteChallenge},"Delete Challenge")),o.createElement(a.default,{key:"modal",onSubmit:this.updateChallenge,challenge:this.props.challenge,existingChallenges:this.props.existingChallenges.filter(e=>e.id!==this.props.challenge.id)})]}}t.default=i},function(e,t,n){e.exports={"challenge-admin-modal":"e7eZjOv2",challengeAdminModal:"e7eZjOv2","challenge-admin-modal__content":"_15MLgeT4",challengeAdminModalContent:"_15MLgeT4"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(4);class l extends o.Component{constructor(e){super(e),this.reset=()=>{a.default.reset.resetDatabase()}}render(){var e=null;return this.props.config.production||(e=o.createElement("div",null,o.createElement("p",null,o.createElement("b",null,"UNDER CONSTRUCTION")),o.createElement("p",null,"This is the staging environment for CECTF. It is a fully functional deployment, but because it is only for testing, it is also highly unstable."),o.createElement("p",null,o.createElement("b",null,"!!! Any data created here IS EXPENDABLE and WILL be deleted by daily test automation. !!!")),o.createElement("p",null,"With that said, you can log in to the app with these credentials:"),o.createElement("table",{style:{marginLeft:"auto",marginRight:"auto"}},o.createElement("tbody",null,o.createElement("tr",null,o.createElement("th",null,"Username"),o.createElement("th",null,"Password")),o.createElement("tr",null,o.createElement("td",null,"contestant"),o.createElement("td",null,"contestant")),o.createElement("tr",null,o.createElement("td",null,"admin"),o.createElement("td",null,"admin")))),o.createElement("p",null,"Click this button to reset the database:"),o.createElement("p",null,o.createElement("button",{onClick:this.reset},"Reset Database")),o.createElement("p",null,o.createElement("b",null,"WARNING: THIS WILL WIPE EVERYTHING IN THE STAGING ENVIRONMENT AND REVERT TO A KNOWN STATE")),o.createElement("p",null,"Please visit ",o.createElement("a",{href:"https://ctf.chiquito.us"},"ctf.chiquito.us")," for the genuine CTF experience! And as always, feel free to report any bugs/thoughts/concerns to daniel.chiquito@gmail.com."),o.createElement("hr",null))),o.createElement("div",null,e,o.createElement("p",null,"Welcome to ",o.createElement("b",null,"Chiquito's Ersatz Capture The Flag"),"!"),o.createElement("p",null,"While participating in other CTFs, I have come up with ideas for my own challenges that I thought were pretty cool. This website is where I keep the better ideas."),o.createElement("p",null,"Sadly, I am still working on infrastructure for hosting challenge servers, so for now challenges are limited to what can be described in a set of files."),o.createElement("p",null,"This project is also an excuse for me to work on my web development skills. It's all open source, so if you are interested in the development process you can check out these resources:"),o.createElement("li",null,o.createElement("ul",null,"Github: ",o.createElement("a",{href:"https://github.com/cectf"},"https://github.com/cectf")),o.createElement("ul",null,"Travis CI: ",o.createElement("a",{href:"https://travis-ci.com/cectf"},"https://travis-ci.com/cectf"))),o.createElement("p",null,"You can also visit ",o.createElement("a",{href:"https://ctf-staging.chiquito.us"},"ctf-staging.chiquito.us"),", the public test environment! ctf-staging is a completely independent deployment of the application, but with volatile, expendable dummy data. Feel free to visit and poke around!"))}}const s=r.connect((e,t)=>({config:e.config}))(l);t.default=s},function(e,t,n){e.exports={background:"_4str_8_4","app-root":"dr1alicF",appRoot:"dr1alicF","app-content":"_95b0Ub-f",appContent:"_95b0Ub-f"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(4),a=n(73),l=n(75),s=n(78);class i extends o.Component{constructor(e){super(e),this.onLogout=e=>{e.preventDefault(),e.stopPropagation(),r.default.auth.logout()}}render(){return this.props.user?o.createElement("div",{id:"user-bar",className:s.userBarLoggedIn,"data-logged-in":!0,"data-username":this.props.user.username},o.createElement("div",{id:"user-bar__welcome",className:s.userBarWelcome},"Welcome, ",this.props.user.username,"!"),o.createElement("div",{id:"user-bar__logout",className:s.userBarLogout},o.createElement("button",{id:"logout",onClick:this.onLogout},"Log out"))):o.createElement("div",{id:"user-bar",className:s.userBarLoggedOut,"data-logged-in":!1},o.createElement(a.default,null),o.createElement(l.default,null))}}const u=n(3).connect(e=>e.user?{user:e.user}:{})(i);t.default=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(4),l=n(1),s=n(74);class i extends o.Component{constructor(e){super(e),this.state={username:"",password:""},this.onSubmit=this.onSubmit.bind(this),this.onChange_username=this.onChange_username.bind(this),this.onChange_password=this.onChange_password.bind(this)}onSubmit(e){e.preventDefault(),e.stopPropagation(),a.default.popup.remove(l.PopupLocation.TOP_BAR),a.default.auth.login(this.state.username,this.state.password)}onChange_username(e){this.setState({username:e.target.value})}onChange_password(e){this.setState({password:e.target.value})}render(){return o.createElement("div",{id:"login-form",className:s.loginForm},o.createElement("form",{name:"login-form",onSubmit:this.onSubmit},o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,o.createElement("span",{className:s.loginFormUsername},o.createElement("label",{htmlFor:"username"}," Username: "))),o.createElement("td",null,o.createElement("input",{id:"username",type:"text",onChange:this.onChange_username}))),o.createElement("tr",null,o.createElement("td",null,o.createElement("span",{className:s.loginFormPassword},o.createElement("label",{htmlFor:"password"}," Password: "))),o.createElement("td",null,o.createElement("input",{id:"password",type:"password",onChange:this.onChange_password}))),o.createElement("tr",null,o.createElement("td",null),o.createElement("td",null,o.createElement("button",{id:"login",disabled:this.props.loading,className:s.loginFormSubmit,type:"submit"},"Log in")))))))}}const u=r.connect(e=>({loading:e.activeRequests.includes("/api/auth/login")}))(i);t.default=u},function(e,t,n){e.exports={"login-form":"_3pASCIC4",loginForm:"_3pASCIC4","login-form__username":"_7ww7fMvj",loginFormUsername:"_7ww7fMvj","login-form__password":"_53ePQ4Fk",loginFormPassword:"_53ePQ4Fk","login-form__submit":"_8K4-aoOD",loginFormSubmit:"_8K4-aoOD"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(4),l=n(26),s=n(14),i=n(1),u=n(76),c=n(77),d=n(2);class p extends o.Component{constructor(e){super(e),this.onClick=e=>{e.preventDefault(),e.stopPropagation(),d.store.dispatch(d.openModal(i.ModalID.REGISTER))},this.onChange_email=e=>{this.setState({email:e.target.value})},this.onChange_username=e=>{this.setState({username:e.target.value})},this.onChange_password=e=>{this.setState({password:e.target.value})},this.onSubmit=e=>{e.preventDefault(),e.stopPropagation(),a.default.popup.remove(i.PopupLocation.SIGNUP),a.default.auth.register(this.state.email,this.state.username,this.state.password)},this.state={email:"",username:"",password:""}}render(){return[o.createElement("div",{key:"register",id:"register",className:u.register},o.createElement("button",{id:"register__link",onClick:this.onClick},"Sign up!")),o.createElement(l.default,{key:"modal",id:i.ModalID.REGISTER,index:void 0,className:c.registerModal},o.createElement("div",{className:c.registerModalContent},o.createElement("form",{onSubmit:this.onSubmit},o.createElement("table",null,o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",null,"Email:"),o.createElement("td",null,o.createElement("input",{type:"text",id:"register-modal__email",name:"email",onChange:this.onChange_email}))),o.createElement("tr",null,o.createElement("td",null,"Username:"),o.createElement("td",null,o.createElement("input",{type:"text",id:"register-modal__username",name:"username",onChange:this.onChange_username}))),o.createElement("tr",null,o.createElement("td",null,"Password:"),o.createElement("td",null,o.createElement("input",{type:"password",id:"register-modal__password",name:"password",onChange:this.onChange_password}))))),o.createElement("button",{id:"register-modal__submit",type:"submit",disabled:this.props.loading},"Submit"))),o.createElement(s.default,{location:i.PopupLocation.SIGNUP}))]}}const f=r.connect(e=>({loading:e.activeRequests.includes("/api/auth/register")}))(p);t.default=f},function(e,t,n){e.exports={register:"bXyFG0Sc"}},function(e,t,n){e.exports={"register-modal":"_6zNgW0rG",registerModal:"_6zNgW0rG","register-modal__content":"_18jlz8dO",registerModalContent:"_18jlz8dO"}},function(e,t,n){e.exports={background:"fcvvi_IT","app-root":"b5xpAKex",appRoot:"b5xpAKex","user-bar":"awEYtKxP",userBar:"awEYtKxP","user-bar--logged-out":"_3SI8FUQV",userBarLoggedOut:"_3SI8FUQV","user-bar--logged-in":"fl8eECoe",userBarLoggedIn:"fl8eECoe","user-bar__welcome":"_3Xswmj4S",userBarWelcome:"_3Xswmj4S","user-bar__logout":"bcMF2Q3h",userBarLogout:"bcMF2Q3h"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(3),a=n(2),l=n(1),s=n(80),i=n(82);class u extends o.Component{constructor(e){super(e)}render(){return o.createElement("div",{id:"nav-bar",className:i.navBar},this.props.navPages.map(e=>o.createElement(s.default,{key:e,page:e,isActive:this.props.navPage===e,switch:this.props.switchTo(e)})))}}const c=r.connect(e=>{var t=[l.NavPage.ABOUT];if(e.user)for(var n in e.user.roles)"contestant"===e.user.roles[n].name&&(l.NavPage.CTF in t||t.push(l.NavPage.CTF)),"admin"===e.user.roles[n].name&&(l.NavPage.ADMIN in t||t.push(l.NavPage.ADMIN));return{navPages:t,navPage:e.navPage}},e=>({switchTo:t=>()=>{e(a.setNavPage(t))}}))(u);t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(1),a=n(81);class l extends o.Component{constructor(){super(...arguments),this.onClick=e=>{e.preventDefault(),e.stopPropagation(),this.props.switch()},this.getId=()=>{switch(this.props.page){case r.NavPage.ABOUT:return"nav-about";case r.NavPage.CTF:return"nav-ctf";case r.NavPage.ADMIN:return"nav-admin"}},this.getText=()=>{switch(this.props.page){case r.NavPage.ABOUT:return"About";case r.NavPage.CTF:return"CTF";case r.NavPage.ADMIN:return"Admin"}}}render(){return o.createElement("div",{className:this.props.isActive?a.navTabActive:a.navTabInactive,id:this.getId(),onClick:this.onClick},this.getText())}}t.default=l},function(e,t,n){e.exports={"nav-tab":"kMa41LHc",navTab:"kMa41LHc","nav-tab--active":"_1iS-3FAc",navTabActive:"_1iS-3FAc","nav-tab--inactive":"_5mAe_Hkq",navTabInactive:"_5mAe_Hkq"}},function(e,t,n){e.exports={background:"_2H9oyq4z","app-root":"_9FQDjYvg",appRoot:"_9FQDjYvg","nav-bar":"eSdduwrn",navBar:"eSdduwrn"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(3),r=n(0);class a extends r.Component{constructor(e){super(e),this.mapToObject=e=>{var t=Object.create(null);for(var[n,o]of e)o instanceof Map?t[n.toString()]=this.mapToObject(o):t[n.toString()]=o;return t},this.replacer=(e,t)=>t instanceof Map?this.mapToObject(t):t}render(){return this.props.currentState.config.production?null:r.createElement("div",null,r.createElement("hr",null),r.createElement("div",null,"Current Redux State:",r.createElement("pre",null,JSON.stringify(this.props.currentState,this.replacer,2))))}}var l=o.connect((e,t)=>({currentState:e}))(a);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(0),r=n(85);class a extends o.Component{constructor(e){super(e)}render(){return o.createElement("div",{className:r.footer},o.createElement("div",null,"Owned and maintained by Daniel Chiquito <daniel.chiquito@gmail.com>"),o.createElement("div",null,"Please contact me with any suggestions, bugs, or new challenges!"))}}t.default=a},function(e,t,n){e.exports={footer:"fyraV80L"}}]);